diff --git a/index.html b/index.html index 879cd21c7..53701e768 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@ } } - + diff --git a/static/js/md-_basePickBy-CkE1q7AX.js b/static/js/md-_basePickBy-B78WwQFo.js similarity index 95% rename from static/js/md-_basePickBy-CkE1q7AX.js rename to static/js/md-_basePickBy-B78WwQFo.js index 7a0189028..2302a9a7f 100644 --- a/static/js/md-_basePickBy-CkE1q7AX.js +++ b/static/js/md-_basePickBy-B78WwQFo.js @@ -1 +1 @@ -import{e as v,c as O,g as m,k as b,h as P,j as p,l as w,m as A,n as x,t as N,o as c}from"./md-_baseUniq-BgyQXxRT.js";import{aM as g,aA as M,aN as E,aO as F,aP as T,aQ as I,aR as _,aS as $,aT as y,aU as B}from"./md-index-BVqvVggs.js";var S=/\s/;function R(n){for(var r=n.length;r--&&S.test(n.charAt(r)););return r}var G=/^\s+/;function H(n){return n&&n.slice(0,R(n)+1).replace(G,"")}var o=NaN,L=/^[-+]0x[0-9a-f]+$/i,q=/^0b[01]+$/i,z=/^0o[0-7]+$/i,C=parseInt;function K(n){if(typeof n=="number")return n;if(v(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=H(n);var t=q.test(n);return t||z.test(n)?C(n.slice(2),t?2:8):L.test(n)?o:+n}var Q=1/0,U=17976931348623157e292;function W(n){if(!n)return n===0?n:0;if(n=K(n),n===Q||n===-1/0){var r=n<0?-1:1;return r*U}return n===n?n:0}function X(n){var r=W(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?O(n):[]}var l=Object.prototype,Y=l.hasOwnProperty,dn=M(function(n,r){n=Object(n);var t=-1,e=r.length,a=e>2?r[2]:void 0;for(a&&E(r[0],r[1],a)&&(e=1);++t-1?a[f?r[i]:i]:void 0}}var J=Math.max;function Z(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var a=t==null?0:X(t);return a<0&&(a=J(e+a,0)),P(n,m(r),a)}var hn=D(Z);function V(n,r){var t=-1,e=I(n)?Array(n.length):[];return p(n,function(a,f,i){e[++t]=r(a,f,i)}),e}function gn(n,r){var t=_(n)?w:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&A(n,r,nn)}function rn(n,r){return n2?r[2]:void 0;for(a&&E(r[0],r[1],a)&&(e=1);++t-1?a[f?r[i]:i]:void 0}}var J=Math.max;function Z(n,r,t){var e=n==null?0:n.length;if(!e)return-1;var a=t==null?0:X(t);return a<0&&(a=J(e+a,0)),P(n,m(r),a)}var hn=D(Z);function V(n,r){var t=-1,e=I(n)?Array(n.length):[];return p(n,function(a,f,i){e[++t]=r(a,f,i)}),e}function gn(n,r){var t=_(n)?w:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&A(n,r,nn)}function rn(n,r){return n-1}function $(n){return sn(n)?xn(n):Mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function M(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new P:void 0;for(i.set(n,r),i.set(r,n);++o=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new P}else u=r?[]:s;n:for(;++t-1}function $(n){return sn(n)?xn(n):Mn(n)}var kn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nr=/^\w*$/;function N(n,r){if(T(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||B(n)?!0:nr.test(n)||!kn.test(n)||r!=null&&n in Object(r)}var rr=500;function er(n){var r=mn(n,function(t){return e.size===rr&&e.clear(),t}),e=r.cache;return r}var tr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ir=/\\(\\)?/g,fr=er(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(tr,function(e,t,f,i){r.push(f?i.replace(ir,"$1"):t||e)}),r});function ar(n){return n==null?"":dn(n)}function An(n,r){return T(n)?n:N(n,r)?[n]:fr(ar(n))}function M(n){if(typeof n=="string"||B(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function yn(n,r){r=An(r,n);for(var e=0,t=r.length;n!=null&&es))return!1;var b=i.get(n),l=i.get(r);if(b&&l)return b==r&&l==n;var o=-1,c=!0,h=e&ve?new P:void 0;for(i.set(n,r),i.set(r,n);++o=ht){var b=r?null:Tt(n);if(b)return H(b);a=!1,f=En,u=new P}else u=r?[]:s;n:for(;++tr*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,C=un(c-f),t=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(Cy?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,C=un(c-f),t=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(Cy?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),ph?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=n},function(C,G,N){var u=N(0);function s(){}for(var i in u)s[i]=u[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=s},function(C,G,N){function u(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(s){this.x=s},u.prototype.setY=function(s){this.y=s},u.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},C.exports=u},function(C,G,N){var u=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),n=N(13),y=N(12),t=N(11);function h(c,l,T){u.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(u.prototype);for(var o in u)h[o]=u[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(P,1);var F=g.source.owner.getEdges().indexOf(g);if(F==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,g,d,L=this.getNodes(),F=L.length,A=0;AT&&(c=T),l>g&&(l=g)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,g=s.MAX_VALUE,d=-s.MAX_VALUE,L,F,A,P,J,V=this.nodes,Q=V.length,D=0;DL&&(l=L),TA&&(g=A),dL&&(l=L),TA&&(g=A),d=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},C.exports=h},function(C,G,N){var u,s=N(1);function i(r){u=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,n,y){if(f==null&&n==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,n=e,f=r;var t=n.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,n,y);if(f.isInterGraph=!0,f.source=n,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof u){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var n,y=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(ny)return e[0]=h,e[1]=n,e[2]=P,e[3]=t,!1;if(fy?(e[0]=l,e[1]=T,a=!0):(e[0]=c,e[1]=o,a=!0):v===p&&(f>y?(e[0]=h,e[1]=o,a=!0):(e[0]=g,e[1]=T,a=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=A,m=!0):E===p&&(y>f?(e[2]=F,e[3]=A,m=!0):(e[2]=Q,e[3]=V,m=!0)),a&&m)return!1;if(f>y?n>t?(I=this.getCardinalDirection(v,p,4),w=this.getCardinalDirection(E,p,2)):(I=this.getCardinalDirection(-v,p,3),w=this.getCardinalDirection(-E,p,1)):n>t?(I=this.getCardinalDirection(-v,p,1),w=this.getCardinalDirection(-E,p,3)):(I=this.getCardinalDirection(v,p,2),w=this.getCardinalDirection(E,p,4)),!a)switch(I){case 1:H=o,R=f+-L/p,e[0]=R,e[1]=H;break;case 2:R=g,H=n+d*p,e[0]=R,e[1]=H;break;case 3:H=T,R=f+L/p,e[0]=R,e[1]=H;break;case 4:R=l,H=n+-d*p,e[0]=R,e[1]=H;break}if(!m)switch(w){case 1:k=A,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var n=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,g=void 0,d=void 0,L=void 0,F=void 0,A=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,A=n-t,J=t*y-n*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*A,Q===0?null:(g=(A*V-P*J)/Q,d=(F*J-L*V)/Q,new u(g,d))},s.angleOfVector=function(i,r,e,f){var n=void 0;return i!==e?(n=Math.atan((f-r)/(e-i)),e=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),g=(-o-Math.sqrt(o*o-4*h*c))/(2*h),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,C.exports=s},function(C,G,N){function u(){}u.sign=function(s){return s>0?1:s<0?-1:0},u.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},u.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},C.exports=u},function(C,G,N){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,C.exports=u},function(C,G,N){var u=function(){function n(y,t){for(var h=0;h"u"?"undefined":u(i);return i==null||r!="object"&&r!="function"},C.exports=s},function(C,G,N){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(A[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var J=P.getEdges(),g=0;g-1&&A.splice(rt,1)}d=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(a){if(l.indexOf(a)<0){var m=T.get(a),v=m-1;v==1&&P.push(a),T.set(a,v)}})}l=l.concat(P),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},h.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=h},function(C,G,N){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},C.exports=u},function(C,G,N){var u=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new u(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},C.exports=s},function(C,G,N){function u(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},n.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var F=0;Fn}}]),e}();C.exports=r},function(C,G,N){function u(){}u.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(Math.min(this.m+1,this.n)),this.U=function(Nt){var At=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)At.push(0);return At}(this.n),e=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(this.m),f=!0,n=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var p=E+1;p=0;W--){if(function(Nt,At){return Nt&&At}(W0;){var q=void 0,Rt=void 0;for(q=a-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===a-2)Rt=4;else{var Lt=void 0;for(Lt=a-1;Lt>=q&&Lt!==q;Lt--){var vt=(Lt!==a?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*vt){this.s[Lt]=0;break}}Lt===q?Rt=3:Lt===a-1?Rt=1:(Rt=2,q=Lt)}switch(q++,Rt){case 1:{var it=r[a-2];r[a-2]=0;for(var gt=a-2;gt>=q;gt--){var Tt=u.hypot(this.s[gt],it),Ct=this.s[gt]/Tt,Dt=it/Tt;this.s[gt]=Tt,gt!==q&&(it=-Dt*r[gt-1],r[gt-1]=Ct*r[gt-1]);for(var mt=0;mt=this.s[q+1]);){var Mt=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Mt,qMath.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},C.exports=u},function(C,G,N){var u=function(){function r(e,f){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=n,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function n(){}for(var y in f)n[y]=f[y];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,i.exports=n},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function n(t,h,o){f.call(this,t,h,o)}n.prototype=Object.create(f.prototype);for(var y in f)n[y]=f[y];i.exports=n},880:(i,r,e)=>{var f=e(551).LGraph;function n(t,h,o){f.call(this,t,h,o)}n.prototype=Object.create(f.prototype);for(var y in f)n[y]=f[y];i.exports=n},578:(i,r,e)=>{var f=e(551).LGraphManager;function n(t){f.call(this,t)}n.prototype=Object.create(f.prototype);for(var y in f)n[y]=f[y];i.exports=n},765:(i,r,e)=>{var f=e(551).FDLayout,n=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,g=e(551).Point,d=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,A=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var a=new n(this);return this.graphManager=a,a},D.prototype.newGraph=function(a){return new y(null,this.graphManager,a)},D.prototype.newNode=function(a){return new t(this.graphManager,a)},D.prototype.newEdge=function(a){return new h(null,null,a)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(v)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),v=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(v),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var a=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return a.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var v=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(v,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),m={},v=0;v0&&this.updateDisplacements();for(var v=0;v0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,v=0;v=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(X)||(a.nodesInRelativeHorizontal.push(X),a.nodeToRelativeConstraintMapHorizontal.set(X,[]),a.dummyToNodeForVerticalAlignment.has(X)?a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(X,a.idToNodeMap.get(X).getCenterX())),a.nodesInRelativeHorizontal.includes(B)||(a.nodesInRelativeHorizontal.push(B),a.nodeToRelativeConstraintMapHorizontal.set(B,[]),a.dummyToNodeForVerticalAlignment.has(B)?a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(B,a.idToNodeMap.get(B).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(_)||(a.nodesInRelativeVertical.push(_),a.nodeToRelativeConstraintMapVertical.set(_,[]),a.dummyToNodeForHorizontalAlignment.has(_)?a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(_,a.idToNodeMap.get(_).getCenterY())),a.nodesInRelativeVertical.includes(lt)||(a.nodesInRelativeVertical.push(lt),a.nodeToRelativeConstraintMapVertical.set(lt,[]),a.dummyToNodeForHorizontalAlignment.has(lt)?a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(lt,a.idToNodeMap.get(lt).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,Rt=new Set,Lt=0;return X.forEach(function(vt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var gt=it;for(q.push(gt),Rt.add(gt),_[Lt].push(gt);q.length!=0;){gt=q.shift(),B.has(gt)&&(lt[Lt]=!0);var Tt=X.get(gt);Tt.forEach(function(Ct){Rt.has(Ct)||(q.push(Ct),Rt.add(Ct),_[Lt].push(Ct))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,a.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=a.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,v=0;v1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(a,m,v){var E=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(a),I=new V;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(v.x),I.setWorldOrgY(v.y);for(var w=0;w1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-v)/U,q=O;et!=U;q=++q%z){var Rt=W[q].getOtherEnd(a);if(Rt!=m){var Lt=(v+et*lt)%360,vt=(Lt+lt)%360;D.branchRadialLayout(Rt,a,Lt,vt,p+I,I),et++}}},D.maxDiagonalInTree=function(a){for(var m=A.MIN_VALUE,v=0;vm&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var a=this,m={};this.memberGroups={},this.idToDummyNode={};for(var v=[],E=this.graphManager.getAllNodes(),p=0;p"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;a.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(a.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,a.idToDummyNode[x]=W;var U=a.getGraphManager().add(a.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;zp?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var m=this.compoundOrder[a],v=m.id,E=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[v],m.rect.x,m.rect.y,E,p,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var a=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(v){var E=a.idToDummyNode[v],p=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;a.adjustLocations(m[v],E.rect.x,E.rect.y,p,I,w,R)})},D.prototype.getToBeTiled=function(a){var m=a.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var v=a.getChild();if(v==null)return this.toBeTiled[m]=!1,!1;for(var E=v.getNodes(),p=0;p0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(a){a.id;for(var m=a.getEdges(),v=0,E=0;Ek&&(k=U.rect.height)}v+=k+a.verticalPadding}},D.prototype.tileCompoundMembers=function(a,m){var v=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(E){var p=m[E];if(v.tiledMemberPack[E]=v.tileNodes(a[E],p.paddingLeft+p.paddingRight),p.rect.width=v.tiledMemberPack[E].width,p.rect.height=v.tiledMemberPack[E].height,p.setCenter(v.tiledMemberPack[E].centerX,v.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(a,m){var v=this.tileNodesByFavoringDim(a,m,!0),E=this.tileNodesByFavoringDim(a,m,!1),p=this.getOrgRatio(v),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var H=I/p,x=w/p,k=Math.pow(v-E,2)+4*(H+E)*(x+v)*p,W=(E-v+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(a,m,v){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(a,v));var R=function(O){return O.rect.width*O.rect.height},H=function(O,X){return R(X)-R(O)};a.sort(function(z,O){var X=H;return w.idealRowWidth?(X=I,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W0&&(w+=a.horizontalPadding),a.rowWidth[v]=w,a.width0&&(R+=a.verticalPadding);var H=0;R>a.rowHeight[v]&&(H=a.rowHeight[v],a.rowHeight[v]=R,H=a.rowHeight[v]-H),a.height+=H,a.rows[v].push(m)},D.prototype.getShortestRowIndex=function(a){for(var m=-1,v=Number.MAX_VALUE,E=0;Ev&&(m=E,v=a.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(a,m,v){if(a.idealRowWidth){var E=a.rows.length-1,p=a.rowWidth[E];return p+m+a.horizontalPadding<=a.idealRowWidth}var I=this.getShortestRowIndex(a);if(I<0)return!0;var w=a.rowWidth[I];if(w+a.horizontalPadding+m<=a.width)return!0;var R=0;a.rowHeight[I]0&&(R=v+a.verticalPadding-a.rowHeight[I]);var H;a.width-w>=m+a.horizontalPadding?H=(a.height+R)/(w+m+a.horizontalPadding):H=(a.height+R)/a.width,R=v+a.verticalPadding;var x;return a.widthI&&m!=v){E.splice(-1,1),a.rows[v].push(p),a.rowWidth[m]=a.rowWidth[m]-I,a.rowWidth[v]=a.rowWidth[v]+I,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=a.verticalPadding);var H=a.rowHeight[m]+a.rowHeight[v];a.rowHeight[m]=w,a.rowHeight[v]0)for(var et=p;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=A.MAX_VALUE,O,X,B=0;B{var f=e(551).FDLayoutNode,n=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Mt=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,g.has(ht)?d[g.get(ht)]:Z.get(ht)),Mt+=tt.get(ht)):(tt.set(ht,g.has(ht)?L[g.get(ht)]:Z.get(ht)),Mt+=tt.get(ht))}),Mt=Mt/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Mt)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=g.has(ht)?d[g.get(ht)]:Z.get(ht):ct+=g.has(ht)?L[g.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=dt.shift(),Mt=b.get(st);Mt.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){At=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(At)throw Zt}}var ce=(Mt+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,nt=0;if(b.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?$++:K++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?Z++:nt++}),$>K&&Z>nt)for(var ut=0;utK)for(var ot=0;otnt)for(var tt=0;tt1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[d[g.get(S.nodeId)],L[g.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var dt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;dt.size>0?wt=d[g.get(dt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[g.get(yt)]],p[S]=[d[g.get(yt)],L[g.get(yt)]],S++})},K=0;K0?wt=d[g.get(dt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[d[g.get(yt)],wt],p[S]=[d[g.get(yt)],L[g.get(yt)]],S++})},ut=0;utW&&(W=k[et].length,U=et);if(W0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:d[g.get(S.nodeId)],y:L[g.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,d.forEach(function(S,b){d[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){d[g.get(S.nodeId)]=S.position.x,L[g.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(nt){$.add(nt)});var K=new Set([].concat(f($)).filter(function(nt){return R.has(nt)})),Z=void 0;K.size>0?Z=d[g.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(nt){R.has(nt)||(d[g.get(nt)]=Z)})},Vt=0;Vt0?Z=L[g.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(nt){R.has(nt)||(L[g.get(nt)]=Z)})},bt=0;bt{i.exports=C}},N={};function u(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,u),e.exports}var s=u(45);return s})()})}(pe)),pe.exports}(function(M,Y){(function(G,N){M.exports=N(cr())})(Te,function(C){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),n=1;n{var f=function(){function t(h,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=h[Symbol.iterator](),L;!(l=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,g=F}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),n=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=g[0],F=L.connectedEdges().length,g.forEach(function(p){p.connectedEdges().length0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,F=void 0;try{for(var A=h.nodeIndexes[Symbol.iterator](),P;!(d=(P=A.next()).done);d=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var a=rt.boundingBox(),m=h.xCoords[D]-a.w/2,v=h.xCoords[D]+a.w/2,E=h.yCoords[D]-a.h/2,p=h.yCoords[D]+a.h/2;ml&&(l=v),Eg&&(g=p)}}}catch(x){L=!0,F=x}finally{try{!d&&A.return&&A.return()}finally{if(L)throw F}}var I=t.x-(l+c)/2,w=t.y-(g+T)/2;h.xCoords=h.xCoords.map(function(x){return x+I}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;Wl&&(l=U),etg&&(g=z)});var R=t.x-(l+c)/2,H=t.y-(g+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+R,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,A=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;QL&&(l=L),TA&&(g=A),d{var f=e(548),n=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(d,L){var F=d.cy,A=d.eles,P=A.nodes(),J=A.edges(),V=void 0,Q=void 0,D=void 0,rt={};d.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var a=function(x){return typeof x=="function"},m=function(x,k){return a(x)?x(k):x},v=f.calcParentsWithoutChildren(F,A),E=function H(x,k,W,U){for(var et=k.length,z=0;z0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:a(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new n,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,d),p(w,R,J),I(w,d),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function d(L,F){for(var A=0;A0)if(v){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(P,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,V.push(o(A))}),A.quality=="default"||A.quality=="proof"){var w=P.collection();if(A.tile){var R=new Map,H=[],x=[],k=0,W={nodeIndexes:R,xCoords:H,yCoords:x},U=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,Tt){w.merge(vt.nodes()[Tt]),gt.isParent()||(W.nodeIndexes.set(vt.nodes()[Tt].id(),k++),W.xCoords.push(vt.nodes()[0].position().x),W.yCoords.push(vt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(vt,it){A.eles=vt,Q.push(l(A,V[it])),t.relocateComponent(rt[it],Q[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(rt[it],V[it],A)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=V[it].nodeIndexes),vt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var Ct=void 0;vt.nodes().not(B).forEach(function(Dt){if(A.quality=="draft")if(!Dt.isParent())Ct=gt.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[Ct]-Dt.boundingbox().w/2,y:V[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,gt);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(A.quality=="draft"){var St=gt.get(mt.id()),Vt=gt.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,gt);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,gt);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,A.randomize).shifts;if(A.quality=="draft")V.forEach(function(vt,it){var gt=vt.xCoords.map(function(Ct){return Ct+_[it].dx}),Tt=vt.yCoords.map(function(Ct){return Ct+_[it].dy});vt.xCoords=gt,vt.yCoords=Tt});else{var lt=0;O.forEach(function(vt){Object.keys(Q[vt]).forEach(function(it){var gt=Q[vt][it];gt.setCenter(gt.getCenterX()+_[lt].dx,gt.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=A.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var p=o(A);V.push(p)}A.quality=="default"||A.quality=="proof"?(Q.push(l(A,V[0])),t.relocateComponent(rt[0],Q[0],A)):t.relocateComponent(rt[0],V[0],A)}var q=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var Tt=void 0,Ct=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},Ct=xt[Dt])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Tt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Tt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Tt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Tt.y-=Ct.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Rt=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(vt){return vt.css("display")=="none"});A.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,A,q),Rt.length>0&&Rt.forEach(function(vt){vt.position(q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();i.exports=g},657:(i,r,e)=>{var f=e(548),n=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,L=new Map,F=new Map,A=[],P=[],J=[],V=[],Q=[],D=[],rt=[],a=[],m=void 0,v=1e8,E=1e-9,p=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,H=function(){for(var b=0,$=0,K=!1;$=nt;){ot=Z[nt++];for(var It=A[ot],ft=0;ftdt&&(dt=Q[Mt],wt=Mt)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?A[b].push(F.get($.id())):A[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;d.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,A[$].push(K),A[L.get(K)].push(b)})},vt=!0,it=!1,gt=void 0;try{for(var Tt=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Tt.next()).done);vt=!0){var Dt=Ct.value;Lt(Dt)}}catch(S){it=!0,gt=S}finally{try{!vt&&Tt.return&&Tt.return()}finally{if(it)throw gt}}m=L.size;var mt=void 0;if(m>2){R=m{var f=e(212),n=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&n(cytoscape),i.exports=n},140:i=>{i.exports=C}},N={};function u(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,u),e.exports}var s=u(579);return s})()})})(be);var ur=be.exports;const gr=ke(ur);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:at(M=>`${M},${M/2} 0,${M} 0,0`,"L"),R:at(M=>`0,${M/2} ${M},0 ${M},${M}`,"R"),T:at(M=>`0,0 ${M},0 ${M/2},${M}`,"T"),B:at(M=>`${M/2},0 ${M},${M} 0,${M}`,"B")},he={L:at((M,Y)=>M-Y+2,"L"),R:at((M,Y)=>M-2,"R"),T:at((M,Y)=>M-Y+2,"T"),B:at((M,Y)=>M-2,"B")},dr=at(function(M){return zt(M)?M==="L"?"R":"L":M==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=at(function(M){const Y=M;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=at(function(M){const Y=M;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=at(function(M){const Y=M;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=at(function(M,Y){const C=zt(M)&&Qt(Y),G=Qt(M)&&zt(Y);return C||G},"isArchitectureDirectionXY"),vr=at(function(M){const Y=M[0],C=M[1],G=zt(Y)&&Qt(C),N=Qt(Y)&&zt(C);return G||N},"isArchitecturePairXY"),pr=at(function(M){return M!=="LL"&&M!=="RR"&&M!=="TT"&&M!=="BB"},"isValidArchitectureDirectionPair"),me=at(function(M,Y){const C=`${M}${Y}`;return pr(C)?C:void 0},"getArchitectureDirectionPair"),yr=at(function([M,Y],C){const G=C[0],N=C[1];return zt(G)?Qt(N)?[M+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[M+(G==="L"?-1:1),Y]:zt(N)?[M+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[M,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=at(function(M){return M==="LT"||M==="TL"?[1,1]:M==="BL"||M==="LB"?[1,-1]:M==="BR"||M==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=at(function(M){return M.type==="service"},"isArchitectureService"),Tr=at(function(M){return M.type==="junction"},"isArchitectureJunction"),Ge=at(M=>M.data(),"edgeData"),ae=at(M=>M.data(),"nodeData"),Ue=qe.architecture,pt=new hr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=at(()=>{pt.reset(),nr()},"clear"),Lr=at(function({id:M,icon:Y,in:C,title:G,iconText:N}){if(pt.records.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${pt.records.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The service [${M}] cannot be placed within itself`);if(pt.records.registeredIds[C]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[C]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}pt.records.registeredIds[M]="node",pt.records.nodes[M]={id:M,type:"service",icon:Y,iconText:N,title:G,edges:[],in:C}},"addService"),Mr=at(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Ar=at(function({id:M,in:Y}){pt.records.registeredIds[M]="node",pt.records.nodes[M]={id:M,type:"junction",edges:[],in:Y}},"addJunction"),Cr=at(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=at(()=>Object.values(pt.records.nodes),"getNodes"),Or=at(M=>pt.records.nodes[M],"getNode"),Dr=at(function({id:M,icon:Y,in:C,title:G}){if(pt.records.registeredIds[M]!==void 0)throw new Error(`The group id [${M}] is already in use by another ${pt.records.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The group [${M}] cannot be placed within itself`);if(pt.records.registeredIds[C]===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[C]==="node")throw new Error(`The group [${M}]'s parent is not a group`)}pt.records.registeredIds[M]="group",pt.records.groups[M]={id:M,icon:Y,title:G,in:C}},"addGroup"),xr=at(()=>Object.values(pt.records.groups),"getGroups"),Ir=at(function({lhsId:M,rhsId:Y,lhsDir:C,rhsDir:G,lhsInto:N,rhsInto:u,lhsGroup:s,rhsGroup:i,title:r}){if(!Re(C))throw new Error(`Invalid direction given for left hand side of edge ${M}--${Y}. Expected (L,R,T,B) got ${C}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${M}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[M]===void 0&&pt.records.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[M]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[M].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const n={lhsId:M,lhsDir:C,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:u,rhsGroup:i,title:r};pt.records.edges.push(n),pt.records.nodes[M]&&pt.records.nodes[Y]&&(pt.records.nodes[M].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Rr=at(()=>pt.records.edges,"getEdges"),Sr=at(()=>{if(pt.records.dataStructures===void 0){const M=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const n=me(f.lhsDir,f.rhsDir);n&&(e[n]=f.rhsId)}else{const n=me(f.rhsDir,f.lhsDir);n&&(e[n]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(M)[0],C={[Y]:1},G=Object.keys(M).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=at(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){C[e]=1,delete G[e];const f=M[e],[n,y]=i[e];Object.entries(f).forEach(([t,h])=>{C[h]||(i[h]=yr([n,y],t),r.push(h))})}}return i},"BFS"),u=[N(Y)];for(;Object.keys(G).length>0;)u.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:M,spatialMaps:u}}return pt.records.dataStructures},"getDataStructures"),Fr=at((M,Y)=>{pt.records.elements[M]=Y},"setElementForId"),br=at(M=>pt.records.elements[M],"getElementById"),le={clear:Nr,setDiagramTitle:Ke,getDiagramTitle:je,setAccTitle:_e,getAccTitle:tr,setAccDescription:er,getAccDescription:rr,addService:Lr,getServices:Mr,addJunction:Ar,getJunctions:Cr,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Ir,getEdges:Rr,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(M){const Y=fe().architecture;return Y!=null&&Y[M]?Y[M]:Ue[M]}at(Pt,"getConfigField");var Pr=at((M,Y)=>{sr(M,Y),M.groups.map(Y.addGroup),M.services.map(C=>Y.addService({...C,type:"service"})),M.junctions.map(C=>Y.addJunction({...C,type:"junction"})),M.edges.map(Y.addEdge)},"populateDb"),Gr={parse:at(async M=>{const Y=await lr("architecture",M);Se.debug(Y),Pr(Y,le)},"parse")},Ur=at(M=>` +import{aH as Te,aI as ke,_ as nt,g as qe,s as Je,a as Qe,b as Ke,n as je,o as _e,G as tr,T as er,v as rr,l as Se,aj as Ne,c as fe,aJ as Ee,d as ir,E as ar,aK as nr,aL as or}from"./md-index-B8Nim9kS.js";import{p as sr}from"./md-chunk-TMUBEWPD-zEBQnby0.js";import{I as hr}from"./md-chunk-KFBOBJHC-bxuwoawJ.js";import{p as lr}from"./md-gitGraph-YCYPL57B-CpuUbWJB.js";import{c as Fe}from"./md-cytoscape.esm-BSw61sAN.js";import"./md-_baseUniq-DU1ET3rn.js";import"./md-_basePickBy-B78WwQFo.js";import"./md-clone-ByE4h4D7.js";var be={exports:{}},pe={exports:{}},ye={exports:{}},Oe;function fr(){return Oe||(Oe=1,function(M,Y){(function(G,N){M.exports=N()})(Te,function(){return function(C){var G={};function N(g){if(G[g])return G[g].exports;var s=G[g]={i:g,l:!1,exports:{}};return C[g].call(s.exports,s,s.exports,N),s.l=!0,s.exports}return N.m=C,N.c=G,N.i=function(g){return g},N.d=function(g,s,i){N.o(g,s)||Object.defineProperty(g,s,{configurable:!1,enumerable:!0,get:i})},N.n=function(g){var s=g&&g.__esModule?function(){return g.default}:function(){return g};return N.d(s,"a",s),s},N.o=function(g,s){return Object.prototype.hasOwnProperty.call(g,s)},N.p="",N(N.s=28)}([function(C,G,N){function g(){}g.QUALITY=1,g.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,g.DEFAULT_INCREMENTAL=!1,g.DEFAULT_ANIMATION_ON_LAYOUT=!0,g.DEFAULT_ANIMATION_DURING_LAYOUT=!1,g.DEFAULT_ANIMATION_PERIOD=50,g.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,g.DEFAULT_GRAPH_MARGIN=15,g.NODE_DIMENSIONS_INCLUDE_LABELS=!1,g.SIMPLE_NODE_SIZE=40,g.SIMPLE_NODE_HALF_SIZE=g.SIMPLE_NODE_SIZE/2,g.EMPTY_COMPOUND_NODE_SIZE=40,g.MIN_EDGE_LENGTH=1,g.WORLD_BOUNDARY=1e6,g.INITIAL_WORLD_BOUNDARY=g.WORLD_BOUNDARY/1e3,g.WORLD_CENTER_X=1200,g.WORLD_CENTER_Y=900,C.exports=g},function(C,G,N){var g=N(2),s=N(8),i=N(9);function r(f,a,y){g.call(this,y),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=y,this.bendpoints=[],this.source=f,this.target=a}r.prototype=Object.create(g.prototype);for(var e in g)r[e]=g[e];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,a){for(var y=this.getOtherEnd(f),t=a.getGraphManager().getRoot();;){if(y.getOwner()==a)return y;if(y.getOwner()==t)break;y=y.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=i.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=i.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r},function(C,G,N){function g(s){this.vGraphObject=s}C.exports=g},function(C,G,N){var g=N(2),s=N(10),i=N(13),r=N(0),e=N(16),f=N(5);function a(t,h,o,c){o==null&&c==null&&(c=h),g.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&h!=null?this.rect=new i(h.x,h.y,o.width,o.height):this.rect=new i}a.prototype=Object.create(g.prototype);for(var y in g)a[y]=g[y];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(t){this.rect.width=t},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(t){this.rect.height=t},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(t,h){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=h.width,this.rect.height=h.height},a.prototype.setCenter=function(t,h){this.rect.x=t-this.rect.width/2,this.rect.y=h-this.rect.height/2},a.prototype.setLocation=function(t,h){this.rect.x=t,this.rect.y=h},a.prototype.moveBy=function(t,h){this.rect.x+=t,this.rect.y+=h},a.prototype.getEdgeListToNode=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";h.push(c)}}),h},a.prototype.getEdgesBetween=function(t){var h=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&h.push(c)}),h},a.prototype.getNeighborsList=function(){var t=new Set,h=this;return h.edges.forEach(function(o){if(o.source==h)t.add(o.target);else{if(o.target!=h)throw"Incorrect incidency!";t.add(o.source)}}),t},a.prototype.withChildren=function(){var t=new Set,h,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;lh?(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(h+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(t){var h=this.rect.x;h>r.WORLD_BOUNDARY?h=r.WORLD_BOUNDARY:h<-r.WORLD_BOUNDARY&&(h=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(h,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=a},function(C,G,N){var g=N(0);function s(){}for(var i in g)s[i]=g[i];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=s},function(C,G,N){function g(s,i){s==null&&i==null?(this.x=0,this.y=0):(this.x=s,this.y=i)}g.prototype.getX=function(){return this.x},g.prototype.getY=function(){return this.y},g.prototype.setX=function(s){this.x=s},g.prototype.setY=function(s){this.y=s},g.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},g.prototype.getCopy=function(){return new g(this.x,this.y)},g.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},C.exports=g},function(C,G,N){var g=N(2),s=N(10),i=N(0),r=N(7),e=N(3),f=N(1),a=N(13),y=N(12),t=N(11);function h(c,l,T){g.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=i.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof r?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}h.prototype=Object.create(g.prototype);for(var o in g)h[o]=g[o];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(c,l,T){if(l==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var v=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(v.source=l,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),l.edges.push(v),T!=l&&T.edges.push(v),v)}},h.prototype.remove=function(c){var l=c;if(c instanceof e){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),u,v=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(A,1),u.target!=u.source&&u.target.edges.splice(P,1);var F=u.source.owner.getEdges().indexOf(u);if(F==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(F,1)}},h.prototype.updateLeftTop=function(){for(var c=s.MAX_VALUE,l=s.MAX_VALUE,T,u,v,L=this.getNodes(),F=L.length,A=0;AT&&(c=T),l>u&&(l=u)}return c==s.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=l-v,this.top=c-v,new y(this.left,this.top))},h.prototype.updateBounds=function(c){for(var l=s.MAX_VALUE,T=-s.MAX_VALUE,u=s.MAX_VALUE,v=-s.MAX_VALUE,L,F,A,P,J,V=this.nodes,Q=V.length,D=0;DL&&(l=L),TA&&(u=A),vL&&(l=L),TA&&(u=A),v=this.nodes.length){var Q=0;T.forEach(function(D){D.owner==c&&Q++}),Q==this.nodes.length&&(this.isConnected=!0)}},C.exports=h},function(C,G,N){var g,s=N(1);function i(r){g=N(6),this.layout=r,this.graphs=[],this.edges=[]}i.prototype.addRoot=function(){var r=this.layout.newGraph(),e=this.layout.newNode(null),f=this.add(r,e);return this.setRootGraph(f),this.rootGraph},i.prototype.add=function(r,e,f,a,y){if(f==null&&a==null&&y==null){if(r==null)throw"Graph is null!";if(e==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(e.child!=null)throw"Already has a child!";return r.parent=e,e.child=r,r}else{y=f,a=e,f=r;var t=a.getOwner(),h=y.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==h)return f.isInterGraph=!1,t.add(f,a,y);if(f.isInterGraph=!0,f.source=a,f.target=y,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},i.prototype.remove=function(r){if(r instanceof g){var e=r;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(e==this.rootGraph||e.parent!=null&&e.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(e.getEdges());for(var a,y=f.length,t=0;t=r.getRight()?e[0]+=Math.min(r.getX()-i.getX(),i.getRight()-r.getRight()):r.getX()<=i.getX()&&r.getRight()>=i.getRight()&&(e[0]+=Math.min(i.getX()-r.getX(),r.getRight()-i.getRight())),i.getY()<=r.getY()&&i.getBottom()>=r.getBottom()?e[1]+=Math.min(r.getY()-i.getY(),i.getBottom()-r.getBottom()):r.getY()<=i.getY()&&r.getBottom()>=i.getBottom()&&(e[1]+=Math.min(i.getY()-r.getY(),r.getBottom()-i.getBottom()));var y=Math.abs((r.getCenterY()-i.getCenterY())/(r.getCenterX()-i.getCenterX()));r.getCenterY()===i.getCenterY()&&r.getCenterX()===i.getCenterX()&&(y=1);var t=y*e[0],h=e[1]/y;e[0]t)return e[0]=f,e[1]=o,e[2]=y,e[3]=V,!1;if(ay)return e[0]=h,e[1]=a,e[2]=P,e[3]=t,!1;if(fy?(e[0]=l,e[1]=T,n=!0):(e[0]=c,e[1]=o,n=!0):d===p&&(f>y?(e[0]=h,e[1]=o,n=!0):(e[0]=u,e[1]=T,n=!0)),-E===p?y>f?(e[2]=J,e[3]=V,m=!0):(e[2]=P,e[3]=A,m=!0):E===p&&(y>f?(e[2]=F,e[3]=A,m=!0):(e[2]=Q,e[3]=V,m=!0)),n&&m)return!1;if(f>y?a>t?(I=this.getCardinalDirection(d,p,4),w=this.getCardinalDirection(E,p,2)):(I=this.getCardinalDirection(-d,p,3),w=this.getCardinalDirection(-E,p,1)):a>t?(I=this.getCardinalDirection(-d,p,1),w=this.getCardinalDirection(-E,p,3)):(I=this.getCardinalDirection(d,p,2),w=this.getCardinalDirection(E,p,4)),!n)switch(I){case 1:H=o,R=f+-L/p,e[0]=R,e[1]=H;break;case 2:R=u,H=a+v*p,e[0]=R,e[1]=H;break;case 3:H=T,R=f+L/p,e[0]=R,e[1]=H;break;case 4:R=l,H=a+-v*p,e[0]=R,e[1]=H;break}if(!m)switch(w){case 1:k=A,x=y+-rt/p,e[2]=x,e[3]=k;break;case 2:x=Q,k=t+D*p,e[2]=x,e[3]=k;break;case 3:k=V,x=y+rt/p,e[2]=x,e[3]=k;break;case 4:x=J,k=t+-D*p,e[2]=x,e[3]=k;break}}return!1},s.getCardinalDirection=function(i,r,e){return i>r?e:1+e%4},s.getIntersection=function(i,r,e,f){if(f==null)return this.getIntersection2(i,r,e);var a=i.x,y=i.y,t=r.x,h=r.y,o=e.x,c=e.y,l=f.x,T=f.y,u=void 0,v=void 0,L=void 0,F=void 0,A=void 0,P=void 0,J=void 0,V=void 0,Q=void 0;return L=h-y,A=a-t,J=t*y-a*h,F=T-c,P=o-l,V=l*c-o*T,Q=L*P-F*A,Q===0?null:(u=(A*V-P*J)/Q,v=(F*J-L*V)/Q,new g(u,v))},s.angleOfVector=function(i,r,e,f){var a=void 0;return i!==e?(a=Math.atan((f-r)/(e-i)),e=0){var T=(-o+Math.sqrt(o*o-4*h*c))/(2*h),u=(-o-Math.sqrt(o*o-4*h*c))/(2*h),v=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:v}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,C.exports=s},function(C,G,N){function g(){}g.sign=function(s){return s>0?1:s<0?-1:0},g.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},g.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},C.exports=g},function(C,G,N){function g(){}g.MAX_VALUE=2147483647,g.MIN_VALUE=-2147483648,C.exports=g},function(C,G,N){var g=function(){function a(y,t){for(var h=0;h"u"?"undefined":g(i);return i==null||r!="object"&&r!="function"},C.exports=s},function(C,G,N){function g(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(L.push(A[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),v.add(P);for(var J=P.getEdges(),u=0;u-1&&A.splice(rt,1)}v=new Set,F=new Map}}return o},h.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(l),u=0;u=0&&c.splice(V,1);var Q=F.getNeighborsList();Q.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),d=m-1;d==1&&P.push(n),T.set(n,d)}})}l=l.concat(P),(c.length==1||c.length==2)&&(u=!0,v=c[0])}return v},h.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=h},function(C,G,N){function g(){}g.seed=1,g.x=0,g.nextDouble=function(){return g.x=Math.sin(g.seed++)*1e4,g.x-Math.floor(g.x)},C.exports=g},function(C,G,N){var g=N(5);function s(i,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(i){this.lworldOrgX=i},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(i){this.lworldOrgY=i},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(i){this.lworldExtX=i},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(i){this.lworldExtY=i},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(i){this.ldeviceOrgX=i},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(i){this.ldeviceOrgY=i},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(i){this.ldeviceExtX=i},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(i){this.ldeviceExtY=i},s.prototype.transformX=function(i){var r=0,e=this.lworldExtX;return e!=0&&(r=this.ldeviceOrgX+(i-this.lworldOrgX)*this.ldeviceExtX/e),r},s.prototype.transformY=function(i){var r=0,e=this.lworldExtY;return e!=0&&(r=this.ldeviceOrgY+(i-this.lworldOrgY)*this.ldeviceExtY/e),r},s.prototype.inverseTransformX=function(i){var r=0,e=this.ldeviceExtX;return e!=0&&(r=this.lworldOrgX+(i-this.ldeviceOrgX)*this.lworldExtX/e),r},s.prototype.inverseTransformY=function(i){var r=0,e=this.ldeviceExtY;return e!=0&&(r=this.lworldOrgY+(i-this.ldeviceOrgY)*this.lworldExtY/e),r},s.prototype.inverseTransformPoint=function(i){var r=new g(this.inverseTransformX(i.x),this.inverseTransformY(i.y));return r},C.exports=s},function(C,G,N){function g(t){if(Array.isArray(t)){for(var h=0,o=Array(t.length);hi.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(t-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),h,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,l,T,u=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,o=0;oL||v>L)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(L=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},a.prototype.isConverged=function(){var t,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var F=0;Fa}}]),e}();C.exports=r},function(C,G,N){function g(){}g.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var i=Math.min(this.m,this.n);this.s=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(Math.min(this.m+1,this.n)),this.U=function(Nt){var At=function Zt(Gt){if(Gt.length==0)return 0;for(var $t=[],Ft=0;Ft0;)At.push(0);return At}(this.n),e=function(Nt){for(var At=[];Nt-- >0;)At.push(0);return At}(this.m),f=!0,a=Math.min(this.m-1,this.n),y=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var p=E+1;p=0;W--){if(function(Nt,At){return Nt&&At}(W0;){var q=void 0,Rt=void 0;for(q=n-2;q>=-1&&q!==-1;q--)if(Math.abs(r[q])<=lt+_*(Math.abs(this.s[q])+Math.abs(this.s[q+1]))){r[q]=0;break}if(q===n-2)Rt=4;else{var Lt=void 0;for(Lt=n-1;Lt>=q&&Lt!==q;Lt--){var dt=(Lt!==n?Math.abs(r[Lt]):0)+(Lt!==q+1?Math.abs(r[Lt-1]):0);if(Math.abs(this.s[Lt])<=lt+_*dt){this.s[Lt]=0;break}}Lt===q?Rt=3:Lt===n-1?Rt=1:(Rt=2,q=Lt)}switch(q++,Rt){case 1:{var it=r[n-2];r[n-2]=0;for(var ut=n-2;ut>=q;ut--){var Tt=g.hypot(this.s[ut],it),Ct=this.s[ut]/Tt,Dt=it/Tt;this.s[ut]=Tt,ut!==q&&(it=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt=this.s[q+1]);){var Mt=this.s[q];if(this.s[q]=this.s[q+1],this.s[q+1]=Mt,qMath.abs(i)?(r=i/s,r=Math.abs(s)*Math.sqrt(1+r*r)):i!=0?(r=s/i,r=Math.abs(i)*Math.sqrt(1+r*r)):r=0,r},C.exports=g},function(C,G,N){var g=function(){function r(e,f){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,r),this.sequence1=e,this.sequence2=f,this.match_score=a,this.mismatch_penalty=y,this.gap_penalty=t,this.iMax=e.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;e--){var f=this.listeners[e];f.event===i&&f.callback===r&&this.listeners.splice(e,1)}},s.emit=function(i,r){for(var e=0;e{var G={45:(i,r,e)=>{var f={};f.layoutBase=e(551),f.CoSEConstants=e(806),f.CoSEEdge=e(767),f.CoSEGraph=e(880),f.CoSEGraphManager=e(578),f.CoSELayout=e(765),f.CoSENode=e(991),f.ConstraintHandler=e(902),i.exports=f},806:(i,r,e)=>{var f=e(551).FDLayoutConstants;function a(){}for(var y in f)a[y]=f[y];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,a.ENFORCE_CONSTRAINTS=!0,a.APPLY_LAYOUT=!0,a.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,a.TREE_REDUCTION_ON_INCREMENTAL=!0,a.PURE_INCREMENTAL=a.DEFAULT_INCREMENTAL,i.exports=a},767:(i,r,e)=>{var f=e(551).FDLayoutEdge;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},880:(i,r,e)=>{var f=e(551).LGraph;function a(t,h,o){f.call(this,t,h,o)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},578:(i,r,e)=>{var f=e(551).LGraphManager;function a(t){f.call(this,t)}a.prototype=Object.create(f.prototype);for(var y in f)a[y]=f[y];i.exports=a},765:(i,r,e)=>{var f=e(551).FDLayout,a=e(578),y=e(880),t=e(991),h=e(767),o=e(806),c=e(902),l=e(551).FDLayoutConstants,T=e(551).LayoutConstants,u=e(551).Point,v=e(551).PointD,L=e(551).DimensionD,F=e(551).Layout,A=e(551).Integer,P=e(551).IGeometry,J=e(551).LGraph,V=e(551).Transform,Q=e(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var rt in f)D[rt]=f[rt];D.prototype.newGraphManager=function(){var n=new a(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new y(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new h(null,null,n)},D.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(d)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),d=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(d),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(p){return n.has(p)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var d=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(d,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},d=0;d0&&this.updateDisplacements();for(var d=0;d0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var H=this.constraints.alignmentConstraint.vertical,d=0;d=2*O.length/3;_--)X=Math.floor(Math.random()*(_+1)),B=O[_],O[_]=O[X],O[X]=B;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(X)||(n.nodesInRelativeHorizontal.push(X),n.nodeToRelativeConstraintMapHorizontal.set(X,[]),n.dummyToNodeForVerticalAlignment.has(X)?n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(X)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(X,n.idToNodeMap.get(X).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(X).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:X,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(lt)||(n.nodesInRelativeVertical.push(lt),n.nodeToRelativeConstraintMapVertical.set(lt,[]),n.dummyToNodeForHorizontalAlignment.has(lt)?n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(lt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(lt,n.idToNodeMap.get(lt).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:lt,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(lt).push({top:_,gap:O.gap})}});else{var k=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var X=w.has(O.left)?w.get(O.left):O.left,B=w.has(O.right)?w.get(O.right):O.right;k.has(X)?k.get(X).push(B):k.set(X,[B]),k.has(B)?k.get(B).push(X):k.set(B,[X])}else{var _=R.has(O.top)?R.get(O.top):O.top,lt=R.has(O.bottom)?R.get(O.bottom):O.bottom;W.has(_)?W.get(_).push(lt):W.set(_,[lt]),W.has(lt)?W.get(lt).push(_):W.set(lt,[_])}});var U=function(X,B){var _=[],lt=[],q=new Q,Rt=new Set,Lt=0;return X.forEach(function(dt,it){if(!Rt.has(it)){_[Lt]=[],lt[Lt]=!1;var ut=it;for(q.push(ut),Rt.add(ut),_[Lt].push(ut);q.length!=0;){ut=q.shift(),B.has(ut)&&(lt[Lt]=!0);var Tt=X.get(ut);Tt.forEach(function(Ct){Rt.has(Ct)||(q.push(Ct),Rt.add(Ct),_[Lt].push(Ct))})}Lt++}}),{components:_,isFixed:lt}},et=U(k,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=U(W,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,d=0;d1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,d){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var p=J.calculateBounds(n),I=new V;I.setDeviceOrgX(p.getMinX()),I.setDeviceOrgY(p.getMinY()),I.setWorldOrgX(d.x),I.setWorldOrgY(d.y);for(var w=0;w1;){var B=X[0];X.splice(0,1);var _=W.indexOf(B);_>=0&&W.splice(_,1),z--,U--}m!=null?O=(W.indexOf(X[0])+1)%z:O=0;for(var lt=Math.abs(E-d)/U,q=O;et!=U;q=++q%z){var Rt=W[q].getOtherEnd(n);if(Rt!=m){var Lt=(d+et*lt)%360,dt=(Lt+lt)%360;D.branchRadialLayout(Rt,n,Lt,dt,p+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,d=0;dm&&(m=p)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var d=[],E=this.graphManager.getAllNodes(),p=0;p"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(H){if(m[H].length>1){var x="DummyCompound_"+H;n.memberGroups[x]=m[H];var k=m[H][0].getParent(),W=new t(n.graphManager);W.id=x,W.paddingLeft=k.paddingLeft||0,W.paddingRight=k.paddingRight||0,W.paddingBottom=k.paddingBottom||0,W.paddingTop=k.paddingTop||0,n.idToDummyNode[x]=W;var U=n.getGraphManager().add(n.newGraph(),W),et=k.getChild();et.add(W);for(var z=0;zp?(E.rect.x-=(E.labelWidth-p)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-p)/2):E.labelPosHorizontal=="right"&&E.setWidth(p+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],d=m.id,E=m.paddingLeft,p=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[d],m.rect.x,m.rect.y,E,p,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(d){var E=n.idToDummyNode[d],p=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[d],E.rect.x,E.rect.y,p,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var d=n.getChild();if(d==null)return this.toBeTiled[m]=!1,!1;for(var E=d.getNodes(),p=0;p0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),d=0,E=0;Ek&&(k=U.rect.height)}d+=k+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var d=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var p=m[E];if(d.tiledMemberPack[E]=d.tileNodes(n[E],p.paddingLeft+p.paddingRight),p.rect.width=d.tiledMemberPack[E].width,p.rect.height=d.tiledMemberPack[E].height,p.setCenter(d.tiledMemberPack[E].centerX,d.tiledMemberPack[E].centerY),p.labelMarginLeft=0,p.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=p.rect.width,w=p.rect.height;p.labelWidth&&(p.labelPosHorizontal=="left"?(p.rect.x-=p.labelWidth,p.setWidth(I+p.labelWidth),p.labelMarginLeft=p.labelWidth):p.labelPosHorizontal=="center"&&p.labelWidth>I?(p.rect.x-=(p.labelWidth-I)/2,p.setWidth(p.labelWidth),p.labelMarginLeft=(p.labelWidth-I)/2):p.labelPosHorizontal=="right"&&p.setWidth(I+p.labelWidth)),p.labelHeight&&(p.labelPosVertical=="top"?(p.rect.y-=p.labelHeight,p.setHeight(w+p.labelHeight),p.labelMarginTop=p.labelHeight):p.labelPosVertical=="center"&&p.labelHeight>w?(p.rect.y-=(p.labelHeight-w)/2,p.setHeight(p.labelHeight),p.labelMarginTop=(p.labelHeight-w)/2):p.labelPosVertical=="bottom"&&p.setHeight(w+p.labelHeight))}})},D.prototype.tileNodes=function(n,m){var d=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),p=this.getOrgRatio(d),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var H=I/p,x=w/p,k=Math.pow(d-E,2)+4*(H+E)*(x+d)*p,W=(E-d+Math.sqrt(k))/(2*(H+E)),U;m?(U=Math.ceil(W),U==W&&U++):U=Math.floor(W);var et=U*(H+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,d){var E=o.TILING_PADDING_VERTICAL,p=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:p,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,d));var R=function(O){return O.rect.width*O.rect.height},H=function(O,X){return R(X)-R(O)};n.sort(function(z,O){var X=H;return w.idealRowWidth?(X=I,X(z.id,O.id)):X(z,O)});for(var x=0,k=0,W=0;W0&&(w+=n.horizontalPadding),n.rowWidth[d]=w,n.width0&&(R+=n.verticalPadding);var H=0;R>n.rowHeight[d]&&(H=n.rowHeight[d],n.rowHeight[d]=R,H=n.rowHeight[d]-H),n.height+=H,n.rows[d].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,d=Number.MAX_VALUE,E=0;Ed&&(m=E,d=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,d){if(n.idealRowWidth){var E=n.rows.length-1,p=n.rowWidth[E];return p+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=d+n.verticalPadding-n.rowHeight[I]);var H;n.width-w>=m+n.horizontalPadding?H=(n.height+R)/(w+m+n.horizontalPadding):H=(n.height+R)/n.width,R=d+n.verticalPadding;var x;return n.widthI&&m!=d){E.splice(-1,1),n.rows[d].push(p),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[d]=n.rowWidth[d]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var H=n.rowHeight[m]+n.rowHeight[d];n.rowHeight[m]=w,n.rowHeight[d]0)for(var et=p;et<=I;et++)U[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)U[3]+=this.grid[p-1][et].length+this.grid[p][et].length-1;for(var z=A.MAX_VALUE,O,X,B=0;B{var f=e(551).FDLayoutNode,a=e(551).IMath;function y(h,o,c,l){f.call(this,h,o,c,l)}y.prototype=Object.create(f.prototype);for(var t in f)y[t]=f[t];y.prototype.calculateDisplacement=function(){var h=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=h.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=h.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementX=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>h.coolingFactor*h.maxNodeDisplacement&&(this.displacementY=h.coolingFactor*h.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},y.prototype.propogateDisplacementToChildren=function(h,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Mt=0;st.forEach(function(ht){$=="horizontal"?(tt.set(ht,u.has(ht)?v[u.get(ht)]:Z.get(ht)),Mt+=tt.get(ht)):(tt.set(ht,u.has(ht)?L[u.get(ht)]:Z.get(ht)),Mt+=tt.get(ht))}),Mt=Mt/st.length,ft.forEach(function(ht){K.has(ht)||tt.set(ht,Mt)})}else{var ct=0;ft.forEach(function(ht){$=="horizontal"?ct+=u.has(ht)?v[u.get(ht)]:Z.get(ht):ct+=u.has(ht)?L[u.get(ht)]:Z.get(ht)}),ct=ct/ft.length,ft.forEach(function(ht){tt.set(ht,ct)})}});for(var wt=function(){var st=vt.shift(),Mt=b.get(st);Mt.forEach(function(ct){if(tt.get(ct.id)ht&&(ht=qt),_tWt&&(Wt=_t)}}catch(ie){At=!0,Zt=ie}finally{try{!Nt&&Gt.return&&Gt.return()}finally{if(At)throw Zt}}var ce=(Mt+ht)/2-(ct+Wt)/2,Kt=!0,te=!1,ee=void 0;try{for(var jt=ft[Symbol.iterator](),se;!(Kt=(se=jt.next()).done);Kt=!0){var re=se.value;tt.set(re,tt.get(re)+ce)}}catch(ie){te=!0,ee=ie}finally{try{!Kt&&jt.return&&jt.return()}finally{if(te)throw ee}}})}return tt},rt=function(b){var $=0,K=0,Z=0,at=0;if(b.forEach(function(j){j.left?v[u.get(j.left)]-v[u.get(j.right)]>=0?$++:K++:L[u.get(j.top)]-L[u.get(j.bottom)]>=0?Z++:at++}),$>K&&Z>at)for(var gt=0;gtK)for(var ot=0;otat)for(var tt=0;tt1)l.fixedNodeConstraint.forEach(function(S,b){E[b]=[S.position.x,S.position.y],p[b]=[v[u.get(S.nodeId)],L[u.get(S.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var S=0;if(l.alignmentConstraint.vertical){for(var b=l.alignmentConstraint.vertical,$=function(tt){var j=new Set;b[tt].forEach(function(yt){j.add(yt)});var vt=new Set([].concat(f(j)).filter(function(yt){return R.has(yt)})),wt=void 0;vt.size>0?wt=v[u.get(vt.values().next().value)]:wt=Q(j).x,b[tt].forEach(function(yt){E[S]=[wt,L[u.get(yt)]],p[S]=[v[u.get(yt)],L[u.get(yt)]],S++})},K=0;K0?wt=v[u.get(vt.values().next().value)]:wt=Q(j).y,Z[tt].forEach(function(yt){E[S]=[v[u.get(yt)],wt],p[S]=[v[u.get(yt)],L[u.get(yt)]],S++})},gt=0;gtW&&(W=k[et].length,U=et);if(W0){var mt={x:0,y:0};l.fixedNodeConstraint.forEach(function(S,b){var $={x:v[u.get(S.nodeId)],y:L[u.get(S.nodeId)]},K=S.position,Z=V(K,$);mt.x+=Z.x,mt.y+=Z.y}),mt.x/=l.fixedNodeConstraint.length,mt.y/=l.fixedNodeConstraint.length,v.forEach(function(S,b){v[b]+=mt.x}),L.forEach(function(S,b){L[b]+=mt.y}),l.fixedNodeConstraint.forEach(function(S){v[u.get(S.nodeId)]=S.position.x,L[u.get(S.nodeId)]=S.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var xt=l.alignmentConstraint.vertical,St=function(b){var $=new Set;xt[b].forEach(function(at){$.add(at)});var K=new Set([].concat(f($)).filter(function(at){return R.has(at)})),Z=void 0;K.size>0?Z=v[u.get(K.values().next().value)]:Z=Q($).x,$.forEach(function(at){R.has(at)||(v[u.get(at)]=Z)})},Vt=0;Vt0?Z=L[u.get(K.values().next().value)]:Z=Q($).y,$.forEach(function(at){R.has(at)||(L[u.get(at)]=Z)})},bt=0;bt{i.exports=C}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(45);return s})()})}(pe)),pe.exports}(function(M,Y){(function(G,N){M.exports=N(cr())})(Te,function(C){return(()=>{var G={658:i=>{i.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments.length,f=Array(e>1?e-1:0),a=1;a{var f=function(){function t(h,o){var c=[],l=!0,T=!1,u=void 0;try{for(var v=h[Symbol.iterator](),L;!(l=(L=v.next()).done)&&(c.push(L.value),!(o&&c.length===o));l=!0);}catch(F){T=!0,u=F}finally{try{!l&&v.return&&v.return()}finally{if(T)throw u}}return c}return function(h,o){if(Array.isArray(h))return h;if(Symbol.iterator in Object(h))return t(h,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=e(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(t){for(var h={},o=0;o0&&I.merge(x)});for(var w=0;w1){L=u[0],F=L.connectedEdges().length,u.forEach(function(p){p.connectedEdges().length0&&c.set("dummy"+(c.size+1),J),V},y.relocateComponent=function(t,h,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var v=!0,L=!1,F=void 0;try{for(var A=h.nodeIndexes[Symbol.iterator](),P;!(v=(P=A.next()).done);v=!0){var J=P.value,V=f(J,2),Q=V[0],D=V[1],rt=o.cy.getElementById(Q);if(rt){var n=rt.boundingBox(),m=h.xCoords[D]-n.w/2,d=h.xCoords[D]+n.w/2,E=h.yCoords[D]-n.h/2,p=h.yCoords[D]+n.h/2;ml&&(l=d),Eu&&(u=p)}}}catch(x){L=!0,F=x}finally{try{!v&&A.return&&A.return()}finally{if(L)throw F}}var I=t.x-(l+c)/2,w=t.y-(u+T)/2;h.xCoords=h.xCoords.map(function(x){return x+I}),h.yCoords=h.yCoords.map(function(x){return x+w})}else{Object.keys(h).forEach(function(x){var k=h[x],W=k.getRect().x,U=k.getRect().x+k.getRect().width,et=k.getRect().y,z=k.getRect().y+k.getRect().height;Wl&&(l=U),etu&&(u=z)});var R=t.x-(l+c)/2,H=t.y-(u+T)/2;Object.keys(h).forEach(function(x){var k=h[x];k.setCenter(k.getCenterX()+R,k.getCenterY()+H)})}}},y.calcBoundingBox=function(t,h,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,A=void 0,P=void 0,J=t.descendants().not(":parent"),V=J.length,Q=0;QL&&(l=L),TA&&(u=A),v{var f=e(548),a=e(140).CoSELayout,y=e(140).CoSENode,t=e(140).layoutBase.PointD,h=e(140).layoutBase.DimensionD,o=e(140).layoutBase.LayoutConstants,c=e(140).layoutBase.FDLayoutConstants,l=e(140).CoSEConstants,T=function(v,L){var F=v.cy,A=v.eles,P=A.nodes(),J=A.edges(),V=void 0,Q=void 0,D=void 0,rt={};v.randomize&&(V=L.nodeIndexes,Q=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,k){return n(x)?x(k):x},d=f.calcParentsWithoutChildren(F,A),E=function H(x,k,W,U){for(var et=k.length,z=0;z0){var q=void 0;q=W.getGraphManager().add(W.newGraph(),B),H(q,X,W,U)}}},p=function(x,k,W){for(var U=0,et=0,z=0;z0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=U/et:n(v.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,k){k.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=k.fixedNodeConstraint),k.alignmentConstraint&&(x.constraints.alignmentConstraint=k.alignmentConstraint),k.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=k.relativePlacementConstraint)};v.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!v.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=v.animate,l.TILE=v.tile,l.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!v.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),v.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),v.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new a,R=w.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(P),w,v),p(w,R,J),I(w,v),w.runLayout(),rt};i.exports={coseLayout:T}},212:(i,r,e)=>{var f=function(){function v(L,F){for(var A=0;A0)if(d){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(P,A.eles,I),D.forEach(function(dt){var it=dt.boundingBox();rt.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(dt){A.eles=dt,V.push(o(A))}),A.quality=="default"||A.quality=="proof"){var w=P.collection();if(A.tile){var R=new Map,H=[],x=[],k=0,W={nodeIndexes:R,xCoords:H,yCoords:x},U=[];if(D.forEach(function(dt,it){dt.edges().length==0&&(dt.nodes().forEach(function(ut,Tt){w.merge(dt.nodes()[Tt]),ut.isParent()||(W.nodeIndexes.set(dt.nodes()[Tt].id(),k++),W.xCoords.push(dt.nodes()[0].position().x),W.yCoords.push(dt.nodes()[0].position().y))}),U.push(it))}),w.length>1){var et=w.boundingBox();rt.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),V.push(W);for(var z=U.length-1;z>=0;z--)D.splice(U[z],1),V.splice(U[z],1),rt.splice(U[z],1)}}D.forEach(function(dt,it){A.eles=dt,Q.push(l(A,V[it])),t.relocateComponent(rt[it],Q[it],A)})}else D.forEach(function(dt,it){t.relocateComponent(rt[it],V[it],A)});var O=new Set;if(D.length>1){var X=[],B=J.filter(function(dt){return dt.css("display")=="none"});D.forEach(function(dt,it){var ut=void 0;if(A.quality=="draft"&&(ut=V[it].nodeIndexes),dt.nodes().not(B).length>0){var Tt={};Tt.edges=[],Tt.nodes=[];var Ct=void 0;dt.nodes().not(B).forEach(function(Dt){if(A.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Tt.nodes.push({x:V[it].xCoords[Ct]-Dt.boundingbox().w/2,y:V[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,V[it].xCoords,V[it].yCoords,ut);Tt.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else Q[it][Dt.id()]&&Tt.nodes.push({x:Q[it][Dt.id()].getLeft(),y:Q[it][Dt.id()].getTop(),width:Q[it][Dt.id()].getWidth(),height:Q[it][Dt.id()].getHeight()})}),dt.edges().forEach(function(Dt){var mt=Dt.source(),xt=Dt.target();if(mt.css("display")!="none"&&xt.css("display")!="none")if(A.quality=="draft"){var St=ut.get(mt.id()),Vt=ut.get(xt.id()),Xt=[],Ut=[];if(mt.isParent()){var bt=t.calcBoundingBox(mt,V[it].xCoords,V[it].yCoords,ut);Xt.push(bt.topLeftX+bt.width/2),Xt.push(bt.topLeftY+bt.height/2)}else Xt.push(V[it].xCoords[St]),Xt.push(V[it].yCoords[St]);if(xt.isParent()){var Ht=t.calcBoundingBox(xt,V[it].xCoords,V[it].yCoords,ut);Ut.push(Ht.topLeftX+Ht.width/2),Ut.push(Ht.topLeftY+Ht.height/2)}else Ut.push(V[it].xCoords[Vt]),Ut.push(V[it].yCoords[Vt]);Tt.edges.push({startX:Xt[0],startY:Xt[1],endX:Ut[0],endY:Ut[1]})}else Q[it][mt.id()]&&Q[it][xt.id()]&&Tt.edges.push({startX:Q[it][mt.id()].getCenterX(),startY:Q[it][mt.id()].getCenterY(),endX:Q[it][xt.id()].getCenterX(),endY:Q[it][xt.id()].getCenterY()})}),Tt.nodes.length>0&&(X.push(Tt),O.add(it))}});var _=m.packComponents(X,A.randomize).shifts;if(A.quality=="draft")V.forEach(function(dt,it){var ut=dt.xCoords.map(function(Ct){return Ct+_[it].dx}),Tt=dt.yCoords.map(function(Ct){return Ct+_[it].dy});dt.xCoords=ut,dt.yCoords=Tt});else{var lt=0;O.forEach(function(dt){Object.keys(Q[dt]).forEach(function(it){var ut=Q[dt][it];ut.setCenter(ut.getCenterX()+_[lt].dx,ut.getCenterY()+_[lt].dy)}),lt++})}}}else{var E=A.eles.boundingBox();if(rt.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var p=o(A);V.push(p)}A.quality=="default"||A.quality=="proof"?(Q.push(l(A,V[0])),t.relocateComponent(rt[0],Q[0],A)):t.relocateComponent(rt[0],V[0],A)}var q=function(it,ut){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=ut);var Tt=void 0,Ct=void 0,Dt=it.data("id");return Q.forEach(function(xt){Dt in xt&&(Tt={x:xt[Dt].getRect().getCenterX(),y:xt[Dt].getRect().getCenterY()},Ct=xt[Dt])}),A.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Tt.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Tt.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Tt.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Tt.y-=Ct.labelHeight/2))),Tt==null&&(Tt={x:it.position("x"),y:it.position("y")}),{x:Tt.x,y:Tt.y}}else{var mt=void 0;return V.forEach(function(xt){var St=xt.nodeIndexes.get(it.id());St!=null&&(mt={x:xt.xCoords[St],y:xt.yCoords[St]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var Rt=t.calcParentsWithoutChildren(P,J),Lt=J.filter(function(dt){return dt.css("display")=="none"});A.eles=J.not(Lt),J.nodes().not(":parent").not(Lt).layoutPositions(F,A,q),Rt.length>0&&Rt.forEach(function(dt){dt.position(q(dt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v}();i.exports=u},657:(i,r,e)=>{var f=e(548),a=e(140).layoutBase.Matrix,y=e(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),u=l.nodes(":parent"),v=new Map,L=new Map,F=new Map,A=[],P=[],J=[],V=[],Q=[],D=[],rt=[],n=[],m=void 0,d=1e8,E=1e-9,p=o.piTol,I=o.samplingType,w=o.nodeSeparation,R=void 0,H=function(){for(var b=0,$=0,K=!1;$=at;){ot=Z[at++];for(var It=A[ot],ft=0;ftvt&&(vt=Q[Mt],wt=Mt)}return wt},k=function(b){var $=void 0;if(b){$=Math.floor(Math.random()*m);for(var Z=0;Z=1)break;j=tt}for(var yt=0;yt=1)break;j=tt}for(var ft=0;ft0&&($.isParent()?A[b].push(F.get($.id())):A[b].push($.id()))})});var Lt=function(b){var $=L.get(b),K=void 0;v.get(b).forEach(function(Z){c.getElementById(Z).isParent()?K=F.get(Z):K=Z,A[$].push(K),A[L.get(K)].push(b)})},dt=!0,it=!1,ut=void 0;try{for(var Tt=v.keys()[Symbol.iterator](),Ct;!(dt=(Ct=Tt.next()).done);dt=!0){var Dt=Ct.value;Lt(Dt)}}catch(S){it=!0,ut=S}finally{try{!dt&&Tt.return&&Tt.return()}finally{if(it)throw ut}}m=L.size;var mt=void 0;if(m>2){R=m{var f=e(212),a=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&a(cytoscape),i.exports=a},140:i=>{i.exports=C}},N={};function g(i){var r=N[i];if(r!==void 0)return r.exports;var e=N[i]={exports:{}};return G[i](e,e.exports,g),e.exports}var s=g(579);return s})()})})(be);var gr=be.exports;const ur=ke(gr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:nt(M=>`${M},${M/2} 0,${M} 0,0`,"L"),R:nt(M=>`0,${M/2} ${M},0 ${M},${M}`,"R"),T:nt(M=>`0,0 ${M},0 ${M/2},${M}`,"T"),B:nt(M=>`${M/2},0 ${M},${M} 0,${M}`,"B")},he={L:nt((M,Y)=>M-Y+2,"L"),R:nt((M,Y)=>M-2,"R"),T:nt((M,Y)=>M-Y+2,"T"),B:nt((M,Y)=>M-2,"B")},vr=nt(function(M){return zt(M)?M==="L"?"R":"L":M==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=nt(function(M){const Y=M;return Y==="L"||Y==="R"||Y==="T"||Y==="B"},"isArchitectureDirection"),zt=nt(function(M){const Y=M;return Y==="L"||Y==="R"},"isArchitectureDirectionX"),Qt=nt(function(M){const Y=M;return Y==="T"||Y==="B"},"isArchitectureDirectionY"),Pe=nt(function(M,Y){const C=zt(M)&&Qt(Y),G=Qt(M)&&zt(Y);return C||G},"isArchitectureDirectionXY"),dr=nt(function(M){const Y=M[0],C=M[1],G=zt(Y)&&Qt(C),N=Qt(Y)&&zt(C);return G||N},"isArchitecturePairXY"),pr=nt(function(M){return M!=="LL"&&M!=="RR"&&M!=="TT"&&M!=="BB"},"isValidArchitectureDirectionPair"),me=nt(function(M,Y){const C=`${M}${Y}`;return pr(C)?C:void 0},"getArchitectureDirectionPair"),yr=nt(function([M,Y],C){const G=C[0],N=C[1];return zt(G)?Qt(N)?[M+(G==="L"?-1:1),Y+(N==="T"?1:-1)]:[M+(G==="L"?-1:1),Y]:zt(N)?[M+(N==="L"?1:-1),Y+(G==="T"?1:-1)]:[M,Y+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Er=nt(function(M){return M==="LT"||M==="TL"?[1,1]:M==="BL"||M==="LB"?[1,-1]:M==="BR"||M==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),mr=nt(function(M){return M.type==="service"},"isArchitectureService"),Tr=nt(function(M){return M.type==="junction"},"isArchitectureJunction"),Ge=nt(M=>M.data(),"edgeData"),ne=nt(M=>M.data(),"nodeData"),Ue=ar.architecture,pt=new hr(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:Ue,dataStructures:void 0,elements:{}})),Nr=nt(()=>{pt.reset(),rr()},"clear"),Lr=nt(function({id:M,icon:Y,in:C,title:G,iconText:N}){if(pt.records.registeredIds[M]!==void 0)throw new Error(`The service id [${M}] is already in use by another ${pt.records.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The service [${M}] cannot be placed within itself`);if(pt.records.registeredIds[C]===void 0)throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(pt.records.registeredIds[C]==="node")throw new Error(`The service [${M}]'s parent is not a group`)}pt.records.registeredIds[M]="node",pt.records.nodes[M]={id:M,type:"service",icon:Y,iconText:N,title:G,edges:[],in:C}},"addService"),Mr=nt(()=>Object.values(pt.records.nodes).filter(mr),"getServices"),Ar=nt(function({id:M,in:Y}){pt.records.registeredIds[M]="node",pt.records.nodes[M]={id:M,type:"junction",edges:[],in:Y}},"addJunction"),Cr=nt(()=>Object.values(pt.records.nodes).filter(Tr),"getJunctions"),wr=nt(()=>Object.values(pt.records.nodes),"getNodes"),Or=nt(M=>pt.records.nodes[M],"getNode"),Dr=nt(function({id:M,icon:Y,in:C,title:G}){if(pt.records.registeredIds[M]!==void 0)throw new Error(`The group id [${M}] is already in use by another ${pt.records.registeredIds[M]}`);if(C!==void 0){if(M===C)throw new Error(`The group [${M}] cannot be placed within itself`);if(pt.records.registeredIds[C]===void 0)throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(pt.records.registeredIds[C]==="node")throw new Error(`The group [${M}]'s parent is not a group`)}pt.records.registeredIds[M]="group",pt.records.groups[M]={id:M,icon:Y,title:G,in:C}},"addGroup"),xr=nt(()=>Object.values(pt.records.groups),"getGroups"),Ir=nt(function({lhsId:M,rhsId:Y,lhsDir:C,rhsDir:G,lhsInto:N,rhsInto:g,lhsGroup:s,rhsGroup:i,title:r}){if(!Re(C))throw new Error(`Invalid direction given for left hand side of edge ${M}--${Y}. Expected (L,R,T,B) got ${C}`);if(!Re(G))throw new Error(`Invalid direction given for right hand side of edge ${M}--${Y}. Expected (L,R,T,B) got ${G}`);if(pt.records.nodes[M]===void 0&&pt.records.groups[M]===void 0)throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(pt.records.nodes[Y]===void 0&&pt.records.groups[M]===void 0)throw new Error(`The right-hand id [${Y}] does not yet exist. Please create the service/group before declaring an edge to it.`);const e=pt.records.nodes[M].in,f=pt.records.nodes[Y].in;if(s&&e&&f&&e==f)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(i&&e&&f&&e==f)throw new Error(`The right-hand id [${Y}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:M,lhsDir:C,lhsInto:N,lhsGroup:s,rhsId:Y,rhsDir:G,rhsInto:g,rhsGroup:i,title:r};pt.records.edges.push(a),pt.records.nodes[M]&&pt.records.nodes[Y]&&(pt.records.nodes[M].edges.push(pt.records.edges[pt.records.edges.length-1]),pt.records.nodes[Y].edges.push(pt.records.edges[pt.records.edges.length-1]))},"addEdge"),Rr=nt(()=>pt.records.edges,"getEdges"),Sr=nt(()=>{if(pt.records.dataStructures===void 0){const M=Object.entries(pt.records.nodes).reduce((s,[i,r])=>(s[i]=r.edges.reduce((e,f)=>{if(f.lhsId===i){const a=me(f.lhsDir,f.rhsDir);a&&(e[a]=f.rhsId)}else{const a=me(f.rhsDir,f.lhsDir);a&&(e[a]=f.lhsId)}return e},{}),s),{}),Y=Object.keys(M)[0],C={[Y]:1},G=Object.keys(M).reduce((s,i)=>i===Y?s:{...s,[i]:1},{}),N=nt(s=>{const i={[s]:[0,0]},r=[s];for(;r.length>0;){const e=r.shift();if(e){C[e]=1,delete G[e];const f=M[e],[a,y]=i[e];Object.entries(f).forEach(([t,h])=>{C[h]||(i[h]=yr([a,y],t),r.push(h))})}}return i},"BFS"),g=[N(Y)];for(;Object.keys(G).length>0;)g.push(N(Object.keys(G)[0]));pt.records.dataStructures={adjList:M,spatialMaps:g}}return pt.records.dataStructures},"getDataStructures"),Fr=nt((M,Y)=>{pt.records.elements[M]=Y},"setElementForId"),br=nt(M=>pt.records.elements[M],"getElementById"),le={clear:Nr,setDiagramTitle:_e,getDiagramTitle:je,setAccTitle:Ke,getAccTitle:Qe,setAccDescription:Je,getAccDescription:qe,addService:Lr,getServices:Mr,addJunction:Ar,getJunctions:Cr,getNodes:wr,getNode:Or,addGroup:Dr,getGroups:xr,addEdge:Ir,getEdges:Rr,setElementForId:Fr,getElementById:br,getDataStructures:Sr};function Pt(M){const Y=fe().architecture;return Y!=null&&Y[M]?Y[M]:Ue[M]}nt(Pt,"getConfigField");var Pr=nt((M,Y)=>{sr(M,Y),M.groups.map(Y.addGroup),M.services.map(C=>Y.addService({...C,type:"service"})),M.junctions.map(C=>Y.addJunction({...C,type:"junction"})),M.edges.map(Y.addEdge)},"populateDb"),Gr={parse:nt(async M=>{const Y=await lr("architecture",M);Se.debug(Y),Pr(Y,le)},"parse")},Ur=nt(M=>` .edge { stroke-width: ${M.archEdgeWidth}; stroke: ${M.archEdgeColor}; @@ -29,8 +29,8 @@ import{aH as Te,aI as ke,B as qe,_ as at,aJ as Je,aK as Qe,p as Ke,q as je,s as display: -webkit-box; -webkit-box-orient: vertical; } -`,"getStyles"),Yr=Ur,ne=at(M=>`${M}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ne('')},server:{body:ne('')},disk:{body:ne('')},internet:{body:ne('')},cloud:{body:ne('')},unknown:Je,blank:{body:ne("")}}},Xr=at(async function(M,Y){const C=Pt("padding"),G=Pt("iconSize"),N=G/2,u=G/6,s=u/2;await Promise.all(Y.edges().map(async i=>{var P,J;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:n,target:y,targetDir:t,targetArrow:h,targetGroup:o,label:c}=Ge(i);let{x:l,y:T}=i[0].sourceEndpoint();const{x:g,y:d}=i[0].midpoint();let{x:L,y:F}=i[0].targetEndpoint();const A=C+4;if(n&&(zt(e)?l+=e==="L"?-A:A:T+=e==="T"?-A:A+18),o&&(zt(t)?L+=t==="L"?-A:A:F+=t==="T"?-A:A+18),!n&&((P=le.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?l+=e==="L"?N:-N:T+=e==="T"?N:-N),!o&&((J=le.getNode(y))==null?void 0:J.type)==="junction"&&(zt(t)?L+=t==="L"?N:-N:F+=t==="T"?N:-N),i[0]._private.rscratch){const V=M.insert("g");if(V.insert("path").attr("d",`M ${l},${T} L ${g},${d} L${L},${F} `).attr("class","edge"),f){const Q=zt(e)?he[e](l,u):l-s,D=Qt(e)?he[e](T,u):T-s;V.insert("polygon").attr("points",Ie[e](u)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(h){const Q=zt(t)?he[t](L,u):L-s,D=Qt(t)?he[t](F,u):F-s;V.insert("polygon").attr("points",Ie[t](u)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(c){const Q=Pe(e,t)?"XY":zt(e)?"X":"Y";let D=0;Q==="X"?D=Math.abs(l-L):Q==="Y"?D=Math.abs(T-F)/1.5:D=Math.abs(l-L)/2;const rt=V.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},fe()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Q==="X")rt.attr("transform","translate("+g+", "+d+")");else if(Q==="Y")rt.attr("transform","translate("+g+", "+d+") rotate(-90)");else if(Q==="XY"){const a=me(e,t);if(a&&vr(a)){const m=rt.node().getBoundingClientRect(),[v,E]=Er(a);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*v*E*45})`);const p=rt.node().getBoundingClientRect();rt.attr("transform",` - translate(${g}, ${d-m.height/2}) - translate(${v*p.width/2}, ${E*p.height/2}) - rotate(${-1*v*E*45}, 0, ${m.height/2}) - `)}}}}}))},"drawEdges"),Hr=at(async function(M,Y){const G=Pt("padding")*.75,N=Pt("fontSize"),s=Pt("iconSize")/2;await Promise.all(Y.nodes().map(async i=>{const r=ae(i);if(r.type==="group"){const{h:e,w:f,x1:n,y1:y}=i.boundingBox();M.append("rect").attr("x",n+s).attr("y",y+s).attr("width",f).attr("height",e).attr("class","node-bkg");const t=M.append("g");let h=n,o=y;if(r.icon){const c=t.append("g");c.html(`${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(h+s+1)+", "+(o+s+1)+")"),h+=G,o+=N/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},fe()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(h+s+4)+", "+(o+s+2)+")")}}}))},"drawGroups"),Wr=at(async function(M,Y,C){for(const G of C){const N=Y.append("g"),u=Pt("iconSize");if(G.title){const e=N.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:u*1.5,classes:"architecture-service-label"},fe()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+u/2+", "+u+")")}const s=N.append("g");if(G.icon)s.html(`${await Ee(G.icon,{height:u,width:u,fallbackPrefix:oe.prefix})}`);else if(G.iconText){s.html(`${await Ee("blank",{height:u,width:u,fallbackPrefix:oe.prefix})}`);const n=s.append("g").append("foreignObject").attr("width",u).attr("height",u).append("div").attr("class","node-icon-text").attr("style",`height: ${u}px;`).append("div").html(G.iconText),y=parseInt(window.getComputedStyle(n.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;n.attr("style",`-webkit-line-clamp: ${Math.floor((u-2)/y)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${u} v${-u} q0,-5 5,-5 h${u} q5,0 5,5 v${u} H0 Z`);N.attr("class","architecture-service");const{width:i,height:r}=N._groups[0][0].getBBox();G.width=i,G.height=r,M.setElementForId(G.id,N)}return 0},"drawServices"),Vr=at(function(M,Y,C){C.forEach(G=>{const N=Y.append("g"),u=Pt("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",u).attr("height",u),N.attr("class","architecture-junction");const{width:i,height:r}=N._groups[0][0].getBBox();N.width=i,N.height=r,M.setElementForId(G.id,N)})},"drawJunctions");Qe([{name:oe.prefix,icons:oe}]);Fe.use(gr);function Ye(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"service",id:C.id,icon:C.icon,label:C.title,parent:C.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}at(Ye,"addServices");function Xe(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"junction",id:C.id,parent:C.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}at(Xe,"addJunctions");function He(M,Y){Y.nodes().map(C=>{const G=ae(C);if(G.type==="group")return;G.x=C.position().x,G.y=C.position().y,M.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}at(He,"positionNodes");function We(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}at(We,"addGroups");function Ve(M,Y){M.forEach(C=>{const{lhsId:G,rhsId:N,lhsInto:u,lhsGroup:s,rhsInto:i,lhsDir:r,rhsDir:e,rhsGroup:f,title:n}=C,y=Pe(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:n,source:G,sourceDir:r,sourceArrow:u,sourceGroup:s,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:i,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};Y.add({group:"edges",data:t,classes:y})})}at(Ve,"addEdges");function ze(M){const Y=M.map(N=>{const u={},s={};return Object.entries(N).forEach(([i,[r,e]])=>{u[e]||(u[e]=[]),s[r]||(s[r]=[]),u[e].push(i),s[r].push(i)}),{horiz:Object.values(u).filter(i=>i.length>1),vert:Object.values(s).filter(i=>i.length>1)}}),[C,G]=Y.reduce(([N,u],{horiz:s,vert:i})=>[[...N,...s],[...u,...i]],[[],[]]);return{horizontal:C,vertical:G}}at(ze,"getAlignments");function Be(M){const Y=[],C=at(N=>`${N[0]},${N[1]}`,"posToStr"),G=at(N=>N.split(",").map(u=>parseInt(u)),"strToPos");return M.forEach(N=>{const u=Object.fromEntries(Object.entries(N).map(([e,f])=>[C(f),e])),s=[C([0,0])],i={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const e=s.shift();if(e){i[e]=1;const f=u[e];if(f){const n=G(e);Object.entries(r).forEach(([y,t])=>{const h=C([n[0]+t[0],n[1]+t[1]]),o=u[h];o&&!i[h]&&(s.push(h),Y.push({[xe[y]]:o,[xe[dr(y)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),Y}at(Be,"getRelativeConstraints");function $e(M,Y,C,G,{spatialMaps:N}){return new Promise(u=>{const s=ir("body").append("div").attr("id","cy").attr("style","display:none"),i=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});s.remove(),We(C,i),Ye(M,i),Xe(Y,i),Ve(G,i);const r=ze(N),e=Be(N),f=i.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(n){const[y,t]=n.connectedNodes(),{parent:h}=ae(y),{parent:o}=ae(t);return h===o?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(n){const[y,t]=n.connectedNodes(),{parent:h}=ae(y),{parent:o}=ae(t);return h===o?.45:.001},alignmentConstraint:r,relativePlacementConstraint:e});f.one("layoutstop",()=>{var y;function n(t,h,o,c){let l,T;const{x:g,y:d}=t,{x:L,y:F}=h;T=(c-d+(g-o)*(d-F)/(g-L))/Math.sqrt(1+Math.pow((d-F)/(g-L),2)),l=Math.sqrt(Math.pow(c-d,2)+Math.pow(o-g,2)-Math.pow(T,2));const A=Math.sqrt(Math.pow(L-g,2)+Math.pow(F-d,2));l=l/A;let P=(L-g)*(c-d)-(F-d)*(o-g);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}let J=(L-g)*(o-g)+(F-d)*(c-d);switch(!0){case J>=0:J=1;break;case J<0:J=-1;break}return T=Math.abs(T)*P,l=l*J,{distances:T,weights:l}}at(n,"getSegmentWeights"),i.startBatch();for(const t of Object.values(i.edges()))if((y=t.data)!=null&&y.call(t)){const{x:h,y:o}=t.source().position(),{x:c,y:l}=t.target().position();if(h!==c&&o!==l){const T=t.sourceEndpoint(),g=t.targetEndpoint(),{sourceDir:d}=Ge(t),[L,F]=Qt(d)?[T.x,g.y]:[g.x,T.y],{weights:A,distances:P}=n(T,g,L,F);t.style("segment-distances",P),t.style("segment-weights",A)}}i.endBatch(),f.run()}),f.run(),i.ready(n=>{Se.info("Ready",n),u(i)})})}at($e,"layoutArchitecture");var zr=at(async(M,Y,C,G)=>{const N=G.db,u=N.getServices(),s=N.getJunctions(),i=N.getGroups(),r=N.getEdges(),e=N.getDataStructures(),f=ar(Y),n=f.append("g");n.attr("class","architecture-edges");const y=f.append("g");y.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Wr(N,y,u),Vr(N,y,s);const h=await $e(u,s,i,r,e);await Xr(n,h),await Hr(t,h),He(N,h),or(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),Br={draw:zr},_r={parser:Gr,db:le,renderer:Br,styles:Yr};export{_r as diagram}; +`,"getStyles"),Yr=Ur,ae=nt(M=>`${M}`,"wrapIcon"),oe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:ae('')},server:{body:ae('')},disk:{body:ae('')},internet:{body:ae('')},cloud:{body:ae('')},unknown:or,blank:{body:ae("")}}},Xr=nt(async function(M,Y){const C=Pt("padding"),G=Pt("iconSize"),N=G/2,g=G/6,s=g/2;await Promise.all(Y.edges().map(async i=>{var P,J;const{source:r,sourceDir:e,sourceArrow:f,sourceGroup:a,target:y,targetDir:t,targetArrow:h,targetGroup:o,label:c}=Ge(i);let{x:l,y:T}=i[0].sourceEndpoint();const{x:u,y:v}=i[0].midpoint();let{x:L,y:F}=i[0].targetEndpoint();const A=C+4;if(a&&(zt(e)?l+=e==="L"?-A:A:T+=e==="T"?-A:A+18),o&&(zt(t)?L+=t==="L"?-A:A:F+=t==="T"?-A:A+18),!a&&((P=le.getNode(r))==null?void 0:P.type)==="junction"&&(zt(e)?l+=e==="L"?N:-N:T+=e==="T"?N:-N),!o&&((J=le.getNode(y))==null?void 0:J.type)==="junction"&&(zt(t)?L+=t==="L"?N:-N:F+=t==="T"?N:-N),i[0]._private.rscratch){const V=M.insert("g");if(V.insert("path").attr("d",`M ${l},${T} L ${u},${v} L${L},${F} `).attr("class","edge"),f){const Q=zt(e)?he[e](l,g):l-s,D=Qt(e)?he[e](T,g):T-s;V.insert("polygon").attr("points",Ie[e](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(h){const Q=zt(t)?he[t](L,g):L-s,D=Qt(t)?he[t](F,g):F-s;V.insert("polygon").attr("points",Ie[t](g)).attr("transform",`translate(${Q},${D})`).attr("class","arrow")}if(c){const Q=Pe(e,t)?"XY":zt(e)?"X":"Y";let D=0;Q==="X"?D=Math.abs(l-L):Q==="Y"?D=Math.abs(T-F)/1.5:D=Math.abs(l-L)/2;const rt=V.append("g");if(await Ne(rt,c,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},fe()),rt.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Q==="X")rt.attr("transform","translate("+u+", "+v+")");else if(Q==="Y")rt.attr("transform","translate("+u+", "+v+") rotate(-90)");else if(Q==="XY"){const n=me(e,t);if(n&&dr(n)){const m=rt.node().getBoundingClientRect(),[d,E]=Er(n);rt.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*d*E*45})`);const p=rt.node().getBoundingClientRect();rt.attr("transform",` + translate(${u}, ${v-m.height/2}) + translate(${d*p.width/2}, ${E*p.height/2}) + rotate(${-1*d*E*45}, 0, ${m.height/2}) + `)}}}}}))},"drawEdges"),Hr=nt(async function(M,Y){const G=Pt("padding")*.75,N=Pt("fontSize"),s=Pt("iconSize")/2;await Promise.all(Y.nodes().map(async i=>{const r=ne(i);if(r.type==="group"){const{h:e,w:f,x1:a,y1:y}=i.boundingBox();M.append("rect").attr("x",a+s).attr("y",y+s).attr("width",f).attr("height",e).attr("class","node-bkg");const t=M.append("g");let h=a,o=y;if(r.icon){const c=t.append("g");c.html(`${await Ee(r.icon,{height:G,width:G,fallbackPrefix:oe.prefix})}`),c.attr("transform","translate("+(h+s+1)+", "+(o+s+1)+")"),h+=G,o+=N/2-1-2}if(r.label){const c=t.append("g");await Ne(c,r.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},fe()),c.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),c.attr("transform","translate("+(h+s+4)+", "+(o+s+2)+")")}}}))},"drawGroups"),Wr=nt(async function(M,Y,C){for(const G of C){const N=Y.append("g"),g=Pt("iconSize");if(G.title){const e=N.append("g");await Ne(e,G.title,{useHtmlLabels:!1,width:g*1.5,classes:"architecture-service-label"},fe()),e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.attr("transform","translate("+g/2+", "+g+")")}const s=N.append("g");if(G.icon)s.html(`${await Ee(G.icon,{height:g,width:g,fallbackPrefix:oe.prefix})}`);else if(G.iconText){s.html(`${await Ee("blank",{height:g,width:g,fallbackPrefix:oe.prefix})}`);const a=s.append("g").append("foreignObject").attr("width",g).attr("height",g).append("div").attr("class","node-icon-text").attr("style",`height: ${g}px;`).append("div").html(G.iconText),y=parseInt(window.getComputedStyle(a.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;a.attr("style",`-webkit-line-clamp: ${Math.floor((g-2)/y)};`)}else s.append("path").attr("class","node-bkg").attr("id","node-"+G.id).attr("d",`M0 ${g} v${-g} q0,-5 5,-5 h${g} q5,0 5,5 v${g} H0 Z`);N.attr("class","architecture-service");const{width:i,height:r}=N._groups[0][0].getBBox();G.width=i,G.height=r,M.setElementForId(G.id,N)}return 0},"drawServices"),Vr=nt(function(M,Y,C){C.forEach(G=>{const N=Y.append("g"),g=Pt("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",g).attr("height",g),N.attr("class","architecture-junction");const{width:i,height:r}=N._groups[0][0].getBBox();N.width=i,N.height=r,M.setElementForId(G.id,N)})},"drawJunctions");nr([{name:oe.prefix,icons:oe}]);Fe.use(ur);function Ye(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"service",id:C.id,icon:C.icon,label:C.title,parent:C.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-service"})})}nt(Ye,"addServices");function Xe(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"junction",id:C.id,parent:C.in,width:Pt("iconSize"),height:Pt("iconSize")},classes:"node-junction"})})}nt(Xe,"addJunctions");function He(M,Y){Y.nodes().map(C=>{const G=ne(C);if(G.type==="group")return;G.x=C.position().x,G.y=C.position().y,M.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}nt(He,"positionNodes");function We(M,Y){M.forEach(C=>{Y.add({group:"nodes",data:{type:"group",id:C.id,icon:C.icon,label:C.title,parent:C.in},classes:"node-group"})})}nt(We,"addGroups");function Ve(M,Y){M.forEach(C=>{const{lhsId:G,rhsId:N,lhsInto:g,lhsGroup:s,rhsInto:i,lhsDir:r,rhsDir:e,rhsGroup:f,title:a}=C,y=Pe(C.lhsDir,C.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:a,source:G,sourceDir:r,sourceArrow:g,sourceGroup:s,sourceEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%",target:N,targetDir:e,targetArrow:i,targetGroup:f,targetEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%"};Y.add({group:"edges",data:t,classes:y})})}nt(Ve,"addEdges");function ze(M){const Y=M.map(N=>{const g={},s={};return Object.entries(N).forEach(([i,[r,e]])=>{g[e]||(g[e]=[]),s[r]||(s[r]=[]),g[e].push(i),s[r].push(i)}),{horiz:Object.values(g).filter(i=>i.length>1),vert:Object.values(s).filter(i=>i.length>1)}}),[C,G]=Y.reduce(([N,g],{horiz:s,vert:i})=>[[...N,...s],[...g,...i]],[[],[]]);return{horizontal:C,vertical:G}}nt(ze,"getAlignments");function Be(M){const Y=[],C=nt(N=>`${N[0]},${N[1]}`,"posToStr"),G=nt(N=>N.split(",").map(g=>parseInt(g)),"strToPos");return M.forEach(N=>{const g=Object.fromEntries(Object.entries(N).map(([e,f])=>[C(f),e])),s=[C([0,0])],i={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const e=s.shift();if(e){i[e]=1;const f=g[e];if(f){const a=G(e);Object.entries(r).forEach(([y,t])=>{const h=C([a[0]+t[0],a[1]+t[1]]),o=g[h];o&&!i[h]&&(s.push(h),Y.push({[xe[y]]:o,[xe[vr(y)]]:f,gap:1.5*Pt("iconSize")}))})}}}}),Y}nt(Be,"getRelativeConstraints");function $e(M,Y,C,G,{spatialMaps:N}){return new Promise(g=>{const s=ir("body").append("div").attr("id","cy").attr("style","display:none"),i=Fe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${Pt("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${Pt("padding")}px`}}]});s.remove(),We(C,i),Ye(M,i),Xe(Y,i),Ve(G,i);const r=ze(N),e=Be(N),f=i.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?1.5*Pt("iconSize"):.5*Pt("iconSize")},edgeElasticity(a){const[y,t]=a.connectedNodes(),{parent:h}=ne(y),{parent:o}=ne(t);return h===o?.45:.001},alignmentConstraint:r,relativePlacementConstraint:e});f.one("layoutstop",()=>{var y;function a(t,h,o,c){let l,T;const{x:u,y:v}=t,{x:L,y:F}=h;T=(c-v+(u-o)*(v-F)/(u-L))/Math.sqrt(1+Math.pow((v-F)/(u-L),2)),l=Math.sqrt(Math.pow(c-v,2)+Math.pow(o-u,2)-Math.pow(T,2));const A=Math.sqrt(Math.pow(L-u,2)+Math.pow(F-v,2));l=l/A;let P=(L-u)*(c-v)-(F-v)*(o-u);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}let J=(L-u)*(o-u)+(F-v)*(c-v);switch(!0){case J>=0:J=1;break;case J<0:J=-1;break}return T=Math.abs(T)*P,l=l*J,{distances:T,weights:l}}nt(a,"getSegmentWeights"),i.startBatch();for(const t of Object.values(i.edges()))if((y=t.data)!=null&&y.call(t)){const{x:h,y:o}=t.source().position(),{x:c,y:l}=t.target().position();if(h!==c&&o!==l){const T=t.sourceEndpoint(),u=t.targetEndpoint(),{sourceDir:v}=Ge(t),[L,F]=Qt(v)?[T.x,u.y]:[u.x,T.y],{weights:A,distances:P}=a(T,u,L,F);t.style("segment-distances",P),t.style("segment-weights",A)}}i.endBatch(),f.run()}),f.run(),i.ready(a=>{Se.info("Ready",a),g(i)})})}nt($e,"layoutArchitecture");var zr=nt(async(M,Y,C,G)=>{const N=G.db,g=N.getServices(),s=N.getJunctions(),i=N.getGroups(),r=N.getEdges(),e=N.getDataStructures(),f=tr(Y),a=f.append("g");a.attr("class","architecture-edges");const y=f.append("g");y.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Wr(N,y,g),Vr(N,y,s);const h=await $e(g,s,i,r,e);await Xr(a,h),await Hr(t,h),He(N,h),er(void 0,f,Pt("padding"),Pt("useMaxWidth"))},"draw"),Br={draw:zr},_r={parser:Gr,db:le,renderer:Br,styles:Yr};export{_r as diagram}; diff --git a/static/js/md-blockDiagram-ZHA2E4KO-Dz3Lf5F8.js b/static/js/md-blockDiagram-ZHA2E4KO-Bf98Me_l.js similarity index 98% rename from static/js/md-blockDiagram-ZHA2E4KO-Dz3Lf5F8.js rename to static/js/md-blockDiagram-ZHA2E4KO-Bf98Me_l.js index 3078d17a5..73dc3dc08 100644 --- a/static/js/md-blockDiagram-ZHA2E4KO-Dz3Lf5F8.js +++ b/static/js/md-blockDiagram-ZHA2E4KO-Bf98Me_l.js @@ -1,9 +1,9 @@ -import{_ as d,d as z,l as L,j as R,ah as de,D as at,ai as Z,aj as Yt,ak as ge,u as tt,al as ue,K as pe,k as fe,v as xe,A as ye,Q as be,am as we,an as xt,e as me,i as Tt}from"./md-index-BVqvVggs.js";import{c as Le}from"./md-clone-DXToIaWo.js";import{G as Se}from"./md-graph-BfdmZmeA.js";import{c as ve}from"./md-channel-DmgS6gpL.js";import"./md-_baseUniq-BgyQXxRT.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: +import{_ as d,D as at,d as R,e as de,l as L,v as ge,A as ue,c as z,ah as pe,K as fe,Q as xe,ai as Z,aj as Yt,ak as ye,u as tt,k as be,al as we,am as xt,an as me,i as Tt}from"./md-index-B8Nim9kS.js";import{c as Le}from"./md-clone-ByE4h4D7.js";import{G as Se}from"./md-graph-6STGQExD.js";import{c as ve}from"./md-channel-vFpC5mtO.js";import"./md-_baseUniq-DU1ET3rn.js";var yt=function(){var e=d(function(N,x,g,u){for(g=g||{},u=N.length;u--;g[N[u]]=x);return g},"o"),t=[1,7],r=[1,13],n=[1,14],i=[1,15],a=[1,19],s=[1,16],l=[1,17],o=[1,18],f=[8,30],h=[8,21,28,29,30,31,32,40,44,47],y=[1,23],b=[1,24],m=[8,15,16,21,28,29,30,31,32,40,44,47],E=[8,15,16,21,27,28,29,30,31,32,40,44,47],D=[1,49],v={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(x,g,u,w,S,c,_){var p=c.length-1;switch(S){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",c[p-1]),w.setHierarchy(c[p-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",c[p]),typeof c[p].length=="number"?this.$=c[p]:this.$=[c[p]];break;case 13:w.getLogger().debug("Rule: statement #2: ",c[p-1]),this.$=[c[p-1]].concat(c[p]);break;case 14:w.getLogger().debug("Rule: link: ",c[p],x),this.$={edgeTypeStr:c[p],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",c[p-3],c[p-1],c[p]),this.$={edgeTypeStr:c[p],label:c[p-1]};break;case 18:const A=parseInt(c[p]),O=w.generateId();this.$={id:O,type:"space",label:"",width:A,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",c[p-2],c[p-1],c[p]," typestr: ",c[p-1].edgeTypeStr);const X=w.edgeStrToEdgeData(c[p-1].edgeTypeStr);this.$=[{id:c[p-2].id,label:c[p-2].label,type:c[p-2].type,directions:c[p-2].directions},{id:c[p-2].id+"-"+c[p].id,start:c[p-2].id,end:c[p].id,label:c[p-1].label,type:"edge",directions:c[p].directions,arrowTypeEnd:X,arrowTypeStart:"arrow_open"},{id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",c[p-1],c[p]),this.$={id:c[p-1].id,label:c[p-1].label,type:w.typeStr2Type(c[p-1].typeStr),directions:c[p-1].directions,widthInColumns:parseInt(c[p],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",c[p]),this.$={id:c[p].id,label:c[p].label,type:w.typeStr2Type(c[p].typeStr),directions:c[p].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",c[p]),this.$={type:"column-setting",columns:c[p]==="auto"?-1:parseInt(c[p])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",c[p-2],c[p-1]),w.generateId(),this.$={...c[p-2],type:"composite",children:c[p-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",c[p-2],c[p-1],c[p]);const W=w.generateId();this.$={id:W,type:"composite",label:"",children:c[p-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",c[p]),this.$={id:c[p]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",c[p-1],c[p]),this.$={id:c[p-1],label:c[p].label,typeStr:c[p].typeStr,directions:c[p].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",c[p]),this.$=[c[p]];break;case 32:w.getLogger().debug("Rule: dirList: ",c[p-1],c[p]),this.$=[c[p-1]].concat(c[p]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",c[p-2],c[p-1],c[p]),this.$={typeStr:c[p-2]+c[p],label:c[p-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",c[p-3],c[p-2]," #3:",c[p-1],c[p]),this.$={typeStr:c[p-3]+c[p],label:c[p-2],directions:c[p-1]};break;case 35:case 36:this.$={type:"classDef",id:c[p-1].trim(),css:c[p].trim()};break;case 37:this.$={type:"applyClass",id:c[p-1].trim(),styleClass:c[p].trim()};break;case 38:this.$={type:"applyStyles",id:c[p-1].trim(),stylesStr:c[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{8:[1,20]},e(f,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:r,29:n,31:i,32:a,40:s,44:l,47:o}),e(h,[2,16],{14:22,15:y,16:b}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(m,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,32:a},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(E,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(f,[2,13]),{26:35,32:a},{32:[2,14]},{17:[1,36]},e(m,[2,24]),{11:37,13:4,14:22,15:y,16:b,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:r,29:n,31:i,32:a,40:s,44:l,47:o},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(E,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{37:[1,47]},{34:48,35:D},{15:[1,50]},e(h,[2,27]),e(E,[2,33]),{39:[1,51]},{34:52,35:D,39:[2,31]},{32:[2,15]},e(E,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(x,g){if(g.recoverable)this.trace(x);else{var u=new Error(x);throw u.hash=g,u}},"parseError"),parse:d(function(x){var g=this,u=[0],w=[],S=[null],c=[],_=this.table,p="",A=0,O=0,X=2,W=1,ce=c.slice.call(arguments,1),M=Object.create(this.lexer),J={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(J.yy[gt]=this.yy[gt]);M.setInput(x,J.yy),J.yy.lexer=M,J.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var ut=M.yylloc;c.push(ut);var oe=M.options&&M.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function he(H){u.length=u.length-2*H,S.length=S.length-H,c.length=c.length-H}d(he,"popStack");function Dt(){var H;return H=w.pop()||M.lex()||W,typeof H!="number"&&(H instanceof Array&&(w=H,H=w.pop()),H=g.symbols_[H]||H),H}d(Dt,"lex");for(var Y,Q,U,pt,$={},st,q,Nt,it;;){if(Q=u[u.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((Y===null||typeof Y>"u")&&(Y=Dt()),U=_[Q]&&_[Q][Y]),typeof U>"u"||!U.length||!U[0]){var ft="";it=[];for(st in _[Q])this.terminals_[st]&&st>X&&it.push("'"+this.terminals_[st]+"'");M.showPosition?ft="Parse error on line "+(A+1)+`: `+M.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error on line "+(A+1)+": Unexpected "+(Y==W?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(ft,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:ut,expected:it})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+Y);switch(U[0]){case 1:u.push(Y),S.push(M.yytext),c.push(M.yylloc),u.push(U[1]),Y=null,O=M.yyleng,p=M.yytext,A=M.yylineno,ut=M.yylloc;break;case 2:if(q=this.productions_[U[1]][1],$.$=S[S.length-q],$._$={first_line:c[c.length-(q||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(q||1)].first_column,last_column:c[c.length-1].last_column},oe&&($._$.range=[c[c.length-(q||1)].range[0],c[c.length-1].range[1]]),pt=this.performAction.apply($,[p,O,A,J.yy,U[1],S,c].concat(ce)),typeof pt<"u")return pt;q&&(u=u.slice(0,-1*q*2),S=S.slice(0,-1*q),c=c.slice(0,-1*q)),u.push(this.productions_[U[1]][0]),S.push($.$),c.push($._$),Nt=_[u[u.length-2]][u[u.length-1]],u.push(Nt);break;case 3:return!0}}return!0},"parse")},T=function(){var N={EOF:1,parseError:d(function(g,u){if(this.yy.parser)this.yy.parser.parseError(g,u);else throw new Error(g)},"parseError"),setInput:d(function(x,g){return this.yy=g||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var g=x.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:d(function(x){var g=x.length,u=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var S=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===w.length?this.yylloc.first_column:0)+w[w.length-u.length].length-u[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(x){this.unput(this.match.slice(x))},"less"),pastInput:d(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var x=this.pastInput(),g=new Array(x.length+1).join("-");return x+this.upcomingInput()+` `+g+"^"},"showPosition"),test_match:d(function(x,g){var u,w,S;if(this.options.backtrack_lexer&&(S={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(S.yylloc.range=this.yylloc.range.slice(0))),w=x[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],u=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var c in S)this[c]=S[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,g,u,w;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),c=0;cg[0].length)){if(g=u,w=c,this.options.backtrack_lexer){if(x=this.test_match(u,S[c]),x!==!1)return x;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(x=this.test_match(g,S[w]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,u,w,S){switch(w){case 0:return 10;case 1:return g.getLogger().debug("Found space-block"),31;case 2:return g.getLogger().debug("Found nl-block"),31;case 3:return g.getLogger().debug("Found space-block"),29;case 4:g.getLogger().debug(".",u.yytext);break;case 5:g.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:g.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return g.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",g.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),38;case 75:return g.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return g.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return g.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:g.getLogger().debug("LEX POPPING"),this.popState();break;case 85:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return g.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();v.lexer=T;function k(){this.yy={}}return d(k,"Parser"),k.prototype=v,v.Parser=k,new k}();yt.parser=yt;var Ee=yt,V=new Map,St=[],bt=new Map,Ct="color",Bt="fill",_e="bgFill",Ht=",",ke=z(),ct=new Map,De=d(e=>me.sanitizeText(e,ke),"sanitizeText"),Ne=d(function(e,t=""){let r=ct.get(e);r||(r={id:e,styles:[],textStyles:[]},ct.set(e,r)),t!=null&&t.split(Ht).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ct).exec(n)){const s=i.replace(Bt,_e).replace(Ct,Bt);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Te=d(function(e,t=""){const r=V.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),Ce=d(function(e,t){e.split(",").forEach(function(r){let n=V.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},V.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Kt=d((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=De(i.label)),i.type==="classDef"){Ne(i.id,i.css);continue}if(i.type==="applyClass"){Ce(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Te(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(bt.get(i.id)??0)+1;bt.set(i.id,a),i.id=a+"-"+i.id,St.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=V.get(i.id);if(a===void 0?V.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Kt(i.children,i),i.type==="space"){const s=i.width??1;for(let l=0;l{L.debug("Clear called"),xe(),rt={id:"root",type:"composite",children:[],columns:-1},V=new Map([["root",rt]]),vt=[],ct=new Map,St=[],bt=new Map},"clear");function Xt(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Xt,"typeStr2Type");function Ut(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Ut,"edgeTypeStr2Type");function jt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}d(jt,"edgeStrToEdgeData");var It=0,Ie=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),Oe=d(e=>{rt.children=e,Kt(e,rt),vt=rt.children},"setHierarchy"),Re=d(e=>{const t=V.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ze=d(()=>[...V.values()],"getBlocksFlat"),Ae=d(()=>vt||[],"getBlocks"),Me=d(()=>St,"getEdges"),Fe=d(e=>V.get(e),"getBlock"),We=d(e=>{V.set(e.id,e)},"setBlock"),Pe=d(()=>console,"getLogger"),Ye=d(function(){return ct},"getClasses"),He={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Ut,edgeStrToEdgeData:jt,getLogger:Pe,getBlocksFlat:ze,getBlocks:Ae,getEdges:Me,setHierarchy:Oe,getBlock:Fe,setBlock:We,getColumns:Re,getClasses:Ye,clear:Be,generateId:Ie},Ke=He,nt=d((e,t)=>{const r=ve,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return ye(n,i,a,t)},"fade"),Xe=d(e=>`.label { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,u,w,S){switch(w){case 0:return 10;case 1:return g.getLogger().debug("Found space-block"),31;case 2:return g.getLogger().debug("Found nl-block"),31;case 3:return g.getLogger().debug("Found space-block"),29;case 4:g.getLogger().debug(".",u.yytext);break;case 5:g.getLogger().debug("_",u.yytext);break;case 6:return 5;case 7:return u.yytext=-1,28;case 8:return u.yytext=u.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",u.yytext),28;case 9:this.pushState("md_string");break;case 10:return"MD_STR";case 11:this.popState();break;case 12:this.pushState("string");break;case 13:g.getLogger().debug("LEX: POPPING STR:",u.yytext),this.popState();break;case 14:return g.getLogger().debug("LEX: STR end:",u.yytext),"STR";case 15:return u.yytext=u.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",u.yytext),21;case 16:return u.yytext="1",g.getLogger().debug("COLUMNS (LEX)",u.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 35:this.popState();break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 62:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:return this.pushState("NODE"),36;case 67:return this.pushState("NODE"),36;case 68:return this.pushState("NODE"),36;case 69:return this.pushState("NODE"),36;case 70:return this.pushState("NODE"),36;case 71:return this.pushState("NODE"),36;case 72:return this.pushState("NODE"),36;case 73:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),38;case 75:return g.getLogger().debug("Lex: NODE_ID",u.yytext),32;case 76:return g.getLogger().debug("Lex: EOF",u.yytext),8;case 77:this.pushState("md_string");break;case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return g.getLogger().debug("LEX: NODE_DESCR:",u.yytext),"NODE_DESCR";case 84:g.getLogger().debug("LEX POPPING"),this.popState();break;case 85:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",u.yytext),"DIR";case 87:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",u.yytext),"DIR";case 88:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",u.yytext),"DIR";case 89:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",u.yytext),"DIR";case 90:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",u.yytext),"DIR";case 91:return u.yytext=u.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",u.yytext),"DIR";case 92:return u.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",u.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 94:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 96:return g.getLogger().debug("Lex: LINK",u.yytext),15;case 97:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 99:return g.getLogger().debug("Lex: START_LINK",u.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),g.getLogger().debug("Lex: LINK","#"+u.yytext+"#"),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 104:return this.popState(),g.getLogger().debug("Lex: LINK",u.yytext),15;case 105:return g.getLogger().debug("Lex: COLON",u.yytext),u.yytext=u.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};return N}();v.lexer=T;function k(){this.yy={}}return d(k,"Parser"),k.prototype=v,v.Parser=k,new k}();yt.parser=yt;var Ee=yt,V=new Map,St=[],bt=new Map,Ct="color",Bt="fill",_e="bgFill",Ht=",",ke=z(),ct=new Map,De=d(e=>be.sanitizeText(e,ke),"sanitizeText"),Ne=d(function(e,t=""){let r=ct.get(e);r||(r={id:e,styles:[],textStyles:[]},ct.set(e,r)),t!=null&&t.split(Ht).forEach(n=>{const i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(Ct).exec(n)){const s=i.replace(Bt,_e).replace(Ct,Bt);r.textStyles.push(s)}r.styles.push(i)})},"addStyleClass"),Te=d(function(e,t=""){const r=V.get(e);t!=null&&(r.styles=t.split(Ht))},"addStyle2Node"),Ce=d(function(e,t){e.split(",").forEach(function(r){let n=V.get(r);if(n===void 0){const i=r.trim();n={id:i,type:"na",children:[]},V.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),Kt=d((e,t)=>{const r=e.flat(),n=[];for(const i of r){if(i.label&&(i.label=De(i.label)),i.type==="classDef"){Ne(i.id,i.css);continue}if(i.type==="applyClass"){Ce(i.id,(i==null?void 0:i.styleClass)??"");continue}if(i.type==="applyStyles"){i!=null&&i.stylesStr&&Te(i.id,i==null?void 0:i.stylesStr);continue}if(i.type==="column-setting")t.columns=i.columns??-1;else if(i.type==="edge"){const a=(bt.get(i.id)??0)+1;bt.set(i.id,a),i.id=a+"-"+i.id,St.push(i)}else{i.label||(i.type==="composite"?i.label="":i.label=i.id);const a=V.get(i.id);if(a===void 0?V.set(i.id,i):(i.type!=="na"&&(a.type=i.type),i.label!==i.id&&(a.label=i.label)),i.children&&Kt(i.children,i),i.type==="space"){const s=i.width??1;for(let l=0;l{L.debug("Clear called"),ge(),rt={id:"root",type:"composite",children:[],columns:-1},V=new Map([["root",rt]]),vt=[],ct=new Map,St=[],bt=new Map},"clear");function Xt(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Xt,"typeStr2Type");function Ut(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Ut,"edgeTypeStr2Type");function jt(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}d(jt,"edgeStrToEdgeData");var It=0,Ie=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),Oe=d(e=>{rt.children=e,Kt(e,rt),vt=rt.children},"setHierarchy"),Re=d(e=>{const t=V.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ze=d(()=>[...V.values()],"getBlocksFlat"),Ae=d(()=>vt||[],"getBlocks"),Me=d(()=>St,"getEdges"),Fe=d(e=>V.get(e),"getBlock"),We=d(e=>{V.set(e.id,e)},"setBlock"),Pe=d(()=>console,"getLogger"),Ye=d(function(){return ct},"getClasses"),He={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:Xt,edgeTypeStr2Type:Ut,edgeStrToEdgeData:jt,getLogger:Pe,getBlocksFlat:ze,getBlocks:Ae,getEdges:Me,setHierarchy:Oe,getBlock:Fe,setBlock:We,getColumns:Re,getClasses:Ye,clear:Be,generateId:Ie},Ke=He,nt=d((e,t)=>{const r=ve,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return ue(n,i,a,t)},"fade"),Xe=d(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } @@ -115,7 +115,7 @@ Expecting `+it.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":ft="Parse error font-size: 18px; fill: ${e.textColor}; } -`,"getStyles"),Ue=Xe,je=d((e,t,r,n)=>{t.forEach(i=>{rr[i](e,r,n)})},"insertMarkers"),Ve=d((e,t,r)=>{L.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Ge=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Je=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Qe=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$e=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),er=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rr={extension:Ve,composition:Ge,aggregation:Ze,dependency:qe,lollipop:Je,point:Qe,circle:$e,cross:tr,barb:er},ar=je,Wt,Pt,I=((Pt=(Wt=z())==null?void 0:Wt.block)==null?void 0:Pt.padding)??8;function Vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}d(Vt,"calculateBlockPosition");var sr=d(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");function ot(e,t,r=0,n=0){var s,l,o,f,h,y,b,m,E,D,v;L.debug("setBlockSizes abc95 (start)",e.id,(s=e==null?void 0:e.size)==null?void 0:s.x,"block width =",e==null?void 0:e.size,"sieblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((o=e.children)==null?void 0:o.length)>0){for(const S of e.children)ot(S,t);const T=sr(e);i=T.width,a=T.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const S of e.children)S.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${i} ${a} ${JSON.stringify(S.size)}`),S.size.width=i*(S.widthInColumns??1)+I*((S.widthInColumns??1)-1),S.size.height=a,S.size.x=0,S.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${i} maxHeight:${a}`));for(const S of e.children)ot(S,t,i,a);const k=e.columns??-1;let N=0;for(const S of e.children)N+=S.widthInColumns??1;let x=e.children.length;k>0&&k0?Math.min(e.children.length,k):e.children.length;if(S>0){const c=(u-S*I-I)/S;L.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,c);for(const _ of e.children)_.size&&(_.size.width=c)}}e.size={width:u,height:w,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(E=e==null?void 0:e.size)==null?void 0:E.width,(D=e==null?void 0:e.size)==null?void 0:D.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}d(ot,"setBlockSizes");function Et(e,t){var n,i,a,s,l,o,f,h,y,b,m,E,D,v,T,k,N;L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(a=e==null?void 0:e.size)==null?void 0:a.width}`);const r=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const x=((l=(s=e==null?void 0:e.children[0])==null?void 0:s.size)==null?void 0:l.width)??0,g=e.children.length*x+(e.children.length-1)*I;L.debug("widthOfChildren 88",g,"posX");let u=0;L.debug("abc91 block?.size?.x",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-I,S=0;for(const c of e.children){const _=e;if(!c.size)continue;const{width:p,height:A}=c.size,{px:O,py:X}=Vt(r,u);if(X!=S&&(S=X,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((E=e==null?void 0:e.size)==null?void 0:E.width)/2||0):-I,L.debug("New row in layout for block",e.id," and child ",c.id,S)),L.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${u} (px, py) ${O},${X} (${(D=_==null?void 0:_.size)==null?void 0:D.x},${(v=_==null?void 0:_.size)==null?void 0:v.y}) parent: ${_.id} width: ${p}${I}`),_.size){const W=p/2;c.size.x=w+I+W,L.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${W} padding=${I} width=${p} halfWidth=${W} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((c==null?void 0:c.widthInColumns)??1)/2}`),w=c.size.x+W,c.size.y=_.size.y-_.size.height/2+X*(A+I)+A/2+I,L.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${I}${W}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${p*((c==null?void 0:c.widthInColumns)??1)/2}`)}c.children&&Et(c),u+=(c==null?void 0:c.widthInColumns)??1,L.debug("abc88 columnsPos",c,u)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(T=e==null?void 0:e.size)==null?void 0:T.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:a,y:s,width:l,height:o}=e.size;a-l/2n&&(n=a+l/2),s+o/2>i&&(i=s+o/2)}if(e.children)for(const a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=_t(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}d(_t,"findBounds");function Gt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),L.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=_t(t),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}d(Gt,"layout");function wt(e,t){t&&e.attr("style",t)}d(wt,"applyStyle");function Zt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wt(a,e.labelStyle),a.attr("class",i),wt(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Zt,"addHtmlLabel");var ir=d((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Z(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),L.debug("vertexText"+i);const a={isNode:n,label:we(xt(i)),labelStyle:t.replace("fill:","color:")};return Zt(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const l of s){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=l.trim(),a.appendChild(o)}return a}},"createLabel"),j=ir,nr=d((e,t,r,n,i)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),lr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,r,n,i,a)=>{const s=lr[r];if(!s){L.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker"),mt={},P={},cr=d((e,t)=>{const r=z(),n=Z(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Yt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):j(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),mt[t.id]=a,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=j(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startLeft=h,et(o,t.startLabelLeft)}if(t.startLabelRight){const f=j(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=h.node().appendChild(f),y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startRight=h,et(o,t.startLabelRight)}if(t.endLabelLeft){const f=j(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endLeft=h,et(o,t.endLabelLeft)}if(t.endLabelRight){const f=j(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endRight=h,et(o,t.endLabelRight)}return i},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var or=d((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=ge(n);if(e.label){const a=mt[e.id];let s=e.x,l=e.y;if(r){const o=tt.calcLabelPosition(r);L.debug("Moving label "+e.label+" from (",s,",",l,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(s=o.x,l=o.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(e.startLabelLeft){const a=P[e.id].startLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){const a=P[e.id].startRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){const a=P[e.id].endLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){const a=P[e.id].endRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),hr=d((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,l=e.height/2;return i>=s||a>=l},"outsideNode"),dr=d((e,t,r)=>{L.debug(`intersection calc abc89: +`,"getStyles"),Ue=Xe,je=d((e,t,r,n)=>{t.forEach(i=>{rr[i](e,r,n)})},"insertMarkers"),Ve=d((e,t,r)=>{L.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Ge=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Je=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Qe=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$e=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tr=d((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),er=d((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rr={extension:Ve,composition:Ge,aggregation:Ze,dependency:qe,lollipop:Je,point:Qe,circle:$e,cross:tr,barb:er},ar=je,Wt,Pt,I=((Pt=(Wt=z())==null?void 0:Wt.block)==null?void 0:Pt.padding)??8;function Vt(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const r=t%e,n=Math.floor(t/e);return{px:r,py:n}}d(Vt,"calculateBlockPosition");var sr=d(e=>{let t=0,r=0;for(const n of e.children){const{width:i,height:a,x:s,y:l}=n.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",l,n.type),n.type!=="space"&&(i>t&&(t=i/(e.widthInColumns??1)),a>r&&(r=a))}return{width:t,height:r}},"getMaxChildSize");function ot(e,t,r=0,n=0){var s,l,o,f,h,y,b,m,E,D,v;L.debug("setBlockSizes abc95 (start)",e.id,(s=e==null?void 0:e.size)==null?void 0:s.x,"block width =",e==null?void 0:e.size,"sieblingWidth",r),(l=e==null?void 0:e.size)!=null&&l.width||(e.size={width:r,height:n,x:0,y:0});let i=0,a=0;if(((o=e.children)==null?void 0:o.length)>0){for(const S of e.children)ot(S,t);const T=sr(e);i=T.width,a=T.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,a);for(const S of e.children)S.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${S.id} ${i} ${a} ${JSON.stringify(S.size)}`),S.size.width=i*(S.widthInColumns??1)+I*((S.widthInColumns??1)-1),S.size.height=a,S.size.x=0,S.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${S.id} maxWidth:${i} maxHeight:${a}`));for(const S of e.children)ot(S,t,i,a);const k=e.columns??-1;let N=0;for(const S of e.children)N+=S.widthInColumns??1;let x=e.children.length;k>0&&k0?Math.min(e.children.length,k):e.children.length;if(S>0){const c=(u-S*I-I)/S;L.debug("abc95 (growing to fit) width",e.id,u,(b=e.size)==null?void 0:b.width,c);for(const _ of e.children)_.size&&(_.size.width=c)}}e.size={width:u,height:w,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,(m=e==null?void 0:e.size)==null?void 0:m.x,(E=e==null?void 0:e.size)==null?void 0:E.width,(D=e==null?void 0:e.size)==null?void 0:D.y,(v=e==null?void 0:e.size)==null?void 0:v.height)}d(ot,"setBlockSizes");function Et(e,t){var n,i,a,s,l,o,f,h,y,b,m,E,D,v,T,k,N;L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(n=e==null?void 0:e.size)==null?void 0:n.x} y: ${(i=e==null?void 0:e.size)==null?void 0:i.y} width: ${(a=e==null?void 0:e.size)==null?void 0:a.width}`);const r=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",r,e),e.children&&e.children.length>0){const x=((l=(s=e==null?void 0:e.children[0])==null?void 0:s.size)==null?void 0:l.width)??0,g=e.children.length*x+(e.children.length-1)*I;L.debug("widthOfChildren 88",g,"posX");let u=0;L.debug("abc91 block?.size?.x",e.id,(o=e==null?void 0:e.size)==null?void 0:o.x);let w=(f=e==null?void 0:e.size)!=null&&f.x?((h=e==null?void 0:e.size)==null?void 0:h.x)+(-((y=e==null?void 0:e.size)==null?void 0:y.width)/2||0):-I,S=0;for(const c of e.children){const _=e;if(!c.size)continue;const{width:p,height:A}=c.size,{px:O,py:X}=Vt(r,u);if(X!=S&&(S=X,w=(b=e==null?void 0:e.size)!=null&&b.x?((m=e==null?void 0:e.size)==null?void 0:m.x)+(-((E=e==null?void 0:e.size)==null?void 0:E.width)/2||0):-I,L.debug("New row in layout for block",e.id," and child ",c.id,S)),L.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${u} (px, py) ${O},${X} (${(D=_==null?void 0:_.size)==null?void 0:D.x},${(v=_==null?void 0:_.size)==null?void 0:v.y}) parent: ${_.id} width: ${p}${I}`),_.size){const W=p/2;c.size.x=w+I+W,L.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${w} new startingPosX${c.size.x} ${W} padding=${I} width=${p} halfWidth=${W} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${p*((c==null?void 0:c.widthInColumns)??1)/2}`),w=c.size.x+W,c.size.y=_.size.y-_.size.height/2+X*(A+I)+A/2+I,L.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${w}${I}${W}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${p*((c==null?void 0:c.widthInColumns)??1)/2}`)}c.children&&Et(c),u+=(c==null?void 0:c.widthInColumns)??1,L.debug("abc88 columnsPos",c,u)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(T=e==null?void 0:e.size)==null?void 0:T.x} y: ${(k=e==null?void 0:e.size)==null?void 0:k.y} width: ${(N=e==null?void 0:e.size)==null?void 0:N.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:a,y:s,width:l,height:o}=e.size;a-l/2n&&(n=a+l/2),s+o/2>i&&(i=s+o/2)}if(e.children)for(const a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=_t(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}d(_t,"findBounds");function Gt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),L.debug("getBlocks",JSON.stringify(t,null,2));const{minX:r,minY:n,maxX:i,maxY:a}=_t(t),s=a-n,l=i-r;return{x:r,y:n,width:l,height:s}}d(Gt,"layout");function wt(e,t){t&&e.attr("style",t)}d(wt,"applyStyle");function Zt(e){const t=R(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),wt(a,e.labelStyle),a.attr("class",i),wt(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(Zt,"addHtmlLabel");var ir=d((e,t,r,n)=>{let i=e||"";if(typeof i=="object"&&(i=i[0]),Z(z().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"
"),L.debug("vertexText"+i);const a={isNode:n,label:we(xt(i)),labelStyle:t.replace("fill:","color:")};return Zt(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|/gi):Array.isArray(i)?s=i:s=[];for(const l of s){const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=l.trim(),a.appendChild(o)}return a}},"createLabel"),j=ir,nr=d((e,t,r,n,i)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),lr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,r,n,i,a)=>{const s=lr[r];if(!s){L.warn(`Unknown arrow type: ${r}`);return}const l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${n}#${i}_${a}-${s}${l})`)},"addEdgeMarker"),mt={},P={},cr=d((e,t)=>{const r=z(),n=Z(r.flowchart.htmlLabels),i=t.labelType==="markdown"?Yt(e,t.label,{style:t.labelStyle,useHtmlLabels:n,addSvgBackground:!0},r):j(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(i);let l=i.getBBox();if(n){const f=i.children[0],h=R(i);l=f.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}s.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),mt[t.id]=a,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const f=j(t.startLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startLeft=h,et(o,t.startLabelLeft)}if(t.startLabelRight){const f=j(t.startLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=h.node().appendChild(f),y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),P[t.id]||(P[t.id]={}),P[t.id].startRight=h,et(o,t.startLabelRight)}if(t.endLabelLeft){const f=j(t.endLabelLeft,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endLeft=h,et(o,t.endLabelLeft)}if(t.endLabelRight){const f=j(t.endLabelRight,t.labelStyle),h=e.insert("g").attr("class","edgeTerminals"),y=h.insert("g").attr("class","inner");o=y.node().appendChild(f);const b=f.getBBox();y.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.node().appendChild(f),P[t.id]||(P[t.id]={}),P[t.id].endRight=h,et(o,t.endLabelRight)}return i},"insertEdgeLabel");function et(e,t){z().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var or=d((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,mt[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath;const n=z(),{subGraphTitleTotalMargin:i}=ye(n);if(e.label){const a=mt[e.id];let s=e.x,l=e.y;if(r){const o=tt.calcLabelPosition(r);L.debug("Moving label "+e.label+" from (",s,",",l,") to (",o.x,",",o.y,") abc88"),t.updatedPath&&(s=o.x,l=o.y)}a.attr("transform",`translate(${s}, ${l+i/2})`)}if(e.startLabelLeft){const a=P[e.id].startLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){const a=P[e.id].startRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){const a=P[e.id].endLeft;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){const a=P[e.id].endRight;let s=e.x,l=e.y;if(r){const o=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=o.x,l=o.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),hr=d((e,t)=>{const r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),s=e.width/2,l=e.height/2;return i>=s||a>=l},"outsideNode"),dr=d((e,t,r)=>{L.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(t)} insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let l=r.xMath.abs(n-t.x)*o){let y=r.y{L.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(!hr(t,a)&&!i){const s=dr(t,n,a);let l=!1;r.forEach(o=>{l=l||o.x===s.x&&o.y===s.y}),r.some(o=>o.x===s.x&&o.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),gr=d(function(e,t,r,n,i,a,s){let l=r.points;L.debug("abc88 InsertEdge: edge=",r,"e=",t);let o=!1;const f=a.node(t.v);var h=a.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(L.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(L.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),o=!0);const y=l.filter(x=>!Number.isNaN(x.y));let b=be;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:E}=ue(r),D=pe().x(m).y(E).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),nr(T,r,k,s,i);let N={};return o&&(N.updatedPath=l),N.originalPath=r.points,N},"insertEdge"),ur=d(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),pr=d((e,t,r)=>{const n=ur(e),i=2,a=t.height+2*r.padding,s=a/i,l=t.width+2*s+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*o},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*o,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*o},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function qt(e,t){return e.intersect(t)}d(qt,"intersectNode");var fr=qt;function Jt(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,l=a-n.y,o=Math.sqrt(t*t*l*l+r*r*s*s),f=Math.abs(t*r*s/o);n.x0}d(Lt,"sameSign");var yr=te,br=ee;function ee(e,t,r){var n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(E){s=Math.min(s,E.x),l=Math.min(l,E.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var o=n-e.width/2-s,f=i-e.height/2-l,h=0;h1&&a.sort(function(E,D){var v=E.x-r.x,T=E.y-r.y,k=Math.sqrt(v*v+T*T),N=D.x-r.x,x=D.y-r.y,g=Math.sqrt(N*N+x*x);return k{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,l=e.height/2,o,f;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),o=a===0?0:l*i/a,f=l):(i<0&&(s=-s),o=s,f=i===0?0:s*a/i),{x:r+o,y:n+f}},"intersectRect"),mr=wr,C={node:fr,circle:xr,ellipse:Qt,polygon:br,rect:mr},F=d(async(e,t,r,n)=>{const i=z();let a;const s=t.useHtmlLabels||Z(i.flowchart.htmlLabels);r?a=r:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=o.node();let y;t.labelType==="markdown"?y=Yt(o,Tt(xt(f),i),{useHtmlLabels:s,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):y=h.appendChild(j(Tt(xt(f),i),t.labelStyle,!1,n));let b=y.getBBox();const m=t.padding/2;if(Z(i.flowchart.htmlLabels)){const E=y.children[0],D=R(y),v=E.getElementsByTagName("img");if(v){const T=f.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(k=>new Promise(N=>{function x(){if(k.style.display="flex",k.style.flexDirection="column",T){const g=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(g,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";N(k)}d(x,"setupImage"),setTimeout(()=>{k.complete&&x()}),k.addEventListener("error",x),k.addEventListener("load",x)})))}b=E.getBoundingClientRect(),D.attr("width",b.width),D.attr("height",b.height)}return s?o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):o.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:o}},"labelHelper"),B=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function G(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(G,"insertPolygonShape");var Lr=d(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:a}=await F(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,s),t.intersect=function(l){return C.rect(t,l)},n},"note"),Sr=Lr,zt=d(e=>e?" "+e:"","formatClass"),K=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];L.info("Question main (Circle)");const o=G(r,s,s,l);return o.attr("style",t.style),B(t,o),t.intersect=function(f){return L.warn("Intersect called"),C.polygon(t,l,f)},r},"question"),vr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return C.circle(t,14,s)},r},"choice"),Er=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=4,a=n.height+t.padding,s=a/i,l=n.width+2*s+t.padding,o=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"hexagon"),_r=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,a=n.height+2*t.padding,s=a/i,l=n.width+2*s+t.padding,o=pr(t.directions,n,t),f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"block_arrow"),kr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return G(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_left_inv_arrow"),Dr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_right"),Nr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_left"),Tr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"trapezoid"),Cr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"inv_trapezoid"),Br=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_right_inv_arrow"),Ir=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+t.padding,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return B(t,f),t.intersect=function(h){const y=C.rect(t,h),b=y.x-t.x;if(a!=0&&(Math.abs(b)t.height/2-s)){let m=s*s*(1-b*b/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,h.y-t.y>0&&(m=-m),y.y+=m}return y},r},"cylinder"),Or=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"rect"),Rr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"composite"),zr=d(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);L.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ht(n,t.props.borders,i,a),s.delete("borders")),s.forEach(l=>{L.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(s){return C.rect(t,s)},r},"labelRect");function ht(e,t,r,n){const i=[],a=d(l=>{i.push(l,0)},"addBorder"),s=d(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(L.debug("add top border"),a(r)):s(r),t.includes("r")?(L.debug("add right border"),a(n)):s(n),t.includes("b")?(L.debug("add bottom border"),a(r)):s(r),t.includes("l")?(L.debug("add left border"),a(n)):s(n),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var Ar=d((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof l=="object"?o=l[0]:o=l,L.info("Label text abc79",o,l,typeof l=="object");const f=s.node().appendChild(j(o,t.labelStyle,!0,!0));let h={width:0,height:0};if(Z(z().flowchart.htmlLabels)){const D=f.children[0],v=R(f);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}L.info("Text 2",l);const y=l.slice(1,l.length);let b=f.getBBox();const m=s.node().appendChild(j(y.join?y.join("
"):y,t.labelStyle,!0,!0));if(Z(z().flowchart.htmlLabels)){const D=m.children[0],v=R(m);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}const E=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+E+5)+")"),R(f).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.height+t.padding,a=n.width+i/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return B(t,s),t.intersect=function(l){return C.rect(t,l)},r},"stadium"),Fr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),B(t,a),t.intersect=function(s){return L.info("Circle intersect",t,n.width/2+i,s),C.circle(t,n.width/2+i,s)},r},"circle"),Wr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+a).attr("width",n.width+t.padding+a*2).attr("height",n.height+t.padding+a*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return L.info("DoubleCircle intersect",t,n.width/2+i+a,f),C.circle(t,n.width/2+i+a,f)},r},"doublecircle"),Pr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"subroutine"),Yr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return C.circle(t,7,i)},r},"start"),Mt=d((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return B(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return C.rect(t,l)},n},"forkJoin"),Hr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(a){return C.circle(t,7,a)},r},"end"),Kr=d((e,t)=>{var S;const r=t.padding/2,n=4,i=8;let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),o=s.insert("line"),f=s.insert("line");let h=0,y=n;const b=s.insert("g").attr("class","label");let m=0;const E=(S=t.classData.annotations)==null?void 0:S[0],D=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",v=b.node().appendChild(j(D,t.labelStyle,!0,!0));let T=v.getBBox();if(Z(z().flowchart.htmlLabels)){const c=v.children[0],_=R(v);T=c.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}t.classData.annotations[0]&&(y+=T.height+n,h+=T.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const N=b.node().appendChild(j(k,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let x=N.getBBox();if(Z(z().flowchart.htmlLabels)){const c=N.children[0],_=R(N);x=c.getBoundingClientRect(),_.attr("width",x.width),_.attr("height",x.height)}y+=x.height+n,x.width>h&&(h=x.width);const g=[];t.classData.members.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,g.push(A)}),y+=i;const u=[];if(t.classData.methods.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,u.push(A)}),y+=i,E){let c=(h-T.width)/2;R(v).attr("transform","translate( "+(-1*h/2+c)+", "+-1*y/2+")"),m=T.height+n}let w=(h-x.width)/2;return R(N).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*y/2+m)+")"),m+=x.height+n,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,g.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m+i/2)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,u.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(y/2)-r).attr("width",h+t.padding).attr("height",y+t.padding),B(t,l),t.intersect=function(c){return C.rect(t,c)},s},"class_box"),Ft={rhombus:At,composite:Rr,question:At,rect:Or,labelRect:zr,rectWithTitle:Ar,choice:vr,circle:Fr,doublecircle:Wr,stadium:Mr,hexagon:Er,block_arrow:_r,rect_left_inv_arrow:kr,lean_right:Dr,lean_left:Nr,trapezoid:Tr,inv_trapezoid:Cr,rect_right_inv_arrow:Br,cylinder:Ir,start:Yr,end:Hr,note:Sr,subroutine:Pr,fork:Mt,join:Mt,class_box:Kr},lt={},re=d(async(e,t,r)=>{let n,i;if(t.link){let a;z().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),i=await Ft[t.shape](n,t,r)}else i=await Ft[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),Xr=d(e=>{const t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function kt(e,t,r=!1){var b,m,E;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const o=de((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:o.labelStyle,shape:s,labelText:f,rx:a,ry:a,class:i,style:o.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((E=(m=at())==null?void 0:m.block)==null?void 0:E.padding)??0}}d(kt,"getNodeFromBlock");async function ae(e,t,r){const n=kt(t,r,!1);if(n.type==="group")return;const i=at(),a=await re(e,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}d(ae,"calculateBlockSize");async function se(e,t,r){const n=kt(t,r,!0);if(r.getBlock(n.id).type!=="space"){const a=at();await re(e,n,{config:a}),t.intersect=n==null?void 0:n.intersect,Xr(n)}}d(se,"insertBlockPositioned");async function dt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await dt(e,i.children,r,n)}d(dt,"performOperations");async function ie(e,t,r){await dt(e,t,r,ae)}d(ie,"calculateBlockSizes");async function ne(e,t,r){await dt(e,t,r,se)}d(ne,"insertBlocks");async function le(e,t,r,n,i){const a=new Se({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const l=n.getBlock(s.start),o=n.getBlock(s.end);if(l!=null&&l.size&&(o!=null&&o.size)){const f=l.size,h=o.size,y=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];gr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await cr(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),or({...s,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(le,"insertEdges");var Ur=d(function(e,t){return t.db.getClasses()},"getClasses"),jr=d(async function(e,t,r,n){const{securityLevel:i,block:a}=at(),s=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const o=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?o.select(`[id="${t}"]`):R(`[id="${t}"]`);ar(f,["point","circle","cross"],n.type,t);const y=s.getBlocks(),b=s.getBlocksFlat(),m=s.getEdges(),E=f.insert("g").attr("class","block");await ie(E,y,s);const D=Gt(s);if(await ne(E,y,s),await le(E,m,b,s,t),D){const v=D,T=Math.max(1,Math.round(.125*(v.width/v.height))),k=v.height+T+10,N=v.width+10,{useMaxWidth:x}=a;fe(f,k,N,!!x),L.debug("Here Bounds",D,v),f.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Vr={draw:jr,getClasses:Ur},$r={parser:Ee,db:Ke,renderer:Vr,styles:Ue};export{$r as diagram}; + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const n=e.x,i=e.y,a=Math.abs(n-r.x),s=e.width/2;let l=r.xMath.abs(n-t.x)*o){let y=r.y{L.debug("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(!hr(t,a)&&!i){const s=dr(t,n,a);let l=!1;r.forEach(o=>{l=l||o.x===s.x&&o.y===s.y}),r.some(o=>o.x===s.x&&o.y===s.y)||r.push(s),i=!0}else n=a,i||r.push(a)}),r},"cutPathAtIntersect"),gr=d(function(e,t,r,n,i,a,s){let l=r.points;L.debug("abc88 InsertEdge: edge=",r,"e=",t);let o=!1;const f=a.node(t.v);var h=a.node(t.w);h!=null&&h.intersect&&(f!=null&&f.intersect)&&(l=l.slice(1,r.points.length-1),l.unshift(f.intersect(l[0])),l.push(h.intersect(l[l.length-1]))),r.toCluster&&(L.debug("to cluster abc88",n[r.toCluster]),l=Rt(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(L.debug("from cluster abc88",n[r.fromCluster]),l=Rt(l.reverse(),n[r.fromCluster].node).reverse(),o=!0);const y=l.filter(x=>!Number.isNaN(x.y));let b=xe;r.curve&&(i==="graph"||i==="flowchart")&&(b=r.curve);const{x:m,y:E}=pe(r),D=fe().x(m).y(E).curve(b);let v;switch(r.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-thick";break;default:v=""}switch(r.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break}const T=e.append("path").attr("d",D(y)).attr("id",r.id).attr("class"," "+v+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),nr(T,r,k,s,i);let N={};return o&&(N.updatedPath=l),N.originalPath=r.points,N},"insertEdge"),ur=d(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),pr=d((e,t,r)=>{const n=ur(e),i=2,a=t.height+2*r.padding,s=a/i,l=t.width+2*s+r.padding,o=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:s,y:0},{x:l/2,y:2*o},{x:l-s,y:0},{x:l,y:0},{x:l,y:-a/3},{x:l+2*o,y:-a/2},{x:l,y:-2*a/3},{x:l,y:-a},{x:l-s,y:-a},{x:l/2,y:-a-2*o},{x:s,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*o,y:-a/2},{x:0,y:-a/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:s,y:-a},{x:l-s,y:-a},{x:l,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:l,y:-a+s},{x:0,y:-a}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:l,y:0},{x:0,y:-s},{x:0,y:-a+s},{x:l,y:-a}]:n.has("right")&&n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")&&n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:l,y:-s},{x:0,y:-a}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-a}]:n.has("left")&&n.has("up")?[{x:l,y:0},{x:0,y:-s},{x:l,y:-a}]:n.has("left")&&n.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-a}]:n.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a+o}]:n.has("left")?[{x:s,y:0},{x:s,y:-o},{x:l-s,y:-o},{x:l-s,y:-a+o},{x:s,y:-a+o},{x:s,y:-a},{x:0,y:-a/2}]:n.has("up")?[{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a+o},{x:l/2,y:-a},{x:l,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o}]:n.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-a+o},{x:l-s,y:-a+o},{x:l-s,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function qt(e,t){return e.intersect(t)}d(qt,"intersectNode");var fr=qt;function Jt(e,t,r,n){var i=e.x,a=e.y,s=i-n.x,l=a-n.y,o=Math.sqrt(t*t*l*l+r*r*s*s),f=Math.abs(t*r*s/o);n.x0}d(Lt,"sameSign");var yr=te,br=ee;function ee(e,t,r){var n=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(E){s=Math.min(s,E.x),l=Math.min(l,E.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var o=n-e.width/2-s,f=i-e.height/2-l,h=0;h1&&a.sort(function(E,D){var v=E.x-r.x,T=E.y-r.y,k=Math.sqrt(v*v+T*T),N=D.x-r.x,x=D.y-r.y,g=Math.sqrt(N*N+x*x);return k{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,s=e.width/2,l=e.height/2,o,f;return Math.abs(a)*s>Math.abs(i)*l?(a<0&&(l=-l),o=a===0?0:l*i/a,f=l):(i<0&&(s=-s),o=s,f=i===0?0:s*a/i),{x:r+o,y:n+f}},"intersectRect"),mr=wr,C={node:fr,circle:xr,ellipse:Qt,polygon:br,rect:mr},F=d(async(e,t,r,n)=>{const i=z();let a;const s=t.useHtmlLabels||Z(i.flowchart.htmlLabels);r?a=r:a="node default";const l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),o=l.insert("g").attr("class","label").attr("style",t.labelStyle);let f;t.labelText===void 0?f="":f=typeof t.labelText=="string"?t.labelText:t.labelText[0];const h=o.node();let y;t.labelType==="markdown"?y=Yt(o,Tt(xt(f),i),{useHtmlLabels:s,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):y=h.appendChild(j(Tt(xt(f),i),t.labelStyle,!1,n));let b=y.getBBox();const m=t.padding/2;if(Z(i.flowchart.htmlLabels)){const E=y.children[0],D=R(y),v=E.getElementsByTagName("img");if(v){const T=f.replace(/]*>/g,"").trim()==="";await Promise.all([...v].map(k=>new Promise(N=>{function x(){if(k.style.display="flex",k.style.flexDirection="column",T){const g=i.fontSize?i.fontSize:window.getComputedStyle(document.body).fontSize,w=parseInt(g,10)*5+"px";k.style.minWidth=w,k.style.maxWidth=w}else k.style.width="100%";N(k)}d(x,"setupImage"),setTimeout(()=>{k.complete&&x()}),k.addEventListener("error",x),k.addEventListener("load",x)})))}b=E.getBoundingClientRect(),D.attr("width",b.width),D.attr("height",b.height)}return s?o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):o.attr("transform","translate(0, "+-b.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:m,label:o}},"labelHelper"),B=d((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");function G(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}d(G,"insertPolygonShape");var Lr=d(async(e,t)=>{t.useHtmlLabels||z().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:n,bbox:i,halfPadding:a}=await F(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);const s=n.insert("rect",":first-child");return s.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+t.padding).attr("height",i.height+t.padding),B(t,s),t.intersect=function(l){return C.rect(t,l)},n},"note"),Sr=Lr,zt=d(e=>e?" "+e:"","formatClass"),K=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];L.info("Question main (Circle)");const o=G(r,s,s,l);return o.attr("style",t.style),B(t,o),t.intersect=function(f){return L.warn("Intersect called"),C.polygon(t,l,f)},r},"question"),vr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(s){return C.circle(t,14,s)},r},"choice"),Er=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=4,a=n.height+t.padding,s=a/i,l=n.width+2*s+t.padding,o=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"hexagon"),_r=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,void 0,!0),i=2,a=n.height+2*t.padding,s=a/i,l=n.width+2*s+t.padding,o=pr(t.directions,n,t),f=G(r,l,a,o);return f.attr("style",t.style),B(t,f),t.intersect=function(h){return C.polygon(t,o,h)},r},"block_arrow"),kr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return G(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_left_inv_arrow"),Dr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_right"),Nr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"lean_left"),Tr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"trapezoid"),Cr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"inv_trapezoid"),Br=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"rect_right_inv_arrow"),Ir=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=i/2,s=a/(2.5+i/50),l=n.height+s+t.padding,o="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,f=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return B(t,f),t.intersect=function(h){const y=C.rect(t,h),b=y.x-t.x;if(a!=0&&(Math.abs(b)t.height/2-s)){let m=s*s*(1-b*b/(a*a));m!=0&&(m=Math.sqrt(m)),m=s-m,h.y-t.y>0&&(m=-m),y.y+=m}return y},r},"cylinder"),Or=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"rect"),Rr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:n.width+t.padding,l=t.positioned?t.height:n.height+t.padding,o=t.positioned?-s/2:-n.width/2-i,f=t.positioned?-l/2:-n.height/2-i;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",o).attr("y",f).attr("width",s).attr("height",l),t.props){const h=new Set(Object.keys(t.props));t.props.borders&&(ht(a,t.props.borders,s,l),h.delete("borders")),h.forEach(y=>{L.warn(`Unknown node property ${y}`)})}return B(t,a),t.intersect=function(h){return C.rect(t,h)},r},"composite"),zr=d(async(e,t)=>{const{shapeSvg:r}=await F(e,t,"label",!0);L.trace("Classes = ",t.class);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),t.props){const s=new Set(Object.keys(t.props));t.props.borders&&(ht(n,t.props.borders,i,a),s.delete("borders")),s.forEach(l=>{L.warn(`Unknown node property ${l}`)})}return B(t,n),t.intersect=function(s){return C.rect(t,s)},r},"labelRect");function ht(e,t,r,n){const i=[],a=d(l=>{i.push(l,0)},"addBorder"),s=d(l=>{i.push(0,l)},"skipBorder");t.includes("t")?(L.debug("add top border"),a(r)):s(r),t.includes("r")?(L.debug("add right border"),a(n)):s(n),t.includes("b")?(L.debug("add bottom border"),a(r)):s(r),t.includes("l")?(L.debug("add left border"),a(n)):s(n),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var Ar=d((e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";const n=e.insert("g").attr("class",r).attr("id",t.domId||t.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText;let o="";typeof l=="object"?o=l[0]:o=l,L.info("Label text abc79",o,l,typeof l=="object");const f=s.node().appendChild(j(o,t.labelStyle,!0,!0));let h={width:0,height:0};if(Z(z().flowchart.htmlLabels)){const D=f.children[0],v=R(f);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}L.info("Text 2",l);const y=l.slice(1,l.length);let b=f.getBBox();const m=s.node().appendChild(j(y.join?y.join("
"):y,t.labelStyle,!0,!0));if(Z(z().flowchart.htmlLabels)){const D=m.children[0],v=R(m);h=D.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}const E=t.padding/2;return R(m).attr("transform","translate( "+(h.width>b.width?0:(b.width-h.width)/2)+", "+(b.height+E+5)+")"),R(f).attr("transform","translate( "+(h.width{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.height+t.padding,a=n.width+i/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return B(t,s),t.intersect=function(l){return C.rect(t,l)},r},"stadium"),Fr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("Circle main"),B(t,a),t.intersect=function(s){return L.info("Circle intersect",t,n.width/2+i,s),C.circle(t,n.width/2+i,s)},r},"circle"),Wr=d(async(e,t)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=await F(e,t,K(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),o=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i+a).attr("width",n.width+t.padding+a*2).attr("height",n.height+t.padding+a*2),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),L.info("DoubleCircle main"),B(t,l),t.intersect=function(f){return L.info("DoubleCircle intersect",t,n.width/2+i+a,f),C.circle(t,n.width/2+i+a,f)},r},"doublecircle"),Pr=d(async(e,t)=>{const{shapeSvg:r,bbox:n}=await F(e,t,K(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=G(r,i,a,s);return l.attr("style",t.style),B(t,l),t.intersect=function(o){return C.polygon(t,s,o)},r},"subroutine"),Yr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),B(t,n),t.intersect=function(i){return C.circle(t,7,i)},r},"start"),Mt=d((e,t,r)=>{const n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return B(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return C.rect(t,l)},n},"forkJoin"),Hr=d((e,t)=>{const r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),B(t,i),t.intersect=function(a){return C.circle(t,7,a)},r},"end"),Kr=d((e,t)=>{var S;const r=t.padding/2,n=4,i=8;let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),o=s.insert("line"),f=s.insert("line");let h=0,y=n;const b=s.insert("g").attr("class","label");let m=0;const E=(S=t.classData.annotations)==null?void 0:S[0],D=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",v=b.node().appendChild(j(D,t.labelStyle,!0,!0));let T=v.getBBox();if(Z(z().flowchart.htmlLabels)){const c=v.children[0],_=R(v);T=c.getBoundingClientRect(),_.attr("width",T.width),_.attr("height",T.height)}t.classData.annotations[0]&&(y+=T.height+n,h+=T.width);let k=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(z().flowchart.htmlLabels?k+="<"+t.classData.type+">":k+="<"+t.classData.type+">");const N=b.node().appendChild(j(k,t.labelStyle,!0,!0));R(N).attr("class","classTitle");let x=N.getBBox();if(Z(z().flowchart.htmlLabels)){const c=N.children[0],_=R(N);x=c.getBoundingClientRect(),_.attr("width",x.width),_.attr("height",x.height)}y+=x.height+n,x.width>h&&(h=x.width);const g=[];t.classData.members.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,g.push(A)}),y+=i;const u=[];if(t.classData.methods.forEach(c=>{const _=c.getDisplayDetails();let p=_.displayText;z().flowchart.htmlLabels&&(p=p.replace(//g,">"));const A=b.node().appendChild(j(p,_.cssStyle?_.cssStyle:t.labelStyle,!0,!0));let O=A.getBBox();if(Z(z().flowchart.htmlLabels)){const X=A.children[0],W=R(A);O=X.getBoundingClientRect(),W.attr("width",O.width),W.attr("height",O.height)}O.width>h&&(h=O.width),y+=O.height+n,u.push(A)}),y+=i,E){let c=(h-T.width)/2;R(v).attr("transform","translate( "+(-1*h/2+c)+", "+-1*y/2+")"),m=T.height+n}let w=(h-x.width)/2;return R(N).attr("transform","translate( "+(-1*h/2+w)+", "+(-1*y/2+m)+")"),m+=x.height+n,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,g.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m+i/2)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),m+=i,f.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-y/2-r+i+m).attr("y2",-y/2-r+i+m),m+=i,u.forEach(c=>{R(c).attr("transform","translate( "+-h/2+", "+(-1*y/2+m)+")");const _=c==null?void 0:c.getBBox();m+=((_==null?void 0:_.height)??0)+n}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(y/2)-r).attr("width",h+t.padding).attr("height",y+t.padding),B(t,l),t.intersect=function(c){return C.rect(t,c)},s},"class_box"),Ft={rhombus:At,composite:Rr,question:At,rect:Or,labelRect:zr,rectWithTitle:Ar,choice:vr,circle:Fr,doublecircle:Wr,stadium:Mr,hexagon:Er,block_arrow:_r,rect_left_inv_arrow:kr,lean_right:Dr,lean_left:Nr,trapezoid:Tr,inv_trapezoid:Cr,rect_right_inv_arrow:Br,cylinder:Ir,start:Yr,end:Hr,note:Sr,subroutine:Pr,fork:Mt,join:Mt,class_box:Kr},lt={},re=d(async(e,t,r)=>{let n,i;if(t.link){let a;z().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),i=await Ft[t.shape](n,t,r)}else i=await Ft[t.shape](e,t,r),n=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),lt[t.id]=n,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),n},"insertNode"),Xr=d(e=>{const t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode");function kt(e,t,r=!1){var b,m,E;const n=e;let i="default";(((b=n==null?void 0:n.classes)==null?void 0:b.length)||0)>0&&(i=((n==null?void 0:n.classes)??[]).join(" ")),i=i+" flowchart-label";let a=0,s="",l;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}const o=me((n==null?void 0:n.styles)??[]),f=n.label,h=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:o.labelStyle,shape:s,labelText:f,rx:a,ry:a,class:i,style:o.style,id:n.id,directions:n.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:n.type,padding:l??((E=(m=at())==null?void 0:m.block)==null?void 0:E.padding)??0}}d(kt,"getNodeFromBlock");async function ae(e,t,r){const n=kt(t,r,!1);if(n.type==="group")return;const i=at(),a=await re(e,n,{config:i}),s=a.node().getBBox(),l=r.getBlock(n.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}d(ae,"calculateBlockSize");async function se(e,t,r){const n=kt(t,r,!0);if(r.getBlock(n.id).type!=="space"){const a=at();await re(e,n,{config:a}),t.intersect=n==null?void 0:n.intersect,Xr(n)}}d(se,"insertBlockPositioned");async function dt(e,t,r,n){for(const i of t)await n(e,i,r),i.children&&await dt(e,i.children,r,n)}d(dt,"performOperations");async function ie(e,t,r){await dt(e,t,r,ae)}d(ie,"calculateBlockSizes");async function ne(e,t,r){await dt(e,t,r,se)}d(ne,"insertBlocks");async function le(e,t,r,n,i){const a=new Se({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(const s of t)if(s.start&&s.end){const l=n.getBlock(s.start),o=n.getBlock(s.end);if(l!=null&&l.size&&(o!=null&&o.size)){const f=l.size,h=o.size,y=[{x:f.x,y:f.y},{x:f.x+(h.x-f.x)/2,y:f.y+(h.y-f.y)/2},{x:h.x,y:h.y}];gr(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",a,i),s.label&&(await cr(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:y,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),or({...s,x:y[1].x,y:y[1].y},{originalPath:y}))}}}d(le,"insertEdges");var Ur=d(function(e,t){return t.db.getClasses()},"getClasses"),jr=d(async function(e,t,r,n){const{securityLevel:i,block:a}=at(),s=n.db;let l;i==="sandbox"&&(l=R("#i"+t));const o=i==="sandbox"?R(l.nodes()[0].contentDocument.body):R("body"),f=i==="sandbox"?o.select(`[id="${t}"]`):R(`[id="${t}"]`);ar(f,["point","circle","cross"],n.type,t);const y=s.getBlocks(),b=s.getBlocksFlat(),m=s.getEdges(),E=f.insert("g").attr("class","block");await ie(E,y,s);const D=Gt(s);if(await ne(E,y,s),await le(E,m,b,s,t),D){const v=D,T=Math.max(1,Math.round(.125*(v.width/v.height))),k=v.height+T+10,N=v.width+10,{useMaxWidth:x}=a;de(f,k,N,!!x),L.debug("Here Bounds",D,v),f.attr("viewBox",`${v.x-5} ${v.y-5} ${v.width+10} ${v.height+10}`)}},"draw"),Vr={draw:jr,getClasses:Ur},$r={parser:Ee,db:Ke,renderer:Vr,styles:Ue};export{$r as diagram}; diff --git a/static/js/md-c4Diagram-6F5ED5ID-BkN2tJBP.js b/static/js/md-c4Diagram-6F5ED5ID-CoV4OzqF.js similarity index 76% rename from static/js/md-c4Diagram-6F5ED5ID-BkN2tJBP.js rename to static/js/md-c4Diagram-6F5ED5ID-CoV4OzqF.js index 45b550641..c91e66938 100644 --- a/static/js/md-c4Diagram-6F5ED5ID-BkN2tJBP.js +++ b/static/js/md-c4Diagram-6F5ED5ID-CoV4OzqF.js @@ -1,9 +1,9 @@ -import{d as Se,g as De}from"./md-chunk-ASOPGD6M-BaPEXM9M.js";import{_ as g,a as Pe,s as Be,g as Ie,b as Me,c as Le,d as Bt,w as Ne,e as $t,f as de,h as Tt,i as ge,j as jt,l as fe,k as Ye,m as je}from"./md-index-BVqvVggs.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],n=[1,28],r=[1,63],i=[1,64],a=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],nt=[1,44],at=[1,45],it=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:n,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:i,37:a,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:i,37:a,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:n}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:n,34:r,36:i,37:a,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:nt,60:at,61:it,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +import{g as Se,d as De}from"./md-chunk-ASOPGD6M-D4uVhftc.js";import{_ as g,s as Pe,g as Be,a as Ie,b as Me,c as Bt,d as jt,l as de,e as Le,f as Ne,h as Tt,i as ge,j as Ye,w as je,k as $t,m as fe}from"./md-index-B8Nim9kS.js";var Ft=function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],y=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:g(function(x,m,v,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;break;case 76:this.$="";break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Qt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(St,[2,19]),e(St,[2,20]),{25:[1,78]},{27:[1,79]},e(St,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:f,41:y,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:f,41:y,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(St,[2,21]),e(St,[2,22]),e(T,[2,39]),e(le,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Mt,[2,73]),{78:[1,133]},e(Mt,[2,75]),e(Mt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Qt,[2,18]),e(Ct,[2,38]),e(le,[2,72]),e(Mt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Ht,[2,25]),e(Ht,[2,26],{12:[1,138]}),e(Ht,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(kt.yy[Gt]=this.yy[Gt]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(he,"lex");for(var I,At,N,Jt,wt={},Nt,W,ue,Yt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=he()),N=Dt[At]&&Dt[At][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[At])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,kt.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[v[v.length-2]][v[v.length-1]],v.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+` `+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hm[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ae="",ie=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,n,r,i,a){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(n==null)u.descr={text:""};else if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]={text:y}}else u.descr={text:n};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.tags=i;if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]=y}else u.link=a;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,n,r){if(t===null||s===null)return;let i={};const a=V.find(u=>u.alias===t);if(a&&t===a.alias?i=a:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];i[u]={text:d}}else i.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];i[u]=d}else i.sprite=l;if(typeof n=="object"){let[u,d]=Object.entries(n)[0];i[u]=d}else i.tags=n;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];i[u]=d}else i.link=r;i.typeC4Shape={text:e},i.parentBoundary=B,i.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,V.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.techn={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof n=="object"){let[d,f]=Object.entries(n)[0];a[d]=f}else a.sprite=n;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.wrap=mt(),a.typeC4Shape={text:e},a.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,V.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.techn={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof n=="object"){let[d,f]=Object.entries(n)[0];a[d]=f}else a.sprite=n;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.wrap=mt(),a.typeC4Shape={text:e},a.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let n={};const r=X.find(i=>i.alias===e);if(r&&e===r.alias?n=r:(n.alias=e,X.push(n)),t==null?n.label={text:""}:n.label={text:t},s==null)n.type={text:"system"};else if(typeof s=="object"){let[i,a]=Object.entries(s)[0];n[i]={text:a}}else n.type={text:s};if(typeof o=="object"){let[i,a]=Object.entries(o)[0];n[i]=a}else n.tags=o;if(typeof l=="object"){let[i,a]=Object.entries(l)[0];n[i]=a}else n.link=l;n.parentBoundary=B,n.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let n={};const r=X.find(i=>i.alias===e);if(r&&e===r.alias?n=r:(n.alias=e,X.push(n)),t==null?n.label={text:""}:n.label={text:t},s==null)n.type={text:"container"};else if(typeof s=="object"){let[i,a]=Object.entries(s)[0];n[i]={text:a}}else n.type={text:s};if(typeof o=="object"){let[i,a]=Object.entries(o)[0];n[i]=a}else n.tags=o;if(typeof l=="object"){let[i,a]=Object.entries(l)[0];n[i]=a}else n.link=l;n.parentBoundary=B,n.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,n,r,i){if(t===null||s===null)return;let a={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?a=u:(a.alias=t,X.push(a)),s==null?a.label={text:""}:a.label={text:s},o==null)a.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];a[d]={text:f}}else a.type={text:o};if(l==null)a.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];a[d]={text:f}}else a.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];a[d]=f}else a.tags=r;if(typeof i=="object"){let[d,f]=Object.entries(i)[0];a[d]=f}else a.link=i;a.nodeType=e,a.parentBoundary=B,a.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,n,r,i,a,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.shadowing=n;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.sprite=i;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.techn=a;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,n,r){const i=It.find(a=>a.from===t&&a.to===s);if(i!==void 0){if(o!=null)if(typeof o=="object"){let[a,u]=Object.entries(o)[0];i[a]=u}else i.textColor=o;if(l!=null)if(typeof l=="object"){let[a,u]=Object.entries(l)[0];i[a]=u}else i.lineColor=l;if(n!=null)if(typeof n=="object"){let[a,u]=Object.entries(n)[0];i[a]=parseInt(u)}else i.offsetX=parseInt(n);if(r!=null)if(typeof r=="object"){let[a,u]=Object.entries(r)[0];i[a]=parseInt(u)}else i.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const n=Object.values(t)[0];o=parseInt(n)}else o=parseInt(t);if(typeof s=="object"){const n=Object.values(s)[0];l=parseInt(n)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),n0=g(function(){return B},"getCurrentBoundaryParse"),a0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),i0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ae},"getTitle"),c0=g(function(e){ie=e},"setWrap"),mt=g(function(){return ie},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ae="",ie=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ae=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:i0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:n0,getParentBoundaryParse:a0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Be,getAccTitle:Ie,getAccDescription:Me,setAccDescription:Le,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return Se(e,t)},"drawRect"),me=g(function(e,t,s,o,l,n){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let i=n.startsWith("data:image/png;base64")?n:je(n);r.attr("xlink:href",i)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let n of t){let r=n.textColor?n.textColor:"#444444",i=n.lineColor?n.lineColor:"#444444",a=n.offsetX?parseInt(n.offsetX):0,u=n.offsetY?parseInt(n.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",n.startPoint.x),y.attr("y1",n.startPoint.y),y.attr("x2",n.endPoint.x),y.attr("y2",n.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",i),y.style("fill","none"),n.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",n.startPoint.x).replaceAll("starty",n.startPoint.y).replaceAll("controlx",n.startPoint.x+(n.endPoint.x-n.startPoint.x)/2-(n.endPoint.x-n.startPoint.x)/4).replaceAll("controly",n.startPoint.y+(n.endPoint.y-n.startPoint.y)/2).replaceAll("stopx",n.endPoint.x).replaceAll("stopy",n.endPoint.y)),n.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(n.type==="birel"||n.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(n.label.text,o,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+a,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+u,n.label.width,n.label.height,{fill:r},f),n.techn&&n.techn.text!==""&&(f=s.messageFont(),Q(s)("["+n.techn.text+"]",o,Math.min(n.startPoint.x,n.endPoint.x)+Math.abs(n.endPoint.x-n.startPoint.x)/2+a,Math.min(n.startPoint.y,n.endPoint.y)+Math.abs(n.endPoint.y-n.startPoint.y)/2+s.messageFontSize+5+u,Math.max(n.label.width,n.techn.width),n.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",n=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",i={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(i={"stroke-width":1});let a={x:t.x,y:t.y,fill:l,stroke:n,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:i};re(o,a);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],n=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const i=e.append("g");i.attr("class","person-man");const a=De();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":a.x=t.x,a.y=t.y,a.fill=o,a.width=t.width,a.height=t.height,a.stroke=l,a.rx=2.5,a.ry=2.5,a.attrs={"stroke-width":.5},re(i,a);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":i.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),i.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":i.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),i.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(i.append("text").attr("fill",n).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(i,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=n,Q(s)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:n},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=n,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,i,t.x,t.y+t.techn.Y,t.width,t.height,{fill:n,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:n,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=n,Q(s)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:n},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,n,r,i,a,u,d){const f=n.append("text").attr("x",r+a/2).attr("y",i+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,n,r,i,a,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ne(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ne=g(function(e){Pe(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=Ne(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=de(t[e].text,o);else{let n=t[e].text.split($t.lineBreakRegex);t[e].textLines=n.length;let r=0;t[e].height=0,t[e].width=0;for(const i of n)t[e].width=Math.max(Tt(i,o),t[e].width),r=de(i,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let n=Tt(t.label.text,l);j("label",t,o,l,n),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const n of o){l=0;const r=s[n];let i=Pt(_,r.typeC4Shape.text);switch(i.fontSize=i.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",i),r.typeC4Shape.height=i.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let a=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,a,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,a,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,a,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,a,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,n=t.y,r=s+e.width/2,i=o+e.height/2,a=Math.abs(s-l),u=Math.abs(o-n),d=u/a,f=e.height/e.width,y=null;return o==n&&sl?y=new Y(s,i):s==l&&on&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,i+d*e.width/2):y=new Y(r-a/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,i+d*e.width/2):y=new Y(r+a/u*e.height/2,o+e.height):sn?f>=d?y=new Y(s+e.width,i-d*e.width/2):y=new Y(r+e.height/2*a/u,o):s>l&&o>n&&(f>=d?y=new Y(s,i-e.width/2*d):y=new Y(r-e.height/2*a/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let n of t){l=l+1;let r=n.wrap&&_.wrap,i=T0(_);o.db.getC4Type()==="C4Dynamic"&&(n.label.text=l+": "+n.label.text);let u=Tt(n.label.text,i);j("label",n,r,i,u),n.techn&&n.techn.text!==""&&(u=Tt(n.techn.text,i),j("techn",n,r,i,u)),n.descr&&n.descr.text!==""&&(u=Tt(n.descr.text,i),j("descr",n,r,i,u));let d=s(n.from),f=s(n.to),y=O0(d,f);n.startPoint=y.startPoint,n.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let n=new Ee(l);n.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,i]of o.entries()){let a=0;i.image={width:0,height:0,Y:0},i.sprite&&(i.image.width=48,i.image.height=48,i.image.Y=a,a=i.image.Y+i.image.height);let u=i.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",i,u,d,n.data.widthLimit),i.label.Y=a+8,a=i.label.Y+i.label.height,i.type&&i.type.text!==""){i.type.text="["+i.type.text+"]";let O=Ut(_);j("type",i,u,O,n.data.widthLimit),i.type.Y=a+5,a=i.type.Y+i.type.height}if(i.descr&&i.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",i,u,O,n.data.widthLimit),i.descr.Y=a+20,a=i.descr.Y+i.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+a;n.setData(O,O,S,S)}else{let O=n.data.stopx!==n.data.startx?n.data.stopx+_.diagramMarginX:n.data.startx,S=n.data.starty;n.setData(O,O,S,S)}n.name=i.alias;let f=l.db.getC4ShapeArray(i.alias),y=l.db.getC4ShapeKeys(i.alias);y.length>0&&Ae(n,e,f,y),t=i.alias;let E=l.db.getBoundarys(t);E.length>0&&se(e,t,n,E,l),i.alias!=="global"&&ke(e,i,n),s.data.stopy=Math.max(n.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(n.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let n;l==="sandbox"&&(n=jt("#i"+t));const r=l==="sandbox"?jt(n.nodes()[0].contentDocument.body):jt("body");let i=o.db;o.db.setWrap(_.wrap),ve=i.getC4ShapeInRow(),ee=i.getC4BoundaryInRow(),fe.debug(`C:${JSON.stringify(_,null,2)}`);const a=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(a),z.insertDatabaseIcon(a),z.insertClockIcon(a);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundarys("");se(a,"",u,f,o),z.insertArrowHead(a),z.insertArrowEnd(a),z.insertArrowCrossHead(a),z.insertArrowFilledHead(a),R0(a,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&a.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Ye(a,O,P,_.useMaxWidth);const M=d?60:0;a.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),fe.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ne,draw:S0},D0=g(e=>`.person { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t}();qt.lexer=Ce;function Lt(){this.yy={}}return g(Lt,"Parser"),Lt.prototype=qt,qt.Parser=Lt,new Lt}();Ft.parser=Ft;var Ue=Ft,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],It=[],ie="",ne=!1,Vt=4,zt=2,be,Fe=g(function(){return be},"getC4Type"),Ve=g(function(e){be=ge(e,Bt())},"setC4Type"),ze=g(function(e,t,s,o,l,a,r,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=It.find(f=>f.from===t&&f.to===s);if(d?u=d:It.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[f,y]=Object.entries(l)[0];u[f]={text:y}}else u.techn={text:l};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[f,y]=Object.entries(a)[0];u[f]={text:y}}else u.descr={text:a};if(typeof r=="object"){let[f,y]=Object.entries(r)[0];u[f]=y}else u.sprite=r;if(typeof n=="object"){let[f,y]=Object.entries(n)[0];u[f]=y}else u.tags=n;if(typeof i=="object"){let[f,y]=Object.entries(i)[0];u[f]=y}else u.link=i;u.wrap=mt()},"addRel"),Xe=g(function(e,t,s,o,l,a,r){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.tags=a;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.link=r;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),We=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Qe=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];i[d]=f}else i.sprite=a;if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),He=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),Ge=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,f]=Object.entries(o)[0];i[d]={text:f}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,f]=Object.entries(l)[0];i[d]={text:f}}else i.descr={text:l};if(typeof r=="object"){let[d,f]=Object.entries(r)[0];i[d]=f}else i.tags=r;if(typeof n=="object"){let[d,f]=Object.entries(n)[0];i[d]=f}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),Ke=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Je=g(function(e,t,s,o,l,a,r,n,i,u,d){let f=V.find(y=>y.alias===t);if(!(f===void 0&&(f=X.find(y=>y.alias===t),f===void 0))){if(s!=null)if(typeof s=="object"){let[y,E]=Object.entries(s)[0];f[y]=E}else f.bgColor=s;if(o!=null)if(typeof o=="object"){let[y,E]=Object.entries(o)[0];f[y]=E}else f.fontColor=o;if(l!=null)if(typeof l=="object"){let[y,E]=Object.entries(l)[0];f[y]=E}else f.borderColor=l;if(a!=null)if(typeof a=="object"){let[y,E]=Object.entries(a)[0];f[y]=E}else f.shadowing=a;if(r!=null)if(typeof r=="object"){let[y,E]=Object.entries(r)[0];f[y]=E}else f.shape=r;if(n!=null)if(typeof n=="object"){let[y,E]=Object.entries(n)[0];f[y]=E}else f.sprite=n;if(i!=null)if(typeof i=="object"){let[y,E]=Object.entries(i)[0];f[y]=E}else f.techn=i;if(u!=null)if(typeof u=="object"){let[y,E]=Object.entries(u)[0];f[y]=E}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[y,E]=Object.entries(d)[0];f[y]=E}else f.legendSprite=d}},"updateElStyle"),Ze=g(function(e,t,s,o,l,a,r){const n=It.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(a);if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(r)}},"updateRelStyle"),$e=g(function(e,t,s){let o=Vt,l=zt;if(typeof t=="object"){const a=Object.values(t)[0];o=parseInt(a)}else o=parseInt(t);if(typeof s=="object"){const a=Object.values(s)[0];l=parseInt(a)}else l=parseInt(s);o>=1&&(Vt=o),l>=1&&(zt=l)},"updateLayoutConfig"),t0=g(function(){return Vt},"getC4ShapeInRow"),e0=g(function(){return zt},"getC4BoundaryInRow"),a0=g(function(){return B},"getCurrentBoundaryParse"),i0=g(function(){return F},"getParentBoundaryParse"),_e=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),n0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),r0=g(function(e){return Object.keys(_e(e))},"getC4ShapeKeys"),xe=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),s0=xe,l0=g(function(){return It},"getRels"),o0=g(function(){return ie},"getTitle"),c0=g(function(e){ne=e},"setWrap"),mt=g(function(){return ne},"autoWrap"),h0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],It=[],xt=[""],ie="",ne=!1,Vt=4,zt=2},"clear"),u0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},d0={FILLED:0,OPEN:1},f0={LEFTOF:0,RIGHTOF:1,OVER:2},p0=g(function(e){ie=ge(e,Bt())},"setTitle"),te={addPersonOrSystem:Xe,addPersonOrSystemBoundary:He,addContainer:We,addContainerBoundary:qe,addComponent:Qe,addDeploymentNode:Ge,popBoundaryParseStack:Ke,addRel:ze,updateElStyle:Je,updateRelStyle:Ze,updateLayoutConfig:$e,autoWrap:mt,setWrap:c0,getC4ShapeArray:_e,getC4Shape:n0,getC4ShapeKeys:r0,getBoundaries:xe,getBoundarys:s0,getCurrentBoundaryParse:a0,getParentBoundaryParse:i0,getRels:l0,getTitle:o0,getC4Type:Fe,getC4ShapeInRow:t0,getC4BoundaryInRow:e0,setAccTitle:Me,getAccTitle:Ie,getAccDescription:Be,setAccDescription:Pe,getConfig:g(()=>Bt().c4,"getConfig"),clear:h0,LINETYPE:u0,ARROWTYPE:d0,PLACEMENT:f0,setTitle:p0,setC4Type:Ve},re=g(function(e,t){return De(e,t)},"drawRect"),me=g(function(e,t,s,o,l,a){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let n=a.startsWith("data:image/png;base64")?a:Ye(a);r.attr("xlink:href",n)},"drawImage"),y0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",n=a.lineColor?a.lineColor:"#444444",i=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,d="";if(l===0){let y=o.append("line");y.attr("x1",a.startPoint.x),y.attr("y1",a.startPoint.y),y.attr("x2",a.endPoint.x),y.attr("y2",a.endPoint.y),y.attr("stroke-width","1"),y.attr("stroke",n),y.style("fill","none"),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let y=o.append("path");y.attr("fill","none").attr("stroke-width","1").attr("stroke",n).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&y.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&y.attr("marker-start","url("+d+"#arrowend)")}let f=s.messageFont();Q(s)(a.label.text,o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:r},f),a.techn&&a.techn.text!==""&&(f=s.messageFont(),Q(s)("["+a.techn.text+"]",o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},f))}},"drawRels"),g0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};re(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),b0=g(function(e,t,s){var f;let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=Se();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},re(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=w0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":me(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&((f=t.techn)==null?void 0:f.text)!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=a,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),_0=g(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),x0=g(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),m0=g(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=g(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),E0=g(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),k0=g(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),A0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),C0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),s.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),w0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=function(){function e(l,a,r,n,i,u,d){const f=a.append("text").attr("x",r+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(f,d)}g(e,"byText");function t(l,a,r,n,i,u,d,f){const{fontSize:y,fontFamily:E,fontWeight:O}=f,S=l.split($t.lineBreakRegex);for(let P=0;P=this.data.widthLimit||o>=this.data.widthLimit||this.nextData.cnt>ve)&&(s=this.nextData.startx+t.margin+_.nextLinePaddingX,l=this.nextData.stopy+t.margin*2,this.nextData.stopx=o=s+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=l+t.height,this.nextData.cnt=1),t.x=s,t.y=l,this.updateVal(this.data,"startx",s,Math.min),this.updateVal(this.data,"starty",l,Math.min),this.updateVal(this.data,"stopx",o,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",s,Math.min),this.updateVal(this.nextData,"starty",l,Math.min),this.updateVal(this.nextData,"stopx",o,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ae(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},g(Ot,"Bounds"),Ot),ae=g(function(e){Ne(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),Pt=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Ut=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),T0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=je(t[e].text,l,o),t[e].textLines=t[e].text.split($t.lineBreakRegex).length,t[e].width=l,t[e].height=fe(t[e].text,o);else{let a=t[e].text.split($t.lineBreakRegex);t[e].textLines=a.length;let r=0;t[e].height=0,t[e].width=0;for(const n of a)t[e].width=Math.max(Tt(n,o),t[e].width),r=fe(n,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ke=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Ut(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let a=Tt(t.label.text,l);j("label",t,o,l,a),z.drawBoundary(e,t,_)},"drawBoundary"),Ae=g(function(e,t,s,o){let l=0;for(const a of o){l=0;const r=s[a];let n=Pt(_,r.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",n),r.typeC4Shape.height=n.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let i=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=Pt(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,i,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=Pt(_,r.typeC4Shape.text);j("type",r,i,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=Pt(_,r.techn.text);j("techn",r,i,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let f=l,y=r.label.width;if(r.descr&&r.descr.text!==""){let E=Pt(_,r.typeC4Shape.text);j("descr",r,i,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,y=Math.max(r.label.width,r.descr.width),f=l-r.descr.textLines*5}y=y+_.c4ShapePadding,r.width=Math.max(r.width||_.width,y,_.width),r.height=Math.max(r.height||_.height,f,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Rt,Y=(Rt=class{constructor(t,s){this.x=t,this.y=s}},g(Rt,"Point"),Rt),pe=g(function(e,t){let s=e.x,o=e.y,l=t.x,a=t.y,r=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-a),d=u/i,f=e.height/e.width,y=null;return o==a&&sl?y=new Y(s,n):s==l&&oa&&(y=new Y(r,o)),s>l&&o=d?y=new Y(s,n+d*e.width/2):y=new Y(r-i/u*e.height/2,o+e.height):s=d?y=new Y(s+e.width,n+d*e.width/2):y=new Y(r+i/u*e.height/2,o+e.height):sa?f>=d?y=new Y(s+e.width,n-d*e.width/2):y=new Y(r+e.height/2*i/u,o):s>l&&o>a&&(f>=d?y=new Y(s,n-e.width/2*d):y=new Y(r-e.height/2*i/u,o)),y},"getIntersectPoint"),O0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=pe(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=pe(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),R0=g(function(e,t,s,o){let l=0;for(let a of t){l=l+1;let r=a.wrap&&_.wrap,n=T0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=l+": "+a.label.text);let u=Tt(a.label.text,n);j("label",a,r,n,u),a.techn&&a.techn.text!==""&&(u=Tt(a.techn.text,n),j("techn",a,r,n,u)),a.descr&&a.descr.text!==""&&(u=Tt(a.descr.text,n),j("descr",a,r,n,u));let d=s(a.from),f=s(a.to),y=O0(d,f);a.startPoint=y.startPoint,a.endPoint=y.endPoint}z.drawRels(e,t,_)},"drawRels");function se(e,t,s,o,l){let a=new Ee(l);a.data.widthLimit=s.data.widthLimit/Math.min(ee,o.length);for(let[r,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Ut(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,a.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Ut(_);j("type",n,u,O,a.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Ut(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,a.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(r==0||r%ee===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;a.setData(O,O,S,S)}else{let O=a.data.stopx!==a.data.startx?a.data.stopx+_.diagramMarginX:a.data.startx,S=a.data.starty;a.setData(O,O,S,S)}a.name=n.alias;let f=l.db.getC4ShapeArray(n.alias),y=l.db.getC4ShapeKeys(n.alias);y.length>0&&Ae(a,e,f,y),t=n.alias;let E=l.db.getBoundarys(t);E.length>0&&se(e,t,a,E,l),n.alias!=="global"&&ke(e,n,a),s.data.stopy=Math.max(a.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(a.data.stopx+_.c4ShapeMargin,s.data.stopx),Xt=Math.max(Xt,s.data.stopx),Wt=Math.max(Wt,s.data.stopy)}}g(se,"drawInsideBoundary");var S0=g(function(e,t,s,o){_=Bt().c4;const l=Bt().securityLevel;let a;l==="sandbox"&&(a=jt("#i"+t));const r=l==="sandbox"?jt(a.nodes()[0].contentDocument.body):jt("body");let n=o.db;o.db.setWrap(_.wrap),ve=n.getC4ShapeInRow(),ee=n.getC4BoundaryInRow(),de.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?r.select(`[id="${t}"]`):jt(`[id="${t}"]`);z.insertComputerIcon(i),z.insertDatabaseIcon(i),z.insertClockIcon(i);let u=new Ee(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Xt=_.diagramMarginX,Wt=_.diagramMarginY;const d=o.db.getTitle();let f=o.db.getBoundarys("");se(i,"",u,f,o),z.insertArrowHead(i),z.insertArrowEnd(i),z.insertArrowCrossHead(i),z.insertArrowFilledHead(i),R0(i,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Xt,u.data.stopy=Wt;const y=u.data;let O=y.stopy-y.starty+2*_.diagramMarginY;const P=y.stopx-y.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(y.stopx-y.startx)/2-4*_.diagramMarginX).attr("y",y.starty+_.diagramMarginY),Le(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",y.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),de.debug("models:",y)},"draw"),ye={drawPersonOrSystemArray:Ae,drawBoundary:ke,setConf:ae,draw:S0},D0=g(e=>`.person { stroke: ${e.personBorder}; fill: ${e.personBkg}; } diff --git a/static/js/md-channel-DmgS6gpL.js b/static/js/md-channel-DmgS6gpL.js deleted file mode 100644 index 3ad6c9c83..000000000 --- a/static/js/md-channel-DmgS6gpL.js +++ /dev/null @@ -1 +0,0 @@ -import{ao as r,ap as n}from"./md-index-BVqvVggs.js";const t=(a,o)=>r.lang.round(n.parse(a)[o]);export{t as c}; diff --git a/static/js/md-channel-vFpC5mtO.js b/static/js/md-channel-vFpC5mtO.js new file mode 100644 index 000000000..0e9f9e312 --- /dev/null +++ b/static/js/md-channel-vFpC5mtO.js @@ -0,0 +1 @@ +import{ao as r,ap as n}from"./md-index-B8Nim9kS.js";const t=(a,o)=>r.lang.round(n.parse(a)[o]);export{t as c}; diff --git a/static/js/md-chunk-5HRBRIJM-CXxgtuoQ.js b/static/js/md-chunk-5HRBRIJM-CXxgtuoQ.js deleted file mode 100644 index 106227a06..000000000 --- a/static/js/md-chunk-5HRBRIJM-CXxgtuoQ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as n,j as r,k as g,l as d}from"./md-index-BVqvVggs.js";var u=n((t,e)=>{let o;return e==="sandbox"&&(o=r("#i"+t)),(e==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${t}"]`)},"getDiagramElement"),b=n((t,e,o,i)=>{t.attr("class",o);const{width:a,height:s,x:h,y:x}=l(t,e);g(t,s,a,i);const c=w(h,x,a,s,e);t.attr("viewBox",c),d.debug(`viewBox configured: ${c} with padding: ${e}`)},"setupViewPortForSVG"),l=n((t,e)=>{var i;const o=((i=t.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+e*2,height:o.height+e*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=n((t,e,o,i,a)=>`${t-a} ${e-a} ${o} ${i}`,"createViewBox");export{u as g,b as s}; diff --git a/static/js/md-chunk-5HRBRIJM-Dc3xF8et.js b/static/js/md-chunk-5HRBRIJM-Dc3xF8et.js new file mode 100644 index 000000000..65bf16c46 --- /dev/null +++ b/static/js/md-chunk-5HRBRIJM-Dc3xF8et.js @@ -0,0 +1 @@ +import{_ as n,d as r,e as d,l as g}from"./md-index-B8Nim9kS.js";var u=n((e,t)=>{let o;return t==="sandbox"&&(o=r("#i"+e)),(t==="sandbox"?r(o.nodes()[0].contentDocument.body):r("body")).select(`[id="${e}"]`)},"getDiagramElement"),b=n((e,t,o,i)=>{e.attr("class",o);const{width:a,height:s,x:h,y:x}=l(e,t);d(e,s,a,i);const c=w(h,x,a,s,t);e.attr("viewBox",c),g.debug(`viewBox configured: ${c} with padding: ${t}`)},"setupViewPortForSVG"),l=n((e,t)=>{var i;const o=((i=e.node())==null?void 0:i.getBBox())||{width:0,height:0,x:0,y:0};return{width:o.width+t*2,height:o.height+t*2,x:o.x,y:o.y}},"calculateDimensionsWithPadding"),w=n((e,t,o,i,a)=>`${e-a} ${t-a} ${o} ${i}`,"createViewBox");export{u as g,b as s}; diff --git a/static/js/md-chunk-7U56Z5CX-B4xneTyT.js b/static/js/md-chunk-7U56Z5CX-jaDTStfP.js similarity index 94% rename from static/js/md-chunk-7U56Z5CX-B4xneTyT.js rename to static/js/md-chunk-7U56Z5CX-jaDTStfP.js index c5fa526c1..a80bbf462 100644 --- a/static/js/md-chunk-7U56Z5CX-B4xneTyT.js +++ b/static/js/md-chunk-7U56Z5CX-jaDTStfP.js @@ -1,9 +1,9 @@ -import{g as De,s as Ce}from"./md-chunk-5HRBRIJM-CXxgtuoQ.js";import{_ as r,e as z,d as x,g as xe,s as Ae,b as Le,c as Re,p as Ie,q as Oe,l as b,z as Ne,u as we,v as $e,R as Pe}from"./md-index-BVqvVggs.js";var Ot=function(){var t=r(function($,o,u,n){for(u=u||{},n=$.length;n--;u[$[n]]=o);return u},"o"),e=[1,2],c=[1,3],a=[1,4],d=[2,4],s=[1,9],p=[1,11],g=[1,16],l=[1,17],_=[1,18],v=[1,19],A=[1,32],B=[1,20],Y=[1,21],R=[1,22],f=[1,23],L=[1,24],I=[1,26],F=[1,27],V=[1,28],N=[1,29],w=[1,30],rt=[1,31],at=[1,34],nt=[1,35],lt=[1,36],ot=[1,37],J=[1,33],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],kt={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:r(function(o,u,n,y,T,i,q){var h=i.length-1;switch(T){case 3:return y.setRootDoc(i[h]),i[h];case 4:this.$=[];break;case 5:i[h]!="nl"&&(i[h-1].push(i[h]),this.$=i[h-1]);break;case 6:case 7:this.$=i[h];break;case 8:this.$="nl";break;case 12:this.$=i[h];break;case 13:const Q=i[h-1];Q.description=y.trimColon(i[h]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[h-2],state2:i[h]};break;case 15:const Dt=y.trimColon(i[h]);this.$={stmt:"relation",state1:i[h-3],state2:i[h-1],description:Dt};break;case 19:this.$={stmt:"state",id:i[h-3],type:"default",description:"",doc:i[h-1]};break;case 20:var M=i[h],W=i[h-2].trim();if(i[h].match(":")){var ht=i[h].split(":");M=ht[0],W=[W,ht[1]]}this.$={stmt:"state",id:M,type:"default",description:W};break;case 21:this.$={stmt:"state",id:i[h-3],type:"default",description:i[h-5],doc:i[h-1]};break;case 22:this.$={stmt:"state",id:i[h],type:"fork"};break;case 23:this.$={stmt:"state",id:i[h],type:"join"};break;case 24:this.$={stmt:"state",id:i[h],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[h-1].trim(),note:{position:i[h-2].trim(),text:i[h].trim()}};break;case 29:this.$=i[h].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[h].trim(),y.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:i[h-1].trim(),classes:i[h].trim()};break;case 34:this.$={stmt:"style",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 35:this.$={stmt:"applyClass",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 36:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:i[h].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:c,6:a},{1:[3]},{3:5,4:e,5:c,6:a},{3:6,4:e,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,39],15:[1,40]}),t(S,[2,16]),{18:[1,41]},t(S,[2,18],{20:[1,42]}),{23:[1,43]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(S,[2,28]),{34:[1,48]},{36:[1,49]},t(S,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(ct,[2,42],{55:[1,54]}),t(ct,[2,43],{55:[1,55]}),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(S,[2,39]),t(S,[2,6]),t(S,[2,13]),{13:56,24:A,54:J},t(S,[2,17]),t(Vt,d,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(S,[2,29]),t(S,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(S,[2,14],{14:[1,67]}),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,68],22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(S,[2,32]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(ct,[2,44]),t(ct,[2,45]),t(S,[2,15]),t(S,[2,19]),t(Vt,d,{7:72}),t(S,[2,26]),t(S,[2,27]),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,73],22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:r(function(o,u){if(u.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=u,n}},"parseError"),parse:r(function(o){var u=this,n=[0],y=[],T=[null],i=[],q=this.table,h="",M=0,W=0,ht=2,Q=1,Dt=i.slice.call(arguments,1),E=Object.create(this.lexer),U={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(U.yy[Ct]=this.yy[Ct]);E.setInput(o,U.yy),U.yy.lexer=E,U.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var xt=E.yylloc;i.push(xt);var me=E.options&&E.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(D){n.length=n.length-2*D,T.length=T.length-D,i.length=i.length-D}r(ke,"popStack");function Mt(){var D;return D=y.pop()||E.lex()||Q,typeof D!="number"&&(D instanceof Array&&(y=D,D=y.pop()),D=u.symbols_[D]||D),D}r(Mt,"lex");for(var m,j,C,At,X={},dt,O,Ut,ft;;){if(j=n[n.length-1],this.defaultActions[j]?C=this.defaultActions[j]:((m===null||typeof m>"u")&&(m=Mt()),C=q[j]&&q[j][m]),typeof C>"u"||!C.length||!C[0]){var Lt="";ft=[];for(dt in q[j])this.terminals_[dt]&&dt>ht&&ft.push("'"+this.terminals_[dt]+"'");E.showPosition?Lt="Parse error on line "+(M+1)+`: +import{g as De,s as Ce}from"./md-chunk-5HRBRIJM-Dc3xF8et.js";import{_ as r,n as xe,o as Ae,s as Le,g as Re,b as Ie,a as Oe,l as b,c as x,r as Ne,u as we,k as H,v as $e,R as Pe}from"./md-index-B8Nim9kS.js";var Ot=function(){var t=r(function($,o,u,n){for(u=u||{},n=$.length;n--;u[$[n]]=o);return u},"o"),e=[1,2],c=[1,3],a=[1,4],d=[2,4],s=[1,9],p=[1,11],g=[1,16],l=[1,17],_=[1,18],v=[1,19],A=[1,32],B=[1,20],Y=[1,21],R=[1,22],f=[1,23],L=[1,24],I=[1,26],F=[1,27],V=[1,28],N=[1,29],w=[1,30],rt=[1,31],at=[1,34],nt=[1,35],lt=[1,36],ot=[1,37],J=[1,33],S=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],kt={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:r(function(o,u,n,y,T,i,q){var h=i.length-1;switch(T){case 3:return y.setRootDoc(i[h]),i[h];case 4:this.$=[];break;case 5:i[h]!="nl"&&(i[h-1].push(i[h]),this.$=i[h-1]);break;case 6:case 7:this.$=i[h];break;case 8:this.$="nl";break;case 12:this.$=i[h];break;case 13:const Q=i[h-1];Q.description=y.trimColon(i[h]),this.$=Q;break;case 14:this.$={stmt:"relation",state1:i[h-2],state2:i[h]};break;case 15:const Dt=y.trimColon(i[h]);this.$={stmt:"relation",state1:i[h-3],state2:i[h-1],description:Dt};break;case 19:this.$={stmt:"state",id:i[h-3],type:"default",description:"",doc:i[h-1]};break;case 20:var M=i[h],W=i[h-2].trim();if(i[h].match(":")){var ht=i[h].split(":");M=ht[0],W=[W,ht[1]]}this.$={stmt:"state",id:M,type:"default",description:W};break;case 21:this.$={stmt:"state",id:i[h-3],type:"default",description:i[h-5],doc:i[h-1]};break;case 22:this.$={stmt:"state",id:i[h],type:"fork"};break;case 23:this.$={stmt:"state",id:i[h],type:"join"};break;case 24:this.$={stmt:"state",id:i[h],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[h-1].trim(),note:{position:i[h-2].trim(),text:i[h].trim()}};break;case 29:this.$=i[h].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[h].trim(),y.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:i[h-1].trim(),classes:i[h].trim()};break;case 34:this.$={stmt:"style",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 35:this.$={stmt:"applyClass",id:i[h-1].trim(),styleClass:i[h].trim()};break;case 36:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:i[h].trim(),type:"default",description:""};break;case 44:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break;case 45:this.$={stmt:"state",id:i[h-2].trim(),classes:[i[h].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:c,6:a},{1:[3]},{3:5,4:e,5:c,6:a},{3:6,4:e,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],d,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:g,17:l,19:_,22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,7]),t(S,[2,8]),t(S,[2,9]),t(S,[2,10]),t(S,[2,11]),t(S,[2,12],{14:[1,39],15:[1,40]}),t(S,[2,16]),{18:[1,41]},t(S,[2,18],{20:[1,42]}),{23:[1,43]},t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(S,[2,28]),{34:[1,48]},{36:[1,49]},t(S,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(ct,[2,42],{55:[1,54]}),t(ct,[2,43],{55:[1,55]}),t(S,[2,36]),t(S,[2,37]),t(S,[2,38]),t(S,[2,39]),t(S,[2,6]),t(S,[2,13]),{13:56,24:A,54:J},t(S,[2,17]),t(Vt,d,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(S,[2,29]),t(S,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(S,[2,14],{14:[1,67]}),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,68],22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(S,[2,32]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(ct,[2,44]),t(ct,[2,45]),t(S,[2,15]),t(S,[2,19]),t(Vt,d,{7:72}),t(S,[2,26]),t(S,[2,27]),{4:s,5:p,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:l,19:_,21:[1,73],22:v,24:A,25:B,26:Y,27:R,28:f,29:L,32:25,33:I,35:F,37:V,38:N,42:w,45:rt,48:at,49:nt,50:lt,51:ot,54:J},t(S,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:r(function(o,u){if(u.recoverable)this.trace(o);else{var n=new Error(o);throw n.hash=u,n}},"parseError"),parse:r(function(o){var u=this,n=[0],y=[],T=[null],i=[],q=this.table,h="",M=0,W=0,ht=2,Q=1,Dt=i.slice.call(arguments,1),E=Object.create(this.lexer),U={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(U.yy[Ct]=this.yy[Ct]);E.setInput(o,U.yy),U.yy.lexer=E,U.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var xt=E.yylloc;i.push(xt);var me=E.options&&E.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(D){n.length=n.length-2*D,T.length=T.length-D,i.length=i.length-D}r(ke,"popStack");function Mt(){var D;return D=y.pop()||E.lex()||Q,typeof D!="number"&&(D instanceof Array&&(y=D,D=y.pop()),D=u.symbols_[D]||D),D}r(Mt,"lex");for(var m,j,C,At,X={},dt,O,Ut,ft;;){if(j=n[n.length-1],this.defaultActions[j]?C=this.defaultActions[j]:((m===null||typeof m>"u")&&(m=Mt()),C=q[j]&&q[j][m]),typeof C>"u"||!C.length||!C[0]){var Lt="";ft=[];for(dt in q[j])this.terminals_[dt]&&dt>ht&&ft.push("'"+this.terminals_[dt]+"'");E.showPosition?Lt="Parse error on line "+(M+1)+`: `+E.showPosition()+` Expecting `+ft.join(", ")+", got '"+(this.terminals_[m]||m)+"'":Lt="Parse error on line "+(M+1)+": Unexpected "+(m==Q?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(Lt,{text:E.match,token:this.terminals_[m]||m,line:E.yylineno,loc:xt,expected:ft})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+m);switch(C[0]){case 1:n.push(m),T.push(E.yytext),i.push(E.yylloc),n.push(C[1]),m=null,W=E.yyleng,h=E.yytext,M=E.yylineno,xt=E.yylloc;break;case 2:if(O=this.productions_[C[1]][1],X.$=T[T.length-O],X._$={first_line:i[i.length-(O||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(O||1)].first_column,last_column:i[i.length-1].last_column},me&&(X._$.range=[i[i.length-(O||1)].range[0],i[i.length-1].range[1]]),At=this.performAction.apply(X,[h,W,M,U.yy,C[1],T,i].concat(Dt)),typeof At<"u")return At;O&&(n=n.slice(0,-1*O*2),T=T.slice(0,-1*O),i=i.slice(0,-1*O)),n.push(this.productions_[C[1]][0]),T.push(X.$),i.push(X._$),Ut=q[n[n.length-2]][n[n.length-1]],n.push(Ut);break;case 3:return!0}}return!0},"parse")},be=function(){var $={EOF:1,parseError:r(function(u,n){if(this.yy.parser)this.yy.parser.parseError(u,n);else throw new Error(u)},"parseError"),setInput:r(function(o,u){return this.yy=u||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var u=o.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:r(function(o){var u=o.length,n=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===y.length?this.yylloc.first_column:0)+y[y.length-n.length].length-n[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(o){this.unput(this.match.slice(o))},"less"),pastInput:r(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var o=this.pastInput(),u=new Array(o.length+1).join("-");return o+this.upcomingInput()+` `+u+"^"},"showPosition"),test_match:r(function(o,u){var n,y,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),y=o[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],n=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var i in T)this[i]=T[i];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,u,n,y;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),i=0;iu[0].length)){if(u=n,y=i,this.options.backtrack_lexer){if(o=this.test_match(n,T[i]),o!==!1)return o;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(o=this.test_match(u,T[y]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var u=this.next();return u||this.lex()},"lex"),begin:r(function(u){this.conditionStack.push(u)},"begin"),popState:r(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:r(function(u){this.begin(u)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(u,n,y,T){switch(y){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return $}();kt.lexer=be;function ut(){this.yy={}}return r(ut,"Parser"),ut.prototype=kt,kt.Parser=ut,new ut}();Ot.parser=Ot;var As=Ot,Ge="LR",qt="TB",_t="state",wt="relation",Be="classDef",Ye="style",Fe="applyClass",st="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",se="text",ie="normal",Rt="rect",It="rectWithTitle",Ve="stateStart",Me="stateEnd",jt="divider",zt="roundedWithTitle",Ue="note",je="noteGroup",it="statediagram",ze="state",He=`${it}-${ze}`,re="transition",We="note",Xe="note-edge",Ke=`${re} ${Xe}`,Je=`${it}-${We}`,qe="cluster",Qe=`${it}-${qe}`,Ze="cluster-alt",ts=`${it}-${Ze}`,ae="parent",ne="note",es="state",$t="----",ss=`${$t}${ne}`,Ht=`${$t}${ae}`,le=r((t,e=qt)=>{if(!t.doc)return e;let c=e;for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir"),is=r(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),rs=r(async function(t,e,c,a){b.info("REF0:"),b.info("Drawing state diagram (v2)",e);const{securityLevel:d,state:s,layout:p}=x();a.db.extract(a.db.getRootDocV2());const g=a.db.getData(),l=De(e,d);g.type=a.type,g.layoutAlgorithm=p,g.nodeSpacing=(s==null?void 0:s.nodeSpacing)||50,g.rankSpacing=(s==null?void 0:s.rankSpacing)||50,g.markers=["barb"],g.diagramId=e,await Ne(g,l);const _=8;we.insertTitle(l,"statediagramTitleText",(s==null?void 0:s.titleTopMargin)??25,a.db.getDiagramTitle()),Ce(l,_,it,(s==null?void 0:s.useMaxWidth)??!0)},"draw"),Ls={getClasses:is,draw:rs,getDir:le},St=new Map,P=0;function yt(t="",e=0,c="",a=$t){const d=c!==null&&c.length>0?`${a}${c}`:"";return`${es}-${t}${d}-${e}`}r(yt,"stateDomId");var as=r((t,e,c,a,d,s,p,g)=>{b.trace("items",e),e.forEach(l=>{switch(l.stmt){case _t:tt(t,l,c,a,d,s,p,g);break;case st:tt(t,l,c,a,d,s,p,g);break;case wt:{tt(t,l.state1,c,a,d,s,p,g),tt(t,l.state2,c,a,d,s,p,g);const _={id:"edge"+P,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Zt,labelStyle:"",label:z.sanitizeText(l.description,x()),arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,classes:re,look:p};d.push(_),P++}break}})},"setupDoc"),Wt=r((t,e=qt)=>{let c=e;if(t.doc)for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir");function Z(t,e,c){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(d=>{if(c.get(d)){const s=c.get(d);e.cssCompiledStyles=[...e.cssCompiledStyles,...s.styles]}}));const a=t.find(d=>d.id===e.id);a?Object.assign(a,e):t.push(e)}r(Z,"insertOrUpdateNode");function oe(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}r(oe,"getClassesFromDbInfo");function ce(t){return(t==null?void 0:t.styles)??[]}r(ce,"getStylesFromDbInfo");var tt=r((t,e,c,a,d,s,p,g)=>{var B,Y;const l=e.id,_=c.get(l),v=oe(_),A=ce(_);if(b.info("dataFetcher parsedItem",e,_,A),l!=="root"){let R=Rt;e.start===!0?R=Ve:e.start===!1&&(R=Me),e.type!==st&&(R=e.type),St.get(l)||St.set(l,{id:l,shape:R,description:z.sanitizeText(l,x()),cssClasses:`${v} ${He}`,cssStyles:A});const f=St.get(l);e.description&&(Array.isArray(f.description)?(f.shape=It,f.description.push(e.description)):((B=f.description)==null?void 0:B.length)>0?(f.shape=It,f.description===l?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=Rt,f.description=e.description),f.description=z.sanitizeTextOrArray(f.description,x())),((Y=f.description)==null?void 0:Y.length)===1&&f.shape===It&&(f.type==="group"?f.shape=zt:f.shape=Rt),!f.type&&e.doc&&(b.info("Setting cluster for XCX",l,Wt(e)),f.type="group",f.isGroup=!0,f.dir=Wt(e),f.shape=e.type===Qt?jt:zt,f.cssClasses=`${f.cssClasses} ${Qe} ${s?ts:""}`);const L={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:l,dir:f.dir,domId:yt(l,P),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:p};if(L.shape===jt&&(L.label=""),t&&t.id!=="root"&&(b.trace("Setting node ",l," to be child of its parent ",t.id),L.parentId=t.id),L.centerLabel=!0,e.note){const I={labelStyle:"",shape:Ue,label:e.note.text,cssClasses:Je,cssStyles:[],cssCompilesStyles:[],id:l+ss+"-"+P,domId:yt(l,P,ne),type:f.type,isGroup:f.type==="group",padding:x().flowchart.padding,look:p,position:e.note.position},F=l+Ht,V={labelStyle:"",shape:je,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:l+Ht,domId:yt(l,P,ae),type:"group",isGroup:!0,padding:16,look:p,position:e.note.position};P++,V.id=F,I.parentId=F,Z(a,V,g),Z(a,I,g),Z(a,L,g);let N=l,w=I.id;e.note.position==="left of"&&(N=I.id,w=l),d.push({id:N+"-"+w,start:N,end:w,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Ke,arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,look:p})}else Z(a,L,g)}e.doc&&(b.trace("Adding nodes children "),as(e,e.doc,c,a,d,!s,p,g))},"dataFetcher"),ns=r(()=>{St.clear(),P=0},"reset"),Pt="[*]",ue="start",he=Pt,de="end",Xt="color",Kt="fill",ls="bgFill",os=",";function Gt(){return new Map}r(Gt,"newClassesList");var Tt=[],Bt=[],fe=Ge,Et=[],K=Gt(),pe=r(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),vt={root:pe()},k=vt.root,et=0,Jt=0,cs={LINE:0,DOTTED_LINE:1},us={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},pt=r(t=>JSON.parse(JSON.stringify(t)),"clone"),hs=r(t=>{b.info("Setting root doc",t),Et=t},"setRootDoc"),ds=r(()=>Et,"getRootDoc"),gt=r((t,e,c)=>{if(e.stmt===wt)gt(t,e.state1,!0),gt(t,e.state2,!1);else if(e.stmt===_t&&(e.id==="[*]"?(e.id=c?t.id+"_start":t.id+"_end",e.start=c):e.id=e.id.trim()),e.doc){const a=[];let d=[],s;for(s=0;s0&&d.length>0){const p={stmt:_t,id:Pe(),type:"divider",doc:pt(d)};a.push(pt(p)),e.doc=a}e.doc.forEach(p=>gt(e,p,!0))}},"docTranslator"),Yt=r(()=>(gt({id:"root"},{id:"root",doc:Et},!0),{id:"root",doc:Et}),"getRootDocV2"),fs=r(t=>{let e;t.doc?e=t.doc:e=t,b.info(e),Se(!0),b.info("Extract initial document:",e),e.forEach(s=>{switch(b.warn("Statement",s.stmt),s.stmt){case _t:G(s.id.trim(),s.type,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles);break;case wt:Ee(s.state1,s.state2,s.description);break;case Be:ve(s.id.trim(),s.classes);break;case Ye:{const p=s.id.trim().split(","),g=s.styleClass.split(",");p.forEach(l=>{let _=H(l);if(_===void 0){const v=l.trim();G(v),_=H(v)}_.styles=g.map(v=>{var A;return(A=v.replace(/;/g,""))==null?void 0:A.trim()})})}break;case Fe:Ft(s.id.trim(),s.styleClass);break}});const c=ye(),d=x().look;ns(),tt(void 0,Yt(),c,Tt,Bt,!0,d,K),Tt.forEach(s=>{if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+s.id+"]");s.label=s.label[0]}})},"extract"),G=r(function(t,e=st,c=null,a=null,d=null,s=null,p=null,g=null){const l=t==null?void 0:t.trim();if(k.states.has(l)?(k.states.get(l).doc||(k.states.get(l).doc=c),k.states.get(l).type||(k.states.get(l).type=e)):(b.info("Adding state ",l,a),k.states.set(l,{id:l,descriptions:[],type:e,doc:c,note:d,classes:[],styles:[],textStyles:[]})),a&&(b.info("Setting state description",l,a),typeof a=="string"&&Nt(l,a.trim()),typeof a=="object"&&a.forEach(_=>Nt(l,_.trim()))),d){const _=k.states.get(l);_.note=d,_.note.text=z.sanitizeText(_.note.text,x())}s&&(b.info("Setting state classes",l,s),(typeof s=="string"?[s]:s).forEach(v=>Ft(l,v.trim()))),p&&(b.info("Setting state styles",l,p),(typeof p=="string"?[p]:p).forEach(v=>Ts(l,v.trim()))),g&&(b.info("Setting state styles",l,p),(typeof g=="string"?[g]:g).forEach(v=>Es(l,v.trim())))},"addState"),Se=r(function(t){Tt=[],Bt=[],vt={root:pe()},k=vt.root,et=0,K=Gt(),t||$e()},"clear"),H=r(function(t){return k.states.get(t)},"getState"),ye=r(function(){return k.states},"getStates"),ps=r(function(){b.info("Documents = ",vt)},"logDocuments"),Ss=r(function(){return k.relations},"getRelations");function bt(t=""){let e=t;return t===Pt&&(et++,e=`${ue}${et}`),e}r(bt,"startIdIfNeeded");function mt(t="",e=st){return t===Pt?ue:e}r(mt,"startTypeIfNeeded");function ge(t=""){let e=t;return t===he&&(et++,e=`${de}${et}`),e}r(ge,"endIdIfNeeded");function _e(t="",e=st){return t===he?de:e}r(_e,"endTypeIfNeeded");function Te(t,e,c){let a=bt(t.id.trim()),d=mt(t.id.trim(),t.type),s=bt(e.id.trim()),p=mt(e.id.trim(),e.type);G(a,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),G(s,p,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:a,id2:s,relationTitle:z.sanitizeText(c,x())})}r(Te,"addRelationObjs");var Ee=r(function(t,e,c){if(typeof t=="object")Te(t,e,c);else{const a=bt(t.trim()),d=mt(t),s=ge(e.trim()),p=_e(e);G(a,d),G(s,p),k.relations.push({id1:a,id2:s,title:z.sanitizeText(c,x())})}},"addRelation"),Nt=r(function(t,e){const c=k.states.get(t),a=e.startsWith(":")?e.replace(":","").trim():e;c.descriptions.push(z.sanitizeText(a,x()))},"addDescription"),ys=r(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),gs=r(()=>(Jt++,"divider-id-"+Jt),"getDividerId"),ve=r(function(t,e=""){K.has(t)||K.set(t,{id:t,styles:[],textStyles:[]});const c=K.get(t);e!=null&&e.split(os).forEach(a=>{const d=a.replace(/([^;]*);/,"$1").trim();if(RegExp(Xt).exec(a)){const p=d.replace(Kt,ls).replace(Xt,Kt);c.textStyles.push(p)}c.styles.push(d)})},"addStyleClass"),_s=r(function(){return K},"getClasses"),Ft=r(function(t,e){t.split(",").forEach(function(c){let a=H(c);if(a===void 0){const d=c.trim();G(d),a=H(d)}a.classes.push(e)})},"setCssClass"),Ts=r(function(t,e){const c=H(t);c!==void 0&&c.styles.push(e)},"setStyle"),Es=r(function(t,e){const c=H(t);c!==void 0&&c.textStyles.push(e)},"setTextStyle"),vs=r(()=>fe,"getDirection"),bs=r(t=>{fe=t},"setDirection"),ms=r(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),ks=r(()=>{const t=x();return{nodes:Tt,edges:Bt,other:{},config:t,direction:le(Yt())}},"getData"),Rs={getConfig:r(()=>x().state,"getConfig"),getData:ks,addState:G,clear:Se,getState:H,getStates:ye,getRelations:Ss,getClasses:_s,getDirection:vs,addRelation:Ee,getDividerId:gs,setDirection:bs,cleanupLabel:ys,lineType:cs,relationType:us,logDocuments:ps,getRootDoc:ds,setRootDoc:hs,getRootDocV2:Yt,extract:fs,trimColon:ms,getAccTitle:xe,setAccTitle:Ae,getAccDescription:Le,setAccDescription:Re,addStyleClass:ve,setCssClass:Ft,addDescription:Nt,setDiagramTitle:Ie,getDiagramTitle:Oe},Ds=r(t=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var u=this.next();return u||this.lex()},"lex"),begin:r(function(u){this.conditionStack.push(u)},"begin"),popState:r(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:r(function(u){this.begin(u)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(u,n,y,T){switch(y){case 0:return 41;case 1:return 48;case 2:return 49;case 3:return 50;case 4:return 51;case 5:break;case 6:break;case 7:return 5;case 8:break;case 9:break;case 10:break;case 11:break;case 12:return this.pushState("SCALE"),17;case 13:return 18;case 14:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 20:this.popState();break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 32:return this.pushState("SCALE"),17;case 33:return 18;case 34:this.popState();break;case 35:this.pushState("STATE");break;case 36:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 42:return 48;case 43:return 49;case 44:return 50;case 45:return 51;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:return this.popState(),"ID";case 49:this.popState();break;case 50:return"STATE_DESCR";case 51:return 19;case 52:this.popState();break;case 53:return this.popState(),this.pushState("struct"),20;case 54:break;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return this.popState(),"ID";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 67:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return n.yytext=n.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return $}();kt.lexer=be;function ut(){this.yy={}}return r(ut,"Parser"),ut.prototype=kt,kt.Parser=ut,new ut}();Ot.parser=Ot;var As=Ot,Ge="LR",qt="TB",_t="state",wt="relation",Be="classDef",Ye="style",Fe="applyClass",st="default",Qt="divider",Zt="fill:none",te="fill: #333",ee="c",se="text",ie="normal",Rt="rect",It="rectWithTitle",Ve="stateStart",Me="stateEnd",jt="divider",Ht="roundedWithTitle",Ue="note",je="noteGroup",it="statediagram",He="state",ze=`${it}-${He}`,re="transition",We="note",Xe="note-edge",Ke=`${re} ${Xe}`,Je=`${it}-${We}`,qe="cluster",Qe=`${it}-${qe}`,Ze="cluster-alt",ts=`${it}-${Ze}`,ae="parent",ne="note",es="state",$t="----",ss=`${$t}${ne}`,zt=`${$t}${ae}`,le=r((t,e=qt)=>{if(!t.doc)return e;let c=e;for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir"),is=r(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),rs=r(async function(t,e,c,a){b.info("REF0:"),b.info("Drawing state diagram (v2)",e);const{securityLevel:d,state:s,layout:p}=x();a.db.extract(a.db.getRootDocV2());const g=a.db.getData(),l=De(e,d);g.type=a.type,g.layoutAlgorithm=p,g.nodeSpacing=(s==null?void 0:s.nodeSpacing)||50,g.rankSpacing=(s==null?void 0:s.rankSpacing)||50,g.markers=["barb"],g.diagramId=e,await Ne(g,l);const _=8;we.insertTitle(l,"statediagramTitleText",(s==null?void 0:s.titleTopMargin)??25,a.db.getDiagramTitle()),Ce(l,_,it,(s==null?void 0:s.useMaxWidth)??!0)},"draw"),Ls={getClasses:is,draw:rs,getDir:le},St=new Map,P=0;function yt(t="",e=0,c="",a=$t){const d=c!==null&&c.length>0?`${a}${c}`:"";return`${es}-${t}${d}-${e}`}r(yt,"stateDomId");var as=r((t,e,c,a,d,s,p,g)=>{b.trace("items",e),e.forEach(l=>{switch(l.stmt){case _t:tt(t,l,c,a,d,s,p,g);break;case st:tt(t,l,c,a,d,s,p,g);break;case wt:{tt(t,l.state1,c,a,d,s,p,g),tt(t,l.state2,c,a,d,s,p,g);const _={id:"edge"+P,start:l.state1.id,end:l.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Zt,labelStyle:"",label:H.sanitizeText(l.description,x()),arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,classes:re,look:p};d.push(_),P++}break}})},"setupDoc"),Wt=r((t,e=qt)=>{let c=e;if(t.doc)for(const a of t.doc)a.stmt==="dir"&&(c=a.value);return c},"getDir");function Z(t,e,c){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(d=>{if(c.get(d)){const s=c.get(d);e.cssCompiledStyles=[...e.cssCompiledStyles,...s.styles]}}));const a=t.find(d=>d.id===e.id);a?Object.assign(a,e):t.push(e)}r(Z,"insertOrUpdateNode");function oe(t){var e;return((e=t==null?void 0:t.classes)==null?void 0:e.join(" "))??""}r(oe,"getClassesFromDbInfo");function ce(t){return(t==null?void 0:t.styles)??[]}r(ce,"getStylesFromDbInfo");var tt=r((t,e,c,a,d,s,p,g)=>{var B,Y;const l=e.id,_=c.get(l),v=oe(_),A=ce(_);if(b.info("dataFetcher parsedItem",e,_,A),l!=="root"){let R=Rt;e.start===!0?R=Ve:e.start===!1&&(R=Me),e.type!==st&&(R=e.type),St.get(l)||St.set(l,{id:l,shape:R,description:H.sanitizeText(l,x()),cssClasses:`${v} ${ze}`,cssStyles:A});const f=St.get(l);e.description&&(Array.isArray(f.description)?(f.shape=It,f.description.push(e.description)):((B=f.description)==null?void 0:B.length)>0?(f.shape=It,f.description===l?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=Rt,f.description=e.description),f.description=H.sanitizeTextOrArray(f.description,x())),((Y=f.description)==null?void 0:Y.length)===1&&f.shape===It&&(f.type==="group"?f.shape=Ht:f.shape=Rt),!f.type&&e.doc&&(b.info("Setting cluster for XCX",l,Wt(e)),f.type="group",f.isGroup=!0,f.dir=Wt(e),f.shape=e.type===Qt?jt:Ht,f.cssClasses=`${f.cssClasses} ${Qe} ${s?ts:""}`);const L={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:l,dir:f.dir,domId:yt(l,P),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:p};if(L.shape===jt&&(L.label=""),t&&t.id!=="root"&&(b.trace("Setting node ",l," to be child of its parent ",t.id),L.parentId=t.id),L.centerLabel=!0,e.note){const I={labelStyle:"",shape:Ue,label:e.note.text,cssClasses:Je,cssStyles:[],cssCompilesStyles:[],id:l+ss+"-"+P,domId:yt(l,P,ne),type:f.type,isGroup:f.type==="group",padding:x().flowchart.padding,look:p,position:e.note.position},F=l+zt,V={labelStyle:"",shape:je,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:l+zt,domId:yt(l,P,ae),type:"group",isGroup:!0,padding:16,look:p,position:e.note.position};P++,V.id=F,I.parentId=F,Z(a,V,g),Z(a,I,g),Z(a,L,g);let N=l,w=I.id;e.note.position==="left of"&&(N=I.id,w=l),d.push({id:N+"-"+w,start:N,end:w,arrowhead:"none",arrowTypeEnd:"",style:Zt,labelStyle:"",classes:Ke,arrowheadStyle:te,labelpos:ee,labelType:se,thickness:ie,look:p})}else Z(a,L,g)}e.doc&&(b.trace("Adding nodes children "),as(e,e.doc,c,a,d,!s,p,g))},"dataFetcher"),ns=r(()=>{St.clear(),P=0},"reset"),Pt="[*]",ue="start",he=Pt,de="end",Xt="color",Kt="fill",ls="bgFill",os=",";function Gt(){return new Map}r(Gt,"newClassesList");var Tt=[],Bt=[],fe=Ge,Et=[],K=Gt(),pe=r(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),vt={root:pe()},k=vt.root,et=0,Jt=0,cs={LINE:0,DOTTED_LINE:1},us={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},pt=r(t=>JSON.parse(JSON.stringify(t)),"clone"),hs=r(t=>{b.info("Setting root doc",t),Et=t},"setRootDoc"),ds=r(()=>Et,"getRootDoc"),gt=r((t,e,c)=>{if(e.stmt===wt)gt(t,e.state1,!0),gt(t,e.state2,!1);else if(e.stmt===_t&&(e.id==="[*]"?(e.id=c?t.id+"_start":t.id+"_end",e.start=c):e.id=e.id.trim()),e.doc){const a=[];let d=[],s;for(s=0;s0&&d.length>0){const p={stmt:_t,id:Pe(),type:"divider",doc:pt(d)};a.push(pt(p)),e.doc=a}e.doc.forEach(p=>gt(e,p,!0))}},"docTranslator"),Yt=r(()=>(gt({id:"root"},{id:"root",doc:Et},!0),{id:"root",doc:Et}),"getRootDocV2"),fs=r(t=>{let e;t.doc?e=t.doc:e=t,b.info(e),Se(!0),b.info("Extract initial document:",e),e.forEach(s=>{switch(b.warn("Statement",s.stmt),s.stmt){case _t:G(s.id.trim(),s.type,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles);break;case wt:Ee(s.state1,s.state2,s.description);break;case Be:ve(s.id.trim(),s.classes);break;case Ye:{const p=s.id.trim().split(","),g=s.styleClass.split(",");p.forEach(l=>{let _=z(l);if(_===void 0){const v=l.trim();G(v),_=z(v)}_.styles=g.map(v=>{var A;return(A=v.replace(/;/g,""))==null?void 0:A.trim()})})}break;case Fe:Ft(s.id.trim(),s.styleClass);break}});const c=ye(),d=x().look;ns(),tt(void 0,Yt(),c,Tt,Bt,!0,d,K),Tt.forEach(s=>{if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+s.id+"]");s.label=s.label[0]}})},"extract"),G=r(function(t,e=st,c=null,a=null,d=null,s=null,p=null,g=null){const l=t==null?void 0:t.trim();if(k.states.has(l)?(k.states.get(l).doc||(k.states.get(l).doc=c),k.states.get(l).type||(k.states.get(l).type=e)):(b.info("Adding state ",l,a),k.states.set(l,{id:l,descriptions:[],type:e,doc:c,note:d,classes:[],styles:[],textStyles:[]})),a&&(b.info("Setting state description",l,a),typeof a=="string"&&Nt(l,a.trim()),typeof a=="object"&&a.forEach(_=>Nt(l,_.trim()))),d){const _=k.states.get(l);_.note=d,_.note.text=H.sanitizeText(_.note.text,x())}s&&(b.info("Setting state classes",l,s),(typeof s=="string"?[s]:s).forEach(v=>Ft(l,v.trim()))),p&&(b.info("Setting state styles",l,p),(typeof p=="string"?[p]:p).forEach(v=>Ts(l,v.trim()))),g&&(b.info("Setting state styles",l,p),(typeof g=="string"?[g]:g).forEach(v=>Es(l,v.trim())))},"addState"),Se=r(function(t){Tt=[],Bt=[],vt={root:pe()},k=vt.root,et=0,K=Gt(),t||$e()},"clear"),z=r(function(t){return k.states.get(t)},"getState"),ye=r(function(){return k.states},"getStates"),ps=r(function(){b.info("Documents = ",vt)},"logDocuments"),Ss=r(function(){return k.relations},"getRelations");function bt(t=""){let e=t;return t===Pt&&(et++,e=`${ue}${et}`),e}r(bt,"startIdIfNeeded");function mt(t="",e=st){return t===Pt?ue:e}r(mt,"startTypeIfNeeded");function ge(t=""){let e=t;return t===he&&(et++,e=`${de}${et}`),e}r(ge,"endIdIfNeeded");function _e(t="",e=st){return t===he?de:e}r(_e,"endTypeIfNeeded");function Te(t,e,c){let a=bt(t.id.trim()),d=mt(t.id.trim(),t.type),s=bt(e.id.trim()),p=mt(e.id.trim(),e.type);G(a,d,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),G(s,p,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),k.relations.push({id1:a,id2:s,relationTitle:H.sanitizeText(c,x())})}r(Te,"addRelationObjs");var Ee=r(function(t,e,c){if(typeof t=="object")Te(t,e,c);else{const a=bt(t.trim()),d=mt(t),s=ge(e.trim()),p=_e(e);G(a,d),G(s,p),k.relations.push({id1:a,id2:s,title:H.sanitizeText(c,x())})}},"addRelation"),Nt=r(function(t,e){const c=k.states.get(t),a=e.startsWith(":")?e.replace(":","").trim():e;c.descriptions.push(H.sanitizeText(a,x()))},"addDescription"),ys=r(function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},"cleanupLabel"),gs=r(()=>(Jt++,"divider-id-"+Jt),"getDividerId"),ve=r(function(t,e=""){K.has(t)||K.set(t,{id:t,styles:[],textStyles:[]});const c=K.get(t);e!=null&&e.split(os).forEach(a=>{const d=a.replace(/([^;]*);/,"$1").trim();if(RegExp(Xt).exec(a)){const p=d.replace(Kt,ls).replace(Xt,Kt);c.textStyles.push(p)}c.styles.push(d)})},"addStyleClass"),_s=r(function(){return K},"getClasses"),Ft=r(function(t,e){t.split(",").forEach(function(c){let a=z(c);if(a===void 0){const d=c.trim();G(d),a=z(d)}a.classes.push(e)})},"setCssClass"),Ts=r(function(t,e){const c=z(t);c!==void 0&&c.styles.push(e)},"setStyle"),Es=r(function(t,e){const c=z(t);c!==void 0&&c.textStyles.push(e)},"setTextStyle"),vs=r(()=>fe,"getDirection"),bs=r(t=>{fe=t},"setDirection"),ms=r(t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),"trimColon"),ks=r(()=>{const t=x();return{nodes:Tt,edges:Bt,other:{},config:t,direction:le(Yt())}},"getData"),Rs={getConfig:r(()=>x().state,"getConfig"),getData:ks,addState:G,clear:Se,getState:z,getStates:ye,getRelations:Ss,getClasses:_s,getDirection:vs,addRelation:Ee,getDividerId:gs,setDirection:bs,cleanupLabel:ys,lineType:cs,relationType:us,logDocuments:ps,getRootDoc:ds,setRootDoc:hs,getRootDocV2:Yt,extract:fs,trimColon:ms,getAccTitle:Oe,setAccTitle:Ie,getAccDescription:Re,setAccDescription:Le,addStyleClass:ve,setCssClass:Ft,addDescription:Nt,setDiagramTitle:Ae,getDiagramTitle:xe},Ds=r(t=>` defs #statediagram-barbEnd { fill: ${t.transitionColor}; stroke: ${t.transitionColor}; @@ -217,4 +217,4 @@ g.stateGroup line { font-size: 18px; fill: ${t.textColor}; } -`,"getStyles"),Is=Ds;export{Rs as a,Is as b,Ls as c,As as s}; +`,"getStyles"),Is=Ds;export{Rs as a,As as b,Ls as c,Is as s}; diff --git a/static/js/md-chunk-ASOPGD6M-BaPEXM9M.js b/static/js/md-chunk-ASOPGD6M-D4uVhftc.js similarity index 77% rename from static/js/md-chunk-ASOPGD6M-BaPEXM9M.js rename to static/js/md-chunk-ASOPGD6M-D4uVhftc.js index 781ea7464..99400851d 100644 --- a/static/js/md-chunk-ASOPGD6M-BaPEXM9M.js +++ b/static/js/md-chunk-ASOPGD6M-D4uVhftc.js @@ -1 +1 @@ -import{_ as n,S as c,m as l}from"./md-index-BVqvVggs.js";var x=n((a,t)=>{const e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((a,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(a,e).lower()},"drawBackgroundRect"),g=n((a,t)=>{const e=t.text.replace(c," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),m=n((a,t,e,r)=>{const s=a.append("image");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",i)},"drawImage"),h=n((a,t,e,r)=>{const s=a.append("use");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{p as a,d as b,h as c,x as d,m as e,g as f,y as g}; +import{_ as n,S as c,j as l}from"./md-index-B8Nim9kS.js";var o=n((a,t)=>{const e=a.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((a,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};o(a,e).lower()},"drawBackgroundRect"),g=n((a,t)=>{const e=t.text.replace(c," "),r=a.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const s=r.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),r},"drawText"),h=n((a,t,e,r)=>{const s=a.append("image");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",i)},"drawImage"),m=n((a,t,e,r)=>{const s=a.append("use");s.attr("x",t),s.attr("y",e);const i=l(r);s.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{d as a,p as b,m as c,o as d,h as e,g as f,y as g}; diff --git a/static/js/md-chunk-KFBOBJHC-BaRawZeL.js b/static/js/md-chunk-KFBOBJHC-bxuwoawJ.js similarity index 66% rename from static/js/md-chunk-KFBOBJHC-BaRawZeL.js rename to static/js/md-chunk-KFBOBJHC-bxuwoawJ.js index e45335d92..654e6ec53 100644 --- a/static/js/md-chunk-KFBOBJHC-BaRawZeL.js +++ b/static/js/md-chunk-KFBOBJHC-bxuwoawJ.js @@ -1 +1 @@ -import{_ as s}from"./md-index-BVqvVggs.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; +import{_ as s}from"./md-index-B8Nim9kS.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; diff --git a/static/js/md-chunk-T2TOU4HS-BjDahP4G.js b/static/js/md-chunk-T2TOU4HS-u24tjTRY.js similarity index 84% rename from static/js/md-chunk-T2TOU4HS-BjDahP4G.js rename to static/js/md-chunk-T2TOU4HS-u24tjTRY.js index 9619cca37..8670e297b 100644 --- a/static/js/md-chunk-T2TOU4HS-BjDahP4G.js +++ b/static/js/md-chunk-T2TOU4HS-u24tjTRY.js @@ -1,9 +1,9 @@ -import{g as mt,s as Et}from"./md-chunk-5HRBRIJM-CXxgtuoQ.js";import{_ as u,i as bt,d as D,P as z,s as kt,g as yt,b as Tt,c as Ft,p as Dt,q as _t,e as I,v as Bt,l as ze,u as Qe,j as ie,x as St,y as vt,z as Nt}from"./md-index-BVqvVggs.js";var Ke=function(){var e=u(function(O,o,h,d){for(h=h||{},d=O.length;d--;h[O[d]]=o);return h},"o"),i=[1,18],a=[1,19],l=[1,20],c=[1,41],r=[1,42],f=[1,26],A=[1,24],T=[1,25],S=[1,32],ke=[1,33],ye=[1,34],m=[1,45],Te=[1,35],Fe=[1,36],De=[1,37],_e=[1,38],Be=[1,27],Se=[1,28],ve=[1,29],Ne=[1,30],Le=[1,31],E=[1,44],b=[1,46],k=[1,43],F=[1,47],xe=[1,9],p=[1,8,9],re=[1,58],ue=[1,59],le=[1,60],oe=[1,61],ce=[1,62],Ie=[1,63],Oe=[1,64],he=[1,8,9,41],qe=[1,76],G=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],pe=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],de=[13,58,84,99,101,102],Q=[13,58,71,72,84,99,101,102],He=[13,58,66,67,68,69,70,84,99,101,102],we=[1,98],W=[1,115],X=[1,107],q=[1,113],H=[1,108],J=[1,109],Z=[1,110],$=[1,111],ee=[1,112],te=[1,114],Je=[22,58,59,80,84,85,86,87,88,89],Ve=[1,8,9,39,41,44],fe=[1,8,9,22],Ze=[1,143],$e=[1,8,9,59],N=[1,8,9,22,58,59,80,84,85,86,87,88,89],Pe={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:u(function(o,h,d,n,C,t,se){var s=t.length-1;switch(C){case 8:this.$=t[s-1];break;case 9:case 12:case 14:this.$=t[s];break;case 10:case 13:this.$=t[s-2]+"."+t[s];break;case 11:case 15:this.$=t[s-1]+t[s];break;case 16:case 17:this.$=t[s-1]+"~"+t[s]+"~";break;case 18:n.addRelation(t[s]);break;case 19:t[s-1].title=n.cleanupLabel(t[s]),n.addRelation(t[s-1]);break;case 30:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(t[s-3],t[s-1]);break;case 34:n.addClassesToNamespace(t[s-4],t[s-1]);break;case 35:this.$=t[s],n.addNamespace(t[s]);break;case 36:this.$=[t[s]];break;case 37:this.$=[t[s-1]];break;case 38:t[s].unshift(t[s-2]),this.$=t[s];break;case 40:n.setCssClass(t[s-2],t[s]);break;case 41:n.addMembers(t[s-3],t[s-1]);break;case 42:n.setCssClass(t[s-5],t[s-3]),n.addMembers(t[s-5],t[s-1]);break;case 43:this.$=t[s],n.addClass(t[s]);break;case 44:this.$=t[s-1],n.addClass(t[s-1]),n.setClassLabel(t[s-1],t[s]);break;case 45:n.addAnnotation(t[s],t[s-2]);break;case 46:case 59:this.$=[t[s]];break;case 47:t[s].push(t[s-1]),this.$=t[s];break;case 48:break;case 49:n.addMember(t[s-1],n.cleanupLabel(t[s]));break;case 50:break;case 51:break;case 52:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 54:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 55:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 56:n.addNote(t[s],t[s-1]);break;case 57:n.addNote(t[s]);break;case 58:this.$=t[s-2],n.defineClass(t[s-1],t[s]);break;case 60:this.$=t[s-2].concat([t[s]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 66:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 67:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 68:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=t[s-2],n.setClickEvent(t[s-1],t[s]);break;case 77:case 83:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 78:this.$=t[s-2],n.setLink(t[s-1],t[s]);break;case 79:this.$=t[s-3],n.setLink(t[s-2],t[s-1],t[s]);break;case 80:this.$=t[s-3],n.setLink(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 81:this.$=t[s-4],n.setLink(t[s-3],t[s-2],t[s]),n.setTooltip(t[s-3],t[s-1]);break;case 84:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 85:this.$=t[s-4],n.setClickEvent(t[s-3],t[s-2],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 86:this.$=t[s-3],n.setLink(t[s-2],t[s]);break;case 87:this.$=t[s-4],n.setLink(t[s-3],t[s-1],t[s]);break;case 88:this.$=t[s-4],n.setLink(t[s-3],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 89:this.$=t[s-5],n.setLink(t[s-4],t[s-2],t[s]),n.setTooltip(t[s-4],t[s-1]);break;case 90:this.$=t[s-2],n.setCssStyle(t[s-1],t[s]);break;case 91:n.setCssClass(t[s-1],t[s]);break;case 92:this.$=[t[s]];break;case 93:t[s-2].push(t[s]),this.$=t[s-2];break;case 95:this.$=t[s-1]+t[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:l,38:22,42:c,43:23,46:r,47:f,49:A,50:T,52:S,54:ke,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:b,101:k,102:F},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(xe,[2,5],{8:[1,48]}),{8:[1,49]},e(p,[2,18],{22:[1,50]}),e(p,[2,20]),e(p,[2,21]),e(p,[2,22]),e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,27]),e(p,[2,28]),e(p,[2,29]),{34:[1,51]},{36:[1,52]},e(p,[2,32]),e(p,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:re,67:ue,68:le,69:oe,70:ce,71:Ie,72:Oe}),{39:[1,65]},e(he,[2,39],{39:[1,67],44:[1,66]}),e(p,[2,50]),e(p,[2,51]),{16:68,58:m,84:E,99:b,101:k},{16:39,18:69,19:40,58:m,84:E,99:b,101:k,102:F},{16:39,18:70,19:40,58:m,84:E,99:b,101:k,102:F},{16:39,18:71,19:40,58:m,84:E,99:b,101:k,102:F},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:m,84:E,99:b,101:k,102:F},{13:qe,53:75},{56:77,58:[1,78]},e(p,[2,61]),e(p,[2,62]),e(p,[2,63]),e(p,[2,64]),e(G,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:m,84:E,99:b,101:k,102:F}),e(G,[2,14],{20:[1,82]}),{15:83,16:84,58:m,84:E,99:b,101:k},{16:39,18:85,19:40,58:m,84:E,99:b,101:k,102:F},e(pe,[2,118]),e(pe,[2,119]),e(pe,[2,120]),e(pe,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(xe,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:i,35:a,37:l,42:c,46:r,47:f,49:A,50:T,52:S,54:ke,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:b,101:k,102:F}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:l,38:22,42:c,43:23,46:r,47:f,49:A,50:T,52:S,54:ke,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:b,101:k,102:F},e(p,[2,19]),e(p,[2,30]),e(p,[2,31]),{13:[1,89],16:39,18:88,19:40,58:m,84:E,99:b,101:k,102:F},{51:90,64:56,65:57,66:re,67:ue,68:le,69:oe,70:ce,71:Ie,72:Oe},e(p,[2,49]),{65:91,71:Ie,72:Oe},e(de,[2,68],{64:92,66:re,67:ue,68:le,69:oe,70:ce}),e(Q,[2,69]),e(Q,[2,70]),e(Q,[2,71]),e(Q,[2,72]),e(Q,[2,73]),e(He,[2,74]),e(He,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:m,84:E,99:b,101:k},{45:97,49:we},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:W,57:104,58:X,80:q,82:105,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},{58:[1,116]},{13:qe,53:117},e(p,[2,57]),e(p,[2,123]),{22:W,57:118,58:X,59:[1,119],80:q,82:105,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},e(Je,[2,59]),{16:39,18:120,19:40,58:m,84:E,99:b,101:k,102:F},e(G,[2,15]),e(G,[2,16]),e(G,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:m,84:E,99:b,101:k},e(Ve,[2,43],{11:123,12:[1,124]}),e(xe,[2,7]),{9:[1,125]},e(fe,[2,52]),{16:39,18:126,19:40,58:m,84:E,99:b,101:k,102:F},{13:[1,128],16:39,18:127,19:40,58:m,84:E,99:b,101:k,102:F},e(de,[2,67],{64:129,66:re,67:ue,68:le,69:oe,70:ce}),e(de,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},e(he,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:we},{16:39,18:136,19:40,58:m,84:E,99:b,101:k,102:F},e(p,[2,76],{13:[1,137]}),e(p,[2,78],{13:[1,139],75:[1,138]}),e(p,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(p,[2,90],{59:Ze}),e($e,[2,92],{83:144,22:W,58:X,80:q,84:H,85:J,86:Z,87:$,88:ee,89:te}),e(N,[2,94]),e(N,[2,96]),e(N,[2,97]),e(N,[2,98]),e(N,[2,99]),e(N,[2,100]),e(N,[2,101]),e(N,[2,102]),e(N,[2,103]),e(N,[2,104]),e(p,[2,91]),e(p,[2,56]),e(p,[2,58],{59:Ze}),{58:[1,145]},e(G,[2,13]),{15:146,16:84,58:m,84:E,99:b,101:k},{39:[2,11]},e(Ve,[2,44]),{13:[1,147]},{1:[2,4]},e(fe,[2,54]),e(fe,[2,53]),{16:39,18:148,19:40,58:m,84:E,99:b,101:k,102:F},e(de,[2,65]),e(p,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:we},e(he,[2,41]),{41:[2,47]},e(p,[2,45]),e(p,[2,77]),e(p,[2,79]),e(p,[2,80],{75:[1,152]}),e(p,[2,83]),e(p,[2,84],{13:[1,153]}),e(p,[2,86],{13:[1,155],75:[1,154]}),{22:W,58:X,80:q,82:156,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},e(N,[2,95]),e(Je,[2,60]),{39:[2,10]},{14:[1,157]},e(fe,[2,55]),e(p,[2,34]),{41:[2,38]},{41:[1,158]},e(p,[2,81]),e(p,[2,85]),e(p,[2,87]),e(p,[2,88],{75:[1,159]}),e($e,[2,93],{83:144,22:W,58:X,80:q,84:H,85:J,86:Z,87:$,88:ee,89:te}),e(Ve,[2,8]),e(he,[2,42]),e(p,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:u(function(o,h){if(h.recoverable)this.trace(o);else{var d=new Error(o);throw d.hash=h,d}},"parseError"),parse:u(function(o){var h=this,d=[0],n=[],C=[null],t=[],se=this.table,s="",ge=0,et=0,ft=2,tt=1,At=t.slice.call(arguments,1),y=Object.create(this.lexer),V={yy:{}};for(var Re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Re)&&(V.yy[Re]=this.yy[Re]);y.setInput(o,V.yy),V.yy.lexer=y,V.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Me=y.yylloc;t.push(Me);var gt=y.options&&y.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(B){d.length=d.length-2*B,C.length=C.length-B,t.length=t.length-B}u(Ct,"popStack");function st(){var B;return B=n.pop()||y.lex()||tt,typeof B!="number"&&(B instanceof Array&&(n=B,B=n.pop()),B=h.symbols_[B]||B),B}u(st,"lex");for(var _,P,v,Ge,U={},Ce,x,it,me;;){if(P=d[d.length-1],this.defaultActions[P]?v=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=st()),v=se[P]&&se[P][_]),typeof v>"u"||!v.length||!v[0]){var Ue="";me=[];for(Ce in se[P])this.terminals_[Ce]&&Ce>ft&&me.push("'"+this.terminals_[Ce]+"'");y.showPosition?Ue="Parse error on line "+(ge+1)+`: +import{g as mt,s as Et}from"./md-chunk-5HRBRIJM-Dc3xF8et.js";import{_ as u,n as kt,o as bt,s as yt,g as Tt,a as Ft,b as Dt,l as ze,c as D,q as _t,r as Bt,u as We,z as St,k as I,v as vt,i as Nt,P as z,d as ie}from"./md-index-B8Nim9kS.js";var Ke=function(){var e=u(function(O,o,h,d){for(h=h||{},d=O.length;d--;h[O[d]]=o);return h},"o"),i=[1,18],a=[1,19],l=[1,20],c=[1,41],r=[1,42],A=[1,26],f=[1,24],T=[1,25],S=[1,32],be=[1,33],ye=[1,34],m=[1,45],Te=[1,35],Fe=[1,36],De=[1,37],_e=[1,38],Be=[1,27],Se=[1,28],ve=[1,29],Ne=[1,30],Le=[1,31],E=[1,44],k=[1,46],b=[1,43],F=[1,47],xe=[1,9],p=[1,8,9],re=[1,58],ue=[1,59],le=[1,60],oe=[1,61],ce=[1,62],Ie=[1,63],Oe=[1,64],he=[1,8,9,41],qe=[1,76],G=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],pe=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],de=[13,58,84,99,101,102],W=[13,58,71,72,84,99,101,102],He=[13,58,66,67,68,69,70,84,99,101,102],we=[1,98],j=[1,115],X=[1,107],q=[1,113],H=[1,108],J=[1,109],Z=[1,110],$=[1,111],ee=[1,112],te=[1,114],Je=[22,58,59,80,84,85,86,87,88,89],Ve=[1,8,9,39,41,44],Ae=[1,8,9,22],Ze=[1,143],$e=[1,8,9,59],N=[1,8,9,22,58,59,80,84,85,86,87,88,89],Pe={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:u(function(o,h,d,n,C,t,se){var s=t.length-1;switch(C){case 8:this.$=t[s-1];break;case 9:case 12:case 14:this.$=t[s];break;case 10:case 13:this.$=t[s-2]+"."+t[s];break;case 11:case 15:this.$=t[s-1]+t[s];break;case 16:case 17:this.$=t[s-1]+"~"+t[s]+"~";break;case 18:n.addRelation(t[s]);break;case 19:t[s-1].title=n.cleanupLabel(t[s]),n.addRelation(t[s-1]);break;case 30:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(t[s-3],t[s-1]);break;case 34:n.addClassesToNamespace(t[s-4],t[s-1]);break;case 35:this.$=t[s],n.addNamespace(t[s]);break;case 36:this.$=[t[s]];break;case 37:this.$=[t[s-1]];break;case 38:t[s].unshift(t[s-2]),this.$=t[s];break;case 40:n.setCssClass(t[s-2],t[s]);break;case 41:n.addMembers(t[s-3],t[s-1]);break;case 42:n.setCssClass(t[s-5],t[s-3]),n.addMembers(t[s-5],t[s-1]);break;case 43:this.$=t[s],n.addClass(t[s]);break;case 44:this.$=t[s-1],n.addClass(t[s-1]),n.setClassLabel(t[s-1],t[s]);break;case 45:n.addAnnotation(t[s],t[s-2]);break;case 46:case 59:this.$=[t[s]];break;case 47:t[s].push(t[s-1]),this.$=t[s];break;case 48:break;case 49:n.addMember(t[s-1],n.cleanupLabel(t[s]));break;case 50:break;case 51:break;case 52:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 54:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 55:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 56:n.addNote(t[s],t[s-1]);break;case 57:n.addNote(t[s]);break;case 58:this.$=t[s-2],n.defineClass(t[s-1],t[s]);break;case 60:this.$=t[s-2].concat([t[s]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 66:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 67:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 68:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=t[s-2],n.setClickEvent(t[s-1],t[s]);break;case 77:case 83:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 78:this.$=t[s-2],n.setLink(t[s-1],t[s]);break;case 79:this.$=t[s-3],n.setLink(t[s-2],t[s-1],t[s]);break;case 80:this.$=t[s-3],n.setLink(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 81:this.$=t[s-4],n.setLink(t[s-3],t[s-2],t[s]),n.setTooltip(t[s-3],t[s-1]);break;case 84:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 85:this.$=t[s-4],n.setClickEvent(t[s-3],t[s-2],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 86:this.$=t[s-3],n.setLink(t[s-2],t[s]);break;case 87:this.$=t[s-4],n.setLink(t[s-3],t[s-1],t[s]);break;case 88:this.$=t[s-4],n.setLink(t[s-3],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 89:this.$=t[s-5],n.setLink(t[s-4],t[s-2],t[s]),n.setTooltip(t[s-4],t[s-1]);break;case 90:this.$=t[s-2],n.setCssStyle(t[s-1],t[s]);break;case 91:n.setCssClass(t[s-1],t[s]);break;case 92:this.$=[t[s]];break;case 93:t[s-2].push(t[s]),this.$=t[s-2];break;case 95:this.$=t[s-1]+t[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:l,38:22,42:c,43:23,46:r,47:A,49:f,50:T,52:S,54:be,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:k,101:b,102:F},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(xe,[2,5],{8:[1,48]}),{8:[1,49]},e(p,[2,18],{22:[1,50]}),e(p,[2,20]),e(p,[2,21]),e(p,[2,22]),e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,27]),e(p,[2,28]),e(p,[2,29]),{34:[1,51]},{36:[1,52]},e(p,[2,32]),e(p,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:re,67:ue,68:le,69:oe,70:ce,71:Ie,72:Oe}),{39:[1,65]},e(he,[2,39],{39:[1,67],44:[1,66]}),e(p,[2,50]),e(p,[2,51]),{16:68,58:m,84:E,99:k,101:b},{16:39,18:69,19:40,58:m,84:E,99:k,101:b,102:F},{16:39,18:70,19:40,58:m,84:E,99:k,101:b,102:F},{16:39,18:71,19:40,58:m,84:E,99:k,101:b,102:F},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:m,84:E,99:k,101:b,102:F},{13:qe,53:75},{56:77,58:[1,78]},e(p,[2,61]),e(p,[2,62]),e(p,[2,63]),e(p,[2,64]),e(G,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:m,84:E,99:k,101:b,102:F}),e(G,[2,14],{20:[1,82]}),{15:83,16:84,58:m,84:E,99:k,101:b},{16:39,18:85,19:40,58:m,84:E,99:k,101:b,102:F},e(pe,[2,118]),e(pe,[2,119]),e(pe,[2,120]),e(pe,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(xe,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,18:21,38:22,43:23,16:39,19:40,5:86,33:i,35:a,37:l,42:c,46:r,47:A,49:f,50:T,52:S,54:be,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:k,101:b,102:F}),{5:87,10:5,16:39,18:21,19:40,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:a,37:l,38:22,42:c,43:23,46:r,47:A,49:f,50:T,52:S,54:be,55:ye,58:m,60:Te,61:Fe,62:De,63:_e,73:Be,74:Se,76:ve,80:Ne,81:Le,84:E,99:k,101:b,102:F},e(p,[2,19]),e(p,[2,30]),e(p,[2,31]),{13:[1,89],16:39,18:88,19:40,58:m,84:E,99:k,101:b,102:F},{51:90,64:56,65:57,66:re,67:ue,68:le,69:oe,70:ce,71:Ie,72:Oe},e(p,[2,49]),{65:91,71:Ie,72:Oe},e(de,[2,68],{64:92,66:re,67:ue,68:le,69:oe,70:ce}),e(W,[2,69]),e(W,[2,70]),e(W,[2,71]),e(W,[2,72]),e(W,[2,73]),e(He,[2,74]),e(He,[2,75]),{8:[1,94],24:95,40:93,43:23,46:r},{16:96,58:m,84:E,99:k,101:b},{45:97,49:we},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:j,57:104,58:X,80:q,82:105,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},{58:[1,116]},{13:qe,53:117},e(p,[2,57]),e(p,[2,123]),{22:j,57:118,58:X,59:[1,119],80:q,82:105,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},e(Je,[2,59]),{16:39,18:120,19:40,58:m,84:E,99:k,101:b,102:F},e(G,[2,15]),e(G,[2,16]),e(G,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:m,84:E,99:k,101:b},e(Ve,[2,43],{11:123,12:[1,124]}),e(xe,[2,7]),{9:[1,125]},e(Ae,[2,52]),{16:39,18:126,19:40,58:m,84:E,99:k,101:b,102:F},{13:[1,128],16:39,18:127,19:40,58:m,84:E,99:k,101:b,102:F},e(de,[2,67],{64:129,66:re,67:ue,68:le,69:oe,70:ce}),e(de,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:r},{8:[1,132],41:[2,36]},e(he,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:we},{16:39,18:136,19:40,58:m,84:E,99:k,101:b,102:F},e(p,[2,76],{13:[1,137]}),e(p,[2,78],{13:[1,139],75:[1,138]}),e(p,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(p,[2,90],{59:Ze}),e($e,[2,92],{83:144,22:j,58:X,80:q,84:H,85:J,86:Z,87:$,88:ee,89:te}),e(N,[2,94]),e(N,[2,96]),e(N,[2,97]),e(N,[2,98]),e(N,[2,99]),e(N,[2,100]),e(N,[2,101]),e(N,[2,102]),e(N,[2,103]),e(N,[2,104]),e(p,[2,91]),e(p,[2,56]),e(p,[2,58],{59:Ze}),{58:[1,145]},e(G,[2,13]),{15:146,16:84,58:m,84:E,99:k,101:b},{39:[2,11]},e(Ve,[2,44]),{13:[1,147]},{1:[2,4]},e(Ae,[2,54]),e(Ae,[2,53]),{16:39,18:148,19:40,58:m,84:E,99:k,101:b,102:F},e(de,[2,65]),e(p,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:r},{45:151,49:we},e(he,[2,41]),{41:[2,47]},e(p,[2,45]),e(p,[2,77]),e(p,[2,79]),e(p,[2,80],{75:[1,152]}),e(p,[2,83]),e(p,[2,84],{13:[1,153]}),e(p,[2,86],{13:[1,155],75:[1,154]}),{22:j,58:X,80:q,82:156,83:106,84:H,85:J,86:Z,87:$,88:ee,89:te},e(N,[2,95]),e(Je,[2,60]),{39:[2,10]},{14:[1,157]},e(Ae,[2,55]),e(p,[2,34]),{41:[2,38]},{41:[1,158]},e(p,[2,81]),e(p,[2,85]),e(p,[2,87]),e(p,[2,88],{75:[1,159]}),e($e,[2,93],{83:144,22:j,58:X,80:q,84:H,85:J,86:Z,87:$,88:ee,89:te}),e(Ve,[2,8]),e(he,[2,42]),e(p,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:u(function(o,h){if(h.recoverable)this.trace(o);else{var d=new Error(o);throw d.hash=h,d}},"parseError"),parse:u(function(o){var h=this,d=[0],n=[],C=[null],t=[],se=this.table,s="",ge=0,et=0,At=2,tt=1,ft=t.slice.call(arguments,1),y=Object.create(this.lexer),V={yy:{}};for(var Re in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Re)&&(V.yy[Re]=this.yy[Re]);y.setInput(o,V.yy),V.yy.lexer=y,V.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Me=y.yylloc;t.push(Me);var gt=y.options&&y.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(B){d.length=d.length-2*B,C.length=C.length-B,t.length=t.length-B}u(Ct,"popStack");function st(){var B;return B=n.pop()||y.lex()||tt,typeof B!="number"&&(B instanceof Array&&(n=B,B=n.pop()),B=h.symbols_[B]||B),B}u(st,"lex");for(var _,P,v,Ge,U={},Ce,x,it,me;;){if(P=d[d.length-1],this.defaultActions[P]?v=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=st()),v=se[P]&&se[P][_]),typeof v>"u"||!v.length||!v[0]){var Ue="";me=[];for(Ce in se[P])this.terminals_[Ce]&&Ce>At&&me.push("'"+this.terminals_[Ce]+"'");y.showPosition?Ue="Parse error on line "+(ge+1)+`: `+y.showPosition()+` -Expecting `+me.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Ue="Parse error on line "+(ge+1)+": Unexpected "+(_==tt?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Ue,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:Me,expected:me})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(v[0]){case 1:d.push(_),C.push(y.yytext),t.push(y.yylloc),d.push(v[1]),_=null,et=y.yyleng,s=y.yytext,ge=y.yylineno,Me=y.yylloc;break;case 2:if(x=this.productions_[v[1]][1],U.$=C[C.length-x],U._$={first_line:t[t.length-(x||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(x||1)].first_column,last_column:t[t.length-1].last_column},gt&&(U._$.range=[t[t.length-(x||1)].range[0],t[t.length-1].range[1]]),Ge=this.performAction.apply(U,[s,et,ge,V.yy,v[1],C,t].concat(At)),typeof Ge<"u")return Ge;x&&(d=d.slice(0,-1*x*2),C=C.slice(0,-1*x),t=t.slice(0,-1*x)),d.push(this.productions_[v[1]][0]),C.push(U.$),t.push(U._$),it=se[d[d.length-2]][d[d.length-1]],d.push(it);break;case 3:return!0}}return!0},"parse")},dt=function(){var O={EOF:1,parseError:u(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:u(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:u(function(o){var h=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===n.length?this.yylloc.first_column:0)+n[n.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+me.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Ue="Parse error on line "+(ge+1)+": Unexpected "+(_==tt?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Ue,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:Me,expected:me})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(v[0]){case 1:d.push(_),C.push(y.yytext),t.push(y.yylloc),d.push(v[1]),_=null,et=y.yyleng,s=y.yytext,ge=y.yylineno,Me=y.yylloc;break;case 2:if(x=this.productions_[v[1]][1],U.$=C[C.length-x],U._$={first_line:t[t.length-(x||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(x||1)].first_column,last_column:t[t.length-1].last_column},gt&&(U._$.range=[t[t.length-(x||1)].range[0],t[t.length-1].range[1]]),Ge=this.performAction.apply(U,[s,et,ge,V.yy,v[1],C,t].concat(ft)),typeof Ge<"u")return Ge;x&&(d=d.slice(0,-1*x*2),C=C.slice(0,-1*x),t=t.slice(0,-1*x)),d.push(this.productions_[v[1]][0]),C.push(U.$),t.push(U._$),it=se[d[d.length-2]][d[d.length-1]],d.push(it);break;case 3:return!0}}return!0},"parse")},dt=function(){var O={EOF:1,parseError:u(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:u(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:u(function(o){var h=o.length,d=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===n.length?this.yylloc.first_column:0)+n[n.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(o){this.unput(this.match.slice(o))},"less"),pastInput:u(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` `+h+"^"},"showPosition"),test_match:u(function(o,h){var d,n,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),n=o[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in C)this[t]=C[t];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,d,n;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),t=0;th[0].length)){if(h=d,n=t,this.options.backtrack_lexer){if(o=this.test_match(d,C[t]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,C[n]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var h=this.next();return h||this.lex()},"lex"),begin:u(function(h){this.conditionStack.push(h)},"begin"),popState:u(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:u(function(h){this.begin(h)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:u(function(h,d,n,C){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return O}();Pe.lexer=dt;function Ae(){this.yy={}}return u(Ae,"Parser"),Ae.prototype=Pe,Pe.Parser=Ae,new Ae}();Ke.parser=Ke;var os=Ke,nt=["#","+","~","-",""],Y,at=(Y=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const l=bt(i,D());this.parseMember(l)}getDisplayDetails(){let i=this.visibility+z(this.id);this.memberType==="method"&&(i+=`(${z(this.parameters.trim())})`,this.returnType&&(i+=" : "+z(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){const f=r[1]?r[1].trim():"";if(nt.includes(f)&&(this.visibility=f),this.id=r[2],this.parameters=r[3]?r[3].trim():"",a=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",a===""){const A=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(A)&&(a=A,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const c=i.length,r=i.substring(0,1),f=i.substring(c-1);nt.includes(r)&&(this.visibility=r),/[$*]/.exec(f)&&(a=f),this.id=i.substring(this.visibility===""?0:1,a===""?c:c-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const l=`${this.visibility?"\\"+this.visibility:""}${z(this.id)}${this.memberType==="method"?`(${z(this.parameters)})${this.returnType?" : "+z(this.returnType):""}`:""}`;this.text=l.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},u(Y,"ClassMember"),Y),Ee="classId-",be=[],g=new Map,rt=new Map,ne=[],j=[],ut=0,L=new Map,Ye=0,ae=[],R=u(e=>I.sanitizeText(e,D()),"sanitizeText"),M=u(function(e){const i=I.sanitizeText(e,D());let a="",l=i;if(i.indexOf("~")>0){const c=i.split("~");l=R(c[0]),a=R(c[1])}return{className:l,type:a}},"splitClassNameAndType"),Lt=u(function(e,i){const a=I.sanitizeText(e,D());i&&(i=R(i));const{className:l}=M(a);g.get(l).label=i,g.get(l).text=`${i}${g.get(l).type?`<${g.get(l).type}>`:""}`},"setClassLabel"),K=u(function(e){const i=I.sanitizeText(e,D()),{className:a,type:l}=M(i);if(g.has(a))return;const c=I.sanitizeText(a,D());g.set(c,{id:c,type:l,label:c,text:`${c}${l?`<${l}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Ee+c+"-"+ut}),ut++},"addClass"),lt=u(function(e,i){const a={id:`interface${j.length}`,label:e,classId:i};j.push(a)},"addInterface"),ot=u(function(e){const i=I.sanitizeText(e,D());if(g.has(i))return g.get(i).domId;throw new Error("Class not found: "+i)},"lookUpDomId"),xt=u(function(){be=[],g=new Map,ne=[],j=[],ae=[],ae.push(ht),L=new Map,Ye=0,Xe="TB",Bt()},"clear"),It=u(function(e){return g.get(e)},"getClass"),Ot=u(function(){return g},"getClasses"),wt=u(function(){return be},"getRelations"),Vt=u(function(){return ne},"getNotes"),Pt=u(function(e){ze.debug("Adding relation: "+JSON.stringify(e));const i=[w.LOLLIPOP,w.AGGREGATION,w.COMPOSITION,w.DEPENDENCY,w.EXTENSION];e.relation.type1===w.LOLLIPOP&&!i.includes(e.relation.type2)?(K(e.id2),lt(e.id1,e.id2),e.id1=`interface${j.length-1}`):e.relation.type2===w.LOLLIPOP&&!i.includes(e.relation.type1)?(K(e.id1),lt(e.id2,e.id1),e.id2=`interface${j.length-1}`):(K(e.id1),K(e.id2)),e.id1=M(e.id1).className,e.id2=M(e.id2).className,e.relationTitle1=I.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=I.sanitizeText(e.relationTitle2.trim(),D()),be.push(e)},"addRelation"),Rt=u(function(e,i){const a=M(e).className;g.get(a).annotations.push(i)},"addAnnotation"),ct=u(function(e,i){K(e);const a=M(e).className,l=g.get(a);if(typeof i=="string"){const c=i.trim();c.startsWith("<<")&&c.endsWith(">>")?l.annotations.push(R(c.substring(2,c.length-2))):c.indexOf(")")>0?l.methods.push(new at(c,"method")):c&&l.members.push(new at(c,"attribute"))}},"addMember"),Mt=u(function(e,i){Array.isArray(i)&&(i.reverse(),i.forEach(a=>ct(e,a)))},"addMembers"),Gt=u(function(e,i){const a={id:`note${ne.length}`,class:i,text:e};ne.push(a)},"addNote"),Ut=u(function(e){return e.startsWith(":")&&(e=e.substring(1)),R(e.trim())},"cleanupLabel"),We=u(function(e,i){e.split(",").forEach(function(a){let l=a;/\d/.exec(a[0])&&(l=Ee+l);const c=g.get(l);c&&(c.cssClasses+=" "+i)})},"setCssClass"),zt=u(function(e,i){for(const a of e){let l=rt.get(a);l===void 0&&(l={id:a,styles:[],textStyles:[]},rt.set(a,l)),i&&i.forEach(function(c){if(/color/.exec(c)){const r=c.replace("fill","bgFill");l.textStyles.push(r)}l.styles.push(c)}),g.forEach(c=>{c.cssClasses.includes(a)&&c.styles.push(...i.flatMap(r=>r.split(",")))})}},"defineClass"),Kt=u(function(e,i){e.split(",").forEach(function(a){i!==void 0&&(g.get(a).tooltip=R(i))})},"setTooltip"),Yt=u(function(e,i){return i&&L.has(i)?L.get(i).classes.get(e).tooltip:g.get(e).tooltip},"getTooltip"),jt=u(function(e,i,a){const l=D();e.split(",").forEach(function(c){let r=c;/\d/.exec(c[0])&&(r=Ee+r);const f=g.get(r);f&&(f.link=Qe.formatUrl(i,l),l.securityLevel==="sandbox"?f.linkTarget="_top":typeof a=="string"?f.linkTarget=R(a):f.linkTarget="_blank")}),We(e,"clickable")},"setLink"),Qt=u(function(e,i,a){e.split(",").forEach(function(l){Wt(l,i,a),g.get(l).haveCallback=!0}),We(e,"clickable")},"setClickEvent"),Wt=u(function(e,i,a){const l=I.sanitizeText(e,D());if(D().securityLevel!=="loose"||i===void 0)return;const r=l;if(g.has(r)){const f=ot(r);let A=[];if(typeof a=="string"){A=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let T=0;T")),c.classed("hover",!0)}).on("mouseout",function(){i.transition().duration(500).style("opacity",0),ie(this).classed("hover",!1)})},"setupToolTips");ae.push(ht);var Xe="TB",pt=u(()=>Xe,"getDirection"),Ht=u(e=>{Xe=e},"setDirection"),Jt=u(function(e){L.has(e)||(L.set(e,{id:e,classes:new Map,children:{},domId:Ee+e+"-"+Ye}),Ye++)},"addNamespace"),Zt=u(function(e){return L.get(e)},"getNamespace"),$t=u(function(){return L},"getNamespaces"),es=u(function(e,i){if(L.has(e))for(const a of i){const{className:l}=M(a);g.get(l).parent=e,L.get(e).classes.set(l,g.get(l))}},"addClassesToNamespace"),ts=u(function(e,i){const a=g.get(e);if(!(!i||!a))for(const l of i)l.includes(",")?a.styles.push(...l.split(",")):a.styles.push(l)},"setCssStyle");function je(e){let i;switch(e){case 0:i="aggregation";break;case 1:i="extension";break;case 2:i="composition";break;case 3:i="dependency";break;case 4:i="lollipop";break;default:i="none"}return i}u(je,"getArrowMarker");var ss=u(()=>{var c;const e=[],i=[],a=D();for(const r of L.keys()){const f=L.get(r);if(f){const A={id:f.id,label:f.id,isGroup:!0,padding:a.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:a.look};e.push(A)}}for(const r of g.keys()){const f=g.get(r);if(f){const A=f;A.parentId=f.parent,A.look=a.look,e.push(A)}}let l=0;for(const r of ne){l++;const f={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:a.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${a.themeVariables.noteBkgColor}`,`stroke: ${a.themeVariables.noteBorderColor}`],look:a.look};e.push(f);const A=((c=g.get(r.class))==null?void 0:c.id)??"";if(A){const T={id:`edgeNote${l}`,start:r.id,end:A,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:a.look};i.push(T)}}for(const r of j){const f={id:r.id,label:r.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:a.look};e.push(f)}l=0;for(const r of be){l++;const f={id:St(r.id1,r.id2,{prefix:"id",counter:l}),start:r.id1,end:r.id2,type:"normal",label:r.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:je(r.relation.type1),arrowTypeEnd:je(r.relation.type2),startLabelRight:r.relationTitle1==="none"?"":r.relationTitle1,endLabelLeft:r.relationTitle2==="none"?"":r.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:r.style||"",pattern:r.relation.lineType==1?"dashed":"solid",look:a.look};i.push(f)}return{nodes:e,edges:i,other:{},config:a,direction:pt()}},"getData"),cs={setAccTitle:kt,getAccTitle:yt,getAccDescription:Tt,setAccDescription:Ft,getConfig:u(()=>D().class,"getConfig"),addClass:K,bindFunctions:Xt,clear:xt,getClass:It,getClasses:Ot,getNotes:Vt,addAnnotation:Rt,addNote:Gt,getRelations:wt,addRelation:Pt,getDirection:pt,setDirection:Ht,addMember:ct,addMembers:Mt,cleanupLabel:Ut,lineType:qt,relationType:w,setClickEvent:Qt,setCssClass:We,defineClass:zt,setLink:jt,getTooltip:Yt,setTooltip:Kt,lookUpDomId:ot,setDiagramTitle:Dt,getDiagramTitle:_t,setClassLabel:Lt,addNamespace:Jt,addClassesToNamespace:es,getNamespace:Zt,getNamespaces:$t,setCssStyle:ts,getData:ss},is=u(e=>`g.classGroup text { +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var h=this.next();return h||this.lex()},"lex"),begin:u(function(h){this.conditionStack.push(h)},"begin"),popState:u(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:u(function(h){this.begin(h)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:u(function(h,d,n,C){switch(n){case 0:return 60;case 1:return 61;case 2:return 62;case 3:return 63;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 77;case 22:this.popState();break;case 23:return 78;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 80;case 28:return 55;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 81;case 50:return 73;case 51:return 74;case 52:return 76;case 53:return 52;case 54:return 54;case 55:return 47;case 56:return 48;case 57:return 79;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 75;case 65:return 75;case 66:return 75;case 67:return 75;case 68:return 67;case 69:return 67;case 70:return 69;case 71:return 69;case 72:return 68;case 73:return 66;case 74:return 70;case 75:return 71;case 76:return 72;case 77:return 22;case 78:return 44;case 79:return 99;case 80:return 17;case 81:return"PLUS";case 82:return 85;case 83:return 59;case 84:return 88;case 85:return 88;case 86:return 89;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 58;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 84;case 94:return 101;case 95:return 87;case 96:return 87;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return O}();Pe.lexer=dt;function fe(){this.yy={}}return u(fe,"Parser"),fe.prototype=Pe,Pe.Parser=fe,new fe}();Ke.parser=Ke;var os=Ke,nt=["#","+","~","-",""],Y,at=(Y=class{constructor(i,a){this.memberType=a,this.visibility="",this.classifier="",this.text="";const l=Nt(i,D());this.parseMember(l)}getDisplayDetails(){let i=this.visibility+z(this.id);this.memberType==="method"&&(i+=`(${z(this.parameters.trim())})`,this.returnType&&(i+=" : "+z(this.returnType))),i=i.trim();const a=this.parseClassifier();return{displayText:i,cssStyle:a}}parseMember(i){let a="";if(this.memberType==="method"){const r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);if(r){const A=r[1]?r[1].trim():"";if(nt.includes(A)&&(this.visibility=A),this.id=r[2],this.parameters=r[3]?r[3].trim():"",a=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",a===""){const f=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(f)&&(a=f,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const c=i.length,r=i.substring(0,1),A=i.substring(c-1);nt.includes(r)&&(this.visibility=r),/[$*]/.exec(A)&&(a=A),this.id=i.substring(this.visibility===""?0:1,a===""?c:c-1)}this.classifier=a,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const l=`${this.visibility?"\\"+this.visibility:""}${z(this.id)}${this.memberType==="method"?`(${z(this.parameters)})${this.returnType?" : "+z(this.returnType):""}`:""}`;this.text=l.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},u(Y,"ClassMember"),Y),Ee="classId-",ke=[],g=new Map,rt=new Map,ne=[],Q=[],ut=0,L=new Map,Ye=0,ae=[],R=u(e=>I.sanitizeText(e,D()),"sanitizeText"),M=u(function(e){const i=I.sanitizeText(e,D());let a="",l=i;if(i.indexOf("~")>0){const c=i.split("~");l=R(c[0]),a=R(c[1])}return{className:l,type:a}},"splitClassNameAndType"),Lt=u(function(e,i){const a=I.sanitizeText(e,D());i&&(i=R(i));const{className:l}=M(a);g.get(l).label=i,g.get(l).text=`${i}${g.get(l).type?`<${g.get(l).type}>`:""}`},"setClassLabel"),K=u(function(e){const i=I.sanitizeText(e,D()),{className:a,type:l}=M(i);if(g.has(a))return;const c=I.sanitizeText(a,D());g.set(c,{id:c,type:l,label:c,text:`${c}${l?`<${l}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Ee+c+"-"+ut}),ut++},"addClass"),lt=u(function(e,i){const a={id:`interface${Q.length}`,label:e,classId:i};Q.push(a)},"addInterface"),ot=u(function(e){const i=I.sanitizeText(e,D());if(g.has(i))return g.get(i).domId;throw new Error("Class not found: "+i)},"lookUpDomId"),xt=u(function(){ke=[],g=new Map,ne=[],Q=[],ae=[],ae.push(ht),L=new Map,Ye=0,Xe="TB",vt()},"clear"),It=u(function(e){return g.get(e)},"getClass"),Ot=u(function(){return g},"getClasses"),wt=u(function(){return ke},"getRelations"),Vt=u(function(){return ne},"getNotes"),Pt=u(function(e){ze.debug("Adding relation: "+JSON.stringify(e));const i=[w.LOLLIPOP,w.AGGREGATION,w.COMPOSITION,w.DEPENDENCY,w.EXTENSION];e.relation.type1===w.LOLLIPOP&&!i.includes(e.relation.type2)?(K(e.id2),lt(e.id1,e.id2),e.id1=`interface${Q.length-1}`):e.relation.type2===w.LOLLIPOP&&!i.includes(e.relation.type1)?(K(e.id1),lt(e.id2,e.id1),e.id2=`interface${Q.length-1}`):(K(e.id1),K(e.id2)),e.id1=M(e.id1).className,e.id2=M(e.id2).className,e.relationTitle1=I.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=I.sanitizeText(e.relationTitle2.trim(),D()),ke.push(e)},"addRelation"),Rt=u(function(e,i){const a=M(e).className;g.get(a).annotations.push(i)},"addAnnotation"),ct=u(function(e,i){K(e);const a=M(e).className,l=g.get(a);if(typeof i=="string"){const c=i.trim();c.startsWith("<<")&&c.endsWith(">>")?l.annotations.push(R(c.substring(2,c.length-2))):c.indexOf(")")>0?l.methods.push(new at(c,"method")):c&&l.members.push(new at(c,"attribute"))}},"addMember"),Mt=u(function(e,i){Array.isArray(i)&&(i.reverse(),i.forEach(a=>ct(e,a)))},"addMembers"),Gt=u(function(e,i){const a={id:`note${ne.length}`,class:i,text:e};ne.push(a)},"addNote"),Ut=u(function(e){return e.startsWith(":")&&(e=e.substring(1)),R(e.trim())},"cleanupLabel"),je=u(function(e,i){e.split(",").forEach(function(a){let l=a;/\d/.exec(a[0])&&(l=Ee+l);const c=g.get(l);c&&(c.cssClasses+=" "+i)})},"setCssClass"),zt=u(function(e,i){for(const a of e){let l=rt.get(a);l===void 0&&(l={id:a,styles:[],textStyles:[]},rt.set(a,l)),i&&i.forEach(function(c){if(/color/.exec(c)){const r=c.replace("fill","bgFill");l.textStyles.push(r)}l.styles.push(c)}),g.forEach(c=>{c.cssClasses.includes(a)&&c.styles.push(...i.flatMap(r=>r.split(",")))})}},"defineClass"),Kt=u(function(e,i){e.split(",").forEach(function(a){i!==void 0&&(g.get(a).tooltip=R(i))})},"setTooltip"),Yt=u(function(e,i){return i&&L.has(i)?L.get(i).classes.get(e).tooltip:g.get(e).tooltip},"getTooltip"),Qt=u(function(e,i,a){const l=D();e.split(",").forEach(function(c){let r=c;/\d/.exec(c[0])&&(r=Ee+r);const A=g.get(r);A&&(A.link=We.formatUrl(i,l),l.securityLevel==="sandbox"?A.linkTarget="_top":typeof a=="string"?A.linkTarget=R(a):A.linkTarget="_blank")}),je(e,"clickable")},"setLink"),Wt=u(function(e,i,a){e.split(",").forEach(function(l){jt(l,i,a),g.get(l).haveCallback=!0}),je(e,"clickable")},"setClickEvent"),jt=u(function(e,i,a){const l=I.sanitizeText(e,D());if(D().securityLevel!=="loose"||i===void 0)return;const r=l;if(g.has(r)){const A=ot(r);let f=[];if(typeof a=="string"){f=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let T=0;T")),c.classed("hover",!0)}).on("mouseout",function(){i.transition().duration(500).style("opacity",0),ie(this).classed("hover",!1)})},"setupToolTips");ae.push(ht);var Xe="TB",pt=u(()=>Xe,"getDirection"),Ht=u(e=>{Xe=e},"setDirection"),Jt=u(function(e){L.has(e)||(L.set(e,{id:e,classes:new Map,children:{},domId:Ee+e+"-"+Ye}),Ye++)},"addNamespace"),Zt=u(function(e){return L.get(e)},"getNamespace"),$t=u(function(){return L},"getNamespaces"),es=u(function(e,i){if(L.has(e))for(const a of i){const{className:l}=M(a);g.get(l).parent=e,L.get(e).classes.set(l,g.get(l))}},"addClassesToNamespace"),ts=u(function(e,i){const a=g.get(e);if(!(!i||!a))for(const l of i)l.includes(",")?a.styles.push(...l.split(",")):a.styles.push(l)},"setCssStyle");function Qe(e){let i;switch(e){case 0:i="aggregation";break;case 1:i="extension";break;case 2:i="composition";break;case 3:i="dependency";break;case 4:i="lollipop";break;default:i="none"}return i}u(Qe,"getArrowMarker");var ss=u(()=>{var c;const e=[],i=[],a=D();for(const r of L.keys()){const A=L.get(r);if(A){const f={id:A.id,label:A.id,isGroup:!0,padding:a.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:a.look};e.push(f)}}for(const r of g.keys()){const A=g.get(r);if(A){const f=A;f.parentId=A.parent,f.look=a.look,e.push(f)}}let l=0;for(const r of ne){l++;const A={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:a.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${a.themeVariables.noteBkgColor}`,`stroke: ${a.themeVariables.noteBorderColor}`],look:a.look};e.push(A);const f=((c=g.get(r.class))==null?void 0:c.id)??"";if(f){const T={id:`edgeNote${l}`,start:r.id,end:f,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:a.look};i.push(T)}}for(const r of Q){const A={id:r.id,label:r.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:a.look};e.push(A)}l=0;for(const r of ke){l++;const A={id:St(r.id1,r.id2,{prefix:"id",counter:l}),start:r.id1,end:r.id2,type:"normal",label:r.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:Qe(r.relation.type1),arrowTypeEnd:Qe(r.relation.type2),startLabelRight:r.relationTitle1==="none"?"":r.relationTitle1,endLabelLeft:r.relationTitle2==="none"?"":r.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:r.style||"",pattern:r.relation.lineType==1?"dashed":"solid",look:a.look};i.push(A)}return{nodes:e,edges:i,other:{},config:a,direction:pt()}},"getData"),cs={setAccTitle:Dt,getAccTitle:Ft,getAccDescription:Tt,setAccDescription:yt,getConfig:u(()=>D().class,"getConfig"),addClass:K,bindFunctions:Xt,clear:xt,getClass:It,getClasses:Ot,getNotes:Vt,addAnnotation:Rt,addNote:Gt,getRelations:wt,addRelation:Pt,getDirection:pt,setDirection:Ht,addMember:ct,addMembers:Mt,cleanupLabel:Ut,lineType:qt,relationType:w,setClickEvent:Wt,setCssClass:je,defineClass:zt,setLink:Qt,getTooltip:Yt,setTooltip:Kt,lookUpDomId:ot,setDiagramTitle:bt,getDiagramTitle:kt,setClassLabel:Lt,addNamespace:Jt,addClassesToNamespace:es,getNamespace:Zt,getNamespaces:$t,setCssStyle:ts,getData:ss},is=u(e=>`g.classGroup text { fill: ${e.nodeBorder||e.classText}; stroke: none; font-family: ${e.fontFamily}; @@ -161,4 +161,4 @@ g.classGroup line { font-size: 18px; fill: ${e.textColor}; } -`,"getStyles"),hs=is,ns=u((e,i="TB")=>{if(!e.doc)return i;let a=i;for(const l of e.doc)l.stmt==="dir"&&(a=l.value);return a},"getDir"),as=u(function(e,i){return i.db.getClasses()},"getClasses"),rs=u(async function(e,i,a,l){ze.info("REF0:"),ze.info("Drawing class diagram (v3)",i);const{securityLevel:c,state:r,layout:f}=D(),A=l.db.getData(),T=mt(i,c);A.type=l.type,A.layoutAlgorithm=vt(f),A.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,A.rankSpacing=(r==null?void 0:r.rankSpacing)||50,A.markers=["aggregation","extension","composition","dependency","lollipop"],A.diagramId=i,await Nt(A,T);const S=8;Qe.insertTitle(T,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,l.db.getDiagramTitle()),Et(T,S,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),ps={getClasses:as,draw:rs,getDir:ns};export{cs as a,ps as b,os as c,hs as s}; +`,"getStyles"),hs=is,ns=u((e,i="TB")=>{if(!e.doc)return i;let a=i;for(const l of e.doc)l.stmt==="dir"&&(a=l.value);return a},"getDir"),as=u(function(e,i){return i.db.getClasses()},"getClasses"),rs=u(async function(e,i,a,l){ze.info("REF0:"),ze.info("Drawing class diagram (v3)",i);const{securityLevel:c,state:r,layout:A}=D(),f=l.db.getData(),T=mt(i,c);f.type=l.type,f.layoutAlgorithm=_t(A),f.nodeSpacing=(r==null?void 0:r.nodeSpacing)||50,f.rankSpacing=(r==null?void 0:r.rankSpacing)||50,f.markers=["aggregation","extension","composition","dependency","lollipop"],f.diagramId=i,await Bt(f,T);const S=8;We.insertTitle(T,"classDiagramTitleText",(r==null?void 0:r.titleTopMargin)??25,l.db.getDiagramTitle()),Et(T,S,"classDiagram",(r==null?void 0:r.useMaxWidth)??!0)},"draw"),ps={getClasses:as,draw:rs,getDir:ns};export{cs as a,os as b,ps as c,hs as s}; diff --git a/static/js/md-chunk-TMUBEWPD-BBh5DnEp.js b/static/js/md-chunk-TMUBEWPD-zEBQnby0.js similarity index 78% rename from static/js/md-chunk-TMUBEWPD-BBh5DnEp.js rename to static/js/md-chunk-TMUBEWPD-zEBQnby0.js index d8fd03123..e5ab407b9 100644 --- a/static/js/md-chunk-TMUBEWPD-BBh5DnEp.js +++ b/static/js/md-chunk-TMUBEWPD-zEBQnby0.js @@ -1 +1 @@ -import{_ as l}from"./md-index-BVqvVggs.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; +import{_ as l}from"./md-index-B8Nim9kS.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; diff --git a/static/js/md-classDiagram-LNE6IOMH-DwgqSvqZ.js b/static/js/md-classDiagram-LNE6IOMH-DwgqSvqZ.js deleted file mode 100644 index b46074d28..000000000 --- a/static/js/md-classDiagram-LNE6IOMH-DwgqSvqZ.js +++ /dev/null @@ -1 +0,0 @@ -import{c as s,a as r,b as e,s as l}from"./md-chunk-T2TOU4HS-BjDahP4G.js";import{_ as t}from"./md-index-BVqvVggs.js";import"./md-chunk-5HRBRIJM-CXxgtuoQ.js";var _={parser:s,db:r,renderer:e,styles:l,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; diff --git a/static/js/md-classDiagram-LNE6IOMH-RQypru8j.js b/static/js/md-classDiagram-LNE6IOMH-RQypru8j.js new file mode 100644 index 000000000..8f3739cbd --- /dev/null +++ b/static/js/md-classDiagram-LNE6IOMH-RQypru8j.js @@ -0,0 +1 @@ +import{s,c as e,a as r,b as l}from"./md-chunk-T2TOU4HS-u24tjTRY.js";import{_ as t}from"./md-index-B8Nim9kS.js";import"./md-chunk-5HRBRIJM-Dc3xF8et.js";var _={parser:l,db:r,renderer:e,styles:s,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; diff --git a/static/js/md-classDiagram-v2-MQ7JQ4JX-DwgqSvqZ.js b/static/js/md-classDiagram-v2-MQ7JQ4JX-DwgqSvqZ.js deleted file mode 100644 index b46074d28..000000000 --- a/static/js/md-classDiagram-v2-MQ7JQ4JX-DwgqSvqZ.js +++ /dev/null @@ -1 +0,0 @@ -import{c as s,a as r,b as e,s as l}from"./md-chunk-T2TOU4HS-BjDahP4G.js";import{_ as t}from"./md-index-BVqvVggs.js";import"./md-chunk-5HRBRIJM-CXxgtuoQ.js";var _={parser:s,db:r,renderer:e,styles:l,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; diff --git a/static/js/md-classDiagram-v2-MQ7JQ4JX-RQypru8j.js b/static/js/md-classDiagram-v2-MQ7JQ4JX-RQypru8j.js new file mode 100644 index 000000000..8f3739cbd --- /dev/null +++ b/static/js/md-classDiagram-v2-MQ7JQ4JX-RQypru8j.js @@ -0,0 +1 @@ +import{s,c as e,a as r,b as l}from"./md-chunk-T2TOU4HS-u24tjTRY.js";import{_ as t}from"./md-index-B8Nim9kS.js";import"./md-chunk-5HRBRIJM-Dc3xF8et.js";var _={parser:l,db:r,renderer:e,styles:s,init:t(a=>{a.class||(a.class={}),a.class.arrowMarkerAbsolute=a.arrowMarkerAbsolute,r.clear()},"init")};export{_ as diagram}; diff --git a/static/js/md-clone-ByE4h4D7.js b/static/js/md-clone-ByE4h4D7.js new file mode 100644 index 000000000..66c401cf4 --- /dev/null +++ b/static/js/md-clone-ByE4h4D7.js @@ -0,0 +1 @@ +import{b as r}from"./md-_baseUniq-DU1ET3rn.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/static/js/md-clone-DXToIaWo.js b/static/js/md-clone-DXToIaWo.js deleted file mode 100644 index f1cc9eacc..000000000 --- a/static/js/md-clone-DXToIaWo.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r}from"./md-_baseUniq-BgyQXxRT.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/static/js/md-cytoscape.esm-BSw61sAN.js b/static/js/md-cytoscape.esm-BSw61sAN.js new file mode 100644 index 000000000..477114d83 --- /dev/null +++ b/static/js/md-cytoscape.esm-BSw61sAN.js @@ -0,0 +1,191 @@ +import{aq as os}from"./md-index-B8Nim9kS.js";function fo(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,s=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return o=l.done,l},e:function(l){s=!0,i=l},f:function(){try{o||t.return==null||t.return()}finally{if(s)throw i}}}}function Ml(r,e,t){return(e=Il(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ff(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function qf(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,o,s=[],l=!0,u=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(a=i.call(t)).done)&&(s.push(a.value),s.length!==e);l=!0);}catch(v){u=!0,n=v}finally{try{if(!l&&t.return!=null&&(o=t.return(),Object(o)!==o))return}finally{if(u)throw n}}return s}}function Vf(){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 _f(){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 je(r,e){return Of(r)||qf(r,e)||Ro(r,e)||Vf()}function Ll(r){return Nf(r)||Ff(r)||Ro(r)||_f()}function Gf(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function Il(r){var e=Gf(r,"string");return typeof e=="symbol"?e:e+""}function Ue(r){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue(r)}function Ro(r,e){if(r){if(typeof r=="string")return fo(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fo(r,e):void 0}}var Ke=typeof window>"u"?null:window,ss=Ke?Ke.navigator:null;Ke&&Ke.document;var Hf=Ue(""),Ol=Ue({}),Kf=Ue(function(){}),$f=typeof HTMLElement>"u"?"undefined":Ue(HTMLElement),Ea=function(e){return e&&e.instanceString&&_e(e.instanceString)?e.instanceString():null},fe=function(e){return e!=null&&Ue(e)==Hf},_e=function(e){return e!=null&&Ue(e)===Kf},Le=function(e){return!br(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},ke=function(e){return e!=null&&Ue(e)===Ol&&!Le(e)&&e.constructor===Object},Uf=function(e){return e!=null&&Ue(e)===Ol},ae=function(e){return e!=null&&Ue(e)===Ue(1)&&!isNaN(e)},Wf=function(e){return ae(e)&&Math.floor(e)===e},sn=function(e){if($f!=="undefined")return e!=null&&e instanceof HTMLElement},br=function(e){return Ca(e)||Nl(e)},Ca=function(e){return Ea(e)==="collection"&&e._private.single},Nl=function(e){return Ea(e)==="collection"&&!e._private.single},Mo=function(e){return Ea(e)==="core"},zl=function(e){return Ea(e)==="stylesheet"},Yf=function(e){return Ea(e)==="event"},rt=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Xf=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Zf=function(e){return ke(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},Qf=function(e){return Uf(e)&&_e(e.then)},Jf=function(){return ss&&ss.userAgent.match(/msie|trident|edge/i)},ca=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;ot?1:0},ic=function(e,t){return-1*ql(e,t)},ge=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(g-=1),g<1/6?h+(y-h)*6*g:g<1/2?y:g<2/3?h+(y-h)*(2/3-g)*6:h}var f=new RegExp("^"+rc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(n===0)s=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,d=2*i-c;s=Math.round(255*v(d,c,a+1/3)),l=Math.round(255*v(d,c,a)),u=Math.round(255*v(d,c,a-1/3))}t=[s,l,u,o]}return t},uc=function(e){var t,a=new RegExp("^"+jf+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var o=a[i];if(o[o.length-1]==="%"&&(n[i]=!0),o=parseFloat(o),n[i]&&(o=o/100*255),o<0||o>255)return;t.push(Math.floor(o))}var s=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(s&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;t.push(u)}}return t},lc=function(e){return vc[e.toLowerCase()]},Vl=function(e){return(Le(e)?e:null)||lc(e)||oc(e)||uc(e)||sc(e)},vc={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},_l=function(e){for(var t=e.map,a=e.keys,n=a.length,i=0;i=l||R<0||m&&L>=c}function S(){var P=e();if(x(P))return k(P);h=setTimeout(S,C(P))}function k(P){return h=void 0,b&&v?w(P):(v=f=void 0,d)}function A(){h!==void 0&&clearTimeout(h),g=0,v=y=f=h=void 0}function D(){return h===void 0?d:k(e())}function B(){var P=e(),R=x(P);if(v=arguments,f=this,y=P,R){if(h===void 0)return E(y);if(m)return clearTimeout(h),h=setTimeout(S,l),w(y)}return h===void 0&&(h=setTimeout(S,l)),d}return B.cancel=A,B.flush=D,B}return jn=o,jn}var wc=bc(),ka=Ta(wc),ei=Ke?Ke.performance:null,Kl=ei&&ei.now?function(){return ei.now()}:function(){return Date.now()},xc=function(){if(Ke){if(Ke.requestAnimationFrame)return function(r){Ke.requestAnimationFrame(r)};if(Ke.mozRequestAnimationFrame)return function(r){Ke.mozRequestAnimationFrame(r)};if(Ke.webkitRequestAnimationFrame)return function(r){Ke.webkitRequestAnimationFrame(r)};if(Ke.msRequestAnimationFrame)return function(r){Ke.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(Kl())},1e3/60)}}(),un=function(e){return xc(e)},Kr=Kl,Mt=9261,$l=65599,ia=5381,Ul=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mt,a=t,n;n=e.next(),!n.done;)a=a*$l+n.value|0;return a},ha=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Mt;return t*$l+e|0},da=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ia;return(t<<5)+t+e|0},Ec=function(e,t){return e*2097152+t},Yr=function(e){return e[0]*2097152+e[1]},za=function(e,t){return[ha(e[0],t[0]),da(e[1],t[1])]},Cc=function(e,t){var a={value:0,done:!1},n=0,i=e.length,o={next:function(){return n=0;n--)e[n]===t&&e.splice(n,1)},zo=function(e){e.splice(0,e.length)},Bc=function(e,t){for(var a=0;a"u"?"undefined":Ue(Set))!==Mc?Set:Lc,En=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!Mo(e)){Ve("An element must have a core reference and parameters set");return}var n=t.group;if(n==null&&(t.data&&t.data.source!=null&&t.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){Ve("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?n==="edges":!!t.pannable,active:!1,classes:new Kt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),t.renderedPosition){var o=t.renderedPosition,s=e.pan(),l=e.zoom();i.position={x:(o.x-s.x)/l,y:(o.y-s.y)/l}}var u=[];Le(t.classes)?u=t.classes:fe(t.classes)&&(u=t.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(p,m,b,w,E){var C;if(b==null&&(b=0),E==null&&(E=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=p.length);bA;0<=A?k++:k--)S.push(k);return S}).apply(this).reverse(),x=[],w=0,E=C.length;wD;0<=D?++S:--S)B.push(o(p,b));return B},y=function(p,m,b,w){var E,C,x;for(w==null&&(w=a),E=p[b];b>m;){if(x=b-1>>1,C=p[x],w(E,C)<0){p[b]=C,b=x;continue}break}return p[b]=E},g=function(p,m,b){var w,E,C,x,S;for(b==null&&(b=a),E=p.length,S=m,C=p[m],w=2*m+1;w0;){var C=m.pop(),x=g(C),S=C.id();if(c[S]=x,x!==1/0)for(var k=C.neighborhood().intersect(h),A=0;A0)for(O.unshift(M);f[H];){var z=f[H];O.unshift(z.edge),O.unshift(z.node),_=z.node,H=_.id()}return s.spawn(O)}}}},Vc={kruskal:function(e){e=e||function(b){return 1};for(var t=this.byGroup(),a=t.nodes,n=t.edges,i=a.length,o=new Array(i),s=a,l=function(w){for(var E=0;E0;){if(E(),x++,w===v){for(var S=[],k=i,A=v,D=p[A];S.unshift(k),D!=null&&S.unshift(D),k=g[A],k!=null;)A=k.id(),D=p[A];return{found:!0,distance:f[w],path:this.spawn(S),steps:x}}d[w]=!0;for(var B=b._private.edges,P=0;PD&&(h[A]=D,m[A]=k,b[A]=E),!i){var B=k*v+S;!i&&h[B]>D&&(h[B]=D,m[B]=S,b[B]=E)}}}for(var P=0;P1&&arguments[1]!==void 0?arguments[1]:o,he=b(oe),ye=[],de=he;;){if(de==null)return t.spawn();var me=m(de),Ce=me.edge,Se=me.pred;if(ye.unshift(de[0]),de.same(ue)&&ye.length>0)break;Ce!=null&&ye.unshift(Ce),de=Se}return l.spawn(ye)},C=0;C=0;v--){var f=u[v],c=f[1],d=f[2];(t[c]===s&&t[d]===l||t[c]===l&&t[d]===s)&&u.splice(v,1)}for(var h=0;hn;){var i=Math.floor(Math.random()*t.length);t=Yc(i,e,t),a--}return t},Xc={kargerStein:function(){var e=this,t=this.byGroup(),a=t.nodes,n=t.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,o=n.length,s=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/Wc);if(i<2){Ve("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,o=t;o1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(t,a):(a0&&e.splice(0,t));for(var s=0,l=e.length-1;l>=0;l--){var u=e[l];o?isFinite(u)||(e[l]=-1/0,s++):e.splice(l,1)}i&&e.sort(function(c,d){return c-d});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+s]:(e[f-1+s]+e[f+s])/2},rh=function(e){return Math.PI*e/180},Fa=function(e,t){return Math.atan2(t,e)-Math.PI/2},Fo=Math.log2||function(r){return Math.log(r)/Math.log(2)},jl=function(e){return e>0?1:e<0?-1:0},yt=function(e,t){return Math.sqrt(ct(e,t))},ct=function(e,t){var a=t.x-e.x,n=t.y-e.y;return a*a+n*n},th=function(e){for(var t=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},nh=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},ih=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},oh=function(e,t,a){return{x1:e.x1+t,x2:e.x2+t,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},ev=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},sh=function(e,t,a){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},Za=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Qa=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,o;if(t.length===1)a=n=i=o=t[0];else if(t.length===2)a=i=t[0],o=n=t[1];else if(t.length===4){var s=je(t,4);a=s[0],n=s[1],i=s[2],o=s[3]}return e.x1-=o,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Ps=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},qo=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},Vt=function(e,t,a){return e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2},uh=function(e,t){return Vt(e,t.x,t.y)},rv=function(e,t){return Vt(e,t.x1,t.y1)&&Vt(e,t.x2,t.y2)},tv=function(e,t,a,n,i,o,s){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?mt(i,o):l,v=i/2,f=o/2;u=Math.min(u,v,f);var c=u!==v,d=u!==f,h;if(c){var y=a-v+u-s,g=n-f-s,p=a+v-u+s,m=g;if(h=Jr(e,t,a,n,y,g,p,m,!1),h.length>0)return h}if(d){var b=a+v+s,w=n-f+u-s,E=b,C=n+f-u+s;if(h=Jr(e,t,a,n,b,w,E,C,!1),h.length>0)return h}if(c){var x=a-v+u-s,S=n+f+s,k=a+v-u+s,A=S;if(h=Jr(e,t,a,n,x,S,k,A,!1),h.length>0)return h}if(d){var D=a-v-s,B=n-f+u-s,P=D,R=n+f-u+s;if(h=Jr(e,t,a,n,D,B,P,R,!1),h.length>0)return h}var L;{var I=a-v+u,M=n-f+u;if(L=oa(e,t,a,n,I,M,u+s),L.length>0&&L[0]<=I&&L[1]<=M)return[L[0],L[1]]}{var O=a+v-u,_=n-f+u;if(L=oa(e,t,a,n,O,_,u+s),L.length>0&&L[0]>=O&&L[1]<=_)return[L[0],L[1]]}{var H=a+v-u,z=n+f-u;if(L=oa(e,t,a,n,H,z,u+s),L.length>0&&L[0]>=H&&L[1]>=z)return[L[0],L[1]]}{var G=a-v+u,W=n+f-u;if(L=oa(e,t,a,n,G,W,u+s),L.length>0&&L[0]<=G&&L[1]>=W)return[L[0],L[1]]}return[]},lh=function(e,t,a,n,i,o,s){var l=s,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,o),c=Math.max(n,o);return u-l<=e&&e<=v+l&&f-l<=t&&t<=c+l},vh=function(e,t,a,n,i,o,s,l,u){var v={x1:Math.min(a,s,i)-u,x2:Math.max(a,s,i)+u,y1:Math.min(n,l,o)-u,y2:Math.max(n,l,o)+u};return!(ev.x2||tv.y2)},fh=function(e,t,a,n){a-=n;var i=t*t-4*e*a;if(i<0)return[];var o=Math.sqrt(i),s=2*e,l=(-t+o)/s,u=(-t-o)/s;return[l,u]},ch=function(e,t,a,n,i){var o=1e-5;e===0&&(e=o),t/=e,a/=e,n/=e;var s,l,u,v,f,c,d,h;if(l=(3*a-t*t)/9,u=-(27*n)+t*(9*a-2*(t*t)),u/=54,s=l*l*l+u*u,i[1]=0,d=t/3,s>0){f=u+Math.sqrt(s),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(s),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-d+f+c,d+=(f+c)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-c+f)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,s===0){h=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-d+2*h,i[4]=i[2]=-(h+d);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),h=2*Math.sqrt(l),i[0]=-d+h*Math.cos(v/3),i[2]=-d+h*Math.cos((v+2*Math.PI)/3),i[4]=-d+h*Math.cos((v+4*Math.PI)/3)},hh=function(e,t,a,n,i,o,s,l){var u=1*a*a-4*a*i+2*a*s+4*i*i-4*i*s+s*s+n*n-4*n*o+2*n*l+4*o*o-4*o*l+l*l,v=1*9*a*i-3*a*a-3*a*s-6*i*i+3*i*s+9*n*o-3*n*n-3*n*l-6*o*o+3*o*l,f=1*3*a*a-6*a*i+a*s-a*e+2*i*i+2*i*e-s*e+3*n*n-6*n*o+n*l-n*t+2*o*o+2*o*t-l*t,c=1*a*i-a*a+a*e-i*e+n*o-n*n+n*t-o*t,d=[];ch(u,v,f,c,d);for(var h=1e-7,y=[],g=0;g<6;g+=2)Math.abs(d[g+1])=0&&d[g]<=1&&y.push(d[g]);y.push(1),y.push(0);for(var p=-1,m,b,w,E=0;E=0?wu?(e-i)*(e-i)+(t-o)*(t-o):v-c},gr=function(e,t,a){for(var n,i,o,s,l,u=0,v=0;v=e&&e>=o||n<=e&&e<=o)l=(e-n)/(o-n)*(s-i)+i,l>t&&u++;else continue;return u%2!==0},$r=function(e,t,a,n,i,o,s,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),d=Math.sin(-f),h=0;h0){var g=fn(v,-u);y=vn(g)}else y=v;return gr(e,t,y)},gh=function(e,t,a,n,i,o,s,l){for(var u=new Array(a.length*2),v=0;v=0&&g<=1&&m.push(g),p>=0&&p<=1&&m.push(p),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+t;if(m.length>1){if(m[0]==m[1])return[b,w];var E=m[1]*l[0]+e,C=m[1]*l[1]+t;return[b,w,E,C]}else return[b,w]},ai=function(e,t,a){return t<=e&&e<=a||a<=e&&e<=t?e:e<=t&&t<=a||a<=t&&t<=e?t:a},Jr=function(e,t,a,n,i,o,s,l,u){var v=e-i,f=a-e,c=s-i,d=t-o,h=n-t,y=l-o,g=c*d-y*v,p=f*d-h*v,m=y*f-c*h;if(m!==0){var b=g/m,w=p/m,E=.001,C=0-E,x=1+E;return C<=b&&b<=x&&C<=w&&w<=x?[e+b*f,t+b*h]:u?[e+b*f,t+b*h]:[]}else return g===0||p===0?ai(e,a,s)===s?[s,l]:ai(e,a,i)===i?[i,o]:ai(i,s,a)===a?[a,n]:[]:[]},ya=function(e,t,a,n,i,o,s,l){var u=[],v,f=new Array(a.length),c=!0;o==null&&(c=!1);var d;if(c){for(var h=0;h0){var y=fn(f,-l);d=vn(y)}else d=f}else d=a;for(var g,p,m,b,w=0;w2){for(var h=[v[0],v[1]],y=Math.pow(h[0]-e,2)+Math.pow(h[1]-t,2),g=1;gv&&(v=w)},get:function(b){return u[b]}},c=0;c0?L=R.edgesTo(P)[0]:L=P.edgesTo(R)[0];var I=n(L);P=P.id(),x[P]>x[D]+I&&(x[P]=x[D]+I,S.nodes.indexOf(P)<0?S.push(P):S.updateItem(P),C[P]=0,E[P]=[]),x[P]==x[D]+I&&(C[P]=C[P]+C[D],E[P].push(D))}else for(var M=0;M0;){for(var z=w.pop(),G=0;G0&&s.push(a[l]);s.length!==0&&i.push(n.collection(s))}return i},Rh=function(e,t){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:Ih,s=n,l,u,v=0;v=2?jt(e,t,a,0,Ls,Oh):jt(e,t,a,0,Ms)},squaredEuclidean:function(e,t,a){return jt(e,t,a,0,Ls)},manhattan:function(e,t,a){return jt(e,t,a,0,Ms)},max:function(e,t,a){return jt(e,t,a,-1/0,Nh)}};_t["squared-euclidean"]=_t.squaredEuclidean;_t.squaredeuclidean=_t.squaredEuclidean;function Tn(r,e,t,a,n,i){var o;return _e(r)?o=r:o=_t[r]||_t.euclidean,e===0&&_e(r)?o(n,i):o(e,t,a,n,i)}var zh=We({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),_o=function(e){return zh(e)},cn=function(e,t,a,n,i){var o=i!=="kMedoids",s=o?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](t)},u=a,v=t;return Tn(e,n.length,s,l,u,v)},ni=function(e,t,a){for(var n=a.length,i=new Array(n),o=new Array(n),s=new Array(t),l=null,u=0;ua)return!1}return!0},Vh=function(e,t,a){for(var n=0;ns&&(s=t[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var h=t[o],y=t[n[o]],g;i.mode==="dendrogram"?g={left:h,right:y,key:h.key}:g={value:h.value.concat(y.value),key:h.key},e[h.index]=g,e.splice(y.index,1),t[h.key]=g;for(var p=0;pa[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[h.key][m.key],a[h.key][m.key]0&&n.push(i);return n},qs=function(e,t,a){for(var n=[],i=0;is&&(o=u,s=t[i*e+u])}o>0&&n.push(o)}for(var v=0;vu&&(l=v,u=f)}a[i]=o[l]}return n=qs(e,t,a),n},Vs=function(e){for(var t=this.cy(),a=this.nodes(),n=Jh(e),i={},o=0;o=D?(B=D,D=R,P=L):R>B&&(B=R);for(var I=0;I0?1:0;x[k%n.minIterations*s+G]=W,z+=W}if(z>0&&(k>=n.minIterations-1||k==n.maxIterations-1)){for(var X=0,Z=0;Z1||C>1)&&(s=!0),f[b]=[],m.outgoers().forEach(function(S){S.isEdge()&&f[b].push(S.id())})}else c[b]=[void 0,m.target().id()]}):o.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?s=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(E){return f[b].push(E.id())})}else c[b]=[m.source().id(),m.target().id()]});var d={found:!1,trail:void 0};if(s)return d;if(u&&l)if(i){if(v&&u!=v)return d;v=u}else{if(v&&u!=v&&l!=v)return d;v||(v=u)}else v||(v=o[0].id());var h=function(b){for(var w=b,E=[b],C,x,S;f[w].length;)C=f[w].shift(),x=c[C][0],S=c[C][1],w!=S?(f[S]=f[S].filter(function(k){return k!=C}),w=S):!i&&w!=x&&(f[x]=f[x].filter(function(k){return k!=C}),w=x),E.unshift(C),E.unshift(w);return E},y=[],g=[];for(g=h(v);g.length!=1;)f[g[0]].length==0?(y.unshift(o.getElementById(g.shift())),y.unshift(o.getElementById(g.shift()))):g=h(g.shift()).concat(g);y.unshift(o.getElementById(g.shift()));for(var p in f)if(f[p].length)return d;return d.found=!0,d.trail=this.spawn(y,!0),d}},Va=function(){var e=this,t={},a=0,n=0,i=[],o=[],s={},l=function(c,d){for(var h=o.length-1,y=[],g=e.spawn();o[h].x!=c||o[h].y!=d;)y.push(o.pop().edge),h--;y.push(o.pop().edge),y.forEach(function(p){var m=p.connectedNodes().intersection(e);g.merge(p),m.forEach(function(b){var w=b.id(),E=b.connectedEdges().intersection(e);g.merge(b),t[w].cutVertex?g.merge(E.filter(function(C){return C.isLoop()})):g.merge(E)})}),i.push(g)},u=function(c,d,h){c===h&&(n+=1),t[d]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(d).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(d)));else{var g,p,m,b;y.forEach(function(w){g=w.source().id(),p=w.target().id(),m=g===d?p:g,m!==h&&(b=w.id(),s[b]||(s[b]=!0,o.push({x:d,y:m,edge:w})),m in t?t[d].low=Math.min(t[d].low,t[m].id):(u(c,m,d),t[d].low=Math.min(t[d].low,t[m].low),t[d].id<=t[m].low&&(t[d].cutVertex=!0,l(d,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in t||(n=0,u(c,c),t[c].cutVertex=n>1)}});var v=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},od={hopcroftTarjanBiconnected:Va,htbc:Va,htb:Va,hopcroftTarjanBiconnectedComponents:Va},_a=function(){var e=this,t={},a=0,n=[],i=[],o=e.spawn(e),s=function(u){i.push(u),t[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var g=y.target().id();g!==u&&(g in t||s(g),t[g].explored||(t[u].low=Math.min(t[u].low,t[g].low)))}),t[u].index===t[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),t[c].low=t[u].index,t[c].explored=!0,c===u)break}var d=f.edgesWith(f),h=f.merge(d);n.push(h),o=o.difference(h)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in t||s(u)}}),{cut:o,components:n}},sd={tarjanStronglyConnected:_a,tsc:_a,tscc:_a,tarjanStronglyConnectedComponents:_a},lv={};[ga,qc,Vc,Gc,Kc,Uc,Xc,wh,zt,Ft,go,Lh,Uh,Zh,ad,id,od,sd].forEach(function(r){ge(lv,r)});/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/var vv=0,fv=1,cv=2,Br=function(e){if(!(this instanceof Br))return new Br(e);this.id="Thenable/1.0.7",this.state=vv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Br.prototype={fulfill:function(e){return _s(this,fv,"fulfillValue",e)},reject:function(e){return _s(this,cv,"rejectReason",e)},then:function(e,t){var a=this,n=new Br;return a.onFulfilled.push(Hs(e,n,"fulfill")),a.onRejected.push(Hs(t,n,"reject")),hv(a),n.proxy}};var _s=function(e,t,a,n){return e.state===vv&&(e.state=t,e[a]=n,hv(e)),e},hv=function(e){e.state===fv?Gs(e,"onFulfilled",e.fulfillValue):e.state===cv&&Gs(e,"onRejected",e.rejectReason)},Gs=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var s=0;s0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o-1}return Di=e,Di}var ki,cu;function Dd(){if(cu)return ki;cu=1;var r=kn();function e(t,a){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,a])):n[i][1]=a,this}return ki=e,ki}var Pi,hu;function kd(){if(hu)return Pi;hu=1;var r=Ed(),e=Cd(),t=Td(),a=Sd(),n=Dd();function i(o){var s=-1,l=o==null?0:o.length;for(this.clear();++s-1&&a%1==0&&a0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){Le(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=t===void 0,i=[],o=0,s=a.length;o0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var a=this;if(t==null)t=250;else if(t===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},t),a}};Ja.className=Ja.classNames=Ja.classes;var De={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:$e,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};De.variable="(?:[\\w-.]|(?:\\\\"+De.metaChar+"))+";De.className="(?:[\\w-]|(?:\\\\"+De.metaChar+"))+";De.value=De.string+"|"+De.number;De.id=De.variable;(function(){var r,e,t;for(r=De.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(De.comparatorOp+="|\\!"+e)})();var Me=function(){return{checks:[]}},se={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},bo=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return ic(r.selector,e.selector)}),ng=function(){for(var r={},e,t=0;t0&&v.edgeCount>0)return Re("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Re("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Re("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},vg=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},t=function(v){return fe(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,d=v.value;switch(c){case se.GROUP:{var h=e(d);return h.substring(0,h.length-1)}case se.DATA_COMPARE:{var y=v.field,g=v.operator;return"["+y+a(e(g))+t(d)+"]"}case se.DATA_BOOL:{var p=v.operator,m=v.field;return"["+e(p)+m+"]"}case se.DATA_EXIST:{var b=v.field;return"["+b+"]"}case se.META_COMPARE:{var w=v.operator,E=v.field;return"[["+E+a(e(w))+t(d)+"]]"}case se.STATE:return d;case se.ID:return"#"+d;case se.CLASS:return"."+d;case se.PARENT:case se.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case se.ANCESTOR:case se.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case se.COMPOUND_SPLIT:{var C=i(v.left,f),x=i(v.subject,f),S=i(v.right,f);return C+(C.length>0?" ":"")+x+S}case se.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,d,h){return c+(f===v&&h===0?"$":"")+n(d,f)},"")},o="",s=0;s1&&s=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),v=!0),(i||s||v)&&(l=!i&&!o?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),t){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),s&&a(n,i,v)}return r}function xv(r,e,t){if(t.isParent())for(var a=t._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return $o(this,r,e,xv)};function Ev(r,e,t){if(t.isChild()){var a=t._private.parent;e.has(a.id())||r.push(a)}}Gt.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return $o(this,r,e,Ev)};function mg(r,e,t){Ev(r,e,t),xv(r,e,t)}Gt.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return $o(this,r,e,mg)};Gt.ancestors=Gt.parents;var ma,Cv;ma=Cv={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Be.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Be.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};ma.attr=ma.data;ma.removeAttr=ma.removeData;var bg=Cv,An={};function to(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var a=0,n=t[0],i=n._private.edges,o=0;oe}),minIndegree:St("indegree",function(r,e){return re}),minOutdegree:St("outdegree",function(r,e){return re})});ge(An,{totalDegree:function(e){for(var t=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var d=c?v.position():{x:0,y:0};t!==void 0?u.position(e,t+d[e]):i!==void 0&&u.position({x:i.x+d.x,y:i.y+d.y})}else{var h=a.position(),y=s?a.parent():null,g=y&&y.length>0,p=g;g&&(y=y[0]);var m=p?y.position():{x:0,y:0};return i={x:h.x-m.x,y:h.y-m.y},e===void 0?i:i[e]}else if(!o)return;return this}};Ar.modelPosition=Ar.point=Ar.position;Ar.modelPositions=Ar.points=Ar.positions;Ar.renderedPoint=Ar.renderedPosition;Ar.relativePoint=Ar.relativePosition;var wg=Tv,qt,lt;qt=lt={};lt.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),a=t.zoom(),n=t.pan(),i=e.x1*a+n.x,o=e.x2*a+n.x,s=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}};lt.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var a=t._private;a.compoundBoundsClean=!1,a.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};lt.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(o){if(!o.isParent())return;var s=o._private,l=o.children(),u=o.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=s.position;(f.w===0||f.h===0)&&(f={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function d(k,A,D){var B=0,P=0,R=A+D;return k>0&&R>0&&(B=A/R*k,P=D/R*k),{biasDiff:B,biasComplementDiff:P}}function h(k,A,D,B){if(D.units==="%")switch(B){case"width":return k>0?D.pfValue*k:0;case"height":return A>0?D.pfValue*A:0;case"average":return k>0&&A>0?D.pfValue*(k+A)/2:0;case"min":return k>0&&A>0?k>A?D.pfValue*A:D.pfValue*k:0;case"max":return k>0&&A>0?k>A?D.pfValue*k:D.pfValue*A:0;default:return 0}else return D.units==="px"?D.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var g=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(g=g*100/v.width.val);var p=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(p=p*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=d(v.width.val-f.w,y,g),w=b.biasDiff,E=b.biasComplementDiff,C=d(v.height.val-f.h,p,m),x=C.biasDiff,S=C.biasComplementDiff;s.autoPadding=h(f.w,f.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),s.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+E)/2,s.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+S)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},ht=function(e,t){return t==null?e:Dr(e,t.x1,t.y1,t.x2,t.y2)},ea=function(e,t,a){return kr(e,t,a)},Ga=function(e,t,a){if(!t.cy().headless()){var n=t._private,i=n.rstyle,o=i.arrowWidth/2,s=t.pstyle(a+"-arrow-shape").value,l,u;if(s!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-o,f.y1=u-o,f.x2=l+o,f.y2=u+o,f.w=f.x2-f.x1,f.h=f.y2-f.y1,Za(f,1),Dr(e,f.x1,f.y1,f.x2,f.y2)}}},ao=function(e,t,a){if(!t.cy().headless()){var n;a?n=a+"-":n="";var i=t._private,o=i.rstyle,s=t.pstyle(n+"label").strValue;if(s){var l=t.pstyle("text-halign"),u=t.pstyle("text-valign"),v=ea(o,"labelWidth",a),f=ea(o,"labelHeight",a),c=ea(o,"labelX",a),d=ea(o,"labelY",a),h=t.pstyle(n+"text-margin-x").pfValue,y=t.pstyle(n+"text-margin-y").pfValue,g=t.isEdge(),p=t.pstyle(n+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,b=t.pstyle("text-border-width").pfValue,w=b/2,E=t.pstyle("text-background-padding").pfValue,C=2,x=f,S=v,k=S/2,A=x/2,D,B,P,R;if(g)D=c-k,B=c+k,P=d-A,R=d+A;else{switch(l.value){case"left":D=c-S,B=c;break;case"center":D=c-k,B=c+k;break;case"right":D=c,B=c+S;break}switch(u.value){case"top":P=d-x,R=d;break;case"center":P=d-A,R=d+A;break;case"bottom":P=d,R=d+x;break}}var L=h-Math.max(m,w)-E-C,I=h+Math.max(m,w)+E+C,M=y-Math.max(m,w)-E-C,O=y+Math.max(m,w)+E+C;D+=L,B+=I,P+=M,R+=O;var _=a||"main",H=i.labelBounds,z=H[_]=H[_]||{};z.x1=D,z.y1=P,z.x2=B,z.y2=R,z.w=B-D,z.h=R-P,z.leftPad=L,z.rightPad=I,z.topPad=M,z.botPad=O;var G=g&&p.strValue==="autorotate",W=p.pfValue!=null&&p.pfValue!==0;if(G||W){var X=G?ea(i.rstyle,"labelAngle",a):p.pfValue,Z=Math.cos(X),Q=Math.sin(X),j=(D+B)/2,re=(P+R)/2;if(!g){switch(l.value){case"left":j=B;break;case"right":j=D;break}switch(u.value){case"top":re=R;break;case"bottom":re=P;break}}var K=function(Ae,oe){return Ae=Ae-j,oe=oe-re,{x:Ae*Z-oe*Q+j,y:Ae*Q+oe*Z+re}},N=K(D,P),$=K(D,R),J=K(B,P),te=K(B,R);D=Math.min(N.x,$.x,J.x,te.x),B=Math.max(N.x,$.x,J.x,te.x),P=Math.min(N.y,$.y,J.y,te.y),R=Math.max(N.y,$.y,J.y,te.y)}var le=_+"Rot",xe=H[le]=H[le]||{};xe.x1=D,xe.y1=P,xe.x2=B,xe.y2=R,xe.w=B-D,xe.h=R-P,Dr(e,D,P,B,R),Dr(i.labelBounds.all,D,P,B,R)}return e}},xg=function(e,t){if(!t.cy().headless()){var a=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value;if(a>0&&n>0){var i=t.pstyle("outline-offset").value,o=t.pstyle("shape").value,s=n+i,l=(e.w+s*2)/e.w,u=(e.h+s*2)/e.h,v=0,f=0;["diamond","pentagon","round-triangle"].includes(o)?(l=(e.w+s*2.4)/e.w,f=-s/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(o)?l=(e.w+s*2.4)/e.w:o==="star"?(l=(e.w+s*2.8)/e.w,u=(e.h+s*2.6)/e.h,f=-s/3.8):o==="triangle"?(l=(e.w+s*2.8)/e.w,u=(e.h+s*2.4)/e.h,f=-s/1.4):o==="vee"&&(l=(e.w+s*4.4)/e.w,u=(e.h+s*3.8)/e.h,f=-s*.5);var c=e.h*u-e.h,d=e.w*l-e.w;if(Qa(e,[Math.ceil(c/2),Math.ceil(d/2)]),v!=0||f!==0){var h=oh(e,v,f);ev(e,h)}}}},Eg=function(e,t){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),o=pr(),s=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,d,h,y,g=s.rstyle,p=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(Ie){return Ie.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,E=0;n&&t.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(E=e.pstyle("overlay-padding").value));var C=0,x=0;n&&t.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(x=e.pstyle("underlay-padding").value));var S=Math.max(E,x),k=0,A=0;if(n&&(k=e.pstyle("width").pfValue,A=k/2),l&&t.includeNodes){var D=e.position();h=D.x,y=D.y;var B=e.outerWidth(),P=B/2,R=e.outerHeight(),L=R/2;v=h-P,f=h+P,c=y-L,d=y+L,Dr(o,v,c,f,d),n&&t.includeOutlines&&xg(o,e)}else if(u&&t.includeEdges)if(n&&!i){var I=e.pstyle("curve-style").strValue;if(v=Math.min(g.srcX,g.midX,g.tgtX),f=Math.max(g.srcX,g.midX,g.tgtX),c=Math.min(g.srcY,g.midY,g.tgtY),d=Math.max(g.srcY,g.midY,g.tgtY),v-=A,f+=A,c-=A,d+=A,Dr(o,v,c,f,d),I==="haystack"){var M=g.haystackPts;if(M&&M.length===2){if(v=M[0].x,c=M[0].y,f=M[1].x,d=M[1].y,v>f){var O=v;v=f,f=O}if(c>d){var _=c;c=d,d=_}Dr(o,v-A,c-A,f+A,d+A)}}else if(I==="bezier"||I==="unbundled-bezier"||I.endsWith("segments")||I.endsWith("taxi")){var H;switch(I){case"bezier":case"unbundled-bezier":H=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":H=g.linePts;break}if(H!=null)for(var z=0;zf){var j=v;v=f,f=j}if(c>d){var re=c;c=d,d=re}v-=A,f+=A,c-=A,d+=A,Dr(o,v,c,f,d)}if(n&&t.includeEdges&&u&&(Ga(o,e,"mid-source"),Ga(o,e,"mid-target"),Ga(o,e,"source"),Ga(o,e,"target")),n){var K=e.pstyle("ghost").value==="yes";if(K){var N=e.pstyle("ghost-offset-x").pfValue,$=e.pstyle("ghost-offset-y").pfValue;Dr(o,o.x1+N,o.y1+$,o.x2+N,o.y2+$)}}var J=s.bodyBounds=s.bodyBounds||{};Ps(J,o),Qa(J,p),Za(J,1),n&&(v=o.x1,f=o.x2,c=o.y1,d=o.y2,Dr(o,v-S,c-S,f+S,d+S));var te=s.overlayBounds=s.overlayBounds||{};Ps(te,o),Qa(te,p),Za(te,1);var le=s.labelBounds=s.labelBounds||{};le.all!=null?ih(le.all):le.all=pr(),n&&t.includeLabels&&(t.includeMainLabels&&ao(o,e,null),u&&(t.includeSourceLabels&&ao(o,e,"source"),t.includeTargetLabels&&ao(o,e,"target")))}return o.x1=Er(o.x1),o.y1=Er(o.y1),o.x2=Er(o.x2),o.y2=Er(o.y2),o.w=Er(o.x2-o.x1),o.h=Er(o.y2-o.y1),o.w>0&&o.h>0&&b&&(Qa(o,p),Za(o,1)),o},Dv=function(e){var t=0,a=function(o){return(o?1:0)<0&&arguments[0]!==void 0?arguments[0]:zg,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;s--)o(s);return this};ot.removeAllListeners=function(){return this.removeListener("*")};ot.emit=ot.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,Le(e)||(e=[e]),Fg(this,function(i,o){t!=null&&(a=[{event:o.event,type:o.type,namespace:o.namespace,callback:t}],n=a.length);for(var s=function(){var v=a[l];if(v.type===o.type&&(!v.namespace||v.namespace===o.namespace||v.namespace===Ng)&&i.eventMatches(i.context,v,o)){var f=[o];e!=null&&Bc(f,e),i.beforeEmit(i.context,v,o),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(h){return h!==v}));var c=i.callbackContext(i.context,v,o),d=v.callback.apply(c,f);i.afterEmit(i.context,v,o),d===!1&&(o.stopPropagation(),o.preventDefault())}},l=0;l1&&!o){var s=this.length-1,l=this[s],u=l._private.data.id;this[s]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,a=e._private.data.id,n=t.map,i=n.get(a);if(!i)return this;var o=i.index;return this.unmergeAt(o),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&fe(e)){var a=e;e=t.mutableElements().filter(a)}for(var n=0;n=0;t--){var a=this[t];e(a)&&this.unmergeAt(t)}return this},map:function(e,t){for(var a=[],n=this,i=0;ia&&(a=l,n=s)}return{value:a,ele:n}},min:function(e,t){for(var a=1/0,n,i=this,o=0;o=0&&i"u"?"undefined":Ue(Symbol))!=e&&Ue(Symbol.iterator)!=e;t&&(hn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,o=this.length;return Ml({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(t?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var a=t.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=this[0];if(a)return t.style().getRenderedStyle(a,e)},style:function(e,t){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(ke(e)){var o=e;i.applyBypass(this,o,n),this.emitAndNotify("style")}else if(fe(e))if(t===void 0){var s=this[0];return s?i.getStylePropertyValue(s,e):void 0}else i.applyBypass(this,e,t,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=!1,n=t.style(),i=this;if(e===void 0)for(var o=0;o0&&e.push(v[0]),e.push(s[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});sr.neighbourhood=sr.neighborhood;sr.closedNeighbourhood=sr.closedNeighborhood;sr.openNeighbourhood=sr.openNeighborhood;ge(sr,{source:Cr(function(e){var t=this[0],a;return t&&(a=t._private.source||t.cy().collection()),a&&e?a.filter(e):a},"source"),target:Cr(function(e){var t=this[0],a;return t&&(a=t._private.target||t.cy().collection()),a&&e?a.filter(e):a},"target"),sources:Ju({attr:"source"}),targets:Ju({attr:"target"})});function Ju(r){return function(t){for(var a=[],n=0;n0);return o},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});sr.componentsOf=sr.components;var nr=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ve("A collection must have a reference to the core");return}var i=new Hr,o=!1;if(!t)t=[];else if(t.length>0&&ke(t[0])&&!Ca(t[0])){o=!0;for(var s=[],l=new Kt,u=0,v=t.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=t.cy(),n=a._private,i=[],o=[],s,l=0,u=t.length;l0){for(var _=s.length===t.length?t:new nr(a,s),H=0;H<_.length;H++){var z=_[H];z.isNode()||(z.parallelEdges().clearTraversalCache(),z.source().clearTraversalCache(),z.target().clearTraversalCache())}var G;n.hasCompoundNodes?G=a.collection().merge(_).merge(_.connectedNodes()).merge(_.parent()):G=_,G.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(r),r?_.emitAndNotify("add"):e&&_.emit("add")}return t};ze.removed=function(){var r=this[0];return r&&r._private.removed};ze.inside=function(){var r=this[0];return r&&!r._private.removed};ze.remove=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=[],n={},i=t._private.cy;function o(R){for(var L=R._private.edges,I=0;I0&&(r?D.emitAndNotify("remove"):e&&D.emit("remove"));for(var B=0;B0?B=R:D=R;while(Math.abs(P)>o&&++L=i?m(A,L):I===0?L:w(A,D,D+u)}var C=!1;function x(){C=!0,(r!==e||t!==a)&&b()}var S=function(D){return C||x(),r===e&&t===a?D:D===0?0:D===1?1:g(E(D),e,a)};S.getControlPoints=function(){return[{x:r,y:e},{x:t,y:a}]};var k="generateBezier("+[r,e,t,a]+")";return S.toString=function(){return k},S}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var Xg=function(){function r(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var o={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:o.v,dv:r(o)}}function t(a,n){var i={dx:a.v,dv:r(a)},o=e(a,n*.5,i),s=e(a,n*.5,o),l=e(a,n,s),u=1/6*(i.dx+2*(o.dx+s.dx)+l.dx),v=1/6*(i.dv+2*(o.dv+s.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,o){var s={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,d,h;for(n=parseFloat(n)||500,i=parseFloat(i)||20,o=o||null,s.tension=n,s.friction=i,c=o!==null,c?(u=a(n,i),d=u/o*f):d=f;h=t(h||s,d),l.push(1+h.x),u+=16,Math.abs(h.x)>v&&Math.abs(h.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}}(),Ne=function(e,t,a,n){var i=Yg(e,t,a,n);return function(o,s,l){return o+(s-o)*i(l)}},en={linear:function(e,t,a){return e+(t-e)*a},ease:Ne(.25,.1,.25,1),"ease-in":Ne(.42,0,1,1),"ease-out":Ne(0,0,.58,1),"ease-in-out":Ne(.42,0,.58,1),"ease-in-sine":Ne(.47,0,.745,.715),"ease-out-sine":Ne(.39,.575,.565,1),"ease-in-out-sine":Ne(.445,.05,.55,.95),"ease-in-quad":Ne(.55,.085,.68,.53),"ease-out-quad":Ne(.25,.46,.45,.94),"ease-in-out-quad":Ne(.455,.03,.515,.955),"ease-in-cubic":Ne(.55,.055,.675,.19),"ease-out-cubic":Ne(.215,.61,.355,1),"ease-in-out-cubic":Ne(.645,.045,.355,1),"ease-in-quart":Ne(.895,.03,.685,.22),"ease-out-quart":Ne(.165,.84,.44,1),"ease-in-out-quart":Ne(.77,0,.175,1),"ease-in-quint":Ne(.755,.05,.855,.06),"ease-out-quint":Ne(.23,1,.32,1),"ease-in-out-quint":Ne(.86,0,.07,1),"ease-in-expo":Ne(.95,.05,.795,.035),"ease-out-expo":Ne(.19,1,.22,1),"ease-in-out-expo":Ne(1,0,0,1),"ease-in-circ":Ne(.6,.04,.98,.335),"ease-out-circ":Ne(.075,.82,.165,1),"ease-in-out-circ":Ne(.785,.135,.15,.86),spring:function(e,t,a){if(a===0)return en.linear;var n=Xg(e,t,a);return function(i,o,s){return i+(o-i)*n(s)}},"cubic-bezier":Ne};function rl(r,e,t,a,n){if(a===1||e===t)return t;var i=n(e,t,a);return r==null||((r.roundValue||r.color)&&(i=Math.round(i)),r.min!==void 0&&(i=Math.max(i,r.min)),r.max!==void 0&&(i=Math.min(i,r.max))),i}function tl(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function Dt(r,e,t,a,n){var i=n!=null?n.type:null;t<0?t=0:t>1&&(t=1);var o=tl(r,n),s=tl(e,n);if(ae(o)&&ae(s))return rl(i,o,s,t,a);if(Le(o)&&Le(s)){for(var l=[],u=0;u0?(d==="spring"&&h.push(o.duration),o.easingImpl=en[d].apply(null,h)):o.easingImpl=en[d]}var y=o.easingImpl,g;if(o.duration===0?g=1:g=(t-l)/o.duration,o.applying&&(g=o.progress),g<0?g=0:g>1&&(g=1),o.delay==null){var p=o.startPosition,m=o.position;if(m&&n&&!r.locked()){var b={};ta(p.x,m.x)&&(b.x=Dt(p.x,m.x,g,y)),ta(p.y,m.y)&&(b.y=Dt(p.y,m.y,g,y)),r.position(b)}var w=o.startPan,E=o.pan,C=i.pan,x=E!=null&&a;x&&(ta(w.x,E.x)&&(C.x=Dt(w.x,E.x,g,y)),ta(w.y,E.y)&&(C.y=Dt(w.y,E.y,g,y)),r.emit("pan"));var S=o.startZoom,k=o.zoom,A=k!=null&&a;A&&(ta(S,k)&&(i.zoom=pa(i.minZoom,Dt(S,k,g,y),i.maxZoom)),r.emit("zoom")),(x||A)&&r.emit("viewport");var D=o.style;if(D&&D.length>0&&n){for(var B=0;B=0;x--){var S=C[x];S()}C.splice(0,C.length)},m=d.length-1;m>=0;m--){var b=d[m],w=b._private;if(w.stopped){d.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||Qg(v,b,r),Zg(v,b,r,f),w.applying&&(w.applying=!1),p(w.frames),w.step!=null&&w.step(r),b.completed()&&(d.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.completes)),y=!0)}return!f&&d.length===0&&h.length===0&&a.push(v),y}for(var i=!1,o=0;o0?e.notify("draw",t):e.notify("draw")),t.unmerge(a),e.emit("step")}var Jg={animate:Be.animate(),animation:Be.animation(),animated:Be.animated(),clearQueue:Be.clearQueue(),delay:Be.delay(),delayAnimation:Be.delayAnimation(),stop:Be.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&un(function(i){al(i,e),t()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,o){al(o,e)},a.beforeRenderPriorities.animations):t()}},jg={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&Ca(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e}},$a=function(e){return fe(e)?new nt(e):e},zv={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Bn(jg,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,a){return this.emitter().on(e,$a(t),a),this},removeListener:function(e,t,a){return this.emitter().removeListener(e,$a(t),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,a){return this.emitter().one(e,$a(t),a),this},once:function(e,t,a){return this.emitter().one(e,$a(t),a),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Be.eventAliasesOn(zv);var xo={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};xo.jpeg=xo.jpg;var rn={layout:function(e){var t=this;if(e==null){Ve("Layout options must be specified to make a layout");return}if(e.name==null){Ve("A `name` must be specified to make a layout");return}var a=e.name,n=t.extension("layout",a);if(n==null){Ve("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;fe(e.eles)?i=t.$(e.eles):i=e.eles!=null?e.eles:t.$();var o=new n(ge({},e,{cy:t,eles:i}));return o}};rn.createLayout=rn.makeLayout=rn.layout;var ep={notify:function(e,t){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();t!=null&&n.merge(t);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?t.notify(a):t.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Eo.invalidateDimensions=Eo.resize;var tn={collection:function(e,t){return fe(e)?this.$(e):br(e)?e.collection():Le(e)?(t||(t={}),new nr(this,e,t.unique,t.removed)):new nr(this)},nodes:function(e){var t=this.$(function(a){return a.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(a){return a.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};tn.elements=tn.filter=tn.$;var rr={},la="t",tp="f";rr.apply=function(r){for(var e=this,t=e._private,a=t.cy,n=a.collection(),i=0;i0;if(c||f&&d){var h=void 0;c&&d||c?h=u.properties:d&&(h=u.mappedProperties);for(var y=0;y1&&(w=1),s.color){var C=a.valueMin[0],x=a.valueMax[0],S=a.valueMin[1],k=a.valueMax[1],A=a.valueMin[2],D=a.valueMax[2],B=a.valueMin[3]==null?1:a.valueMin[3],P=a.valueMax[3]==null?1:a.valueMax[3],R=[Math.round(C+(x-C)*w),Math.round(S+(k-S)*w),Math.round(A+(D-A)*w),Math.round(B+(P-B)*w)];i={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(s.number){var L=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,L,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case o.data:{for(var I=a.field.split("."),M=f.data,O=0;O0&&i>0){for(var s={},l=!1,u=0;u0?r.delayAnimation(o).play().promise().then(b):b()}).then(function(){return r.animation({style:s,duration:i,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1)};rr.checkTrigger=function(r,e,t,a,n,i){var o=this.properties[e],s=n(o);r.removed()||s!=null&&s(t,a,r)&&i(o)};rr.checkZOrderTrigger=function(r,e,t,a){var n=this;this.checkTrigger(r,e,t,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",r)})};rr.checkBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBounds},function(n){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})};rr.checkConnectedEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfConnectedEdges},function(n){r.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};rr.checkParallelEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfParallelEdges},function(n){r.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};rr.checkTriggers=function(r,e,t,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,a),this.checkBoundsTrigger(r,e,t,a),this.checkConnectedEdgesBoundsTrigger(r,e,t,a),this.checkParallelEdgesBoundsTrigger(r,e,t,a)};var Ba={};Ba.applyBypass=function(r,e,t,a){var n=this,i=[],o=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var s=0;sn.length?a=a.substr(n.length):a=""}function l(){i.length>o.length?i=i.substr(o.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Re("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new nt(f);if(c.invalid){Re("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),s();continue}}var d=v[2],h=!1;i=d;for(var y=[];;){var g=i.match(/^\s*$/);if(g)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Re("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+d),h=!0;break}o=p[0];var m=p[1],b=p[2],w=e.properties[m];if(!w){Re("Skipping property: Invalid property name in: "+o),l();continue}var E=t.parse(m,b);if(!E){Re("Skipping property: Invalid property definition in: "+o),l();continue}y.push({name:m,val:b}),l()}if(h){s();break}t.selector(f);for(var C=0;C=7&&e[0]==="d"&&(v=new RegExp(s.data.regex).exec(e))){if(t)return!1;var c=s.data;return{name:r,value:v,strValue:""+e,mapped:c,field:v[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(s.mapData.regex).exec(e))){if(t||u.multiple)return!1;var d=s.mapData;if(!(u.color||u.number))return!1;var h=this.parse(r,f[4]);if(!h||h.mapped)return!1;var y=this.parse(r,f[5]);if(!y||y.mapped)return!1;if(h.pfValue===y.pfValue||h.strValue===y.strValue)return Re("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+h.strValue+"`"),this.parse(r,h.strValue);if(u.color){var g=h.value,p=y.value,m=g[0]===p[0]&&g[1]===p[1]&&g[2]===p[2]&&(g[3]===p[3]||(g[3]==null||g[3]===1)&&(p[3]==null||p[3]===1));if(m)return!1}return{name:r,value:f,strValue:""+e,mapped:d,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:h.value,valueMax:y.value,bypass:t}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):Le(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],E=[],C=[],x="",S=!1,k=0;k0?" ":"")+A.strValue}return u.validate&&!u.validate(w,E)?null:u.singleEnum&&S?w.length===1&&fe(w[0])?{name:r,value:w[0],strValue:w[0],bypass:t}:null:{name:r,value:w,pfValue:C,strValue:x,bypass:t,units:E}}var D=function(){for(var K=0;Ku.max||u.strictMax&&e===u.max))return null;var I={name:r,value:e,strValue:""+e+(B||""),units:B,bypass:t};return u.unitless||B!=="px"&&B!=="em"?I.pfValue=e:I.pfValue=B==="px"||!B?e:this.getEmSizeInPixels()*e,(B==="ms"||B==="s")&&(I.pfValue=B==="ms"?e:1e3*e),(B==="deg"||B==="rad")&&(I.pfValue=B==="rad"?e:rh(e)),B==="%"&&(I.pfValue=e/100),I}else if(u.propList){var M=[],O=""+e;if(O!=="none"){for(var _=O.split(/\s*,\s*|\s+/),H=0;H<_.length;H++){var z=_[H].trim();n.properties[z]?M.push(z):Re("`"+z+"` is not a valid property name")}if(M.length===0)return null}return{name:r,value:M,strValue:M.length===0?"none":M.join(" "),bypass:t}}else if(u.color){var G=Vl(e);return G?{name:r,value:G,pfValue:G,strValue:"rgb("+G[0]+","+G[1]+","+G[2]+")",bypass:t}:null}else if(u.regex||u.regexes){if(u.enums){var W=D();if(W)return W}for(var X=u.regexes?u.regexes:[u.regex],Z=0;Z0&&s>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((o-2*t)/a.w,(s-2*t)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,a=t.pan,n=t.zoom,i,o,s=!1;if(t.zoomingEnabled||(s=!0),ae(e)?o=e:ke(e)&&(o=e.level,e.position!=null?i=Cn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!t.panningEnabled&&(s=!0)),o=o>t.maxZoom?t.maxZoom:o,o=ot.maxZoom||!t.zoomingEnabled?o=!0:(t.zoom=l,i.push("zoom"))}if(n&&(!o||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;ae(u.x)&&(t.pan.x=u.x,s=!1),ae(u.y)&&(t.pan.y=u.y,s=!1),s||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(fe(e)){var a=e;e=this.mutableElements().filter(a)}else br(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),o=this.height();t=t===void 0?this._private.zoom:t;var s={x:(i-t*(n.x1+n.x2))/2,y:(o-t*(n.y1+n.y2))/2};return s}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,a=this;return e.sizeCache=e.sizeCache||(t?function(){var n=a.window().getComputedStyle(t),i=function(s){return parseFloat(n.getPropertyValue(s))};return{width:t.clientWidth-i("padding-left")-i("padding-right"),height:t.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/t,x2:(a.x2-e.x)/t,y1:(a.y1-e.y)/t,y2:(a.y2-e.y)/t};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};wt.centre=wt.center;wt.autolockNodes=wt.autolock;wt.autoungrabifyNodes=wt.autoungrabify;var wa={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};wa.attr=wa.data;wa.removeAttr=wa.removeData;var xa=function(e){var t=this;e=ge({},e);var a=e.container;a&&!sn(a)&&sn(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=t;var o=Ke!==void 0&&a!==void 0&&!e.headless,s=e;s.layout=ge({name:o?"grid":"null"},s.layout),s.renderer=ge({name:o?"canvas":"null"},s.renderer);var l=function(h,y,g){return y!==void 0?y:g!==void 0?g:h},u=this._private={container:a,ready:!1,options:s,elements:new nr(this),listeners:[],aniEles:new nr(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,s.zoomingEnabled),userZoomingEnabled:l(!0,s.userZoomingEnabled),panningEnabled:l(!0,s.panningEnabled),userPanningEnabled:l(!0,s.userPanningEnabled),boxSelectionEnabled:l(!0,s.boxSelectionEnabled),autolock:l(!1,s.autolock,s.autolockNodes),autoungrabify:l(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:l(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?o:s.styleEnabled,zoom:ae(s.zoom)?s.zoom:1,pan:{x:ke(s.pan)&&ae(s.pan.x)?s.pan.x:0,y:ke(s.pan)&&ae(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var v=function(h,y){var g=h.some(Qf);if(g)return $t.all(h).then(y);y(h)};u.styleEnabled&&t.setStyle([]);var f=ge({},s,s.renderer);t.initRenderer(f);var c=function(h,y,g){t.notifications(!1);var p=t.mutableElements();p.length>0&&p.remove(),h!=null&&(ke(h)||Le(h))&&t.add(h),t.one("layoutready",function(b){t.notifications(!0),t.emit(b),t.one("load",y),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",g),t.emit("done")});var m=ge({},t._private.options.layout);m.eles=t.elements(),t.layout(m).run()};v([s.style,s.elements],function(d){var h=d[0],y=d[1];u.styleEnabled&&t.style().append(h),c(y,function(){t.startAnimationLoop(),u.ready=!0,_e(s.ready)&&t.on("ready",s.ready);for(var g=0;g0,s=!!r.boundingBox,l=e.extent(),u=pr(s?r.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),v;if(br(r.roots))v=r.roots;else if(Le(r.roots)){for(var f=[],c=0;c0;){var L=R(),I=A(L,B);if(I)L.outgoers().filter(function(oe){return oe.isNode()&&t.has(oe)}).forEach(P);else if(I===null){Re("Detected double maximal shift for node `"+L.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var M=0;if(r.avoidOverlap)for(var O=0;O0&&m[0].length<=3?me/2:0),Se=2*Math.PI/m[ye].length*de;return ye===0&&m[0].length===1&&(Ce=1),{x:te.x+Ce*Math.cos(Se),y:te.y+Ce*Math.sin(Se)}}else{var ee=m[ye].length,T=Math.max(ee===1?0:s?(u.w-r.padding*2-le.w)/((r.grid?Ie:ee)-1):(u.w-r.padding*2-le.w)/((r.grid?Ie:ee)+1),M),q={x:te.x+(de+1-(ee+1)/2)*T,y:te.y+(ye+1-(Q+1)/2)*xe};return q}};return t.nodes().layoutPositions(this,r,Ae),this};var sp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function qv(r){this.options=ge({},sp,r)}qv.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var o=pr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var p=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(p*p+m*m));v=Math.max(b,v)}var w=function(C,x){var S=e.startAngle+x*u*(n?1:-1),k=v*Math.cos(S),A=v*Math.sin(S),D={x:s.x+k,y:s.y+A};return D};return a.nodes().layoutPositions(this,e,w),this};var up={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Vv(r){this.options=ge({},up,r)}Vv.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=r.cy,n=e.eles,i=n.nodes().not(":parent"),o=pr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=[],u=0,v=0;v0){var E=Math.abs(m[0].value-w.value);E>=g&&(m=[],p.push(m))}m.push(w)}var C=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=p.length>0&&p[0].length>1,S=Math.min(o.w,o.h)/2-C,k=S/(p.length+x?1:0);C=Math.min(C,k)}for(var A=0,D=0;D1&&e.avoidOverlap){var L=Math.cos(R)-Math.cos(0),I=Math.sin(R)-Math.sin(0),M=Math.sqrt(C*C/(L*L+I*I));A=Math.max(M,A)}B.r=A,A+=C}if(e.equidistant){for(var O=0,_=0,H=0;H=r.numIter||(gp(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature=r.animationThreshold&&i(),un(v)}};v()}else{for(;u;)u=o(l),l++;ol(a,r),s()}return this};On.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};On.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var vp=function(e,t,a){for(var n=a.eles.edges(),i=a.eles.nodes(),o=pr(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},l=a.eles.components(),u={},v=0;v0){s.graphSet.push(S);for(var v=0;vn.count?0:n.graph},_v=function(e,t,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(s*s+l*l),d=f*s/c,h=f*l/c;else var y=gn(e,s,l),g=gn(t,-1*s,-1*l),p=g.x-y.x,m=g.y-y.y,b=p*p+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+t.nodeRepulsion)/b,d=f*p/c,h=f*m/c;e.isLocked||(e.offsetX-=d,e.offsetY-=h),t.isLocked||(t.offsetX+=d,t.offsetY+=h)}},mp=function(e,t,a,n){if(a>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(n>0)var o=e.maxY-t.minY;else var o=t.maxY-e.minY;return i>=0&&o>=0?Math.sqrt(i*i+o*o):0},gn=function(e,t,a){var n=e.positionX,i=e.positionY,o=e.height||1,s=e.width||1,l=a/t,u=o/s,v={};return t===0&&0a?(v.x=n,v.y=i+o/2,v):0t&&-1*u<=l&&l<=u?(v.x=n-s/2,v.y=i-s*a/2/t,v):0=u)?(v.x=n+o*t/2/a,v.y=i+o/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-o*t/2/a,v.y=i-o/2),v)},bp=function(e,t){for(var a=0;aa){var g=t.gravity*d/y,p=t.gravity*h/y;c.offsetX+=g,c.offsetY+=p}}}}},xp=function(e,t){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var o=a[n++],s=e.idToIndex[o],l=e.layoutNodes[s],u=l.children;if(0a)var i={x:a*e/n,y:a*t/n};else var i={x:e,y:t};return i},Hv=function(e,t){var a=e.parentId;if(a!=null){var n=t.layoutNodes[t.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopp&&(h+=g+t.componentSpacing,d=0,y=0,g=0)}}},Tp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Kv(r){this.options=ge({},Tp,r)}Kv.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=pr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(W){return{x:i.x1,y:i.y1}});else{var o=n.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),v=function(X){if(X==null)return Math.min(l,u);var Z=Math.min(l,u);Z==l?l=X:u=X},f=function(X){if(X==null)return Math.max(l,u);var Z=Math.max(l,u);Z==l?l=X:u=X},c=e.rows,d=e.cols!=null?e.cols:e.columns;if(c!=null&&d!=null)l=c,u=d;else if(c!=null&&d==null)l=c,u=Math.ceil(o/l);else if(c==null&&d!=null)u=d,l=Math.ceil(o/u);else if(u*l>o){var h=v(),y=f();(h-1)*y>=o?v(h-1):(y-1)*h>=o&&f(y-1)}else for(;u*l=o?f(p+1):v(g+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(L=0,R++)},M={},O=0;O(L=dh(r,e,I[M],I[M+1],I[M+2],I[M+3])))return g(x,L),!0}else if(k.edgeType==="bezier"||k.edgeType==="multibezier"||k.edgeType==="self"||k.edgeType==="compound"){for(var I=k.allpts,M=0;M+5(L=hh(r,e,I[M],I[M+1],I[M+2],I[M+3],I[M+4],I[M+5])))return g(x,L),!0}for(var O=O||S.source,_=_||S.target,H=n.getArrowWidth(A,D),z=[{name:"source",x:k.arrowStartX,y:k.arrowStartY,angle:k.srcArrowAngle},{name:"target",x:k.arrowEndX,y:k.arrowEndY,angle:k.tgtArrowAngle},{name:"mid-source",x:k.midX,y:k.midY,angle:k.midsrcArrowAngle},{name:"mid-target",x:k.midX,y:k.midY,angle:k.midtgtArrowAngle}],M=0;M0&&(p(O),p(_))}function b(x,S,k){return kr(x,S,k)}function w(x,S){var k=x._private,A=c,D;S?D=S+"-":D="",x.boundingBox();var B=k.labelBounds[S||"main"],P=x.pstyle(D+"label").value,R=x.pstyle("text-events").strValue==="yes";if(!(!R||!P)){var L=b(k.rscratch,"labelX",S),I=b(k.rscratch,"labelY",S),M=b(k.rscratch,"labelAngle",S),O=x.pstyle(D+"text-margin-x").pfValue,_=x.pstyle(D+"text-margin-y").pfValue,H=B.x1-A-O,z=B.x2+A-O,G=B.y1-A-_,W=B.y2+A-_;if(M){var X=Math.cos(M),Z=Math.sin(M),Q=function(te,le){return te=te-L,le=le-I,{x:te*X-le*Z+L,y:te*Z+le*X+I}},j=Q(H,G),re=Q(H,W),K=Q(z,G),N=Q(z,W),$=[j.x+O,j.y+_,K.x+O,K.y+_,N.x+O,N.y+_,re.x+O,re.y+_];if(gr(r,e,$))return g(x),!0}else if(Vt(B,r,e))return g(x),!0}}for(var E=o.length-1;E>=0;E--){var C=o[E];C.isNode()?p(C)||w(C):m(C)||w(C)||w(C,"source")||w(C,"target")}return s};Et.getAllInBox=function(r,e,t,a){var n=this.getCachedZSortedEles().interactive,i=[],o=Math.min(r,t),s=Math.max(r,t),l=Math.min(e,a),u=Math.max(e,a);r=o,t=s,e=l,a=u;for(var v=pr({x1:r,y1:e,x2:t,y2:a}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},Bp=function(e,t,a,n,i){if(e!==fl?cl(t,e,Or):Ap(xr,Or),cl(t,a,xr),ll=Or.nx*xr.ny-Or.ny*xr.nx,vl=Or.nx*xr.nx-Or.ny*-xr.ny,Gr=Math.asin(Math.max(-1,Math.min(1,ll))),Math.abs(Gr)<1e-6){Co=t.x,To=t.y,dt=Pt=0;return}gt=1,an=!1,vl<0?Gr<0?Gr=Math.PI+Gr:(Gr=Math.PI-Gr,gt=-1,an=!0):Gr>0&&(gt=-1,an=!0),t.radius!==void 0?Pt=t.radius:Pt=n,ft=Gr/2,Ua=Math.min(Or.len/2,xr.len/2),i?(Ir=Math.abs(Math.cos(ft)*Pt/Math.sin(ft)),Ir>Ua?(Ir=Ua,dt=Math.abs(Ir*Math.sin(ft)/Math.cos(ft))):dt=Pt):(Ir=Math.min(Ua,Pt),dt=Math.abs(Ir*Math.sin(ft)/Math.cos(ft))),So=t.x+xr.nx*Ir,Do=t.y+xr.ny*Ir,Co=So-xr.ny*dt*gt,To=Do+xr.nx*dt*gt,Yv=t.x+Or.nx*Ir,Xv=t.y+Or.ny*Ir,fl=t};function Zv(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Qo(r,e,t,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Bp(r,e,t,a,n),{cx:Co,cy:To,radius:dt,startX:Yv,startY:Xv,stopX:So,stopY:Do,startAngle:Or.ang+Math.PI/2*gt,endAngle:xr.ang-Math.PI/2*gt,counterClockwise:an})}var lr={};lr.findMidptPtsEtc=function(r,e){var t=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,o=r.pstyle("source-endpoint"),s=r.pstyle("target-endpoint"),l=o.units!=null&&s.units!=null,u=function(E,C,x,S){var k=S-C,A=x-E,D=Math.sqrt(A*A+k*k);return{x:-k/D,y:A/D}},v=r.pstyle("edge-distances").value;switch(v){case"node-position":i=t;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(r.source()[0],o),c=je(f,2),d=c[0],h=c[1],y=this.manualEndptToPx(r.target()[0],s),g=je(y,2),p=g[0],m=g[1],b={x1:d,y1:h,x2:p,y2:m};n=u(d,h,p,m),i=b}else Re("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};lr.findHaystackPoints=function(r){for(var e=0;e0?Math.max(Y-ie,0):Math.min(Y+ie,0)},P=B(A,S),R=B(D,k),L=!1;m===u?p=Math.abs(P)>Math.abs(R)?n:a:m===l||m===s?(p=a,L=!0):(m===i||m===o)&&(p=n,L=!0);var I=p===a,M=I?R:P,O=I?D:A,_=jl(O),H=!1;!(L&&(w||C))&&(m===s&&O<0||m===l&&O>0||m===i&&O>0||m===o&&O<0)&&(_*=-1,M=_*Math.abs(M),H=!0);var z;if(w){var G=E<0?1+E:E;z=G*M}else{var W=E<0?M:0;z=W+E*_}var X=function(Y){return Math.abs(Y)=Math.abs(M)},Z=X(z),Q=X(Math.abs(M)-Math.abs(z)),j=Z||Q;if(j&&!H)if(I){var re=Math.abs(O)<=c/2,K=Math.abs(A)<=d/2;if(re){var N=(v.x1+v.x2)/2,$=v.y1,J=v.y2;t.segpts=[N,$,N,J]}else if(K){var te=(v.y1+v.y2)/2,le=v.x1,xe=v.x2;t.segpts=[le,te,xe,te]}else t.segpts=[v.x1,v.y2]}else{var Ie=Math.abs(O)<=f/2,Ae=Math.abs(D)<=h/2;if(Ie){var oe=(v.y1+v.y2)/2,ue=v.x1,he=v.x2;t.segpts=[ue,oe,he,oe]}else if(Ae){var ye=(v.x1+v.x2)/2,de=v.y1,me=v.y2;t.segpts=[ye,de,ye,me]}else t.segpts=[v.x2,v.y1]}else if(I){var Ce=v.y1+z+(g?c/2*_:0),Se=v.x1,ee=v.x2;t.segpts=[Se,Ce,ee,Ce]}else{var T=v.x1+z+(g?f/2*_:0),q=v.y1,U=v.y2;t.segpts=[T,q,T,U]}if(t.isRound){var F=r.pstyle("taxi-radius").value,V=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(F),t.isArcRadius=new Array(t.segpts.length/2).fill(V)}};lr.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,o=e.srcH,s=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,d=e.srcRs,h=e.tgtRs,y=!ae(t.startX)||!ae(t.startY),g=!ae(t.arrowStartX)||!ae(t.arrowStartY),p=!ae(t.endX)||!ae(t.endY),m=!ae(t.arrowEndX)||!ae(t.arrowEndY),b=3,w=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,E=b*w,C=yt({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),x=CO.poolIndex()){var _=M;M=O,O=_}var H=P.srcPos=M.position(),z=P.tgtPos=O.position(),G=P.srcW=M.outerWidth(),W=P.srcH=M.outerHeight(),X=P.tgtW=O.outerWidth(),Z=P.tgtH=O.outerHeight(),Q=P.srcShape=t.nodeShapes[e.getNodeShape(M)],j=P.tgtShape=t.nodeShapes[e.getNodeShape(O)],re=P.srcCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,K=P.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,N=P.tgtRs=O._private.rscratch,$=P.srcRs=M._private.rscratch;P.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var J=0;J0){var J=i,te=ct(J,Lt(t)),le=ct(J,Lt($)),xe=te;if(le2){var Ie=ct(J,{x:$[2],y:$[3]});Ie0){var U=o,F=ct(U,Lt(t)),V=ct(U,Lt(q)),ne=F;if(V2){var Y=ct(U,{x:q[2],y:q[3]});Y=h||x){g={cp:w,segment:C};break}}if(g)break}var S=g.cp,k=g.segment,A=(h-p)/k.length,D=k.t1-k.t0,B=d?k.t0+D*A:k.t1-D*A;B=pa(0,B,1),e=Nt(S.p0,S.p1,S.p2,B),c=Mp(S.p0,S.p1,S.p2,B);break}case"straight":case"segments":case"haystack":{for(var P=0,R,L,I,M,O=a.allpts.length,_=0;_+3=h));_+=2);var H=h-L,z=H/R;z=pa(0,z,1),e=ah(I,M,z),c=jv(I,M);break}}o("labelX",f,e.x),o("labelY",f,e.y),o("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(r)}};Fr.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Fr.applyPrefixedLabelDimensions=function(r,e){var t=r._private,a=this.getLabelText(r,e),n=this.calculateLabelDimensions(r,a),i=r.pstyle("line-height").pfValue,o=r.pstyle("text-wrap").strValue,s=kr(t.rscratch,"labelWrapCachedLines",e)||[],l=o!=="wrap"?1:Math.max(s.length,1),u=n.height/l,v=u*i,f=n.width,c=n.height+(l-1)*(i-1)*u;Qr(t.rstyle,"labelWidth",e,f),Qr(t.rscratch,"labelWidth",e,f),Qr(t.rstyle,"labelHeight",e,c),Qr(t.rscratch,"labelHeight",e,c),Qr(t.rscratch,"labelLineHeight",e,v)};Fr.getLabelText=function(r,e){var t=r._private,a=e?e+"-":"",n=r.pstyle(a+"label").strValue,i=r.pstyle("text-transform").value,o=function(W,X){return X?(Qr(t.rscratch,W,e,X),X):kr(t.rscratch,W,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var s=r.pstyle("text-wrap").value;if(s==="wrap"){var l=o("labelKey");if(l!=null&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u="​",v=n.split(` +`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,d=c==="anywhere",h=[],y=/[\s\u200b]+|$/g,g=0;gf){var E=p.matchAll(y),C="",x=0,S=Pr(E),k;try{for(S.s();!(k=S.n()).done;){var A=k.value,D=A[0],B=p.substring(x,A.index);x=A.index+D.length;var P=C.length===0?B:C+B+D,R=this.calculateLabelDimensions(r,P),L=R.width;L<=f?C+=B+D:(C&&h.push(C),C=B+D)}}catch(G){S.e(G)}finally{S.f()}C.match(/^[\s\u200b]+$/)||h.push(C)}else h.push(p)}o("labelWrapCachedLines",h),n=o("labelWrapCachedText",h.join(` +`)),o("labelWrapKey",l)}else if(s==="ellipsis"){var I=r.pstyle("text-max-width").pfValue,M="",O="…",_=!1;if(this.calculateLabelDimensions(r,n).widthI)break;M+=n[H],H===n.length-1&&(_=!0)}return _||(M+=O),M}return n};Fr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Fr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=tt(e,r._private.labelDimsKey),o=t.labelDimCache||(t.labelDimCache=[]),s=o[i];if(s!=null)return s;var l=0,u=r.pstyle("font-style").strValue,v=r.pstyle("font-size").pfValue,f=r.pstyle("font-family").strValue,c=r.pstyle("font-weight").strValue,d=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=n.createElement("canvas"),h=this.labelCalcCanvasContext=d.getContext("2d");var y=d.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}h.font="".concat(u," ").concat(c," ").concat(v,"px ").concat(f);for(var g=0,p=0,m=e.split(` +`),b=0;b1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var l=0;l=r.desktopTapThreshold2}var vr=i(T);qe&&(r.hoverData.tapholdCancelled=!0);var fr=function(){var Lr=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Lr.length===0?(Lr.push(pe[0]),Lr.push(pe[1])):(Lr[0]+=pe[0],Lr[1]+=pe[1])};U=!0,n(ve,["mousemove","vmousemove","tapdrag"],T,{x:Y[0],y:Y[1]});var Rr=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||F.emit({originalEvent:T,type:"boxstart",position:{x:Y[0],y:Y[1]}}),Ee[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(qe){var wr={originalEvent:T,type:"cxtdrag",position:{x:Y[0],y:Y[1]}};we?we.emit(wr):F.emit(wr),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||ve!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:Y[0],y:Y[1]}}),r.hoverData.cxtOver=ve,ve&&ve.emit({originalEvent:T,type:"cxtdragover",position:{x:Y[0],y:Y[1]}}))}}else if(r.hoverData.dragging){if(U=!0,F.panningEnabled()&&F.userPanningEnabled()){var Mr;if(r.hoverData.justStartedPan){var Vr=r.hoverData.mdownPos;Mr={x:(Y[0]-Vr[0])*V,y:(Y[1]-Vr[1])*V},r.hoverData.justStartedPan=!1}else Mr={x:pe[0]*V,y:pe[1]*V};F.panBy(Mr),F.emit("dragpan"),r.hoverData.dragged=!0}Y=r.projectIntoViewport(T.clientX,T.clientY)}else if(Ee[4]==1&&(we==null||we.pannable())){if(qe){if(!r.hoverData.dragging&&F.boxSelectionEnabled()&&(vr||!F.panningEnabled()||!F.userPanningEnabled()))Rr();else if(!r.hoverData.selecting&&F.panningEnabled()&&F.userPanningEnabled()){var _r=o(we,r.hoverData.downs);_r&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,Ee[4]=0,r.data.bgActivePosistion=Lt(ie),r.redrawHint("select",!0),r.redraw())}we&&we.pannable()&&we.active()&&we.unactivate()}}else{if(we&&we.pannable()&&we.active()&&we.unactivate(),(!we||!we.grabbed())&&ve!=be&&(be&&n(be,["mouseout","tapdragout"],T,{x:Y[0],y:Y[1]}),ve&&n(ve,["mouseover","tapdragover"],T,{x:Y[0],y:Y[1]}),r.hoverData.last=ve),we)if(qe){if(F.boxSelectionEnabled()&&vr)we&&we.grabbed()&&(p(Oe),we.emit("freeon"),Oe.emit("free"),r.dragData.didDrag&&(we.emit("dragfreeon"),Oe.emit("dragfree"))),Rr();else if(we&&we.grabbed()&&r.nodeIsDraggable(we)){var or=!r.dragData.didDrag;or&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||y(Oe,{inDragLayer:!0});var Qe={x:0,y:0};if(ae(pe[0])&&ae(pe[1])&&(Qe.x+=pe[0],Qe.y+=pe[1],or)){var dr=r.hoverData.dragDelta;dr&&ae(dr[0])&&ae(dr[1])&&(Qe.x+=dr[0],Qe.y+=dr[1])}r.hoverData.draggingEles=!0,Oe.silentShift(Qe).emit("position drag"),r.redrawHint("drag",!0),r.redraw()}}else fr();U=!0}if(Ee[2]=Y[0],Ee[3]=Y[1],U)return T.stopPropagation&&T.stopPropagation(),T.preventDefault&&T.preventDefault(),!1}},!1);var B,P,R;r.registerBinding(e,"mouseup",function(T){if(!(r.hoverData.which===1&&T.which!==1&&r.hoverData.capture)){var q=r.hoverData.capture;if(q){r.hoverData.capture=!1;var U=r.cy,F=r.projectIntoViewport(T.clientX,T.clientY),V=r.selection,ne=r.findNearestElement(F[0],F[1],!0,!1),Y=r.dragData.possibleDragElements,ie=r.hoverData.down,ce=i(T);if(r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,ie&&ie.unactivate(),r.hoverData.which===3){var Ee={originalEvent:T,type:"cxttapend",position:{x:F[0],y:F[1]}};if(ie?ie.emit(Ee):U.emit(Ee),!r.hoverData.cxtDragged){var ve={originalEvent:T,type:"cxttap",position:{x:F[0],y:F[1]}};ie?ie.emit(ve):U.emit(ve)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(n(ne,["mouseup","tapend","vmouseup"],T,{x:F[0],y:F[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(n(ie,["click","tap","vclick"],T,{x:F[0],y:F[1]}),P=!1,T.timeStamp-R<=U.multiClickDebounceTime()?(B&&clearTimeout(B),P=!0,R=null,n(ie,["dblclick","dbltap","vdblclick"],T,{x:F[0],y:F[1]})):(B=setTimeout(function(){P||n(ie,["oneclick","onetap","voneclick"],T,{x:F[0],y:F[1]})},U.multiClickDebounceTime()),R=T.timeStamp)),ie==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!i(T)&&(U.$(t).unselect(["tapunselect"]),Y.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=Y=U.collection()),ne==ie&&!r.dragData.didDrag&&!r.hoverData.selecting&&ne!=null&&ne._private.selectable&&(r.hoverData.dragging||(U.selectionType()==="additive"||ce?ne.selected()?ne.unselect(["tapunselect"]):ne.select(["tapselect"]):ce||(U.$(t).unmerge(ne).unselect(["tapunselect"]),ne.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var be=U.collection(r.getAllInBox(V[0],V[1],V[2],V[3]));r.redrawHint("select",!0),be.length>0&&r.redrawHint("eles",!0),U.emit({type:"boxend",originalEvent:T,position:{x:F[0],y:F[1]}});var we=function(qe){return qe.selectable()&&!qe.selected()};U.selectionType()==="additive"||ce||U.$(t).unmerge(be).unselect(),be.emit("box").stdFilter(we).select().emit("boxselect"),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!V[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var pe=ie&&ie.grabbed();p(Y),pe&&(ie.emit("freeon"),Y.emit("free"),r.dragData.didDrag&&(ie.emit("dragfreeon"),Y.emit("dragfree")))}}V[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var L=function(T){if(!r.scrollingPage){var q=r.cy,U=q.zoom(),F=q.pan(),V=r.projectIntoViewport(T.clientX,T.clientY),ne=[V[0]*U+F.x,V[1]*U+F.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||k()){T.preventDefault();return}if(q.panningEnabled()&&q.userPanningEnabled()&&q.zoomingEnabled()&&q.userZoomingEnabled()){T.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var Y;T.deltaY!=null?Y=T.deltaY/-250:T.wheelDeltaY!=null?Y=T.wheelDeltaY/1e3:Y=T.wheelDelta/1e3,Y=Y*r.wheelSensitivity;var ie=T.deltaMode===1;ie&&(Y*=33);var ce=q.zoom()*Math.pow(10,Y);T.type==="gesturechange"&&(ce=r.gestureStartZoom*T.scale),q.zoom({level:ce,renderedPosition:{x:ne[0],y:ne[1]}}),q.emit(T.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};r.registerBinding(r.container,"wheel",L,!0),r.registerBinding(e,"scroll",function(T){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(T){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||T.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(ee){r.hasTouchStarted||L(ee)},!0),r.registerBinding(r.container,"mouseout",function(T){var q=r.projectIntoViewport(T.clientX,T.clientY);r.cy.emit({originalEvent:T,type:"mouseout",position:{x:q[0],y:q[1]}})},!1),r.registerBinding(r.container,"mouseover",function(T){var q=r.projectIntoViewport(T.clientX,T.clientY);r.cy.emit({originalEvent:T,type:"mouseover",position:{x:q[0],y:q[1]}})},!1);var I,M,O,_,H,z,G,W,X,Z,Q,j,re,K=function(T,q,U,F){return Math.sqrt((U-T)*(U-T)+(F-q)*(F-q))},N=function(T,q,U,F){return(U-T)*(U-T)+(F-q)*(F-q)},$;r.registerBinding(r.container,"touchstart",$=function(T){if(r.hasTouchStarted=!0,!!A(T)){b(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var q=r.cy,U=r.touchData.now,F=r.touchData.earlier;if(T.touches[0]){var V=r.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);U[0]=V[0],U[1]=V[1]}if(T.touches[1]){var V=r.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);U[2]=V[0],U[3]=V[1]}if(T.touches[2]){var V=r.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);U[4]=V[0],U[5]=V[1]}if(T.touches[1]){r.touchData.singleTouchMoved=!0,p(r.dragData.touchDragEles);var ne=r.findContainerClientCoords();X=ne[0],Z=ne[1],Q=ne[2],j=ne[3],I=T.touches[0].clientX-X,M=T.touches[0].clientY-Z,O=T.touches[1].clientX-X,_=T.touches[1].clientY-Z,re=0<=I&&I<=Q&&0<=O&&O<=Q&&0<=M&&M<=j&&0<=_&&_<=j;var Y=q.pan(),ie=q.zoom();H=K(I,M,O,_),z=N(I,M,O,_),G=[(I+O)/2,(M+_)/2],W=[(G[0]-Y.x)/ie,(G[1]-Y.y)/ie];var ce=200,Ee=ce*ce;if(z=1){for(var mr=r.touchData.startPosition=[null,null,null,null,null,null],He=0;He=r.touchTapThreshold2}if(q&&r.touchData.cxt){T.preventDefault();var mr=T.touches[0].clientX-X,He=T.touches[0].clientY-Z,Xe=T.touches[1].clientX-X,Ze=T.touches[1].clientY-Z,vr=N(mr,He,Xe,Ze),fr=vr/z,Rr=150,wr=Rr*Rr,Mr=1.5,Vr=Mr*Mr;if(fr>=Vr||vr>=wr){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var _r={originalEvent:T,type:"cxttapend",position:{x:V[0],y:V[1]}};r.touchData.start?(r.touchData.start.unactivate().emit(_r),r.touchData.start=null):F.emit(_r)}}if(q&&r.touchData.cxt){var _r={originalEvent:T,type:"cxtdrag",position:{x:V[0],y:V[1]}};r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(_r):F.emit(_r),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var or=r.findNearestElement(V[0],V[1],!0,!0);(!r.touchData.cxtOver||or!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit({originalEvent:T,type:"cxtdragout",position:{x:V[0],y:V[1]}}),r.touchData.cxtOver=or,or&&or.emit({originalEvent:T,type:"cxtdragover",position:{x:V[0],y:V[1]}}))}else if(q&&T.touches[2]&&F.boxSelectionEnabled())T.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||F.emit({originalEvent:T,type:"boxstart",position:{x:V[0],y:V[1]}}),r.touchData.selecting=!0,r.touchData.didSelect=!0,U[4]=1,!U||U.length===0||U[0]===void 0?(U[0]=(V[0]+V[2]+V[4])/3,U[1]=(V[1]+V[3]+V[5])/3,U[2]=(V[0]+V[2]+V[4])/3+1,U[3]=(V[1]+V[3]+V[5])/3+1):(U[2]=(V[0]+V[2]+V[4])/3,U[3]=(V[1]+V[3]+V[5])/3),r.redrawHint("select",!0),r.redraw();else if(q&&T.touches[1]&&!r.touchData.didSelect&&F.zoomingEnabled()&&F.panningEnabled()&&F.userZoomingEnabled()&&F.userPanningEnabled()){T.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Qe=r.dragData.touchDragEles;if(Qe){r.redrawHint("drag",!0);for(var dr=0;dr0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var te;r.registerBinding(e,"touchcancel",te=function(T){var q=r.touchData.start;r.touchData.capture=!1,q&&q.unactivate()});var le,xe,Ie,Ae;if(r.registerBinding(e,"touchend",le=function(T){var q=r.touchData.start,U=r.touchData.capture;if(U)T.touches.length===0&&(r.touchData.capture=!1),T.preventDefault();else return;var F=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var V=r.cy,ne=V.zoom(),Y=r.touchData.now,ie=r.touchData.earlier;if(T.touches[0]){var ce=r.projectIntoViewport(T.touches[0].clientX,T.touches[0].clientY);Y[0]=ce[0],Y[1]=ce[1]}if(T.touches[1]){var ce=r.projectIntoViewport(T.touches[1].clientX,T.touches[1].clientY);Y[2]=ce[0],Y[3]=ce[1]}if(T.touches[2]){var ce=r.projectIntoViewport(T.touches[2].clientX,T.touches[2].clientY);Y[4]=ce[0],Y[5]=ce[1]}q&&q.unactivate();var Ee;if(r.touchData.cxt){if(Ee={originalEvent:T,type:"cxttapend",position:{x:Y[0],y:Y[1]}},q?q.emit(Ee):V.emit(Ee),!r.touchData.cxtDragged){var ve={originalEvent:T,type:"cxttap",position:{x:Y[0],y:Y[1]}};q?q.emit(ve):V.emit(ve)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!T.touches[2]&&V.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var be=V.collection(r.getAllInBox(F[0],F[1],F[2],F[3]));F[0]=void 0,F[1]=void 0,F[2]=void 0,F[3]=void 0,F[4]=0,r.redrawHint("select",!0),V.emit({type:"boxend",originalEvent:T,position:{x:Y[0],y:Y[1]}});var we=function(wr){return wr.selectable()&&!wr.selected()};be.emit("box").stdFilter(we).select().emit("boxselect"),be.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(q!=null&&q.unactivate(),T.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!T.touches[1]){if(!T.touches[0]){if(!T.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var pe=r.dragData.touchDragEles;if(q!=null){var Oe=q._private.grabbed;p(pe),r.redrawHint("drag",!0),r.redrawHint("eles",!0),Oe&&(q.emit("freeon"),pe.emit("free"),r.dragData.didDrag&&(q.emit("dragfreeon"),pe.emit("dragfree"))),n(q,["touchend","tapend","vmouseup","tapdragout"],T,{x:Y[0],y:Y[1]}),q.unactivate(),r.touchData.start=null}else{var qe=r.findNearestElement(Y[0],Y[1],!0,!0);n(qe,["touchend","tapend","vmouseup","tapdragout"],T,{x:Y[0],y:Y[1]})}var yr=r.touchData.startPosition[0]-Y[0],mr=yr*yr,He=r.touchData.startPosition[1]-Y[1],Xe=He*He,Ze=mr+Xe,vr=Ze*ne*ne;r.touchData.singleTouchMoved||(q||V.$(":selected").unselect(["tapunselect"]),n(q,["tap","vclick"],T,{x:Y[0],y:Y[1]}),xe=!1,T.timeStamp-Ae<=V.multiClickDebounceTime()?(Ie&&clearTimeout(Ie),xe=!0,Ae=null,n(q,["dbltap","vdblclick"],T,{x:Y[0],y:Y[1]})):(Ie=setTimeout(function(){xe||n(q,["onetap","voneclick"],T,{x:Y[0],y:Y[1]})},V.multiClickDebounceTime()),Ae=T.timeStamp)),q!=null&&!r.dragData.didDrag&&q._private.selectable&&vr"u"){var oe=[],ue=function(T){return{clientX:T.clientX,clientY:T.clientY,force:1,identifier:T.pointerId,pageX:T.pageX,pageY:T.pageY,radiusX:T.width/2,radiusY:T.height/2,screenX:T.screenX,screenY:T.screenY,target:T.target}},he=function(T){return{event:T,touch:ue(T)}},ye=function(T){oe.push(he(T))},de=function(T){for(var q=0;q0)return G[0]}return null},h=Object.keys(c),y=0;y0?d:tv(i,o,e,t,a,n,s,l)},checkPoint:function(e,t,a,n,i,o,s,l){l=l==="auto"?mt(n,i):l;var u=2*l;if($r(e,t,this.points,o,s,n,i-u,[0,-1],a)||$r(e,t,this.points,o,s,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[o-v,s-f,o-v,s,o+v,s,o+v,s-f];return!!(gr(e,t,c)||pt(e,t,u,u,o+n/2-l,s+i/2-l,a)||pt(e,t,u,u,o-n/2+l,s+i/2-l,a))}}};Ur.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",cr(3,0)),this.generateRoundPolygon("round-triangle",cr(3,0)),this.generatePolygon("rectangle",cr(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",cr(5,0)),this.generateRoundPolygon("round-pentagon",cr(5,0)),this.generatePolygon("hexagon",cr(6,0)),this.generateRoundPolygon("round-hexagon",cr(6,0)),this.generatePolygon("heptagon",cr(7,0)),this.generateRoundPolygon("round-heptagon",cr(7,0)),this.generatePolygon("octagon",cr(8,0)),this.generateRoundPolygon("round-octagon",cr(8,0));var a=new Array(20);{var n=co(5,0),i=co(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*d||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*oo)break;var E=e.deq(a,g,y);if(E.length>0)for(var C=0;C0&&(e.onDeqd(a,h),!u&&e.shouldRedraw(a,h,g,y)&&i())},s=e.priority||No;n.beforeRender(o,s(a))}}}},Ip=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ln;st(this,r),this.idsByKey=new Hr,this.keyForId=new Hr,this.cachesByLvl=new Hr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return ut(r,[{key:"getIdsFor",value:function(t){t==null&&Ve("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new Kt,a.set(t,n)),n}},{key:"addIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).add(a)}},{key:"deleteIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).delete(a)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);return n!==i}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var a=this.cachesByLvl,n=this.lvls,i=a.get(t);return i||(i=new Hr,a.set(t,i),n.push(t)),i}},{key:"getCache",value:function(t,a){return this.getCachesAt(a).get(t)}},{key:"get",value:function(t,a){var n=this.getKey(t),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(t),i}},{key:"getForCachedKey",value:function(t,a){var n=this.keyForId.get(t.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(t,a){return this.getCachesAt(a).has(t)}},{key:"has",value:function(t,a){var n=this.getKey(t);return this.hasCache(n,a)}},{key:"setCache",value:function(t,a,n){n.key=t,this.getCachesAt(a).set(t,n)}},{key:"set",value:function(t,a,n){var i=this.getKey(t);this.setCache(i,a,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,a){this.getCachesAt(a).delete(t)}},{key:"delete",value:function(t,a){var n=this.getKey(t);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(t){var a=this;this.lvls.forEach(function(n){return a.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(t);var i=this.doesEleInvalidateKey(t);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}])}(),pl=25,Wa=50,nn=-4,ko=3,of=7.99,Op=8,Np=1024,zp=1024,Fp=1024,qp=.2,Vp=.8,_p=10,Gp=.15,Hp=.1,Kp=.9,$p=.9,Up=100,Wp=1,Ot={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Yp=We({getKey:null,doesEleInvalidateKey:ln,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Yl,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ua=function(e,t){var a=this;a.renderer=e,a.onDequeues=[];var n=Yp(t);ge(a,n),a.lookup=new Ip(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},Ye=ua.prototype;Ye.reasons=Ot;Ye.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};Ye.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=t[r]=t[r]||[];return a};Ye.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new Pa(function(t,a){return a.reqs-t.reqs});return e};Ye.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};Ye.getElement=function(r,e,t,a,n){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!i.allowEdgeTxrCaching&&r.isEdge()||!i.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(Fo(s*t))),a=of||a>ko)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=o.eleTextBiggerThanMin(r,u);if(!this.isVisible(r,c))return null;var d=l.get(r,a);if(d&&d.invalidated&&(d.invalidated=!1,d.texture.invalidatedWidth-=d.width),d)return d;var h;if(v<=pl?h=pl:v<=Wa?h=Wa:h=Math.ceil(v/Wa)*Wa,v>Fp||f>zp)return null;var y=i.getTextureQueue(h),g=y[y.length-2],p=function(){return i.recycleTexture(h,f)||i.addTexture(h,f)};g||(g=y[y.length-1]),g||(g=p()),g.width-g.usedWidtha;D--)k=i.getElement(r,e,t,D,Ot.downscale);A()}else return i.queueElement(r,C.level-1),C;else{var B;if(!b&&!w&&!E)for(var P=a-1;P>=nn;P--){var R=l.get(r,P);if(R){B=R;break}}if(m(B))return i.queueElement(r,a),B;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,r,e,c,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return d={x:g.usedWidth,texture:g,level:a,scale:u,width:f,height:v,scaledLabelShown:c},g.usedWidth+=Math.ceil(f+Op),g.eleCaches.push(d),l.set(r,a,d),i.checkTextureFullness(g),d};Ye.invalidateElements=function(r){for(var e=0;e=qp*r.width&&this.retireTexture(r)};Ye.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>Vp&&r.fullnessChecks>=_p?at(t,r):r.fullnessChecks++};Ye.retireTexture=function(r){var e=this,t=r.height,a=e.getTextureQueue(t),n=this.lookup;at(a,r),r.retired=!0;for(var i=r.eleCaches,o=0;o=e)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,zo(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),at(n,o),a.push(o),o}};Ye.queueElement=function(r,e){var t=this,a=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(r),o=n[i];if(o)o.level=Math.max(o.level,e),o.eles.merge(r),o.reqs++,a.updateItem(o);else{var s={eles:r.spawn().merge(r),level:e,reqs:1,key:i};a.push(s),n[i]=s}};Ye.dequeue=function(r){for(var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,o=0;o0;o++){var s=t.pop(),l=s.key,u=s.eles[0],v=i.hasCache(u,s.level);if(a[l]=null,v)continue;n.push(s);var f=e.getBoundingBox(u);e.getElement(u,f,r,s.level,Ot.dequeue)}return n};Ye.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(r),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Oo,t.updateItem(i),t.pop(),a[n]=null):i.eles.unmerge(r))};Ye.onDequeue=function(r){this.onDequeues.push(r)};Ye.offDequeue=function(r){at(this.onDequeues,r)};Ye.setupDequeueing=nf.setupDequeueing({deqRedrawThreshold:Up,deqCost:Gp,deqAvgCost:Hp,deqNoDrawCost:Kp,deqFastCost:$p,deq:function(e,t,a){return e.dequeue(t,a)},onDeqd:function(e,t){for(var a=0;a=Zp||t>yn)return null}a.validateLayersElesOrdering(t,r);var l=a.layersByLevel,u=Math.pow(2,t),v=l[t]=l[t]||[],f,c=a.levelIsComplete(t,r),d,h=function(){var A=function(L){if(a.validateLayersElesOrdering(L,r),a.levelIsComplete(L,r))return d=l[L],!0},D=function(L){if(!d)for(var I=t+L;va<=I&&I<=yn&&!A(I);I+=L);};D(1),D(-1);for(var B=v.length-1;B>=0;B--){var P=v[B];P.invalid&&at(v,P)}};if(!c)h();else return v;var y=function(){if(!f){f=pr();for(var A=0;Aml||P>ml)return null;var R=B*P;if(R>ny)return null;var L=a.makeLayer(f,t);if(D!=null){var I=v.indexOf(D)+1;v.splice(I,0,L)}else(A.insert===void 0||A.insert)&&v.unshift(L);return L};if(a.skipping&&!s)return null;for(var p=null,m=r.length/Xp,b=!s,w=0;w=m||!rv(p.bb,E.boundingBox()))&&(p=g({insert:!0,after:p}),!p))return null;d||b?a.queueLayer(p,E):a.drawEleInLayer(p,E,t,e),p.eles.push(E),x[t]=p}return d||(b?null:v)};ir.getEleLevelForLayerLevel=function(r,e){return r};ir.drawEleInLayer=function(r,e,t,a){var n=this,i=this.renderer,o=r.context,s=e.boundingBox();s.w===0||s.h===0||!e.visible()||(t=n.getEleLevelForLayerLevel(t,a),i.setImgSmoothing(o,!1),i.drawCachedElement(o,e,null,null,t,iy),i.setImgSmoothing(o,!0))};ir.levelIsComplete=function(r,e){var t=this,a=t.layersByLevel[r];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||o.invalid)return!1;n+=o.eles.length}return n===e.length};ir.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var a=0;a0){e=!0;break}}return e};ir.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=Kr(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(a,n,i){e.invalidateLayer(a)}))};ir.invalidateLayer=function(r){if(this.lastInvalidationTime=Kr(),!r.invalid){var e=r.level,t=r.eles,a=this.layersByLevel[e];at(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=e._private.rscratch;if(!(i&&!e.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var l;t&&(l=t,r.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,d=e.pstyle("width").pfValue,h=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,g=e.pstyle("line-outline-color").value,p=u*v,m=u*v,b=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;f==="straight-triangle"?(o.eleStrokeStyle(r,e,L),o.drawEdgeTrianglePath(e,r,s.allpts)):(r.lineWidth=d,r.lineCap=h,o.eleStrokeStyle(r,e,L),o.drawEdgePath(e,r,s.allpts,c),r.lineCap="butt")},w=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(r.lineWidth=d+y,r.lineCap=h,y>0)o.colorStrokeStyle(r,g[0],g[1],g[2],L);else{r.lineCap="butt";return}f==="straight-triangle"?o.drawEdgeTrianglePath(e,r,s.allpts):(o.drawEdgePath(e,r,s.allpts,c),r.lineCap="butt")},E=function(){n&&o.drawEdgeOverlay(r,e)},C=function(){n&&o.drawEdgeUnderlay(r,e)},x=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;o.drawArrowheads(r,e,L)},S=function(){o.drawElementText(r,e,null,a)};r.lineJoin="round";var k=e.pstyle("ghost").value==="yes";if(k){var A=e.pstyle("ghost-offset-x").pfValue,D=e.pstyle("ghost-offset-y").pfValue,B=e.pstyle("ghost-opacity").value,P=p*B;r.translate(A,D),b(P),x(P),r.translate(-A,-D)}else w();C(),b(),x(),E(),S(),t&&r.translate(l.x1,l.y1)}};var lf=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,o=i.usePaths(),s=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;t.lineWidth=u,s.edgeType==="self"&&!o?t.lineCap="butt":t.lineCap="round",i.colorStrokeStyle(t,v[0],v[1],v[2],n),i.drawEdgePath(a,t,s.allpts,"solid")}}}};Wr.drawEdgeOverlay=lf("overlay");Wr.drawEdgeUnderlay=lf("underlay");Wr.drawEdgePath=function(r,e,t,a){var n=r._private.rscratch,i=e,o,s=!1,l=this.usePaths(),u=r.pstyle("line-dash-pattern").pfValue,v=r.pstyle("line-dash-offset").pfValue;if(l){var f=t.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(o=e=n.pathCache,s=!0):(o=e=new Path2D,n.pathCacheKey=f,n.pathCache=o)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!s&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(a==null){if(i&&!o.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var s=e.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(e);r.textAlign=l,r.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;r.textAlign="center",r.textBaseline="bottom"}var d=!t,h;t&&(h=t,r.translate(-h.x1,-h.y1)),n==null?(o.drawText(r,e,null,d,i),e.isEdge()&&(o.drawText(r,e,"source",d,i),o.drawText(r,e,"target",d,i))):o.drawText(r,e,n,d,i),t&&r.translate(h.x1,h.y1)};Ct.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*s,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;r.font=a+" "+o+" "+n+" "+i,r.lineJoin="round",this.colorFillStyle(r,u[0],u[1],u[2],s),this.colorStrokeStyle(r,v[0],v[1],v[2],l)};function uo(r,e,t,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;r.beginPath(),r.moveTo(e+i,t),r.lineTo(e+a-i,t),r.quadraticCurveTo(e+a,t,e+a,t+i),r.lineTo(e+a,t+n-i),r.quadraticCurveTo(e+a,t+n,e+a-i,t+n),r.lineTo(e+i,t+n),r.quadraticCurveTo(e,t+n,e,t+n-i),r.lineTo(e,t+i),r.quadraticCurveTo(e,t,e+i,t),r.closePath(),o?r.stroke():r.fill()}Ct.getTextAngle=function(r,e){var t,a=r._private,n=a.rscratch,i=e?e+"-":"",o=r.pstyle(i+"text-rotation");if(o.strValue==="autorotate"){var s=kr(n,"labelAngle",e);t=r.isEdge()?s:0}else o.strValue==="none"?t=0:t=o.pfValue;return t};Ct.drawText=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,o=i.rscratch,s=n?e.effectiveOpacity():1;if(!(n&&(s===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var l=kr(o,"labelX",t),u=kr(o,"labelY",t),v,f,c=this.getLabelText(e,t);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(r,e,n);var d=t?t+"-":"",h=kr(o,"labelWidth",t),y=kr(o,"labelHeight",t),g=e.pstyle(d+"text-margin-x").pfValue,p=e.pstyle(d+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=g,u+=p;var E;switch(a?E=this.getTextAngle(e,t):E=0,E!==0&&(v=l,f=u,r.translate(v,f),r.rotate(E),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var C=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,S=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,A=e.pstyle("text-background-shape").strValue,D=A.indexOf("round")===0,B=2;if(C>0||S>0&&x>0){var P=l-k;switch(b){case"left":P-=h;break;case"center":P-=h/2;break}var R=u-y-k,L=h+2*k,I=y+2*k;if(C>0){var M=r.fillStyle,O=e.pstyle("text-background-color").value;r.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+C*s+")",D?uo(r,P,R,L,I,B):r.fillRect(P,R,L,I),r.fillStyle=M}if(S>0&&x>0){var _=r.strokeStyle,H=r.lineWidth,z=e.pstyle("text-border-color").value,G=e.pstyle("text-border-style").value;if(r.strokeStyle="rgba("+z[0]+","+z[1]+","+z[2]+","+x*s+")",r.lineWidth=S,r.setLineDash)switch(G){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=S/4,r.setLineDash([]);break;case"solid":r.setLineDash([]);break}if(D?uo(r,P,R,L,I,B,"stroke"):r.strokeRect(P,R,L,I),G==="double"){var W=S/2;D?uo(r,P+W,R+W,L-W*2,I-W*2,B,"stroke"):r.strokeRect(P+W,R+W,L-W*2,I-W*2)}r.setLineDash&&r.setLineDash([]),r.lineWidth=H,r.strokeStyle=_}}var X=2*e.pstyle("text-outline-width").pfValue;if(X>0&&(r.lineWidth=X),e.pstyle("text-wrap").value==="wrap"){var Z=kr(o,"labelWrapCachedLines",t),Q=kr(o,"labelLineHeight",t),j=h/2,re=this.getLabelJustification(e);switch(re==="auto"||(b==="left"?re==="left"?l+=-h:re==="center"&&(l+=-j):b==="center"?re==="left"?l+=-j:re==="right"&&(l+=j):b==="right"&&(re==="center"?l+=j:re==="right"&&(l+=h))),w){case"top":u-=(Z.length-1)*Q;break;case"center":case"bottom":u-=(Z.length-1)*Q;break}for(var K=0;K0&&r.strokeText(Z[K],l,u),r.fillText(Z[K],l,u),u+=Q}else X>0&&r.strokeText(c,l,u),r.fillText(c,l,u);E!==0&&(r.rotate(-E),r.translate(-v,-f))}}};var Zt={};Zt.drawNode=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,l,u=e._private,v=u.rscratch,f=e.position();if(!(!ae(f.x)||!ae(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,d=o.usePaths(),h,y=!1,g=e.padding();s=e.width()+2*g,l=e.height()+2*g;var p;t&&(p=t,r.translate(-p.x1,-p.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),E=new Array(b.length),C=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:P;o.eleFillStyle(r,e,F)},K=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z;o.colorStrokeStyle(r,R[0],R[1],R[2],F)},N=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Z;o.colorStrokeStyle(r,W[0],W[1],W[2],F)},$=function(F,V,ne,Y){var ie=o.nodePathCache=o.nodePathCache||[],ce=Wl(ne==="polygon"?ne+","+Y.join(","):ne,""+V,""+F,""+j),Ee=ie[ce],ve,be=!1;return Ee!=null?(ve=Ee,be=!0,v.pathCache=ve):(ve=new Path2D,ie[ce]=v.pathCache=ve),{path:ve,cacheHit:be}},J=e.pstyle("shape").strValue,te=e.pstyle("shape-polygon-points").pfValue;if(d){r.translate(f.x,f.y);var le=$(s,l,J,te);h=le.path,y=le.cacheHit}var xe=function(){if(!y){var F=f;d&&(F={x:0,y:0}),o.nodeShapes[o.getNodeShape(e)].draw(h||r,F.x,F.y,s,l,j,v)}d?r.fill(h):r.fill()},Ie=function(){for(var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ne=u.backgrounding,Y=0,ie=0;ie0&&arguments[0]!==void 0?arguments[0]:!1,V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;o.hasPie(e)&&(o.drawPie(r,e,V),F&&(d||o.nodeShapes[o.getNodeShape(e)].draw(r,f.x,f.y,s,l,j,v)))},oe=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,V=(D>0?D:-D)*F,ne=D>0?0:255;D!==0&&(o.colorFillStyle(r,ne,ne,ne,V),d?r.fill(h):r.fill())},ue=function(){if(B>0){if(r.lineWidth=B,r.lineCap=M,r.lineJoin=I,r.setLineDash)switch(L){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(_),r.lineDashOffset=H;break;case"solid":case"double":r.setLineDash([]);break}if(O!=="center"){if(r.save(),r.lineWidth*=2,O==="inside")d?r.clip(h):r.clip();else{var F=new Path2D;F.rect(-s/2-B,-l/2-B,s+2*B,l+2*B),F.addPath(h),r.clip(F,"evenodd")}d?r.stroke(h):r.stroke(),r.restore()}else d?r.stroke(h):r.stroke();if(L==="double"){r.lineWidth=B/3;var V=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",d?r.stroke(h):r.stroke(),r.globalCompositeOperation=V}r.setLineDash&&r.setLineDash([])}},he=function(){if(G>0){if(r.lineWidth=G,r.lineCap="butt",r.setLineDash)switch(X){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var F=f;d&&(F={x:0,y:0});var V=o.getNodeShape(e),ne=B;O==="inside"&&(ne=0),O==="outside"&&(ne*=2);var Y=(s+ne+(G+Q))/s,ie=(l+ne+(G+Q))/l,ce=s*Y,Ee=l*ie,ve=o.nodeShapes[V].points,be;if(d){var we=$(ce,Ee,V,ve);be=we.path}if(V==="ellipse")o.drawEllipsePath(be||r,F.x,F.y,ce,Ee);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(V)){var pe=0,Oe=0,qe=0;V==="round-diamond"?pe=(ne+Q+G)*1.4:V==="round-heptagon"?(pe=(ne+Q+G)*1.075,qe=-(ne/2+Q+G)/35):V==="round-hexagon"?pe=(ne+Q+G)*1.12:V==="round-pentagon"?(pe=(ne+Q+G)*1.13,qe=-(ne/2+Q+G)/15):V==="round-tag"?(pe=(ne+Q+G)*1.12,Oe=(ne/2+G+Q)*.07):V==="round-triangle"&&(pe=(ne+Q+G)*(Math.PI/2),qe=-(ne+Q/2+G)/Math.PI),pe!==0&&(Y=(s+pe)/s,ce=s*Y,["round-hexagon","round-tag"].includes(V)||(ie=(l+pe)/l,Ee=l*ie)),j=j==="auto"?nv(ce,Ee):j;for(var yr=ce/2,mr=Ee/2,He=j+(ne+G+Q)/2,Xe=new Array(ve.length/2),Ze=new Array(ve.length/2),vr=0;vr0){if(n=n||a.position(),i==null||o==null){var d=a.padding();i=a.width()+2*d,o=a.height()+2*d}s.colorFillStyle(t,v[0],v[1],v[2],u),s.nodeShapes[f].draw(t,n.x,n.y,i+l*2,o+l*2,c),t.fill()}}}};Zt.drawNodeOverlay=vf("overlay");Zt.drawNodeUnderlay=vf("underlay");Zt.hasPie=function(r){return r=r[0],r._private.hasPie};Zt.drawPie=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),o=a.x,s=a.y,l=e.width(),u=e.height(),v=Math.min(l,u)/2,f=0,c=this.usePaths();c&&(o=0,s=0),i.units==="%"?v=v*i.pfValue:i.pfValue!==void 0&&(v=i.pfValue/2);for(var d=1;d<=n.pieBackgroundN;d++){var h=e.pstyle("pie-"+d+"-background-size").value,y=e.pstyle("pie-"+d+"-background-color").value,g=e.pstyle("pie-"+d+"-background-opacity").value*t,p=h/100;p+f>1&&(p=1-f);var m=1.5*Math.PI+2*Math.PI*f,b=2*Math.PI*p,w=m+b;h===0||f>=1||f+p>1||(r.beginPath(),r.moveTo(o,s),r.arc(o,s,v,m,w),r.closePath(),this.colorFillStyle(r,y[0],y[1],y[2],g),r.fill(),f+=p)}};var hr={},py=100;hr.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};hr.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var m=t.style(),b=t.zoom(),w=o!==void 0?o:b,E=t.pan(),C={x:E.x,y:E.y},x={zoom:b,pan:{x:E.x,y:E.y}},S=e.prevViewport,k=S===void 0||x.zoom!==S.zoom||x.pan.x!==S.pan.x||x.pan.y!==S.pan.y;!k&&!(y&&!h)&&(e.motionBlurPxRatio=1),s&&(C=s),w*=l,C.x*=l,C.y*=l;var A=e.getCachedZSortedEles();function D(K,N,$,J,te){var le=K.globalCompositeOperation;K.globalCompositeOperation="destination-out",e.colorFillStyle(K,255,255,255,e.motionBlurTransparency),K.fillRect(N,$,J,te),K.globalCompositeOperation=le}function B(K,N){var $,J,te,le;!e.clearingMotionBlur&&(K===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||K===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?($={x:E.x*d,y:E.y*d},J=b*d,te=e.canvasWidth*d,le=e.canvasHeight*d):($=C,J=w,te=e.canvasWidth,le=e.canvasHeight),K.setTransform(1,0,0,1,0,0),N==="motionBlur"?D(K,0,0,te,le):!a&&(N===void 0||N)&&K.clearRect(0,0,te,le),n||(K.translate($.x,$.y),K.scale(J,J)),s&&K.translate(s.x,s.y),o&&K.scale(o,o)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var P=e.data.bufferContexts[e.TEXTURE_BUFFER];P.setTransform(1,0,0,1,0,0),P.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:P,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var x=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var R=u.contexts[e.NODE],L=e.textureCache.texture,x=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),c?D(R,0,0,x.width,x.height):R.clearRect(0,0,x.width,x.height);var I=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,I[0],I[1],I[2],M),R.fillRect(0,0,x.width,x.height);var b=t.zoom();B(R,!1),R.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l),R.drawImage(L,x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=t.extent(),_=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),H=e.hideEdgesOnViewport&&_,z=[];if(z[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,z[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),z[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,z[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||z[e.NODE]){var G=c&&!z[e.NODE]&&d!==1,R=a||(G?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),W=c&&!G?"motionBlur":void 0;B(R,W),H?e.drawCachedNodes(R,A.nondrag,l,O):e.drawLayeredElements(R,A.nondrag,l,O),e.debug&&e.drawDebugPoints(R,A.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||z[e.DRAG])){var G=c&&!z[e.DRAG]&&d!==1,R=a||(G?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);B(R,c&&!G?"motionBlur":void 0),H?e.drawCachedNodes(R,A.drag,l,O):e.drawCachedElements(R,A.drag,l,O),e.debug&&e.drawDebugPoints(R,A.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(r,B),c&&d!==1){var X=u.contexts[e.NODE],Z=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Q=u.contexts[e.DRAG],j=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],re=function(N,$,J){N.setTransform(1,0,0,1,0,0),J||!p?N.clearRect(0,0,e.canvasWidth,e.canvasHeight):D(N,0,0,e.canvasWidth,e.canvasHeight);var te=d;N.drawImage($,0,0,e.canvasWidth*te,e.canvasHeight*te,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||z[e.NODE])&&(re(X,Z,z[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||z[e.DRAG])&&(re(Q,j,z[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},py)),a||t.emit("render")};var aa;hr.drawSelectionRectangle=function(r,e){var t=this,a=t.cy,n=t.data,i=a.style(),o=r.drawOnlyNodeLayer,s=r.drawAllLayers,l=n.canvasNeedsRedraw,u=r.forcedContext;if(t.showFps||!o&&l[t.SELECT_BOX]&&!s){var v=u||n.contexts[t.SELECT_BOX];if(e(v),t.selection[4]==1&&(t.hoverData.selecting||t.touchData.selecting)){var f=t.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(n.bgActivePosistion&&!t.hoverData.selecting){var f=t.cy.zoom(),d=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(d.x,d.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var h=t.lastRedrawTime;if(t.showFps&&h){h=Math.round(h);var y=Math.round(1e3/h),g="1 frame = "+h+" ms = "+y+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!aa){var p=v.measureText(g);aa=p.actualBoundingBoxAscent}v.fillText(g,0,aa);var m=60;v.strokeRect(0,aa+10,250,20),v.fillRect(0,aa+10,250*Math.min(y/m,1),20)}s||(l[t.SELECT_BOX]=!1)}};function El(r,e,t){var a=r.createShader(e);if(r.shaderSource(a,t),r.compileShader(a),!r.getShaderParameter(a,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(a));return a}function yy(r,e,t){var a=El(r,r.VERTEX_SHADER,e),n=El(r,r.FRAGMENT_SHADER,t),i=r.createProgram();if(r.attachShader(i,a),r.attachShader(i,n),r.linkProgram(i),!r.getProgramParameter(i,r.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function my(r,e,t){t===void 0&&(t=e);var a=r.makeOffscreenCanvas(e,t),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function es(r){var e=r.pixelRatio,t=r.cy.zoom(),a=r.cy.pan();return{zoom:t*e,pan:{x:a.x*e,y:a.y*e}}}function by(r,e,t,a,n){var i=a*t+e.x,o=n*t+e.y;return o=Math.round(r.canvasHeight-o),[i,o]}function na(r,e,t){var a=r[0]/255,n=r[1]/255,i=r[2]/255,o=e,s=t||new Array(4);return s[0]=a*o,s[1]=n*o,s[2]=i*o,s[3]=o,s}function At(r,e){var t=e||new Array(4);return t[0]=(r>>0&255)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function wy(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function xy(r,e){var t=r.createTexture();return t.buffer=function(a){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,a),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}function ff(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function cf(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function Ey(r,e,t,a,n,i){switch(e){case r.FLOAT:return new Float32Array(t.buffer,i*a,n);case r.INT:return new Int32Array(t.buffer,i*a,n)}}function Cy(r,e,t,a){var n=ff(r,e),i=je(n,2),o=i[0],s=i[1],l=cf(r,s,a),u=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,u),r.bufferData(r.ARRAY_BUFFER,l,r.STATIC_DRAW),s===r.FLOAT?r.vertexAttribPointer(t,o,s,!1,0,0):s===r.INT&&r.vertexAttribIPointer(t,o,s,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null),u}function Zr(r,e,t,a){var n=ff(r,t),i=je(n,3),o=i[0],s=i[1],l=i[2],u=cf(r,s,e*o),v=o*l,f=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,f),r.bufferData(r.ARRAY_BUFFER,e*v,r.DYNAMIC_DRAW),r.enableVertexAttribArray(a),s===r.FLOAT?r.vertexAttribPointer(a,o,s,!1,v,0):s===r.INT&&r.vertexAttribIPointer(a,o,s,v,0),r.vertexAttribDivisor(a,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var c=new Array(e),d=0;do&&(s=o/a,l=a*s,u=n*s),{scale:s,texW:l,texH:u}}},{key:"draw",value:function(t,a,n){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,s=this.texRows,l=this.texHeight,u=this.getScale(a),v=u.scale,f=u.texW,c=u.texH,d=[null,null],h=function(b,w){if(n&&w){var E=w.context,C=b.x,x=b.row,S=C,k=l*x;E.save(),E.translate(S,k),E.scale(v,v),n(E,a),E.restore()}},y=function(){h(i.freePointer,i.canvas),d[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:c},d[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==o&&(i.freePointer.x=0,i.freePointer.row++)},g=function(){var b=i.scratch,w=i.canvas;b.clear(),h({x:0,row:0},b);var E=o-i.freePointer.x,C=f-E,x=l;{var S=i.freePointer.x,k=i.freePointer.row*l,A=E;w.context.drawImage(b,0,0,A,x,S,k,A,x),d[0]={x:S,y:k,w:A,h:c}}{var D=E,B=(i.freePointer.row+1)*l,P=C;w&&w.context.drawImage(b,D,0,P,x,0,B,P,x),d[1]={x:0,y:B,w:P,h:c}}i.freePointer.x=C,i.freePointer.row++},p=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=o)y();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===o?(p(),y()):this.enableWrapping?g():(p(),y())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(t){if(this.locked)return!1;var a=this.texSize,n=this.texRows,i=this.getScale(t),o=i.texW;return this.freePointer.x+o>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},n=a.forceRedraw,i=n===void 0?!1:n,o=a.filterEle,s=o===void 0?function(){return!0}:o,l=a.filterType,u=l===void 0?function(){return!0}:l,v=!1,f=!1,c=Pr(t),d;try{for(c.s();!(d=c.n()).done;){var h=d.value;if(s(h)){var y=Pr(this.renderTypes.values()),g;try{for(y.s();!(g=y.n()).done;){var p=g.value,m=p.type;if(u(m)){var b=p.getKey(h),w=this.collections.get(p.collection);if(i)w.markKeyForGC(b),f=!0;else{var E=p.getID?p.getID(h):h.id(),C=this._key(m,E),x=this.typeAndIdToKey.get(C);x!==void 0&&x!==b&&(this.typeAndIdToKey.delete(C),w.markKeyForGC(x),v=!0)}}}}catch(S){y.e(S)}finally{y.f()}}}}catch(S){c.e(S)}finally{c.f()}return f&&(this.gc(),v=!1),v}},{key:"gc",value:function(){var t=Pr(this.collections.values()),a;try{for(t.s();!(a=t.n()).done;){var n=a.value;n.gc()}}catch(i){t.e(i)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,a,n){var i=this.renderTypes.get(a),o=i.getKey(t);n||(n=i.getBoundingBox(t));var s=this.collections.get(i.collection),l=!1,u=s.draw(o,n,function(c){i.drawElement(c,t,n,!0,!0),l=!0});if(l){var v=i.getID?i.getID(t):t.id(),f=this._key(a,v);this.typeAndIdToKey.set(f,o)}return u}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t,a){if(this.batchAtlases.length===this.maxAtlasesPerBatch){var n=this.renderTypes.get(a),i=n.getKey(t),o=this.collections.get(n.collection),s=o.getAtlas(i);return!!s&&this.batchAtlases.includes(s)}return!0}},{key:"getAtlasIndexForBatch",value:function(t){var a=this.batchAtlases.indexOf(t);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(t),a=this.batchAtlases.length-1}return a}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,a){return a})}},{key:"getAtlasInfo",value:function(t,a){var n=this.renderTypes.get(a),i=n.getBoundingBox(t),o=this.getOrCreateAtlas(t,a,i),s=this.getAtlasIndexForBatch(o);if(s!==void 0){var l=n.getKey(t),u=o.getOffsets(l),v=je(u,2),f=v[0],c=v[1];return{index:s,tex1:f,tex2:c,bb:i}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=this.getRenderTypeOpts(n),l=s.getPadding?s.getPadding(t):0;if(i){var u=i.bb,v=i.tex1,f=i.tex2,c=v.w/(v.w+f.w);o||(c=1-c);var d=this.getAdjustedBB(u,l,o,c);this._applyTransformMatrix(a,d,s,t)}else{var h=s.getBoundingBox(t),y=this.getAdjustedBB(h,l,!0,1);this._applyTransformMatrix(a,y,s,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var o,s;hf(t);var l=n.getRotation?n.getRotation(i):0;if(l!==0){var u=n.getRotationPoint(i),v=u.x,f=u.y;mn(t,t,[v,f]),df(t,t,l);var c=n.getRotationOffset(i);o=c.x+a.xOffset,s=c.y}else o=a.x1,s=a.y1;mn(t,t,[o,s]),rs(t,t,[a.w,a.h])}},{key:"getAdjustedBB",value:function(t,a,n,i){var o=t.x1,s=t.y1,l=t.w,u=t.h;a&&(o-=a,s-=a,l+=2*a,u+=2*a);var v=0,f=l*i;return n&&i<1?l=f:!n&&i<1&&(v=l-f,o+=v,l=f),{x1:o,y1:s,w:l,h:u,xOffset:v}}},{key:"getDebugInfo",value:function(){var t=[],a=Pr(this.collections),n;try{for(a.s();!(n=a.n()).done;){var i=je(n.value,2),o=i[0],s=i[1],l=s.getCounts(),u=l.keyCount,v=l.atlasCount;t.push({type:o,keyCount:u,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return t}}])}(),Ya=0,Sl=1,Dl=2,lo=3,kl=4,My=function(){function r(e,t,a){st(this,r),this.r=e,this.gl=t,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=my,this.atlasManager=new Ry(e,a),this.program=this.createShaderProgram(fa.SCREEN),this.pickingProgram=this.createShaderProgram(fa.PICKING),this.vao=this.createVAO()}return ut(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"invalidate",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(t,{filterType:function(s){return s===n},forceRedraw:!0}):i.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"createShaderProgram",value:function(t){var a=this.gl,n=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; + + in mat3 aTransform; + + // what are we rendering? + in int aVertType; + + // for picking + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex; // x/y/w/h of texture in atlas + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in float aLineWidth; + in vec4 aColor; + + out vec2 vTexCoord; + out vec4 vColor; + flat out int vAtlasId; + flat out vec4 vIndex; + flat out int vVertType; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; + + if(aVertType == `.concat(Ya,`) { + float texX = aTex.x; + float texY = aTex.y; + float texW = aTex.z; + float texH = aTex.w; + + int vid = gl_VertexID; + + if(vid == 1 || vid == 2 || vid == 4) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(kl,`) { + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == `).concat(Sl,`) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == `).concat(Dl,`) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0 = pointA; + vec2 p1 = pointB; + vec2 p2 = pointC; + vec2 pos = position; + if(position.x == 1.0) { + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vColor = aColor; + } + else if(aVertType == `).concat(lo,` && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vIndex = aIndex; + vVertType = aVertType; + } + `),i=this.atlasManager.getIndexArray(),o=`#version 300 es + precision highp float; + + // define texture unit for each node in the batch + `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` + `),` + + uniform vec4 uBGColor; + + in vec2 vTexCoord; + in vec4 vColor; + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + + out vec4 outColor; + + void main(void) { + if(vVertType == `).concat(Ya,`) { + `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` + else `),` + } else if(vVertType == `).concat(lo,`) { + // blend arrow color with background (using premultiplied alpha) + outColor.rgb = vColor.rgb + (uBGColor.rgb * (1.0 - vColor.a)); + outColor.a = 1.0; // make opaque, masks out line under arrow + } else { + outColor = vColor; + } + + `).concat(t.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `),s=yy(a,n,o);s.aPosition=a.getAttribLocation(s,"aPosition"),s.aIndex=a.getAttribLocation(s,"aIndex"),s.aVertType=a.getAttribLocation(s,"aVertType"),s.aTransform=a.getAttribLocation(s,"aTransform"),s.aAtlasId=a.getAttribLocation(s,"aAtlasId"),s.aTex=a.getAttribLocation(s,"aTex"),s.aPointAPointB=a.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=a.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=a.getAttribLocation(s,"aLineWidth"),s.aColor=a.getAttribLocation(s,"aColor"),s.uPanZoomMatrix=a.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=a.getUniformLocation(s,"uAtlasSize"),s.uBGColor=a.getUniformLocation(s,"uBGColor"),s.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:fa.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.rectangleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.atlasManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"getTempMatrix",value:function(){return this.tempMatrix=this.tempMatrix||on()}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager;if(t.visible()&&i.getRenderTypeOpts(n).isVisible(t)){i.canAddToCurrentBatch(t,n)||this.endBatch(),this.instanceCount+1>=this.maxInstances&&this.endBatch();var o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=Ya;var s=this.indexBuffer.getView(o);At(a,s);var l=i.getAtlasInfo(t,n),u=l.index,v=l.tex1,f=l.tex2;f.w>0&&this.wrappedCount++;for(var c=!0,d=0,h=[v,f];d=this.maxInstances&&this.endBatch()}}},{key:"drawSimpleRectangle",value:function(t,a,n){if(t.visible()){var i=this.atlasManager,o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=kl;var s=this.indexBuffer.getView(o);At(a,s);var l=t.pstyle("background-color").value,u=t.pstyle("background-opacity").value,v=this.colorBuffer.getView(o);na(l,u,v);var f=this.transformBuffer.getMatrixView(o);i.setTransformMatrix(t,f,n),this.rectangleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"drawEdgeArrow",value:function(t,a,n){if(t.visible()){var i=t._private.rscratch,o,s,l;if(n==="source"?(o=i.arrowStartX,s=i.arrowStartY,l=i.srcArrowAngle):(o=i.arrowEndX,s=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(s)||s==null||isNaN(l)||l==null)){var u=t.pstyle(n+"-arrow-shape").value;if(u!=="none"){var v=t.pstyle(n+"-arrow-color").value,f=t.pstyle("opacity").value,c=t.pstyle("line-opacity").value,d=f*c,h=t.pstyle("width").pfValue,y=t.pstyle("arrow-scale").value,g=this.r.getArrowWidth(h,y),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);hf(m),mn(m,m,[o,s]),rs(m,m,[g,g]),df(m,m,l),this.vertTypeBuffer.getView(p)[0]=lo;var b=this.indexBuffer.getView(p);At(a,b);var w=this.colorBuffer.getView(p);na(v,d,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(t,a){if(t.visible()){var n=this.getEdgePoints(t);if(n){var i=t.pstyle("opacity").value,o=t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,l=t.pstyle("line-color").value,u=i*o;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=Sl;var f=this.indexBuffer.getView(v);At(a,f);var c=this.colorBuffer.getView(v);na(l,u,c);var d=this.lineWidthBuffer.getView(v);d[0]=s;var h=this.pointAPointBBuffer.getView(v);h[0]=n[0],h[1]=n[1],h[2]=n[2],h[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}}}},{key:"getEdgePoints",value:function(t){var a=t._private.rscratch;if(!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))){var n=a.allpts;if(n.length==4)return n;var i=this.getNumSegments(t);return this.getCurveSegmentPoints(n,i)}}},{key:"getNumSegments",value:function(t){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"getCurveSegmentPoints",value:function(t,a){if(t.length==4)return t;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=t[0],n[1]=t[1];else if(i==a)n[i*2]=t[t.length-2],n[i*2+1]=t[t.length-1];else{var o=i/a;this.setCurvePoint(t,o,n,i*2)}return n}},{key:"setCurvePoint",value:function(t,a,n,i){if(t.length<=2)n[i]=t[0],n[i+1]=t[1];else{for(var o=Array(t.length-2),s=0;s0}},{key:"getStyle",value:function(t,a){var n=a.pstyle("".concat(t,"-opacity")).value,i=a.pstyle("".concat(t,"-color")).value,o=a.pstyle("".concat(t,"-shape")).value;return{opacity:n,color:i,shape:o}}},{key:"getPadding",value:function(t,a){return a.pstyle("".concat(t,"-padding")).pfValue}},{key:"draw",value:function(t,a,n,i){if(this.isVisible(t,n)){var o=this.r,s=i.w,l=i.h,u=s/2,v=l/2,f=this.getStyle(t,n),c=f.shape,d=f.color,h=f.opacity;a.save(),a.fillStyle=Pl(d,h),c==="round-rectangle"||c==="roundrectangle"?o.drawRoundRectanglePath(a,u,v,s,l,"auto"):c==="ellipse"&&o.drawEllipsePath(a,u,v,s,l),a.fill(),a.restore()}}}])}(),gf={};gf.initWebgl=function(r,e){var t=this,a=t.data.contexts[t.WEBGL];r.bgColor=Iy(t),r.webglTexSize=Math.min(r.webglTexSize,a.getParameter(a.MAX_TEXTURE_SIZE)),r.webglTexRows=Math.min(r.webglTexRows,54),r.webglTexRowsNodes=Math.min(r.webglTexRowsNodes,54),r.webglBatchSize=Math.min(r.webglBatchSize,16384),r.webglTexPerBatch=Math.min(r.webglTexPerBatch,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),t.webglDebug=r.webglDebug,t.webglDebugShowAtlases=r.webglDebugShowAtlases,t.pickingFrameBuffer=Sy(a),t.pickingFrameBuffer.needsDraw=!0;var n=function(u){return function(v){return t.getTextAngle(v,u)}},i=function(u){return function(v){var f=v.pstyle(u);return f&&f.value}};t.drawing=new My(t,a,r);var o=new Ly(t);t.drawing.addAtlasCollection("node",Tl({texRows:r.webglTexRowsNodes})),t.drawing.addAtlasCollection("label",Tl({texRows:r.webglTexRows})),t.drawing.addAtlasRenderType("node-body",Bt({collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement})),t.drawing.addAtlasRenderType("label",Bt({collection:"label",getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")})),t.drawing.addAtlasRenderType("node-overlay",Bt({collection:"node",getBoundingBox:e.getElementBox,getKey:function(u){return o.getStyleKey("overlay",u)},drawElement:function(u,v,f){return o.draw("overlay",u,v,f)},isVisible:function(u){return o.isVisible("overlay",u)},getPadding:function(u){return o.getPadding("overlay",u)}})),t.drawing.addAtlasRenderType("node-underlay",Bt({collection:"node",getBoundingBox:e.getElementBox,getKey:function(u){return o.getStyleKey("underlay",u)},drawElement:function(u,v,f){return o.draw("underlay",u,v,f)},isVisible:function(u){return o.isVisible("underlay",u)},getPadding:function(u){return o.getPadding("underlay",u)}})),t.drawing.addAtlasRenderType("edge-source-label",Bt({collection:"label",getKey:e.getSourceLabelKey,getBoundingBox:e.getSourceLabelBox,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")})),t.drawing.addAtlasRenderType("edge-target-label",Bt({collection:"label",getKey:e.getTargetLabelKey,getBoundingBox:e.getTargetLabelBox,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")}));var s=ka(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(l,u){var v=!1;u&&u.length>0&&(v|=t.drawing.invalidate(u)),v&&s()}),Oy(t)};function Iy(r){var e=r.cy.container(),t=e&&e.style&&e.style.backgroundColor||"white";return Vl(t)}function Oy(r){{var e=r.render;r.render=function(i){i=i||{};var o=r.cy;r.webgl&&(o.zoom()>of?(Ny(r),e.call(r,i)):(zy(r),yf(r,i,fa.SCREEN)))}}{var t=r.matchCanvasSize;r.matchCanvasSize=function(i){t.call(r,i),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(i,o,s,l){return Hy(r,i,o)};{var a=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){a.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var n=r.notify;r.notify=function(i,o){n.call(r,i,o),i==="viewport"||i==="bounds"?r.pickingFrameBuffer.needsDraw=!0:i==="background"&&r.drawing.invalidate(o,{type:"node-body"})}}}function Ny(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function zy(r){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,r.canvasWidth,r.canvasHeight),a.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}function Fy(r){var e=r.canvasWidth,t=r.canvasHeight,a=es(r),n=a.pan,i=a.zoom,o=on();mn(o,o,[n.x,n.y]),rs(o,o,[i,i]);var s=on();ky(s,e,t);var l=on();return Dy(l,s,o),l}function pf(r,e){var t=r.canvasWidth,a=r.canvasHeight,n=es(r),i=n.pan,o=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,a),e.translate(i.x,i.y),e.scale(o,o)}function qy(r,e){r.drawSelectionRectangle(e,function(t){return pf(r,t)})}function Vy(r){var e=r.data.contexts[r.NODE];e.save(),pf(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function _y(r){var e=function(n,i,o){for(var s=n.atlasManager.getAtlasCollection(i),l=r.data.contexts[r.NODE],u=.125,v=s.atlases,f=0;f=0&&w.add(x)}return w}function Hy(r,e,t){var a=Gy(r,e,t),n=r.getCachedZSortedEles(),i,o,s=Pr(a),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,v=n[u];if(!i&&v.isNode()&&(i=v),!o&&v.isEdge()&&(o=v),i&&o)break}}catch(f){s.e(f)}finally{s.f()}return[i,o].filter(Boolean)}function Ky(r){return r.pstyle("shape").value==="rectangle"&&r.pstyle("background-fill").value==="solid"&&r.pstyle("border-width").pfValue===0&&r.pstyle("background-image").strValue==="none"}function vo(r,e,t){var a=r.drawing;e+=1,t.isNode()?(a.drawTexture(t,e,"node-underlay"),Ky(t)?a.drawSimpleRectangle(t,e,"node-body"):a.drawTexture(t,e,"node-body"),a.drawTexture(t,e,"label"),a.drawTexture(t,e,"node-overlay")):(a.drawEdgeLine(t,e),a.drawEdgeArrow(t,e,"source"),a.drawEdgeArrow(t,e,"target"),a.drawTexture(t,e,"label"),a.drawTexture(t,e,"edge-source-label"),a.drawTexture(t,e,"edge-target-label"))}function yf(r,e,t){var a;r.webglDebug&&(a=performance.now());var n=r.drawing,i=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&qy(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var o=r.data.contexts[r.WEBGL];t.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=Fy(r),l=r.getCachedZSortedEles();if(i=l.length,n.startFrame(s,t),t.screen){for(var u=0;u0&&o>0){d.clearRect(0,0,i,o),d.globalCompositeOperation="source-over";var h=this.getCachedZSortedEles();if(r.full)d.translate(-a.x1*u,-a.y1*u),d.scale(u,u),this.drawElements(d,h),d.scale(1/u,1/u),d.translate(a.x1*u,a.y1*u);else{var y=e.pan(),g={x:y.x*u,y:y.y*u};u*=e.zoom(),d.translate(g.x,g.y),d.scale(u,u),this.drawElements(d,h),d.scale(1/u,1/u),d.translate(-g.x,-g.y)}r.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=r.bg,d.rect(0,0,i,o),d.fill())}return c};function $y(r,e){for(var t=atob(r),a=new ArrayBuffer(t.length),n=new Uint8Array(a),i=0;i"u"?"undefined":Ue(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var a=this.cy.window(),n=a.document;t=n.createElement("canvas"),t.width=r,t.height=e}return t};[uf,qr,Wr,jo,Ct,Zt,hr,gf,vt,La,wf].forEach(function(r){ge(Te,r)});var Yy=[{name:"null",impl:Wv},{name:"base",impl:af},{name:"canvas",impl:Uy}],Xy=[{type:"layout",extensions:Pp},{type:"renderer",extensions:Yy}],Ef={},Cf={};function Tf(r,e,t){var a=t,n=function(S){Re("Can not register `"+e+"` for `"+r+"` since `"+S+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(xa.prototype[e])return n(e);xa.prototype[e]=t}else if(r==="collection"){if(nr.prototype[e])return n(e);nr.prototype[e]=t}else if(r==="layout"){for(var i=function(S){this.options=S,t.call(this,S),ke(this._private)||(this._private={}),this._private.cy=S.cy,this._private.listeners=[],this.createEmitter()},o=i.prototype=Object.create(t.prototype),s=[],l=0;lt.length)&&(e=t.length);for(var r=0,a=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,s=!1,o;return{s:function(){r=r.call(t)},n:function(){var l=r.next();return i=l.done,l},e:function(l){s=!0,o=l},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(s)throw o}}}}var We=typeof window>"u"?null:window,_i=We?We.navigator:null;We&&We.document;var Tl=Ue(""),po=Ue({}),Cl=Ue(function(){}),Sl=typeof HTMLElement>"u"?"undefined":Ue(HTMLElement),Pa=function(e){return e&&e.instanceString&&$e(e.instanceString)?e.instanceString():null},fe=function(e){return e!=null&&Ue(e)==Tl},$e=function(e){return e!=null&&Ue(e)===Cl},Ie=function(e){return!xt(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},ke=function(e){return e!=null&&Ue(e)===po&&!Ie(e)&&e.constructor===Object},Dl=function(e){return e!=null&&Ue(e)===po},re=function(e){return e!=null&&Ue(e)===Ue(1)&&!isNaN(e)},kl=function(e){return re(e)&&Math.floor(e)===e},vn=function(e){if(Sl!=="undefined")return e!=null&&e instanceof HTMLElement},xt=function(e){return Ba(e)||yo(e)},Ba=function(e){return Pa(e)==="collection"&&e._private.single},yo=function(e){return Pa(e)==="collection"&&!e._private.single},wi=function(e){return Pa(e)==="core"},mo=function(e){return Pa(e)==="stylesheet"},Pl=function(e){return Pa(e)==="event"},tr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},Bl=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Al=function(e){return ke(e)&&re(e.x1)&&re(e.x2)&&re(e.y1)&&re(e.y2)},Rl=function(e){return Dl(e)&&$e(e.then)},Ml=function(){return _i&&_i.userAgent.match(/msie|trident|edge/i)},ya=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;sr?1:0},Vl=function(e,r){return-1*wo(e,r)},de=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r1&&(p-=1),p<1/6?d+(y-d)*6*p:p<1/2?y:p<2/3?d+(y-d)*(2/3-p)*6:d}var f=new RegExp("^"+Ol+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}r=[o,l,u,s]}return r},Gl=function(e){var r,a=new RegExp("^"+Ll+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;r.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;r.push(u)}}return r},Kl=function(e){return Wl[e.toLowerCase()]},xo=function(e){return(Ie(e)?e:null)||Kl(e)||ql(e)||Gl(e)||$l(e)},Wl={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Eo=function(e){for(var r=e.map,a=e.keys,n=a.length,i=0;i=e||x<0||f&&S>=i}function g(){var E=$n();if(p(E))return m(E);o=setTimeout(g,y(E))}function m(E){return o=void 0,c&&a?h(E):(a=n=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,a=l=n=o=void 0}function w(){return o===void 0?s:m($n())}function T(){var E=$n(),x=p(E);if(a=arguments,n=this,l=E,x){if(o===void 0)return d(l);if(f)return clearTimeout(o),o=setTimeout(g,e),h(l)}return o===void 0&&(o=setTimeout(g,e)),s}return T.cancel=b,T.flush=w,T}var Ra=Pv,Gn=We?We.performance:null,Do=Gn&&Gn.now?function(){return Gn.now()}:function(){return Date.now()},Bv=function(){if(We){if(We.requestAnimationFrame)return function(t){We.requestAnimationFrame(t)};if(We.mozRequestAnimationFrame)return function(t){We.mozRequestAnimationFrame(t)};if(We.webkitRequestAnimationFrame)return function(t){We.webkitRequestAnimationFrame(t)};if(We.msRequestAnimationFrame)return function(t){We.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(Do())},1e3/60)}}(),fn=function(e){return Bv(e)},Wt=Do,Rr=9261,ko=65599,la=5381,Po=function(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rr,a=r,n;n=e.next(),!n.done;)a=a*ko+n.value|0;return a},ma=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Rr;return r*ko+e|0},ba=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:la;return(r<<5)+r+e|0},Av=function(e,r){return e*2097152+r},_t=function(e){return e[0]*2097152+e[1]},qa=function(e,r){return[ma(e[0],r[0]),ba(e[1],r[1])]},Rv=function(e,r){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===r&&e.splice(n,1)},Ci=function(e){e.splice(0,e.length)},Fv=function(e,r){for(var a=0;a"u"?"undefined":Ue(Set))!==qv?Set:$v,Cn=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||r===void 0||!wi(e)){qe("An element must have a core reference and parameters set");return}var n=r.group;if(n==null&&(r.data&&r.data.source!=null&&r.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){qe("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?n==="edges":!!r.pannable,active:!1,classes:new Kr,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),r.renderedPosition){var s=r.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];Ie(r.classes)?u=r.classes:fe(r.classes)&&(u=r.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(g,m,b,w,T){var E;if(b==null&&(b=0),T==null&&(T=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=g.length);bP;0<=P?C++:C--)S.push(C);return S}).apply(this).reverse(),x=[],w=0,T=E.length;wB;0<=B?++S:--S)k.push(s(g,b));return k},y=function(g,m,b,w){var T,E,x;for(w==null&&(w=a),T=g[b];b>m;){if(x=b-1>>1,E=g[x],w(T,E)<0){g[b]=E,b=x;continue}break}return g[b]=T},p=function(g,m,b){var w,T,E,x,S;for(b==null&&(b=a),T=g.length,S=m,E=g[m],w=2*m+1;w0;){var E=m.pop(),x=p(E),S=E.id();if(c[S]=x,x!==1/0)for(var C=E.neighborhood().intersect(d),P=0;P0)for(O.unshift(L);f[W];){var V=f[W];O.unshift(V.edge),O.unshift(V.node),q=V.node,W=q.id()}return o.spawn(O)}}}},Hv={kruskal:function(e){e=e||function(b){return 1};for(var r=this.byGroup(),a=r.nodes,n=r.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var T=0;T0;){if(T(),x++,w===v){for(var S=[],C=i,P=v,B=g[P];S.unshift(C),B!=null&&S.unshift(B),C=p[P],C!=null;)P=C.id(),B=g[P];return{found:!0,distance:f[w],path:this.spawn(S),steps:x}}h[w]=!0;for(var k=b._private.edges,R=0;RB&&(d[P]=B,m[P]=C,b[P]=T),!i){var k=C*v+S;!i&&d[k]>B&&(d[k]=B,m[k]=S,b[k]=T)}}}for(var R=0;R1&&arguments[1]!==void 0?arguments[1]:s,pe=b(le),ye=[],he=pe;;){if(he==null)return r.spawn();var me=m(he),Ee=me.edge,Se=me.pred;if(ye.unshift(he[0]),he.same(oe)&&ye.length>0)break;Ee!=null&&ye.unshift(Ee),he=Se}return l.spawn(ye)},E=0;E=0;v--){var f=u[v],c=f[1],h=f[2];(r[c]===o&&r[h]===l||r[c]===l&&r[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*r.length);r=jv(i,e,r),a--}return r},ef={kargerStein:function(){var e=this,r=this.byGroup(),a=r.nodes,n=r.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/Jv);if(i<2){qe("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=r;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=r;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(r,a):(a0&&e.splice(0,r));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},of=function(e){return Math.PI*e/180},$a=function(e,r){return Math.atan2(r,e)-Math.PI/2},Si=Math.log2||function(t){return Math.log(t)/Math.log(2)},Oo=function(e){return e>0?1:e<0?-1:0},mr=function(e,r){return Math.sqrt(cr(e,r))},cr=function(e,r){var a=r.x-e.x,n=r.y-e.y;return a*a+n*n},uf=function(e){for(var r=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},vf=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},ff=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},cf=function(e,r,a){return{x1:e.x1+r,x2:e.x2+r,y1:e.y1+a,y2:e.y2+a,w:e.w,h:e.h}},No=function(e,r){e.x1=Math.min(e.x1,r.x1),e.x2=Math.max(e.x2,r.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r.y1),e.y2=Math.max(e.y2,r.y2),e.h=e.y2-e.y1},df=function(e,r,a){e.x1=Math.min(e.x1,r),e.x2=Math.max(e.x2,r),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},en=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=r,e.x2+=r,e.y1-=r,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},tn=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(r.length===1)a=n=i=s=r[0];else if(r.length===2)a=i=r[0],s=n=r[1];else if(r.length===4){var o=Je(r,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},as=function(e,r){e.x1=r.x1,e.y1=r.y1,e.x2=r.x2,e.y2=r.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Di=function(e,r){return!(e.x1>r.x2||r.x1>e.x2||e.x2r.y2||r.y1>e.y2)},Vr=function(e,r,a){return e.x1<=r&&r<=e.x2&&e.y1<=a&&a<=e.y2},hf=function(e,r){return Vr(e,r.x,r.y)},zo=function(e,r){return Vr(e,r.x1,r.y1)&&Vr(e,r.x2,r.y2)},Fo=function(e,r,a,n,i,s,o){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?br(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var y=a-v+u-o,p=n-f-o,g=a+v-u+o,m=p;if(d=Jt(e,r,a,n,y,p,g,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,T=b,E=n+f-u+o;if(d=Jt(e,r,a,n,b,w,T,E,!1),d.length>0)return d}if(c){var x=a-v+u-o,S=n+f+o,C=a+v-u+o,P=S;if(d=Jt(e,r,a,n,x,S,C,P,!1),d.length>0)return d}if(h){var B=a-v-o,k=n-f+u-o,R=B,A=n+f-u+o;if(d=Jt(e,r,a,n,B,k,R,A,!1),d.length>0)return d}var I;{var M=a-v+u,L=n-f+u;if(I=va(e,r,a,n,M,L,u+o),I.length>0&&I[0]<=M&&I[1]<=L)return[I[0],I[1]]}{var O=a+v-u,q=n-f+u;if(I=va(e,r,a,n,O,q,u+o),I.length>0&&I[0]>=O&&I[1]<=q)return[I[0],I[1]]}{var W=a+v-u,V=n+f-u;if(I=va(e,r,a,n,W,V,u+o),I.length>0&&I[0]>=W&&I[1]>=V)return[I[0],I[1]]}{var $=a-v+u,X=n+f-u;if(I=va(e,r,a,n,$,X,u+o),I.length>0&&I[0]<=$&&I[1]>=X)return[I[0],I[1]]}return[]},gf=function(e,r,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=r&&r<=c+l},pf=function(e,r,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||rv.y2)},yf=function(e,r,a,n){a-=n;var i=r*r-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-r+s)/o,u=(-r-s)/o;return[l,u]},mf=function(e,r,a,n,i){var s=1e-5;e===0&&(e=s),r/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-r*r)/9,u=-(27*n)+r*(9*a-2*(r*r)),u/=54,o=l*l*l+u*u,i[1]=0,h=r/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},bf=function(e,r,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=1*9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=1*3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*r+2*s*s+2*s*r-l*r,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*r-s*r,h=[];mf(u,v,f,c,h);for(var d=1e-7,y=[],p=0;p<6;p+=2)Math.abs(h[p+1])=0&&h[p]<=1&&y.push(h[p]);y.push(1),y.push(0);for(var g=-1,m,b,w,T=0;T=0?wu?(e-i)*(e-i)+(r-s)*(r-s):v-c},gt=function(e,r,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>r&&u++;else continue;return u%2!==0},Ht=function(e,r,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var p=hn(v,-u);y=dn(p)}else y=v;return gt(e,r,y)},xf=function(e,r,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&p<=1&&m.push(p),g>=0&&g<=1&&m.push(g),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+r;if(m.length>1){if(m[0]==m[1])return[b,w];var T=m[1]*l[0]+e,E=m[1]*l[1]+r;return[b,w,T,E]}else return[b,w]},Wn=function(e,r,a){return r<=e&&e<=a||a<=e&&e<=r?e:e<=r&&r<=a||a<=r&&r<=e?r:a},Jt=function(e,r,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=r-s,d=n-r,y=l-s,p=c*h-y*v,g=f*h-d*v,m=y*f-c*d;if(m!==0){var b=p/m,w=g/m,T=.001,E=0-T,x=1+T;return E<=b&&b<=x&&E<=w&&w<=x?[e+b*f,r+b*d]:u?[e+b*f,r+b*d]:[]}else return p===0||g===0?Wn(e,a,o)===o?[o,l]:Wn(e,a,i)===i?[i,s]:Wn(i,o,a)===a?[a,n]:[]:[]},Ea=function(e,r,a,n,i,s,o,l){var u=[],v,f=new Array(a.length),c=!0;s==null&&(c=!1);var h;if(c){for(var d=0;d0){var y=hn(f,-l);h=dn(y)}else h=f}else h=a;for(var p,g,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-r,2),p=1;pv&&(v=w)},get:function(b){return u[b]}},c=0;c0?M=I.edgesTo(A)[0]:M=A.edgesTo(I)[0];var L=n(M);A=A.id(),S[A]>S[k]+L&&(S[A]=S[k]+L,C.nodes.indexOf(A)<0?C.push(A):C.updateItem(A),x[A]=0,E[A]=[]),S[A]==S[k]+L&&(x[A]=x[A]+x[k],E[A].push(k))}else for(var O=0;O0;){for(var $=T.pop(),X=0;X0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},zf=function(e,r){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:qf,o=n,l,u,v=0;v=2?ra(e,r,a,0,us,$f):ra(e,r,a,0,os)},squaredEuclidean:function(e,r,a){return ra(e,r,a,0,us)},manhattan:function(e,r,a){return ra(e,r,a,0,os)},max:function(e,r,a){return ra(e,r,a,-1/0,Gf)}};qr["squared-euclidean"]=qr.squaredEuclidean;qr.squaredeuclidean=qr.squaredEuclidean;function Dn(t,e,r,a,n,i){var s;return $e(t)?s=t:s=qr[t]||qr.euclidean,e===0&&$e(t)?s(n,i):s(e,r,a,n,i)}var Kf=je({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Pi=function(e){return Kf(e)},gn=function(e,r,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](r)},u=a,v=r;return Dn(e,n.length,o,l,u,v)},Hn=function(e,r,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(r),l=null,u=0;ua)return!1}return!0},Uf=function(e,r,a){for(var n=0;no&&(o=r[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=r[s],y=r[n[s]],p;i.mode==="dendrogram"?p={left:d,right:y,key:d.key}:p={value:d.value.concat(y.value),key:d.key},e[d.index]=p,e.splice(y.index,1),r[d.key]=p;for(var g=0;ga[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},hs=function(e,r,a){for(var n=[],i=0;io&&(s=u,o=r[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=hs(e,r,a),n},gs=function(e){for(var r=this.cy(),a=this.nodes(),n=sc(e),i={},s=0;s=B?(k=B,B=A,R=I):A>k&&(k=A);for(var M=0;M0?1:0;x[C%n.minIterations*o+$]=X,V+=X}if(V>0&&(C>=n.minIterations-1||C==n.maxIterations-1)){for(var _=0,Q=0;Q1||E>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(S){S.isEdge()&&f[b].push(S.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(T){return f[b].push(T.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,T=[b],E,x,S;f[w].length;)E=f[w].shift(),x=c[E][0],S=c[E][1],w!=S?(f[S]=f[S].filter(function(C){return C!=E}),w=S):!i&&w!=x&&(f[x]=f[x].filter(function(C){return C!=E}),w=x),T.unshift(E),T.unshift(w);return T},y=[],p=[];for(p=d(v);p.length!=1;)f[p[0]].length==0?(y.unshift(s.getElementById(p.shift())),y.unshift(s.getElementById(p.shift()))):p=d(p.shift()).concat(p);y.unshift(s.getElementById(p.shift()));for(var g in f)if(f[g].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},Wa=function(){var e=this,r={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,y=[],p=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(g){var m=g.connectedNodes().intersection(e);p.merge(g),m.forEach(function(b){var w=b.id(),T=b.connectedEdges().intersection(e);p.merge(b),r[w].cutVertex?p.merge(T.filter(function(E){return E.isLoop()})):p.merge(T)})}),i.push(p)},u=function f(c,h,d){c===d&&(n+=1),r[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var p,g,m,b;y.forEach(function(w){p=w.source().id(),g=w.target().id(),m=p===h?g:p,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in r?r[h].low=Math.min(r[h].low,r[m].id):(f(c,m,h),r[h].low=Math.min(r[h].low,r[m].low),r[h].id<=r[m].low&&(r[h].cutVertex=!0,l(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in r||(n=0,u(c,c),r[c].cutVertex=n>1)}});var v=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},hc={hopcroftTarjanBiconnected:Wa,htbc:Wa,htb:Wa,hopcroftTarjanBiconnectedComponents:Wa},Ha=function(){var e=this,r={},a=0,n=[],i=[],s=e.spawn(e),o=function l(u){i.push(u),r[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var p=y.target().id();p!==u&&(p in r||l(p),r[p].explored||(r[u].low=Math.min(r[u].low,r[p].low)))}),r[u].index===r[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),r[c].low=r[u].index,r[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in r||o(u)}}),{cut:s,components:n}},gc={tarjanStronglyConnected:Ha,tsc:Ha,tscc:Ha,tarjanStronglyConnectedComponents:Ha},Ho={};[wa,Wv,Hv,Xv,_v,Qv,ef,Df,Or,Nr,ii,Vf,Jf,nc,fc,dc,hc,gc].forEach(function(t){de(Ho,t)});/*! -Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable -Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) -Licensed under The MIT License (http://opensource.org/licenses/MIT) -*/var Uo=0,Xo=1,Yo=2,Ut=function t(e){if(!(this instanceof t))return new t(e);this.id="Thenable/1.0.7",this.state=Uo,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Ut.prototype={fulfill:function(e){return ps(this,Xo,"fulfillValue",e)},reject:function(e){return ps(this,Yo,"rejectReason",e)},then:function(e,r){var a=this,n=new Ut;return a.onFulfilled.push(ms(e,n,"fulfill")),a.onRejected.push(ms(r,n,"reject")),_o(a),n.proxy}};var ps=function(e,r,a,n){return e.state===Uo&&(e.state=r,e[a]=n,_o(e)),e},_o=function(e){e.state===Xo?ys(e,"onFulfilled",e.fulfillValue):e.state===Yo&&ys(e,"onRejected",e.rejectReason)},ys=function(e,r,a){if(e[r].length!==0){var n=e[r];e[r]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}var Ed=xd;function Td(t,e){var r=this.__data__,a=Pn(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}var Cd=Td;function Ur(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1&&t%1==0&&t0&&this.spawn(n).updateStyle().emit("class"),r},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var r=this[0];return r!=null&&r._private.classes.has(e)},toggleClass:function(e,r){Ie(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=r===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,r){var a=this;if(r==null)r=250;else if(r===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},r),a}};rn.className=rn.classNames=rn.classes;var De={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:He,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};De.variable="(?:[\\w-.]|(?:\\\\"+De.metaChar+"))+";De.className="(?:[\\w-]|(?:\\\\"+De.metaChar+"))+";De.value=De.string+"|"+De.number;De.id=De.variable;(function(){var t,e,r;for(t=De.comparatorOp.split("|"),r=0;r=0)&&e!=="="&&(De.comparatorOp+="|\\!"+e)})();var Le=function(){return{checks:[]}},se={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},oi=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(t,e){return Vl(t.selector,e.selector)}),Dh=function(){for(var t={},e,r=0;r0&&v.edgeCount>0)return Ae("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Ae("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Ae("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Mh=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},r=function(v){return fe(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case se.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case se.DATA_COMPARE:{var y=v.field,p=v.operator;return"["+y+a(e(p))+r(h)+"]"}case se.DATA_BOOL:{var g=v.operator,m=v.field;return"["+e(g)+m+"]"}case se.DATA_EXIST:{var b=v.field;return"["+b+"]"}case se.META_COMPARE:{var w=v.operator,T=v.field;return"[["+T+a(e(w))+r(h)+"]]"}case se.STATE:return h;case se.ID:return"#"+h;case se.CLASS:return"."+h;case se.PARENT:case se.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case se.ANCESTOR:case se.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case se.COMPOUND_SPLIT:{var E=i(v.left,f),x=i(v.subject,f),S=i(v.right,f);return E+(E.length>0?" ":"")+x+S}case se.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),r){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return t}function nu(t,e,r){if(r.isParent())for(var a=r._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return Li(this,t,e,nu)};function iu(t,e,r){if(r.isChild()){var a=r._private.parent;e.has(a.id())||t.push(a)}}$r.forEachUp=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Li(this,t,e,iu)};function qh(t,e,r){iu(t,e,r),nu(t,e,r)}$r.forEachUpAndDown=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Li(this,t,e,qh)};$r.ancestors=$r.parents;var Ca,su;Ca=su={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Be.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Be.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Ca.attr=Ca.data;Ca.removeAttr=Ca.removeData;var $h=su,An={};function Xn(t){return function(e){var r=this;if(e===void 0&&(e=!0),r.length!==0)if(r.isNode()&&!r.removed()){for(var a=0,n=r[0],i=n._private.edges,s=0;se}),minIndegree:Dr("indegree",function(t,e){return te}),minOutdegree:Dr("outdegree",function(t,e){return te})});de(An,{totalDegree:function(e){for(var r=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};r!==void 0?u.position(e,r+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,p=y&&y.length>0,g=p;p&&(y=y[0]);var m=g?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};At.modelPosition=At.point=At.position;At.modelPositions=At.points=At.positions;At.renderedPoint=At.renderedPosition;At.relativePoint=At.relativePosition;var Gh=ou,zr,lr;zr=lr={};lr.renderedBoundingBox=function(t){var e=this.boundingBox(t),r=this.cy(),a=r.zoom(),n=r.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};lr.dirtyCompoundBoundsCache=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var a=r._private;a.compoundBoundsClean=!1,a.bbCache=null,t||r.emitAndNotify("bounds")}}),this)};lr.updateCompoundBounds=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!t&&e.batching())return this;function r(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(C,P,B){var k=0,R=0,A=P+B;return C>0&&A>0&&(k=P/A*C,R=B/A*C),{biasDiff:k,biasComplementDiff:R}}function d(C,P,B,k){if(B.units==="%")switch(k){case"width":return C>0?B.pfValue*C:0;case"height":return P>0?B.pfValue*P:0;case"average":return C>0&&P>0?B.pfValue*(C+P)/2:0;case"min":return C>0&&P>0?C>P?B.pfValue*P:B.pfValue*C:0;case"max":return C>0&&P>0?C>P?B.pfValue*C:B.pfValue*P:0;default:return 0}else return B.units==="px"?B.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var p=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(p=p*100/v.width.val);var g=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(g=g*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,p),w=b.biasDiff,T=b.biasComplementDiff,E=h(v.height.val-f.h,g,m),x=E.biasDiff,S=E.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+T)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+S)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},dr=function(e,r){return r==null?e:Pt(e,r.x1,r.y1,r.x2,r.y2)},aa=function(e,r,a){return Bt(e,r,a)},Ua=function(e,r,a){if(!r.cy().headless()){var n=r._private,i=n.rstyle,s=i.arrowWidth/2,o=r.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,en(f,1),Pt(e,f.x1,f.y1,f.x2,f.y2)}}},Yn=function(e,r,a){if(!r.cy().headless()){var n;a?n=a+"-":n="";var i=r._private,s=i.rstyle,o=r.pstyle(n+"label").strValue;if(o){var l=r.pstyle("text-halign"),u=r.pstyle("text-valign"),v=aa(s,"labelWidth",a),f=aa(s,"labelHeight",a),c=aa(s,"labelX",a),h=aa(s,"labelY",a),d=r.pstyle(n+"text-margin-x").pfValue,y=r.pstyle(n+"text-margin-y").pfValue,p=r.isEdge(),g=r.pstyle(n+"text-rotation"),m=r.pstyle("text-outline-width").pfValue,b=r.pstyle("text-border-width").pfValue,w=b/2,T=r.pstyle("text-background-padding").pfValue,E=2,x=f,S=v,C=S/2,P=x/2,B,k,R,A;if(p)B=c-C,k=c+C,R=h-P,A=h+P;else{switch(l.value){case"left":B=c-S,k=c;break;case"center":B=c-C,k=c+C;break;case"right":B=c,k=c+S;break}switch(u.value){case"top":R=h-x,A=h;break;case"center":R=h-P,A=h+P;break;case"bottom":R=h,A=h+x;break}}var I=d-Math.max(m,w)-T-E,M=d+Math.max(m,w)+T+E,L=y-Math.max(m,w)-T-E,O=y+Math.max(m,w)+T+E;B+=I,k+=M,R+=L,A+=O;var q=a||"main",W=i.labelBounds,V=W[q]=W[q]||{};V.x1=B,V.y1=R,V.x2=k,V.y2=A,V.w=k-B,V.h=A-R,V.leftPad=I,V.rightPad=M,V.topPad=L,V.botPad=O;var $=p&&g.strValue==="autorotate",X=g.pfValue!=null&&g.pfValue!==0;if($||X){var _=$?aa(i.rstyle,"labelAngle",a):g.pfValue,Q=Math.cos(_),Z=Math.sin(_),j=(B+k)/2,te=(R+A)/2;if(!p){switch(l.value){case"left":j=k;break;case"right":j=B;break}switch(u.value){case"top":te=A;break;case"bottom":te=R;break}}var K=function(Me,le){return Me=Me-j,le=le-te,{x:Me*Q-le*Z+j,y:Me*Z+le*Q+te}},N=K(B,R),H=K(B,A),ee=K(k,R),ie=K(k,A);B=Math.min(N.x,H.x,ee.x,ie.x),k=Math.max(N.x,H.x,ee.x,ie.x),R=Math.min(N.y,H.y,ee.y,ie.y),A=Math.max(N.y,H.y,ee.y,ie.y)}var ue=q+"Rot",Ce=W[ue]=W[ue]||{};Ce.x1=B,Ce.y1=R,Ce.x2=k,Ce.y2=A,Ce.w=k-B,Ce.h=A-R,Pt(e,B,R,k,A),Pt(i.labelBounds.all,B,R,k,A)}return e}},Kh=function(e,r){if(!r.cy().headless()){var a=r.pstyle("outline-opacity").value,n=r.pstyle("outline-width").value;if(a>0&&n>0){var i=r.pstyle("outline-offset").value,s=r.pstyle("shape").value,o=n+i,l=(e.w+o*2)/e.w,u=(e.h+o*2)/e.h,v=0,f=0;["diamond","pentagon","round-triangle"].includes(s)?(l=(e.w+o*2.4)/e.w,f=-o/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?l=(e.w+o*2.4)/e.w:s==="star"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.6)/e.h,f=-o/3.8):s==="triangle"?(l=(e.w+o*2.8)/e.w,u=(e.h+o*2.4)/e.h,f=-o/1.4):s==="vee"&&(l=(e.w+o*4.4)/e.w,u=(e.h+o*3.8)/e.h,f=-o*.5);var c=e.h*u-e.h,h=e.w*l-e.w;if(tn(e,[Math.ceil(c/2),Math.ceil(h/2)]),v!=0||f!==0){var d=cf(e,v,f);No(e,d)}}}},Wh=function(e,r){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=pt(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,y,p=o.rstyle,g=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(Re){return Re.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,T=0;n&&r.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(T=e.pstyle("overlay-padding").value));var E=0,x=0;n&&r.includeUnderlays&&(E=e.pstyle("underlay-opacity").value,E!==0&&(x=e.pstyle("underlay-padding").value));var S=Math.max(T,x),C=0,P=0;if(n&&(C=e.pstyle("width").pfValue,P=C/2),l&&r.includeNodes){var B=e.position();d=B.x,y=B.y;var k=e.outerWidth(),R=k/2,A=e.outerHeight(),I=A/2;v=d-R,f=d+R,c=y-I,h=y+I,Pt(s,v,c,f,h),n&&r.includeOutlines&&Kh(s,e)}else if(u&&r.includeEdges)if(n&&!i){var M=e.pstyle("curve-style").strValue;if(v=Math.min(p.srcX,p.midX,p.tgtX),f=Math.max(p.srcX,p.midX,p.tgtX),c=Math.min(p.srcY,p.midY,p.tgtY),h=Math.max(p.srcY,p.midY,p.tgtY),v-=P,f+=P,c-=P,h+=P,Pt(s,v,c,f,h),M==="haystack"){var L=p.haystackPts;if(L&&L.length===2){if(v=L[0].x,c=L[0].y,f=L[1].x,h=L[1].y,v>f){var O=v;v=f,f=O}if(c>h){var q=c;c=h,h=q}Pt(s,v-P,c-P,f+P,h+P)}}else if(M==="bezier"||M==="unbundled-bezier"||M.endsWith("segments")||M.endsWith("taxi")){var W;switch(M){case"bezier":case"unbundled-bezier":W=p.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":W=p.linePts;break}if(W!=null)for(var V=0;Vf){var j=v;v=f,f=j}if(c>h){var te=c;c=h,h=te}v-=P,f+=P,c-=P,h+=P,Pt(s,v,c,f,h)}if(n&&r.includeEdges&&u&&(Ua(s,e,"mid-source"),Ua(s,e,"mid-target"),Ua(s,e,"source"),Ua(s,e,"target")),n){var K=e.pstyle("ghost").value==="yes";if(K){var N=e.pstyle("ghost-offset-x").pfValue,H=e.pstyle("ghost-offset-y").pfValue;Pt(s,s.x1+N,s.y1+H,s.x2+N,s.y2+H)}}var ee=o.bodyBounds=o.bodyBounds||{};as(ee,s),tn(ee,g),en(ee,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,Pt(s,v-S,c-S,f+S,h+S));var ie=o.overlayBounds=o.overlayBounds||{};as(ie,s),tn(ie,g),en(ie,1);var ue=o.labelBounds=o.labelBounds||{};ue.all!=null?ff(ue.all):ue.all=pt(),n&&r.includeLabels&&(r.includeMainLabels&&Yn(s,e,null),u&&(r.includeSourceLabels&&Yn(s,e,"source"),r.includeTargetLabels&&Yn(s,e,"target")))}return s.x1=Ct(s.x1),s.y1=Ct(s.y1),s.x2=Ct(s.x2),s.y2=Ct(s.y2),s.w=Ct(s.x2-s.x1),s.h=Ct(s.y2-s.y1),s.w>0&&s.h>0&&b&&(tn(s,g),en(s,1)),s},lu=function(e){var r=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:ig,e=arguments.length>1?arguments[1]:void 0,r=0;r=0;o--)s(o);return this};sr.removeAllListeners=function(){return this.removeListener("*")};sr.emit=sr.trigger=function(t,e,r){var a=this.listeners,n=a.length;return this.emitting++,Ie(e)||(e=[e]),sg(this,function(i,s){r!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],n=a.length);for(var o=function(v){var f=a[v];if(f.type===s.type&&(!f.namespace||f.namespace===s.namespace||f.namespace===ng)&&i.eventMatches(i.context,f,s)){var c=[s];e!=null&&Fv(c,e),i.beforeEmit(i.context,f,s),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(y){return y!==f}));var h=i.callbackContext(i.context,f,s),d=f.callback.apply(h,c);i.afterEmit(i.context,f,s),d===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var r=this._private,a=e._private.data.id,n=r.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var r=this._private.cy;if(!e)return this;if(e&&fe(e)){var a=e;e=r.mutableElements().filter(a)}for(var n=0;n=0;r--){var a=this[r];e(a)&&this.unmergeAt(r)}return this},map:function(e,r){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,r){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":Ue(Symbol))!=e&&Ue(Symbol.iterator)!=e;r&&(pn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return ho({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(r?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var r=this[0];if(r.cy().styleEnabled()&&r){var a=r.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(e).units},renderedStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=this[0];if(a)return r.style().getRenderedStyle(a,e)},style:function(e,r){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(ke(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(fe(e))if(r===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,r,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var r=this.cy();if(!r.styleEnabled())return this;var a=!1,n=r.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(t)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});st.neighbourhood=st.neighborhood;st.closedNeighbourhood=st.closedNeighborhood;st.openNeighbourhood=st.openNeighborhood;de(st,{source:St(function(e){var r=this[0],a;return r&&(a=r._private.source||r.cy().collection()),a&&e?a.filter(e):a},"source"),target:St(function(e){var r=this[0],a;return r&&(a=r._private.target||r.cy().collection()),a&&e?a.filter(e):a},"target"),sources:Os({attr:"source"}),targets:Os({attr:"target"})});function Os(t){return function(r){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});st.componentsOf=st.components;var rt=function(e,r){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){qe("A collection must have a reference to the core");return}var i=new zt,s=!1;if(!r)r=[];else if(r.length>0&&ke(r[0])&&!Ba(r[0])){s=!0;for(var o=[],l=new Kr,u=0,v=r.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=r.cy(),n=a._private,i=[],s=[],o,l=0,u=r.length;l0){for(var q=o.length===r.length?r:new rt(a,o),W=0;W0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,a=[],n={},i=r._private.cy;function s(A){for(var I=A._private.edges,M=0;M0&&(t?B.emitAndNotify("remove"):e&&B.emit("remove"));for(var k=0;k0?k=A:B=A;while(Math.abs(R)>s&&++I=i?m(P,I):M===0?I:w(P,B,B+u)}var E=!1;function x(){E=!0,(t!==e||r!==a)&&b()}var S=function(B){return E||x(),t===e&&r===a?B:B===0?0:B===1?1:p(T(B),e,a)};S.getControlPoints=function(){return[{x:t,y:e},{x:r,y:a}]};var C="generateBezier("+[t,e,r,a]+")";return S.toString=function(){return C},S}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var yg=function(){function t(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:t(s)}}function r(a,n){var i={dx:a.v,dv:t(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=r(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}}(),Ne=function(e,r,a,n){var i=pg(e,r,a,n);return function(s,o,l){return s+(o-s)*i(l)}},nn={linear:function(e,r,a){return e+(r-e)*a},ease:Ne(.25,.1,.25,1),"ease-in":Ne(.42,0,1,1),"ease-out":Ne(0,0,.58,1),"ease-in-out":Ne(.42,0,.58,1),"ease-in-sine":Ne(.47,0,.745,.715),"ease-out-sine":Ne(.39,.575,.565,1),"ease-in-out-sine":Ne(.445,.05,.55,.95),"ease-in-quad":Ne(.55,.085,.68,.53),"ease-out-quad":Ne(.25,.46,.45,.94),"ease-in-out-quad":Ne(.455,.03,.515,.955),"ease-in-cubic":Ne(.55,.055,.675,.19),"ease-out-cubic":Ne(.215,.61,.355,1),"ease-in-out-cubic":Ne(.645,.045,.355,1),"ease-in-quart":Ne(.895,.03,.685,.22),"ease-out-quart":Ne(.165,.84,.44,1),"ease-in-out-quart":Ne(.77,0,.175,1),"ease-in-quint":Ne(.755,.05,.855,.06),"ease-out-quint":Ne(.23,1,.32,1),"ease-in-out-quint":Ne(.86,0,.07,1),"ease-in-expo":Ne(.95,.05,.795,.035),"ease-out-expo":Ne(.19,1,.22,1),"ease-in-out-expo":Ne(1,0,0,1),"ease-in-circ":Ne(.6,.04,.98,.335),"ease-out-circ":Ne(.075,.82,.165,1),"ease-in-out-circ":Ne(.785,.135,.15,.86),spring:function(e,r,a){if(a===0)return nn.linear;var n=yg(e,r,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":Ne};function Fs(t,e,r,a,n){if(a===1||e===r)return r;var i=n(e,r,a);return t==null||((t.roundValue||t.color)&&(i=Math.round(i)),t.min!==void 0&&(i=Math.max(i,t.min)),t.max!==void 0&&(i=Math.min(i,t.max))),i}function Vs(t,e){return t.pfValue!=null||t.value!=null?t.pfValue!=null&&(e==null||e.type.units!=="%")?t.pfValue:t.value:t}function kr(t,e,r,a,n){var i=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var s=Vs(t,n),o=Vs(e,n);if(re(s)&&re(o))return Fs(i,s,o,r,a);if(Ie(s)&&Ie(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=nn[h].apply(null,d)):s.easingImpl=nn[h]}var y=s.easingImpl,p;if(s.duration===0?p=1:p=(r-l)/s.duration,s.applying&&(p=s.progress),p<0?p=0:p>1&&(p=1),s.delay==null){var g=s.startPosition,m=s.position;if(m&&n&&!t.locked()){var b={};ia(g.x,m.x)&&(b.x=kr(g.x,m.x,p,y)),ia(g.y,m.y)&&(b.y=kr(g.y,m.y,p,y)),t.position(b)}var w=s.startPan,T=s.pan,E=i.pan,x=T!=null&&a;x&&(ia(w.x,T.x)&&(E.x=kr(w.x,T.x,p,y)),ia(w.y,T.y)&&(E.y=kr(w.y,T.y,p,y)),t.emit("pan"));var S=s.startZoom,C=s.zoom,P=C!=null&&a;P&&(ia(S,C)&&(i.zoom=xa(i.minZoom,kr(S,C,p,y),i.maxZoom)),t.emit("zoom")),(x||P)&&t.emit("viewport");var B=s.style;if(B&&B.length>0&&n){for(var k=0;k=0;x--){var S=E[x];S()}E.splice(0,E.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,g(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||bg(v,b,t),mg(v,b,t,f),w.applying&&(w.applying=!1),g(w.frames),w.step!=null&&w.step(t),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,g(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",r):e.notify("draw")),r.unmerge(a),e.emit("step")}var wg={animate:Be.animate(),animation:Be.animation(),animated:Be.animated(),clearQueue:Be.clearQueue(),delay:Be.delay(),delayAnimation:Be.delayAnimation(),stop:Be.stop(),addToAnimationPool:function(e){var r=this;r.styleEnabled()&&r._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function r(){e._private.animationsRunning&&fn(function(i){qs(i,e),r()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){qs(s,e)},a.beforeRenderPriorities.animations):r()}},xg={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&Ba(a.target)&&n.matches(a.target):!0},addEventFields:function(e,r){r.cy=e,r.target=e},callbackContext:function(e,r,a){return r.qualifier!=null?a.target:e}},_a=function(e){return fe(e)?new nr(e):e},wu={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Rn(xg,this)),this},emitter:function(){return this._private.emitter},on:function(e,r,a){return this.emitter().on(e,_a(r),a),this},removeListener:function(e,r,a){return this.emitter().removeListener(e,_a(r),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,r,a){return this.emitter().one(e,_a(r),a),this},once:function(e,r,a){return this.emitter().one(e,_a(r),a),this},emit:function(e,r){return this.emitter().emit(e,r),this},emitAndNotify:function(e,r){return this.emit(e),this.notify(e,r),this}};Be.eventAliasesOn(wu);var li={png:function(e){var r=this._private.renderer;return e=e||{},r.png(e)},jpg:function(e){var r=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",r.jpg(e)}};li.jpeg=li.jpg;var sn={layout:function(e){var r=this;if(e==null){qe("Layout options must be specified to make a layout");return}if(e.name==null){qe("A `name` must be specified to make a layout");return}var a=e.name,n=r.extension("layout",a);if(n==null){qe("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;fe(e.eles)?i=r.$(e.eles):i=e.eles!=null?e.eles:r.$();var s=new n(de({},e,{cy:r,eles:i}));return s}};sn.createLayout=sn.makeLayout=sn.layout;var Eg={notify:function(e,r){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();r!=null&&n.merge(r);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,r)}},notifications:function(e){var r=this._private;return e===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?r.notify(a):r.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var r=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)r.removeChild(r.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};vi.invalidateDimensions=vi.resize;var on={collection:function(e,r){return fe(e)?this.$(e):xt(e)?e.collection():Ie(e)?(r||(r={}),new rt(this,e,r.unique,r.removed)):new rt(this)},nodes:function(e){var r=this.$(function(a){return a.isNode()});return e?r.filter(e):r},edges:function(e){var r=this.$(function(a){return a.isEdge()});return e?r.filter(e):r},$:function(e){var r=this._private.elements;return e?r.filter(e):r.spawnSelf()},mutableElements:function(){return this._private.elements}};on.elements=on.filter=on.$;var ut={},da="t",Cg="f";ut.apply=function(t){for(var e=this,r=e._private,a=r.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var y=0;y1&&(w=1),o.color){var E=a.valueMin[0],x=a.valueMax[0],S=a.valueMin[1],C=a.valueMax[1],P=a.valueMin[2],B=a.valueMax[2],k=a.valueMin[3]==null?1:a.valueMin[3],R=a.valueMax[3]==null?1:a.valueMax[3],A=[Math.round(E+(x-E)*w),Math.round(S+(C-S)*w),Math.round(P+(B-P)*w),Math.round(k+(R-k)*w)];i={bypass:a.bypass,name:a.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else if(o.number){var I=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,I,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var M=a.field.split("."),L=f.data,O=0;O0&&i>0){for(var o={},l=!1,u=0;u0?t.delayAnimation(s).play().promise().then(b):b()}).then(function(){return t.animation({style:o,duration:i,easing:t.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(t,n),t.emitAndNotify("style"),a.transitioning=!1)};ut.checkTrigger=function(t,e,r,a,n,i){var s=this.properties[e],o=n(s);o!=null&&o(r,a)&&i(s)};ut.checkZOrderTrigger=function(t,e,r,a){var n=this;this.checkTrigger(t,e,r,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",t)})};ut.checkBoundsTrigger=function(t,e,r,a){this.checkTrigger(t,e,r,a,function(n){return n.triggersBounds},function(n){t.dirtyCompoundBoundsCache(),t.dirtyBoundingBoxCache(),n.triggersBoundsOfParallelBeziers&&e==="curve-style"&&(r==="bezier"||a==="bezier")&&t.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()}),n.triggersBoundsOfConnectedEdges&&e==="display"&&(r==="none"||a==="none")&&t.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};ut.checkTriggers=function(t,e,r,a){t.dirtyStyleCache(),this.checkZOrderTrigger(t,e,r,a),this.checkBoundsTrigger(t,e,r,a)};var Ia={};Ia.applyBypass=function(t,e,r,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(r!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Ae("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new nr(f);if(c.invalid){Ae("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var p=i.match(/^\s*$/);if(p)break;var g=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!g){Ae("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=g[0];var m=g[1],b=g[2],w=e.properties[m];if(!w){Ae("Skipping property: Invalid property name in: "+s),l();continue}var T=r.parse(m,b);if(!T){Ae("Skipping property: Invalid property definition in: "+s),l();continue}y.push({name:m,val:b}),l()}if(d){o();break}r.selector(f);for(var E=0;E=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(r)return!1;var c=o.data;return{name:t,value:v,strValue:""+e,mapped:c,field:v[1],bypass:r}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(r||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(t,f[4]);if(!d||d.mapped)return!1;var y=this.parse(t,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return Ae("`"+t+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+t+": "+d.strValue+"`"),this.parse(t,d.strValue);if(u.color){var p=d.value,g=y.value,m=p[0]===g[0]&&p[1]===g[1]&&p[2]===g[2]&&(p[3]===g[3]||(p[3]==null||p[3]===1)&&(g[3]==null||g[3]===1));if(m)return!1}return{name:t,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:r}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):Ie(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],T=[],E=[],x="",S=!1,C=0;C0?" ":"")+P.strValue}return u.validate&&!u.validate(w,T)?null:u.singleEnum&&S?w.length===1&&fe(w[0])?{name:t,value:w[0],strValue:w[0],bypass:r}:null:{name:t,value:w,pfValue:E,strValue:x,bypass:r,units:T}}var B=function(){for(var K=0;Ku.max||u.strictMax&&e===u.max))return null;var M={name:t,value:e,strValue:""+e+(k||""),units:k,bypass:r};return u.unitless||k!=="px"&&k!=="em"?M.pfValue=e:M.pfValue=k==="px"||!k?e:this.getEmSizeInPixels()*e,(k==="ms"||k==="s")&&(M.pfValue=k==="ms"?e:1e3*e),(k==="deg"||k==="rad")&&(M.pfValue=k==="rad"?e:of(e)),k==="%"&&(M.pfValue=e/100),M}else if(u.propList){var L=[],O=""+e;if(O!=="none"){for(var q=O.split(/\s*,\s*|\s+/),W=0;W0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*r)/a.w,(o-2*r)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=r),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var r=this._private,a=r.pan,n=r.zoom,i,s,o=!1;if(r.zoomingEnabled||(o=!0),re(e)?s=e:ke(e)&&(s=e.level,e.position!=null?i=Sn(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!r.panningEnabled&&(o=!0)),s=s>r.maxZoom?r.maxZoom:s,s=sr.maxZoom||!r.zoomingEnabled?s=!0:(r.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&r.panningEnabled){var u=e.pan;re(u.x)&&(r.pan.x=u.x,o=!1),re(u.y)&&(r.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var r=this.getCenterPan(e);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,r){if(this._private.panningEnabled){if(fe(e)){var a=e;e=this.mutableElements().filter(a)}else xt(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();r=r===void 0?this._private.zoom:r;var o={x:(i-r*(n.x1+n.x2))/2,y:(s-r*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,r=e.container,a=this;return e.sizeCache=e.sizeCache||(r?function(){var n=a.window().getComputedStyle(r),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:r.clientWidth-i("padding-left")-i("padding-right"),height:r.clientHeight-i("padding-top")-i("padding-bottom")}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,r=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/r,x2:(a.x2-e.x)/r,y1:(a.y1-e.y)/r,y2:(a.y2-e.y)/r};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),r=this.height();return{x1:0,y1:0,x2:e,y2:r,w:e,h:r}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};xr.centre=xr.center;xr.autolockNodes=xr.autolock;xr.autoungrabifyNodes=xr.autoungrabify;var Da={data:Be.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Be.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Be.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Be.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Da.attr=Da.data;Da.removeAttr=Da.removeData;var ka=function(e){var r=this;e=de({},e);var a=e.container;a&&!vn(a)&&vn(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=r;var s=We!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=de({name:s?"grid":"null"},o.layout),o.renderer=de({name:s?"canvas":"null"},o.renderer);var l=function(d,y,p){return y!==void 0?y:p!==void 0?p:d},u=this._private={container:a,ready:!1,options:o,elements:new rt(this),listeners:[],aniEles:new rt(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:re(o.zoom)?o.zoom:1,pan:{x:ke(o.pan)&&re(o.pan.x)?o.pan.x:0,y:ke(o.pan)&&re(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var p=d.some(Rl);if(p)return Wr.all(d).then(y);y(d)};u.styleEnabled&&r.setStyle([]);var f=de({},o,o.renderer);r.initRenderer(f);var c=function(d,y,p){r.notifications(!1);var g=r.mutableElements();g.length>0&&g.remove(),d!=null&&(ke(d)||Ie(d))&&r.add(d),r.one("layoutready",function(b){r.notifications(!0),r.emit(b),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",p),r.emit("done")});var m=de({},r._private.options.layout);m.eles=r.elements(),r.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];u.styleEnabled&&r.style().append(d),c(y,function(){r.startAnimationLoop(),u.ready=!0,$e(o.ready)&&r.on("ready",o.ready);for(var p=0;p0,o=!!t.boundingBox,l=e.extent(),u=pt(o?t.boundingBox:{x1:l.x1,y1:l.y1,w:l.w,h:l.h}),v;if(xt(t.roots))v=t.roots;else if(Ie(t.roots)){for(var f=[],c=0;c0;){var I=A(),M=P(I,k);if(M)I.outgoers().filter(function(le){return le.isNode()&&r.has(le)}).forEach(R);else if(M===null){Ae("Detected double maximal shift for node `"+I.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var L=0;if(t.avoidOverlap)for(var O=0;O0&&m[0].length<=3?me/2:0),Se=2*Math.PI/m[ye].length*he;return ye===0&&m[0].length===1&&(Ee=1),{x:ie.x+Ee*Math.cos(Se),y:ie.y+Ee*Math.sin(Se)}}else{var J=m[ye].length,D=Math.max(J===1?0:o?(u.w-t.padding*2-ue.w)/((t.grid?Re:J)-1):(u.w-t.padding*2-ue.w)/((t.grid?Re:J)+1),L),z={x:ie.x+(he+1-(J+1)/2)*D,y:ie.y+(ye+1-(Z+1)/2)*Ce};return z}};return r.nodes().layoutPositions(this,t,Me),this};var Bg={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Eu(t){this.options=de({},Bg,t)}Eu.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var g=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(g*g+m*m));v=Math.max(b,v)}var w=function(E,x){var S=e.startAngle+x*u*(n?1:-1),C=v*Math.cos(S),P=v*Math.sin(S),B={x:o.x+C,y:o.y+P};return B};return a.nodes().layoutPositions(this,e,w),this};var Ag={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Tu(t){this.options=de({},Ag,t)}Tu.prototype.run=function(){for(var t=this.options,e=t,r=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=t.cy,n=e.eles,i=n.nodes().not(":parent"),s=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var T=Math.abs(m[0].value-w.value);T>=p&&(m=[],g.push(m))}m.push(w)}var E=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=g.length>0&&g[0].length>1,S=Math.min(s.w,s.h)/2-E,C=S/(g.length+x?1:0);E=Math.min(E,C)}for(var P=0,B=0;B1&&e.avoidOverlap){var I=Math.cos(A)-Math.cos(0),M=Math.sin(A)-Math.sin(0),L=Math.sqrt(E*E/(I*I+M*M));P=Math.max(L,P)}k.r=P,P+=E}if(e.equidistant){for(var O=0,q=0,W=0;W=t.numIter||(Fg(a,t),a.temperature=a.temperature*t.coolingFactor,a.temperature=t.animationThreshold&&i(),fn(f)}};v()}else{for(;u;)u=s(l),l++;Ks(a,t),o()}return this};Nn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Nn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Mg=function(e,r,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=pt(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(S);for(var v=0;vn.count?0:n.graph},Ig=function t(e,r,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var y=mn(e,o,l),p=mn(r,-1*o,-1*l),g=p.x-y.x,m=p.y-y.y,b=g*g+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+r.nodeRepulsion)/b,h=f*g/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),r.isLocked||(r.offsetX+=h,r.offsetY+=d)}},$g=function(e,r,a,n){if(a>0)var i=e.maxX-r.minX;else var i=r.maxX-e.minX;if(n>0)var s=e.maxY-r.minY;else var s=r.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},mn=function(e,r,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/r,u=s/o,v={};return r===0&&0a?(v.x=n,v.y=i+s/2,v):0r&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/r,v):0=u)?(v.x=n+s*r/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*r/2/a,v.y=i-s/2),v)},Gg=function(e,r){for(var a=0;aa){var p=r.gravity*h/y,g=r.gravity*d/y;c.offsetX+=p,c.offsetY+=g}}}}},Wg=function(e,r){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*r/n};else var i={x:e,y:r};return i},Xg=function t(e,r){var a=e.parentId;if(a!=null){var n=r.layoutNodes[r.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopg&&(d+=p+r.componentSpacing,h=0,y=0,p=0)}}},Yg={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,r){return!0},ready:void 0,stop:void 0,transform:function(e,r){return r}};function Su(t){this.options=de({},Yg,t)}Su.prototype.run=function(){var t=this.options,e=t,r=t.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=pt(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(X){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(_){if(_==null)return Math.min(l,u);var Q=Math.min(l,u);Q==l?l=_:u=_},f=function(_){if(_==null)return Math.max(l,u);var Q=Math.max(l,u);Q==l?l=_:u=_},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;u*l=s?f(g+1):v(p+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(I=0,A++)},L={},O=0;O(I=wf(t,e,M[L],M[L+1],M[L+2],M[L+3])))return p(x,I),!0}else if(C.edgeType==="bezier"||C.edgeType==="multibezier"||C.edgeType==="self"||C.edgeType==="compound"){for(var M=C.allpts,L=0;L+5(I=bf(t,e,M[L],M[L+1],M[L+2],M[L+3],M[L+4],M[L+5])))return p(x,I),!0}for(var O=O||S.source,q=q||S.target,W=n.getArrowWidth(P,B),V=[{name:"source",x:C.arrowStartX,y:C.arrowStartY,angle:C.srcArrowAngle},{name:"target",x:C.arrowEndX,y:C.arrowEndY,angle:C.tgtArrowAngle},{name:"mid-source",x:C.midX,y:C.midY,angle:C.midsrcArrowAngle},{name:"mid-target",x:C.midX,y:C.midY,angle:C.midtgtArrowAngle}],L=0;L0&&(g(O),g(q))}function b(x,S,C){return Bt(x,S,C)}function w(x,S){var C=x._private,P=c,B;S?B=S+"-":B="",x.boundingBox();var k=C.labelBounds[S||"main"],R=x.pstyle(B+"label").value,A=x.pstyle("text-events").strValue==="yes";if(!(!A||!R)){var I=b(C.rscratch,"labelX",S),M=b(C.rscratch,"labelY",S),L=b(C.rscratch,"labelAngle",S),O=x.pstyle(B+"text-margin-x").pfValue,q=x.pstyle(B+"text-margin-y").pfValue,W=k.x1-P-O,V=k.x2+P-O,$=k.y1-P-q,X=k.y2+P-q;if(L){var _=Math.cos(L),Q=Math.sin(L),Z=function(ie,ue){return ie=ie-I,ue=ue-M,{x:ie*_-ue*Q+I,y:ie*Q+ue*_+M}},j=Z(W,$),te=Z(W,X),K=Z(V,$),N=Z(V,X),H=[j.x+O,j.y+q,K.x+O,K.y+q,N.x+O,N.y+q,te.x+O,te.y+q];if(gt(t,e,H))return p(x),!0}else if(Vr(k,t,e))return p(x),!0}}for(var T=s.length-1;T>=0;T--){var E=s[T];E.isNode()?g(E)||w(E):m(E)||w(E)||w(E,"source")||w(E,"target")}return o};Tr.getAllInBox=function(t,e,r,a){var n=this.getCachedZSortedEles().interactive,i=[],s=Math.min(t,r),o=Math.max(t,r),l=Math.min(e,a),u=Math.max(e,a);t=s,r=o,e=l,a=u;for(var v=pt({x1:t,y1:e,x2:r,y2:a}),f=0;f0?-(Math.PI-e.ang):Math.PI+e.ang},ep=function(e,r,a,n,i){if(e!==Ys?_s(r,e,Ot):jg(Tt,Ot),_s(r,a,Tt),Us=Ot.nx*Tt.ny-Ot.ny*Tt.nx,Xs=Ot.nx*Tt.nx-Ot.ny*-Tt.ny,Kt=Math.asin(Math.max(-1,Math.min(1,Us))),Math.abs(Kt)<1e-6){fi=r.x,ci=r.y,hr=Br=0;return}gr=1,un=!1,Xs<0?Kt<0?Kt=Math.PI+Kt:(Kt=Math.PI-Kt,gr=-1,un=!0):Kt>0&&(gr=-1,un=!0),r.radius!==void 0?Br=r.radius:Br=n,fr=Kt/2,Za=Math.min(Ot.len/2,Tt.len/2),i?(It=Math.abs(Math.cos(fr)*Br/Math.sin(fr)),It>Za?(It=Za,hr=Math.abs(It*Math.sin(fr)/Math.cos(fr))):hr=Br):(It=Math.min(Za,Br),hr=Math.abs(It*Math.sin(fr)/Math.cos(fr))),di=r.x+Tt.nx*It,hi=r.y+Tt.ny*It,fi=di-Tt.ny*hr*gr,ci=hi+Tt.nx*hr*gr,Bu=r.x+Ot.nx*It,Au=r.y+Ot.ny*It,Ys=r};function Ru(t,e){e.radius===0?t.lineTo(e.cx,e.cy):t.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function Vi(t,e,r,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(ep(t,e,r,a,n),{cx:fi,cy:ci,radius:hr,startX:Bu,startY:Au,stopX:di,stopY:hi,startAngle:Ot.ang+Math.PI/2*gr,endAngle:Tt.ang-Math.PI/2*gr,counterClockwise:un})}var lt={};lt.findMidptPtsEtc=function(t,e){var r=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=t.pstyle("source-endpoint"),o=t.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(T,E,x,S){var C=S-E,P=x-T,B=Math.sqrt(P*P+C*C);return{x:-C/B,y:P/B}},v=t.pstyle("edge-distances").value;switch(v){case"node-position":i=r;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(t.source()[0],s),c=Je(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(t.target()[0],o),p=Je(y,2),g=p[0],m=p[1],b={x1:h,y1:d,x2:g,y2:m};n=u(h,d,g,m),i=b}else Ae("Edge ".concat(t.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};lt.findHaystackPoints=function(t){for(var e=0;e0?Math.max(Y-ne,0):Math.min(Y+ne,0)},R=k(P,S),A=k(B,C),I=!1;m===u?g=Math.abs(R)>Math.abs(A)?n:a:m===l||m===o?(g=a,I=!0):(m===i||m===s)&&(g=n,I=!0);var M=g===a,L=M?A:R,O=M?B:P,q=Oo(O),W=!1;!(I&&(w||E))&&(m===o&&O<0||m===l&&O>0||m===i&&O>0||m===s&&O<0)&&(q*=-1,L=q*Math.abs(L),W=!0);var V;if(w){var $=T<0?1+T:T;V=$*L}else{var X=T<0?L:0;V=X+T*q}var _=function(Y){return Math.abs(Y)=Math.abs(L)},Q=_(V),Z=_(Math.abs(L)-Math.abs(V)),j=Q||Z;if(j&&!W)if(M){var te=Math.abs(O)<=c/2,K=Math.abs(P)<=h/2;if(te){var N=(v.x1+v.x2)/2,H=v.y1,ee=v.y2;r.segpts=[N,H,N,ee]}else if(K){var ie=(v.y1+v.y2)/2,ue=v.x1,Ce=v.x2;r.segpts=[ue,ie,Ce,ie]}else r.segpts=[v.x1,v.y2]}else{var Re=Math.abs(O)<=f/2,Me=Math.abs(B)<=d/2;if(Re){var le=(v.y1+v.y2)/2,oe=v.x1,pe=v.x2;r.segpts=[oe,le,pe,le]}else if(Me){var ye=(v.x1+v.x2)/2,he=v.y1,me=v.y2;r.segpts=[ye,he,ye,me]}else r.segpts=[v.x2,v.y1]}else if(M){var Ee=v.y1+V+(p?c/2*q:0),Se=v.x1,J=v.x2;r.segpts=[Se,Ee,J,Ee]}else{var D=v.x1+V+(p?f/2*q:0),z=v.y1,U=v.y2;r.segpts=[D,z,D,U]}if(r.isRound){var F=t.pstyle("taxi-radius").value,G=t.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(F),r.isArcRadius=new Array(r.segpts.length/2).fill(G)}};lt.tryToCorrectInvalidPoints=function(t,e){var r=t._private.rscratch;if(r.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!re(r.startX)||!re(r.startY),p=!re(r.arrowStartX)||!re(r.arrowStartY),g=!re(r.endX)||!re(r.endY),m=!re(r.arrowEndX)||!re(r.arrowEndY),b=3,w=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth,T=b*w,E=mr({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),x=EA.poolIndex()){var I=R;R=A,A=I}var M=C.srcPos=R.position(),L=C.tgtPos=A.position(),O=C.srcW=R.outerWidth(),q=C.srcH=R.outerHeight(),W=C.tgtW=A.outerWidth(),V=C.tgtH=A.outerHeight(),$=C.srcShape=r.nodeShapes[e.getNodeShape(R)],X=C.tgtShape=r.nodeShapes[e.getNodeShape(A)],_=C.srcCornerRadius=R.pstyle("corner-radius").value==="auto"?"auto":R.pstyle("corner-radius").pfValue,Q=C.tgtCornerRadius=A.pstyle("corner-radius").value==="auto"?"auto":A.pstyle("corner-radius").pfValue,Z=C.tgtRs=A._private.rscratch,j=C.srcRs=R._private.rscratch;C.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var te=0;te0){var ee=i,ie=cr(ee,Mr(r)),ue=cr(ee,Mr(H)),Ce=ie;if(ue2){var Re=cr(ee,{x:H[2],y:H[3]});Re0){var U=s,F=cr(U,Mr(r)),G=cr(U,Mr(z)),ae=F;if(G2){var Y=cr(U,{x:z[2],y:z[3]});Y=d||x){p={cp:w,segment:E};break}}if(p)break}var S=p.cp,C=p.segment,P=(d-g)/C.length,B=C.t1-C.t0,k=h?C.t0+B*P:C.t1-B*P;k=xa(0,k,1),e=Ir(S.p0,S.p1,S.p2,k),c=rp(S.p0,S.p1,S.p2,k);break}case"straight":case"segments":case"haystack":{for(var R=0,A,I,M,L,O=a.allpts.length,q=0;q+3=d));q+=2);var W=d-I,V=W/A;V=xa(0,V,1),e=lf(M,L,V),c=Iu(M,L);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(t)}};Vt.applyLabelDimensions=function(t){this.applyPrefixedLabelDimensions(t),t.isEdge()&&(this.applyPrefixedLabelDimensions(t,"source"),this.applyPrefixedLabelDimensions(t,"target"))};Vt.applyPrefixedLabelDimensions=function(t,e){var r=t._private,a=this.getLabelText(t,e),n=this.calculateLabelDimensions(t,a),i=t.pstyle("line-height").pfValue,s=t.pstyle("text-wrap").strValue,o=Bt(r.rscratch,"labelWrapCachedLines",e)||[],l=s!=="wrap"?1:Math.max(o.length,1),u=n.height/l,v=u*i,f=n.width,c=n.height+(l-1)*(i-1)*u;Qt(r.rstyle,"labelWidth",e,f),Qt(r.rscratch,"labelWidth",e,f),Qt(r.rstyle,"labelHeight",e,c),Qt(r.rscratch,"labelHeight",e,c),Qt(r.rscratch,"labelLineHeight",e,v)};Vt.getLabelText=function(t,e){var r=t._private,a=e?e+"-":"",n=t.pstyle(a+"label").strValue,i=t.pstyle("text-transform").value,s=function(X,_){return _?(Qt(r.rscratch,X,e,_),_):Bt(r.rscratch,X,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=t.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` -`),f=t.pstyle("text-max-width").pfValue,c=t.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,p=0;pf){var T=g.matchAll(y),E="",x=0,S=wt(T),C;try{for(S.s();!(C=S.n()).done;){var P=C.value,B=P[0],k=g.substring(x,P.index);x=P.index+B.length;var R=E.length===0?k:E+k+B,A=this.calculateLabelDimensions(t,R),I=A.width;I<=f?E+=k+B:(E&&d.push(E),E=k+B)}}catch($){S.e($)}finally{S.f()}E.match(/^[\s\u200b]+$/)||d.push(E)}else d.push(g)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` -`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var M=t.pstyle("text-max-width").pfValue,L="",O="…",q=!1;if(this.calculateLabelDimensions(t,n).widthM)break;L+=n[W],W===n.length-1&&(q=!0)}return q||(L+=O),L}return n};Vt.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;if(e==="auto")if(t.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Vt.calculateLabelDimensions=function(t,e){var r=this,a=r.cy.window(),n=a.document,i=rr(e,t._private.labelDimsKey),s=r.labelDimCache||(r.labelDimCache=[]),o=s[i];if(o!=null)return o;var l=0,u=t.pstyle("font-style").strValue,v=t.pstyle("font-size").pfValue,f=t.pstyle("font-family").strValue,c=t.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=n.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var y=h.style;y.position="absolute",y.left="-9999px",y.top="-9999px",y.zIndex="-1",y.visibility="hidden",y.pointerEvents="none"}d.font="".concat(u," ").concat(c," ").concat(v,"px ").concat(f);for(var p=0,g=0,m=e.split(` -`),b=0;b1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=t.desktopTapThreshold2}var vt=i(D);Ve&&(t.hoverData.tapholdCancelled=!0);var ft=function(){var Lt=t.hoverData.dragDelta=t.hoverData.dragDelta||[];Lt.length===0?(Lt.push(ge[0]),Lt.push(ge[1])):(Lt[0]+=ge[0],Lt[1]+=ge[1])};U=!0,n(ve,["mousemove","vmousemove","tapdrag"],D,{x:Y[0],y:Y[1]});var Rt=function(){t.data.bgActivePosistion=void 0,t.hoverData.selecting||F.emit({originalEvent:D,type:"boxstart",position:{x:Y[0],y:Y[1]}}),xe[4]=1,t.hoverData.selecting=!0,t.redrawHint("select",!0),t.redraw()};if(t.hoverData.which===3){if(Ve){var Et={originalEvent:D,type:"cxtdrag",position:{x:Y[0],y:Y[1]}};we?we.emit(Et):F.emit(Et),t.hoverData.cxtDragged=!0,(!t.hoverData.cxtOver||ve!==t.hoverData.cxtOver)&&(t.hoverData.cxtOver&&t.hoverData.cxtOver.emit({originalEvent:D,type:"cxtdragout",position:{x:Y[0],y:Y[1]}}),t.hoverData.cxtOver=ve,ve&&ve.emit({originalEvent:D,type:"cxtdragover",position:{x:Y[0],y:Y[1]}}))}}else if(t.hoverData.dragging){if(U=!0,F.panningEnabled()&&F.userPanningEnabled()){var Mt;if(t.hoverData.justStartedPan){var $t=t.hoverData.mdownPos;Mt={x:(Y[0]-$t[0])*G,y:(Y[1]-$t[1])*G},t.hoverData.justStartedPan=!1}else Mt={x:ge[0]*G,y:ge[1]*G};F.panBy(Mt),F.emit("dragpan"),t.hoverData.dragged=!0}Y=t.projectIntoViewport(D.clientX,D.clientY)}else if(xe[4]==1&&(we==null||we.pannable())){if(Ve){if(!t.hoverData.dragging&&F.boxSelectionEnabled()&&(vt||!F.panningEnabled()||!F.userPanningEnabled()))Rt();else if(!t.hoverData.selecting&&F.panningEnabled()&&F.userPanningEnabled()){var Gt=s(we,t.hoverData.downs);Gt&&(t.hoverData.dragging=!0,t.hoverData.justStartedPan=!0,xe[4]=0,t.data.bgActivePosistion=Mr(ne),t.redrawHint("select",!0),t.redraw())}we&&we.pannable()&&we.active()&&we.unactivate()}}else{if(we&&we.pannable()&&we.active()&&we.unactivate(),(!we||!we.grabbed())&&ve!=be&&(be&&n(be,["mouseout","tapdragout"],D,{x:Y[0],y:Y[1]}),ve&&n(ve,["mouseover","tapdragover"],D,{x:Y[0],y:Y[1]}),t.hoverData.last=ve),we)if(Ve){if(F.boxSelectionEnabled()&&vt)we&&we.grabbed()&&(g(Oe),we.emit("freeon"),Oe.emit("free"),t.dragData.didDrag&&(we.emit("dragfreeon"),Oe.emit("dragfree"))),Rt();else if(we&&we.grabbed()&&t.nodeIsDraggable(we)){var nt=!t.dragData.didDrag;nt&&t.redrawHint("eles",!0),t.dragData.didDrag=!0,t.hoverData.draggingEles||y(Oe,{inDragLayer:!0});var Ze={x:0,y:0};if(re(ge[0])&&re(ge[1])&&(Ze.x+=ge[0],Ze.y+=ge[1],nt)){var ht=t.hoverData.dragDelta;ht&&re(ht[0])&&re(ht[1])&&(Ze.x+=ht[0],Ze.y+=ht[1])}t.hoverData.draggingEles=!0,Oe.silentShift(Ze).emit("position drag"),t.redrawHint("drag",!0),t.redraw()}}else ft();U=!0}if(xe[2]=Y[0],xe[3]=Y[1],U)return D.stopPropagation&&D.stopPropagation(),D.preventDefault&&D.preventDefault(),!1}},!1);var k,R,A;t.registerBinding(e,"mouseup",function(D){if(!(t.hoverData.which===1&&D.which!==1&&t.hoverData.capture)){var z=t.hoverData.capture;if(z){t.hoverData.capture=!1;var U=t.cy,F=t.projectIntoViewport(D.clientX,D.clientY),G=t.selection,ae=t.findNearestElement(F[0],F[1],!0,!1),Y=t.dragData.possibleDragElements,ne=t.hoverData.down,ce=i(D);if(t.data.bgActivePosistion&&(t.redrawHint("select",!0),t.redraw()),t.hoverData.tapholdCancelled=!0,t.data.bgActivePosistion=void 0,ne&&ne.unactivate(),t.hoverData.which===3){var xe={originalEvent:D,type:"cxttapend",position:{x:F[0],y:F[1]}};if(ne?ne.emit(xe):U.emit(xe),!t.hoverData.cxtDragged){var ve={originalEvent:D,type:"cxttap",position:{x:F[0],y:F[1]}};ne?ne.emit(ve):U.emit(ve)}t.hoverData.cxtDragged=!1,t.hoverData.which=null}else if(t.hoverData.which===1){if(n(ae,["mouseup","tapend","vmouseup"],D,{x:F[0],y:F[1]}),!t.dragData.didDrag&&!t.hoverData.dragged&&!t.hoverData.selecting&&!t.hoverData.isOverThresholdDrag&&(n(ne,["click","tap","vclick"],D,{x:F[0],y:F[1]}),R=!1,D.timeStamp-A<=U.multiClickDebounceTime()?(k&&clearTimeout(k),R=!0,A=null,n(ne,["dblclick","dbltap","vdblclick"],D,{x:F[0],y:F[1]})):(k=setTimeout(function(){R||n(ne,["oneclick","onetap","voneclick"],D,{x:F[0],y:F[1]})},U.multiClickDebounceTime()),A=D.timeStamp)),ne==null&&!t.dragData.didDrag&&!t.hoverData.selecting&&!t.hoverData.dragged&&!i(D)&&(U.$(r).unselect(["tapunselect"]),Y.length>0&&t.redrawHint("eles",!0),t.dragData.possibleDragElements=Y=U.collection()),ae==ne&&!t.dragData.didDrag&&!t.hoverData.selecting&&ae!=null&&ae._private.selectable&&(t.hoverData.dragging||(U.selectionType()==="additive"||ce?ae.selected()?ae.unselect(["tapunselect"]):ae.select(["tapselect"]):ce||(U.$(r).unmerge(ae).unselect(["tapunselect"]),ae.select(["tapselect"]))),t.redrawHint("eles",!0)),t.hoverData.selecting){var be=U.collection(t.getAllInBox(G[0],G[1],G[2],G[3]));t.redrawHint("select",!0),be.length>0&&t.redrawHint("eles",!0),U.emit({type:"boxend",originalEvent:D,position:{x:F[0],y:F[1]}});var we=function(Ve){return Ve.selectable()&&!Ve.selected()};U.selectionType()==="additive"||ce||U.$(r).unmerge(be).unselect(),be.emit("box").stdFilter(we).select().emit("boxselect"),t.redraw()}if(t.hoverData.dragging&&(t.hoverData.dragging=!1,t.redrawHint("select",!0),t.redrawHint("eles",!0),t.redraw()),!G[4]){t.redrawHint("drag",!0),t.redrawHint("eles",!0);var ge=ne&&ne.grabbed();g(Y),ge&&(ne.emit("freeon"),Y.emit("free"),t.dragData.didDrag&&(ne.emit("dragfreeon"),Y.emit("dragfree")))}}G[4]=0,t.hoverData.down=null,t.hoverData.cxtStarted=!1,t.hoverData.draggingEles=!1,t.hoverData.selecting=!1,t.hoverData.isOverThresholdDrag=!1,t.dragData.didDrag=!1,t.hoverData.dragged=!1,t.hoverData.dragDelta=[],t.hoverData.mdownPos=null,t.hoverData.mdownGPos=null,t.hoverData.which=null}}},!1);var I=function(D){if(!t.scrollingPage){var z=t.cy,U=z.zoom(),F=z.pan(),G=t.projectIntoViewport(D.clientX,D.clientY),ae=[G[0]*U+F.x,G[1]*U+F.y];if(t.hoverData.draggingEles||t.hoverData.dragging||t.hoverData.cxtStarted||C()){D.preventDefault();return}if(z.panningEnabled()&&z.userPanningEnabled()&&z.zoomingEnabled()&&z.userZoomingEnabled()){D.preventDefault(),t.data.wheelZooming=!0,clearTimeout(t.data.wheelTimeout),t.data.wheelTimeout=setTimeout(function(){t.data.wheelZooming=!1,t.redrawHint("eles",!0),t.redraw()},150);var Y;D.deltaY!=null?Y=D.deltaY/-250:D.wheelDeltaY!=null?Y=D.wheelDeltaY/1e3:Y=D.wheelDelta/1e3,Y=Y*t.wheelSensitivity;var ne=D.deltaMode===1;ne&&(Y*=33);var ce=z.zoom()*Math.pow(10,Y);D.type==="gesturechange"&&(ce=t.gestureStartZoom*D.scale),z.zoom({level:ce,renderedPosition:{x:ae[0],y:ae[1]}}),z.emit(D.type==="gesturechange"?"pinchzoom":"scrollzoom")}}};t.registerBinding(t.container,"wheel",I,!0),t.registerBinding(e,"scroll",function(D){t.scrollingPage=!0,clearTimeout(t.scrollingPageTimeout),t.scrollingPageTimeout=setTimeout(function(){t.scrollingPage=!1},250)},!0),t.registerBinding(t.container,"gesturestart",function(D){t.gestureStartZoom=t.cy.zoom(),t.hasTouchStarted||D.preventDefault()},!0),t.registerBinding(t.container,"gesturechange",function(J){t.hasTouchStarted||I(J)},!0),t.registerBinding(t.container,"mouseout",function(D){var z=t.projectIntoViewport(D.clientX,D.clientY);t.cy.emit({originalEvent:D,type:"mouseout",position:{x:z[0],y:z[1]}})},!1),t.registerBinding(t.container,"mouseover",function(D){var z=t.projectIntoViewport(D.clientX,D.clientY);t.cy.emit({originalEvent:D,type:"mouseover",position:{x:z[0],y:z[1]}})},!1);var M,L,O,q,W,V,$,X,_,Q,Z,j,te,K=function(D,z,U,F){return Math.sqrt((U-D)*(U-D)+(F-z)*(F-z))},N=function(D,z,U,F){return(U-D)*(U-D)+(F-z)*(F-z)},H;t.registerBinding(t.container,"touchstart",H=function(D){if(t.hasTouchStarted=!0,!!P(D)){b(),t.touchData.capture=!0,t.data.bgActivePosistion=void 0;var z=t.cy,U=t.touchData.now,F=t.touchData.earlier;if(D.touches[0]){var G=t.projectIntoViewport(D.touches[0].clientX,D.touches[0].clientY);U[0]=G[0],U[1]=G[1]}if(D.touches[1]){var G=t.projectIntoViewport(D.touches[1].clientX,D.touches[1].clientY);U[2]=G[0],U[3]=G[1]}if(D.touches[2]){var G=t.projectIntoViewport(D.touches[2].clientX,D.touches[2].clientY);U[4]=G[0],U[5]=G[1]}if(D.touches[1]){t.touchData.singleTouchMoved=!0,g(t.dragData.touchDragEles);var ae=t.findContainerClientCoords();_=ae[0],Q=ae[1],Z=ae[2],j=ae[3],M=D.touches[0].clientX-_,L=D.touches[0].clientY-Q,O=D.touches[1].clientX-_,q=D.touches[1].clientY-Q,te=0<=M&&M<=Z&&0<=O&&O<=Z&&0<=L&&L<=j&&0<=q&&q<=j;var Y=z.pan(),ne=z.zoom();W=K(M,L,O,q),V=N(M,L,O,q),$=[(M+O)/2,(L+q)/2],X=[($[0]-Y.x)/ne,($[1]-Y.y)/ne];var ce=200,xe=ce*ce;if(V=1){for(var mt=t.touchData.startPosition=[null,null,null,null,null,null],Ke=0;Ke=t.touchTapThreshold2}if(z&&t.touchData.cxt){D.preventDefault();var mt=D.touches[0].clientX-_,Ke=D.touches[0].clientY-Q,Ye=D.touches[1].clientX-_,_e=D.touches[1].clientY-Q,vt=N(mt,Ke,Ye,_e),ft=vt/V,Rt=150,Et=Rt*Rt,Mt=1.5,$t=Mt*Mt;if(ft>=$t||vt>=Et){t.touchData.cxt=!1,t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Gt={originalEvent:D,type:"cxttapend",position:{x:G[0],y:G[1]}};t.touchData.start?(t.touchData.start.unactivate().emit(Gt),t.touchData.start=null):F.emit(Gt)}}if(z&&t.touchData.cxt){var Gt={originalEvent:D,type:"cxtdrag",position:{x:G[0],y:G[1]}};t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.touchData.start?t.touchData.start.emit(Gt):F.emit(Gt),t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxtDragged=!0;var nt=t.findNearestElement(G[0],G[1],!0,!0);(!t.touchData.cxtOver||nt!==t.touchData.cxtOver)&&(t.touchData.cxtOver&&t.touchData.cxtOver.emit({originalEvent:D,type:"cxtdragout",position:{x:G[0],y:G[1]}}),t.touchData.cxtOver=nt,nt&&nt.emit({originalEvent:D,type:"cxtdragover",position:{x:G[0],y:G[1]}}))}else if(z&&D.touches[2]&&F.boxSelectionEnabled())D.preventDefault(),t.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,t.touchData.selecting||F.emit({originalEvent:D,type:"boxstart",position:{x:G[0],y:G[1]}}),t.touchData.selecting=!0,t.touchData.didSelect=!0,U[4]=1,!U||U.length===0||U[0]===void 0?(U[0]=(G[0]+G[2]+G[4])/3,U[1]=(G[1]+G[3]+G[5])/3,U[2]=(G[0]+G[2]+G[4])/3+1,U[3]=(G[1]+G[3]+G[5])/3+1):(U[2]=(G[0]+G[2]+G[4])/3,U[3]=(G[1]+G[3]+G[5])/3),t.redrawHint("select",!0),t.redraw();else if(z&&D.touches[1]&&!t.touchData.didSelect&&F.zoomingEnabled()&&F.panningEnabled()&&F.userZoomingEnabled()&&F.userPanningEnabled()){D.preventDefault(),t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var Ze=t.dragData.touchDragEles;if(Ze){t.redrawHint("drag",!0);for(var ht=0;ht0&&!t.hoverData.draggingEles&&!t.swipePanning&&t.data.bgActivePosistion!=null&&(t.data.bgActivePosistion=void 0,t.redrawHint("select",!0),t.redraw())}},!1);var ie;t.registerBinding(e,"touchcancel",ie=function(D){var z=t.touchData.start;t.touchData.capture=!1,z&&z.unactivate()});var ue,Ce,Re,Me;if(t.registerBinding(e,"touchend",ue=function(D){var z=t.touchData.start,U=t.touchData.capture;if(U)D.touches.length===0&&(t.touchData.capture=!1),D.preventDefault();else return;var F=t.selection;t.swipePanning=!1,t.hoverData.draggingEles=!1;var G=t.cy,ae=G.zoom(),Y=t.touchData.now,ne=t.touchData.earlier;if(D.touches[0]){var ce=t.projectIntoViewport(D.touches[0].clientX,D.touches[0].clientY);Y[0]=ce[0],Y[1]=ce[1]}if(D.touches[1]){var ce=t.projectIntoViewport(D.touches[1].clientX,D.touches[1].clientY);Y[2]=ce[0],Y[3]=ce[1]}if(D.touches[2]){var ce=t.projectIntoViewport(D.touches[2].clientX,D.touches[2].clientY);Y[4]=ce[0],Y[5]=ce[1]}z&&z.unactivate();var xe;if(t.touchData.cxt){if(xe={originalEvent:D,type:"cxttapend",position:{x:Y[0],y:Y[1]}},z?z.emit(xe):G.emit(xe),!t.touchData.cxtDragged){var ve={originalEvent:D,type:"cxttap",position:{x:Y[0],y:Y[1]}};z?z.emit(ve):G.emit(ve)}t.touchData.start&&(t.touchData.start._private.grabbed=!1),t.touchData.cxt=!1,t.touchData.start=null,t.redraw();return}if(!D.touches[2]&&G.boxSelectionEnabled()&&t.touchData.selecting){t.touchData.selecting=!1;var be=G.collection(t.getAllInBox(F[0],F[1],F[2],F[3]));F[0]=void 0,F[1]=void 0,F[2]=void 0,F[3]=void 0,F[4]=0,t.redrawHint("select",!0),G.emit({type:"boxend",originalEvent:D,position:{x:Y[0],y:Y[1]}});var we=function(Et){return Et.selectable()&&!Et.selected()};be.emit("box").stdFilter(we).select().emit("boxselect"),be.nonempty()&&t.redrawHint("eles",!0),t.redraw()}if(z!=null&&z.unactivate(),D.touches[2])t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);else if(!D.touches[1]){if(!D.touches[0]){if(!D.touches[0]){t.data.bgActivePosistion=void 0,t.redrawHint("select",!0);var ge=t.dragData.touchDragEles;if(z!=null){var Oe=z._private.grabbed;g(ge),t.redrawHint("drag",!0),t.redrawHint("eles",!0),Oe&&(z.emit("freeon"),ge.emit("free"),t.dragData.didDrag&&(z.emit("dragfreeon"),ge.emit("dragfree"))),n(z,["touchend","tapend","vmouseup","tapdragout"],D,{x:Y[0],y:Y[1]}),z.unactivate(),t.touchData.start=null}else{var Ve=t.findNearestElement(Y[0],Y[1],!0,!0);n(Ve,["touchend","tapend","vmouseup","tapdragout"],D,{x:Y[0],y:Y[1]})}var yt=t.touchData.startPosition[0]-Y[0],mt=yt*yt,Ke=t.touchData.startPosition[1]-Y[1],Ye=Ke*Ke,_e=mt+Ye,vt=_e*ae*ae;t.touchData.singleTouchMoved||(z||G.$(":selected").unselect(["tapunselect"]),n(z,["tap","vclick"],D,{x:Y[0],y:Y[1]}),Ce=!1,D.timeStamp-Me<=G.multiClickDebounceTime()?(Re&&clearTimeout(Re),Ce=!0,Me=null,n(z,["dbltap","vdblclick"],D,{x:Y[0],y:Y[1]})):(Re=setTimeout(function(){Ce||n(z,["onetap","voneclick"],D,{x:Y[0],y:Y[1]})},G.multiClickDebounceTime()),Me=D.timeStamp)),z!=null&&!t.dragData.didDrag&&z._private.selectable&&vt"u"){var le=[],oe=function(D){return{clientX:D.clientX,clientY:D.clientY,force:1,identifier:D.pointerId,pageX:D.pageX,pageY:D.pageY,radiusX:D.width/2,radiusY:D.height/2,screenX:D.screenX,screenY:D.screenY,target:D.target}},pe=function(D){return{event:D,touch:oe(D)}},ye=function(D){le.push(pe(D))},he=function(D){for(var z=0;z0)return $[0]}return null},d=Object.keys(c),y=0;y0?h:Fo(i,s,e,r,a,n,o,l)},checkPoint:function(e,r,a,n,i,s,o,l){l=l==="auto"?br(n,i):l;var u=2*l;if(Ht(e,r,this.points,s,o,n,i-u,[0,-1],a)||Ht(e,r,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(gt(e,r,c)||pr(e,r,u,u,s+n/2-l,o+i/2-l,a)||pr(e,r,u,u,s-n/2+l,o+i/2-l,a))}}};Xt.registerNodeShapes=function(){var t=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",ct(3,0)),this.generateRoundPolygon("round-triangle",ct(3,0)),this.generatePolygon("rectangle",ct(4,0)),t.square=t.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ct(5,0)),this.generateRoundPolygon("round-pentagon",ct(5,0)),this.generatePolygon("hexagon",ct(6,0)),this.generateRoundPolygon("round-hexagon",ct(6,0)),this.generatePolygon("heptagon",ct(7,0)),this.generateRoundPolygon("round-heptagon",ct(7,0)),this.generatePolygon("octagon",ct(8,0)),this.generateRoundPolygon("round-octagon",ct(8,0));var a=new Array(20);{var n=ai(5,0),i=ai(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*Qn)break;var T=e.deq(a,p,y);if(T.length>0)for(var E=0;E0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,p,y)&&i())},o=e.priority||Ti;n.beforeRender(s,o(a))}}}},np=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cn;or(this,t),this.idsByKey=new zt,this.keyForId=new zt,this.cachesByLvl=new zt,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=r}return ur(t,[{key:"getIdsFor",value:function(r){r==null&&qe("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(r);return n||(n=new Kr,a.set(r,n)),n}},{key:"addIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).add(a)}},{key:"deleteIdForKey",value:function(r,a){r!=null&&this.getIdsFor(r).delete(a)}},{key:"getNumberOfIdsForKey",value:function(r){return r==null?0:this.getIdsFor(r).size}},{key:"updateKeyMappingFor",value:function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(r){var a=r.id(),n=this.keyForId.get(a),i=this.getKey(r);return n!==i}},{key:"isInvalid",value:function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)}},{key:"getCachesAt",value:function(r){var a=this.cachesByLvl,n=this.lvls,i=a.get(r);return i||(i=new zt,a.set(r,i),n.push(r)),i}},{key:"getCache",value:function(r,a){return this.getCachesAt(a).get(r)}},{key:"get",value:function(r,a){var n=this.getKey(r),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(r),i}},{key:"getForCachedKey",value:function(r,a){var n=this.keyForId.get(r.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(r,a){return this.getCachesAt(a).has(r)}},{key:"has",value:function(r,a){var n=this.getKey(r);return this.hasCache(n,a)}},{key:"setCache",value:function(r,a,n){n.key=r,this.getCachesAt(a).set(r,n)}},{key:"set",value:function(r,a,n){var i=this.getKey(r);this.setCache(i,a,n),this.updateKeyMappingFor(r)}},{key:"deleteCache",value:function(r,a){this.getCachesAt(a).delete(r)}},{key:"delete",value:function(r,a){var n=this.getKey(r);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(r){var a=this;this.lvls.forEach(function(n){return a.deleteCache(r,n)})}},{key:"invalidate",value:function(r){var a=r.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(r);var i=this.doesEleInvalidateKey(r);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}]),t}(),js=25,Qa=50,ln=-4,gi=3,qu=7.99,ip=8,sp=1024,op=1024,up=1024,lp=.2,vp=.8,fp=10,cp=.15,dp=.1,hp=.9,gp=.9,pp=100,yp=1,Lr={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},mp=je({getKey:null,doesEleInvalidateKey:cn,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ao,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ca=function(e,r){var a=this;a.renderer=e,a.onDequeues=[];var n=mp(r);de(a,n),a.lookup=new np(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},Xe=ca.prototype;Xe.reasons=Lr;Xe.getTextureQueue=function(t){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[t]=e.eleImgCaches[t]||[]};Xe.getRetiredTextureQueue=function(t){var e=this,r=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=r[t]=r[t]||[];return a};Xe.getElementQueue=function(){var t=this,e=t.eleCacheQueue=t.eleCacheQueue||new Ma(function(r,a){return a.reqs-r.reqs});return e};Xe.getElementKeyToQueue=function(){var t=this,e=t.eleKeyToCacheQueue=t.eleKeyToCacheQueue||{};return e};Xe.getElement=function(t,e,r,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!t.visible()||t.removed()||!i.allowEdgeTxrCaching&&t.isEdge()||!i.allowParentTxrCaching&&t.isParent())return null;if(a==null&&(a=Math.ceil(Si(o*r))),a=qu||a>gi)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(t,u);if(!this.isVisible(t,c))return null;var h=l.get(t,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=js?d=js:v<=Qa?d=Qa:d=Math.ceil(v/Qa)*Qa,v>up||f>op)return null;var y=i.getTextureQueue(d),p=y[y.length-2],g=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};p||(p=y[y.length-1]),p||(p=g()),p.width-p.usedWidtha;B--)C=i.getElement(t,e,r,B,Lr.downscale);P()}else return i.queueElement(t,E.level-1),E;else{var k;if(!b&&!w&&!T)for(var R=a-1;R>=ln;R--){var A=l.get(t,R);if(A){k=A;break}}if(m(k))return i.queueElement(t,a),k;p.context.translate(p.usedWidth,0),p.context.scale(u,u),this.drawElement(p.context,t,e,c,!1),p.context.scale(1/u,1/u),p.context.translate(-p.usedWidth,0)}return h={x:p.usedWidth,texture:p,level:a,scale:u,width:f,height:v,scaledLabelShown:c},p.usedWidth+=Math.ceil(f+ip),p.eleCaches.push(h),l.set(t,a,h),i.checkTextureFullness(p),h};Xe.invalidateElements=function(t){for(var e=0;e=lp*t.width&&this.retireTexture(t)};Xe.checkTextureFullness=function(t){var e=this,r=e.getTextureQueue(t.height);t.usedWidth/t.width>vp&&t.fullnessChecks>=fp?ar(r,t):t.fullnessChecks++};Xe.retireTexture=function(t){var e=this,r=t.height,a=e.getTextureQueue(r),n=this.lookup;ar(a,t),t.retired=!0;for(var i=t.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,Ci(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ar(n,s),a.push(s),s}};Xe.queueElement=function(t,e){var r=this,a=r.getElementQueue(),n=r.getElementKeyToQueue(),i=this.getKey(t),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(t),s.reqs++,a.updateItem(s);else{var o={eles:t.spawn().merge(t),level:e,reqs:1,key:i};a.push(o),n[i]=o}};Xe.dequeue=function(t){for(var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=r.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,t,o.level,Lr.dequeue)}return n};Xe.removeFromQueue=function(t){var e=this,r=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(t),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Ei,r.updateItem(i),r.pop(),a[n]=null):i.eles.unmerge(t))};Xe.onDequeue=function(t){this.onDequeues.push(t)};Xe.offDequeue=function(t){ar(this.onDequeues,t)};Xe.setupDequeueing=Vu.setupDequeueing({deqRedrawThreshold:pp,deqCost:cp,deqAvgCost:dp,deqNoDrawCost:hp,deqFastCost:gp,deq:function(e,r,a){return e.dequeue(r,a)},onDeqd:function(e,r){for(var a=0;a=wp||r>wn)return null}a.validateLayersElesOrdering(r,t);var l=a.layersByLevel,u=Math.pow(2,r),v=l[r]=l[r]||[],f,c=a.levelIsComplete(r,t),h,d=function(){var P=function(I){if(a.validateLayersElesOrdering(I,t),a.levelIsComplete(I,t))return h=l[I],!0},B=function(I){if(!h)for(var M=r+I;ha<=M&&M<=wn&&!P(M);M+=I);};B(1),B(-1);for(var k=v.length-1;k>=0;k--){var R=v[k];R.invalid&&ar(v,R)}};if(!c)d();else return v;var y=function(){if(!f){f=pt();for(var P=0;Pto||R>to)return null;var A=k*R;if(A>Pp)return null;var I=a.makeLayer(f,r);if(B!=null){var M=v.indexOf(B)+1;v.splice(M,0,I)}else(P.insert===void 0||P.insert)&&v.unshift(I);return I};if(a.skipping&&!o)return null;for(var g=null,m=t.length/bp,b=!o,w=0;w=m||!zo(g.bb,T.boundingBox()))&&(g=p({insert:!0,after:g}),!g))return null;h||b?a.queueLayer(g,T):a.drawEleInLayer(g,T,r,e),g.eles.push(T),x[r]=g}return h||(b?null:v)};at.getEleLevelForLayerLevel=function(t,e){return t};at.drawEleInLayer=function(t,e,r,a){var n=this,i=this.renderer,s=t.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(r=n.getEleLevelForLayerLevel(r,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,r,Bp),i.setImgSmoothing(s,!0))};at.levelIsComplete=function(t,e){var r=this,a=r.layersByLevel[t];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};at.validateLayersElesOrdering=function(t,e){var r=this.layersByLevel[t];if(r)for(var a=0;a0){e=!0;break}}return e};at.invalidateElements=function(t){var e=this;t.length!==0&&(e.lastInvalidationTime=Wt(),!(t.length===0||!e.haveLayers())&&e.updateElementsInLayers(t,function(a,n,i){e.invalidateLayer(a)}))};at.invalidateLayer=function(t){if(this.lastInvalidationTime=Wt(),!t.invalid){var e=t.level,r=t.eles,a=this.layersByLevel[e];ar(a,t),t.elesQueue=[],t.invalid=!0,t.replacement&&(t.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;r&&(l=r,t.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,p=e.pstyle("line-outline-color").value,g=u*v,m=u*v,b=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g;f==="straight-triangle"?(s.eleStrokeStyle(t,e,I),s.drawEdgeTrianglePath(e,t,o.allpts)):(t.lineWidth=h,t.lineCap=d,s.eleStrokeStyle(t,e,I),s.drawEdgePath(e,t,o.allpts,c),t.lineCap="butt")},w=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:g;if(t.lineWidth=h+y,t.lineCap=d,y>0)s.colorStrokeStyle(t,p[0],p[1],p[2],I);else{t.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,t,o.allpts):(s.drawEdgePath(e,t,o.allpts,c),t.lineCap="butt")},T=function(){n&&s.drawEdgeOverlay(t,e)},E=function(){n&&s.drawEdgeUnderlay(t,e)},x=function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(t,e,I)},S=function(){s.drawElementText(t,e,null,a)};t.lineJoin="round";var C=e.pstyle("ghost").value==="yes";if(C){var P=e.pstyle("ghost-offset-x").pfValue,B=e.pstyle("ghost-offset-y").pfValue,k=e.pstyle("ghost-opacity").value,R=g*k;t.translate(P,B),b(R),x(R),t.translate(-P,-B)}else w();E(),b(),x(),T(),S(),r&&t.translate(l.x1,l.y1)}};var Ku=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(r,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;r.lineWidth=u,o.edgeType==="self"&&!s?r.lineCap="butt":r.lineCap="round",i.colorStrokeStyle(r,v[0],v[1],v[2],n),i.drawEdgePath(a,r,o.allpts,"solid")}}}};Yt.drawEdgeOverlay=Ku("overlay");Yt.drawEdgeUnderlay=Ku("underlay");Yt.drawEdgePath=function(t,e,r,a){var n=t._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=t.pstyle("line-dash-pattern").pfValue,v=t.pstyle("line-dash-offset").pfValue;if(l){var f=r.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);t.textAlign=l,t.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;t.textAlign="center",t.textBaseline="bottom"}var h=!r,d;r&&(d=r,t.translate(-d.x1,-d.y1)),n==null?(s.drawText(t,e,null,h,i),e.isEdge()&&(s.drawText(t,e,"source",h,i),s.drawText(t,e,"target",h,i))):s.drawText(t,e,n,h,i),r&&t.translate(d.x1,d.y1)};Cr.getFontCache=function(t){var e;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=r?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;t.font=a+" "+s+" "+n+" "+i,t.lineJoin="round",this.colorFillStyle(t,u[0],u[1],u[2],o),this.colorStrokeStyle(t,v[0],v[1],v[2],l)};function jn(t,e,r,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=arguments.length>6?arguments[6]:void 0;t.beginPath(),t.moveTo(e+i,r),t.lineTo(e+a-i,r),t.quadraticCurveTo(e+a,r,e+a,r+i),t.lineTo(e+a,r+n-i),t.quadraticCurveTo(e+a,r+n,e+a-i,r+n),t.lineTo(e+i,r+n),t.quadraticCurveTo(e,r+n,e,r+n-i),t.lineTo(e,r+i),t.quadraticCurveTo(e,r,e+i,r),t.closePath(),s?t.stroke():t.fill()}Cr.getTextAngle=function(t,e){var r,a=t._private,n=a.rscratch,i=e?e+"-":"",s=t.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=Bt(n,"labelAngle",e);r=t.isEdge()?o:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};Cr.drawText=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var l=Bt(s,"labelX",r),u=Bt(s,"labelY",r),v,f,c=this.getLabelText(e,r);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(t,e,n);var h=r?r+"-":"",d=Bt(s,"labelWidth",r),y=Bt(s,"labelHeight",r),p=e.pstyle(h+"text-margin-x").pfValue,g=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=p,u+=g;var T;switch(a?T=this.getTextAngle(e,r):T=0,T!==0&&(v=l,f=u,t.translate(v,f),t.rotate(T),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var E=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,S=e.pstyle("text-border-width").pfValue,C=e.pstyle("text-background-padding").pfValue,P=e.pstyle("text-background-shape").strValue,B=P.indexOf("round")===0,k=2;if(E>0||S>0&&x>0){var R=l-C;switch(b){case"left":R-=d;break;case"center":R-=d/2;break}var A=u-y-C,I=d+2*C,M=y+2*C;if(E>0){var L=t.fillStyle,O=e.pstyle("text-background-color").value;t.fillStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+E*o+")",B?jn(t,R,A,I,M,k):t.fillRect(R,A,I,M),t.fillStyle=L}if(S>0&&x>0){var q=t.strokeStyle,W=t.lineWidth,V=e.pstyle("text-border-color").value,$=e.pstyle("text-border-style").value;if(t.strokeStyle="rgba("+V[0]+","+V[1]+","+V[2]+","+x*o+")",t.lineWidth=S,t.setLineDash)switch($){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"double":t.lineWidth=S/4,t.setLineDash([]);break;case"solid":t.setLineDash([]);break}if(B?jn(t,R,A,I,M,k,"stroke"):t.strokeRect(R,A,I,M),$==="double"){var X=S/2;B?jn(t,R+X,A+X,I-X*2,M-X*2,k,"stroke"):t.strokeRect(R+X,A+X,I-X*2,M-X*2)}t.setLineDash&&t.setLineDash([]),t.lineWidth=W,t.strokeStyle=q}}var _=2*e.pstyle("text-outline-width").pfValue;if(_>0&&(t.lineWidth=_),e.pstyle("text-wrap").value==="wrap"){var Q=Bt(s,"labelWrapCachedLines",r),Z=Bt(s,"labelLineHeight",r),j=d/2,te=this.getLabelJustification(e);switch(te==="auto"||(b==="left"?te==="left"?l+=-d:te==="center"&&(l+=-j):b==="center"?te==="left"?l+=-j:te==="right"&&(l+=j):b==="right"&&(te==="center"?l+=j:te==="right"&&(l+=d))),w){case"top":u-=(Q.length-1)*Z;break;case"center":case"bottom":u-=(Q.length-1)*Z;break}for(var K=0;K0&&t.strokeText(Q[K],l,u),t.fillText(Q[K],l,u),u+=Z}else _>0&&t.strokeText(c,l,u),t.fillText(c,l,u);T!==0&&(t.rotate(-T),t.translate(-v,-f))}}};var Jr={};Jr.drawNode=function(t,e,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!re(f.x)||!re(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,p=e.padding();o=e.width()+2*p,l=e.height()+2*p;var g;r&&(g=r,t.translate(-g.x1,-g.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),T=new Array(b.length),E=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:R;s.eleFillStyle(t,e,F)},K=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;s.colorStrokeStyle(t,A[0],A[1],A[2],F)},N=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Q;s.colorStrokeStyle(t,X[0],X[1],X[2],F)},H=function(F,G,ae,Y){var ne=s.nodePathCache=s.nodePathCache||[],ce=Bo(ae==="polygon"?ae+","+Y.join(","):ae,""+G,""+F,""+j),xe=ne[ce],ve,be=!1;return xe!=null?(ve=xe,be=!0,v.pathCache=ve):(ve=new Path2D,ne[ce]=v.pathCache=ve),{path:ve,cacheHit:be}},ee=e.pstyle("shape").strValue,ie=e.pstyle("shape-polygon-points").pfValue;if(h){t.translate(f.x,f.y);var ue=H(o,l,ee,ie);d=ue.path,y=ue.cacheHit}var Ce=function(){if(!y){var F=f;h&&(F={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||t,F.x,F.y,o,l,j,v)}h?t.fill(d):t.fill()},Re=function(){for(var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,ae=u.backgrounding,Y=0,ne=0;ne0&&arguments[0]!==void 0?arguments[0]:!1,G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(t,e,G),F&&(h||s.nodeShapes[s.getNodeShape(e)].draw(t,f.x,f.y,o,l,j,v)))},le=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,G=(B>0?B:-B)*F,ae=B>0?0:255;B!==0&&(s.colorFillStyle(t,ae,ae,ae,G),h?t.fill(d):t.fill())},oe=function(){if(k>0){if(t.lineWidth=k,t.lineCap=L,t.lineJoin=M,t.setLineDash)switch(I){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash(q),t.lineDashOffset=W;break;case"solid":case"double":t.setLineDash([]);break}if(O!=="center"){if(t.save(),t.lineWidth*=2,O==="inside")h?t.clip(d):t.clip();else{var F=new Path2D;F.rect(-o/2-k,-l/2-k,o+2*k,l+2*k),F.addPath(d),t.clip(F,"evenodd")}h?t.stroke(d):t.stroke(),t.restore()}else h?t.stroke(d):t.stroke();if(I==="double"){t.lineWidth=k/3;var G=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",h?t.stroke(d):t.stroke(),t.globalCompositeOperation=G}t.setLineDash&&t.setLineDash([])}},pe=function(){if($>0){if(t.lineWidth=$,t.lineCap="butt",t.setLineDash)switch(_){case"dotted":t.setLineDash([1,1]);break;case"dashed":t.setLineDash([4,2]);break;case"solid":case"double":t.setLineDash([]);break}var F=f;h&&(F={x:0,y:0});var G=s.getNodeShape(e),ae=k;O==="inside"&&(ae=0),O==="outside"&&(ae*=2);var Y=(o+ae+($+Z))/o,ne=(l+ae+($+Z))/l,ce=o*Y,xe=l*ne,ve=s.nodeShapes[G].points,be;if(h){var we=H(ce,xe,G,ve);be=we.path}if(G==="ellipse")s.drawEllipsePath(be||t,F.x,F.y,ce,xe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(G)){var ge=0,Oe=0,Ve=0;G==="round-diamond"?ge=(ae+Z+$)*1.4:G==="round-heptagon"?(ge=(ae+Z+$)*1.075,Ve=-(ae/2+Z+$)/35):G==="round-hexagon"?ge=(ae+Z+$)*1.12:G==="round-pentagon"?(ge=(ae+Z+$)*1.13,Ve=-(ae/2+Z+$)/15):G==="round-tag"?(ge=(ae+Z+$)*1.12,Oe=(ae/2+$+Z)*.07):G==="round-triangle"&&(ge=(ae+Z+$)*(Math.PI/2),Ve=-(ae+Z/2+$)/Math.PI),ge!==0&&(Y=(o+ge)/o,ce=o*Y,["round-hexagon","round-tag"].includes(G)||(ne=(l+ge)/l,xe=l*ne)),j=j==="auto"?qo(ce,xe):j;for(var yt=ce/2,mt=xe/2,Ke=j+(ae+$+Z)/2,Ye=new Array(ve.length/2),_e=new Array(ve.length/2),vt=0;vt0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(r,v[0],v[1],v[2],u),o.nodeShapes[f].draw(r,n.x,n.y,i+l*2,s+l*2,c),r.fill()}}}};Jr.drawNodeOverlay=Wu("overlay");Jr.drawNodeUnderlay=Wu("underlay");Jr.hasPie=function(t){return t=t[0],t._private.hasPie};Jr.drawPie=function(t,e,r,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=a.x,o=a.y,l=e.width(),u=e.height(),v=Math.min(l,u)/2,f=0,c=this.usePaths();c&&(s=0,o=0),i.units==="%"?v=v*i.pfValue:i.pfValue!==void 0&&(v=i.pfValue/2);for(var h=1;h<=n.pieBackgroundN;h++){var d=e.pstyle("pie-"+h+"-background-size").value,y=e.pstyle("pie-"+h+"-background-color").value,p=e.pstyle("pie-"+h+"-background-opacity").value*r,g=d/100;g+f>1&&(g=1-f);var m=1.5*Math.PI+2*Math.PI*f,b=2*Math.PI*g,w=m+b;d===0||f>=1||f+g>1||(t.beginPath(),t.moveTo(s,o),t.arc(s,o,v,m,w),t.closePath(),this.colorFillStyle(t,y[0],y[1],y[2],p),t.fill(),f+=g)}};var dt={},qp=100;dt.getPixelRatio=function(){var t=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),r=t.backingStorePixelRatio||t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/r};dt.paintCache=function(t){for(var e=this.paintCaches=this.paintCaches||[],r=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var m=r.style(),b=r.zoom(),w=s!==void 0?s:b,T=r.pan(),E={x:T.x,y:T.y},x={zoom:b,pan:{x:T.x,y:T.y}},S=e.prevViewport,C=S===void 0||x.zoom!==S.zoom||x.pan.x!==S.pan.x||x.pan.y!==S.pan.y;!C&&!(y&&!d)&&(e.motionBlurPxRatio=1),o&&(E=o),w*=l,E.x*=l,E.y*=l;var P=e.getCachedZSortedEles();function B(K,N,H,ee,ie){var ue=K.globalCompositeOperation;K.globalCompositeOperation="destination-out",e.colorFillStyle(K,255,255,255,e.motionBlurTransparency),K.fillRect(N,H,ee,ie),K.globalCompositeOperation=ue}function k(K,N){var H,ee,ie,ue;!e.clearingMotionBlur&&(K===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||K===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(H={x:T.x*h,y:T.y*h},ee=b*h,ie=e.canvasWidth*h,ue=e.canvasHeight*h):(H=E,ee=w,ie=e.canvasWidth,ue=e.canvasHeight),K.setTransform(1,0,0,1,0,0),N==="motionBlur"?B(K,0,0,ie,ue):!a&&(N===void 0||N)&&K.clearRect(0,0,ie,ue),n||(K.translate(H.x,H.y),K.scale(ee,ee)),o&&K.translate(o.x,o.y),s&&K.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=r.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var R=e.data.bufferContexts[e.TEXTURE_BUFFER];R.setTransform(1,0,0,1,0,0),R.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:R,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var x=e.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var A=u.contexts[e.NODE],I=e.textureCache.texture,x=e.textureCache.viewport;A.setTransform(1,0,0,1,0,0),c?B(A,0,0,x.width,x.height):A.clearRect(0,0,x.width,x.height);var M=m.core("outside-texture-bg-color").value,L=m.core("outside-texture-bg-opacity").value;e.colorFillStyle(A,M[0],M[1],M[2],L),A.fillRect(0,0,x.width,x.height);var b=r.zoom();k(A,!1),A.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l),A.drawImage(I,x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=r.extent(),q=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),W=e.hideEdgesOnViewport&&q,V=[];if(V[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,V[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),V[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,V[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||V[e.NODE]){var $=c&&!V[e.NODE]&&h!==1,A=a||($?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),X=c&&!$?"motionBlur":void 0;k(A,X),W?e.drawCachedNodes(A,P.nondrag,l,O):e.drawLayeredElements(A,P.nondrag,l,O),e.debug&&e.drawDebugPoints(A,P.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||V[e.DRAG])){var $=c&&!V[e.DRAG]&&h!==1,A=a||($?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);k(A,c&&!$?"motionBlur":void 0),W?e.drawCachedNodes(A,P.drag,l,O):e.drawCachedElements(A,P.drag,l,O),e.debug&&e.drawDebugPoints(A,P.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(t,k),c&&h!==1){var _=u.contexts[e.NODE],Q=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],Z=u.contexts[e.DRAG],j=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],te=function(N,H,ee){N.setTransform(1,0,0,1,0,0),ee||!g?N.clearRect(0,0,e.canvasWidth,e.canvasHeight):B(N,0,0,e.canvasWidth,e.canvasHeight);var ie=h;N.drawImage(H,0,0,e.canvasWidth*ie,e.canvasHeight*ie,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||V[e.NODE])&&(te(_,Q,V[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||V[e.DRAG])&&(te(Z,j,V[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},qp)),a||r.emit("render")};var sa;dt.drawSelectionRectangle=function(t,e){var r=this,a=r.cy,n=r.data,i=a.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=n.canvasNeedsRedraw,u=t.forcedContext;if(r.showFps||!s&&l[r.SELECT_BOX]&&!o){var v=u||n.contexts[r.SELECT_BOX];if(e(v),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(n.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),h=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(h.x,h.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var d=r.lastRedrawTime;if(r.showFps&&d){d=Math.round(d);var y=Math.round(1e3/d),p="1 frame = "+d+" ms = "+y+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!sa){var g=v.measureText(p);sa=g.actualBoundingBoxAscent}v.fillText(p,0,sa);var m=60;v.strokeRect(0,sa+10,250,20),v.fillRect(0,sa+10,250*Math.min(y/m,1),20)}o||(l[r.SELECT_BOX]=!1)}};function io(t,e,r){var a=t.createShader(e);if(t.shaderSource(a,r),t.compileShader(a),!t.getShaderParameter(a,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(a));return a}function $p(t,e,r){var a=io(t,t.VERTEX_SHADER,e),n=io(t,t.FRAGMENT_SHADER,r),i=t.createProgram();if(t.attachShader(i,a),t.attachShader(i,n),t.linkProgram(i),!t.getProgramParameter(i,t.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function Gp(t,e,r){r===void 0&&(r=e);var a=t.makeOffscreenCanvas(e,r),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function Gi(t){var e=t.pixelRatio,r=t.cy.zoom(),a=t.cy.pan();return{zoom:r*e,pan:{x:a.x*e,y:a.y*e}}}function Kp(t,e,r,a,n){var i=a*r+e.x,s=n*r+e.y;return s=Math.round(t.canvasHeight-s),[i,s]}function Ja(t,e,r){var a=t[0]/255,n=t[1]/255,i=t[2]/255,s=e,o=r||new Array(4);return o[0]=a*s,o[1]=n*s,o[2]=i*s,o[3]=s,o}function ja(t,e){var r=e||new Array(4);return r[0]=(t>>0&255)/255,r[1]=(t>>8&255)/255,r[2]=(t>>16&255)/255,r[3]=(t>>24&255)/255,r}function Wp(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function Hp(t,e){var r=t.createTexture();return r.buffer=function(a){t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_NEAREST),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,a),t.generateMipmap(t.TEXTURE_2D),t.bindTexture(t.TEXTURE_2D,null)},r.deleteTexture=function(){t.deleteTexture(r)},r}function Hu(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function Uu(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function Up(t,e,r,a,n,i){switch(e){case t.FLOAT:return new Float32Array(r.buffer,i*a,n);case t.INT:return new Int32Array(r.buffer,i*a,n)}}function Xp(t,e,r,a){var n=Hu(t,e),i=Je(n,2),s=i[0],o=i[1],l=Uu(t,o,a),u=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,u),t.bufferData(t.ARRAY_BUFFER,l,t.STATIC_DRAW),o===t.FLOAT?t.vertexAttribPointer(r,s,o,!1,0,0):o===t.INT&&t.vertexAttribIPointer(r,s,o,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),u}function bt(t,e,r,a){var n=Hu(t,r),i=Je(n,3),s=i[0],o=i[1],l=i[2],u=Uu(t,o,e*s),v=s*l,f=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,f),t.bufferData(t.ARRAY_BUFFER,e*v,t.DYNAMIC_DRAW),t.enableVertexAttribArray(a),o===t.FLOAT?t.vertexAttribPointer(a,s,o,!1,v,0):o===t.INT&&t.vertexAttribIPointer(a,s,o,v,0),t.vertexAttribDivisor(a,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;hs&&(o=s/a,l=a*o,u=n*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(r,a,n){var i=this,s=this.atlasSize,o=this.rows,l=this.texHeight,u=this.getScale(a),v=u.scale,f=u.texW,c=u.texH,h=[null,null],d=function(b,w){if(n&&w){var T=w.context,E=b.x,x=b.row,S=E,C=l*x;T.save(),T.translate(S,C),T.scale(v,v),n(T,a),T.restore()}},y=function(){d(i.freePointer,i.canvas),h[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:c},h[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},p=function(){var b=i.scratch,w=i.canvas;b.clear(),d({x:0,row:0},b);var T=s-i.freePointer.x,E=f-T,x=l;{var S=i.freePointer.x,C=i.freePointer.row*l,P=T;w.context.drawImage(b,0,0,P,x,S,C,P,x),h[0]={x:S,y:C,w:P,h:c}}{var B=T,k=(i.freePointer.row+1)*l,R=E;w&&w.context.drawImage(b,B,0,R,x,0,k,R,x),h[1]={x:0,y:k,w:R,h:c}}i.freePointer.x=E,i.freePointer.row++},g=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)y();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(g(),y()):this.enableWrapping?p():(g(),y())}return this.keyToLocation.set(r,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(r){return this.keyToLocation.get(r)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(r){var a=this.atlasSize,n=this.rows,i=this.getScale(r),s=i.texW;return this.freePointer.x+s>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},n=a.forceRedraw,i=n===void 0?!1:n,s=a.filterEle,o=s===void 0?function(){return!0}:s,l=a.filterType,u=l===void 0?function(){return!0}:l,v=!1,f=wt(r),c;try{for(f.s();!(c=f.n()).done;){var h=c.value;if(o(h)){var d=h.id(),y=wt(this.getRenderTypes()),p;try{for(y.s();!(p=y.n()).done;){var g=p.value;if(u(g.type)){var m=g.getKey(h);i?(g.atlasCollection.deleteKey(d,m),g.atlasCollection.styleKeyNeedsRedraw.add(m),v=!0):v|=g.atlasCollection.checkKeyIsInvalid(d,m)}}}catch(b){y.e(b)}finally{y.f()}}}}catch(b){f.e(b)}finally{f.f()}return v}},{key:"gc",value:function(){var r=wt(this.getRenderTypes()),a;try{for(r.s();!(a=r.n()).done;){var n=a.value;n.atlasCollection.gc()}}catch(i){r.e(i)}finally{r.f()}}},{key:"isRenderable",value:function(r,a){var n=this.getRenderTypeOpts(a);return n&&n.isVisible(r)}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"getOrCreateAtlas",value:function(r,a,n){var i=this.renderTypes.get(n),s=i.getKey(r),o=r.id();return i.atlasCollection.draw(o,s,a,function(l){i.drawElement(l,r,a,!0,!0)})}},{key:"getAtlasIndexForBatch",value:function(r){var a=this.batchAtlases.indexOf(r);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)return;this.batchAtlases.push(r),a=this.batchAtlases.length-1}return a}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlases},function(r,a){return a})}},{key:"getAtlasInfo",value:function(r,a){var n=this.renderTypes.get(a),i=n.getBoundingBox(r),s=this.getOrCreateAtlas(r,i,a),o=this.getAtlasIndexForBatch(s);if(o!==void 0){var l=n.getKey(r),u=s.getOffsets(l),v=Je(u,2),f=v[0],c=v[1];return{atlasID:o,tex:f,tex1:f,tex2:c,bb:i,type:a,styleKey:l}}}},{key:"canAddToCurrentBatch",value:function(r,a){if(this.batchAtlases.length===this.maxAtlasesPerBatch){var n=this.renderTypes.get(a),i=n.getKey(r),s=n.atlasCollection.getAtlas(i);return s&&this.batchAtlases.includes(s)}return!0}},{key:"setTransformMatrix",value:function(r,a,n){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,s=a.bb,o=a.type,l=a.tex1,u=a.tex2,v=this.getRenderTypeOpts(o),f=v.getPadding?v.getPadding(n):0,c=l.w/(l.w+u.w);i||(c=1-c);var h=this.getAdjustedBB(s,f,i,c),d,y;Xu(r);var p=v.getRotation?v.getRotation(n):0;if(p!==0){var g=v.getRotationPoint(n),m=g.x,b=g.y;xn(r,r,[m,b]),Yu(r,r,p);var w=v.getRotationOffset(n);d=w.x+h.xOffset,y=w.y}else d=h.x1,y=h.y1;xn(r,r,[d,y]),Ki(r,r,[h.w,h.h])}},{key:"getTransformMatrix",value:function(r,a){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=ga();return this.setTransformMatrix(i,r,a,n),i}},{key:"getAdjustedBB",value:function(r,a,n,i){var s=r.x1,o=r.y1,l=r.w,u=r.h;a&&(s-=a,o-=a,l+=2*a,u+=2*a);var v=0,f=l*i;return n&&i<1?l=f:!n&&i<1&&(v=l-f,s+=v,l=f),{x1:s,y1:o,w:l,h:u,xOffset:v}}},{key:"getDebugInfo",value:function(){var r=[],a=wt(this.renderTypes),n;try{for(a.s();!(n=a.n()).done;){var i=Je(n.value,2),s=i[0],o=i[1],l=o.atlasCollection.getCounts(),u=l.keyCount,v=l.atlasCount;r.push({type:s,keyCount:u,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return r}}]),t}(),ei=0,oo=1,uo=2,ti=3,ty=function(){function t(e,r,a){or(this,t),this.r=e,this.gl=r,this.maxInstances=a.webglBatchSize,this.maxAtlases=a.webglTexPerBatch,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,a.enableWrapping=!0,a.createTextureCanvas=Gp,this.atlasManager=new ey(e,a),this.program=this.createShaderProgram(pa.SCREEN),this.pickingProgram=this.createShaderProgram(pa.PICKING),this.vao=this.createVAO(),this.debugInfo=[]}return ur(t,[{key:"addTextureRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(r,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"createShaderProgram",value:function(r){var a=this.gl,n=`#version 300 es - precision highp float; - - uniform mat3 uPanZoomMatrix; - uniform int uAtlasSize; - - // instanced - in vec2 aPosition; - - // what are we rendering? - in int aVertType; - - // for picking - in vec4 aIndex; - - // For textures - in int aAtlasId; // which shader unit/atlas to use - in vec4 aTex1; // x/y/w/h of texture in atlas - in vec4 aTex2; - - // for any transforms that are needed - in vec4 aScaleRotate1; // vectors use fewer attributes than matrices - in vec2 aTranslate1; - in vec4 aScaleRotate2; - in vec2 aTranslate2; - - // for edges - in vec4 aPointAPointB; - in vec4 aPointCPointD; - in float aLineWidth; - in vec4 aEdgeColor; - - out vec2 vTexCoord; - out vec4 vEdgeColor; - flat out int vAtlasId; - flat out vec4 vIndex; - flat out int vVertType; - - void main(void) { - int vid = gl_VertexID; - vec2 position = aPosition; - - if(aVertType == `.concat(ei,`) { - float texX; - float texY; - float texW; - float texH; - mat3 texMatrix; - - int vid = gl_VertexID; - if(vid <= 5) { - texX = aTex1.x; - texY = aTex1.y; - texW = aTex1.z; - texH = aTex1.w; - texMatrix = mat3( - vec3(aScaleRotate1.xy, 0.0), - vec3(aScaleRotate2.zw, 0.0), - vec3(aTranslate1, 1.0) - ); - } else { - texX = aTex2.x; - texY = aTex2.y; - texW = aTex2.z; - texH = aTex2.w; - texMatrix = mat3( - vec3(aScaleRotate2.xy, 0.0), - vec3(aScaleRotate2.zw, 0.0), - vec3(aTranslate2, 1.0) - ); - } - - if(vid == 1 || vid == 2 || vid == 4 || vid == 7 || vid == 8 || vid == 10) { - texX += texW; - } - if(vid == 2 || vid == 4 || vid == 5 || vid == 8 || vid == 10 || vid == 11) { - texY += texH; - } - - float d = float(uAtlasSize); - vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 - - gl_Position = vec4(uPanZoomMatrix * texMatrix * vec3(position, 1.0), 1.0); - } - else if(aVertType == `).concat(oo,` && vid < 6) { - vec2 source = aPointAPointB.xy; - vec2 target = aPointAPointB.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 xBasis = target - source; - vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); - vec2 point = source + xBasis * position.x + yBasis * aLineWidth * position.y; - - gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); - vEdgeColor = aEdgeColor; - } - else if(aVertType == `).concat(uo,` && vid < 6) { - vec2 pointA = aPointAPointB.xy; - vec2 pointB = aPointAPointB.zw; - vec2 pointC = aPointCPointD.xy; - vec2 pointD = aPointCPointD.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 p0 = pointA; - vec2 p1 = pointB; - vec2 p2 = pointC; - vec2 pos = position; - if(position.x == 1.0) { - p0 = pointD; - p1 = pointC; - p2 = pointB; - pos = vec2(0.0, -position.y); - } - - vec2 p01 = p1 - p0; - vec2 p12 = p2 - p1; - vec2 p21 = p1 - p2; - - // Find the normal vector. - vec2 tangent = normalize(normalize(p12) + normalize(p01)); - vec2 normal = vec2(-tangent.y, tangent.x); - - // Find the vector perpendicular to p0 -> p1. - vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); - - // Determine the bend direction. - float sigma = sign(dot(p01 + p21, normal)); - float width = aLineWidth; - - if(sign(pos.y) == -sigma) { - // This is an intersecting vertex. Adjust the position so that there's no overlap. - vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } else { - // This is a non-intersecting vertex. Treat it like a mitre join. - vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } - - vEdgeColor = aEdgeColor; - } - else if(aVertType == `).concat(ti,` && vid < 3) { - // massage the first triangle into an edge arrow - if(vid == 0) - position = vec2(-0.15, -0.3); - if(vid == 1) - position = vec2( 0.0, 0.0); - if(vid == 2) - position = vec2( 0.15, -0.3); - - mat3 transform = mat3( - vec3(aScaleRotate1.xy, 0.0), - vec3(aScaleRotate1.zw, 0.0), - vec3(aTranslate1, 1.0) - ); - gl_Position = vec4(uPanZoomMatrix * transform * vec3(position, 1.0), 1.0); - vEdgeColor = aEdgeColor; - } else { - gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space - } - - vAtlasId = aAtlasId; - vIndex = aIndex; - vVertType = aVertType; - } - `),i=this.atlasManager.getIndexArray(),s=`#version 300 es - precision highp float; - - // define texture unit for each node in the batch - `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` - `),` - - uniform vec4 uBGColor; - - in vec2 vTexCoord; - in vec4 vEdgeColor; - flat in int vAtlasId; - flat in vec4 vIndex; - flat in int vVertType; - - out vec4 outColor; - - void main(void) { - if(vVertType == `).concat(ei,`) { - `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` - else `),` - } else if(vVertType == `).concat(ti,`) { - // blend arrow color with background (using premultiplied alpha) - outColor.rgb = vEdgeColor.rgb + (uBGColor.rgb * (1.0 - vEdgeColor.a)); - outColor.a = 1.0; // make opaque, masks out line under arrow - } else { - outColor = vEdgeColor; - } - - `).concat(r.picking?`if(outColor.a == 0.0) discard; - else outColor = vIndex;`:"",` - } - `),o=$p(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex1=a.getAttribLocation(o,"aTex1"),o.aTex2=a.getAttribLocation(o,"aTex2"),o.aScaleRotate1=a.getAttribLocation(o,"aScaleRotate1"),o.aTranslate1=a.getAttribLocation(o,"aTranslate1"),o.aScaleRotate2=a.getAttribLocation(o,"aScaleRotate2"),o.aTranslate2=a.getAttribLocation(o,"aTranslate2"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aEdgeColor=a.getAttribLocation(o,"aEdgeColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uTextures=[];for(var l=0;l2&&arguments[2]!==void 0?arguments[2]:pa.SCREEN;this.panZoomMatrix=r,this.debugInfo=a,this.renderTarget=n,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.atlasManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"getTempMatrix",value:function(){return this.tempMatrix=this.tempMatrix||ga()}},{key:"drawTexture",value:function(r,a,n){var i=this.atlasManager;if(i.isRenderable(r,n)){i.canAddToCurrentBatch(r,n)||this.endBatch();var s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=ei;var o=this.indexBuffer.getView(s);ja(a,o);var l=i.getAtlasInfo(r,n,l),u=l.atlasID,v=l.tex1,f=l.tex2,c=this.atlasIdBuffer.getView(s);c[0]=u;var h=this.tex1Buffer.getView(s);h[0]=v.x,h[1]=v.y,h[2]=v.w,h[3]=v.h;var d=this.tex2Buffer.getView(s);d[0]=f.x,d[1]=f.y,d[2]=f.w,d[3]=f.h;for(var y=this.getTempMatrix(),p=0,g=[1,2];p=this.maxInstances&&this.endBatch()}}},{key:"drawEdgeArrow",value:function(r,a,n){var i=r._private.rscratch,s,o,l;if(n==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=r.pstyle(n+"-arrow-shape").value;if(u!=="none"){var v=r.pstyle(n+"-arrow-color").value,f=r.pstyle("opacity").value,c=r.pstyle("line-opacity").value,h=f*c,d=r.pstyle("width").pfValue,y=r.pstyle("arrow-scale").value,p=this.r.getArrowWidth(d,y),g=this.getTempMatrix();Xu(g),xn(g,g,[s,o]),Ki(g,g,[p,p]),Yu(g,g,l);var m=this.instanceCount;this.vertTypeBuffer.getView(m)[0]=ti;var b=this.indexBuffer.getView(m);ja(a,b);var w=this.edgeColorBuffer.getView(m);Ja(v,h,w);var T=this.scaleRotate1Buffer.getView(m);T[0]=g[0],T[1]=g[1],T[2]=g[3],T[3]=g[4];var E=this.translate1Buffer.getView(m);E[0]=g[6],E[1]=g[7],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(r,a){var n=r.pstyle("opacity").value,i=r.pstyle("line-opacity").value,s=r.pstyle("width").pfValue,o=r.pstyle("line-color").value,l=n*i,u=this.getEdgePoints(r);if(u.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),u.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=oo;var f=this.indexBuffer.getView(v);ja(a,f);var c=this.edgeColorBuffer.getView(v);Ja(o,l,c);var h=this.lineWidthBuffer.getView(v);h[0]=s;var d=this.pointAPointBBuffer.getView(v);d[0]=u[0],d[1]=u[1],d[2]=u[2],d[3]=u[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}},{key:"getEdgePoints",value:function(r){var a=r._private.rscratch,n=a.allpts;if(n.length==4)return n;var i=this.getNumSegments(r);return this.getCurveSegmentPoints(n,i)}},{key:"getNumSegments",value:function(r){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"getCurveSegmentPoints",value:function(r,a){if(r.length==4)return r;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=r[0],n[1]=r[1];else if(i==a)n[i*2]=r[r.length-2],n[i*2+1]=r[r.length-1];else{var s=i/a;this.setCurvePoint(r,s,n,i*2)}return n}},{key:"setCurvePoint",value:function(r,a,n,i){if(r.length<=2)n[i]=r[0],n[i+1]=r[1];else{for(var s=Array(r.length-2),o=0;o0}},{key:"getStyle",value:function(r,a){var n=a.pstyle("".concat(r,"-opacity")).value,i=a.pstyle("".concat(r,"-color")).value,s=a.pstyle("".concat(r,"-shape")).value;return{opacity:n,color:i,shape:s}}},{key:"getPadding",value:function(r,a){return a.pstyle("".concat(r,"-padding")).pfValue}},{key:"draw",value:function(r,a,n,i){if(this.isVisible(r,n)){var s=this.r,o=i.w,l=i.h,u=o/2,v=l/2,f=this.getStyle(r,n),c=f.shape,h=f.color,d=f.opacity;a.save(),a.fillStyle=lo(h,d),c==="round-rectangle"||c==="roundrectangle"?s.drawRoundRectanglePath(a,u,v,o,l,"auto"):c==="ellipse"&&s.drawEllipsePath(a,u,v,o,l),a.fill(),a.restore()}}}]),t}();function ay(t){var e=t&&t.style&&t.style.backgroundColor||"white";return xo(e)}var _u={};_u.initWebgl=function(t,e){var r=this,a=r.data.contexts[r.WEBGL],n=t.cy.container();t.bgColor=ay(n),t.webglTexSize=Math.min(t.webglTexSize,a.getParameter(a.MAX_TEXTURE_SIZE)),t.webglTexRows=Math.min(t.webglTexRows,54),t.webglBatchSize=Math.min(t.webglBatchSize,16384),t.webglTexPerBatch=Math.min(t.webglTexPerBatch,a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),r.webglDebug=t.webglDebug,r.webglDebugShowAtlases=t.webglDebugShowAtlases,console.log("max texture units",a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)),console.log("max texture size",a.getParameter(a.MAX_TEXTURE_SIZE)),console.log("webgl options",t),r.pickingFrameBuffer=Yp(a),r.pickingFrameBuffer.needsDraw=!0;var i=function(v){return r.getTextAngle(v,null)},s=function(v){var f=v.pstyle("label");return f&&f.value};r.eleDrawing=new ty(r,a,t);var o=new ry(r);r.eleDrawing.addTextureRenderType("node-body",oa({getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement,isVisible:function(v){return v.visible()}})),r.eleDrawing.addTextureRenderType("node-label",oa({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:i,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:s})),r.eleDrawing.addTextureRenderType("node-overlay",oa({getBoundingBox:e.getElementBox,getKey:function(v){return o.getStyleKey("overlay",v)},drawElement:function(v,f,c){return o.draw("overlay",v,f,c)},isVisible:function(v){return o.isVisible("overlay",v)},getPadding:function(v){return o.getPadding("overlay",v)}})),r.eleDrawing.addTextureRenderType("node-underlay",oa({getBoundingBox:e.getElementBox,getKey:function(v){return o.getStyleKey("underlay",v)},drawElement:function(v,f,c){return o.draw("underlay",v,f,c)},isVisible:function(v){return o.isVisible("underlay",v)},getPadding:function(v){return o.getPadding("underlay",v)}})),r.eleDrawing.addTextureRenderType("edge-label",oa({getKey:e.getLabelKey,getBoundingBox:e.getLabelBox,drawElement:e.drawLabel,getRotation:i,getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:s}));var l=Ra(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(u,v){var f=!1;v&&v.length>0&&(f|=r.eleDrawing.invalidate(v)),f&&l()}),ny(r)};function ny(t){{var e=t.render;t.render=function(i){i=i||{};var s=t.cy;t.webgl&&(s.zoom()>qu?(iy(t),e.call(t,i)):(sy(t),Qu(t,i,pa.SCREEN)))}}{var r=t.matchCanvasSize;t.matchCanvasSize=function(i){r.call(t,i),t.pickingFrameBuffer.setFramebufferAttachmentSizes(t.canvasWidth,t.canvasHeight),t.pickingFrameBuffer.needsDraw=!0}}t.findNearestElements=function(i,s,o,l){return cy(t,i,s)};{var a=t.invalidateCachedZSortedEles;t.invalidateCachedZSortedEles=function(){a.call(t),t.pickingFrameBuffer.needsDraw=!0}}{var n=t.notify;t.notify=function(i,s){n.call(t,i,s),i==="viewport"||i==="bounds"?t.pickingFrameBuffer.needsDraw=!0:i==="background"&&t.eleDrawing.invalidate(s,{type:"node-body"})}}}function iy(t){var e=t.data.contexts[t.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function sy(t){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,t.canvasWidth,t.canvasHeight),a.restore()};e(t.data.contexts[t.NODE]),e(t.data.contexts[t.DRAG])}function oy(t){var e=t.canvasWidth,r=t.canvasHeight,a=Gi(t),n=a.pan,i=a.zoom,s=ga();xn(s,s,[n.x,n.y]),Ki(s,s,[i,i]);var o=ga();Zp(o,e,r);var l=ga();return _p(l,o,s),l}function Zu(t,e){var r=t.canvasWidth,a=t.canvasHeight,n=Gi(t),i=n.pan,s=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,r,a),e.translate(i.x,i.y),e.scale(s,s)}function uy(t,e){t.drawSelectionRectangle(e,function(r){return Zu(t,r)})}function ly(t){var e=t.data.contexts[t.NODE];e.save(),Zu(t,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function vy(t){var e=function(n,i,s){for(var o=n.atlasManager.getRenderTypeOpts(i),l=t.data.contexts[t.NODE],u=.125,v=o.atlasCollection.atlases,f=0;f=0&&w.add(x)}return w}function cy(t,e,r){var a=fy(t,e,r),n=t.getCachedZSortedEles(),i,s,o=wt(a),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,v=n[u];if(!i&&v.isNode()&&(i=v),!s&&v.isEdge()&&(s=v),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function Qu(t,e,r){var a,n;t.webglDebug&&(n=[],a=performance.now());var i=t.eleDrawing,s=0;if(r.screen&&t.data.canvasNeedsRedraw[t.SELECT_BOX]&&uy(t,e),t.data.canvasNeedsRedraw[t.NODE]||r.picking){var o=function(k,R){R+=1,k.isNode()?(i.drawTexture(k,R,"node-underlay"),i.drawTexture(k,R,"node-body"),i.drawTexture(k,R,"node-label"),i.drawTexture(k,R,"node-overlay")):(i.drawEdgeLine(k,R),i.drawEdgeArrow(k,R,"source"),i.drawEdgeArrow(k,R,"target"),i.drawTexture(k,R,"edge-label"))},l=t.data.contexts[t.WEBGL];r.screen?(l.clearColor(0,0,0,0),l.enable(l.BLEND),l.blendFunc(l.ONE,l.ONE_MINUS_SRC_ALPHA)):l.disable(l.BLEND),l.clear(l.COLOR_BUFFER_BIT|l.DEPTH_BUFFER_BIT),l.viewport(0,0,l.canvas.width,l.canvas.height);var u=oy(t),v=t.getCachedZSortedEles();if(s=v.length,i.startFrame(u,n,r),r.screen){for(var f=0;f0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(t.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var y=e.pan(),p={x:y.x*u,y:y.y*u};u*=e.zoom(),h.translate(p.x,p.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-p.x,-p.y)}t.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=t.bg,h.rect(0,0,i,s),h.fill())}return c};function dy(t,e){for(var r=atob(t),a=new ArrayBuffer(r.length),n=new Uint8Array(a),i=0;i"u"?"undefined":Ue(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(t,e);else{var a=this.cy.window(),n=a.document;r=n.createElement("canvas"),r.width=t,r.height=e}return r};[Gu,qt,Yt,$i,Cr,Jr,dt,_u,vr,za,el].forEach(function(t){de(Te,t)});var py=[{name:"null",impl:Pu},{name:"base",impl:Fu},{name:"canvas",impl:hy}],yy=[{type:"layout",extensions:Jg},{type:"renderer",extensions:py}],rl={},al={};function nl(t,e,r){var a=r,n=function(S){Ae("Can not register `"+e+"` for `"+t+"` since `"+S+"` already exists in the prototype and can not be overridden")};if(t==="core"){if(ka.prototype[e])return n(e);ka.prototype[e]=r}else if(t==="collection"){if(rt.prototype[e])return n(e);rt.prototype[e]=r}else if(t==="layout"){for(var i=function(S){this.options=S,r.call(this,S),ke(this._private)||(this._private={}),this._private.cy=S.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(r.prototype),o=[],l=0;l{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const v=t.edge(l.v,l.w,l.name);i.info("Edge data",v,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,v,l.name),n.setEdge(l.v,l.w,v,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(v=>l.v===v.v&&l.w===v.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",p(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,p(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const v=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",p(e)),G(r,e,v,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:v}),i.warn("New graph after copy node: (",r,")",p(v)),i.debug("Old graph after copy",p(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",p(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),v=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const m=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX +import{_ as X,ar as F,as as Y,at as _,au as H,l as i,c as V,av as z,aw as U,af as $,ak as q,ag as P,ae as K,ax as Q,ay as W,az as Z}from"./md-index-B8Nim9kS.js";import{G as B}from"./md-graph-6STGQExD.js";import{l as I}from"./md-layout-C6gsB80Q.js";import{i as S}from"./md-_baseUniq-DU1ET3rn.js";import{c as L}from"./md-clone-ByE4h4D7.js";import{m as A}from"./md-_basePickBy-B78WwQFo.js";function p(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ee(e),edges:ne(e)};return S(e.graph())||(t.value=L(e.graph())),t}function ee(e){return A(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),c={v:t};return S(n)||(c.value=n),S(o)||(c.parent=o),c})}function ne(e){return A(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return S(t.name)||(o.name=t.name),S(n)||(o.value=n),o})}var f=new Map,b=new Map,J=new Map,te=X(()=>{b.clear(),J.clear(),f.clear()},"clear"),O=X((e,t)=>{const n=b.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=X((e,t)=>{const n=b.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||O(e.v,t)||O(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=X((e,t,n,o)=>{i.warn("Copying children of ",e,"root",o,"data",t.node(e),o);const c=t.children(e)||[];e!==o&&c.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",c),c.forEach(a=>{if(t.children(a).length>0)G(a,t,n,o);else{const r=t.node(a);i.info("cp ",a," to ",o," with parent ",e),n.setNode(a,r),o!==t.parent(a)&&(i.warn("Setting parent",a,t.parent(a)),n.setParent(a,t.parent(a))),e!==o&&a!==e?(i.debug("Setting parent",a,e),n.setParent(a,e)):(i.info("In copy ",e,"root",o,"data",t.node(e),o),i.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==o,"node!==clusterId",a!==e));const u=t.edges(a);i.debug("Copying Edges",u),u.forEach(l=>{i.info("Edge",l);const h=t.edge(l.v,l.w,l.name);i.info("Edge data",h,o);try{se(l,o)?(i.info("Copying as ",l.v,l.w,h,l.name),n.setEdge(l.v,l.w,h,l.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",o," clusterId:",e)}catch(C){i.error(C)}})}i.debug("Removing node",a),t.removeNode(a)})},"copy"),R=X((e,t)=>{const n=t.children(e);let o=[...n];for(const c of n)J.set(c,e),o=[...o,...R(c,t)];return o},"extractDescendants"),ie=X((e,t,n)=>{const o=e.edges().filter(l=>l.v===t||l.w===t),c=e.edges().filter(l=>l.v===n||l.w===n),a=o.map(l=>({v:l.v===t?n:l.v,w:l.w===t?t:l.w})),r=c.map(l=>({v:l.v,w:l.w}));return a.filter(l=>r.some(h=>l.v===h.v&&l.w===h.w))},"findCommonEdges"),D=X((e,t,n)=>{const o=t.children(e);if(i.trace("Searching children of id ",e,o),o.length<1)return e;let c;for(const a of o){const r=D(a,t,n),u=ie(t,n,r);if(r)if(u.length>0)c=r;else return r}return c},"findNonClusterChild"),k=X(e=>!f.has(e)||!f.get(e).externalConnections?e:f.has(e)?f.get(e).id:e,"getAnchorId"),re=X((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",D(n,e,n)),b.set(n,R(n,e)),f.set(n,{id:D(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const o=e.children(n),c=e.edges();o.length>0?(i.debug("Cluster identified",n,b),c.forEach(a=>{const r=O(a.v,n),u=O(a.w,n);r^u&&(i.warn("Edge: ",a," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",b.get(n)),f.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,b)});for(let n of f.keys()){const o=f.get(n).id,c=e.parent(o);c!==n&&f.has(c)&&!f.get(c).externalConnections&&(f.get(n).id=c)}e.edges().forEach(function(n){const o=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let c=n.v,a=n.w;if(i.warn("Fix XXX",f,"ids:",n.v,n.w,"Translating: ",f.get(n.v)," --- ",f.get(n.w)),f.get(n.v)||f.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),c=k(n.v),a=k(n.w),e.removeEdge(n.v,n.w,n.name),c!==n.v){const r=e.parent(c);f.get(r).externalConnections=!0,o.fromCluster=n.v}if(a!==n.w){const r=e.parent(a);f.get(r).externalConnections=!0,o.toCluster=n.w}i.warn("Fix Replacing with XXX",c,a,n.name),e.setEdge(c,a,o,n.name)}}),i.warn("Adjusted Graph",p(e)),T(e,0),i.trace(f)},"adjustClustersAndEdges"),T=X((e,t)=>{var c,a;if(i.warn("extractor - ",t,p(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),o=!1;for(const r of n){const u=e.children(r);o=o||u.length>0}if(!o){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,f,f.has(r)&&!f.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!f.has(r))i.debug("Not a cluster",r,t);else if(!f.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(c=f.get(r))==null?void 0:c.clusterData)!=null&&a.dir&&(l=f.get(r).clusterData.dir,i.warn("Fixing dir",f.get(r).clusterData.dir,l));const h=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",p(e)),G(r,e,h,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:f.get(r).clusterData,label:f.get(r).label,graph:h}),i.warn("New graph after copy node: (",r,")",p(h)),i.debug("Old graph after copy",p(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!f.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(f);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const u=e.node(r);i.warn(" Now next level",r,u),u!=null&&u.clusterNode&&T(u.graph,t+1)}},"extractor"),M=X((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(o=>{const c=e.children(o),a=M(e,c);n=[...n,...a]}),n},"sorter"),oe=X(e=>M(e,e.children()),"sortNodesByHierarchy"),j=X(async(e,t,n,o,c,a)=>{i.warn("Graph in recursive render:XAX",p(t),c);const r=t.graph().rankdir;i.trace("Dir in recursive render - dir:",r);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const l=u.insert("g").attr("class","clusters"),h=u.insert("g").attr("class","edgePaths"),C=u.insert("g").attr("class","edgeLabels"),g=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(d){const s=t.node(d);if(c!==void 0){const m=JSON.parse(JSON.stringify(c.clusterData));i.trace(`Setting data for parent cluster XXX Node.id = `,d,` data=`,m.height,` -Parent cluster`,c.height),t.setNode(c.id,m),t.parent(d)||(i.trace("Setting parent",d,c.id),t.setParent(d,c.id,m))}if(i.info("(Insert) Node XXX"+d+": "+JSON.stringify(t.node(d))),s!=null&&s.clusterNode){i.info("Cluster identified XBX",d,s.width,t.node(d));const{ranksep:m,nodesep:h}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:m+25,nodesep:h});const N=await j(g,s.graph,n,o,t.node(d),a),x=N.elem;z(s,x),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",d,"width",s.width,"height",s.height),U(x,s)}else t.children(d).length>0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const m=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,m)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(p(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(p(t)));let E=0,{subGraphTitleTotalMargin:y}=q(a);return await Promise.all(oe(t).map(async function(d){var m;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=y,t.node(s.parentId);const h=(s==null?void 0:s.padding)/2||0,N=((m=s==null?void 0:s.labelBBox)==null?void 0:m.height)||0,x=N-h||0;i.debug("OffsetY",x,"labelHeight",N,"halfPadding",h),await K(l,s),f.get(s.id).node=s}else{const h=t.node(s.parentId);s.y+=y/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",h,h==null?void 0:h.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=y/2);const m=t.node(d.v);var h=t.node(d.w);const N=Q(v,s,f,n,m,h,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(E=s.diff)}),i.warn("Returning from recursive render XAX",u,E),{elem:u,diff:E}},"recursiveRender"),ge=X(async(e,t)=>{var a,r,u,l,v,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(v=e.config)==null?void 0:v.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const w=g.start,E=w+"---"+w+"---1",y=w+"---"+w+"---2",d=n.node(w);n.setNode(E,{domId:E,id:E,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(E,d.parentId),n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,d.parentId);const s=structuredClone(g),m=structuredClone(g),h=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=w+"-cyclic-special-1",m.arrowTypeEnd="none",m.id=w+"-cyclic-special-mid",h.label="",d.isGroup&&(s.fromCluster=w,h.toCluster=w),h.id=w+"-cyclic-special-2",n.setEdge(w,E,s,w+"-cyclic-special-0"),n.setEdge(E,y,m,w+"-cyclic-special-1"),n.setEdge(y,w,h,w+"-cyc0?(i.trace("Cluster - the non recursive path XBX",d,s.id,s,s.width,"Graph:",t),i.trace(D(s.id,t)),f.set(s.id,{id:D(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",d,g,t.node(d),r),await $(g,t.node(d),{config:a,dir:r}))})),await X(async()=>{const d=t.edges().map(async function(s){const m=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",f,"ids:",s.v,s.w,"Translating: ",f.get(s.v),f.get(s.w)),await Z(C,m)});await Promise.all(d)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(p(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(p(t)));let E=0,{subGraphTitleTotalMargin:y}=q(a);return await Promise.all(oe(t).map(async function(d){var m;const s=t.node(d);if(i.info("Position XBX => "+d+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s!=null&&s.clusterNode)s.y+=y,i.info("A tainted cluster node XBX1",d,s.id,s.width,s.height,s.x,s.y,t.parent(d)),f.get(s.id).node=s,P(s);else if(t.children(d).length>0){i.info("A pure cluster node XBX1",d,s.id,s.x,s.y,s.width,s.height,t.parent(d)),s.height+=y,t.node(s.parentId);const v=(s==null?void 0:s.padding)/2||0,N=((m=s==null?void 0:s.labelBBox)==null?void 0:m.height)||0,x=N-v||0;i.debug("OffsetY",x,"labelHeight",N,"halfPadding",v),await K(l,s),f.get(s.id).node=s}else{const v=t.node(s.parentId);s.y+=y/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",v,v==null?void 0:v.offsetY,s),P(s)}})),t.edges().forEach(function(d){const s=t.edge(d);i.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=y/2);const m=t.node(d.v);var v=t.node(d.w);const N=Q(h,s,f,n,m,v,o);W(s,N)}),t.nodes().forEach(function(d){const s=t.node(d);i.info(d,s.type,s.diff),s.isGroup&&(E=s.diff)}),i.warn("Returning from recursive render XAX",u,E),{elem:u,diff:E}},"recursiveRender"),ge=X(async(e,t)=>{var a,r,u,l,h,C;const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:((a=e.config)==null?void 0:a.nodeSpacing)||((u=(r=e.config)==null?void 0:r.flowchart)==null?void 0:u.nodeSpacing)||e.nodeSpacing,ranksep:((l=e.config)==null?void 0:l.rankSpacing)||((C=(h=e.config)==null?void 0:h.flowchart)==null?void 0:C.rankSpacing)||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=t.select("g");F(o,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(g=>{n.setNode(g.id,{...g}),g.parentId&&n.setParent(g.id,g.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(g=>{if(g.start===g.end){const w=g.start,E=w+"---"+w+"---1",y=w+"---"+w+"---2",d=n.node(w);n.setNode(E,{domId:E,id:E,parentId:d.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(E,d.parentId),n.setNode(y,{domId:y,id:y,parentId:d.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(y,d.parentId);const s=structuredClone(g),m=structuredClone(g),v=structuredClone(g);s.label="",s.arrowTypeEnd="none",s.id=w+"-cyclic-special-1",m.arrowTypeEnd="none",m.id=w+"-cyclic-special-mid",v.label="",d.isGroup&&(s.fromCluster=w,v.toCluster=w),v.id=w+"-cyclic-special-2",n.setEdge(w,E,s,w+"-cyclic-special-0"),n.setEdge(E,y,m,w+"-cyclic-special-1"),n.setEdge(y,w,v,w+"-cyc{const t=v({...L,..._().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),G=n(()=>m.packet,"getPacket"),I=n(t=>{t.length>0&&m.packet.push(t)},"pushWord"),M=n(()=>{E(),m=structuredClone(C)},"clear"),h={pushWord:I,getPacket:G,getConfig:Y,clear:M,setAccTitle:W,getAccTitle:P,setDiagramTitle:z,getDiagramTitle:F,getAccDescription:S,setAccDescription:B},O=1e4,H=n(t=>{w(t,h);let e=-1,o=[],s=1;const{bitsPerRow:i}=h.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),R={parse:n(async t=>{const e=await N("packet",t);x.debug(e),H(e)},"parse")},U=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=D(e);f.attr("viewbox",`0 0 ${k} ${d}`),T(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())X(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),X=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),j={draw:U},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=v(q,t);return` + .packetByte { + font-size: ${e.byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `},"styles"),rt={parser:R,db:h,renderer:j,styles:J};export{rt as diagram}; diff --git a/static/js/md-diagram-QW4FP2JN-m9wnasb9.js b/static/js/md-diagram-QW4FP2JN-m9wnasb9.js deleted file mode 100644 index 7a4ee1682..000000000 --- a/static/js/md-diagram-QW4FP2JN-m9wnasb9.js +++ /dev/null @@ -1,24 +0,0 @@ -import{p as w}from"./md-chunk-TMUBEWPD-BBh5DnEp.js";import{B,s as S,g as F,p as z,q as P,b as W,c as D,_ as n,l as x,C as v,D as T,v as _,G as A,k as E}from"./md-index-BVqvVggs.js";import{p as N}from"./md-gitGraph-YCYPL57B-ClKbk6IU.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";import"./md-clone-DXToIaWo.js";var C={packet:[]},m=structuredClone(C),L=B.packet,Y=n(()=>{const t=v({...L,...T().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),G=n(()=>m.packet,"getPacket"),I=n(t=>{t.length>0&&m.packet.push(t)},"pushWord"),M=n(()=>{_(),m=structuredClone(C)},"clear"),h={pushWord:I,getPacket:G,getConfig:Y,clear:M,setAccTitle:S,getAccTitle:F,setDiagramTitle:z,getDiagramTitle:P,getAccDescription:W,setAccDescription:D},O=1e4,q=n(t=>{w(t,h);let e=-1,o=[],s=1;const{bitsPerRow:i}=h.getConfig();for(let{start:a,end:r,label:p}of t.blocks){if(r&&r{if(t.end===void 0&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*o?[t,void 0]:[{start:t.start,end:e*o-1,label:t.label},{start:e*o,end:t.end,label:t.label}]},"getNextFittingBlock"),K={parse:n(async t=>{const e=await N("packet",t);x.debug(e),q(e)},"parse")},R=n((t,e,o,s)=>{const i=s.db,a=i.getConfig(),{rowHeight:r,paddingY:p,bitWidth:b,bitsPerRow:c}=a,u=i.getPacket(),l=i.getDiagramTitle(),g=r+p,d=g*(u.length+1)-(l?0:r),k=b*c+2,f=A(e);f.attr("viewbox",`0 0 ${k} ${d}`),E(f,d,k,a.useMaxWidth);for(const[$,y]of u.entries())U(f,y,$,a);f.append("text").text(l).attr("x",k/2).attr("y",d-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),U=n((t,e,o,{rowHeight:s,paddingX:i,paddingY:a,bitWidth:r,bitsPerRow:p,showBits:b})=>{const c=t.append("g"),u=o*(s+a)+a;for(const l of e){const g=l.start%p*r+1,d=(l.end-l.start+1)*r-i;if(c.append("rect").attr("x",g).attr("y",u).attr("width",d).attr("height",s).attr("class","packetBlock"),c.append("text").attr("x",g+d/2).attr("y",u+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(l.label),!b)continue;const k=l.end===l.start,f=u-2;c.append("text").attr("x",g+(k?d/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(l.start),k||c.append("text").attr("x",g+d).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(l.end)}},"drawWord"),X={draw:R},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},J=n(({packet:t}={})=>{const e=v(j,t);return` - .packetByte { - font-size: ${e.byteFontSize}; - } - .packetByte.start { - fill: ${e.startByteColor}; - } - .packetByte.end { - fill: ${e.endByteColor}; - } - .packetLabel { - fill: ${e.labelColor}; - font-size: ${e.labelFontSize}; - } - .packetTitle { - fill: ${e.titleColor}; - font-size: ${e.titleFontSize}; - } - .packetBlock { - stroke: ${e.blockStrokeColor}; - stroke-width: ${e.blockStrokeWidth}; - fill: ${e.blockFillColor}; - } - `},"styles"),rt={parser:K,db:h,renderer:X,styles:J};export{rt as diagram}; diff --git a/static/js/md-erDiagram-6RL3IURR-Zyah6us3.js b/static/js/md-erDiagram-6RL3IURR-B67nCv3Q.js similarity index 97% rename from static/js/md-erDiagram-6RL3IURR-Zyah6us3.js rename to static/js/md-erDiagram-6RL3IURR-B67nCv3Q.js index 0f59e07f6..355c8459f 100644 --- a/static/js/md-erDiagram-6RL3IURR-Zyah6us3.js +++ b/static/js/md-erDiagram-6RL3IURR-B67nCv3Q.js @@ -1,9 +1,9 @@ -import{_ as u,d as U,s as kt,g as xt,c as Rt,b as Ot,p as bt,q as Nt,l as X,v as Tt,j as at,u as At,k as Mt,K as vt,Q as St,P as wt}from"./md-index-BVqvVggs.js";import{G as It}from"./md-graph-BfdmZmeA.js";import{l as Dt}from"./md-layout-BErqkM37.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";const Lt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bt(t){return typeof t=="string"&&Lt.test(t)}const v=[];for(let t=0;t<256;++t)v.push((t+256).toString(16).slice(1));function Ct(t,e=0){return v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]}function Pt(t){if(!Bt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Yt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ht(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const y=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=k,k=m,m=it(g,30)>>>0,g=h,h=b}r[0]=r[0]+h>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const zt=Wt("v5",80,Ht);var nt=function(){var t=u(function(w,i,n,l){for(n=n||{},l=w.length;l--;n[w[l]]=i);return n},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],f=[1,11],c=[1,12],_=[1,13],y=[1,14],o=[1,15],h=[1,21],g=[1,22],m=[1,23],k=[1,24],x=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],O=[1,34],b=[27,28,46,47],Y=[41,42,43,44,45],Z=[17,34],F=[1,54],M=[1,53],S=[17,34,36,38],N={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:u(function(i,n,l,d,E,a,V){var s=a.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(a[s-4]),d.addEntity(a[s-2]),d.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:d.addEntity(a[s-3]),d.addAttributes(a[s-3],a[s-1]);break;case 10:d.addEntity(a[s-2]);break;case 11:d.addEntity(a[s]);break;case 12:d.addEntity(a[s-6],a[s-4]),d.addAttributes(a[s-6],a[s-1]);break;case 13:d.addEntity(a[s-5],a[s-3]);break;case 14:d.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:g,43:m,44:k,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:y,28:o},{16:30,17:[1,31],29:32,30:33,34:O},{11:35,27:y,28:o},{40:36,46:[1,37],47:[1,38]},t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),t(b,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:O},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:g,43:m,44:k,45:x},t(Y,[2,39]),t(Y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(Z,[2,23],{32:50,33:51,35:52,37:F,38:M}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(Z,[2,24],{33:56,36:[1,57],38:M}),t(Z,[2,25]),t(S,[2,29]),t(Z,[2,32]),t(S,[2,31]),{16:58,17:[1,59],29:32,30:33,34:O},t(Z,[2,26]),{35:60,37:F},{17:[1,61]},t(e,[2,13]),t(S,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:u(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:u(function(i){var n=this,l=[0],d=[],E=[null],a=[],V=this.table,s="",j=0,lt=0,_t=2,ct=1,Et=a.slice.call(arguments,1),A=Object.create(this.lexer),H={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(H.yy[$]=this.yy[$]);A.setInput(i,H.yy),H.yy.lexer=A,H.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var tt=A.yylloc;a.push(tt);var gt=A.options&&A.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mt(D){l.length=l.length-2*D,E.length=E.length-D,a.length=a.length-D}u(mt,"popStack");function ht(){var D;return D=d.pop()||A.lex()||ct,typeof D!="number"&&(D instanceof Array&&(d=D,D=d.pop()),D=n.symbols_[D]||D),D}u(ht,"lex");for(var I,z,B,et,G={},q,W,dt,J;;){if(z=l[l.length-1],this.defaultActions[z]?B=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=ht()),B=V[z]&&V[z][I]),typeof B>"u"||!B.length||!B[0]){var rt="";J=[];for(q in V[z])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");A.showPosition?rt="Parse error on line "+(j+1)+`: +import{_ as u,n as kt,o as xt,g as Rt,s as Ot,a as bt,b as Nt,c as U,l as X,d as at,u as Tt,e as At,v as Mt,K as vt,Q as St,P as wt}from"./md-index-B8Nim9kS.js";import{G as It}from"./md-graph-6STGQExD.js";import{l as Dt}from"./md-layout-C6gsB80Q.js";import"./md-_baseUniq-DU1ET3rn.js";import"./md-_basePickBy-B78WwQFo.js";const Lt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Bt(t){return typeof t=="string"&&Lt.test(t)}const v=[];for(let t=0;t<256;++t)v.push((t+256).toString(16).slice(1));function Ct(t,e=0){return v[t[e+0]]+v[t[e+1]]+v[t[e+2]]+v[t[e+3]]+"-"+v[t[e+4]]+v[t[e+5]]+"-"+v[t[e+6]]+v[t[e+7]]+"-"+v[t[e+8]]+v[t[e+9]]+"-"+v[t[e+10]]+v[t[e+11]]+v[t[e+12]]+v[t[e+13]]+v[t[e+14]]+v[t[e+15]]}function Pt(t){if(!Bt(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}function Yt(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>32-e}function Ht(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const y=unescape(encodeURIComponent(t));t=[];for(let o=0;o>>0;x=k,k=m,m=it(g,30)>>>0,g=h,h=b}r[0]=r[0]+h>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+m>>>0,r[3]=r[3]+k>>>0,r[4]=r[4]+x>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}const zt=Wt("v5",80,Ht);var nt=function(){var t=u(function(w,i,n,l){for(n=n||{},l=w.length;l--;n[w[l]]=i);return n},"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],f=[1,11],c=[1,12],_=[1,13],y=[1,14],o=[1,15],h=[1,21],g=[1,22],m=[1,23],k=[1,24],x=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],O=[1,34],b=[27,28,46,47],Y=[41,42,43,44,45],Z=[17,34],F=[1,54],M=[1,53],S=[17,34,36,38],N={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:u(function(i,n,l,d,E,a,V){var s=a.length-1;switch(E){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:d.addEntity(a[s-4]),d.addEntity(a[s-2]),d.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:d.addEntity(a[s-3]),d.addAttributes(a[s-3],a[s-1]);break;case 10:d.addEntity(a[s-2]);break;case 11:d.addEntity(a[s]);break;case 12:d.addEntity(a[s-6],a[s-4]),d.addAttributes(a[s-6],a[s-1]);break;case 13:d.addEntity(a[s-5],a[s-3]);break;case 14:d.addEntity(a[s-3],a[s-1]);break;case 15:case 16:this.$=a[s].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),d.setAccDescription(this.$);break;case 19:case 43:this.$=a[s];break;case 20:case 41:case 42:this.$=a[s].replace(/"/g,"");break;case 21:case 29:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyTypeList:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyTypeList:a[s-1],attributeComment:a[s]};break;case 27:case 28:case 31:this.$=a[s];break;case 30:a[s-2].push(a[s]),this.$=a[s-2];break;case 32:this.$=a[s].replace(/"/g,"");break;case 33:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 34:this.$=d.Cardinality.ZERO_OR_ONE;break;case 35:this.$=d.Cardinality.ZERO_OR_MORE;break;case 36:this.$=d.Cardinality.ONE_OR_MORE;break;case 37:this.$=d.Cardinality.ONLY_ONE;break;case 38:this.$=d.Cardinality.MD_PARENT;break;case 39:this.$=d.Identification.NON_IDENTIFYING;break;case 40:this.$=d.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:f,24:c,26:_,27:y,28:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:h,42:g,43:m,44:k,45:x}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:y,28:o},{16:30,17:[1,31],29:32,30:33,34:O},{11:35,27:y,28:o},{40:36,46:[1,37],47:[1,38]},t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(b,[2,37]),t(b,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:O},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:h,42:g,43:m,44:k,45:x},t(Y,[2,39]),t(Y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(Z,[2,23],{32:50,33:51,35:52,37:F,38:M}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(Z,[2,24],{33:56,36:[1,57],38:M}),t(Z,[2,25]),t(S,[2,29]),t(Z,[2,32]),t(S,[2,31]),{16:58,17:[1,59],29:32,30:33,34:O},t(Z,[2,26]),{35:60,37:F},{17:[1,61]},t(e,[2,13]),t(S,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:u(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:u(function(i){var n=this,l=[0],d=[],E=[null],a=[],V=this.table,s="",j=0,lt=0,_t=2,ct=1,Et=a.slice.call(arguments,1),A=Object.create(this.lexer),H={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(H.yy[$]=this.yy[$]);A.setInput(i,H.yy),H.yy.lexer=A,H.yy.parser=this,typeof A.yylloc>"u"&&(A.yylloc={});var tt=A.yylloc;a.push(tt);var gt=A.options&&A.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function mt(D){l.length=l.length-2*D,E.length=E.length-D,a.length=a.length-D}u(mt,"popStack");function ht(){var D;return D=d.pop()||A.lex()||ct,typeof D!="number"&&(D instanceof Array&&(d=D,D=d.pop()),D=n.symbols_[D]||D),D}u(ht,"lex");for(var I,z,B,et,G={},q,W,dt,J;;){if(z=l[l.length-1],this.defaultActions[z]?B=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=ht()),B=V[z]&&V[z][I]),typeof B>"u"||!B.length||!B[0]){var rt="";J=[];for(q in V[z])this.terminals_[q]&&q>_t&&J.push("'"+this.terminals_[q]+"'");A.showPosition?rt="Parse error on line "+(j+1)+`: `+A.showPosition()+` Expecting `+J.join(", ")+", got '"+(this.terminals_[I]||I)+"'":rt="Parse error on line "+(j+1)+": Unexpected "+(I==ct?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(rt,{text:A.match,token:this.terminals_[I]||I,line:A.yylineno,loc:tt,expected:J})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(B[0]){case 1:l.push(I),E.push(A.yytext),a.push(A.yylloc),l.push(B[1]),I=null,lt=A.yyleng,s=A.yytext,j=A.yylineno,tt=A.yylloc;break;case 2:if(W=this.productions_[B[1]][1],G.$=E[E.length-W],G._$={first_line:a[a.length-(W||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(W||1)].first_column,last_column:a[a.length-1].last_column},gt&&(G._$.range=[a[a.length-(W||1)].range[0],a[a.length-1].range[1]]),et=this.performAction.apply(G,[s,lt,j,H.yy,B[1],E,a].concat(Et)),typeof et<"u")return et;W&&(l=l.slice(0,-1*W*2),E=E.slice(0,-1*W),a=a.slice(0,-1*W)),l.push(this.productions_[B[1]][0]),E.push(G.$),a.push(G._$),dt=V[l[l.length-2]][l[l.length-1]],l.push(dt);break;case 3:return!0}}return!0},"parse")},T=function(){var w={EOF:1,parseError:u(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:u(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:u(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(i){this.unput(this.match.slice(i))},"less"),pastInput:u(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` `+n+"^"},"showPosition"),test_match:u(function(i,n){var l,d,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var a in E)this[a]=E[a];return!1}return!1},"test_match"),next:u(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,l,d;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),a=0;an[0].length)){if(n=l,d=a,this.options.backtrack_lexer){if(i=this.test_match(l,E[a]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,E[d]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var n=this.next();return n||this.lex()},"lex"),begin:u(function(n){this.conditionStack.push(n)},"begin"),popState:u(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:u(function(n){this.begin(n)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(n,l,d,E){switch(d){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return l.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return l.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return w}();N.lexer=T;function L(){this.yy={}}return u(L,"Parser"),L.prototype=N,N.Parser=L,new L}();nt.parser=nt;var Kt=nt,K=new Map,ot=[],Gt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Vt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},ft=u(function(t,e=void 0){return K.has(t)?!K.get(t).alias&&e&&(K.get(t).alias=e,X.info(`Add alias '${e}' to entity '${t}'`)):(K.set(t,{attributes:[],alias:e}),X.info("Added new entity :",t)),K.get(t)},"addEntity"),Xt=u(()=>K,"getEntities"),Qt=u(function(t,e){let r=ft(t),f;for(f=e.length-1;f>=0;f--)r.attributes.push(e[f]),X.debug("Added attribute ",e[f].attributeName)},"addAttributes"),jt=u(function(t,e,r,f){let c={entityA:t,roleA:e,entityB:r,relSpec:f};ot.push(c),X.debug("Added new relationship :",c)},"addRelationship"),qt=u(()=>ot,"getRelationships"),Jt=u(function(){K=new Map,ot=[],Tt()},"clear"),$t={Cardinality:Gt,Identification:Vt,getConfig:u(()=>U().er,"getConfig"),addEntity:ft,addAttributes:Qt,getEntities:Xt,addRelationship:jt,getRelationships:qt,clear:Jt,setAccTitle:kt,getAccTitle:xt,setAccDescription:Rt,getAccDescription:Ot,setDiagramTitle:bt,getDiagramTitle:Nt},C={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},te=u(function(t,e){let r;t.append("defs").append("marker").attr("id",C.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",C.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),P={ERMarkers:C,insertMarkers:te},ee=/[^\dA-Za-z](\W)*/g,R={},Q=new Map,re=u(function(t){const e=Object.keys(t);for(const r of e)R[r]=t[r]},"setConf"),ae=u((t,e,r)=>{const f=R.entityPadding/3,c=R.entityPadding/3,_=R.fontSize*.85,y=e.node().getBBox(),o=[];let h=!1,g=!1,m=0,k=0,x=0,p=0,O=y.height+f*2,b=1;r.forEach(M=>{M.attributeKeyTypeList!==void 0&&M.attributeKeyTypeList.length>0&&(h=!0),M.attributeComment!==void 0&&(g=!0)}),r.forEach(M=>{const S=`${e.node().id}-attr-${b}`;let N=0;const T=wt(M.attributeType),L=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(T),w=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeName),i={};i.tn=L,i.nn=w;const n=L.node().getBBox(),l=w.node().getBBox();if(m=Math.max(m,n.width),k=Math.max(k,l.width),N=Math.max(n.height,l.height),h){const d=M.attributeKeyTypeList!==void 0?M.attributeKeyTypeList.join(","):"",E=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(d);i.kn=E;const a=E.node().getBBox();x=Math.max(x,a.width),N=Math.max(N,a.height)}if(g){const d=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeComment||"");i.cn=d;const E=d.node().getBBox();p=Math.max(p,E.width),N=Math.max(N,E.height)}i.height=N,o.push(i),O+=N+f*2,b+=1});let Y=4;h&&(Y+=2),g&&(Y+=2);const Z=m+k+x+p,F={width:Math.max(R.minEntityWidth,Math.max(y.width+R.entityPadding*2,Z+c*Y)),height:r.length>0?O:Math.max(R.minEntityHeight,y.height+R.entityPadding*2)};if(r.length>0){const M=Math.max(0,(F.width-Z-c*Y)/(Y/2));e.attr("transform","translate("+F.width/2+","+(f+y.height/2)+")");let S=y.height+f*2,N="attributeBoxOdd";o.forEach(T=>{const L=S+f+T.height/2;T.tn.attr("transform","translate("+c+","+L+")");const w=t.insert("rect","#"+T.tn.node().id).classed(`er ${N}`,!0).attr("x",0).attr("y",S).attr("width",m+c*2+M).attr("height",T.height+f*2),i=parseFloat(w.attr("x"))+parseFloat(w.attr("width"));T.nn.attr("transform","translate("+(i+c)+","+L+")");const n=t.insert("rect","#"+T.nn.node().id).classed(`er ${N}`,!0).attr("x",i).attr("y",S).attr("width",k+c*2+M).attr("height",T.height+f*2);let l=parseFloat(n.attr("x"))+parseFloat(n.attr("width"));if(h){T.kn.attr("transform","translate("+(l+c)+","+L+")");const d=t.insert("rect","#"+T.kn.node().id).classed(`er ${N}`,!0).attr("x",l).attr("y",S).attr("width",x+c*2+M).attr("height",T.height+f*2);l=parseFloat(d.attr("x"))+parseFloat(d.attr("width"))}g&&(T.cn.attr("transform","translate("+(l+c)+","+L+")"),t.insert("rect","#"+T.cn.node().id).classed(`er ${N}`,"true").attr("x",l).attr("y",S).attr("width",p+c*2+M).attr("height",T.height+f*2)),S+=T.height+f*2,N=N==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else F.height=Math.max(R.minEntityHeight,O),e.attr("transform","translate("+F.width/2+","+F.height/2+")");return F},"drawAttributes"),ie=u(function(t,e,r){const f=[...e.keys()];let c;return f.forEach(function(_){const y=pt(_,"entity");Q.set(_,y);const o=t.append("g").attr("id",y);c=c===void 0?y:c;const h="text-"+y,g=o.append("text").classed("er entityLabel",!0).attr("id",h).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px").text(e.get(_).alias??_),{width:m,height:k}=ae(o,g,e.get(_).attributes),p=o.insert("rect","#"+h).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",m).attr("height",k).node().getBBox();r.setNode(y,{width:p.width,height:p.height,shape:"rect",id:y})}),c},"drawEntities"),ne=u(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),yt=u(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),se=u(function(t,e){return t.forEach(function(r){e.setEdge(Q.get(r.entityA),Q.get(r.entityB),{relationship:r},yt(r))}),t},"addRelationships"),ut=0,oe=u(function(t,e,r,f,c){ut++;const _=r.edge(Q.get(e.entityA),Q.get(e.entityB),yt(e)),y=vt().x(function(b){return b.x}).y(function(b){return b.y}).curve(St),o=t.insert("path","#"+f).classed("er relationshipLine",!0).attr("d",y(_.points)).style("stroke",R.stroke).style("fill","none");e.relSpec.relType===c.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let h="";switch(R.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_END+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_END+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_END+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONLY_ONE_END+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+h+"#"+P.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_START+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_START+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_START+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONLY_ONE_START+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+h+"#"+P.ERMarkers.MD_PARENT_START+")");break}const g=o.node().getTotalLength(),m=o.node().getPointAtLength(g*.5),k="rel"+ut,x=e.roleA.split(/
/g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",k).attr("x",m.x).attr("y",m.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px");if(x.length==1)p.text(e.roleA);else{const b=-(x.length-1)*.5;x.forEach((Y,Z)=>{p.append("tspan").attr("x",m.x).attr("dy",`${Z===0?b:1}em`).text(Y)})}const O=p.node().getBBox();t.insert("rect","#"+k).classed("er relationshipLabelBox",!0).attr("x",m.x-O.width/2).attr("y",m.y-O.height/2).attr("width",O.width).attr("height",O.height)},"drawRelationshipFromLayout"),le=u(function(t,e,r,f){R=U().er,X.info("Drawing ER diagram");const c=U().securityLevel;let _;c==="sandbox"&&(_=at("#i"+e));const o=(c==="sandbox"?at(_.nodes()[0].contentDocument.body):at("body")).select(`[id='${e}']`);P.insertMarkers(o,R);let h;h=new It({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const g=ie(o,f.db.getEntities(),h),m=se(f.db.getRelationships(),h);Dt(h),ne(o,h),m.forEach(function(b){oe(o,b,h,g,f)});const k=R.diagramPadding;At.insertTitle(o,"entityTitleText",R.titleTopMargin,f.db.getDiagramTitle());const x=o.node().getBBox(),p=x.width+k*2,O=x.height+k*2;Mt(o,O,p,R.useMaxWidth),o.attr("viewBox",`${x.x-k} ${x.y-k} ${p} ${O}`)},"draw"),ce="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function pt(t="",e=""){const r=t.replace(ee,"");return`${st(e)}${st(r)}${zt(t,ce)}`}u(pt,"generateId");function st(t=""){return t.length>0?`${t}-`:""}u(st,"strWithHyphen");var he={setConf:re,draw:le},de=u(t=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u(function(){var n=this.next();return n||this.lex()},"lex"),begin:u(function(n){this.conditionStack.push(n)},"begin"),popState:u(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:u(function(n){this.begin(n)},"pushState"),stateStackSize:u(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u(function(n,l,d,E){switch(d){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return l.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return l.yytext[0];case 55:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}};return w}();N.lexer=T;function L(){this.yy={}}return u(L,"Parser"),L.prototype=N,N.Parser=L,new L}();nt.parser=nt;var Kt=nt,K=new Map,ot=[],Gt={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Vt={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},ft=u(function(t,e=void 0){return K.has(t)?!K.get(t).alias&&e&&(K.get(t).alias=e,X.info(`Add alias '${e}' to entity '${t}'`)):(K.set(t,{attributes:[],alias:e}),X.info("Added new entity :",t)),K.get(t)},"addEntity"),Xt=u(()=>K,"getEntities"),Qt=u(function(t,e){let r=ft(t),f;for(f=e.length-1;f>=0;f--)r.attributes.push(e[f]),X.debug("Added attribute ",e[f].attributeName)},"addAttributes"),jt=u(function(t,e,r,f){let c={entityA:t,roleA:e,entityB:r,relSpec:f};ot.push(c),X.debug("Added new relationship :",c)},"addRelationship"),qt=u(()=>ot,"getRelationships"),Jt=u(function(){K=new Map,ot=[],Mt()},"clear"),$t={Cardinality:Gt,Identification:Vt,getConfig:u(()=>U().er,"getConfig"),addEntity:ft,addAttributes:Qt,getEntities:Xt,addRelationship:jt,getRelationships:qt,clear:Jt,setAccTitle:Nt,getAccTitle:bt,setAccDescription:Ot,getAccDescription:Rt,setDiagramTitle:xt,getDiagramTitle:kt},C={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},te=u(function(t,e){let r;t.append("defs").append("marker").attr("id",C.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",C.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",C.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",C.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",C.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),P={ERMarkers:C,insertMarkers:te},ee=/[^\dA-Za-z](\W)*/g,R={},Q=new Map,re=u(function(t){const e=Object.keys(t);for(const r of e)R[r]=t[r]},"setConf"),ae=u((t,e,r)=>{const f=R.entityPadding/3,c=R.entityPadding/3,_=R.fontSize*.85,y=e.node().getBBox(),o=[];let h=!1,g=!1,m=0,k=0,x=0,p=0,O=y.height+f*2,b=1;r.forEach(M=>{M.attributeKeyTypeList!==void 0&&M.attributeKeyTypeList.length>0&&(h=!0),M.attributeComment!==void 0&&(g=!0)}),r.forEach(M=>{const S=`${e.node().id}-attr-${b}`;let N=0;const T=wt(M.attributeType),L=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(T),w=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeName),i={};i.tn=L,i.nn=w;const n=L.node().getBBox(),l=w.node().getBBox();if(m=Math.max(m,n.width),k=Math.max(k,l.width),N=Math.max(n.height,l.height),h){const d=M.attributeKeyTypeList!==void 0?M.attributeKeyTypeList.join(","):"",E=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(d);i.kn=E;const a=E.node().getBBox();x=Math.max(x,a.width),N=Math.max(N,a.height)}if(g){const d=t.append("text").classed("er entityLabel",!0).attr("id",`${S}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",U().fontFamily).style("font-size",_+"px").text(M.attributeComment||"");i.cn=d;const E=d.node().getBBox();p=Math.max(p,E.width),N=Math.max(N,E.height)}i.height=N,o.push(i),O+=N+f*2,b+=1});let Y=4;h&&(Y+=2),g&&(Y+=2);const Z=m+k+x+p,F={width:Math.max(R.minEntityWidth,Math.max(y.width+R.entityPadding*2,Z+c*Y)),height:r.length>0?O:Math.max(R.minEntityHeight,y.height+R.entityPadding*2)};if(r.length>0){const M=Math.max(0,(F.width-Z-c*Y)/(Y/2));e.attr("transform","translate("+F.width/2+","+(f+y.height/2)+")");let S=y.height+f*2,N="attributeBoxOdd";o.forEach(T=>{const L=S+f+T.height/2;T.tn.attr("transform","translate("+c+","+L+")");const w=t.insert("rect","#"+T.tn.node().id).classed(`er ${N}`,!0).attr("x",0).attr("y",S).attr("width",m+c*2+M).attr("height",T.height+f*2),i=parseFloat(w.attr("x"))+parseFloat(w.attr("width"));T.nn.attr("transform","translate("+(i+c)+","+L+")");const n=t.insert("rect","#"+T.nn.node().id).classed(`er ${N}`,!0).attr("x",i).attr("y",S).attr("width",k+c*2+M).attr("height",T.height+f*2);let l=parseFloat(n.attr("x"))+parseFloat(n.attr("width"));if(h){T.kn.attr("transform","translate("+(l+c)+","+L+")");const d=t.insert("rect","#"+T.kn.node().id).classed(`er ${N}`,!0).attr("x",l).attr("y",S).attr("width",x+c*2+M).attr("height",T.height+f*2);l=parseFloat(d.attr("x"))+parseFloat(d.attr("width"))}g&&(T.cn.attr("transform","translate("+(l+c)+","+L+")"),t.insert("rect","#"+T.cn.node().id).classed(`er ${N}`,"true").attr("x",l).attr("y",S).attr("width",p+c*2+M).attr("height",T.height+f*2)),S+=T.height+f*2,N=N==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else F.height=Math.max(R.minEntityHeight,O),e.attr("transform","translate("+F.width/2+","+F.height/2+")");return F},"drawAttributes"),ie=u(function(t,e,r){const f=[...e.keys()];let c;return f.forEach(function(_){const y=pt(_,"entity");Q.set(_,y);const o=t.append("g").attr("id",y);c=c===void 0?y:c;const h="text-"+y,g=o.append("text").classed("er entityLabel",!0).attr("id",h).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px").text(e.get(_).alias??_),{width:m,height:k}=ae(o,g,e.get(_).attributes),p=o.insert("rect","#"+h).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",m).attr("height",k).node().getBBox();r.setNode(y,{width:p.width,height:p.height,shape:"rect",id:y})}),c},"drawEntities"),ne=u(function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},"adjustEntities"),yt=u(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),se=u(function(t,e){return t.forEach(function(r){e.setEdge(Q.get(r.entityA),Q.get(r.entityB),{relationship:r},yt(r))}),t},"addRelationships"),ut=0,oe=u(function(t,e,r,f,c){ut++;const _=r.edge(Q.get(e.entityA),Q.get(e.entityB),yt(e)),y=vt().x(function(b){return b.x}).y(function(b){return b.y}).curve(St),o=t.insert("path","#"+f).classed("er relationshipLine",!0).attr("d",y(_.points)).style("stroke",R.stroke).style("fill","none");e.relSpec.relType===c.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let h="";switch(R.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_END+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_END+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_END+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+h+"#"+P.ERMarkers.ONLY_ONE_END+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-end","url("+h+"#"+P.ERMarkers.MD_PARENT_END+")");break}switch(e.relSpec.cardB){case c.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_ONE_START+")");break;case c.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ZERO_OR_MORE_START+")");break;case c.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONE_OR_MORE_START+")");break;case c.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+h+"#"+P.ERMarkers.ONLY_ONE_START+")");break;case c.db.Cardinality.MD_PARENT:o.attr("marker-start","url("+h+"#"+P.ERMarkers.MD_PARENT_START+")");break}const g=o.node().getTotalLength(),m=o.node().getPointAtLength(g*.5),k="rel"+ut,x=e.roleA.split(/
/g),p=t.append("text").classed("er relationshipLabel",!0).attr("id",k).attr("x",m.x).attr("y",m.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",U().fontFamily).style("font-size",R.fontSize+"px");if(x.length==1)p.text(e.roleA);else{const b=-(x.length-1)*.5;x.forEach((Y,Z)=>{p.append("tspan").attr("x",m.x).attr("dy",`${Z===0?b:1}em`).text(Y)})}const O=p.node().getBBox();t.insert("rect","#"+k).classed("er relationshipLabelBox",!0).attr("x",m.x-O.width/2).attr("y",m.y-O.height/2).attr("width",O.width).attr("height",O.height)},"drawRelationshipFromLayout"),le=u(function(t,e,r,f){R=U().er,X.info("Drawing ER diagram");const c=U().securityLevel;let _;c==="sandbox"&&(_=at("#i"+e));const o=(c==="sandbox"?at(_.nodes()[0].contentDocument.body):at("body")).select(`[id='${e}']`);P.insertMarkers(o,R);let h;h=new It({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:R.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const g=ie(o,f.db.getEntities(),h),m=se(f.db.getRelationships(),h);Dt(h),ne(o,h),m.forEach(function(b){oe(o,b,h,g,f)});const k=R.diagramPadding;Tt.insertTitle(o,"entityTitleText",R.titleTopMargin,f.db.getDiagramTitle());const x=o.node().getBBox(),p=x.width+k*2,O=x.height+k*2;At(o,O,p,R.useMaxWidth),o.attr("viewBox",`${x.x-k} ${x.y-k} ${p} ${O}`)},"draw"),ce="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function pt(t="",e=""){const r=t.replace(ee,"");return`${st(e)}${st(r)}${zt(t,ce)}`}u(pt,"generateId");function st(t=""){return t.length>0?`${t}-`:""}u(st,"strWithHyphen");var he={setConf:re,draw:le},de=u(t=>` .entityBox { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; diff --git a/static/js/md-flowDiagram-7ASYPVHJ-BUriymIt.js b/static/js/md-flowDiagram-7ASYPVHJ-DItS00Cu.js similarity index 62% rename from static/js/md-flowDiagram-7ASYPVHJ-BUriymIt.js rename to static/js/md-flowDiagram-7ASYPVHJ-DItS00Cu.js index 48ea0d359..b11f59333 100644 --- a/static/js/md-flowDiagram-7ASYPVHJ-BUriymIt.js +++ b/static/js/md-flowDiagram-7ASYPVHJ-DItS00Cu.js @@ -1,17 +1,17 @@ -import{g as gt,s as At}from"./md-chunk-5HRBRIJM-CXxgtuoQ.js";import{d as U1,_ as l,n as Ze,o as bt,s as kt,g as mt,b as Et,c as St,p as Dt,q as xt,r as Ct,J as Tt,t as yt,l as e1,u as ge,v as Ft,x as _t,j as C1,y as Bt,z as vt,e as Vt,A as Lt}from"./md-index-BVqvVggs.js";import{c as wt}from"./md-channel-DmgS6gpL.js";var It="flowchart-",$e=0,M1=U1(),b1=new Map,K=[],K1=new Map,f1=[],Ae=new Map,be=new Map,ee=0,fe=!0,J,se,re=[],ne=l(e=>Vt.sanitizeText(e,M1),"sanitizeText"),ie=l(function(e){for(const r of b1.values())if(r.id===e)return r.domId;return e},"lookUpDomId"),Rt=l(function(e,r,n,i,u,d,g={},D){var _,z;if(!e||e.trim().length===0)return;let c,o=b1.get(e);if(o===void 0&&(o={id:e,labelType:"text",domId:It+e+"-"+$e,styles:[],classes:[]},b1.set(e,o)),$e++,r!==void 0?(M1=U1(),c=ne(r.text.trim()),o.labelType=r.type,c.startsWith('"')&&c.endsWith('"')&&(c=c.substring(1,c.length-1)),o.text=c):o.text===void 0&&(o.text=e),n!==void 0&&(o.type=n),i!=null&&i.forEach(function(B){o.styles.push(B)}),u!=null&&u.forEach(function(B){o.classes.push(B)}),d!==void 0&&(o.dir=d),o.props===void 0?o.props=g:g!==void 0&&Object.assign(o.props,g),D!==void 0){let B;D.includes(` -`)?B=D+` -`:B=`{ +import{g as gt,s as At}from"./md-chunk-5HRBRIJM-Dc3xF8et.js";import{_ as l,n as bt,o as kt,s as mt,g as Et,a as St,b as Dt,p as Ze,l as e1,c as U1,d as C1,q as xt,r as Ct,u as ge,t as Tt,v as yt,x as Ft,J as vt,y as _t,z as Bt,A as Vt,k as Lt}from"./md-index-B8Nim9kS.js";import{c as wt}from"./md-channel-vFpC5mtO.js";var It="flowchart-",$e=0,M1=U1(),b1=new Map,Y=[],Y1=new Map,p1=[],Ae=new Map,be=new Map,ee=0,pe=!0,J,se,re=[],ie=l(e=>Lt.sanitizeText(e,M1),"sanitizeText"),ae=l(function(e){for(const r of b1.values())if(r.id===e)return r.domId;return e},"lookUpDomId"),Rt=l(function(e,r,i,a,u,d,g={},D){var v,z;if(!e||e.trim().length===0)return;let c,o=b1.get(e);if(o===void 0&&(o={id:e,labelType:"text",domId:It+e+"-"+$e,styles:[],classes:[]},b1.set(e,o)),$e++,r!==void 0?(M1=U1(),c=ie(r.text.trim()),o.labelType=r.type,c.startsWith('"')&&c.endsWith('"')&&(c=c.substring(1,c.length-1)),o.text=c):o.text===void 0&&(o.text=e),i!==void 0&&(o.type=i),a!=null&&a.forEach(function(_){o.styles.push(_)}),u!=null&&u.forEach(function(_){o.classes.push(_)}),d!==void 0&&(o.dir=d),o.props===void 0?o.props=g:g!==void 0&&Object.assign(o.props,g),D!==void 0){let _;D.includes(` +`)?_=D+` +`:_=`{ `+D+` -}`;const h=Ct(B,{schema:Tt});if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!yt(h.shape))throw new Error(`No such shape: ${h.shape}.`);o.type=h==null?void 0:h.shape}h!=null&&h.label&&(o.text=h==null?void 0:h.label),h!=null&&h.icon&&(o.icon=h==null?void 0:h.icon,!((_=h.label)!=null&&_.trim())&&o.text===e&&(o.text="")),h!=null&&h.form&&(o.form=h==null?void 0:h.form),h!=null&&h.pos&&(o.pos=h==null?void 0:h.pos),h!=null&&h.img&&(o.img=h==null?void 0:h.img,!((z=h.label)!=null&&z.trim())&&o.text===e&&(o.text="")),h!=null&&h.constraint&&(o.constraint=h.constraint),h.w&&(o.assetWidth=Number(h.w)),h.h&&(o.assetHeight=Number(h.h))}},"addVertex"),Nt=l(function(e,r,n){const d={start:e,end:r,type:void 0,text:"",labelType:"text"};e1.info("abc78 Got edge...",d);const g=n.text;if(g!==void 0&&(d.text=ne(g.text.trim()),d.text.startsWith('"')&&d.text.endsWith('"')&&(d.text=d.text.substring(1,d.text.length-1)),d.labelType=g.type),n!==void 0&&(d.type=n.type,d.stroke=n.stroke,d.length=n.length>10?10:n.length),K.length<(M1.maxEdges??500))e1.info("Pushing edge..."),K.push(d);else throw new Error(`Edge limit exceeded. ${K.length} edges found, but the limit is ${M1.maxEdges}. +}`;const h=Ft(_,{schema:vt});if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!_t(h.shape))throw new Error(`No such shape: ${h.shape}.`);o.type=h==null?void 0:h.shape}h!=null&&h.label&&(o.text=h==null?void 0:h.label),h!=null&&h.icon&&(o.icon=h==null?void 0:h.icon,!((v=h.label)!=null&&v.trim())&&o.text===e&&(o.text="")),h!=null&&h.form&&(o.form=h==null?void 0:h.form),h!=null&&h.pos&&(o.pos=h==null?void 0:h.pos),h!=null&&h.img&&(o.img=h==null?void 0:h.img,!((z=h.label)!=null&&z.trim())&&o.text===e&&(o.text="")),h!=null&&h.constraint&&(o.constraint=h.constraint),h.w&&(o.assetWidth=Number(h.w)),h.h&&(o.assetHeight=Number(h.h))}},"addVertex"),Nt=l(function(e,r,i){const d={start:e,end:r,type:void 0,text:"",labelType:"text"};e1.info("abc78 Got edge...",d);const g=i.text;if(g!==void 0&&(d.text=ie(g.text.trim()),d.text.startsWith('"')&&d.text.endsWith('"')&&(d.text=d.text.substring(1,d.text.length-1)),d.labelType=g.type),i!==void 0&&(d.type=i.type,d.stroke=i.stroke,d.length=i.length>10?10:i.length),Y.length<(M1.maxEdges??500))e1.info("Pushing edge..."),Y.push(d);else throw new Error(`Edge limit exceeded. ${Y.length} edges found, but the limit is ${M1.maxEdges}. Initialize mermaid with maxEdges set to a higher number to allow more edges. You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)},"addSingleLink"),Pt=l(function(e,r,n){e1.info("addLink",e,r,n);for(const i of e)for(const u of r)Nt(i,u,n)},"addLink"),Ot=l(function(e,r){e.forEach(function(n){n==="default"?K.defaultInterpolate=r:K[n].interpolate=r})},"updateLinkInterpolate"),Gt=l(function(e,r){e.forEach(function(n){var i,u,d,g,D,c;if(typeof n=="number"&&n>=K.length)throw new Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${K.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);n==="default"?K.defaultStyle=r:(K[n].style=r,(((u=(i=K[n])==null?void 0:i.style)==null?void 0:u.length)??0)>0&&!((g=(d=K[n])==null?void 0:d.style)!=null&&g.some(o=>o==null?void 0:o.startsWith("fill")))&&((c=(D=K[n])==null?void 0:D.style)==null||c.push("fill:none")))})},"updateLink"),Mt=l(function(e,r){e.split(",").forEach(function(n){let i=K1.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},K1.set(n,i)),r!=null&&r.forEach(function(u){if(/color/.exec(u)){const d=u.replace("fill","bgFill");i.textStyles.push(d)}i.styles.push(u)})})},"addClass"),Ut=l(function(e){J=e,/.*/.exec(J)&&(J="LR"),/.*v/.exec(J)&&(J="TB"),J==="TD"&&(J="TB")},"setDirection"),ke=l(function(e,r){for(const n of e.split(",")){const i=b1.get(n);i&&i.classes.push(r);const u=Ae.get(n);u&&u.classes.push(r)}},"setClass"),Wt=l(function(e,r){if(r!==void 0){r=ne(r);for(const n of e.split(","))be.set(se==="gen-1"?ie(n):n,r)}},"setTooltip"),zt=l(function(e,r,n){const i=ie(e);if(U1().securityLevel!=="loose"||r===void 0)return;let u=[];if(typeof n=="string"){u=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g")),u.classed("hover",!0)}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),C1(this).classed("hover",!1)})},"setupToolTips");re.push(nt);var Ht=l(function(e="gen-1"){b1=new Map,K1=new Map,K=[],re=[nt],f1=[],Ae=new Map,ee=0,be=new Map,fe=!0,se=e,M1=U1(),Ft()},"clear"),Xt=l(e=>{se=e||"gen-2"},"setGen"),Qt=l(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),Jt=l(function(e,r,n){let i=e.text.trim(),u=n.text;e===n&&/\s/.exec(n.text)&&(i=void 0);function d(o){const _={boolean:{},number:{},string:{}},z=[];let B;return{nodeList:o.filter(function(b){const x=typeof b;return b.stmt&&b.stmt==="dir"?(B=b.value,!1):b.trim()===""?!1:x in _?_[x].hasOwnProperty(b)?!1:_[x][b]=!0:z.includes(b)?!1:z.push(b)}),dir:B}}l(d,"uniq");const{nodeList:g,dir:D}=d(r.flat());if(se==="gen-1")for(let o=0;o2e3)return{result:!1,count:0};if(it[j1]=r,f1[r].id===e)return{result:!0,count:0};let i=0,u=1;for(;i=0){const g=at(e,d);if(g.result)return{result:!0,count:u+g.count};u=u+g.count}i=i+1}return{result:!1,count:u}},"indexNodes2"),$t=l(function(e){return it[e]},"getDepthFirstPos"),es=l(function(){j1=-1,f1.length>0&&at("none",f1.length-1)},"indexNodes"),ut=l(function(){return f1},"getSubGraphs"),ts=l(()=>fe?(fe=!1,!0):!1,"firstGraph"),ss=l(e=>{let r=e.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}},"destructStartLink"),rs=l((e,r)=>{const n=r.length;let i=0;for(let u=0;u{const r=e.trim();let n=r.slice(0,-1),i="arrow_open";switch(r.slice(-1)){case"x":i="arrow_cross",r.startsWith("x")&&(i="double_"+i,n=n.slice(1));break;case">":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let u="normal",d=n.length-1;n.startsWith("=")&&(u="thick"),n.startsWith("~")&&(u="invisible");const g=rs(".",n);return g&&(u="dotted",d=g),{type:i,stroke:u,length:d}},"destructEndLink"),is=l((e,r)=>{const n=ns(e);let i;if(r){if(i=ss(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n},"destructLink"),lt=l((e,r)=>{for(const n of e)if(n.nodes.includes(r))return!0;return!1},"exists"),ot=l((e,r)=>{const n=[];return e.nodes.forEach((i,u)=>{lt(r,i)||n.push(e.nodes[u])}),{nodes:n}},"makeUniq"),as={firstGraph:ts},us=l(e=>{if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}},"getTypeFromVertex"),ls=l((e,r)=>e.find(n=>n.id===r),"findNode"),os=l(e=>{let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}},"destructEdgeType"),cs=l((e,r,n,i,u,d)=>{var o;const g=n.get(e.id),D=i.get(e.id)??!1,c=ls(r,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=te(e.classes),c.cssClasses=e.classes.join(" ");else{const _={id:e.id,label:e.text,labelStyle:"",parentId:g,padding:((o=u.flowchart)==null?void 0:o.padding)||8,cssStyles:e.styles,cssCompiledStyles:te(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:et(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};D?r.push({..._,isGroup:!0,shape:"rect"}):r.push({..._,isGroup:!1,shape:us(e)})}},"addNodeFromVertex");function te(e){let r=[];for(const n of e){const i=K1.get(n);i!=null&&i.styles&&(r=[...r,...i.styles??[]].map(u=>u.trim())),i!=null&&i.textStyles&&(r=[...r,...i.textStyles??[]].map(u=>u.trim()))}return r}l(te,"getCompiledStyles");var hs=l(()=>{const e=U1(),r=[],n=[],i=ut(),u=new Map,d=new Map;for(let c=i.length-1;c>=0;c--){const o=i[c];o.nodes.length>0&&d.set(o.id,!0);for(const _ of o.nodes)u.set(_,o.id)}for(let c=i.length-1;c>=0;c--){const o=i[c];r.push({id:o.id,label:o.title,labelStyle:"",parentId:u.get(o.id),padding:8,cssCompiledStyles:te(o.classes),cssClasses:o.classes.join(" "),shape:"rect",dir:o.dir,isGroup:!0,look:e.look})}st().forEach(c=>{cs(c,r,u,d,e,e.look||"classic")});const D=rt();return D.forEach((c,o)=>{const{arrowTypeStart:_,arrowTypeEnd:z}=os(c.type),B=[...D.defaultStyle??[]];c.style&&B.push(...c.style);const h={id:_t(c.start,c.end,{counter:o,prefix:"L"}),start:c.start,end:c.end,type:c.type??"normal",label:c.text,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:(c==null?void 0:c.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(c==null?void 0:c.stroke)==="invisible"?"none":_,arrowTypeEnd:(c==null?void 0:c.stroke)==="invisible"?"none":z,arrowheadStyle:"fill: #333",labelStyle:B,style:B,pattern:c.stroke,look:e.look};n.push(h)}),{nodes:r,edges:n,other:{},config:e}},"getData"),de={defaultConfig:l(()=>bt.flowchart,"defaultConfig"),setAccTitle:kt,getAccTitle:mt,getAccDescription:Et,getData:hs,setAccDescription:St,addVertex:Rt,lookUpDomId:ie,addLink:Pt,updateLinkInterpolate:Ot,updateLink:Gt,addClass:Mt,setDirection:Ut,setClass:ke,setTooltip:Wt,getTooltip:et,setClickEvent:Kt,setLink:jt,bindFunctions:Yt,getDirection:tt,getVertices:st,getEdges:rt,getClasses:qt,clear:Ht,setGen:Xt,defaultStyle:Qt,addSubGraph:Jt,getDepthFirstPos:$t,indexNodes:es,getSubGraphs:ut,destructLink:is,lex:as,exists:lt,makeUniq:ot,setDiagramTitle:Dt,getDiagramTitle:xt},ds=l(function(e,r){return r.db.getClasses()},"getClasses"),fs=l(async function(e,r,n,i){var h;e1.info("REF0:"),e1.info("Drawing state diagram (v2)",r);const{securityLevel:u,flowchart:d,layout:g}=U1();let D;u==="sandbox"&&(D=C1("#i"+r));const c=u==="sandbox"?D.nodes()[0].contentDocument:document;e1.debug("Before getData: ");const o=i.db.getData();e1.debug("Data: ",o);const _=gt(r,u),z=tt();o.type=i.type,o.layoutAlgorithm=Bt(g),o.layoutAlgorithm==="dagre"&&g==="elk"&&e1.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),o.direction=z,o.nodeSpacing=(d==null?void 0:d.nodeSpacing)||50,o.rankSpacing=(d==null?void 0:d.rankSpacing)||50,o.markers=["point","circle","cross"],o.diagramId=r,e1.debug("REF1:",o),await vt(o,_);const B=((h=o.config.flowchart)==null?void 0:h.diagramPadding)??8;ge.insertTitle(_,"flowchartTitleText",(d==null?void 0:d.titleTopMargin)||0,i.db.getDiagramTitle()),At(_,B,"flowchart",(d==null?void 0:d.useMaxWidth)||!1);for(const b of o.nodes){const x=C1(`#${r} [id="${b.id}"]`);if(!x||!b.link)continue;const Z=c.createElementNS("http://www.w3.org/2000/svg","a");Z.setAttributeNS("http://www.w3.org/2000/svg","class",b.cssClasses),Z.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?Z.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):b.linkTarget&&Z.setAttributeNS("http://www.w3.org/2000/svg","target",b.linkTarget);const k1=x.insert(function(){return Z},":first-child"),m1=x.select(".label-container");m1&&k1.append(function(){return m1.node()});const E1=x.select(".label");E1&&k1.append(function(){return E1.node()})}},"draw"),ps={getClasses:ds,draw:fs},pe=function(){var e=l(function(A1,f,p,A){for(p=p||{},A=A1.length;A--;p[A1[A]]=f);return p},"o"),r=[1,4],n=[1,3],i=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],d=[2,2],g=[1,13],D=[1,14],c=[1,15],o=[1,16],_=[1,23],z=[1,25],B=[1,26],h=[1,27],b=[1,49],x=[1,48],Z=[1,29],k1=[1,30],m1=[1,31],E1=[1,32],Y1=[1,33],v=[1,44],V=[1,46],L=[1,42],w=[1,47],I=[1,43],R=[1,50],N=[1,45],P=[1,51],O=[1,52],q1=[1,34],H1=[1,35],X1=[1,36],Q1=[1,37],p1=[1,57],C=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],t1=[1,61],s1=[1,60],r1=[1,62],T1=[8,9,11,75,77],me=[1,77],y1=[1,90],F1=[1,95],_1=[1,94],B1=[1,91],v1=[1,87],V1=[1,93],L1=[1,89],w1=[1,96],I1=[1,92],R1=[1,97],N1=[1,88],S1=[8,9,10,11,40,75,77],M=[8,9,10,11,40,46,75,77],Y=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],Ee=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],W1=[44,60,88,101,104,105,108,110,113,114,115],Se=[1,123],De=[1,122],xe=[1,130],Ce=[1,144],Te=[1,145],ye=[1,146],Fe=[1,147],_e=[1,132],Be=[1,134],ve=[1,138],Ve=[1,139],Le=[1,140],we=[1,141],Ie=[1,142],Re=[1,143],Ne=[1,148],Pe=[1,149],Oe=[1,128],Ge=[1,129],Me=[1,136],Ue=[1,131],We=[1,135],ze=[1,133],ae=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],je=[1,151],Ke=[1,153],F=[8,9,11],q=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],k=[1,173],U=[1,169],W=[1,170],m=[1,174],E=[1,171],S=[1,172],P1=[77,115,118],T=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Ye=[10,105],g1=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],n1=[1,242],i1=[1,240],a1=[1,244],u1=[1,238],l1=[1,239],o1=[1,241],c1=[1,243],h1=[1,245],O1=[1,263],qe=[8,9,11,105],$=[8,9,10,11,60,83,104,105,108,109,110,111],ue={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:l(function(f,p,A,a,y,t,z1){var s=t.length-1;switch(y){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 181:this.$=t[s];break;case 11:a.setDirection("TB"),this.$="TB";break;case 12:a.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=a.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=a.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=a.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),a.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),a.setAccDescription(this.$);break;case 43:this.$=t[s-1]+t[s];break;case 44:this.$=t[s];break;case 45:a.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),a.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 46:a.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 47:a.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 48:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 49:a.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),this.$={stmt:t[s-1],nodes:t[s-1],shapeData:t[s]};break;case 50:this.$={stmt:t[s],nodes:t[s]};break;case 51:this.$=[t[s]];break;case 52:a.addVertex(t[s-5][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s-4]),this.$=t[s-5].concat(t[s]);break;case 53:this.$=t[s-4].concat(t[s]);break;case 54:this.$=t[s];break;case 55:this.$=t[s-2],a.setClass(t[s-2],t[s]);break;case 56:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"square");break;case 57:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"doublecircle");break;case 58:this.$=t[s-5],a.addVertex(t[s-5],t[s-2],"circle");break;case 59:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"ellipse");break;case 60:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"stadium");break;case 61:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"subroutine");break;case 62:this.$=t[s-7],a.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 63:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"cylinder");break;case 64:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"round");break;case 65:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"diamond");break;case 66:this.$=t[s-5],a.addVertex(t[s-5],t[s-2],"hexagon");break;case 67:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"odd");break;case 68:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"trapezoid");break;case 69:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 70:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"lean_right");break;case 71:this.$=t[s-3],a.addVertex(t[s-3],t[s-1],"lean_left");break;case 72:this.$=t[s],a.addVertex(t[s]);break;case 73:t[s-1].text=t[s],this.$=t[s-1];break;case 74:case 75:t[s-2].text=t[s-1],this.$=t[s-2];break;case 76:this.$=t[s];break;case 77:var X=a.destructLink(t[s],t[s-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:t[s-1]};break;case 78:this.$={text:t[s],type:"text"};break;case 79:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 80:this.$={text:t[s],type:"string"};break;case 81:this.$={text:t[s],type:"markdown"};break;case 82:var X=a.destructLink(t[s]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 83:this.$=t[s-1];break;case 84:this.$={text:t[s],type:"text"};break;case 85:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 86:this.$={text:t[s],type:"string"};break;case 87:case 102:this.$={text:t[s],type:"markdown"};break;case 99:this.$={text:t[s],type:"text"};break;case 100:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 101:this.$={text:t[s],type:"text"};break;case 103:this.$=t[s-4],a.addClass(t[s-2],t[s]);break;case 104:this.$=t[s-4],a.setClass(t[s-2],t[s]);break;case 105:case 113:this.$=t[s-1],a.setClickEvent(t[s-1],t[s]);break;case 106:case 114:this.$=t[s-3],a.setClickEvent(t[s-3],t[s-2]),a.setTooltip(t[s-3],t[s]);break;case 107:this.$=t[s-2],a.setClickEvent(t[s-2],t[s-1],t[s]);break;case 108:this.$=t[s-4],a.setClickEvent(t[s-4],t[s-3],t[s-2]),a.setTooltip(t[s-4],t[s]);break;case 109:this.$=t[s-2],a.setLink(t[s-2],t[s]);break;case 110:this.$=t[s-4],a.setLink(t[s-4],t[s-2]),a.setTooltip(t[s-4],t[s]);break;case 111:this.$=t[s-4],a.setLink(t[s-4],t[s-2],t[s]);break;case 112:this.$=t[s-6],a.setLink(t[s-6],t[s-4],t[s]),a.setTooltip(t[s-6],t[s-2]);break;case 115:this.$=t[s-1],a.setLink(t[s-1],t[s]);break;case 116:this.$=t[s-3],a.setLink(t[s-3],t[s-2]),a.setTooltip(t[s-3],t[s]);break;case 117:this.$=t[s-3],a.setLink(t[s-3],t[s-2],t[s]);break;case 118:this.$=t[s-5],a.setLink(t[s-5],t[s-4],t[s]),a.setTooltip(t[s-5],t[s-2]);break;case 119:this.$=t[s-4],a.addVertex(t[s-2],void 0,void 0,t[s]);break;case 120:this.$=t[s-4],a.updateLink([t[s-2]],t[s]);break;case 121:this.$=t[s-4],a.updateLink(t[s-2],t[s]);break;case 122:this.$=t[s-8],a.updateLinkInterpolate([t[s-6]],t[s-2]),a.updateLink([t[s-6]],t[s]);break;case 123:this.$=t[s-8],a.updateLinkInterpolate(t[s-6],t[s-2]),a.updateLink(t[s-6],t[s]);break;case 124:this.$=t[s-6],a.updateLinkInterpolate([t[s-4]],t[s]);break;case 125:this.$=t[s-6],a.updateLinkInterpolate(t[s-4],t[s]);break;case 126:case 128:this.$=[t[s]];break;case 127:case 129:t[s-2].push(t[s]),this.$=t[s-2];break;case 131:this.$=t[s-1]+t[s];break;case 179:this.$=t[s];break;case 180:this.$=t[s-1]+""+t[s];break;case 182:this.$=t[s-1]+""+t[s];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:n,12:i},{1:[3]},e(u,d,{5:6}),{4:7,9:r,10:n,12:i},{4:8,9:r,10:n,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,33:24,34:z,36:B,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(u,[2,9]),e(u,[2,10]),e(u,[2,11]),{8:[1,54],9:[1,55],10:p1,15:53,18:56},e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,6]),e(C,[2,7]),e(C,[2,8]),{8:t1,9:s1,11:r1,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:t1,9:s1,11:r1,21:66},{8:t1,9:s1,11:r1,21:67},{8:t1,9:s1,11:r1,21:68},{8:t1,9:s1,11:r1,21:69},{8:t1,9:s1,11:r1,21:70},{8:t1,9:s1,10:[1,71],11:r1,21:72},e(C,[2,36]),{35:[1,73]},{37:[1,74]},e(C,[2,39]),e(T1,[2,50],{18:75,39:76,10:p1,40:me}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:y1,44:F1,60:_1,79:[1,85],88:B1,94:[1,82],96:[1,83],100:84,104:v1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},e(C,[2,183]),e(C,[2,184]),e(C,[2,185]),e(C,[2,186]),e(S1,[2,51]),e(S1,[2,54],{46:[1,98]}),e(M,[2,72],{112:111,29:[1,99],44:b,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:x,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:v,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(Y,[2,179]),e(Y,[2,140]),e(Y,[2,141]),e(Y,[2,142]),e(Y,[2,143]),e(Y,[2,144]),e(Y,[2,145]),e(Y,[2,146]),e(Y,[2,147]),e(Y,[2,148]),e(Y,[2,149]),e(Y,[2,150]),e(u,[2,12]),e(u,[2,18]),e(u,[2,19]),{9:[1,112]},e(Ee,[2,26],{18:113,10:p1}),e(C,[2,27]),{42:114,43:38,44:b,45:39,47:40,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(C,[2,40]),e(C,[2,41]),e(C,[2,42]),e(W1,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:Se,118:De},e([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),{10:xe,12:Ce,14:Te,27:ye,28:124,32:Fe,44:_e,60:Be,75:ve,79:[1,126],80:[1,127],82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:125,104:Oe,108:Ge,110:Me,113:Ue,114:We,115:ze},e(ae,d,{5:150}),e(C,[2,37]),e(C,[2,38]),e(T1,[2,48],{44:je}),e(T1,[2,49],{18:152,10:p1,40:Ke}),e(S1,[2,44]),{44:b,47:154,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{101:[1,155],102:156,104:[1,157]},{44:b,47:158,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{44:b,47:159,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},e(F,[2,113],{119:164,10:[1,163],14:y1,44:F1,60:_1,88:B1,104:v1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,115],{10:[1,165]}),e(q,[2,181]),e(q,[2,168]),e(q,[2,169]),e(q,[2,170]),e(q,[2,171]),e(q,[2,172]),e(q,[2,173]),e(q,[2,174]),e(q,[2,175]),e(q,[2,176]),e(q,[2,177]),e(q,[2,178]),{44:b,47:166,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{30:167,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:175,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:177,50:[1,176],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:178,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:179,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:180,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{108:[1,181]},{30:182,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:183,65:[1,184],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:185,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:186,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:187,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(Y,[2,180]),e(u,[2,20]),e(Ee,[2,25]),e(T1,[2,46],{39:188,18:189,10:p1,40:me}),e(W1,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{77:[1,193],78:194,115:Se,118:De},e(P1,[2,78]),e(P1,[2,80]),e(P1,[2,81]),e(P1,[2,166]),e(P1,[2,167]),{8:t1,9:s1,10:xe,11:r1,12:Ce,14:Te,21:196,27:ye,29:[1,195],32:Fe,44:_e,60:Be,75:ve,82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:197,104:Oe,108:Ge,110:Me,113:Ue,114:We,115:ze},e(T,[2,99]),e(T,[2,101]),e(T,[2,102]),e(T,[2,155]),e(T,[2,156]),e(T,[2,157]),e(T,[2,158]),e(T,[2,159]),e(T,[2,160]),e(T,[2,161]),e(T,[2,162]),e(T,[2,163]),e(T,[2,164]),e(T,[2,165]),e(T,[2,88]),e(T,[2,89]),e(T,[2,90]),e(T,[2,91]),e(T,[2,92]),e(T,[2,93]),e(T,[2,94]),e(T,[2,95]),e(T,[2,96]),e(T,[2,97]),e(T,[2,98]),{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,198],33:24,34:z,36:B,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:p1,18:199},{44:[1,200]},e(S1,[2,43]),{10:[1,201],44:b,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,202]},{10:[1,203],105:[1,204]},e(Ye,[2,126]),{10:[1,205],44:b,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,206],44:b,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{79:[1,207]},e(F,[2,107],{10:[1,208]}),e(F,[2,109],{10:[1,209]}),{79:[1,210]},e(q,[2,182]),{79:[1,211],97:[1,212]},e(S1,[2,55],{112:111,44:b,60:x,88:v,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),{31:[1,213],67:k,81:214,115:m,116:E,117:S},e(g1,[2,84]),e(g1,[2,86]),e(g1,[2,87]),e(g1,[2,151]),e(g1,[2,152]),e(g1,[2,153]),e(g1,[2,154]),{49:[1,215],67:k,81:214,115:m,116:E,117:S},{30:216,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{51:[1,217],67:k,81:214,115:m,116:E,117:S},{53:[1,218],67:k,81:214,115:m,116:E,117:S},{55:[1,219],67:k,81:214,115:m,116:E,117:S},{57:[1,220],67:k,81:214,115:m,116:E,117:S},{60:[1,221]},{64:[1,222],67:k,81:214,115:m,116:E,117:S},{66:[1,223],67:k,81:214,115:m,116:E,117:S},{30:224,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{31:[1,225],67:k,81:214,115:m,116:E,117:S},{67:k,69:[1,226],71:[1,227],81:214,115:m,116:E,117:S},{67:k,69:[1,229],71:[1,228],81:214,115:m,116:E,117:S},e(T1,[2,45],{18:152,10:p1,40:Ke}),e(T1,[2,47],{44:je}),e(W1,[2,75]),e(W1,[2,74]),{62:[1,230],67:k,81:214,115:m,116:E,117:S},e(W1,[2,77]),e(P1,[2,79]),{30:231,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(ae,d,{5:232}),e(T,[2,100]),e(C,[2,35]),{43:233,44:b,45:39,47:40,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{10:p1,18:234},{10:n1,60:i1,83:a1,91:235,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:n1,60:i1,83:a1,91:246,103:[1,247],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:n1,60:i1,83:a1,91:248,103:[1,249],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{104:[1,250]},{10:n1,60:i1,83:a1,91:251,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{44:b,47:252,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},e(F,[2,114]),e(F,[2,116],{10:[1,256]}),e(F,[2,117]),e(M,[2,56]),e(g1,[2,85]),e(M,[2,57]),{51:[1,257],67:k,81:214,115:m,116:E,117:S},e(M,[2,64]),e(M,[2,59]),e(M,[2,60]),e(M,[2,61]),{108:[1,258]},e(M,[2,63]),e(M,[2,65]),{66:[1,259],67:k,81:214,115:m,116:E,117:S},e(M,[2,67]),e(M,[2,68]),e(M,[2,70]),e(M,[2,69]),e(M,[2,71]),e([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,261],33:24,34:z,36:B,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(S1,[2,53]),{43:262,44:b,45:39,47:40,60:x,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,119],{105:O1}),e(qe,[2,128],{107:264,10:n1,60:i1,83:a1,104:u1,108:l1,109:o1,110:c1,111:h1}),e($,[2,130]),e($,[2,132]),e($,[2,133]),e($,[2,134]),e($,[2,135]),e($,[2,136]),e($,[2,137]),e($,[2,138]),e($,[2,139]),e(F,[2,120],{105:O1}),{10:[1,265]},e(F,[2,121],{105:O1}),{10:[1,266]},e(Ye,[2,127]),e(F,[2,103],{105:O1}),e(F,[2,104],{112:111,44:b,60:x,88:v,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(F,[2,108]),e(F,[2,110],{10:[1,267]}),e(F,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:t1,9:s1,11:r1,21:272},e(C,[2,34]),e(S1,[2,52]),{10:n1,60:i1,83:a1,104:u1,106:273,107:237,108:l1,109:o1,110:c1,111:h1},e($,[2,131]),{14:y1,44:F1,60:_1,88:B1,100:274,104:v1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{14:y1,44:F1,60:_1,88:B1,100:275,104:v1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{97:[1,276]},e(F,[2,118]),e(M,[2,58]),{30:277,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(M,[2,66]),e(ae,d,{5:278}),e(qe,[2,129],{107:264,10:n1,60:i1,83:a1,104:u1,108:l1,109:o1,110:c1,111:h1}),e(F,[2,124],{119:164,10:[1,279],14:y1,44:F1,60:_1,88:B1,104:v1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,125],{119:164,10:[1,280],14:y1,44:F1,60:_1,88:B1,104:v1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,112]),{31:[1,281],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,282],33:24,34:z,36:B,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:Y1,88:v,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:n1,60:i1,83:a1,91:283,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:n1,60:i1,83:a1,91:284,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},e(M,[2,62]),e(C,[2,33]),e(F,[2,122],{105:O1}),e(F,[2,123],{105:O1})],defaultActions:{},parseError:l(function(f,p){if(p.recoverable)this.trace(f);else{var A=new Error(f);throw A.hash=p,A}},"parseError"),parse:l(function(f){var p=this,A=[0],a=[],y=[null],t=[],z1=this.table,s="",X=0,He=0,ht=2,Xe=1,dt=t.slice.call(arguments,1),G=Object.create(this.lexer),D1={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(D1.yy[le]=this.yy[le]);G.setInput(f,D1.yy),D1.yy.lexer=G,D1.yy.parser=this,typeof G.yylloc>"u"&&(G.yylloc={});var oe=G.yylloc;t.push(oe);var ft=G.options&&G.options.ranges;typeof D1.yy.parseError=="function"?this.parseError=D1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(H){A.length=A.length-2*H,y.length=y.length-H,t.length=t.length-H}l(pt,"popStack");function Qe(){var H;return H=a.pop()||G.lex()||Xe,typeof H!="number"&&(H instanceof Array&&(a=H,H=a.pop()),H=p.symbols_[H]||H),H}l(Qe,"lex");for(var j,x1,Q,ce,G1={},Z1,d1,Je,$1;;){if(x1=A[A.length-1],this.defaultActions[x1]?Q=this.defaultActions[x1]:((j===null||typeof j>"u")&&(j=Qe()),Q=z1[x1]&&z1[x1][j]),typeof Q>"u"||!Q.length||!Q[0]){var he="";$1=[];for(Z1 in z1[x1])this.terminals_[Z1]&&Z1>ht&&$1.push("'"+this.terminals_[Z1]+"'");G.showPosition?he="Parse error on line "+(X+1)+`: +You have to call mermaid.initialize.`)},"addSingleLink"),Pt=l(function(e,r,i){e1.info("addLink",e,r,i);for(const a of e)for(const u of r)Nt(a,u,i)},"addLink"),Ot=l(function(e,r){e.forEach(function(i){i==="default"?Y.defaultInterpolate=r:Y[i].interpolate=r})},"updateLinkInterpolate"),Gt=l(function(e,r){e.forEach(function(i){var a,u,d,g,D,c;if(typeof i=="number"&&i>=Y.length)throw new Error(`The index ${i} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${Y.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);i==="default"?Y.defaultStyle=r:(Y[i].style=r,(((u=(a=Y[i])==null?void 0:a.style)==null?void 0:u.length)??0)>0&&!((g=(d=Y[i])==null?void 0:d.style)!=null&&g.some(o=>o==null?void 0:o.startsWith("fill")))&&((c=(D=Y[i])==null?void 0:D.style)==null||c.push("fill:none")))})},"updateLink"),Mt=l(function(e,r){e.split(",").forEach(function(i){let a=Y1.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},Y1.set(i,a)),r!=null&&r.forEach(function(u){if(/color/.exec(u)){const d=u.replace("fill","bgFill");a.textStyles.push(d)}a.styles.push(u)})})},"addClass"),Ut=l(function(e){J=e,/.*/.exec(J)&&(J="LR"),/.*v/.exec(J)&&(J="TB"),J==="TD"&&(J="TB")},"setDirection"),ke=l(function(e,r){for(const i of e.split(",")){const a=b1.get(i);a&&a.classes.push(r);const u=Ae.get(i);u&&u.classes.push(r)}},"setClass"),Wt=l(function(e,r){if(r!==void 0){r=ie(r);for(const i of e.split(","))be.set(se==="gen-1"?ae(i):i,r)}},"setTooltip"),zt=l(function(e,r,i){const a=ae(e);if(U1().securityLevel!=="loose"||r===void 0)return;let u=[];if(typeof i=="string"){u=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g")),u.classed("hover",!0)}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),C1(this).classed("hover",!1)})},"setupToolTips");re.push(it);var Ht=l(function(e="gen-1"){b1=new Map,Y1=new Map,Y=[],re=[it],p1=[],Ae=new Map,ee=0,be=new Map,pe=!0,se=e,M1=U1(),yt()},"clear"),Xt=l(e=>{se=e||"gen-2"},"setGen"),Qt=l(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),Jt=l(function(e,r,i){let a=e.text.trim(),u=i.text;e===i&&/\s/.exec(i.text)&&(a=void 0);function d(o){const v={boolean:{},number:{},string:{}},z=[];let _;return{nodeList:o.filter(function(b){const x=typeof b;return b.stmt&&b.stmt==="dir"?(_=b.value,!1):b.trim()===""?!1:x in v?v[x].hasOwnProperty(b)?!1:v[x][b]=!0:z.includes(b)?!1:z.push(b)}),dir:_}}l(d,"uniq");const{nodeList:g,dir:D}=d(r.flat());if(se==="gen-1")for(let o=0;o2e3)return{result:!1,count:0};if(at[K1]=r,p1[r].id===e)return{result:!0,count:0};let a=0,u=1;for(;a=0){const g=nt(e,d);if(g.result)return{result:!0,count:u+g.count};u=u+g.count}a=a+1}return{result:!1,count:u}},"indexNodes2"),$t=l(function(e){return at[e]},"getDepthFirstPos"),es=l(function(){K1=-1,p1.length>0&&nt("none",p1.length-1)},"indexNodes"),ut=l(function(){return p1},"getSubGraphs"),ts=l(()=>pe?(pe=!1,!0):!1,"firstGraph"),ss=l(e=>{let r=e.trim(),i="arrow_open";switch(r[0]){case"<":i="arrow_point",r=r.slice(1);break;case"x":i="arrow_cross",r=r.slice(1);break;case"o":i="arrow_circle",r=r.slice(1);break}let a="normal";return r.includes("=")&&(a="thick"),r.includes(".")&&(a="dotted"),{type:i,stroke:a}},"destructStartLink"),rs=l((e,r)=>{const i=r.length;let a=0;for(let u=0;u{const r=e.trim();let i=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross",r.startsWith("x")&&(a="double_"+a,i=i.slice(1));break;case">":a="arrow_point",r.startsWith("<")&&(a="double_"+a,i=i.slice(1));break;case"o":a="arrow_circle",r.startsWith("o")&&(a="double_"+a,i=i.slice(1));break}let u="normal",d=i.length-1;i.startsWith("=")&&(u="thick"),i.startsWith("~")&&(u="invisible");const g=rs(".",i);return g&&(u="dotted",d=g),{type:a,stroke:u,length:d}},"destructEndLink"),as=l((e,r)=>{const i=is(e);let a;if(r){if(a=ss(r),a.stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=i.type;else{if(a.type!==i.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=i.length,a}return i},"destructLink"),lt=l((e,r)=>{for(const i of e)if(i.nodes.includes(r))return!0;return!1},"exists"),ot=l((e,r)=>{const i=[];return e.nodes.forEach((a,u)=>{lt(r,a)||i.push(e.nodes[u])}),{nodes:i}},"makeUniq"),ns={firstGraph:ts},us=l(e=>{if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}},"getTypeFromVertex"),ls=l((e,r)=>e.find(i=>i.id===r),"findNode"),os=l(e=>{let r="none",i="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":i=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),i=r;break}return{arrowTypeStart:r,arrowTypeEnd:i}},"destructEdgeType"),cs=l((e,r,i,a,u,d)=>{var o;const g=i.get(e.id),D=a.get(e.id)??!1,c=ls(r,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=te(e.classes),c.cssClasses=e.classes.join(" ");else{const v={id:e.id,label:e.text,labelStyle:"",parentId:g,padding:((o=u.flowchart)==null?void 0:o.padding)||8,cssStyles:e.styles,cssCompiledStyles:te(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:et(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};D?r.push({...v,isGroup:!0,shape:"rect"}):r.push({...v,isGroup:!1,shape:us(e)})}},"addNodeFromVertex");function te(e){let r=[];for(const i of e){const a=Y1.get(i);a!=null&&a.styles&&(r=[...r,...a.styles??[]].map(u=>u.trim())),a!=null&&a.textStyles&&(r=[...r,...a.textStyles??[]].map(u=>u.trim()))}return r}l(te,"getCompiledStyles");var hs=l(()=>{const e=U1(),r=[],i=[],a=ut(),u=new Map,d=new Map;for(let c=a.length-1;c>=0;c--){const o=a[c];o.nodes.length>0&&d.set(o.id,!0);for(const v of o.nodes)u.set(v,o.id)}for(let c=a.length-1;c>=0;c--){const o=a[c];r.push({id:o.id,label:o.title,labelStyle:"",parentId:u.get(o.id),padding:8,cssCompiledStyles:te(o.classes),cssClasses:o.classes.join(" "),shape:"rect",dir:o.dir,isGroup:!0,look:e.look})}st().forEach(c=>{cs(c,r,u,d,e,e.look||"classic")});const D=rt();return D.forEach((c,o)=>{const{arrowTypeStart:v,arrowTypeEnd:z}=os(c.type),_=[...D.defaultStyle??[]];c.style&&_.push(...c.style);const h={id:Bt(c.start,c.end,{counter:o,prefix:"L"}),start:c.start,end:c.end,type:c.type??"normal",label:c.text,labelpos:"c",thickness:c.stroke,minlen:c.length,classes:(c==null?void 0:c.stroke)==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:(c==null?void 0:c.stroke)==="invisible"?"none":v,arrowTypeEnd:(c==null?void 0:c.stroke)==="invisible"?"none":z,arrowheadStyle:"fill: #333",labelStyle:_,style:_,pattern:c.stroke,look:e.look};i.push(h)}),{nodes:r,edges:i,other:{},config:e}},"getData"),de={defaultConfig:l(()=>Tt.flowchart,"defaultConfig"),setAccTitle:Dt,getAccTitle:St,getAccDescription:Et,getData:hs,setAccDescription:mt,addVertex:Rt,lookUpDomId:ae,addLink:Pt,updateLinkInterpolate:Ot,updateLink:Gt,addClass:Mt,setDirection:Ut,setClass:ke,setTooltip:Wt,getTooltip:et,setClickEvent:Yt,setLink:Kt,bindFunctions:jt,getDirection:tt,getVertices:st,getEdges:rt,getClasses:qt,clear:Ht,setGen:Xt,defaultStyle:Qt,addSubGraph:Jt,getDepthFirstPos:$t,indexNodes:es,getSubGraphs:ut,destructLink:as,lex:ns,exists:lt,makeUniq:ot,setDiagramTitle:kt,getDiagramTitle:bt},ds=l(function(e,r){return r.db.getClasses()},"getClasses"),ps=l(async function(e,r,i,a){var h;e1.info("REF0:"),e1.info("Drawing state diagram (v2)",r);const{securityLevel:u,flowchart:d,layout:g}=U1();let D;u==="sandbox"&&(D=C1("#i"+r));const c=u==="sandbox"?D.nodes()[0].contentDocument:document;e1.debug("Before getData: ");const o=a.db.getData();e1.debug("Data: ",o);const v=gt(r,u),z=tt();o.type=a.type,o.layoutAlgorithm=xt(g),o.layoutAlgorithm==="dagre"&&g==="elk"&&e1.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),o.direction=z,o.nodeSpacing=(d==null?void 0:d.nodeSpacing)||50,o.rankSpacing=(d==null?void 0:d.rankSpacing)||50,o.markers=["point","circle","cross"],o.diagramId=r,e1.debug("REF1:",o),await Ct(o,v);const _=((h=o.config.flowchart)==null?void 0:h.diagramPadding)??8;ge.insertTitle(v,"flowchartTitleText",(d==null?void 0:d.titleTopMargin)||0,a.db.getDiagramTitle()),At(v,_,"flowchart",(d==null?void 0:d.useMaxWidth)||!1);for(const b of o.nodes){const x=C1(`#${r} [id="${b.id}"]`);if(!x||!b.link)continue;const Z=c.createElementNS("http://www.w3.org/2000/svg","a");Z.setAttributeNS("http://www.w3.org/2000/svg","class",b.cssClasses),Z.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),u==="sandbox"?Z.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):b.linkTarget&&Z.setAttributeNS("http://www.w3.org/2000/svg","target",b.linkTarget);const k1=x.insert(function(){return Z},":first-child"),m1=x.select(".label-container");m1&&k1.append(function(){return m1.node()});const E1=x.select(".label");E1&&k1.append(function(){return E1.node()})}},"draw"),fs={getClasses:ds,draw:ps},fe=function(){var e=l(function(A1,p,f,A){for(f=f||{},A=A1.length;A--;f[A1[A]]=p);return f},"o"),r=[1,4],i=[1,3],a=[1,5],u=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],d=[2,2],g=[1,13],D=[1,14],c=[1,15],o=[1,16],v=[1,23],z=[1,25],_=[1,26],h=[1,27],b=[1,49],x=[1,48],Z=[1,29],k1=[1,30],m1=[1,31],E1=[1,32],j1=[1,33],B=[1,44],V=[1,46],L=[1,42],w=[1,47],I=[1,43],R=[1,50],N=[1,45],P=[1,51],O=[1,52],q1=[1,34],H1=[1,35],X1=[1,36],Q1=[1,37],f1=[1,57],C=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],t1=[1,61],s1=[1,60],r1=[1,62],T1=[8,9,11,75,77],me=[1,77],y1=[1,90],F1=[1,95],v1=[1,94],_1=[1,91],B1=[1,87],V1=[1,93],L1=[1,89],w1=[1,96],I1=[1,92],R1=[1,97],N1=[1,88],S1=[8,9,10,11,40,75,77],M=[8,9,10,11,40,46,75,77],j=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],Ee=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],W1=[44,60,88,101,104,105,108,110,113,114,115],Se=[1,123],De=[1,122],xe=[1,130],Ce=[1,144],Te=[1,145],ye=[1,146],Fe=[1,147],ve=[1,132],_e=[1,134],Be=[1,138],Ve=[1,139],Le=[1,140],we=[1,141],Ie=[1,142],Re=[1,143],Ne=[1,148],Pe=[1,149],Oe=[1,128],Ge=[1,129],Me=[1,136],Ue=[1,131],We=[1,135],ze=[1,133],ne=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],Ke=[1,151],Ye=[1,153],F=[8,9,11],q=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],k=[1,173],U=[1,169],W=[1,170],m=[1,174],E=[1,171],S=[1,172],P1=[77,115,118],T=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],je=[10,105],g1=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],i1=[1,242],a1=[1,240],n1=[1,244],u1=[1,238],l1=[1,239],o1=[1,241],c1=[1,243],h1=[1,245],O1=[1,263],qe=[8,9,11,105],$=[8,9,10,11,60,83,104,105,108,109,110,111],ue={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:l(function(p,f,A,n,y,t,z1){var s=t.length-1;switch(y){case 2:this.$=[];break;case 3:(!Array.isArray(t[s])||t[s].length>0)&&t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 181:this.$=t[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(t[s-1]),this.$=t[s-1];break;case 27:this.$=t[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(t[s-6],t[s-1],t[s-4]);break;case 34:this.$=n.addSubGraph(t[s-3],t[s-1],t[s-3]);break;case 35:this.$=n.addSubGraph(void 0,t[s-1],void 0);break;case 37:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 43:this.$=t[s-1]+t[s];break;case 44:this.$=t[s];break;case 45:n.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),n.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 46:n.addLink(t[s-2].stmt,t[s],t[s-1]),this.$={stmt:t[s],nodes:t[s].concat(t[s-2].nodes)};break;case 47:n.addLink(t[s-3].stmt,t[s-1],t[s-2]),this.$={stmt:t[s-1],nodes:t[s-1].concat(t[s-3].nodes)};break;case 48:this.$={stmt:t[s-1],nodes:t[s-1]};break;case 49:n.addVertex(t[s-1][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s]),this.$={stmt:t[s-1],nodes:t[s-1],shapeData:t[s]};break;case 50:this.$={stmt:t[s],nodes:t[s]};break;case 51:this.$=[t[s]];break;case 52:n.addVertex(t[s-5][0],void 0,void 0,void 0,void 0,void 0,void 0,t[s-4]),this.$=t[s-5].concat(t[s]);break;case 53:this.$=t[s-4].concat(t[s]);break;case 54:this.$=t[s];break;case 55:this.$=t[s-2],n.setClass(t[s-2],t[s]);break;case 56:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"square");break;case 57:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"doublecircle");break;case 58:this.$=t[s-5],n.addVertex(t[s-5],t[s-2],"circle");break;case 59:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"ellipse");break;case 60:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"stadium");break;case 61:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"subroutine");break;case 62:this.$=t[s-7],n.addVertex(t[s-7],t[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[t[s-5],t[s-3]]]));break;case 63:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"cylinder");break;case 64:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"round");break;case 65:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"diamond");break;case 66:this.$=t[s-5],n.addVertex(t[s-5],t[s-2],"hexagon");break;case 67:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"odd");break;case 68:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"trapezoid");break;case 69:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"inv_trapezoid");break;case 70:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"lean_right");break;case 71:this.$=t[s-3],n.addVertex(t[s-3],t[s-1],"lean_left");break;case 72:this.$=t[s],n.addVertex(t[s]);break;case 73:t[s-1].text=t[s],this.$=t[s-1];break;case 74:case 75:t[s-2].text=t[s-1],this.$=t[s-2];break;case 76:this.$=t[s];break;case 77:var X=n.destructLink(t[s],t[s-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:t[s-1]};break;case 78:this.$={text:t[s],type:"text"};break;case 79:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 80:this.$={text:t[s],type:"string"};break;case 81:this.$={text:t[s],type:"markdown"};break;case 82:var X=n.destructLink(t[s]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 83:this.$=t[s-1];break;case 84:this.$={text:t[s],type:"text"};break;case 85:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 86:this.$={text:t[s],type:"string"};break;case 87:case 102:this.$={text:t[s],type:"markdown"};break;case 99:this.$={text:t[s],type:"text"};break;case 100:this.$={text:t[s-1].text+""+t[s],type:t[s-1].type};break;case 101:this.$={text:t[s],type:"text"};break;case 103:this.$=t[s-4],n.addClass(t[s-2],t[s]);break;case 104:this.$=t[s-4],n.setClass(t[s-2],t[s]);break;case 105:case 113:this.$=t[s-1],n.setClickEvent(t[s-1],t[s]);break;case 106:case 114:this.$=t[s-3],n.setClickEvent(t[s-3],t[s-2]),n.setTooltip(t[s-3],t[s]);break;case 107:this.$=t[s-2],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 108:this.$=t[s-4],n.setClickEvent(t[s-4],t[s-3],t[s-2]),n.setTooltip(t[s-4],t[s]);break;case 109:this.$=t[s-2],n.setLink(t[s-2],t[s]);break;case 110:this.$=t[s-4],n.setLink(t[s-4],t[s-2]),n.setTooltip(t[s-4],t[s]);break;case 111:this.$=t[s-4],n.setLink(t[s-4],t[s-2],t[s]);break;case 112:this.$=t[s-6],n.setLink(t[s-6],t[s-4],t[s]),n.setTooltip(t[s-6],t[s-2]);break;case 115:this.$=t[s-1],n.setLink(t[s-1],t[s]);break;case 116:this.$=t[s-3],n.setLink(t[s-3],t[s-2]),n.setTooltip(t[s-3],t[s]);break;case 117:this.$=t[s-3],n.setLink(t[s-3],t[s-2],t[s]);break;case 118:this.$=t[s-5],n.setLink(t[s-5],t[s-4],t[s]),n.setTooltip(t[s-5],t[s-2]);break;case 119:this.$=t[s-4],n.addVertex(t[s-2],void 0,void 0,t[s]);break;case 120:this.$=t[s-4],n.updateLink([t[s-2]],t[s]);break;case 121:this.$=t[s-4],n.updateLink(t[s-2],t[s]);break;case 122:this.$=t[s-8],n.updateLinkInterpolate([t[s-6]],t[s-2]),n.updateLink([t[s-6]],t[s]);break;case 123:this.$=t[s-8],n.updateLinkInterpolate(t[s-6],t[s-2]),n.updateLink(t[s-6],t[s]);break;case 124:this.$=t[s-6],n.updateLinkInterpolate([t[s-4]],t[s]);break;case 125:this.$=t[s-6],n.updateLinkInterpolate(t[s-4],t[s]);break;case 126:case 128:this.$=[t[s]];break;case 127:case 129:t[s-2].push(t[s]),this.$=t[s-2];break;case 131:this.$=t[s-1]+t[s];break;case 179:this.$=t[s];break;case 180:this.$=t[s-1]+""+t[s];break;case 182:this.$=t[s-1]+""+t[s];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:i,12:a},{1:[3]},e(u,d,{5:6}),{4:7,9:r,10:i,12:a},{4:8,9:r,10:i,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:j1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(u,[2,9]),e(u,[2,10]),e(u,[2,11]),{8:[1,54],9:[1,55],10:f1,15:53,18:56},e(C,[2,3]),e(C,[2,4]),e(C,[2,5]),e(C,[2,6]),e(C,[2,7]),e(C,[2,8]),{8:t1,9:s1,11:r1,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:t1,9:s1,11:r1,21:66},{8:t1,9:s1,11:r1,21:67},{8:t1,9:s1,11:r1,21:68},{8:t1,9:s1,11:r1,21:69},{8:t1,9:s1,11:r1,21:70},{8:t1,9:s1,10:[1,71],11:r1,21:72},e(C,[2,36]),{35:[1,73]},{37:[1,74]},e(C,[2,39]),e(T1,[2,50],{18:75,39:76,10:f1,40:me}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:y1,44:F1,60:v1,79:[1,85],88:_1,94:[1,82],96:[1,83],100:84,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},e(C,[2,183]),e(C,[2,184]),e(C,[2,185]),e(C,[2,186]),e(S1,[2,51]),e(S1,[2,54],{46:[1,98]}),e(M,[2,72],{112:111,29:[1,99],44:b,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:x,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(j,[2,179]),e(j,[2,140]),e(j,[2,141]),e(j,[2,142]),e(j,[2,143]),e(j,[2,144]),e(j,[2,145]),e(j,[2,146]),e(j,[2,147]),e(j,[2,148]),e(j,[2,149]),e(j,[2,150]),e(u,[2,12]),e(u,[2,18]),e(u,[2,19]),{9:[1,112]},e(Ee,[2,26],{18:113,10:f1}),e(C,[2,27]),{42:114,43:38,44:b,45:39,47:40,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(C,[2,40]),e(C,[2,41]),e(C,[2,42]),e(W1,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:Se,118:De},e([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),{10:xe,12:Ce,14:Te,27:ye,28:124,32:Fe,44:ve,60:_e,75:Be,79:[1,126],80:[1,127],82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:125,104:Oe,108:Ge,110:Me,113:Ue,114:We,115:ze},e(ne,d,{5:150}),e(C,[2,37]),e(C,[2,38]),e(T1,[2,48],{44:Ke}),e(T1,[2,49],{18:152,10:f1,40:Ye}),e(S1,[2,44]),{44:b,47:154,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{101:[1,155],102:156,104:[1,157]},{44:b,47:158,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{44:b,47:159,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},e(F,[2,113],{119:164,10:[1,163],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,115],{10:[1,165]}),e(q,[2,181]),e(q,[2,168]),e(q,[2,169]),e(q,[2,170]),e(q,[2,171]),e(q,[2,172]),e(q,[2,173]),e(q,[2,174]),e(q,[2,175]),e(q,[2,176]),e(q,[2,177]),e(q,[2,178]),{44:b,47:166,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{30:167,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:175,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:177,50:[1,176],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:178,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:179,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:180,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{108:[1,181]},{30:182,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:183,65:[1,184],67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:185,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:186,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{30:187,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(j,[2,180]),e(u,[2,20]),e(Ee,[2,25]),e(T1,[2,46],{39:188,18:189,10:f1,40:me}),e(W1,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{77:[1,193],78:194,115:Se,118:De},e(P1,[2,78]),e(P1,[2,80]),e(P1,[2,81]),e(P1,[2,166]),e(P1,[2,167]),{8:t1,9:s1,10:xe,11:r1,12:Ce,14:Te,21:196,27:ye,29:[1,195],32:Fe,44:ve,60:_e,75:Be,82:137,83:Ve,84:Le,85:we,86:Ie,87:Re,88:Ne,89:Pe,90:197,104:Oe,108:Ge,110:Me,113:Ue,114:We,115:ze},e(T,[2,99]),e(T,[2,101]),e(T,[2,102]),e(T,[2,155]),e(T,[2,156]),e(T,[2,157]),e(T,[2,158]),e(T,[2,159]),e(T,[2,160]),e(T,[2,161]),e(T,[2,162]),e(T,[2,163]),e(T,[2,164]),e(T,[2,165]),e(T,[2,88]),e(T,[2,89]),e(T,[2,90]),e(T,[2,91]),e(T,[2,92]),e(T,[2,93]),e(T,[2,94]),e(T,[2,95]),e(T,[2,96]),e(T,[2,97]),e(T,[2,98]),{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,32:[1,198],33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:j1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:f1,18:199},{44:[1,200]},e(S1,[2,43]),{10:[1,201],44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,202]},{10:[1,203],105:[1,204]},e(je,[2,126]),{10:[1,205],44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{10:[1,206],44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:111,113:N,114:P,115:O},{79:[1,207]},e(F,[2,107],{10:[1,208]}),e(F,[2,109],{10:[1,209]}),{79:[1,210]},e(q,[2,182]),{79:[1,211],97:[1,212]},e(S1,[2,55],{112:111,44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),{31:[1,213],67:k,81:214,115:m,116:E,117:S},e(g1,[2,84]),e(g1,[2,86]),e(g1,[2,87]),e(g1,[2,151]),e(g1,[2,152]),e(g1,[2,153]),e(g1,[2,154]),{49:[1,215],67:k,81:214,115:m,116:E,117:S},{30:216,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{51:[1,217],67:k,81:214,115:m,116:E,117:S},{53:[1,218],67:k,81:214,115:m,116:E,117:S},{55:[1,219],67:k,81:214,115:m,116:E,117:S},{57:[1,220],67:k,81:214,115:m,116:E,117:S},{60:[1,221]},{64:[1,222],67:k,81:214,115:m,116:E,117:S},{66:[1,223],67:k,81:214,115:m,116:E,117:S},{30:224,67:k,79:U,80:W,81:168,115:m,116:E,117:S},{31:[1,225],67:k,81:214,115:m,116:E,117:S},{67:k,69:[1,226],71:[1,227],81:214,115:m,116:E,117:S},{67:k,69:[1,229],71:[1,228],81:214,115:m,116:E,117:S},e(T1,[2,45],{18:152,10:f1,40:Ye}),e(T1,[2,47],{44:Ke}),e(W1,[2,75]),e(W1,[2,74]),{62:[1,230],67:k,81:214,115:m,116:E,117:S},e(W1,[2,77]),e(P1,[2,79]),{30:231,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(ne,d,{5:232}),e(T,[2,100]),e(C,[2,35]),{43:233,44:b,45:39,47:40,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},{10:f1,18:234},{10:i1,60:a1,83:n1,91:235,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:246,103:[1,247],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:248,103:[1,249],104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{104:[1,250]},{10:i1,60:a1,83:n1,91:251,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{44:b,47:252,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},e(F,[2,114]),e(F,[2,116],{10:[1,256]}),e(F,[2,117]),e(M,[2,56]),e(g1,[2,85]),e(M,[2,57]),{51:[1,257],67:k,81:214,115:m,116:E,117:S},e(M,[2,64]),e(M,[2,59]),e(M,[2,60]),e(M,[2,61]),{108:[1,258]},e(M,[2,63]),e(M,[2,65]),{66:[1,259],67:k,81:214,115:m,116:E,117:S},e(M,[2,67]),e(M,[2,68]),e(M,[2,70]),e(M,[2,69]),e(M,[2,71]),e([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,32:[1,261],33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:j1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},e(S1,[2,53]),{43:262,44:b,45:39,47:40,60:x,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O},e(F,[2,119],{105:O1}),e(qe,[2,128],{107:264,10:i1,60:a1,83:n1,104:u1,108:l1,109:o1,110:c1,111:h1}),e($,[2,130]),e($,[2,132]),e($,[2,133]),e($,[2,134]),e($,[2,135]),e($,[2,136]),e($,[2,137]),e($,[2,138]),e($,[2,139]),e(F,[2,120],{105:O1}),{10:[1,265]},e(F,[2,121],{105:O1}),{10:[1,266]},e(je,[2,127]),e(F,[2,103],{105:O1}),e(F,[2,104],{112:111,44:b,60:x,88:B,101:V,104:L,105:w,108:I,110:R,113:N,114:P,115:O}),e(F,[2,108]),e(F,[2,110],{10:[1,267]}),e(F,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:t1,9:s1,11:r1,21:272},e(C,[2,34]),e(S1,[2,52]),{10:i1,60:a1,83:n1,104:u1,106:273,107:237,108:l1,109:o1,110:c1,111:h1},e($,[2,131]),{14:y1,44:F1,60:v1,88:_1,100:274,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{14:y1,44:F1,60:v1,88:_1,100:275,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1,119:86},{97:[1,276]},e(F,[2,118]),e(M,[2,58]),{30:277,67:k,79:U,80:W,81:168,115:m,116:E,117:S},e(M,[2,66]),e(ne,d,{5:278}),e(qe,[2,129],{107:264,10:i1,60:a1,83:n1,104:u1,108:l1,109:o1,110:c1,111:h1}),e(F,[2,124],{119:164,10:[1,279],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,125],{119:164,10:[1,280],14:y1,44:F1,60:v1,88:_1,104:B1,105:V1,108:L1,110:w1,113:I1,114:R1,115:N1}),e(F,[2,112]),{31:[1,281],67:k,81:214,115:m,116:E,117:S},{6:11,7:12,8:g,9:D,10:c,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:v,32:[1,282],33:24,34:z,36:_,38:h,42:28,43:38,44:b,45:39,47:40,60:x,83:Z,84:k1,85:m1,86:E1,87:j1,88:B,101:V,104:L,105:w,108:I,110:R,112:41,113:N,114:P,115:O,120:q1,121:H1,122:X1,123:Q1},{10:i1,60:a1,83:n1,91:283,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},{10:i1,60:a1,83:n1,91:284,104:u1,106:236,107:237,108:l1,109:o1,110:c1,111:h1},e(M,[2,62]),e(C,[2,33]),e(F,[2,122],{105:O1}),e(F,[2,123],{105:O1})],defaultActions:{},parseError:l(function(p,f){if(f.recoverable)this.trace(p);else{var A=new Error(p);throw A.hash=f,A}},"parseError"),parse:l(function(p){var f=this,A=[0],n=[],y=[null],t=[],z1=this.table,s="",X=0,He=0,ht=2,Xe=1,dt=t.slice.call(arguments,1),G=Object.create(this.lexer),D1={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(D1.yy[le]=this.yy[le]);G.setInput(p,D1.yy),D1.yy.lexer=G,D1.yy.parser=this,typeof G.yylloc>"u"&&(G.yylloc={});var oe=G.yylloc;t.push(oe);var pt=G.options&&G.options.ranges;typeof D1.yy.parseError=="function"?this.parseError=D1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(H){A.length=A.length-2*H,y.length=y.length-H,t.length=t.length-H}l(ft,"popStack");function Qe(){var H;return H=n.pop()||G.lex()||Xe,typeof H!="number"&&(H instanceof Array&&(n=H,H=n.pop()),H=f.symbols_[H]||H),H}l(Qe,"lex");for(var K,x1,Q,ce,G1={},Z1,d1,Je,$1;;){if(x1=A[A.length-1],this.defaultActions[x1]?Q=this.defaultActions[x1]:((K===null||typeof K>"u")&&(K=Qe()),Q=z1[x1]&&z1[x1][K]),typeof Q>"u"||!Q.length||!Q[0]){var he="";$1=[];for(Z1 in z1[x1])this.terminals_[Z1]&&Z1>ht&&$1.push("'"+this.terminals_[Z1]+"'");G.showPosition?he="Parse error on line "+(X+1)+`: `+G.showPosition()+` -Expecting `+$1.join(", ")+", got '"+(this.terminals_[j]||j)+"'":he="Parse error on line "+(X+1)+": Unexpected "+(j==Xe?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(he,{text:G.match,token:this.terminals_[j]||j,line:G.yylineno,loc:oe,expected:$1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x1+", token: "+j);switch(Q[0]){case 1:A.push(j),y.push(G.yytext),t.push(G.yylloc),A.push(Q[1]),j=null,He=G.yyleng,s=G.yytext,X=G.yylineno,oe=G.yylloc;break;case 2:if(d1=this.productions_[Q[1]][1],G1.$=y[y.length-d1],G1._$={first_line:t[t.length-(d1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(d1||1)].first_column,last_column:t[t.length-1].last_column},ft&&(G1._$.range=[t[t.length-(d1||1)].range[0],t[t.length-1].range[1]]),ce=this.performAction.apply(G1,[s,He,X,D1.yy,Q[1],y,t].concat(dt)),typeof ce<"u")return ce;d1&&(A=A.slice(0,-1*d1*2),y=y.slice(0,-1*d1),t=t.slice(0,-1*d1)),A.push(this.productions_[Q[1]][0]),y.push(G1.$),t.push(G1._$),Je=z1[A[A.length-2]][A[A.length-1]],A.push(Je);break;case 3:return!0}}return!0},"parse")},ct=function(){var A1={EOF:1,parseError:l(function(p,A){if(this.yy.parser)this.yy.parser.parseError(p,A);else throw new Error(p)},"parseError"),setInput:l(function(f,p){return this.yy=p||this.yy||{},this._input=f,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var p=f.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),f},"input"),unput:l(function(f){var p=f.length,A=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===a.length?this.yylloc.first_column:0)+a[a.length-A.length].length-A[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(f){this.unput(this.match.slice(f))},"less"),pastInput:l(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var f=this.match;return f.length<20&&(f+=this._input.substr(0,20-f.length)),(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var f=this.pastInput(),p=new Array(f.length+1).join("-");return f+this.upcomingInput()+` -`+p+"^"},"showPosition"),test_match:l(function(f,p){var A,a,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),a=f[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(f[0].length),this.matched+=f[0],A=this.performAction.call(this,this.yy,this,p,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var f,p,A,a;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;tp[0].length)){if(p=A,a=t,this.options.backtrack_lexer){if(f=this.test_match(A,y[t]),f!==!1)return f;if(this._backtrack){p=!1;continue}else return!1}else if(!this.options.flex)break}return p?(f=this.test_match(p,y[a]),f!==!1?f:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var p=this.next();return p||this.lex()},"lex"),begin:l(function(p){this.conditionStack.push(p)},"begin"),popState:l(function(){var p=this.conditionStack.length-1;return p>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(p){return p=this.conditionStack.length-1-Math.abs(p||0),p>=0?this.conditionStack[p]:"INITIAL"},"topState"),pushState:l(function(p){this.begin(p)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:l(function(p,A,a,y){switch(a){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),A.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return A.yytext=A.yytext.replace(t,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return p.lex.firstGraph()&&this.begin("dir"),12;case 36:return p.lex.firstGraph()&&this.begin("dir"),12;case 37:return p.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return A1}();ue.lexer=ct;function J1(){this.yy={}}return l(J1,"Parser"),J1.prototype=ue,ue.Parser=J1,new J1}();pe.parser=pe;var gs=pe,As=l((e,r)=>{const n=wt,i=n(e,"r"),u=n(e,"g"),d=n(e,"b");return Lt(i,u,d,r)},"fade"),bs=l(e=>`.label { +Expecting `+$1.join(", ")+", got '"+(this.terminals_[K]||K)+"'":he="Parse error on line "+(X+1)+": Unexpected "+(K==Xe?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(he,{text:G.match,token:this.terminals_[K]||K,line:G.yylineno,loc:oe,expected:$1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x1+", token: "+K);switch(Q[0]){case 1:A.push(K),y.push(G.yytext),t.push(G.yylloc),A.push(Q[1]),K=null,He=G.yyleng,s=G.yytext,X=G.yylineno,oe=G.yylloc;break;case 2:if(d1=this.productions_[Q[1]][1],G1.$=y[y.length-d1],G1._$={first_line:t[t.length-(d1||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(d1||1)].first_column,last_column:t[t.length-1].last_column},pt&&(G1._$.range=[t[t.length-(d1||1)].range[0],t[t.length-1].range[1]]),ce=this.performAction.apply(G1,[s,He,X,D1.yy,Q[1],y,t].concat(dt)),typeof ce<"u")return ce;d1&&(A=A.slice(0,-1*d1*2),y=y.slice(0,-1*d1),t=t.slice(0,-1*d1)),A.push(this.productions_[Q[1]][0]),y.push(G1.$),t.push(G1._$),Je=z1[A[A.length-2]][A[A.length-1]],A.push(Je);break;case 3:return!0}}return!0},"parse")},ct=function(){var A1={EOF:1,parseError:l(function(f,A){if(this.yy.parser)this.yy.parser.parseError(f,A);else throw new Error(f)},"parseError"),setInput:l(function(p,f){return this.yy=f||this.yy||{},this._input=p,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var f=p.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},"input"),unput:l(function(p){var f=p.length,A=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===n.length?this.yylloc.first_column:0)+n[n.length-A.length].length-A[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(p){this.unput(this.match.slice(p))},"less"),pastInput:l(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var p=this.pastInput(),f=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+f+"^"},"showPosition"),test_match:l(function(p,f){var A,n,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),n=p[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(p[0].length),this.matched+=p[0],A=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var t in y)this[t]=y[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,f,A,n;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),t=0;tf[0].length)){if(f=A,n=t,this.options.backtrack_lexer){if(p=this.test_match(A,y[t]),p!==!1)return p;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(p=this.test_match(f,y[n]),p!==!1?p:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var f=this.next();return f||this.lex()},"lex"),begin:l(function(f){this.conditionStack.push(f)},"begin"),popState:l(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:l(function(f){this.begin(f)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:l(function(f,A,n,y){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),A.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const t=/\n\s*/g;return A.yytext=A.yytext.replace(t,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 17:this.popState();break;case 18:return 95;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 87;case 35:return f.lex.firstGraph()&&this.begin("dir"),12;case 36:return f.lex.firstGraph()&&this.begin("dir"),12;case 37:return f.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 97;case 41:return 97;case 42:return 97;case 43:return 97;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:return 110;case 61:return 46;case 62:return 60;case 63:return 44;case 64:return 8;case 65:return 105;case 66:return 114;case 67:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:return 118;case 70:return this.popState(),77;case 71:return this.pushState("thickEdgeText"),75;case 72:return 118;case 73:return this.popState(),77;case 74:return this.pushState("dottedEdgeText"),75;case 75:return 118;case 76:return 77;case 77:return this.popState(),53;case 78:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 100:return 114;case 101:return 110;case 102:return 44;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}};return A1}();ue.lexer=ct;function J1(){this.yy={}}return l(J1,"Parser"),J1.prototype=ue,ue.Parser=J1,new J1}();fe.parser=fe;var gs=fe,As=l((e,r)=>{const i=wt,a=i(e,"r"),u=i(e,"g"),d=i(e,"b");return Vt(a,u,d,r)},"fade"),bs=l(e=>`.label { font-family: ${e.fontFamily}; color: ${e.nodeTextColor||e.textColor}; } @@ -157,4 +157,4 @@ Expecting `+$1.join(", ")+", got '"+(this.terminals_[j]||j)+"'":he="Parse error } text-align: center; } -`,"getStyles"),ks=bs,Ds={parser:gs,db:de,renderer:ps,styles:ks,init:l(e=>{e.flowchart||(e.flowchart={}),e.layout&&Ze({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ze({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),de.clear(),de.setGen("gen-2")},"init")};export{Ds as diagram}; +`,"getStyles"),ks=bs,Ds={parser:gs,db:de,renderer:fs,styles:ks,init:l(e=>{e.flowchart||(e.flowchart={}),e.layout&&Ze({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ze({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),de.clear(),de.setGen("gen-2")},"init")};export{Ds as diagram}; diff --git a/static/js/md-ganttDiagram-NTVNEXSI-BwU4qRp4.js b/static/js/md-ganttDiagram-NTVNEXSI-BwU4qRp4.js deleted file mode 100644 index 23ec4dd78..000000000 --- a/static/js/md-ganttDiagram-NTVNEXSI-BwU4qRp4.js +++ /dev/null @@ -1,257 +0,0 @@ -import{aV as Jt,aW as $t,aX as Kt,aY as en,aZ as Fn,a_ as rt,a$ as En,aH as vt,aI as bt,_ as d,b0 as ae,d as _e,s as Ln,g as An,p as In,q as Wn,c as On,b as Hn,v as Nn,m as Vn,l as Qe,j as Ze,k as zn,e as Pn,u as Rn}from"./md-index-BVqvVggs.js";import{b as Bn,t as It,c as Zn,a as qn,l as Xn}from"./md-linear-BdLRedgo.js";import{i as Gn}from"./md-init-Gi6I4Gst.js";function jn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(n=a)&&(n=a)}return n}function Qn(e,t){let n;if(t===void 0)for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of e)(a=t(a,++r,e))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function Jn(e){return e}var Xe=1,at=2,mt=3,qe=4,Wt=1e-6;function $n(e){return"translate("+e+",0)"}function Kn(e){return"translate(0,"+e+")"}function er(e){return t=>+e(t)}function tr(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function nr(){return!this.__axis}function tn(e,t){var n=[],r=null,a=null,i=6,s=6,k=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,v=e===Xe||e===qe?-1:1,g=e===qe||e===at?"x":"y",F=e===Xe||e===mt?$n:Kn;function D(b){var X=r??(t.ticks?t.ticks.apply(t,n):t.domain()),O=a??(t.tickFormat?t.tickFormat.apply(t,n):Jn),C=Math.max(i,0)+k,I=t.range(),V=+I[0]+M,W=+I[I.length-1]+M,Z=(t.bandwidth?tr:er)(t.copy(),M),Q=b.selection?b.selection():b,w=Q.selectAll(".domain").data([null]),H=Q.selectAll(".tick").data(X,t).order(),x=H.exit(),Y=H.enter().append("g").attr("class","tick"),_=H.select("line"),S=H.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(Y),_=_.merge(Y.append("line").attr("stroke","currentColor").attr(g+"2",v*i)),S=S.merge(Y.append("text").attr("fill","currentColor").attr(g,v*C).attr("dy",e===Xe?"0em":e===mt?"0.71em":"0.32em")),b!==Q&&(w=w.transition(b),H=H.transition(b),_=_.transition(b),S=S.transition(b),x=x.transition(b).attr("opacity",Wt).attr("transform",function(p){return isFinite(p=Z(p))?F(p+M):this.getAttribute("transform")}),Y.attr("opacity",Wt).attr("transform",function(p){var U=this.parentNode.__axis;return F((U&&isFinite(U=U(p))?U:Z(p))+M)})),x.remove(),w.attr("d",e===qe||e===at?s?"M"+v*s+","+V+"H"+M+"V"+W+"H"+v*s:"M"+M+","+V+"V"+W:s?"M"+V+","+v*s+"V"+M+"H"+W+"V"+v*s:"M"+V+","+M+"H"+W),H.attr("opacity",1).attr("transform",function(p){return F(Z(p)+M)}),_.attr(g+"2",v*i),S.attr(g,v*C).text(O),Q.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===at?"start":e===qe?"end":"middle"),Q.each(function(){this.__axis=Z})}return D.scale=function(b){return arguments.length?(t=b,D):t},D.ticks=function(){return n=Array.from(arguments),D},D.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),D):n.slice()},D.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),D):r&&r.slice()},D.tickFormat=function(b){return arguments.length?(a=b,D):a},D.tickSize=function(b){return arguments.length?(i=s=+b,D):i},D.tickSizeInner=function(b){return arguments.length?(i=+b,D):i},D.tickSizeOuter=function(b){return arguments.length?(s=+b,D):s},D.tickPadding=function(b){return arguments.length?(k=+b,D):k},D.offset=function(b){return arguments.length?(M=+b,D):M},D}function rr(e){return tn(Xe,e)}function ar(e){return tn(mt,e)}const ir=Math.PI/180,sr=180/Math.PI,Je=18,nn=.96422,rn=1,an=.82521,sn=4/29,Se=6/29,on=3*Se*Se,or=Se*Se*Se;function cn(e){if(e instanceof fe)return new fe(e.l,e.a,e.b,e.opacity);if(e instanceof he)return un(e);e instanceof Kt||(e=Fn(e));var t=ct(e.r),n=ct(e.g),r=ct(e.b),a=it((.2225045*t+.7168786*n+.0606169*r)/rn),i,s;return t===n&&n===r?i=s=a:(i=it((.4360747*t+.3850649*n+.1430804*r)/nn),s=it((.0139322*t+.0971045*n+.7141733*r)/an)),new fe(116*a-16,500*(i-a),200*(a-s),e.opacity)}function cr(e,t,n,r){return arguments.length===1?cn(e):new fe(e,t,n,r??1)}function fe(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}Jt(fe,cr,$t(en,{brighter(e){return new fe(this.l+Je*(e??1),this.a,this.b,this.opacity)},darker(e){return new fe(this.l-Je*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=nn*st(t),e=rn*st(e),n=an*st(n),new Kt(ot(3.1338561*t-1.6168667*e-.4906146*n),ot(-.9787684*t+1.9161415*e+.033454*n),ot(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function it(e){return e>or?Math.pow(e,1/3):e/on+sn}function st(e){return e>Se?e*e*e:on*(e-sn)}function ot(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function ct(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function ur(e){if(e instanceof he)return new he(e.h,e.c,e.l,e.opacity);if(e instanceof fe||(e=cn(e)),e.a===0&&e.b===0)return new he(NaN,0(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),k=a.ceil(i);return i-s(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,k)=>{const M=[];if(i=a.ceil(i),k=k==null?1:Math.floor(k),!(i0))return M;let v;do M.push(v=new Date(+i)),t(i,k),e(i);while(vte(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,k)=>{if(s>=s)if(k<0)for(;++k<=0;)for(;t(s,-1),!i(s););else for(;--k>=0;)for(;t(s,1),!i(s););}),n&&(a.count=(i,s)=>(ut.setTime(+i),lt.setTime(+s),e(ut),e(lt),Math.floor(n(ut,lt))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ue=te(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Ue.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?te(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Ue);Ue.range;const me=1e3,ce=me*60,ge=ce*60,ye=ge*24,xt=ye*7,Ot=ye*30,ft=ye*365,Te=te(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*me)},(e,t)=>(t-e)/me,e=>e.getUTCSeconds());Te.range;const We=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*me)},(e,t)=>{e.setTime(+e+t*ce)},(e,t)=>(t-e)/ce,e=>e.getMinutes());We.range;const hr=te(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ce)},(e,t)=>(t-e)/ce,e=>e.getUTCMinutes());hr.range;const Oe=te(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*me-e.getMinutes()*ce)},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getHours());Oe.range;const mr=te(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ge)},(e,t)=>(t-e)/ge,e=>e.getUTCHours());mr.range;const ve=te(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ce)/ye,e=>e.getDate()-1);ve.range;const wt=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ye,e=>e.getUTCDate()-1);wt.range;const gr=te(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ye,e=>Math.floor(e/ye));gr.range;function we(e){return te(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ce)/xt)}const Ve=we(0),He=we(1),ln=we(2),fn=we(3),be=we(4),dn=we(5),hn=we(6);Ve.range;He.range;ln.range;fn.range;be.range;dn.range;hn.range;function De(e){return te(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/xt)}const mn=De(0),$e=De(1),yr=De(2),kr=De(3),Fe=De(4),pr=De(5),Tr=De(6);mn.range;$e.range;yr.range;kr.range;Fe.range;pr.range;Tr.range;const Ne=te(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Ne.range;const vr=te(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());vr.range;const ke=te(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ke.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ke.range;const xe=te(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());xe.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:te(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});xe.range;function br(e,t,n,r,a,i){const s=[[Te,1,me],[Te,5,5*me],[Te,15,15*me],[Te,30,30*me],[i,1,ce],[i,5,5*ce],[i,15,15*ce],[i,30,30*ce],[a,1,ge],[a,3,3*ge],[a,6,6*ge],[a,12,12*ge],[r,1,ye],[r,2,2*ye],[n,1,xt],[t,1,Ot],[t,3,3*Ot],[e,1,ft]];function k(v,g,F){const D=gC).right(s,D);if(b===s.length)return e.every(It(v/ft,g/ft,F));if(b===0)return Ue.every(Math.max(It(v,g,F),1));const[X,O]=s[D/s[b-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?(L=ht(Le(l.y,0,1)),j=L.getUTCDay(),L=j>4||j===0?$e.ceil(L):$e(L),L=wt.offset(L,(l.V-1)*7),l.y=L.getUTCFullYear(),l.m=L.getUTCMonth(),l.d=L.getUTCDate()+(l.w+6)%7):(L=dt(Le(l.y,0,1)),j=L.getDay(),L=j>4||j===0?He.ceil(L):He(L),L=ve.offset(L,(l.V-1)*7),l.y=L.getFullYear(),l.m=L.getMonth(),l.d=L.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),j="Z"in l?ht(Le(l.y,0,1)).getUTCDay():dt(Le(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(j+5)%7:l.w+l.U*7-(j+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,ht(l)):dt(l)}}function x(T,A,N,l){for(var $=0,L=A.length,j=N.length,q,re;$=j)return-1;if(q=A.charCodeAt($++),q===37){if(q=A.charAt($++),re=Q[q in Ht?A.charAt($++):q],!re||(l=re(T,N,l))<0)return-1}else if(q!=N.charCodeAt(l++))return-1}return l}function Y(T,A,N){var l=v.exec(A.slice(N));return l?(T.p=g.get(l[0].toLowerCase()),N+l[0].length):-1}function _(T,A,N){var l=b.exec(A.slice(N));return l?(T.w=X.get(l[0].toLowerCase()),N+l[0].length):-1}function S(T,A,N){var l=F.exec(A.slice(N));return l?(T.w=D.get(l[0].toLowerCase()),N+l[0].length):-1}function p(T,A,N){var l=I.exec(A.slice(N));return l?(T.m=V.get(l[0].toLowerCase()),N+l[0].length):-1}function U(T,A,N){var l=O.exec(A.slice(N));return l?(T.m=C.get(l[0].toLowerCase()),N+l[0].length):-1}function u(T,A,N){return x(T,t,A,N)}function f(T,A,N){return x(T,n,A,N)}function y(T,A,N){return x(T,r,A,N)}function m(T){return s[T.getDay()]}function E(T){return i[T.getDay()]}function c(T){return M[T.getMonth()]}function h(T){return k[T.getMonth()]}function o(T){return a[+(T.getHours()>=12)]}function P(T){return 1+~~(T.getMonth()/3)}function z(T){return s[T.getUTCDay()]}function R(T){return i[T.getUTCDay()]}function K(T){return M[T.getUTCMonth()]}function G(T){return k[T.getUTCMonth()]}function J(T){return a[+(T.getUTCHours()>=12)]}function ie(T){return 1+~~(T.getUTCMonth()/3)}return{format:function(T){var A=w(T+="",W);return A.toString=function(){return T},A},parse:function(T){var A=H(T+="",!1);return A.toString=function(){return T},A},utcFormat:function(T){var A=w(T+="",Z);return A.toString=function(){return T},A},utcParse:function(T){var A=H(T+="",!0);return A.toString=function(){return T},A}}}var Ht={"-":"",_:" ",0:"0"},ne=/^\s*\d+/,Cr=/^%/,Mr=/[\\^$*+?|[\]().{}]/g;function B(e,t,n){var r=e<0?"-":"",a=(r?-e:e)+"",i=a.length;return r+(i[t.toLowerCase(),n]))}function Sr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Yr(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ur(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Fr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Er(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Nt(e,t,n){var r=ne.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lr(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ar(e,t,n){var r=ne.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ir(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function zt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Wr(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Pt(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Or(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Hr(e,t,n){var r=ne.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Nr(e,t,n){var r=ne.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vr(e,t,n){var r=ne.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zr(e,t,n){var r=Cr.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Pr(e,t,n){var r=ne.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Rr(e,t,n){var r=ne.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Rt(e,t){return B(e.getDate(),t,2)}function Br(e,t){return B(e.getHours(),t,2)}function Zr(e,t){return B(e.getHours()%12||12,t,2)}function qr(e,t){return B(1+ve.count(ke(e),e),t,3)}function gn(e,t){return B(e.getMilliseconds(),t,3)}function Xr(e,t){return gn(e,t)+"000"}function Gr(e,t){return B(e.getMonth()+1,t,2)}function jr(e,t){return B(e.getMinutes(),t,2)}function Qr(e,t){return B(e.getSeconds(),t,2)}function Jr(e){var t=e.getDay();return t===0?7:t}function $r(e,t){return B(Ve.count(ke(e)-1,e),t,2)}function yn(e){var t=e.getDay();return t>=4||t===0?be(e):be.ceil(e)}function Kr(e,t){return e=yn(e),B(be.count(ke(e),e)+(ke(e).getDay()===4),t,2)}function ea(e){return e.getDay()}function ta(e,t){return B(He.count(ke(e)-1,e),t,2)}function na(e,t){return B(e.getFullYear()%100,t,2)}function ra(e,t){return e=yn(e),B(e.getFullYear()%100,t,2)}function aa(e,t){return B(e.getFullYear()%1e4,t,4)}function ia(e,t){var n=e.getDay();return e=n>=4||n===0?be(e):be.ceil(e),B(e.getFullYear()%1e4,t,4)}function sa(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+B(t/60|0,"0",2)+B(t%60,"0",2)}function Bt(e,t){return B(e.getUTCDate(),t,2)}function oa(e,t){return B(e.getUTCHours(),t,2)}function ca(e,t){return B(e.getUTCHours()%12||12,t,2)}function ua(e,t){return B(1+wt.count(xe(e),e),t,3)}function kn(e,t){return B(e.getUTCMilliseconds(),t,3)}function la(e,t){return kn(e,t)+"000"}function fa(e,t){return B(e.getUTCMonth()+1,t,2)}function da(e,t){return B(e.getUTCMinutes(),t,2)}function ha(e,t){return B(e.getUTCSeconds(),t,2)}function ma(e){var t=e.getUTCDay();return t===0?7:t}function ga(e,t){return B(mn.count(xe(e)-1,e),t,2)}function pn(e){var t=e.getUTCDay();return t>=4||t===0?Fe(e):Fe.ceil(e)}function ya(e,t){return e=pn(e),B(Fe.count(xe(e),e)+(xe(e).getUTCDay()===4),t,2)}function ka(e){return e.getUTCDay()}function pa(e,t){return B($e.count(xe(e)-1,e),t,2)}function Ta(e,t){return B(e.getUTCFullYear()%100,t,2)}function va(e,t){return e=pn(e),B(e.getUTCFullYear()%100,t,2)}function ba(e,t){return B(e.getUTCFullYear()%1e4,t,4)}function xa(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Fe(e):Fe.ceil(e),B(e.getUTCFullYear()%1e4,t,4)}function wa(){return"+0000"}function Zt(){return"%"}function qt(e){return+e}function Xt(e){return Math.floor(+e/1e3)}var Me,Ke;Da({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Da(e){return Me=Dr(e),Ke=Me.format,Me.parse,Me.utcFormat,Me.utcParse,Me}function Ca(e){return new Date(e)}function Ma(e){return e instanceof Date?+e:+new Date(+e)}function Tn(e,t,n,r,a,i,s,k,M,v){var g=Zn(),F=g.invert,D=g.domain,b=v(".%L"),X=v(":%S"),O=v("%I:%M"),C=v("%I %p"),I=v("%a %d"),V=v("%b %d"),W=v("%B"),Z=v("%Y");function Q(w){return(M(w)4&&(b+=7),D.add(b,n));return X.diff(O,"week")+1},k.isoWeekday=function(v){return this.$utils().u(v)?this.day()||7:this.day(this.day()%7?v:v-7)};var M=k.startOf;k.startOf=function(v,g){var F=this.$utils(),D=!!F.u(g)||g;return F.p(v)==="isoweek"?D?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(v,g)}}})})(vn);var Sa=vn.exports;const Ya=bt(Sa);var bn={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,s=/\d\d?/,k=/\d*[^-_:/,()\s\d]+/,M={},v=function(C){return(C=+C)+(C>68?1900:2e3)},g=function(C){return function(I){this[C]=+I}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(C){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(C)}],D=function(C){var I=M[C];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(C,I){var V,W=M.meridiem;if(W){for(var Z=1;Z<=24;Z+=1)if(C.indexOf(W(Z,0,I))>-1){V=Z>12;break}}else V=C===(I?"pm":"PM");return V},X={A:[k,function(C){this.afternoon=b(C,!1)}],a:[k,function(C){this.afternoon=b(C,!0)}],Q:[a,function(C){this.month=3*(C-1)+1}],S:[a,function(C){this.milliseconds=100*+C}],SS:[i,function(C){this.milliseconds=10*+C}],SSS:[/\d{3}/,function(C){this.milliseconds=+C}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[i,g("day")],Do:[k,function(C){var I=M.ordinal,V=C.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===C&&(this.day=W)}],w:[s,g("week")],ww:[i,g("week")],M:[s,g("month")],MM:[i,g("month")],MMM:[k,function(C){var I=D("months"),V=(D("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(C)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[k,function(C){var I=D("months").indexOf(C)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[i,function(C){this.year=v(C)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function O(C){var I,V;I=C,V=M&&M.formats;for(var W=(C=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,S,p){var U=p&&p.toUpperCase();return S||V[p]||n[p]||V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(u,f,y){return f||y.slice(1)})})).match(r),Z=W.length,Q=0;Q-1)return new Date((E==="X"?1e3:1)*m);var o=O(E)(m),P=o.year,z=o.month,R=o.day,K=o.hours,G=o.minutes,J=o.seconds,ie=o.milliseconds,T=o.zone,A=o.week,N=new Date,l=R||(P||z?1:N.getDate()),$=P||N.getFullYear(),L=0;P&&!z||(L=z>0?z-1:N.getMonth());var j,q=K||0,re=G||0,se=J||0,pe=ie||0;return T?new Date(Date.UTC($,L,l,q,re,se,pe+60*T.offset*1e3)):c?new Date(Date.UTC($,L,l,q,re,se,pe)):(j=new Date($,L,l,q,re,se,pe),A&&(j=h(j).week(A).toDate()),j)}catch{return new Date("")}}(w,Y,H,V),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),p&&w!=this.format(Y)&&(this.$d=new Date("")),M={}}else if(Y instanceof Array)for(var u=Y.length,f=1;f<=u;f+=1){x[1]=Y[f-1];var y=V.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}f===u&&(this.$d=new Date(""))}else Z.call(this,Q)}}})})(bn);var Ua=bn.exports;const Fa=bt(Ua);var xn={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(vt,function(){return function(n,r){var a=r.prototype,i=a.format;a.format=function(s){var k=this,M=this.$locale();if(!this.isValid())return i.bind(this)(s);var v=this.$utils(),g=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((k.$M+1)/3);case"Do":return M.ordinal(k.$D);case"gggg":return k.weekYear();case"GGGG":return k.isoWeekYear();case"wo":return M.ordinal(k.week(),"W");case"w":case"ww":return v.s(k.week(),F==="w"?1:2,"0");case"W":case"WW":return v.s(k.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return v.s(String(k.$H===0?24:k.$H),F==="k"?1:2,"0");case"X":return Math.floor(k.$d.getTime()/1e3);case"x":return k.$d.getTime();case"z":return"["+k.offsetName()+"]";case"zzz":return"["+k.offsetName("long")+"]";default:return F}});return i.bind(this)(g)}}})})(xn);var Ea=xn.exports;const La=bt(Ea);var yt=function(){var e=d(function(U,u,f,y){for(f=f||{},y=U.length;y--;f[U[y]]=u);return f},"o"),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],a=[1,28],i=[1,29],s=[1,30],k=[1,31],M=[1,32],v=[1,33],g=[1,34],F=[1,9],D=[1,10],b=[1,11],X=[1,12],O=[1,13],C=[1,14],I=[1,15],V=[1,16],W=[1,19],Z=[1,20],Q=[1,21],w=[1,22],H=[1,23],x=[1,25],Y=[1,35],_={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(u,f,y,m,E,c,h){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:v,21:g,22:F,23:D,24:b,25:X,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:v,21:g,22:F,23:D,24:b,25:X,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:d(function(u,f){if(f.recoverable)this.trace(u);else{var y=new Error(u);throw y.hash=f,y}},"parseError"),parse:d(function(u){var f=this,y=[0],m=[],E=[null],c=[],h=this.table,o="",P=0,z=0,R=2,K=1,G=c.slice.call(arguments,1),J=Object.create(this.lexer),ie={yy:{}};for(var T in this.yy)Object.prototype.hasOwnProperty.call(this.yy,T)&&(ie.yy[T]=this.yy[T]);J.setInput(u,ie.yy),ie.yy.lexer=J,ie.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var A=J.yylloc;c.push(A);var N=J.options&&J.options.ranges;typeof ie.yy.parseError=="function"?this.parseError=ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(oe){y.length=y.length-2*oe,E.length=E.length-oe,c.length=c.length-oe}d(l,"popStack");function $(){var oe;return oe=m.pop()||J.lex()||K,typeof oe!="number"&&(oe instanceof Array&&(m=oe,oe=m.pop()),oe=f.symbols_[oe]||oe),oe}d($,"lex");for(var L,j,q,re,se={},pe,ue,At,Be;;){if(j=y[y.length-1],this.defaultActions[j]?q=this.defaultActions[j]:((L===null||typeof L>"u")&&(L=$()),q=h[j]&&h[j][L]),typeof q>"u"||!q.length||!q[0]){var nt="";Be=[];for(pe in h[j])this.terminals_[pe]&&pe>R&&Be.push("'"+this.terminals_[pe]+"'");J.showPosition?nt="Parse error on line "+(P+1)+`: -`+J.showPosition()+` -Expecting `+Be.join(", ")+", got '"+(this.terminals_[L]||L)+"'":nt="Parse error on line "+(P+1)+": Unexpected "+(L==K?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(nt,{text:J.match,token:this.terminals_[L]||L,line:J.yylineno,loc:A,expected:Be})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+L);switch(q[0]){case 1:y.push(L),E.push(J.yytext),c.push(J.yylloc),y.push(q[1]),L=null,z=J.yyleng,o=J.yytext,P=J.yylineno,A=J.yylloc;break;case 2:if(ue=this.productions_[q[1]][1],se.$=E[E.length-ue],se._$={first_line:c[c.length-(ue||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(ue||1)].first_column,last_column:c[c.length-1].last_column},N&&(se._$.range=[c[c.length-(ue||1)].range[0],c[c.length-1].range[1]]),re=this.performAction.apply(se,[o,z,P,ie.yy,q[1],E,c].concat(G)),typeof re<"u")return re;ue&&(y=y.slice(0,-1*ue*2),E=E.slice(0,-1*ue),c=c.slice(0,-1*ue)),y.push(this.productions_[q[1]][0]),E.push(se.$),c.push(se._$),At=h[y[y.length-2]][y[y.length-1]],y.push(At);break;case 3:return!0}}return!0},"parse")},S=function(){var U={EOF:1,parseError:d(function(f,y){if(this.yy.parser)this.yy.parser.parseError(f,y);else throw new Error(f)},"parseError"),setInput:d(function(u,f){return this.yy=f||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var f=u.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:d(function(u){var f=u.length,y=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(u){this.unput(this.match.slice(u))},"less"),pastInput:d(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var u=this.pastInput(),f=new Array(u.length+1).join("-");return u+this.upcomingInput()+` -`+f+"^"},"showPosition"),test_match:d(function(u,f){var y,m,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),m=u[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],y=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var c in E)this[c]=E[c];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,f,y,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),c=0;cf[0].length)){if(f=y,m=c,this.options.backtrack_lexer){if(u=this.test_match(y,E[c]),u!==!1)return u;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(u=this.test_match(f,E[m]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var f=this.next();return f||this.lex()},"lex"),begin:d(function(f){this.conditionStack.push(f)},"begin"),popState:d(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:d(function(f){this.begin(f)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(f,y,m,E){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return U}();_.lexer=S;function p(){this.yy={}}return d(p,"Parser"),p.prototype=_,_.Parser=p,new p}();yt.parser=yt;var Aa=yt;ae.extend(Ya);ae.extend(Fa);ae.extend(La);var Gt={friday:5,saturday:6},le="",Dt="",Ct=void 0,Mt="",ze=[],Pe=[],_t=new Map,St=[],et=[],Ee="",Yt="",wn=["active","done","crit","milestone"],Ut=[],Re=!1,Ft=!1,Et="sunday",tt="saturday",kt=0,Ia=d(function(){St=[],et=[],Ee="",Ut=[],Ge=0,Tt=void 0,je=void 0,ee=[],le="",Dt="",Yt="",Ct=void 0,Mt="",ze=[],Pe=[],Re=!1,Ft=!1,kt=0,_t=new Map,Nn(),Et="sunday",tt="saturday"},"clear"),Wa=d(function(e){Dt=e},"setAxisFormat"),Oa=d(function(){return Dt},"getAxisFormat"),Ha=d(function(e){Ct=e},"setTickInterval"),Na=d(function(){return Ct},"getTickInterval"),Va=d(function(e){Mt=e},"setTodayMarker"),za=d(function(){return Mt},"getTodayMarker"),Pa=d(function(e){le=e},"setDateFormat"),Ra=d(function(){Re=!0},"enableInclusiveEndDates"),Ba=d(function(){return Re},"endDatesAreInclusive"),Za=d(function(){Ft=!0},"enableTopAxis"),qa=d(function(){return Ft},"topAxisEnabled"),Xa=d(function(e){Yt=e},"setDisplayMode"),Ga=d(function(){return Yt},"getDisplayMode"),ja=d(function(){return le},"getDateFormat"),Qa=d(function(e){ze=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),Ja=d(function(){return ze},"getIncludes"),$a=d(function(e){Pe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),Ka=d(function(){return Pe},"getExcludes"),ei=d(function(){return _t},"getLinks"),ti=d(function(e){Ee=e,St.push(e)},"addSection"),ni=d(function(){return St},"getSections"),ri=d(function(){let e=jt();const t=10;let n=0;for(;!e&&n[\d\w- ]+)/.exec(n);if(a!==null){let s=null;for(const M of a.groups.ids.split(" ")){let v=Ce(M);v!==void 0&&(!s||v.endTime>s.endTime)&&(s=v)}if(s)return s.endTime;const k=new Date;return k.setHours(0,0,0,0),k}let i=ae(n,t.trim(),!0);if(i.isValid())return i.toDate();{Qe.debug("Invalid date:"+n),Qe.debug("With date format:"+t.trim());const s=new Date(n);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+n);return s}},"getStartDate"),Mn=d(function(e){const t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),_n=d(function(e,t,n,r=!1){n=n.trim();const i=/^until\s+(?[\d\w- ]+)/.exec(n);if(i!==null){let g=null;for(const D of i.groups.ids.split(" ")){let b=Ce(D);b!==void 0&&(!g||b.startTime{window.open(n,"_self")}),_t.set(r,n))}),Yn(e,"clickable")},"setLink"),Yn=d(function(e,t){e.split(",").forEach(function(n){let r=Ce(n);r!==void 0&&r.classes.push(t)})},"setClass"),hi=d(function(e,t,n){if(_e().securityLevel!=="loose"||t===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i{Rn.runFunc(t,...r)})},"setClickFun"),Un=d(function(e,t){Ut.push(function(){const n=document.querySelector(`[id="${e}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){const n=document.querySelector(`[id="${e}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),mi=d(function(e,t,n){e.split(",").forEach(function(r){hi(r,t,n)}),Yn(e,"clickable")},"setClickEvent"),gi=d(function(e){Ut.forEach(function(t){t(e)})},"bindFunctions"),yi={getConfig:d(()=>_e().gantt,"getConfig"),clear:Ia,setDateFormat:Pa,getDateFormat:ja,enableInclusiveEndDates:Ra,endDatesAreInclusive:Ba,enableTopAxis:Za,topAxisEnabled:qa,setAxisFormat:Wa,getAxisFormat:Oa,setTickInterval:Ha,getTickInterval:Na,setTodayMarker:Va,getTodayMarker:za,setAccTitle:Ln,getAccTitle:An,setDiagramTitle:In,getDiagramTitle:Wn,setDisplayMode:Xa,getDisplayMode:Ga,setAccDescription:On,getAccDescription:Hn,addSection:ti,getSections:ni,getTasks:ri,addTask:li,findTaskById:Ce,addTaskOrg:fi,setIncludes:Qa,getIncludes:Ja,setExcludes:$a,getExcludes:Ka,setClickEvent:mi,setLink:di,getLinks:ei,bindFunctions:gi,parseDuration:Mn,isInvalidDate:Dn,setWeekday:ai,getWeekday:ii,setWeekend:si};function Lt(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(a){const i="^\\s*"+a+"\\s*$",s=new RegExp(i);e[0].match(s)&&(t[a]=!0,e.shift(1),r=!0)})}d(Lt,"getTaskTags");var ki=d(function(){Qe.debug("Something is calling, setConf, remove the call")},"setConf"),Qt={monday:He,tuesday:ln,wednesday:fn,thursday:be,friday:dn,saturday:hn,sunday:Ve},pi=d((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((i,s)=>i.startTime-s.startTime||i.order-s.order),a=0;for(const i of r)for(let s=0;s=n[s]){n[s]=i.endTime,i.order=s+t,s>a&&(a=s);break}return a},"getMaxIntersections"),de,Ti=d(function(e,t,n,r){const a=_e().gantt,i=_e().securityLevel;let s;i==="sandbox"&&(s=Ze("#i"+t));const k=i==="sandbox"?Ze(s.nodes()[0].contentDocument.body):Ze("body"),M=i==="sandbox"?s.nodes()[0].contentDocument:document,v=M.getElementById(t);de=v.parentElement.offsetWidth,de===void 0&&(de=1200),a.useWidth!==void 0&&(de=a.useWidth);const g=r.db.getTasks();let F=[];for(const x of g)F.push(x.type);F=H(F);const D={};let b=2*a.topPadding;if(r.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const x={};for(const _ of g)x[_.section]===void 0?x[_.section]=[_]:x[_.section].push(_);let Y=0;for(const _ of Object.keys(x)){const S=pi(x[_],Y)+1;Y+=S,b+=S*(a.barHeight+a.barGap),D[_]=S}}else{b+=g.length*(a.barHeight+a.barGap);for(const x of F)D[x]=g.filter(Y=>Y.type===x).length}v.setAttribute("viewBox","0 0 "+de+" "+b);const X=k.select(`[id="${t}"]`),O=_a().domain([Qn(g,function(x){return x.startTime}),jn(g,function(x){return x.endTime})]).rangeRound([0,de-a.leftPadding-a.rightPadding]);function C(x,Y){const _=x.startTime,S=Y.startTime;let p=0;return _>S?p=1:_h.order))].map(h=>x.find(o=>o.order===h));X.append("g").selectAll("rect").data(y).enter().append("rect").attr("x",0).attr("y",function(h,o){return o=h.order,o*Y+_-2}).attr("width",function(){return u-a.rightPadding/2}).attr("height",Y).attr("class",function(h){for(const[o,P]of F.entries())if(h.type===P)return"section section"+o%a.numberSectionStyles;return"section section0"});const m=X.append("g").selectAll("rect").data(x).enter(),E=r.db.getLinks();if(m.append("rect").attr("id",function(h){return h.id}).attr("rx",3).attr("ry",3).attr("x",function(h){return h.milestone?O(h.startTime)+S+.5*(O(h.endTime)-O(h.startTime))-.5*p:O(h.startTime)+S}).attr("y",function(h,o){return o=h.order,o*Y+_}).attr("width",function(h){return h.milestone?p:O(h.renderEndTime||h.endTime)-O(h.startTime)}).attr("height",p).attr("transform-origin",function(h,o){return o=h.order,(O(h.startTime)+S+.5*(O(h.endTime)-O(h.startTime))).toString()+"px "+(o*Y+_+.5*p).toString()+"px"}).attr("class",function(h){const o="task";let P="";h.classes.length>0&&(P=h.classes.join(" "));let z=0;for(const[K,G]of F.entries())h.type===G&&(z=K%a.numberSectionStyles);let R="";return h.active?h.crit?R+=" activeCrit":R=" active":h.done?h.crit?R=" doneCrit":R=" done":h.crit&&(R+=" crit"),R.length===0&&(R=" task"),h.milestone&&(R=" milestone "+R),R+=z,R+=" "+P,o+R}),m.append("text").attr("id",function(h){return h.id+"-text"}).text(function(h){return h.task}).attr("font-size",a.fontSize).attr("x",function(h){let o=O(h.startTime),P=O(h.renderEndTime||h.endTime);h.milestone&&(o+=.5*(O(h.endTime)-O(h.startTime))-.5*p),h.milestone&&(P=o+p);const z=this.getBBox().width;return z>P-o?P+z+1.5*a.leftPadding>u?o+S-5:P+S+5:(P-o)/2+o+S}).attr("y",function(h,o){return o=h.order,o*Y+a.barHeight/2+(a.fontSize/2-2)+_}).attr("text-height",p).attr("class",function(h){const o=O(h.startTime);let P=O(h.endTime);h.milestone&&(P=o+p);const z=this.getBBox().width;let R="";h.classes.length>0&&(R=h.classes.join(" "));let K=0;for(const[J,ie]of F.entries())h.type===ie&&(K=J%a.numberSectionStyles);let G="";return h.active&&(h.crit?G="activeCritText"+K:G="activeText"+K),h.done?h.crit?G=G+" doneCritText"+K:G=G+" doneText"+K:h.crit&&(G=G+" critText"+K),h.milestone&&(G+=" milestoneText"),z>P-o?P+z+1.5*a.leftPadding>u?R+" taskTextOutsideLeft taskTextOutside"+K+" "+G:R+" taskTextOutsideRight taskTextOutside"+K+" "+G+" width-"+z:R+" taskText taskText"+K+" "+G+" width-"+z}),_e().securityLevel==="sandbox"){let h;h=Ze("#i"+t);const o=h.nodes()[0].contentDocument;m.filter(function(P){return E.has(P.id)}).each(function(P){var z=o.querySelector("#"+P.id),R=o.querySelector("#"+P.id+"-text");const K=z.parentNode;var G=o.createElement("a");G.setAttribute("xlink:href",E.get(P.id)),G.setAttribute("target","_top"),K.appendChild(G),G.appendChild(z),G.appendChild(R)})}}d(V,"drawRects");function W(x,Y,_,S,p,U,u,f){if(u.length===0&&f.length===0)return;let y,m;for(const{startTime:z,endTime:R}of U)(y===void 0||zm)&&(m=R);if(!y||!m)return;if(ae(m).diff(ae(y),"year")>5){Qe.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const E=r.db.getDateFormat(),c=[];let h=null,o=ae(y);for(;o.valueOf()<=m;)r.db.isInvalidDate(o,E,u,f)?h?h.end=o:h={start:o,end:o}:h&&(c.push(h),h=null),o=o.add(1,"d");X.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",function(z){return"exclude-"+z.start.format("YYYY-MM-DD")}).attr("x",function(z){return O(z.start)+_}).attr("y",a.gridLineStartPadding).attr("width",function(z){const R=z.end.add(1,"day");return O(R)-O(z.start)}).attr("height",p-Y-a.gridLineStartPadding).attr("transform-origin",function(z,R){return(O(z.start)+_+.5*(O(z.end)-O(z.start))).toString()+"px "+(R*x+.5*p).toString()+"px"}).attr("class","exclude-range")}d(W,"drawExcludeDays");function Z(x,Y,_,S){let p=ar(O).tickSize(-S+Y+a.gridLineStartPadding).tickFormat(Ke(r.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||a.tickInterval);if(u!==null){const f=u[1],y=u[2],m=r.db.getWeekday()||a.weekday;switch(y){case"millisecond":p.ticks(Ue.every(f));break;case"second":p.ticks(Te.every(f));break;case"minute":p.ticks(We.every(f));break;case"hour":p.ticks(Oe.every(f));break;case"day":p.ticks(ve.every(f));break;case"week":p.ticks(Qt[m].every(f));break;case"month":p.ticks(Ne.every(f));break}}if(X.append("g").attr("class","grid").attr("transform","translate("+x+", "+(S-50)+")").call(p).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||a.topAxis){let f=rr(O).tickSize(-S+Y+a.gridLineStartPadding).tickFormat(Ke(r.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(u!==null){const y=u[1],m=u[2],E=r.db.getWeekday()||a.weekday;switch(m){case"millisecond":f.ticks(Ue.every(y));break;case"second":f.ticks(Te.every(y));break;case"minute":f.ticks(We.every(y));break;case"hour":f.ticks(Oe.every(y));break;case"day":f.ticks(ve.every(y));break;case"week":f.ticks(Qt[E].every(y));break;case"month":f.ticks(Ne.every(y));break}}X.append("g").attr("class","grid").attr("transform","translate("+x+", "+Y+")").call(f).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}d(Z,"makeGrid");function Q(x,Y){let _=0;const S=Object.keys(D).map(p=>[p,D[p]]);X.append("g").selectAll("text").data(S).enter().append(function(p){const U=p[0].split(Pn.lineBreakRegex),u=-(U.length-1)/2,f=M.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("dy",u+"em");for(const[y,m]of U.entries()){const E=M.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),y>0&&E.setAttribute("dy","1em"),E.textContent=m,f.appendChild(E)}return f}).attr("x",10).attr("y",function(p,U){if(U>0)for(let u=0;u` - .mermaid-main-font { - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - .exclude-range { - fill: ${e.excludeBkgColor}; - } - - .section { - stroke: none; - opacity: 0.2; - } - - .section0 { - fill: ${e.sectionBkgColor}; - } - - .section2 { - fill: ${e.sectionBkgColor2}; - } - - .section1, - .section3 { - fill: ${e.altSectionBkgColor}; - opacity: 0.2; - } - - .sectionTitle0 { - fill: ${e.titleColor}; - } - - .sectionTitle1 { - fill: ${e.titleColor}; - } - - .sectionTitle2 { - fill: ${e.titleColor}; - } - - .sectionTitle3 { - fill: ${e.titleColor}; - } - - .sectionTitle { - text-anchor: start; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - - /* Grid and axis */ - - .grid .tick { - stroke: ${e.gridColor}; - opacity: 0.8; - shape-rendering: crispEdges; - } - - .grid .tick text { - font-family: ${e.fontFamily}; - fill: ${e.textColor}; - } - - .grid path { - stroke-width: 0; - } - - - /* Today line */ - - .today { - fill: none; - stroke: ${e.todayLineColor}; - stroke-width: 2px; - } - - - /* Task styling */ - - /* Default task */ - - .task { - stroke-width: 2; - } - - .taskText { - text-anchor: middle; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - .taskTextOutsideRight { - fill: ${e.taskTextDarkColor}; - text-anchor: start; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } - - .taskTextOutsideLeft { - fill: ${e.taskTextDarkColor}; - text-anchor: end; - } - - - /* Special case clickable */ - - .task.clickable { - cursor: pointer; - } - - .taskText.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideLeft.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideRight.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - - /* Specific task settings for the sections*/ - - .taskText0, - .taskText1, - .taskText2, - .taskText3 { - fill: ${e.taskTextColor}; - } - - .task0, - .task1, - .task2, - .task3 { - fill: ${e.taskBkgColor}; - stroke: ${e.taskBorderColor}; - } - - .taskTextOutside0, - .taskTextOutside2 - { - fill: ${e.taskTextOutsideColor}; - } - - .taskTextOutside1, - .taskTextOutside3 { - fill: ${e.taskTextOutsideColor}; - } - - - /* Active task */ - - .active0, - .active1, - .active2, - .active3 { - fill: ${e.activeTaskBkgColor}; - stroke: ${e.activeTaskBorderColor}; - } - - .activeText0, - .activeText1, - .activeText2, - .activeText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Completed task */ - - .done0, - .done1, - .done2, - .done3 { - stroke: ${e.doneTaskBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - } - - .doneText0, - .doneText1, - .doneText2, - .doneText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Tasks on the critical line */ - - .crit0, - .crit1, - .crit2, - .crit3 { - stroke: ${e.critBorderColor}; - fill: ${e.critBkgColor}; - stroke-width: 2; - } - - .activeCrit0, - .activeCrit1, - .activeCrit2, - .activeCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.activeTaskBkgColor}; - stroke-width: 2; - } - - .doneCrit0, - .doneCrit1, - .doneCrit2, - .doneCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - cursor: pointer; - shape-rendering: crispEdges; - } - - .milestone { - transform: rotate(45deg) scale(0.8,0.8); - } - - .milestoneText { - font-style: italic; - } - .doneCritText0, - .doneCritText1, - .doneCritText2, - .doneCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .activeCritText0, - .activeCritText1, - .activeCritText2, - .activeCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .titleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.titleColor||e.textColor}; - font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); - } -`,"getStyles"),xi=bi,Mi={parser:Aa,db:yi,renderer:vi,styles:xi};export{Mi as diagram}; diff --git a/static/js/md-ganttDiagram-NTVNEXSI-wxhmxMLe.js b/static/js/md-ganttDiagram-NTVNEXSI-wxhmxMLe.js new file mode 100644 index 000000000..c7a2a22a1 --- /dev/null +++ b/static/js/md-ganttDiagram-NTVNEXSI-wxhmxMLe.js @@ -0,0 +1,257 @@ +import{aV as Je,aW as Fn,aX as $e,aY as Ke,aZ as tn,a_ as re,a$ as En,aH as Te,aI as be,_ as h,g as Ln,s as An,n as In,o as Wn,a as On,b as Hn,c as _t,d as Zt,e as Nn,b0 as at,l as Qt,k as Vn,j as zn,v as Pn,u as Rn}from"./md-index-B8Nim9kS.js";import{b as Bn,t as Ie,c as Zn,a as Xn,l as qn}from"./md-linear-C1jk9ODm.js";import{i as Gn}from"./md-init-Gi6I4Gst.js";function jn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n=a)&&(n=a)}return n}function Qn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let a of t)(a=e(a,++r,t))!=null&&(n>a||n===void 0&&a>=a)&&(n=a)}return n}function Jn(t){return t}var qt=1,ae=2,me=3,Xt=4,We=1e-6;function $n(t){return"translate("+t+",0)"}function Kn(t){return"translate(0,"+t+")"}function tr(t){return e=>+t(e)}function er(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nr(){return!this.__axis}function en(t,e){var n=[],r=null,a=null,i=6,s=6,k=3,M=typeof window<"u"&&window.devicePixelRatio>1?0:.5,T=t===qt||t===Xt?-1:1,g=t===Xt||t===ae?"x":"y",F=t===qt||t===me?$n:Kn;function D(b){var q=r??(e.ticks?e.ticks.apply(e,n):e.domain()),O=a??(e.tickFormat?e.tickFormat.apply(e,n):Jn),C=Math.max(i,0)+k,I=e.range(),V=+I[0]+M,W=+I[I.length-1]+M,Z=(e.bandwidth?er:tr)(e.copy(),M),Q=b.selection?b.selection():b,w=Q.selectAll(".domain").data([null]),H=Q.selectAll(".tick").data(q,e).order(),x=H.exit(),Y=H.enter().append("g").attr("class","tick"),_=H.select("line"),S=H.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(Y),_=_.merge(Y.append("line").attr("stroke","currentColor").attr(g+"2",T*i)),S=S.merge(Y.append("text").attr("fill","currentColor").attr(g,T*C).attr("dy",t===qt?"0em":t===me?"0.71em":"0.32em")),b!==Q&&(w=w.transition(b),H=H.transition(b),_=_.transition(b),S=S.transition(b),x=x.transition(b).attr("opacity",We).attr("transform",function(p){return isFinite(p=Z(p))?F(p+M):this.getAttribute("transform")}),Y.attr("opacity",We).attr("transform",function(p){var U=this.parentNode.__axis;return F((U&&isFinite(U=U(p))?U:Z(p))+M)})),x.remove(),w.attr("d",t===Xt||t===ae?s?"M"+T*s+","+V+"H"+M+"V"+W+"H"+T*s:"M"+M+","+V+"V"+W:s?"M"+V+","+T*s+"V"+M+"H"+W+"V"+T*s:"M"+V+","+M+"H"+W),H.attr("opacity",1).attr("transform",function(p){return F(Z(p)+M)}),_.attr(g+"2",T*i),S.attr(g,T*C).text(O),Q.filter(nr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ae?"start":t===Xt?"end":"middle"),Q.each(function(){this.__axis=Z})}return D.scale=function(b){return arguments.length?(e=b,D):e},D.ticks=function(){return n=Array.from(arguments),D},D.tickArguments=function(b){return arguments.length?(n=b==null?[]:Array.from(b),D):n.slice()},D.tickValues=function(b){return arguments.length?(r=b==null?null:Array.from(b),D):r&&r.slice()},D.tickFormat=function(b){return arguments.length?(a=b,D):a},D.tickSize=function(b){return arguments.length?(i=s=+b,D):i},D.tickSizeInner=function(b){return arguments.length?(i=+b,D):i},D.tickSizeOuter=function(b){return arguments.length?(s=+b,D):s},D.tickPadding=function(b){return arguments.length?(k=+b,D):k},D.offset=function(b){return arguments.length?(M=+b,D):M},D}function rr(t){return en(qt,t)}function ar(t){return en(me,t)}const ir=Math.PI/180,sr=180/Math.PI,Jt=18,nn=.96422,rn=1,an=.82521,sn=4/29,St=6/29,on=3*St*St,or=St*St*St;function cn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof dt)return ln(t);t instanceof Je||(t=Fn(t));var e=ce(t.r),n=ce(t.g),r=ce(t.b),a=ie((.2225045*e+.7168786*n+.0606169*r)/rn),i,s;return e===n&&n===r?i=s=a:(i=ie((.4360747*e+.3850649*n+.1430804*r)/nn),s=ie((.0139322*e+.0971045*n+.7141733*r)/an)),new ft(116*a-16,500*(i-a),200*(a-s),t.opacity)}function cr(t,e,n,r){return arguments.length===1?cn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}$e(ft,cr,Ke(tn,{brighter(t){return new ft(this.l+Jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-Jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=nn*se(e),t=rn*se(t),n=an*se(n),new Je(oe(3.1338561*e-1.6168667*t-.4906146*n),oe(-.9787684*e+1.9161415*t+.033454*n),oe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function ie(t){return t>or?Math.pow(t,1/3):t/on+sn}function se(t){return t>St?t*t*t:on*(t-sn)}function oe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ce(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function lr(t){if(t instanceof dt)return new dt(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=cn(t)),t.a===0&&t.b===0)return new dt(NaN,0(t(i=new Date(+i)),i),a.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),a.round=i=>{const s=a(i),k=a.ceil(i);return i-s(e(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,k)=>{const M=[];if(i=a.ceil(i),k=k==null?1:Math.floor(k),!(i0))return M;let T;do M.push(T=new Date(+i)),e(i,k),t(i);while(Tet(s=>{if(s>=s)for(;t(s),!i(s);)s.setTime(s-1)},(s,k)=>{if(s>=s)if(k<0)for(;++k<=0;)for(;e(s,-1),!i(s););else for(;--k>=0;)for(;e(s,1),!i(s););}),n&&(a.count=(i,s)=>(le.setTime(+i),ue.setTime(+s),t(le),t(ue),Math.floor(n(le,ue))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(r?s=>r(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const Ut=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ut.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ut);Ut.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,xe=yt*7,Oe=yt*30,fe=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Wt=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Wt.range;const dr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());dr.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ot.range;const mr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());mr.range;const Tt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);Tt.range;const we=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);we.range;const gr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));gr.range;function wt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/xe)}const Vt=wt(0),Ht=wt(1),un=wt(2),fn=wt(3),bt=wt(4),hn=wt(5),dn=wt(6);Vt.range;Ht.range;un.range;fn.range;bt.range;hn.range;dn.range;function Dt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/xe)}const mn=Dt(0),$t=Dt(1),yr=Dt(2),kr=Dt(3),Ft=Dt(4),pr=Dt(5),vr=Dt(6);mn.range;$t.range;yr.range;kr.range;Ft.range;pr.range;vr.range;const Nt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nt.range;const Tr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Tr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const xt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());xt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});xt.range;function br(t,e,n,r,a,i){const s=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[i,1,ct],[i,5,5*ct],[i,15,15*ct],[i,30,30*ct],[a,1,gt],[a,3,3*gt],[a,6,6*gt],[a,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,xe],[e,1,Oe],[e,3,3*Oe],[t,1,fe]];function k(T,g,F){const D=gC).right(s,D);if(b===s.length)return t.every(Ie(T/fe,g/fe,F));if(b===0)return Ut.every(Math.max(Ie(T,g,F),1));const[q,O]=s[D/s[b-1][2]53)return null;"w"in u||(u.w=1),"Z"in u?(L=de(Lt(u.y,0,1)),j=L.getUTCDay(),L=j>4||j===0?$t.ceil(L):$t(L),L=we.offset(L,(u.V-1)*7),u.y=L.getUTCFullYear(),u.m=L.getUTCMonth(),u.d=L.getUTCDate()+(u.w+6)%7):(L=he(Lt(u.y,0,1)),j=L.getDay(),L=j>4||j===0?Ht.ceil(L):Ht(L),L=Tt.offset(L,(u.V-1)*7),u.y=L.getFullYear(),u.m=L.getMonth(),u.d=L.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),j="Z"in u?de(Lt(u.y,0,1)).getUTCDay():he(Lt(u.y,0,1)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+u.W*7-(j+5)%7:u.w+u.U*7-(j+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,de(u)):he(u)}}function x(v,A,N,u){for(var $=0,L=A.length,j=N.length,X,rt;$=j)return-1;if(X=A.charCodeAt($++),X===37){if(X=A.charAt($++),rt=Q[X in He?A.charAt($++):X],!rt||(u=rt(v,N,u))<0)return-1}else if(X!=N.charCodeAt(u++))return-1}return u}function Y(v,A,N){var u=T.exec(A.slice(N));return u?(v.p=g.get(u[0].toLowerCase()),N+u[0].length):-1}function _(v,A,N){var u=b.exec(A.slice(N));return u?(v.w=q.get(u[0].toLowerCase()),N+u[0].length):-1}function S(v,A,N){var u=F.exec(A.slice(N));return u?(v.w=D.get(u[0].toLowerCase()),N+u[0].length):-1}function p(v,A,N){var u=I.exec(A.slice(N));return u?(v.m=V.get(u[0].toLowerCase()),N+u[0].length):-1}function U(v,A,N){var u=O.exec(A.slice(N));return u?(v.m=C.get(u[0].toLowerCase()),N+u[0].length):-1}function l(v,A,N){return x(v,e,A,N)}function f(v,A,N){return x(v,n,A,N)}function y(v,A,N){return x(v,r,A,N)}function m(v){return s[v.getDay()]}function E(v){return i[v.getDay()]}function c(v){return M[v.getMonth()]}function d(v){return k[v.getMonth()]}function o(v){return a[+(v.getHours()>=12)]}function P(v){return 1+~~(v.getMonth()/3)}function z(v){return s[v.getUTCDay()]}function R(v){return i[v.getUTCDay()]}function K(v){return M[v.getUTCMonth()]}function G(v){return k[v.getUTCMonth()]}function J(v){return a[+(v.getUTCHours()>=12)]}function it(v){return 1+~~(v.getUTCMonth()/3)}return{format:function(v){var A=w(v+="",W);return A.toString=function(){return v},A},parse:function(v){var A=H(v+="",!1);return A.toString=function(){return v},A},utcFormat:function(v){var A=w(v+="",Z);return A.toString=function(){return v},A},utcParse:function(v){var A=H(v+="",!0);return A.toString=function(){return v},A}}}var He={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Cr=/^%/,Mr=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",i=a.length;return r+(i[e.toLowerCase(),n]))}function Sr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ne(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Ir(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Or(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function zr(t,e,n){var r=Cr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Pr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Re(t,e){return B(t.getDate(),e,2)}function Br(t,e){return B(t.getHours(),e,2)}function Zr(t,e){return B(t.getHours()%12||12,e,2)}function Xr(t,e){return B(1+Tt.count(kt(t),t),e,3)}function gn(t,e){return B(t.getMilliseconds(),e,3)}function qr(t,e){return gn(t,e)+"000"}function Gr(t,e){return B(t.getMonth()+1,e,2)}function jr(t,e){return B(t.getMinutes(),e,2)}function Qr(t,e){return B(t.getSeconds(),e,2)}function Jr(t){var e=t.getDay();return e===0?7:e}function $r(t,e){return B(Vt.count(kt(t)-1,t),e,2)}function yn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function Kr(t,e){return t=yn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ta(t){return t.getDay()}function ea(t,e){return B(Ht.count(kt(t)-1,t),e,2)}function na(t,e){return B(t.getFullYear()%100,e,2)}function ra(t,e){return t=yn(t),B(t.getFullYear()%100,e,2)}function aa(t,e){return B(t.getFullYear()%1e4,e,4)}function ia(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function sa(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Be(t,e){return B(t.getUTCDate(),e,2)}function oa(t,e){return B(t.getUTCHours(),e,2)}function ca(t,e){return B(t.getUTCHours()%12||12,e,2)}function la(t,e){return B(1+we.count(xt(t),t),e,3)}function kn(t,e){return B(t.getUTCMilliseconds(),e,3)}function ua(t,e){return kn(t,e)+"000"}function fa(t,e){return B(t.getUTCMonth()+1,e,2)}function ha(t,e){return B(t.getUTCMinutes(),e,2)}function da(t,e){return B(t.getUTCSeconds(),e,2)}function ma(t){var e=t.getUTCDay();return e===0?7:e}function ga(t,e){return B(mn.count(xt(t)-1,t),e,2)}function pn(t){var e=t.getUTCDay();return e>=4||e===0?Ft(t):Ft.ceil(t)}function ya(t,e){return t=pn(t),B(Ft.count(xt(t),t)+(xt(t).getUTCDay()===4),e,2)}function ka(t){return t.getUTCDay()}function pa(t,e){return B($t.count(xt(t)-1,t),e,2)}function va(t,e){return B(t.getUTCFullYear()%100,e,2)}function Ta(t,e){return t=pn(t),B(t.getUTCFullYear()%100,e,2)}function ba(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function xa(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ft(t):Ft.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function wa(){return"+0000"}function Ze(){return"%"}function Xe(t){return+t}function qe(t){return Math.floor(+t/1e3)}var Mt,Kt;Da({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Da(t){return Mt=Dr(t),Kt=Mt.format,Mt.parse,Mt.utcFormat,Mt.utcParse,Mt}function Ca(t){return new Date(t)}function Ma(t){return t instanceof Date?+t:+new Date(+t)}function vn(t,e,n,r,a,i,s,k,M,T){var g=Zn(),F=g.invert,D=g.domain,b=T(".%L"),q=T(":%S"),O=T("%I:%M"),C=T("%I %p"),I=T("%a %d"),V=T("%b %d"),W=T("%B"),Z=T("%Y");function Q(w){return(M(w)4&&(b+=7),D.add(b,n));return q.diff(O,"week")+1},k.isoWeekday=function(T){return this.$utils().u(T)?this.day()||7:this.day(this.day()%7?T:T-7)};var M=k.startOf;k.startOf=function(T,g){var F=this.$utils(),D=!!F.u(g)||g;return F.p(T)==="isoweek"?D?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):M.bind(this)(T,g)}}})})(Tn);var Sa=Tn.exports;const Ya=be(Sa);var bn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,a=/\d/,i=/\d\d/,s=/\d\d?/,k=/\d*[^-_:/,()\s\d]+/,M={},T=function(C){return(C=+C)+(C>68?1900:2e3)},g=function(C){return function(I){this[C]=+I}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(C){(this.zone||(this.zone={})).offset=function(I){if(!I||I==="Z")return 0;var V=I.match(/([+-]|\d\d)/g),W=60*V[1]+(+V[2]||0);return W===0?0:V[0]==="+"?-W:W}(C)}],D=function(C){var I=M[C];return I&&(I.indexOf?I:I.s.concat(I.f))},b=function(C,I){var V,W=M.meridiem;if(W){for(var Z=1;Z<=24;Z+=1)if(C.indexOf(W(Z,0,I))>-1){V=Z>12;break}}else V=C===(I?"pm":"PM");return V},q={A:[k,function(C){this.afternoon=b(C,!1)}],a:[k,function(C){this.afternoon=b(C,!0)}],Q:[a,function(C){this.month=3*(C-1)+1}],S:[a,function(C){this.milliseconds=100*+C}],SS:[i,function(C){this.milliseconds=10*+C}],SSS:[/\d{3}/,function(C){this.milliseconds=+C}],s:[s,g("seconds")],ss:[s,g("seconds")],m:[s,g("minutes")],mm:[s,g("minutes")],H:[s,g("hours")],h:[s,g("hours")],HH:[s,g("hours")],hh:[s,g("hours")],D:[s,g("day")],DD:[i,g("day")],Do:[k,function(C){var I=M.ordinal,V=C.match(/\d+/);if(this.day=V[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===C&&(this.day=W)}],w:[s,g("week")],ww:[i,g("week")],M:[s,g("month")],MM:[i,g("month")],MMM:[k,function(C){var I=D("months"),V=(D("monthsShort")||I.map(function(W){return W.slice(0,3)})).indexOf(C)+1;if(V<1)throw new Error;this.month=V%12||V}],MMMM:[k,function(C){var I=D("months").indexOf(C)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,g("year")],YY:[i,function(C){this.year=T(C)}],YYYY:[/\d{4}/,g("year")],Z:F,ZZ:F};function O(C){var I,V;I=C,V=M&&M.formats;for(var W=(C=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(_,S,p){var U=p&&p.toUpperCase();return S||V[p]||n[p]||V[U].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,f,y){return f||y.slice(1)})})).match(r),Z=W.length,Q=0;Q-1)return new Date((E==="X"?1e3:1)*m);var o=O(E)(m),P=o.year,z=o.month,R=o.day,K=o.hours,G=o.minutes,J=o.seconds,it=o.milliseconds,v=o.zone,A=o.week,N=new Date,u=R||(P||z?1:N.getDate()),$=P||N.getFullYear(),L=0;P&&!z||(L=z>0?z-1:N.getMonth());var j,X=K||0,rt=G||0,st=J||0,pt=it||0;return v?new Date(Date.UTC($,L,u,X,rt,st,pt+60*v.offset*1e3)):c?new Date(Date.UTC($,L,u,X,rt,st,pt)):(j=new Date($,L,u,X,rt,st,pt),A&&(j=d(j).week(A).toDate()),j)}catch{return new Date("")}}(w,Y,H,V),this.init(),U&&U!==!0&&(this.$L=this.locale(U).$L),p&&w!=this.format(Y)&&(this.$d=new Date("")),M={}}else if(Y instanceof Array)for(var l=Y.length,f=1;f<=l;f+=1){x[1]=Y[f-1];var y=V.apply(this,x);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}f===l&&(this.$d=new Date(""))}else Z.call(this,Q)}}})})(bn);var Ua=bn.exports;const Fa=be(Ua);var xn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Te,function(){return function(n,r){var a=r.prototype,i=a.format;a.format=function(s){var k=this,M=this.$locale();if(!this.isValid())return i.bind(this)(s);var T=this.$utils(),g=(s||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(F){switch(F){case"Q":return Math.ceil((k.$M+1)/3);case"Do":return M.ordinal(k.$D);case"gggg":return k.weekYear();case"GGGG":return k.isoWeekYear();case"wo":return M.ordinal(k.week(),"W");case"w":case"ww":return T.s(k.week(),F==="w"?1:2,"0");case"W":case"WW":return T.s(k.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return T.s(String(k.$H===0?24:k.$H),F==="k"?1:2,"0");case"X":return Math.floor(k.$d.getTime()/1e3);case"x":return k.$d.getTime();case"z":return"["+k.offsetName()+"]";case"zzz":return"["+k.offsetName("long")+"]";default:return F}});return i.bind(this)(g)}}})})(xn);var Ea=xn.exports;const La=be(Ea);var ye=function(){var t=h(function(U,l,f,y){for(f=f||{},y=U.length;y--;f[U[y]]=l);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],a=[1,28],i=[1,29],s=[1,30],k=[1,31],M=[1,32],T=[1,33],g=[1,34],F=[1,9],D=[1,10],b=[1,11],q=[1,12],O=[1,13],C=[1,14],I=[1,15],V=[1,16],W=[1,19],Z=[1,20],Q=[1,21],w=[1,22],H=[1,23],x=[1,25],Y=[1,35],_={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:h(function(l,f,y,m,E,c,d){var o=c.length-1;switch(E){case 1:return c[o-1];case 2:this.$=[];break;case 3:c[o-1].push(c[o]),this.$=c[o-1];break;case 4:case 5:this.$=c[o];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=c[o].substr(18);break;case 19:m.TopAxis(),this.$=c[o].substr(8);break;case 20:m.setAxisFormat(c[o].substr(11)),this.$=c[o].substr(11);break;case 21:m.setTickInterval(c[o].substr(13)),this.$=c[o].substr(13);break;case 22:m.setExcludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 23:m.setIncludes(c[o].substr(9)),this.$=c[o].substr(9);break;case 24:m.setTodayMarker(c[o].substr(12)),this.$=c[o].substr(12);break;case 27:m.setDiagramTitle(c[o].substr(6)),this.$=c[o].substr(6);break;case 28:this.$=c[o].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=c[o].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(c[o].substr(8)),this.$=c[o].substr(8);break;case 33:m.addTask(c[o-1],c[o]),this.$="task";break;case 34:this.$=c[o-1],m.setClickEvent(c[o-1],c[o],null);break;case 35:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],c[o]);break;case 36:this.$=c[o-2],m.setClickEvent(c[o-2],c[o-1],null),m.setLink(c[o-2],c[o]);break;case 37:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-2],c[o-1]),m.setLink(c[o-3],c[o]);break;case 38:this.$=c[o-2],m.setClickEvent(c[o-2],c[o],null),m.setLink(c[o-2],c[o-1]);break;case 39:this.$=c[o-3],m.setClickEvent(c[o-3],c[o-1],c[o]),m.setLink(c[o-3],c[o-2]);break;case 40:this.$=c[o-1],m.setLink(c[o-1],c[o]);break;case 41:case 47:this.$=c[o-1]+" "+c[o];break;case 42:case 43:case 45:this.$=c[o-2]+" "+c[o-1]+" "+c[o];break;case 44:case 46:this.$=c[o-3]+" "+c[o-2]+" "+c[o-1]+" "+c[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:T,21:g,22:F,23:D,24:b,25:q,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:a,15:i,16:s,17:k,18:M,19:18,20:T,21:g,22:F,23:D,24:b,25:q,26:O,27:C,28:I,29:V,30:W,31:Z,33:Q,35:w,36:H,37:24,38:x,40:Y},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:h(function(l,f){if(f.recoverable)this.trace(l);else{var y=new Error(l);throw y.hash=f,y}},"parseError"),parse:h(function(l){var f=this,y=[0],m=[],E=[null],c=[],d=this.table,o="",P=0,z=0,R=2,K=1,G=c.slice.call(arguments,1),J=Object.create(this.lexer),it={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(it.yy[v]=this.yy[v]);J.setInput(l,it.yy),it.yy.lexer=J,it.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var A=J.yylloc;c.push(A);var N=J.options&&J.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function u(ot){y.length=y.length-2*ot,E.length=E.length-ot,c.length=c.length-ot}h(u,"popStack");function $(){var ot;return ot=m.pop()||J.lex()||K,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=f.symbols_[ot]||ot),ot}h($,"lex");for(var L,j,X,rt,st={},pt,lt,Ae,Bt;;){if(j=y[y.length-1],this.defaultActions[j]?X=this.defaultActions[j]:((L===null||typeof L>"u")&&(L=$()),X=d[j]&&d[j][L]),typeof X>"u"||!X.length||!X[0]){var ne="";Bt=[];for(pt in d[j])this.terminals_[pt]&&pt>R&&Bt.push("'"+this.terminals_[pt]+"'");J.showPosition?ne="Parse error on line "+(P+1)+`: +`+J.showPosition()+` +Expecting `+Bt.join(", ")+", got '"+(this.terminals_[L]||L)+"'":ne="Parse error on line "+(P+1)+": Unexpected "+(L==K?"end of input":"'"+(this.terminals_[L]||L)+"'"),this.parseError(ne,{text:J.match,token:this.terminals_[L]||L,line:J.yylineno,loc:A,expected:Bt})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+L);switch(X[0]){case 1:y.push(L),E.push(J.yytext),c.push(J.yylloc),y.push(X[1]),L=null,z=J.yyleng,o=J.yytext,P=J.yylineno,A=J.yylloc;break;case 2:if(lt=this.productions_[X[1]][1],st.$=E[E.length-lt],st._$={first_line:c[c.length-(lt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(lt||1)].first_column,last_column:c[c.length-1].last_column},N&&(st._$.range=[c[c.length-(lt||1)].range[0],c[c.length-1].range[1]]),rt=this.performAction.apply(st,[o,z,P,it.yy,X[1],E,c].concat(G)),typeof rt<"u")return rt;lt&&(y=y.slice(0,-1*lt*2),E=E.slice(0,-1*lt),c=c.slice(0,-1*lt)),y.push(this.productions_[X[1]][0]),E.push(st.$),c.push(st._$),Ae=d[y[y.length-2]][y[y.length-1]],y.push(Ae);break;case 3:return!0}}return!0},"parse")},S=function(){var U={EOF:1,parseError:h(function(f,y){if(this.yy.parser)this.yy.parser.parseError(f,y);else throw new Error(f)},"parseError"),setInput:h(function(l,f){return this.yy=f||this.yy||{},this._input=l,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var f=l.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:h(function(l){var f=l.length,y=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var m=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===m.length?this.yylloc.first_column:0)+m[m.length-y.length].length-y[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:h(function(l){this.unput(this.match.slice(l))},"less"),pastInput:h(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var l=this.pastInput(),f=new Array(l.length+1).join("-");return l+this.upcomingInput()+` +`+f+"^"},"showPosition"),test_match:h(function(l,f){var y,m,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),m=l[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(l[0].length),this.matched+=l[0],y=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var c in E)this[c]=E[c];return!1}return!1},"test_match"),next:h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,f,y,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),c=0;cf[0].length)){if(f=y,m=c,this.options.backtrack_lexer){if(l=this.test_match(y,E[c]),l!==!1)return l;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(l=this.test_match(f,E[m]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:h(function(){var f=this.next();return f||this.lex()},"lex"),begin:h(function(f){this.conditionStack.push(f)},"begin"),popState:h(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:h(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:h(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:h(function(f){this.begin(f)},"pushState"),stateStackSize:h(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:h(function(f,y,m,E){switch(m){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return U}();_.lexer=S;function p(){this.yy={}}return h(p,"Parser"),p.prototype=_,_.Parser=p,new p}();ye.parser=ye;var Aa=ye;at.extend(Ya);at.extend(Fa);at.extend(La);var Ge={friday:5,saturday:6},ut="",De="",Ce=void 0,Me="",zt=[],Pt=[],_e=new Map,Se=[],te=[],Et="",Ye="",wn=["active","done","crit","milestone"],Ue=[],Rt=!1,Fe=!1,Ee="sunday",ee="saturday",ke=0,Ia=h(function(){Se=[],te=[],Et="",Ue=[],Gt=0,ve=void 0,jt=void 0,tt=[],ut="",De="",Ye="",Ce=void 0,Me="",zt=[],Pt=[],Rt=!1,Fe=!1,ke=0,_e=new Map,Pn(),Ee="sunday",ee="saturday"},"clear"),Wa=h(function(t){De=t},"setAxisFormat"),Oa=h(function(){return De},"getAxisFormat"),Ha=h(function(t){Ce=t},"setTickInterval"),Na=h(function(){return Ce},"getTickInterval"),Va=h(function(t){Me=t},"setTodayMarker"),za=h(function(){return Me},"getTodayMarker"),Pa=h(function(t){ut=t},"setDateFormat"),Ra=h(function(){Rt=!0},"enableInclusiveEndDates"),Ba=h(function(){return Rt},"endDatesAreInclusive"),Za=h(function(){Fe=!0},"enableTopAxis"),Xa=h(function(){return Fe},"topAxisEnabled"),qa=h(function(t){Ye=t},"setDisplayMode"),Ga=h(function(){return Ye},"getDisplayMode"),ja=h(function(){return ut},"getDateFormat"),Qa=h(function(t){zt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Ja=h(function(){return zt},"getIncludes"),$a=h(function(t){Pt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),Ka=h(function(){return Pt},"getExcludes"),ti=h(function(){return _e},"getLinks"),ei=h(function(t){Et=t,Se.push(t)},"addSection"),ni=h(function(){return Se},"getSections"),ri=h(function(){let t=je();const e=10;let n=0;for(;!t&&n[\d\w- ]+)/.exec(n);if(a!==null){let s=null;for(const M of a.groups.ids.split(" ")){let T=Ct(M);T!==void 0&&(!s||T.endTime>s.endTime)&&(s=T)}if(s)return s.endTime;const k=new Date;return k.setHours(0,0,0,0),k}let i=at(n,e.trim(),!0);if(i.isValid())return i.toDate();{Qt.debug("Invalid date:"+n),Qt.debug("With date format:"+e.trim());const s=new Date(n);if(s===void 0||isNaN(s.getTime())||s.getFullYear()<-1e4||s.getFullYear()>1e4)throw new Error("Invalid date:"+n);return s}},"getStartDate"),Mn=h(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),_n=h(function(t,e,n,r=!1){n=n.trim();const i=/^until\s+(?[\d\w- ]+)/.exec(n);if(i!==null){let g=null;for(const D of i.groups.ids.split(" ")){let b=Ct(D);b!==void 0&&(!g||b.startTime{window.open(n,"_self")}),_e.set(r,n))}),Yn(t,"clickable")},"setLink"),Yn=h(function(t,e){t.split(",").forEach(function(n){let r=Ct(n);r!==void 0&&r.classes.push(e)})},"setClass"),di=h(function(t,e,n){if(_t().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i{Rn.runFunc(e,...r)})},"setClickFun"),Un=h(function(t,e){Ue.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},"pushFun"),mi=h(function(t,e,n){t.split(",").forEach(function(r){di(r,e,n)}),Yn(t,"clickable")},"setClickEvent"),gi=h(function(t){Ue.forEach(function(e){e(t)})},"bindFunctions"),yi={getConfig:h(()=>_t().gantt,"getConfig"),clear:Ia,setDateFormat:Pa,getDateFormat:ja,enableInclusiveEndDates:Ra,endDatesAreInclusive:Ba,enableTopAxis:Za,topAxisEnabled:Xa,setAxisFormat:Wa,getAxisFormat:Oa,setTickInterval:Ha,getTickInterval:Na,setTodayMarker:Va,getTodayMarker:za,setAccTitle:Hn,getAccTitle:On,setDiagramTitle:Wn,getDiagramTitle:In,setDisplayMode:qa,getDisplayMode:Ga,setAccDescription:An,getAccDescription:Ln,addSection:ei,getSections:ni,getTasks:ri,addTask:ui,findTaskById:Ct,addTaskOrg:fi,setIncludes:Qa,getIncludes:Ja,setExcludes:$a,getExcludes:Ka,setClickEvent:mi,setLink:hi,getLinks:ti,bindFunctions:gi,parseDuration:Mn,isInvalidDate:Dn,setWeekday:ai,getWeekday:ii,setWeekend:si};function Le(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(a){const i="^\\s*"+a+"\\s*$",s=new RegExp(i);t[0].match(s)&&(e[a]=!0,t.shift(1),r=!0)})}h(Le,"getTaskTags");var ki=h(function(){Qt.debug("Something is calling, setConf, remove the call")},"setConf"),Qe={monday:Ht,tuesday:un,wednesday:fn,thursday:bt,friday:hn,saturday:dn,sunday:Vt},pi=h((t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((i,s)=>i.startTime-s.startTime||i.order-s.order),a=0;for(const i of r)for(let s=0;s=n[s]){n[s]=i.endTime,i.order=s+e,s>a&&(a=s);break}return a},"getMaxIntersections"),ht,vi=h(function(t,e,n,r){const a=_t().gantt,i=_t().securityLevel;let s;i==="sandbox"&&(s=Zt("#i"+e));const k=i==="sandbox"?Zt(s.nodes()[0].contentDocument.body):Zt("body"),M=i==="sandbox"?s.nodes()[0].contentDocument:document,T=M.getElementById(e);ht=T.parentElement.offsetWidth,ht===void 0&&(ht=1200),a.useWidth!==void 0&&(ht=a.useWidth);const g=r.db.getTasks();let F=[];for(const x of g)F.push(x.type);F=H(F);const D={};let b=2*a.topPadding;if(r.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const x={};for(const _ of g)x[_.section]===void 0?x[_.section]=[_]:x[_.section].push(_);let Y=0;for(const _ of Object.keys(x)){const S=pi(x[_],Y)+1;Y+=S,b+=S*(a.barHeight+a.barGap),D[_]=S}}else{b+=g.length*(a.barHeight+a.barGap);for(const x of F)D[x]=g.filter(Y=>Y.type===x).length}T.setAttribute("viewBox","0 0 "+ht+" "+b);const q=k.select(`[id="${e}"]`),O=_a().domain([Qn(g,function(x){return x.startTime}),jn(g,function(x){return x.endTime})]).rangeRound([0,ht-a.leftPadding-a.rightPadding]);function C(x,Y){const _=x.startTime,S=Y.startTime;let p=0;return _>S?p=1:_d.order))].map(d=>x.find(o=>o.order===d));q.append("g").selectAll("rect").data(y).enter().append("rect").attr("x",0).attr("y",function(d,o){return o=d.order,o*Y+_-2}).attr("width",function(){return l-a.rightPadding/2}).attr("height",Y).attr("class",function(d){for(const[o,P]of F.entries())if(d.type===P)return"section section"+o%a.numberSectionStyles;return"section section0"});const m=q.append("g").selectAll("rect").data(x).enter(),E=r.db.getLinks();if(m.append("rect").attr("id",function(d){return d.id}).attr("rx",3).attr("ry",3).attr("x",function(d){return d.milestone?O(d.startTime)+S+.5*(O(d.endTime)-O(d.startTime))-.5*p:O(d.startTime)+S}).attr("y",function(d,o){return o=d.order,o*Y+_}).attr("width",function(d){return d.milestone?p:O(d.renderEndTime||d.endTime)-O(d.startTime)}).attr("height",p).attr("transform-origin",function(d,o){return o=d.order,(O(d.startTime)+S+.5*(O(d.endTime)-O(d.startTime))).toString()+"px "+(o*Y+_+.5*p).toString()+"px"}).attr("class",function(d){const o="task";let P="";d.classes.length>0&&(P=d.classes.join(" "));let z=0;for(const[K,G]of F.entries())d.type===G&&(z=K%a.numberSectionStyles);let R="";return d.active?d.crit?R+=" activeCrit":R=" active":d.done?d.crit?R=" doneCrit":R=" done":d.crit&&(R+=" crit"),R.length===0&&(R=" task"),d.milestone&&(R=" milestone "+R),R+=z,R+=" "+P,o+R}),m.append("text").attr("id",function(d){return d.id+"-text"}).text(function(d){return d.task}).attr("font-size",a.fontSize).attr("x",function(d){let o=O(d.startTime),P=O(d.renderEndTime||d.endTime);d.milestone&&(o+=.5*(O(d.endTime)-O(d.startTime))-.5*p),d.milestone&&(P=o+p);const z=this.getBBox().width;return z>P-o?P+z+1.5*a.leftPadding>l?o+S-5:P+S+5:(P-o)/2+o+S}).attr("y",function(d,o){return o=d.order,o*Y+a.barHeight/2+(a.fontSize/2-2)+_}).attr("text-height",p).attr("class",function(d){const o=O(d.startTime);let P=O(d.endTime);d.milestone&&(P=o+p);const z=this.getBBox().width;let R="";d.classes.length>0&&(R=d.classes.join(" "));let K=0;for(const[J,it]of F.entries())d.type===it&&(K=J%a.numberSectionStyles);let G="";return d.active&&(d.crit?G="activeCritText"+K:G="activeText"+K),d.done?d.crit?G=G+" doneCritText"+K:G=G+" doneText"+K:d.crit&&(G=G+" critText"+K),d.milestone&&(G+=" milestoneText"),z>P-o?P+z+1.5*a.leftPadding>l?R+" taskTextOutsideLeft taskTextOutside"+K+" "+G:R+" taskTextOutsideRight taskTextOutside"+K+" "+G+" width-"+z:R+" taskText taskText"+K+" "+G+" width-"+z}),_t().securityLevel==="sandbox"){let d;d=Zt("#i"+e);const o=d.nodes()[0].contentDocument;m.filter(function(P){return E.has(P.id)}).each(function(P){var z=o.querySelector("#"+P.id),R=o.querySelector("#"+P.id+"-text");const K=z.parentNode;var G=o.createElement("a");G.setAttribute("xlink:href",E.get(P.id)),G.setAttribute("target","_top"),K.appendChild(G),G.appendChild(z),G.appendChild(R)})}}h(V,"drawRects");function W(x,Y,_,S,p,U,l,f){if(l.length===0&&f.length===0)return;let y,m;for(const{startTime:z,endTime:R}of U)(y===void 0||zm)&&(m=R);if(!y||!m)return;if(at(m).diff(at(y),"year")>5){Qt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const E=r.db.getDateFormat(),c=[];let d=null,o=at(y);for(;o.valueOf()<=m;)r.db.isInvalidDate(o,E,l,f)?d?d.end=o:d={start:o,end:o}:d&&(c.push(d),d=null),o=o.add(1,"d");q.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",function(z){return"exclude-"+z.start.format("YYYY-MM-DD")}).attr("x",function(z){return O(z.start)+_}).attr("y",a.gridLineStartPadding).attr("width",function(z){const R=z.end.add(1,"day");return O(R)-O(z.start)}).attr("height",p-Y-a.gridLineStartPadding).attr("transform-origin",function(z,R){return(O(z.start)+_+.5*(O(z.end)-O(z.start))).toString()+"px "+(R*x+.5*p).toString()+"px"}).attr("class","exclude-range")}h(W,"drawExcludeDays");function Z(x,Y,_,S){let p=ar(O).tickSize(-S+Y+a.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));const l=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||a.tickInterval);if(l!==null){const f=l[1],y=l[2],m=r.db.getWeekday()||a.weekday;switch(y){case"millisecond":p.ticks(Ut.every(f));break;case"second":p.ticks(vt.every(f));break;case"minute":p.ticks(Wt.every(f));break;case"hour":p.ticks(Ot.every(f));break;case"day":p.ticks(Tt.every(f));break;case"week":p.ticks(Qe[m].every(f));break;case"month":p.ticks(Nt.every(f));break}}if(q.append("g").attr("class","grid").attr("transform","translate("+x+", "+(S-50)+")").call(p).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||a.topAxis){let f=rr(O).tickSize(-S+Y+a.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat()||a.axisFormat||"%Y-%m-%d"));if(l!==null){const y=l[1],m=l[2],E=r.db.getWeekday()||a.weekday;switch(m){case"millisecond":f.ticks(Ut.every(y));break;case"second":f.ticks(vt.every(y));break;case"minute":f.ticks(Wt.every(y));break;case"hour":f.ticks(Ot.every(y));break;case"day":f.ticks(Tt.every(y));break;case"week":f.ticks(Qe[E].every(y));break;case"month":f.ticks(Nt.every(y));break}}q.append("g").attr("class","grid").attr("transform","translate("+x+", "+Y+")").call(f).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}h(Z,"makeGrid");function Q(x,Y){let _=0;const S=Object.keys(D).map(p=>[p,D[p]]);q.append("g").selectAll("text").data(S).enter().append(function(p){const U=p[0].split(Vn.lineBreakRegex),l=-(U.length-1)/2,f=M.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("dy",l+"em");for(const[y,m]of U.entries()){const E=M.createElementNS("http://www.w3.org/2000/svg","tspan");E.setAttribute("alignment-baseline","central"),E.setAttribute("x","10"),y>0&&E.setAttribute("dy","1em"),E.textContent=m,f.appendChild(E)}return f}).attr("x",10).attr("y",function(p,U){if(U>0)for(let l=0;l` + .mermaid-main-font { + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } +`,"getStyles"),xi=bi,Mi={parser:Aa,db:yi,renderer:Ti,styles:xi};export{Mi as diagram}; diff --git a/static/js/md-gitGraph-YCYPL57B-ClKbk6IU.js b/static/js/md-gitGraph-YCYPL57B-CpuUbWJB.js similarity index 60% rename from static/js/md-gitGraph-YCYPL57B-ClKbk6IU.js rename to static/js/md-gitGraph-YCYPL57B-CpuUbWJB.js index b9c0f29bd..2ef740deb 100644 --- a/static/js/md-gitGraph-YCYPL57B-ClKbk6IU.js +++ b/static/js/md-gitGraph-YCYPL57B-CpuUbWJB.js @@ -1,15 +1,15 @@ -var Gc=Object.defineProperty;var Uc=(n,e,t)=>e in n?Gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Je=(n,e,t)=>Uc(n,typeof e!="symbol"?e+"":e,t);import{bz as Fc,bA as Bc,aQ as so,bj as Hc,aU as Vc,aR as Z,aA as Wc,aB as Ji,b9 as Kc,bc as ao,bd as oo,bo as Qi,ba as zc,aD as mt,aE as D,aS as Zi,aM as qc,bB as tn}from"./md-index-BVqvVggs.js";import{k as Mt,j as Ti,g as Kt,S as Yc,w as Xc,x as Jc,c as lo,v as K,y as co,l as Qc,z as Zc,A as eu,B as tu,C as nu,a as uo,d as S,i as ze,r as oe,f as Re,D as q}from"./md-_baseUniq-BgyQXxRT.js";import{j as _i,m as b,d as ru,f as Ie,g as Dt,i as Ei,h as x,l as jt,e as iu}from"./md-_basePickBy-CkE1q7AX.js";import{c as te}from"./md-clone-DXToIaWo.js";var su=Object.prototype,au=su.hasOwnProperty,Ee=Fc(function(n,e){if(Bc(e)||so(e)){Hc(e,Mt(e),n);return}for(var t in e)au.call(e,t)&&Vc(n,t,e[t])});function fo(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++r=uu&&(s=Jc,a=!1,e=new Yc(e));e:for(;++i-1:!!i&&co(n,e,t)>-1}function es(n,e,t){var r=n==null?0:n.length;if(!r)return-1;var i=0;return co(n,e,i)}var _u="[object RegExp]";function Eu(n){return ao(n)&&oo(n)==_u}var ts=Qi&&Qi.isRegExp,qe=ts?zc(ts):Eu,Ru="Expected a function";function Au(n){if(typeof n!="function")throw new TypeError(Ru);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Pe(n,e){if(n==null)return{};var t=Qc(Zc(n),function(r){return[r]});return e=Kt(e),ru(n,t,function(r,i){return e(r,i[0])})}function rr(n,e){var t=Z(n)?eu:tu;return t(n,Au(Kt(e)))}function vu(n,e){var t;return Ti(n,function(r,i,s){return t=e(r,i,s),!t}),!!t}function ho(n,e,t){var r=Z(n)?nu:vu;return r(n,Kt(e))}function Ri(n){return n&&n.length?uo(n):[]}function bu(n,e){return n&&n.length?uo(n,Kt(e)):[]}function ae(n){return typeof n=="object"&&n!==null&&typeof n.$type=="string"}function Ge(n){return typeof n=="object"&&n!==null&&typeof n.$refText=="string"}function Nu(n){return typeof n=="object"&&n!==null&&typeof n.name=="string"&&typeof n.type=="string"&&typeof n.path=="string"}function kn(n){return typeof n=="object"&&n!==null&&ae(n.container)&&Ge(n.reference)&&typeof n.message=="string"}class po{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return ae(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[t];if(i!==void 0)return i;{const s=this.computeIsSubtype(e,t);return r[t]=s,s}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Gt(n){return typeof n=="object"&&n!==null&&Array.isArray(n.content)}function mo(n){return typeof n=="object"&&n!==null&&typeof n.tokenType=="object"}function go(n){return Gt(n)&&typeof n.fullText=="string"}class ie{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do r=t.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(i=>[e?e(i):i,t?t(i):i]);return new Map(r)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new ie(()=>({first:this.startFn(),firstDone:!1}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=t.next(),!i.done)return i;while(!i.done);return ke})}join(e=","){const t=this.iterator();let r="",i,s=!1;do i=t.next(),i.done||(s&&(r+=e),r+=ku(i.value)),s=!0;while(!i.done);return r}indexOf(e,t=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=t&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(e){return new ie(this.startFn,t=>{const{done:r,value:i}=this.nextFn(t);return r?ke:{done:!1,value:e(i)}})}filter(e){return new ie(this.startFn,t=>{let r;do if(r=this.nextFn(t),!r.done&&e(r.value))return r;while(!r.done);return ke})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){const r=this.iterator();let i=t,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,t,r);return s===void 0?i.value:t(s,i.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(e){return new ie(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const s=t.iterator.next();if(s.done)t.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(t.this);if(!r){const s=e(i);if(On(s))t.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(t.iterator);return ke})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new ie(()=>({this:t.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=t.nextFn(r.this);if(!i)if(On(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ke})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(e=1){return new ie(()=>{const t=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?ke:this.nextFn(t.state)))}distinct(e){const t=new Set;return this.filter(r=>{const i=e?e(r):r;return t.has(i)?!1:(t.add(i),!0)})}exclude(e,t){const r=new Set;for(const i of e){const s=t?t(i):i;r.add(s)}return this.filter(i=>{const s=t?t(i):i;return!r.has(s)})}}function ku(n){return typeof n=="string"?n:typeof n>"u"?"undefined":typeof n.toString=="function"?n.toString():Object.prototype.toString.call(n)}function On(n){return!!n&&typeof n[Symbol.iterator]=="function"}const Iu=new ie(()=>{},()=>ke),ke=Object.freeze({done:!0,value:void 0});function Q(...n){if(n.length===1){const e=n[0];if(e instanceof ie)return e;if(On(e))return new ie(()=>e[Symbol.iterator](),t=>t.next());if(typeof e.length=="number")return new ie(()=>({index:0}),t=>t.index1?new ie(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(t(a.value)[Symbol.iterator]()),a}return ke})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Pr;(function(n){function e(s){return s.reduce((a,o)=>a+o,0)}n.sum=e;function t(s){return s.reduce((a,o)=>a*o,0)}n.product=t;function r(s){return s.reduce((a,o)=>Math.min(a,o))}n.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}n.max=i})(Pr||(Pr={}));function Mr(n){return new Ai(n,e=>Gt(e)?e.content:[],{includeRoot:!0})}function Su(n,e){for(;n.container;)if(n=n.container,n===e)return!0;return!1}function Dr(n){return{start:{character:n.startColumn-1,line:n.startLine-1},end:{character:n.endColumn,line:n.endLine-1}}}function Ln(n){if(!n)return;const{offset:e,end:t,range:r}=n;return{range:r,offset:e,end:t,length:t-e}}var Ze;(function(n){n[n.Before=0]="Before",n[n.After=1]="After",n[n.OverlapFront=2]="OverlapFront",n[n.OverlapBack=3]="OverlapBack",n[n.Inside=4]="Inside"})(Ze||(Ze={}));function xu(n,e){if(n.end.linee.end.line||n.start.line===e.end.line&&n.start.character>e.end.character)return Ze.After;const t=n.start.line>e.start.line||n.start.line===e.start.line&&n.start.character>=e.start.character,r=n.end.lineZe.After}const wu=/^[\w\p{L}]$/u;function Ou(n,e){if(n){const t=Lu(n,!0);if(t&&ns(t,e))return t;if(go(n)){const r=n.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=n.content[i];if(ns(s,e))return s}}}}function ns(n,e){return mo(n)&&e.includes(n.tokenType.name)}function Lu(n,e=!0){for(;n.container;){const t=n.container;let r=t.content.indexOf(n);for(;r>0;){r--;const i=t.content[r];if(e||!i.hidden)return i}n=t}}class yo extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function ir(n){throw new Error("Error! The input value was not handled.")}const Er="AbstractRule",Rr="AbstractType",rs="Condition",$u="TypeDefinition",is="ValueLiteral",To="AbstractElement";function Pu(n){return M.isInstance(n,To)}const Mu="ArrayLiteral",Du="ArrayType",_o="BooleanLiteral";function ju(n){return M.isInstance(n,_o)}const Eo="Conjunction";function Gu(n){return M.isInstance(n,Eo)}const Ro="Disjunction";function Uu(n){return M.isInstance(n,Ro)}const Fu="Grammar",Ao="InferredType";function vo(n){return M.isInstance(n,Ao)}const bo="Interface";function No(n){return M.isInstance(n,bo)}const ko="Negation";function Bu(n){return M.isInstance(n,ko)}const Hu="NumberLiteral",Vu="Parameter",Io="ParameterReference";function Wu(n){return M.isInstance(n,Io)}const So="ParserRule";function Se(n){return M.isInstance(n,So)}const Ku="ReferenceType",zu="ReturnType";function qu(n){return M.isInstance(n,zu)}const xo="SimpleType";function Yu(n){return M.isInstance(n,xo)}const Xu="StringLiteral",jr="TerminalRule";function gt(n){return M.isInstance(n,jr)}const Co="Type";function wo(n){return M.isInstance(n,Co)}const Ju="UnionType",Oo="Action";function sr(n){return M.isInstance(n,Oo)}const Lo="Alternatives";function $o(n){return M.isInstance(n,Lo)}const Po="Assignment";function ut(n){return M.isInstance(n,Po)}const Mo="CharacterRange";function Qu(n){return M.isInstance(n,Mo)}const Do="CrossReference";function vi(n){return M.isInstance(n,Do)}const jo="EndOfFile";function Zu(n){return M.isInstance(n,jo)}const Go="Group";function bi(n){return M.isInstance(n,Go)}const Uo="Keyword";function dt(n){return M.isInstance(n,Uo)}const Fo="NegatedToken";function ed(n){return M.isInstance(n,Fo)}const Bo="RegexToken";function td(n){return M.isInstance(n,Bo)}const Ho="RuleCall";function ft(n){return M.isInstance(n,Ho)}const Vo="TerminalAlternatives";function nd(n){return M.isInstance(n,Vo)}const Wo="TerminalGroup";function rd(n){return M.isInstance(n,Wo)}const Ko="TerminalRuleCall";function id(n){return M.isInstance(n,Ko)}const zo="UnorderedGroup";function qo(n){return M.isInstance(n,zo)}const Yo="UntilToken";function sd(n){return M.isInstance(n,Yo)}const Xo="Wildcard";function ad(n){return M.isInstance(n,Xo)}class Jo extends po{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case Oo:case Lo:case Po:case Mo:case Do:case jo:case Go:case Uo:case Fo:case Bo:case Ho:case Vo:case Wo:case Ko:case zo:case Yo:case Xo:return this.isSubtype(To,t);case Mu:case Hu:case Xu:return this.isSubtype(is,t);case Du:case Ku:case xo:case Ju:return this.isSubtype($u,t);case _o:return this.isSubtype(rs,t)||this.isSubtype(is,t);case Eo:case Ro:case ko:case Io:return this.isSubtype(rs,t);case Ao:case bo:case Co:return this.isSubtype(Rr,t);case So:return this.isSubtype(Er,t)||this.isSubtype(Rr,t);case jr:return this.isSubtype(Er,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Rr;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Er;case"Grammar:usedGrammars":return Fu;case"NamedArgument:parameter":case"ParameterReference:parameter":return Vu;case"TerminalRuleCall:rule":return jr;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const M=new Jo;function od(n){for(const[e,t]of Object.entries(n))e.startsWith("$")||(Array.isArray(t)?t.forEach((r,i)=>{ae(r)&&(r.$container=n,r.$containerProperty=e,r.$containerIndex=i)}):ae(t)&&(t.$container=n,t.$containerProperty=e))}function ar(n,e){let t=n;for(;t;){if(e(t))return t;t=t.$container}}function Ue(n){const t=ld(n).$document;if(!t)throw new Error("AST node has no document.");return t}function ld(n){for(;n.$container;)n=n.$container;return n}function Ni(n,e){if(!n)throw new Error("Node must be an AstNode.");const t=e==null?void 0:e.range;return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndexNi(t,e))}function Rt(n,e){if(!n)throw new Error("Root node must be an AstNode.");return new Ai(n,t=>Ni(t,e),{includeRoot:!0})}function ss(n,e){var t;if(!e)return!0;const r=(t=n.$cstNode)===null||t===void 0?void 0:t.range;return r?Cu(r,e):!1}function Qo(n){return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexe in n?Gc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Je=(n,e,t)=>Uc(n,typeof e!="symbol"?e+"":e,t);import{bz as Fc,bA as Bc,aQ as ao,bj as Hc,aU as Vc,aR as Z,aA as Wc,aB as Qi,b9 as Kc,bc as oo,bd as lo,ba as zc,bo as Zi,aD as mt,aE as D,aS as es,aM as qc,bB as tn}from"./md-index-B8Nim9kS.js";import{k as Mt,j as vi,g as Kt,S as Yc,w as Xc,x as Jc,c as co,v as K,y as uo,l as Qc,z as Zc,A as eu,B as tu,C as nu,a as fo,d as S,i as ze,r as oe,f as Ee,D as q}from"./md-_baseUniq-DU1ET3rn.js";import{j as _i,m as b,d as ru,f as Ie,g as Dt,h as x,i as Ei,l as jt,e as iu}from"./md-_basePickBy-B78WwQFo.js";import{c as te}from"./md-clone-ByE4h4D7.js";var su=Object.prototype,au=su.hasOwnProperty,_e=Fc(function(n,e){if(Bc(e)||ao(e)){Hc(e,Mt(e),n);return}for(var t in e)au.call(e,t)&&Vc(n,t,e[t])});function ho(n,e,t){var r=-1,i=n.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++r=uu&&(s=Jc,a=!1,e=new Yc(e));e:for(;++i-1:!!i&&uo(n,e,t)>-1}function ts(n,e,t){var r=n==null?0:n.length;if(!r)return-1;var i=0;return uo(n,e,i)}var vu="[object RegExp]";function _u(n){return oo(n)&&lo(n)==vu}var ns=Zi&&Zi.isRegExp,qe=ns?zc(ns):_u,Eu="Expected a function";function Ru(n){if(typeof n!="function")throw new TypeError(Eu);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Pe(n,e){if(n==null)return{};var t=Qc(Zc(n),function(r){return[r]});return e=Kt(e),ru(n,t,function(r,i){return e(r,i[0])})}function rr(n,e){var t=Z(n)?eu:tu;return t(n,Ru(Kt(e)))}function Au(n,e){var t;return vi(n,function(r,i,s){return t=e(r,i,s),!t}),!!t}function po(n,e,t){var r=Z(n)?nu:Au;return r(n,Kt(e))}function Ri(n){return n&&n.length?fo(n):[]}function bu(n,e){return n&&n.length?fo(n,Kt(e)):[]}function ae(n){return typeof n=="object"&&n!==null&&typeof n.$type=="string"}function Ge(n){return typeof n=="object"&&n!==null&&typeof n.$refText=="string"}function Nu(n){return typeof n=="object"&&n!==null&&typeof n.name=="string"&&typeof n.type=="string"&&typeof n.path=="string"}function kn(n){return typeof n=="object"&&n!==null&&ae(n.container)&&Ge(n.reference)&&typeof n.message=="string"}class mo{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return ae(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[t];if(i!==void 0)return i;{const s=this.computeIsSubtype(e,t);return r[t]=s,s}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function Gt(n){return typeof n=="object"&&n!==null&&Array.isArray(n.content)}function go(n){return typeof n=="object"&&n!==null&&typeof n.tokenType=="object"}function yo(n){return Gt(n)&&typeof n.fullText=="string"}class ie{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let t=0,r=e.next();for(;!r.done;)t++,r=e.next();return t}toArray(){const e=[],t=this.iterator();let r;do r=t.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,t){const r=this.map(i=>[e?e(i):i,t?t(i):i]);return new Map(r)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new ie(()=>({first:this.startFn(),firstDone:!1}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=t.next(),!i.done)return i;while(!i.done);return ke})}join(e=","){const t=this.iterator();let r="",i,s=!1;do i=t.next(),i.done||(s&&(r+=e),r+=ku(i.value)),s=!0;while(!i.done);return r}indexOf(e,t=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=t&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(!e(r.value))return!1;r=t.next()}return!0}some(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return!0;r=t.next()}return!1}forEach(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;)e(i.value,r),i=t.next(),r++}map(e){return new ie(this.startFn,t=>{const{done:r,value:i}=this.nextFn(t);return r?ke:{done:!1,value:e(i)}})}filter(e){return new ie(this.startFn,t=>{let r;do if(r=this.nextFn(t),!r.done&&e(r.value))return r;while(!r.done);return ke})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){const r=this.iterator();let i=t,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,t,r);return s===void 0?i.value:t(s,i.value)}find(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(e(r.value))return r.value;r=t.next()}}findIndex(e){const t=this.iterator();let r=0,i=t.next();for(;!i.done;){if(e(i.value))return r;i=t.next(),r++}return-1}includes(e){const t=this.iterator();let r=t.next();for(;!r.done;){if(r.value===e)return!0;r=t.next()}return!1}flatMap(e){return new ie(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const s=t.iterator.next();if(s.done)t.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(t.this);if(!r){const s=e(i);if(On(s))t.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(t.iterator);return ke})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new ie(()=>({this:t.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=t.nextFn(r.this);if(!i)if(On(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ke})}head(){const t=this.iterator().next();if(!t.done)return t.value}tail(e=1){return new ie(()=>{const t=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?ke:this.nextFn(t.state)))}distinct(e){const t=new Set;return this.filter(r=>{const i=e?e(r):r;return t.has(i)?!1:(t.add(i),!0)})}exclude(e,t){const r=new Set;for(const i of e){const s=t?t(i):i;r.add(s)}return this.filter(i=>{const s=t?t(i):i;return!r.has(s)})}}function ku(n){return typeof n=="string"?n:typeof n>"u"?"undefined":typeof n.toString=="function"?n.toString():Object.prototype.toString.call(n)}function On(n){return!!n&&typeof n[Symbol.iterator]=="function"}const Iu=new ie(()=>{},()=>ke),ke=Object.freeze({done:!0,value:void 0});function Q(...n){if(n.length===1){const e=n[0];if(e instanceof ie)return e;if(On(e))return new ie(()=>e[Symbol.iterator](),t=>t.next());if(typeof e.length=="number")return new ie(()=>({index:0}),t=>t.index1?new ie(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:r!=null&&r.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(t(a.value)[Symbol.iterator]()),a}return ke})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Pr;(function(n){function e(s){return s.reduce((a,o)=>a+o,0)}n.sum=e;function t(s){return s.reduce((a,o)=>a*o,0)}n.product=t;function r(s){return s.reduce((a,o)=>Math.min(a,o))}n.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}n.max=i})(Pr||(Pr={}));function Mr(n){return new Ai(n,e=>Gt(e)?e.content:[],{includeRoot:!0})}function Su(n,e){for(;n.container;)if(n=n.container,n===e)return!0;return!1}function Dr(n){return{start:{character:n.startColumn-1,line:n.startLine-1},end:{character:n.endColumn,line:n.endLine-1}}}function Ln(n){if(!n)return;const{offset:e,end:t,range:r}=n;return{range:r,offset:e,end:t,length:t-e}}var Ze;(function(n){n[n.Before=0]="Before",n[n.After=1]="After",n[n.OverlapFront=2]="OverlapFront",n[n.OverlapBack=3]="OverlapBack",n[n.Inside=4]="Inside"})(Ze||(Ze={}));function xu(n,e){if(n.end.linee.end.line||n.start.line===e.end.line&&n.start.character>e.end.character)return Ze.After;const t=n.start.line>e.start.line||n.start.line===e.start.line&&n.start.character>=e.start.character,r=n.end.lineZe.After}const wu=/^[\w\p{L}]$/u;function Ou(n,e){if(n){const t=Lu(n,!0);if(t&&rs(t,e))return t;if(yo(n)){const r=n.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=n.content[i];if(rs(s,e))return s}}}}function rs(n,e){return go(n)&&e.includes(n.tokenType.name)}function Lu(n,e=!0){for(;n.container;){const t=n.container;let r=t.content.indexOf(n);for(;r>0;){r--;const i=t.content[r];if(e||!i.hidden)return i}n=t}}class To extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function ir(n){throw new Error("Error! The input value was not handled.")}const _r="AbstractRule",Er="AbstractType",is="Condition",$u="TypeDefinition",ss="ValueLiteral",vo="AbstractElement";function Pu(n){return M.isInstance(n,vo)}const Mu="ArrayLiteral",Du="ArrayType",_o="BooleanLiteral";function ju(n){return M.isInstance(n,_o)}const Eo="Conjunction";function Gu(n){return M.isInstance(n,Eo)}const Ro="Disjunction";function Uu(n){return M.isInstance(n,Ro)}const Fu="Grammar",Ao="InferredType";function bo(n){return M.isInstance(n,Ao)}const No="Interface";function ko(n){return M.isInstance(n,No)}const Io="Negation";function Bu(n){return M.isInstance(n,Io)}const Hu="NumberLiteral",Vu="Parameter",So="ParameterReference";function Wu(n){return M.isInstance(n,So)}const xo="ParserRule";function Se(n){return M.isInstance(n,xo)}const Ku="ReferenceType",zu="ReturnType";function qu(n){return M.isInstance(n,zu)}const Co="SimpleType";function Yu(n){return M.isInstance(n,Co)}const Xu="StringLiteral",jr="TerminalRule";function gt(n){return M.isInstance(n,jr)}const wo="Type";function Oo(n){return M.isInstance(n,wo)}const Ju="UnionType",Lo="Action";function sr(n){return M.isInstance(n,Lo)}const $o="Alternatives";function Po(n){return M.isInstance(n,$o)}const Mo="Assignment";function ut(n){return M.isInstance(n,Mo)}const Do="CharacterRange";function Qu(n){return M.isInstance(n,Do)}const jo="CrossReference";function bi(n){return M.isInstance(n,jo)}const Go="EndOfFile";function Zu(n){return M.isInstance(n,Go)}const Uo="Group";function Ni(n){return M.isInstance(n,Uo)}const Fo="Keyword";function dt(n){return M.isInstance(n,Fo)}const Bo="NegatedToken";function ed(n){return M.isInstance(n,Bo)}const Ho="RegexToken";function td(n){return M.isInstance(n,Ho)}const Vo="RuleCall";function ft(n){return M.isInstance(n,Vo)}const Wo="TerminalAlternatives";function nd(n){return M.isInstance(n,Wo)}const Ko="TerminalGroup";function rd(n){return M.isInstance(n,Ko)}const zo="TerminalRuleCall";function id(n){return M.isInstance(n,zo)}const qo="UnorderedGroup";function Yo(n){return M.isInstance(n,qo)}const Xo="UntilToken";function sd(n){return M.isInstance(n,Xo)}const Jo="Wildcard";function ad(n){return M.isInstance(n,Jo)}class Qo extends mo{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case Lo:case $o:case Mo:case Do:case jo:case Go:case Uo:case Fo:case Bo:case Ho:case Vo:case Wo:case Ko:case zo:case qo:case Xo:case Jo:return this.isSubtype(vo,t);case Mu:case Hu:case Xu:return this.isSubtype(ss,t);case Du:case Ku:case Co:case Ju:return this.isSubtype($u,t);case _o:return this.isSubtype(is,t)||this.isSubtype(ss,t);case Eo:case Ro:case Io:case So:return this.isSubtype(is,t);case Ao:case No:case wo:return this.isSubtype(Er,t);case xo:return this.isSubtype(_r,t)||this.isSubtype(Er,t);case jr:return this.isSubtype(_r,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Er;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return _r;case"Grammar:usedGrammars":return Fu;case"NamedArgument:parameter":case"ParameterReference:parameter":return Vu;case"TerminalRuleCall:rule":return jr;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const M=new Qo;function od(n){for(const[e,t]of Object.entries(n))e.startsWith("$")||(Array.isArray(t)?t.forEach((r,i)=>{ae(r)&&(r.$container=n,r.$containerProperty=e,r.$containerIndex=i)}):ae(t)&&(t.$container=n,t.$containerProperty=e))}function ar(n,e){let t=n;for(;t;){if(e(t))return t;t=t.$container}}function Ue(n){const t=ld(n).$document;if(!t)throw new Error("AST node has no document.");return t}function ld(n){for(;n.$container;)n=n.$container;return n}function ki(n,e){if(!n)throw new Error("Node must be an AstNode.");const t=e==null?void 0:e.range;return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndexki(t,e))}function Et(n,e){if(!n)throw new Error("Root node must be an AstNode.");return new Ai(n,t=>ki(t,e),{includeRoot:!0})}function as(n,e){var t;if(!e)return!0;const r=(t=n.$cstNode)===null||t===void 0?void 0:t.range;return r?Cu(r,e):!1}function Zo(n){return new ie(()=>({keys:Object.keys(n),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class or{visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const hd=/\r?\n/gm,pd=new el;class md extends or{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(e){let t="";for(let i=0;i=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class or{visitChildren(e){for(const t in e){const r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const hd=/\r?\n/gm,pd=new tl;class md extends or{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(!this.multiline&&t===` `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=lr(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` -`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const vr=new md;function gd(n){try{return typeof n=="string"&&(n=new RegExp(n)),n=n.toString(),vr.reset(n),vr.visit(pd.pattern(n)),vr.multiline}catch{return!1}}function ls(n){return(typeof n=="string"?new RegExp(n):n).test(" ")}function lr(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yd(n){return Array.prototype.map.call(n,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:lr(e)).join("")}function Td(n,e){const t=_d(n),r=e.match(t);return!!r&&r[0].length>0}function _d(n){typeof n=="string"&&(n=new RegExp(n));const e=n,t=n.source;let r=0;function i(){let s="",a;function o(c){s+=t.substr(r,c),r+=c}function l(c){s+="(?:"+t.substr(r,c)+"|$)",r+=c}for(;r",r)-r+1);break;default:l(2);break}break;case"[":a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(t)||[],l(a[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(t),a?o(a[0].length):l(1);break;case"(":if(t[r+1]==="?")switch(t[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":a=r,r+=3,i(),s+=t.substr(a,r-a);break;case"<":switch(t[r+3]){case"=":case"!":a=r,r+=4,i(),s+=t.substr(a,r-a);break;default:o(t.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:l(1);break}return s}return new RegExp(i(),n.flags)}function Ed(n){return n.rules.find(e=>Se(e)&&e.entry)}function Rd(n){return n.rules.filter(e=>gt(e)&&e.hidden)}function tl(n,e){const t=new Set,r=Ed(n);if(!r)return new Set(n.rules);const i=[r].concat(Rd(n));for(const a of i)nl(a,t,e);const s=new Set;for(const a of n.rules)(t.has(a.name)||gt(a)&&a.hidden)&&s.add(a);return s}function nl(n,e,t){e.add(n.name),pn(n).forEach(r=>{if(ft(r)||t){const i=r.rule.ref;i&&!e.has(i.name)&&nl(i,e,t)}})}function Ad(n){if(n.terminal)return n.terminal;if(n.type.ref){const e=il(n.type.ref);return e==null?void 0:e.terminal}}function vd(n){return n.hidden&&!Si(n).test(" ")}function bd(n,e){return!n||!e?[]:ki(n,e,n.astNode,!0)}function rl(n,e,t){if(!n||!e)return;const r=ki(n,e,n.astNode,!0);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function ki(n,e,t,r){if(!r){const i=ar(n.grammarSource,ut);if(i&&i.feature===e)return[n]}return Gt(n)&&n.astNode===t?n.content.flatMap(i=>ki(i,e,t,!1)):[]}function Nd(n,e,t){if(!n)return;const r=kd(n,e,n==null?void 0:n.astNode);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function kd(n,e,t){if(n.astNode!==t)return[];if(dt(n.grammarSource)&&n.grammarSource.value===e)return[n];const r=Mr(n).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===t?dt(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function Id(n){var e;const t=n.astNode;for(;t===((e=n.container)===null||e===void 0?void 0:e.astNode);){const r=ar(n.grammarSource,ut);if(r)return r;n=n.container}}function il(n){let e=n;return vo(e)&&(sr(e.$container)?e=e.$container.$container:Se(e.$container)?e=e.$container:ir(e.$container)),sl(n,e,new Map)}function sl(n,e,t){var r;function i(s,a){let o;return ar(s,ut)||(o=sl(a,a,t)),t.set(n,o),o}if(t.has(n))return t.get(n);t.set(n,void 0);for(const s of pn(e)){if(ut(s)&&s.feature.toLowerCase()==="name")return t.set(n,s),s;if(ft(s)&&Se(s.rule.ref))return i(s,s.rule.ref);if(Yu(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function Ii(n){return al(n,new Set)}function al(n,e){if(e.has(n))return!0;e.add(n);for(const t of pn(n))if(ft(t)){if(!t.rule.ref||Se(t.rule.ref)&&!al(t.rule.ref,e))return!1}else{if(ut(t))return!1;if(sr(t))return!1}return!!n.definition}function ol(n){if(n.inferredType)return n.inferredType.name;if(n.dataType)return n.dataType;if(n.returnType){const e=n.returnType.ref;if(e){if(Se(e))return e.name;if(No(e)||wo(e))return e.name}}}function cr(n){var e;if(Se(n))return Ii(n)?n.name:(e=ol(n))!==null&&e!==void 0?e:n.name;if(No(n)||wo(n)||qu(n))return n.name;if(sr(n)){const t=Sd(n);if(t)return t}else if(vo(n))return n.name;throw new Error("Cannot get name of Unknown Type")}function Sd(n){var e;if(n.inferredType)return n.inferredType.name;if(!((e=n.type)===null||e===void 0)&&e.ref)return cr(n.type.ref)}function xd(n){var e,t,r;return gt(n)?(t=(e=n.type)===null||e===void 0?void 0:e.name)!==null&&t!==void 0?t:"string":Ii(n)?n.name:(r=ol(n))!==null&&r!==void 0?r:n.name}function Si(n){const e={s:!1,i:!1,u:!1},t=zt(n.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(t,r)}const xi=/[\s\S]/.source;function zt(n,e){if(nd(n))return Cd(n);if(rd(n))return wd(n);if(Qu(n))return $d(n);if(id(n)){const t=n.rule.ref;if(!t)throw new Error("Missing rule reference.");return Ke(zt(t.definition),{cardinality:n.cardinality,lookahead:n.lookahead})}else{if(ed(n))return Ld(n);if(sd(n))return Od(n);if(td(n)){const t=n.regex.lastIndexOf("/"),r=n.regex.substring(1,t),i=n.regex.substring(t+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Ke(r,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}else{if(ad(n))return Ke(xi,{cardinality:n.cardinality,lookahead:n.lookahead});throw new Error(`Invalid terminal element: ${n==null?void 0:n.$type}`)}}}function Cd(n){return Ke(n.elements.map(e=>zt(e)).join("|"),{cardinality:n.cardinality,lookahead:n.lookahead})}function wd(n){return Ke(n.elements.map(e=>zt(e)).join(""),{cardinality:n.cardinality,lookahead:n.lookahead})}function Od(n){return Ke(`${xi}*?${zt(n.terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead})}function Ld(n){return Ke(`(?!${zt(n.terminal)})${xi}*?`,{cardinality:n.cardinality,lookahead:n.lookahead})}function $d(n){return n.right?Ke(`[${br(n.left)}-${br(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):Ke(br(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}function br(n){return lr(n.value)}function Ke(n,e){var t;return(e.wrap!==!1||e.lookahead)&&(n=`(${(t=e.lookahead)!==null&&t!==void 0?t:""}${n})`),e.cardinality?`${n}${e.cardinality}`:n}function Pd(n){const e=[],t=n.Grammar;for(const r of t.rules)gt(r)&&vd(r)&&gd(Si(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:wu}}function Gr(n){console&&console.error&&console.error(`Error: ${n}`)}function ll(n){console&&console.warn&&console.warn(`Warning: ${n}`)}function cl(n){const e=new Date().getTime(),t=n();return{time:new Date().getTime()-e,value:t}}function ul(n){function e(){}e.prototype=n;const t=new e;function r(){return typeof t.bar}return r(),r(),n}function Md(n){return Dd(n)?n.LABEL:n.name}function Dd(n){return fe(n.LABEL)&&n.LABEL!==""}class Fe{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),S(this.definition,t=>{t.accept(e)})}}class le extends Fe{constructor(e){super([]),this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class qt extends Fe{constructor(e){super(e.definition),this.orgText="",Ee(this,Pe(e,t=>t!==void 0))}}class he extends Fe{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Ee(this,Pe(e,t=>t!==void 0))}}class ee extends Fe{constructor(e){super(e.definition),this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}}class Ae extends Fe{constructor(e){super(e.definition),this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}}class ve extends Fe{constructor(e){super(e.definition),this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}}class H extends Fe{constructor(e){super(e.definition),this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}}class pe extends Fe{constructor(e){super(e.definition),this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}}class me extends Fe{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ee(this,Pe(e,t=>t!==void 0))}}class G{constructor(e){this.idx=1,Ee(this,Pe(e,t=>t!==void 0))}accept(e){e.visit(this)}}function jd(n){return b(n,In)}function In(n){function e(t){return b(t,In)}if(n instanceof le){const t={type:"NonTerminal",name:n.nonTerminalName,idx:n.idx};return fe(n.label)&&(t.label=n.label),t}else{if(n instanceof he)return{type:"Alternative",definition:e(n.definition)};if(n instanceof ee)return{type:"Option",idx:n.idx,definition:e(n.definition)};if(n instanceof Ae)return{type:"RepetitionMandatory",idx:n.idx,definition:e(n.definition)};if(n instanceof ve)return{type:"RepetitionMandatoryWithSeparator",idx:n.idx,separator:In(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof pe)return{type:"RepetitionWithSeparator",idx:n.idx,separator:In(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof H)return{type:"Repetition",idx:n.idx,definition:e(n.definition)};if(n instanceof me)return{type:"Alternation",idx:n.idx,definition:e(n.definition)};if(n instanceof G){const t={type:"Terminal",name:n.terminalType.name,label:Md(n.terminalType),idx:n.idx};fe(n.label)&&(t.terminalLabel=n.label);const r=n.terminalType.PATTERN;return n.terminalType.PATTERN&&(t.pattern=qe(r)?r.source:r),t}else{if(n instanceof qt)return{type:"Rule",name:n.name,orgText:n.orgText,definition:e(n.definition)};throw Error("non exhaustive match")}}}class Yt{visit(e){const t=e;switch(t.constructor){case le:return this.visitNonTerminal(t);case he:return this.visitAlternative(t);case ee:return this.visitOption(t);case Ae:return this.visitRepetitionMandatory(t);case ve:return this.visitRepetitionMandatoryWithSeparator(t);case pe:return this.visitRepetitionWithSeparator(t);case H:return this.visitRepetition(t);case me:return this.visitAlternation(t);case G:return this.visitTerminal(t);case qt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Gd(n){return n instanceof he||n instanceof ee||n instanceof H||n instanceof Ae||n instanceof ve||n instanceof pe||n instanceof G||n instanceof qt}function Mn(n,e=[]){return n instanceof ee||n instanceof H||n instanceof pe?!0:n instanceof me?ho(n.definition,r=>Mn(r,e)):n instanceof le&&ue(e,n)?!1:n instanceof Fe?(n instanceof le&&e.push(n),Oe(n.definition,r=>Mn(r,e))):!1}function Ud(n){return n instanceof me}function je(n){if(n instanceof le)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Ae)return"AT_LEAST_ONE";if(n instanceof ve)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof H)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}class ur{walk(e,t=[]){S(e.definition,(r,i)=>{const s=J(e.definition,i+1);if(r instanceof le)this.walkProdRef(r,s,t);else if(r instanceof G)this.walkTerminal(r,s,t);else if(r instanceof he)this.walkFlat(r,s,t);else if(r instanceof ee)this.walkOption(r,s,t);else if(r instanceof Ae)this.walkAtLeastOne(r,s,t);else if(r instanceof ve)this.walkAtLeastOneSep(r,s,t);else if(r instanceof pe)this.walkManySep(r,s,t);else if(r instanceof H)this.walkMany(r,s,t);else if(r instanceof me)this.walkOr(r,s,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const i=t.concat(r);this.walk(e,i)}walkOption(e,t,r){const i=t.concat(r);this.walk(e,i)}walkAtLeastOne(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkAtLeastOneSep(e,t,r){const i=cs(e,t,r);this.walk(e,i)}walkMany(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkManySep(e,t,r){const i=cs(e,t,r);this.walk(e,i)}walkOr(e,t,r){const i=t.concat(r);S(e.definition,s=>{const a=new he({definition:[s]});this.walk(a,i)})}}function cs(n,e,t){return[new ee({definition:[new G({terminalType:n.separator})].concat(n.definition)})].concat(e,t)}function mn(n){if(n instanceof le)return mn(n.referencedRule);if(n instanceof G)return Hd(n);if(Gd(n))return Fd(n);if(Ud(n))return Bd(n);throw Error("non exhaustive match")}function Fd(n){let e=[];const t=n.definition;let r=0,i=t.length>r,s,a=!0;for(;i&&a;)s=t[r],a=Mn(s),e=e.concat(mn(s)),r=r+1,i=t.length>r;return Ri(e)}function Bd(n){const e=b(n.definition,t=>mn(t));return Ri(Ie(e))}function Hd(n){return[n.terminalType]}const dl="_~IN~_";class Vd extends ur{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const i=Kd(e.referencedRule,e.idx)+this.topProd.name,s=t.concat(r),a=new he({definition:s}),o=mn(a);this.follows[i]=o}}function Wd(n){const e={};return S(n,t=>{const r=new Vd(t).startWalking();Ee(e,r)}),e}function Kd(n,e){return n.name+e+dl}let Sn={};const zd=new el;function dr(n){const e=n.toString();if(Sn.hasOwnProperty(e))return Sn[e];{const t=zd.pattern(e);return Sn[e]=t,t}}function qd(){Sn={}}const fl="Complement Sets are not supported for first char optimization",Dn=`Unable to use "first char" lexer optimizations: -`;function Yd(n,e=!1){try{const t=dr(n);return Ur(t.value,{},t.flags.ignoreCase)}catch(t){if(t.message===fl)e&&ll(`${Dn} Unable to optimize: < ${n.toString()} > +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const Ar=new md;function gd(n){try{return typeof n=="string"&&(n=new RegExp(n)),n=n.toString(),Ar.reset(n),Ar.visit(pd.pattern(n)),Ar.multiline}catch{return!1}}function cs(n){return(typeof n=="string"?new RegExp(n):n).test(" ")}function lr(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function yd(n){return Array.prototype.map.call(n,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:lr(e)).join("")}function Td(n,e){const t=vd(n),r=e.match(t);return!!r&&r[0].length>0}function vd(n){typeof n=="string"&&(n=new RegExp(n));const e=n,t=n.source;let r=0;function i(){let s="",a;function o(c){s+=t.substr(r,c),r+=c}function l(c){s+="(?:"+t.substr(r,c)+"|$)",r+=c}for(;r",r)-r+1);break;default:l(2);break}break;case"[":a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(t)||[],l(a[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(t),a?o(a[0].length):l(1);break;case"(":if(t[r+1]==="?")switch(t[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":a=r,r+=3,i(),s+=t.substr(a,r-a);break;case"<":switch(t[r+3]){case"=":case"!":a=r,r+=4,i(),s+=t.substr(a,r-a);break;default:o(t.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:l(1);break}return s}return new RegExp(i(),n.flags)}function _d(n){return n.rules.find(e=>Se(e)&&e.entry)}function Ed(n){return n.rules.filter(e=>gt(e)&&e.hidden)}function nl(n,e){const t=new Set,r=_d(n);if(!r)return new Set(n.rules);const i=[r].concat(Ed(n));for(const a of i)rl(a,t,e);const s=new Set;for(const a of n.rules)(t.has(a.name)||gt(a)&&a.hidden)&&s.add(a);return s}function rl(n,e,t){e.add(n.name),pn(n).forEach(r=>{if(ft(r)||t){const i=r.rule.ref;i&&!e.has(i.name)&&rl(i,e,t)}})}function Rd(n){if(n.terminal)return n.terminal;if(n.type.ref){const e=sl(n.type.ref);return e==null?void 0:e.terminal}}function Ad(n){return n.hidden&&!xi(n).test(" ")}function bd(n,e){return!n||!e?[]:Ii(n,e,n.astNode,!0)}function il(n,e,t){if(!n||!e)return;const r=Ii(n,e,n.astNode,!0);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function Ii(n,e,t,r){if(!r){const i=ar(n.grammarSource,ut);if(i&&i.feature===e)return[n]}return Gt(n)&&n.astNode===t?n.content.flatMap(i=>Ii(i,e,t,!1)):[]}function Nd(n,e,t){if(!n)return;const r=kd(n,e,n==null?void 0:n.astNode);if(r.length!==0)return t!==void 0?t=Math.max(0,Math.min(t,r.length-1)):t=0,r[t]}function kd(n,e,t){if(n.astNode!==t)return[];if(dt(n.grammarSource)&&n.grammarSource.value===e)return[n];const r=Mr(n).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===t?dt(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function Id(n){var e;const t=n.astNode;for(;t===((e=n.container)===null||e===void 0?void 0:e.astNode);){const r=ar(n.grammarSource,ut);if(r)return r;n=n.container}}function sl(n){let e=n;return bo(e)&&(sr(e.$container)?e=e.$container.$container:Se(e.$container)?e=e.$container:ir(e.$container)),al(n,e,new Map)}function al(n,e,t){var r;function i(s,a){let o;return ar(s,ut)||(o=al(a,a,t)),t.set(n,o),o}if(t.has(n))return t.get(n);t.set(n,void 0);for(const s of pn(e)){if(ut(s)&&s.feature.toLowerCase()==="name")return t.set(n,s),s;if(ft(s)&&Se(s.rule.ref))return i(s,s.rule.ref);if(Yu(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function Si(n){return ol(n,new Set)}function ol(n,e){if(e.has(n))return!0;e.add(n);for(const t of pn(n))if(ft(t)){if(!t.rule.ref||Se(t.rule.ref)&&!ol(t.rule.ref,e))return!1}else{if(ut(t))return!1;if(sr(t))return!1}return!!n.definition}function ll(n){if(n.inferredType)return n.inferredType.name;if(n.dataType)return n.dataType;if(n.returnType){const e=n.returnType.ref;if(e){if(Se(e))return e.name;if(ko(e)||Oo(e))return e.name}}}function cr(n){var e;if(Se(n))return Si(n)?n.name:(e=ll(n))!==null&&e!==void 0?e:n.name;if(ko(n)||Oo(n)||qu(n))return n.name;if(sr(n)){const t=Sd(n);if(t)return t}else if(bo(n))return n.name;throw new Error("Cannot get name of Unknown Type")}function Sd(n){var e;if(n.inferredType)return n.inferredType.name;if(!((e=n.type)===null||e===void 0)&&e.ref)return cr(n.type.ref)}function xd(n){var e,t,r;return gt(n)?(t=(e=n.type)===null||e===void 0?void 0:e.name)!==null&&t!==void 0?t:"string":Si(n)?n.name:(r=ll(n))!==null&&r!==void 0?r:n.name}function xi(n){const e={s:!1,i:!1,u:!1},t=zt(n.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(t,r)}const Ci=/[\s\S]/.source;function zt(n,e){if(nd(n))return Cd(n);if(rd(n))return wd(n);if(Qu(n))return $d(n);if(id(n)){const t=n.rule.ref;if(!t)throw new Error("Missing rule reference.");return Ke(zt(t.definition),{cardinality:n.cardinality,lookahead:n.lookahead})}else{if(ed(n))return Ld(n);if(sd(n))return Od(n);if(td(n)){const t=n.regex.lastIndexOf("/"),r=n.regex.substring(1,t),i=n.regex.substring(t+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),Ke(r,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}else{if(ad(n))return Ke(Ci,{cardinality:n.cardinality,lookahead:n.lookahead});throw new Error(`Invalid terminal element: ${n==null?void 0:n.$type}`)}}}function Cd(n){return Ke(n.elements.map(e=>zt(e)).join("|"),{cardinality:n.cardinality,lookahead:n.lookahead})}function wd(n){return Ke(n.elements.map(e=>zt(e)).join(""),{cardinality:n.cardinality,lookahead:n.lookahead})}function Od(n){return Ke(`${Ci}*?${zt(n.terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead})}function Ld(n){return Ke(`(?!${zt(n.terminal)})${Ci}*?`,{cardinality:n.cardinality,lookahead:n.lookahead})}function $d(n){return n.right?Ke(`[${br(n.left)}-${br(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):Ke(br(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1})}function br(n){return lr(n.value)}function Ke(n,e){var t;return(e.wrap!==!1||e.lookahead)&&(n=`(${(t=e.lookahead)!==null&&t!==void 0?t:""}${n})`),e.cardinality?`${n}${e.cardinality}`:n}function Pd(n){const e=[],t=n.Grammar;for(const r of t.rules)gt(r)&&Ad(r)&&gd(xi(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:wu}}function Gr(n){console&&console.error&&console.error(`Error: ${n}`)}function cl(n){console&&console.warn&&console.warn(`Warning: ${n}`)}function ul(n){const e=new Date().getTime(),t=n();return{time:new Date().getTime()-e,value:t}}function dl(n){function e(){}e.prototype=n;const t=new e;function r(){return typeof t.bar}return r(),r(),n}function Md(n){return Dd(n)?n.LABEL:n.name}function Dd(n){return fe(n.LABEL)&&n.LABEL!==""}class Fe{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),S(this.definition,t=>{t.accept(e)})}}class le extends Fe{constructor(e){super([]),this.idx=1,_e(this,Pe(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class qt extends Fe{constructor(e){super(e.definition),this.orgText="",_e(this,Pe(e,t=>t!==void 0))}}class he extends Fe{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,_e(this,Pe(e,t=>t!==void 0))}}class ee extends Fe{constructor(e){super(e.definition),this.idx=1,_e(this,Pe(e,t=>t!==void 0))}}class Re extends Fe{constructor(e){super(e.definition),this.idx=1,_e(this,Pe(e,t=>t!==void 0))}}class Ae extends Fe{constructor(e){super(e.definition),this.idx=1,_e(this,Pe(e,t=>t!==void 0))}}class H extends Fe{constructor(e){super(e.definition),this.idx=1,_e(this,Pe(e,t=>t!==void 0))}}class pe extends Fe{constructor(e){super(e.definition),this.idx=1,_e(this,Pe(e,t=>t!==void 0))}}class me extends Fe{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,_e(this,Pe(e,t=>t!==void 0))}}class G{constructor(e){this.idx=1,_e(this,Pe(e,t=>t!==void 0))}accept(e){e.visit(this)}}function jd(n){return b(n,In)}function In(n){function e(t){return b(t,In)}if(n instanceof le){const t={type:"NonTerminal",name:n.nonTerminalName,idx:n.idx};return fe(n.label)&&(t.label=n.label),t}else{if(n instanceof he)return{type:"Alternative",definition:e(n.definition)};if(n instanceof ee)return{type:"Option",idx:n.idx,definition:e(n.definition)};if(n instanceof Re)return{type:"RepetitionMandatory",idx:n.idx,definition:e(n.definition)};if(n instanceof Ae)return{type:"RepetitionMandatoryWithSeparator",idx:n.idx,separator:In(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof pe)return{type:"RepetitionWithSeparator",idx:n.idx,separator:In(new G({terminalType:n.separator})),definition:e(n.definition)};if(n instanceof H)return{type:"Repetition",idx:n.idx,definition:e(n.definition)};if(n instanceof me)return{type:"Alternation",idx:n.idx,definition:e(n.definition)};if(n instanceof G){const t={type:"Terminal",name:n.terminalType.name,label:Md(n.terminalType),idx:n.idx};fe(n.label)&&(t.terminalLabel=n.label);const r=n.terminalType.PATTERN;return n.terminalType.PATTERN&&(t.pattern=qe(r)?r.source:r),t}else{if(n instanceof qt)return{type:"Rule",name:n.name,orgText:n.orgText,definition:e(n.definition)};throw Error("non exhaustive match")}}}class Yt{visit(e){const t=e;switch(t.constructor){case le:return this.visitNonTerminal(t);case he:return this.visitAlternative(t);case ee:return this.visitOption(t);case Re:return this.visitRepetitionMandatory(t);case Ae:return this.visitRepetitionMandatoryWithSeparator(t);case pe:return this.visitRepetitionWithSeparator(t);case H:return this.visitRepetition(t);case me:return this.visitAlternation(t);case G:return this.visitTerminal(t);case qt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function Gd(n){return n instanceof he||n instanceof ee||n instanceof H||n instanceof Re||n instanceof Ae||n instanceof pe||n instanceof G||n instanceof qt}function Mn(n,e=[]){return n instanceof ee||n instanceof H||n instanceof pe?!0:n instanceof me?po(n.definition,r=>Mn(r,e)):n instanceof le&&ue(e,n)?!1:n instanceof Fe?(n instanceof le&&e.push(n),Oe(n.definition,r=>Mn(r,e))):!1}function Ud(n){return n instanceof me}function je(n){if(n instanceof le)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Re)return"AT_LEAST_ONE";if(n instanceof Ae)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof H)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}class ur{walk(e,t=[]){S(e.definition,(r,i)=>{const s=J(e.definition,i+1);if(r instanceof le)this.walkProdRef(r,s,t);else if(r instanceof G)this.walkTerminal(r,s,t);else if(r instanceof he)this.walkFlat(r,s,t);else if(r instanceof ee)this.walkOption(r,s,t);else if(r instanceof Re)this.walkAtLeastOne(r,s,t);else if(r instanceof Ae)this.walkAtLeastOneSep(r,s,t);else if(r instanceof pe)this.walkManySep(r,s,t);else if(r instanceof H)this.walkMany(r,s,t);else if(r instanceof me)this.walkOr(r,s,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){const i=t.concat(r);this.walk(e,i)}walkOption(e,t,r){const i=t.concat(r);this.walk(e,i)}walkAtLeastOne(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkAtLeastOneSep(e,t,r){const i=us(e,t,r);this.walk(e,i)}walkMany(e,t,r){const i=[new ee({definition:e.definition})].concat(t,r);this.walk(e,i)}walkManySep(e,t,r){const i=us(e,t,r);this.walk(e,i)}walkOr(e,t,r){const i=t.concat(r);S(e.definition,s=>{const a=new he({definition:[s]});this.walk(a,i)})}}function us(n,e,t){return[new ee({definition:[new G({terminalType:n.separator})].concat(n.definition)})].concat(e,t)}function mn(n){if(n instanceof le)return mn(n.referencedRule);if(n instanceof G)return Hd(n);if(Gd(n))return Fd(n);if(Ud(n))return Bd(n);throw Error("non exhaustive match")}function Fd(n){let e=[];const t=n.definition;let r=0,i=t.length>r,s,a=!0;for(;i&&a;)s=t[r],a=Mn(s),e=e.concat(mn(s)),r=r+1,i=t.length>r;return Ri(e)}function Bd(n){const e=b(n.definition,t=>mn(t));return Ri(Ie(e))}function Hd(n){return[n.terminalType]}const fl="_~IN~_";class Vd extends ur{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){const i=Kd(e.referencedRule,e.idx)+this.topProd.name,s=t.concat(r),a=new he({definition:s}),o=mn(a);this.follows[i]=o}}function Wd(n){const e={};return S(n,t=>{const r=new Vd(t).startWalking();_e(e,r)}),e}function Kd(n,e){return n.name+e+fl}let Sn={};const zd=new tl;function dr(n){const e=n.toString();if(Sn.hasOwnProperty(e))return Sn[e];{const t=zd.pattern(e);return Sn[e]=t,t}}function qd(){Sn={}}const hl="Complement Sets are not supported for first char optimization",Dn=`Unable to use "first char" lexer optimizations: +`;function Yd(n,e=!1){try{const t=dr(n);return Ur(t.value,{},t.flags.ignoreCase)}catch(t){if(t.message===hl)e&&cl(`${Dn} Unable to optimize: < ${n.toString()} > Complement Sets cannot be automatically optimized. This will disable the lexer's first char optimizations. See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=` @@ -17,48 +17,48 @@ var Gc=Object.defineProperty;var Uc=(n,e,t)=>e in n?Gc(n,e,{enumerable:!0,config See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Gr(`${Dn} Failed parsing: < ${n.toString()} > Using the @chevrotain/regexp-to-ast library - Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Ur(n,e,t){switch(n.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")vn(l,e,t);else{const c=l;if(t===!0)for(let u=c.from;u<=c.to;u++)vn(u,e,t);else{for(let u=c.from;u<=c.to&&u=on){const u=c.from>=on?c.from:on,d=c.to,f=et(u),h=et(d);for(let m=f;m<=h;m++)e[m]=m}}}});break;case"Group":Ur(a.value,e,t);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Fr(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return K(e)}function vn(n,e,t){const r=et(n);e[r]=r,t===!0&&Xd(n,e)}function Xd(n,e){const t=String.fromCharCode(n),r=t.toUpperCase();if(r!==t){const i=et(r.charCodeAt(0));e[i]=i}else{const i=t.toLowerCase();if(i!==t){const s=et(i.charCodeAt(0));e[s]=s}}}function us(n,e){return Dt(n.value,t=>{if(typeof t=="number")return ue(e,t);{const r=t;return Dt(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Fr(n){const e=n.quantifier;return e&&e.atLeast===0?!0:n.value?Z(n.value)?Oe(n.value,Fr):Fr(n.value):!1}class Jd extends or{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){ue(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?us(e,this.targetCharCodes)===void 0&&(this.found=!0):us(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function Ci(n,e){if(e instanceof RegExp){const t=dr(e),r=new Jd(n);return r.visit(t),r.found}else return Dt(e,t=>ue(n,t.charCodeAt(0)))!==void 0}const ht="PATTERN",an="defaultMode",bn="modes";let hl=typeof new RegExp("(?:)").sticky=="boolean";function Qd(n,e){e=Ei(e,{useSticky:hl,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:(R,_)=>_()});const t=e.tracer;t("initCharCodeToOptimizedIndexMap",()=>{Af()});let r;t("Reject Lexer.NA",()=>{r=rr(n,R=>R[ht]===de.NA)});let i=!1,s;t("Transform Patterns",()=>{i=!1,s=b(r,R=>{const _=R[ht];if(qe(_)){const I=_.source;return I.length===1&&I!=="^"&&I!=="$"&&I!=="."&&!_.ignoreCase?I:I.length===2&&I[0]==="\\"&&!ue(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],I[1])?I[1]:e.useSticky?fs(_):ds(_)}else{if(mt(_))return i=!0,{exec:_};if(typeof _=="object")return i=!0,_;if(typeof _=="string"){if(_.length===1)return _;{const I=_.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(I);return e.useSticky?fs(j):ds(j)}}else throw Error("non exhaustive match")}})});let a,o,l,c,u;t("misc mapping",()=>{a=b(r,R=>R.tokenTypeIdx),o=b(r,R=>{const _=R.GROUP;if(_!==de.SKIPPED){if(fe(_))return _;if(ze(_))return!1;throw Error("non exhaustive match")}}),l=b(r,R=>{const _=R.LONGER_ALT;if(_)return Z(_)?b(_,j=>es(r,j)):[es(r,_)]}),c=b(r,R=>R.PUSH_MODE),u=b(r,R=>x(R,"POP_MODE"))});let d;t("Line Terminator Handling",()=>{const R=gl(e.lineTerminatorCharacters);d=b(r,_=>!1),e.positionTracking!=="onlyOffset"&&(d=b(r,_=>x(_,"LINE_BREAKS")?!!_.LINE_BREAKS:ml(_,R)===!1&&Ci(R,_.PATTERN)))});let f,h,m,g;t("Misc Mapping #2",()=>{f=b(r,pl),h=b(s,_f),m=oe(r,(R,_)=>{const I=_.GROUP;return fe(I)&&I!==de.SKIPPED&&(R[I]=[]),R},{}),g=b(s,(R,_)=>({pattern:s[_],longerAlt:l[_],canLineTerminator:d[_],isCustom:f[_],short:h[_],group:o[_],push:c[_],pop:u[_],tokenTypeIdx:a[_],tokenType:r[_]}))});let E=!0,y=[];return e.safeMode||t("First Char Optimization",()=>{y=oe(r,(R,_,I)=>{if(typeof _.PATTERN=="string"){const j=_.PATTERN.charCodeAt(0),ne=et(j);Nr(R,ne,g[I])}else if(Z(_.START_CHARS_HINT)){let j;S(_.START_CHARS_HINT,ne=>{const Ce=typeof ne=="string"?ne.charCodeAt(0):ne,ge=et(Ce);j!==ge&&(j=ge,Nr(R,ge,g[I]))})}else if(qe(_.PATTERN))if(_.PATTERN.unicode)E=!1,e.ensureOptimizations&&Gr(`${Dn} Unable to analyze < ${_.PATTERN.toString()} > pattern. + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Ur(n,e,t){switch(n.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")An(l,e,t);else{const c=l;if(t===!0)for(let u=c.from;u<=c.to;u++)An(u,e,t);else{for(let u=c.from;u<=c.to&&u=on){const u=c.from>=on?c.from:on,d=c.to,f=et(u),h=et(d);for(let m=f;m<=h;m++)e[m]=m}}}});break;case"Group":Ur(a.value,e,t);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Fr(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return K(e)}function An(n,e,t){const r=et(n);e[r]=r,t===!0&&Xd(n,e)}function Xd(n,e){const t=String.fromCharCode(n),r=t.toUpperCase();if(r!==t){const i=et(r.charCodeAt(0));e[i]=i}else{const i=t.toLowerCase();if(i!==t){const s=et(i.charCodeAt(0));e[s]=s}}}function ds(n,e){return Dt(n.value,t=>{if(typeof t=="number")return ue(e,t);{const r=t;return Dt(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Fr(n){const e=n.quantifier;return e&&e.atLeast===0?!0:n.value?Z(n.value)?Oe(n.value,Fr):Fr(n.value):!1}class Jd extends or{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){ue(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?ds(e,this.targetCharCodes)===void 0&&(this.found=!0):ds(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function wi(n,e){if(e instanceof RegExp){const t=dr(e),r=new Jd(n);return r.visit(t),r.found}else return Dt(e,t=>ue(n,t.charCodeAt(0)))!==void 0}const ht="PATTERN",an="defaultMode",bn="modes";let pl=typeof new RegExp("(?:)").sticky=="boolean";function Qd(n,e){e=Ei(e,{useSticky:pl,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:(E,v)=>v()});const t=e.tracer;t("initCharCodeToOptimizedIndexMap",()=>{Rf()});let r;t("Reject Lexer.NA",()=>{r=rr(n,E=>E[ht]===de.NA)});let i=!1,s;t("Transform Patterns",()=>{i=!1,s=b(r,E=>{const v=E[ht];if(qe(v)){const I=v.source;return I.length===1&&I!=="^"&&I!=="$"&&I!=="."&&!v.ignoreCase?I:I.length===2&&I[0]==="\\"&&!ue(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],I[1])?I[1]:e.useSticky?hs(v):fs(v)}else{if(mt(v))return i=!0,{exec:v};if(typeof v=="object")return i=!0,v;if(typeof v=="string"){if(v.length===1)return v;{const I=v.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(I);return e.useSticky?hs(j):fs(j)}}else throw Error("non exhaustive match")}})});let a,o,l,c,u;t("misc mapping",()=>{a=b(r,E=>E.tokenTypeIdx),o=b(r,E=>{const v=E.GROUP;if(v!==de.SKIPPED){if(fe(v))return v;if(ze(v))return!1;throw Error("non exhaustive match")}}),l=b(r,E=>{const v=E.LONGER_ALT;if(v)return Z(v)?b(v,j=>ts(r,j)):[ts(r,v)]}),c=b(r,E=>E.PUSH_MODE),u=b(r,E=>x(E,"POP_MODE"))});let d;t("Line Terminator Handling",()=>{const E=yl(e.lineTerminatorCharacters);d=b(r,v=>!1),e.positionTracking!=="onlyOffset"&&(d=b(r,v=>x(v,"LINE_BREAKS")?!!v.LINE_BREAKS:gl(v,E)===!1&&wi(E,v.PATTERN)))});let f,h,m,g;t("Misc Mapping #2",()=>{f=b(r,ml),h=b(s,vf),m=oe(r,(E,v)=>{const I=v.GROUP;return fe(I)&&I!==de.SKIPPED&&(E[I]=[]),E},{}),g=b(s,(E,v)=>({pattern:s[v],longerAlt:l[v],canLineTerminator:d[v],isCustom:f[v],short:h[v],group:o[v],push:c[v],pop:u[v],tokenTypeIdx:a[v],tokenType:r[v]}))});let _=!0,y=[];return e.safeMode||t("First Char Optimization",()=>{y=oe(r,(E,v,I)=>{if(typeof v.PATTERN=="string"){const j=v.PATTERN.charCodeAt(0),ne=et(j);Nr(E,ne,g[I])}else if(Z(v.START_CHARS_HINT)){let j;S(v.START_CHARS_HINT,ne=>{const Ce=typeof ne=="string"?ne.charCodeAt(0):ne,ge=et(Ce);j!==ge&&(j=ge,Nr(E,ge,g[I]))})}else if(qe(v.PATTERN))if(v.PATTERN.unicode)_=!1,e.ensureOptimizations&&Gr(`${Dn} Unable to analyze < ${v.PATTERN.toString()} > pattern. The regexp unicode flag is not currently supported by the regexp-to-ast library. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const j=Yd(_.PATTERN,e.ensureOptimizations);D(j)&&(E=!1),S(j,ne=>{Nr(R,ne,g[I])})}else e.ensureOptimizations&&Gr(`${Dn} TokenType: <${_.name}> is using a custom token pattern without providing parameter. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const j=Yd(v.PATTERN,e.ensureOptimizations);D(j)&&(_=!1),S(j,ne=>{Nr(E,ne,g[I])})}else e.ensureOptimizations&&Gr(`${Dn} TokenType: <${v.name}> is using a custom token pattern without providing parameter. This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),E=!1;return R},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:E}}function Zd(n,e){let t=[];const r=tf(n);t=t.concat(r.errors);const i=nf(r.valid),s=i.valid;return t=t.concat(i.errors),t=t.concat(ef(s)),t=t.concat(df(s)),t=t.concat(ff(s,e)),t=t.concat(hf(s)),t}function ef(n){let e=[];const t=Re(n,r=>qe(r[ht]));return e=e.concat(sf(t)),e=e.concat(lf(t)),e=e.concat(cf(t)),e=e.concat(uf(t)),e=e.concat(af(t)),e}function tf(n){const e=Re(n,i=>!x(i,ht)),t=b(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:V.MISSING_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}function nf(n){const e=Re(n,i=>{const s=i[ht];return!qe(s)&&!mt(s)&&!x(s,"exec")&&!fe(s)}),t=b(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:V.INVALID_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}const rf=/[^\\][$]/;function sf(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const t=Re(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return rf.test(s.source)}});return b(t,i=>({message:`Unexpected RegExp Anchor Error: + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return E},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:_}}function Zd(n,e){let t=[];const r=tf(n);t=t.concat(r.errors);const i=nf(r.valid),s=i.valid;return t=t.concat(i.errors),t=t.concat(ef(s)),t=t.concat(df(s)),t=t.concat(ff(s,e)),t=t.concat(hf(s)),t}function ef(n){let e=[];const t=Ee(n,r=>qe(r[ht]));return e=e.concat(sf(t)),e=e.concat(lf(t)),e=e.concat(cf(t)),e=e.concat(uf(t)),e=e.concat(af(t)),e}function tf(n){const e=Ee(n,i=>!x(i,ht)),t=b(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:V.MISSING_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}function nf(n){const e=Ee(n,i=>{const s=i[ht];return!qe(s)&&!mt(s)&&!x(s,"exec")&&!fe(s)}),t=b(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:V.INVALID_PATTERN,tokenTypes:[i]})),r=nr(n,e);return{errors:t,valid:r}}const rf=/[^\\][$]/;function sf(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const t=Ee(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return rf.test(s.source)}});return b(t,i=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:V.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function af(n){const e=Re(n,r=>r.PATTERN.test(""));return b(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:V.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const of=/[^\\[][\^]|^\^/;function lf(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const t=Re(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return of.test(s.source)}});return b(t,i=>({message:`Unexpected RegExp Anchor Error: + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:V.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function af(n){const e=Ee(n,r=>r.PATTERN.test(""));return b(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:V.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const of=/[^\\[][\^]|^\^/;function lf(n){class e extends or{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const t=Ee(n,i=>{const s=i.PATTERN;try{const a=dr(s),o=new e;return o.visit(a),o.found}catch{return of.test(s.source)}});return b(t,i=>({message:`Unexpected RegExp Anchor Error: Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:V.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function cf(n){const e=Re(n,r=>{const i=r[ht];return i instanceof RegExp&&(i.multiline||i.global)});return b(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:V.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function uf(n){const e=[];let t=b(n,s=>oe(n,(a,o)=>(s.PATTERN.source===o.PATTERN.source&&!ue(e,o)&&o.PATTERN!==de.NA&&(e.push(o),a.push(o)),a),[]));t=hn(t);const r=Re(t,s=>s.length>1);return b(r,s=>{const a=b(s,l=>l.name);return{message:`The same RegExp pattern ->${$e(s).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:V.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function df(n){const e=Re(n,r=>{if(!x(r,"GROUP"))return!1;const i=r.GROUP;return i!==de.SKIPPED&&i!==de.NA&&!fe(i)});return b(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:V.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function ff(n,e){const t=Re(n,i=>i.PUSH_MODE!==void 0&&!ue(e,i.PUSH_MODE));return b(t,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:V.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function hf(n){const e=[],t=oe(n,(r,i,s)=>{const a=i.PATTERN;return a===de.NA||(fe(a)?r.push({str:a,idx:s,tokenType:i}):qe(a)&&mf(a)&&r.push({str:a.source,idx:s,tokenType:i})),r},[]);return S(n,(r,i)=>{S(t,({str:s,idx:a,tokenType:o})=>{if(i${o.name}<- can never be matched. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:V.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function cf(n){const e=Ee(n,r=>{const i=r[ht];return i instanceof RegExp&&(i.multiline||i.global)});return b(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:V.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function uf(n){const e=[];let t=b(n,s=>oe(n,(a,o)=>(s.PATTERN.source===o.PATTERN.source&&!ue(e,o)&&o.PATTERN!==de.NA&&(e.push(o),a.push(o)),a),[]));t=hn(t);const r=Ee(t,s=>s.length>1);return b(r,s=>{const a=b(s,l=>l.name);return{message:`The same RegExp pattern ->${$e(s).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:V.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function df(n){const e=Ee(n,r=>{if(!x(r,"GROUP"))return!1;const i=r.GROUP;return i!==de.SKIPPED&&i!==de.NA&&!fe(i)});return b(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:V.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function ff(n,e){const t=Ee(n,i=>i.PUSH_MODE!==void 0&&!ue(e,i.PUSH_MODE));return b(t,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:V.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function hf(n){const e=[],t=oe(n,(r,i,s)=>{const a=i.PATTERN;return a===de.NA||(fe(a)?r.push({str:a,idx:s,tokenType:i}):qe(a)&&mf(a)&&r.push({str:a.source,idx:s,tokenType:i})),r},[]);return S(n,(r,i)=>{S(t,({str:s,idx:a,tokenType:o})=>{if(i${o.name}<- can never be matched. Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:V.UNREACHABLE_PATTERN,tokenTypes:[r,o]})}})}),e}function pf(n,e){if(qe(e)){const t=e.exec(n);return t!==null&&t.index===0}else{if(mt(e))return e(n,0,[],{});if(x(e,"exec"))return e.exec(n,0,[],{});if(typeof e=="string")return e===n;throw Error("non exhaustive match")}}function mf(n){return Dt([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>n.source.indexOf(t)!==-1)===void 0}function ds(n){const e=n.ignoreCase?"i":"";return new RegExp(`^(?:${n.source})`,e)}function fs(n){const e=n.ignoreCase?"iy":"y";return new RegExp(`${n.source}`,e)}function gf(n,e,t){const r=[];return x(n,an)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+an+`> property in its definition +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:V.UNREACHABLE_PATTERN,tokenTypes:[r,o]})}})}),e}function pf(n,e){if(qe(e)){const t=e.exec(n);return t!==null&&t.index===0}else{if(mt(e))return e(n,0,[],{});if(x(e,"exec"))return e.exec(n,0,[],{});if(typeof e=="string")return e===n;throw Error("non exhaustive match")}}function mf(n){return Dt([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>n.source.indexOf(t)!==-1)===void 0}function fs(n){const e=n.ignoreCase?"i":"";return new RegExp(`^(?:${n.source})`,e)}function hs(n){const e=n.ignoreCase?"iy":"y";return new RegExp(`${n.source}`,e)}function gf(n,e,t){const r=[];return x(n,an)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+an+`> property in its definition `,type:V.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),x(n,bn)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+bn+`> property in its definition `,type:V.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),x(n,bn)&&x(n,an)&&!x(n.modes,n.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${an}: <${n.defaultMode}>which does not exist `,type:V.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),x(n,bn)&&S(n.modes,(i,s)=>{S(i,(a,o)=>{if(ze(a))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${o}> `,type:V.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(x(a,"LONGER_ALT")){const l=Z(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];S(l,c=>{!ze(c)&&!ue(i,c)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${c.name}> on token <${a.name}> outside of mode <${s}> -`,type:V.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function yf(n,e,t){const r=[];let i=!1;const s=hn(Ie(K(n.modes))),a=rr(s,l=>l[ht]===de.NA),o=gl(t);return e&&S(a,l=>{const c=ml(l,o);if(c!==!1){const d={message:Rf(l,c),type:c.issue,tokenType:l};r.push(d)}else x(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):Ci(o,l.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. +`,type:V.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function yf(n,e,t){const r=[];let i=!1;const s=hn(Ie(K(n.modes))),a=rr(s,l=>l[ht]===de.NA),o=yl(t);return e&&S(a,l=>{const c=gl(l,o);if(c!==!1){const d={message:Ef(l,c),type:c.issue,tokenType:l};r.push(d)}else x(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):wi(o,l.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. This Lexer has been defined to track line and column information, But none of the Token Types can be identified as matching a line terminator. See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:V.NO_LINE_BREAKS_FLAGS}),r}function Tf(n){const e={},t=Mt(n);return S(t,r=>{const i=n[r];if(Z(i))e[r]=[];else throw Error("non exhaustive match")}),e}function pl(n){const e=n.PATTERN;if(qe(e))return!1;if(mt(e))return!0;if(x(e,"exec"))return!0;if(fe(e))return!1;throw Error("non exhaustive match")}function _f(n){return fe(n)&&n.length===1?n.charCodeAt(0):!1}const Ef={test:function(n){const e=n.length;for(let t=this.lastIndex;t{const i=n[r];if(Z(i))e[r]=[];else throw Error("non exhaustive match")}),e}function ml(n){const e=n.PATTERN;if(qe(e))return!1;if(mt(e))return!0;if(x(e,"exec"))return!0;if(fe(e))return!1;throw Error("non exhaustive match")}function vf(n){return fe(n)&&n.length===1?n.charCodeAt(0):!1}const _f={test:function(n){const e=n.length;for(let t=this.lastIndex;t Token Type Root cause: ${e.errMsg}. For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===V.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. The problem is in the <${n.name}> Token Type - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function gl(n){return b(n,t=>fe(t)?t.charCodeAt(0):t)}function Nr(n,e,t){n[e]===void 0?n[e]=[t]:n[e].push(t)}const on=256;let xn=[];function et(n){return n255?255+~~(n/255):n}}function gn(n,e){const t=n.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}function jn(n,e){return n.tokenTypeIdx===e.tokenTypeIdx}let hs=1;const yl={};function yn(n){const e=vf(n);bf(e),kf(e),Nf(e),S(e,t=>{t.isParent=t.categoryMatches.length>0})}function vf(n){let e=te(n),t=n,r=!0;for(;r;){t=hn(Ie(b(t,s=>s.CATEGORIES)));const i=nr(t,e);e=e.concat(i),D(i)?r=!1:t=i}return e}function bf(n){S(n,e=>{_l(e)||(yl[hs]=e,e.tokenTypeIdx=hs++),ps(e)&&!Z(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ps(e)||(e.CATEGORIES=[]),If(e)||(e.categoryMatches=[]),Sf(e)||(e.categoryMatchesMap={})})}function Nf(n){S(n,e=>{e.categoryMatches=[],S(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(yl[r].tokenTypeIdx)})})}function kf(n){S(n,e=>{Tl([],e)})}function Tl(n,e){S(n,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),S(e.CATEGORIES,t=>{const r=n.concat(e);ue(r,t)||Tl(r,t)})}function _l(n){return x(n,"tokenTypeIdx")}function ps(n){return x(n,"CATEGORIES")}function If(n){return x(n,"categoryMatches")}function Sf(n){return x(n,"categoryMatchesMap")}function xf(n){return x(n,"tokenTypeIdx")}const Cf={buildUnableToPopLexerModeMessage(n){return`Unable to pop Lexer Mode after encountering Token ->${n.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(n,e,t,r,i){return`unexpected character: ->${n.charAt(e)}<- at offset: ${e}, skipped ${t} characters.`}};var V;(function(n){n[n.MISSING_PATTERN=0]="MISSING_PATTERN",n[n.INVALID_PATTERN=1]="INVALID_PATTERN",n[n.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",n[n.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",n[n.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",n[n.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",n[n.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",n[n.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",n[n.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",n[n.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",n[n.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",n[n.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",n[n.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",n[n.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",n[n.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",n[n.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",n[n.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",n[n.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(V||(V={}));const ln={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Cf,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ln);class de{constructor(e,t=ln){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);const{time:o,value:l}=cl(s),c=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return s()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=Ee({},ln,t);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===ln.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Ef;else if(this.config.lineTerminatorCharacters===ln.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Z(e)?i={modes:{defaultMode:te(e)},defaultMode:an}:(s=!1,i=te(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(gf(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(yf(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},S(i.modes,(o,l)=>{i.modes[l]=rr(o,c=>ze(c))});const a=Mt(i.modes);if(S(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Zd(o,a))}),D(this.lexerDefinitionErrors)){yn(o);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=Qd(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=c.charCodeToPatternIdxToConfig,this.emptyGroups=Ee({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=c.canBeOptimized}})}),this.defaultMode=i.defaultMode,!D(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=b(this.lexerDefinitionErrors,c=>c.message).join(`----------------------- + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function yl(n){return b(n,t=>fe(t)?t.charCodeAt(0):t)}function Nr(n,e,t){n[e]===void 0?n[e]=[t]:n[e].push(t)}const on=256;let xn=[];function et(n){return n255?255+~~(n/255):n}}function gn(n,e){const t=n.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}function jn(n,e){return n.tokenTypeIdx===e.tokenTypeIdx}let ps=1;const Tl={};function yn(n){const e=Af(n);bf(e),kf(e),Nf(e),S(e,t=>{t.isParent=t.categoryMatches.length>0})}function Af(n){let e=te(n),t=n,r=!0;for(;r;){t=hn(Ie(b(t,s=>s.CATEGORIES)));const i=nr(t,e);e=e.concat(i),D(i)?r=!1:t=i}return e}function bf(n){S(n,e=>{_l(e)||(Tl[ps]=e,e.tokenTypeIdx=ps++),ms(e)&&!Z(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ms(e)||(e.CATEGORIES=[]),If(e)||(e.categoryMatches=[]),Sf(e)||(e.categoryMatchesMap={})})}function Nf(n){S(n,e=>{e.categoryMatches=[],S(e.categoryMatchesMap,(t,r)=>{e.categoryMatches.push(Tl[r].tokenTypeIdx)})})}function kf(n){S(n,e=>{vl([],e)})}function vl(n,e){S(n,t=>{e.categoryMatchesMap[t.tokenTypeIdx]=!0}),S(e.CATEGORIES,t=>{const r=n.concat(e);ue(r,t)||vl(r,t)})}function _l(n){return x(n,"tokenTypeIdx")}function ms(n){return x(n,"CATEGORIES")}function If(n){return x(n,"categoryMatches")}function Sf(n){return x(n,"categoryMatchesMap")}function xf(n){return x(n,"tokenTypeIdx")}const Cf={buildUnableToPopLexerModeMessage(n){return`Unable to pop Lexer Mode after encountering Token ->${n.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(n,e,t,r,i){return`unexpected character: ->${n.charAt(e)}<- at offset: ${e}, skipped ${t} characters.`}};var V;(function(n){n[n.MISSING_PATTERN=0]="MISSING_PATTERN",n[n.INVALID_PATTERN=1]="INVALID_PATTERN",n[n.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",n[n.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",n[n.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",n[n.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",n[n.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",n[n.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",n[n.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",n[n.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",n[n.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",n[n.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",n[n.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",n[n.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",n[n.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",n[n.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",n[n.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",n[n.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(V||(V={}));const ln={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Cf,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ln);class de{constructor(e,t=ln){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);const{time:o,value:l}=ul(s),c=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return s()},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=_e({},ln,t);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===ln.lineTerminatorsPattern)this.config.lineTerminatorsPattern=_f;else if(this.config.lineTerminatorCharacters===ln.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Z(e)?i={modes:{defaultMode:te(e)},defaultMode:an}:(s=!1,i=te(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(gf(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(yf(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},S(i.modes,(o,l)=>{i.modes[l]=rr(o,c=>ze(c))});const a=Mt(i.modes);if(S(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Zd(o,a))}),D(this.lexerDefinitionErrors)){yn(o);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=Qd(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=c.charCodeToPatternIdxToConfig,this.emptyGroups=_e({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=c.canBeOptimized}})}),this.defaultMode=i.defaultMode,!D(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=b(this.lexerDefinitionErrors,c=>c.message).join(`----------------------- `);throw new Error(`Errors detected in definition of Lexer: -`+l)}S(this.lexerDefinitionWarning,o=>{ll(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(hl?(this.chopInput=Zi,this.match=this.matchWithTest):(this.updateLastIndex=q,this.match=this.matchWithExec),s&&(this.handleModes=q),this.trackStartLines===!1&&(this.computeNewColumn=Zi),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=q),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=oe(this.canModeBeOptimized,(l,c,u)=>(c===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&!D(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. +`+l)}S(this.lexerDefinitionWarning,o=>{cl(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(pl?(this.chopInput=es,this.match=this.matchWithTest):(this.updateLastIndex=q,this.match=this.matchWithExec),s&&(this.handleModes=q),this.trackStartLines===!1&&(this.computeNewColumn=es),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=q),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=oe(this.canModeBeOptimized,(l,c,u)=>(c===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&!D(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{qd()}),this.TRACE_INIT("toFastProperties",()=>{ul(this)})})}tokenize(e,t=this.defaultMode){if(!D(this.lexerDefinitionErrors)){const i=b(this.lexerDefinitionErrors,s=>s.message).join(`----------------------- + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{qd()}),this.TRACE_INIT("toFastProperties",()=>{dl(this)})})}tokenize(e,t=this.defaultMode){if(!D(this.lexerDefinitionErrors)){const i=b(this.lexerDefinitionErrors,s=>s.message).join(`----------------------- `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+i)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,i,s,a,o,l,c,u,d,f,h,m,g,E,y;const R=e,_=R.length;let I=0,j=0;const ne=this.hasCustom?0:Math.floor(e.length/10),Ce=new Array(ne),ge=[];let De=this.trackStartLines?1:void 0,be=this.trackStartLines?1:void 0;const v=Tf(this.emptyGroups),T=this.trackStartLines,A=this.config.lineTerminatorsPattern;let N=0,L=[],O=[];const w=[],ye=[];Object.freeze(ye);let z;function B(){return L}function at(re){const Ne=et(re),Tt=O[Ne];return Tt===void 0?ye:Tt}const jc=re=>{if(w.length===1&&re.tokenType.PUSH_MODE===void 0){const Ne=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(re);ge.push({offset:re.startOffset,line:re.startLine,column:re.startColumn,length:re.image.length,message:Ne})}else{w.pop();const Ne=jt(w);L=this.patternIdxToConfig[Ne],O=this.charCodeToPatternIdxToConfig[Ne],N=L.length;const Tt=this.canModeBeOptimized[Ne]&&this.config.safeMode===!1;O&&Tt?z=at:z=B}};function qi(re){w.push(re),O=this.charCodeToPatternIdxToConfig[re],L=this.patternIdxToConfig[re],N=L.length,N=L.length;const Ne=this.canModeBeOptimized[re]&&this.config.safeMode===!1;O&&Ne?z=at:z=B}qi.call(this,t);let we;const Yi=this.config.recoveryEnabled;for(;I<_;){l=null;const re=R.charCodeAt(I),Ne=z(re),Tt=Ne.length;for(r=0;rl.length){l=a,c=u,we=He;break}}}break}}if(l!==null){if(d=l.length,f=we.group,f!==void 0&&(h=we.tokenTypeIdx,m=this.createTokenInstance(l,I,h,we.tokenType,De,be,d),this.handlePayload(m,c),f===!1?j=this.addToken(Ce,j,m):v[f].push(m)),e=this.chopInput(e,d),I=I+d,be=this.computeNewColumn(be,d),T===!0&&we.canLineTerminator===!0){let Te=0,Be,Xe;A.lastIndex=0;do Be=A.test(l),Be===!0&&(Xe=A.lastIndex-1,Te++);while(Be===!0);Te!==0&&(De=De+Te,be=d-Xe,this.updateTokenEndLineColumnLocation(m,f,Xe,Te,De,be,d))}this.handleModes(we,jc,qi,m)}else{const Te=I,Be=De,Xe=be;let He=Yi===!1;for(;He===!1&&I<_;)for(e=this.chopInput(e,1),I++,i=0;i ${At(n)} <--`:`token of type --> ${n.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:n,ruleName:e}){return"Redundant input, expecting EOF but found: "+n.image},buildNoViableAltMessage({expectedPathsPerAlt:n,actual:e,previous:t,customUserDescription:r,ruleName:i}){const s="Expecting: ",o=` -but found: '`+$e(e).image+"'";if(r)return s+r+o;{const l=oe(n,(f,h)=>f.concat(h),[]),c=b(l,f=>`[${b(f,h=>At(h)).join(", ")}]`),d=`one of these possible Token sequences: +`+i)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,i,s,a,o,l,c,u,d,f,h,m,g,_,y;const E=e,v=E.length;let I=0,j=0;const ne=this.hasCustom?0:Math.floor(e.length/10),Ce=new Array(ne),ge=[];let De=this.trackStartLines?1:void 0,be=this.trackStartLines?1:void 0;const A=Tf(this.emptyGroups),T=this.trackStartLines,R=this.config.lineTerminatorsPattern;let N=0,L=[],O=[];const w=[],ye=[];Object.freeze(ye);let z;function B(){return L}function at(re){const Ne=et(re),Tt=O[Ne];return Tt===void 0?ye:Tt}const jc=re=>{if(w.length===1&&re.tokenType.PUSH_MODE===void 0){const Ne=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(re);ge.push({offset:re.startOffset,line:re.startLine,column:re.startColumn,length:re.image.length,message:Ne})}else{w.pop();const Ne=jt(w);L=this.patternIdxToConfig[Ne],O=this.charCodeToPatternIdxToConfig[Ne],N=L.length;const Tt=this.canModeBeOptimized[Ne]&&this.config.safeMode===!1;O&&Tt?z=at:z=B}};function Yi(re){w.push(re),O=this.charCodeToPatternIdxToConfig[re],L=this.patternIdxToConfig[re],N=L.length,N=L.length;const Ne=this.canModeBeOptimized[re]&&this.config.safeMode===!1;O&&Ne?z=at:z=B}Yi.call(this,t);let we;const Xi=this.config.recoveryEnabled;for(;Il.length){l=a,c=u,we=He;break}}}break}}if(l!==null){if(d=l.length,f=we.group,f!==void 0&&(h=we.tokenTypeIdx,m=this.createTokenInstance(l,I,h,we.tokenType,De,be,d),this.handlePayload(m,c),f===!1?j=this.addToken(Ce,j,m):A[f].push(m)),e=this.chopInput(e,d),I=I+d,be=this.computeNewColumn(be,d),T===!0&&we.canLineTerminator===!0){let Te=0,Be,Xe;R.lastIndex=0;do Be=R.test(l),Be===!0&&(Xe=R.lastIndex-1,Te++);while(Be===!0);Te!==0&&(De=De+Te,be=d-Xe,this.updateTokenEndLineColumnLocation(m,f,Xe,Te,De,be,d))}this.handleModes(we,jc,Yi,m)}else{const Te=I,Be=De,Xe=be;let He=Xi===!1;for(;He===!1&&I ${Rt(n)} <--`:`token of type --> ${n.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:n,ruleName:e}){return"Redundant input, expecting EOF but found: "+n.image},buildNoViableAltMessage({expectedPathsPerAlt:n,actual:e,previous:t,customUserDescription:r,ruleName:i}){const s="Expecting: ",o=` +but found: '`+$e(e).image+"'";if(r)return s+r+o;{const l=oe(n,(f,h)=>f.concat(h),[]),c=b(l,f=>`[${b(f,h=>Rt(h)).join(", ")}]`),d=`one of these possible Token sequences: ${b(c,(f,h)=>` ${h+1}. ${f}`).join(` `)}`;return s+d+o}},buildEarlyExitMessage({expectedIterationPaths:n,actual:e,customUserDescription:t,ruleName:r}){const i="Expecting: ",a=` but found: '`+$e(e).image+"'";if(t)return i+t+a;{const l=`expecting at least one iteration which starts with one of these possible Token sequences:: - <${b(n,c=>`[${b(c,u=>At(u)).join(",")}]`).join(" ,")}>`;return i+l+a}}};Object.freeze(Et);const Lf={buildRuleNotFoundError(n,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- + <${b(n,c=>`[${b(c,u=>Rt(u)).join(",")}]`).join(" ,")}>`;return i+l+a}}};Object.freeze(_t);const Lf={buildRuleNotFoundError(n,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- inside top level rule: ->`+n.name+"<-"}},ct={buildDuplicateFoundError(n,e){function t(u){return u instanceof G?u.terminalType.name:u instanceof le?u.nonTerminalName:""}const r=n.name,i=$e(e),s=i.idx,a=je(i),o=t(i),l=s>0;let c=`->${a}${l?s:""}<- ${o?`with argument: ->${o}<-`:""} appears more than once (${e.length} times) in the top level rule: ->${r}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES @@ -67,11 +67,11 @@ inside top level rule: ->`+n.name+"<-"}},ct={buildDuplicateFoundError(n,e){funct The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${n.name}>. To resolve this make sure each Terminal and Non-Terminal names are unique This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(n){const e=b(n.prefixPath,i=>At(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;return`Ambiguous alternatives: <${n.ambiguityIndices.join(" ,")}> due to common lookahead prefix +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(n){const e=b(n.prefixPath,i=>Rt(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;return`Ambiguous alternatives: <${n.ambiguityIndices.join(" ,")}> due to common lookahead prefix in inside <${n.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`},buildAlternationAmbiguityError(n){const e=b(n.prefixPath,i=>At(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(" ,")}> in inside <${n.topLevelRule.name}> Rule, +For Further details.`},buildAlternationAmbiguityError(n){const e=b(n.prefixPath,i=>Rt(i)).join(", "),t=n.alternation.idx===0?"":n.alternation.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(" ,")}> in inside <${n.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES For Further details.`,r},buildEmptyRepetitionError(n){let e=je(n.repetition);return n.repetition.idx!==0&&(e+=n.repetition.idx),`The repetition <${e}> within Rule <${n.topLevelRule.name}> can never consume any tokens. @@ -83,45 +83,45 @@ rule: <${e}> can be invoked from itself (directly or indirectly) without consuming any Tokens. The grammar path that causes this is: ${r} To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(n){return"deprecated"},buildDuplicateRuleNameError(n){let e;return n.topLevelRule instanceof qt?e=n.topLevelRule.name:e=n.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${n.grammarName}<-`}};function $f(n,e){const t=new Pf(n,e);return t.resolveRefs(),t.errors}class Pf extends Yt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){S(K(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:ce.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Mf extends ur{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=te(this.path.ruleStack).reverse(),this.occurrenceStack=te(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){D(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Df extends Mf{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=t.concat(r),s=new he({definition:i});this.possibleTokTypes=mn(s),this.found=!0}}}class fr extends ur{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class jf extends fr{walkMany(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,t,r)}}class vs extends fr{walkManySep(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,t,r)}}class Gf extends fr{walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,t,r)}}class bs extends fr{walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,t,r)}}function Br(n,e,t=[]){t=te(t);let r=[],i=0;function s(o){return o.concat(J(n,i+1))}function a(o){const l=Br(s(o),e,t);return r.concat(l)}for(;t.length{D(l.definition)===!1&&(r=a(l.definition))}),r;if(o instanceof G)t.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:t,suffixDef:J(n,i)}),r}function vl(n,e,t,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const l=e.length,c=l-r-1,u=[],d=[];for(d.push({idx:-1,def:n,ruleStack:[],occurrenceStack:[]});!D(d);){const f=d.pop();if(f===a){o&&jt(d).idx<=c&&d.pop();continue}const h=f.def,m=f.idx,g=f.ruleStack,E=f.occurrenceStack;if(D(h))continue;const y=h[0];if(y===i){const R={idx:m,def:J(h),ruleStack:cn(g),occurrenceStack:cn(E)};d.push(R)}else if(y instanceof G)if(m=0;R--){const _=y.definition[R],I={idx:m,def:_.definition.concat(J(h)),ruleStack:g,occurrenceStack:E};d.push(I),d.push(a)}else if(y instanceof he)d.push({idx:m,def:y.definition.concat(J(h)),ruleStack:g,occurrenceStack:E});else if(y instanceof qt)d.push(Uf(y,m,g,E));else throw Error("non exhaustive match")}return u}function Uf(n,e,t,r){const i=te(t);i.push(n.name);const s=te(r);return s.push(1),{idx:e,def:n.definition,ruleStack:i,occurrenceStack:s}}var F;(function(n){n[n.OPTION=0]="OPTION",n[n.REPETITION=1]="REPETITION",n[n.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",n[n.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",n[n.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",n[n.ALTERNATION=5]="ALTERNATION"})(F||(F={}));function Oi(n){if(n instanceof ee||n==="Option")return F.OPTION;if(n instanceof H||n==="Repetition")return F.REPETITION;if(n instanceof Ae||n==="RepetitionMandatory")return F.REPETITION_MANDATORY;if(n instanceof ve||n==="RepetitionMandatoryWithSeparator")return F.REPETITION_MANDATORY_WITH_SEPARATOR;if(n instanceof pe||n==="RepetitionWithSeparator")return F.REPETITION_WITH_SEPARATOR;if(n instanceof me||n==="Alternation")return F.ALTERNATION;throw Error("non exhaustive match")}function Ns(n){const{occurrence:e,rule:t,prodType:r,maxLookahead:i}=n,s=Oi(r);return s===F.ALTERNATION?hr(e,t,i):pr(e,t,s,i)}function Ff(n,e,t,r,i,s){const a=hr(n,e,t),o=kl(a)?jn:gn;return s(a,r,o,i)}function Bf(n,e,t,r,i,s){const a=pr(n,e,i,t),o=kl(a)?jn:gn;return s(a[0],o,r)}function Hf(n,e,t,r){const i=n.length,s=Oe(n,a=>Oe(a,o=>o.length===1));if(e)return function(a){const o=b(a,l=>l.GATE);for(let l=0;lIe(l)),o=oe(a,(l,c,u)=>(S(c,d=>{x(l,d.tokenTypeIdx)||(l[d.tokenTypeIdx]=u),S(d.categoryMatches,f=>{x(l,f)||(l[f]=u)})}),l),{});return function(){const l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let a=0;as.length===1),i=n.length;if(r&&!t){const s=Ie(n);if(s.length===1&&D(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=oe(s,(o,l,c)=>(o[l.tokenTypeIdx]=!0,S(l.categoryMatches,u=>{o[u]=!0}),o),[]);return function(){const o=this.LA(1);return a[o.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sBr([a],1)),r=ks(t.length),i=b(t,a=>{const o={};return S(a,l=>{const c=kr(l.partialPath);S(c,u=>{o[u]=!0})}),o});let s=t;for(let a=1;a<=e;a++){const o=s;s=ks(o.length);for(let l=0;l{const y=kr(E.partialPath);S(y,R=>{i[l][R]=!0})})}}}}return r}function hr(n,e,t,r){const i=new bl(n,F.ALTERNATION,r);return e.accept(i),Nl(i.result,t)}function pr(n,e,t,r){const i=new bl(n,t);e.accept(i);const s=i.result,o=new Wf(e,n,t).startWalking(),l=new he({definition:s}),c=new he({definition:o});return Nl([l,c],r)}function Hr(n,e){e:for(let t=0;t{const i=e[r];return t===i||i.categoryMatchesMap[t.tokenTypeIdx]})}function kl(n){return Oe(n,e=>Oe(e,t=>Oe(t,r=>D(r.categoryMatches))))}function qf(n){const e=n.lookaheadStrategy.validate({rules:n.rules,tokenTypes:n.tokenTypes,grammarName:n.grammarName});return b(e,t=>Object.assign({type:ce.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Yf(n,e,t,r){const i=_e(n,l=>Xf(l,t)),s=lh(n,e,t),a=_e(n,l=>ih(l,t)),o=_e(n,l=>Zf(l,n,r,t));return i.concat(s,a,o)}function Xf(n,e){const t=new Qf;n.accept(t);const r=t.allProductions,i=gu(r,Jf),s=Pe(i,o=>o.length>1);return b(K(s),o=>{const l=$e(o),c=e.buildDuplicateFoundError(n,o),u=je(l),d={message:c,type:ce.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:u,occurrence:l.idx},f=Il(l);return f&&(d.parameter=f),d})}function Jf(n){return`${je(n)}_#_${n.idx}_#_${Il(n)}`}function Il(n){return n instanceof G?n.terminalType.name:n instanceof le?n.nonTerminalName:""}class Qf extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Zf(n,e,t,r){const i=[];if(oe(e,(a,o)=>o.name===n.name?a+1:a,0)>1){const a=r.buildDuplicateRuleNameError({topLevelRule:n,grammarName:t});i.push({message:a,type:ce.DUPLICATE_RULE_NAME,ruleName:n.name})}return i}function eh(n,e,t){const r=[];let i;return ue(e,n)||(i=`Invalid rule override, rule: ->${n}<- cannot be overridden in the grammar: ->${t}<-as it is not defined in any of the super grammars `,r.push({message:i,type:ce.INVALID_RULE_OVERRIDE,ruleName:n})),r}function Sl(n,e,t,r=[]){const i=[],s=Cn(e.definition);if(D(s))return[];{const a=n.name;ue(s,n)&&i.push({message:t.buildLeftRecursionError({topLevelRule:n,leftRecursionPath:r}),type:ce.LEFT_RECURSION,ruleName:a});const l=nr(s,r.concat([n])),c=_e(l,u=>{const d=te(r);return d.push(u),Sl(n,u,t,d)});return i.concat(c)}}function Cn(n){let e=[];if(D(n))return e;const t=$e(n);if(t instanceof le)e.push(t.referencedRule);else if(t instanceof he||t instanceof ee||t instanceof Ae||t instanceof ve||t instanceof pe||t instanceof H)e=e.concat(Cn(t.definition));else if(t instanceof me)e=Ie(b(t.definition,s=>Cn(s.definition)));else if(!(t instanceof G))throw Error("non exhaustive match");const r=Mn(t),i=n.length>1;if(r&&i){const s=J(n);return e.concat(Cn(s))}else return e}class Li extends Yt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function th(n,e){const t=new Li;n.accept(t);const r=t.alternations;return _e(r,s=>{const a=cn(s.definition);return _e(a,(o,l)=>{const c=vl([o],[],gn,1);return D(c)?[{message:e.buildEmptyAlternationError({topLevelRule:n,alternation:s,emptyChoiceIdx:l}),type:ce.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:s.idx,alternative:l+1}]:[]})})}function nh(n,e,t){const r=new Li;n.accept(r);let i=r.alternations;return i=rr(i,a=>a.ignoreAmbiguities===!0),_e(i,a=>{const o=a.idx,l=a.maxLookahead||e,c=hr(o,n,l,a),u=ah(c,a,n,t),d=oh(c,a,n,t);return u.concat(d)})}class rh extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function ih(n,e){const t=new Li;n.accept(t);const r=t.alternations;return _e(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:n,alternation:s}),type:ce.TOO_MANY_ALTS,ruleName:n.name,occurrence:s.idx}]:[])}function sh(n,e,t){const r=[];return S(n,i=>{const s=new rh;i.accept(s);const a=s.allProductions;S(a,o=>{const l=Oi(o),c=o.maxLookahead||e,u=o.idx,f=pr(u,i,l,c)[0];if(D(Ie(f))){const h=t.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:h,type:ce.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function ah(n,e,t,r){const i=[],s=oe(n,(o,l,c)=>(e.definition[c].ignoreAmbiguities===!0||S(l,u=>{const d=[c];S(n,(f,h)=>{c!==h&&Hr(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&d.push(h)}),d.length>1&&!Hr(i,u)&&(i.push(u),o.push({alts:d,path:u}))}),o),[]);return b(s,o=>{const l=b(o.alts,u=>u+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:ce.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:o.alts}})}function oh(n,e,t,r){const i=oe(n,(a,o,l)=>{const c=b(o,u=>({idx:l,path:u}));return a.concat(c)},[]);return hn(_e(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const l=a.idx,c=a.path,u=Re(i,f=>e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{const h=[f.idx+1,l+1],m=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:h,prefixPath:f.path}),type:ce.AMBIGUOUS_PREFIX_ALTS,ruleName:t.name,occurrence:m,alternatives:h}})}))}function lh(n,e,t){const r=[],i=b(e,s=>s.name);return S(n,s=>{const a=s.name;if(ue(i,a)){const o=t.buildNamespaceConflictError(s);r.push({message:o,type:ce.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function ch(n){const e=Ei(n,{errMsgProvider:Lf}),t={};return S(n.rules,r=>{t[r.name]=r}),$f(t,e.errMsgProvider)}function uh(n){return n=Ei(n,{errMsgProvider:ct}),Yf(n.rules,n.tokenTypes,n.errMsgProvider,n.grammarName)}const xl="MismatchedTokenException",Cl="NoViableAltException",wl="EarlyExitException",Ol="NotAllInputParsedException",Ll=[xl,Cl,wl,Ol];Object.freeze(Ll);function Gn(n){return ue(Ll,n.name)}class mr extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class $l extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=xl}}class dh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Cl}}class fh extends mr{constructor(e,t){super(e,t),this.name=Ol}}class hh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=wl}}const Ir={},Pl="InRuleRecoveryException";class ph extends Error{constructor(e){super(e),this.name=Pl}}class mh{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=x(e,"recoveryEnabled")?e.recoveryEnabled:Ye.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=gh)}getTokenToInsert(e){const t=wi(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){const s=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let l=!1;const c=this.LA(1);let u=this.LA(1);const d=()=>{const f=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:c,previous:f,ruleName:this.getCurrRuleFullName()}),m=new $l(h,c,this.LA(0));m.resyncedTokens=cn(o),this.SAVE_ERROR(m)};for(;!l;)if(this.tokenMatcher(u,i)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,s)?l=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){const r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new ph("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||D(t))return!1;const r=this.LA(1);return Dt(t,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return ue(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const i=Dt(e,s=>Al(t,s));if(i!==void 0)return i;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Ir;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return b(e,(r,i)=>i===0?Ir:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=b(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ie(e)}getFollowSetFromFollowKey(e){if(e===Ir)return[tt];const t=e.ruleName+e.idxInCallingRule+dl+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,tt)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return cn(t)}attemptInRepetitionRecovery(e,t,r,i,s,a,o){}getCurrentGrammarPath(e,t){const r=this.getHumanReadableRuleStack(),i=te(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return b(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function gh(n,e,t,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(l===void 0){const f=this.getCurrRuleFullName(),h=this.getGAstProductions()[f];l=new s(h,i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,u=l.occurrence;const d=l.isEndOfRule;this.RULE_STACK.length===1&&d&&c===void 0&&(c=tt,u=1),!(c===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,u,a)&&this.tryInRepetitionRecovery(n,e,t,c)}const yh=4,it=8,Ml=1<Sl(t,t,ct))}validateEmptyOrAlternatives(e){return _e(e,t=>th(t,ct))}validateAmbiguousAlternationAlternatives(e,t){return _e(e,r=>nh(r,t,ct))}validateSomeNonEmptyLookaheadPath(e,t){return sh(e,t,ct)}buildLookaheadForAlternation(e){return Ff(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Hf)}buildLookaheadForOptional(e){return Bf(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Oi(e.prodType),Vf)}}class Th{initLooksAhead(e){this.dynamicTokensEnabled=x(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ye.dynamicTokensEnabled,this.maxLookahead=x(e,"maxLookahead")?e.maxLookahead:Ye.maxLookahead,this.lookaheadStrategy=x(e,"lookaheadStrategy")?e.lookaheadStrategy:new $i({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){S(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=Eh(t);S(r,c=>{const u=c.idx===0?"":c.idx;this.TRACE_INIT(`${je(c)}${u}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:t,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=Sr(this.fullRuleNameToShort[t.name],Ml,c.idx);this.setLaFuncCache(f,d)})}),S(i,c=>{this.computeLookaheadFunc(t,c.idx,Vr,"Repetition",c.maxLookahead,je(c))}),S(s,c=>{this.computeLookaheadFunc(t,c.idx,Dl,"Option",c.maxLookahead,je(c))}),S(a,c=>{this.computeLookaheadFunc(t,c.idx,Wr,"RepetitionMandatory",c.maxLookahead,je(c))}),S(o,c=>{this.computeLookaheadFunc(t,c.idx,wn,"RepetitionMandatoryWithSeparator",c.maxLookahead,je(c))}),S(l,c=>{this.computeLookaheadFunc(t,c.idx,Kr,"RepetitionWithSeparator",c.maxLookahead,je(c))})})})}computeLookaheadFunc(e,t,r,i,s,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=Sr(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){const r=this.getLastExplicitRuleShortName();return Sr(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class _h extends Yt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const Nn=new _h;function Eh(n){Nn.reset(),n.accept(Nn);const e=Nn.dslMethods;return Nn.reset(),e}function Is(n,e){isNaN(n.startOffset)===!0?(n.startOffset=e.startOffset,n.endOffset=e.endOffset):n.endOffseta.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(n){return"deprecated"},buildDuplicateRuleNameError(n){let e;return n.topLevelRule instanceof qt?e=n.topLevelRule.name:e=n.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${n.grammarName}<-`}};function $f(n,e){const t=new Pf(n,e);return t.resolveRefs(),t.errors}class Pf extends Yt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){S(K(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:ce.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Mf extends ur{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=te(this.path.ruleStack).reverse(),this.occurrenceStack=te(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){D(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Df extends Mf{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=t.concat(r),s=new he({definition:i});this.possibleTokTypes=mn(s),this.found=!0}}}class fr extends ur{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class jf extends fr{walkMany(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,t,r)}}class bs extends fr{walkManySep(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,t,r)}}class Gf extends fr{walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,t,r)}}class Ns extends fr{walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){const i=$e(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof G&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,t,r)}}function Br(n,e,t=[]){t=te(t);let r=[],i=0;function s(o){return o.concat(J(n,i+1))}function a(o){const l=Br(s(o),e,t);return r.concat(l)}for(;t.length{D(l.definition)===!1&&(r=a(l.definition))}),r;if(o instanceof G)t.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:t,suffixDef:J(n,i)}),r}function bl(n,e,t,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const l=e.length,c=l-r-1,u=[],d=[];for(d.push({idx:-1,def:n,ruleStack:[],occurrenceStack:[]});!D(d);){const f=d.pop();if(f===a){o&&jt(d).idx<=c&&d.pop();continue}const h=f.def,m=f.idx,g=f.ruleStack,_=f.occurrenceStack;if(D(h))continue;const y=h[0];if(y===i){const E={idx:m,def:J(h),ruleStack:cn(g),occurrenceStack:cn(_)};d.push(E)}else if(y instanceof G)if(m=0;E--){const v=y.definition[E],I={idx:m,def:v.definition.concat(J(h)),ruleStack:g,occurrenceStack:_};d.push(I),d.push(a)}else if(y instanceof he)d.push({idx:m,def:y.definition.concat(J(h)),ruleStack:g,occurrenceStack:_});else if(y instanceof qt)d.push(Uf(y,m,g,_));else throw Error("non exhaustive match")}return u}function Uf(n,e,t,r){const i=te(t);i.push(n.name);const s=te(r);return s.push(1),{idx:e,def:n.definition,ruleStack:i,occurrenceStack:s}}var F;(function(n){n[n.OPTION=0]="OPTION",n[n.REPETITION=1]="REPETITION",n[n.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",n[n.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",n[n.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",n[n.ALTERNATION=5]="ALTERNATION"})(F||(F={}));function Li(n){if(n instanceof ee||n==="Option")return F.OPTION;if(n instanceof H||n==="Repetition")return F.REPETITION;if(n instanceof Re||n==="RepetitionMandatory")return F.REPETITION_MANDATORY;if(n instanceof Ae||n==="RepetitionMandatoryWithSeparator")return F.REPETITION_MANDATORY_WITH_SEPARATOR;if(n instanceof pe||n==="RepetitionWithSeparator")return F.REPETITION_WITH_SEPARATOR;if(n instanceof me||n==="Alternation")return F.ALTERNATION;throw Error("non exhaustive match")}function ks(n){const{occurrence:e,rule:t,prodType:r,maxLookahead:i}=n,s=Li(r);return s===F.ALTERNATION?hr(e,t,i):pr(e,t,s,i)}function Ff(n,e,t,r,i,s){const a=hr(n,e,t),o=Il(a)?jn:gn;return s(a,r,o,i)}function Bf(n,e,t,r,i,s){const a=pr(n,e,i,t),o=Il(a)?jn:gn;return s(a[0],o,r)}function Hf(n,e,t,r){const i=n.length,s=Oe(n,a=>Oe(a,o=>o.length===1));if(e)return function(a){const o=b(a,l=>l.GATE);for(let l=0;lIe(l)),o=oe(a,(l,c,u)=>(S(c,d=>{x(l,d.tokenTypeIdx)||(l[d.tokenTypeIdx]=u),S(d.categoryMatches,f=>{x(l,f)||(l[f]=u)})}),l),{});return function(){const l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let a=0;as.length===1),i=n.length;if(r&&!t){const s=Ie(n);if(s.length===1&&D(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=oe(s,(o,l,c)=>(o[l.tokenTypeIdx]=!0,S(l.categoryMatches,u=>{o[u]=!0}),o),[]);return function(){const o=this.LA(1);return a[o.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sBr([a],1)),r=Is(t.length),i=b(t,a=>{const o={};return S(a,l=>{const c=kr(l.partialPath);S(c,u=>{o[u]=!0})}),o});let s=t;for(let a=1;a<=e;a++){const o=s;s=Is(o.length);for(let l=0;l{const y=kr(_.partialPath);S(y,E=>{i[l][E]=!0})})}}}}return r}function hr(n,e,t,r){const i=new Nl(n,F.ALTERNATION,r);return e.accept(i),kl(i.result,t)}function pr(n,e,t,r){const i=new Nl(n,t);e.accept(i);const s=i.result,o=new Wf(e,n,t).startWalking(),l=new he({definition:s}),c=new he({definition:o});return kl([l,c],r)}function Hr(n,e){e:for(let t=0;t{const i=e[r];return t===i||i.categoryMatchesMap[t.tokenTypeIdx]})}function Il(n){return Oe(n,e=>Oe(e,t=>Oe(t,r=>D(r.categoryMatches))))}function qf(n){const e=n.lookaheadStrategy.validate({rules:n.rules,tokenTypes:n.tokenTypes,grammarName:n.grammarName});return b(e,t=>Object.assign({type:ce.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Yf(n,e,t,r){const i=ve(n,l=>Xf(l,t)),s=lh(n,e,t),a=ve(n,l=>ih(l,t)),o=ve(n,l=>Zf(l,n,r,t));return i.concat(s,a,o)}function Xf(n,e){const t=new Qf;n.accept(t);const r=t.allProductions,i=gu(r,Jf),s=Pe(i,o=>o.length>1);return b(K(s),o=>{const l=$e(o),c=e.buildDuplicateFoundError(n,o),u=je(l),d={message:c,type:ce.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:u,occurrence:l.idx},f=Sl(l);return f&&(d.parameter=f),d})}function Jf(n){return`${je(n)}_#_${n.idx}_#_${Sl(n)}`}function Sl(n){return n instanceof G?n.terminalType.name:n instanceof le?n.nonTerminalName:""}class Qf extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Zf(n,e,t,r){const i=[];if(oe(e,(a,o)=>o.name===n.name?a+1:a,0)>1){const a=r.buildDuplicateRuleNameError({topLevelRule:n,grammarName:t});i.push({message:a,type:ce.DUPLICATE_RULE_NAME,ruleName:n.name})}return i}function eh(n,e,t){const r=[];let i;return ue(e,n)||(i=`Invalid rule override, rule: ->${n}<- cannot be overridden in the grammar: ->${t}<-as it is not defined in any of the super grammars `,r.push({message:i,type:ce.INVALID_RULE_OVERRIDE,ruleName:n})),r}function xl(n,e,t,r=[]){const i=[],s=Cn(e.definition);if(D(s))return[];{const a=n.name;ue(s,n)&&i.push({message:t.buildLeftRecursionError({topLevelRule:n,leftRecursionPath:r}),type:ce.LEFT_RECURSION,ruleName:a});const l=nr(s,r.concat([n])),c=ve(l,u=>{const d=te(r);return d.push(u),xl(n,u,t,d)});return i.concat(c)}}function Cn(n){let e=[];if(D(n))return e;const t=$e(n);if(t instanceof le)e.push(t.referencedRule);else if(t instanceof he||t instanceof ee||t instanceof Re||t instanceof Ae||t instanceof pe||t instanceof H)e=e.concat(Cn(t.definition));else if(t instanceof me)e=Ie(b(t.definition,s=>Cn(s.definition)));else if(!(t instanceof G))throw Error("non exhaustive match");const r=Mn(t),i=n.length>1;if(r&&i){const s=J(n);return e.concat(Cn(s))}else return e}class $i extends Yt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function th(n,e){const t=new $i;n.accept(t);const r=t.alternations;return ve(r,s=>{const a=cn(s.definition);return ve(a,(o,l)=>{const c=bl([o],[],gn,1);return D(c)?[{message:e.buildEmptyAlternationError({topLevelRule:n,alternation:s,emptyChoiceIdx:l}),type:ce.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:s.idx,alternative:l+1}]:[]})})}function nh(n,e,t){const r=new $i;n.accept(r);let i=r.alternations;return i=rr(i,a=>a.ignoreAmbiguities===!0),ve(i,a=>{const o=a.idx,l=a.maxLookahead||e,c=hr(o,n,l,a),u=ah(c,a,n,t),d=oh(c,a,n,t);return u.concat(d)})}class rh extends Yt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function ih(n,e){const t=new $i;n.accept(t);const r=t.alternations;return ve(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:n,alternation:s}),type:ce.TOO_MANY_ALTS,ruleName:n.name,occurrence:s.idx}]:[])}function sh(n,e,t){const r=[];return S(n,i=>{const s=new rh;i.accept(s);const a=s.allProductions;S(a,o=>{const l=Li(o),c=o.maxLookahead||e,u=o.idx,f=pr(u,i,l,c)[0];if(D(Ie(f))){const h=t.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:h,type:ce.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function ah(n,e,t,r){const i=[],s=oe(n,(o,l,c)=>(e.definition[c].ignoreAmbiguities===!0||S(l,u=>{const d=[c];S(n,(f,h)=>{c!==h&&Hr(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&d.push(h)}),d.length>1&&!Hr(i,u)&&(i.push(u),o.push({alts:d,path:u}))}),o),[]);return b(s,o=>{const l=b(o.alts,u=>u+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:ce.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:o.alts}})}function oh(n,e,t,r){const i=oe(n,(a,o,l)=>{const c=b(o,u=>({idx:l,path:u}));return a.concat(c)},[]);return hn(ve(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const l=a.idx,c=a.path,u=Ee(i,f=>e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{const h=[f.idx+1,l+1],m=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:h,prefixPath:f.path}),type:ce.AMBIGUOUS_PREFIX_ALTS,ruleName:t.name,occurrence:m,alternatives:h}})}))}function lh(n,e,t){const r=[],i=b(e,s=>s.name);return S(n,s=>{const a=s.name;if(ue(i,a)){const o=t.buildNamespaceConflictError(s);r.push({message:o,type:ce.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function ch(n){const e=Ei(n,{errMsgProvider:Lf}),t={};return S(n.rules,r=>{t[r.name]=r}),$f(t,e.errMsgProvider)}function uh(n){return n=Ei(n,{errMsgProvider:ct}),Yf(n.rules,n.tokenTypes,n.errMsgProvider,n.grammarName)}const Cl="MismatchedTokenException",wl="NoViableAltException",Ol="EarlyExitException",Ll="NotAllInputParsedException",$l=[Cl,wl,Ol,Ll];Object.freeze($l);function Gn(n){return ue($l,n.name)}class mr extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Pl extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Cl}}class dh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=wl}}class fh extends mr{constructor(e,t){super(e,t),this.name=Ll}}class hh extends mr{constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Ol}}const Ir={},Ml="InRuleRecoveryException";class ph extends Error{constructor(e){super(e),this.name=Ml}}class mh{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=x(e,"recoveryEnabled")?e.recoveryEnabled:Ye.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=gh)}getTokenToInsert(e){const t=Oi(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){const s=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let l=!1;const c=this.LA(1);let u=this.LA(1);const d=()=>{const f=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:c,previous:f,ruleName:this.getCurrRuleFullName()}),m=new Pl(h,c,this.LA(0));m.resyncedTokens=cn(o),this.SAVE_ERROR(m)};for(;!l;)if(this.tokenMatcher(u,i)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,s)?l=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){const r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new ph("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||D(t))return!1;const r=this.LA(1);return Dt(t,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return ue(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),r=2;for(;;){const i=Dt(e,s=>Al(t,s));if(i!==void 0)return i;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Ir;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return b(e,(r,i)=>i===0?Ir:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=b(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Ie(e)}getFollowSetFromFollowKey(e){if(e===Ir)return[tt];const t=e.ruleName+e.idxInCallingRule+fl+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,tt)||t.push(e),t}reSyncTo(e){const t=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return cn(t)}attemptInRepetitionRecovery(e,t,r,i,s,a,o){}getCurrentGrammarPath(e,t){const r=this.getHumanReadableRuleStack(),i=te(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return b(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function gh(n,e,t,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(l===void 0){const f=this.getCurrRuleFullName(),h=this.getGAstProductions()[f];l=new s(h,i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,u=l.occurrence;const d=l.isEndOfRule;this.RULE_STACK.length===1&&d&&c===void 0&&(c=tt,u=1),!(c===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,u,a)&&this.tryInRepetitionRecovery(n,e,t,c)}const yh=4,it=8,Dl=1<xl(t,t,ct))}validateEmptyOrAlternatives(e){return ve(e,t=>th(t,ct))}validateAmbiguousAlternationAlternatives(e,t){return ve(e,r=>nh(r,t,ct))}validateSomeNonEmptyLookaheadPath(e,t){return sh(e,t,ct)}buildLookaheadForAlternation(e){return Ff(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Hf)}buildLookaheadForOptional(e){return Bf(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Li(e.prodType),Vf)}}class Th{initLooksAhead(e){this.dynamicTokensEnabled=x(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ye.dynamicTokensEnabled,this.maxLookahead=x(e,"maxLookahead")?e.maxLookahead:Ye.maxLookahead,this.lookaheadStrategy=x(e,"lookaheadStrategy")?e.lookaheadStrategy:new Pi({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){S(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=_h(t);S(r,c=>{const u=c.idx===0?"":c.idx;this.TRACE_INIT(`${je(c)}${u}`,()=>{const d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:t,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=Sr(this.fullRuleNameToShort[t.name],Dl,c.idx);this.setLaFuncCache(f,d)})}),S(i,c=>{this.computeLookaheadFunc(t,c.idx,Vr,"Repetition",c.maxLookahead,je(c))}),S(s,c=>{this.computeLookaheadFunc(t,c.idx,jl,"Option",c.maxLookahead,je(c))}),S(a,c=>{this.computeLookaheadFunc(t,c.idx,Wr,"RepetitionMandatory",c.maxLookahead,je(c))}),S(o,c=>{this.computeLookaheadFunc(t,c.idx,wn,"RepetitionMandatoryWithSeparator",c.maxLookahead,je(c))}),S(l,c=>{this.computeLookaheadFunc(t,c.idx,Kr,"RepetitionWithSeparator",c.maxLookahead,je(c))})})})}computeLookaheadFunc(e,t,r,i,s,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=Sr(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){const r=this.getLastExplicitRuleShortName();return Sr(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}}class vh extends Yt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const Nn=new vh;function _h(n){Nn.reset(),n.accept(Nn);const e=Nn.dslMethods;return Nn.reset(),e}function Ss(n,e){isNaN(n.startOffset)===!0?(n.startOffset=e.startOffset,n.endOffset=e.endOffset):n.endOffseta.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: ${s.join(` `).replace(/\n/g,` - `)}`)}}};return t.prototype=r,t.prototype.constructor=t,t._RULE_NAMES=e,t}function kh(n,e,t){const r=function(){};jl(r,n+"BaseSemanticsWithDefaults");const i=Object.create(t.prototype);return S(e,s=>{i[s]=bh}),r.prototype=i,r.prototype.constructor=r,r}var zr;(function(n){n[n.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",n[n.MISSING_METHOD=1]="MISSING_METHOD"})(zr||(zr={}));function Ih(n,e){return Sh(n,e)}function Sh(n,e){const t=Re(e,i=>mt(n[i])===!1),r=b(t,i=>({msg:`Missing visitor method: <${i}> on ${n.constructor.name} CST Visitor.`,type:zr.MISSING_METHOD,methodName:i}));return hn(r)}class xh{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=x(e,"nodeLocationTracking")?e.nodeLocationTracking:Ye.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=q,this.cstFinallyStateUpdate=q,this.cstPostTerminal=q,this.cstPostNonTerminal=q,this.cstPostRule=q;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ss,this.setNodeLocationFromNode=Ss,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Is,this.setNodeLocationFromNode=Is,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=q,this.setInitialNodeLocation=q;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];Rh(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];Ah(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(ze(this.baseCstVisitorConstructor)){const e=Nh(this.className,Mt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ze(this.baseCstVisitorWithDefaultsConstructor)){const e=kh(this.className,Mt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class Ch{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Fn}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Fn:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class wh{ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=Bn){if(ue(this.definedRulesNames,e)){const a={message:ct.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ce.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);const i=this.defineRule(e,t,r);return this[e]=i,i}OVERRIDE_RULE(e,t,r=Bn){const i=eh(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,t,r);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(i){if(Gn(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return jd(K(this.gastProductionsCache))}}class Oh{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=jn,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},x(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + `)}`)}}};return t.prototype=r,t.prototype.constructor=t,t._RULE_NAMES=e,t}function kh(n,e,t){const r=function(){};Gl(r,n+"BaseSemanticsWithDefaults");const i=Object.create(t.prototype);return S(e,s=>{i[s]=bh}),r.prototype=i,r.prototype.constructor=r,r}var zr;(function(n){n[n.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",n[n.MISSING_METHOD=1]="MISSING_METHOD"})(zr||(zr={}));function Ih(n,e){return Sh(n,e)}function Sh(n,e){const t=Ee(e,i=>mt(n[i])===!1),r=b(t,i=>({msg:`Missing visitor method: <${i}> on ${n.constructor.name} CST Visitor.`,type:zr.MISSING_METHOD,methodName:i}));return hn(r)}class xh{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=x(e,"nodeLocationTracking")?e.nodeLocationTracking:Ye.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=q,this.cstFinallyStateUpdate=q,this.cstPostTerminal=q,this.cstPostNonTerminal=q,this.cstPostRule=q;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=xs,this.setNodeLocationFromNode=xs,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ss,this.setNodeLocationFromNode=Ss,this.cstPostRule=q,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=q,this.setNodeLocationFromNode=q,this.cstPostRule=q,this.setInitialNodeLocation=q;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];Eh(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){const r=this.CST_STACK[this.CST_STACK.length-1];Rh(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(ze(this.baseCstVisitorConstructor)){const e=Nh(this.className,Mt(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ze(this.baseCstVisitorWithDefaultsConstructor)){const e=kh(this.className,Mt(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class Ch{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Fn}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Fn:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class wh{ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,r=Bn){if(ue(this.definedRulesNames,e)){const a={message:ct.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ce.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);const i=this.defineRule(e,t,r);return this[e]=i,i}OVERRIDE_RULE(e,t,r=Bn){const i=eh(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,t,r);return this[e]=s,s}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,t),!0}catch(i){if(Gn(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return jd(K(this.gastProductionsCache))}}class Oh{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=jn,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},x(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 For Further details.`);if(Z(e)){if(D(e))throw Error(`A Token Vocabulary cannot be empty. Note that the first argument for the parser constructor is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 For Further details.`)}if(Z(e))this.tokensMap=oe(e,(s,a)=>(s[a.name]=a,s),{});else if(x(e,"modes")&&Oe(Ie(K(e.modes)),xf)){const s=Ie(K(e.modes)),a=Ri(s);this.tokensMap=oe(a,(o,l)=>(o[l.name]=l,o),{})}else if(qc(e))this.tokensMap=te(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=tt;const r=x(e,"modes")?Ie(K(e.modes)):K(e),i=Oe(r,s=>D(s.categoryMatches));this.tokenMatcher=i?jn:gn,yn(K(this.tokensMap))}defineRule(e,t,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=x(r,"resyncEnabled")?r.resyncEnabled:Bn.resyncEnabled,s=x(r,"recoveryValueFunc")?r.recoveryValueFunc:Bn.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&o.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(Wr,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const a=t.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=t;if(i.call(this)===!0){let a=this.doSingleRepetition(s);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,F.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,Wr,e,Gf)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(wn,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,bs],o,wn,e,bs)}else throw this.raiseEarlyExitException(e,F.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(Vr,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const o=t.GATE;if(o!==void 0){const l=i;i=()=>o.call(this)&&l.call(this)}}else s=t;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,Vr,e,jf,a)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Kr,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,vs],o,Kr,e,vs)}}repetitionSepSecondInternal(e,t,r,i,s){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,s],r,wn,e,s)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(Ml,t),i=Z(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new fh(t,e))}}subruleInternal(e,t,r){let i;try{const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,t,r){throw Gn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new $l(i,t,s))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===Pl?r:s}}else throw r}saveRecogState(){const e=this.errors,t=te(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),tt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class Lh{initErrorHandler(e){this._errors=[],this.errorMessageProvider=x(e,"errorMessageProvider")?e.errorMessageProvider:Ye.errorMessageProvider}SAVE_ERROR(e){if(Gn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:te(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return te(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=pr(e,s,t,this.maxLookahead)[0],l=[];for(let u=1;u<=this.maxLookahead;u++)l.push(this.LA(u));const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new hh(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=hr(e,i,this.maxLookahead),a=[];for(let c=1;c<=this.maxLookahead;c++)a.push(this.LA(c));const o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new dh(l,this.LA(1),o))}}class $h{initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(ze(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return vl([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=$e(e.ruleStack),i=this.getGAstProductions()[t];return new Df(i,e).startWalking()}}const gr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(gr);const xs=!0,Cs=Math.pow(2,it)-1,Gl=Rl({name:"RECORDING_PHASE_TOKEN",pattern:de.NA});yn([Gl]);const Ul=wi(Gl,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Ul);const Ph={name:`This CSTNode indicates the Parser is in Recording Phase +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=x(r,"resyncEnabled")?r.resyncEnabled:Bn.resyncEnabled,s=x(r,"recoveryValueFunc")?r.recoveryValueFunc:Bn.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&o.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,t){const r=this.getKeyForAutomaticLookahead(Wr,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const a=t.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=t;if(i.call(this)===!0){let a=this.doSingleRepetition(s);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,F.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,Wr,e,Gf)}atLeastOneSepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(wn,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,Ns],o,wn,e,Ns)}else throw this.raiseEarlyExitException(e,F.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){const r=this.getKeyForAutomaticLookahead(Vr,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),s;if(typeof t!="function"){s=t.DEF;const o=t.GATE;if(o!==void 0){const l=i;i=()=>o.call(this)&&l.call(this)}}else s=t;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,Vr,e,jf,a)}manySepFirstInternal(e,t){const r=this.getKeyForAutomaticLookahead(Kr,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){const i=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,bs],o,Kr,e,bs)}}repetitionSepSecondInternal(e,t,r,i,s){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,s],r,wn,e,s)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const r=this.getKeyForAutomaticLookahead(Dl,t),i=Z(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new fh(t,e))}}subruleInternal(e,t,r){let i;try{const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,t,r){throw Gn(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Pl(i,t,s))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===Ml?r:s}}else throw r}saveRecogState(){const e=this.errors,t=te(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),tt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class Lh{initErrorHandler(e){this._errors=[],this.errorMessageProvider=x(e,"errorMessageProvider")?e.errorMessageProvider:Ye.errorMessageProvider}SAVE_ERROR(e){if(Gn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:te(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return te(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=pr(e,s,t,this.maxLookahead)[0],l=[];for(let u=1;u<=this.maxLookahead;u++)l.push(this.LA(u));const c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new hh(c,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=hr(e,i,this.maxLookahead),a=[];for(let c=1;c<=this.maxLookahead;c++)a.push(this.LA(c));const o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new dh(l,this.LA(1),o))}}class $h{initContentAssist(){}computeContentAssist(e,t){const r=this.gastProductionsCache[e];if(ze(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return bl([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=$e(e.ruleStack),i=this.getGAstProductions()[t];return new Df(i,e).startWalking()}}const gr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(gr);const Cs=!0,ws=Math.pow(2,it)-1,Ul=Rl({name:"RECORDING_PHASE_TOKEN",pattern:de.NA});yn([Ul]);const Fl=Oi(Ul,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Fl);const Ph={name:`This CSTNode indicates the Parser is in Recording Phase See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class Mh{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${t}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const r=t>0?t:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Fn}topLevelRuleRecord(e,t){try{const r=new qt({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return rn.call(this,ee,e,t)}atLeastOneInternalRecord(e,t){rn.call(this,Ae,t,e)}atLeastOneSepFirstInternalRecord(e,t){rn.call(this,ve,t,e,xs)}manyInternalRecord(e,t){rn.call(this,H,t,e)}manySepFirstInternalRecord(e,t){rn.call(this,pe,t,e,xs)}orInternalRecord(e,t){return Dh.call(this,e,t)}subruleInternalRecord(e,t,r){if(Un(t),!e||x(e,"ruleName")===!1){const o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=jt(this.recordingProdStack),s=e.ruleName,a=new le({idx:t,nonTerminalName:s,label:r==null?void 0:r.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?Ph:gr}consumeInternalRecord(e,t,r){if(Un(t),!_l(e)){const a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=jt(this.recordingProdStack),s=new G({idx:t,terminalType:e,label:r==null?void 0:r.LABEL});return i.definition.push(s),Ul}}function rn(n,e,t,r=!1){Un(t);const i=jt(this.recordingProdStack),s=mt(e)?e:e.DEF,a=new n({definition:[],idx:t});return r&&(a.separator=e.SEP),x(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),gr}function Dh(n,e){Un(e);const t=jt(this.recordingProdStack),r=Z(n)===!1,i=r===!1?n:n.DEF,s=new me({definition:[],idx:e,ignoreAmbiguities:r&&n.IGNORE_AMBIGUITIES===!0});x(n,"MAX_LOOKAHEAD")&&(s.maxLookahead=n.MAX_LOOKAHEAD);const a=ho(i,o=>mt(o.GATE));return s.hasPredicates=a,t.definition.push(s),S(i,o=>{const l=new he({definition:[]});s.definition.push(l),x(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:x(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),gr}function ws(n){return n===0?"":`${n}`}function Un(n){if(n<0||n>Cs){const e=new Error(`Invalid DSL Method idx value: <${n}> - Idx value must be a none negative value smaller than ${Cs+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class jh{initPerformanceTracer(e){if(x(e,"traceInitPerf")){const t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ye.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);const{time:i,value:s}=cl(t),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return t()}}function Gh(n,e){e.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(n.prototype,i,s):n.prototype[i]=t.prototype[i]})})}const Fn=wi(tt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Fn);const Ye=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Et,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Bn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var ce;(function(n){n[n.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",n[n.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",n[n.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",n[n.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",n[n.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",n[n.LEFT_RECURSION=5]="LEFT_RECURSION",n[n.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",n[n.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",n[n.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",n[n.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",n[n.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",n[n.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",n[n.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",n[n.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ce||(ce={}));function Os(n=void 0){return function(){return n}}class Tn{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{ul(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),S(this.definedRulesNames,i=>{const a=this[i].originalGrammarAction;let o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=ch({rules:K(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(D(r)&&this.skipValidations===!1){const i=uh({rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),errMsgProvider:ct,grammarName:t}),s=qf({lookaheadStrategy:this.lookaheadStrategy,rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(i,s)}}),D(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=Wd(K(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:K(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(K(this.gastProductionsCache))})),!Tn.DEFER_DEFINITION_ERRORS_HANDLING&&!D(this.definitionErrors))throw e=b(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,t){return rn.call(this,ee,e,t)}atLeastOneInternalRecord(e,t){rn.call(this,Re,t,e)}atLeastOneSepFirstInternalRecord(e,t){rn.call(this,Ae,t,e,Cs)}manyInternalRecord(e,t){rn.call(this,H,t,e)}manySepFirstInternalRecord(e,t){rn.call(this,pe,t,e,Cs)}orInternalRecord(e,t){return Dh.call(this,e,t)}subruleInternalRecord(e,t,r){if(Un(t),!e||x(e,"ruleName")===!1){const o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=jt(this.recordingProdStack),s=e.ruleName,a=new le({idx:t,nonTerminalName:s,label:r==null?void 0:r.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?Ph:gr}consumeInternalRecord(e,t,r){if(Un(t),!_l(e)){const a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=jt(this.recordingProdStack),s=new G({idx:t,terminalType:e,label:r==null?void 0:r.LABEL});return i.definition.push(s),Fl}}function rn(n,e,t,r=!1){Un(t);const i=jt(this.recordingProdStack),s=mt(e)?e:e.DEF,a=new n({definition:[],idx:t});return r&&(a.separator=e.SEP),x(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),gr}function Dh(n,e){Un(e);const t=jt(this.recordingProdStack),r=Z(n)===!1,i=r===!1?n:n.DEF,s=new me({definition:[],idx:e,ignoreAmbiguities:r&&n.IGNORE_AMBIGUITIES===!0});x(n,"MAX_LOOKAHEAD")&&(s.maxLookahead=n.MAX_LOOKAHEAD);const a=po(i,o=>mt(o.GATE));return s.hasPredicates=a,t.definition.push(s),S(i,o=>{const l=new he({definition:[]});s.definition.push(l),x(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:x(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),gr}function Os(n){return n===0?"":`${n}`}function Un(n){if(n<0||n>ws){const e=new Error(`Invalid DSL Method idx value: <${n}> + Idx value must be a none negative value smaller than ${ws+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class jh{initPerformanceTracer(e){if(x(e,"traceInitPerf")){const t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ye.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);const{time:i,value:s}=ul(t),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return t()}}function Gh(n,e){e.forEach(t=>{const r=t.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(n.prototype,i,s):n.prototype[i]=t.prototype[i]})})}const Fn=Oi(tt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Fn);const Ye=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:_t,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Bn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var ce;(function(n){n[n.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",n[n.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",n[n.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",n[n.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",n[n.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",n[n.LEFT_RECURSION=5]="LEFT_RECURSION",n[n.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",n[n.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",n[n.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",n[n.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",n[n.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",n[n.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",n[n.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",n[n.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ce||(ce={}));function Ls(n=void 0){return function(){return n}}class Tn{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{dl(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),S(this.definedRulesNames,i=>{const a=this[i].originalGrammarAction;let o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=ch({rules:K(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(D(r)&&this.skipValidations===!1){const i=uh({rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),errMsgProvider:ct,grammarName:t}),s=qf({lookaheadStrategy:this.lookaheadStrategy,rules:K(this.gastProductionsCache),tokenTypes:K(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(i,s)}}),D(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=Wd(K(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:K(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(K(this.gastProductionsCache))})),!Tn.DEFER_DEFINITION_ERRORS_HANDLING&&!D(this.definitionErrors))throw e=b(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: ${e.join(` ------------------------------- `)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(t),r.initLexerAdapter(),r.initLooksAhead(t),r.initRecognizerEngine(e,t),r.initRecoverable(t),r.initTreeBuilder(t),r.initContentAssist(),r.initGastRecorder(t),r.initPerformanceTracer(t),x(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. Please use the flag on the relevant DSL method instead. See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=x(t,"skipValidations")?t.skipValidations:Ye.skipValidations}}Tn.DEFER_DEFINITION_ERRORS_HANDLING=!1;Gh(Tn,[mh,Th,xh,Ch,Oh,wh,Lh,$h,Mh,jh]);class Uh extends Tn{constructor(e,t=Ye){const r=te(t);r.outputCst=!1,super(e,r)}}function Ut(n,e,t){return`${n.name}_${e}_${t}`}const nt=1,Fh=2,Fl=4,Bl=5,_n=7,Bh=8,Hh=9,Vh=10,Wh=11,Hl=12;class Pi{constructor(e){this.target=e}isEpsilon(){return!1}}class Mi extends Pi{constructor(e,t){super(e),this.tokenType=t}}class Vl extends Pi{constructor(e){super(e)}isEpsilon(){return!0}}class Di extends Pi{constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}}function Kh(n){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};zh(e,n);const t=n.length;for(let r=0;rWl(n,e,a));return Xt(n,e,r,t,...i)}function Zh(n,e,t){const r=Y(n,e,t,{type:nt});st(n,r);const i=Xt(n,e,r,t,yt(n,e,t));return ep(n,e,t,i)}function yt(n,e,t){const r=Re(b(t.definition,i=>Wl(n,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:np(n,r)}function Kl(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:Wh});st(n,o);const l=Y(n,e,t,{type:Hl});return s.loopback=o,l.loopback=o,n.decisionMap[Ut(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",t.idx)]=o,W(a,o),i===void 0?(W(o,s),W(o,l)):(W(o,l),W(o,i.left),W(i.right,s)),{left:s,right:l}}function zl(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:Vh});st(n,o);const l=Y(n,e,t,{type:Hl}),c=Y(n,e,t,{type:Hh});return o.loopback=c,l.loopback=c,W(o,s),W(o,l),W(a,c),i!==void 0?(W(c,l),W(c,i.left),W(i.right,s)):W(c,o),n.decisionMap[Ut(e,i?"RepetitionWithSeparator":"Repetition",t.idx)]=o,{left:o,right:l}}function ep(n,e,t,r){const i=r.left,s=r.right;return W(i,s),n.decisionMap[Ut(e,"Option",t.idx)]=i,r}function st(n,e){return n.decisionStates.push(e),e.decision=n.decisionStates.length-1,e.decision}function Xt(n,e,t,r,...i){const s=Y(n,e,r,{type:Bh,start:t});t.end=s;for(const o of i)o!==void 0?(W(t,o.left),W(o.right,s)):W(t,s);const a={left:t,right:s};return n.decisionMap[Ut(e,tp(r),r.idx)]=t,a}function tp(n){if(n instanceof me)return"Alternation";if(n instanceof ee)return"Option";if(n instanceof H)return"Repetition";if(n instanceof pe)return"RepetitionWithSeparator";if(n instanceof Ae)return"RepetitionMandatory";if(n instanceof ve)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function np(n,e){const t=e.length;for(let s=0;se.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function ql(n,e=!0){return`${e?`a${n.alt}`:""}s${n.state.stateNumber}:${n.stack.map(t=>t.stateNumber.toString()).join("_")}`}function ap(n,e){const t={};return r=>{const i=r.toString();let s=t[i];return s!==void 0||(s={atnStartState:n,decision:e,states:{}},t[i]=s),s}}class Yl{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;rconsole.log(r)}initialize(e){this.atn=Kh(e.rules),this.dfas=lp(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,l=Ut(r,"Alternation",t),u=this.atn.decisionMap[l].decision,d=b(Ns({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>b(f,h=>h[0]));if($s(d,!1)&&!s){const f=oe(d,(h,m,g)=>(S(m,E=>{E&&(h[E.tokenTypeIdx]=g,S(E.categoryMatches,y=>{h[y]=g}))}),h),{});return i?function(h){var m;const g=this.LA(1),E=f[g.tokenTypeIdx];if(h!==void 0&&E!==void 0){const y=(m=h[E])===null||m===void 0?void 0:m.GATE;if(y!==void 0&&y.call(this)===!1)return}return E}:function(){const h=this.LA(1);return f[h.tokenTypeIdx]}}else return i?function(f){const h=new Yl,m=f===void 0?0:f.length;for(let E=0;Eb(f,h=>h[0]));if($s(d)&&d[0][0]&&!s){const f=d[0],h=Ie(f);if(h.length===1&&D(h[0].categoryMatches)){const g=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{const m=oe(h,(g,E)=>(E!==void 0&&(g[E.tokenTypeIdx]=!0,S(E.categoryMatches,y=>{g[y]=!0})),g),{});return function(){const g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){const f=xr.call(this,a,u,Ls,o);return typeof f=="object"?!1:f===0}}}function $s(n,e=!0){const t=new Set;for(const r of n){const i=new Set;for(const s of r){if(s===void 0){if(e)break;return!1}const a=[s.tokenTypeIdx].concat(s.categoryMatches);for(const o of a)if(t.has(o)){if(!i.has(o))return!1}else t.add(o),i.add(o)}}return!0}function lp(n){const e=n.decisionStates.length,t=Array(e);for(let r=0;rAt(i)).join(", "),t=n.production.idx===0?"":n.production.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(", ")}> in <${hp(n.production)}${t}> inside <${n.topLevelRule.name}> Rule, + For further details.`);this.skipValidations=x(t,"skipValidations")?t.skipValidations:Ye.skipValidations}}Tn.DEFER_DEFINITION_ERRORS_HANDLING=!1;Gh(Tn,[mh,Th,xh,Ch,Oh,wh,Lh,$h,Mh,jh]);class Uh extends Tn{constructor(e,t=Ye){const r=te(t);r.outputCst=!1,super(e,r)}}function Ut(n,e,t){return`${n.name}_${e}_${t}`}const nt=1,Fh=2,Bl=4,Hl=5,vn=7,Bh=8,Hh=9,Vh=10,Wh=11,Vl=12;class Mi{constructor(e){this.target=e}isEpsilon(){return!1}}class Di extends Mi{constructor(e,t){super(e),this.tokenType=t}}class Wl extends Mi{constructor(e){super(e)}isEpsilon(){return!0}}class ji extends Mi{constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}}function Kh(n){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};zh(e,n);const t=n.length;for(let r=0;rKl(n,e,a));return Xt(n,e,r,t,...i)}function Zh(n,e,t){const r=Y(n,e,t,{type:nt});st(n,r);const i=Xt(n,e,r,t,yt(n,e,t));return ep(n,e,t,i)}function yt(n,e,t){const r=Ee(b(t.definition,i=>Kl(n,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:np(n,r)}function zl(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:Wh});st(n,o);const l=Y(n,e,t,{type:Vl});return s.loopback=o,l.loopback=o,n.decisionMap[Ut(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",t.idx)]=o,W(a,o),i===void 0?(W(o,s),W(o,l)):(W(o,l),W(o,i.left),W(i.right,s)),{left:s,right:l}}function ql(n,e,t,r,i){const s=r.left,a=r.right,o=Y(n,e,t,{type:Vh});st(n,o);const l=Y(n,e,t,{type:Vl}),c=Y(n,e,t,{type:Hh});return o.loopback=c,l.loopback=c,W(o,s),W(o,l),W(a,c),i!==void 0?(W(c,l),W(c,i.left),W(i.right,s)):W(c,o),n.decisionMap[Ut(e,i?"RepetitionWithSeparator":"Repetition",t.idx)]=o,{left:o,right:l}}function ep(n,e,t,r){const i=r.left,s=r.right;return W(i,s),n.decisionMap[Ut(e,"Option",t.idx)]=i,r}function st(n,e){return n.decisionStates.push(e),e.decision=n.decisionStates.length-1,e.decision}function Xt(n,e,t,r,...i){const s=Y(n,e,r,{type:Bh,start:t});t.end=s;for(const o of i)o!==void 0?(W(t,o.left),W(o.right,s)):W(t,s);const a={left:t,right:s};return n.decisionMap[Ut(e,tp(r),r.idx)]=t,a}function tp(n){if(n instanceof me)return"Alternation";if(n instanceof ee)return"Option";if(n instanceof H)return"Repetition";if(n instanceof pe)return"RepetitionWithSeparator";if(n instanceof Re)return"RepetitionMandatory";if(n instanceof Ae)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function np(n,e){const t=e.length;for(let s=0;se.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function Yl(n,e=!0){return`${e?`a${n.alt}`:""}s${n.state.stateNumber}:${n.stack.map(t=>t.stateNumber.toString()).join("_")}`}function ap(n,e){const t={};return r=>{const i=r.toString();let s=t[i];return s!==void 0||(s={atnStartState:n,decision:e,states:{}},t[i]=s),s}}class Xl{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let r=0;rconsole.log(r)}initialize(e){this.atn=Kh(e.rules),this.dfas=lp(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,l=Ut(r,"Alternation",t),u=this.atn.decisionMap[l].decision,d=b(ks({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),f=>b(f,h=>h[0]));if(Ps(d,!1)&&!s){const f=oe(d,(h,m,g)=>(S(m,_=>{_&&(h[_.tokenTypeIdx]=g,S(_.categoryMatches,y=>{h[y]=g}))}),h),{});return i?function(h){var m;const g=this.LA(1),_=f[g.tokenTypeIdx];if(h!==void 0&&_!==void 0){const y=(m=h[_])===null||m===void 0?void 0:m.GATE;if(y!==void 0&&y.call(this)===!1)return}return _}:function(){const h=this.LA(1);return f[h.tokenTypeIdx]}}else return i?function(f){const h=new Xl,m=f===void 0?0:f.length;for(let _=0;_b(f,h=>h[0]));if(Ps(d)&&d[0][0]&&!s){const f=d[0],h=Ie(f);if(h.length===1&&D(h[0].categoryMatches)){const g=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{const m=oe(h,(g,_)=>(_!==void 0&&(g[_.tokenTypeIdx]=!0,S(_.categoryMatches,y=>{g[y]=!0})),g),{});return function(){const g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){const f=xr.call(this,a,u,$s,o);return typeof f=="object"?!1:f===0}}}function Ps(n,e=!0){const t=new Set;for(const r of n){const i=new Set;for(const s of r){if(s===void 0){if(e)break;return!1}const a=[s.tokenTypeIdx].concat(s.categoryMatches);for(const o of a)if(t.has(o)){if(!i.has(o))return!1}else t.add(o),i.add(o)}}return!0}function lp(n){const e=n.decisionStates.length,t=Array(e);for(let r=0;rRt(i)).join(", "),t=n.production.idx===0?"":n.production.idx;let r=`Ambiguous Alternatives Detected: <${n.ambiguityIndices.join(", ")}> in <${hp(n.production)}${t}> inside <${n.topLevelRule.name}> Rule, <${e}> may appears as a prefix path in all these alternatives. `;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,r}function hp(n){if(n instanceof le)return"SUBRULE";if(n instanceof ee)return"OPTION";if(n instanceof me)return"OR";if(n instanceof Ae)return"AT_LEAST_ONE";if(n instanceof ve)return"AT_LEAST_ONE_SEP";if(n instanceof pe)return"MANY_SEP";if(n instanceof H)return"MANY";if(n instanceof G)return"CONSUME";throw Error("non exhaustive match")}function pp(n,e,t){const r=_e(e.configs.elements,s=>s.state.transitions),i=bu(r.filter(s=>s instanceof Mi).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:t,possibleTokenTypes:i,tokenPath:n}}function mp(n,e){return n.edges[e.tokenTypeIdx]}function gp(n,e,t){const r=new qr,i=[];for(const a of n.elements){if(t.is(a.alt)===!1)continue;if(a.state.type===_n){i.push(a);continue}const o=a.state.transitions.length;for(let l=0;l0&&!Rp(s))for(const a of i)s.add(a);return s}function yp(n,e){if(n instanceof Mi&&Al(e,n.tokenType))return n.target}function Tp(n,e){let t;for(const r of n.elements)if(e.is(r.alt)===!0){if(t===void 0)t=r.alt;else if(t!==r.alt)return}return t}function Xl(n){return{configs:n,edges:{},isAcceptState:!1,prediction:-1}}function Ps(n,e,t,r){return r=Jl(n,r),e.edges[t.tokenTypeIdx]=r,r}function Jl(n,e){if(e===Hn)return e;const t=e.configs.key,r=n.states[t];return r!==void 0?r:(e.configs.finalize(),n.states[t]=e,e)}function _p(n){const e=new qr,t=n.transitions.length;for(let r=0;r0){const i=[...n.stack],a={state:i.pop(),alt:n.alt,stack:i};Vn(a,e)}else e.add(n);return}t.epsilonOnlyTransitions||e.add(n);const r=t.transitions.length;for(let i=0;i1)return!0;return!1}function kp(n){for(const e of Array.from(n.values()))if(Object.keys(e).length===1)return!0;return!1}var Ms;(function(n){function e(t){return typeof t=="string"}n.is=e})(Ms||(Ms={}));var Yr;(function(n){function e(t){return typeof t=="string"}n.is=e})(Yr||(Yr={}));var Ds;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Ds||(Ds={}));var Wn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Wn||(Wn={}));var P;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Wn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Wn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&p.uinteger(i.line)&&p.uinteger(i.character)}n.is=t})(P||(P={}));var $;(function(n){function e(r,i,s,a){if(p.uinteger(r)&&p.uinteger(i)&&p.uinteger(s)&&p.uinteger(a))return{start:P.create(r,i),end:P.create(s,a)};if(P.is(r)&&P.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&P.is(i.start)&&P.is(i.end)}n.is=t})($||($={}));var Kn;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&$.is(i.range)&&(p.string(i.uri)||p.undefined(i.uri))}n.is=t})(Kn||(Kn={}));var js;(function(n){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&$.is(i.targetRange)&&p.string(i.targetUri)&&$.is(i.targetSelectionRange)&&($.is(i.originSelectionRange)||p.undefined(i.originSelectionRange))}n.is=t})(js||(js={}));var Xr;(function(n){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.numberRange(i.red,0,1)&&p.numberRange(i.green,0,1)&&p.numberRange(i.blue,0,1)&&p.numberRange(i.alpha,0,1)}n.is=t})(Xr||(Xr={}));var Gs;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&$.is(i.range)&&Xr.is(i.color)}n.is=t})(Gs||(Gs={}));var Us;(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.undefined(i.textEdit)||Bt.is(i))&&(p.undefined(i.additionalTextEdits)||p.typedArray(i.additionalTextEdits,Bt.is))}n.is=t})(Us||(Us={}));var Fs;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Fs||(Fs={}));var Bs;(function(n){function e(r,i,s,a,o,l){const c={startLine:r,endLine:i};return p.defined(s)&&(c.startCharacter=s),p.defined(a)&&(c.endCharacter=a),p.defined(o)&&(c.kind=o),p.defined(l)&&(c.collapsedText=l),c}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.uinteger(i.startLine)&&p.uinteger(i.startLine)&&(p.undefined(i.startCharacter)||p.uinteger(i.startCharacter))&&(p.undefined(i.endCharacter)||p.uinteger(i.endCharacter))&&(p.undefined(i.kind)||p.string(i.kind))}n.is=t})(Bs||(Bs={}));var Jr;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&Kn.is(i.location)&&p.string(i.message)}n.is=t})(Jr||(Jr={}));var Hs;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Hs||(Hs={}));var Vs;(function(n){n.Unnecessary=1,n.Deprecated=2})(Vs||(Vs={}));var Ws;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&p.string(r.href)}n.is=e})(Ws||(Ws={}));var zn;(function(n){function e(r,i,s,a,o,l){let c={range:r,message:i};return p.defined(s)&&(c.severity=s),p.defined(a)&&(c.code=a),p.defined(o)&&(c.source=o),p.defined(l)&&(c.relatedInformation=l),c}n.create=e;function t(r){var i;let s=r;return p.defined(s)&&$.is(s.range)&&p.string(s.message)&&(p.number(s.severity)||p.undefined(s.severity))&&(p.integer(s.code)||p.string(s.code)||p.undefined(s.code))&&(p.undefined(s.codeDescription)||p.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(p.string(s.source)||p.undefined(s.source))&&(p.undefined(s.relatedInformation)||p.typedArray(s.relatedInformation,Jr.is))}n.is=t})(zn||(zn={}));var Ft;(function(n){function e(r,i,...s){let a={title:r,command:i};return p.defined(s)&&s.length>0&&(a.arguments=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.title)&&p.string(i.command)}n.is=t})(Ft||(Ft={}));var Bt;(function(n){function e(s,a){return{range:s,newText:a}}n.replace=e;function t(s,a){return{range:{start:s,end:s},newText:a}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){const a=s;return p.objectLiteral(a)&&p.string(a.newText)&&$.is(a.range)}n.is=i})(Bt||(Bt={}));var Qr;(function(n){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(p.string(i.description)||i.description===void 0)}n.is=t})(Qr||(Qr={}));var Ht;(function(n){function e(t){const r=t;return p.string(r)}n.is=e})(Ht||(Ht={}));var Ks;(function(n){function e(s,a,o){return{range:s,newText:a,annotationId:o}}n.replace=e;function t(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}n.insert=t;function r(s,a){return{range:s,newText:"",annotationId:a}}n.del=r;function i(s){const a=s;return Bt.is(a)&&(Qr.is(a.annotationId)||Ht.is(a.annotationId))}n.is=i})(Ks||(Ks={}));var Zr;(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&ii.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(Zr||(Zr={}));var ei;(function(n){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&p.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}n.is=t})(ei||(ei={}));var ti;(function(n){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&p.string(i.oldUri)&&p.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}n.is=t})(ti||(ti={}));var ni;(function(n){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&p.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||p.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||p.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}n.is=t})(ni||(ni={}));var ri;(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>p.string(i.kind)?ei.is(i)||ti.is(i)||ni.is(i):Zr.is(i)))}n.is=e})(ri||(ri={}));var zs;(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)}n.is=t})(zs||(zs={}));var qs;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.integer(i.version)}n.is=t})(qs||(qs={}));var ii;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&(i.version===null||p.integer(i.version))}n.is=t})(ii||(ii={}));var Ys;(function(n){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.string(i.languageId)&&p.integer(i.version)&&p.string(i.text)}n.is=t})(Ys||(Ys={}));var si;(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){const r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(si||(si={}));var un;(function(n){function e(t){const r=t;return p.objectLiteral(t)&&si.is(r.kind)&&p.string(r.value)}n.is=e})(un||(un={}));var Xs;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Xs||(Xs={}));var Js;(function(n){n.PlainText=1,n.Snippet=2})(Js||(Js={}));var Qs;(function(n){n.Deprecated=1})(Qs||(Qs={}));var Zs;(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){const i=r;return i&&p.string(i.newText)&&$.is(i.insert)&&$.is(i.replace)}n.is=t})(Zs||(Zs={}));var ea;(function(n){n.asIs=1,n.adjustIndentation=2})(ea||(ea={}));var ta;(function(n){function e(t){const r=t;return r&&(p.string(r.detail)||r.detail===void 0)&&(p.string(r.description)||r.description===void 0)}n.is=e})(ta||(ta={}));var na;(function(n){function e(t){return{label:t}}n.create=e})(na||(na={}));var ra;(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(ra||(ra={}));var qn;(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){const i=r;return p.string(i)||p.objectLiteral(i)&&p.string(i.language)&&p.string(i.value)}n.is=t})(qn||(qn={}));var ia;(function(n){function e(t){let r=t;return!!r&&p.objectLiteral(r)&&(un.is(r.contents)||qn.is(r.contents)||p.typedArray(r.contents,qn.is))&&(t.range===void 0||$.is(t.range))}n.is=e})(ia||(ia={}));var sa;(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(sa||(sa={}));var aa;(function(n){function e(t,r,...i){let s={label:t};return p.defined(r)&&(s.documentation=r),p.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(aa||(aa={}));var oa;(function(n){n.Text=1,n.Read=2,n.Write=3})(oa||(oa={}));var la;(function(n){function e(t,r){let i={range:t};return p.number(r)&&(i.kind=r),i}n.create=e})(la||(la={}));var ca;(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(ca||(ca={}));var ua;(function(n){n.Deprecated=1})(ua||(ua={}));var da;(function(n){function e(t,r,i,s,a){let o={name:t,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}n.create=e})(da||(da={}));var fa;(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(fa||(fa={}));var ha;(function(n){function e(r,i,s,a,o,l){let c={name:r,detail:i,kind:s,range:a,selectionRange:o};return l!==void 0&&(c.children=l),c}n.create=e;function t(r){let i=r;return i&&p.string(i.name)&&p.number(i.kind)&&$.is(i.range)&&$.is(i.selectionRange)&&(i.detail===void 0||p.string(i.detail))&&(i.deprecated===void 0||p.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(ha||(ha={}));var pa;(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(pa||(pa={}));var Yn;(function(n){n.Invoked=1,n.Automatic=2})(Yn||(Yn={}));var ma;(function(n){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.typedArray(i.diagnostics,zn.is)&&(i.only===void 0||p.typedArray(i.only,p.string))&&(i.triggerKind===void 0||i.triggerKind===Yn.Invoked||i.triggerKind===Yn.Automatic)}n.is=t})(ma||(ma={}));var ga;(function(n){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Ft.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}n.create=e;function t(r){let i=r;return i&&p.string(i.title)&&(i.diagnostics===void 0||p.typedArray(i.diagnostics,zn.is))&&(i.kind===void 0||p.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Ft.is(i.command))&&(i.isPreferred===void 0||p.boolean(i.isPreferred))&&(i.edit===void 0||ri.is(i.edit))}n.is=t})(ga||(ga={}));var ya;(function(n){function e(r,i){let s={range:r};return p.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return p.defined(i)&&$.is(i.range)&&(p.undefined(i.command)||Ft.is(i.command))}n.is=t})(ya||(ya={}));var Ta;(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.uinteger(i.tabSize)&&p.boolean(i.insertSpaces)}n.is=t})(Ta||(Ta={}));var _a;(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return p.defined(i)&&$.is(i.range)&&(p.undefined(i.target)||p.string(i.target))}n.is=t})(_a||(_a={}));var Ea;(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&$.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Ea||(Ea={}));var Ra;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(Ra||(Ra={}));var Aa;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Aa||(Aa={}));var va;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(va||(va={}));var ba;(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){const i=r;return i!=null&&$.is(i.range)&&p.string(i.text)}n.is=t})(ba||(ba={}));var Na;(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){const i=r;return i!=null&&$.is(i.range)&&p.boolean(i.caseSensitiveLookup)&&(p.string(i.variableName)||i.variableName===void 0)}n.is=t})(Na||(Na={}));var ka;(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){const i=r;return i!=null&&$.is(i.range)&&(p.string(i.expression)||i.expression===void 0)}n.is=t})(ka||(ka={}));var Ia;(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){const i=r;return p.defined(i)&&$.is(r.stoppedLocation)}n.is=t})(Ia||(Ia={}));var ai;(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(ai||(ai={}));var oi;(function(n){function e(r){return{value:r}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.location===void 0||Kn.is(i.location))&&(i.command===void 0||Ft.is(i.command))}n.is=t})(oi||(oi={}));var Sa;(function(n){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&P.is(i.position)&&(p.string(i.label)||p.typedArray(i.label,oi.is))&&(i.kind===void 0||ai.is(i.kind))&&i.textEdits===void 0||p.typedArray(i.textEdits,Bt.is)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.paddingLeft===void 0||p.boolean(i.paddingLeft))&&(i.paddingRight===void 0||p.boolean(i.paddingRight))}n.is=t})(Sa||(Sa={}));var xa;(function(n){function e(t){return{kind:"snippet",value:t}}n.createSnippet=e})(xa||(xa={}));var Ca;(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(Ca||(Ca={}));var wa;(function(n){function e(t){return{items:t}}n.create=e})(wa||(wa={}));var Oa;(function(n){n.Invoked=0,n.Automatic=1})(Oa||(Oa={}));var La;(function(n){function e(t,r){return{range:t,text:r}}n.create=e})(La||(La={}));var $a;(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})($a||($a={}));var Pa;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&Yr.is(r.uri)&&p.string(r.name)}n.is=e})(Pa||(Pa={}));var Ma;(function(n){function e(s,a,o,l){return new Ip(s,a,o,l)}n.create=e;function t(s){let a=s;return!!(p.defined(a)&&p.string(a.uri)&&(p.undefined(a.languageId)||p.string(a.languageId))&&p.uinteger(a.lineCount)&&p.func(a.getText)&&p.func(a.positionAt)&&p.func(a.offsetAt))}n.is=t;function r(s,a){let o=s.getText(),l=i(a,(u,d)=>{let f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f}),c=o.length;for(let u=l.length-1;u>=0;u--){let d=l[u],f=s.offsetAt(d.range.start),h=s.offsetAt(d.range.end);if(h<=c)o=o.substring(0,f)+d.newText+o.substring(h,o.length);else throw new Error("Overlapping edit");c=f}return o}n.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);let u=0,d=0,f=0;for(;us.state.transitions),i=bu(r.filter(s=>s instanceof Di).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:t,possibleTokenTypes:i,tokenPath:n}}function mp(n,e){return n.edges[e.tokenTypeIdx]}function gp(n,e,t){const r=new qr,i=[];for(const a of n.elements){if(t.is(a.alt)===!1)continue;if(a.state.type===vn){i.push(a);continue}const o=a.state.transitions.length;for(let l=0;l0&&!Ep(s))for(const a of i)s.add(a);return s}function yp(n,e){if(n instanceof Di&&Al(e,n.tokenType))return n.target}function Tp(n,e){let t;for(const r of n.elements)if(e.is(r.alt)===!0){if(t===void 0)t=r.alt;else if(t!==r.alt)return}return t}function Jl(n){return{configs:n,edges:{},isAcceptState:!1,prediction:-1}}function Ms(n,e,t,r){return r=Ql(n,r),e.edges[t.tokenTypeIdx]=r,r}function Ql(n,e){if(e===Hn)return e;const t=e.configs.key,r=n.states[t];return r!==void 0?r:(e.configs.finalize(),n.states[t]=e,e)}function vp(n){const e=new qr,t=n.transitions.length;for(let r=0;r0){const i=[...n.stack],a={state:i.pop(),alt:n.alt,stack:i};Vn(a,e)}else e.add(n);return}t.epsilonOnlyTransitions||e.add(n);const r=t.transitions.length;for(let i=0;i1)return!0;return!1}function kp(n){for(const e of Array.from(n.values()))if(Object.keys(e).length===1)return!0;return!1}var Ds;(function(n){function e(t){return typeof t=="string"}n.is=e})(Ds||(Ds={}));var Yr;(function(n){function e(t){return typeof t=="string"}n.is=e})(Yr||(Yr={}));var js;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(js||(js={}));var Wn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647;function e(t){return typeof t=="number"&&n.MIN_VALUE<=t&&t<=n.MAX_VALUE}n.is=e})(Wn||(Wn={}));var P;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=Wn.MAX_VALUE),i===Number.MAX_VALUE&&(i=Wn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&p.uinteger(i.line)&&p.uinteger(i.character)}n.is=t})(P||(P={}));var $;(function(n){function e(r,i,s,a){if(p.uinteger(r)&&p.uinteger(i)&&p.uinteger(s)&&p.uinteger(a))return{start:P.create(r,i),end:P.create(s,a)};if(P.is(r)&&P.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&P.is(i.start)&&P.is(i.end)}n.is=t})($||($={}));var Kn;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&$.is(i.range)&&(p.string(i.uri)||p.undefined(i.uri))}n.is=t})(Kn||(Kn={}));var Gs;(function(n){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&$.is(i.targetRange)&&p.string(i.targetUri)&&$.is(i.targetSelectionRange)&&($.is(i.originSelectionRange)||p.undefined(i.originSelectionRange))}n.is=t})(Gs||(Gs={}));var Xr;(function(n){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.numberRange(i.red,0,1)&&p.numberRange(i.green,0,1)&&p.numberRange(i.blue,0,1)&&p.numberRange(i.alpha,0,1)}n.is=t})(Xr||(Xr={}));var Us;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&$.is(i.range)&&Xr.is(i.color)}n.is=t})(Us||(Us={}));var Fs;(function(n){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.undefined(i.textEdit)||Bt.is(i))&&(p.undefined(i.additionalTextEdits)||p.typedArray(i.additionalTextEdits,Bt.is))}n.is=t})(Fs||(Fs={}));var Bs;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(Bs||(Bs={}));var Hs;(function(n){function e(r,i,s,a,o,l){const c={startLine:r,endLine:i};return p.defined(s)&&(c.startCharacter=s),p.defined(a)&&(c.endCharacter=a),p.defined(o)&&(c.kind=o),p.defined(l)&&(c.collapsedText=l),c}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.uinteger(i.startLine)&&p.uinteger(i.startLine)&&(p.undefined(i.startCharacter)||p.uinteger(i.startCharacter))&&(p.undefined(i.endCharacter)||p.uinteger(i.endCharacter))&&(p.undefined(i.kind)||p.string(i.kind))}n.is=t})(Hs||(Hs={}));var Jr;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&Kn.is(i.location)&&p.string(i.message)}n.is=t})(Jr||(Jr={}));var Vs;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(Vs||(Vs={}));var Ws;(function(n){n.Unnecessary=1,n.Deprecated=2})(Ws||(Ws={}));var Ks;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&p.string(r.href)}n.is=e})(Ks||(Ks={}));var zn;(function(n){function e(r,i,s,a,o,l){let c={range:r,message:i};return p.defined(s)&&(c.severity=s),p.defined(a)&&(c.code=a),p.defined(o)&&(c.source=o),p.defined(l)&&(c.relatedInformation=l),c}n.create=e;function t(r){var i;let s=r;return p.defined(s)&&$.is(s.range)&&p.string(s.message)&&(p.number(s.severity)||p.undefined(s.severity))&&(p.integer(s.code)||p.string(s.code)||p.undefined(s.code))&&(p.undefined(s.codeDescription)||p.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(p.string(s.source)||p.undefined(s.source))&&(p.undefined(s.relatedInformation)||p.typedArray(s.relatedInformation,Jr.is))}n.is=t})(zn||(zn={}));var Ft;(function(n){function e(r,i,...s){let a={title:r,command:i};return p.defined(s)&&s.length>0&&(a.arguments=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.title)&&p.string(i.command)}n.is=t})(Ft||(Ft={}));var Bt;(function(n){function e(s,a){return{range:s,newText:a}}n.replace=e;function t(s,a){return{range:{start:s,end:s},newText:a}}n.insert=t;function r(s){return{range:s,newText:""}}n.del=r;function i(s){const a=s;return p.objectLiteral(a)&&p.string(a.newText)&&$.is(a.range)}n.is=i})(Bt||(Bt={}));var Qr;(function(n){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(p.string(i.description)||i.description===void 0)}n.is=t})(Qr||(Qr={}));var Ht;(function(n){function e(t){const r=t;return p.string(r)}n.is=e})(Ht||(Ht={}));var zs;(function(n){function e(s,a,o){return{range:s,newText:a,annotationId:o}}n.replace=e;function t(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}n.insert=t;function r(s,a){return{range:s,newText:"",annotationId:a}}n.del=r;function i(s){const a=s;return Bt.is(a)&&(Qr.is(a.annotationId)||Ht.is(a.annotationId))}n.is=i})(zs||(zs={}));var Zr;(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&ii.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(Zr||(Zr={}));var ei;(function(n){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="create"&&p.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}n.is=t})(ei||(ei={}));var ti;(function(n){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}n.create=e;function t(r){let i=r;return i&&i.kind==="rename"&&p.string(i.oldUri)&&p.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}n.is=t})(ti||(ti={}));var ni;(function(n){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){let i=r;return i&&i.kind==="delete"&&p.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||p.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||p.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ht.is(i.annotationId))}n.is=t})(ni||(ni={}));var ri;(function(n){function e(t){let r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>p.string(i.kind)?ei.is(i)||ti.is(i)||ni.is(i):Zr.is(i)))}n.is=e})(ri||(ri={}));var qs;(function(n){function e(r){return{uri:r}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)}n.is=t})(qs||(qs={}));var Ys;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.integer(i.version)}n.is=t})(Ys||(Ys={}));var ii;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&(i.version===null||p.integer(i.version))}n.is=t})(ii||(ii={}));var Xs;(function(n){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.string(i.languageId)&&p.integer(i.version)&&p.string(i.text)}n.is=t})(Xs||(Xs={}));var si;(function(n){n.PlainText="plaintext",n.Markdown="markdown";function e(t){const r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(si||(si={}));var un;(function(n){function e(t){const r=t;return p.objectLiteral(t)&&si.is(r.kind)&&p.string(r.value)}n.is=e})(un||(un={}));var Js;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(Js||(Js={}));var Qs;(function(n){n.PlainText=1,n.Snippet=2})(Qs||(Qs={}));var Zs;(function(n){n.Deprecated=1})(Zs||(Zs={}));var ea;(function(n){function e(r,i,s){return{newText:r,insert:i,replace:s}}n.create=e;function t(r){const i=r;return i&&p.string(i.newText)&&$.is(i.insert)&&$.is(i.replace)}n.is=t})(ea||(ea={}));var ta;(function(n){n.asIs=1,n.adjustIndentation=2})(ta||(ta={}));var na;(function(n){function e(t){const r=t;return r&&(p.string(r.detail)||r.detail===void 0)&&(p.string(r.description)||r.description===void 0)}n.is=e})(na||(na={}));var ra;(function(n){function e(t){return{label:t}}n.create=e})(ra||(ra={}));var ia;(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(ia||(ia={}));var qn;(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){const i=r;return p.string(i)||p.objectLiteral(i)&&p.string(i.language)&&p.string(i.value)}n.is=t})(qn||(qn={}));var sa;(function(n){function e(t){let r=t;return!!r&&p.objectLiteral(r)&&(un.is(r.contents)||qn.is(r.contents)||p.typedArray(r.contents,qn.is))&&(t.range===void 0||$.is(t.range))}n.is=e})(sa||(sa={}));var aa;(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(aa||(aa={}));var oa;(function(n){function e(t,r,...i){let s={label:t};return p.defined(r)&&(s.documentation=r),p.defined(i)?s.parameters=i:s.parameters=[],s}n.create=e})(oa||(oa={}));var la;(function(n){n.Text=1,n.Read=2,n.Write=3})(la||(la={}));var ca;(function(n){function e(t,r){let i={range:t};return p.number(r)&&(i.kind=r),i}n.create=e})(ca||(ca={}));var ua;(function(n){n.File=1,n.Module=2,n.Namespace=3,n.Package=4,n.Class=5,n.Method=6,n.Property=7,n.Field=8,n.Constructor=9,n.Enum=10,n.Interface=11,n.Function=12,n.Variable=13,n.Constant=14,n.String=15,n.Number=16,n.Boolean=17,n.Array=18,n.Object=19,n.Key=20,n.Null=21,n.EnumMember=22,n.Struct=23,n.Event=24,n.Operator=25,n.TypeParameter=26})(ua||(ua={}));var da;(function(n){n.Deprecated=1})(da||(da={}));var fa;(function(n){function e(t,r,i,s,a){let o={name:t,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}n.create=e})(fa||(fa={}));var ha;(function(n){function e(t,r,i,s){return s!==void 0?{name:t,kind:r,location:{uri:i,range:s}}:{name:t,kind:r,location:{uri:i}}}n.create=e})(ha||(ha={}));var pa;(function(n){function e(r,i,s,a,o,l){let c={name:r,detail:i,kind:s,range:a,selectionRange:o};return l!==void 0&&(c.children=l),c}n.create=e;function t(r){let i=r;return i&&p.string(i.name)&&p.number(i.kind)&&$.is(i.range)&&$.is(i.selectionRange)&&(i.detail===void 0||p.string(i.detail))&&(i.deprecated===void 0||p.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}n.is=t})(pa||(pa={}));var ma;(function(n){n.Empty="",n.QuickFix="quickfix",n.Refactor="refactor",n.RefactorExtract="refactor.extract",n.RefactorInline="refactor.inline",n.RefactorRewrite="refactor.rewrite",n.Source="source",n.SourceOrganizeImports="source.organizeImports",n.SourceFixAll="source.fixAll"})(ma||(ma={}));var Yn;(function(n){n.Invoked=1,n.Automatic=2})(Yn||(Yn={}));var ga;(function(n){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}n.create=e;function t(r){let i=r;return p.defined(i)&&p.typedArray(i.diagnostics,zn.is)&&(i.only===void 0||p.typedArray(i.only,p.string))&&(i.triggerKind===void 0||i.triggerKind===Yn.Invoked||i.triggerKind===Yn.Automatic)}n.is=t})(ga||(ga={}));var ya;(function(n){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Ft.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}n.create=e;function t(r){let i=r;return i&&p.string(i.title)&&(i.diagnostics===void 0||p.typedArray(i.diagnostics,zn.is))&&(i.kind===void 0||p.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Ft.is(i.command))&&(i.isPreferred===void 0||p.boolean(i.isPreferred))&&(i.edit===void 0||ri.is(i.edit))}n.is=t})(ya||(ya={}));var Ta;(function(n){function e(r,i){let s={range:r};return p.defined(i)&&(s.data=i),s}n.create=e;function t(r){let i=r;return p.defined(i)&&$.is(i.range)&&(p.undefined(i.command)||Ft.is(i.command))}n.is=t})(Ta||(Ta={}));var va;(function(n){function e(r,i){return{tabSize:r,insertSpaces:i}}n.create=e;function t(r){let i=r;return p.defined(i)&&p.uinteger(i.tabSize)&&p.boolean(i.insertSpaces)}n.is=t})(va||(va={}));var _a;(function(n){function e(r,i,s){return{range:r,target:i,data:s}}n.create=e;function t(r){let i=r;return p.defined(i)&&$.is(i.range)&&(p.undefined(i.target)||p.string(i.target))}n.is=t})(_a||(_a={}));var Ea;(function(n){function e(r,i){return{range:r,parent:i}}n.create=e;function t(r){let i=r;return p.objectLiteral(i)&&$.is(i.range)&&(i.parent===void 0||n.is(i.parent))}n.is=t})(Ea||(Ea={}));var Ra;(function(n){n.namespace="namespace",n.type="type",n.class="class",n.enum="enum",n.interface="interface",n.struct="struct",n.typeParameter="typeParameter",n.parameter="parameter",n.variable="variable",n.property="property",n.enumMember="enumMember",n.event="event",n.function="function",n.method="method",n.macro="macro",n.keyword="keyword",n.modifier="modifier",n.comment="comment",n.string="string",n.number="number",n.regexp="regexp",n.operator="operator",n.decorator="decorator"})(Ra||(Ra={}));var Aa;(function(n){n.declaration="declaration",n.definition="definition",n.readonly="readonly",n.static="static",n.deprecated="deprecated",n.abstract="abstract",n.async="async",n.modification="modification",n.documentation="documentation",n.defaultLibrary="defaultLibrary"})(Aa||(Aa={}));var ba;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}n.is=e})(ba||(ba={}));var Na;(function(n){function e(r,i){return{range:r,text:i}}n.create=e;function t(r){const i=r;return i!=null&&$.is(i.range)&&p.string(i.text)}n.is=t})(Na||(Na={}));var ka;(function(n){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}n.create=e;function t(r){const i=r;return i!=null&&$.is(i.range)&&p.boolean(i.caseSensitiveLookup)&&(p.string(i.variableName)||i.variableName===void 0)}n.is=t})(ka||(ka={}));var Ia;(function(n){function e(r,i){return{range:r,expression:i}}n.create=e;function t(r){const i=r;return i!=null&&$.is(i.range)&&(p.string(i.expression)||i.expression===void 0)}n.is=t})(Ia||(Ia={}));var Sa;(function(n){function e(r,i){return{frameId:r,stoppedLocation:i}}n.create=e;function t(r){const i=r;return p.defined(i)&&$.is(r.stoppedLocation)}n.is=t})(Sa||(Sa={}));var ai;(function(n){n.Type=1,n.Parameter=2;function e(t){return t===1||t===2}n.is=e})(ai||(ai={}));var oi;(function(n){function e(r){return{value:r}}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.location===void 0||Kn.is(i.location))&&(i.command===void 0||Ft.is(i.command))}n.is=t})(oi||(oi={}));var xa;(function(n){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}n.create=e;function t(r){const i=r;return p.objectLiteral(i)&&P.is(i.position)&&(p.string(i.label)||p.typedArray(i.label,oi.is))&&(i.kind===void 0||ai.is(i.kind))&&i.textEdits===void 0||p.typedArray(i.textEdits,Bt.is)&&(i.tooltip===void 0||p.string(i.tooltip)||un.is(i.tooltip))&&(i.paddingLeft===void 0||p.boolean(i.paddingLeft))&&(i.paddingRight===void 0||p.boolean(i.paddingRight))}n.is=t})(xa||(xa={}));var Ca;(function(n){function e(t){return{kind:"snippet",value:t}}n.createSnippet=e})(Ca||(Ca={}));var wa;(function(n){function e(t,r,i,s){return{insertText:t,filterText:r,range:i,command:s}}n.create=e})(wa||(wa={}));var Oa;(function(n){function e(t){return{items:t}}n.create=e})(Oa||(Oa={}));var La;(function(n){n.Invoked=0,n.Automatic=1})(La||(La={}));var $a;(function(n){function e(t,r){return{range:t,text:r}}n.create=e})($a||($a={}));var Pa;(function(n){function e(t,r){return{triggerKind:t,selectedCompletionInfo:r}}n.create=e})(Pa||(Pa={}));var Ma;(function(n){function e(t){const r=t;return p.objectLiteral(r)&&Yr.is(r.uri)&&p.string(r.name)}n.is=e})(Ma||(Ma={}));var Da;(function(n){function e(s,a,o,l){return new Ip(s,a,o,l)}n.create=e;function t(s){let a=s;return!!(p.defined(a)&&p.string(a.uri)&&(p.undefined(a.languageId)||p.string(a.languageId))&&p.uinteger(a.lineCount)&&p.func(a.getText)&&p.func(a.positionAt)&&p.func(a.offsetAt))}n.is=t;function r(s,a){let o=s.getText(),l=i(a,(u,d)=>{let f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f}),c=o.length;for(let u=l.length-1;u>=0;u--){let d=l[u],f=s.offsetAt(d.range.start),h=s.offsetAt(d.range.end);if(h<=c)o=o.substring(0,f)+d.newText+o.substring(h,o.length);else throw new Error("Overlapping edit");c=f}return o}n.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);let u=0,d=0,f=0;for(;u0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return P.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return P.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(h){return h===!0||h===!1}n.boolean=i;function s(h){return e.call(h)==="[object String]"}n.string=s;function a(h){return e.call(h)==="[object Number]"}n.number=a;function o(h,m,g){return e.call(h)==="[object Number]"&&m<=h&&h<=g}n.numberRange=o;function l(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}n.integer=l;function c(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}n.uinteger=c;function u(h){return e.call(h)==="[object Function]"}n.func=u;function d(h){return h!==null&&typeof h=="object"}n.objectLiteral=d;function f(h,m){return Array.isArray(h)&&h.every(m)}n.typedArray=f})(p||(p={}));class Sp{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new Zl(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new Ui;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new li(e.startOffset,e.image.length,Dr(e),e.tokenType,!1);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}construct(e){const t=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();(r==null?void 0:r.content.length)===0&&this.removeNode(r)}addHiddenTokens(e){for(const t of e){const r=new li(t.startOffset,t.image.length,Dr(t),t.tokenType,!0);r.root=this.rootNode,this.addHiddenToken(this.rootNode,r)}}addHiddenToken(e,t){const{offset:r,end:i}=t;for(let s=0;so&&i=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class Fi extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Fi.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}}class Zl extends Ui{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ci=Symbol("Datatype");function Cr(n){return n.$type===ci}const Da="​",ec=n=>n.endsWith(Da)?n:n+Da;class tc{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new Lp(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class xp extends tc{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Sp,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const r=e.fragment?void 0:Ii(e)?ci:cr(e),i=this.wrapper.DEFINE_RULE(ec(e.name),this.startImplementation(r,t).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const r=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:r,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return r=>{if(!this.isRecording()){const s={$type:e};this.stack.push(s),e===ci&&(s.value="")}let i;try{i=t(r)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,t,r){const i=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(i)){const s=this.nodeBuilder.buildLeafNode(i,r),{assignment:a,isCrossRef:o}=this.getAssignment(r),l=this.current;if(a){const c=dt(r)?i.image:this.converter.convert(i.image,s);this.assign(a.operator,a.feature,c,s,o)}else if(Cr(l)){let c=i.image;dt(r)||(c=this.converter.convert(c,s).toString()),l.value+=c}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,i){let s;this.isRecording()||(s=this.nodeBuilder.buildCompositeNode(r));const a=this.wrapper.wrapSubrule(e,t,i);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(a,r,s)}performSubruleAssignment(e,t,r){const{assignment:i,isCrossRef:s}=this.getAssignment(t);if(i)this.assign(i.operator,i.feature,e,r,s);else if(!i){const a=this.current;if(Cr(a))a.value+=e.toString();else if(typeof e=="object"&&e){const o=e.$type,l=this.assignWithoutOverride(e,a);o&&(l.$type=o);const c=l;this.stack.pop(),this.stack.push(c)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(!r.$cstNode&&t.feature&&t.operator){r=this.construct(!1);const s=r.$cstNode.feature;this.nodeBuilder.buildCompositeNode(s)}const i={$type:e};this.stack.pop(),this.stack.push(i),t.feature&&t.operator&&this.assign(t.operator,t.feature,r,r.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return od(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),Cr(t)?this.converter.convert(t.value,t.$cstNode):(cd(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=ar(e,ut);this.assignmentMap.set(e,{assignment:t,isCrossRef:t?vi(t.terminal):!1})}return this.assignmentMap.get(e)}assign(e,t,r,i,s){const a=this.current;let o;switch(s&&typeof r=="string"?o=this.linker.buildReference(a,t,i,r):o=r,e){case"=":{a[t]=o;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const s=e[r];s===void 0?e[r]=i:Array.isArray(s)&&Array.isArray(i)&&(i.push(...s),e[r]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class Cp{buildMismatchTokenMessage(e){return Et.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Et.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Et.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Et.buildEarlyExitMessage(e)}}class nc extends Cp{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class wp extends tc{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const r=this.wrapper.DEFINE_RULE(ec(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const Op={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new nc};class Lp extends Uh{constructor(e,t){const r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},Op),{lookaheadStrategy:r?new $i({maxLookahead:t.maxLookahead}):new op}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function rc(n,e,t){return $p({parser:e,tokens:t,rules:new Map,ruleNames:new Map},n),e}function $p(n,e){const t=tl(e,!1),r=Q(e.rules).filter(Se).filter(i=>t.has(i));for(const i of r){const s=Object.assign(Object.assign({},n),{consume:1,optional:1,subrule:1,many:1,or:1});s.rules.set(i.name,n.parser.rule(i,pt(s,i.definition)))}}function pt(n,e,t=!1){let r;if(dt(e))r=Fp(n,e);else if(sr(e))r=Pp(n,e);else if(ut(e))r=pt(n,e.terminal);else if(vi(e))r=ic(n,e);else if(ft(e))r=Mp(n,e);else if($o(e))r=jp(n,e);else if(qo(e))r=Gp(n,e);else if(bi(e))r=Up(n,e);else if(Zu(e)){const i=n.consume++;r=()=>n.parser.consume(i,tt,e)}else throw new yo(e.$cstNode,`Unexpected element type: ${e.$type}`);return sc(n,t?void 0:Xn(e),r,e.cardinality)}function Pp(n,e){const t=cr(e);return()=>n.parser.action(t,e)}function Mp(n,e){const t=e.rule.ref;if(Se(t)){const r=n.subrule++,i=e.arguments.length>0?Dp(t,e.arguments):()=>({});return s=>n.parser.subrule(r,ac(n,t),e,i(s))}else if(gt(t)){const r=n.consume++,i=ui(n,t.name);return()=>n.parser.consume(r,i,e)}else if(t)ir();else throw new yo(e.$cstNode,`Undefined rule type: ${e.$type}`)}function Dp(n,e){const t=e.map(r=>We(r.value));return r=>{const i={};for(let s=0;se(r)||t(r)}else if(Gu(n)){const e=We(n.left),t=We(n.right);return r=>e(r)&&t(r)}else if(Bu(n)){const e=We(n.value);return t=>!e(t)}else if(Wu(n)){const e=n.parameter.ref.name;return t=>t!==void 0&&t[e]===!0}else if(ju(n)){const e=!!n.true;return()=>e}ir()}function jp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);{const t=[];for(const i of e.elements){const s={ALT:pt(n,i,!0)},a=Xn(i);a&&(s.GATE=We(a)),t.push(s)}const r=n.or++;return i=>n.parser.alternatives(r,t.map(s=>{const a={ALT:()=>s.ALT(i)},o=s.GATE;return o&&(a.GATE=()=>o(i)),a}))}}function Gp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);const t=[];for(const o of e.elements){const l={ALT:pt(n,o,!0)},c=Xn(o);c&&(l.GATE=We(c)),t.push(l)}const r=n.or++,i=(o,l)=>{const c=l.getRuleStack().join("-");return`uGroup_${o}_${c}`},s=o=>n.parser.alternatives(r,t.map((l,c)=>{const u={ALT:()=>!0},d=n.parser;u.ALT=()=>{if(l.ALT(o),!d.isRecording()){const h=i(r,d);d.unorderedGroups.get(h)||d.unorderedGroups.set(h,[]);const m=d.unorderedGroups.get(h);typeof(m==null?void 0:m[c])>"u"&&(m[c]=!0)}};const f=l.GATE;return f?u.GATE=()=>f(o):u.GATE=()=>{const h=d.unorderedGroups.get(i(r,d));return!(h!=null&&h[c])},u})),a=sc(n,Xn(e),s,"*");return o=>{a(o),n.parser.isRecording()||n.parser.unorderedGroups.delete(i(r,n.parser))}}function Up(n,e){const t=e.elements.map(r=>pt(n,r));return r=>t.forEach(i=>i(r))}function Xn(n){if(bi(n))return n.guardCondition}function ic(n,e,t=e.terminal){if(t)if(ft(t)&&Se(t.rule.ref)){const r=n.subrule++;return i=>n.parser.subrule(r,ac(n,t.rule.ref),e,i)}else if(ft(t)&>(t.rule.ref)){const r=n.consume++,i=ui(n,t.rule.ref.name);return()=>n.parser.consume(r,i,e)}else if(dt(t)){const r=n.consume++,i=ui(n,t.value);return()=>n.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=il(e.type.ref),i=r==null?void 0:r.terminal;if(!i)throw new Error("Could not find name assignment for type: "+cr(e.type.ref));return ic(n,e,i)}}function Fp(n,e){const t=n.consume++,r=n.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>n.parser.consume(t,r,e)}function sc(n,e,t,r){const i=e&&We(e);if(!r)if(i){const s=n.or++;return a=>n.parser.alternatives(s,[{ALT:()=>t(a),GATE:()=>i(a)},{ALT:Os(),GATE:()=>!i(a)}])}else return t;if(r==="*"){const s=n.many++;return a=>n.parser.many(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else if(r==="+"){const s=n.many++;if(i){const a=n.or++;return o=>n.parser.alternatives(a,[{ALT:()=>n.parser.atLeastOne(s,{DEF:()=>t(o)}),GATE:()=>i(o)},{ALT:Os(),GATE:()=>!i(o)}])}else return a=>n.parser.atLeastOne(s,{DEF:()=>t(a)})}else if(r==="?"){const s=n.optional++;return a=>n.parser.optional(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else ir()}function ac(n,e){const t=Bp(n,e),r=n.rules.get(t);if(!r)throw new Error(`Rule "${t}" not found."`);return r}function Bp(n,e){if(Se(e))return e.name;if(n.ruleNames.has(e))return n.ruleNames.get(e);{let t=e,r=t.$container,i=e.$type;for(;!Se(r);)(bi(r)||$o(r)||qo(r))&&(i=r.elements.indexOf(t).toString()+":"+i),t=r,r=r.$container;return i=r.name+":"+i,n.ruleNames.set(e,i),i}}function ui(n,e){const t=n.tokens[e];if(!t)throw new Error(`Token "${e}" not found."`);return t}function Hp(n){const e=n.Grammar,t=n.parser.Lexer,r=new wp(n);return rc(e,r,t.definition),r.finalize(),r}function Vp(n){const e=Wp(n);return e.finalize(),e}function Wp(n){const e=n.Grammar,t=n.parser.Lexer,r=new xp(n);return rc(e,r,t.definition)}class oc{buildTokens(e,t){const r=Q(tl(e,!1)),i=this.buildTerminalTokens(r),s=this.buildKeywordTokens(r,i,t);return i.forEach(a=>{const o=a.PATTERN;typeof o=="object"&&o&&"test"in o&&ls(o)?s.unshift(a):s.push(a)}),s}buildTerminalTokens(e){return e.filter(gt).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){const t=Si(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=ls(t)?de.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?(t.lastIndex=i,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Se).flatMap(i=>pn(i).filter(dt)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,t,!!(r!=null&&r.caseInsensitive)))}buildKeywordToken(e,t,r){return{name:e.value,PATTERN:this.buildKeywordPattern(e,r),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(yd(e.value)):e.value}findLongerAlt(e,t){return t.reduce((r,i)=>{const s=i==null?void 0:i.PATTERN;return s!=null&&s.source&&Td("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class lc{convert(e,t){let r=t.grammarSource;if(vi(r)&&(r=Ad(r)),ft(r)){const i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,t)}return e}runConverter(e,t,r){var i;switch(e.name.toUpperCase()){case"INT":return Ve.convertInt(t);case"STRING":return Ve.convertString(t);case"ID":return Ve.convertID(t)}switch((i=xd(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Ve.convertNumber(t);case"boolean":return Ve.convertBoolean(t);case"bigint":return Ve.convertBigint(t);case"date":return Ve.convertDate(t);default:return t}}}var Ve;(function(n){function e(c){let u="";for(let d=1;duc(e))}se.stringArray=Xp;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.Emitter=Vt.Event=void 0;const Jp=yr;var ja;(function(n){const e={dispose(){}};n.None=function(){return e}})(ja||(Vt.Event=ja={}));class Qp{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new Qp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=Tr._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}Vt.Emitter=Tr;Tr._noop=function(){};var X;Object.defineProperty(dn,"__esModule",{value:!0});var fi=dn.CancellationTokenSource=X=dn.CancellationToken=void 0;const Zp=yr,em=se,hi=Vt;var Jn;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:hi.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:hi.Event.None});function e(t){const r=t;return r&&(r===n.None||r===n.Cancelled||em.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(Jn||(X=dn.CancellationToken=Jn={}));const tm=Object.freeze(function(n,e){const t=(0,Zp.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}});class Ga{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tm:(this._emitter||(this._emitter=new hi.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class nm{get token(){return this._token||(this._token=new Ga),this._token}cancel(){this._token?this._token.cancel():this._token=Jn.Cancelled}dispose(){this._token?this._token instanceof Ga&&this._token.dispose():this._token=Jn.None}}fi=dn.CancellationTokenSource=nm;function rm(){return new Promise(n=>{typeof setImmediate>"u"?setTimeout(n,0):setImmediate(n)})}let Ua=0,im=10;const Qn=Symbol("OperationCancelled");function Bi(n){return n===Qn}async function Le(n){if(n===X.None)return;const e=Date.now();if(e-Ua>=im&&(Ua=e,await rm()),n.isCancellationRequested)throw Qn}class Hi{constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}}class fn{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(const r of e)if(fn.isIncremental(r)){const i=hc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const u=Fa(r.text,!1,s);if(l-o===u.length)for(let f=0,h=u.length;fe?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const i=e.line+1t&&fc(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")}static isFull(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0}}var pi;(function(n){function e(i,s,a,o){return new fn(i,s,a,o)}n.create=e;function t(i,s,a){if(i instanceof fn)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){const a=i.getText(),o=mi(s.map(sm),(u,d)=>{const f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f});let l=0;const c=[];for(const u of o){const d=i.offsetAt(u.range.start);if(dl&&c.push(a.substring(l,d)),u.newText.length&&c.push(u.newText),l=i.offsetAt(u.range.end)}return c.push(a.substr(l)),c.join("")}n.applyEdits=r})(pi||(pi={}));function mi(n,e){if(n.length<=1)return n;const t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);mi(r,e),mi(i,e);let s=0,a=0,o=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function sm(n){const e=hc(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var wr={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}},pc;(()=>{var n={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,c){for(var u,d="",f=0,h=-1,m=0,g=0;g<=l.length;++g){if(g2){var E=d.lastIndexOf("/");if(E!==d.length-1){E===-1?(d="",f=0):f=(d=d.slice(0,E)).length-1-d.lastIndexOf("/"),h=g,m=0;continue}}else if(d.length===2||d.length===1){d="",f=0,h=g,m=0;continue}}c&&(d.length>0?d+="/..":d="..",f=2)}else d.length>0?d+="/"+l.slice(h+1,g):d=l.slice(h+1,g),f=g-h-1;h=g,m=0}else u===46&&m!==-1?++m:m=-1}return d}var o={resolve:function(){for(var l,c="",u=!1,d=arguments.length-1;d>=-1&&!u;d--){var f;d>=0?f=arguments[d]:(l===void 0&&(l=wr.cwd()),f=l),s(f),f.length!==0&&(c=f+"/"+c,u=f.charCodeAt(0)===47)}return c=a(c,!u),u?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(s(l),l.length===0)return".";var c=l.charCodeAt(0)===47,u=l.charCodeAt(l.length-1)===47;return(l=a(l,!c)).length!==0||c||(l="."),l.length>0&&u&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c0&&(l===void 0?l=u:l+="/"+u)}return l===void 0?".":o.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=o.resolve(l))===(c=o.resolve(c)))return"";for(var u=1;ug){if(c.charCodeAt(h+y)===47)return c.slice(h+y+1);if(y===0)return c.slice(h+y)}else f>g&&(l.charCodeAt(u+y)===47?E=y:y===0&&(E=0));break}var R=l.charCodeAt(u+y);if(R!==c.charCodeAt(h+y))break;R===47&&(E=y)}var _="";for(y=u+E+1;y<=d;++y)y!==d&&l.charCodeAt(y)!==47||(_.length===0?_+="..":_+="/..");return _.length>0?_+c.slice(h+E):(h+=E,c.charCodeAt(h)===47&&++h,c.slice(h))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var c=l.charCodeAt(0),u=c===47,d=-1,f=!0,h=l.length-1;h>=1;--h)if((c=l.charCodeAt(h))===47){if(!f){d=h;break}}else f=!1;return d===-1?u?"/":".":u&&d===1?"//":l.slice(0,d)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(l);var u,d=0,f=-1,h=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var m=c.length-1,g=-1;for(u=l.length-1;u>=0;--u){var E=l.charCodeAt(u);if(E===47){if(!h){d=u+1;break}}else g===-1&&(h=!1,g=u+1),m>=0&&(E===c.charCodeAt(m)?--m==-1&&(f=u):(m=-1,f=g))}return d===f?f=g:f===-1&&(f=l.length),l.slice(d,f)}for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!h){d=u+1;break}}else f===-1&&(h=!1,f=u+1);return f===-1?"":l.slice(d,f)},extname:function(l){s(l);for(var c=-1,u=0,d=-1,f=!0,h=0,m=l.length-1;m>=0;--m){var g=l.charCodeAt(m);if(g!==47)d===-1&&(f=!1,d=m+1),g===46?c===-1?c=m:h!==1&&(h=1):c!==-1&&(h=-1);else if(!f){u=m+1;break}}return c===-1||d===-1||h===0||h===1&&c===d-1&&c===u+1?"":l.slice(c,d)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(c,u){var d=u.dir||u.root,f=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+f:d+"/"+f:f}(0,l)},parse:function(l){s(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var u,d=l.charCodeAt(0),f=d===47;f?(c.root="/",u=1):u=0;for(var h=-1,m=0,g=-1,E=!0,y=l.length-1,R=0;y>=u;--y)if((d=l.charCodeAt(y))!==47)g===-1&&(E=!1,g=y+1),d===46?h===-1?h=y:R!==1&&(R=1):h!==-1&&(R=-1);else if(!E){m=y+1;break}return h===-1||g===-1||R===0||R===1&&h===g-1&&h===m+1?g!==-1&&(c.base=c.name=m===0&&f?l.slice(1,g):l.slice(m,g)):(m===0&&f?(c.name=l.slice(1,h),c.base=l.slice(1,g)):(c.name=l.slice(m,h),c.base=l.slice(m,g)),c.ext=l.slice(h,g)),m>0?c.dir=l.slice(0,m-1):f&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function t(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return n[i](a,a.exports,t),a.exports}t.d=(i,s)=>{for(var a in s)t.o(s,a)&&!t.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},t.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),t.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;t.r(r),t.d(r,{URI:()=>f,Utils:()=>be}),typeof wr=="object"?i=wr.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(v,T){if(!v.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${v.authority}", path: "${v.path}", query: "${v.query}", fragment: "${v.fragment}"}`);if(v.scheme&&!s.test(v.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(v.path){if(v.authority){if(!a.test(v.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(v.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(T,A,N,L,O,w=!1){Je(this,"scheme");Je(this,"authority");Je(this,"path");Je(this,"query");Je(this,"fragment");typeof T=="object"?(this.scheme=T.scheme||c,this.authority=T.authority||c,this.path=T.path||c,this.query=T.query||c,this.fragment=T.fragment||c):(this.scheme=function(ye,z){return ye||z?ye:"file"}(T,w),this.authority=A||c,this.path=function(ye,z){switch(ye){case"https":case"http":case"file":z?z[0]!==u&&(z=u+z):z=u}return z}(this.scheme,N||c),this.query=L||c,this.fragment=O||c,l(this,w))}static isUri(T){return T instanceof f||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}get fsPath(){return R(this)}with(T){if(!T)return this;let{scheme:A,authority:N,path:L,query:O,fragment:w}=T;return A===void 0?A=this.scheme:A===null&&(A=c),N===void 0?N=this.authority:N===null&&(N=c),L===void 0?L=this.path:L===null&&(L=c),O===void 0?O=this.query:O===null&&(O=c),w===void 0?w=this.fragment:w===null&&(w=c),A===this.scheme&&N===this.authority&&L===this.path&&O===this.query&&w===this.fragment?this:new m(A,N,L,O,w)}static parse(T,A=!1){const N=d.exec(T);return N?new m(N[2]||c,ne(N[4]||c),ne(N[5]||c),ne(N[7]||c),ne(N[9]||c),A):new m(c,c,c,c,c)}static file(T){let A=c;if(i&&(T=T.replace(/\\/g,u)),T[0]===u&&T[1]===u){const N=T.indexOf(u,2);N===-1?(A=T.substring(2),T=u):(A=T.substring(2,N),T=T.substring(N)||u)}return new m("file",A,T,c,c)}static from(T){const A=new m(T.scheme,T.authority,T.path,T.query,T.fragment);return l(A,!0),A}toString(T=!1){return _(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof f)return T;{const A=new m(T);return A._formatted=T.external,A._fsPath=T._sep===h?T.fsPath:null,A}}return T}}const h=i?1:void 0;class m extends f{constructor(){super(...arguments);Je(this,"_formatted",null);Je(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=R(this)),this._fsPath}toString(A=!1){return A?_(this,!0):(this._formatted||(this._formatted=_(this,!1)),this._formatted)}toJSON(){const A={$mid:1};return this._fsPath&&(A.fsPath=this._fsPath,A._sep=h),this._formatted&&(A.external=this._formatted),this.path&&(A.path=this.path),this.scheme&&(A.scheme=this.scheme),this.authority&&(A.authority=this.authority),this.query&&(A.query=this.query),this.fragment&&(A.fragment=this.fragment),A}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function E(v,T,A){let N,L=-1;for(let O=0;O=97&&w<=122||w>=65&&w<=90||w>=48&&w<=57||w===45||w===46||w===95||w===126||T&&w===47||A&&w===91||A&&w===93||A&&w===58)L!==-1&&(N+=encodeURIComponent(v.substring(L,O)),L=-1),N!==void 0&&(N+=v.charAt(O));else{N===void 0&&(N=v.substr(0,O));const ye=g[w];ye!==void 0?(L!==-1&&(N+=encodeURIComponent(v.substring(L,O)),L=-1),N+=ye):L===-1&&(L=O)}}return L!==-1&&(N+=encodeURIComponent(v.substring(L))),N!==void 0?N:v}function y(v){let T;for(let A=0;A1&&v.scheme==="file"?`//${v.authority}${v.path}`:v.path.charCodeAt(0)===47&&(v.path.charCodeAt(1)>=65&&v.path.charCodeAt(1)<=90||v.path.charCodeAt(1)>=97&&v.path.charCodeAt(1)<=122)&&v.path.charCodeAt(2)===58?v.path[1].toLowerCase()+v.path.substr(2):v.path,i&&(A=A.replace(/\//g,"\\")),A}function _(v,T){const A=T?y:E;let N="",{scheme:L,authority:O,path:w,query:ye,fragment:z}=v;if(L&&(N+=L,N+=":"),(O||L==="file")&&(N+=u,N+=u),O){let B=O.indexOf("@");if(B!==-1){const at=O.substr(0,B);O=O.substr(B+1),B=at.lastIndexOf(":"),B===-1?N+=A(at,!1,!1):(N+=A(at.substr(0,B),!1,!1),N+=":",N+=A(at.substr(B+1),!1,!0)),N+="@"}O=O.toLowerCase(),B=O.lastIndexOf(":"),B===-1?N+=A(O,!1,!0):(N+=A(O.substr(0,B),!1,!0),N+=O.substr(B))}if(w){if(w.length>=3&&w.charCodeAt(0)===47&&w.charCodeAt(2)===58){const B=w.charCodeAt(1);B>=65&&B<=90&&(w=`/${String.fromCharCode(B+32)}:${w.substr(3)}`)}else if(w.length>=2&&w.charCodeAt(1)===58){const B=w.charCodeAt(0);B>=65&&B<=90&&(w=`${String.fromCharCode(B+32)}:${w.substr(2)}`)}N+=A(w,!0,!1)}return ye&&(N+="?",N+=A(ye,!1,!1)),z&&(N+="#",N+=T?z:E(z,!1,!1)),N}function I(v){try{return decodeURIComponent(v)}catch{return v.length>3?v.substr(0,3)+I(v.substr(3)):v}}const j=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ne(v){return v.match(j)?v.replace(j,T=>I(T)):v}var Ce=t(470);const ge=Ce.posix||Ce,De="/";var be;(function(v){v.joinPath=function(T,...A){return T.with({path:ge.join(T.path,...A)})},v.resolvePath=function(T,...A){let N=T.path,L=!1;N[0]!==De&&(N=De+N,L=!0);let O=ge.resolve(N,...A);return L&&O[0]===De&&!T.authority&&(O=O.substring(1)),T.with({path:O})},v.dirname=function(T){if(T.path.length===0||T.path===De)return T;let A=ge.dirname(T.path);return A.length===1&&A.charCodeAt(0)===46&&(A=""),T.with({path:A})},v.basename=function(T){return ge.basename(T.path)},v.extname=function(T){return ge.extname(T.path)}})(be||(be={}))})(),pc=r})();const{URI:Wt,Utils:sn}=pc;var rt;(function(n){n.basename=sn.basename,n.dirname=sn.dirname,n.extname=sn.extname,n.joinPath=sn.joinPath,n.resolvePath=sn.resolvePath;function e(r,i){return(r==null?void 0:r.toString())===(i==null?void 0:i.toString())}n.equals=e;function t(r,i){const s=typeof r=="string"?r:r.path,a=typeof i=="string"?i:i.path,o=s.split("/").filter(f=>f.length>0),l=a.split("/").filter(f=>f.length>0);let c=0;for(;ci??(i=pi.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}}class om{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Q(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,r.precomputedScopes=void 0,r.references=[],r.diagnostics=void 0),r}deleteDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,this.documentMap.delete(t)),r}}class lm{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=X.None){for(const r of Rt(e.parseResult.value))await Le(t),Qo(r).forEach(i=>this.doLink(i,e))}doLink(e,t){const r=e.reference;if(r._ref===void 0)try{const i=this.getCandidate(e);if(kn(i))r._ref=i;else if(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){const s=this.loadAstNode(i);r._ref=s??this.createLinkingError(e,i)}}catch(i){r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': ${i}`})}t.references.push(r)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const r=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return r??this.createLinkingError(e)}buildReference(e,t,r,i){const s=this,a={$refNode:r,$refText:i,get ref(){var o;if(ae(this._ref))return this._ref;if(Nu(this._nodeDescription)){const l=s.loadAstNode(this._nodeDescription);this._ref=l??s.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){const l=s.getLinkedNode({reference:a,container:e,property:t});if(l.error&&Ue(e).state=e.end)return s.ref}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Su(e,i)))return r}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(t!=null&&t.$cstNode){const r=this.nameProvider.getNameNode(t);return r??t.$cstNode}}findReferences(e,t){const r=[];if(t.includeDeclaration){const s=this.getReferenceToSelf(e);s&&r.push(s)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(s=>rt.equals(s.sourceUri,t.documentUri))),r.push(...i),Q(r)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const r=Ue(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Ln(t),local:!0}}}}class Vi{constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return Pr.sum(Q(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const i=r.indexOf(t);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){var t;return(t=this.map.get(e))!==null&&t!==void 0?t:[]}has(e,t){if(t===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Q(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return Q(this.map.keys())}values(){return Q(this.map.values()).flat()}entriesGroupedByKey(){return Q(this.map.entries())}}class Ba{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}}class fm{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=X.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=Ni,i=X.None){const s=[];this.exportNode(e,s,t);for(const a of r(e))await Le(i),this.exportNode(a,s,t);return s}exportNode(e,t,r){const i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async computeLocalScopes(e,t=X.None){const r=e.parseResult.value,i=new Vi;for(const s of pn(r))await Le(t),this.processNode(s,e,i);return i}processNode(e,t,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,t))}}}class Ha{constructor(e,t,r){var i;this.elements=e,this.outerScope=t,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?this.elements.find(r=>r.name.toLowerCase()===e.toLowerCase()):this.elements.find(r=>r.name===e);if(t)return t;if(this.outerScope)return this.outerScope.getElement(e)}}class hm{constructor(e,t,r){var i;this.elements=new Map,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1;for(const s of e){const a=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(a,s)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Q(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class mc{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class pm extends mc{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class mm extends mc{constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();const i=this.cacheForContext(e);if(i.has(t))return i.get(t);if(r){const s=r();return i.set(t,s),s}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}}class gm extends pm{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class ym{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new gm(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),i=Ue(e.container).precomputedScopes;if(i){let a=e.container;do{const o=i.get(a);o.length>0&&t.push(Q(o).filter(l=>this.reflection.isSubtype(l.type,r))),a=a.$container}while(a)}let s=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)s=this.createScope(t[a],s);return s}createScope(e,t,r){return new Ha(Q(e),t,r)}createScopeForNodes(e,t,r){const i=Q(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new Ha(i,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new hm(this.indexManager.allElements(e)))}}function Tm(n){return typeof n.$comment=="string"}function Va(n){return typeof n=="object"&&!!n&&("$ref"in n||"$error"in n)}class _m{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const r=t==null?void 0:t.replacer,i=(a,o)=>this.replacer(a,o,t),s=r?(a,o)=>r(a,o,i):i;try{return this.currentDocument=Ue(e),JSON.stringify(e,s,t==null?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const r=JSON.parse(e);return this.linkNode(r,r,t),r}replacer(e,t,{refText:r,sourceText:i,textRegions:s,comments:a,uriConverter:o}){var l,c,u,d;if(!this.ignoreProperties.has(e))if(Ge(t)){const f=t.ref,h=r?t.$refText:void 0;if(f){const m=Ue(f);let g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,t):g=m.uri.toString());const E=this.astNodeLocator.getAstNodePath(f);return{$ref:`${g}#${E}`,$refText:h}}else return{$error:(c=(l=t.error)===null||l===void 0?void 0:l.message)!==null&&c!==void 0?c:"Could not resolve reference",$refText:h}}else if(ae(t)){let f;if(s&&(f=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),(!e||t.$document)&&(f!=null&&f.$textRegion)&&(f.$textRegion.documentURI=(u=this.currentDocument)===null||u===void 0?void 0:u.uri.toString())),i&&!e&&(f??(f=Object.assign({},t)),f.$sourceText=(d=t.$cstNode)===null||d===void 0?void 0:d.text),a){f??(f=Object.assign({},t));const h=this.commentProvider.getComment(t);h&&(f.$comment=h.replace(/\r/g,""))}return f??t}else return t}addAstNodeRegionWithAssignmentsTo(e){const t=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=t(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith("$")).forEach(s=>{const a=bd(e.$cstNode,s).map(t);a.length!==0&&(i[s]=a)}),e}}linkNode(e,t,r,i,s,a){for(const[l,c]of Object.entries(e))if(Array.isArray(c))for(let u=0;u{try{await e.call(t,r,i,s)}catch(a){if(Bi(a))throw a;console.error("An error occurred during validation:",a);const o=a instanceof Error?a.message:String(a);a instanceof Error&&a.stack&&console.error(a.stack),i("error","An error occurred during validation: "+o,{node:r})}}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Q(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(i=>t.includes(i.category))),r.map(i=>i.check)}}class Am{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=X.None){const i=e.parseResult,s=[];if(await Le(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(i,s,t),t.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LexingError})||(this.processParsingErrors(i,s,t),t.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.ParsingError}))||(this.processLinkingErrors(e,s,t),t.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,t,r))}catch(a){if(Bi(a))throw a;console.error("An error occurred during validation:",a)}return await Le(r),s}processLexingErrors(e,t,r){for(const i of e.lexerErrors){const s={severity:Or("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Wa(Qe.LexingError),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const a=i.previousToken;if(isNaN(a.startOffset)){const o={line:0,character:0};s={start:o,end:o}}else{const o={line:a.endLine-1,character:a.endColumn};s={start:o,end:o}}}}else s=Dr(i.token);if(s){const a={severity:Or("error"),range:s,message:i.message,data:Wa(Qe.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(const i of e.references){const s=i.error;if(s){const a={node:s.container,property:s.property,index:s.index,data:{code:Qe.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};t.push(this.toDiagnostic("error",s.message,a))}}}async validateAst(e,t,r=X.None){const i=[],s=(a,o,l)=>{i.push(this.toDiagnostic(a,o,l))};return await Promise.all(Rt(e).map(async a=>{await Le(r);const o=this.validationRegistry.getChecks(a.$type,t.categories);for(const l of o)await l(a,s,r)})),i}toDiagnostic(e,t,r){return{message:t,range:vm(r),severity:Or(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function vm(n){if(n.range)return n.range;let e;return typeof n.property=="string"?e=rl(n.node.$cstNode,n.property,n.index):typeof n.keyword=="string"&&(e=Nd(n.node.$cstNode,n.keyword,n.index)),e??(e=n.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Or(n){switch(n){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+n)}}var Qe;(function(n){n.LexingError="lexing-error",n.ParsingError="parsing-error",n.LinkingError="linking-error"})(Qe||(Qe={}));class bm{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r=Ue(e)){t??(t=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let s;const a=()=>{var o;return s??(s=Ln((o=this.nameProvider.getNameNode(e))!==null&&o!==void 0?o:e.$cstNode))};return{node:e,name:t,get nameSegment(){return a()},selectionSegment:Ln(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}}class Nm{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=X.None){const r=[],i=e.parseResult.value;for(const s of Rt(i))await Le(t),Qo(s).filter(a=>!kn(a)).forEach(a=>{const o=this.createDescription(a);o&&r.push(o)});return r}createDescription(e){const t=e.reference.$nodeDescription,r=e.reference.$refNode;if(!t||!r)return;const i=Ue(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:Ln(r),local:rt.equals(t.documentUri,i)}}}class km{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const a=s.indexOf(this.indexSeparator);if(a>0){const o=s.substring(0,a),l=parseInt(s.substring(a+1)),c=i[o];return c==null?void 0:c[l]}return i[s]},e)}}class Im{constructor(e){this._ready=new Hi,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,r;this.workspaceConfig=(r=(t=e.capabilities.workspace)===null||t===void 0?void 0:t.configuration)!==null&&r!==void 0?r:!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(t=>{this.updateSectionConfiguration(t,e.settings[t])})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}}var er;(function(n){function e(t){return{dispose:async()=>await t()}}n.create=e})(er||(er={}));class Sm{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Vi,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=U.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=X.None){var i,s;for(const a of e){const o=a.uri.toString();if(a.state===U.Validated){if(typeof t.validation=="boolean"&&t.validation)a.state=U.IndexedReferences,a.diagnostics=void 0,this.buildState.delete(o);else if(typeof t.validation=="object"){const l=this.buildState.get(o),c=(i=l==null?void 0:l.result)===null||i===void 0?void 0:i.validationChecks;if(c){const d=((s=t.validation.categories)!==null&&s!==void 0?s:Zn.all).filter(f=>!c.includes(f));d.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:d})},result:l.result}),a.state=U.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=U.Changed,await this.emitUpdate(e.map(a=>a.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=X.None){this.currentState=U.Changed;for(const a of t)this.langiumDocuments.deleteDocument(a),this.buildState.delete(a.toString()),this.indexManager.remove(a);for(const a of e){if(!this.langiumDocuments.invalidateDocument(a)){const l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a);l.state=U.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(a.toString())}const i=Q(e).concat(t).map(a=>a.toString()).toSet();this.langiumDocuments.all.filter(a=>!i.has(a.uri.toString())&&this.shouldRelink(a,i)).forEach(a=>{this.serviceRegistry.getServices(a.uri).references.Linker.unlink(a),a.state=Math.min(a.state,U.ComputedScopes),a.diagnostics=void 0}),await this.emitUpdate(e,t),await Le(r);const s=this.langiumDocuments.all.filter(a=>{var o;return a.stater(e,t)))}shouldRelink(e,t){return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),er.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,U.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,U.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,U.ComputedScopes,r,async s=>{const a=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await a.computeLocalScopes(s,r)}),await this.runCancelable(e,U.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,U.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,U.Validated,r,s=>this.validate(s,r));for(const s of e){const a=this.buildState.get(s.uri.toString());a&&(a.completed=!0)}}prepareBuild(e,t){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:t,result:s==null?void 0:s.result})}}async runCancelable(e,t,r,i){const s=e.filter(a=>a.state{this.buildPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;if(t&&"path"in t?i=t:r=t,r??(r=X.None),i){const s=this.langiumDocuments.getDocument(i);if(s&&s.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):r.isCancellationRequested?Promise.reject(Qn):new Promise((s,a)=>{const o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){const c=this.langiumDocuments.getDocument(i);s(c==null?void 0:c.uri)}else s(void 0)}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),a(Qn)})})}async notifyBuildPhase(e,t,r){if(e.length===0)return;const i=this.buildPhaseListeners.get(t);for(const s of i)await Le(r),await s(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r,i;const s=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e).validation,o=typeof a=="object"?a:void 0,l=await s.validateDocument(e,o,t);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;const c=this.buildState.get(e.uri.toString());if(c){(r=c.result)!==null&&r!==void 0||(c.result={});const u=(i=o==null?void 0:o.categories)!==null&&i!==void 0?i:Zn.all;c.result.validationChecks?c.result.validationChecks.push(...u):c.result.validationChecks=[...u]}}getBuildOptions(e){var t,r;return(r=(t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.options)!==null&&r!==void 0?r:{}}}class xm{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new mm,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=Ue(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{rt.equals(a.targetUri,r)&&a.targetPath===t&&i.push(a)})}),Q(i)}allElements(e,t){let r=Q(this.symbolIndex.keys());return t&&(r=r.filter(i=>!t||t.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,t){var r;return t?this.symbolByTypeIndex.get(e,t,()=>{var s;return((s=this.symbolIndex.get(e))!==null&&s!==void 0?s:[]).filter(o=>this.astReflection.isSubtype(o.type,t))}):(r=this.symbolIndex.get(e))!==null&&r!==void 0?r:[]}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&t.has(i.targetUri.toString())):!1}}class Cm{constructor(e){this.initialBuildOptions={},this._ready=new Hi,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=(t=e.workspaceFolders)!==null&&t!==void 0?t:void 0}initialized(e){return this.mutex.write(t=>{var r;return this.initializeWorkspace((r=this.folders)!==null&&r!==void 0?r:[],t)})}async initializeWorkspace(e,t=X.None){const r=await this.performStartup(e);await Le(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),r=[],i=s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,t,i))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Wt.parse(e.uri)}async traverseFolder(e,t,r,i){const s=await this.fileSystemProvider.readDirectory(t);await Promise.all(s.map(async a=>{if(this.includeEntry(e,a,r)){if(a.isDirectory)await this.traverseFolder(e,a.uri,r,i);else if(a.isFile){const o=await this.langiumDocuments.getOrCreateDocument(a.uri);i(o)}}}))}includeEntry(e,t,r){const i=rt.basename(t.uri);if(i.startsWith("."))return!1;if(t.isDirectory)return i!=="node_modules"&&i!=="out";if(t.isFile){const s=rt.extname(t.uri);return r.includes(s)}return!1}}class wm{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=Ka(t)?Object.values(t):t;this.chevrotainLexer=new de(r,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:(t=r.groups.hidden)!==null&&t!==void 0?t:[]}}toTokenTypeDictionary(e){if(Ka(e))return e;const t=gc(e)?Object.values(e.modes).flat():e,r={};return t.forEach(i=>r[i.name]=i),r}}function Om(n){return Array.isArray(n)&&(n.length===0||"name"in n[0])}function gc(n){return n&&"modes"in n&&"defaultMode"in n}function Ka(n){return!Om(n)&&!gc(n)}function Lm(n,e,t){let r,i;typeof n=="string"?(i=e,r=t):(i=n.range.start,r=e),i||(i=P.create(0,0));const s=yc(n),a=Wi(r),o=Mm({lines:s,position:i,options:a});return Fm({index:0,tokens:o,position:i})}function $m(n,e){const t=Wi(e),r=yc(n);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=t.start,o=t.end;return!!(a!=null&&a.exec(i))&&!!(o!=null&&o.exec(s))}function yc(n){let e="";return typeof n=="string"?e=n:e=n.text,e.split(hd)}const za=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Pm=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Mm(n){var e,t,r;const i=[];let s=n.position.line,a=n.position.character;for(let o=0;o=u.length){if(i.length>0){const h=P.create(s,a);i.push({type:"break",content:"",range:$.create(h,h)})}}else{za.lastIndex=d;const h=za.exec(u);if(h){const m=h[0],g=h[1],E=P.create(s,a+d),y=P.create(s,a+d+m.length);i.push({type:"tag",content:g,range:$.create(E,y)}),d+=m.length,d=gi(u,d)}if(d0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function Dm(n,e,t,r){const i=[];if(n.length===0){const s=P.create(t,r),a=P.create(t,r+e.length);i.push({type:"text",content:e,range:$.create(s,a)})}else{let s=0;for(const o of n){const l=o.index,c=e.substring(s,l);c.length>0&&i.push({type:"text",content:e.substring(s,l),range:$.create(P.create(t,s+r),P.create(t,l+r))});let u=c.length+1;const d=o[1];if(i.push({type:"inline-tag",content:d,range:$.create(P.create(t,s+u+r),P.create(t,s+u+d.length+r))}),u+=d.length,o.length===4){u+=o[2].length;const f=o[3];i.push({type:"text",content:f,range:$.create(P.create(t,s+u+r),P.create(t,s+u+f.length+r))})}else i.push({type:"text",content:"",range:$.create(P.create(t,s+u+r),P.create(t,s+u+r))});s=l+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:$.create(P.create(t,s+r),P.create(t,s+r+a.length))})}return i}const jm=/\S/,Gm=/\s*$/;function gi(n,e){const t=n.substring(e).match(jm);return t?e+t.index:n.length}function Um(n){const e=n.match(Gm);if(e&&typeof e.index=="number")return e.index}function Fm(n){var e,t,r,i;const s=P.create(n.position.line,n.position.character);if(n.tokens.length===0)return new qa([],$.create(s,s));const a=[];for(;n.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(e.length===0)e=t.toString();else{const r=t.toString();e+=Ya(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{const i=r.toMarkdown(e);t+=Ya(t)+i}return t.trim()}}class $r{constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +`&&i++}r&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return P.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return P.create(s,e-t[s])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(h){return h===!0||h===!1}n.boolean=i;function s(h){return e.call(h)==="[object String]"}n.string=s;function a(h){return e.call(h)==="[object Number]"}n.number=a;function o(h,m,g){return e.call(h)==="[object Number]"&&m<=h&&h<=g}n.numberRange=o;function l(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}n.integer=l;function c(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}n.uinteger=c;function u(h){return e.call(h)==="[object Function]"}n.func=u;function d(h){return h!==null&&typeof h=="object"}n.objectLiteral=d;function f(h,m){return Array.isArray(h)&&h.every(m)}n.typedArray=f})(p||(p={}));class Sp{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(e){return this.rootNode=new ec(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const t=new Fi;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){const r=new li(e.startOffset,e.image.length,Dr(e),e.tokenType,!1);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const t=e.container;if(t){const r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}construct(e){const t=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=t;const r=this.nodeStack.pop();(r==null?void 0:r.content.length)===0&&this.removeNode(r)}addHiddenTokens(e){for(const t of e){const r=new li(t.startOffset,t.image.length,Dr(t),t.tokenType,!0);r.root=this.rootNode,this.addHiddenToken(this.rootNode,r)}}addHiddenToken(e,t){const{offset:r,end:i}=t;for(let s=0;so&&i=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class Bi extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,Bi.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...r){return this.addParents(r),super.splice(e,t,...r)}addParents(e){for(const t of e)t.container=this.parent}}class ec extends Fi{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ci=Symbol("Datatype");function Cr(n){return n.$type===ci}const ja="​",tc=n=>n.endsWith(ja)?n:n+ja;class nc{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new Lp(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class xp extends nc{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Sp,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const r=e.fragment?void 0:Si(e)?ci:cr(e),i=this.wrapper.DEFINE_RULE(tc(e.name),this.startImplementation(r,t).bind(this));return e.entry&&(this.mainRule=i),i}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const r=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:r,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return r=>{if(!this.isRecording()){const s={$type:e};this.stack.push(s),e===ci&&(s.value="")}let i;try{i=t(r)}catch{i=void 0}return!this.isRecording()&&i===void 0&&(i=this.construct()),i}}consume(e,t,r){const i=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(i)){const s=this.nodeBuilder.buildLeafNode(i,r),{assignment:a,isCrossRef:o}=this.getAssignment(r),l=this.current;if(a){const c=dt(r)?i.image:this.converter.convert(i.image,s);this.assign(a.operator,a.feature,c,s,o)}else if(Cr(l)){let c=i.image;dt(r)||(c=this.converter.convert(c,s).toString()),l.value+=c}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,i){let s;this.isRecording()||(s=this.nodeBuilder.buildCompositeNode(r));const a=this.wrapper.wrapSubrule(e,t,i);!this.isRecording()&&s&&s.length>0&&this.performSubruleAssignment(a,r,s)}performSubruleAssignment(e,t,r){const{assignment:i,isCrossRef:s}=this.getAssignment(t);if(i)this.assign(i.operator,i.feature,e,r,s);else if(!i){const a=this.current;if(Cr(a))a.value+=e.toString();else if(typeof e=="object"&&e){const o=e.$type,l=this.assignWithoutOverride(e,a);o&&(l.$type=o);const c=l;this.stack.pop(),this.stack.push(c)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(!r.$cstNode&&t.feature&&t.operator){r=this.construct(!1);const s=r.$cstNode.feature;this.nodeBuilder.buildCompositeNode(s)}const i={$type:e};this.stack.pop(),this.stack.push(i),t.feature&&t.operator&&this.assign(t.operator,t.feature,r,r.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return od(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),Cr(t)?this.converter.convert(t.value,t.$cstNode):(cd(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=ar(e,ut);this.assignmentMap.set(e,{assignment:t,isCrossRef:t?bi(t.terminal):!1})}return this.assignmentMap.get(e)}assign(e,t,r,i,s){const a=this.current;let o;switch(s&&typeof r=="string"?o=this.linker.buildReference(a,t,i,r):o=r,e){case"=":{a[t]=o;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const s=e[r];s===void 0?e[r]=i:Array.isArray(s)&&Array.isArray(i)&&(i.push(...s),e[r]=i)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class Cp{buildMismatchTokenMessage(e){return _t.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return _t.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return _t.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return _t.buildEarlyExitMessage(e)}}class rc extends Cp{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class wp extends nc{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const r=this.wrapper.DEFINE_RULE(tc(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const Op={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new rc};class Lp extends Uh{constructor(e,t){const r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},Op),{lookaheadStrategy:r?new Pi({maxLookahead:t.maxLookahead}):new op}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function ic(n,e,t){return $p({parser:e,tokens:t,rules:new Map,ruleNames:new Map},n),e}function $p(n,e){const t=nl(e,!1),r=Q(e.rules).filter(Se).filter(i=>t.has(i));for(const i of r){const s=Object.assign(Object.assign({},n),{consume:1,optional:1,subrule:1,many:1,or:1});s.rules.set(i.name,n.parser.rule(i,pt(s,i.definition)))}}function pt(n,e,t=!1){let r;if(dt(e))r=Fp(n,e);else if(sr(e))r=Pp(n,e);else if(ut(e))r=pt(n,e.terminal);else if(bi(e))r=sc(n,e);else if(ft(e))r=Mp(n,e);else if(Po(e))r=jp(n,e);else if(Yo(e))r=Gp(n,e);else if(Ni(e))r=Up(n,e);else if(Zu(e)){const i=n.consume++;r=()=>n.parser.consume(i,tt,e)}else throw new To(e.$cstNode,`Unexpected element type: ${e.$type}`);return ac(n,t?void 0:Xn(e),r,e.cardinality)}function Pp(n,e){const t=cr(e);return()=>n.parser.action(t,e)}function Mp(n,e){const t=e.rule.ref;if(Se(t)){const r=n.subrule++,i=e.arguments.length>0?Dp(t,e.arguments):()=>({});return s=>n.parser.subrule(r,oc(n,t),e,i(s))}else if(gt(t)){const r=n.consume++,i=ui(n,t.name);return()=>n.parser.consume(r,i,e)}else if(t)ir();else throw new To(e.$cstNode,`Undefined rule type: ${e.$type}`)}function Dp(n,e){const t=e.map(r=>We(r.value));return r=>{const i={};for(let s=0;se(r)||t(r)}else if(Gu(n)){const e=We(n.left),t=We(n.right);return r=>e(r)&&t(r)}else if(Bu(n)){const e=We(n.value);return t=>!e(t)}else if(Wu(n)){const e=n.parameter.ref.name;return t=>t!==void 0&&t[e]===!0}else if(ju(n)){const e=!!n.true;return()=>e}ir()}function jp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);{const t=[];for(const i of e.elements){const s={ALT:pt(n,i,!0)},a=Xn(i);a&&(s.GATE=We(a)),t.push(s)}const r=n.or++;return i=>n.parser.alternatives(r,t.map(s=>{const a={ALT:()=>s.ALT(i)},o=s.GATE;return o&&(a.GATE=()=>o(i)),a}))}}function Gp(n,e){if(e.elements.length===1)return pt(n,e.elements[0]);const t=[];for(const o of e.elements){const l={ALT:pt(n,o,!0)},c=Xn(o);c&&(l.GATE=We(c)),t.push(l)}const r=n.or++,i=(o,l)=>{const c=l.getRuleStack().join("-");return`uGroup_${o}_${c}`},s=o=>n.parser.alternatives(r,t.map((l,c)=>{const u={ALT:()=>!0},d=n.parser;u.ALT=()=>{if(l.ALT(o),!d.isRecording()){const h=i(r,d);d.unorderedGroups.get(h)||d.unorderedGroups.set(h,[]);const m=d.unorderedGroups.get(h);typeof(m==null?void 0:m[c])>"u"&&(m[c]=!0)}};const f=l.GATE;return f?u.GATE=()=>f(o):u.GATE=()=>{const h=d.unorderedGroups.get(i(r,d));return!(h!=null&&h[c])},u})),a=ac(n,Xn(e),s,"*");return o=>{a(o),n.parser.isRecording()||n.parser.unorderedGroups.delete(i(r,n.parser))}}function Up(n,e){const t=e.elements.map(r=>pt(n,r));return r=>t.forEach(i=>i(r))}function Xn(n){if(Ni(n))return n.guardCondition}function sc(n,e,t=e.terminal){if(t)if(ft(t)&&Se(t.rule.ref)){const r=n.subrule++;return i=>n.parser.subrule(r,oc(n,t.rule.ref),e,i)}else if(ft(t)&>(t.rule.ref)){const r=n.consume++,i=ui(n,t.rule.ref.name);return()=>n.parser.consume(r,i,e)}else if(dt(t)){const r=n.consume++,i=ui(n,t.value);return()=>n.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=sl(e.type.ref),i=r==null?void 0:r.terminal;if(!i)throw new Error("Could not find name assignment for type: "+cr(e.type.ref));return sc(n,e,i)}}function Fp(n,e){const t=n.consume++,r=n.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>n.parser.consume(t,r,e)}function ac(n,e,t,r){const i=e&&We(e);if(!r)if(i){const s=n.or++;return a=>n.parser.alternatives(s,[{ALT:()=>t(a),GATE:()=>i(a)},{ALT:Ls(),GATE:()=>!i(a)}])}else return t;if(r==="*"){const s=n.many++;return a=>n.parser.many(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else if(r==="+"){const s=n.many++;if(i){const a=n.or++;return o=>n.parser.alternatives(a,[{ALT:()=>n.parser.atLeastOne(s,{DEF:()=>t(o)}),GATE:()=>i(o)},{ALT:Ls(),GATE:()=>!i(o)}])}else return a=>n.parser.atLeastOne(s,{DEF:()=>t(a)})}else if(r==="?"){const s=n.optional++;return a=>n.parser.optional(s,{DEF:()=>t(a),GATE:i?()=>i(a):void 0})}else ir()}function oc(n,e){const t=Bp(n,e),r=n.rules.get(t);if(!r)throw new Error(`Rule "${t}" not found."`);return r}function Bp(n,e){if(Se(e))return e.name;if(n.ruleNames.has(e))return n.ruleNames.get(e);{let t=e,r=t.$container,i=e.$type;for(;!Se(r);)(Ni(r)||Po(r)||Yo(r))&&(i=r.elements.indexOf(t).toString()+":"+i),t=r,r=r.$container;return i=r.name+":"+i,n.ruleNames.set(e,i),i}}function ui(n,e){const t=n.tokens[e];if(!t)throw new Error(`Token "${e}" not found."`);return t}function Hp(n){const e=n.Grammar,t=n.parser.Lexer,r=new wp(n);return ic(e,r,t.definition),r.finalize(),r}function Vp(n){const e=Wp(n);return e.finalize(),e}function Wp(n){const e=n.Grammar,t=n.parser.Lexer,r=new xp(n);return ic(e,r,t.definition)}class lc{buildTokens(e,t){const r=Q(nl(e,!1)),i=this.buildTerminalTokens(r),s=this.buildKeywordTokens(r,i,t);return i.forEach(a=>{const o=a.PATTERN;typeof o=="object"&&o&&"test"in o&&cs(o)?s.unshift(a):s.push(a)}),s}buildTerminalTokens(e){return e.filter(gt).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){const t=xi(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r,LINE_BREAKS:!0};return e.hidden&&(i.GROUP=cs(t)?de.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")?!0:!!(e.source.includes("?<=")||e.source.includes("?(t.lastIndex=i,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Se).flatMap(i=>pn(i).filter(dt)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,t,!!(r!=null&&r.caseInsensitive)))}buildKeywordToken(e,t,r){return{name:e.value,PATTERN:this.buildKeywordPattern(e,r),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(yd(e.value)):e.value}findLongerAlt(e,t){return t.reduce((r,i)=>{const s=i==null?void 0:i.PATTERN;return s!=null&&s.source&&Td("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class cc{convert(e,t){let r=t.grammarSource;if(bi(r)&&(r=Rd(r)),ft(r)){const i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,t)}return e}runConverter(e,t,r){var i;switch(e.name.toUpperCase()){case"INT":return Ve.convertInt(t);case"STRING":return Ve.convertString(t);case"ID":return Ve.convertID(t)}switch((i=xd(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return Ve.convertNumber(t);case"boolean":return Ve.convertBoolean(t);case"bigint":return Ve.convertBigint(t);case"date":return Ve.convertDate(t);default:return t}}}var Ve;(function(n){function e(c){let u="";for(let d=1;duc(e))}se.stringArray=Xp;var Vt={};Object.defineProperty(Vt,"__esModule",{value:!0});Vt.Emitter=Vt.Event=void 0;const Jp=yr;var Ga;(function(n){const e={dispose(){}};n.None=function(){return e}})(Ga||(Vt.Event=Ga={}));class Qp{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let i=0,s=this._callbacks.length;i{this._callbacks||(this._callbacks=new Qp),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const i={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),i.dispose=Tr._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(i),i}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}Vt.Emitter=Tr;Tr._noop=function(){};var X;Object.defineProperty(dn,"__esModule",{value:!0});var hi=dn.CancellationTokenSource=X=dn.CancellationToken=void 0;const Zp=yr,em=se,pi=Vt;var Jn;(function(n){n.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:pi.Event.None}),n.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:pi.Event.None});function e(t){const r=t;return r&&(r===n.None||r===n.Cancelled||em.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}n.is=e})(Jn||(X=dn.CancellationToken=Jn={}));const tm=Object.freeze(function(n,e){const t=(0,Zp.default)().timer.setTimeout(n.bind(e),0);return{dispose(){t.dispose()}}});class Ua{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?tm:(this._emitter||(this._emitter=new pi.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class nm{get token(){return this._token||(this._token=new Ua),this._token}cancel(){this._token?this._token.cancel():this._token=Jn.Cancelled}dispose(){this._token?this._token instanceof Ua&&this._token.dispose():this._token=Jn.None}}hi=dn.CancellationTokenSource=nm;function rm(){return new Promise(n=>{typeof setImmediate>"u"?setTimeout(n,0):setImmediate(n)})}let Fa=0,im=10;const Qn=Symbol("OperationCancelled");function Hi(n){return n===Qn}async function Le(n){if(n===X.None)return;const e=Date.now();if(e-Fa>=im&&(Fa=e,await rm()),n.isCancellationRequested)throw Qn}class Vi{constructor(){this.promise=new Promise((e,t)=>{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}}class fn{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(const r of e)if(fn.isIncremental(r)){const i=hc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const u=Ba(r.text,!1,s);if(l-o===u.length)for(let f=0,h=u.length;fe?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,t[s]),{line:s,character:e-t[s]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const r=t[e.line];if(e.character<=0)return r;const i=e.line+1t&&fc(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")}static isFull(e){const t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0}}var mi;(function(n){function e(i,s,a,o){return new fn(i,s,a,o)}n.create=e;function t(i,s,a){if(i instanceof fn)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}n.update=t;function r(i,s){const a=i.getText(),o=gi(s.map(sm),(u,d)=>{const f=u.range.start.line-d.range.start.line;return f===0?u.range.start.character-d.range.start.character:f});let l=0;const c=[];for(const u of o){const d=i.offsetAt(u.range.start);if(dl&&c.push(a.substring(l,d)),u.newText.length&&c.push(u.newText),l=i.offsetAt(u.range.end)}return c.push(a.substr(l)),c.join("")}n.applyEdits=r})(mi||(mi={}));function gi(n,e){if(n.length<=1)return n;const t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);gi(r,e),gi(i,e);let s=0,a=0,o=0;for(;st.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function sm(n){const e=hc(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var wr={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_177c26d6-fb22-449a-87e2-db9959d53fe4",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_177c26d6-fb22-449a-87e2-db9959d53fe4",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:6575",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13671567639",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8aa748ac-6dd4-4073-9410-acf109d056c5",INVOCATION_ID:"97e2fcc9618d40ada1c1d6a5738ecc02",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"504",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub-Actions-1000003902",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_177c26d6-fb22-449a-87e2-db9959d53fe4",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_177c26d6-fb22-449a-87e2-db9959d53fe4",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_177c26d6-fb22-449a-87e2-db9959d53fe4",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2146,ppid:2145,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}},pc;(()=>{var n={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,c){for(var u,d="",f=0,h=-1,m=0,g=0;g<=l.length;++g){if(g2){var _=d.lastIndexOf("/");if(_!==d.length-1){_===-1?(d="",f=0):f=(d=d.slice(0,_)).length-1-d.lastIndexOf("/"),h=g,m=0;continue}}else if(d.length===2||d.length===1){d="",f=0,h=g,m=0;continue}}c&&(d.length>0?d+="/..":d="..",f=2)}else d.length>0?d+="/"+l.slice(h+1,g):d=l.slice(h+1,g),f=g-h-1;h=g,m=0}else u===46&&m!==-1?++m:m=-1}return d}var o={resolve:function(){for(var l,c="",u=!1,d=arguments.length-1;d>=-1&&!u;d--){var f;d>=0?f=arguments[d]:(l===void 0&&(l=wr.cwd()),f=l),s(f),f.length!==0&&(c=f+"/"+c,u=f.charCodeAt(0)===47)}return c=a(c,!u),u?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(s(l),l.length===0)return".";var c=l.charCodeAt(0)===47,u=l.charCodeAt(l.length-1)===47;return(l=a(l,!c)).length!==0||c||(l="."),l.length>0&&u&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c0&&(l===void 0?l=u:l+="/"+u)}return l===void 0?".":o.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=o.resolve(l))===(c=o.resolve(c)))return"";for(var u=1;ug){if(c.charCodeAt(h+y)===47)return c.slice(h+y+1);if(y===0)return c.slice(h+y)}else f>g&&(l.charCodeAt(u+y)===47?_=y:y===0&&(_=0));break}var E=l.charCodeAt(u+y);if(E!==c.charCodeAt(h+y))break;E===47&&(_=y)}var v="";for(y=u+_+1;y<=d;++y)y!==d&&l.charCodeAt(y)!==47||(v.length===0?v+="..":v+="/..");return v.length>0?v+c.slice(h+_):(h+=_,c.charCodeAt(h)===47&&++h,c.slice(h))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var c=l.charCodeAt(0),u=c===47,d=-1,f=!0,h=l.length-1;h>=1;--h)if((c=l.charCodeAt(h))===47){if(!f){d=h;break}}else f=!1;return d===-1?u?"/":".":u&&d===1?"//":l.slice(0,d)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(l);var u,d=0,f=-1,h=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var m=c.length-1,g=-1;for(u=l.length-1;u>=0;--u){var _=l.charCodeAt(u);if(_===47){if(!h){d=u+1;break}}else g===-1&&(h=!1,g=u+1),m>=0&&(_===c.charCodeAt(m)?--m==-1&&(f=u):(m=-1,f=g))}return d===f?f=g:f===-1&&(f=l.length),l.slice(d,f)}for(u=l.length-1;u>=0;--u)if(l.charCodeAt(u)===47){if(!h){d=u+1;break}}else f===-1&&(h=!1,f=u+1);return f===-1?"":l.slice(d,f)},extname:function(l){s(l);for(var c=-1,u=0,d=-1,f=!0,h=0,m=l.length-1;m>=0;--m){var g=l.charCodeAt(m);if(g!==47)d===-1&&(f=!1,d=m+1),g===46?c===-1?c=m:h!==1&&(h=1):c!==-1&&(h=-1);else if(!f){u=m+1;break}}return c===-1||d===-1||h===0||h===1&&c===d-1&&c===u+1?"":l.slice(c,d)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return function(c,u){var d=u.dir||u.root,f=u.base||(u.name||"")+(u.ext||"");return d?d===u.root?d+f:d+"/"+f:f}(0,l)},parse:function(l){s(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var u,d=l.charCodeAt(0),f=d===47;f?(c.root="/",u=1):u=0;for(var h=-1,m=0,g=-1,_=!0,y=l.length-1,E=0;y>=u;--y)if((d=l.charCodeAt(y))!==47)g===-1&&(_=!1,g=y+1),d===46?h===-1?h=y:E!==1&&(E=1):h!==-1&&(E=-1);else if(!_){m=y+1;break}return h===-1||g===-1||E===0||E===1&&h===g-1&&h===m+1?g!==-1&&(c.base=c.name=m===0&&f?l.slice(1,g):l.slice(m,g)):(m===0&&f?(c.name=l.slice(1,h),c.base=l.slice(1,g)):(c.name=l.slice(m,h),c.base=l.slice(m,g)),c.ext=l.slice(h,g)),m>0?c.dir=l.slice(0,m-1):f&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function t(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return n[i](a,a.exports,t),a.exports}t.d=(i,s)=>{for(var a in s)t.o(s,a)&&!t.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},t.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),t.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;t.r(r),t.d(r,{URI:()=>f,Utils:()=>be}),typeof wr=="object"?i=wr.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(A,T){if(!A.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${A.authority}", path: "${A.path}", query: "${A.query}", fragment: "${A.fragment}"}`);if(A.scheme&&!s.test(A.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(A.path){if(A.authority){if(!a.test(A.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(A.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",u="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{constructor(T,R,N,L,O,w=!1){Je(this,"scheme");Je(this,"authority");Je(this,"path");Je(this,"query");Je(this,"fragment");typeof T=="object"?(this.scheme=T.scheme||c,this.authority=T.authority||c,this.path=T.path||c,this.query=T.query||c,this.fragment=T.fragment||c):(this.scheme=function(ye,z){return ye||z?ye:"file"}(T,w),this.authority=R||c,this.path=function(ye,z){switch(ye){case"https":case"http":case"file":z?z[0]!==u&&(z=u+z):z=u}return z}(this.scheme,N||c),this.query=L||c,this.fragment=O||c,l(this,w))}static isUri(T){return T instanceof f||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}get fsPath(){return E(this)}with(T){if(!T)return this;let{scheme:R,authority:N,path:L,query:O,fragment:w}=T;return R===void 0?R=this.scheme:R===null&&(R=c),N===void 0?N=this.authority:N===null&&(N=c),L===void 0?L=this.path:L===null&&(L=c),O===void 0?O=this.query:O===null&&(O=c),w===void 0?w=this.fragment:w===null&&(w=c),R===this.scheme&&N===this.authority&&L===this.path&&O===this.query&&w===this.fragment?this:new m(R,N,L,O,w)}static parse(T,R=!1){const N=d.exec(T);return N?new m(N[2]||c,ne(N[4]||c),ne(N[5]||c),ne(N[7]||c),ne(N[9]||c),R):new m(c,c,c,c,c)}static file(T){let R=c;if(i&&(T=T.replace(/\\/g,u)),T[0]===u&&T[1]===u){const N=T.indexOf(u,2);N===-1?(R=T.substring(2),T=u):(R=T.substring(2,N),T=T.substring(N)||u)}return new m("file",R,T,c,c)}static from(T){const R=new m(T.scheme,T.authority,T.path,T.query,T.fragment);return l(R,!0),R}toString(T=!1){return v(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof f)return T;{const R=new m(T);return R._formatted=T.external,R._fsPath=T._sep===h?T.fsPath:null,R}}return T}}const h=i?1:void 0;class m extends f{constructor(){super(...arguments);Je(this,"_formatted",null);Je(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=E(this)),this._fsPath}toString(R=!1){return R?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=h),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function _(A,T,R){let N,L=-1;for(let O=0;O=97&&w<=122||w>=65&&w<=90||w>=48&&w<=57||w===45||w===46||w===95||w===126||T&&w===47||R&&w===91||R&&w===93||R&&w===58)L!==-1&&(N+=encodeURIComponent(A.substring(L,O)),L=-1),N!==void 0&&(N+=A.charAt(O));else{N===void 0&&(N=A.substr(0,O));const ye=g[w];ye!==void 0?(L!==-1&&(N+=encodeURIComponent(A.substring(L,O)),L=-1),N+=ye):L===-1&&(L=O)}}return L!==-1&&(N+=encodeURIComponent(A.substring(L))),N!==void 0?N:A}function y(A){let T;for(let R=0;R1&&A.scheme==="file"?`//${A.authority}${A.path}`:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?A.path[1].toLowerCase()+A.path.substr(2):A.path,i&&(R=R.replace(/\//g,"\\")),R}function v(A,T){const R=T?y:_;let N="",{scheme:L,authority:O,path:w,query:ye,fragment:z}=A;if(L&&(N+=L,N+=":"),(O||L==="file")&&(N+=u,N+=u),O){let B=O.indexOf("@");if(B!==-1){const at=O.substr(0,B);O=O.substr(B+1),B=at.lastIndexOf(":"),B===-1?N+=R(at,!1,!1):(N+=R(at.substr(0,B),!1,!1),N+=":",N+=R(at.substr(B+1),!1,!0)),N+="@"}O=O.toLowerCase(),B=O.lastIndexOf(":"),B===-1?N+=R(O,!1,!0):(N+=R(O.substr(0,B),!1,!0),N+=O.substr(B))}if(w){if(w.length>=3&&w.charCodeAt(0)===47&&w.charCodeAt(2)===58){const B=w.charCodeAt(1);B>=65&&B<=90&&(w=`/${String.fromCharCode(B+32)}:${w.substr(3)}`)}else if(w.length>=2&&w.charCodeAt(1)===58){const B=w.charCodeAt(0);B>=65&&B<=90&&(w=`${String.fromCharCode(B+32)}:${w.substr(2)}`)}N+=R(w,!0,!1)}return ye&&(N+="?",N+=R(ye,!1,!1)),z&&(N+="#",N+=T?z:_(z,!1,!1)),N}function I(A){try{return decodeURIComponent(A)}catch{return A.length>3?A.substr(0,3)+I(A.substr(3)):A}}const j=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ne(A){return A.match(j)?A.replace(j,T=>I(T)):A}var Ce=t(470);const ge=Ce.posix||Ce,De="/";var be;(function(A){A.joinPath=function(T,...R){return T.with({path:ge.join(T.path,...R)})},A.resolvePath=function(T,...R){let N=T.path,L=!1;N[0]!==De&&(N=De+N,L=!0);let O=ge.resolve(N,...R);return L&&O[0]===De&&!T.authority&&(O=O.substring(1)),T.with({path:O})},A.dirname=function(T){if(T.path.length===0||T.path===De)return T;let R=ge.dirname(T.path);return R.length===1&&R.charCodeAt(0)===46&&(R=""),T.with({path:R})},A.basename=function(T){return ge.basename(T.path)},A.extname=function(T){return ge.extname(T.path)}})(be||(be={}))})(),pc=r})();const{URI:Wt,Utils:sn}=pc;var rt;(function(n){n.basename=sn.basename,n.dirname=sn.dirname,n.extname=sn.extname,n.joinPath=sn.joinPath,n.resolvePath=sn.resolvePath;function e(r,i){return(r==null?void 0:r.toString())===(i==null?void 0:i.toString())}n.equals=e;function t(r,i){const s=typeof r=="string"?r:r.path,a=typeof i=="string"?i:i.path,o=s.split("/").filter(f=>f.length>0),l=a.split("/").filter(f=>f.length>0);let c=0;for(;ci??(i=mi.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}}class om{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return Q(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,r.precomputedScopes=void 0,r.references=[],r.diagnostics=void 0),r}deleteDocument(e){const t=e.toString(),r=this.documentMap.get(t);return r&&(r.state=U.Changed,this.documentMap.delete(t)),r}}class lm{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=X.None){for(const r of Et(e.parseResult.value))await Le(t),Zo(r).forEach(i=>this.doLink(i,e))}doLink(e,t){const r=e.reference;if(r._ref===void 0)try{const i=this.getCandidate(e);if(kn(i))r._ref=i;else if(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)){const s=this.loadAstNode(i);r._ref=s??this.createLinkingError(e,i)}}catch(i){r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': ${i}`})}t.references.push(r)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const r=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return r??this.createLinkingError(e)}buildReference(e,t,r,i){const s=this,a={$refNode:r,$refText:i,get ref(){var o;if(ae(this._ref))return this._ref;if(Nu(this._nodeDescription)){const l=s.loadAstNode(this._nodeDescription);this._ref=l??s.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){const l=s.getLinkedNode({reference:a,container:e,property:t});if(l.error&&Ue(e).state=e.end)return s.ref}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Su(e,i)))return r}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(t!=null&&t.$cstNode){const r=this.nameProvider.getNameNode(t);return r??t.$cstNode}}findReferences(e,t){const r=[];if(t.includeDeclaration){const s=this.getReferenceToSelf(e);s&&r.push(s)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(s=>rt.equals(s.sourceUri,t.documentUri))),r.push(...i),Q(r)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const r=Ue(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Ln(t),local:!0}}}}class Wi{constructor(e){if(this.map=new Map,e)for(const[t,r]of e)this.add(t,r)}get size(){return Pr.sum(Q(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const i=r.indexOf(t);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){var t;return(t=this.map.get(e))!==null&&t!==void 0?t:[]}has(e,t){if(t===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Q(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return Q(this.map.keys())}values(){return Q(this.map.values()).flat()}entriesGroupedByKey(){return Q(this.map.entries())}}class Ha{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}}class fm{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=X.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=ki,i=X.None){const s=[];this.exportNode(e,s,t);for(const a of r(e))await Le(i),this.exportNode(a,s,t);return s}exportNode(e,t,r){const i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async computeLocalScopes(e,t=X.None){const r=e.parseResult.value,i=new Wi;for(const s of pn(r))await Le(t),this.processNode(s,e,i);return i}processNode(e,t,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,t))}}}class Va{constructor(e,t,r){var i;this.elements=e,this.outerScope=t,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?this.elements.find(r=>r.name.toLowerCase()===e.toLowerCase()):this.elements.find(r=>r.name===e);if(t)return t;if(this.outerScope)return this.outerScope.getElement(e)}}class hm{constructor(e,t,r){var i;this.elements=new Map,this.caseInsensitive=(i=r==null?void 0:r.caseInsensitive)!==null&&i!==void 0?i:!1;for(const s of e){const a=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(a,s)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=Q(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class mc{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class pm extends mc{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class mm extends mc{constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();const i=this.cacheForContext(e);if(i.has(t))return i.get(t);if(r){const s=r();return i.set(t,s),s}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}}class gm extends pm{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class ym{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new gm(e.shared)}getScope(e){const t=[],r=this.reflection.getReferenceType(e),i=Ue(e.container).precomputedScopes;if(i){let a=e.container;do{const o=i.get(a);o.length>0&&t.push(Q(o).filter(l=>this.reflection.isSubtype(l.type,r))),a=a.$container}while(a)}let s=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)s=this.createScope(t[a],s);return s}createScope(e,t,r){return new Va(Q(e),t,r)}createScopeForNodes(e,t,r){const i=Q(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new Va(i,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new hm(this.indexManager.allElements(e)))}}function Tm(n){return typeof n.$comment=="string"}function Wa(n){return typeof n=="object"&&!!n&&("$ref"in n||"$error"in n)}class vm{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const r=t==null?void 0:t.replacer,i=(a,o)=>this.replacer(a,o,t),s=r?(a,o)=>r(a,o,i):i;try{return this.currentDocument=Ue(e),JSON.stringify(e,s,t==null?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const r=JSON.parse(e);return this.linkNode(r,r,t),r}replacer(e,t,{refText:r,sourceText:i,textRegions:s,comments:a,uriConverter:o}){var l,c,u,d;if(!this.ignoreProperties.has(e))if(Ge(t)){const f=t.ref,h=r?t.$refText:void 0;if(f){const m=Ue(f);let g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,t):g=m.uri.toString());const _=this.astNodeLocator.getAstNodePath(f);return{$ref:`${g}#${_}`,$refText:h}}else return{$error:(c=(l=t.error)===null||l===void 0?void 0:l.message)!==null&&c!==void 0?c:"Could not resolve reference",$refText:h}}else if(ae(t)){let f;if(s&&(f=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),(!e||t.$document)&&(f!=null&&f.$textRegion)&&(f.$textRegion.documentURI=(u=this.currentDocument)===null||u===void 0?void 0:u.uri.toString())),i&&!e&&(f??(f=Object.assign({},t)),f.$sourceText=(d=t.$cstNode)===null||d===void 0?void 0:d.text),a){f??(f=Object.assign({},t));const h=this.commentProvider.getComment(t);h&&(f.$comment=h.replace(/\r/g,""))}return f??t}else return t}addAstNodeRegionWithAssignmentsTo(e){const t=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=t(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith("$")).forEach(s=>{const a=bd(e.$cstNode,s).map(t);a.length!==0&&(i[s]=a)}),e}}linkNode(e,t,r,i,s,a){for(const[l,c]of Object.entries(e))if(Array.isArray(c))for(let u=0;u{try{await e.call(t,r,i,s)}catch(a){if(Hi(a))throw a;console.error("An error occurred during validation:",a);const o=a instanceof Error?a.message:String(a);a instanceof Error&&a.stack&&console.error(a.stack),i("error","An error occurred during validation: "+o,{node:r})}}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Q(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(i=>t.includes(i.category))),r.map(i=>i.check)}}class Rm{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=X.None){const i=e.parseResult,s=[];if(await Le(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(i,s,t),t.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LexingError})||(this.processParsingErrors(i,s,t),t.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.ParsingError}))||(this.processLinkingErrors(e,s,t),t.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Qe.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,t,r))}catch(a){if(Hi(a))throw a;console.error("An error occurred during validation:",a)}return await Le(r),s}processLexingErrors(e,t,r){for(const i of e.lexerErrors){const s={severity:Or("error"),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Ka(Qe.LexingError),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const a=i.previousToken;if(isNaN(a.startOffset)){const o={line:0,character:0};s={start:o,end:o}}else{const o={line:a.endLine-1,character:a.endColumn};s={start:o,end:o}}}}else s=Dr(i.token);if(s){const a={severity:Or("error"),range:s,message:i.message,data:Ka(Qe.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(const i of e.references){const s=i.error;if(s){const a={node:s.container,property:s.property,index:s.index,data:{code:Qe.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};t.push(this.toDiagnostic("error",s.message,a))}}}async validateAst(e,t,r=X.None){const i=[],s=(a,o,l)=>{i.push(this.toDiagnostic(a,o,l))};return await Promise.all(Et(e).map(async a=>{await Le(r);const o=this.validationRegistry.getChecks(a.$type,t.categories);for(const l of o)await l(a,s,r)})),i}toDiagnostic(e,t,r){return{message:t,range:Am(r),severity:Or(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function Am(n){if(n.range)return n.range;let e;return typeof n.property=="string"?e=il(n.node.$cstNode,n.property,n.index):typeof n.keyword=="string"&&(e=Nd(n.node.$cstNode,n.keyword,n.index)),e??(e=n.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Or(n){switch(n){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+n)}}var Qe;(function(n){n.LexingError="lexing-error",n.ParsingError="parsing-error",n.LinkingError="linking-error"})(Qe||(Qe={}));class bm{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r=Ue(e)){t??(t=this.nameProvider.getName(e));const i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let s;const a=()=>{var o;return s??(s=Ln((o=this.nameProvider.getNameNode(e))!==null&&o!==void 0?o:e.$cstNode))};return{node:e,name:t,get nameSegment(){return a()},selectionSegment:Ln(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}}class Nm{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=X.None){const r=[],i=e.parseResult.value;for(const s of Et(i))await Le(t),Zo(s).filter(a=>!kn(a)).forEach(a=>{const o=this.createDescription(a);o&&r.push(o)});return r}createDescription(e){const t=e.reference.$nodeDescription,r=e.reference.$refNode;if(!t||!r)return;const i=Ue(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:Ln(r),local:rt.equals(t.documentUri,i)}}}class km{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const a=s.indexOf(this.indexSeparator);if(a>0){const o=s.substring(0,a),l=parseInt(s.substring(a+1)),c=i[o];return c==null?void 0:c[l]}return i[s]},e)}}class Im{constructor(e){this._ready=new Vi,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,r;this.workspaceConfig=(r=(t=e.capabilities.workspace)===null||t===void 0?void 0:t.configuration)!==null&&r!==void 0?r:!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(t=>{this.updateSectionConfiguration(t,e.settings[t])})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}}var er;(function(n){function e(t){return{dispose:async()=>await t()}}n.create=e})(er||(er={}));class Sm{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Wi,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=U.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=X.None){var i,s;for(const a of e){const o=a.uri.toString();if(a.state===U.Validated){if(typeof t.validation=="boolean"&&t.validation)a.state=U.IndexedReferences,a.diagnostics=void 0,this.buildState.delete(o);else if(typeof t.validation=="object"){const l=this.buildState.get(o),c=(i=l==null?void 0:l.result)===null||i===void 0?void 0:i.validationChecks;if(c){const d=((s=t.validation.categories)!==null&&s!==void 0?s:Zn.all).filter(f=>!c.includes(f));d.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:d})},result:l.result}),a.state=U.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=U.Changed,await this.emitUpdate(e.map(a=>a.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=X.None){this.currentState=U.Changed;for(const a of t)this.langiumDocuments.deleteDocument(a),this.buildState.delete(a.toString()),this.indexManager.remove(a);for(const a of e){if(!this.langiumDocuments.invalidateDocument(a)){const l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a);l.state=U.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(a.toString())}const i=Q(e).concat(t).map(a=>a.toString()).toSet();this.langiumDocuments.all.filter(a=>!i.has(a.uri.toString())&&this.shouldRelink(a,i)).forEach(a=>{this.serviceRegistry.getServices(a.uri).references.Linker.unlink(a),a.state=Math.min(a.state,U.ComputedScopes),a.diagnostics=void 0}),await this.emitUpdate(e,t),await Le(r);const s=this.langiumDocuments.all.filter(a=>{var o;return a.stater(e,t)))}shouldRelink(e,t){return e.references.some(r=>r.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),er.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,U.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,U.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,U.ComputedScopes,r,async s=>{const a=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await a.computeLocalScopes(s,r)}),await this.runCancelable(e,U.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,U.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,U.Validated,r,s=>this.validate(s,r));for(const s of e){const a=this.buildState.get(s.uri.toString());a&&(a.completed=!0)}}prepareBuild(e,t){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:t,result:s==null?void 0:s.result})}}async runCancelable(e,t,r,i){const s=e.filter(a=>a.state{this.buildPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;if(t&&"path"in t?i=t:r=t,r??(r=X.None),i){const s=this.langiumDocuments.getDocument(i);if(s&&s.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):r.isCancellationRequested?Promise.reject(Qn):new Promise((s,a)=>{const o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){const c=this.langiumDocuments.getDocument(i);s(c==null?void 0:c.uri)}else s(void 0)}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),a(Qn)})})}async notifyBuildPhase(e,t,r){if(e.length===0)return;const i=this.buildPhaseListeners.get(t);for(const s of i)await Le(r),await s(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r,i;const s=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e).validation,o=typeof a=="object"?a:void 0,l=await s.validateDocument(e,o,t);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;const c=this.buildState.get(e.uri.toString());if(c){(r=c.result)!==null&&r!==void 0||(c.result={});const u=(i=o==null?void 0:o.categories)!==null&&i!==void 0?i:Zn.all;c.result.validationChecks?c.result.validationChecks.push(...u):c.result.validationChecks=[...u]}}getBuildOptions(e){var t,r;return(r=(t=this.buildState.get(e.uri.toString()))===null||t===void 0?void 0:t.options)!==null&&r!==void 0?r:{}}}class xm{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new mm,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const r=Ue(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{rt.equals(a.targetUri,r)&&a.targetPath===t&&i.push(a)})}),Q(i)}allElements(e,t){let r=Q(this.symbolIndex.keys());return t&&(r=r.filter(i=>!t||t.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,t){var r;return t?this.symbolByTypeIndex.get(e,t,()=>{var s;return((s=this.symbolIndex.get(e))!==null&&s!==void 0?s:[]).filter(o=>this.astReflection.isSubtype(o.type,t))}):(r=this.symbolIndex.get(e))!==null&&r!==void 0?r:[]}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,t=X.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,t){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&t.has(i.targetUri.toString())):!1}}class Cm{constructor(e){this.initialBuildOptions={},this._ready=new Vi,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=(t=e.workspaceFolders)!==null&&t!==void 0?t:void 0}initialized(e){return this.mutex.write(t=>{var r;return this.initializeWorkspace((r=this.folders)!==null&&r!==void 0?r:[],t)})}async initializeWorkspace(e,t=X.None){const r=await this.performStartup(e);await Le(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),r=[],i=s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,t,i))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Wt.parse(e.uri)}async traverseFolder(e,t,r,i){const s=await this.fileSystemProvider.readDirectory(t);await Promise.all(s.map(async a=>{if(this.includeEntry(e,a,r)){if(a.isDirectory)await this.traverseFolder(e,a.uri,r,i);else if(a.isFile){const o=await this.langiumDocuments.getOrCreateDocument(a.uri);i(o)}}}))}includeEntry(e,t,r){const i=rt.basename(t.uri);if(i.startsWith("."))return!1;if(t.isDirectory)return i!=="node_modules"&&i!=="out";if(t.isFile){const s=rt.extname(t.uri);return r.includes(s)}return!1}}class wm{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const r=za(t)?Object.values(t):t;this.chevrotainLexer=new de(r,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:(t=r.groups.hidden)!==null&&t!==void 0?t:[]}}toTokenTypeDictionary(e){if(za(e))return e;const t=gc(e)?Object.values(e.modes).flat():e,r={};return t.forEach(i=>r[i.name]=i),r}}function Om(n){return Array.isArray(n)&&(n.length===0||"name"in n[0])}function gc(n){return n&&"modes"in n&&"defaultMode"in n}function za(n){return!Om(n)&&!gc(n)}function Lm(n,e,t){let r,i;typeof n=="string"?(i=e,r=t):(i=n.range.start,r=e),i||(i=P.create(0,0));const s=yc(n),a=Ki(r),o=Mm({lines:s,position:i,options:a});return Fm({index:0,tokens:o,position:i})}function $m(n,e){const t=Ki(e),r=yc(n);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=t.start,o=t.end;return!!(a!=null&&a.exec(i))&&!!(o!=null&&o.exec(s))}function yc(n){let e="";return typeof n=="string"?e=n:e=n.text,e.split(hd)}const qa=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Pm=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Mm(n){var e,t,r;const i=[];let s=n.position.line,a=n.position.character;for(let o=0;o=u.length){if(i.length>0){const h=P.create(s,a);i.push({type:"break",content:"",range:$.create(h,h)})}}else{qa.lastIndex=d;const h=qa.exec(u);if(h){const m=h[0],g=h[1],_=P.create(s,a+d),y=P.create(s,a+d+m.length);i.push({type:"tag",content:g,range:$.create(_,y)}),d+=m.length,d=yi(u,d)}if(d0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function Dm(n,e,t,r){const i=[];if(n.length===0){const s=P.create(t,r),a=P.create(t,r+e.length);i.push({type:"text",content:e,range:$.create(s,a)})}else{let s=0;for(const o of n){const l=o.index,c=e.substring(s,l);c.length>0&&i.push({type:"text",content:e.substring(s,l),range:$.create(P.create(t,s+r),P.create(t,l+r))});let u=c.length+1;const d=o[1];if(i.push({type:"inline-tag",content:d,range:$.create(P.create(t,s+u+r),P.create(t,s+u+d.length+r))}),u+=d.length,o.length===4){u+=o[2].length;const f=o[3];i.push({type:"text",content:f,range:$.create(P.create(t,s+u+r),P.create(t,s+u+f.length+r))})}else i.push({type:"text",content:"",range:$.create(P.create(t,s+u+r),P.create(t,s+u+r))});s=l+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:$.create(P.create(t,s+r),P.create(t,s+r+a.length))})}return i}const jm=/\S/,Gm=/\s*$/;function yi(n,e){const t=n.substring(e).match(jm);return t?e+t.index:n.length}function Um(n){const e=n.match(Gm);if(e&&typeof e.index=="number")return e.index}function Fm(n){var e,t,r,i;const s=P.create(n.position.line,n.position.character);if(n.tokens.length===0)return new Ya([],$.create(s,s));const a=[];for(;n.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(e.length===0)e=t.toString();else{const r=t.toString();e+=Xa(e)+r}return e.trim()}toMarkdown(e){let t="";for(const r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{const i=r.toMarkdown(e);t+=Xa(t)+i}return t.trim()}}class $r{constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} ${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,r;return(r=(t=e==null?void 0:e.renderTag)===null||t===void 0?void 0:t.call(e,this))!==null&&r!==void 0?r:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const s=Wm(this.name,t,e??{});if(typeof s=="string")return s}let r="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?r="*":(e==null?void 0:e.tag)==="bold"?r="**":(e==null?void 0:e.tag)==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} — ${t}`:this.content.inlines.length>1&&(i=`${i} -${t}`),this.inline?`{${i}}`:i}}function Wm(n,e,t){var r,i;if(n==="linkplain"||n==="linkcode"||n==="link"){const s=e.indexOf(" ");let a=e;if(s>0){const l=gi(e,s);a=e.substring(l),e=e.substring(0,s)}return(n==="linkcode"||n==="link"&&t.link==="code")&&(a=`\`${a}\``),(i=(r=t.renderLink)===null||r===void 0?void 0:r.call(t,e,a))!==null&&i!==void 0?i:Km(e,a)}}function Km(n,e){try{return Wt.parse(n,!0),`[${e}](${n})`}catch{return n}}class yi{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` +${t}`),this.inline?`{${i}}`:i}}function Wm(n,e,t){var r,i;if(n==="linkplain"||n==="linkcode"||n==="link"){const s=e.indexOf(" ");let a=e;if(s>0){const l=yi(e,s);a=e.substring(l),e=e.substring(0,s)}return(n==="linkcode"||n==="link"&&t.link==="code")&&(a=`\`${a}\``),(i=(r=t.renderLink)===null||r===void 0?void 0:r.call(t,e,a))!==null&&i!==void 0?i:Km(e,a)}}function Km(n,e){try{return Wt.parse(n,!0),`[${e}](${n})`}catch{return n}}class Ti{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` `)}return e}toMarkdown(e){let t="";for(let r=0;ri.range.start.line&&(t+=` -`)}return t}}class Rc{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function Ya(n){return n.endsWith(` +`)}return t}}class Ec{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function Xa(n){return n.endsWith(` `)?` `:` -`}class zm{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&$m(t))return Lm(t).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,t,r){var i;const s=(i=this.findNameInPrecomputedScopes(e,t))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,t);if(s&&s.nameSegment){const a=s.nameSegment.range.start.line+1,o=s.nameSegment.range.start.character+1,l=s.documentUri.with({fragment:`L${a},${o}`});return`[${r}](${l.toString()})`}else return}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const i=Ue(e).precomputedScopes;if(!i)return;let s=e;do{const o=i.get(s).find(l=>l.name===t);if(o)return o;s=s.$container}while(s)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(i=>i.name===t)}}class qm{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return Tm(e)?e.$comment:(t=Ou(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||t===void 0?void 0:t.text}}class Ym{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Xm{constructor(){this.previousTokenSource=new fi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new fi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r){const i=new Hi,s={action:t,deferred:i,cancellationToken:r??X.None};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:i})=>{try{const s=await Promise.resolve().then(()=>t(i));r.resolve(s)}catch(s){Bi(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Jm{constructor(e){this.grammarElementIdMap=new Ba,this.tokenTypeIdMap=new Ba,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(t=>Object.assign({},t)),parserErrors:e.parserErrors.map(t=>Object.assign({},t)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,r=new Map;for(const i of Rt(e))t.set(i,{});if(e.$cstNode)for(const i of Mr(e.$cstNode))r.set(i,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.dehydrateAstNode(o,t)):Ge(o)?a.push(this.dehydrateReference(o,t)):a.push(o)}else ae(s)?r[i]=this.dehydrateAstNode(s,t):Ge(s)?r[i]=this.dehydrateReference(s,t):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return go(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Gt(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,t)):mo(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const s of Rt(e))t.set(s,{});let i;if(e.$cstNode)for(const s of Mr(e.$cstNode)){let a;"fullText"in s?(a=new Zl(s.fullText),i=a):"content"in s?a=new Ui:"tokenType"in s&&(a=this.hydrateCstLeafNode(s)),a&&(r.set(s,a),a.root=i)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.setParent(this.hydrateAstNode(o,t),r)):Ge(o)?a.push(this.hydrateReference(o,r,i,t)):a.push(o)}else ae(s)?r[i]=this.setParent(this.hydrateAstNode(s,t),r):Ge(s)?r[i]=this.hydrateReference(s,r,i,t):s!==void 0&&(r[i]=s);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){const i=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Gt(i))for(const s of e.content){const a=this.hydrateCstNode(s,t,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,i=e.length,s=e.startLine,a=e.startColumn,o=e.endLine,l=e.endColumn,c=e.hidden;return new li(r,i,{start:{line:s,character:a},end:{line:o,character:l}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const t of Rt(this.grammar))Pu(t)&&this.grammarElementIdMap.set(t,e++)}}function Jt(n){return{documentation:{CommentProvider:e=>new qm(e),DocumentationProvider:e=>new zm(e)},parser:{AsyncParser:e=>new Ym(e),GrammarConfig:e=>Pd(e),LangiumParser:e=>Vp(e),CompletionParser:e=>Hp(e),ValueConverter:()=>new lc,TokenBuilder:()=>new oc,Lexer:e=>new wm(e),ParserErrorMessageProvider:()=>new nc},workspace:{AstNodeLocator:()=>new km,AstNodeDescriptionProvider:e=>new bm(e),ReferenceDescriptionProvider:e=>new Nm(e)},references:{Linker:e=>new lm(e),NameProvider:()=>new um,ScopeProvider:e=>new ym(e),ScopeComputation:e=>new fm(e),References:e=>new dm(e)},serializer:{Hydrator:e=>new Jm(e),JsonSerializer:e=>new _m(e)},validation:{DocumentValidator:e=>new Am(e),ValidationRegistry:e=>new Rm(e)},shared:()=>n.shared}}function Qt(n){return{ServiceRegistry:()=>new Em,workspace:{LangiumDocuments:e=>new om(e),LangiumDocumentFactory:e=>new am(e),DocumentBuilder:e=>new Sm(e),IndexManager:e=>new xm(e),WorkspaceManager:e=>new Cm(e),FileSystemProvider:e=>n.fileSystemProvider(e),WorkspaceLock:()=>new Xm,ConfigurationProvider:e=>new Im(e)}}}var Xa;(function(n){n.merge=(e,t)=>tr(tr({},e),t)})(Xa||(Xa={}));function xe(n,e,t,r,i,s,a,o,l){const c=[n,e,t,r,i,s,a,o,l].reduce(tr,{});return Ac(c)}const Ja=Symbol("isProxy");function Ac(n,e){const t=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>Za(r,i,n,e||t),getOwnPropertyDescriptor:(r,i)=>(Za(r,i,n,e||t),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in n,ownKeys:()=>[...Reflect.ownKeys(n),Ja]});return t[Ja]=!0,t}const Qa=Symbol();function Za(n,e,t,r){if(e in n){if(n[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:n[e]});if(n[e]===Qa)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return n[e]}else if(e in t){const i=t[e];n[e]=Qa;try{n[e]=typeof i=="function"?i(r):Ac(i,r)}catch(s){throw n[e]=s instanceof Error?s:void 0,s}return n[e]}else return}function tr(n,e){if(e){for(const[t,r]of Object.entries(e))if(r!==void 0){const i=n[t];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?n[t]=tr(i,r):n[t]=r}}return n}class Qm{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Zt={fileSystemProvider:()=>new Qm},Zm={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},eg={AstReflection:()=>new Jo};function tg(){const n=xe(Qt(Zt),eg),e=xe(Jt({shared:n}),Zm);return n.ServiceRegistry.register(e),e}function En(n){var e;const t=tg(),r=t.serializer.JsonSerializer.deserialize(n);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Wt.parse(`memory://${(e=r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var ng=Object.defineProperty,k=(n,e)=>ng(n,"name",{value:e,configurable:!0}),rg="Statement",ig="Architecture";function sg(n){return Me.isInstance(n,ig)}k(sg,"isArchitecture");var vc="Branch";function ag(n){return Me.isInstance(n,vc)}k(ag,"isBranch");var og="Checkout",lg="CherryPicking",bc="Commit";function cg(n){return Me.isInstance(n,bc)}k(cg,"isCommit");var ug="Common";function dg(n){return Me.isInstance(n,ug)}k(dg,"isCommon");var Nc="GitGraph";function fg(n){return Me.isInstance(n,Nc)}k(fg,"isGitGraph");var hg="Info";function pg(n){return Me.isInstance(n,hg)}k(pg,"isInfo");var kc="Merge";function mg(n){return Me.isInstance(n,kc)}k(mg,"isMerge");var gg="Packet";function yg(n){return Me.isInstance(n,gg)}k(yg,"isPacket");var Tg="PacketBlock";function _g(n){return Me.isInstance(n,Tg)}k(_g,"isPacketBlock");var Eg="Pie";function Rg(n){return Me.isInstance(n,Eg)}k(Rg,"isPie");var Ag="PieSection";function vg(n){return Me.isInstance(n,Ag)}k(vg,"isPieSection");var bg="Direction",vt,Ic=(vt=class extends po{getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case vc:case og:case lg:case bc:case kc:return this.isSubtype(rg,t);case bg:return this.isSubtype(Nc,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},k(vt,"MermaidAstReflection"),vt),Me=new Ic,eo,Ng=k(()=>eo??(eo=En('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),to,kg=k(()=>to??(to=En(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),no,Ig=k(()=>no??(no=En('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),ro,Sg=k(()=>ro??(ro=En('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),io,xg=k(()=>io??(io=En(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),Cg={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},wg={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Og={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Lg={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},$g={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Rn={AstReflection:k(()=>new Ic,"AstReflection")},Pg={Grammar:k(()=>Ng(),"Grammar"),LanguageMetaData:k(()=>Cg,"LanguageMetaData"),parser:{}},Mg={Grammar:k(()=>kg(),"Grammar"),LanguageMetaData:k(()=>wg,"LanguageMetaData"),parser:{}},Dg={Grammar:k(()=>Ig(),"Grammar"),LanguageMetaData:k(()=>Og,"LanguageMetaData"),parser:{}},jg={Grammar:k(()=>Sg(),"Grammar"),LanguageMetaData:k(()=>Lg,"LanguageMetaData"),parser:{}},Gg={Grammar:k(()=>xg(),"Grammar"),LanguageMetaData:k(()=>$g,"LanguageMetaData"),parser:{}},Ug=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Fg=/accTitle[\t ]*:([^\n\r]*)/,Bg=/title([\t ][^\n\r]*|)/,Hg={ACC_DESCR:Ug,ACC_TITLE:Fg,TITLE:Bg},bt,Ki=(bt=class extends lc{runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){const i=Hg[e.name];if(i===void 0)return;const s=i.exec(t);if(s!==null){if(s[1]!==void 0)return s[1].trim().replace(/[\t ]{2,}/gm," ");if(s[2]!==void 0)return s[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` -`)}}},k(bt,"AbstractMermaidValueConverter"),bt),Nt,zi=(Nt=class extends Ki{runCustomConverter(e,t,r){}},k(Nt,"CommonValueConverter"),Nt),kt,en=(kt=class extends oc{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const i=super.buildKeywordTokens(e,t,r);return i.forEach(s=>{this.keywords.has(s.name)&&s.PATTERN!==void 0&&(s.PATTERN=new RegExp(s.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},k(kt,"AbstractMermaidTokenBuilder"),kt),It;It=class extends en{},k(It,"CommonTokenBuilder");var St,Vg=(St=class extends en{constructor(){super(["gitGraph"])}},k(St,"GitGraphTokenBuilder"),St),Sc={parser:{TokenBuilder:k(()=>new Vg,"TokenBuilder"),ValueConverter:k(()=>new zi,"ValueConverter")}};function xc(n=Zt){const e=xe(Qt(n),Rn),t=xe(Jt({shared:e}),Gg,Sc);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}k(xc,"createGitGraphServices");var xt,Wg=(xt=class extends en{constructor(){super(["info","showInfo"])}},k(xt,"InfoTokenBuilder"),xt),Cc={parser:{TokenBuilder:k(()=>new Wg,"TokenBuilder"),ValueConverter:k(()=>new zi,"ValueConverter")}};function wc(n=Zt){const e=xe(Qt(n),Rn),t=xe(Jt({shared:e}),Pg,Cc);return e.ServiceRegistry.register(t),{shared:e,Info:t}}k(wc,"createInfoServices");var Ct,Kg=(Ct=class extends en{constructor(){super(["packet-beta"])}},k(Ct,"PacketTokenBuilder"),Ct),Oc={parser:{TokenBuilder:k(()=>new Kg,"TokenBuilder"),ValueConverter:k(()=>new zi,"ValueConverter")}};function Lc(n=Zt){const e=xe(Qt(n),Rn),t=xe(Jt({shared:e}),Mg,Oc);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}k(Lc,"createPacketServices");var wt,zg=(wt=class extends en{constructor(){super(["pie","showData"])}},k(wt,"PieTokenBuilder"),wt),Ot,qg=(Ot=class extends Ki{runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},k(Ot,"PieValueConverter"),Ot),$c={parser:{TokenBuilder:k(()=>new zg,"TokenBuilder"),ValueConverter:k(()=>new qg,"ValueConverter")}};function Pc(n=Zt){const e=xe(Qt(n),Rn),t=xe(Jt({shared:e}),Dg,$c);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}k(Pc,"createPieServices");var Lt,Yg=(Lt=class extends en{constructor(){super(["architecture"])}},k(Lt,"ArchitectureTokenBuilder"),Lt),$t,Xg=($t=class extends Ki{runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return t.replace(/[[\]]/g,"").trim()}},k($t,"ArchitectureValueConverter"),$t),Mc={parser:{TokenBuilder:k(()=>new Yg,"TokenBuilder"),ValueConverter:k(()=>new Xg,"ValueConverter")}};function Dc(n=Zt){const e=xe(Qt(n),Rn),t=xe(Jt({shared:e}),jg,Mc);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}k(Dc,"createArchitectureServices");var lt={},Jg={info:k(async()=>{const{createInfoServices:n}=await tn(async()=>{const{createInfoServices:t}=await Promise.resolve().then(()=>ey);return{createInfoServices:t}},void 0),e=n().Info.parser.LangiumParser;lt.info=e},"info"),packet:k(async()=>{const{createPacketServices:n}=await tn(async()=>{const{createPacketServices:t}=await Promise.resolve().then(()=>ty);return{createPacketServices:t}},void 0),e=n().Packet.parser.LangiumParser;lt.packet=e},"packet"),pie:k(async()=>{const{createPieServices:n}=await tn(async()=>{const{createPieServices:t}=await Promise.resolve().then(()=>ny);return{createPieServices:t}},void 0),e=n().Pie.parser.LangiumParser;lt.pie=e},"pie"),architecture:k(async()=>{const{createArchitectureServices:n}=await tn(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(()=>ry);return{createArchitectureServices:t}},void 0),e=n().Architecture.parser.LangiumParser;lt.architecture=e},"architecture"),gitGraph:k(async()=>{const{createGitGraphServices:n}=await tn(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(()=>iy);return{createGitGraphServices:t}},void 0),e=n().GitGraph.parser.LangiumParser;lt.gitGraph=e},"gitGraph")};async function Qg(n,e){const t=Jg[n];if(!t)throw new Error(`Unknown diagram type: ${n}`);lt[n]||await t();const i=lt[n].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new Zg(i);return i.value}k(Qg,"parse");var Pt,Zg=(Pt=class extends Error{constructor(e){const t=e.lexerErrors.map(i=>i.message).join(` +`}class zm{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&$m(t))return Lm(t).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,t,r){var i;const s=(i=this.findNameInPrecomputedScopes(e,t))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,t);if(s&&s.nameSegment){const a=s.nameSegment.range.start.line+1,o=s.nameSegment.range.start.character+1,l=s.documentUri.with({fragment:`L${a},${o}`});return`[${r}](${l.toString()})`}else return}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const i=Ue(e).precomputedScopes;if(!i)return;let s=e;do{const o=i.get(s).find(l=>l.name===t);if(o)return o;s=s.$container}while(s)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(i=>i.name===t)}}class qm{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return Tm(e)?e.$comment:(t=Ou(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||t===void 0?void 0:t.text}}class Ym{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Xm{constructor(){this.previousTokenSource=new hi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new hi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r){const i=new Vi,s={action:t,deferred:i,cancellationToken:r??X.None};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:t,deferred:r,cancellationToken:i})=>{try{const s=await Promise.resolve().then(()=>t(i));r.resolve(s)}catch(s){Hi(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Jm{constructor(e){this.grammarElementIdMap=new Ha,this.tokenTypeIdMap=new Ha,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map(t=>Object.assign({},t)),parserErrors:e.parserErrors.map(t=>Object.assign({},t)),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,r=new Map;for(const i of Et(e))t.set(i,{});if(e.$cstNode)for(const i of Mr(e.$cstNode))r.set(i,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.dehydrateAstNode(o,t)):Ge(o)?a.push(this.dehydrateReference(o,t)):a.push(o)}else ae(s)?r[i]=this.dehydrateAstNode(s,t):Ge(s)?r[i]=this.dehydrateReference(s,t):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,t){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){const r=t.cstNodes.get(e);return yo(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Gt(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,t)):go(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){const t=new Map,r=new Map;for(const s of Et(e))t.set(s,{});let i;if(e.$cstNode)for(const s of Mr(e.$cstNode)){let a;"fullText"in s?(a=new ec(s.fullText),i=a):"content"in s?a=new Fi:"tokenType"in s&&(a=this.hydrateCstLeafNode(s)),a&&(r.set(s,a),a.root=i)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){const r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)ae(o)?a.push(this.setParent(this.hydrateAstNode(o,t),r)):Ge(o)?a.push(this.hydrateReference(o,r,i,t)):a.push(o)}else ae(s)?r[i]=this.setParent(this.hydrateAstNode(s,t),r):Ge(s)?r[i]=this.hydrateReference(s,r,i,t):s!==void 0&&(r[i]=s);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){const i=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Gt(i))for(const s of e.content){const a=this.hydrateCstNode(s,t,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),r=e.offset,i=e.length,s=e.startLine,a=e.startColumn,o=e.endLine,l=e.endColumn,c=e.hidden;return new li(r,i,{start:{line:s,character:a},end:{line:o,character:l}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const t of Et(this.grammar))Pu(t)&&this.grammarElementIdMap.set(t,e++)}}function Jt(n){return{documentation:{CommentProvider:e=>new qm(e),DocumentationProvider:e=>new zm(e)},parser:{AsyncParser:e=>new Ym(e),GrammarConfig:e=>Pd(e),LangiumParser:e=>Vp(e),CompletionParser:e=>Hp(e),ValueConverter:()=>new cc,TokenBuilder:()=>new lc,Lexer:e=>new wm(e),ParserErrorMessageProvider:()=>new rc},workspace:{AstNodeLocator:()=>new km,AstNodeDescriptionProvider:e=>new bm(e),ReferenceDescriptionProvider:e=>new Nm(e)},references:{Linker:e=>new lm(e),NameProvider:()=>new um,ScopeProvider:e=>new ym(e),ScopeComputation:e=>new fm(e),References:e=>new dm(e)},serializer:{Hydrator:e=>new Jm(e),JsonSerializer:e=>new vm(e)},validation:{DocumentValidator:e=>new Rm(e),ValidationRegistry:e=>new Em(e)},shared:()=>n.shared}}function Qt(n){return{ServiceRegistry:()=>new _m,workspace:{LangiumDocuments:e=>new om(e),LangiumDocumentFactory:e=>new am(e),DocumentBuilder:e=>new Sm(e),IndexManager:e=>new xm(e),WorkspaceManager:e=>new Cm(e),FileSystemProvider:e=>n.fileSystemProvider(e),WorkspaceLock:()=>new Xm,ConfigurationProvider:e=>new Im(e)}}}var Ja;(function(n){n.merge=(e,t)=>tr(tr({},e),t)})(Ja||(Ja={}));function xe(n,e,t,r,i,s,a,o,l){const c=[n,e,t,r,i,s,a,o,l].reduce(tr,{});return Rc(c)}const Qa=Symbol("isProxy");function Rc(n,e){const t=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>eo(r,i,n,e||t),getOwnPropertyDescriptor:(r,i)=>(eo(r,i,n,e||t),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in n,ownKeys:()=>[...Reflect.ownKeys(n),Qa]});return t[Qa]=!0,t}const Za=Symbol();function eo(n,e,t,r){if(e in n){if(n[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:n[e]});if(n[e]===Za)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return n[e]}else if(e in t){const i=t[e];n[e]=Za;try{n[e]=typeof i=="function"?i(r):Rc(i,r)}catch(s){throw n[e]=s instanceof Error?s:void 0,s}return n[e]}else return}function tr(n,e){if(e){for(const[t,r]of Object.entries(e))if(r!==void 0){const i=n[t];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?n[t]=tr(i,r):n[t]=r}}return n}class Qm{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const Zt={fileSystemProvider:()=>new Qm},Zm={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},eg={AstReflection:()=>new Qo};function tg(){const n=xe(Qt(Zt),eg),e=xe(Jt({shared:n}),Zm);return n.ServiceRegistry.register(e),e}function _n(n){var e;const t=tg(),r=t.serializer.JsonSerializer.deserialize(n);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Wt.parse(`memory://${(e=r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var ng=Object.defineProperty,k=(n,e)=>ng(n,"name",{value:e,configurable:!0}),rg="Statement",ig="Architecture";function sg(n){return Me.isInstance(n,ig)}k(sg,"isArchitecture");var Ac="Branch";function ag(n){return Me.isInstance(n,Ac)}k(ag,"isBranch");var og="Checkout",lg="CherryPicking",bc="Commit";function cg(n){return Me.isInstance(n,bc)}k(cg,"isCommit");var ug="Common";function dg(n){return Me.isInstance(n,ug)}k(dg,"isCommon");var Nc="GitGraph";function fg(n){return Me.isInstance(n,Nc)}k(fg,"isGitGraph");var hg="Info";function pg(n){return Me.isInstance(n,hg)}k(pg,"isInfo");var kc="Merge";function mg(n){return Me.isInstance(n,kc)}k(mg,"isMerge");var gg="Packet";function yg(n){return Me.isInstance(n,gg)}k(yg,"isPacket");var Tg="PacketBlock";function vg(n){return Me.isInstance(n,Tg)}k(vg,"isPacketBlock");var _g="Pie";function Eg(n){return Me.isInstance(n,_g)}k(Eg,"isPie");var Rg="PieSection";function Ag(n){return Me.isInstance(n,Rg)}k(Ag,"isPieSection");var bg="Direction",At,Ic=(At=class extends mo{getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case Ac:case og:case lg:case bc:case kc:return this.isSubtype(rg,t);case bg:return this.isSubtype(Nc,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},k(At,"MermaidAstReflection"),At),Me=new Ic,to,Ng=k(()=>to??(to=_n('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"InfoGrammar"),no,kg=k(()=>no??(no=_n(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),ro,Ig=k(()=>ro??(ro=_n('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"PieGrammar"),io,Sg=k(()=>io??(io=_n('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}')),"ArchitectureGrammar"),so,xg=k(()=>so??(so=_n(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),Cg={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},wg={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Og={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},Lg={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},$g={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},En={AstReflection:k(()=>new Ic,"AstReflection")},Pg={Grammar:k(()=>Ng(),"Grammar"),LanguageMetaData:k(()=>Cg,"LanguageMetaData"),parser:{}},Mg={Grammar:k(()=>kg(),"Grammar"),LanguageMetaData:k(()=>wg,"LanguageMetaData"),parser:{}},Dg={Grammar:k(()=>Ig(),"Grammar"),LanguageMetaData:k(()=>Og,"LanguageMetaData"),parser:{}},jg={Grammar:k(()=>Sg(),"Grammar"),LanguageMetaData:k(()=>Lg,"LanguageMetaData"),parser:{}},Gg={Grammar:k(()=>xg(),"Grammar"),LanguageMetaData:k(()=>$g,"LanguageMetaData"),parser:{}},Ug=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,Fg=/accTitle[\t ]*:([^\n\r]*)/,Bg=/title([\t ][^\n\r]*|)/,Hg={ACC_DESCR:Ug,ACC_TITLE:Fg,TITLE:Bg},bt,zi=(bt=class extends cc{runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){const i=Hg[e.name];if(i===void 0)return;const s=i.exec(t);if(s!==null){if(s[1]!==void 0)return s[1].trim().replace(/[\t ]{2,}/gm," ");if(s[2]!==void 0)return s[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},k(bt,"AbstractMermaidValueConverter"),bt),Nt,qi=(Nt=class extends zi{runCustomConverter(e,t,r){}},k(Nt,"CommonValueConverter"),Nt),kt,en=(kt=class extends lc{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){const i=super.buildKeywordTokens(e,t,r);return i.forEach(s=>{this.keywords.has(s.name)&&s.PATTERN!==void 0&&(s.PATTERN=new RegExp(s.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},k(kt,"AbstractMermaidTokenBuilder"),kt),It;It=class extends en{},k(It,"CommonTokenBuilder");var St,Vg=(St=class extends en{constructor(){super(["gitGraph"])}},k(St,"GitGraphTokenBuilder"),St),Sc={parser:{TokenBuilder:k(()=>new Vg,"TokenBuilder"),ValueConverter:k(()=>new qi,"ValueConverter")}};function xc(n=Zt){const e=xe(Qt(n),En),t=xe(Jt({shared:e}),Gg,Sc);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}k(xc,"createGitGraphServices");var xt,Wg=(xt=class extends en{constructor(){super(["info","showInfo"])}},k(xt,"InfoTokenBuilder"),xt),Cc={parser:{TokenBuilder:k(()=>new Wg,"TokenBuilder"),ValueConverter:k(()=>new qi,"ValueConverter")}};function wc(n=Zt){const e=xe(Qt(n),En),t=xe(Jt({shared:e}),Pg,Cc);return e.ServiceRegistry.register(t),{shared:e,Info:t}}k(wc,"createInfoServices");var Ct,Kg=(Ct=class extends en{constructor(){super(["packet-beta"])}},k(Ct,"PacketTokenBuilder"),Ct),Oc={parser:{TokenBuilder:k(()=>new Kg,"TokenBuilder"),ValueConverter:k(()=>new qi,"ValueConverter")}};function Lc(n=Zt){const e=xe(Qt(n),En),t=xe(Jt({shared:e}),Mg,Oc);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}k(Lc,"createPacketServices");var wt,zg=(wt=class extends en{constructor(){super(["pie","showData"])}},k(wt,"PieTokenBuilder"),wt),Ot,qg=(Ot=class extends zi{runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},k(Ot,"PieValueConverter"),Ot),$c={parser:{TokenBuilder:k(()=>new zg,"TokenBuilder"),ValueConverter:k(()=>new qg,"ValueConverter")}};function Pc(n=Zt){const e=xe(Qt(n),En),t=xe(Jt({shared:e}),Dg,$c);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}k(Pc,"createPieServices");var Lt,Yg=(Lt=class extends en{constructor(){super(["architecture"])}},k(Lt,"ArchitectureTokenBuilder"),Lt),$t,Xg=($t=class extends zi{runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE")return t.replace(/[[\]]/g,"").trim()}},k($t,"ArchitectureValueConverter"),$t),Mc={parser:{TokenBuilder:k(()=>new Yg,"TokenBuilder"),ValueConverter:k(()=>new Xg,"ValueConverter")}};function Dc(n=Zt){const e=xe(Qt(n),En),t=xe(Jt({shared:e}),jg,Mc);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}k(Dc,"createArchitectureServices");var lt={},Jg={info:k(async()=>{const{createInfoServices:n}=await tn(async()=>{const{createInfoServices:t}=await Promise.resolve().then(()=>ey);return{createInfoServices:t}},void 0),e=n().Info.parser.LangiumParser;lt.info=e},"info"),packet:k(async()=>{const{createPacketServices:n}=await tn(async()=>{const{createPacketServices:t}=await Promise.resolve().then(()=>ty);return{createPacketServices:t}},void 0),e=n().Packet.parser.LangiumParser;lt.packet=e},"packet"),pie:k(async()=>{const{createPieServices:n}=await tn(async()=>{const{createPieServices:t}=await Promise.resolve().then(()=>ny);return{createPieServices:t}},void 0),e=n().Pie.parser.LangiumParser;lt.pie=e},"pie"),architecture:k(async()=>{const{createArchitectureServices:n}=await tn(async()=>{const{createArchitectureServices:t}=await Promise.resolve().then(()=>ry);return{createArchitectureServices:t}},void 0),e=n().Architecture.parser.LangiumParser;lt.architecture=e},"architecture"),gitGraph:k(async()=>{const{createGitGraphServices:n}=await tn(async()=>{const{createGitGraphServices:t}=await Promise.resolve().then(()=>iy);return{createGitGraphServices:t}},void 0),e=n().GitGraph.parser.LangiumParser;lt.gitGraph=e},"gitGraph")};async function Qg(n,e){const t=Jg[n];if(!t)throw new Error(`Unknown diagram type: ${n}`);lt[n]||await t();const i=lt[n].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new Zg(i);return i.value}k(Qg,"parse");var Pt,Zg=(Pt=class extends Error{constructor(e){const t=e.lexerErrors.map(i=>i.message).join(` `),r=e.parserErrors.map(i=>i.message).join(` `);super(`Parsing failed: ${t} ${r}`),this.result=e}},k(Pt,"MermaidParseError"),Pt);const ey=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:Cc,createInfoServices:wc},Symbol.toStringTag,{value:"Module"})),ty=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:Oc,createPacketServices:Lc},Symbol.toStringTag,{value:"Module"})),ny=Object.freeze(Object.defineProperty({__proto__:null,PieModule:$c,createPieServices:Pc},Symbol.toStringTag,{value:"Module"})),ry=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:Mc,createArchitectureServices:Dc},Symbol.toStringTag,{value:"Module"})),iy=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:Sc,createGitGraphServices:xc},Symbol.toStringTag,{value:"Module"}));export{Qg as p}; diff --git a/static/js/md-gitGraphDiagram-NRZ2UAAF-DvDcunZf.js b/static/js/md-gitGraphDiagram-NRZ2UAAF-DvDcunZf.js new file mode 100644 index 000000000..c8791cdd7 --- /dev/null +++ b/static/js/md-gitGraphDiagram-NRZ2UAAF-DvDcunZf.js @@ -0,0 +1,65 @@ +import{p as Z}from"./md-chunk-TMUBEWPD-zEBQnby0.js";import{I as F}from"./md-chunk-KFBOBJHC-bxuwoawJ.js";import{_ as h,n as U,o as rr,s as er,g as tr,a as ar,b as nr,l as w,c as sr,d as or,u as cr,B as ir,v as dr,k as B,C as hr,D as lr,E as $r,F as fr}from"./md-index-B8Nim9kS.js";import{p as gr}from"./md-gitGraph-YCYPL57B-CpuUbWJB.js";import"./md-_baseUniq-DU1ET3rn.js";import"./md-_basePickBy-B78WwQFo.js";import"./md-clone-ByE4h4D7.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},yr=$r.gitGraph,z=h(()=>hr({...yr,...lr().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function S(){return fr({length:7})}h(S,"getID");function N(t,r){const a=Object.create(null);return t.reduce((s,e)=>{const n=r(e);return a[n]||(a[n]=!0,s.push(e)),s},[])}h(N,"uniqBy");var ur=h(function(t){i.records.direction=t},"setDirection"),xr=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){w.error("error while parsing gitGraph options",r.message)}},"setOptions"),pr=h(function(){return i.records.options},"getOptions"),br=h(function(t){let r=t.msg,a=t.id;const s=t.type;let e=t.tags;w.info("commit",r,a,s,e),w.debug("Entering commit:",r,a,s,e);const n=z();a=B.sanitizeText(a,n),r=B.sanitizeText(r,n),e=e==null?void 0:e.map(o=>B.sanitizeText(o,n));const c={id:a||i.records.seq+"-"+S(),message:r,seq:i.records.seq++,type:s??x.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),mr=h(function(t){let r=t.name;const a=t.order;if(r=B.sanitizeText(r,z()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),_(r),w.debug("in createBranch")},"branch"),wr=h(t=>{let r=t.branch,a=t.id;const s=t.type,e=t.tags,n=z();r=B.sanitizeText(r,n),a&&(a=B.sanitizeText(a,n));const c=i.records.branches.get(i.records.currBranch),o=i.records.branches.get(r),$=c?i.records.commits.get(c):void 0,l=o?i.records.commits.get(o):void 0;if($&&l&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},d}if(!i.records.branches.has(r)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${s} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${s} ${e==null?void 0:e.join(" ")}`]},d}const f=o||"",g={id:a||`${i.records.seq}-${S()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:x.MERGE,customType:s,customId:!!a,tags:e??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),vr=h(function(t){let r=t.id,a=t.targetId,s=t.tags,e=t.parent;w.debug("Entering cherryPick:",r,a,s);const n=z();if(r=B.sanitizeText(r,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),e=B.sanitizeText(e,n),!r||!i.records.commits.has(r)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},$}const c=i.records.commits.get(r);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=c.branch;if(c.type===x.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(o===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+S(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${c.id}${c.type===x.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function A(t,r,a){const s=t.indexOf(r);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const r=t.reduce((e,n)=>e.seq>n.seq?e:n,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const s=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&s.push(e);if(w.debug(s.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);A(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);A(t,r,e)}}t=N(t,e=>e.id),D(t)}h(D,"prettyPrintCommitHistory");var Cr=h(function(){w.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Er=h(function(){i.reset(),dr()},"clear"),Br=h(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),kr=h(function(){return i.records.branches},"getBranches"),Lr=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){w.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Tr=h(function(){return i.records.currBranch},"getCurrentBranch"),Mr=h(function(){return i.records.direction},"getDirection"),Rr=h(function(){return i.records.head},"getHead"),X={commitType:x,getConfig:z,setDirection:ur,setOptions:xr,getOptions:pr,commit:br,branch:mr,merge:wr,cherryPick:vr,checkout:_,prettyPrint:Cr,clear:Er,getBranchesAsObjArray:Br,getBranches:kr,getCommits:Lr,getCommitsArray:V,getCurrentBranch:Tr,getDirection:Mr,getHead:Rr,setAccTitle:nr,getAccTitle:ar,getAccDescription:tr,setAccDescription:er,setDiagramTitle:rr,getDiagramTitle:U},Ir=h((t,r)=>{Z(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)qr(a,r)},"populate"),qr=h((t,r)=>{const s={Commit:h(e=>r.commit(Or(e)),"Commit"),Branch:h(e=>r.branch(zr(e)),"Branch"),Merge:h(e=>r.merge(Gr(e)),"Merge"),Checkout:h(e=>r.checkout(Hr(e)),"Checkout"),CherryPicking:h(e=>r.cherryPick(Pr(e)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Or=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),zr=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Hr=h(t=>t.branch,"parseCheckout"),Pr=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Wr={parse:h(async t=>{const r=await gr("gitGraph",t);w.debug(r),Ir(r,X)},"parse")},j=sr(),b=j==null?void 0:j.gitGraph,R=10,I=40,k=4,L=2,O=8,C=new Map,E=new Map,P=30,G=new Map,W=[],M=0,u="LR",Sr=h(()=>{C.clear(),E.clear(),G.clear(),M=0,W=[],u="LR"},"clear"),J=h(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=s.trim(),r.appendChild(e)}),r},"drawText"),Q=h(t=>{let r,a,s;return u==="BT"?(a=h((e,n)=>e<=n,"comparisonFunc"),s=1/0):(a=h((e,n)=>e>=n,"comparisonFunc"),s=0),t.forEach(e=>{var c,o;const n=u==="TB"||u=="BT"?(c=E.get(e))==null?void 0:c.y:(o=E.get(e))==null?void 0:o.x;n!==void 0&&a(n,s)&&(r=e,s=n)}),r},"findClosestParent"),jr=h(t=>{let r="",a=1/0;return t.forEach(s=>{const e=E.get(s).y;e<=a&&(r=s,a=e)}),r||void 0},"findClosestParentBT"),Ar=h((t,r,a)=>{let s=a,e=a;const n=[];t.forEach(c=>{const o=r.get(c);if(!o)throw new Error(`Commit not found for key ${c}`);o.parents.length?(s=Yr(o),e=Math.max(s,e)):n.push(o),Kr(o,s)}),s=e,n.forEach(c=>{Nr(c,s,a)}),t.forEach(c=>{const o=r.get(c);if(o!=null&&o.parents.length){const $=jr(o.parents);s=E.get($).y-I,s<=e&&(e=s);const l=C.get(o.branch).pos,f=s-R;E.set(o.id,{x:l,y:f})}})},"setParallelBTPos"),Dr=h(t=>{var s;const r=Q(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(r))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Yr=h(t=>Dr(t)+I,"calculateCommitPosition"),Kr=h((t,r)=>{const a=C.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,e=r+R;return E.set(t.id,{x:s,y:e}),{x:s,y:e}},"setCommitPosition"),Nr=h((t,r,a)=>{const s=C.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,n=s.pos;E.set(t.id,{x:n,y:e})},"setRootPosition"),_r=h((t,r,a,s,e,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${s}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${s}`);else{const c=t.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",r.type===x.MERGE?9:10),c.attr("class",`commit ${r.id} commit${e%O}`),n===x.MERGE){const o=t.append("circle");o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",6),o.attr("class",`commit ${s} ${r.id} commit${e%O}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Vr=h((t,r,a,s)=>{var e;if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),o=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(r.id),$=(e=o.node())==null?void 0:e.getBBox();if($&&(c.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),u==="TB"||u==="BT"?(c.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),o.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):o.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(u==="TB"||u==="BT")o.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xr=h((t,r,a,s)=>{var e;if(r.tags.length>0){let n=0,c=0,o=0;const $=[];for(const l of r.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(e=d.node())==null?void 0:e.getBBox();if(!y)throw new Error("Tag bbox not found");c=Math.max(c,y.width),o=Math.max(o,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=o/2,p=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` + ${s-c/2-k/2},${p+L} + ${s-c/2-k/2},${p-L} + ${a.posWithOffset-c/2-k},${p-y-L} + ${a.posWithOffset+c/2+k},${p-y-L} + ${a.posWithOffset+c/2+k},${p+y+L} + ${a.posWithOffset-c/2-k},${p+y+L}`),f.attr("cy",p).attr("cx",s-c/2+k/2).attr("r",1.5).attr("class","tag-hole"),u==="TB"||u==="BT"){const m=s+d;g.attr("class","tag-label-bkg").attr("points",` + ${a.x},${m+2} + ${a.x},${m-2} + ${a.x+R},${m-y-2} + ${a.x+R+c+4},${m-y-2} + ${a.x+R+c+4},${m+y+2} + ${a.x+R},${m+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Jr=h(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qr=h((t,r,a,s)=>{const e={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const c=s.get(n)??e;return r==="TB"?c.y+I:r==="BT"?(s.get(t.id)??e).y-I:c.x+I}}else return r==="TB"?P:r==="BT"?(s.get(t.id)??e).y-I:0;return 0},"calculatePosition"),Zr=h((t,r,a)=>{var c,o;const s=u==="BT"&&a?r:r+R,e=u==="TB"||u==="BT"?s:(c=C.get(t.branch))==null?void 0:c.pos,n=u==="TB"||u==="BT"?(o=C.get(t.branch))==null?void 0:o.pos:s;if(n===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:e,posWithOffset:s}},"getCommitPosition"),K=h((t,r,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let n=u==="TB"||u==="BT"?P:0;const c=[...r.keys()],o=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var p,m;const d=(p=r.get(f))==null?void 0:p.seq,y=(m=r.get(g))==null?void 0:m.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=c.sort($);u==="BT"&&(o&&Ar(l,r,n),l=l.reverse()),l.forEach(f=>{var y;const g=r.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);o&&(n=Qr(g,u,n,E));const d=Zr(g,n,o);if(a){const p=Jr(g),m=g.customType??g.type,q=((y=C.get(g.branch))==null?void 0:y.index)??0;_r(s,g,d,p,q,m),Vr(e,g,d,n),Xr(e,g,d,n)}u==="TB"||u==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=u==="BT"&&o?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fr=h((t,r,a,s,e)=>{const c=(u==="TB"||u==="BT"?a.xl.branch===c,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&o(l))},"shouldRerouteArrow"),H=h((t,r,a=0)=>{const s=t+Math.abs(t-r)/2;if(a>5)return s;if(W.every(c=>Math.abs(c-s)>=10))return W.push(s),s;const n=Math.abs(t-r);return H(t,r-n/5,a+1)},"findLane"),Ur=h((t,r,a,s)=>{var y,p,m,q,Y;const e=E.get(r.id),n=E.get(a.id);if(e===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);const c=Fr(r,a,e,n,s);let o="",$="",l=0,f=0,g=(y=C.get(a.branch))==null?void 0:y.index;a.type===x.MERGE&&r.id!==a.parents[0]&&(g=(p=C.get(r.branch))==null?void 0:p.index);let d;if(c){o="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=e.yn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y-l} ${$} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x+l} ${e.y} ${o} ${n.x} ${e.y+f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):u==="BT"?(e.xn.x&&(o="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${o} ${e.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`),e.x===n.x&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`)):(e.yn.y&&(a.type===x.MERGE&&r.id!==a.parents[0]?d=`M ${e.x} ${e.y} L ${n.x-l} ${e.y} ${o} ${n.x} ${e.y-f} L ${n.x} ${n.y}`:d=`M ${e.x} ${e.y} L ${e.x} ${n.y+l} ${$} ${e.x+f} ${n.y} L ${n.x} ${n.y}`),e.y===n.y&&(d=`M ${e.x} ${e.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),re=h((t,r)=>{const a=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(s=>{const e=r.get(s);e.parents&&e.parents.length>0&&e.parents.forEach(n=>{Ur(a,r.get(n),e,r)})})},"drawArrows"),ee=h((t,r)=>{const a=t.append("g");r.forEach((s,e)=>{var p;const n=e%O,c=(p=C.get(s.name))==null?void 0:p.pos;if(c===void 0)throw new Error(`Position not found for branch ${s.name}`);const o=a.append("line");o.attr("x1",0),o.attr("y1",c),o.attr("x2",M),o.attr("y2",c),o.attr("class","branch branch"+n),u==="TB"?(o.attr("y1",P),o.attr("x1",c),o.attr("y2",M),o.attr("x2",c)):u==="BT"&&(o.attr("y1",M),o.attr("x1",c),o.attr("y2",P),o.attr("x2",c)),W.push(c);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(c-y.height/2-1)+")"),u==="TB"?(f.attr("x",c-y.width/2-10).attr("y",0),d.attr("transform","translate("+(c-y.width/2-5)+", 0)")):u==="BT"?(f.attr("x",c-y.width/2-10).attr("y",M),d.attr("transform","translate("+(c-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(c-y.height/2)+")")})},"drawBranches"),te=h(function(t,r,a,s,e){return C.set(t,{pos:r,index:a}),r+=50+(e?40:0)+(u==="TB"||u==="BT"?s.width/2:0),r},"setBranchPosition"),ae=h(function(t,r,a,s){if(Sr(),w.debug("in gitgraph renderer",t+` +`,"id:",r,a),!b)throw new Error("GitGraph config not found");const e=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const c=n.getBranchesAsObjArray();u=n.getDirection();const o=or(`[id="${r}"]`);let $=0;c.forEach((l,f)=>{var q;const g=J(l.name),d=o.append("g"),y=d.insert("g").attr("class","branchLabel"),p=y.insert("g").attr("class","label branch-label");(q=p.node())==null||q.appendChild(g);const m=g.getBBox();$=te(l.name,$,f,m,e),p.remove(),y.remove(),d.remove()}),K(o,G,!1),b.showBranches&&ee(o,c),re(o,G),K(o,G,!0),cr.insertTitle(o,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),ir(void 0,o,b.diagramPadding,b.useMaxWidth)},"draw"),ne={draw:ae},se=h(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(r=>` + .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; } + .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; } + .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; } + .label${r} { fill: ${t["git"+r]}; } + .arrow${r} { stroke: ${t["git"+r]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),oe=se,ge={parser:Wr,db:X,renderer:ne,styles:oe};export{ge as diagram}; diff --git a/static/js/md-gitGraphDiagram-NRZ2UAAF-OZjU1jNT.js b/static/js/md-gitGraphDiagram-NRZ2UAAF-OZjU1jNT.js deleted file mode 100644 index e0fe2737f..000000000 --- a/static/js/md-gitGraphDiagram-NRZ2UAAF-OZjU1jNT.js +++ /dev/null @@ -1,65 +0,0 @@ -import{p as Z}from"./md-chunk-TMUBEWPD-BBh5DnEp.js";import{I as F}from"./md-chunk-KFBOBJHC-BaRawZeL.js";import{B as U,_ as h,d as ee,C as re,D as te,E as ae,l as w,s as ne,g as se,b as ce,c as oe,p as ie,q as de,e as B,v as he,j as le,u as $e,F as fe}from"./md-index-BVqvVggs.js";import{p as ge}from"./md-gitGraph-YCYPL57B-ClKbk6IU.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";import"./md-clone-DXToIaWo.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ye=U.gitGraph,z=h(()=>re({...ye,...te().gitGraph}),"getConfig"),i=new F(()=>{const t=z(),e=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:a}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function j(){return ae({length:7})}h(j,"getID");function N(t,e){const a=Object.create(null);return t.reduce((s,r)=>{const n=e(r);return a[n]||(a[n]=!0,s.push(r)),s},[])}h(N,"uniqBy");var ue=h(function(t){i.records.direction=t},"setDirection"),xe=h(function(t){w.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(e){w.error("error while parsing gitGraph options",e.message)}},"setOptions"),pe=h(function(){return i.records.options},"getOptions"),be=h(function(t){let e=t.msg,a=t.id;const s=t.type;let r=t.tags;w.info("commit",e,a,s,r),w.debug("Entering commit:",e,a,s,r);const n=z();a=B.sanitizeText(a,n),e=B.sanitizeText(e,n),r=r==null?void 0:r.map(c=>B.sanitizeText(c,n));const o={id:a||i.records.seq+"-"+j(),message:e,seq:i.records.seq++,type:s??x.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=o,w.info("main branch",n.mainBranchName),i.records.commits.set(o.id,o),i.records.branches.set(i.records.currBranch,o.id),w.debug("in pushCommit "+o.id)},"commit"),me=h(function(t){let e=t.name;const a=t.order;if(e=B.sanitizeText(e,z()),i.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);i.records.branches.set(e,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(e,{name:e,order:a}),_(e),w.debug("in createBranch")},"branch"),we=h(t=>{let e=t.branch,a=t.id;const s=t.type,r=t.tags,n=z();e=B.sanitizeText(e,n),a&&(a=B.sanitizeText(a,n));const o=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(e),$=o?i.records.commits.get(o):void 0,l=c?i.records.commits.get(c):void 0;if($&&l&&$.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(i.records.currBranch===e){const d=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if($===void 0||!$){const d=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},d}if(!i.records.branches.has(e)){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},d}if(l===void 0||!l){const d=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},d}if($===l){const d=new Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},d}if(a&&i.records.commits.has(a)){const d=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw d.hash={text:`merge ${e} ${a} ${s} ${r==null?void 0:r.join(" ")}`,token:`merge ${e} ${a} ${s} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${e} ${a}_UNIQUE ${s} ${r==null?void 0:r.join(" ")}`]},d}const f=c||"",g={id:a||`${i.records.seq}-${j()}`,message:`merged branch ${e} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:x.MERGE,customType:s,customId:!!a,tags:r??[]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),Ce=h(function(t){let e=t.id,a=t.targetId,s=t.tags,r=t.parent;w.debug("Entering cherryPick:",e,a,s);const n=z();if(e=B.sanitizeText(e,n),a=B.sanitizeText(a,n),s=s==null?void 0:s.map($=>B.sanitizeText($,n)),r=B.sanitizeText(r,n),!e||!i.records.commits.has(e)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},$}const o=i.records.commits.get(e);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&!(Array.isArray(o.parents)&&o.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=o.branch;if(o.type===x.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(c===i.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const $=i.records.branches.get(i.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const l=i.records.commits.get($);if(l===void 0||!l){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const f={id:i.records.seq+"-"+j(),message:`cherry-picked ${o==null?void 0:o.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,o.id],branch:i.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${o.id}${o.type===x.MERGE?`|parent:${r}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),_=h(function(t){if(t=B.sanitizeText(t,z()),i.records.branches.has(t)){i.records.currBranch=t;const e=i.records.branches.get(i.records.currBranch);e===void 0||!e?i.records.head=null:i.records.head=i.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");function A(t,e,a){const s=t.indexOf(e);s===-1?t.push(a):t.splice(s,1,a)}h(A,"upsert");function D(t){const e=t.reduce((r,n)=>r.seq>n.seq?r:n,t[0]);let a="";t.forEach(function(r){r===e?a+=" *":a+=" |"});const s=[a,e.id,e.seq];for(const r in i.records.branches)i.records.branches.get(r)===e.id&&s.push(r);if(w.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const r=i.records.commits.get(e.parents[0]);A(t,e,r),e.parents[1]&&t.push(i.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const r=i.records.commits.get(e.parents[0]);A(t,e,r)}}t=N(t,r=>r.id),D(t)}h(D,"prettyPrintCommitHistory");var ve=h(function(){w.debug(i.records.commits);const t=V()[0];D([t])},"prettyPrint"),Ee=h(function(){i.reset(),he()},"clear"),Be=h(function(){return[...i.records.branchConfig.values()].map((e,a)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${a}`)}).sort((e,a)=>(e.order??0)-(a.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),ke=h(function(){return i.records.branches},"getBranches"),Le=h(function(){return i.records.commits},"getCommits"),V=h(function(){const t=[...i.records.commits.values()];return t.forEach(function(e){w.debug(e.id)}),t.sort((e,a)=>e.seq-a.seq),t},"getCommitsArray"),Te=h(function(){return i.records.currBranch},"getCurrentBranch"),Me=h(function(){return i.records.direction},"getDirection"),Re=h(function(){return i.records.head},"getHead"),X={commitType:x,getConfig:z,setDirection:ue,setOptions:xe,getOptions:pe,commit:be,branch:me,merge:we,cherryPick:Ce,checkout:_,prettyPrint:ve,clear:Ee,getBranchesAsObjArray:Be,getBranches:ke,getCommits:Le,getCommitsArray:V,getCurrentBranch:Te,getDirection:Me,getHead:Re,setAccTitle:ne,getAccTitle:se,getAccDescription:ce,setAccDescription:oe,setDiagramTitle:ie,getDiagramTitle:de},Ie=h((t,e)=>{Z(t,e),t.dir&&e.setDirection(t.dir);for(const a of t.statements)qe(a,e)},"populate"),qe=h((t,e)=>{const s={Commit:h(r=>e.commit(Oe(r)),"Commit"),Branch:h(r=>e.branch(ze(r)),"Branch"),Merge:h(r=>e.merge(Ge(r)),"Merge"),Checkout:h(r=>e.checkout(He(r)),"Checkout"),CherryPicking:h(r=>e.cherryPick(Pe(r)),"CherryPicking")}[t.$type];s?s(t):w.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Oe=h(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),ze=h(t=>({name:t.name,order:t.order??0}),"parseBranch"),Ge=h(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),He=h(t=>t.branch,"parseCheckout"),Pe=h(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),We={parse:h(async t=>{const e=await ge("gitGraph",t);w.debug(e),Ie(e,X)},"parse")},S=ee(),b=S==null?void 0:S.gitGraph,R=10,I=40,k=4,L=2,O=8,v=new Map,E=new Map,P=30,G=new Map,W=[],M=0,u="LR",je=h(()=>{v.clear(),E.clear(),G.clear(),M=0,W=[],u="LR"},"clear"),J=h(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(s=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=s.trim(),e.appendChild(r)}),e},"drawText"),Q=h(t=>{let e,a,s;return u==="BT"?(a=h((r,n)=>r<=n,"comparisonFunc"),s=1/0):(a=h((r,n)=>r>=n,"comparisonFunc"),s=0),t.forEach(r=>{var o,c;const n=u==="TB"||u=="BT"?(o=E.get(r))==null?void 0:o.y:(c=E.get(r))==null?void 0:c.x;n!==void 0&&a(n,s)&&(e=r,s=n)}),e},"findClosestParent"),Se=h(t=>{let e="",a=1/0;return t.forEach(s=>{const r=E.get(s).y;r<=a&&(e=s,a=r)}),e||void 0},"findClosestParentBT"),Ae=h((t,e,a)=>{let s=a,r=a;const n=[];t.forEach(o=>{const c=e.get(o);if(!c)throw new Error(`Commit not found for key ${o}`);c.parents.length?(s=Ye(c),r=Math.max(s,r)):n.push(c),Ke(c,s)}),s=r,n.forEach(o=>{Ne(o,s,a)}),t.forEach(o=>{const c=e.get(o);if(c!=null&&c.parents.length){const $=Se(c.parents);s=E.get($).y-I,s<=r&&(r=s);const l=v.get(c.branch).pos,f=s-R;E.set(c.id,{x:l,y:f})}})},"setParallelBTPos"),De=h(t=>{var s;const e=Q(t.parents.filter(r=>r!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(s=E.get(e))==null?void 0:s.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Ye=h(t=>De(t)+I,"calculateCommitPosition"),Ke=h((t,e)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const s=a.pos,r=e+R;return E.set(t.id,{x:s,y:r}),{x:s,y:r}},"setCommitPosition"),Ne=h((t,e,a)=>{const s=v.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const r=e+a,n=s.pos;E.set(t.id,{x:n,y:r})},"setRootPosition"),_e=h((t,e,a,s,r,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${r%O} ${s}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${r%O} ${s}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${e.id} ${s}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${s}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${s}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${s}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${s}`);else{const o=t.append("circle");if(o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",e.type===x.MERGE?9:10),o.attr("class",`commit ${e.id} commit${r%O}`),n===x.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${s} ${e.id} commit${r%O}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${s} ${e.id} commit${r%O}`)}},"drawCommitBullet"),Ve=h((t,e,a,s)=>{var r;if(e.type!==x.CHERRY_PICK&&(e.customId&&e.type===x.MERGE||e.type!==x.MERGE)&&(b!=null&&b.showCommitLabel)){const n=t.append("g"),o=n.insert("rect").attr("class","commit-label-bkg"),c=n.append("text").attr("x",s).attr("y",a.y+25).attr("class","commit-label").text(e.id),$=(r=c.node())==null?void 0:r.getBBox();if($&&(o.attr("x",a.posWithOffset-$.width/2-L).attr("y",a.y+13.5).attr("width",$.width+2*L).attr("height",$.height+2*L),u==="TB"||u==="BT"?(o.attr("x",a.x-($.width+4*k+5)).attr("y",a.y-12),c.attr("x",a.x-($.width+4*k)).attr("y",a.y+$.height-12)):c.attr("x",a.posWithOffset-$.width/2),b.rotateCommitLabel))if(u==="TB"||u==="BT")c.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),o.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const l=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+l+", "+f+") rotate(-45, "+s+", "+a.y+")")}}},"drawCommitLabel"),Xe=h((t,e,a,s)=>{var r;if(e.tags.length>0){let n=0,o=0,c=0;const $=[];for(const l of e.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),d=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(l),y=(r=d.node())==null?void 0:r.getBBox();if(!y)throw new Error("Tag bbox not found");o=Math.max(o,y.width),c=Math.max(c,y.height),d.attr("x",a.posWithOffset-y.width/2),$.push({tag:d,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:l,hole:f,rect:g,yOffset:d}of $){const y=c/2,p=a.y-19.2-d;if(g.attr("class","tag-label-bkg").attr("points",` - ${s-o/2-k/2},${p+L} - ${s-o/2-k/2},${p-L} - ${a.posWithOffset-o/2-k},${p-y-L} - ${a.posWithOffset+o/2+k},${p-y-L} - ${a.posWithOffset+o/2+k},${p+y+L} - ${a.posWithOffset-o/2-k},${p+y+L}`),f.attr("cy",p).attr("cx",s-o/2+k/2).attr("r",1.5).attr("class","tag-hole"),u==="TB"||u==="BT"){const m=s+d;g.attr("class","tag-label-bkg").attr("points",` - ${a.x},${m+2} - ${a.x},${m-2} - ${a.x+R},${m-y-2} - ${a.x+R+o+4},${m-y-2} - ${a.x+R+o+4},${m+y+2} - ${a.x+R},${m+y+2}`).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),f.attr("cx",a.x+k/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+a.x+","+s+")"),l.attr("x",a.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+a.x+","+s+")")}}}},"drawCommitTags"),Je=h(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Qe=h((t,e,a,s)=>{const r={x:0,y:0};if(t.parents.length>0){const n=Q(t.parents);if(n){const o=s.get(n)??r;return e==="TB"?o.y+I:e==="BT"?(s.get(t.id)??r).y-I:o.x+I}}else return e==="TB"?P:e==="BT"?(s.get(t.id)??r).y-I:0;return 0},"calculatePosition"),Ze=h((t,e,a)=>{var o,c;const s=u==="BT"&&a?e:e+R,r=u==="TB"||u==="BT"?s:(o=v.get(t.branch))==null?void 0:o.pos,n=u==="TB"||u==="BT"?(c=v.get(t.branch))==null?void 0:c.pos:s;if(n===void 0||r===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:n,y:r,posWithOffset:s}},"getCommitPosition"),K=h((t,e,a)=>{if(!b)throw new Error("GitGraph config not found");const s=t.append("g").attr("class","commit-bullets"),r=t.append("g").attr("class","commit-labels");let n=u==="TB"||u==="BT"?P:0;const o=[...e.keys()],c=(b==null?void 0:b.parallelCommits)??!1,$=h((f,g)=>{var p,m;const d=(p=e.get(f))==null?void 0:p.seq,y=(m=e.get(g))==null?void 0:m.seq;return d!==void 0&&y!==void 0?d-y:0},"sortKeys");let l=o.sort($);u==="BT"&&(c&&Ae(l,e,n),l=l.reverse()),l.forEach(f=>{var y;const g=e.get(f);if(!g)throw new Error(`Commit not found for key ${f}`);c&&(n=Qe(g,u,n,E));const d=Ze(g,n,c);if(a){const p=Je(g),m=g.customType??g.type,q=((y=v.get(g.branch))==null?void 0:y.index)??0;_e(s,g,d,p,q,m),Ve(r,g,d,n),Xe(r,g,d,n)}u==="TB"||u==="BT"?E.set(g.id,{x:d.x,y:d.posWithOffset}):E.set(g.id,{x:d.posWithOffset,y:d.y}),n=u==="BT"&&c?n+I:n+I+R,n>M&&(M=n)})},"drawCommits"),Fe=h((t,e,a,s,r)=>{const o=(u==="TB"||u==="BT"?a.xl.branch===o,"isOnBranchToGetCurve"),$=h(l=>l.seq>t.seq&&l.seq$(l)&&c(l))},"shouldRerouteArrow"),H=h((t,e,a=0)=>{const s=t+Math.abs(t-e)/2;if(a>5)return s;if(W.every(o=>Math.abs(o-s)>=10))return W.push(s),s;const n=Math.abs(t-e);return H(t,e-n/5,a+1)},"findLane"),Ue=h((t,e,a,s)=>{var y,p,m,q,Y;const r=E.get(e.id),n=E.get(a.id);if(r===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${e.id} and ${a.id}`);const o=Fe(e,a,r,n,s);let c="",$="",l=0,f=0,g=(y=v.get(a.branch))==null?void 0:y.index;a.type===x.MERGE&&e.id!==a.parents[0]&&(g=(p=v.get(e.branch))==null?void 0:p.index);let d;if(o){c="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,f=10;const T=r.yn.x&&(c="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${n.y-l} ${$} ${r.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${n.x+l} ${r.y} ${c} ${n.x} ${r.y+f} L ${n.x} ${n.y}`),r.x===n.x&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):u==="BT"?(r.xn.x&&(c="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,f=20,a.type===x.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${r.x} ${n.y+l} ${c} ${r.x-f} ${n.y} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${n.x-l} ${r.y} ${c} ${n.x} ${r.y-f} L ${n.x} ${n.y}`),r.x===n.x&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):(r.yn.y&&(a.type===x.MERGE&&e.id!==a.parents[0]?d=`M ${r.x} ${r.y} L ${n.x-l} ${r.y} ${c} ${n.x} ${r.y-f} L ${n.x} ${n.y}`:d=`M ${r.x} ${r.y} L ${r.x} ${n.y+l} ${$} ${r.x+f} ${n.y} L ${n.x} ${n.y}`),r.y===n.y&&(d=`M ${r.x} ${r.y} L ${n.x} ${n.y}`));if(d===void 0)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+g%O)},"drawArrow"),er=h((t,e)=>{const a=t.append("g").attr("class","commit-arrows");[...e.keys()].forEach(s=>{const r=e.get(s);r.parents&&r.parents.length>0&&r.parents.forEach(n=>{Ue(a,e.get(n),r,e)})})},"drawArrows"),rr=h((t,e)=>{const a=t.append("g");e.forEach((s,r)=>{var p;const n=r%O,o=(p=v.get(s.name))==null?void 0:p.pos;if(o===void 0)throw new Error(`Position not found for branch ${s.name}`);const c=a.append("line");c.attr("x1",0),c.attr("y1",o),c.attr("x2",M),c.attr("y2",o),c.attr("class","branch branch"+n),u==="TB"?(c.attr("y1",P),c.attr("x1",o),c.attr("y2",M),c.attr("x2",o)):u==="BT"&&(c.attr("y1",M),c.attr("x1",o),c.attr("y2",P),c.attr("x2",o)),W.push(o);const $=s.name,l=J($),f=a.insert("rect"),d=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);d.node().appendChild(l);const y=l.getBBox();f.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-y.width-4-((b==null?void 0:b.rotateCommitLabel)===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),d.attr("transform","translate("+(-y.width-14-((b==null?void 0:b.rotateCommitLabel)===!0?30:0))+", "+(o-y.height/2-1)+")"),u==="TB"?(f.attr("x",o-y.width/2-10).attr("y",0),d.attr("transform","translate("+(o-y.width/2-5)+", 0)")):u==="BT"?(f.attr("x",o-y.width/2-10).attr("y",M),d.attr("transform","translate("+(o-y.width/2-5)+", "+M+")")):f.attr("transform","translate(-19, "+(o-y.height/2)+")")})},"drawBranches"),tr=h(function(t,e,a,s,r){return v.set(t,{pos:e,index:a}),e+=50+(r?40:0)+(u==="TB"||u==="BT"?s.width/2:0),e},"setBranchPosition"),ar=h(function(t,e,a,s){if(je(),w.debug("in gitgraph renderer",t+` -`,"id:",e,a),!b)throw new Error("GitGraph config not found");const r=b.rotateCommitLabel??!1,n=s.db;G=n.getCommits();const o=n.getBranchesAsObjArray();u=n.getDirection();const c=le(`[id="${e}"]`);let $=0;o.forEach((l,f)=>{var q;const g=J(l.name),d=c.append("g"),y=d.insert("g").attr("class","branchLabel"),p=y.insert("g").attr("class","label branch-label");(q=p.node())==null||q.appendChild(g);const m=g.getBBox();$=tr(l.name,$,f,m,r),p.remove(),y.remove(),d.remove()}),K(c,G,!1),b.showBranches&&rr(c,o),er(c,G),K(c,G,!0),$e.insertTitle(c,"gitTitleText",b.titleTopMargin??0,n.getDiagramTitle()),fe(void 0,c,b.diagramPadding,b.useMaxWidth)},"draw"),nr={draw:ar},sr=h(t=>` - .commit-id, - .commit-msg, - .branch-label { - fill: lightgrey; - color: lightgrey; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - } - ${[0,1,2,3,4,5,6,7].map(e=>` - .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } - .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } - .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } - .label${e} { fill: ${t["git"+e]}; } - .arrow${e} { stroke: ${t["git"+e]}; } - `).join(` -`)} - - .branch { - stroke-width: 1; - stroke: ${t.lineColor}; - stroke-dasharray: 2; - } - .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} - .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } - .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} - .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } - .tag-hole { fill: ${t.textColor}; } - - .commit-merge { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - } - .commit-reverse { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - stroke-width: 3; - } - .commit-highlight-outer { - } - .commit-highlight-inner { - stroke: ${t.primaryColor}; - fill: ${t.primaryColor}; - } - - .arrow { stroke-width: 8; stroke-linecap: round; fill: none} - .gitTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${t.textColor}; - } -`,"getStyles"),cr=sr,gr={parser:We,db:X,renderer:nr,styles:cr};export{gr as diagram}; diff --git a/static/js/md-graph-BfdmZmeA.js b/static/js/md-graph-6STGQExD.js similarity index 97% rename from static/js/md-graph-BfdmZmeA.js rename to static/js/md-graph-6STGQExD.js index 0f0e668db..1e633925f 100644 --- a/static/js/md-graph-BfdmZmeA.js +++ b/static/js/md-graph-6STGQExD.js @@ -1 +1 @@ -import{aA as N,aB as j,aC as f,aD as b,aE as E}from"./md-index-BVqvVggs.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./md-_baseUniq-BgyQXxRT.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,C(this._preds[t],e),C(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],y(this._preds[t],e),y(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function C(o,e){o[e]?o[e]++:o[e]=1}function y(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G}; +import{aA as N,aB as j,aC as f,aD as b,aE as E}from"./md-index-B8Nim9kS.js";import{a as v,c as P,k as _,f as g,d,i as l,v as p,r as D}from"./md-_baseUniq-DU1ET3rn.js";var w=N(function(o){return v(P(o,1,j,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return w(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return D(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,C(this._preds[t],e),C(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],y(this._preds[t],e),y(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function C(o,e){o[e]?o[e]++:o[e]=1}function y(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G}; diff --git a/static/js/md-index-BVqvVggs.js b/static/js/md-index-B8Nim9kS.js similarity index 52% rename from static/js/md-index-BVqvVggs.js rename to static/js/md-index-B8Nim9kS.js index 867726990..59970dd5d 100644 --- a/static/js/md-index-BVqvVggs.js +++ b/static/js/md-index-B8Nim9kS.js @@ -1,26 +1,26 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/md-dagre-4EVJKHTY-ByFqDqvv.js","static/js/md-graph-BfdmZmeA.js","static/js/md-_baseUniq-BgyQXxRT.js","static/js/md-layout-BErqkM37.js","static/js/md-_basePickBy-CkE1q7AX.js","static/js/md-clone-DXToIaWo.js","static/js/md-c4Diagram-6F5ED5ID-BkN2tJBP.js","static/js/md-chunk-ASOPGD6M-BaPEXM9M.js","static/js/md-flowDiagram-7ASYPVHJ-BUriymIt.js","static/js/md-chunk-5HRBRIJM-CXxgtuoQ.js","static/js/md-channel-DmgS6gpL.js","static/js/md-erDiagram-6RL3IURR-Zyah6us3.js","static/js/md-gitGraphDiagram-NRZ2UAAF-OZjU1jNT.js","static/js/md-chunk-TMUBEWPD-BBh5DnEp.js","static/js/md-chunk-KFBOBJHC-BaRawZeL.js","static/js/md-gitGraph-YCYPL57B-ClKbk6IU.js","static/js/md-ganttDiagram-NTVNEXSI-BwU4qRp4.js","static/js/md-linear-BdLRedgo.js","static/js/md-init-Gi6I4Gst.js","static/js/md-infoDiagram-A4XQUW5V-C2iCJeNK.js","static/js/md-pieDiagram-YF2LJOPJ-EW-DXTU2.js","static/js/md-arc-Bq1t1uZ8.js","static/js/md-ordinal-CxVaQH2l.js","static/js/md-quadrantDiagram-OS5C2QUG-CweFJDAr.js","static/js/md-xychartDiagram-6QU3TZC5-CLuJjgOa.js","static/js/md-requirementDiagram-MIRIMTAZ-BXWl9Kd7.js","static/js/md-sequenceDiagram-G6AWOVSC-iwwYTdhr.js","static/js/md-classDiagram-LNE6IOMH-DwgqSvqZ.js","static/js/md-chunk-T2TOU4HS-BjDahP4G.js","static/js/md-classDiagram-v2-MQ7JQ4JX-DwgqSvqZ.js","static/js/md-stateDiagram-MAYHULR4-D9h0fowV.js","static/js/md-chunk-7U56Z5CX-B4xneTyT.js","static/js/md-stateDiagram-v2-4JROLMXI-L8c9L0IT.js","static/js/md-journeyDiagram-G5WM74LC-DTV1mCtO.js","static/js/md-timeline-definition-U7ZMHBDA-B4qXY0N3.js","static/js/md-mindmap-definition-GWI6TPTV-DlQyyV9l.js","static/js/md-cytoscape.esm-C21_TrUD.js","static/js/md-sankeyDiagram-Y46BX6SQ-CEeJ3xfQ.js","static/js/md-diagram-QW4FP2JN-m9wnasb9.js","static/js/md-blockDiagram-ZHA2E4KO-Dz3Lf5F8.js","static/js/md-architectureDiagram-UYN6MBPD-DzTr1dNB.js"])))=>i.map(i=>d[i]); -var ZN=Object.defineProperty;var LC=Ra=>{throw TypeError(Ra)};var eI=(Ra,qa,rd)=>qa in Ra?ZN(Ra,qa,{enumerable:!0,configurable:!0,writable:!0,value:rd}):Ra[qa]=rd;var Ng=(Ra,qa,rd)=>eI(Ra,typeof qa!="symbol"?qa+"":qa,rd),tI=(Ra,qa,rd)=>qa.has(Ra)||LC("Cannot "+rd);var BC=(Ra,qa,rd)=>qa.has(Ra)?LC("Cannot add the same private member more than once"):qa instanceof WeakSet?qa.add(Ra):qa.set(Ra,rd);var ZT=(Ra,qa,rd)=>(tI(Ra,qa,"access private method"),rd);(function(){const qa=document.createElement("link").relList;if(qa&&qa.supports&&qa.supports("modulepreload"))return;for(const pd of document.querySelectorAll('link[rel="modulepreload"]'))sd(pd);new MutationObserver(pd=>{for(const fd of pd)if(fd.type==="childList")for(const hd of fd.addedNodes)hd.tagName==="LINK"&&hd.rel==="modulepreload"&&sd(hd)}).observe(document,{childList:!0,subtree:!0});function rd(pd){const fd={};return pd.integrity&&(fd.integrity=pd.integrity),pd.referrerPolicy&&(fd.referrerPolicy=pd.referrerPolicy),pd.crossOrigin==="use-credentials"?fd.credentials="include":pd.crossOrigin==="anonymous"?fd.credentials="omit":fd.credentials="same-origin",fd}function sd(pd){if(pd.ep)return;pd.ep=!0;const fd=rd(pd);fetch(pd.href,fd)}})();const global$1=globalThis||void 0||self;/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/js/md-dagre-4EVJKHTY-Cqt3qvFD.js","static/js/md-graph-6STGQExD.js","static/js/md-_baseUniq-DU1ET3rn.js","static/js/md-layout-C6gsB80Q.js","static/js/md-_basePickBy-B78WwQFo.js","static/js/md-clone-ByE4h4D7.js","static/js/md-c4Diagram-6F5ED5ID-CoV4OzqF.js","static/js/md-chunk-ASOPGD6M-D4uVhftc.js","static/js/md-flowDiagram-7ASYPVHJ-DItS00Cu.js","static/js/md-chunk-5HRBRIJM-Dc3xF8et.js","static/js/md-channel-vFpC5mtO.js","static/js/md-erDiagram-6RL3IURR-B67nCv3Q.js","static/js/md-gitGraphDiagram-NRZ2UAAF-DvDcunZf.js","static/js/md-chunk-TMUBEWPD-zEBQnby0.js","static/js/md-chunk-KFBOBJHC-bxuwoawJ.js","static/js/md-gitGraph-YCYPL57B-CpuUbWJB.js","static/js/md-ganttDiagram-NTVNEXSI-wxhmxMLe.js","static/js/md-linear-C1jk9ODm.js","static/js/md-init-Gi6I4Gst.js","static/js/md-infoDiagram-A4XQUW5V-Dk4jz0D0.js","static/js/md-pieDiagram-YF2LJOPJ-DvDaunoY.js","static/js/md-arc-T7NRJmXm.js","static/js/md-ordinal-CxVaQH2l.js","static/js/md-quadrantDiagram-OS5C2QUG-bdxnLfCx.js","static/js/md-xychartDiagram-6QU3TZC5-BG38e9NG.js","static/js/md-requirementDiagram-MIRIMTAZ-COvK1z2r.js","static/js/md-sequenceDiagram-G6AWOVSC-B5wQLnro.js","static/js/md-classDiagram-LNE6IOMH-RQypru8j.js","static/js/md-chunk-T2TOU4HS-u24tjTRY.js","static/js/md-classDiagram-v2-MQ7JQ4JX-RQypru8j.js","static/js/md-stateDiagram-MAYHULR4-M4cmYgl8.js","static/js/md-chunk-7U56Z5CX-jaDTStfP.js","static/js/md-stateDiagram-v2-4JROLMXI-ThmBLKFI.js","static/js/md-journeyDiagram-G5WM74LC-DmZRpnbC.js","static/js/md-timeline-definition-U7ZMHBDA-CLbniYO1.js","static/js/md-mindmap-definition-GWI6TPTV-ZcReOJus.js","static/js/md-cytoscape.esm-BSw61sAN.js","static/js/md-sankeyDiagram-Y46BX6SQ-CkD59MI5.js","static/js/md-diagram-QW4FP2JN-OFWFF2FB.js","static/js/md-blockDiagram-ZHA2E4KO-Bf98Me_l.js","static/js/md-architectureDiagram-UYN6MBPD-B2k6ivyG.js"])))=>i.map(i=>d[i]); +var n2=Object.defineProperty;var UC=Ra=>{throw TypeError(Ra)};var i2=(Ra,ed,ud)=>ed in Ra?n2(Ra,ed,{enumerable:!0,configurable:!0,writable:!0,value:ud}):Ra[ed]=ud;var Ig=(Ra,ed,ud)=>i2(Ra,typeof ed!="symbol"?ed+"":ed,ud),a2=(Ra,ed,ud)=>ed.has(Ra)||UC("Cannot "+ud);var jC=(Ra,ed,ud)=>ed.has(Ra)?UC("Cannot add the same private member more than once"):ed instanceof WeakSet?ed.add(Ra):ed.set(Ra,ud);var ZS=(Ra,ed,ud)=>(a2(Ra,ed,"access private method"),ud);(function(){const ed=document.createElement("link").relList;if(ed&&ed.supports&&ed.supports("modulepreload"))return;for(const hd of document.querySelectorAll('link[rel="modulepreload"]'))dd(hd);new MutationObserver(hd=>{for(const md of hd)if(md.type==="childList")for(const gd of md.addedNodes)gd.tagName==="LINK"&&gd.rel==="modulepreload"&&dd(gd)}).observe(document,{childList:!0,subtree:!0});function ud(hd){const md={};return hd.integrity&&(md.integrity=hd.integrity),hd.referrerPolicy&&(md.referrerPolicy=hd.referrerPolicy),hd.crossOrigin==="use-credentials"?md.credentials="include":hd.crossOrigin==="anonymous"?md.credentials="omit":md.credentials="same-origin",md}function dd(hd){if(hd.ep)return;hd.ep=!0;const md=ud(hd);fetch(hd.href,md)}})();const global$1=globalThis||void 0||self;/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function makeMap(Ra){const qa=Object.create(null);for(const rd of Ra.split(","))qa[rd]=1;return rd=>rd in qa}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&(Ra.charCodeAt(2)>122||Ra.charCodeAt(2)<97),isModelListener=Ra=>Ra.startsWith("onUpdate:"),extend$4=Object.assign,remove$2=(Ra,qa)=>{const rd=Ra.indexOf(qa);rd>-1&&Ra.splice(rd,1)},hasOwnProperty$f=Object.prototype.hasOwnProperty,hasOwn$4=(Ra,qa)=>hasOwnProperty$f.call(Ra,qa),isArray$2=Array.isArray,isMap=Ra=>toTypeString(Ra)==="[object Map]",isSet$1=Ra=>toTypeString(Ra)==="[object Set]",isDate$2=Ra=>toTypeString(Ra)==="[object Date]",isFunction$4=Ra=>typeof Ra=="function",isString$2=Ra=>typeof Ra=="string",isSymbol=Ra=>typeof Ra=="symbol",isObject$9=Ra=>Ra!==null&&typeof Ra=="object",isPromise=Ra=>(isObject$9(Ra)||isFunction$4(Ra))&&isFunction$4(Ra.then)&&isFunction$4(Ra.catch),objectToString$1=Object.prototype.toString,toTypeString=Ra=>objectToString$1.call(Ra),toRawType=Ra=>toTypeString(Ra).slice(8,-1),isPlainObject$6=Ra=>toTypeString(Ra)==="[object Object]",isIntegerKey=Ra=>isString$2(Ra)&&Ra!=="NaN"&&Ra[0]!=="-"&&""+parseInt(Ra,10)===Ra,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=Ra=>{const qa=Object.create(null);return rd=>qa[rd]||(qa[rd]=Ra(rd))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(Ra=>Ra.replace(camelizeRE,(qa,rd)=>rd?rd.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(Ra=>Ra.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(Ra=>Ra.charAt(0).toUpperCase()+Ra.slice(1)),toHandlerKey=cacheStringFunction(Ra=>Ra?`on${capitalize(Ra)}`:""),hasChanged=(Ra,qa)=>!Object.is(Ra,qa),invokeArrayFns=(Ra,...qa)=>{for(let rd=0;rd{Object.defineProperty(Ra,qa,{configurable:!0,enumerable:!1,writable:sd,value:rd})},looseToNumber=Ra=>{const qa=parseFloat(Ra);return isNaN(qa)?Ra:qa},toNumber$4=Ra=>{const qa=isString$2(Ra)?Number(Ra):NaN;return isNaN(qa)?Ra:qa};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global$1<"u"?global$1:{});function normalizeStyle(Ra){if(isArray$2(Ra)){const qa={};for(let rd=0;rd{if(rd){const sd=rd.split(propertyDelimiterRE);sd.length>1&&(qa[sd[0].trim()]=sd[1].trim())}}),qa}function normalizeClass(Ra){let qa="";if(isString$2(Ra))qa=Ra;else if(isArray$2(Ra))for(let rd=0;rdlooseEqual(rd,qa))}const isRef$1=Ra=>!!(Ra&&Ra.__v_isRef===!0),toDisplayString=Ra=>isString$2(Ra)?Ra:Ra==null?"":isArray$2(Ra)||isObject$9(Ra)&&(Ra.toString===objectToString$1||!isFunction$4(Ra.toString))?isRef$1(Ra)?toDisplayString(Ra.value):JSON.stringify(Ra,replacer$1,2):String(Ra),replacer$1=(Ra,qa)=>isRef$1(qa)?replacer$1(Ra,qa.value):isMap(qa)?{[`Map(${qa.size})`]:[...qa.entries()].reduce((rd,[sd,pd],fd)=>(rd[stringifySymbol(sd,fd)+" =>"]=pd,rd),{})}:isSet$1(qa)?{[`Set(${qa.size})`]:[...qa.values()].map(rd=>stringifySymbol(rd))}:isSymbol(qa)?stringifySymbol(qa):isObject$9(qa)&&!isArray$2(qa)&&!isPlainObject$6(qa)?String(qa):qa,stringifySymbol=(Ra,qa="")=>{var rd;return isSymbol(Ra)?`Symbol(${(rd=Ra.description)!=null?rd:qa})`:Ra};/** +**//*! #__NO_SIDE_EFFECTS__ */function makeMap(Ra){const ed=Object.create(null);for(const ud of Ra.split(","))ed[ud]=1;return ud=>ud in ed}const EMPTY_OBJ={},EMPTY_ARR=[],NOOP=()=>{},NO=()=>!1,isOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&(Ra.charCodeAt(2)>122||Ra.charCodeAt(2)<97),isModelListener=Ra=>Ra.startsWith("onUpdate:"),extend$4=Object.assign,remove$2=(Ra,ed)=>{const ud=Ra.indexOf(ed);ud>-1&&Ra.splice(ud,1)},hasOwnProperty$f=Object.prototype.hasOwnProperty,hasOwn$4=(Ra,ed)=>hasOwnProperty$f.call(Ra,ed),isArray$3=Array.isArray,isMap=Ra=>toTypeString(Ra)==="[object Map]",isSet$1=Ra=>toTypeString(Ra)==="[object Set]",isDate$2=Ra=>toTypeString(Ra)==="[object Date]",isFunction$4=Ra=>typeof Ra=="function",isString$2=Ra=>typeof Ra=="string",isSymbol=Ra=>typeof Ra=="symbol",isObject$9=Ra=>Ra!==null&&typeof Ra=="object",isPromise=Ra=>(isObject$9(Ra)||isFunction$4(Ra))&&isFunction$4(Ra.then)&&isFunction$4(Ra.catch),objectToString$1=Object.prototype.toString,toTypeString=Ra=>objectToString$1.call(Ra),toRawType=Ra=>toTypeString(Ra).slice(8,-1),isPlainObject$6=Ra=>toTypeString(Ra)==="[object Object]",isIntegerKey=Ra=>isString$2(Ra)&&Ra!=="NaN"&&Ra[0]!=="-"&&""+parseInt(Ra,10)===Ra,isReservedProp=makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),cacheStringFunction=Ra=>{const ed=Object.create(null);return ud=>ed[ud]||(ed[ud]=Ra(ud))},camelizeRE=/-(\w)/g,camelize=cacheStringFunction(Ra=>Ra.replace(camelizeRE,(ed,ud)=>ud?ud.toUpperCase():"")),hyphenateRE=/\B([A-Z])/g,hyphenate=cacheStringFunction(Ra=>Ra.replace(hyphenateRE,"-$1").toLowerCase()),capitalize=cacheStringFunction(Ra=>Ra.charAt(0).toUpperCase()+Ra.slice(1)),toHandlerKey=cacheStringFunction(Ra=>Ra?`on${capitalize(Ra)}`:""),hasChanged=(Ra,ed)=>!Object.is(Ra,ed),invokeArrayFns=(Ra,...ed)=>{for(let ud=0;ud{Object.defineProperty(Ra,ed,{configurable:!0,enumerable:!1,writable:dd,value:ud})},looseToNumber=Ra=>{const ed=parseFloat(Ra);return isNaN(ed)?Ra:ed},toNumber$4=Ra=>{const ed=isString$2(Ra)?Number(Ra):NaN;return isNaN(ed)?Ra:ed};let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global$1<"u"?global$1:{});function normalizeStyle(Ra){if(isArray$3(Ra)){const ed={};for(let ud=0;ud{if(ud){const dd=ud.split(propertyDelimiterRE);dd.length>1&&(ed[dd[0].trim()]=dd[1].trim())}}),ed}function normalizeClass(Ra){let ed="";if(isString$2(Ra))ed=Ra;else if(isArray$3(Ra))for(let ud=0;udlooseEqual(ud,ed))}const isRef$1=Ra=>!!(Ra&&Ra.__v_isRef===!0),toDisplayString=Ra=>isString$2(Ra)?Ra:Ra==null?"":isArray$3(Ra)||isObject$9(Ra)&&(Ra.toString===objectToString$1||!isFunction$4(Ra.toString))?isRef$1(Ra)?toDisplayString(Ra.value):JSON.stringify(Ra,replacer$1,2):String(Ra),replacer$1=(Ra,ed)=>isRef$1(ed)?replacer$1(Ra,ed.value):isMap(ed)?{[`Map(${ed.size})`]:[...ed.entries()].reduce((ud,[dd,hd],md)=>(ud[stringifySymbol(dd,md)+" =>"]=hd,ud),{})}:isSet$1(ed)?{[`Set(${ed.size})`]:[...ed.values()].map(ud=>stringifySymbol(ud))}:isSymbol(ed)?stringifySymbol(ed):isObject$9(ed)&&!isArray$3(ed)&&!isPlainObject$6(ed)?String(ed):ed,stringifySymbol=(Ra,ed="")=>{var ud;return isSymbol(Ra)?`Symbol(${(ud=Ra.description)!=null?ud:ed})`:Ra};/** * @vue/reactivity v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let activeEffectScope;class EffectScope{constructor(qa=!1){this.detached=qa,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!qa&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let qa,rd;if(this.scopes)for(qa=0,rd=this.scopes.length;qa0)return;if(batchedComputed){let qa=batchedComputed;for(batchedComputed=void 0;qa;){const rd=qa.next;qa.next=void 0,qa.flags&=-9,qa=rd}}let Ra;for(;batchedSub;){let qa=batchedSub;for(batchedSub=void 0;qa;){const rd=qa.next;if(qa.next=void 0,qa.flags&=-9,qa.flags&1)try{qa.trigger()}catch(sd){Ra||(Ra=sd)}qa=rd}}if(Ra)throw Ra}function prepareDeps(Ra){for(let qa=Ra.deps;qa;qa=qa.nextDep)qa.version=-1,qa.prevActiveLink=qa.dep.activeLink,qa.dep.activeLink=qa}function cleanupDeps(Ra){let qa,rd=Ra.depsTail,sd=rd;for(;sd;){const pd=sd.prevDep;sd.version===-1?(sd===rd&&(rd=pd),removeSub(sd),removeDep(sd)):qa=sd,sd.dep.activeLink=sd.prevActiveLink,sd.prevActiveLink=void 0,sd=pd}Ra.deps=qa,Ra.depsTail=rd}function isDirty(Ra){for(let qa=Ra.deps;qa;qa=qa.nextDep)if(qa.dep.version!==qa.version||qa.dep.computed&&(refreshComputed(qa.dep.computed)||qa.dep.version!==qa.version))return!0;return!!Ra._dirty}function refreshComputed(Ra){if(Ra.flags&4&&!(Ra.flags&16)||(Ra.flags&=-17,Ra.globalVersion===globalVersion))return;Ra.globalVersion=globalVersion;const qa=Ra.dep;if(Ra.flags|=2,qa.version>0&&!Ra.isSSR&&Ra.deps&&!isDirty(Ra)){Ra.flags&=-3;return}const rd=activeSub,sd=shouldTrack;activeSub=Ra,shouldTrack=!0;try{prepareDeps(Ra);const pd=Ra.fn(Ra._value);(qa.version===0||hasChanged(pd,Ra._value))&&(Ra._value=pd,qa.version++)}catch(pd){throw qa.version++,pd}finally{activeSub=rd,shouldTrack=sd,cleanupDeps(Ra),Ra.flags&=-3}}function removeSub(Ra,qa=!1){const{dep:rd,prevSub:sd,nextSub:pd}=Ra;if(sd&&(sd.nextSub=pd,Ra.prevSub=void 0),pd&&(pd.prevSub=sd,Ra.nextSub=void 0),rd.subs===Ra&&(rd.subs=sd,!sd&&rd.computed)){rd.computed.flags&=-5;for(let fd=rd.computed.deps;fd;fd=fd.nextDep)removeSub(fd,!0)}!qa&&!--rd.sc&&rd.map&&rd.map.delete(rd.key)}function removeDep(Ra){const{prevDep:qa,nextDep:rd}=Ra;qa&&(qa.nextDep=rd,Ra.prevDep=void 0),rd&&(rd.prevDep=qa,Ra.nextDep=void 0)}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const Ra=trackStack.pop();shouldTrack=Ra===void 0?!0:Ra}function cleanupEffect(Ra){const{cleanup:qa}=Ra;if(Ra.cleanup=void 0,qa){const rd=activeSub;activeSub=void 0;try{qa()}finally{activeSub=rd}}}let globalVersion=0;class Link{constructor(qa,rd){this.sub=qa,this.dep=rd,this.version=rd.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(qa){this.computed=qa,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(qa){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let rd=this.activeLink;if(rd===void 0||rd.sub!==activeSub)rd=this.activeLink=new Link(activeSub,this),activeSub.deps?(rd.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=rd,activeSub.depsTail=rd):activeSub.deps=activeSub.depsTail=rd,addSub(rd);else if(rd.version===-1&&(rd.version=this.version,rd.nextDep)){const sd=rd.nextDep;sd.prevDep=rd.prevDep,rd.prevDep&&(rd.prevDep.nextDep=sd),rd.prevDep=activeSub.depsTail,rd.nextDep=void 0,activeSub.depsTail.nextDep=rd,activeSub.depsTail=rd,activeSub.deps===rd&&(activeSub.deps=sd)}return rd}trigger(qa){this.version++,globalVersion++,this.notify(qa)}notify(qa){startBatch();try{for(let rd=this.subs;rd;rd=rd.prevSub)rd.sub.notify()&&rd.sub.dep.notify()}finally{endBatch()}}}function addSub(Ra){if(Ra.dep.sc++,Ra.sub.flags&4){const qa=Ra.dep.computed;if(qa&&!Ra.dep.subs){qa.flags|=20;for(let sd=qa.deps;sd;sd=sd.nextDep)addSub(sd)}const rd=Ra.dep.subs;rd!==Ra&&(Ra.prevSub=rd,rd&&(rd.nextSub=Ra)),Ra.dep.subs=Ra}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(Ra,qa,rd){if(shouldTrack&&activeSub){let sd=targetMap.get(Ra);sd||targetMap.set(Ra,sd=new Map);let pd=sd.get(rd);pd||(sd.set(rd,pd=new Dep),pd.map=sd,pd.key=rd),pd.track()}}function trigger(Ra,qa,rd,sd,pd,fd){const hd=targetMap.get(Ra);if(!hd){globalVersion++;return}const md=gd=>{gd&&gd.trigger()};if(startBatch(),qa==="clear")hd.forEach(md);else{const gd=isArray$2(Ra),yd=gd&&isIntegerKey(rd);if(gd&&rd==="length"){const vd=Number(sd);hd.forEach((Nd,Md)=>{(Md==="length"||Md===ARRAY_ITERATE_KEY||!isSymbol(Md)&&Md>=vd)&&md(Nd)})}else switch((rd!==void 0||hd.has(void 0))&&md(hd.get(rd)),yd&&md(hd.get(ARRAY_ITERATE_KEY)),qa){case"add":gd?yd&&md(hd.get("length")):(md(hd.get(ITERATE_KEY)),isMap(Ra)&&md(hd.get(MAP_KEY_ITERATE_KEY)));break;case"delete":gd||(md(hd.get(ITERATE_KEY)),isMap(Ra)&&md(hd.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(Ra)&&md(hd.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(Ra,qa){const rd=targetMap.get(Ra);return rd&&rd.get(qa)}function reactiveReadArray(Ra){const qa=toRaw(Ra);return qa===Ra?qa:(track(qa,"iterate",ARRAY_ITERATE_KEY),isShallow(Ra)?qa:qa.map(toReactive))}function shallowReadArray(Ra){return track(Ra=toRaw(Ra),"iterate",ARRAY_ITERATE_KEY),Ra}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...Ra){return reactiveReadArray(this).concat(...Ra.map(qa=>isArray$2(qa)?reactiveReadArray(qa):qa))},entries(){return iterator(this,"entries",Ra=>(Ra[1]=toReactive(Ra[1]),Ra))},every(Ra,qa){return apply$3(this,"every",Ra,qa,void 0,arguments)},filter(Ra,qa){return apply$3(this,"filter",Ra,qa,rd=>rd.map(toReactive),arguments)},find(Ra,qa){return apply$3(this,"find",Ra,qa,toReactive,arguments)},findIndex(Ra,qa){return apply$3(this,"findIndex",Ra,qa,void 0,arguments)},findLast(Ra,qa){return apply$3(this,"findLast",Ra,qa,toReactive,arguments)},findLastIndex(Ra,qa){return apply$3(this,"findLastIndex",Ra,qa,void 0,arguments)},forEach(Ra,qa){return apply$3(this,"forEach",Ra,qa,void 0,arguments)},includes(...Ra){return searchProxy(this,"includes",Ra)},indexOf(...Ra){return searchProxy(this,"indexOf",Ra)},join(Ra){return reactiveReadArray(this).join(Ra)},lastIndexOf(...Ra){return searchProxy(this,"lastIndexOf",Ra)},map(Ra,qa){return apply$3(this,"map",Ra,qa,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...Ra){return noTracking(this,"push",Ra)},reduce(Ra,...qa){return reduce$2(this,"reduce",Ra,qa)},reduceRight(Ra,...qa){return reduce$2(this,"reduceRight",Ra,qa)},shift(){return noTracking(this,"shift")},some(Ra,qa){return apply$3(this,"some",Ra,qa,void 0,arguments)},splice(...Ra){return noTracking(this,"splice",Ra)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(Ra){return reactiveReadArray(this).toSorted(Ra)},toSpliced(...Ra){return reactiveReadArray(this).toSpliced(...Ra)},unshift(...Ra){return noTracking(this,"unshift",Ra)},values(){return iterator(this,"values",toReactive)}};function iterator(Ra,qa,rd){const sd=shallowReadArray(Ra),pd=sd[qa]();return sd!==Ra&&!isShallow(Ra)&&(pd._next=pd.next,pd.next=()=>{const fd=pd._next();return fd.value&&(fd.value=rd(fd.value)),fd}),pd}const arrayProto$1=Array.prototype;function apply$3(Ra,qa,rd,sd,pd,fd){const hd=shallowReadArray(Ra),md=hd!==Ra&&!isShallow(Ra),gd=hd[qa];if(gd!==arrayProto$1[qa]){const Nd=gd.apply(Ra,fd);return md?toReactive(Nd):Nd}let yd=rd;hd!==Ra&&(md?yd=function(Nd,Md){return rd.call(this,toReactive(Nd),Md,Ra)}:rd.length>2&&(yd=function(Nd,Md){return rd.call(this,Nd,Md,Ra)}));const vd=gd.call(hd,yd,sd);return md&&pd?pd(vd):vd}function reduce$2(Ra,qa,rd,sd){const pd=shallowReadArray(Ra);let fd=rd;return pd!==Ra&&(isShallow(Ra)?rd.length>3&&(fd=function(hd,md,gd){return rd.call(this,hd,md,gd,Ra)}):fd=function(hd,md,gd){return rd.call(this,hd,toReactive(md),gd,Ra)}),pd[qa](fd,...sd)}function searchProxy(Ra,qa,rd){const sd=toRaw(Ra);track(sd,"iterate",ARRAY_ITERATE_KEY);const pd=sd[qa](...rd);return(pd===-1||pd===!1)&&isProxy(rd[0])?(rd[0]=toRaw(rd[0]),sd[qa](...rd)):pd}function noTracking(Ra,qa,rd=[]){pauseTracking(),startBatch();const sd=toRaw(Ra)[qa].apply(Ra,rd);return endBatch(),resetTracking(),sd}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(Ra=>Ra!=="arguments"&&Ra!=="caller").map(Ra=>Symbol[Ra]).filter(isSymbol));function hasOwnProperty$e(Ra){isSymbol(Ra)||(Ra=String(Ra));const qa=toRaw(this);return track(qa,"has",Ra),qa.hasOwnProperty(Ra)}class BaseReactiveHandler{constructor(qa=!1,rd=!1){this._isReadonly=qa,this._isShallow=rd}get(qa,rd,sd){if(rd==="__v_skip")return qa.__v_skip;const pd=this._isReadonly,fd=this._isShallow;if(rd==="__v_isReactive")return!pd;if(rd==="__v_isReadonly")return pd;if(rd==="__v_isShallow")return fd;if(rd==="__v_raw")return sd===(pd?fd?shallowReadonlyMap:readonlyMap:fd?shallowReactiveMap:reactiveMap).get(qa)||Object.getPrototypeOf(qa)===Object.getPrototypeOf(sd)?qa:void 0;const hd=isArray$2(qa);if(!pd){let gd;if(hd&&(gd=arrayInstrumentations[rd]))return gd;if(rd==="hasOwnProperty")return hasOwnProperty$e}const md=Reflect.get(qa,rd,isRef(qa)?qa:sd);return(isSymbol(rd)?builtInSymbols.has(rd):isNonTrackableKeys(rd))||(pd||track(qa,"get",rd),fd)?md:isRef(md)?hd&&isIntegerKey(rd)?md:md.value:isObject$9(md)?pd?readonly(md):reactive(md):md}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(qa=!1){super(!1,qa)}set(qa,rd,sd,pd){let fd=qa[rd];if(!this._isShallow){const gd=isReadonly(fd);if(!isShallow(sd)&&!isReadonly(sd)&&(fd=toRaw(fd),sd=toRaw(sd)),!isArray$2(qa)&&isRef(fd)&&!isRef(sd))return gd?!1:(fd.value=sd,!0)}const hd=isArray$2(qa)&&isIntegerKey(rd)?Number(rd)Ra,getProto$3=Ra=>Reflect.getPrototypeOf(Ra);function createIterableMethod(Ra,qa,rd){return function(...sd){const pd=this.__v_raw,fd=toRaw(pd),hd=isMap(fd),md=Ra==="entries"||Ra===Symbol.iterator&&hd,gd=Ra==="keys"&&hd,yd=pd[Ra](...sd),vd=rd?toShallow:qa?toReadonly:toReactive;return!qa&&track(fd,"iterate",gd?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:Nd,done:Md}=yd.next();return Md?{value:Nd,done:Md}:{value:md?[vd(Nd[0]),vd(Nd[1])]:vd(Nd),done:Md}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(Ra){return function(...qa){return Ra==="delete"?!1:Ra==="clear"?void 0:this}}function createInstrumentations(Ra,qa){const rd={get(pd){const fd=this.__v_raw,hd=toRaw(fd),md=toRaw(pd);Ra||(hasChanged(pd,md)&&track(hd,"get",pd),track(hd,"get",md));const{has:gd}=getProto$3(hd),yd=qa?toShallow:Ra?toReadonly:toReactive;if(gd.call(hd,pd))return yd(fd.get(pd));if(gd.call(hd,md))return yd(fd.get(md));fd!==hd&&fd.get(pd)},get size(){const pd=this.__v_raw;return!Ra&&track(toRaw(pd),"iterate",ITERATE_KEY),Reflect.get(pd,"size",pd)},has(pd){const fd=this.__v_raw,hd=toRaw(fd),md=toRaw(pd);return Ra||(hasChanged(pd,md)&&track(hd,"has",pd),track(hd,"has",md)),pd===md?fd.has(pd):fd.has(pd)||fd.has(md)},forEach(pd,fd){const hd=this,md=hd.__v_raw,gd=toRaw(md),yd=qa?toShallow:Ra?toReadonly:toReactive;return!Ra&&track(gd,"iterate",ITERATE_KEY),md.forEach((vd,Nd)=>pd.call(fd,yd(vd),yd(Nd),hd))}};return extend$4(rd,Ra?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(pd){!qa&&!isShallow(pd)&&!isReadonly(pd)&&(pd=toRaw(pd));const fd=toRaw(this);return getProto$3(fd).has.call(fd,pd)||(fd.add(pd),trigger(fd,"add",pd,pd)),this},set(pd,fd){!qa&&!isShallow(fd)&&!isReadonly(fd)&&(fd=toRaw(fd));const hd=toRaw(this),{has:md,get:gd}=getProto$3(hd);let yd=md.call(hd,pd);yd||(pd=toRaw(pd),yd=md.call(hd,pd));const vd=gd.call(hd,pd);return hd.set(pd,fd),yd?hasChanged(fd,vd)&&trigger(hd,"set",pd,fd):trigger(hd,"add",pd,fd),this},delete(pd){const fd=toRaw(this),{has:hd,get:md}=getProto$3(fd);let gd=hd.call(fd,pd);gd||(pd=toRaw(pd),gd=hd.call(fd,pd)),md&&md.call(fd,pd);const yd=fd.delete(pd);return gd&&trigger(fd,"delete",pd,void 0),yd},clear(){const pd=toRaw(this),fd=pd.size!==0,hd=pd.clear();return fd&&trigger(pd,"clear",void 0,void 0),hd}}),["keys","values","entries",Symbol.iterator].forEach(pd=>{rd[pd]=createIterableMethod(pd,Ra,qa)}),rd}function createInstrumentationGetter(Ra,qa){const rd=createInstrumentations(Ra,qa);return(sd,pd,fd)=>pd==="__v_isReactive"?!Ra:pd==="__v_isReadonly"?Ra:pd==="__v_raw"?sd:Reflect.get(hasOwn$4(rd,pd)&&pd in sd?rd:sd,pd,fd)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(Ra){switch(Ra){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(Ra){return Ra.__v_skip||!Object.isExtensible(Ra)?0:targetTypeMap(toRawType(Ra))}function reactive(Ra){return isReadonly(Ra)?Ra:createReactiveObject(Ra,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(Ra){return createReactiveObject(Ra,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(Ra){return createReactiveObject(Ra,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(Ra){return createReactiveObject(Ra,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(Ra,qa,rd,sd,pd){if(!isObject$9(Ra)||Ra.__v_raw&&!(qa&&Ra.__v_isReactive))return Ra;const fd=pd.get(Ra);if(fd)return fd;const hd=getTargetType(Ra);if(hd===0)return Ra;const md=new Proxy(Ra,hd===2?sd:rd);return pd.set(Ra,md),md}function isReactive(Ra){return isReadonly(Ra)?isReactive(Ra.__v_raw):!!(Ra&&Ra.__v_isReactive)}function isReadonly(Ra){return!!(Ra&&Ra.__v_isReadonly)}function isShallow(Ra){return!!(Ra&&Ra.__v_isShallow)}function isProxy(Ra){return Ra?!!Ra.__v_raw:!1}function toRaw(Ra){const qa=Ra&&Ra.__v_raw;return qa?toRaw(qa):Ra}function markRaw(Ra){return!hasOwn$4(Ra,"__v_skip")&&Object.isExtensible(Ra)&&def$2(Ra,"__v_skip",!0),Ra}const toReactive=Ra=>isObject$9(Ra)?reactive(Ra):Ra,toReadonly=Ra=>isObject$9(Ra)?readonly(Ra):Ra;function isRef(Ra){return Ra?Ra.__v_isRef===!0:!1}function ref$1(Ra){return createRef(Ra,!1)}function shallowRef(Ra){return createRef(Ra,!0)}function createRef(Ra,qa){return isRef(Ra)?Ra:new RefImpl(Ra,qa)}class RefImpl{constructor(qa,rd){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=rd?qa:toRaw(qa),this._value=rd?qa:toReactive(qa),this.__v_isShallow=rd}get value(){return this.dep.track(),this._value}set value(qa){const rd=this._rawValue,sd=this.__v_isShallow||isShallow(qa)||isReadonly(qa);qa=sd?qa:toRaw(qa),hasChanged(qa,rd)&&(this._rawValue=qa,this._value=sd?qa:toReactive(qa),this.dep.trigger())}}function unref(Ra){return isRef(Ra)?Ra.value:Ra}function toValue$2(Ra){return isFunction$4(Ra)?Ra():unref(Ra)}const shallowUnwrapHandlers={get:(Ra,qa,rd)=>qa==="__v_raw"?Ra:unref(Reflect.get(Ra,qa,rd)),set:(Ra,qa,rd,sd)=>{const pd=Ra[qa];return isRef(pd)&&!isRef(rd)?(pd.value=rd,!0):Reflect.set(Ra,qa,rd,sd)}};function proxyRefs(Ra){return isReactive(Ra)?Ra:new Proxy(Ra,shallowUnwrapHandlers)}class CustomRefImpl{constructor(qa){this.__v_isRef=!0,this._value=void 0;const rd=this.dep=new Dep,{get:sd,set:pd}=qa(rd.track.bind(rd),rd.trigger.bind(rd));this._get=sd,this._set=pd}get value(){return this._value=this._get()}set value(qa){this._set(qa)}}function customRef(Ra){return new CustomRefImpl(Ra)}function toRefs(Ra){const qa=isArray$2(Ra)?new Array(Ra.length):{};for(const rd in Ra)qa[rd]=propertyToRef(Ra,rd);return qa}class ObjectRefImpl{constructor(qa,rd,sd){this._object=qa,this._key=rd,this._defaultValue=sd,this.__v_isRef=!0,this._value=void 0}get value(){const qa=this._object[this._key];return this._value=qa===void 0?this._defaultValue:qa}set value(qa){this._object[this._key]=qa}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(qa){this._getter=qa,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function toRef$1(Ra,qa,rd){return isRef(Ra)?Ra:isFunction$4(Ra)?new GetterRefImpl(Ra):isObject$9(Ra)&&arguments.length>1?propertyToRef(Ra,qa,rd):ref$1(Ra)}function propertyToRef(Ra,qa,rd){const sd=Ra[qa];return isRef(sd)?sd:new ObjectRefImpl(Ra,qa,rd)}class ComputedRefImpl{constructor(qa,rd,sd){this.fn=qa,this.setter=rd,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!rd,this.isSSR=sd}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){const qa=this.dep.track();return refreshComputed(this),qa&&(qa.version=this.dep.version),this._value}set value(qa){this.setter&&this.setter(qa)}}function computed$1(Ra,qa,rd=!1){let sd,pd;return isFunction$4(Ra)?sd=Ra:(sd=Ra.get,pd=Ra.set),new ComputedRefImpl(sd,pd,rd)}const INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function onWatcherCleanup(Ra,qa=!1,rd=activeWatcher){if(rd){let sd=cleanupMap.get(rd);sd||cleanupMap.set(rd,sd=[]),sd.push(Ra)}}function watch$1(Ra,qa,rd=EMPTY_OBJ){const{immediate:sd,deep:pd,once:fd,scheduler:hd,augmentJob:md,call:gd}=rd,yd=Wd=>pd?Wd:isShallow(Wd)||pd===!1||pd===0?traverse(Wd,1):traverse(Wd);let vd,Nd,Md,Ld,Fd=!1,Hd=!1;if(isRef(Ra)?(Nd=()=>Ra.value,Fd=isShallow(Ra)):isReactive(Ra)?(Nd=()=>yd(Ra),Fd=!0):isArray$2(Ra)?(Hd=!0,Fd=Ra.some(Wd=>isReactive(Wd)||isShallow(Wd)),Nd=()=>Ra.map(Wd=>{if(isRef(Wd))return Wd.value;if(isReactive(Wd))return yd(Wd);if(isFunction$4(Wd))return gd?gd(Wd,2):Wd()})):isFunction$4(Ra)?qa?Nd=gd?()=>gd(Ra,2):Ra:Nd=()=>{if(Md){pauseTracking();try{Md()}finally{resetTracking()}}const Wd=activeWatcher;activeWatcher=vd;try{return gd?gd(Ra,3,[Ld]):Ra(Ld)}finally{activeWatcher=Wd}}:Nd=NOOP,qa&&pd){const Wd=Nd,Kd=pd===!0?1/0:pd;Nd=()=>traverse(Wd(),Kd)}const Vd=getCurrentScope(),Gd=()=>{vd.stop(),Vd&&Vd.active&&remove$2(Vd.effects,vd)};if(fd&&qa){const Wd=qa;qa=(...Kd)=>{Wd(...Kd),Gd()}}let Ud=Hd?new Array(Ra.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const qd=Wd=>{if(!(!(vd.flags&1)||!vd.dirty&&!Wd))if(qa){const Kd=vd.run();if(pd||Fd||(Hd?Kd.some((Xd,df)=>hasChanged(Xd,Ud[df])):hasChanged(Kd,Ud))){Md&&Md();const Xd=activeWatcher;activeWatcher=vd;try{const df=[Kd,Ud===INITIAL_WATCHER_VALUE?void 0:Hd&&Ud[0]===INITIAL_WATCHER_VALUE?[]:Ud,Ld];gd?gd(qa,3,df):qa(...df),Ud=Kd}finally{activeWatcher=Xd}}}else vd.run()};return md&&md(qd),vd=new ReactiveEffect(Nd),vd.scheduler=hd?()=>hd(qd,!1):qd,Ld=Wd=>onWatcherCleanup(Wd,!1,vd),Md=vd.onStop=()=>{const Wd=cleanupMap.get(vd);if(Wd){if(gd)gd(Wd,4);else for(const Kd of Wd)Kd();cleanupMap.delete(vd)}},qa?sd?qd(!0):Ud=vd.run():hd?hd(qd.bind(null,!0),!0):vd.run(),Gd.pause=vd.pause.bind(vd),Gd.resume=vd.resume.bind(vd),Gd.stop=Gd,Gd}function traverse(Ra,qa=1/0,rd){if(qa<=0||!isObject$9(Ra)||Ra.__v_skip||(rd=rd||new Set,rd.has(Ra)))return Ra;if(rd.add(Ra),qa--,isRef(Ra))traverse(Ra.value,qa,rd);else if(isArray$2(Ra))for(let sd=0;sd{traverse(sd,qa,rd)});else if(isPlainObject$6(Ra)){for(const sd in Ra)traverse(Ra[sd],qa,rd);for(const sd of Object.getOwnPropertySymbols(Ra))Object.prototype.propertyIsEnumerable.call(Ra,sd)&&traverse(Ra[sd],qa,rd)}return Ra}/** +**/let activeEffectScope;class EffectScope{constructor(ed=!1){this.detached=ed,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=activeEffectScope,!ed&&activeEffectScope&&(this.index=(activeEffectScope.scopes||(activeEffectScope.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let ed,ud;if(this.scopes)for(ed=0,ud=this.scopes.length;ed0)return;if(batchedComputed){let ed=batchedComputed;for(batchedComputed=void 0;ed;){const ud=ed.next;ed.next=void 0,ed.flags&=-9,ed=ud}}let Ra;for(;batchedSub;){let ed=batchedSub;for(batchedSub=void 0;ed;){const ud=ed.next;if(ed.next=void 0,ed.flags&=-9,ed.flags&1)try{ed.trigger()}catch(dd){Ra||(Ra=dd)}ed=ud}}if(Ra)throw Ra}function prepareDeps(Ra){for(let ed=Ra.deps;ed;ed=ed.nextDep)ed.version=-1,ed.prevActiveLink=ed.dep.activeLink,ed.dep.activeLink=ed}function cleanupDeps(Ra){let ed,ud=Ra.depsTail,dd=ud;for(;dd;){const hd=dd.prevDep;dd.version===-1?(dd===ud&&(ud=hd),removeSub(dd),removeDep(dd)):ed=dd,dd.dep.activeLink=dd.prevActiveLink,dd.prevActiveLink=void 0,dd=hd}Ra.deps=ed,Ra.depsTail=ud}function isDirty(Ra){for(let ed=Ra.deps;ed;ed=ed.nextDep)if(ed.dep.version!==ed.version||ed.dep.computed&&(refreshComputed(ed.dep.computed)||ed.dep.version!==ed.version))return!0;return!!Ra._dirty}function refreshComputed(Ra){if(Ra.flags&4&&!(Ra.flags&16)||(Ra.flags&=-17,Ra.globalVersion===globalVersion))return;Ra.globalVersion=globalVersion;const ed=Ra.dep;if(Ra.flags|=2,ed.version>0&&!Ra.isSSR&&Ra.deps&&!isDirty(Ra)){Ra.flags&=-3;return}const ud=activeSub,dd=shouldTrack;activeSub=Ra,shouldTrack=!0;try{prepareDeps(Ra);const hd=Ra.fn(Ra._value);(ed.version===0||hasChanged(hd,Ra._value))&&(Ra._value=hd,ed.version++)}catch(hd){throw ed.version++,hd}finally{activeSub=ud,shouldTrack=dd,cleanupDeps(Ra),Ra.flags&=-3}}function removeSub(Ra,ed=!1){const{dep:ud,prevSub:dd,nextSub:hd}=Ra;if(dd&&(dd.nextSub=hd,Ra.prevSub=void 0),hd&&(hd.prevSub=dd,Ra.nextSub=void 0),ud.subs===Ra&&(ud.subs=dd,!dd&&ud.computed)){ud.computed.flags&=-5;for(let md=ud.computed.deps;md;md=md.nextDep)removeSub(md,!0)}!ed&&!--ud.sc&&ud.map&&ud.map.delete(ud.key)}function removeDep(Ra){const{prevDep:ed,nextDep:ud}=Ra;ed&&(ed.nextDep=ud,Ra.prevDep=void 0),ud&&(ud.prevDep=ed,Ra.nextDep=void 0)}let shouldTrack=!0;const trackStack=[];function pauseTracking(){trackStack.push(shouldTrack),shouldTrack=!1}function resetTracking(){const Ra=trackStack.pop();shouldTrack=Ra===void 0?!0:Ra}function cleanupEffect(Ra){const{cleanup:ed}=Ra;if(Ra.cleanup=void 0,ed){const ud=activeSub;activeSub=void 0;try{ed()}finally{activeSub=ud}}}let globalVersion=0;class Link{constructor(ed,ud){this.sub=ed,this.dep=ud,this.version=ud.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Dep{constructor(ed){this.computed=ed,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(ed){if(!activeSub||!shouldTrack||activeSub===this.computed)return;let ud=this.activeLink;if(ud===void 0||ud.sub!==activeSub)ud=this.activeLink=new Link(activeSub,this),activeSub.deps?(ud.prevDep=activeSub.depsTail,activeSub.depsTail.nextDep=ud,activeSub.depsTail=ud):activeSub.deps=activeSub.depsTail=ud,addSub(ud);else if(ud.version===-1&&(ud.version=this.version,ud.nextDep)){const dd=ud.nextDep;dd.prevDep=ud.prevDep,ud.prevDep&&(ud.prevDep.nextDep=dd),ud.prevDep=activeSub.depsTail,ud.nextDep=void 0,activeSub.depsTail.nextDep=ud,activeSub.depsTail=ud,activeSub.deps===ud&&(activeSub.deps=dd)}return ud}trigger(ed){this.version++,globalVersion++,this.notify(ed)}notify(ed){startBatch();try{for(let ud=this.subs;ud;ud=ud.prevSub)ud.sub.notify()&&ud.sub.dep.notify()}finally{endBatch()}}}function addSub(Ra){if(Ra.dep.sc++,Ra.sub.flags&4){const ed=Ra.dep.computed;if(ed&&!Ra.dep.subs){ed.flags|=20;for(let dd=ed.deps;dd;dd=dd.nextDep)addSub(dd)}const ud=Ra.dep.subs;ud!==Ra&&(Ra.prevSub=ud,ud&&(ud.nextSub=Ra)),Ra.dep.subs=Ra}}const targetMap=new WeakMap,ITERATE_KEY=Symbol(""),MAP_KEY_ITERATE_KEY=Symbol(""),ARRAY_ITERATE_KEY=Symbol("");function track(Ra,ed,ud){if(shouldTrack&&activeSub){let dd=targetMap.get(Ra);dd||targetMap.set(Ra,dd=new Map);let hd=dd.get(ud);hd||(dd.set(ud,hd=new Dep),hd.map=dd,hd.key=ud),hd.track()}}function trigger(Ra,ed,ud,dd,hd,md){const gd=targetMap.get(Ra);if(!gd){globalVersion++;return}const yd=vd=>{vd&&vd.trigger()};if(startBatch(),ed==="clear")gd.forEach(yd);else{const vd=isArray$3(Ra),Cd=vd&&isIntegerKey(ud);if(vd&&ud==="length"){const wd=Number(dd);gd.forEach((Nd,Ld)=>{(Ld==="length"||Ld===ARRAY_ITERATE_KEY||!isSymbol(Ld)&&Ld>=wd)&&yd(Nd)})}else switch((ud!==void 0||gd.has(void 0))&&yd(gd.get(ud)),Cd&&yd(gd.get(ARRAY_ITERATE_KEY)),ed){case"add":vd?Cd&&yd(gd.get("length")):(yd(gd.get(ITERATE_KEY)),isMap(Ra)&&yd(gd.get(MAP_KEY_ITERATE_KEY)));break;case"delete":vd||(yd(gd.get(ITERATE_KEY)),isMap(Ra)&&yd(gd.get(MAP_KEY_ITERATE_KEY)));break;case"set":isMap(Ra)&&yd(gd.get(ITERATE_KEY));break}}endBatch()}function getDepFromReactive(Ra,ed){const ud=targetMap.get(Ra);return ud&&ud.get(ed)}function reactiveReadArray(Ra){const ed=toRaw(Ra);return ed===Ra?ed:(track(ed,"iterate",ARRAY_ITERATE_KEY),isShallow(Ra)?ed:ed.map(toReactive))}function shallowReadArray(Ra){return track(Ra=toRaw(Ra),"iterate",ARRAY_ITERATE_KEY),Ra}const arrayInstrumentations={__proto__:null,[Symbol.iterator](){return iterator(this,Symbol.iterator,toReactive)},concat(...Ra){return reactiveReadArray(this).concat(...Ra.map(ed=>isArray$3(ed)?reactiveReadArray(ed):ed))},entries(){return iterator(this,"entries",Ra=>(Ra[1]=toReactive(Ra[1]),Ra))},every(Ra,ed){return apply$3(this,"every",Ra,ed,void 0,arguments)},filter(Ra,ed){return apply$3(this,"filter",Ra,ed,ud=>ud.map(toReactive),arguments)},find(Ra,ed){return apply$3(this,"find",Ra,ed,toReactive,arguments)},findIndex(Ra,ed){return apply$3(this,"findIndex",Ra,ed,void 0,arguments)},findLast(Ra,ed){return apply$3(this,"findLast",Ra,ed,toReactive,arguments)},findLastIndex(Ra,ed){return apply$3(this,"findLastIndex",Ra,ed,void 0,arguments)},forEach(Ra,ed){return apply$3(this,"forEach",Ra,ed,void 0,arguments)},includes(...Ra){return searchProxy(this,"includes",Ra)},indexOf(...Ra){return searchProxy(this,"indexOf",Ra)},join(Ra){return reactiveReadArray(this).join(Ra)},lastIndexOf(...Ra){return searchProxy(this,"lastIndexOf",Ra)},map(Ra,ed){return apply$3(this,"map",Ra,ed,void 0,arguments)},pop(){return noTracking(this,"pop")},push(...Ra){return noTracking(this,"push",Ra)},reduce(Ra,...ed){return reduce$2(this,"reduce",Ra,ed)},reduceRight(Ra,...ed){return reduce$2(this,"reduceRight",Ra,ed)},shift(){return noTracking(this,"shift")},some(Ra,ed){return apply$3(this,"some",Ra,ed,void 0,arguments)},splice(...Ra){return noTracking(this,"splice",Ra)},toReversed(){return reactiveReadArray(this).toReversed()},toSorted(Ra){return reactiveReadArray(this).toSorted(Ra)},toSpliced(...Ra){return reactiveReadArray(this).toSpliced(...Ra)},unshift(...Ra){return noTracking(this,"unshift",Ra)},values(){return iterator(this,"values",toReactive)}};function iterator(Ra,ed,ud){const dd=shallowReadArray(Ra),hd=dd[ed]();return dd!==Ra&&!isShallow(Ra)&&(hd._next=hd.next,hd.next=()=>{const md=hd._next();return md.value&&(md.value=ud(md.value)),md}),hd}const arrayProto$1=Array.prototype;function apply$3(Ra,ed,ud,dd,hd,md){const gd=shallowReadArray(Ra),yd=gd!==Ra&&!isShallow(Ra),vd=gd[ed];if(vd!==arrayProto$1[ed]){const Nd=vd.apply(Ra,md);return yd?toReactive(Nd):Nd}let Cd=ud;gd!==Ra&&(yd?Cd=function(Nd,Ld){return ud.call(this,toReactive(Nd),Ld,Ra)}:ud.length>2&&(Cd=function(Nd,Ld){return ud.call(this,Nd,Ld,Ra)}));const wd=vd.call(gd,Cd,dd);return yd&&hd?hd(wd):wd}function reduce$2(Ra,ed,ud,dd){const hd=shallowReadArray(Ra);let md=ud;return hd!==Ra&&(isShallow(Ra)?ud.length>3&&(md=function(gd,yd,vd){return ud.call(this,gd,yd,vd,Ra)}):md=function(gd,yd,vd){return ud.call(this,gd,toReactive(yd),vd,Ra)}),hd[ed](md,...dd)}function searchProxy(Ra,ed,ud){const dd=toRaw(Ra);track(dd,"iterate",ARRAY_ITERATE_KEY);const hd=dd[ed](...ud);return(hd===-1||hd===!1)&&isProxy(ud[0])?(ud[0]=toRaw(ud[0]),dd[ed](...ud)):hd}function noTracking(Ra,ed,ud=[]){pauseTracking(),startBatch();const dd=toRaw(Ra)[ed].apply(Ra,ud);return endBatch(),resetTracking(),dd}const isNonTrackableKeys=makeMap("__proto__,__v_isRef,__isVue"),builtInSymbols=new Set(Object.getOwnPropertyNames(Symbol).filter(Ra=>Ra!=="arguments"&&Ra!=="caller").map(Ra=>Symbol[Ra]).filter(isSymbol));function hasOwnProperty$e(Ra){isSymbol(Ra)||(Ra=String(Ra));const ed=toRaw(this);return track(ed,"has",Ra),ed.hasOwnProperty(Ra)}class BaseReactiveHandler{constructor(ed=!1,ud=!1){this._isReadonly=ed,this._isShallow=ud}get(ed,ud,dd){if(ud==="__v_skip")return ed.__v_skip;const hd=this._isReadonly,md=this._isShallow;if(ud==="__v_isReactive")return!hd;if(ud==="__v_isReadonly")return hd;if(ud==="__v_isShallow")return md;if(ud==="__v_raw")return dd===(hd?md?shallowReadonlyMap:readonlyMap:md?shallowReactiveMap:reactiveMap).get(ed)||Object.getPrototypeOf(ed)===Object.getPrototypeOf(dd)?ed:void 0;const gd=isArray$3(ed);if(!hd){let vd;if(gd&&(vd=arrayInstrumentations[ud]))return vd;if(ud==="hasOwnProperty")return hasOwnProperty$e}const yd=Reflect.get(ed,ud,isRef(ed)?ed:dd);return(isSymbol(ud)?builtInSymbols.has(ud):isNonTrackableKeys(ud))||(hd||track(ed,"get",ud),md)?yd:isRef(yd)?gd&&isIntegerKey(ud)?yd:yd.value:isObject$9(yd)?hd?readonly(yd):reactive(yd):yd}}class MutableReactiveHandler extends BaseReactiveHandler{constructor(ed=!1){super(!1,ed)}set(ed,ud,dd,hd){let md=ed[ud];if(!this._isShallow){const vd=isReadonly(md);if(!isShallow(dd)&&!isReadonly(dd)&&(md=toRaw(md),dd=toRaw(dd)),!isArray$3(ed)&&isRef(md)&&!isRef(dd))return vd?!1:(md.value=dd,!0)}const gd=isArray$3(ed)&&isIntegerKey(ud)?Number(ud)Ra,getProto$3=Ra=>Reflect.getPrototypeOf(Ra);function createIterableMethod(Ra,ed,ud){return function(...dd){const hd=this.__v_raw,md=toRaw(hd),gd=isMap(md),yd=Ra==="entries"||Ra===Symbol.iterator&&gd,vd=Ra==="keys"&&gd,Cd=hd[Ra](...dd),wd=ud?toShallow:ed?toReadonly:toReactive;return!ed&&track(md,"iterate",vd?MAP_KEY_ITERATE_KEY:ITERATE_KEY),{next(){const{value:Nd,done:Ld}=Cd.next();return Ld?{value:Nd,done:Ld}:{value:yd?[wd(Nd[0]),wd(Nd[1])]:wd(Nd),done:Ld}},[Symbol.iterator](){return this}}}}function createReadonlyMethod(Ra){return function(...ed){return Ra==="delete"?!1:Ra==="clear"?void 0:this}}function createInstrumentations(Ra,ed){const ud={get(hd){const md=this.__v_raw,gd=toRaw(md),yd=toRaw(hd);Ra||(hasChanged(hd,yd)&&track(gd,"get",hd),track(gd,"get",yd));const{has:vd}=getProto$3(gd),Cd=ed?toShallow:Ra?toReadonly:toReactive;if(vd.call(gd,hd))return Cd(md.get(hd));if(vd.call(gd,yd))return Cd(md.get(yd));md!==gd&&md.get(hd)},get size(){const hd=this.__v_raw;return!Ra&&track(toRaw(hd),"iterate",ITERATE_KEY),Reflect.get(hd,"size",hd)},has(hd){const md=this.__v_raw,gd=toRaw(md),yd=toRaw(hd);return Ra||(hasChanged(hd,yd)&&track(gd,"has",hd),track(gd,"has",yd)),hd===yd?md.has(hd):md.has(hd)||md.has(yd)},forEach(hd,md){const gd=this,yd=gd.__v_raw,vd=toRaw(yd),Cd=ed?toShallow:Ra?toReadonly:toReactive;return!Ra&&track(vd,"iterate",ITERATE_KEY),yd.forEach((wd,Nd)=>hd.call(md,Cd(wd),Cd(Nd),gd))}};return extend$4(ud,Ra?{add:createReadonlyMethod("add"),set:createReadonlyMethod("set"),delete:createReadonlyMethod("delete"),clear:createReadonlyMethod("clear")}:{add(hd){!ed&&!isShallow(hd)&&!isReadonly(hd)&&(hd=toRaw(hd));const md=toRaw(this);return getProto$3(md).has.call(md,hd)||(md.add(hd),trigger(md,"add",hd,hd)),this},set(hd,md){!ed&&!isShallow(md)&&!isReadonly(md)&&(md=toRaw(md));const gd=toRaw(this),{has:yd,get:vd}=getProto$3(gd);let Cd=yd.call(gd,hd);Cd||(hd=toRaw(hd),Cd=yd.call(gd,hd));const wd=vd.call(gd,hd);return gd.set(hd,md),Cd?hasChanged(md,wd)&&trigger(gd,"set",hd,md):trigger(gd,"add",hd,md),this},delete(hd){const md=toRaw(this),{has:gd,get:yd}=getProto$3(md);let vd=gd.call(md,hd);vd||(hd=toRaw(hd),vd=gd.call(md,hd)),yd&&yd.call(md,hd);const Cd=md.delete(hd);return vd&&trigger(md,"delete",hd,void 0),Cd},clear(){const hd=toRaw(this),md=hd.size!==0,gd=hd.clear();return md&&trigger(hd,"clear",void 0,void 0),gd}}),["keys","values","entries",Symbol.iterator].forEach(hd=>{ud[hd]=createIterableMethod(hd,Ra,ed)}),ud}function createInstrumentationGetter(Ra,ed){const ud=createInstrumentations(Ra,ed);return(dd,hd,md)=>hd==="__v_isReactive"?!Ra:hd==="__v_isReadonly"?Ra:hd==="__v_raw"?dd:Reflect.get(hasOwn$4(ud,hd)&&hd in dd?ud:dd,hd,md)}const mutableCollectionHandlers={get:createInstrumentationGetter(!1,!1)},shallowCollectionHandlers={get:createInstrumentationGetter(!1,!0)},readonlyCollectionHandlers={get:createInstrumentationGetter(!0,!1)},shallowReadonlyCollectionHandlers={get:createInstrumentationGetter(!0,!0)},reactiveMap=new WeakMap,shallowReactiveMap=new WeakMap,readonlyMap=new WeakMap,shallowReadonlyMap=new WeakMap;function targetTypeMap(Ra){switch(Ra){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function getTargetType(Ra){return Ra.__v_skip||!Object.isExtensible(Ra)?0:targetTypeMap(toRawType(Ra))}function reactive(Ra){return isReadonly(Ra)?Ra:createReactiveObject(Ra,!1,mutableHandlers,mutableCollectionHandlers,reactiveMap)}function shallowReactive(Ra){return createReactiveObject(Ra,!1,shallowReactiveHandlers,shallowCollectionHandlers,shallowReactiveMap)}function readonly(Ra){return createReactiveObject(Ra,!0,readonlyHandlers,readonlyCollectionHandlers,readonlyMap)}function shallowReadonly(Ra){return createReactiveObject(Ra,!0,shallowReadonlyHandlers,shallowReadonlyCollectionHandlers,shallowReadonlyMap)}function createReactiveObject(Ra,ed,ud,dd,hd){if(!isObject$9(Ra)||Ra.__v_raw&&!(ed&&Ra.__v_isReactive))return Ra;const md=hd.get(Ra);if(md)return md;const gd=getTargetType(Ra);if(gd===0)return Ra;const yd=new Proxy(Ra,gd===2?dd:ud);return hd.set(Ra,yd),yd}function isReactive(Ra){return isReadonly(Ra)?isReactive(Ra.__v_raw):!!(Ra&&Ra.__v_isReactive)}function isReadonly(Ra){return!!(Ra&&Ra.__v_isReadonly)}function isShallow(Ra){return!!(Ra&&Ra.__v_isShallow)}function isProxy(Ra){return Ra?!!Ra.__v_raw:!1}function toRaw(Ra){const ed=Ra&&Ra.__v_raw;return ed?toRaw(ed):Ra}function markRaw(Ra){return!hasOwn$4(Ra,"__v_skip")&&Object.isExtensible(Ra)&&def$2(Ra,"__v_skip",!0),Ra}const toReactive=Ra=>isObject$9(Ra)?reactive(Ra):Ra,toReadonly=Ra=>isObject$9(Ra)?readonly(Ra):Ra;function isRef(Ra){return Ra?Ra.__v_isRef===!0:!1}function ref$1(Ra){return createRef(Ra,!1)}function shallowRef(Ra){return createRef(Ra,!0)}function createRef(Ra,ed){return isRef(Ra)?Ra:new RefImpl(Ra,ed)}class RefImpl{constructor(ed,ud){this.dep=new Dep,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=ud?ed:toRaw(ed),this._value=ud?ed:toReactive(ed),this.__v_isShallow=ud}get value(){return this.dep.track(),this._value}set value(ed){const ud=this._rawValue,dd=this.__v_isShallow||isShallow(ed)||isReadonly(ed);ed=dd?ed:toRaw(ed),hasChanged(ed,ud)&&(this._rawValue=ed,this._value=dd?ed:toReactive(ed),this.dep.trigger())}}function unref(Ra){return isRef(Ra)?Ra.value:Ra}function toValue$2(Ra){return isFunction$4(Ra)?Ra():unref(Ra)}const shallowUnwrapHandlers={get:(Ra,ed,ud)=>ed==="__v_raw"?Ra:unref(Reflect.get(Ra,ed,ud)),set:(Ra,ed,ud,dd)=>{const hd=Ra[ed];return isRef(hd)&&!isRef(ud)?(hd.value=ud,!0):Reflect.set(Ra,ed,ud,dd)}};function proxyRefs(Ra){return isReactive(Ra)?Ra:new Proxy(Ra,shallowUnwrapHandlers)}class CustomRefImpl{constructor(ed){this.__v_isRef=!0,this._value=void 0;const ud=this.dep=new Dep,{get:dd,set:hd}=ed(ud.track.bind(ud),ud.trigger.bind(ud));this._get=dd,this._set=hd}get value(){return this._value=this._get()}set value(ed){this._set(ed)}}function customRef(Ra){return new CustomRefImpl(Ra)}function toRefs(Ra){const ed=isArray$3(Ra)?new Array(Ra.length):{};for(const ud in Ra)ed[ud]=propertyToRef(Ra,ud);return ed}class ObjectRefImpl{constructor(ed,ud,dd){this._object=ed,this._key=ud,this._defaultValue=dd,this.__v_isRef=!0,this._value=void 0}get value(){const ed=this._object[this._key];return this._value=ed===void 0?this._defaultValue:ed}set value(ed){this._object[this._key]=ed}get dep(){return getDepFromReactive(toRaw(this._object),this._key)}}class GetterRefImpl{constructor(ed){this._getter=ed,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function toRef$1(Ra,ed,ud){return isRef(Ra)?Ra:isFunction$4(Ra)?new GetterRefImpl(Ra):isObject$9(Ra)&&arguments.length>1?propertyToRef(Ra,ed,ud):ref$1(Ra)}function propertyToRef(Ra,ed,ud){const dd=Ra[ed];return isRef(dd)?dd:new ObjectRefImpl(Ra,ed,ud)}class ComputedRefImpl{constructor(ed,ud,dd){this.fn=ed,this.setter=ud,this._value=void 0,this.dep=new Dep(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=globalVersion-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!ud,this.isSSR=dd}notify(){if(this.flags|=16,!(this.flags&8)&&activeSub!==this)return batch(this,!0),!0}get value(){const ed=this.dep.track();return refreshComputed(this),ed&&(ed.version=this.dep.version),this._value}set value(ed){this.setter&&this.setter(ed)}}function computed$1(Ra,ed,ud=!1){let dd,hd;return isFunction$4(Ra)?dd=Ra:(dd=Ra.get,hd=Ra.set),new ComputedRefImpl(dd,hd,ud)}const INITIAL_WATCHER_VALUE={},cleanupMap=new WeakMap;let activeWatcher;function onWatcherCleanup(Ra,ed=!1,ud=activeWatcher){if(ud){let dd=cleanupMap.get(ud);dd||cleanupMap.set(ud,dd=[]),dd.push(Ra)}}function watch$1(Ra,ed,ud=EMPTY_OBJ){const{immediate:dd,deep:hd,once:md,scheduler:gd,augmentJob:yd,call:vd}=ud,Cd=Xd=>hd?Xd:isShallow(Xd)||hd===!1||hd===0?traverse(Xd,1):traverse(Xd);let wd,Nd,Ld,Ud,jd=!1,Gd=!1;if(isRef(Ra)?(Nd=()=>Ra.value,jd=isShallow(Ra)):isReactive(Ra)?(Nd=()=>Cd(Ra),jd=!0):isArray$3(Ra)?(Gd=!0,jd=Ra.some(Xd=>isReactive(Xd)||isShallow(Xd)),Nd=()=>Ra.map(Xd=>{if(isRef(Xd))return Xd.value;if(isReactive(Xd))return Cd(Xd);if(isFunction$4(Xd))return vd?vd(Xd,2):Xd()})):isFunction$4(Ra)?ed?Nd=vd?()=>vd(Ra,2):Ra:Nd=()=>{if(Ld){pauseTracking();try{Ld()}finally{resetTracking()}}const Xd=activeWatcher;activeWatcher=wd;try{return vd?vd(Ra,3,[Ud]):Ra(Ud)}finally{activeWatcher=Xd}}:Nd=NOOP,ed&&hd){const Xd=Nd,Jd=hd===!0?1/0:hd;Nd=()=>traverse(Xd(),Jd)}const Yd=getCurrentScope(),zd=()=>{wd.stop(),Yd&&Yd.active&&remove$2(Yd.effects,wd)};if(md&&ed){const Xd=ed;ed=(...Jd)=>{Xd(...Jd),zd()}}let qd=Gd?new Array(Ra.length).fill(INITIAL_WATCHER_VALUE):INITIAL_WATCHER_VALUE;const Wd=Xd=>{if(!(!(wd.flags&1)||!wd.dirty&&!Xd))if(ed){const Jd=wd.run();if(hd||jd||(Gd?Jd.some((Zd,mf)=>hasChanged(Zd,qd[mf])):hasChanged(Jd,qd))){Ld&&Ld();const Zd=activeWatcher;activeWatcher=wd;try{const mf=[Jd,qd===INITIAL_WATCHER_VALUE?void 0:Gd&&qd[0]===INITIAL_WATCHER_VALUE?[]:qd,Ud];vd?vd(ed,3,mf):ed(...mf),qd=Jd}finally{activeWatcher=Zd}}}else wd.run()};return yd&&yd(Wd),wd=new ReactiveEffect(Nd),wd.scheduler=gd?()=>gd(Wd,!1):Wd,Ud=Xd=>onWatcherCleanup(Xd,!1,wd),Ld=wd.onStop=()=>{const Xd=cleanupMap.get(wd);if(Xd){if(vd)vd(Xd,4);else for(const Jd of Xd)Jd();cleanupMap.delete(wd)}},ed?dd?Wd(!0):qd=wd.run():gd?gd(Wd.bind(null,!0),!0):wd.run(),zd.pause=wd.pause.bind(wd),zd.resume=wd.resume.bind(wd),zd.stop=zd,zd}function traverse(Ra,ed=1/0,ud){if(ed<=0||!isObject$9(Ra)||Ra.__v_skip||(ud=ud||new Set,ud.has(Ra)))return Ra;if(ud.add(Ra),ed--,isRef(Ra))traverse(Ra.value,ed,ud);else if(isArray$3(Ra))for(let dd=0;dd{traverse(dd,ed,ud)});else if(isPlainObject$6(Ra)){for(const dd in Ra)traverse(Ra[dd],ed,ud);for(const dd of Object.getOwnPropertySymbols(Ra))Object.prototype.propertyIsEnumerable.call(Ra,dd)&&traverse(Ra[dd],ed,ud)}return Ra}/** * @vue/runtime-core v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const stack=[];let isWarning=!1;function warn$1(Ra,...qa){if(isWarning)return;isWarning=!0,pauseTracking();const rd=stack.length?stack[stack.length-1].component:null,sd=rd&&rd.appContext.config.warnHandler,pd=getComponentTrace();if(sd)callWithErrorHandling(sd,rd,11,[Ra+qa.map(fd=>{var hd,md;return(md=(hd=fd.toString)==null?void 0:hd.call(fd))!=null?md:JSON.stringify(fd)}).join(""),rd&&rd.proxy,pd.map(({vnode:fd})=>`at <${formatComponentName(rd,fd.type)}>`).join(` -`),pd]);else{const fd=[`[Vue warn]: ${Ra}`,...qa];pd.length&&fd.push(` -`,...formatTrace(pd)),console.warn(...fd)}resetTracking(),isWarning=!1}function getComponentTrace(){let Ra=stack[stack.length-1];if(!Ra)return[];const qa=[];for(;Ra;){const rd=qa[0];rd&&rd.vnode===Ra?rd.recurseCount++:qa.push({vnode:Ra,recurseCount:0});const sd=Ra.component&&Ra.component.parent;Ra=sd&&sd.vnode}return qa}function formatTrace(Ra){const qa=[];return Ra.forEach((rd,sd)=>{qa.push(...sd===0?[]:[` -`],...formatTraceEntry(rd))}),qa}function formatTraceEntry({vnode:Ra,recurseCount:qa}){const rd=qa>0?`... (${qa} recursive calls)`:"",sd=Ra.component?Ra.component.parent==null:!1,pd=` at <${formatComponentName(Ra.component,Ra.type,sd)}`,fd=">"+rd;return Ra.props?[pd,...formatProps(Ra.props),fd]:[pd+fd]}function formatProps(Ra){const qa=[],rd=Object.keys(Ra);return rd.slice(0,3).forEach(sd=>{qa.push(...formatProp(sd,Ra[sd]))}),rd.length>3&&qa.push(" ..."),qa}function formatProp(Ra,qa,rd){return isString$2(qa)?(qa=JSON.stringify(qa),rd?qa:[`${Ra}=${qa}`]):typeof qa=="number"||typeof qa=="boolean"||qa==null?rd?qa:[`${Ra}=${qa}`]:isRef(qa)?(qa=formatProp(Ra,toRaw(qa.value),!0),rd?qa:[`${Ra}=Ref<`,qa,">"]):isFunction$4(qa)?[`${Ra}=fn${qa.name?`<${qa.name}>`:""}`]:(qa=toRaw(qa),rd?qa:[`${Ra}=`,qa])}function callWithErrorHandling(Ra,qa,rd,sd){try{return sd?Ra(...sd):Ra()}catch(pd){handleError$1(pd,qa,rd)}}function callWithAsyncErrorHandling(Ra,qa,rd,sd){if(isFunction$4(Ra)){const pd=callWithErrorHandling(Ra,qa,rd,sd);return pd&&isPromise(pd)&&pd.catch(fd=>{handleError$1(fd,qa,rd)}),pd}if(isArray$2(Ra)){const pd=[];for(let fd=0;fd>>1,pd=queue$2[sd],fd=getId(pd);fd=getId(rd)?queue$2.push(Ra):queue$2.splice(findInsertionIndex(qa),0,Ra),Ra.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(Ra){isArray$2(Ra)?pendingPostFlushCbs.push(...Ra):activePostFlushCbs&&Ra.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,Ra):Ra.flags&1||(pendingPostFlushCbs.push(Ra),Ra.flags|=1),queueFlush()}function flushPreFlushCbs(Ra,qa,rd=flushIndex+1){for(;rdgetId(rd)-getId(sd));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...qa);return}for(activePostFlushCbs=qa,postFlushIndex=0;postFlushIndexRa.id==null?Ra.flags&2?-1:1/0:Ra.id;function flushJobs(Ra){try{for(flushIndex=0;flushIndex{sd._d&&setBlockTracking(-1);const fd=setCurrentRenderingInstance(qa);let hd;try{hd=Ra(...pd)}finally{setCurrentRenderingInstance(fd),sd._d&&setBlockTracking(1)}return hd};return sd._n=!0,sd._c=!0,sd._d=!0,sd}function withDirectives(Ra,qa){if(currentRenderingInstance===null)return Ra;const rd=getComponentPublicInstance(currentRenderingInstance),sd=Ra.dirs||(Ra.dirs=[]);for(let pd=0;pdRa.__isTeleport,isTeleportDisabled=Ra=>Ra&&(Ra.disabled||Ra.disabled===""),isTeleportDeferred=Ra=>Ra&&(Ra.defer||Ra.defer===""),isTargetSVG=Ra=>typeof SVGElement<"u"&&Ra instanceof SVGElement,isTargetMathML=Ra=>typeof MathMLElement=="function"&&Ra instanceof MathMLElement,resolveTarget=(Ra,qa)=>{const rd=Ra&&Ra.to;return isString$2(rd)?qa?qa(rd):null:rd},TeleportImpl={name:"Teleport",__isTeleport:!0,process(Ra,qa,rd,sd,pd,fd,hd,md,gd,yd){const{mc:vd,pc:Nd,pbc:Md,o:{insert:Ld,querySelector:Fd,createText:Hd,createComment:Vd}}=yd,Gd=isTeleportDisabled(qa.props);let{shapeFlag:Ud,children:qd,dynamicChildren:Wd}=qa;if(Ra==null){const Kd=qa.el=Hd(""),Xd=qa.anchor=Hd("");Ld(Kd,rd,sd),Ld(Xd,rd,sd);const df=(pf,mf)=>{Ud&16&&(pd&&pd.isCE&&(pd.ce._teleportTarget=pf),vd(qd,pf,mf,pd,fd,hd,md,gd))},Ef=()=>{const pf=qa.target=resolveTarget(qa.props,Fd),mf=prepareAnchor(pf,qa,Hd,Ld);pf&&(hd!=="svg"&&isTargetSVG(pf)?hd="svg":hd!=="mathml"&&isTargetMathML(pf)&&(hd="mathml"),Gd||(df(pf,mf),updateCssVars(qa,!1)))};Gd&&(df(rd,Xd),updateCssVars(qa,!0)),isTeleportDeferred(qa.props)?queuePostRenderEffect(()=>{Ef(),qa.el.__isMounted=!0},fd):Ef()}else{if(isTeleportDeferred(qa.props)&&!Ra.el.__isMounted){queuePostRenderEffect(()=>{TeleportImpl.process(Ra,qa,rd,sd,pd,fd,hd,md,gd,yd),delete Ra.el.__isMounted},fd);return}qa.el=Ra.el,qa.targetStart=Ra.targetStart;const Kd=qa.anchor=Ra.anchor,Xd=qa.target=Ra.target,df=qa.targetAnchor=Ra.targetAnchor,Ef=isTeleportDisabled(Ra.props),pf=Ef?rd:Xd,mf=Ef?Kd:df;if(hd==="svg"||isTargetSVG(Xd)?hd="svg":(hd==="mathml"||isTargetMathML(Xd))&&(hd="mathml"),Wd?(Md(Ra.dynamicChildren,Wd,pf,pd,fd,hd,md),traverseStaticChildren(Ra,qa,!0)):gd||Nd(Ra,qa,pf,mf,pd,fd,hd,md,!1),Gd)Ef?qa.props&&Ra.props&&qa.props.to!==Ra.props.to&&(qa.props.to=Ra.props.to):moveTeleport(qa,rd,Kd,yd,1);else if((qa.props&&qa.props.to)!==(Ra.props&&Ra.props.to)){const _f=qa.target=resolveTarget(qa.props,Fd);_f&&moveTeleport(qa,_f,null,yd,0)}else Ef&&moveTeleport(qa,Xd,df,yd,1);updateCssVars(qa,Gd)}},remove(Ra,qa,rd,{um:sd,o:{remove:pd}},fd){const{shapeFlag:hd,children:md,anchor:gd,targetStart:yd,targetAnchor:vd,target:Nd,props:Md}=Ra;if(Nd&&(pd(yd),pd(vd)),fd&&pd(gd),hd&16){const Ld=fd||!isTeleportDisabled(Md);for(let Fd=0;Fd{Ra.isMounted=!0}),onBeforeUnmount(()=>{Ra.isUnmounting=!0}),Ra}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=Ra=>{const qa=Ra.subTree;return qa.component?recursiveGetSubtree(qa.component):qa},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(Ra,{slots:qa}){const rd=getCurrentInstance(),sd=useTransitionState();return()=>{const pd=qa.default&&getTransitionRawChildren(qa.default(),!0);if(!pd||!pd.length)return;const fd=findNonCommentChild(pd),hd=toRaw(Ra),{mode:md}=hd;if(sd.isLeaving)return emptyPlaceholder(fd);const gd=getInnerChild$1(fd);if(!gd)return emptyPlaceholder(fd);let yd=resolveTransitionHooks(gd,hd,sd,rd,Nd=>yd=Nd);gd.type!==Comment$2&&setTransitionHooks(gd,yd);let vd=rd.subTree&&getInnerChild$1(rd.subTree);if(vd&&vd.type!==Comment$2&&!isSameVNodeType(gd,vd)&&recursiveGetSubtree(rd).type!==Comment$2){let Nd=resolveTransitionHooks(vd,hd,sd,rd);if(setTransitionHooks(vd,Nd),md==="out-in"&&gd.type!==Comment$2)return sd.isLeaving=!0,Nd.afterLeave=()=>{sd.isLeaving=!1,rd.job.flags&8||rd.update(),delete Nd.afterLeave,vd=void 0},emptyPlaceholder(fd);md==="in-out"&&gd.type!==Comment$2?Nd.delayLeave=(Md,Ld,Fd)=>{const Hd=getLeavingNodesForType(sd,vd);Hd[String(vd.key)]=vd,Md[leaveCbKey]=()=>{Ld(),Md[leaveCbKey]=void 0,delete yd.delayedLeave,vd=void 0},yd.delayedLeave=()=>{Fd(),delete yd.delayedLeave,vd=void 0}}:vd=void 0}else vd&&(vd=void 0);return fd}}};function findNonCommentChild(Ra){let qa=Ra[0];if(Ra.length>1){for(const rd of Ra)if(rd.type!==Comment$2){qa=rd;break}}return qa}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(Ra,qa){const{leavingVNodes:rd}=Ra;let sd=rd.get(qa.type);return sd||(sd=Object.create(null),rd.set(qa.type,sd)),sd}function resolveTransitionHooks(Ra,qa,rd,sd,pd){const{appear:fd,mode:hd,persisted:md=!1,onBeforeEnter:gd,onEnter:yd,onAfterEnter:vd,onEnterCancelled:Nd,onBeforeLeave:Md,onLeave:Ld,onAfterLeave:Fd,onLeaveCancelled:Hd,onBeforeAppear:Vd,onAppear:Gd,onAfterAppear:Ud,onAppearCancelled:qd}=qa,Wd=String(Ra.key),Kd=getLeavingNodesForType(rd,Ra),Xd=(pf,mf)=>{pf&&callWithAsyncErrorHandling(pf,sd,9,mf)},df=(pf,mf)=>{const _f=mf[1];Xd(pf,mf),isArray$2(pf)?pf.every(xf=>xf.length<=1)&&_f():pf.length<=1&&_f()},Ef={mode:hd,persisted:md,beforeEnter(pf){let mf=gd;if(!rd.isMounted)if(fd)mf=Vd||gd;else return;pf[leaveCbKey]&&pf[leaveCbKey](!0);const _f=Kd[Wd];_f&&isSameVNodeType(Ra,_f)&&_f.el[leaveCbKey]&&_f.el[leaveCbKey](),Xd(mf,[pf])},enter(pf){let mf=yd,_f=vd,xf=Nd;if(!rd.isMounted)if(fd)mf=Gd||yd,_f=Ud||vd,xf=qd||Nd;else return;let Cf=!1;const If=pf[enterCbKey]=Sf=>{Cf||(Cf=!0,Sf?Xd(xf,[pf]):Xd(_f,[pf]),Ef.delayedLeave&&Ef.delayedLeave(),pf[enterCbKey]=void 0)};mf?df(mf,[pf,If]):If()},leave(pf,mf){const _f=String(Ra.key);if(pf[enterCbKey]&&pf[enterCbKey](!0),rd.isUnmounting)return mf();Xd(Md,[pf]);let xf=!1;const Cf=pf[leaveCbKey]=If=>{xf||(xf=!0,mf(),If?Xd(Hd,[pf]):Xd(Fd,[pf]),pf[leaveCbKey]=void 0,Kd[_f]===Ra&&delete Kd[_f])};Kd[_f]=Ra,Ld?df(Ld,[pf,Cf]):Cf()},clone(pf){const mf=resolveTransitionHooks(pf,qa,rd,sd,pd);return pd&&pd(mf),mf}};return Ef}function emptyPlaceholder(Ra){if(isKeepAlive(Ra))return Ra=cloneVNode(Ra),Ra.children=null,Ra}function getInnerChild$1(Ra){if(!isKeepAlive(Ra))return isTeleport(Ra.type)&&Ra.children?findNonCommentChild(Ra.children):Ra;const{shapeFlag:qa,children:rd}=Ra;if(rd){if(qa&16)return rd[0];if(qa&32&&isFunction$4(rd.default))return rd.default()}}function setTransitionHooks(Ra,qa){Ra.shapeFlag&6&&Ra.component?(Ra.transition=qa,setTransitionHooks(Ra.component.subTree,qa)):Ra.shapeFlag&128?(Ra.ssContent.transition=qa.clone(Ra.ssContent),Ra.ssFallback.transition=qa.clone(Ra.ssFallback)):Ra.transition=qa}function getTransitionRawChildren(Ra,qa=!1,rd){let sd=[],pd=0;for(let fd=0;fd1)for(let fd=0;fdrd.value,set:fd=>rd.value=fd})}return rd}function setRef(Ra,qa,rd,sd,pd=!1){if(isArray$2(Ra)){Ra.forEach((Fd,Hd)=>setRef(Fd,qa&&(isArray$2(qa)?qa[Hd]:qa),rd,sd,pd));return}if(isAsyncWrapper(sd)&&!pd){sd.shapeFlag&512&&sd.type.__asyncResolved&&sd.component.subTree.component&&setRef(Ra,qa,rd,sd.component.subTree);return}const fd=sd.shapeFlag&4?getComponentPublicInstance(sd.component):sd.el,hd=pd?null:fd,{i:md,r:gd}=Ra,yd=qa&&qa.r,vd=md.refs===EMPTY_OBJ?md.refs={}:md.refs,Nd=md.setupState,Md=toRaw(Nd),Ld=Nd===EMPTY_OBJ?()=>!1:Fd=>hasOwn$4(Md,Fd);if(yd!=null&&yd!==gd&&(isString$2(yd)?(vd[yd]=null,Ld(yd)&&(Nd[yd]=null)):isRef(yd)&&(yd.value=null)),isFunction$4(gd))callWithErrorHandling(gd,md,12,[hd,vd]);else{const Fd=isString$2(gd),Hd=isRef(gd);if(Fd||Hd){const Vd=()=>{if(Ra.f){const Gd=Fd?Ld(gd)?Nd[gd]:vd[gd]:gd.value;pd?isArray$2(Gd)&&remove$2(Gd,fd):isArray$2(Gd)?Gd.includes(fd)||Gd.push(fd):Fd?(vd[gd]=[fd],Ld(gd)&&(Nd[gd]=vd[gd])):(gd.value=[fd],Ra.k&&(vd[Ra.k]=gd.value))}else Fd?(vd[gd]=hd,Ld(gd)&&(Nd[gd]=hd)):Hd&&(gd.value=hd,Ra.k&&(vd[Ra.k]=hd))};hd?(Vd.id=-1,queuePostRenderEffect(Vd,rd)):Vd()}}}getGlobalThis().requestIdleCallback;getGlobalThis().cancelIdleCallback;const isAsyncWrapper=Ra=>!!Ra.type.__asyncLoader,isKeepAlive=Ra=>Ra.type.__isKeepAlive;function onActivated(Ra,qa){registerKeepAliveHook(Ra,"a",qa)}function onDeactivated(Ra,qa){registerKeepAliveHook(Ra,"da",qa)}function registerKeepAliveHook(Ra,qa,rd=currentInstance){const sd=Ra.__wdc||(Ra.__wdc=()=>{let pd=rd;for(;pd;){if(pd.isDeactivated)return;pd=pd.parent}return Ra()});if(injectHook(qa,sd,rd),rd){let pd=rd.parent;for(;pd&&pd.parent;)isKeepAlive(pd.parent.vnode)&&injectToKeepAliveRoot(sd,qa,rd,pd),pd=pd.parent}}function injectToKeepAliveRoot(Ra,qa,rd,sd){const pd=injectHook(qa,Ra,sd,!0);onUnmounted(()=>{remove$2(sd[qa],pd)},rd)}function injectHook(Ra,qa,rd=currentInstance,sd=!1){if(rd){const pd=rd[Ra]||(rd[Ra]=[]),fd=qa.__weh||(qa.__weh=(...hd)=>{pauseTracking();const md=setCurrentInstance(rd),gd=callWithAsyncErrorHandling(qa,rd,Ra,hd);return md(),resetTracking(),gd});return sd?pd.unshift(fd):pd.push(fd),fd}}const createHook=Ra=>(qa,rd=currentInstance)=>{(!isInSSRComponentSetup||Ra==="sp")&&injectHook(Ra,(...sd)=>qa(...sd),rd)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(Ra,qa=currentInstance){injectHook("ec",Ra,qa)}const COMPONENTS="components";function resolveComponent(Ra,qa){return resolveAsset(COMPONENTS,Ra,!0,qa)||Ra}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(Ra){return isString$2(Ra)?resolveAsset(COMPONENTS,Ra,!1)||Ra:Ra||NULL_DYNAMIC_COMPONENT}function resolveAsset(Ra,qa,rd=!0,sd=!1){const pd=currentRenderingInstance||currentInstance;if(pd){const fd=pd.type;{const md=getComponentName(fd,!1);if(md&&(md===qa||md===camelize(qa)||md===capitalize(camelize(qa))))return fd}const hd=resolve$1(pd[Ra]||fd[Ra],qa)||resolve$1(pd.appContext[Ra],qa);return!hd&&sd?fd:hd}}function resolve$1(Ra,qa){return Ra&&(Ra[qa]||Ra[camelize(qa)]||Ra[capitalize(camelize(qa))])}function renderList(Ra,qa,rd,sd){let pd;const fd=rd,hd=isArray$2(Ra);if(hd||isString$2(Ra)){const md=hd&&isReactive(Ra);let gd=!1;md&&(gd=!isShallow(Ra),Ra=shallowReadArray(Ra)),pd=new Array(Ra.length);for(let yd=0,vd=Ra.length;ydqa(md,gd,void 0,fd));else{const md=Object.keys(Ra);pd=new Array(md.length);for(let gd=0,yd=md.length;gdisVNode(qa)?!(qa.type===Comment$2||qa.type===Fragment&&!ensureValidVNode(qa.children)):!0)?Ra:null}function toHandlers(Ra,qa){const rd={};for(const sd in Ra)rd[toHandlerKey(sd)]=Ra[sd];return rd}const getPublicInstance=Ra=>Ra?isStatefulComponent(Ra)?getComponentPublicInstance(Ra):getPublicInstance(Ra.parent):null,publicPropertiesMap=extend$4(Object.create(null),{$:Ra=>Ra,$el:Ra=>Ra.vnode.el,$data:Ra=>Ra.data,$props:Ra=>Ra.props,$attrs:Ra=>Ra.attrs,$slots:Ra=>Ra.slots,$refs:Ra=>Ra.refs,$parent:Ra=>getPublicInstance(Ra.parent),$root:Ra=>getPublicInstance(Ra.root),$host:Ra=>Ra.ce,$emit:Ra=>Ra.emit,$options:Ra=>resolveMergedOptions(Ra),$forceUpdate:Ra=>Ra.f||(Ra.f=()=>{queueJob(Ra.update)}),$nextTick:Ra=>Ra.n||(Ra.n=nextTick$1.bind(Ra.proxy)),$watch:Ra=>instanceWatch.bind(Ra)}),hasSetupBinding=(Ra,qa)=>Ra!==EMPTY_OBJ&&!Ra.__isScriptSetup&&hasOwn$4(Ra,qa),PublicInstanceProxyHandlers={get({_:Ra},qa){if(qa==="__v_skip")return!0;const{ctx:rd,setupState:sd,data:pd,props:fd,accessCache:hd,type:md,appContext:gd}=Ra;let yd;if(qa[0]!=="$"){const Ld=hd[qa];if(Ld!==void 0)switch(Ld){case 1:return sd[qa];case 2:return pd[qa];case 4:return rd[qa];case 3:return fd[qa]}else{if(hasSetupBinding(sd,qa))return hd[qa]=1,sd[qa];if(pd!==EMPTY_OBJ&&hasOwn$4(pd,qa))return hd[qa]=2,pd[qa];if((yd=Ra.propsOptions[0])&&hasOwn$4(yd,qa))return hd[qa]=3,fd[qa];if(rd!==EMPTY_OBJ&&hasOwn$4(rd,qa))return hd[qa]=4,rd[qa];shouldCacheAccess&&(hd[qa]=0)}}const vd=publicPropertiesMap[qa];let Nd,Md;if(vd)return qa==="$attrs"&&track(Ra.attrs,"get",""),vd(Ra);if((Nd=md.__cssModules)&&(Nd=Nd[qa]))return Nd;if(rd!==EMPTY_OBJ&&hasOwn$4(rd,qa))return hd[qa]=4,rd[qa];if(Md=gd.config.globalProperties,hasOwn$4(Md,qa))return Md[qa]},set({_:Ra},qa,rd){const{data:sd,setupState:pd,ctx:fd}=Ra;return hasSetupBinding(pd,qa)?(pd[qa]=rd,!0):sd!==EMPTY_OBJ&&hasOwn$4(sd,qa)?(sd[qa]=rd,!0):hasOwn$4(Ra.props,qa)||qa[0]==="$"&&qa.slice(1)in Ra?!1:(fd[qa]=rd,!0)},has({_:{data:Ra,setupState:qa,accessCache:rd,ctx:sd,appContext:pd,propsOptions:fd}},hd){let md;return!!rd[hd]||Ra!==EMPTY_OBJ&&hasOwn$4(Ra,hd)||hasSetupBinding(qa,hd)||(md=fd[0])&&hasOwn$4(md,hd)||hasOwn$4(sd,hd)||hasOwn$4(publicPropertiesMap,hd)||hasOwn$4(pd.config.globalProperties,hd)},defineProperty(Ra,qa,rd){return rd.get!=null?Ra._.accessCache[qa]=0:hasOwn$4(rd,"value")&&this.set(Ra,qa,rd.value,null),Reflect.defineProperty(Ra,qa,rd)}};function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function getContext(){const Ra=getCurrentInstance();return Ra.setupContext||(Ra.setupContext=createSetupContext(Ra))}function normalizePropsOrEmits(Ra){return isArray$2(Ra)?Ra.reduce((qa,rd)=>(qa[rd]=null,qa),{}):Ra}function mergeDefaults(Ra,qa){const rd=normalizePropsOrEmits(Ra);for(const sd in qa){if(sd.startsWith("__skip"))continue;let pd=rd[sd];pd?isArray$2(pd)||isFunction$4(pd)?pd=rd[sd]={type:pd,default:qa[sd]}:pd.default=qa[sd]:pd===null&&(pd=rd[sd]={default:qa[sd]}),pd&&qa[`__skip_${sd}`]&&(pd.skipFactory=!0)}return rd}let shouldCacheAccess=!0;function applyOptions(Ra){const qa=resolveMergedOptions(Ra),rd=Ra.proxy,sd=Ra.ctx;shouldCacheAccess=!1,qa.beforeCreate&&callHook$1(qa.beforeCreate,Ra,"bc");const{data:pd,computed:fd,methods:hd,watch:md,provide:gd,inject:yd,created:vd,beforeMount:Nd,mounted:Md,beforeUpdate:Ld,updated:Fd,activated:Hd,deactivated:Vd,beforeDestroy:Gd,beforeUnmount:Ud,destroyed:qd,unmounted:Wd,render:Kd,renderTracked:Xd,renderTriggered:df,errorCaptured:Ef,serverPrefetch:pf,expose:mf,inheritAttrs:_f,components:xf,directives:Cf,filters:If}=qa;if(yd&&resolveInjections(yd,sd,null),hd)for(const Pf in hd){const lh=hd[Pf];isFunction$4(lh)&&(sd[Pf]=lh.bind(rd))}if(pd){const Pf=pd.call(rd,rd);isObject$9(Pf)&&(Ra.data=reactive(Pf))}if(shouldCacheAccess=!0,fd)for(const Pf in fd){const lh=fd[Pf],xh=isFunction$4(lh)?lh.bind(rd,rd):isFunction$4(lh.get)?lh.get.bind(rd,rd):NOOP,Eh=!isFunction$4(lh)&&isFunction$4(lh.set)?lh.set.bind(rd):NOOP,Mh=computed({get:xh,set:Eh});Object.defineProperty(sd,Pf,{enumerable:!0,configurable:!0,get:()=>Mh.value,set:dh=>Mh.value=dh})}if(md)for(const Pf in md)createWatcher(md[Pf],sd,rd,Pf);if(gd){const Pf=isFunction$4(gd)?gd.call(rd):gd;Reflect.ownKeys(Pf).forEach(lh=>{provide(lh,Pf[lh])})}vd&&callHook$1(vd,Ra,"c");function wf(Pf,lh){isArray$2(lh)?lh.forEach(xh=>Pf(xh.bind(rd))):lh&&Pf(lh.bind(rd))}if(wf(onBeforeMount,Nd),wf(onMounted,Md),wf(onBeforeUpdate,Ld),wf(onUpdated,Fd),wf(onActivated,Hd),wf(onDeactivated,Vd),wf(onErrorCaptured,Ef),wf(onRenderTracked,Xd),wf(onRenderTriggered,df),wf(onBeforeUnmount,Ud),wf(onUnmounted,Wd),wf(onServerPrefetch,pf),isArray$2(mf))if(mf.length){const Pf=Ra.exposed||(Ra.exposed={});mf.forEach(lh=>{Object.defineProperty(Pf,lh,{get:()=>rd[lh],set:xh=>rd[lh]=xh})})}else Ra.exposed||(Ra.exposed={});Kd&&Ra.render===NOOP&&(Ra.render=Kd),_f!=null&&(Ra.inheritAttrs=_f),xf&&(Ra.components=xf),Cf&&(Ra.directives=Cf),pf&&markAsyncBoundary(Ra)}function resolveInjections(Ra,qa,rd=NOOP){isArray$2(Ra)&&(Ra=normalizeInject(Ra));for(const sd in Ra){const pd=Ra[sd];let fd;isObject$9(pd)?"default"in pd?fd=inject(pd.from||sd,pd.default,!0):fd=inject(pd.from||sd):fd=inject(pd),isRef(fd)?Object.defineProperty(qa,sd,{enumerable:!0,configurable:!0,get:()=>fd.value,set:hd=>fd.value=hd}):qa[sd]=fd}}function callHook$1(Ra,qa,rd){callWithAsyncErrorHandling(isArray$2(Ra)?Ra.map(sd=>sd.bind(qa.proxy)):Ra.bind(qa.proxy),qa,rd)}function createWatcher(Ra,qa,rd,sd){let pd=sd.includes(".")?createPathGetter(rd,sd):()=>rd[sd];if(isString$2(Ra)){const fd=qa[Ra];isFunction$4(fd)&&watch(pd,fd)}else if(isFunction$4(Ra))watch(pd,Ra.bind(rd));else if(isObject$9(Ra))if(isArray$2(Ra))Ra.forEach(fd=>createWatcher(fd,qa,rd,sd));else{const fd=isFunction$4(Ra.handler)?Ra.handler.bind(rd):qa[Ra.handler];isFunction$4(fd)&&watch(pd,fd,Ra)}}function resolveMergedOptions(Ra){const qa=Ra.type,{mixins:rd,extends:sd}=qa,{mixins:pd,optionsCache:fd,config:{optionMergeStrategies:hd}}=Ra.appContext,md=fd.get(qa);let gd;return md?gd=md:!pd.length&&!rd&&!sd?gd=qa:(gd={},pd.length&&pd.forEach(yd=>mergeOptions(gd,yd,hd,!0)),mergeOptions(gd,qa,hd)),isObject$9(qa)&&fd.set(qa,gd),gd}function mergeOptions(Ra,qa,rd,sd=!1){const{mixins:pd,extends:fd}=qa;fd&&mergeOptions(Ra,fd,rd,!0),pd&&pd.forEach(hd=>mergeOptions(Ra,hd,rd,!0));for(const hd in qa)if(!(sd&&hd==="expose")){const md=internalOptionMergeStrats[hd]||rd&&rd[hd];Ra[hd]=md?md(Ra[hd],qa[hd]):qa[hd]}return Ra}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(Ra,qa){return qa?Ra?function(){return extend$4(isFunction$4(Ra)?Ra.call(this,this):Ra,isFunction$4(qa)?qa.call(this,this):qa)}:qa:Ra}function mergeInject(Ra,qa){return mergeObjectOptions(normalizeInject(Ra),normalizeInject(qa))}function normalizeInject(Ra){if(isArray$2(Ra)){const qa={};for(let rd=0;rd1)return rd&&isFunction$4(qa)?qa.call(sd&&sd.proxy):qa}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=Ra=>Object.getPrototypeOf(Ra)===internalObjectProto;function initProps(Ra,qa,rd,sd=!1){const pd={},fd=createInternalObject();Ra.propsDefaults=Object.create(null),setFullProps(Ra,qa,pd,fd);for(const hd in Ra.propsOptions[0])hd in pd||(pd[hd]=void 0);rd?Ra.props=sd?pd:shallowReactive(pd):Ra.type.props?Ra.props=pd:Ra.props=fd,Ra.attrs=fd}function updateProps(Ra,qa,rd,sd){const{props:pd,attrs:fd,vnode:{patchFlag:hd}}=Ra,md=toRaw(pd),[gd]=Ra.propsOptions;let yd=!1;if((sd||hd>0)&&!(hd&16)){if(hd&8){const vd=Ra.vnode.dynamicProps;for(let Nd=0;Nd{gd=!0;const[Md,Ld]=normalizePropsOptions(Nd,qa,!0);extend$4(hd,Md),Ld&&md.push(...Ld)};!rd&&qa.mixins.length&&qa.mixins.forEach(vd),Ra.extends&&vd(Ra.extends),Ra.mixins&&Ra.mixins.forEach(vd)}if(!fd&&!gd)return isObject$9(Ra)&&sd.set(Ra,EMPTY_ARR),EMPTY_ARR;if(isArray$2(fd))for(let vd=0;vdRa[0]==="_"||Ra==="$stable",normalizeSlotValue=Ra=>isArray$2(Ra)?Ra.map(normalizeVNode):[normalizeVNode(Ra)],normalizeSlot=(Ra,qa,rd)=>{if(qa._n)return qa;const sd=withCtx((...pd)=>normalizeSlotValue(qa(...pd)),rd);return sd._c=!1,sd},normalizeObjectSlots=(Ra,qa,rd)=>{const sd=Ra._ctx;for(const pd in Ra){if(isInternalKey(pd))continue;const fd=Ra[pd];if(isFunction$4(fd))qa[pd]=normalizeSlot(pd,fd,sd);else if(fd!=null){const hd=normalizeSlotValue(fd);qa[pd]=()=>hd}}},normalizeVNodeSlots=(Ra,qa)=>{const rd=normalizeSlotValue(qa);Ra.slots.default=()=>rd},assignSlots=(Ra,qa,rd)=>{for(const sd in qa)(rd||sd!=="_")&&(Ra[sd]=qa[sd])},initSlots=(Ra,qa,rd)=>{const sd=Ra.slots=createInternalObject();if(Ra.vnode.shapeFlag&32){const pd=qa._;pd?(assignSlots(sd,qa,rd),rd&&def$2(sd,"_",pd,!0)):normalizeObjectSlots(qa,sd)}else qa&&normalizeVNodeSlots(Ra,qa)},updateSlots=(Ra,qa,rd)=>{const{vnode:sd,slots:pd}=Ra;let fd=!0,hd=EMPTY_OBJ;if(sd.shapeFlag&32){const md=qa._;md?rd&&md===1?fd=!1:assignSlots(pd,qa,rd):(fd=!qa.$stable,normalizeObjectSlots(qa,pd)),hd=qa}else qa&&(normalizeVNodeSlots(Ra,qa),hd={default:1});if(fd)for(const md in pd)!isInternalKey(md)&&hd[md]==null&&delete pd[md]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer$1(Ra){return baseCreateRenderer(Ra)}function baseCreateRenderer(Ra,qa){const rd=getGlobalThis();rd.__VUE__=!0;const{insert:sd,remove:pd,patchProp:fd,createElement:hd,createText:md,createComment:gd,setText:yd,setElementText:vd,parentNode:Nd,nextSibling:Md,setScopeId:Ld=NOOP,insertStaticContent:Fd}=Ra,Hd=(Jf,oh,Xh,Tm=null,kh=null,Zf=null,th=void 0,$h=null,wh=!!oh.dynamicChildren)=>{if(Jf===oh)return;Jf&&!isSameVNodeType(Jf,oh)&&(Tm=Df(Jf),dh(Jf,kh,Zf,!0),Jf=null),oh.patchFlag===-2&&(wh=!1,oh.dynamicChildren=null);const{type:fm,ref:zh,shapeFlag:Mm}=oh;switch(fm){case Text$2:Vd(Jf,oh,Xh,Tm);break;case Comment$2:Gd(Jf,oh,Xh,Tm);break;case Static:Jf==null&&Ud(oh,Xh,Tm,th);break;case Fragment:xf(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh);break;default:Mm&1?Kd(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh):Mm&6?Cf(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh):(Mm&64||Mm&128)&&fm.process(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh,Nh)}zh!=null&&kh&&setRef(zh,Jf&&Jf.ref,Zf,oh||Jf,!oh)},Vd=(Jf,oh,Xh,Tm)=>{if(Jf==null)sd(oh.el=md(oh.children),Xh,Tm);else{const kh=oh.el=Jf.el;oh.children!==Jf.children&&yd(kh,oh.children)}},Gd=(Jf,oh,Xh,Tm)=>{Jf==null?sd(oh.el=gd(oh.children||""),Xh,Tm):oh.el=Jf.el},Ud=(Jf,oh,Xh,Tm)=>{[Jf.el,Jf.anchor]=Fd(Jf.children,oh,Xh,Tm,Jf.el,Jf.anchor)},qd=({el:Jf,anchor:oh},Xh,Tm)=>{let kh;for(;Jf&&Jf!==oh;)kh=Md(Jf),sd(Jf,Xh,Tm),Jf=kh;sd(oh,Xh,Tm)},Wd=({el:Jf,anchor:oh})=>{let Xh;for(;Jf&&Jf!==oh;)Xh=Md(Jf),pd(Jf),Jf=Xh;pd(oh)},Kd=(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh)=>{oh.type==="svg"?th="svg":oh.type==="math"&&(th="mathml"),Jf==null?Xd(oh,Xh,Tm,kh,Zf,th,$h,wh):pf(Jf,oh,kh,Zf,th,$h,wh)},Xd=(Jf,oh,Xh,Tm,kh,Zf,th,$h)=>{let wh,fm;const{props:zh,shapeFlag:Mm,transition:Rm,dirs:tg}=Jf;if(wh=Jf.el=hd(Jf.type,Zf,zh&&zh.is,zh),Mm&8?vd(wh,Jf.children):Mm&16&&Ef(Jf.children,wh,null,Tm,kh,resolveChildrenNamespace(Jf,Zf),th,$h),tg&&invokeDirectiveHook(Jf,null,Tm,"created"),df(wh,Jf,Jf.scopeId,th,Tm),zh){for(const Ym in zh)Ym!=="value"&&!isReservedProp(Ym)&&fd(wh,Ym,null,zh[Ym],Zf,Tm);"value"in zh&&fd(wh,"value",null,zh.value,Zf),(fm=zh.onVnodeBeforeMount)&&invokeVNodeHook(fm,Tm,Jf)}tg&&invokeDirectiveHook(Jf,null,Tm,"beforeMount");const Fm=needTransition(kh,Rm);Fm&&Rm.beforeEnter(wh),sd(wh,oh,Xh),((fm=zh&&zh.onVnodeMounted)||Fm||tg)&&queuePostRenderEffect(()=>{fm&&invokeVNodeHook(fm,Tm,Jf),Fm&&Rm.enter(wh),tg&&invokeDirectiveHook(Jf,null,Tm,"mounted")},kh)},df=(Jf,oh,Xh,Tm,kh)=>{if(Xh&&Ld(Jf,Xh),Tm)for(let Zf=0;Zf{for(let fm=wh;fm{const $h=oh.el=Jf.el;let{patchFlag:wh,dynamicChildren:fm,dirs:zh}=oh;wh|=Jf.patchFlag&16;const Mm=Jf.props||EMPTY_OBJ,Rm=oh.props||EMPTY_OBJ;let tg;if(Xh&&toggleRecurse(Xh,!1),(tg=Rm.onVnodeBeforeUpdate)&&invokeVNodeHook(tg,Xh,oh,Jf),zh&&invokeDirectiveHook(oh,Jf,Xh,"beforeUpdate"),Xh&&toggleRecurse(Xh,!0),(Mm.innerHTML&&Rm.innerHTML==null||Mm.textContent&&Rm.textContent==null)&&vd($h,""),fm?mf(Jf.dynamicChildren,fm,$h,Xh,Tm,resolveChildrenNamespace(oh,kh),Zf):th||lh(Jf,oh,$h,null,Xh,Tm,resolveChildrenNamespace(oh,kh),Zf,!1),wh>0){if(wh&16)_f($h,Mm,Rm,Xh,kh);else if(wh&2&&Mm.class!==Rm.class&&fd($h,"class",null,Rm.class,kh),wh&4&&fd($h,"style",Mm.style,Rm.style,kh),wh&8){const Fm=oh.dynamicProps;for(let Ym=0;Ym{tg&&invokeVNodeHook(tg,Xh,oh,Jf),zh&&invokeDirectiveHook(oh,Jf,Xh,"updated")},Tm)},mf=(Jf,oh,Xh,Tm,kh,Zf,th)=>{for(let $h=0;$h{if(oh!==Xh){if(oh!==EMPTY_OBJ)for(const Zf in oh)!isReservedProp(Zf)&&!(Zf in Xh)&&fd(Jf,Zf,oh[Zf],null,kh,Tm);for(const Zf in Xh){if(isReservedProp(Zf))continue;const th=Xh[Zf],$h=oh[Zf];th!==$h&&Zf!=="value"&&fd(Jf,Zf,$h,th,kh,Tm)}"value"in Xh&&fd(Jf,"value",oh.value,Xh.value,kh)}},xf=(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh)=>{const fm=oh.el=Jf?Jf.el:md(""),zh=oh.anchor=Jf?Jf.anchor:md("");let{patchFlag:Mm,dynamicChildren:Rm,slotScopeIds:tg}=oh;tg&&($h=$h?$h.concat(tg):tg),Jf==null?(sd(fm,Xh,Tm),sd(zh,Xh,Tm),Ef(oh.children||[],Xh,zh,kh,Zf,th,$h,wh)):Mm>0&&Mm&64&&Rm&&Jf.dynamicChildren?(mf(Jf.dynamicChildren,Rm,Xh,kh,Zf,th,$h),(oh.key!=null||kh&&oh===kh.subTree)&&traverseStaticChildren(Jf,oh,!0)):lh(Jf,oh,Xh,zh,kh,Zf,th,$h,wh)},Cf=(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh)=>{oh.slotScopeIds=$h,Jf==null?oh.shapeFlag&512?kh.ctx.activate(oh,Xh,Tm,th,wh):If(oh,Xh,Tm,kh,Zf,th,wh):Sf(Jf,oh,wh)},If=(Jf,oh,Xh,Tm,kh,Zf,th)=>{const $h=Jf.component=createComponentInstance(Jf,Tm,kh);if(isKeepAlive(Jf)&&($h.ctx.renderer=Nh),setupComponent($h,!1,th),$h.asyncDep){if(kh&&kh.registerDep($h,wf,th),!Jf.el){const wh=$h.subTree=createVNode(Comment$2);Gd(null,wh,oh,Xh)}}else wf($h,Jf,oh,Xh,kh,Zf,th)},Sf=(Jf,oh,Xh)=>{const Tm=oh.component=Jf.component;if(shouldUpdateComponent(Jf,oh,Xh))if(Tm.asyncDep&&!Tm.asyncResolved){Pf(Tm,oh,Xh);return}else Tm.next=oh,Tm.update();else oh.el=Jf.el,Tm.vnode=oh},wf=(Jf,oh,Xh,Tm,kh,Zf,th)=>{const $h=()=>{if(Jf.isMounted){let{next:Mm,bu:Rm,u:tg,parent:Fm,vnode:Ym}=Jf;{const Rf=locateNonHydratedAsyncRoot(Jf);if(Rf){Mm&&(Mm.el=Ym.el,Pf(Jf,Mm,th)),Rf.asyncDep.then(()=>{Jf.isUnmounted||$h()});return}}let rg=Mm,Eg;toggleRecurse(Jf,!1),Mm?(Mm.el=Ym.el,Pf(Jf,Mm,th)):Mm=Ym,Rm&&invokeArrayFns(Rm),(Eg=Mm.props&&Mm.props.onVnodeBeforeUpdate)&&invokeVNodeHook(Eg,Fm,Mm,Ym),toggleRecurse(Jf,!0);const Fh=renderComponentRoot(Jf),kf=Jf.subTree;Jf.subTree=Fh,Hd(kf,Fh,Nd(kf.el),Df(kf),Jf,kh,Zf),Mm.el=Fh.el,rg===null&&updateHOCHostEl(Jf,Fh.el),tg&&queuePostRenderEffect(tg,kh),(Eg=Mm.props&&Mm.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(Eg,Fm,Mm,Ym),kh)}else{let Mm;const{el:Rm,props:tg}=oh,{bm:Fm,m:Ym,parent:rg,root:Eg,type:Fh}=Jf,kf=isAsyncWrapper(oh);toggleRecurse(Jf,!1),Fm&&invokeArrayFns(Fm),!kf&&(Mm=tg&&tg.onVnodeBeforeMount)&&invokeVNodeHook(Mm,rg,oh),toggleRecurse(Jf,!0);{Eg.ce&&Eg.ce._injectChildStyle(Fh);const Rf=Jf.subTree=renderComponentRoot(Jf);Hd(null,Rf,Xh,Tm,Jf,kh,Zf),oh.el=Rf.el}if(Ym&&queuePostRenderEffect(Ym,kh),!kf&&(Mm=tg&&tg.onVnodeMounted)){const Rf=oh;queuePostRenderEffect(()=>invokeVNodeHook(Mm,rg,Rf),kh)}(oh.shapeFlag&256||rg&&isAsyncWrapper(rg.vnode)&&rg.vnode.shapeFlag&256)&&Jf.a&&queuePostRenderEffect(Jf.a,kh),Jf.isMounted=!0,oh=Xh=Tm=null}};Jf.scope.on();const wh=Jf.effect=new ReactiveEffect($h);Jf.scope.off();const fm=Jf.update=wh.run.bind(wh),zh=Jf.job=wh.runIfDirty.bind(wh);zh.i=Jf,zh.id=Jf.uid,wh.scheduler=()=>queueJob(zh),toggleRecurse(Jf,!0),fm()},Pf=(Jf,oh,Xh)=>{oh.component=Jf;const Tm=Jf.vnode.props;Jf.vnode=oh,Jf.next=null,updateProps(Jf,oh.props,Tm,Xh),updateSlots(Jf,oh.children,Xh),pauseTracking(),flushPreFlushCbs(Jf),resetTracking()},lh=(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh=!1)=>{const fm=Jf&&Jf.children,zh=Jf?Jf.shapeFlag:0,Mm=oh.children,{patchFlag:Rm,shapeFlag:tg}=oh;if(Rm>0){if(Rm&128){Eh(fm,Mm,Xh,Tm,kh,Zf,th,$h,wh);return}else if(Rm&256){xh(fm,Mm,Xh,Tm,kh,Zf,th,$h,wh);return}}tg&8?(zh&16&&vh(fm,kh,Zf),Mm!==fm&&vd(Xh,Mm)):zh&16?tg&16?Eh(fm,Mm,Xh,Tm,kh,Zf,th,$h,wh):vh(fm,kh,Zf,!0):(zh&8&&vd(Xh,""),tg&16&&Ef(Mm,Xh,Tm,kh,Zf,th,$h,wh))},xh=(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh)=>{Jf=Jf||EMPTY_ARR,oh=oh||EMPTY_ARR;const fm=Jf.length,zh=oh.length,Mm=Math.min(fm,zh);let Rm;for(Rm=0;Rmzh?vh(Jf,kh,Zf,!0,!1,Mm):Ef(oh,Xh,Tm,kh,Zf,th,$h,wh,Mm)},Eh=(Jf,oh,Xh,Tm,kh,Zf,th,$h,wh)=>{let fm=0;const zh=oh.length;let Mm=Jf.length-1,Rm=zh-1;for(;fm<=Mm&&fm<=Rm;){const tg=Jf[fm],Fm=oh[fm]=wh?cloneIfMounted(oh[fm]):normalizeVNode(oh[fm]);if(isSameVNodeType(tg,Fm))Hd(tg,Fm,Xh,null,kh,Zf,th,$h,wh);else break;fm++}for(;fm<=Mm&&fm<=Rm;){const tg=Jf[Mm],Fm=oh[Rm]=wh?cloneIfMounted(oh[Rm]):normalizeVNode(oh[Rm]);if(isSameVNodeType(tg,Fm))Hd(tg,Fm,Xh,null,kh,Zf,th,$h,wh);else break;Mm--,Rm--}if(fm>Mm){if(fm<=Rm){const tg=Rm+1,Fm=tgRm)for(;fm<=Mm;)dh(Jf[fm],kh,Zf,!0),fm++;else{const tg=fm,Fm=fm,Ym=new Map;for(fm=Fm;fm<=Rm;fm++){const Sm=oh[fm]=wh?cloneIfMounted(oh[fm]):normalizeVNode(oh[fm]);Sm.key!=null&&Ym.set(Sm.key,fm)}let rg,Eg=0;const Fh=Rm-Fm+1;let kf=!1,Rf=0;const Dh=new Array(Fh);for(fm=0;fm=Fh){dh(Sm,kh,Zf,!0);continue}let $m;if(Sm.key!=null)$m=Ym.get(Sm.key);else for(rg=Fm;rg<=Rm;rg++)if(Dh[rg-Fm]===0&&isSameVNodeType(Sm,oh[rg])){$m=rg;break}$m===void 0?dh(Sm,kh,Zf,!0):(Dh[$m-Fm]=fm+1,$m>=Rf?Rf=$m:kf=!0,Hd(Sm,oh[$m],Xh,null,kh,Zf,th,$h,wh),Eg++)}const Vh=kf?getSequence(Dh):EMPTY_ARR;for(rg=Vh.length-1,fm=Fh-1;fm>=0;fm--){const Sm=Fm+fm,$m=oh[Sm],Km=Sm+1{const{el:Zf,type:th,transition:$h,children:wh,shapeFlag:fm}=Jf;if(fm&6){Mh(Jf.component.subTree,oh,Xh,Tm);return}if(fm&128){Jf.suspense.move(oh,Xh,Tm);return}if(fm&64){th.move(Jf,oh,Xh,Nh);return}if(th===Fragment){sd(Zf,oh,Xh);for(let Mm=0;Mm$h.enter(Zf),kh);else{const{leave:Mm,delayLeave:Rm,afterLeave:tg}=$h,Fm=()=>sd(Zf,oh,Xh),Ym=()=>{Mm(Zf,()=>{Fm(),tg&&tg()})};Rm?Rm(Zf,Fm,Ym):Ym()}else sd(Zf,oh,Xh)},dh=(Jf,oh,Xh,Tm=!1,kh=!1)=>{const{type:Zf,props:th,ref:$h,children:wh,dynamicChildren:fm,shapeFlag:zh,patchFlag:Mm,dirs:Rm,cacheIndex:tg}=Jf;if(Mm===-2&&(kh=!1),$h!=null&&setRef($h,null,Xh,Jf,!0),tg!=null&&(oh.renderCache[tg]=void 0),zh&256){oh.ctx.deactivate(Jf);return}const Fm=zh&1&&Rm,Ym=!isAsyncWrapper(Jf);let rg;if(Ym&&(rg=th&&th.onVnodeBeforeUnmount)&&invokeVNodeHook(rg,oh,Jf),zh&6)Sh(Jf.component,Xh,Tm);else{if(zh&128){Jf.suspense.unmount(Xh,Tm);return}Fm&&invokeDirectiveHook(Jf,null,oh,"beforeUnmount"),zh&64?Jf.type.remove(Jf,oh,Xh,Nh,Tm):fm&&!fm.hasOnce&&(Zf!==Fragment||Mm>0&&Mm&64)?vh(fm,oh,Xh,!1,!0):(Zf===Fragment&&Mm&384||!kh&&zh&16)&&vh(wh,oh,Xh),Tm&&eh(Jf)}(Ym&&(rg=th&&th.onVnodeUnmounted)||Fm)&&queuePostRenderEffect(()=>{rg&&invokeVNodeHook(rg,oh,Jf),Fm&&invokeDirectiveHook(Jf,null,oh,"unmounted")},Xh)},eh=Jf=>{const{type:oh,el:Xh,anchor:Tm,transition:kh}=Jf;if(oh===Fragment){fh(Xh,Tm);return}if(oh===Static){Wd(Jf);return}const Zf=()=>{pd(Xh),kh&&!kh.persisted&&kh.afterLeave&&kh.afterLeave()};if(Jf.shapeFlag&1&&kh&&!kh.persisted){const{leave:th,delayLeave:$h}=kh,wh=()=>th(Xh,Zf);$h?$h(Jf.el,Zf,wh):wh()}else Zf()},fh=(Jf,oh)=>{let Xh;for(;Jf!==oh;)Xh=Md(Jf),pd(Jf),Jf=Xh;pd(oh)},Sh=(Jf,oh,Xh)=>{const{bum:Tm,scope:kh,job:Zf,subTree:th,um:$h,m:wh,a:fm}=Jf;invalidateMount(wh),invalidateMount(fm),Tm&&invokeArrayFns(Tm),kh.stop(),Zf&&(Zf.flags|=8,dh(th,Jf,oh,Xh)),$h&&queuePostRenderEffect($h,oh),queuePostRenderEffect(()=>{Jf.isUnmounted=!0},oh),oh&&oh.pendingBranch&&!oh.isUnmounted&&Jf.asyncDep&&!Jf.asyncResolved&&Jf.suspenseId===oh.pendingId&&(oh.deps--,oh.deps===0&&oh.resolve())},vh=(Jf,oh,Xh,Tm=!1,kh=!1,Zf=0)=>{for(let th=Zf;th{if(Jf.shapeFlag&6)return Df(Jf.component.subTree);if(Jf.shapeFlag&128)return Jf.suspense.next();const oh=Md(Jf.anchor||Jf.el),Xh=oh&&oh[TeleportEndKey];return Xh?Md(Xh):oh};let Af=!1;const _h=(Jf,oh,Xh)=>{Jf==null?oh._vnode&&dh(oh._vnode,null,null,!0):Hd(oh._vnode||null,Jf,oh,null,null,null,Xh),oh._vnode=Jf,Af||(Af=!0,flushPreFlushCbs(),flushPostFlushCbs(),Af=!1)},Nh={p:Hd,um:dh,m:Mh,r:eh,mt:If,mc:Ef,pc:lh,pbc:mf,n:Df,o:Ra};return{render:_h,hydrate:void 0,createApp:createAppAPI(_h)}}function resolveChildrenNamespace({type:Ra,props:qa},rd){return rd==="svg"&&Ra==="foreignObject"||rd==="mathml"&&Ra==="annotation-xml"&&qa&&qa.encoding&&qa.encoding.includes("html")?void 0:rd}function toggleRecurse({effect:Ra,job:qa},rd){rd?(Ra.flags|=32,qa.flags|=4):(Ra.flags&=-33,qa.flags&=-5)}function needTransition(Ra,qa){return(!Ra||Ra&&!Ra.pendingBranch)&&qa&&!qa.persisted}function traverseStaticChildren(Ra,qa,rd=!1){const sd=Ra.children,pd=qa.children;if(isArray$2(sd)&&isArray$2(pd))for(let fd=0;fd>1,Ra[rd[md]]0&&(qa[sd]=rd[fd-1]),rd[fd]=sd)}}for(fd=rd.length,hd=rd[fd-1];fd-- >0;)rd[fd]=hd,hd=qa[hd];return rd}function locateNonHydratedAsyncRoot(Ra){const qa=Ra.subTree.component;if(qa)return qa.asyncDep&&!qa.asyncResolved?qa:locateNonHydratedAsyncRoot(qa)}function invalidateMount(Ra){if(Ra)for(let qa=0;qainject(ssrContextKey);function watchEffect(Ra,qa){return doWatch(Ra,null,qa)}function watchPostEffect(Ra,qa){return doWatch(Ra,null,{flush:"post"})}function watch(Ra,qa,rd){return doWatch(Ra,qa,rd)}function doWatch(Ra,qa,rd=EMPTY_OBJ){const{immediate:sd,deep:pd,flush:fd,once:hd}=rd,md=extend$4({},rd),gd=qa&&sd||!qa&&fd!=="post";let yd;if(isInSSRComponentSetup){if(fd==="sync"){const Ld=useSSRContext();yd=Ld.__watcherHandles||(Ld.__watcherHandles=[])}else if(!gd){const Ld=()=>{};return Ld.stop=NOOP,Ld.resume=NOOP,Ld.pause=NOOP,Ld}}const vd=currentInstance;md.call=(Ld,Fd,Hd)=>callWithAsyncErrorHandling(Ld,vd,Fd,Hd);let Nd=!1;fd==="post"?md.scheduler=Ld=>{queuePostRenderEffect(Ld,vd&&vd.suspense)}:fd!=="sync"&&(Nd=!0,md.scheduler=(Ld,Fd)=>{Fd?Ld():queueJob(Ld)}),md.augmentJob=Ld=>{qa&&(Ld.flags|=4),Nd&&(Ld.flags|=2,vd&&(Ld.id=vd.uid,Ld.i=vd))};const Md=watch$1(Ra,qa,md);return isInSSRComponentSetup&&(yd?yd.push(Md):gd&&Md()),Md}function instanceWatch(Ra,qa,rd){const sd=this.proxy,pd=isString$2(Ra)?Ra.includes(".")?createPathGetter(sd,Ra):()=>sd[Ra]:Ra.bind(sd,sd);let fd;isFunction$4(qa)?fd=qa:(fd=qa.handler,rd=qa);const hd=setCurrentInstance(this),md=doWatch(pd,fd.bind(sd),rd);return hd(),md}function createPathGetter(Ra,qa){const rd=qa.split(".");return()=>{let sd=Ra;for(let pd=0;pdqa==="modelValue"||qa==="model-value"?Ra.modelModifiers:Ra[`${qa}Modifiers`]||Ra[`${camelize(qa)}Modifiers`]||Ra[`${hyphenate(qa)}Modifiers`];function emit(Ra,qa,...rd){if(Ra.isUnmounted)return;const sd=Ra.vnode.props||EMPTY_OBJ;let pd=rd;const fd=qa.startsWith("update:"),hd=fd&&getModelModifiers(sd,qa.slice(7));hd&&(hd.trim&&(pd=rd.map(vd=>isString$2(vd)?vd.trim():vd)),hd.number&&(pd=rd.map(looseToNumber)));let md,gd=sd[md=toHandlerKey(qa)]||sd[md=toHandlerKey(camelize(qa))];!gd&&fd&&(gd=sd[md=toHandlerKey(hyphenate(qa))]),gd&&callWithAsyncErrorHandling(gd,Ra,6,pd);const yd=sd[md+"Once"];if(yd){if(!Ra.emitted)Ra.emitted={};else if(Ra.emitted[md])return;Ra.emitted[md]=!0,callWithAsyncErrorHandling(yd,Ra,6,pd)}}function normalizeEmitsOptions(Ra,qa,rd=!1){const sd=qa.emitsCache,pd=sd.get(Ra);if(pd!==void 0)return pd;const fd=Ra.emits;let hd={},md=!1;if(!isFunction$4(Ra)){const gd=yd=>{const vd=normalizeEmitsOptions(yd,qa,!0);vd&&(md=!0,extend$4(hd,vd))};!rd&&qa.mixins.length&&qa.mixins.forEach(gd),Ra.extends&&gd(Ra.extends),Ra.mixins&&Ra.mixins.forEach(gd)}return!fd&&!md?(isObject$9(Ra)&&sd.set(Ra,null),null):(isArray$2(fd)?fd.forEach(gd=>hd[gd]=null):extend$4(hd,fd),isObject$9(Ra)&&sd.set(Ra,hd),hd)}function isEmitListener(Ra,qa){return!Ra||!isOn(qa)?!1:(qa=qa.slice(2).replace(/Once$/,""),hasOwn$4(Ra,qa[0].toLowerCase()+qa.slice(1))||hasOwn$4(Ra,hyphenate(qa))||hasOwn$4(Ra,qa))}function markAttrsAccessed(){}function renderComponentRoot(Ra){const{type:qa,vnode:rd,proxy:sd,withProxy:pd,propsOptions:[fd],slots:hd,attrs:md,emit:gd,render:yd,renderCache:vd,props:Nd,data:Md,setupState:Ld,ctx:Fd,inheritAttrs:Hd}=Ra,Vd=setCurrentRenderingInstance(Ra);let Gd,Ud;try{if(rd.shapeFlag&4){const Wd=pd||sd,Kd=Wd;Gd=normalizeVNode(yd.call(Kd,Wd,vd,Nd,Ld,Md,Fd)),Ud=md}else{const Wd=qa;Gd=normalizeVNode(Wd.length>1?Wd(Nd,{attrs:md,slots:hd,emit:gd}):Wd(Nd,null)),Ud=qa.props?md:getFunctionalFallthrough(md)}}catch(Wd){blockStack.length=0,handleError$1(Wd,Ra,1),Gd=createVNode(Comment$2)}let qd=Gd;if(Ud&&Hd!==!1){const Wd=Object.keys(Ud),{shapeFlag:Kd}=qd;Wd.length&&Kd&7&&(fd&&Wd.some(isModelListener)&&(Ud=filterModelListeners(Ud,fd)),qd=cloneVNode(qd,Ud,!1,!0))}return rd.dirs&&(qd=cloneVNode(qd,null,!1,!0),qd.dirs=qd.dirs?qd.dirs.concat(rd.dirs):rd.dirs),rd.transition&&setTransitionHooks(qd,rd.transition),Gd=qd,setCurrentRenderingInstance(Vd),Gd}const getFunctionalFallthrough=Ra=>{let qa;for(const rd in Ra)(rd==="class"||rd==="style"||isOn(rd))&&((qa||(qa={}))[rd]=Ra[rd]);return qa},filterModelListeners=(Ra,qa)=>{const rd={};for(const sd in Ra)(!isModelListener(sd)||!(sd.slice(9)in qa))&&(rd[sd]=Ra[sd]);return rd};function shouldUpdateComponent(Ra,qa,rd){const{props:sd,children:pd,component:fd}=Ra,{props:hd,children:md,patchFlag:gd}=qa,yd=fd.emitsOptions;if(qa.dirs||qa.transition)return!0;if(rd&&gd>=0){if(gd&1024)return!0;if(gd&16)return sd?hasPropsChanged(sd,hd,yd):!!hd;if(gd&8){const vd=qa.dynamicProps;for(let Nd=0;NdRa.__isSuspense;function queueEffectWithSuspense(Ra,qa){qa&&qa.pendingBranch?isArray$2(Ra)?qa.effects.push(...Ra):qa.effects.push(Ra):queuePostFlushCb(Ra)}const Fragment=Symbol.for("v-fgt"),Text$2=Symbol.for("v-txt"),Comment$2=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(Ra=!1){blockStack.push(currentBlock=Ra?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(Ra,qa=!1){isBlockTreeEnabled+=Ra,Ra<0&¤tBlock&&qa&&(currentBlock.hasOnce=!0)}function setupBlock(Ra){return Ra.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(Ra),Ra}function createElementBlock(Ra,qa,rd,sd,pd,fd){return setupBlock(createBaseVNode(Ra,qa,rd,sd,pd,fd,!0))}function createBlock(Ra,qa,rd,sd,pd){return setupBlock(createVNode(Ra,qa,rd,sd,pd,!0))}function isVNode(Ra){return Ra?Ra.__v_isVNode===!0:!1}function isSameVNodeType(Ra,qa){return Ra.type===qa.type&&Ra.key===qa.key}const normalizeKey=({key:Ra})=>Ra??null,normalizeRef=({ref:Ra,ref_key:qa,ref_for:rd})=>(typeof Ra=="number"&&(Ra=""+Ra),Ra!=null?isString$2(Ra)||isRef(Ra)||isFunction$4(Ra)?{i:currentRenderingInstance,r:Ra,k:qa,f:!!rd}:Ra:null);function createBaseVNode(Ra,qa=null,rd=null,sd=0,pd=null,fd=Ra===Fragment?0:1,hd=!1,md=!1){const gd={__v_isVNode:!0,__v_skip:!0,type:Ra,props:qa,key:qa&&normalizeKey(qa),ref:qa&&normalizeRef(qa),scopeId:currentScopeId,slotScopeIds:null,children:rd,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:fd,patchFlag:sd,dynamicProps:pd,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return md?(normalizeChildren$1(gd,rd),fd&128&&Ra.normalize(gd)):rd&&(gd.shapeFlag|=isString$2(rd)?8:16),isBlockTreeEnabled>0&&!hd&¤tBlock&&(gd.patchFlag>0||fd&6)&&gd.patchFlag!==32&¤tBlock.push(gd),gd}const createVNode=_createVNode;function _createVNode(Ra,qa=null,rd=null,sd=0,pd=null,fd=!1){if((!Ra||Ra===NULL_DYNAMIC_COMPONENT)&&(Ra=Comment$2),isVNode(Ra)){const md=cloneVNode(Ra,qa,!0);return rd&&normalizeChildren$1(md,rd),isBlockTreeEnabled>0&&!fd&¤tBlock&&(md.shapeFlag&6?currentBlock[currentBlock.indexOf(Ra)]=md:currentBlock.push(md)),md.patchFlag=-2,md}if(isClassComponent(Ra)&&(Ra=Ra.__vccOpts),qa){qa=guardReactiveProps(qa);let{class:md,style:gd}=qa;md&&!isString$2(md)&&(qa.class=normalizeClass(md)),isObject$9(gd)&&(isProxy(gd)&&!isArray$2(gd)&&(gd=extend$4({},gd)),qa.style=normalizeStyle(gd))}const hd=isString$2(Ra)?1:isSuspense(Ra)?128:isTeleport(Ra)?64:isObject$9(Ra)?4:isFunction$4(Ra)?2:0;return createBaseVNode(Ra,qa,rd,sd,pd,hd,fd,!0)}function guardReactiveProps(Ra){return Ra?isProxy(Ra)||isInternalObject(Ra)?extend$4({},Ra):Ra:null}function cloneVNode(Ra,qa,rd=!1,sd=!1){const{props:pd,ref:fd,patchFlag:hd,children:md,transition:gd}=Ra,yd=qa?mergeProps(pd||{},qa):pd,vd={__v_isVNode:!0,__v_skip:!0,type:Ra.type,props:yd,key:yd&&normalizeKey(yd),ref:qa&&qa.ref?rd&&fd?isArray$2(fd)?fd.concat(normalizeRef(qa)):[fd,normalizeRef(qa)]:normalizeRef(qa):fd,scopeId:Ra.scopeId,slotScopeIds:Ra.slotScopeIds,children:md,target:Ra.target,targetStart:Ra.targetStart,targetAnchor:Ra.targetAnchor,staticCount:Ra.staticCount,shapeFlag:Ra.shapeFlag,patchFlag:qa&&Ra.type!==Fragment?hd===-1?16:hd|16:hd,dynamicProps:Ra.dynamicProps,dynamicChildren:Ra.dynamicChildren,appContext:Ra.appContext,dirs:Ra.dirs,transition:gd,component:Ra.component,suspense:Ra.suspense,ssContent:Ra.ssContent&&cloneVNode(Ra.ssContent),ssFallback:Ra.ssFallback&&cloneVNode(Ra.ssFallback),el:Ra.el,anchor:Ra.anchor,ctx:Ra.ctx,ce:Ra.ce};return gd&&sd&&setTransitionHooks(vd,gd.clone(vd)),vd}function createTextVNode(Ra=" ",qa=0){return createVNode(Text$2,null,Ra,qa)}function createCommentVNode(Ra="",qa=!1){return qa?(openBlock(),createBlock(Comment$2,null,Ra)):createVNode(Comment$2,null,Ra)}function normalizeVNode(Ra){return Ra==null||typeof Ra=="boolean"?createVNode(Comment$2):isArray$2(Ra)?createVNode(Fragment,null,Ra.slice()):isVNode(Ra)?cloneIfMounted(Ra):createVNode(Text$2,null,String(Ra))}function cloneIfMounted(Ra){return Ra.el===null&&Ra.patchFlag!==-1||Ra.memo?Ra:cloneVNode(Ra)}function normalizeChildren$1(Ra,qa){let rd=0;const{shapeFlag:sd}=Ra;if(qa==null)qa=null;else if(isArray$2(qa))rd=16;else if(typeof qa=="object")if(sd&65){const pd=qa.default;pd&&(pd._c&&(pd._d=!1),normalizeChildren$1(Ra,pd()),pd._c&&(pd._d=!0));return}else{rd=32;const pd=qa._;!pd&&!isInternalObject(qa)?qa._ctx=currentRenderingInstance:pd===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?qa._=1:(qa._=2,Ra.patchFlag|=1024))}else isFunction$4(qa)?(qa={default:qa,_ctx:currentRenderingInstance},rd=32):(qa=String(qa),sd&64?(rd=16,qa=[createTextVNode(qa)]):rd=8);Ra.children=qa,Ra.shapeFlag|=rd}function mergeProps(...Ra){const qa={};for(let rd=0;rdcurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const Ra=getGlobalThis(),qa=(rd,sd)=>{let pd;return(pd=Ra[rd])||(pd=Ra[rd]=[]),pd.push(sd),fd=>{pd.length>1?pd.forEach(hd=>hd(fd)):pd[0](fd)}};internalSetCurrentInstance=qa("__VUE_INSTANCE_SETTERS__",rd=>currentInstance=rd),setInSSRSetupState=qa("__VUE_SSR_SETTERS__",rd=>isInSSRComponentSetup=rd)}const setCurrentInstance=Ra=>{const qa=currentInstance;return internalSetCurrentInstance(Ra),Ra.scope.on(),()=>{Ra.scope.off(),internalSetCurrentInstance(qa)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(Ra){return Ra.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(Ra,qa=!1,rd=!1){qa&&setInSSRSetupState(qa);const{props:sd,children:pd}=Ra.vnode,fd=isStatefulComponent(Ra);initProps(Ra,sd,fd,qa),initSlots(Ra,pd,rd);const hd=fd?setupStatefulComponent(Ra,qa):void 0;return qa&&setInSSRSetupState(!1),hd}function setupStatefulComponent(Ra,qa){const rd=Ra.type;Ra.accessCache=Object.create(null),Ra.proxy=new Proxy(Ra.ctx,PublicInstanceProxyHandlers);const{setup:sd}=rd;if(sd){pauseTracking();const pd=Ra.setupContext=sd.length>1?createSetupContext(Ra):null,fd=setCurrentInstance(Ra),hd=callWithErrorHandling(sd,Ra,0,[Ra.props,pd]),md=isPromise(hd);if(resetTracking(),fd(),(md||Ra.sp)&&!isAsyncWrapper(Ra)&&markAsyncBoundary(Ra),md){if(hd.then(unsetCurrentInstance,unsetCurrentInstance),qa)return hd.then(gd=>{handleSetupResult(Ra,gd)}).catch(gd=>{handleError$1(gd,Ra,0)});Ra.asyncDep=hd}else handleSetupResult(Ra,hd)}else finishComponentSetup(Ra)}function handleSetupResult(Ra,qa,rd){isFunction$4(qa)?Ra.type.__ssrInlineRender?Ra.ssrRender=qa:Ra.render=qa:isObject$9(qa)&&(Ra.setupState=proxyRefs(qa)),finishComponentSetup(Ra)}function finishComponentSetup(Ra,qa,rd){const sd=Ra.type;Ra.render||(Ra.render=sd.render||NOOP);{const pd=setCurrentInstance(Ra);pauseTracking();try{applyOptions(Ra)}finally{resetTracking(),pd()}}}const attrsProxyHandlers={get(Ra,qa){return track(Ra,"get",""),Ra[qa]}};function createSetupContext(Ra){const qa=rd=>{Ra.exposed=rd||{}};return{attrs:new Proxy(Ra.attrs,attrsProxyHandlers),slots:Ra.slots,emit:Ra.emit,expose:qa}}function getComponentPublicInstance(Ra){return Ra.exposed?Ra.exposeProxy||(Ra.exposeProxy=new Proxy(proxyRefs(markRaw(Ra.exposed)),{get(qa,rd){if(rd in qa)return qa[rd];if(rd in publicPropertiesMap)return publicPropertiesMap[rd](Ra)},has(qa,rd){return rd in qa||rd in publicPropertiesMap}})):Ra.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=Ra=>Ra.replace(classifyRE,qa=>qa.toUpperCase()).replace(/[-_]/g,"");function getComponentName(Ra,qa=!0){return isFunction$4(Ra)?Ra.displayName||Ra.name:Ra.name||qa&&Ra.__name}function formatComponentName(Ra,qa,rd=!1){let sd=getComponentName(qa);if(!sd&&qa.__file){const pd=qa.__file.match(/([^/\\]+)\.\w+$/);pd&&(sd=pd[1])}if(!sd&&Ra&&Ra.parent){const pd=fd=>{for(const hd in fd)if(fd[hd]===qa)return hd};sd=pd(Ra.components||Ra.parent.type.components)||pd(Ra.appContext.components)}return sd?classify(sd):rd?"App":"Anonymous"}function isClassComponent(Ra){return isFunction$4(Ra)&&"__vccOpts"in Ra}const computed=(Ra,qa)=>computed$1(Ra,qa,isInSSRComponentSetup);function h$2(Ra,qa,rd){const sd=arguments.length;return sd===2?isObject$9(qa)&&!isArray$2(qa)?isVNode(qa)?createVNode(Ra,null,[qa]):createVNode(Ra,qa):createVNode(Ra,null,qa):(sd>3?rd=Array.prototype.slice.call(arguments,2):sd===3&&isVNode(rd)&&(rd=[rd]),createVNode(Ra,qa,rd))}const version$4="3.5.13";/** +**/const stack=[];let isWarning=!1;function warn$1(Ra,...ed){if(isWarning)return;isWarning=!0,pauseTracking();const ud=stack.length?stack[stack.length-1].component:null,dd=ud&&ud.appContext.config.warnHandler,hd=getComponentTrace();if(dd)callWithErrorHandling(dd,ud,11,[Ra+ed.map(md=>{var gd,yd;return(yd=(gd=md.toString)==null?void 0:gd.call(md))!=null?yd:JSON.stringify(md)}).join(""),ud&&ud.proxy,hd.map(({vnode:md})=>`at <${formatComponentName(ud,md.type)}>`).join(` +`),hd]);else{const md=[`[Vue warn]: ${Ra}`,...ed];hd.length&&md.push(` +`,...formatTrace(hd)),console.warn(...md)}resetTracking(),isWarning=!1}function getComponentTrace(){let Ra=stack[stack.length-1];if(!Ra)return[];const ed=[];for(;Ra;){const ud=ed[0];ud&&ud.vnode===Ra?ud.recurseCount++:ed.push({vnode:Ra,recurseCount:0});const dd=Ra.component&&Ra.component.parent;Ra=dd&&dd.vnode}return ed}function formatTrace(Ra){const ed=[];return Ra.forEach((ud,dd)=>{ed.push(...dd===0?[]:[` +`],...formatTraceEntry(ud))}),ed}function formatTraceEntry({vnode:Ra,recurseCount:ed}){const ud=ed>0?`... (${ed} recursive calls)`:"",dd=Ra.component?Ra.component.parent==null:!1,hd=` at <${formatComponentName(Ra.component,Ra.type,dd)}`,md=">"+ud;return Ra.props?[hd,...formatProps(Ra.props),md]:[hd+md]}function formatProps(Ra){const ed=[],ud=Object.keys(Ra);return ud.slice(0,3).forEach(dd=>{ed.push(...formatProp(dd,Ra[dd]))}),ud.length>3&&ed.push(" ..."),ed}function formatProp(Ra,ed,ud){return isString$2(ed)?(ed=JSON.stringify(ed),ud?ed:[`${Ra}=${ed}`]):typeof ed=="number"||typeof ed=="boolean"||ed==null?ud?ed:[`${Ra}=${ed}`]:isRef(ed)?(ed=formatProp(Ra,toRaw(ed.value),!0),ud?ed:[`${Ra}=Ref<`,ed,">"]):isFunction$4(ed)?[`${Ra}=fn${ed.name?`<${ed.name}>`:""}`]:(ed=toRaw(ed),ud?ed:[`${Ra}=`,ed])}function callWithErrorHandling(Ra,ed,ud,dd){try{return dd?Ra(...dd):Ra()}catch(hd){handleError$1(hd,ed,ud)}}function callWithAsyncErrorHandling(Ra,ed,ud,dd){if(isFunction$4(Ra)){const hd=callWithErrorHandling(Ra,ed,ud,dd);return hd&&isPromise(hd)&&hd.catch(md=>{handleError$1(md,ed,ud)}),hd}if(isArray$3(Ra)){const hd=[];for(let md=0;md>>1,hd=queue$2[dd],md=getId(hd);md=getId(ud)?queue$2.push(Ra):queue$2.splice(findInsertionIndex(ed),0,Ra),Ra.flags|=1,queueFlush()}}function queueFlush(){currentFlushPromise||(currentFlushPromise=resolvedPromise.then(flushJobs))}function queuePostFlushCb(Ra){isArray$3(Ra)?pendingPostFlushCbs.push(...Ra):activePostFlushCbs&&Ra.id===-1?activePostFlushCbs.splice(postFlushIndex+1,0,Ra):Ra.flags&1||(pendingPostFlushCbs.push(Ra),Ra.flags|=1),queueFlush()}function flushPreFlushCbs(Ra,ed,ud=flushIndex+1){for(;udgetId(ud)-getId(dd));if(pendingPostFlushCbs.length=0,activePostFlushCbs){activePostFlushCbs.push(...ed);return}for(activePostFlushCbs=ed,postFlushIndex=0;postFlushIndexRa.id==null?Ra.flags&2?-1:1/0:Ra.id;function flushJobs(Ra){try{for(flushIndex=0;flushIndex{dd._d&&setBlockTracking(-1);const md=setCurrentRenderingInstance(ed);let gd;try{gd=Ra(...hd)}finally{setCurrentRenderingInstance(md),dd._d&&setBlockTracking(1)}return gd};return dd._n=!0,dd._c=!0,dd._d=!0,dd}function withDirectives(Ra,ed){if(currentRenderingInstance===null)return Ra;const ud=getComponentPublicInstance(currentRenderingInstance),dd=Ra.dirs||(Ra.dirs=[]);for(let hd=0;hdRa.__isTeleport,isTeleportDisabled=Ra=>Ra&&(Ra.disabled||Ra.disabled===""),isTeleportDeferred=Ra=>Ra&&(Ra.defer||Ra.defer===""),isTargetSVG=Ra=>typeof SVGElement<"u"&&Ra instanceof SVGElement,isTargetMathML=Ra=>typeof MathMLElement=="function"&&Ra instanceof MathMLElement,resolveTarget=(Ra,ed)=>{const ud=Ra&&Ra.to;return isString$2(ud)?ed?ed(ud):null:ud},TeleportImpl={name:"Teleport",__isTeleport:!0,process(Ra,ed,ud,dd,hd,md,gd,yd,vd,Cd){const{mc:wd,pc:Nd,pbc:Ld,o:{insert:Ud,querySelector:jd,createText:Gd,createComment:Yd}}=Cd,zd=isTeleportDisabled(ed.props);let{shapeFlag:qd,children:Wd,dynamicChildren:Xd}=ed;if(Ra==null){const Jd=ed.el=Gd(""),Zd=ed.anchor=Gd("");Ud(Jd,ud,dd),Ud(Zd,ud,dd);const mf=(_f,vf)=>{qd&16&&(hd&&hd.isCE&&(hd.ce._teleportTarget=_f),wd(Wd,_f,vf,hd,md,gd,yd,vd))},xf=()=>{const _f=ed.target=resolveTarget(ed.props,jd),vf=prepareAnchor(_f,ed,Gd,Ud);_f&&(gd!=="svg"&&isTargetSVG(_f)?gd="svg":gd!=="mathml"&&isTargetMathML(_f)&&(gd="mathml"),zd||(mf(_f,vf),updateCssVars(ed,!1)))};zd&&(mf(ud,Zd),updateCssVars(ed,!0)),isTeleportDeferred(ed.props)?queuePostRenderEffect(()=>{xf(),ed.el.__isMounted=!0},md):xf()}else{if(isTeleportDeferred(ed.props)&&!Ra.el.__isMounted){queuePostRenderEffect(()=>{TeleportImpl.process(Ra,ed,ud,dd,hd,md,gd,yd,vd,Cd),delete Ra.el.__isMounted},md);return}ed.el=Ra.el,ed.targetStart=Ra.targetStart;const Jd=ed.anchor=Ra.anchor,Zd=ed.target=Ra.target,mf=ed.targetAnchor=Ra.targetAnchor,xf=isTeleportDisabled(Ra.props),_f=xf?ud:Zd,vf=xf?Jd:mf;if(gd==="svg"||isTargetSVG(Zd)?gd="svg":(gd==="mathml"||isTargetMathML(Zd))&&(gd="mathml"),Xd?(Ld(Ra.dynamicChildren,Xd,_f,hd,md,gd,yd),traverseStaticChildren(Ra,ed,!0)):vd||Nd(Ra,ed,_f,vf,hd,md,gd,yd,!1),zd)xf?ed.props&&Ra.props&&ed.props.to!==Ra.props.to&&(ed.props.to=Ra.props.to):moveTeleport(ed,ud,Jd,Cd,1);else if((ed.props&&ed.props.to)!==(Ra.props&&Ra.props.to)){const gf=ed.target=resolveTarget(ed.props,jd);gf&&moveTeleport(ed,gf,null,Cd,0)}else xf&&moveTeleport(ed,Zd,mf,Cd,1);updateCssVars(ed,zd)}},remove(Ra,ed,ud,{um:dd,o:{remove:hd}},md){const{shapeFlag:gd,children:yd,anchor:vd,targetStart:Cd,targetAnchor:wd,target:Nd,props:Ld}=Ra;if(Nd&&(hd(Cd),hd(wd)),md&&hd(vd),gd&16){const Ud=md||!isTeleportDisabled(Ld);for(let jd=0;jd{Ra.isMounted=!0}),onBeforeUnmount(()=>{Ra.isUnmounting=!0}),Ra}const TransitionHookValidator=[Function,Array],BaseTransitionPropsValidators={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:TransitionHookValidator,onEnter:TransitionHookValidator,onAfterEnter:TransitionHookValidator,onEnterCancelled:TransitionHookValidator,onBeforeLeave:TransitionHookValidator,onLeave:TransitionHookValidator,onAfterLeave:TransitionHookValidator,onLeaveCancelled:TransitionHookValidator,onBeforeAppear:TransitionHookValidator,onAppear:TransitionHookValidator,onAfterAppear:TransitionHookValidator,onAppearCancelled:TransitionHookValidator},recursiveGetSubtree=Ra=>{const ed=Ra.subTree;return ed.component?recursiveGetSubtree(ed.component):ed},BaseTransitionImpl={name:"BaseTransition",props:BaseTransitionPropsValidators,setup(Ra,{slots:ed}){const ud=getCurrentInstance(),dd=useTransitionState();return()=>{const hd=ed.default&&getTransitionRawChildren(ed.default(),!0);if(!hd||!hd.length)return;const md=findNonCommentChild(hd),gd=toRaw(Ra),{mode:yd}=gd;if(dd.isLeaving)return emptyPlaceholder(md);const vd=getInnerChild$1(md);if(!vd)return emptyPlaceholder(md);let Cd=resolveTransitionHooks(vd,gd,dd,ud,Nd=>Cd=Nd);vd.type!==Comment$2&&setTransitionHooks(vd,Cd);let wd=ud.subTree&&getInnerChild$1(ud.subTree);if(wd&&wd.type!==Comment$2&&!isSameVNodeType(vd,wd)&&recursiveGetSubtree(ud).type!==Comment$2){let Nd=resolveTransitionHooks(wd,gd,dd,ud);if(setTransitionHooks(wd,Nd),yd==="out-in"&&vd.type!==Comment$2)return dd.isLeaving=!0,Nd.afterLeave=()=>{dd.isLeaving=!1,ud.job.flags&8||ud.update(),delete Nd.afterLeave,wd=void 0},emptyPlaceholder(md);yd==="in-out"&&vd.type!==Comment$2?Nd.delayLeave=(Ld,Ud,jd)=>{const Gd=getLeavingNodesForType(dd,wd);Gd[String(wd.key)]=wd,Ld[leaveCbKey]=()=>{Ud(),Ld[leaveCbKey]=void 0,delete Cd.delayedLeave,wd=void 0},Cd.delayedLeave=()=>{jd(),delete Cd.delayedLeave,wd=void 0}}:wd=void 0}else wd&&(wd=void 0);return md}}};function findNonCommentChild(Ra){let ed=Ra[0];if(Ra.length>1){for(const ud of Ra)if(ud.type!==Comment$2){ed=ud;break}}return ed}const BaseTransition=BaseTransitionImpl;function getLeavingNodesForType(Ra,ed){const{leavingVNodes:ud}=Ra;let dd=ud.get(ed.type);return dd||(dd=Object.create(null),ud.set(ed.type,dd)),dd}function resolveTransitionHooks(Ra,ed,ud,dd,hd){const{appear:md,mode:gd,persisted:yd=!1,onBeforeEnter:vd,onEnter:Cd,onAfterEnter:wd,onEnterCancelled:Nd,onBeforeLeave:Ld,onLeave:Ud,onAfterLeave:jd,onLeaveCancelled:Gd,onBeforeAppear:Yd,onAppear:zd,onAfterAppear:qd,onAppearCancelled:Wd}=ed,Xd=String(Ra.key),Jd=getLeavingNodesForType(ud,Ra),Zd=(_f,vf)=>{_f&&callWithAsyncErrorHandling(_f,dd,9,vf)},mf=(_f,vf)=>{const gf=vf[1];Zd(_f,vf),isArray$3(_f)?_f.every(Af=>Af.length<=1)&&gf():_f.length<=1&&gf()},xf={mode:gd,persisted:yd,beforeEnter(_f){let vf=vd;if(!ud.isMounted)if(md)vf=Yd||vd;else return;_f[leaveCbKey]&&_f[leaveCbKey](!0);const gf=Jd[Xd];gf&&isSameVNodeType(Ra,gf)&&gf.el[leaveCbKey]&&gf.el[leaveCbKey](),Zd(vf,[_f])},enter(_f){let vf=Cd,gf=wd,Af=Nd;if(!ud.isMounted)if(md)vf=zd||Cd,gf=qd||wd,Af=Wd||Nd;else return;let Df=!1;const Of=_f[enterCbKey]=Cf=>{Df||(Df=!0,Cf?Zd(Af,[_f]):Zd(gf,[_f]),xf.delayedLeave&&xf.delayedLeave(),_f[enterCbKey]=void 0)};vf?mf(vf,[_f,Of]):Of()},leave(_f,vf){const gf=String(Ra.key);if(_f[enterCbKey]&&_f[enterCbKey](!0),ud.isUnmounting)return vf();Zd(Ld,[_f]);let Af=!1;const Df=_f[leaveCbKey]=Of=>{Af||(Af=!0,vf(),Of?Zd(Gd,[_f]):Zd(jd,[_f]),_f[leaveCbKey]=void 0,Jd[gf]===Ra&&delete Jd[gf])};Jd[gf]=Ra,Ud?mf(Ud,[_f,Df]):Df()},clone(_f){const vf=resolveTransitionHooks(_f,ed,ud,dd,hd);return hd&&hd(vf),vf}};return xf}function emptyPlaceholder(Ra){if(isKeepAlive(Ra))return Ra=cloneVNode(Ra),Ra.children=null,Ra}function getInnerChild$1(Ra){if(!isKeepAlive(Ra))return isTeleport(Ra.type)&&Ra.children?findNonCommentChild(Ra.children):Ra;const{shapeFlag:ed,children:ud}=Ra;if(ud){if(ed&16)return ud[0];if(ed&32&&isFunction$4(ud.default))return ud.default()}}function setTransitionHooks(Ra,ed){Ra.shapeFlag&6&&Ra.component?(Ra.transition=ed,setTransitionHooks(Ra.component.subTree,ed)):Ra.shapeFlag&128?(Ra.ssContent.transition=ed.clone(Ra.ssContent),Ra.ssFallback.transition=ed.clone(Ra.ssFallback)):Ra.transition=ed}function getTransitionRawChildren(Ra,ed=!1,ud){let dd=[],hd=0;for(let md=0;md1)for(let md=0;mdud.value,set:md=>ud.value=md})}return ud}function setRef(Ra,ed,ud,dd,hd=!1){if(isArray$3(Ra)){Ra.forEach((jd,Gd)=>setRef(jd,ed&&(isArray$3(ed)?ed[Gd]:ed),ud,dd,hd));return}if(isAsyncWrapper(dd)&&!hd){dd.shapeFlag&512&&dd.type.__asyncResolved&&dd.component.subTree.component&&setRef(Ra,ed,ud,dd.component.subTree);return}const md=dd.shapeFlag&4?getComponentPublicInstance(dd.component):dd.el,gd=hd?null:md,{i:yd,r:vd}=Ra,Cd=ed&&ed.r,wd=yd.refs===EMPTY_OBJ?yd.refs={}:yd.refs,Nd=yd.setupState,Ld=toRaw(Nd),Ud=Nd===EMPTY_OBJ?()=>!1:jd=>hasOwn$4(Ld,jd);if(Cd!=null&&Cd!==vd&&(isString$2(Cd)?(wd[Cd]=null,Ud(Cd)&&(Nd[Cd]=null)):isRef(Cd)&&(Cd.value=null)),isFunction$4(vd))callWithErrorHandling(vd,yd,12,[gd,wd]);else{const jd=isString$2(vd),Gd=isRef(vd);if(jd||Gd){const Yd=()=>{if(Ra.f){const zd=jd?Ud(vd)?Nd[vd]:wd[vd]:vd.value;hd?isArray$3(zd)&&remove$2(zd,md):isArray$3(zd)?zd.includes(md)||zd.push(md):jd?(wd[vd]=[md],Ud(vd)&&(Nd[vd]=wd[vd])):(vd.value=[md],Ra.k&&(wd[Ra.k]=vd.value))}else jd?(wd[vd]=gd,Ud(vd)&&(Nd[vd]=gd)):Gd&&(vd.value=gd,Ra.k&&(wd[Ra.k]=gd))};gd?(Yd.id=-1,queuePostRenderEffect(Yd,ud)):Yd()}}}getGlobalThis().requestIdleCallback;getGlobalThis().cancelIdleCallback;const isAsyncWrapper=Ra=>!!Ra.type.__asyncLoader,isKeepAlive=Ra=>Ra.type.__isKeepAlive;function onActivated(Ra,ed){registerKeepAliveHook(Ra,"a",ed)}function onDeactivated(Ra,ed){registerKeepAliveHook(Ra,"da",ed)}function registerKeepAliveHook(Ra,ed,ud=currentInstance){const dd=Ra.__wdc||(Ra.__wdc=()=>{let hd=ud;for(;hd;){if(hd.isDeactivated)return;hd=hd.parent}return Ra()});if(injectHook(ed,dd,ud),ud){let hd=ud.parent;for(;hd&&hd.parent;)isKeepAlive(hd.parent.vnode)&&injectToKeepAliveRoot(dd,ed,ud,hd),hd=hd.parent}}function injectToKeepAliveRoot(Ra,ed,ud,dd){const hd=injectHook(ed,Ra,dd,!0);onUnmounted(()=>{remove$2(dd[ed],hd)},ud)}function injectHook(Ra,ed,ud=currentInstance,dd=!1){if(ud){const hd=ud[Ra]||(ud[Ra]=[]),md=ed.__weh||(ed.__weh=(...gd)=>{pauseTracking();const yd=setCurrentInstance(ud),vd=callWithAsyncErrorHandling(ed,ud,Ra,gd);return yd(),resetTracking(),vd});return dd?hd.unshift(md):hd.push(md),md}}const createHook=Ra=>(ed,ud=currentInstance)=>{(!isInSSRComponentSetup||Ra==="sp")&&injectHook(Ra,(...dd)=>ed(...dd),ud)},onBeforeMount=createHook("bm"),onMounted=createHook("m"),onBeforeUpdate=createHook("bu"),onUpdated=createHook("u"),onBeforeUnmount=createHook("bum"),onUnmounted=createHook("um"),onServerPrefetch=createHook("sp"),onRenderTriggered=createHook("rtg"),onRenderTracked=createHook("rtc");function onErrorCaptured(Ra,ed=currentInstance){injectHook("ec",Ra,ed)}const COMPONENTS="components";function resolveComponent(Ra,ed){return resolveAsset(COMPONENTS,Ra,!0,ed)||Ra}const NULL_DYNAMIC_COMPONENT=Symbol.for("v-ndc");function resolveDynamicComponent(Ra){return isString$2(Ra)?resolveAsset(COMPONENTS,Ra,!1)||Ra:Ra||NULL_DYNAMIC_COMPONENT}function resolveAsset(Ra,ed,ud=!0,dd=!1){const hd=currentRenderingInstance||currentInstance;if(hd){const md=hd.type;{const yd=getComponentName(md,!1);if(yd&&(yd===ed||yd===camelize(ed)||yd===capitalize(camelize(ed))))return md}const gd=resolve$1(hd[Ra]||md[Ra],ed)||resolve$1(hd.appContext[Ra],ed);return!gd&&dd?md:gd}}function resolve$1(Ra,ed){return Ra&&(Ra[ed]||Ra[camelize(ed)]||Ra[capitalize(camelize(ed))])}function renderList(Ra,ed,ud,dd){let hd;const md=ud,gd=isArray$3(Ra);if(gd||isString$2(Ra)){const yd=gd&&isReactive(Ra);let vd=!1;yd&&(vd=!isShallow(Ra),Ra=shallowReadArray(Ra)),hd=new Array(Ra.length);for(let Cd=0,wd=Ra.length;Cded(yd,vd,void 0,md));else{const yd=Object.keys(Ra);hd=new Array(yd.length);for(let vd=0,Cd=yd.length;vdisVNode(ed)?!(ed.type===Comment$2||ed.type===Fragment&&!ensureValidVNode(ed.children)):!0)?Ra:null}function toHandlers(Ra,ed){const ud={};for(const dd in Ra)ud[toHandlerKey(dd)]=Ra[dd];return ud}const getPublicInstance=Ra=>Ra?isStatefulComponent(Ra)?getComponentPublicInstance(Ra):getPublicInstance(Ra.parent):null,publicPropertiesMap=extend$4(Object.create(null),{$:Ra=>Ra,$el:Ra=>Ra.vnode.el,$data:Ra=>Ra.data,$props:Ra=>Ra.props,$attrs:Ra=>Ra.attrs,$slots:Ra=>Ra.slots,$refs:Ra=>Ra.refs,$parent:Ra=>getPublicInstance(Ra.parent),$root:Ra=>getPublicInstance(Ra.root),$host:Ra=>Ra.ce,$emit:Ra=>Ra.emit,$options:Ra=>resolveMergedOptions(Ra),$forceUpdate:Ra=>Ra.f||(Ra.f=()=>{queueJob(Ra.update)}),$nextTick:Ra=>Ra.n||(Ra.n=nextTick$1.bind(Ra.proxy)),$watch:Ra=>instanceWatch.bind(Ra)}),hasSetupBinding=(Ra,ed)=>Ra!==EMPTY_OBJ&&!Ra.__isScriptSetup&&hasOwn$4(Ra,ed),PublicInstanceProxyHandlers={get({_:Ra},ed){if(ed==="__v_skip")return!0;const{ctx:ud,setupState:dd,data:hd,props:md,accessCache:gd,type:yd,appContext:vd}=Ra;let Cd;if(ed[0]!=="$"){const Ud=gd[ed];if(Ud!==void 0)switch(Ud){case 1:return dd[ed];case 2:return hd[ed];case 4:return ud[ed];case 3:return md[ed]}else{if(hasSetupBinding(dd,ed))return gd[ed]=1,dd[ed];if(hd!==EMPTY_OBJ&&hasOwn$4(hd,ed))return gd[ed]=2,hd[ed];if((Cd=Ra.propsOptions[0])&&hasOwn$4(Cd,ed))return gd[ed]=3,md[ed];if(ud!==EMPTY_OBJ&&hasOwn$4(ud,ed))return gd[ed]=4,ud[ed];shouldCacheAccess&&(gd[ed]=0)}}const wd=publicPropertiesMap[ed];let Nd,Ld;if(wd)return ed==="$attrs"&&track(Ra.attrs,"get",""),wd(Ra);if((Nd=yd.__cssModules)&&(Nd=Nd[ed]))return Nd;if(ud!==EMPTY_OBJ&&hasOwn$4(ud,ed))return gd[ed]=4,ud[ed];if(Ld=vd.config.globalProperties,hasOwn$4(Ld,ed))return Ld[ed]},set({_:Ra},ed,ud){const{data:dd,setupState:hd,ctx:md}=Ra;return hasSetupBinding(hd,ed)?(hd[ed]=ud,!0):dd!==EMPTY_OBJ&&hasOwn$4(dd,ed)?(dd[ed]=ud,!0):hasOwn$4(Ra.props,ed)||ed[0]==="$"&&ed.slice(1)in Ra?!1:(md[ed]=ud,!0)},has({_:{data:Ra,setupState:ed,accessCache:ud,ctx:dd,appContext:hd,propsOptions:md}},gd){let yd;return!!ud[gd]||Ra!==EMPTY_OBJ&&hasOwn$4(Ra,gd)||hasSetupBinding(ed,gd)||(yd=md[0])&&hasOwn$4(yd,gd)||hasOwn$4(dd,gd)||hasOwn$4(publicPropertiesMap,gd)||hasOwn$4(hd.config.globalProperties,gd)},defineProperty(Ra,ed,ud){return ud.get!=null?Ra._.accessCache[ed]=0:hasOwn$4(ud,"value")&&this.set(Ra,ed,ud.value,null),Reflect.defineProperty(Ra,ed,ud)}};function useSlots(){return getContext().slots}function useAttrs(){return getContext().attrs}function getContext(){const Ra=getCurrentInstance();return Ra.setupContext||(Ra.setupContext=createSetupContext(Ra))}function normalizePropsOrEmits(Ra){return isArray$3(Ra)?Ra.reduce((ed,ud)=>(ed[ud]=null,ed),{}):Ra}function mergeDefaults(Ra,ed){const ud=normalizePropsOrEmits(Ra);for(const dd in ed){if(dd.startsWith("__skip"))continue;let hd=ud[dd];hd?isArray$3(hd)||isFunction$4(hd)?hd=ud[dd]={type:hd,default:ed[dd]}:hd.default=ed[dd]:hd===null&&(hd=ud[dd]={default:ed[dd]}),hd&&ed[`__skip_${dd}`]&&(hd.skipFactory=!0)}return ud}let shouldCacheAccess=!0;function applyOptions(Ra){const ed=resolveMergedOptions(Ra),ud=Ra.proxy,dd=Ra.ctx;shouldCacheAccess=!1,ed.beforeCreate&&callHook$1(ed.beforeCreate,Ra,"bc");const{data:hd,computed:md,methods:gd,watch:yd,provide:vd,inject:Cd,created:wd,beforeMount:Nd,mounted:Ld,beforeUpdate:Ud,updated:jd,activated:Gd,deactivated:Yd,beforeDestroy:zd,beforeUnmount:qd,destroyed:Wd,unmounted:Xd,render:Jd,renderTracked:Zd,renderTriggered:mf,errorCaptured:xf,serverPrefetch:_f,expose:vf,inheritAttrs:gf,components:Af,directives:Df,filters:Of}=ed;if(Cd&&resolveInjections(Cd,dd,null),gd)for(const Ff in gd){const sh=gd[Ff];isFunction$4(sh)&&(dd[Ff]=sh.bind(ud))}if(hd){const Ff=hd.call(ud,ud);isObject$9(Ff)&&(Ra.data=reactive(Ff))}if(shouldCacheAccess=!0,md)for(const Ff in md){const sh=md[Ff],Sh=isFunction$4(sh)?sh.bind(ud,ud):isFunction$4(sh.get)?sh.get.bind(ud,ud):NOOP,yh=!isFunction$4(sh)&&isFunction$4(sh.set)?sh.set.bind(ud):NOOP,Mh=computed({get:Sh,set:yh});Object.defineProperty(dd,Ff,{enumerable:!0,configurable:!0,get:()=>Mh.value,set:lh=>Mh.value=lh})}if(yd)for(const Ff in yd)createWatcher(yd[Ff],dd,ud,Ff);if(vd){const Ff=isFunction$4(vd)?vd.call(ud):vd;Reflect.ownKeys(Ff).forEach(sh=>{provide(sh,Ff[sh])})}wd&&callHook$1(wd,Ra,"c");function If(Ff,sh){isArray$3(sh)?sh.forEach(Sh=>Ff(Sh.bind(ud))):sh&&Ff(sh.bind(ud))}if(If(onBeforeMount,Nd),If(onMounted,Ld),If(onBeforeUpdate,Ud),If(onUpdated,jd),If(onActivated,Gd),If(onDeactivated,Yd),If(onErrorCaptured,xf),If(onRenderTracked,Zd),If(onRenderTriggered,mf),If(onBeforeUnmount,qd),If(onUnmounted,Xd),If(onServerPrefetch,_f),isArray$3(vf))if(vf.length){const Ff=Ra.exposed||(Ra.exposed={});vf.forEach(sh=>{Object.defineProperty(Ff,sh,{get:()=>ud[sh],set:Sh=>ud[sh]=Sh})})}else Ra.exposed||(Ra.exposed={});Jd&&Ra.render===NOOP&&(Ra.render=Jd),gf!=null&&(Ra.inheritAttrs=gf),Af&&(Ra.components=Af),Df&&(Ra.directives=Df),_f&&markAsyncBoundary(Ra)}function resolveInjections(Ra,ed,ud=NOOP){isArray$3(Ra)&&(Ra=normalizeInject(Ra));for(const dd in Ra){const hd=Ra[dd];let md;isObject$9(hd)?"default"in hd?md=inject(hd.from||dd,hd.default,!0):md=inject(hd.from||dd):md=inject(hd),isRef(md)?Object.defineProperty(ed,dd,{enumerable:!0,configurable:!0,get:()=>md.value,set:gd=>md.value=gd}):ed[dd]=md}}function callHook$1(Ra,ed,ud){callWithAsyncErrorHandling(isArray$3(Ra)?Ra.map(dd=>dd.bind(ed.proxy)):Ra.bind(ed.proxy),ed,ud)}function createWatcher(Ra,ed,ud,dd){let hd=dd.includes(".")?createPathGetter(ud,dd):()=>ud[dd];if(isString$2(Ra)){const md=ed[Ra];isFunction$4(md)&&watch(hd,md)}else if(isFunction$4(Ra))watch(hd,Ra.bind(ud));else if(isObject$9(Ra))if(isArray$3(Ra))Ra.forEach(md=>createWatcher(md,ed,ud,dd));else{const md=isFunction$4(Ra.handler)?Ra.handler.bind(ud):ed[Ra.handler];isFunction$4(md)&&watch(hd,md,Ra)}}function resolveMergedOptions(Ra){const ed=Ra.type,{mixins:ud,extends:dd}=ed,{mixins:hd,optionsCache:md,config:{optionMergeStrategies:gd}}=Ra.appContext,yd=md.get(ed);let vd;return yd?vd=yd:!hd.length&&!ud&&!dd?vd=ed:(vd={},hd.length&&hd.forEach(Cd=>mergeOptions(vd,Cd,gd,!0)),mergeOptions(vd,ed,gd)),isObject$9(ed)&&md.set(ed,vd),vd}function mergeOptions(Ra,ed,ud,dd=!1){const{mixins:hd,extends:md}=ed;md&&mergeOptions(Ra,md,ud,!0),hd&&hd.forEach(gd=>mergeOptions(Ra,gd,ud,!0));for(const gd in ed)if(!(dd&&gd==="expose")){const yd=internalOptionMergeStrats[gd]||ud&&ud[gd];Ra[gd]=yd?yd(Ra[gd],ed[gd]):ed[gd]}return Ra}const internalOptionMergeStrats={data:mergeDataFn,props:mergeEmitsOrPropsOptions,emits:mergeEmitsOrPropsOptions,methods:mergeObjectOptions,computed:mergeObjectOptions,beforeCreate:mergeAsArray,created:mergeAsArray,beforeMount:mergeAsArray,mounted:mergeAsArray,beforeUpdate:mergeAsArray,updated:mergeAsArray,beforeDestroy:mergeAsArray,beforeUnmount:mergeAsArray,destroyed:mergeAsArray,unmounted:mergeAsArray,activated:mergeAsArray,deactivated:mergeAsArray,errorCaptured:mergeAsArray,serverPrefetch:mergeAsArray,components:mergeObjectOptions,directives:mergeObjectOptions,watch:mergeWatchOptions,provide:mergeDataFn,inject:mergeInject};function mergeDataFn(Ra,ed){return ed?Ra?function(){return extend$4(isFunction$4(Ra)?Ra.call(this,this):Ra,isFunction$4(ed)?ed.call(this,this):ed)}:ed:Ra}function mergeInject(Ra,ed){return mergeObjectOptions(normalizeInject(Ra),normalizeInject(ed))}function normalizeInject(Ra){if(isArray$3(Ra)){const ed={};for(let ud=0;ud1)return ud&&isFunction$4(ed)?ed.call(dd&&dd.proxy):ed}}function hasInjectionContext(){return!!(currentInstance||currentRenderingInstance||currentApp)}const internalObjectProto={},createInternalObject=()=>Object.create(internalObjectProto),isInternalObject=Ra=>Object.getPrototypeOf(Ra)===internalObjectProto;function initProps(Ra,ed,ud,dd=!1){const hd={},md=createInternalObject();Ra.propsDefaults=Object.create(null),setFullProps(Ra,ed,hd,md);for(const gd in Ra.propsOptions[0])gd in hd||(hd[gd]=void 0);ud?Ra.props=dd?hd:shallowReactive(hd):Ra.type.props?Ra.props=hd:Ra.props=md,Ra.attrs=md}function updateProps(Ra,ed,ud,dd){const{props:hd,attrs:md,vnode:{patchFlag:gd}}=Ra,yd=toRaw(hd),[vd]=Ra.propsOptions;let Cd=!1;if((dd||gd>0)&&!(gd&16)){if(gd&8){const wd=Ra.vnode.dynamicProps;for(let Nd=0;Nd{vd=!0;const[Ld,Ud]=normalizePropsOptions(Nd,ed,!0);extend$4(gd,Ld),Ud&&yd.push(...Ud)};!ud&&ed.mixins.length&&ed.mixins.forEach(wd),Ra.extends&&wd(Ra.extends),Ra.mixins&&Ra.mixins.forEach(wd)}if(!md&&!vd)return isObject$9(Ra)&&dd.set(Ra,EMPTY_ARR),EMPTY_ARR;if(isArray$3(md))for(let wd=0;wdRa[0]==="_"||Ra==="$stable",normalizeSlotValue=Ra=>isArray$3(Ra)?Ra.map(normalizeVNode):[normalizeVNode(Ra)],normalizeSlot=(Ra,ed,ud)=>{if(ed._n)return ed;const dd=withCtx((...hd)=>normalizeSlotValue(ed(...hd)),ud);return dd._c=!1,dd},normalizeObjectSlots=(Ra,ed,ud)=>{const dd=Ra._ctx;for(const hd in Ra){if(isInternalKey(hd))continue;const md=Ra[hd];if(isFunction$4(md))ed[hd]=normalizeSlot(hd,md,dd);else if(md!=null){const gd=normalizeSlotValue(md);ed[hd]=()=>gd}}},normalizeVNodeSlots=(Ra,ed)=>{const ud=normalizeSlotValue(ed);Ra.slots.default=()=>ud},assignSlots=(Ra,ed,ud)=>{for(const dd in ed)(ud||dd!=="_")&&(Ra[dd]=ed[dd])},initSlots=(Ra,ed,ud)=>{const dd=Ra.slots=createInternalObject();if(Ra.vnode.shapeFlag&32){const hd=ed._;hd?(assignSlots(dd,ed,ud),ud&&def$2(dd,"_",hd,!0)):normalizeObjectSlots(ed,dd)}else ed&&normalizeVNodeSlots(Ra,ed)},updateSlots=(Ra,ed,ud)=>{const{vnode:dd,slots:hd}=Ra;let md=!0,gd=EMPTY_OBJ;if(dd.shapeFlag&32){const yd=ed._;yd?ud&&yd===1?md=!1:assignSlots(hd,ed,ud):(md=!ed.$stable,normalizeObjectSlots(ed,hd)),gd=ed}else ed&&(normalizeVNodeSlots(Ra,ed),gd={default:1});if(md)for(const yd in hd)!isInternalKey(yd)&&gd[yd]==null&&delete hd[yd]},queuePostRenderEffect=queueEffectWithSuspense;function createRenderer$1(Ra){return baseCreateRenderer(Ra)}function baseCreateRenderer(Ra,ed){const ud=getGlobalThis();ud.__VUE__=!0;const{insert:dd,remove:hd,patchProp:md,createElement:gd,createText:yd,createComment:vd,setText:Cd,setElementText:wd,parentNode:Nd,nextSibling:Ld,setScopeId:Ud=NOOP,insertStaticContent:jd}=Ra,Gd=(th,oh,Zh,Sm=null,$h=null,Vf=null,nh=void 0,Lh=null,Ih=!!oh.dynamicChildren)=>{if(th===oh)return;th&&!isSameVNodeType(th,oh)&&(Sm=kf(th),lh(th,$h,Vf,!0),th=null),oh.patchFlag===-2&&(Ih=!1,oh.dynamicChildren=null);const{type:om,ref:zh,shapeFlag:Om}=oh;switch(om){case Text$2:Yd(th,oh,Zh,Sm);break;case Comment$2:zd(th,oh,Zh,Sm);break;case Static:th==null&&qd(oh,Zh,Sm,nh);break;case Fragment:Af(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih);break;default:Om&1?Jd(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih):Om&6?Df(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih):(Om&64||Om&128)&&om.process(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih,Ph)}zh!=null&&$h&&setRef(zh,th&&th.ref,Vf,oh||th,!oh)},Yd=(th,oh,Zh,Sm)=>{if(th==null)dd(oh.el=yd(oh.children),Zh,Sm);else{const $h=oh.el=th.el;oh.children!==th.children&&Cd($h,oh.children)}},zd=(th,oh,Zh,Sm)=>{th==null?dd(oh.el=vd(oh.children||""),Zh,Sm):oh.el=th.el},qd=(th,oh,Zh,Sm)=>{[th.el,th.anchor]=jd(th.children,oh,Zh,Sm,th.el,th.anchor)},Wd=({el:th,anchor:oh},Zh,Sm)=>{let $h;for(;th&&th!==oh;)$h=Ld(th),dd(th,Zh,Sm),th=$h;dd(oh,Zh,Sm)},Xd=({el:th,anchor:oh})=>{let Zh;for(;th&&th!==oh;)Zh=Ld(th),hd(th),th=Zh;hd(oh)},Jd=(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih)=>{oh.type==="svg"?nh="svg":oh.type==="math"&&(nh="mathml"),th==null?Zd(oh,Zh,Sm,$h,Vf,nh,Lh,Ih):_f(th,oh,$h,Vf,nh,Lh,Ih)},Zd=(th,oh,Zh,Sm,$h,Vf,nh,Lh)=>{let Ih,om;const{props:zh,shapeFlag:Om,transition:Im,dirs:Zm}=th;if(Ih=th.el=gd(th.type,Vf,zh&&zh.is,zh),Om&8?wd(Ih,th.children):Om&16&&xf(th.children,Ih,null,Sm,$h,resolveChildrenNamespace(th,Vf),nh,Lh),Zm&&invokeDirectiveHook(th,null,Sm,"created"),mf(Ih,th,th.scopeId,nh,Sm),zh){for(const Wm in zh)Wm!=="value"&&!isReservedProp(Wm)&&md(Ih,Wm,null,zh[Wm],Vf,Sm);"value"in zh&&md(Ih,"value",null,zh.value,Vf),(om=zh.onVnodeBeforeMount)&&invokeVNodeHook(om,Sm,th)}Zm&&invokeDirectiveHook(th,null,Sm,"beforeMount");const Lm=needTransition($h,Im);Lm&&Im.beforeEnter(Ih),dd(Ih,oh,Zh),((om=zh&&zh.onVnodeMounted)||Lm||Zm)&&queuePostRenderEffect(()=>{om&&invokeVNodeHook(om,Sm,th),Lm&&Im.enter(Ih),Zm&&invokeDirectiveHook(th,null,Sm,"mounted")},$h)},mf=(th,oh,Zh,Sm,$h)=>{if(Zh&&Ud(th,Zh),Sm)for(let Vf=0;Vf{for(let om=Ih;om{const Lh=oh.el=th.el;let{patchFlag:Ih,dynamicChildren:om,dirs:zh}=oh;Ih|=th.patchFlag&16;const Om=th.props||EMPTY_OBJ,Im=oh.props||EMPTY_OBJ;let Zm;if(Zh&&toggleRecurse(Zh,!1),(Zm=Im.onVnodeBeforeUpdate)&&invokeVNodeHook(Zm,Zh,oh,th),zh&&invokeDirectiveHook(oh,th,Zh,"beforeUpdate"),Zh&&toggleRecurse(Zh,!0),(Om.innerHTML&&Im.innerHTML==null||Om.textContent&&Im.textContent==null)&&wd(Lh,""),om?vf(th.dynamicChildren,om,Lh,Zh,Sm,resolveChildrenNamespace(oh,$h),Vf):nh||sh(th,oh,Lh,null,Zh,Sm,resolveChildrenNamespace(oh,$h),Vf,!1),Ih>0){if(Ih&16)gf(Lh,Om,Im,Zh,$h);else if(Ih&2&&Om.class!==Im.class&&md(Lh,"class",null,Im.class,$h),Ih&4&&md(Lh,"style",Om.style,Im.style,$h),Ih&8){const Lm=oh.dynamicProps;for(let Wm=0;Wm{Zm&&invokeVNodeHook(Zm,Zh,oh,th),zh&&invokeDirectiveHook(oh,th,Zh,"updated")},Sm)},vf=(th,oh,Zh,Sm,$h,Vf,nh)=>{for(let Lh=0;Lh{if(oh!==Zh){if(oh!==EMPTY_OBJ)for(const Vf in oh)!isReservedProp(Vf)&&!(Vf in Zh)&&md(th,Vf,oh[Vf],null,$h,Sm);for(const Vf in Zh){if(isReservedProp(Vf))continue;const nh=Zh[Vf],Lh=oh[Vf];nh!==Lh&&Vf!=="value"&&md(th,Vf,Lh,nh,$h,Sm)}"value"in Zh&&md(th,"value",oh.value,Zh.value,$h)}},Af=(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih)=>{const om=oh.el=th?th.el:yd(""),zh=oh.anchor=th?th.anchor:yd("");let{patchFlag:Om,dynamicChildren:Im,slotScopeIds:Zm}=oh;Zm&&(Lh=Lh?Lh.concat(Zm):Zm),th==null?(dd(om,Zh,Sm),dd(zh,Zh,Sm),xf(oh.children||[],Zh,zh,$h,Vf,nh,Lh,Ih)):Om>0&&Om&64&&Im&&th.dynamicChildren?(vf(th.dynamicChildren,Im,Zh,$h,Vf,nh,Lh),(oh.key!=null||$h&&oh===$h.subTree)&&traverseStaticChildren(th,oh,!0)):sh(th,oh,Zh,zh,$h,Vf,nh,Lh,Ih)},Df=(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih)=>{oh.slotScopeIds=Lh,th==null?oh.shapeFlag&512?$h.ctx.activate(oh,Zh,Sm,nh,Ih):Of(oh,Zh,Sm,$h,Vf,nh,Ih):Cf(th,oh,Ih)},Of=(th,oh,Zh,Sm,$h,Vf,nh)=>{const Lh=th.component=createComponentInstance(th,Sm,$h);if(isKeepAlive(th)&&(Lh.ctx.renderer=Ph),setupComponent(Lh,!1,nh),Lh.asyncDep){if($h&&$h.registerDep(Lh,If,nh),!th.el){const Ih=Lh.subTree=createVNode(Comment$2);zd(null,Ih,oh,Zh)}}else If(Lh,th,oh,Zh,$h,Vf,nh)},Cf=(th,oh,Zh)=>{const Sm=oh.component=th.component;if(shouldUpdateComponent(th,oh,Zh))if(Sm.asyncDep&&!Sm.asyncResolved){Ff(Sm,oh,Zh);return}else Sm.next=oh,Sm.update();else oh.el=th.el,Sm.vnode=oh},If=(th,oh,Zh,Sm,$h,Vf,nh)=>{const Lh=()=>{if(th.isMounted){let{next:Om,bu:Im,u:Zm,parent:Lm,vnode:Wm}=th;{const $f=locateNonHydratedAsyncRoot(th);if($f){Om&&(Om.el=Wm.el,Ff(th,Om,nh)),$f.asyncDep.then(()=>{th.isUnmounted||Lh()});return}}let ig=Om,yg;toggleRecurse(th,!1),Om?(Om.el=Wm.el,Ff(th,Om,nh)):Om=Wm,Im&&invokeArrayFns(Im),(yg=Om.props&&Om.props.onVnodeBeforeUpdate)&&invokeVNodeHook(yg,Lm,Om,Wm),toggleRecurse(th,!0);const jh=renderComponentRoot(th),Pf=th.subTree;th.subTree=jh,Gd(Pf,jh,Nd(Pf.el),kf(Pf),th,$h,Vf),Om.el=jh.el,ig===null&&updateHOCHostEl(th,jh.el),Zm&&queuePostRenderEffect(Zm,$h),(yg=Om.props&&Om.props.onVnodeUpdated)&&queuePostRenderEffect(()=>invokeVNodeHook(yg,Lm,Om,Wm),$h)}else{let Om;const{el:Im,props:Zm}=oh,{bm:Lm,m:Wm,parent:ig,root:yg,type:jh}=th,Pf=isAsyncWrapper(oh);toggleRecurse(th,!1),Lm&&invokeArrayFns(Lm),!Pf&&(Om=Zm&&Zm.onVnodeBeforeMount)&&invokeVNodeHook(Om,ig,oh),toggleRecurse(th,!0);{yg.ce&&yg.ce._injectChildStyle(jh);const $f=th.subTree=renderComponentRoot(th);Gd(null,$f,Zh,Sm,th,$h,Vf),oh.el=$f.el}if(Wm&&queuePostRenderEffect(Wm,$h),!Pf&&(Om=Zm&&Zm.onVnodeMounted)){const $f=oh;queuePostRenderEffect(()=>invokeVNodeHook(Om,ig,$f),$h)}(oh.shapeFlag&256||ig&&isAsyncWrapper(ig.vnode)&&ig.vnode.shapeFlag&256)&&th.a&&queuePostRenderEffect(th.a,$h),th.isMounted=!0,oh=Zh=Sm=null}};th.scope.on();const Ih=th.effect=new ReactiveEffect(Lh);th.scope.off();const om=th.update=Ih.run.bind(Ih),zh=th.job=Ih.runIfDirty.bind(Ih);zh.i=th,zh.id=th.uid,Ih.scheduler=()=>queueJob(zh),toggleRecurse(th,!0),om()},Ff=(th,oh,Zh)=>{oh.component=th;const Sm=th.vnode.props;th.vnode=oh,th.next=null,updateProps(th,oh.props,Sm,Zh),updateSlots(th,oh.children,Zh),pauseTracking(),flushPreFlushCbs(th),resetTracking()},sh=(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih=!1)=>{const om=th&&th.children,zh=th?th.shapeFlag:0,Om=oh.children,{patchFlag:Im,shapeFlag:Zm}=oh;if(Im>0){if(Im&128){yh(om,Om,Zh,Sm,$h,Vf,nh,Lh,Ih);return}else if(Im&256){Sh(om,Om,Zh,Sm,$h,Vf,nh,Lh,Ih);return}}Zm&8?(zh&16&&Eh(om,$h,Vf),Om!==om&&wd(Zh,Om)):zh&16?Zm&16?yh(om,Om,Zh,Sm,$h,Vf,nh,Lh,Ih):Eh(om,$h,Vf,!0):(zh&8&&wd(Zh,""),Zm&16&&xf(Om,Zh,Sm,$h,Vf,nh,Lh,Ih))},Sh=(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih)=>{th=th||EMPTY_ARR,oh=oh||EMPTY_ARR;const om=th.length,zh=oh.length,Om=Math.min(om,zh);let Im;for(Im=0;Imzh?Eh(th,$h,Vf,!0,!1,Om):xf(oh,Zh,Sm,$h,Vf,nh,Lh,Ih,Om)},yh=(th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih)=>{let om=0;const zh=oh.length;let Om=th.length-1,Im=zh-1;for(;om<=Om&&om<=Im;){const Zm=th[om],Lm=oh[om]=Ih?cloneIfMounted(oh[om]):normalizeVNode(oh[om]);if(isSameVNodeType(Zm,Lm))Gd(Zm,Lm,Zh,null,$h,Vf,nh,Lh,Ih);else break;om++}for(;om<=Om&&om<=Im;){const Zm=th[Om],Lm=oh[Im]=Ih?cloneIfMounted(oh[Im]):normalizeVNode(oh[Im]);if(isSameVNodeType(Zm,Lm))Gd(Zm,Lm,Zh,null,$h,Vf,nh,Lh,Ih);else break;Om--,Im--}if(om>Om){if(om<=Im){const Zm=Im+1,Lm=ZmIm)for(;om<=Om;)lh(th[om],$h,Vf,!0),om++;else{const Zm=om,Lm=om,Wm=new Map;for(om=Lm;om<=Im;om++){const _m=oh[om]=Ih?cloneIfMounted(oh[om]):normalizeVNode(oh[om]);_m.key!=null&&Wm.set(_m.key,om)}let ig,yg=0;const jh=Im-Lm+1;let Pf=!1,$f=0;const Nh=new Array(jh);for(om=0;om=jh){lh(_m,$h,Vf,!0);continue}let $m;if(_m.key!=null)$m=Wm.get(_m.key);else for(ig=Lm;ig<=Im;ig++)if(Nh[ig-Lm]===0&&isSameVNodeType(_m,oh[ig])){$m=ig;break}$m===void 0?lh(_m,$h,Vf,!0):(Nh[$m-Lm]=om+1,$m>=$f?$f=$m:Pf=!0,Gd(_m,oh[$m],Zh,null,$h,Vf,nh,Lh,Ih),yg++)}const Wh=Pf?getSequence(Nh):EMPTY_ARR;for(ig=Wh.length-1,om=jh-1;om>=0;om--){const _m=Lm+om,$m=oh[_m],Ym=_m+1{const{el:Vf,type:nh,transition:Lh,children:Ih,shapeFlag:om}=th;if(om&6){Mh(th.component.subTree,oh,Zh,Sm);return}if(om&128){th.suspense.move(oh,Zh,Sm);return}if(om&64){nh.move(th,oh,Zh,Ph);return}if(nh===Fragment){dd(Vf,oh,Zh);for(let Om=0;OmLh.enter(Vf),$h);else{const{leave:Om,delayLeave:Im,afterLeave:Zm}=Lh,Lm=()=>dd(Vf,oh,Zh),Wm=()=>{Om(Vf,()=>{Lm(),Zm&&Zm()})};Im?Im(Vf,Lm,Wm):Wm()}else dd(Vf,oh,Zh)},lh=(th,oh,Zh,Sm=!1,$h=!1)=>{const{type:Vf,props:nh,ref:Lh,children:Ih,dynamicChildren:om,shapeFlag:zh,patchFlag:Om,dirs:Im,cacheIndex:Zm}=th;if(Om===-2&&($h=!1),Lh!=null&&setRef(Lh,null,Zh,th,!0),Zm!=null&&(oh.renderCache[Zm]=void 0),zh&256){oh.ctx.deactivate(th);return}const Lm=zh&1&&Im,Wm=!isAsyncWrapper(th);let ig;if(Wm&&(ig=nh&&nh.onVnodeBeforeUnmount)&&invokeVNodeHook(ig,oh,th),zh&6)xh(th.component,Zh,Sm);else{if(zh&128){th.suspense.unmount(Zh,Sm);return}Lm&&invokeDirectiveHook(th,null,oh,"beforeUnmount"),zh&64?th.type.remove(th,oh,Zh,Ph,Sm):om&&!om.hasOnce&&(Vf!==Fragment||Om>0&&Om&64)?Eh(om,oh,Zh,!1,!0):(Vf===Fragment&&Om&384||!$h&&zh&16)&&Eh(Ih,oh,Zh),Sm&&rh(th)}(Wm&&(ig=nh&&nh.onVnodeUnmounted)||Lm)&&queuePostRenderEffect(()=>{ig&&invokeVNodeHook(ig,oh,th),Lm&&invokeDirectiveHook(th,null,oh,"unmounted")},Zh)},rh=th=>{const{type:oh,el:Zh,anchor:Sm,transition:$h}=th;if(oh===Fragment){mh(Zh,Sm);return}if(oh===Static){Xd(th);return}const Vf=()=>{hd(Zh),$h&&!$h.persisted&&$h.afterLeave&&$h.afterLeave()};if(th.shapeFlag&1&&$h&&!$h.persisted){const{leave:nh,delayLeave:Lh}=$h,Ih=()=>nh(Zh,Vf);Lh?Lh(th.el,Vf,Ih):Ih()}else Vf()},mh=(th,oh)=>{let Zh;for(;th!==oh;)Zh=Ld(th),hd(th),th=Zh;hd(oh)},xh=(th,oh,Zh)=>{const{bum:Sm,scope:$h,job:Vf,subTree:nh,um:Lh,m:Ih,a:om}=th;invalidateMount(Ih),invalidateMount(om),Sm&&invokeArrayFns(Sm),$h.stop(),Vf&&(Vf.flags|=8,lh(nh,th,oh,Zh)),Lh&&queuePostRenderEffect(Lh,oh),queuePostRenderEffect(()=>{th.isUnmounted=!0},oh),oh&&oh.pendingBranch&&!oh.isUnmounted&&th.asyncDep&&!th.asyncResolved&&th.suspenseId===oh.pendingId&&(oh.deps--,oh.deps===0&&oh.resolve())},Eh=(th,oh,Zh,Sm=!1,$h=!1,Vf=0)=>{for(let nh=Vf;nh{if(th.shapeFlag&6)return kf(th.component.subTree);if(th.shapeFlag&128)return th.suspense.next();const oh=Ld(th.anchor||th.el),Zh=oh&&oh[TeleportEndKey];return Zh?Ld(Zh):oh};let Rf=!1;const _h=(th,oh,Zh)=>{th==null?oh._vnode&&lh(oh._vnode,null,null,!0):Gd(oh._vnode||null,th,oh,null,null,null,Zh),oh._vnode=th,Rf||(Rf=!0,flushPreFlushCbs(),flushPostFlushCbs(),Rf=!1)},Ph={p:Gd,um:lh,m:Mh,r:rh,mt:Of,mc:xf,pc:sh,pbc:vf,n:kf,o:Ra};return{render:_h,hydrate:void 0,createApp:createAppAPI(_h)}}function resolveChildrenNamespace({type:Ra,props:ed},ud){return ud==="svg"&&Ra==="foreignObject"||ud==="mathml"&&Ra==="annotation-xml"&&ed&&ed.encoding&&ed.encoding.includes("html")?void 0:ud}function toggleRecurse({effect:Ra,job:ed},ud){ud?(Ra.flags|=32,ed.flags|=4):(Ra.flags&=-33,ed.flags&=-5)}function needTransition(Ra,ed){return(!Ra||Ra&&!Ra.pendingBranch)&&ed&&!ed.persisted}function traverseStaticChildren(Ra,ed,ud=!1){const dd=Ra.children,hd=ed.children;if(isArray$3(dd)&&isArray$3(hd))for(let md=0;md>1,Ra[ud[yd]]0&&(ed[dd]=ud[md-1]),ud[md]=dd)}}for(md=ud.length,gd=ud[md-1];md-- >0;)ud[md]=gd,gd=ed[gd];return ud}function locateNonHydratedAsyncRoot(Ra){const ed=Ra.subTree.component;if(ed)return ed.asyncDep&&!ed.asyncResolved?ed:locateNonHydratedAsyncRoot(ed)}function invalidateMount(Ra){if(Ra)for(let ed=0;edinject(ssrContextKey);function watchEffect(Ra,ed){return doWatch(Ra,null,ed)}function watchPostEffect(Ra,ed){return doWatch(Ra,null,{flush:"post"})}function watch(Ra,ed,ud){return doWatch(Ra,ed,ud)}function doWatch(Ra,ed,ud=EMPTY_OBJ){const{immediate:dd,deep:hd,flush:md,once:gd}=ud,yd=extend$4({},ud),vd=ed&&dd||!ed&&md!=="post";let Cd;if(isInSSRComponentSetup){if(md==="sync"){const Ud=useSSRContext();Cd=Ud.__watcherHandles||(Ud.__watcherHandles=[])}else if(!vd){const Ud=()=>{};return Ud.stop=NOOP,Ud.resume=NOOP,Ud.pause=NOOP,Ud}}const wd=currentInstance;yd.call=(Ud,jd,Gd)=>callWithAsyncErrorHandling(Ud,wd,jd,Gd);let Nd=!1;md==="post"?yd.scheduler=Ud=>{queuePostRenderEffect(Ud,wd&&wd.suspense)}:md!=="sync"&&(Nd=!0,yd.scheduler=(Ud,jd)=>{jd?Ud():queueJob(Ud)}),yd.augmentJob=Ud=>{ed&&(Ud.flags|=4),Nd&&(Ud.flags|=2,wd&&(Ud.id=wd.uid,Ud.i=wd))};const Ld=watch$1(Ra,ed,yd);return isInSSRComponentSetup&&(Cd?Cd.push(Ld):vd&&Ld()),Ld}function instanceWatch(Ra,ed,ud){const dd=this.proxy,hd=isString$2(Ra)?Ra.includes(".")?createPathGetter(dd,Ra):()=>dd[Ra]:Ra.bind(dd,dd);let md;isFunction$4(ed)?md=ed:(md=ed.handler,ud=ed);const gd=setCurrentInstance(this),yd=doWatch(hd,md.bind(dd),ud);return gd(),yd}function createPathGetter(Ra,ed){const ud=ed.split(".");return()=>{let dd=Ra;for(let hd=0;hded==="modelValue"||ed==="model-value"?Ra.modelModifiers:Ra[`${ed}Modifiers`]||Ra[`${camelize(ed)}Modifiers`]||Ra[`${hyphenate(ed)}Modifiers`];function emit(Ra,ed,...ud){if(Ra.isUnmounted)return;const dd=Ra.vnode.props||EMPTY_OBJ;let hd=ud;const md=ed.startsWith("update:"),gd=md&&getModelModifiers(dd,ed.slice(7));gd&&(gd.trim&&(hd=ud.map(wd=>isString$2(wd)?wd.trim():wd)),gd.number&&(hd=ud.map(looseToNumber)));let yd,vd=dd[yd=toHandlerKey(ed)]||dd[yd=toHandlerKey(camelize(ed))];!vd&&md&&(vd=dd[yd=toHandlerKey(hyphenate(ed))]),vd&&callWithAsyncErrorHandling(vd,Ra,6,hd);const Cd=dd[yd+"Once"];if(Cd){if(!Ra.emitted)Ra.emitted={};else if(Ra.emitted[yd])return;Ra.emitted[yd]=!0,callWithAsyncErrorHandling(Cd,Ra,6,hd)}}function normalizeEmitsOptions(Ra,ed,ud=!1){const dd=ed.emitsCache,hd=dd.get(Ra);if(hd!==void 0)return hd;const md=Ra.emits;let gd={},yd=!1;if(!isFunction$4(Ra)){const vd=Cd=>{const wd=normalizeEmitsOptions(Cd,ed,!0);wd&&(yd=!0,extend$4(gd,wd))};!ud&&ed.mixins.length&&ed.mixins.forEach(vd),Ra.extends&&vd(Ra.extends),Ra.mixins&&Ra.mixins.forEach(vd)}return!md&&!yd?(isObject$9(Ra)&&dd.set(Ra,null),null):(isArray$3(md)?md.forEach(vd=>gd[vd]=null):extend$4(gd,md),isObject$9(Ra)&&dd.set(Ra,gd),gd)}function isEmitListener(Ra,ed){return!Ra||!isOn(ed)?!1:(ed=ed.slice(2).replace(/Once$/,""),hasOwn$4(Ra,ed[0].toLowerCase()+ed.slice(1))||hasOwn$4(Ra,hyphenate(ed))||hasOwn$4(Ra,ed))}function markAttrsAccessed(){}function renderComponentRoot(Ra){const{type:ed,vnode:ud,proxy:dd,withProxy:hd,propsOptions:[md],slots:gd,attrs:yd,emit:vd,render:Cd,renderCache:wd,props:Nd,data:Ld,setupState:Ud,ctx:jd,inheritAttrs:Gd}=Ra,Yd=setCurrentRenderingInstance(Ra);let zd,qd;try{if(ud.shapeFlag&4){const Xd=hd||dd,Jd=Xd;zd=normalizeVNode(Cd.call(Jd,Xd,wd,Nd,Ud,Ld,jd)),qd=yd}else{const Xd=ed;zd=normalizeVNode(Xd.length>1?Xd(Nd,{attrs:yd,slots:gd,emit:vd}):Xd(Nd,null)),qd=ed.props?yd:getFunctionalFallthrough(yd)}}catch(Xd){blockStack.length=0,handleError$1(Xd,Ra,1),zd=createVNode(Comment$2)}let Wd=zd;if(qd&&Gd!==!1){const Xd=Object.keys(qd),{shapeFlag:Jd}=Wd;Xd.length&&Jd&7&&(md&&Xd.some(isModelListener)&&(qd=filterModelListeners(qd,md)),Wd=cloneVNode(Wd,qd,!1,!0))}return ud.dirs&&(Wd=cloneVNode(Wd,null,!1,!0),Wd.dirs=Wd.dirs?Wd.dirs.concat(ud.dirs):ud.dirs),ud.transition&&setTransitionHooks(Wd,ud.transition),zd=Wd,setCurrentRenderingInstance(Yd),zd}const getFunctionalFallthrough=Ra=>{let ed;for(const ud in Ra)(ud==="class"||ud==="style"||isOn(ud))&&((ed||(ed={}))[ud]=Ra[ud]);return ed},filterModelListeners=(Ra,ed)=>{const ud={};for(const dd in Ra)(!isModelListener(dd)||!(dd.slice(9)in ed))&&(ud[dd]=Ra[dd]);return ud};function shouldUpdateComponent(Ra,ed,ud){const{props:dd,children:hd,component:md}=Ra,{props:gd,children:yd,patchFlag:vd}=ed,Cd=md.emitsOptions;if(ed.dirs||ed.transition)return!0;if(ud&&vd>=0){if(vd&1024)return!0;if(vd&16)return dd?hasPropsChanged(dd,gd,Cd):!!gd;if(vd&8){const wd=ed.dynamicProps;for(let Nd=0;NdRa.__isSuspense;function queueEffectWithSuspense(Ra,ed){ed&&ed.pendingBranch?isArray$3(Ra)?ed.effects.push(...Ra):ed.effects.push(Ra):queuePostFlushCb(Ra)}const Fragment=Symbol.for("v-fgt"),Text$2=Symbol.for("v-txt"),Comment$2=Symbol.for("v-cmt"),Static=Symbol.for("v-stc"),blockStack=[];let currentBlock=null;function openBlock(Ra=!1){blockStack.push(currentBlock=Ra?null:[])}function closeBlock(){blockStack.pop(),currentBlock=blockStack[blockStack.length-1]||null}let isBlockTreeEnabled=1;function setBlockTracking(Ra,ed=!1){isBlockTreeEnabled+=Ra,Ra<0&¤tBlock&&ed&&(currentBlock.hasOnce=!0)}function setupBlock(Ra){return Ra.dynamicChildren=isBlockTreeEnabled>0?currentBlock||EMPTY_ARR:null,closeBlock(),isBlockTreeEnabled>0&¤tBlock&¤tBlock.push(Ra),Ra}function createElementBlock(Ra,ed,ud,dd,hd,md){return setupBlock(createBaseVNode(Ra,ed,ud,dd,hd,md,!0))}function createBlock(Ra,ed,ud,dd,hd){return setupBlock(createVNode(Ra,ed,ud,dd,hd,!0))}function isVNode(Ra){return Ra?Ra.__v_isVNode===!0:!1}function isSameVNodeType(Ra,ed){return Ra.type===ed.type&&Ra.key===ed.key}const normalizeKey=({key:Ra})=>Ra??null,normalizeRef=({ref:Ra,ref_key:ed,ref_for:ud})=>(typeof Ra=="number"&&(Ra=""+Ra),Ra!=null?isString$2(Ra)||isRef(Ra)||isFunction$4(Ra)?{i:currentRenderingInstance,r:Ra,k:ed,f:!!ud}:Ra:null);function createBaseVNode(Ra,ed=null,ud=null,dd=0,hd=null,md=Ra===Fragment?0:1,gd=!1,yd=!1){const vd={__v_isVNode:!0,__v_skip:!0,type:Ra,props:ed,key:ed&&normalizeKey(ed),ref:ed&&normalizeRef(ed),scopeId:currentScopeId,slotScopeIds:null,children:ud,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:md,patchFlag:dd,dynamicProps:hd,dynamicChildren:null,appContext:null,ctx:currentRenderingInstance};return yd?(normalizeChildren$1(vd,ud),md&128&&Ra.normalize(vd)):ud&&(vd.shapeFlag|=isString$2(ud)?8:16),isBlockTreeEnabled>0&&!gd&¤tBlock&&(vd.patchFlag>0||md&6)&&vd.patchFlag!==32&¤tBlock.push(vd),vd}const createVNode=_createVNode;function _createVNode(Ra,ed=null,ud=null,dd=0,hd=null,md=!1){if((!Ra||Ra===NULL_DYNAMIC_COMPONENT)&&(Ra=Comment$2),isVNode(Ra)){const yd=cloneVNode(Ra,ed,!0);return ud&&normalizeChildren$1(yd,ud),isBlockTreeEnabled>0&&!md&¤tBlock&&(yd.shapeFlag&6?currentBlock[currentBlock.indexOf(Ra)]=yd:currentBlock.push(yd)),yd.patchFlag=-2,yd}if(isClassComponent(Ra)&&(Ra=Ra.__vccOpts),ed){ed=guardReactiveProps(ed);let{class:yd,style:vd}=ed;yd&&!isString$2(yd)&&(ed.class=normalizeClass(yd)),isObject$9(vd)&&(isProxy(vd)&&!isArray$3(vd)&&(vd=extend$4({},vd)),ed.style=normalizeStyle(vd))}const gd=isString$2(Ra)?1:isSuspense(Ra)?128:isTeleport(Ra)?64:isObject$9(Ra)?4:isFunction$4(Ra)?2:0;return createBaseVNode(Ra,ed,ud,dd,hd,gd,md,!0)}function guardReactiveProps(Ra){return Ra?isProxy(Ra)||isInternalObject(Ra)?extend$4({},Ra):Ra:null}function cloneVNode(Ra,ed,ud=!1,dd=!1){const{props:hd,ref:md,patchFlag:gd,children:yd,transition:vd}=Ra,Cd=ed?mergeProps(hd||{},ed):hd,wd={__v_isVNode:!0,__v_skip:!0,type:Ra.type,props:Cd,key:Cd&&normalizeKey(Cd),ref:ed&&ed.ref?ud&&md?isArray$3(md)?md.concat(normalizeRef(ed)):[md,normalizeRef(ed)]:normalizeRef(ed):md,scopeId:Ra.scopeId,slotScopeIds:Ra.slotScopeIds,children:yd,target:Ra.target,targetStart:Ra.targetStart,targetAnchor:Ra.targetAnchor,staticCount:Ra.staticCount,shapeFlag:Ra.shapeFlag,patchFlag:ed&&Ra.type!==Fragment?gd===-1?16:gd|16:gd,dynamicProps:Ra.dynamicProps,dynamicChildren:Ra.dynamicChildren,appContext:Ra.appContext,dirs:Ra.dirs,transition:vd,component:Ra.component,suspense:Ra.suspense,ssContent:Ra.ssContent&&cloneVNode(Ra.ssContent),ssFallback:Ra.ssFallback&&cloneVNode(Ra.ssFallback),el:Ra.el,anchor:Ra.anchor,ctx:Ra.ctx,ce:Ra.ce};return vd&&dd&&setTransitionHooks(wd,vd.clone(wd)),wd}function createTextVNode(Ra=" ",ed=0){return createVNode(Text$2,null,Ra,ed)}function createCommentVNode(Ra="",ed=!1){return ed?(openBlock(),createBlock(Comment$2,null,Ra)):createVNode(Comment$2,null,Ra)}function normalizeVNode(Ra){return Ra==null||typeof Ra=="boolean"?createVNode(Comment$2):isArray$3(Ra)?createVNode(Fragment,null,Ra.slice()):isVNode(Ra)?cloneIfMounted(Ra):createVNode(Text$2,null,String(Ra))}function cloneIfMounted(Ra){return Ra.el===null&&Ra.patchFlag!==-1||Ra.memo?Ra:cloneVNode(Ra)}function normalizeChildren$1(Ra,ed){let ud=0;const{shapeFlag:dd}=Ra;if(ed==null)ed=null;else if(isArray$3(ed))ud=16;else if(typeof ed=="object")if(dd&65){const hd=ed.default;hd&&(hd._c&&(hd._d=!1),normalizeChildren$1(Ra,hd()),hd._c&&(hd._d=!0));return}else{ud=32;const hd=ed._;!hd&&!isInternalObject(ed)?ed._ctx=currentRenderingInstance:hd===3&¤tRenderingInstance&&(currentRenderingInstance.slots._===1?ed._=1:(ed._=2,Ra.patchFlag|=1024))}else isFunction$4(ed)?(ed={default:ed,_ctx:currentRenderingInstance},ud=32):(ed=String(ed),dd&64?(ud=16,ed=[createTextVNode(ed)]):ud=8);Ra.children=ed,Ra.shapeFlag|=ud}function mergeProps(...Ra){const ed={};for(let ud=0;udcurrentInstance||currentRenderingInstance;let internalSetCurrentInstance,setInSSRSetupState;{const Ra=getGlobalThis(),ed=(ud,dd)=>{let hd;return(hd=Ra[ud])||(hd=Ra[ud]=[]),hd.push(dd),md=>{hd.length>1?hd.forEach(gd=>gd(md)):hd[0](md)}};internalSetCurrentInstance=ed("__VUE_INSTANCE_SETTERS__",ud=>currentInstance=ud),setInSSRSetupState=ed("__VUE_SSR_SETTERS__",ud=>isInSSRComponentSetup=ud)}const setCurrentInstance=Ra=>{const ed=currentInstance;return internalSetCurrentInstance(Ra),Ra.scope.on(),()=>{Ra.scope.off(),internalSetCurrentInstance(ed)}},unsetCurrentInstance=()=>{currentInstance&¤tInstance.scope.off(),internalSetCurrentInstance(null)};function isStatefulComponent(Ra){return Ra.vnode.shapeFlag&4}let isInSSRComponentSetup=!1;function setupComponent(Ra,ed=!1,ud=!1){ed&&setInSSRSetupState(ed);const{props:dd,children:hd}=Ra.vnode,md=isStatefulComponent(Ra);initProps(Ra,dd,md,ed),initSlots(Ra,hd,ud);const gd=md?setupStatefulComponent(Ra,ed):void 0;return ed&&setInSSRSetupState(!1),gd}function setupStatefulComponent(Ra,ed){const ud=Ra.type;Ra.accessCache=Object.create(null),Ra.proxy=new Proxy(Ra.ctx,PublicInstanceProxyHandlers);const{setup:dd}=ud;if(dd){pauseTracking();const hd=Ra.setupContext=dd.length>1?createSetupContext(Ra):null,md=setCurrentInstance(Ra),gd=callWithErrorHandling(dd,Ra,0,[Ra.props,hd]),yd=isPromise(gd);if(resetTracking(),md(),(yd||Ra.sp)&&!isAsyncWrapper(Ra)&&markAsyncBoundary(Ra),yd){if(gd.then(unsetCurrentInstance,unsetCurrentInstance),ed)return gd.then(vd=>{handleSetupResult(Ra,vd)}).catch(vd=>{handleError$1(vd,Ra,0)});Ra.asyncDep=gd}else handleSetupResult(Ra,gd)}else finishComponentSetup(Ra)}function handleSetupResult(Ra,ed,ud){isFunction$4(ed)?Ra.type.__ssrInlineRender?Ra.ssrRender=ed:Ra.render=ed:isObject$9(ed)&&(Ra.setupState=proxyRefs(ed)),finishComponentSetup(Ra)}function finishComponentSetup(Ra,ed,ud){const dd=Ra.type;Ra.render||(Ra.render=dd.render||NOOP);{const hd=setCurrentInstance(Ra);pauseTracking();try{applyOptions(Ra)}finally{resetTracking(),hd()}}}const attrsProxyHandlers={get(Ra,ed){return track(Ra,"get",""),Ra[ed]}};function createSetupContext(Ra){const ed=ud=>{Ra.exposed=ud||{}};return{attrs:new Proxy(Ra.attrs,attrsProxyHandlers),slots:Ra.slots,emit:Ra.emit,expose:ed}}function getComponentPublicInstance(Ra){return Ra.exposed?Ra.exposeProxy||(Ra.exposeProxy=new Proxy(proxyRefs(markRaw(Ra.exposed)),{get(ed,ud){if(ud in ed)return ed[ud];if(ud in publicPropertiesMap)return publicPropertiesMap[ud](Ra)},has(ed,ud){return ud in ed||ud in publicPropertiesMap}})):Ra.proxy}const classifyRE=/(?:^|[-_])(\w)/g,classify=Ra=>Ra.replace(classifyRE,ed=>ed.toUpperCase()).replace(/[-_]/g,"");function getComponentName(Ra,ed=!0){return isFunction$4(Ra)?Ra.displayName||Ra.name:Ra.name||ed&&Ra.__name}function formatComponentName(Ra,ed,ud=!1){let dd=getComponentName(ed);if(!dd&&ed.__file){const hd=ed.__file.match(/([^/\\]+)\.\w+$/);hd&&(dd=hd[1])}if(!dd&&Ra&&Ra.parent){const hd=md=>{for(const gd in md)if(md[gd]===ed)return gd};dd=hd(Ra.components||Ra.parent.type.components)||hd(Ra.appContext.components)}return dd?classify(dd):ud?"App":"Anonymous"}function isClassComponent(Ra){return isFunction$4(Ra)&&"__vccOpts"in Ra}const computed=(Ra,ed)=>computed$1(Ra,ed,isInSSRComponentSetup);function h$2(Ra,ed,ud){const dd=arguments.length;return dd===2?isObject$9(ed)&&!isArray$3(ed)?isVNode(ed)?createVNode(Ra,null,[ed]):createVNode(Ra,ed):createVNode(Ra,null,ed):(dd>3?ud=Array.prototype.slice.call(arguments,2):dd===3&&isVNode(ud)&&(ud=[ud]),createVNode(Ra,ed,ud))}const version$3="3.5.13";/** * @vue/runtime-dom v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let policy;const tt$5=typeof window<"u"&&window.trustedTypes;if(tt$5)try{policy=tt$5.createPolicy("vue",{createHTML:Ra=>Ra})}catch{}const unsafeToTrustedHTML=policy?Ra=>policy.createHTML(Ra):Ra=>Ra,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(Ra,qa,rd)=>{qa.insertBefore(Ra,rd||null)},remove:Ra=>{const qa=Ra.parentNode;qa&&qa.removeChild(Ra)},createElement:(Ra,qa,rd,sd)=>{const pd=qa==="svg"?doc.createElementNS(svgNS,Ra):qa==="mathml"?doc.createElementNS(mathmlNS,Ra):rd?doc.createElement(Ra,{is:rd}):doc.createElement(Ra);return Ra==="select"&&sd&&sd.multiple!=null&&pd.setAttribute("multiple",sd.multiple),pd},createText:Ra=>doc.createTextNode(Ra),createComment:Ra=>doc.createComment(Ra),setText:(Ra,qa)=>{Ra.nodeValue=qa},setElementText:(Ra,qa)=>{Ra.textContent=qa},parentNode:Ra=>Ra.parentNode,nextSibling:Ra=>Ra.nextSibling,querySelector:Ra=>doc.querySelector(Ra),setScopeId(Ra,qa){Ra.setAttribute(qa,"")},insertStaticContent(Ra,qa,rd,sd,pd,fd){const hd=rd?rd.previousSibling:qa.lastChild;if(pd&&(pd===fd||pd.nextSibling))for(;qa.insertBefore(pd.cloneNode(!0),rd),!(pd===fd||!(pd=pd.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(sd==="svg"?`${Ra}`:sd==="mathml"?`${Ra}`:Ra);const md=templateContainer.content;if(sd==="svg"||sd==="mathml"){const gd=md.firstChild;for(;gd.firstChild;)md.appendChild(gd.firstChild);md.removeChild(gd)}qa.insertBefore(md,rd)}return[hd?hd.nextSibling:qa.firstChild,rd?rd.previousSibling:qa.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$4({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=Ra=>(Ra.displayName="Transition",Ra.props=TransitionPropsValidators,Ra),Transition$1=decorate$1((Ra,{slots:qa})=>h$2(BaseTransition,resolveTransitionProps(Ra),qa)),callHook=(Ra,qa=[])=>{isArray$2(Ra)?Ra.forEach(rd=>rd(...qa)):Ra&&Ra(...qa)},hasExplicitCallback=Ra=>Ra?isArray$2(Ra)?Ra.some(qa=>qa.length>1):Ra.length>1:!1;function resolveTransitionProps(Ra){const qa={};for(const xf in Ra)xf in DOMTransitionPropsValidators||(qa[xf]=Ra[xf]);if(Ra.css===!1)return qa;const{name:rd="v",type:sd,duration:pd,enterFromClass:fd=`${rd}-enter-from`,enterActiveClass:hd=`${rd}-enter-active`,enterToClass:md=`${rd}-enter-to`,appearFromClass:gd=fd,appearActiveClass:yd=hd,appearToClass:vd=md,leaveFromClass:Nd=`${rd}-leave-from`,leaveActiveClass:Md=`${rd}-leave-active`,leaveToClass:Ld=`${rd}-leave-to`}=Ra,Fd=normalizeDuration(pd),Hd=Fd&&Fd[0],Vd=Fd&&Fd[1],{onBeforeEnter:Gd,onEnter:Ud,onEnterCancelled:qd,onLeave:Wd,onLeaveCancelled:Kd,onBeforeAppear:Xd=Gd,onAppear:df=Ud,onAppearCancelled:Ef=qd}=qa,pf=(xf,Cf,If,Sf)=>{xf._enterCancelled=Sf,removeTransitionClass(xf,Cf?vd:md),removeTransitionClass(xf,Cf?yd:hd),If&&If()},mf=(xf,Cf)=>{xf._isLeaving=!1,removeTransitionClass(xf,Nd),removeTransitionClass(xf,Ld),removeTransitionClass(xf,Md),Cf&&Cf()},_f=xf=>(Cf,If)=>{const Sf=xf?df:Ud,wf=()=>pf(Cf,xf,If);callHook(Sf,[Cf,wf]),nextFrame(()=>{removeTransitionClass(Cf,xf?gd:fd),addTransitionClass(Cf,xf?vd:md),hasExplicitCallback(Sf)||whenTransitionEnds(Cf,sd,Hd,wf)})};return extend$4(qa,{onBeforeEnter(xf){callHook(Gd,[xf]),addTransitionClass(xf,fd),addTransitionClass(xf,hd)},onBeforeAppear(xf){callHook(Xd,[xf]),addTransitionClass(xf,gd),addTransitionClass(xf,yd)},onEnter:_f(!1),onAppear:_f(!0),onLeave(xf,Cf){xf._isLeaving=!0;const If=()=>mf(xf,Cf);addTransitionClass(xf,Nd),xf._enterCancelled?(addTransitionClass(xf,Md),forceReflow()):(forceReflow(),addTransitionClass(xf,Md)),nextFrame(()=>{xf._isLeaving&&(removeTransitionClass(xf,Nd),addTransitionClass(xf,Ld),hasExplicitCallback(Wd)||whenTransitionEnds(xf,sd,Vd,If))}),callHook(Wd,[xf,If])},onEnterCancelled(xf){pf(xf,!1,void 0,!0),callHook(qd,[xf])},onAppearCancelled(xf){pf(xf,!0,void 0,!0),callHook(Ef,[xf])},onLeaveCancelled(xf){mf(xf),callHook(Kd,[xf])}})}function normalizeDuration(Ra){if(Ra==null)return null;if(isObject$9(Ra))return[NumberOf(Ra.enter),NumberOf(Ra.leave)];{const qa=NumberOf(Ra);return[qa,qa]}}function NumberOf(Ra){return toNumber$4(Ra)}function addTransitionClass(Ra,qa){qa.split(/\s+/).forEach(rd=>rd&&Ra.classList.add(rd)),(Ra[vtcKey]||(Ra[vtcKey]=new Set)).add(qa)}function removeTransitionClass(Ra,qa){qa.split(/\s+/).forEach(sd=>sd&&Ra.classList.remove(sd));const rd=Ra[vtcKey];rd&&(rd.delete(qa),rd.size||(Ra[vtcKey]=void 0))}function nextFrame(Ra){requestAnimationFrame(()=>{requestAnimationFrame(Ra)})}let endId=0;function whenTransitionEnds(Ra,qa,rd,sd){const pd=Ra._endId=++endId,fd=()=>{pd===Ra._endId&&sd()};if(rd!=null)return setTimeout(fd,rd);const{type:hd,timeout:md,propCount:gd}=getTransitionInfo(Ra,qa);if(!hd)return sd();const yd=hd+"end";let vd=0;const Nd=()=>{Ra.removeEventListener(yd,Md),fd()},Md=Ld=>{Ld.target===Ra&&++vd>=gd&&Nd()};setTimeout(()=>{vd(rd[Fd]||"").split(", "),pd=sd(`${TRANSITION}Delay`),fd=sd(`${TRANSITION}Duration`),hd=getTimeout(pd,fd),md=sd(`${ANIMATION}Delay`),gd=sd(`${ANIMATION}Duration`),yd=getTimeout(md,gd);let vd=null,Nd=0,Md=0;qa===TRANSITION?hd>0&&(vd=TRANSITION,Nd=hd,Md=fd.length):qa===ANIMATION?yd>0&&(vd=ANIMATION,Nd=yd,Md=gd.length):(Nd=Math.max(hd,yd),vd=Nd>0?hd>yd?TRANSITION:ANIMATION:null,Md=vd?vd===TRANSITION?fd.length:gd.length:0);const Ld=vd===TRANSITION&&/\b(transform|all)(,|$)/.test(sd(`${TRANSITION}Property`).toString());return{type:vd,timeout:Nd,propCount:Md,hasTransform:Ld}}function getTimeout(Ra,qa){for(;Ra.lengthtoMs(rd)+toMs(Ra[sd])))}function toMs(Ra){return Ra==="auto"?0:Number(Ra.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(Ra,qa,rd){const sd=Ra[vtcKey];sd&&(qa=(qa?[qa,...sd]:[...sd]).join(" ")),qa==null?Ra.removeAttribute("class"):rd?Ra.setAttribute("class",qa):Ra.className=qa}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(Ra,{value:qa},{transition:rd}){Ra[vShowOriginalDisplay]=Ra.style.display==="none"?"":Ra.style.display,rd&&qa?rd.beforeEnter(Ra):setDisplay(Ra,qa)},mounted(Ra,{value:qa},{transition:rd}){rd&&qa&&rd.enter(Ra)},updated(Ra,{value:qa,oldValue:rd},{transition:sd}){!qa!=!rd&&(sd?qa?(sd.beforeEnter(Ra),setDisplay(Ra,!0),sd.enter(Ra)):sd.leave(Ra,()=>{setDisplay(Ra,!1)}):setDisplay(Ra,qa))},beforeUnmount(Ra,{value:qa}){setDisplay(Ra,qa)}};function setDisplay(Ra,qa){Ra.style.display=qa?Ra[vShowOriginalDisplay]:"none",Ra[vShowHidden]=!qa}const CSS_VAR_TEXT=Symbol(""),displayRE=/(^|;)\s*display\s*:/;function patchStyle(Ra,qa,rd){const sd=Ra.style,pd=isString$2(rd);let fd=!1;if(rd&&!pd){if(qa)if(isString$2(qa))for(const hd of qa.split(";")){const md=hd.slice(0,hd.indexOf(":")).trim();rd[md]==null&&setStyle(sd,md,"")}else for(const hd in qa)rd[hd]==null&&setStyle(sd,hd,"");for(const hd in rd)hd==="display"&&(fd=!0),setStyle(sd,hd,rd[hd])}else if(pd){if(qa!==rd){const hd=sd[CSS_VAR_TEXT];hd&&(rd+=";"+hd),sd.cssText=rd,fd=displayRE.test(rd)}}else qa&&Ra.removeAttribute("style");vShowOriginalDisplay in Ra&&(Ra[vShowOriginalDisplay]=fd?sd.display:"",Ra[vShowHidden]&&(sd.display="none"))}const importantRE=/\s*!important$/;function setStyle(Ra,qa,rd){if(isArray$2(rd))rd.forEach(sd=>setStyle(Ra,qa,sd));else if(rd==null&&(rd=""),qa.startsWith("--"))Ra.setProperty(qa,rd);else{const sd=autoPrefix(Ra,qa);importantRE.test(rd)?Ra.setProperty(hyphenate(sd),rd.replace(importantRE,""),"important"):Ra[sd]=rd}}const prefixes$1=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(Ra,qa){const rd=prefixCache[qa];if(rd)return rd;let sd=camelize(qa);if(sd!=="filter"&&sd in Ra)return prefixCache[qa]=sd;sd=capitalize(sd);for(let pd=0;pdcachedNow||(p$2.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(Ra,qa){const rd=sd=>{if(!sd._vts)sd._vts=Date.now();else if(sd._vts<=rd.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(sd,rd.value),qa,5,[sd])};return rd.value=Ra,rd.attached=getNow(),rd}function patchStopImmediatePropagation(Ra,qa){if(isArray$2(qa)){const rd=Ra.stopImmediatePropagation;return Ra.stopImmediatePropagation=()=>{rd.call(Ra),Ra._stopped=!0},qa.map(sd=>pd=>!pd._stopped&&sd&&sd(pd))}else return qa}const isNativeOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&Ra.charCodeAt(2)>96&&Ra.charCodeAt(2)<123,patchProp=(Ra,qa,rd,sd,pd,fd)=>{const hd=pd==="svg";qa==="class"?patchClass(Ra,sd,hd):qa==="style"?patchStyle(Ra,rd,sd):isOn(qa)?isModelListener(qa)||patchEvent(Ra,qa,rd,sd,fd):(qa[0]==="."?(qa=qa.slice(1),!0):qa[0]==="^"?(qa=qa.slice(1),!1):shouldSetAsProp(Ra,qa,sd,hd))?(patchDOMProp(Ra,qa,sd),!Ra.tagName.includes("-")&&(qa==="value"||qa==="checked"||qa==="selected")&&patchAttr(Ra,qa,sd,hd,fd,qa!=="value")):Ra._isVueCE&&(/[A-Z]/.test(qa)||!isString$2(sd))?patchDOMProp(Ra,camelize(qa),sd,fd,qa):(qa==="true-value"?Ra._trueValue=sd:qa==="false-value"&&(Ra._falseValue=sd),patchAttr(Ra,qa,sd,hd))};function shouldSetAsProp(Ra,qa,rd,sd){if(sd)return!!(qa==="innerHTML"||qa==="textContent"||qa in Ra&&isNativeOn(qa)&&isFunction$4(rd));if(qa==="spellcheck"||qa==="draggable"||qa==="translate"||qa==="form"||qa==="list"&&Ra.tagName==="INPUT"||qa==="type"&&Ra.tagName==="TEXTAREA")return!1;if(qa==="width"||qa==="height"){const pd=Ra.tagName;if(pd==="IMG"||pd==="VIDEO"||pd==="CANVAS"||pd==="SOURCE")return!1}return isNativeOn(qa)&&isString$2(rd)?!1:qa in Ra}const getModelAssigner=Ra=>{const qa=Ra.props["onUpdate:modelValue"]||!1;return isArray$2(qa)?rd=>invokeArrayFns(qa,rd):qa};function onCompositionStart(Ra){Ra.target.composing=!0}function onCompositionEnd(Ra){const qa=Ra.target;qa.composing&&(qa.composing=!1,qa.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(Ra,{modifiers:{lazy:qa,trim:rd,number:sd}},pd){Ra[assignKey]=getModelAssigner(pd);const fd=sd||pd.props&&pd.props.type==="number";addEventListener(Ra,qa?"change":"input",hd=>{if(hd.target.composing)return;let md=Ra.value;rd&&(md=md.trim()),fd&&(md=looseToNumber(md)),Ra[assignKey](md)}),rd&&addEventListener(Ra,"change",()=>{Ra.value=Ra.value.trim()}),qa||(addEventListener(Ra,"compositionstart",onCompositionStart),addEventListener(Ra,"compositionend",onCompositionEnd),addEventListener(Ra,"change",onCompositionEnd))},mounted(Ra,{value:qa}){Ra.value=qa??""},beforeUpdate(Ra,{value:qa,oldValue:rd,modifiers:{lazy:sd,trim:pd,number:fd}},hd){if(Ra[assignKey]=getModelAssigner(hd),Ra.composing)return;const md=(fd||Ra.type==="number")&&!/^0\d/.test(Ra.value)?looseToNumber(Ra.value):Ra.value,gd=qa??"";md!==gd&&(document.activeElement===Ra&&Ra.type!=="range"&&(sd&&qa===rd||pd&&Ra.value.trim()===gd)||(Ra.value=gd))}},vModelSelect={deep:!0,created(Ra,{value:qa,modifiers:{number:rd}},sd){const pd=isSet$1(qa);addEventListener(Ra,"change",()=>{const fd=Array.prototype.filter.call(Ra.options,hd=>hd.selected).map(hd=>rd?looseToNumber(getValue$1(hd)):getValue$1(hd));Ra[assignKey](Ra.multiple?pd?new Set(fd):fd:fd[0]),Ra._assigning=!0,nextTick$1(()=>{Ra._assigning=!1})}),Ra[assignKey]=getModelAssigner(sd)},mounted(Ra,{value:qa}){setSelected(Ra,qa)},beforeUpdate(Ra,qa,rd){Ra[assignKey]=getModelAssigner(rd)},updated(Ra,{value:qa}){Ra._assigning||setSelected(Ra,qa)}};function setSelected(Ra,qa){const rd=Ra.multiple,sd=isArray$2(qa);if(!(rd&&!sd&&!isSet$1(qa))){for(let pd=0,fd=Ra.options.length;pdString(yd)===String(md)):hd.selected=looseIndexOf(qa,md)>-1}else hd.selected=qa.has(md);else if(looseEqual(getValue$1(hd),qa)){Ra.selectedIndex!==pd&&(Ra.selectedIndex=pd);return}}!rd&&Ra.selectedIndex!==-1&&(Ra.selectedIndex=-1)}}function getValue$1(Ra){return"_value"in Ra?Ra._value:Ra.value}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:Ra=>Ra.stopPropagation(),prevent:Ra=>Ra.preventDefault(),self:Ra=>Ra.target!==Ra.currentTarget,ctrl:Ra=>!Ra.ctrlKey,shift:Ra=>!Ra.shiftKey,alt:Ra=>!Ra.altKey,meta:Ra=>!Ra.metaKey,left:Ra=>"button"in Ra&&Ra.button!==0,middle:Ra=>"button"in Ra&&Ra.button!==1,right:Ra=>"button"in Ra&&Ra.button!==2,exact:(Ra,qa)=>systemModifiers.some(rd=>Ra[`${rd}Key`]&&!qa.includes(rd))},withModifiers=(Ra,qa)=>{const rd=Ra._withMods||(Ra._withMods={}),sd=qa.join(".");return rd[sd]||(rd[sd]=(pd,...fd)=>{for(let hd=0;hd{const rd=Ra._withKeys||(Ra._withKeys={}),sd=qa.join(".");return rd[sd]||(rd[sd]=pd=>{if(!("key"in pd))return;const fd=hyphenate(pd.key);if(qa.some(hd=>hd===fd||keyNames[hd]===fd))return Ra(pd)})},rendererOptions=extend$4({patchProp},nodeOps);let renderer$1;function ensureRenderer(){return renderer$1||(renderer$1=createRenderer$1(rendererOptions))}const createApp=(...Ra)=>{const qa=ensureRenderer().createApp(...Ra),{mount:rd}=qa;return qa.mount=sd=>{const pd=normalizeContainer(sd);if(!pd)return;const fd=qa._component;!isFunction$4(fd)&&!fd.render&&!fd.template&&(fd.template=pd.innerHTML),pd.nodeType===1&&(pd.textContent="");const hd=rd(pd,!1,resolveRootNamespace(pd));return pd instanceof Element&&(pd.removeAttribute("v-cloak"),pd.setAttribute("data-v-app","")),hd},qa};function resolveRootNamespace(Ra){if(Ra instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&Ra instanceof MathMLElement)return"mathml"}function normalizeContainer(Ra){return isString$2(Ra)?document.querySelector(Ra):Ra}let activePinia;const setActivePinia=Ra=>activePinia=Ra,piniaSymbol=Symbol();function isPlainObject$5(Ra){return Ra&&typeof Ra=="object"&&Object.prototype.toString.call(Ra)==="[object Object]"&&typeof Ra.toJSON!="function"}var MutationType;(function(Ra){Ra.direct="direct",Ra.patchObject="patch object",Ra.patchFunction="patch function"})(MutationType||(MutationType={}));function createPinia(){const Ra=effectScope(!0),qa=Ra.run(()=>ref$1({}));let rd=[],sd=[];const pd=markRaw({install(fd){setActivePinia(pd),pd._a=fd,fd.provide(piniaSymbol,pd),fd.config.globalProperties.$pinia=pd,sd.forEach(hd=>rd.push(hd)),sd=[]},use(fd){return this._a?rd.push(fd):sd.push(fd),this},_p:rd,_a:null,_e:Ra,_s:new Map,state:qa});return pd}const noop$6=()=>{};function addSubscription(Ra,qa,rd,sd=noop$6){Ra.push(qa);const pd=()=>{const fd=Ra.indexOf(qa);fd>-1&&(Ra.splice(fd,1),sd())};return!rd&&getCurrentScope()&&onScopeDispose(pd),pd}function triggerSubscriptions(Ra,...qa){Ra.slice().forEach(rd=>{rd(...qa)})}const fallbackRunWithContext=Ra=>Ra(),ACTION_MARKER=Symbol(),ACTION_NAME=Symbol();function mergeReactiveObjects(Ra,qa){Ra instanceof Map&&qa instanceof Map?qa.forEach((rd,sd)=>Ra.set(sd,rd)):Ra instanceof Set&&qa instanceof Set&&qa.forEach(Ra.add,Ra);for(const rd in qa){if(!qa.hasOwnProperty(rd))continue;const sd=qa[rd],pd=Ra[rd];isPlainObject$5(pd)&&isPlainObject$5(sd)&&Ra.hasOwnProperty(rd)&&!isRef(sd)&&!isReactive(sd)?Ra[rd]=mergeReactiveObjects(pd,sd):Ra[rd]=sd}return Ra}const skipHydrateSymbol=Symbol();function shouldHydrate(Ra){return!isPlainObject$5(Ra)||!Ra.hasOwnProperty(skipHydrateSymbol)}const{assign}=Object;function isComputed(Ra){return!!(isRef(Ra)&&Ra.effect)}function createOptionsStore(Ra,qa,rd,sd){const{state:pd,actions:fd,getters:hd}=qa,md=rd.state.value[Ra];let gd;function yd(){md||(rd.state.value[Ra]=pd?pd():{});const vd=toRefs(rd.state.value[Ra]);return assign(vd,fd,Object.keys(hd||{}).reduce((Nd,Md)=>(Nd[Md]=markRaw(computed(()=>{setActivePinia(rd);const Ld=rd._s.get(Ra);return hd[Md].call(Ld,Ld)})),Nd),{}))}return gd=createSetupStore(Ra,yd,qa,rd,sd,!0),gd}function createSetupStore(Ra,qa,rd={},sd,pd,fd){let hd;const md=assign({actions:{}},rd),gd={deep:!0};let yd,vd,Nd=[],Md=[],Ld;const Fd=sd.state.value[Ra];!fd&&!Fd&&(sd.state.value[Ra]={}),ref$1({});let Hd;function Vd(Ef){let pf;yd=vd=!1,typeof Ef=="function"?(Ef(sd.state.value[Ra]),pf={type:MutationType.patchFunction,storeId:Ra,events:Ld}):(mergeReactiveObjects(sd.state.value[Ra],Ef),pf={type:MutationType.patchObject,payload:Ef,storeId:Ra,events:Ld});const mf=Hd=Symbol();nextTick$1().then(()=>{Hd===mf&&(yd=!0)}),vd=!0,triggerSubscriptions(Nd,pf,sd.state.value[Ra])}const Gd=fd?function(){const{state:pf}=rd,mf=pf?pf():{};this.$patch(_f=>{assign(_f,mf)})}:noop$6;function Ud(){hd.stop(),Nd=[],Md=[],sd._s.delete(Ra)}const qd=(Ef,pf="")=>{if(ACTION_MARKER in Ef)return Ef[ACTION_NAME]=pf,Ef;const mf=function(){setActivePinia(sd);const _f=Array.from(arguments),xf=[],Cf=[];function If(Pf){xf.push(Pf)}function Sf(Pf){Cf.push(Pf)}triggerSubscriptions(Md,{args:_f,name:mf[ACTION_NAME],store:Kd,after:If,onError:Sf});let wf;try{wf=Ef.apply(this&&this.$id===Ra?this:Kd,_f)}catch(Pf){throw triggerSubscriptions(Cf,Pf),Pf}return wf instanceof Promise?wf.then(Pf=>(triggerSubscriptions(xf,Pf),Pf)).catch(Pf=>(triggerSubscriptions(Cf,Pf),Promise.reject(Pf))):(triggerSubscriptions(xf,wf),wf)};return mf[ACTION_MARKER]=!0,mf[ACTION_NAME]=pf,mf},Wd={_p:sd,$id:Ra,$onAction:addSubscription.bind(null,Md),$patch:Vd,$reset:Gd,$subscribe(Ef,pf={}){const mf=addSubscription(Nd,Ef,pf.detached,()=>_f()),_f=hd.run(()=>watch(()=>sd.state.value[Ra],xf=>{(pf.flush==="sync"?vd:yd)&&Ef({storeId:Ra,type:MutationType.direct,events:Ld},xf)},assign({},gd,pf)));return mf},$dispose:Ud},Kd=reactive(Wd);sd._s.set(Ra,Kd);const df=(sd._a&&sd._a.runWithContext||fallbackRunWithContext)(()=>sd._e.run(()=>(hd=effectScope()).run(()=>qa({action:qd}))));for(const Ef in df){const pf=df[Ef];if(isRef(pf)&&!isComputed(pf)||isReactive(pf))fd||(Fd&&shouldHydrate(pf)&&(isRef(pf)?pf.value=Fd[Ef]:mergeReactiveObjects(pf,Fd[Ef])),sd.state.value[Ra][Ef]=pf);else if(typeof pf=="function"){const mf=qd(pf,Ef);df[Ef]=mf,md.actions[Ef]=pf}}return assign(Kd,df),assign(toRaw(Kd),df),Object.defineProperty(Kd,"$state",{get:()=>sd.state.value[Ra],set:Ef=>{Vd(pf=>{assign(pf,Ef)})}}),sd._p.forEach(Ef=>{assign(Kd,hd.run(()=>Ef({store:Kd,app:sd._a,pinia:sd,options:md})))}),Fd&&fd&&rd.hydrate&&rd.hydrate(Kd.$state,Fd),yd=!0,vd=!0,Kd}/*! #__NO_SIDE_EFFECTS__ */function defineStore(Ra,qa,rd){let sd,pd;const fd=typeof qa=="function";typeof Ra=="string"?(sd=Ra,pd=fd?rd:qa):(pd=Ra,sd=Ra.id);function hd(md,gd){const yd=hasInjectionContext();return md=md||(yd?inject(piniaSymbol,null):null),md&&setActivePinia(md),md=activePinia,md._s.has(sd)||(fd?createSetupStore(sd,qa,pd,md):createOptionsStore(sd,pd,md)),md._s.get(sd)}return hd.$id=sd,hd}function storeToRefs(Ra){{const qa=toRaw(Ra),rd={};for(const sd in qa){const pd=qa[sd];pd.effect?rd[sd]=computed({get:()=>Ra[sd],set(fd){Ra[sd]=fd}}):(isRef(pd)||isReactive(pd))&&(rd[sd]=toRef$1(Ra,sd))}return rd}}const sides=["top","right","bottom","left"],min$4=Math.min,max$5=Math.max,round$3=Math.round,floor$2=Math.floor,createCoords=Ra=>({x:Ra,y:Ra}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(Ra,qa,rd){return max$5(Ra,min$4(qa,rd))}function evaluate$1(Ra,qa){return typeof Ra=="function"?Ra(qa):Ra}function getSide(Ra){return Ra.split("-")[0]}function getAlignment(Ra){return Ra.split("-")[1]}function getOppositeAxis(Ra){return Ra==="x"?"y":"x"}function getAxisLength(Ra){return Ra==="y"?"height":"width"}function getSideAxis(Ra){return["top","bottom"].includes(getSide(Ra))?"y":"x"}function getAlignmentAxis(Ra){return getOppositeAxis(getSideAxis(Ra))}function getAlignmentSides(Ra,qa,rd){rd===void 0&&(rd=!1);const sd=getAlignment(Ra),pd=getAlignmentAxis(Ra),fd=getAxisLength(pd);let hd=pd==="x"?sd===(rd?"end":"start")?"right":"left":sd==="start"?"bottom":"top";return qa.reference[fd]>qa.floating[fd]&&(hd=getOppositePlacement$1(hd)),[hd,getOppositePlacement$1(hd)]}function getExpandedPlacements(Ra){const qa=getOppositePlacement$1(Ra);return[getOppositeAlignmentPlacement(Ra),qa,getOppositeAlignmentPlacement(qa)]}function getOppositeAlignmentPlacement(Ra){return Ra.replace(/start|end/g,qa=>oppositeAlignmentMap[qa])}function getSideList(Ra,qa,rd){const sd=["left","right"],pd=["right","left"],fd=["top","bottom"],hd=["bottom","top"];switch(Ra){case"top":case"bottom":return rd?qa?pd:sd:qa?sd:pd;case"left":case"right":return qa?fd:hd;default:return[]}}function getOppositeAxisPlacements(Ra,qa,rd,sd){const pd=getAlignment(Ra);let fd=getSideList(getSide(Ra),rd==="start",sd);return pd&&(fd=fd.map(hd=>hd+"-"+pd),qa&&(fd=fd.concat(fd.map(getOppositeAlignmentPlacement)))),fd}function getOppositePlacement$1(Ra){return Ra.replace(/left|right|bottom|top/g,qa=>oppositeSideMap[qa])}function expandPaddingObject(Ra){return{top:0,right:0,bottom:0,left:0,...Ra}}function getPaddingObject(Ra){return typeof Ra!="number"?expandPaddingObject(Ra):{top:Ra,right:Ra,bottom:Ra,left:Ra}}function rectToClientRect$1(Ra){const{x:qa,y:rd,width:sd,height:pd}=Ra;return{width:sd,height:pd,top:rd,left:qa,right:qa+sd,bottom:rd+pd,x:qa,y:rd}}function computeCoordsFromPlacement(Ra,qa,rd){let{reference:sd,floating:pd}=Ra;const fd=getSideAxis(qa),hd=getAlignmentAxis(qa),md=getAxisLength(hd),gd=getSide(qa),yd=fd==="y",vd=sd.x+sd.width/2-pd.width/2,Nd=sd.y+sd.height/2-pd.height/2,Md=sd[md]/2-pd[md]/2;let Ld;switch(gd){case"top":Ld={x:vd,y:sd.y-pd.height};break;case"bottom":Ld={x:vd,y:sd.y+sd.height};break;case"right":Ld={x:sd.x+sd.width,y:Nd};break;case"left":Ld={x:sd.x-pd.width,y:Nd};break;default:Ld={x:sd.x,y:sd.y}}switch(getAlignment(qa)){case"start":Ld[hd]-=Md*(rd&&yd?-1:1);break;case"end":Ld[hd]+=Md*(rd&&yd?-1:1);break}return Ld}const computePosition$1=async(Ra,qa,rd)=>{const{placement:sd="bottom",strategy:pd="absolute",middleware:fd=[],platform:hd}=rd,md=fd.filter(Boolean),gd=await(hd.isRTL==null?void 0:hd.isRTL(qa));let yd=await hd.getElementRects({reference:Ra,floating:qa,strategy:pd}),{x:vd,y:Nd}=computeCoordsFromPlacement(yd,sd,gd),Md=sd,Ld={},Fd=0;for(let Hd=0;Hd({name:"arrow",options:Ra,async fn(qa){const{x:rd,y:sd,placement:pd,rects:fd,platform:hd,elements:md,middlewareData:gd}=qa,{element:yd,padding:vd=0}=evaluate$1(Ra,qa)||{};if(yd==null)return{};const Nd=getPaddingObject(vd),Md={x:rd,y:sd},Ld=getAlignmentAxis(pd),Fd=getAxisLength(Ld),Hd=await hd.getDimensions(yd),Vd=Ld==="y",Gd=Vd?"top":"left",Ud=Vd?"bottom":"right",qd=Vd?"clientHeight":"clientWidth",Wd=fd.reference[Fd]+fd.reference[Ld]-Md[Ld]-fd.floating[Fd],Kd=Md[Ld]-fd.reference[Ld],Xd=await(hd.getOffsetParent==null?void 0:hd.getOffsetParent(yd));let df=Xd?Xd[qd]:0;(!df||!await(hd.isElement==null?void 0:hd.isElement(Xd)))&&(df=md.floating[qd]||fd.floating[Fd]);const Ef=Wd/2-Kd/2,pf=df/2-Hd[Fd]/2-1,mf=min$4(Nd[Gd],pf),_f=min$4(Nd[Ud],pf),xf=mf,Cf=df-Hd[Fd]-_f,If=df/2-Hd[Fd]/2+Ef,Sf=clamp(xf,If,Cf),wf=!gd.arrow&&getAlignment(pd)!=null&&If!==Sf&&fd.reference[Fd]/2-(IfIf<=0)){var _f,xf;const If=(((_f=fd.flip)==null?void 0:_f.index)||0)+1,Sf=df[If];if(Sf)return{data:{index:If,overflows:mf},reset:{placement:Sf}};let wf=(xf=mf.filter(Pf=>Pf.overflows[0]<=0).sort((Pf,lh)=>Pf.overflows[1]-lh.overflows[1])[0])==null?void 0:xf.placement;if(!wf)switch(Ld){case"bestFit":{var Cf;const Pf=(Cf=mf.filter(lh=>{if(Xd){const xh=getSideAxis(lh.placement);return xh===Ud||xh==="y"}return!0}).map(lh=>[lh.placement,lh.overflows.filter(xh=>xh>0).reduce((xh,Eh)=>xh+Eh,0)]).sort((lh,xh)=>lh[1]-xh[1])[0])==null?void 0:Cf[0];Pf&&(wf=Pf);break}case"initialPlacement":wf=md;break}if(pd!==wf)return{reset:{placement:wf}}}return{}}}};function getSideOffsets$1(Ra,qa){return{top:Ra.top-qa.height,right:Ra.right-qa.width,bottom:Ra.bottom-qa.height,left:Ra.left-qa.width}}function isAnySideFullyClipped$1(Ra){return sides.some(qa=>Ra[qa]>=0)}const hide$3=function(Ra){return Ra===void 0&&(Ra={}),{name:"hide",options:Ra,async fn(qa){const{rects:rd}=qa,{strategy:sd="referenceHidden",...pd}=evaluate$1(Ra,qa);switch(sd){case"referenceHidden":{const fd=await detectOverflow$1(qa,{...pd,elementContext:"reference"}),hd=getSideOffsets$1(fd,rd.reference);return{data:{referenceHiddenOffsets:hd,referenceHidden:isAnySideFullyClipped$1(hd)}}}case"escaped":{const fd=await detectOverflow$1(qa,{...pd,altBoundary:!0}),hd=getSideOffsets$1(fd,rd.floating);return{data:{escapedOffsets:hd,escaped:isAnySideFullyClipped$1(hd)}}}default:return{}}}}};async function convertValueToCoords(Ra,qa){const{placement:rd,platform:sd,elements:pd}=Ra,fd=await(sd.isRTL==null?void 0:sd.isRTL(pd.floating)),hd=getSide(rd),md=getAlignment(rd),gd=getSideAxis(rd)==="y",yd=["left","top"].includes(hd)?-1:1,vd=fd&&gd?-1:1,Nd=evaluate$1(qa,Ra);let{mainAxis:Md,crossAxis:Ld,alignmentAxis:Fd}=typeof Nd=="number"?{mainAxis:Nd,crossAxis:0,alignmentAxis:null}:{mainAxis:Nd.mainAxis||0,crossAxis:Nd.crossAxis||0,alignmentAxis:Nd.alignmentAxis};return md&&typeof Fd=="number"&&(Ld=md==="end"?Fd*-1:Fd),gd?{x:Ld*vd,y:Md*yd}:{x:Md*yd,y:Ld*vd}}const offset$3=function(Ra){return Ra===void 0&&(Ra=0),{name:"offset",options:Ra,async fn(qa){var rd,sd;const{x:pd,y:fd,placement:hd,middlewareData:md}=qa,gd=await convertValueToCoords(qa,Ra);return hd===((rd=md.offset)==null?void 0:rd.placement)&&(sd=md.arrow)!=null&&sd.alignmentOffset?{}:{x:pd+gd.x,y:fd+gd.y,data:{...gd,placement:hd}}}}},shift$1=function(Ra){return Ra===void 0&&(Ra={}),{name:"shift",options:Ra,async fn(qa){const{x:rd,y:sd,placement:pd}=qa,{mainAxis:fd=!0,crossAxis:hd=!1,limiter:md={fn:Vd=>{let{x:Gd,y:Ud}=Vd;return{x:Gd,y:Ud}}},...gd}=evaluate$1(Ra,qa),yd={x:rd,y:sd},vd=await detectOverflow$1(qa,gd),Nd=getSideAxis(getSide(pd)),Md=getOppositeAxis(Nd);let Ld=yd[Md],Fd=yd[Nd];if(fd){const Vd=Md==="y"?"top":"left",Gd=Md==="y"?"bottom":"right",Ud=Ld+vd[Vd],qd=Ld-vd[Gd];Ld=clamp(Ud,Ld,qd)}if(hd){const Vd=Nd==="y"?"top":"left",Gd=Nd==="y"?"bottom":"right",Ud=Fd+vd[Vd],qd=Fd-vd[Gd];Fd=clamp(Ud,Fd,qd)}const Hd=md.fn({...qa,[Md]:Ld,[Nd]:Fd});return{...Hd,data:{x:Hd.x-rd,y:Hd.y-sd,enabled:{[Md]:fd,[Nd]:hd}}}}}},limitShift$1=function(Ra){return Ra===void 0&&(Ra={}),{options:Ra,fn(qa){const{x:rd,y:sd,placement:pd,rects:fd,middlewareData:hd}=qa,{offset:md=0,mainAxis:gd=!0,crossAxis:yd=!0}=evaluate$1(Ra,qa),vd={x:rd,y:sd},Nd=getSideAxis(pd),Md=getOppositeAxis(Nd);let Ld=vd[Md],Fd=vd[Nd];const Hd=evaluate$1(md,qa),Vd=typeof Hd=="number"?{mainAxis:Hd,crossAxis:0}:{mainAxis:0,crossAxis:0,...Hd};if(gd){const qd=Md==="y"?"height":"width",Wd=fd.reference[Md]-fd.floating[qd]+Vd.mainAxis,Kd=fd.reference[Md]+fd.reference[qd]-Vd.mainAxis;LdKd&&(Ld=Kd)}if(yd){var Gd,Ud;const qd=Md==="y"?"width":"height",Wd=["top","left"].includes(getSide(pd)),Kd=fd.reference[Nd]-fd.floating[qd]+(Wd&&((Gd=hd.offset)==null?void 0:Gd[Nd])||0)+(Wd?0:Vd.crossAxis),Xd=fd.reference[Nd]+fd.reference[qd]+(Wd?0:((Ud=hd.offset)==null?void 0:Ud[Nd])||0)-(Wd?Vd.crossAxis:0);FdXd&&(Fd=Xd)}return{[Md]:Ld,[Nd]:Fd}}}},size$1=function(Ra){return Ra===void 0&&(Ra={}),{name:"size",options:Ra,async fn(qa){var rd,sd;const{placement:pd,rects:fd,platform:hd,elements:md}=qa,{apply:gd=()=>{},...yd}=evaluate$1(Ra,qa),vd=await detectOverflow$1(qa,yd),Nd=getSide(pd),Md=getAlignment(pd),Ld=getSideAxis(pd)==="y",{width:Fd,height:Hd}=fd.floating;let Vd,Gd;Nd==="top"||Nd==="bottom"?(Vd=Nd,Gd=Md===(await(hd.isRTL==null?void 0:hd.isRTL(md.floating))?"start":"end")?"left":"right"):(Gd=Nd,Vd=Md==="end"?"top":"bottom");const Ud=Hd-vd.top-vd.bottom,qd=Fd-vd.left-vd.right,Wd=min$4(Hd-vd[Vd],Ud),Kd=min$4(Fd-vd[Gd],qd),Xd=!qa.middlewareData.shift;let df=Wd,Ef=Kd;if((rd=qa.middlewareData.shift)!=null&&rd.enabled.x&&(Ef=qd),(sd=qa.middlewareData.shift)!=null&&sd.enabled.y&&(df=Ud),Xd&&!Md){const mf=max$5(vd.left,0),_f=max$5(vd.right,0),xf=max$5(vd.top,0),Cf=max$5(vd.bottom,0);Ld?Ef=Fd-2*(mf!==0||_f!==0?mf+_f:max$5(vd.left,vd.right)):df=Hd-2*(xf!==0||Cf!==0?xf+Cf:max$5(vd.top,vd.bottom))}await gd({...qa,availableWidth:Ef,availableHeight:df});const pf=await hd.getDimensions(md.floating);return Fd!==pf.width||Hd!==pf.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName$1(Ra){return isNode$2(Ra)?(Ra.nodeName||"").toLowerCase():"#document"}function getWindow$1(Ra){var qa;return(Ra==null||(qa=Ra.ownerDocument)==null?void 0:qa.defaultView)||window}function getDocumentElement$1(Ra){var qa;return(qa=(isNode$2(Ra)?Ra.ownerDocument:Ra.document)||window.document)==null?void 0:qa.documentElement}function isNode$2(Ra){return hasWindow()?Ra instanceof Node||Ra instanceof getWindow$1(Ra).Node:!1}function isElement$2(Ra){return hasWindow()?Ra instanceof Element||Ra instanceof getWindow$1(Ra).Element:!1}function isHTMLElement$1(Ra){return hasWindow()?Ra instanceof HTMLElement||Ra instanceof getWindow$1(Ra).HTMLElement:!1}function isShadowRoot$1(Ra){return!hasWindow()||typeof ShadowRoot>"u"?!1:Ra instanceof ShadowRoot||Ra instanceof getWindow$1(Ra).ShadowRoot}function isOverflowElement(Ra){const{overflow:qa,overflowX:rd,overflowY:sd,display:pd}=getComputedStyle$2(Ra);return/auto|scroll|overlay|hidden|clip/.test(qa+sd+rd)&&!["inline","contents"].includes(pd)}function isTableElement$1(Ra){return["table","td","th"].includes(getNodeName$1(Ra))}function isTopLayer(Ra){return[":popover-open",":modal"].some(qa=>{try{return Ra.matches(qa)}catch{return!1}})}function isContainingBlock(Ra){const qa=isWebKit(),rd=isElement$2(Ra)?getComputedStyle$2(Ra):Ra;return["transform","translate","scale","rotate","perspective"].some(sd=>rd[sd]?rd[sd]!=="none":!1)||(rd.containerType?rd.containerType!=="normal":!1)||!qa&&(rd.backdropFilter?rd.backdropFilter!=="none":!1)||!qa&&(rd.filter?rd.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(sd=>(rd.willChange||"").includes(sd))||["paint","layout","strict","content"].some(sd=>(rd.contain||"").includes(sd))}function getContainingBlock$1(Ra){let qa=getParentNode$1(Ra);for(;isHTMLElement$1(qa)&&!isLastTraversableNode(qa);){if(isContainingBlock(qa))return qa;if(isTopLayer(qa))return null;qa=getParentNode$1(qa)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(Ra){return["html","body","#document"].includes(getNodeName$1(Ra))}function getComputedStyle$2(Ra){return getWindow$1(Ra).getComputedStyle(Ra)}function getNodeScroll$1(Ra){return isElement$2(Ra)?{scrollLeft:Ra.scrollLeft,scrollTop:Ra.scrollTop}:{scrollLeft:Ra.scrollX,scrollTop:Ra.scrollY}}function getParentNode$1(Ra){if(getNodeName$1(Ra)==="html")return Ra;const qa=Ra.assignedSlot||Ra.parentNode||isShadowRoot$1(Ra)&&Ra.host||getDocumentElement$1(Ra);return isShadowRoot$1(qa)?qa.host:qa}function getNearestOverflowAncestor(Ra){const qa=getParentNode$1(Ra);return isLastTraversableNode(qa)?Ra.ownerDocument?Ra.ownerDocument.body:Ra.body:isHTMLElement$1(qa)&&isOverflowElement(qa)?qa:getNearestOverflowAncestor(qa)}function getOverflowAncestors(Ra,qa,rd){var sd;qa===void 0&&(qa=[]),rd===void 0&&(rd=!0);const pd=getNearestOverflowAncestor(Ra),fd=pd===((sd=Ra.ownerDocument)==null?void 0:sd.body),hd=getWindow$1(pd);if(fd){const md=getFrameElement(hd);return qa.concat(hd,hd.visualViewport||[],isOverflowElement(pd)?pd:[],md&&rd?getOverflowAncestors(md):[])}return qa.concat(pd,getOverflowAncestors(pd,[],rd))}function getFrameElement(Ra){return Ra.parent&&Object.getPrototypeOf(Ra.parent)?Ra.frameElement:null}function getCssDimensions(Ra){const qa=getComputedStyle$2(Ra);let rd=parseFloat(qa.width)||0,sd=parseFloat(qa.height)||0;const pd=isHTMLElement$1(Ra),fd=pd?Ra.offsetWidth:rd,hd=pd?Ra.offsetHeight:sd,md=round$3(rd)!==fd||round$3(sd)!==hd;return md&&(rd=fd,sd=hd),{width:rd,height:sd,$:md}}function unwrapElement$1(Ra){return isElement$2(Ra)?Ra:Ra.contextElement}function getScale(Ra){const qa=unwrapElement$1(Ra);if(!isHTMLElement$1(qa))return createCoords(1);const rd=qa.getBoundingClientRect(),{width:sd,height:pd,$:fd}=getCssDimensions(qa);let hd=(fd?round$3(rd.width):rd.width)/sd,md=(fd?round$3(rd.height):rd.height)/pd;return(!hd||!Number.isFinite(hd))&&(hd=1),(!md||!Number.isFinite(md))&&(md=1),{x:hd,y:md}}const noOffsets=createCoords(0);function getVisualOffsets(Ra){const qa=getWindow$1(Ra);return!isWebKit()||!qa.visualViewport?noOffsets:{x:qa.visualViewport.offsetLeft,y:qa.visualViewport.offsetTop}}function shouldAddVisualOffsets(Ra,qa,rd){return qa===void 0&&(qa=!1),!rd||qa&&rd!==getWindow$1(Ra)?!1:qa}function getBoundingClientRect$1(Ra,qa,rd,sd){qa===void 0&&(qa=!1),rd===void 0&&(rd=!1);const pd=Ra.getBoundingClientRect(),fd=unwrapElement$1(Ra);let hd=createCoords(1);qa&&(sd?isElement$2(sd)&&(hd=getScale(sd)):hd=getScale(Ra));const md=shouldAddVisualOffsets(fd,rd,sd)?getVisualOffsets(fd):createCoords(0);let gd=(pd.left+md.x)/hd.x,yd=(pd.top+md.y)/hd.y,vd=pd.width/hd.x,Nd=pd.height/hd.y;if(fd){const Md=getWindow$1(fd),Ld=sd&&isElement$2(sd)?getWindow$1(sd):sd;let Fd=Md,Hd=getFrameElement(Fd);for(;Hd&&sd&&Ld!==Fd;){const Vd=getScale(Hd),Gd=Hd.getBoundingClientRect(),Ud=getComputedStyle$2(Hd),qd=Gd.left+(Hd.clientLeft+parseFloat(Ud.paddingLeft))*Vd.x,Wd=Gd.top+(Hd.clientTop+parseFloat(Ud.paddingTop))*Vd.y;gd*=Vd.x,yd*=Vd.y,vd*=Vd.x,Nd*=Vd.y,gd+=qd,yd+=Wd,Fd=getWindow$1(Hd),Hd=getFrameElement(Fd)}}return rectToClientRect$1({width:vd,height:Nd,x:gd,y:yd})}function getWindowScrollBarX$1(Ra,qa){const rd=getNodeScroll$1(Ra).scrollLeft;return qa?qa.left+rd:getBoundingClientRect$1(getDocumentElement$1(Ra)).left+rd}function getHTMLOffset(Ra,qa,rd){rd===void 0&&(rd=!1);const sd=Ra.getBoundingClientRect(),pd=sd.left+qa.scrollLeft-(rd?0:getWindowScrollBarX$1(Ra,sd)),fd=sd.top+qa.scrollTop;return{x:pd,y:fd}}function convertOffsetParentRelativeRectToViewportRelativeRect(Ra){let{elements:qa,rect:rd,offsetParent:sd,strategy:pd}=Ra;const fd=pd==="fixed",hd=getDocumentElement$1(sd),md=qa?isTopLayer(qa.floating):!1;if(sd===hd||md&&fd)return rd;let gd={scrollLeft:0,scrollTop:0},yd=createCoords(1);const vd=createCoords(0),Nd=isHTMLElement$1(sd);if((Nd||!Nd&&!fd)&&((getNodeName$1(sd)!=="body"||isOverflowElement(hd))&&(gd=getNodeScroll$1(sd)),isHTMLElement$1(sd))){const Ld=getBoundingClientRect$1(sd);yd=getScale(sd),vd.x=Ld.x+sd.clientLeft,vd.y=Ld.y+sd.clientTop}const Md=hd&&!Nd&&!fd?getHTMLOffset(hd,gd,!0):createCoords(0);return{width:rd.width*yd.x,height:rd.height*yd.y,x:rd.x*yd.x-gd.scrollLeft*yd.x+vd.x+Md.x,y:rd.y*yd.y-gd.scrollTop*yd.y+vd.y+Md.y}}function getClientRects(Ra){return Array.from(Ra.getClientRects())}function getDocumentRect$1(Ra){const qa=getDocumentElement$1(Ra),rd=getNodeScroll$1(Ra),sd=Ra.ownerDocument.body,pd=max$5(qa.scrollWidth,qa.clientWidth,sd.scrollWidth,sd.clientWidth),fd=max$5(qa.scrollHeight,qa.clientHeight,sd.scrollHeight,sd.clientHeight);let hd=-rd.scrollLeft+getWindowScrollBarX$1(Ra);const md=-rd.scrollTop;return getComputedStyle$2(sd).direction==="rtl"&&(hd+=max$5(qa.clientWidth,sd.clientWidth)-pd),{width:pd,height:fd,x:hd,y:md}}function getViewportRect$1(Ra,qa){const rd=getWindow$1(Ra),sd=getDocumentElement$1(Ra),pd=rd.visualViewport;let fd=sd.clientWidth,hd=sd.clientHeight,md=0,gd=0;if(pd){fd=pd.width,hd=pd.height;const yd=isWebKit();(!yd||yd&&qa==="fixed")&&(md=pd.offsetLeft,gd=pd.offsetTop)}return{width:fd,height:hd,x:md,y:gd}}function getInnerBoundingClientRect$1(Ra,qa){const rd=getBoundingClientRect$1(Ra,!0,qa==="fixed"),sd=rd.top+Ra.clientTop,pd=rd.left+Ra.clientLeft,fd=isHTMLElement$1(Ra)?getScale(Ra):createCoords(1),hd=Ra.clientWidth*fd.x,md=Ra.clientHeight*fd.y,gd=pd*fd.x,yd=sd*fd.y;return{width:hd,height:md,x:gd,y:yd}}function getClientRectFromClippingAncestor(Ra,qa,rd){let sd;if(qa==="viewport")sd=getViewportRect$1(Ra,rd);else if(qa==="document")sd=getDocumentRect$1(getDocumentElement$1(Ra));else if(isElement$2(qa))sd=getInnerBoundingClientRect$1(qa,rd);else{const pd=getVisualOffsets(Ra);sd={x:qa.x-pd.x,y:qa.y-pd.y,width:qa.width,height:qa.height}}return rectToClientRect$1(sd)}function hasFixedPositionAncestor(Ra,qa){const rd=getParentNode$1(Ra);return rd===qa||!isElement$2(rd)||isLastTraversableNode(rd)?!1:getComputedStyle$2(rd).position==="fixed"||hasFixedPositionAncestor(rd,qa)}function getClippingElementAncestors(Ra,qa){const rd=qa.get(Ra);if(rd)return rd;let sd=getOverflowAncestors(Ra,[],!1).filter(md=>isElement$2(md)&&getNodeName$1(md)!=="body"),pd=null;const fd=getComputedStyle$2(Ra).position==="fixed";let hd=fd?getParentNode$1(Ra):Ra;for(;isElement$2(hd)&&!isLastTraversableNode(hd);){const md=getComputedStyle$2(hd),gd=isContainingBlock(hd);!gd&&md.position==="fixed"&&(pd=null),(fd?!gd&&!pd:!gd&&md.position==="static"&&!!pd&&["absolute","fixed"].includes(pd.position)||isOverflowElement(hd)&&!gd&&hasFixedPositionAncestor(Ra,hd))?sd=sd.filter(vd=>vd!==hd):pd=md,hd=getParentNode$1(hd)}return qa.set(Ra,sd),sd}function getClippingRect$1(Ra){let{element:qa,boundary:rd,rootBoundary:sd,strategy:pd}=Ra;const hd=[...rd==="clippingAncestors"?isTopLayer(qa)?[]:getClippingElementAncestors(qa,this._c):[].concat(rd),sd],md=hd[0],gd=hd.reduce((yd,vd)=>{const Nd=getClientRectFromClippingAncestor(qa,vd,pd);return yd.top=max$5(Nd.top,yd.top),yd.right=min$4(Nd.right,yd.right),yd.bottom=min$4(Nd.bottom,yd.bottom),yd.left=max$5(Nd.left,yd.left),yd},getClientRectFromClippingAncestor(qa,md,pd));return{width:gd.right-gd.left,height:gd.bottom-gd.top,x:gd.left,y:gd.top}}function getDimensions(Ra){const{width:qa,height:rd}=getCssDimensions(Ra);return{width:qa,height:rd}}function getRectRelativeToOffsetParent(Ra,qa,rd){const sd=isHTMLElement$1(qa),pd=getDocumentElement$1(qa),fd=rd==="fixed",hd=getBoundingClientRect$1(Ra,!0,fd,qa);let md={scrollLeft:0,scrollTop:0};const gd=createCoords(0);if(sd||!sd&&!fd)if((getNodeName$1(qa)!=="body"||isOverflowElement(pd))&&(md=getNodeScroll$1(qa)),sd){const Md=getBoundingClientRect$1(qa,!0,fd,qa);gd.x=Md.x+qa.clientLeft,gd.y=Md.y+qa.clientTop}else pd&&(gd.x=getWindowScrollBarX$1(pd));const yd=pd&&!sd&&!fd?getHTMLOffset(pd,md):createCoords(0),vd=hd.left+md.scrollLeft-gd.x-yd.x,Nd=hd.top+md.scrollTop-gd.y-yd.y;return{x:vd,y:Nd,width:hd.width,height:hd.height}}function isStaticPositioned(Ra){return getComputedStyle$2(Ra).position==="static"}function getTrueOffsetParent$1(Ra,qa){if(!isHTMLElement$1(Ra)||getComputedStyle$2(Ra).position==="fixed")return null;if(qa)return qa(Ra);let rd=Ra.offsetParent;return getDocumentElement$1(Ra)===rd&&(rd=rd.ownerDocument.body),rd}function getOffsetParent$1(Ra,qa){const rd=getWindow$1(Ra);if(isTopLayer(Ra))return rd;if(!isHTMLElement$1(Ra)){let pd=getParentNode$1(Ra);for(;pd&&!isLastTraversableNode(pd);){if(isElement$2(pd)&&!isStaticPositioned(pd))return pd;pd=getParentNode$1(pd)}return rd}let sd=getTrueOffsetParent$1(Ra,qa);for(;sd&&isTableElement$1(sd)&&isStaticPositioned(sd);)sd=getTrueOffsetParent$1(sd,qa);return sd&&isLastTraversableNode(sd)&&isStaticPositioned(sd)&&!isContainingBlock(sd)?rd:sd||getContainingBlock$1(Ra)||rd}const getElementRects=async function(Ra){const qa=this.getOffsetParent||getOffsetParent$1,rd=this.getDimensions,sd=await rd(Ra.floating);return{reference:getRectRelativeToOffsetParent(Ra.reference,await qa(Ra.floating),Ra.strategy),floating:{x:0,y:0,width:sd.width,height:sd.height}}};function isRTL(Ra){return getComputedStyle$2(Ra).direction==="rtl"}const platform$3={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$2,isRTL};function rectsAreEqual(Ra,qa){return Ra.x===qa.x&&Ra.y===qa.y&&Ra.width===qa.width&&Ra.height===qa.height}function observeMove(Ra,qa){let rd=null,sd;const pd=getDocumentElement$1(Ra);function fd(){var md;clearTimeout(sd),(md=rd)==null||md.disconnect(),rd=null}function hd(md,gd){md===void 0&&(md=!1),gd===void 0&&(gd=1),fd();const yd=Ra.getBoundingClientRect(),{left:vd,top:Nd,width:Md,height:Ld}=yd;if(md||qa(),!Md||!Ld)return;const Fd=floor$2(Nd),Hd=floor$2(pd.clientWidth-(vd+Md)),Vd=floor$2(pd.clientHeight-(Nd+Ld)),Gd=floor$2(vd),qd={rootMargin:-Fd+"px "+-Hd+"px "+-Vd+"px "+-Gd+"px",threshold:max$5(0,min$4(1,gd))||1};let Wd=!0;function Kd(Xd){const df=Xd[0].intersectionRatio;if(df!==gd){if(!Wd)return hd();df?hd(!1,df):sd=setTimeout(()=>{hd(!1,1e-7)},1e3)}df===1&&!rectsAreEqual(yd,Ra.getBoundingClientRect())&&hd(),Wd=!1}try{rd=new IntersectionObserver(Kd,{...qd,root:pd.ownerDocument})}catch{rd=new IntersectionObserver(Kd,qd)}rd.observe(Ra)}return hd(!0),fd}function autoUpdate(Ra,qa,rd,sd){sd===void 0&&(sd={});const{ancestorScroll:pd=!0,ancestorResize:fd=!0,elementResize:hd=typeof ResizeObserver=="function",layoutShift:md=typeof IntersectionObserver=="function",animationFrame:gd=!1}=sd,yd=unwrapElement$1(Ra),vd=pd||fd?[...yd?getOverflowAncestors(yd):[],...getOverflowAncestors(qa)]:[];vd.forEach(Gd=>{pd&&Gd.addEventListener("scroll",rd,{passive:!0}),fd&&Gd.addEventListener("resize",rd)});const Nd=yd&&md?observeMove(yd,rd):null;let Md=-1,Ld=null;hd&&(Ld=new ResizeObserver(Gd=>{let[Ud]=Gd;Ud&&Ud.target===yd&&Ld&&(Ld.unobserve(qa),cancelAnimationFrame(Md),Md=requestAnimationFrame(()=>{var qd;(qd=Ld)==null||qd.observe(qa)})),rd()}),yd&&!gd&&Ld.observe(yd),Ld.observe(qa));let Fd,Hd=gd?getBoundingClientRect$1(Ra):null;gd&&Vd();function Vd(){const Gd=getBoundingClientRect$1(Ra);Hd&&!rectsAreEqual(Hd,Gd)&&rd(),Hd=Gd,Fd=requestAnimationFrame(Vd)}return rd(),()=>{var Gd;vd.forEach(Ud=>{pd&&Ud.removeEventListener("scroll",rd),fd&&Ud.removeEventListener("resize",rd)}),Nd==null||Nd(),(Gd=Ld)==null||Gd.disconnect(),Ld=null,gd&&cancelAnimationFrame(Fd)}}const offset$2=offset$3,shift=shift$1,flip$2=flip$3,size=size$1,hide$2=hide$3,arrow$3=arrow$4,limitShift=limitShift$1,computePosition=(Ra,qa,rd)=>{const sd=new Map,pd={platform:platform$3,...rd},fd={...pd.platform,_c:sd};return computePosition$1(Ra,qa,{...pd,platform:fd})};function isComponentPublicInstance(Ra){return Ra!=null&&typeof Ra=="object"&&"$el"in Ra}function unwrapElement(Ra){if(isComponentPublicInstance(Ra)){const qa=Ra.$el;return isNode$2(qa)&&getNodeName$1(qa)==="#comment"?null:qa}return Ra}function toValue$1(Ra){return typeof Ra=="function"?Ra():unref(Ra)}function arrow$2(Ra){return{name:"arrow",options:Ra,fn(qa){const rd=unwrapElement(toValue$1(Ra.element));return rd==null?{}:arrow$3({element:rd,padding:Ra.padding}).fn(qa)}}}function getDPR(Ra){return typeof window>"u"?1:(Ra.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(Ra,qa){const rd=getDPR(Ra);return Math.round(qa*rd)/rd}function useFloating(Ra,qa,rd){rd===void 0&&(rd={});const sd=rd.whileElementsMounted,pd=computed(()=>{var df;return(df=toValue$1(rd.open))!=null?df:!0}),fd=computed(()=>toValue$1(rd.middleware)),hd=computed(()=>{var df;return(df=toValue$1(rd.placement))!=null?df:"bottom"}),md=computed(()=>{var df;return(df=toValue$1(rd.strategy))!=null?df:"absolute"}),gd=computed(()=>{var df;return(df=toValue$1(rd.transform))!=null?df:!0}),yd=computed(()=>unwrapElement(Ra.value)),vd=computed(()=>unwrapElement(qa.value)),Nd=ref$1(0),Md=ref$1(0),Ld=ref$1(md.value),Fd=ref$1(hd.value),Hd=shallowRef({}),Vd=ref$1(!1),Gd=computed(()=>{const df={position:Ld.value,left:"0",top:"0"};if(!vd.value)return df;const Ef=roundByDPR(vd.value,Nd.value),pf=roundByDPR(vd.value,Md.value);return gd.value?{...df,transform:"translate("+Ef+"px, "+pf+"px)",...getDPR(vd.value)>=1.5&&{willChange:"transform"}}:{position:Ld.value,left:Ef+"px",top:pf+"px"}});let Ud;function qd(){if(yd.value==null||vd.value==null)return;const df=pd.value;computePosition(yd.value,vd.value,{middleware:fd.value,placement:hd.value,strategy:md.value}).then(Ef=>{Nd.value=Ef.x,Md.value=Ef.y,Ld.value=Ef.strategy,Fd.value=Ef.placement,Hd.value=Ef.middlewareData,Vd.value=df!==!1})}function Wd(){typeof Ud=="function"&&(Ud(),Ud=void 0)}function Kd(){if(Wd(),sd===void 0){qd();return}if(yd.value!=null&&vd.value!=null){Ud=sd(yd.value,vd.value,qd);return}}function Xd(){pd.value||(Vd.value=!1)}return watch([fd,hd,md,pd],qd,{flush:"sync"}),watch([yd,vd],Kd,{flush:"sync"}),watch(pd,Xd,{flush:"sync"}),getCurrentScope()&&onScopeDispose(Wd),{x:shallowReadonly(Nd),y:shallowReadonly(Md),strategy:shallowReadonly(Ld),placement:shallowReadonly(Fd),middlewareData:shallowReadonly(Hd),isPositioned:shallowReadonly(Vd),floatingStyles:Gd,update:qd}}let $488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5{format(qa){let rd="";if(!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?rd=$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,qa):rd=this.numberFormatter.format(qa),this.options.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var sd;let{unit:pd,unitDisplay:fd="short",locale:hd}=this.resolvedOptions();if(!pd)return rd;let md=(sd=$488c6ddbf4ef74c2$var$UNITS[pd])===null||sd===void 0?void 0:sd[fd];rd+=md[hd]||md.default}return rd}formatToParts(qa){return this.numberFormatter.formatToParts(qa)}formatRange(qa,rd){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(qa,rd);if(rd= start date");return`${this.format(qa)} – ${this.format(rd)}`}formatRangeToParts(qa,rd){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(qa,rd);if(rd= start date");let sd=this.numberFormatter.formatToParts(qa),pd=this.numberFormatter.formatToParts(rd);return[...sd.map(fd=>({...fd,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...pd.map(fd=>({...fd,source:"endRange"}))]}resolvedOptions(){let qa=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(qa={...qa,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style==="unit"&&(qa={...qa,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),qa}constructor(qa,rd={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(qa,rd),this.options=rd}}function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(Ra,qa={}){let{numberingSystem:rd}=qa;if(rd&&Ra.includes("-nu-")&&(Ra.includes("-u-")||(Ra+="-u-"),Ra+=`-nu-${rd}`),qa.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var sd;let{unit:hd,unitDisplay:md="short"}=qa;if(!hd)throw new Error('unit option must be provided with style: "unit"');if(!(!((sd=$488c6ddbf4ef74c2$var$UNITS[hd])===null||sd===void 0)&&sd[md]))throw new Error(`Unsupported unit ${hd} with unitDisplay = ${md}`);qa={...qa,style:"decimal"}}let pd=Ra+(qa?Object.entries(qa).sort((hd,md)=>hd[0]0||Object.is(rd,0):qa==="exceptZero"&&(Object.is(rd,-0)||Object.is(rd,0)?rd=Math.abs(rd):sd=rd>0),sd){let pd=Ra.format(-rd),fd=Ra.format(rd),hd=pd.replace(fd,"").replace(/\u200e|\u061C/,"");return[...hd].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),pd.replace(fd,"!!!").replace(hd,"+").replace("!!!",fd)}else return Ra.format(rd)}}const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=new RegExp("^.*\\(.*\\).*$"),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=["latn","arab","hanidec","deva","beng"];class $6c7bd7858deea686$export$cd11ab140839f11d{parse(qa){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,qa).parse(qa)}isValidPartialNumber(qa,rd,sd){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,qa).isValidPartialNumber(qa,rd,sd)}getNumberingSystem(qa){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,qa).options.numberingSystem}constructor(qa,rd={}){this.locale=qa,this.options=rd}}const $6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(Ra,qa,rd){let sd=$6c7bd7858deea686$var$getCachedNumberParser(Ra,qa);if(!Ra.includes("-nu-")&&!sd.isValidPartialNumber(rd)){for(let pd of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(pd!==sd.options.numberingSystem){let fd=$6c7bd7858deea686$var$getCachedNumberParser(Ra+(Ra.includes("-u-")?"-nu-":"-u-nu-")+pd,qa);if(fd.isValidPartialNumber(rd))return fd}}return sd}function $6c7bd7858deea686$var$getCachedNumberParser(Ra,qa){let rd=Ra+(qa?Object.entries(qa).sort((pd,fd)=>pd[0]-1&&(rd=`-${rd}`)}let sd=rd?+rd:NaN;if(isNaN(sd))return NaN;if(this.options.style==="percent"){var pd,fd;let hd={...this.options,style:"decimal",minimumFractionDigits:Math.min(((pd=this.options.minimumFractionDigits)!==null&&pd!==void 0?pd:0)+2,20),maximumFractionDigits:Math.min(((fd=this.options.maximumFractionDigits)!==null&&fd!==void 0?fd:0)+2,20)};return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale,hd).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale,hd).format(sd))}return this.options.currencySign==="accounting"&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(qa)&&(sd=-1*sd),sd}sanitize(qa){return qa=qa.replace(this.symbols.literals,""),this.symbols.minusSign&&(qa=qa.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(qa=qa.replace(",",this.symbols.decimal),qa=qa.replace("،",this.symbols.decimal)),this.symbols.group&&(qa=$6c7bd7858deea686$var$replaceAll(qa,".",this.symbols.group))),this.options.locale==="fr-FR"&&(qa=$6c7bd7858deea686$var$replaceAll(qa,"."," ")),qa}isValidPartialNumber(qa,rd=-1/0,sd=1/0){return qa=this.sanitize(qa),this.symbols.minusSign&&qa.startsWith(this.symbols.minusSign)&&rd<0?qa=qa.slice(this.symbols.minusSign.length):this.symbols.plusSign&&qa.startsWith(this.symbols.plusSign)&&sd>0&&(qa=qa.slice(this.symbols.plusSign.length)),this.symbols.group&&qa.startsWith(this.symbols.group)||this.symbols.decimal&&qa.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(qa=$6c7bd7858deea686$var$replaceAll(qa,this.symbols.group,"")),qa=qa.replace(this.symbols.numeral,""),this.symbols.decimal&&(qa=qa.replace(this.symbols.decimal,"")),qa.length===0)}constructor(qa,rd={}){this.locale=qa,this.formatter=new Intl.NumberFormat(qa,rd),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(qa,this.formatter,this.options,rd);var sd,pd;this.options.style==="percent"&&(((sd=this.options.minimumFractionDigits)!==null&&sd!==void 0?sd:0)>18||((pd=this.options.maximumFractionDigits)!==null&&pd!==void 0?pd:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const $6c7bd7858deea686$var$nonLiteralParts=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(Ra,qa,rd,sd){var pd,fd,hd,md;let gd=new Intl.NumberFormat(Ra,{...rd,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),yd=gd.formatToParts(-10000.111),vd=gd.formatToParts(10000.111),Nd=$6c7bd7858deea686$var$pluralNumbers.map(mf=>gd.formatToParts(mf));var Md;let Ld=(Md=(pd=yd.find(mf=>mf.type==="minusSign"))===null||pd===void 0?void 0:pd.value)!==null&&Md!==void 0?Md:"-",Fd=(fd=vd.find(mf=>mf.type==="plusSign"))===null||fd===void 0?void 0:fd.value;!Fd&&((sd==null?void 0:sd.signDisplay)==="exceptZero"||(sd==null?void 0:sd.signDisplay)==="always")&&(Fd="+");let Vd=(hd=new Intl.NumberFormat(Ra,{...rd,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(mf=>mf.type==="decimal"))===null||hd===void 0?void 0:hd.value,Gd=(md=yd.find(mf=>mf.type==="group"))===null||md===void 0?void 0:md.value,Ud=yd.filter(mf=>!$6c7bd7858deea686$var$nonLiteralParts.has(mf.type)).map(mf=>$6c7bd7858deea686$var$escapeRegex(mf.value)),qd=Nd.flatMap(mf=>mf.filter(_f=>!$6c7bd7858deea686$var$nonLiteralParts.has(_f.type)).map(_f=>$6c7bd7858deea686$var$escapeRegex(_f.value))),Wd=[...new Set([...Ud,...qd])].sort((mf,_f)=>_f.length-mf.length),Kd=Wd.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${Wd.join("|")}|[\\p{White_Space}]`,"gu"),Xd=[...new Intl.NumberFormat(rd.locale,{useGrouping:!1}).format(9876543210)].reverse(),df=new Map(Xd.map((mf,_f)=>[mf,_f])),Ef=new RegExp(`[${Xd.join("")}]`,"g");return{minusSign:Ld,plusSign:Fd,decimal:Vd,group:Gd,literals:Kd,numeral:Ef,index:mf=>String(df.get(mf))}}function $6c7bd7858deea686$var$replaceAll(Ra,qa,rd){return Ra.replaceAll?Ra.replaceAll(qa,rd):Ra.split(qa).join(rd)}function $6c7bd7858deea686$var$escapeRegex(Ra){return Ra.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Q$6(Ra,qa){const rd=typeof Ra=="string"&&!qa?`${Ra}Context`:qa,sd=Symbol(rd);return[pd=>{const fd=inject(sd,pd);if(fd||fd===null)return fd;throw new Error(`Injection \`${sd.toString()}\` not found. Component must be used within ${Array.isArray(Ra)?`one of the following components: ${Ra.join(", ")}`:`\`${Ra}\``}`)},pd=>(provide(sd,pd),pd)]}function Wt$3(Ra,qa,rd){const sd=rd.originalEvent.target,pd=new CustomEvent(Ra,{bubbles:!1,cancelable:!0,detail:rd});qa&&sd.addEventListener(Ra,qa,{once:!0}),sd.dispatchEvent(pd)}function jt$3(Ra,qa=Number.NEGATIVE_INFINITY,rd=Number.POSITIVE_INFINITY){return Math.min(rd,Math.max(qa,Ra))}function Ea$1(Ra,qa){let rd=Ra;const sd=qa.toString(),pd=sd.indexOf("."),fd=pd>=0?sd.length-pd:0;if(fd>0){const hd=10**fd;rd=Math.round(rd*hd)/hd}return rd}function zr$4(Ra,qa,rd,sd){qa=Number(qa),rd=Number(rd);const pd=(Ra-(Number.isNaN(qa)?0:qa))%sd;let fd=Ea$1(Math.abs(pd)*2>=sd?Ra+Math.sign(pd)*(sd-Math.abs(pd)):Ra-pd,sd);return Number.isNaN(qa)?!Number.isNaN(rd)&&fd>rd&&(fd=Math.floor(Ea$1(rd/sd,sd))*sd):fdrd&&(fd=qa+Math.floor(Ea$1((rd-qa)/sd,sd))*sd),fd=Ea$1(fd,sd),fd}function vt$5(Ra){return Ra==null}function ei$4(Ra,qa){var rd;const sd=shallowRef();return watchEffect(()=>{sd.value=Ra()},{...qa,flush:(rd=void 0)!=null?rd:"sync"}),readonly(sd)}function yt$2(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function ia$1(){const Ra=new Set,qa=rd=>{Ra.delete(rd)};return{on:rd=>{Ra.add(rd);const sd=()=>qa(rd);return yt$2(sd),{off:sd}},off:qa,trigger:(...rd)=>Promise.all(Array.from(Ra).map(sd=>sd(...rd)))}}function ai$5(Ra){let qa=!1,rd;const sd=effectScope(!0);return(...pd)=>(qa||(rd=sd.run(()=>Ra(...pd)),qa=!0),rd)}function Sl$3(Ra){let qa=0,rd,sd;const pd=()=>{qa-=1,sd&&qa<=0&&(sd.stop(),rd=void 0,sd=void 0)};return(...fd)=>(qa+=1,rd||(sd=effectScope(!0),rd=sd.run(()=>Ra(...fd))),yt$2(pd),rd)}function Ke$3(Ra){return typeof Ra=="function"?Ra():unref(Ra)}function ni$4(Ra){if(!isRef(Ra))return reactive(Ra);const qa=new Proxy({},{get(rd,sd,pd){return unref(Reflect.get(Ra.value,sd,pd))},set(rd,sd,pd){return isRef(Ra.value[sd])&&!isRef(pd)?Ra.value[sd].value=pd:Ra.value[sd]=pd,!0},deleteProperty(rd,sd){return Reflect.deleteProperty(Ra.value,sd)},has(rd,sd){return Reflect.has(Ra.value,sd)},ownKeys(){return Object.keys(Ra.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return reactive(qa)}function El$3(Ra){return ni$4(computed(Ra))}const Ye$4=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const oi$4=Ra=>typeof Ra<"u",si$4=Object.prototype.toString,ri$4=Ra=>si$4.call(Ra)==="[object Object]",Va$1=()=>{},Ko$2=ii$5();function ii$5(){var Ra,qa;return Ye$4&&((Ra=window==null?void 0:window.navigator)==null?void 0:Ra.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((qa=window==null?void 0:window.navigator)==null?void 0:qa.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Pl$3(Ra,qa){function rd(...sd){return new Promise((pd,fd)=>{Promise.resolve(Ra(()=>qa.apply(this,sd),{fn:qa,thisArg:this,args:sd})).then(pd).catch(fd)})}return rd}const Dl$3=Ra=>Ra();function di$4(Ra=Dl$3){const qa=ref$1(!0);function rd(){qa.value=!1}function sd(){qa.value=!0}const pd=(...fd)=>{qa.value&&Ra(...fd)};return{isActive:readonly(qa),pause:rd,resume:sd,eventFilter:pd}}function $l$3(Ra){return getCurrentInstance()}function It$3(Ra,qa=1e4){return customRef((rd,sd)=>{let pd=Ke$3(Ra),fd;const hd=()=>setTimeout(()=>{pd=Ke$3(Ra),sd()},Ke$3(qa));return yt$2(()=>{clearTimeout(fd)}),{get(){return rd(),pd},set(md){pd=md,sd(),clearTimeout(fd),fd=hd()}}})}function ci$5(Ra,qa,rd={}){const{eventFilter:sd=Dl$3,...pd}=rd;return watch(Ra,Pl$3(sd,qa),pd)}function Ho$3(Ra,qa,rd={}){const{eventFilter:sd,...pd}=rd,{eventFilter:fd,pause:hd,resume:md,isActive:gd}=di$4(sd);return{stop:ci$5(Ra,qa,{...pd,eventFilter:fd}),pause:hd,resume:md,isActive:gd}}function fi$4(Ra,qa,...[rd]){const{flush:sd="sync",deep:pd=!1,immediate:fd=!0,direction:hd="both",transform:md={}}=rd||{},gd=[],yd="ltr"in md&&md.ltr||(Nd=>Nd),vd="rtl"in md&&md.rtl||(Nd=>Nd);return(hd==="both"||hd==="ltr")&&gd.push(Ho$3(Ra,Nd=>{gd.forEach(Md=>Md.pause()),qa.value=yd(Nd),gd.forEach(Md=>Md.resume())},{flush:sd,deep:pd,immediate:fd})),(hd==="both"||hd==="rtl")&&gd.push(Ho$3(qa,Nd=>{gd.forEach(Md=>Md.pause()),Ra.value=vd(Nd),gd.forEach(Md=>Md.resume())},{flush:sd,deep:pd,immediate:fd})),()=>{gd.forEach(Nd=>Nd.stop())}}function pi$6(Ra,qa){$l$3()&&onBeforeUnmount(Ra,qa)}function Wn$3(Ra,qa,rd={}){const{immediate:sd=!0}=rd,pd=ref$1(!1);let fd=null;function hd(){fd&&(clearTimeout(fd),fd=null)}function md(){pd.value=!1,hd()}function gd(...yd){hd(),pd.value=!0,fd=setTimeout(()=>{pd.value=!1,fd=null,Ra(...yd)},Ke$3(qa))}return sd&&(pd.value=!0,Ye$4&&gd()),yt$2(md),{isPending:readonly(pd),start:gd,stop:md}}function $e$4(Ra){var qa;const rd=Ke$3(Ra);return(qa=rd==null?void 0:rd.$el)!=null?qa:rd}const Tt$3=Ye$4?window:void 0;function Le$5(...Ra){let qa,rd,sd,pd;if(typeof Ra[0]=="string"||Array.isArray(Ra[0])?([rd,sd,pd]=Ra,qa=Tt$3):[qa,rd,sd,pd]=Ra,!qa)return Va$1;Array.isArray(rd)||(rd=[rd]),Array.isArray(sd)||(sd=[sd]);const fd=[],hd=()=>{fd.forEach(vd=>vd()),fd.length=0},md=(vd,Nd,Md,Ld)=>(vd.addEventListener(Nd,Md,Ld),()=>vd.removeEventListener(Nd,Md,Ld)),gd=watch(()=>[$e$4(qa),Ke$3(pd)],([vd,Nd])=>{if(hd(),!vd)return;const Md=ri$4(Nd)?{...Nd}:Nd;fd.push(...rd.flatMap(Ld=>sd.map(Fd=>md(vd,Ld,Fd,Md))))},{immediate:!0,flush:"post"}),yd=()=>{gd(),hd()};return yt$2(yd),yd}function yi$3(Ra){return typeof Ra=="function"?Ra:typeof Ra=="string"?qa=>qa.key===Ra:Array.isArray(Ra)?qa=>Ra.includes(qa.key):()=>!0}function jn$3(...Ra){let qa,rd,sd={};Ra.length===3?(qa=Ra[0],rd=Ra[1],sd=Ra[2]):Ra.length===2?typeof Ra[1]=="object"?(qa=!0,rd=Ra[0],sd=Ra[1]):(qa=Ra[0],rd=Ra[1]):(qa=!0,rd=Ra[0]);const{target:pd=Tt$3,eventName:fd="keydown",passive:hd=!1,dedupe:md=!1}=sd,gd=yi$3(qa);return Le$5(pd,fd,yd=>{yd.repeat&&Ke$3(md)||gd(yd)&&rd(yd)},hd)}function ja$1(){const Ra=ref$1(!1),qa=getCurrentInstance();return qa&&onMounted(()=>{Ra.value=!0},qa),Ra}function bi$3(Ra){return JSON.parse(JSON.stringify(Ra))}function ne$5(Ra,qa,rd,sd={}){var pd,fd,hd;const{clone:md=!1,passive:gd=!1,eventName:yd,deep:vd=!1,defaultValue:Nd,shouldEmit:Md}=sd,Ld=getCurrentInstance(),Fd=rd||(Ld==null?void 0:Ld.emit)||((pd=Ld==null?void 0:Ld.$emit)==null?void 0:pd.bind(Ld))||((hd=(fd=Ld==null?void 0:Ld.proxy)==null?void 0:fd.$emit)==null?void 0:hd.bind(Ld==null?void 0:Ld.proxy));let Hd=yd;qa||(qa="modelValue"),Hd=Hd||`update:${qa.toString()}`;const Vd=qd=>md?typeof md=="function"?md(qd):bi$3(qd):qd,Gd=()=>oi$4(Ra[qa])?Vd(Ra[qa]):Nd,Ud=qd=>{Md?Md(qd)&&Fd(Hd,qd):Fd(Hd,qd)};if(gd){const qd=Gd(),Wd=ref$1(qd);let Kd=!1;return watch(()=>Ra[qa],Xd=>{Kd||(Kd=!0,Wd.value=Vd(Xd),nextTick$1(()=>Kd=!1))}),watch(Wd,Xd=>{!Kd&&(Xd!==Ra[qa]||vd)&&Ud(Xd)},{deep:vd}),Wd}else return computed({get(){return Gd()},set(qd){Ud(qd)}})}function Ua$3(Ra){return Ra?Ra.flatMap(qa=>qa.type===Fragment?Ua$3(qa.children):[qa]):[]}const _i$2=["INPUT","TEXTAREA"];function Rt$4(Ra,qa,rd,sd={}){if(!qa||sd.enableIgnoredElement&&_i$2.includes(qa.nodeName))return null;const{arrowKeyOptions:pd="both",attributeName:fd="[data-radix-vue-collection-item]",itemsArray:hd=[],loop:md=!0,dir:gd="ltr",preventScroll:yd=!0,focus:vd=!1}=sd,[Nd,Md,Ld,Fd,Hd,Vd]=[Ra.key==="ArrowRight",Ra.key==="ArrowLeft",Ra.key==="ArrowUp",Ra.key==="ArrowDown",Ra.key==="Home",Ra.key==="End"],Gd=Ld||Fd,Ud=Nd||Md;if(!Hd&&!Vd&&(!Gd&&!Ud||pd==="vertical"&&Ud||pd==="horizontal"&&Gd))return null;const qd=rd?Array.from(rd.querySelectorAll(fd)):hd;if(!qd.length)return null;yd&&Ra.preventDefault();let Wd=null;return Ud||Gd?Wd=Al$3(qd,qa,{goForward:Gd?Fd:gd==="ltr"?Nd:Md,loop:md}):Hd?Wd=qd.at(0)||null:Vd&&(Wd=qd.at(-1)||null),vd&&(Wd==null||Wd.focus()),Wd}function Al$3(Ra,qa,rd,sd=Ra.length){if(--sd===0)return null;const pd=Ra.indexOf(qa),fd=rd.goForward?pd+1:pd-1;if(!rd.loop&&(fd<0||fd>=Ra.length))return null;const hd=(fd+Ra.length)%Ra.length,md=Ra[hd];return md?md.hasAttribute("disabled")&&md.getAttribute("disabled")!=="false"?Al$3(Ra,md,rd,sd):md:null}function gn$3(Ra){if(Ra===null||typeof Ra!="object")return!1;const qa=Object.getPrototypeOf(Ra);return qa!==null&&qa!==Object.prototype&&Object.getPrototypeOf(qa)!==null||Symbol.iterator in Ra?!1:Symbol.toStringTag in Ra?Object.prototype.toString.call(Ra)==="[object Module]":!0}function Pn$4(Ra,qa,rd=".",sd){if(!gn$3(qa))return Pn$4(Ra,{},rd);const pd=Object.assign({},qa);for(const fd in Ra){if(fd==="__proto__"||fd==="constructor")continue;const hd=Ra[fd];hd!=null&&(Array.isArray(hd)&&Array.isArray(pd[fd])?pd[fd]=[...hd,...pd[fd]]:gn$3(hd)&&gn$3(pd[fd])?pd[fd]=Pn$4(hd,pd[fd],(rd?`${rd}.`:"")+fd.toString()):pd[fd]=hd)}return pd}function xi$2(Ra){return(...qa)=>qa.reduce((rd,sd)=>Pn$4(rd,sd,""),{})}const Si$2=xi$2(),[Ga$2,Ei$2]=Q$6("ConfigProvider");let Pi$2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Di$3=(Ra=21)=>{let qa="",rd=Ra;for(;rd--;)qa+=Pi$2[Math.random()*64|0];return qa};const $i$2=Sl$3(()=>{const Ra=ref$1(new Map),qa=ref$1(),rd=computed(()=>{for(const hd of Ra.value.values())if(hd)return!0;return!1}),sd=Ga$2({scrollBody:ref$1(!0)});let pd=null;const fd=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=qa.value??"",Ko$2&&(pd==null||pd()),qa.value=void 0};return watch(rd,(hd,md)=>{var gd;if(!Ye$4)return;if(!hd){md&&fd();return}qa.value===void 0&&(qa.value=document.body.style.overflow);const yd=window.innerWidth-document.documentElement.clientWidth,vd={padding:yd,margin:0},Nd=(gd=sd.scrollBody)!=null&&gd.value?typeof sd.scrollBody.value=="object"?Si$2({padding:sd.scrollBody.value.padding===!0?yd:sd.scrollBody.value.padding,margin:sd.scrollBody.value.margin===!0?yd:sd.scrollBody.value.margin},vd):vd:{padding:0,margin:0};yd>0&&(document.body.style.paddingRight=typeof Nd.padding=="number"?`${Nd.padding}px`:String(Nd.padding),document.body.style.marginRight=typeof Nd.margin=="number"?`${Nd.margin}px`:String(Nd.margin),document.body.style.setProperty("--scrollbar-width",`${yd}px`),document.body.style.overflow="hidden"),Ko$2&&(pd=Le$5(document,"touchmove",Md=>Bi$2(Md),{passive:!1})),nextTick$1(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),Ra});function ha$1(Ra){const qa=Di$3(6),rd=$i$2();rd.value.set(qa,Ra??!1);const sd=computed({get:()=>rd.value.get(qa)??!1,set:pd=>rd.value.set(qa,pd)});return pi$6(()=>{rd.value.delete(qa)}),sd}function Ol$3(Ra){const qa=window.getComputedStyle(Ra);if(qa.overflowX==="scroll"||qa.overflowY==="scroll"||qa.overflowX==="auto"&&Ra.clientWidth1?!0:(qa.preventDefault&&qa.cancelable&&qa.preventDefault(),!1)}const Ii$1="data-radix-vue-collection-item";function Me$7(Ra,qa=Ii$1){const rd=Ra??Symbol();return{createCollection:sd=>{const pd=ref$1([]);function fd(){const hd=$e$4(sd);return hd?pd.value=Array.from(hd.querySelectorAll(`[${qa}]:not([data-disabled])`)):pd.value=[]}return onBeforeUpdate(()=>{pd.value=[]}),onMounted(fd),onUpdated(fd),watch(()=>sd==null?void 0:sd.value,fd,{immediate:!0}),provide(rd,pd),pd},injectCollection:()=>inject(rd,ref$1([]))}}function be$8(Ra){const qa=Ga$2({dir:ref$1("ltr")});return computed(()=>{var rd;return(Ra==null?void 0:Ra.value)||((rd=qa.dir)==null?void 0:rd.value)||"ltr"})}function Ae$5(Ra){const qa=getCurrentInstance(),rd=qa==null?void 0:qa.type.emits,sd={};return rd!=null&&rd.length||console.warn(`No emitted event found. Please check component: ${qa==null?void 0:qa.type.__name}`),rd==null||rd.forEach(pd=>{sd[toHandlerKey(camelize(pd))]=(...fd)=>Ra(pd,...fd)}),sd}let bn$4=0;function Gn$4(){watchEffect(Ra=>{if(!Ye$4)return;const qa=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",qa[0]??Wo$2()),document.body.insertAdjacentElement("beforeend",qa[1]??Wo$2()),bn$4++,Ra(()=>{bn$4===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(rd=>rd.remove()),bn$4--})})}function Wo$2(){const Ra=document.createElement("span");return Ra.setAttribute("data-radix-focus-guard",""),Ra.tabIndex=0,Ra.style.outline="none",Ra.style.opacity="0",Ra.style.position="fixed",Ra.style.pointerEvents="none",Ra}function Qe$3(Ra){return computed(()=>{var qa;return Ke$3(Ra)?!!((qa=$e$4(Ra))!=null&&qa.closest("form")):!0})}function At$5(Ra){const qa=getCurrentInstance(),rd=Object.keys((qa==null?void 0:qa.type.props)??{}).reduce((pd,fd)=>{const hd=(qa==null?void 0:qa.type.props[fd]).default;return hd!==void 0&&(pd[fd]=hd),pd},{}),sd=toRef$1(Ra);return computed(()=>{const pd={},fd=(qa==null?void 0:qa.vnode.props)??{};return Object.keys(fd).forEach(hd=>{pd[camelize(hd)]=fd[hd]}),Object.keys({...rd,...pd}).reduce((hd,md)=>(sd.value[md]!==void 0&&(hd[md]=sd.value[md]),hd),{})})}function xe$5(Ra,qa){const rd=At$5(Ra),sd=qa?Ae$5(qa):{};return computed(()=>({...rd.value,...sd}))}function R$6(){const Ra=getCurrentInstance(),qa=ref$1(),rd=computed(()=>{var hd,md;return["#text","#comment"].includes((hd=qa.value)==null?void 0:hd.$el.nodeName)?(md=qa.value)==null?void 0:md.$el.nextElementSibling:$e$4(qa)}),sd=Object.assign({},Ra.exposed),pd={};for(const hd in Ra.props)Object.defineProperty(pd,hd,{enumerable:!0,configurable:!0,get:()=>Ra.props[hd]});if(Object.keys(sd).length>0)for(const hd in sd)Object.defineProperty(pd,hd,{enumerable:!0,configurable:!0,get:()=>sd[hd]});Object.defineProperty(pd,"$el",{enumerable:!0,configurable:!0,get:()=>Ra.vnode.el}),Ra.exposed=pd;function fd(hd){qa.value=hd,!(hd instanceof Element||!hd)&&(Object.defineProperty(pd,"$el",{enumerable:!0,configurable:!0,get:()=>hd.$el}),Ra.exposed=pd)}return{forwardRef:fd,currentRef:qa,currentElement:rd}}function kl$3(Ra,qa){const rd=It$3(!1,300),sd=ref$1(null),pd=ia$1();function fd(){sd.value=null,rd.value=!1}function hd(md,gd){const yd=md.currentTarget,vd={x:md.clientX,y:md.clientY},Nd=Ti$2(vd,yd.getBoundingClientRect()),Md=Ri$1(vd,Nd),Ld=Ai$2(gd.getBoundingClientRect()),Fd=ki$2([...Md,...Ld]);sd.value=Fd,rd.value=!0}return watchEffect(md=>{if(Ra.value&&qa.value){const gd=vd=>hd(vd,qa.value),yd=vd=>hd(vd,Ra.value);Ra.value.addEventListener("pointerleave",gd),qa.value.addEventListener("pointerleave",yd),md(()=>{var vd,Nd;(vd=Ra.value)==null||vd.removeEventListener("pointerleave",gd),(Nd=qa.value)==null||Nd.removeEventListener("pointerleave",yd)})}}),watchEffect(md=>{var gd;if(sd.value){const yd=vd=>{var Nd,Md;if(!sd.value)return;const Ld=vd.target,Fd={x:vd.clientX,y:vd.clientY},Hd=((Nd=Ra.value)==null?void 0:Nd.contains(Ld))||((Md=qa.value)==null?void 0:Md.contains(Ld)),Vd=!Oi$1(Fd,sd.value),Gd=Ld.hasAttribute("data-grace-area-trigger");Hd?fd():(Vd||Gd)&&(fd(),pd.trigger())};(gd=Ra.value)==null||gd.ownerDocument.addEventListener("pointermove",yd),md(()=>{var vd;return(vd=Ra.value)==null?void 0:vd.ownerDocument.removeEventListener("pointermove",yd)})}}),{isPointerInTransit:rd,onPointerExit:pd.on}}function Ti$2(Ra,qa){const rd=Math.abs(qa.top-Ra.y),sd=Math.abs(qa.bottom-Ra.y),pd=Math.abs(qa.right-Ra.x),fd=Math.abs(qa.left-Ra.x);switch(Math.min(rd,sd,pd,fd)){case fd:return"left";case pd:return"right";case rd:return"top";case sd:return"bottom";default:throw new Error("unreachable")}}function Ri$1(Ra,qa,rd=5){const sd=[];switch(qa){case"top":sd.push({x:Ra.x-rd,y:Ra.y+rd},{x:Ra.x+rd,y:Ra.y+rd});break;case"bottom":sd.push({x:Ra.x-rd,y:Ra.y-rd},{x:Ra.x+rd,y:Ra.y-rd});break;case"left":sd.push({x:Ra.x+rd,y:Ra.y-rd},{x:Ra.x+rd,y:Ra.y+rd});break;case"right":sd.push({x:Ra.x-rd,y:Ra.y-rd},{x:Ra.x-rd,y:Ra.y+rd});break}return sd}function Ai$2(Ra){const{top:qa,right:rd,bottom:sd,left:pd}=Ra;return[{x:pd,y:qa},{x:rd,y:qa},{x:rd,y:sd},{x:pd,y:sd}]}function Oi$1(Ra,qa){const{x:rd,y:sd}=Ra;let pd=!1;for(let fd=0,hd=qa.length-1;fdsd!=vd>sd&&rd<(yd-md)*(sd-gd)/(vd-gd)+md&&(pd=!pd)}return pd}function ki$2(Ra){const qa=Ra.slice();return qa.sort((rd,sd)=>rd.xsd.x?1:rd.ysd.y?1:0),Mi$2(qa)}function Mi$2(Ra){if(Ra.length<=1)return Ra.slice();const qa=[];for(let sd=0;sd=2;){const fd=qa[qa.length-1],hd=qa[qa.length-2];if((fd.x-hd.x)*(pd.y-hd.y)>=(fd.y-hd.y)*(pd.x-hd.x))qa.pop();else break}qa.push(pd)}qa.pop();const rd=[];for(let sd=Ra.length-1;sd>=0;sd--){const pd=Ra[sd];for(;rd.length>=2;){const fd=rd[rd.length-1],hd=rd[rd.length-2];if((fd.x-hd.x)*(pd.y-hd.y)>=(fd.y-hd.y)*(pd.x-hd.x))rd.pop();else break}rd.push(pd)}return rd.pop(),qa.length===1&&rd.length===1&&qa[0].x===rd[0].x&&qa[0].y===rd[0].y?qa:qa.concat(rd)}var Vi$1=function(Ra){if(typeof document>"u")return null;var qa=Array.isArray(Ra)?Ra[0]:Ra;return qa.ownerDocument.body},zt$1=new WeakMap,Pa$2=new WeakMap,Da$1={},Cn$3=0,Ml$3=function(Ra){return Ra&&(Ra.host||Ml$3(Ra.parentNode))},Fi$2=function(Ra,qa){return qa.map(function(rd){if(Ra.contains(rd))return rd;var sd=Ml$3(rd);return sd&&Ra.contains(sd)?sd:(console.error("aria-hidden",rd,"in not contained inside",Ra,". Doing nothing"),null)}).filter(function(rd){return!!rd})},Ni$1=function(Ra,qa,rd,sd){var pd=Fi$2(qa,Array.isArray(Ra)?Ra:[Ra]);Da$1[rd]||(Da$1[rd]=new WeakMap);var fd=Da$1[rd],hd=[],md=new Set,gd=new Set(pd),yd=function(Nd){!Nd||md.has(Nd)||(md.add(Nd),yd(Nd.parentNode))};pd.forEach(yd);var vd=function(Nd){!Nd||gd.has(Nd)||Array.prototype.forEach.call(Nd.children,function(Md){if(md.has(Md))vd(Md);else try{var Ld=Md.getAttribute(sd),Fd=Ld!==null&&Ld!=="false",Hd=(zt$1.get(Md)||0)+1,Vd=(fd.get(Md)||0)+1;zt$1.set(Md,Hd),fd.set(Md,Vd),hd.push(Md),Hd===1&&Fd&&Pa$2.set(Md,!0),Vd===1&&Md.setAttribute(rd,"true"),Fd||Md.setAttribute(sd,"true")}catch(Gd){console.error("aria-hidden: cannot operate on ",Md,Gd)}})};return vd(qa),md.clear(),Cn$3++,function(){hd.forEach(function(Nd){var Md=zt$1.get(Nd)-1,Ld=fd.get(Nd)-1;zt$1.set(Nd,Md),fd.set(Nd,Ld),Md||(Pa$2.has(Nd)||Nd.removeAttribute(sd),Pa$2.delete(Nd)),Ld||Nd.removeAttribute(rd)}),Cn$3--,Cn$3||(zt$1=new WeakMap,zt$1=new WeakMap,Pa$2=new WeakMap,Da$1={})}},Li$1=function(Ra,qa,rd){rd===void 0&&(rd="data-aria-hidden");var sd=Array.from(Array.isArray(Ra)?Ra:[Ra]),pd=Vi$1(Ra);return pd?(sd.push.apply(sd,Array.from(pd.querySelectorAll("[aria-live]"))),Ni$1(sd,pd,rd,"aria-hidden")):function(){return null}};function ya$1(Ra){let qa;watch(()=>$e$4(Ra),rd=>{rd?qa=Li$1(rd):qa&&qa()}),onUnmounted(()=>{qa&&qa()})}function he$4(Ra,qa="radix"){return Ra||(Ga$2({useId:void 0}),`${qa}-${useId()}`)}function Vl$3(Ra){const qa=ref$1(),rd=computed(()=>{var pd;return((pd=qa.value)==null?void 0:pd.width)??0}),sd=computed(()=>{var pd;return((pd=qa.value)==null?void 0:pd.height)??0});return onMounted(()=>{const pd=$e$4(Ra);if(pd){qa.value={width:pd.offsetWidth,height:pd.offsetHeight};const fd=new ResizeObserver(hd=>{if(!Array.isArray(hd)||!hd.length)return;const md=hd[0];let gd,yd;if("borderBoxSize"in md){const vd=md.borderBoxSize,Nd=Array.isArray(vd)?vd[0]:vd;gd=Nd.inlineSize,yd=Nd.blockSize}else gd=pd.offsetWidth,yd=pd.offsetHeight;qa.value={width:gd,height:yd}});return fd.observe(pd,{box:"border-box"}),()=>fd.unobserve(pd)}else qa.value=void 0}),{width:rd,height:sd}}function Fl$3(Ra,qa){const rd=ref$1(Ra);function sd(pd){return qa[rd.value][pd]??rd.value}return{state:rd,dispatch:pd=>{rd.value=sd(pd)}}}const Hi$1="data-item-text";function ga$2(Ra){const qa=It$3("",1e3);return{search:qa,handleTypeaheadSearch:(rd,sd)=>{if(!(Ra!=null&&Ra.value)&&!sd)return;qa.value=qa.value+rd;const pd=(Ra==null?void 0:Ra.value)??sd,fd=document.activeElement,hd=pd.map(Nd=>{var Md;return{ref:Nd,textValue:((Md=(Nd.querySelector(`[${Hi$1}]`)??Nd).textContent)==null?void 0:Md.trim())??""}}),md=hd.find(Nd=>Nd.ref===fd),gd=hd.map(Nd=>Nd.textValue),yd=Yn$3(gd,qa.value,md==null?void 0:md.textValue),vd=hd.find(Nd=>Nd.textValue===yd);return vd&&vd.ref.focus(),vd==null?void 0:vd.ref},resetTypeahead:()=>{qa.value=""}}}function qn$3(Ra,qa){return Ra.map((rd,sd)=>Ra[(qa+sd)%Ra.length])}function Yn$3(Ra,qa,rd){const sd=qa.length>1&&Array.from(qa).every(md=>md===qa[0])?qa[0]:qa,pd=rd?Ra.indexOf(rd):-1;let fd=qn$3(Ra,Math.max(pd,0));sd.length===1&&(fd=fd.filter(md=>md!==rd));const hd=fd.find(md=>md.toLowerCase().startsWith(sd.toLowerCase()));return hd!==rd?hd:void 0}const Xn$4=defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(Ra,{attrs:qa,slots:rd}){return()=>{var sd,pd;if(!rd.default)return null;const fd=Ua$3(rd.default()),hd=fd.findIndex(vd=>vd.type!==Comment$2);if(hd===-1)return fd;const md=fd[hd];(sd=md.props)==null||delete sd.ref;const gd=md.props?mergeProps(qa,md.props):qa;qa.class&&(pd=md.props)!=null&&pd.class&&delete md.props.class;const yd=cloneVNode(md,gd);for(const vd in gd)vd.startsWith("on")&&(yd.props||(yd.props={}),yd.props[vd]=gd[vd]);return fd.length===1?yd:(fd[hd]=yd,fd)}}}),O$4=defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(Ra,{attrs:qa,slots:rd}){const sd=Ra.asChild?"template":Ra.as;return typeof sd=="string"&&["area","img","input"].includes(sd)?()=>h$2(sd,qa):sd!=="template"?()=>h$2(Ra.as,qa,{default:rd.default}):()=>h$2(Xn$4,qa,{default:rd.default})}});function Ie$5(){const Ra=ref$1(),qa=computed(()=>{var rd,sd;return["#text","#comment"].includes((rd=Ra.value)==null?void 0:rd.$el.nodeName)?(sd=Ra.value)==null?void 0:sd.$el.nextElementSibling:$e$4(Ra)});return{primitiveElement:Ra,currentElement:qa}}function Gi$1(Ra,qa){var rd;const sd=ref$1({}),pd=ref$1("none"),fd=ref$1(Ra),hd=Ra.value?"mounted":"unmounted";let md;const gd=((rd=qa.value)==null?void 0:rd.ownerDocument.defaultView)??Tt$3,{state:yd,dispatch:vd}=Fl$3(hd,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),Nd=Vd=>{var Gd;if(Ye$4){const Ud=new CustomEvent(Vd,{bubbles:!1,cancelable:!1});(Gd=qa.value)==null||Gd.dispatchEvent(Ud)}};watch(Ra,async(Vd,Gd)=>{var Ud;const qd=Gd!==Vd;if(await nextTick$1(),qd){const Wd=pd.value,Kd=$a$2(qa.value);Vd?(vd("MOUNT"),Nd("enter"),Kd==="none"&&Nd("after-enter")):Kd==="none"||((Ud=sd.value)==null?void 0:Ud.display)==="none"?(vd("UNMOUNT"),Nd("leave"),Nd("after-leave")):Gd&&Wd!==Kd?(vd("ANIMATION_OUT"),Nd("leave")):(vd("UNMOUNT"),Nd("after-leave"))}},{immediate:!0});const Md=Vd=>{const Gd=$a$2(qa.value),Ud=Gd.includes(Vd.animationName),qd=yd.value==="mounted"?"enter":"leave";if(Vd.target===qa.value&&Ud&&(Nd(`after-${qd}`),vd("ANIMATION_END"),!fd.value)){const Wd=qa.value.style.animationFillMode;qa.value.style.animationFillMode="forwards",md=gd==null?void 0:gd.setTimeout(()=>{var Kd;((Kd=qa.value)==null?void 0:Kd.style.animationFillMode)==="forwards"&&(qa.value.style.animationFillMode=Wd)})}Vd.target===qa.value&&Gd==="none"&&vd("ANIMATION_END")},Ld=Vd=>{Vd.target===qa.value&&(pd.value=$a$2(qa.value))},Fd=watch(qa,(Vd,Gd)=>{Vd?(sd.value=getComputedStyle(Vd),Vd.addEventListener("animationstart",Ld),Vd.addEventListener("animationcancel",Md),Vd.addEventListener("animationend",Md)):(vd("ANIMATION_END"),gd==null||gd.clearTimeout(md),Gd==null||Gd.removeEventListener("animationstart",Ld),Gd==null||Gd.removeEventListener("animationcancel",Md),Gd==null||Gd.removeEventListener("animationend",Md))},{immediate:!0}),Hd=watch(yd,()=>{const Vd=$a$2(qa.value);pd.value=yd.value==="mounted"?Vd:"none"});return onUnmounted(()=>{Fd(),Hd()}),{isPresent:computed(()=>["mounted","unmountSuspended"].includes(yd.value))}}function $a$2(Ra){return Ra&&getComputedStyle(Ra).animationName||"none"}const Pe$6=defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(Ra,{slots:qa,expose:rd}){var sd;const{present:pd,forceMount:fd}=toRefs(Ra),hd=ref$1(),{isPresent:md}=Gi$1(pd,hd);rd({present:md});let gd=qa.default({present:md});gd=Ua$3(gd||[]);const yd=getCurrentInstance();if(gd&&(gd==null?void 0:gd.length)>1){const vd=(sd=yd==null?void 0:yd.parent)!=null&&sd.type.name?`<${yd.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${vd}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(Nd=>` - ${Nd}`).join(` +**/let policy;const tt$4=typeof window<"u"&&window.trustedTypes;if(tt$4)try{policy=tt$4.createPolicy("vue",{createHTML:Ra=>Ra})}catch{}const unsafeToTrustedHTML=policy?Ra=>policy.createHTML(Ra):Ra=>Ra,svgNS="http://www.w3.org/2000/svg",mathmlNS="http://www.w3.org/1998/Math/MathML",doc=typeof document<"u"?document:null,templateContainer=doc&&doc.createElement("template"),nodeOps={insert:(Ra,ed,ud)=>{ed.insertBefore(Ra,ud||null)},remove:Ra=>{const ed=Ra.parentNode;ed&&ed.removeChild(Ra)},createElement:(Ra,ed,ud,dd)=>{const hd=ed==="svg"?doc.createElementNS(svgNS,Ra):ed==="mathml"?doc.createElementNS(mathmlNS,Ra):ud?doc.createElement(Ra,{is:ud}):doc.createElement(Ra);return Ra==="select"&&dd&&dd.multiple!=null&&hd.setAttribute("multiple",dd.multiple),hd},createText:Ra=>doc.createTextNode(Ra),createComment:Ra=>doc.createComment(Ra),setText:(Ra,ed)=>{Ra.nodeValue=ed},setElementText:(Ra,ed)=>{Ra.textContent=ed},parentNode:Ra=>Ra.parentNode,nextSibling:Ra=>Ra.nextSibling,querySelector:Ra=>doc.querySelector(Ra),setScopeId(Ra,ed){Ra.setAttribute(ed,"")},insertStaticContent(Ra,ed,ud,dd,hd,md){const gd=ud?ud.previousSibling:ed.lastChild;if(hd&&(hd===md||hd.nextSibling))for(;ed.insertBefore(hd.cloneNode(!0),ud),!(hd===md||!(hd=hd.nextSibling)););else{templateContainer.innerHTML=unsafeToTrustedHTML(dd==="svg"?`${Ra}`:dd==="mathml"?`${Ra}`:Ra);const yd=templateContainer.content;if(dd==="svg"||dd==="mathml"){const vd=yd.firstChild;for(;vd.firstChild;)yd.appendChild(vd.firstChild);yd.removeChild(vd)}ed.insertBefore(yd,ud)}return[gd?gd.nextSibling:ed.firstChild,ud?ud.previousSibling:ed.lastChild]}},TRANSITION="transition",ANIMATION="animation",vtcKey=Symbol("_vtc"),DOMTransitionPropsValidators={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},TransitionPropsValidators=extend$4({},BaseTransitionPropsValidators,DOMTransitionPropsValidators),decorate$1=Ra=>(Ra.displayName="Transition",Ra.props=TransitionPropsValidators,Ra),Transition$1=decorate$1((Ra,{slots:ed})=>h$2(BaseTransition,resolveTransitionProps(Ra),ed)),callHook=(Ra,ed=[])=>{isArray$3(Ra)?Ra.forEach(ud=>ud(...ed)):Ra&&Ra(...ed)},hasExplicitCallback=Ra=>Ra?isArray$3(Ra)?Ra.some(ed=>ed.length>1):Ra.length>1:!1;function resolveTransitionProps(Ra){const ed={};for(const Af in Ra)Af in DOMTransitionPropsValidators||(ed[Af]=Ra[Af]);if(Ra.css===!1)return ed;const{name:ud="v",type:dd,duration:hd,enterFromClass:md=`${ud}-enter-from`,enterActiveClass:gd=`${ud}-enter-active`,enterToClass:yd=`${ud}-enter-to`,appearFromClass:vd=md,appearActiveClass:Cd=gd,appearToClass:wd=yd,leaveFromClass:Nd=`${ud}-leave-from`,leaveActiveClass:Ld=`${ud}-leave-active`,leaveToClass:Ud=`${ud}-leave-to`}=Ra,jd=normalizeDuration(hd),Gd=jd&&jd[0],Yd=jd&&jd[1],{onBeforeEnter:zd,onEnter:qd,onEnterCancelled:Wd,onLeave:Xd,onLeaveCancelled:Jd,onBeforeAppear:Zd=zd,onAppear:mf=qd,onAppearCancelled:xf=Wd}=ed,_f=(Af,Df,Of,Cf)=>{Af._enterCancelled=Cf,removeTransitionClass(Af,Df?wd:yd),removeTransitionClass(Af,Df?Cd:gd),Of&&Of()},vf=(Af,Df)=>{Af._isLeaving=!1,removeTransitionClass(Af,Nd),removeTransitionClass(Af,Ud),removeTransitionClass(Af,Ld),Df&&Df()},gf=Af=>(Df,Of)=>{const Cf=Af?mf:qd,If=()=>_f(Df,Af,Of);callHook(Cf,[Df,If]),nextFrame(()=>{removeTransitionClass(Df,Af?vd:md),addTransitionClass(Df,Af?wd:yd),hasExplicitCallback(Cf)||whenTransitionEnds(Df,dd,Gd,If)})};return extend$4(ed,{onBeforeEnter(Af){callHook(zd,[Af]),addTransitionClass(Af,md),addTransitionClass(Af,gd)},onBeforeAppear(Af){callHook(Zd,[Af]),addTransitionClass(Af,vd),addTransitionClass(Af,Cd)},onEnter:gf(!1),onAppear:gf(!0),onLeave(Af,Df){Af._isLeaving=!0;const Of=()=>vf(Af,Df);addTransitionClass(Af,Nd),Af._enterCancelled?(addTransitionClass(Af,Ld),forceReflow()):(forceReflow(),addTransitionClass(Af,Ld)),nextFrame(()=>{Af._isLeaving&&(removeTransitionClass(Af,Nd),addTransitionClass(Af,Ud),hasExplicitCallback(Xd)||whenTransitionEnds(Af,dd,Yd,Of))}),callHook(Xd,[Af,Of])},onEnterCancelled(Af){_f(Af,!1,void 0,!0),callHook(Wd,[Af])},onAppearCancelled(Af){_f(Af,!0,void 0,!0),callHook(xf,[Af])},onLeaveCancelled(Af){vf(Af),callHook(Jd,[Af])}})}function normalizeDuration(Ra){if(Ra==null)return null;if(isObject$9(Ra))return[NumberOf(Ra.enter),NumberOf(Ra.leave)];{const ed=NumberOf(Ra);return[ed,ed]}}function NumberOf(Ra){return toNumber$4(Ra)}function addTransitionClass(Ra,ed){ed.split(/\s+/).forEach(ud=>ud&&Ra.classList.add(ud)),(Ra[vtcKey]||(Ra[vtcKey]=new Set)).add(ed)}function removeTransitionClass(Ra,ed){ed.split(/\s+/).forEach(dd=>dd&&Ra.classList.remove(dd));const ud=Ra[vtcKey];ud&&(ud.delete(ed),ud.size||(Ra[vtcKey]=void 0))}function nextFrame(Ra){requestAnimationFrame(()=>{requestAnimationFrame(Ra)})}let endId=0;function whenTransitionEnds(Ra,ed,ud,dd){const hd=Ra._endId=++endId,md=()=>{hd===Ra._endId&&dd()};if(ud!=null)return setTimeout(md,ud);const{type:gd,timeout:yd,propCount:vd}=getTransitionInfo(Ra,ed);if(!gd)return dd();const Cd=gd+"end";let wd=0;const Nd=()=>{Ra.removeEventListener(Cd,Ld),md()},Ld=Ud=>{Ud.target===Ra&&++wd>=vd&&Nd()};setTimeout(()=>{wd(ud[jd]||"").split(", "),hd=dd(`${TRANSITION}Delay`),md=dd(`${TRANSITION}Duration`),gd=getTimeout(hd,md),yd=dd(`${ANIMATION}Delay`),vd=dd(`${ANIMATION}Duration`),Cd=getTimeout(yd,vd);let wd=null,Nd=0,Ld=0;ed===TRANSITION?gd>0&&(wd=TRANSITION,Nd=gd,Ld=md.length):ed===ANIMATION?Cd>0&&(wd=ANIMATION,Nd=Cd,Ld=vd.length):(Nd=Math.max(gd,Cd),wd=Nd>0?gd>Cd?TRANSITION:ANIMATION:null,Ld=wd?wd===TRANSITION?md.length:vd.length:0);const Ud=wd===TRANSITION&&/\b(transform|all)(,|$)/.test(dd(`${TRANSITION}Property`).toString());return{type:wd,timeout:Nd,propCount:Ld,hasTransform:Ud}}function getTimeout(Ra,ed){for(;Ra.lengthtoMs(ud)+toMs(Ra[dd])))}function toMs(Ra){return Ra==="auto"?0:Number(Ra.slice(0,-1).replace(",","."))*1e3}function forceReflow(){return document.body.offsetHeight}function patchClass(Ra,ed,ud){const dd=Ra[vtcKey];dd&&(ed=(ed?[ed,...dd]:[...dd]).join(" ")),ed==null?Ra.removeAttribute("class"):ud?Ra.setAttribute("class",ed):Ra.className=ed}const vShowOriginalDisplay=Symbol("_vod"),vShowHidden=Symbol("_vsh"),vShow={beforeMount(Ra,{value:ed},{transition:ud}){Ra[vShowOriginalDisplay]=Ra.style.display==="none"?"":Ra.style.display,ud&&ed?ud.beforeEnter(Ra):setDisplay(Ra,ed)},mounted(Ra,{value:ed},{transition:ud}){ud&&ed&&ud.enter(Ra)},updated(Ra,{value:ed,oldValue:ud},{transition:dd}){!ed!=!ud&&(dd?ed?(dd.beforeEnter(Ra),setDisplay(Ra,!0),dd.enter(Ra)):dd.leave(Ra,()=>{setDisplay(Ra,!1)}):setDisplay(Ra,ed))},beforeUnmount(Ra,{value:ed}){setDisplay(Ra,ed)}};function setDisplay(Ra,ed){Ra.style.display=ed?Ra[vShowOriginalDisplay]:"none",Ra[vShowHidden]=!ed}const CSS_VAR_TEXT=Symbol(""),displayRE=/(^|;)\s*display\s*:/;function patchStyle(Ra,ed,ud){const dd=Ra.style,hd=isString$2(ud);let md=!1;if(ud&&!hd){if(ed)if(isString$2(ed))for(const gd of ed.split(";")){const yd=gd.slice(0,gd.indexOf(":")).trim();ud[yd]==null&&setStyle(dd,yd,"")}else for(const gd in ed)ud[gd]==null&&setStyle(dd,gd,"");for(const gd in ud)gd==="display"&&(md=!0),setStyle(dd,gd,ud[gd])}else if(hd){if(ed!==ud){const gd=dd[CSS_VAR_TEXT];gd&&(ud+=";"+gd),dd.cssText=ud,md=displayRE.test(ud)}}else ed&&Ra.removeAttribute("style");vShowOriginalDisplay in Ra&&(Ra[vShowOriginalDisplay]=md?dd.display:"",Ra[vShowHidden]&&(dd.display="none"))}const importantRE=/\s*!important$/;function setStyle(Ra,ed,ud){if(isArray$3(ud))ud.forEach(dd=>setStyle(Ra,ed,dd));else if(ud==null&&(ud=""),ed.startsWith("--"))Ra.setProperty(ed,ud);else{const dd=autoPrefix(Ra,ed);importantRE.test(ud)?Ra.setProperty(hyphenate(dd),ud.replace(importantRE,""),"important"):Ra[dd]=ud}}const prefixes$1=["Webkit","Moz","ms"],prefixCache={};function autoPrefix(Ra,ed){const ud=prefixCache[ed];if(ud)return ud;let dd=camelize(ed);if(dd!=="filter"&&dd in Ra)return prefixCache[ed]=dd;dd=capitalize(dd);for(let hd=0;hdcachedNow||(p$2.then(()=>cachedNow=0),cachedNow=Date.now());function createInvoker(Ra,ed){const ud=dd=>{if(!dd._vts)dd._vts=Date.now();else if(dd._vts<=ud.attached)return;callWithAsyncErrorHandling(patchStopImmediatePropagation(dd,ud.value),ed,5,[dd])};return ud.value=Ra,ud.attached=getNow(),ud}function patchStopImmediatePropagation(Ra,ed){if(isArray$3(ed)){const ud=Ra.stopImmediatePropagation;return Ra.stopImmediatePropagation=()=>{ud.call(Ra),Ra._stopped=!0},ed.map(dd=>hd=>!hd._stopped&&dd&&dd(hd))}else return ed}const isNativeOn=Ra=>Ra.charCodeAt(0)===111&&Ra.charCodeAt(1)===110&&Ra.charCodeAt(2)>96&&Ra.charCodeAt(2)<123,patchProp=(Ra,ed,ud,dd,hd,md)=>{const gd=hd==="svg";ed==="class"?patchClass(Ra,dd,gd):ed==="style"?patchStyle(Ra,ud,dd):isOn(ed)?isModelListener(ed)||patchEvent(Ra,ed,ud,dd,md):(ed[0]==="."?(ed=ed.slice(1),!0):ed[0]==="^"?(ed=ed.slice(1),!1):shouldSetAsProp(Ra,ed,dd,gd))?(patchDOMProp(Ra,ed,dd),!Ra.tagName.includes("-")&&(ed==="value"||ed==="checked"||ed==="selected")&&patchAttr(Ra,ed,dd,gd,md,ed!=="value")):Ra._isVueCE&&(/[A-Z]/.test(ed)||!isString$2(dd))?patchDOMProp(Ra,camelize(ed),dd,md,ed):(ed==="true-value"?Ra._trueValue=dd:ed==="false-value"&&(Ra._falseValue=dd),patchAttr(Ra,ed,dd,gd))};function shouldSetAsProp(Ra,ed,ud,dd){if(dd)return!!(ed==="innerHTML"||ed==="textContent"||ed in Ra&&isNativeOn(ed)&&isFunction$4(ud));if(ed==="spellcheck"||ed==="draggable"||ed==="translate"||ed==="form"||ed==="list"&&Ra.tagName==="INPUT"||ed==="type"&&Ra.tagName==="TEXTAREA")return!1;if(ed==="width"||ed==="height"){const hd=Ra.tagName;if(hd==="IMG"||hd==="VIDEO"||hd==="CANVAS"||hd==="SOURCE")return!1}return isNativeOn(ed)&&isString$2(ud)?!1:ed in Ra}const getModelAssigner=Ra=>{const ed=Ra.props["onUpdate:modelValue"]||!1;return isArray$3(ed)?ud=>invokeArrayFns(ed,ud):ed};function onCompositionStart(Ra){Ra.target.composing=!0}function onCompositionEnd(Ra){const ed=Ra.target;ed.composing&&(ed.composing=!1,ed.dispatchEvent(new Event("input")))}const assignKey=Symbol("_assign"),vModelText={created(Ra,{modifiers:{lazy:ed,trim:ud,number:dd}},hd){Ra[assignKey]=getModelAssigner(hd);const md=dd||hd.props&&hd.props.type==="number";addEventListener(Ra,ed?"change":"input",gd=>{if(gd.target.composing)return;let yd=Ra.value;ud&&(yd=yd.trim()),md&&(yd=looseToNumber(yd)),Ra[assignKey](yd)}),ud&&addEventListener(Ra,"change",()=>{Ra.value=Ra.value.trim()}),ed||(addEventListener(Ra,"compositionstart",onCompositionStart),addEventListener(Ra,"compositionend",onCompositionEnd),addEventListener(Ra,"change",onCompositionEnd))},mounted(Ra,{value:ed}){Ra.value=ed??""},beforeUpdate(Ra,{value:ed,oldValue:ud,modifiers:{lazy:dd,trim:hd,number:md}},gd){if(Ra[assignKey]=getModelAssigner(gd),Ra.composing)return;const yd=(md||Ra.type==="number")&&!/^0\d/.test(Ra.value)?looseToNumber(Ra.value):Ra.value,vd=ed??"";yd!==vd&&(document.activeElement===Ra&&Ra.type!=="range"&&(dd&&ed===ud||hd&&Ra.value.trim()===vd)||(Ra.value=vd))}},vModelSelect={deep:!0,created(Ra,{value:ed,modifiers:{number:ud}},dd){const hd=isSet$1(ed);addEventListener(Ra,"change",()=>{const md=Array.prototype.filter.call(Ra.options,gd=>gd.selected).map(gd=>ud?looseToNumber(getValue$1(gd)):getValue$1(gd));Ra[assignKey](Ra.multiple?hd?new Set(md):md:md[0]),Ra._assigning=!0,nextTick$1(()=>{Ra._assigning=!1})}),Ra[assignKey]=getModelAssigner(dd)},mounted(Ra,{value:ed}){setSelected(Ra,ed)},beforeUpdate(Ra,ed,ud){Ra[assignKey]=getModelAssigner(ud)},updated(Ra,{value:ed}){Ra._assigning||setSelected(Ra,ed)}};function setSelected(Ra,ed){const ud=Ra.multiple,dd=isArray$3(ed);if(!(ud&&!dd&&!isSet$1(ed))){for(let hd=0,md=Ra.options.length;hdString(Cd)===String(yd)):gd.selected=looseIndexOf(ed,yd)>-1}else gd.selected=ed.has(yd);else if(looseEqual(getValue$1(gd),ed)){Ra.selectedIndex!==hd&&(Ra.selectedIndex=hd);return}}!ud&&Ra.selectedIndex!==-1&&(Ra.selectedIndex=-1)}}function getValue$1(Ra){return"_value"in Ra?Ra._value:Ra.value}const systemModifiers=["ctrl","shift","alt","meta"],modifierGuards={stop:Ra=>Ra.stopPropagation(),prevent:Ra=>Ra.preventDefault(),self:Ra=>Ra.target!==Ra.currentTarget,ctrl:Ra=>!Ra.ctrlKey,shift:Ra=>!Ra.shiftKey,alt:Ra=>!Ra.altKey,meta:Ra=>!Ra.metaKey,left:Ra=>"button"in Ra&&Ra.button!==0,middle:Ra=>"button"in Ra&&Ra.button!==1,right:Ra=>"button"in Ra&&Ra.button!==2,exact:(Ra,ed)=>systemModifiers.some(ud=>Ra[`${ud}Key`]&&!ed.includes(ud))},withModifiers=(Ra,ed)=>{const ud=Ra._withMods||(Ra._withMods={}),dd=ed.join(".");return ud[dd]||(ud[dd]=(hd,...md)=>{for(let gd=0;gd{const ud=Ra._withKeys||(Ra._withKeys={}),dd=ed.join(".");return ud[dd]||(ud[dd]=hd=>{if(!("key"in hd))return;const md=hyphenate(hd.key);if(ed.some(gd=>gd===md||keyNames[gd]===md))return Ra(hd)})},rendererOptions=extend$4({patchProp},nodeOps);let renderer$1;function ensureRenderer(){return renderer$1||(renderer$1=createRenderer$1(rendererOptions))}const createApp=(...Ra)=>{const ed=ensureRenderer().createApp(...Ra),{mount:ud}=ed;return ed.mount=dd=>{const hd=normalizeContainer(dd);if(!hd)return;const md=ed._component;!isFunction$4(md)&&!md.render&&!md.template&&(md.template=hd.innerHTML),hd.nodeType===1&&(hd.textContent="");const gd=ud(hd,!1,resolveRootNamespace(hd));return hd instanceof Element&&(hd.removeAttribute("v-cloak"),hd.setAttribute("data-v-app","")),gd},ed};function resolveRootNamespace(Ra){if(Ra instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&Ra instanceof MathMLElement)return"mathml"}function normalizeContainer(Ra){return isString$2(Ra)?document.querySelector(Ra):Ra}let activePinia;const setActivePinia=Ra=>activePinia=Ra,piniaSymbol=Symbol();function isPlainObject$5(Ra){return Ra&&typeof Ra=="object"&&Object.prototype.toString.call(Ra)==="[object Object]"&&typeof Ra.toJSON!="function"}var MutationType;(function(Ra){Ra.direct="direct",Ra.patchObject="patch object",Ra.patchFunction="patch function"})(MutationType||(MutationType={}));function createPinia(){const Ra=effectScope(!0),ed=Ra.run(()=>ref$1({}));let ud=[],dd=[];const hd=markRaw({install(md){setActivePinia(hd),hd._a=md,md.provide(piniaSymbol,hd),md.config.globalProperties.$pinia=hd,dd.forEach(gd=>ud.push(gd)),dd=[]},use(md){return this._a?ud.push(md):dd.push(md),this},_p:ud,_a:null,_e:Ra,_s:new Map,state:ed});return hd}const noop$6=()=>{};function addSubscription(Ra,ed,ud,dd=noop$6){Ra.push(ed);const hd=()=>{const md=Ra.indexOf(ed);md>-1&&(Ra.splice(md,1),dd())};return!ud&&getCurrentScope()&&onScopeDispose(hd),hd}function triggerSubscriptions(Ra,...ed){Ra.slice().forEach(ud=>{ud(...ed)})}const fallbackRunWithContext=Ra=>Ra(),ACTION_MARKER=Symbol(),ACTION_NAME=Symbol();function mergeReactiveObjects(Ra,ed){Ra instanceof Map&&ed instanceof Map?ed.forEach((ud,dd)=>Ra.set(dd,ud)):Ra instanceof Set&&ed instanceof Set&&ed.forEach(Ra.add,Ra);for(const ud in ed){if(!ed.hasOwnProperty(ud))continue;const dd=ed[ud],hd=Ra[ud];isPlainObject$5(hd)&&isPlainObject$5(dd)&&Ra.hasOwnProperty(ud)&&!isRef(dd)&&!isReactive(dd)?Ra[ud]=mergeReactiveObjects(hd,dd):Ra[ud]=dd}return Ra}const skipHydrateSymbol=Symbol();function shouldHydrate(Ra){return!isPlainObject$5(Ra)||!Ra.hasOwnProperty(skipHydrateSymbol)}const{assign}=Object;function isComputed(Ra){return!!(isRef(Ra)&&Ra.effect)}function createOptionsStore(Ra,ed,ud,dd){const{state:hd,actions:md,getters:gd}=ed,yd=ud.state.value[Ra];let vd;function Cd(){yd||(ud.state.value[Ra]=hd?hd():{});const wd=toRefs(ud.state.value[Ra]);return assign(wd,md,Object.keys(gd||{}).reduce((Nd,Ld)=>(Nd[Ld]=markRaw(computed(()=>{setActivePinia(ud);const Ud=ud._s.get(Ra);return gd[Ld].call(Ud,Ud)})),Nd),{}))}return vd=createSetupStore(Ra,Cd,ed,ud,dd,!0),vd}function createSetupStore(Ra,ed,ud={},dd,hd,md){let gd;const yd=assign({actions:{}},ud),vd={deep:!0};let Cd,wd,Nd=[],Ld=[],Ud;const jd=dd.state.value[Ra];!md&&!jd&&(dd.state.value[Ra]={}),ref$1({});let Gd;function Yd(xf){let _f;Cd=wd=!1,typeof xf=="function"?(xf(dd.state.value[Ra]),_f={type:MutationType.patchFunction,storeId:Ra,events:Ud}):(mergeReactiveObjects(dd.state.value[Ra],xf),_f={type:MutationType.patchObject,payload:xf,storeId:Ra,events:Ud});const vf=Gd=Symbol();nextTick$1().then(()=>{Gd===vf&&(Cd=!0)}),wd=!0,triggerSubscriptions(Nd,_f,dd.state.value[Ra])}const zd=md?function(){const{state:_f}=ud,vf=_f?_f():{};this.$patch(gf=>{assign(gf,vf)})}:noop$6;function qd(){gd.stop(),Nd=[],Ld=[],dd._s.delete(Ra)}const Wd=(xf,_f="")=>{if(ACTION_MARKER in xf)return xf[ACTION_NAME]=_f,xf;const vf=function(){setActivePinia(dd);const gf=Array.from(arguments),Af=[],Df=[];function Of(Ff){Af.push(Ff)}function Cf(Ff){Df.push(Ff)}triggerSubscriptions(Ld,{args:gf,name:vf[ACTION_NAME],store:Jd,after:Of,onError:Cf});let If;try{If=xf.apply(this&&this.$id===Ra?this:Jd,gf)}catch(Ff){throw triggerSubscriptions(Df,Ff),Ff}return If instanceof Promise?If.then(Ff=>(triggerSubscriptions(Af,Ff),Ff)).catch(Ff=>(triggerSubscriptions(Df,Ff),Promise.reject(Ff))):(triggerSubscriptions(Af,If),If)};return vf[ACTION_MARKER]=!0,vf[ACTION_NAME]=_f,vf},Xd={_p:dd,$id:Ra,$onAction:addSubscription.bind(null,Ld),$patch:Yd,$reset:zd,$subscribe(xf,_f={}){const vf=addSubscription(Nd,xf,_f.detached,()=>gf()),gf=gd.run(()=>watch(()=>dd.state.value[Ra],Af=>{(_f.flush==="sync"?wd:Cd)&&xf({storeId:Ra,type:MutationType.direct,events:Ud},Af)},assign({},vd,_f)));return vf},$dispose:qd},Jd=reactive(Xd);dd._s.set(Ra,Jd);const mf=(dd._a&&dd._a.runWithContext||fallbackRunWithContext)(()=>dd._e.run(()=>(gd=effectScope()).run(()=>ed({action:Wd}))));for(const xf in mf){const _f=mf[xf];if(isRef(_f)&&!isComputed(_f)||isReactive(_f))md||(jd&&shouldHydrate(_f)&&(isRef(_f)?_f.value=jd[xf]:mergeReactiveObjects(_f,jd[xf])),dd.state.value[Ra][xf]=_f);else if(typeof _f=="function"){const vf=Wd(_f,xf);mf[xf]=vf,yd.actions[xf]=_f}}return assign(Jd,mf),assign(toRaw(Jd),mf),Object.defineProperty(Jd,"$state",{get:()=>dd.state.value[Ra],set:xf=>{Yd(_f=>{assign(_f,xf)})}}),dd._p.forEach(xf=>{assign(Jd,gd.run(()=>xf({store:Jd,app:dd._a,pinia:dd,options:yd})))}),jd&&md&&ud.hydrate&&ud.hydrate(Jd.$state,jd),Cd=!0,wd=!0,Jd}/*! #__NO_SIDE_EFFECTS__ */function defineStore(Ra,ed,ud){let dd,hd;const md=typeof ed=="function";typeof Ra=="string"?(dd=Ra,hd=md?ud:ed):(hd=Ra,dd=Ra.id);function gd(yd,vd){const Cd=hasInjectionContext();return yd=yd||(Cd?inject(piniaSymbol,null):null),yd&&setActivePinia(yd),yd=activePinia,yd._s.has(dd)||(md?createSetupStore(dd,ed,hd,yd):createOptionsStore(dd,hd,yd)),yd._s.get(dd)}return gd.$id=dd,gd}function storeToRefs(Ra){{const ed=toRaw(Ra),ud={};for(const dd in ed){const hd=ed[dd];hd.effect?ud[dd]=computed({get:()=>Ra[dd],set(md){Ra[dd]=md}}):(isRef(hd)||isReactive(hd))&&(ud[dd]=toRef$1(Ra,dd))}return ud}}const sides=["top","right","bottom","left"],min$4=Math.min,max$5=Math.max,round$3=Math.round,floor$2=Math.floor,createCoords=Ra=>({x:Ra,y:Ra}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp(Ra,ed,ud){return max$5(Ra,min$4(ed,ud))}function evaluate$1(Ra,ed){return typeof Ra=="function"?Ra(ed):Ra}function getSide(Ra){return Ra.split("-")[0]}function getAlignment(Ra){return Ra.split("-")[1]}function getOppositeAxis(Ra){return Ra==="x"?"y":"x"}function getAxisLength(Ra){return Ra==="y"?"height":"width"}function getSideAxis(Ra){return["top","bottom"].includes(getSide(Ra))?"y":"x"}function getAlignmentAxis(Ra){return getOppositeAxis(getSideAxis(Ra))}function getAlignmentSides(Ra,ed,ud){ud===void 0&&(ud=!1);const dd=getAlignment(Ra),hd=getAlignmentAxis(Ra),md=getAxisLength(hd);let gd=hd==="x"?dd===(ud?"end":"start")?"right":"left":dd==="start"?"bottom":"top";return ed.reference[md]>ed.floating[md]&&(gd=getOppositePlacement$1(gd)),[gd,getOppositePlacement$1(gd)]}function getExpandedPlacements(Ra){const ed=getOppositePlacement$1(Ra);return[getOppositeAlignmentPlacement(Ra),ed,getOppositeAlignmentPlacement(ed)]}function getOppositeAlignmentPlacement(Ra){return Ra.replace(/start|end/g,ed=>oppositeAlignmentMap[ed])}function getSideList(Ra,ed,ud){const dd=["left","right"],hd=["right","left"],md=["top","bottom"],gd=["bottom","top"];switch(Ra){case"top":case"bottom":return ud?ed?hd:dd:ed?dd:hd;case"left":case"right":return ed?md:gd;default:return[]}}function getOppositeAxisPlacements(Ra,ed,ud,dd){const hd=getAlignment(Ra);let md=getSideList(getSide(Ra),ud==="start",dd);return hd&&(md=md.map(gd=>gd+"-"+hd),ed&&(md=md.concat(md.map(getOppositeAlignmentPlacement)))),md}function getOppositePlacement$1(Ra){return Ra.replace(/left|right|bottom|top/g,ed=>oppositeSideMap[ed])}function expandPaddingObject(Ra){return{top:0,right:0,bottom:0,left:0,...Ra}}function getPaddingObject(Ra){return typeof Ra!="number"?expandPaddingObject(Ra):{top:Ra,right:Ra,bottom:Ra,left:Ra}}function rectToClientRect$1(Ra){const{x:ed,y:ud,width:dd,height:hd}=Ra;return{width:dd,height:hd,top:ud,left:ed,right:ed+dd,bottom:ud+hd,x:ed,y:ud}}function computeCoordsFromPlacement(Ra,ed,ud){let{reference:dd,floating:hd}=Ra;const md=getSideAxis(ed),gd=getAlignmentAxis(ed),yd=getAxisLength(gd),vd=getSide(ed),Cd=md==="y",wd=dd.x+dd.width/2-hd.width/2,Nd=dd.y+dd.height/2-hd.height/2,Ld=dd[yd]/2-hd[yd]/2;let Ud;switch(vd){case"top":Ud={x:wd,y:dd.y-hd.height};break;case"bottom":Ud={x:wd,y:dd.y+dd.height};break;case"right":Ud={x:dd.x+dd.width,y:Nd};break;case"left":Ud={x:dd.x-hd.width,y:Nd};break;default:Ud={x:dd.x,y:dd.y}}switch(getAlignment(ed)){case"start":Ud[gd]-=Ld*(ud&&Cd?-1:1);break;case"end":Ud[gd]+=Ld*(ud&&Cd?-1:1);break}return Ud}const computePosition$1=async(Ra,ed,ud)=>{const{placement:dd="bottom",strategy:hd="absolute",middleware:md=[],platform:gd}=ud,yd=md.filter(Boolean),vd=await(gd.isRTL==null?void 0:gd.isRTL(ed));let Cd=await gd.getElementRects({reference:Ra,floating:ed,strategy:hd}),{x:wd,y:Nd}=computeCoordsFromPlacement(Cd,dd,vd),Ld=dd,Ud={},jd=0;for(let Gd=0;Gd({name:"arrow",options:Ra,async fn(ed){const{x:ud,y:dd,placement:hd,rects:md,platform:gd,elements:yd,middlewareData:vd}=ed,{element:Cd,padding:wd=0}=evaluate$1(Ra,ed)||{};if(Cd==null)return{};const Nd=getPaddingObject(wd),Ld={x:ud,y:dd},Ud=getAlignmentAxis(hd),jd=getAxisLength(Ud),Gd=await gd.getDimensions(Cd),Yd=Ud==="y",zd=Yd?"top":"left",qd=Yd?"bottom":"right",Wd=Yd?"clientHeight":"clientWidth",Xd=md.reference[jd]+md.reference[Ud]-Ld[Ud]-md.floating[jd],Jd=Ld[Ud]-md.reference[Ud],Zd=await(gd.getOffsetParent==null?void 0:gd.getOffsetParent(Cd));let mf=Zd?Zd[Wd]:0;(!mf||!await(gd.isElement==null?void 0:gd.isElement(Zd)))&&(mf=yd.floating[Wd]||md.floating[jd]);const xf=Xd/2-Jd/2,_f=mf/2-Gd[jd]/2-1,vf=min$4(Nd[zd],_f),gf=min$4(Nd[qd],_f),Af=vf,Df=mf-Gd[jd]-gf,Of=mf/2-Gd[jd]/2+xf,Cf=clamp(Af,Of,Df),If=!vd.arrow&&getAlignment(hd)!=null&&Of!==Cf&&md.reference[jd]/2-(OfOf<=0)){var gf,Af;const Of=(((gf=md.flip)==null?void 0:gf.index)||0)+1,Cf=mf[Of];if(Cf)return{data:{index:Of,overflows:vf},reset:{placement:Cf}};let If=(Af=vf.filter(Ff=>Ff.overflows[0]<=0).sort((Ff,sh)=>Ff.overflows[1]-sh.overflows[1])[0])==null?void 0:Af.placement;if(!If)switch(Ud){case"bestFit":{var Df;const Ff=(Df=vf.filter(sh=>{if(Zd){const Sh=getSideAxis(sh.placement);return Sh===qd||Sh==="y"}return!0}).map(sh=>[sh.placement,sh.overflows.filter(Sh=>Sh>0).reduce((Sh,yh)=>Sh+yh,0)]).sort((sh,Sh)=>sh[1]-Sh[1])[0])==null?void 0:Df[0];Ff&&(If=Ff);break}case"initialPlacement":If=yd;break}if(hd!==If)return{reset:{placement:If}}}return{}}}};function getSideOffsets$1(Ra,ed){return{top:Ra.top-ed.height,right:Ra.right-ed.width,bottom:Ra.bottom-ed.height,left:Ra.left-ed.width}}function isAnySideFullyClipped$1(Ra){return sides.some(ed=>Ra[ed]>=0)}const hide$3=function(Ra){return Ra===void 0&&(Ra={}),{name:"hide",options:Ra,async fn(ed){const{rects:ud}=ed,{strategy:dd="referenceHidden",...hd}=evaluate$1(Ra,ed);switch(dd){case"referenceHidden":{const md=await detectOverflow$1(ed,{...hd,elementContext:"reference"}),gd=getSideOffsets$1(md,ud.reference);return{data:{referenceHiddenOffsets:gd,referenceHidden:isAnySideFullyClipped$1(gd)}}}case"escaped":{const md=await detectOverflow$1(ed,{...hd,altBoundary:!0}),gd=getSideOffsets$1(md,ud.floating);return{data:{escapedOffsets:gd,escaped:isAnySideFullyClipped$1(gd)}}}default:return{}}}}};async function convertValueToCoords(Ra,ed){const{placement:ud,platform:dd,elements:hd}=Ra,md=await(dd.isRTL==null?void 0:dd.isRTL(hd.floating)),gd=getSide(ud),yd=getAlignment(ud),vd=getSideAxis(ud)==="y",Cd=["left","top"].includes(gd)?-1:1,wd=md&&vd?-1:1,Nd=evaluate$1(ed,Ra);let{mainAxis:Ld,crossAxis:Ud,alignmentAxis:jd}=typeof Nd=="number"?{mainAxis:Nd,crossAxis:0,alignmentAxis:null}:{mainAxis:Nd.mainAxis||0,crossAxis:Nd.crossAxis||0,alignmentAxis:Nd.alignmentAxis};return yd&&typeof jd=="number"&&(Ud=yd==="end"?jd*-1:jd),vd?{x:Ud*wd,y:Ld*Cd}:{x:Ld*Cd,y:Ud*wd}}const offset$3=function(Ra){return Ra===void 0&&(Ra=0),{name:"offset",options:Ra,async fn(ed){var ud,dd;const{x:hd,y:md,placement:gd,middlewareData:yd}=ed,vd=await convertValueToCoords(ed,Ra);return gd===((ud=yd.offset)==null?void 0:ud.placement)&&(dd=yd.arrow)!=null&&dd.alignmentOffset?{}:{x:hd+vd.x,y:md+vd.y,data:{...vd,placement:gd}}}}},shift$1=function(Ra){return Ra===void 0&&(Ra={}),{name:"shift",options:Ra,async fn(ed){const{x:ud,y:dd,placement:hd}=ed,{mainAxis:md=!0,crossAxis:gd=!1,limiter:yd={fn:Yd=>{let{x:zd,y:qd}=Yd;return{x:zd,y:qd}}},...vd}=evaluate$1(Ra,ed),Cd={x:ud,y:dd},wd=await detectOverflow$1(ed,vd),Nd=getSideAxis(getSide(hd)),Ld=getOppositeAxis(Nd);let Ud=Cd[Ld],jd=Cd[Nd];if(md){const Yd=Ld==="y"?"top":"left",zd=Ld==="y"?"bottom":"right",qd=Ud+wd[Yd],Wd=Ud-wd[zd];Ud=clamp(qd,Ud,Wd)}if(gd){const Yd=Nd==="y"?"top":"left",zd=Nd==="y"?"bottom":"right",qd=jd+wd[Yd],Wd=jd-wd[zd];jd=clamp(qd,jd,Wd)}const Gd=yd.fn({...ed,[Ld]:Ud,[Nd]:jd});return{...Gd,data:{x:Gd.x-ud,y:Gd.y-dd,enabled:{[Ld]:md,[Nd]:gd}}}}}},limitShift$1=function(Ra){return Ra===void 0&&(Ra={}),{options:Ra,fn(ed){const{x:ud,y:dd,placement:hd,rects:md,middlewareData:gd}=ed,{offset:yd=0,mainAxis:vd=!0,crossAxis:Cd=!0}=evaluate$1(Ra,ed),wd={x:ud,y:dd},Nd=getSideAxis(hd),Ld=getOppositeAxis(Nd);let Ud=wd[Ld],jd=wd[Nd];const Gd=evaluate$1(yd,ed),Yd=typeof Gd=="number"?{mainAxis:Gd,crossAxis:0}:{mainAxis:0,crossAxis:0,...Gd};if(vd){const Wd=Ld==="y"?"height":"width",Xd=md.reference[Ld]-md.floating[Wd]+Yd.mainAxis,Jd=md.reference[Ld]+md.reference[Wd]-Yd.mainAxis;UdJd&&(Ud=Jd)}if(Cd){var zd,qd;const Wd=Ld==="y"?"width":"height",Xd=["top","left"].includes(getSide(hd)),Jd=md.reference[Nd]-md.floating[Wd]+(Xd&&((zd=gd.offset)==null?void 0:zd[Nd])||0)+(Xd?0:Yd.crossAxis),Zd=md.reference[Nd]+md.reference[Wd]+(Xd?0:((qd=gd.offset)==null?void 0:qd[Nd])||0)-(Xd?Yd.crossAxis:0);jdZd&&(jd=Zd)}return{[Ld]:Ud,[Nd]:jd}}}},size$1=function(Ra){return Ra===void 0&&(Ra={}),{name:"size",options:Ra,async fn(ed){var ud,dd;const{placement:hd,rects:md,platform:gd,elements:yd}=ed,{apply:vd=()=>{},...Cd}=evaluate$1(Ra,ed),wd=await detectOverflow$1(ed,Cd),Nd=getSide(hd),Ld=getAlignment(hd),Ud=getSideAxis(hd)==="y",{width:jd,height:Gd}=md.floating;let Yd,zd;Nd==="top"||Nd==="bottom"?(Yd=Nd,zd=Ld===(await(gd.isRTL==null?void 0:gd.isRTL(yd.floating))?"start":"end")?"left":"right"):(zd=Nd,Yd=Ld==="end"?"top":"bottom");const qd=Gd-wd.top-wd.bottom,Wd=jd-wd.left-wd.right,Xd=min$4(Gd-wd[Yd],qd),Jd=min$4(jd-wd[zd],Wd),Zd=!ed.middlewareData.shift;let mf=Xd,xf=Jd;if((ud=ed.middlewareData.shift)!=null&&ud.enabled.x&&(xf=Wd),(dd=ed.middlewareData.shift)!=null&&dd.enabled.y&&(mf=qd),Zd&&!Ld){const vf=max$5(wd.left,0),gf=max$5(wd.right,0),Af=max$5(wd.top,0),Df=max$5(wd.bottom,0);Ud?xf=jd-2*(vf!==0||gf!==0?vf+gf:max$5(wd.left,wd.right)):mf=Gd-2*(Af!==0||Df!==0?Af+Df:max$5(wd.top,wd.bottom))}await vd({...ed,availableWidth:xf,availableHeight:mf});const _f=await gd.getDimensions(yd.floating);return jd!==_f.width||Gd!==_f.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName$1(Ra){return isNode$2(Ra)?(Ra.nodeName||"").toLowerCase():"#document"}function getWindow$1(Ra){var ed;return(Ra==null||(ed=Ra.ownerDocument)==null?void 0:ed.defaultView)||window}function getDocumentElement$1(Ra){var ed;return(ed=(isNode$2(Ra)?Ra.ownerDocument:Ra.document)||window.document)==null?void 0:ed.documentElement}function isNode$2(Ra){return hasWindow()?Ra instanceof Node||Ra instanceof getWindow$1(Ra).Node:!1}function isElement$2(Ra){return hasWindow()?Ra instanceof Element||Ra instanceof getWindow$1(Ra).Element:!1}function isHTMLElement$1(Ra){return hasWindow()?Ra instanceof HTMLElement||Ra instanceof getWindow$1(Ra).HTMLElement:!1}function isShadowRoot$1(Ra){return!hasWindow()||typeof ShadowRoot>"u"?!1:Ra instanceof ShadowRoot||Ra instanceof getWindow$1(Ra).ShadowRoot}function isOverflowElement(Ra){const{overflow:ed,overflowX:ud,overflowY:dd,display:hd}=getComputedStyle$2(Ra);return/auto|scroll|overlay|hidden|clip/.test(ed+dd+ud)&&!["inline","contents"].includes(hd)}function isTableElement$1(Ra){return["table","td","th"].includes(getNodeName$1(Ra))}function isTopLayer(Ra){return[":popover-open",":modal"].some(ed=>{try{return Ra.matches(ed)}catch{return!1}})}function isContainingBlock(Ra){const ed=isWebKit(),ud=isElement$2(Ra)?getComputedStyle$2(Ra):Ra;return["transform","translate","scale","rotate","perspective"].some(dd=>ud[dd]?ud[dd]!=="none":!1)||(ud.containerType?ud.containerType!=="normal":!1)||!ed&&(ud.backdropFilter?ud.backdropFilter!=="none":!1)||!ed&&(ud.filter?ud.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(dd=>(ud.willChange||"").includes(dd))||["paint","layout","strict","content"].some(dd=>(ud.contain||"").includes(dd))}function getContainingBlock$1(Ra){let ed=getParentNode$1(Ra);for(;isHTMLElement$1(ed)&&!isLastTraversableNode(ed);){if(isContainingBlock(ed))return ed;if(isTopLayer(ed))return null;ed=getParentNode$1(ed)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function isLastTraversableNode(Ra){return["html","body","#document"].includes(getNodeName$1(Ra))}function getComputedStyle$2(Ra){return getWindow$1(Ra).getComputedStyle(Ra)}function getNodeScroll$1(Ra){return isElement$2(Ra)?{scrollLeft:Ra.scrollLeft,scrollTop:Ra.scrollTop}:{scrollLeft:Ra.scrollX,scrollTop:Ra.scrollY}}function getParentNode$1(Ra){if(getNodeName$1(Ra)==="html")return Ra;const ed=Ra.assignedSlot||Ra.parentNode||isShadowRoot$1(Ra)&&Ra.host||getDocumentElement$1(Ra);return isShadowRoot$1(ed)?ed.host:ed}function getNearestOverflowAncestor(Ra){const ed=getParentNode$1(Ra);return isLastTraversableNode(ed)?Ra.ownerDocument?Ra.ownerDocument.body:Ra.body:isHTMLElement$1(ed)&&isOverflowElement(ed)?ed:getNearestOverflowAncestor(ed)}function getOverflowAncestors(Ra,ed,ud){var dd;ed===void 0&&(ed=[]),ud===void 0&&(ud=!0);const hd=getNearestOverflowAncestor(Ra),md=hd===((dd=Ra.ownerDocument)==null?void 0:dd.body),gd=getWindow$1(hd);if(md){const yd=getFrameElement(gd);return ed.concat(gd,gd.visualViewport||[],isOverflowElement(hd)?hd:[],yd&&ud?getOverflowAncestors(yd):[])}return ed.concat(hd,getOverflowAncestors(hd,[],ud))}function getFrameElement(Ra){return Ra.parent&&Object.getPrototypeOf(Ra.parent)?Ra.frameElement:null}function getCssDimensions(Ra){const ed=getComputedStyle$2(Ra);let ud=parseFloat(ed.width)||0,dd=parseFloat(ed.height)||0;const hd=isHTMLElement$1(Ra),md=hd?Ra.offsetWidth:ud,gd=hd?Ra.offsetHeight:dd,yd=round$3(ud)!==md||round$3(dd)!==gd;return yd&&(ud=md,dd=gd),{width:ud,height:dd,$:yd}}function unwrapElement$1(Ra){return isElement$2(Ra)?Ra:Ra.contextElement}function getScale(Ra){const ed=unwrapElement$1(Ra);if(!isHTMLElement$1(ed))return createCoords(1);const ud=ed.getBoundingClientRect(),{width:dd,height:hd,$:md}=getCssDimensions(ed);let gd=(md?round$3(ud.width):ud.width)/dd,yd=(md?round$3(ud.height):ud.height)/hd;return(!gd||!Number.isFinite(gd))&&(gd=1),(!yd||!Number.isFinite(yd))&&(yd=1),{x:gd,y:yd}}const noOffsets=createCoords(0);function getVisualOffsets(Ra){const ed=getWindow$1(Ra);return!isWebKit()||!ed.visualViewport?noOffsets:{x:ed.visualViewport.offsetLeft,y:ed.visualViewport.offsetTop}}function shouldAddVisualOffsets(Ra,ed,ud){return ed===void 0&&(ed=!1),!ud||ed&&ud!==getWindow$1(Ra)?!1:ed}function getBoundingClientRect$1(Ra,ed,ud,dd){ed===void 0&&(ed=!1),ud===void 0&&(ud=!1);const hd=Ra.getBoundingClientRect(),md=unwrapElement$1(Ra);let gd=createCoords(1);ed&&(dd?isElement$2(dd)&&(gd=getScale(dd)):gd=getScale(Ra));const yd=shouldAddVisualOffsets(md,ud,dd)?getVisualOffsets(md):createCoords(0);let vd=(hd.left+yd.x)/gd.x,Cd=(hd.top+yd.y)/gd.y,wd=hd.width/gd.x,Nd=hd.height/gd.y;if(md){const Ld=getWindow$1(md),Ud=dd&&isElement$2(dd)?getWindow$1(dd):dd;let jd=Ld,Gd=getFrameElement(jd);for(;Gd&&dd&&Ud!==jd;){const Yd=getScale(Gd),zd=Gd.getBoundingClientRect(),qd=getComputedStyle$2(Gd),Wd=zd.left+(Gd.clientLeft+parseFloat(qd.paddingLeft))*Yd.x,Xd=zd.top+(Gd.clientTop+parseFloat(qd.paddingTop))*Yd.y;vd*=Yd.x,Cd*=Yd.y,wd*=Yd.x,Nd*=Yd.y,vd+=Wd,Cd+=Xd,jd=getWindow$1(Gd),Gd=getFrameElement(jd)}}return rectToClientRect$1({width:wd,height:Nd,x:vd,y:Cd})}function getWindowScrollBarX$1(Ra,ed){const ud=getNodeScroll$1(Ra).scrollLeft;return ed?ed.left+ud:getBoundingClientRect$1(getDocumentElement$1(Ra)).left+ud}function getHTMLOffset(Ra,ed,ud){ud===void 0&&(ud=!1);const dd=Ra.getBoundingClientRect(),hd=dd.left+ed.scrollLeft-(ud?0:getWindowScrollBarX$1(Ra,dd)),md=dd.top+ed.scrollTop;return{x:hd,y:md}}function convertOffsetParentRelativeRectToViewportRelativeRect(Ra){let{elements:ed,rect:ud,offsetParent:dd,strategy:hd}=Ra;const md=hd==="fixed",gd=getDocumentElement$1(dd),yd=ed?isTopLayer(ed.floating):!1;if(dd===gd||yd&&md)return ud;let vd={scrollLeft:0,scrollTop:0},Cd=createCoords(1);const wd=createCoords(0),Nd=isHTMLElement$1(dd);if((Nd||!Nd&&!md)&&((getNodeName$1(dd)!=="body"||isOverflowElement(gd))&&(vd=getNodeScroll$1(dd)),isHTMLElement$1(dd))){const Ud=getBoundingClientRect$1(dd);Cd=getScale(dd),wd.x=Ud.x+dd.clientLeft,wd.y=Ud.y+dd.clientTop}const Ld=gd&&!Nd&&!md?getHTMLOffset(gd,vd,!0):createCoords(0);return{width:ud.width*Cd.x,height:ud.height*Cd.y,x:ud.x*Cd.x-vd.scrollLeft*Cd.x+wd.x+Ld.x,y:ud.y*Cd.y-vd.scrollTop*Cd.y+wd.y+Ld.y}}function getClientRects(Ra){return Array.from(Ra.getClientRects())}function getDocumentRect$1(Ra){const ed=getDocumentElement$1(Ra),ud=getNodeScroll$1(Ra),dd=Ra.ownerDocument.body,hd=max$5(ed.scrollWidth,ed.clientWidth,dd.scrollWidth,dd.clientWidth),md=max$5(ed.scrollHeight,ed.clientHeight,dd.scrollHeight,dd.clientHeight);let gd=-ud.scrollLeft+getWindowScrollBarX$1(Ra);const yd=-ud.scrollTop;return getComputedStyle$2(dd).direction==="rtl"&&(gd+=max$5(ed.clientWidth,dd.clientWidth)-hd),{width:hd,height:md,x:gd,y:yd}}function getViewportRect$1(Ra,ed){const ud=getWindow$1(Ra),dd=getDocumentElement$1(Ra),hd=ud.visualViewport;let md=dd.clientWidth,gd=dd.clientHeight,yd=0,vd=0;if(hd){md=hd.width,gd=hd.height;const Cd=isWebKit();(!Cd||Cd&&ed==="fixed")&&(yd=hd.offsetLeft,vd=hd.offsetTop)}return{width:md,height:gd,x:yd,y:vd}}function getInnerBoundingClientRect$1(Ra,ed){const ud=getBoundingClientRect$1(Ra,!0,ed==="fixed"),dd=ud.top+Ra.clientTop,hd=ud.left+Ra.clientLeft,md=isHTMLElement$1(Ra)?getScale(Ra):createCoords(1),gd=Ra.clientWidth*md.x,yd=Ra.clientHeight*md.y,vd=hd*md.x,Cd=dd*md.y;return{width:gd,height:yd,x:vd,y:Cd}}function getClientRectFromClippingAncestor(Ra,ed,ud){let dd;if(ed==="viewport")dd=getViewportRect$1(Ra,ud);else if(ed==="document")dd=getDocumentRect$1(getDocumentElement$1(Ra));else if(isElement$2(ed))dd=getInnerBoundingClientRect$1(ed,ud);else{const hd=getVisualOffsets(Ra);dd={x:ed.x-hd.x,y:ed.y-hd.y,width:ed.width,height:ed.height}}return rectToClientRect$1(dd)}function hasFixedPositionAncestor(Ra,ed){const ud=getParentNode$1(Ra);return ud===ed||!isElement$2(ud)||isLastTraversableNode(ud)?!1:getComputedStyle$2(ud).position==="fixed"||hasFixedPositionAncestor(ud,ed)}function getClippingElementAncestors(Ra,ed){const ud=ed.get(Ra);if(ud)return ud;let dd=getOverflowAncestors(Ra,[],!1).filter(yd=>isElement$2(yd)&&getNodeName$1(yd)!=="body"),hd=null;const md=getComputedStyle$2(Ra).position==="fixed";let gd=md?getParentNode$1(Ra):Ra;for(;isElement$2(gd)&&!isLastTraversableNode(gd);){const yd=getComputedStyle$2(gd),vd=isContainingBlock(gd);!vd&&yd.position==="fixed"&&(hd=null),(md?!vd&&!hd:!vd&&yd.position==="static"&&!!hd&&["absolute","fixed"].includes(hd.position)||isOverflowElement(gd)&&!vd&&hasFixedPositionAncestor(Ra,gd))?dd=dd.filter(wd=>wd!==gd):hd=yd,gd=getParentNode$1(gd)}return ed.set(Ra,dd),dd}function getClippingRect$1(Ra){let{element:ed,boundary:ud,rootBoundary:dd,strategy:hd}=Ra;const gd=[...ud==="clippingAncestors"?isTopLayer(ed)?[]:getClippingElementAncestors(ed,this._c):[].concat(ud),dd],yd=gd[0],vd=gd.reduce((Cd,wd)=>{const Nd=getClientRectFromClippingAncestor(ed,wd,hd);return Cd.top=max$5(Nd.top,Cd.top),Cd.right=min$4(Nd.right,Cd.right),Cd.bottom=min$4(Nd.bottom,Cd.bottom),Cd.left=max$5(Nd.left,Cd.left),Cd},getClientRectFromClippingAncestor(ed,yd,hd));return{width:vd.right-vd.left,height:vd.bottom-vd.top,x:vd.left,y:vd.top}}function getDimensions(Ra){const{width:ed,height:ud}=getCssDimensions(Ra);return{width:ed,height:ud}}function getRectRelativeToOffsetParent(Ra,ed,ud){const dd=isHTMLElement$1(ed),hd=getDocumentElement$1(ed),md=ud==="fixed",gd=getBoundingClientRect$1(Ra,!0,md,ed);let yd={scrollLeft:0,scrollTop:0};const vd=createCoords(0);if(dd||!dd&&!md)if((getNodeName$1(ed)!=="body"||isOverflowElement(hd))&&(yd=getNodeScroll$1(ed)),dd){const Ld=getBoundingClientRect$1(ed,!0,md,ed);vd.x=Ld.x+ed.clientLeft,vd.y=Ld.y+ed.clientTop}else hd&&(vd.x=getWindowScrollBarX$1(hd));const Cd=hd&&!dd&&!md?getHTMLOffset(hd,yd):createCoords(0),wd=gd.left+yd.scrollLeft-vd.x-Cd.x,Nd=gd.top+yd.scrollTop-vd.y-Cd.y;return{x:wd,y:Nd,width:gd.width,height:gd.height}}function isStaticPositioned(Ra){return getComputedStyle$2(Ra).position==="static"}function getTrueOffsetParent$1(Ra,ed){if(!isHTMLElement$1(Ra)||getComputedStyle$2(Ra).position==="fixed")return null;if(ed)return ed(Ra);let ud=Ra.offsetParent;return getDocumentElement$1(Ra)===ud&&(ud=ud.ownerDocument.body),ud}function getOffsetParent$1(Ra,ed){const ud=getWindow$1(Ra);if(isTopLayer(Ra))return ud;if(!isHTMLElement$1(Ra)){let hd=getParentNode$1(Ra);for(;hd&&!isLastTraversableNode(hd);){if(isElement$2(hd)&&!isStaticPositioned(hd))return hd;hd=getParentNode$1(hd)}return ud}let dd=getTrueOffsetParent$1(Ra,ed);for(;dd&&isTableElement$1(dd)&&isStaticPositioned(dd);)dd=getTrueOffsetParent$1(dd,ed);return dd&&isLastTraversableNode(dd)&&isStaticPositioned(dd)&&!isContainingBlock(dd)?ud:dd||getContainingBlock$1(Ra)||ud}const getElementRects=async function(Ra){const ed=this.getOffsetParent||getOffsetParent$1,ud=this.getDimensions,dd=await ud(Ra.floating);return{reference:getRectRelativeToOffsetParent(Ra.reference,await ed(Ra.floating),Ra.strategy),floating:{x:0,y:0,width:dd.width,height:dd.height}}};function isRTL(Ra){return getComputedStyle$2(Ra).direction==="rtl"}const platform$3={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$2,isRTL};function rectsAreEqual(Ra,ed){return Ra.x===ed.x&&Ra.y===ed.y&&Ra.width===ed.width&&Ra.height===ed.height}function observeMove(Ra,ed){let ud=null,dd;const hd=getDocumentElement$1(Ra);function md(){var yd;clearTimeout(dd),(yd=ud)==null||yd.disconnect(),ud=null}function gd(yd,vd){yd===void 0&&(yd=!1),vd===void 0&&(vd=1),md();const Cd=Ra.getBoundingClientRect(),{left:wd,top:Nd,width:Ld,height:Ud}=Cd;if(yd||ed(),!Ld||!Ud)return;const jd=floor$2(Nd),Gd=floor$2(hd.clientWidth-(wd+Ld)),Yd=floor$2(hd.clientHeight-(Nd+Ud)),zd=floor$2(wd),Wd={rootMargin:-jd+"px "+-Gd+"px "+-Yd+"px "+-zd+"px",threshold:max$5(0,min$4(1,vd))||1};let Xd=!0;function Jd(Zd){const mf=Zd[0].intersectionRatio;if(mf!==vd){if(!Xd)return gd();mf?gd(!1,mf):dd=setTimeout(()=>{gd(!1,1e-7)},1e3)}mf===1&&!rectsAreEqual(Cd,Ra.getBoundingClientRect())&&gd(),Xd=!1}try{ud=new IntersectionObserver(Jd,{...Wd,root:hd.ownerDocument})}catch{ud=new IntersectionObserver(Jd,Wd)}ud.observe(Ra)}return gd(!0),md}function autoUpdate(Ra,ed,ud,dd){dd===void 0&&(dd={});const{ancestorScroll:hd=!0,ancestorResize:md=!0,elementResize:gd=typeof ResizeObserver=="function",layoutShift:yd=typeof IntersectionObserver=="function",animationFrame:vd=!1}=dd,Cd=unwrapElement$1(Ra),wd=hd||md?[...Cd?getOverflowAncestors(Cd):[],...getOverflowAncestors(ed)]:[];wd.forEach(zd=>{hd&&zd.addEventListener("scroll",ud,{passive:!0}),md&&zd.addEventListener("resize",ud)});const Nd=Cd&&yd?observeMove(Cd,ud):null;let Ld=-1,Ud=null;gd&&(Ud=new ResizeObserver(zd=>{let[qd]=zd;qd&&qd.target===Cd&&Ud&&(Ud.unobserve(ed),cancelAnimationFrame(Ld),Ld=requestAnimationFrame(()=>{var Wd;(Wd=Ud)==null||Wd.observe(ed)})),ud()}),Cd&&!vd&&Ud.observe(Cd),Ud.observe(ed));let jd,Gd=vd?getBoundingClientRect$1(Ra):null;vd&&Yd();function Yd(){const zd=getBoundingClientRect$1(Ra);Gd&&!rectsAreEqual(Gd,zd)&&ud(),Gd=zd,jd=requestAnimationFrame(Yd)}return ud(),()=>{var zd;wd.forEach(qd=>{hd&&qd.removeEventListener("scroll",ud),md&&qd.removeEventListener("resize",ud)}),Nd==null||Nd(),(zd=Ud)==null||zd.disconnect(),Ud=null,vd&&cancelAnimationFrame(jd)}}const offset$2=offset$3,shift=shift$1,flip$2=flip$3,size=size$1,hide$2=hide$3,arrow$3=arrow$4,limitShift=limitShift$1,computePosition=(Ra,ed,ud)=>{const dd=new Map,hd={platform:platform$3,...ud},md={...hd.platform,_c:dd};return computePosition$1(Ra,ed,{...hd,platform:md})};function isComponentPublicInstance(Ra){return Ra!=null&&typeof Ra=="object"&&"$el"in Ra}function unwrapElement(Ra){if(isComponentPublicInstance(Ra)){const ed=Ra.$el;return isNode$2(ed)&&getNodeName$1(ed)==="#comment"?null:ed}return Ra}function toValue$1(Ra){return typeof Ra=="function"?Ra():unref(Ra)}function arrow$2(Ra){return{name:"arrow",options:Ra,fn(ed){const ud=unwrapElement(toValue$1(Ra.element));return ud==null?{}:arrow$3({element:ud,padding:Ra.padding}).fn(ed)}}}function getDPR(Ra){return typeof window>"u"?1:(Ra.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(Ra,ed){const ud=getDPR(Ra);return Math.round(ed*ud)/ud}function useFloating(Ra,ed,ud){ud===void 0&&(ud={});const dd=ud.whileElementsMounted,hd=computed(()=>{var mf;return(mf=toValue$1(ud.open))!=null?mf:!0}),md=computed(()=>toValue$1(ud.middleware)),gd=computed(()=>{var mf;return(mf=toValue$1(ud.placement))!=null?mf:"bottom"}),yd=computed(()=>{var mf;return(mf=toValue$1(ud.strategy))!=null?mf:"absolute"}),vd=computed(()=>{var mf;return(mf=toValue$1(ud.transform))!=null?mf:!0}),Cd=computed(()=>unwrapElement(Ra.value)),wd=computed(()=>unwrapElement(ed.value)),Nd=ref$1(0),Ld=ref$1(0),Ud=ref$1(yd.value),jd=ref$1(gd.value),Gd=shallowRef({}),Yd=ref$1(!1),zd=computed(()=>{const mf={position:Ud.value,left:"0",top:"0"};if(!wd.value)return mf;const xf=roundByDPR(wd.value,Nd.value),_f=roundByDPR(wd.value,Ld.value);return vd.value?{...mf,transform:"translate("+xf+"px, "+_f+"px)",...getDPR(wd.value)>=1.5&&{willChange:"transform"}}:{position:Ud.value,left:xf+"px",top:_f+"px"}});let qd;function Wd(){if(Cd.value==null||wd.value==null)return;const mf=hd.value;computePosition(Cd.value,wd.value,{middleware:md.value,placement:gd.value,strategy:yd.value}).then(xf=>{Nd.value=xf.x,Ld.value=xf.y,Ud.value=xf.strategy,jd.value=xf.placement,Gd.value=xf.middlewareData,Yd.value=mf!==!1})}function Xd(){typeof qd=="function"&&(qd(),qd=void 0)}function Jd(){if(Xd(),dd===void 0){Wd();return}if(Cd.value!=null&&wd.value!=null){qd=dd(Cd.value,wd.value,Wd);return}}function Zd(){hd.value||(Yd.value=!1)}return watch([md,gd,yd,hd],Wd,{flush:"sync"}),watch([Cd,wd],Jd,{flush:"sync"}),watch(hd,Zd,{flush:"sync"}),getCurrentScope()&&onScopeDispose(Xd),{x:shallowReadonly(Nd),y:shallowReadonly(Ld),strategy:shallowReadonly(Ud),placement:shallowReadonly(jd),middlewareData:shallowReadonly(Gd),isPositioned:shallowReadonly(Yd),floatingStyles:zd,update:Wd}}let $488c6ddbf4ef74c2$var$formatterCache=new Map,$488c6ddbf4ef74c2$var$supportsSignDisplay=!1;try{$488c6ddbf4ef74c2$var$supportsSignDisplay=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let $488c6ddbf4ef74c2$var$supportsUnit=!1;try{$488c6ddbf4ef74c2$var$supportsUnit=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const $488c6ddbf4ef74c2$var$UNITS={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5{format(ed){let ud="";if(!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null?ud=$488c6ddbf4ef74c2$export$711b50b3c525e0f2(this.numberFormatter,this.options.signDisplay,ed):ud=this.numberFormatter.format(ed),this.options.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var dd;let{unit:hd,unitDisplay:md="short",locale:gd}=this.resolvedOptions();if(!hd)return ud;let yd=(dd=$488c6ddbf4ef74c2$var$UNITS[hd])===null||dd===void 0?void 0:dd[md];ud+=yd[gd]||yd.default}return ud}formatToParts(ed){return this.numberFormatter.formatToParts(ed)}formatRange(ed,ud){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(ed,ud);if(ud= start date");return`${this.format(ed)} – ${this.format(ud)}`}formatRangeToParts(ed,ud){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(ed,ud);if(ud= start date");let dd=this.numberFormatter.formatToParts(ed),hd=this.numberFormatter.formatToParts(ud);return[...dd.map(md=>({...md,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...hd.map(md=>({...md,source:"endRange"}))]}resolvedOptions(){let ed=this.numberFormatter.resolvedOptions();return!$488c6ddbf4ef74c2$var$supportsSignDisplay&&this.options.signDisplay!=null&&(ed={...ed,signDisplay:this.options.signDisplay}),!$488c6ddbf4ef74c2$var$supportsUnit&&this.options.style==="unit"&&(ed={...ed,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),ed}constructor(ed,ud={}){this.numberFormatter=$488c6ddbf4ef74c2$var$getCachedNumberFormatter(ed,ud),this.options=ud}}function $488c6ddbf4ef74c2$var$getCachedNumberFormatter(Ra,ed={}){let{numberingSystem:ud}=ed;if(ud&&Ra.includes("-nu-")&&(Ra.includes("-u-")||(Ra+="-u-"),Ra+=`-nu-${ud}`),ed.style==="unit"&&!$488c6ddbf4ef74c2$var$supportsUnit){var dd;let{unit:gd,unitDisplay:yd="short"}=ed;if(!gd)throw new Error('unit option must be provided with style: "unit"');if(!(!((dd=$488c6ddbf4ef74c2$var$UNITS[gd])===null||dd===void 0)&&dd[yd]))throw new Error(`Unsupported unit ${gd} with unitDisplay = ${yd}`);ed={...ed,style:"decimal"}}let hd=Ra+(ed?Object.entries(ed).sort((gd,yd)=>gd[0]0||Object.is(ud,0):ed==="exceptZero"&&(Object.is(ud,-0)||Object.is(ud,0)?ud=Math.abs(ud):dd=ud>0),dd){let hd=Ra.format(-ud),md=Ra.format(ud),gd=hd.replace(md,"").replace(/\u200e|\u061C/,"");return[...gd].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),hd.replace(md,"!!!").replace(gd,"+").replace("!!!",md)}else return Ra.format(ud)}}const $6c7bd7858deea686$var$CURRENCY_SIGN_REGEX=new RegExp("^.*\\(.*\\).*$"),$6c7bd7858deea686$var$NUMBERING_SYSTEMS=["latn","arab","hanidec","deva","beng"];class $6c7bd7858deea686$export$cd11ab140839f11d{parse(ed){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,ed).parse(ed)}isValidPartialNumber(ed,ud,dd){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,ed).isValidPartialNumber(ed,ud,dd)}getNumberingSystem(ed){return $6c7bd7858deea686$var$getNumberParserImpl(this.locale,this.options,ed).options.numberingSystem}constructor(ed,ud={}){this.locale=ed,this.options=ud}}const $6c7bd7858deea686$var$numberParserCache=new Map;function $6c7bd7858deea686$var$getNumberParserImpl(Ra,ed,ud){let dd=$6c7bd7858deea686$var$getCachedNumberParser(Ra,ed);if(!Ra.includes("-nu-")&&!dd.isValidPartialNumber(ud)){for(let hd of $6c7bd7858deea686$var$NUMBERING_SYSTEMS)if(hd!==dd.options.numberingSystem){let md=$6c7bd7858deea686$var$getCachedNumberParser(Ra+(Ra.includes("-u-")?"-nu-":"-u-nu-")+hd,ed);if(md.isValidPartialNumber(ud))return md}}return dd}function $6c7bd7858deea686$var$getCachedNumberParser(Ra,ed){let ud=Ra+(ed?Object.entries(ed).sort((hd,md)=>hd[0]-1&&(ud=`-${ud}`)}let dd=ud?+ud:NaN;if(isNaN(dd))return NaN;if(this.options.style==="percent"){var hd,md;let gd={...this.options,style:"decimal",minimumFractionDigits:Math.min(((hd=this.options.minimumFractionDigits)!==null&&hd!==void 0?hd:0)+2,20),maximumFractionDigits:Math.min(((md=this.options.maximumFractionDigits)!==null&&md!==void 0?md:0)+2,20)};return new $6c7bd7858deea686$export$cd11ab140839f11d(this.locale,gd).parse(new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(this.locale,gd).format(dd))}return this.options.currencySign==="accounting"&&$6c7bd7858deea686$var$CURRENCY_SIGN_REGEX.test(ed)&&(dd=-1*dd),dd}sanitize(ed){return ed=ed.replace(this.symbols.literals,""),this.symbols.minusSign&&(ed=ed.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(ed=ed.replace(",",this.symbols.decimal),ed=ed.replace("،",this.symbols.decimal)),this.symbols.group&&(ed=$6c7bd7858deea686$var$replaceAll(ed,".",this.symbols.group))),this.options.locale==="fr-FR"&&(ed=$6c7bd7858deea686$var$replaceAll(ed,"."," ")),ed}isValidPartialNumber(ed,ud=-1/0,dd=1/0){return ed=this.sanitize(ed),this.symbols.minusSign&&ed.startsWith(this.symbols.minusSign)&&ud<0?ed=ed.slice(this.symbols.minusSign.length):this.symbols.plusSign&&ed.startsWith(this.symbols.plusSign)&&dd>0&&(ed=ed.slice(this.symbols.plusSign.length)),this.symbols.group&&ed.startsWith(this.symbols.group)||this.symbols.decimal&&ed.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(ed=$6c7bd7858deea686$var$replaceAll(ed,this.symbols.group,"")),ed=ed.replace(this.symbols.numeral,""),this.symbols.decimal&&(ed=ed.replace(this.symbols.decimal,"")),ed.length===0)}constructor(ed,ud={}){this.locale=ed,this.formatter=new Intl.NumberFormat(ed,ud),this.options=this.formatter.resolvedOptions(),this.symbols=$6c7bd7858deea686$var$getSymbols(ed,this.formatter,this.options,ud);var dd,hd;this.options.style==="percent"&&(((dd=this.options.minimumFractionDigits)!==null&&dd!==void 0?dd:0)>18||((hd=this.options.maximumFractionDigits)!==null&&hd!==void 0?hd:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const $6c7bd7858deea686$var$nonLiteralParts=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),$6c7bd7858deea686$var$pluralNumbers=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $6c7bd7858deea686$var$getSymbols(Ra,ed,ud,dd){var hd,md,gd,yd;let vd=new Intl.NumberFormat(Ra,{...ud,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand"}),Cd=vd.formatToParts(-10000.111),wd=vd.formatToParts(10000.111),Nd=$6c7bd7858deea686$var$pluralNumbers.map(vf=>vd.formatToParts(vf));var Ld;let Ud=(Ld=(hd=Cd.find(vf=>vf.type==="minusSign"))===null||hd===void 0?void 0:hd.value)!==null&&Ld!==void 0?Ld:"-",jd=(md=wd.find(vf=>vf.type==="plusSign"))===null||md===void 0?void 0:md.value;!jd&&((dd==null?void 0:dd.signDisplay)==="exceptZero"||(dd==null?void 0:dd.signDisplay)==="always")&&(jd="+");let Yd=(gd=new Intl.NumberFormat(Ra,{...ud,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(vf=>vf.type==="decimal"))===null||gd===void 0?void 0:gd.value,zd=(yd=Cd.find(vf=>vf.type==="group"))===null||yd===void 0?void 0:yd.value,qd=Cd.filter(vf=>!$6c7bd7858deea686$var$nonLiteralParts.has(vf.type)).map(vf=>$6c7bd7858deea686$var$escapeRegex(vf.value)),Wd=Nd.flatMap(vf=>vf.filter(gf=>!$6c7bd7858deea686$var$nonLiteralParts.has(gf.type)).map(gf=>$6c7bd7858deea686$var$escapeRegex(gf.value))),Xd=[...new Set([...qd,...Wd])].sort((vf,gf)=>gf.length-vf.length),Jd=Xd.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${Xd.join("|")}|[\\p{White_Space}]`,"gu"),Zd=[...new Intl.NumberFormat(ud.locale,{useGrouping:!1}).format(9876543210)].reverse(),mf=new Map(Zd.map((vf,gf)=>[vf,gf])),xf=new RegExp(`[${Zd.join("")}]`,"g");return{minusSign:Ud,plusSign:jd,decimal:Yd,group:zd,literals:Jd,numeral:xf,index:vf=>String(mf.get(vf))}}function $6c7bd7858deea686$var$replaceAll(Ra,ed,ud){return Ra.replaceAll?Ra.replaceAll(ed,ud):Ra.split(ed).join(ud)}function $6c7bd7858deea686$var$escapeRegex(Ra){return Ra.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function te$5(Ra,ed){const ud=typeof Ra=="string"&&!ed?`${Ra}Context`:ed,dd=Symbol(ud);return[hd=>{const md=inject(dd,hd);if(md||md===null)return md;throw new Error(`Injection \`${dd.toString()}\` not found. Component must be used within ${Array.isArray(Ra)?`one of the following components: ${Ra.join(", ")}`:`\`${Ra}\``}`)},hd=>(provide(dd,hd),hd)]}function jt$3(Ra,ed,ud){const dd=ud.originalEvent.target,hd=new CustomEvent(Ra,{bubbles:!1,cancelable:!0,detail:ud});ed&&dd.addEventListener(Ra,ed,{once:!0}),dd.dispatchEvent(hd)}function Ut$4(Ra,ed=Number.NEGATIVE_INFINITY,ud=Number.POSITIVE_INFINITY){return Math.min(ud,Math.max(ed,Ra))}function Da$1(Ra,ed){let ud=Ra;const dd=ed.toString(),hd=dd.indexOf("."),md=hd>=0?dd.length-hd:0;if(md>0){const gd=10**md;ud=Math.round(ud*gd)/gd}return ud}function Wr$4(Ra,ed,ud,dd){ed=Number(ed),ud=Number(ud);const hd=(Ra-(Number.isNaN(ed)?0:ed))%dd;let md=Da$1(Math.abs(hd)*2>=dd?Ra+Math.sign(hd)*(dd-Math.abs(hd)):Ra-hd,dd);return Number.isNaN(ed)?!Number.isNaN(ud)&&md>ud&&(md=Math.floor(Da$1(ud/dd,dd))*dd):mdud&&(md=ed+Math.floor(Da$1((ud-ed)/dd,dd))*dd),md=Da$1(md,dd),md}function ht$3(Ra){return Ra==null}function ni$4(Ra,ed){var ud;const dd=shallowRef();return watchEffect(()=>{dd.value=Ra()},{...ed,flush:(ud=void 0)!=null?ud:"sync"}),readonly(dd)}function bt$5(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function ua$2(){const Ra=new Set,ed=ud=>{Ra.delete(ud)};return{on:ud=>{Ra.add(ud);const dd=()=>ed(ud);return bt$5(dd),{off:dd}},off:ed,trigger:(...ud)=>Promise.all(Array.from(Ra).map(dd=>dd(...ud)))}}function li$4(Ra){let ed=!1,ud;const dd=effectScope(!0);return(...hd)=>(ed||(ud=dd.run(()=>Ra(...hd)),ed=!0),ud)}function Dl$3(Ra){let ed=0,ud,dd;const hd=()=>{ed-=1,dd&&ed<=0&&(dd.stop(),ud=void 0,dd=void 0)};return(...md)=>(ed+=1,ud||(dd=effectScope(!0),ud=dd.run(()=>Ra(...md))),bt$5(hd),ud)}function je$6(Ra){return typeof Ra=="function"?Ra():unref(Ra)}function si$4(Ra){if(!isRef(Ra))return reactive(Ra);const ed=new Proxy({},{get(ud,dd,hd){return unref(Reflect.get(Ra.value,dd,hd))},set(ud,dd,hd){return isRef(Ra.value[dd])&&!isRef(hd)?Ra.value[dd].value=hd:Ra.value[dd]=hd,!0},deleteProperty(ud,dd){return Reflect.deleteProperty(Ra.value,dd)},has(ud,dd){return Reflect.has(Ra.value,dd)},ownKeys(){return Object.keys(Ra.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return reactive(ed)}function $l$3(Ra){return si$4(computed(Ra))}const Je$3=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ri$4=Ra=>typeof Ra<"u",ui$4=Object.prototype.toString,di$4=Ra=>ui$4.call(Ra)==="[object Object]",Na$1=()=>{},jo$2=ci$5();function ci$5(){var Ra,ed;return Je$3&&((Ra=window==null?void 0:window.navigator)==null?void 0:Ra.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((ed=window==null?void 0:window.navigator)==null?void 0:ed.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Bl$3(Ra,ed){function ud(...dd){return new Promise((hd,md)=>{Promise.resolve(Ra(()=>ed.apply(this,dd),{fn:ed,thisArg:this,args:dd})).then(hd).catch(md)})}return ud}const Il$3=Ra=>Ra();function pi$6(Ra=Il$3){const ed=ref$1(!0);function ud(){ed.value=!1}function dd(){ed.value=!0}const hd=(...md)=>{ed.value&&Ra(...md)};return{isActive:readonly(ed),pause:ud,resume:dd,eventFilter:hd}}function Tl$3(Ra){return getCurrentInstance()}function Tt$3(Ra,ed=1e4){return customRef((ud,dd)=>{let hd=je$6(Ra),md;const gd=()=>setTimeout(()=>{hd=je$6(Ra),dd()},je$6(ed));return bt$5(()=>{clearTimeout(md)}),{get(){return ud(),hd},set(yd){hd=yd,dd(),clearTimeout(md),md=gd()}}})}function vi$2(Ra,ed,ud={}){const{eventFilter:dd=Il$3,...hd}=ud;return watch(Ra,Bl$3(dd,ed),hd)}function Uo$3(Ra,ed,ud={}){const{eventFilter:dd,...hd}=ud,{eventFilter:md,pause:gd,resume:yd,isActive:vd}=pi$6(dd);return{stop:vi$2(Ra,ed,{...hd,eventFilter:md}),pause:gd,resume:yd,isActive:vd}}function mi$2(Ra,ed,...[ud]){const{flush:dd="sync",deep:hd=!1,immediate:md=!0,direction:gd="both",transform:yd={}}=ud||{},vd=[],Cd="ltr"in yd&&yd.ltr||(Nd=>Nd),wd="rtl"in yd&&yd.rtl||(Nd=>Nd);return(gd==="both"||gd==="ltr")&&vd.push(Uo$3(Ra,Nd=>{vd.forEach(Ld=>Ld.pause()),ed.value=Cd(Nd),vd.forEach(Ld=>Ld.resume())},{flush:dd,deep:hd,immediate:md})),(gd==="both"||gd==="rtl")&&vd.push(Uo$3(ed,Nd=>{vd.forEach(Ld=>Ld.pause()),Ra.value=wd(Nd),vd.forEach(Ld=>Ld.resume())},{flush:dd,deep:hd,immediate:md})),()=>{vd.forEach(Nd=>Nd.stop())}}function hi$3(Ra,ed){Tl$3()&&onBeforeUnmount(Ra,ed)}function Un$4(Ra,ed,ud={}){const{immediate:dd=!0}=ud,hd=ref$1(!1);let md=null;function gd(){md&&(clearTimeout(md),md=null)}function yd(){hd.value=!1,gd()}function vd(...Cd){gd(),hd.value=!0,md=setTimeout(()=>{hd.value=!1,md=null,Ra(...Cd)},je$6(ed))}return dd&&(hd.value=!0,Je$3&&vd()),bt$5(yd),{isPending:readonly(hd),start:vd,stop:yd}}function $e$4(Ra){var ed;const ud=je$6(Ra);return(ed=ud==null?void 0:ud.$el)!=null?ed:ud}const Rt$4=Je$3?window:void 0;function He$4(...Ra){let ed,ud,dd,hd;if(typeof Ra[0]=="string"||Array.isArray(Ra[0])?([ud,dd,hd]=Ra,ed=Rt$4):[ed,ud,dd,hd]=Ra,!ed)return Na$1;Array.isArray(ud)||(ud=[ud]),Array.isArray(dd)||(dd=[dd]);const md=[],gd=()=>{md.forEach(wd=>wd()),md.length=0},yd=(wd,Nd,Ld,Ud)=>(wd.addEventListener(Nd,Ld,Ud),()=>wd.removeEventListener(Nd,Ld,Ud)),vd=watch(()=>[$e$4(ed),je$6(hd)],([wd,Nd])=>{if(gd(),!wd)return;const Ld=di$4(Nd)?{...Nd}:Nd;md.push(...ud.flatMap(Ud=>dd.map(jd=>yd(wd,Ud,jd,Ld))))},{immediate:!0,flush:"post"}),Cd=()=>{vd(),gd()};return bt$5(Cd),Cd}function Ci$2(Ra){return typeof Ra=="function"?Ra:typeof Ra=="string"?ed=>ed.key===Ra:Array.isArray(Ra)?ed=>Ra.includes(ed.key):()=>!0}function Gn$4(...Ra){let ed,ud,dd={};Ra.length===3?(ed=Ra[0],ud=Ra[1],dd=Ra[2]):Ra.length===2?typeof Ra[1]=="object"?(ed=!0,ud=Ra[0],dd=Ra[1]):(ed=Ra[0],ud=Ra[1]):(ed=!0,ud=Ra[0]);const{target:hd=Rt$4,eventName:md="keydown",passive:gd=!1,dedupe:yd=!1}=dd,vd=Ci$2(ed);return He$4(hd,md,Cd=>{Cd.repeat&&je$6(yd)||vd(Cd)&&ud(Cd)},gd)}function Ga$2(){const Ra=ref$1(!1),ed=getCurrentInstance();return ed&&onMounted(()=>{Ra.value=!0},ed),Ra}function _i$2(Ra){return JSON.parse(JSON.stringify(Ra))}function ne$5(Ra,ed,ud,dd={}){var hd,md,gd;const{clone:yd=!1,passive:vd=!1,eventName:Cd,deep:wd=!1,defaultValue:Nd,shouldEmit:Ld}=dd,Ud=getCurrentInstance(),jd=ud||(Ud==null?void 0:Ud.emit)||((hd=Ud==null?void 0:Ud.$emit)==null?void 0:hd.bind(Ud))||((gd=(md=Ud==null?void 0:Ud.proxy)==null?void 0:md.$emit)==null?void 0:gd.bind(Ud==null?void 0:Ud.proxy));let Gd=Cd;ed||(ed="modelValue"),Gd=Gd||`update:${ed.toString()}`;const Yd=Wd=>yd?typeof yd=="function"?yd(Wd):_i$2(Wd):Wd,zd=()=>ri$4(Ra[ed])?Yd(Ra[ed]):Nd,qd=Wd=>{Ld?Ld(Wd)&&jd(Gd,Wd):jd(Gd,Wd)};if(vd){const Wd=zd(),Xd=ref$1(Wd);let Jd=!1;return watch(()=>Ra[ed],Zd=>{Jd||(Jd=!0,Xd.value=Yd(Zd),nextTick$1(()=>Jd=!1))}),watch(Xd,Zd=>{!Jd&&(Zd!==Ra[ed]||wd)&&qd(Zd)},{deep:wd}),Xd}else return computed({get(){return zd()},set(Wd){qd(Wd)}})}function qa(Ra){return Ra?Ra.flatMap(ed=>ed.type===Fragment?qa(ed.children):[ed]):[]}function me$4(){let Ra=document.activeElement;if(Ra==null)return null;for(;Ra!=null&&Ra.shadowRoot!=null&&Ra.shadowRoot.activeElement!=null;)Ra=Ra.shadowRoot.activeElement;return Ra}const Ei$2=["INPUT","TEXTAREA"];function At$5(Ra,ed,ud,dd={}){if(!ed||dd.enableIgnoredElement&&Ei$2.includes(ed.nodeName))return null;const{arrowKeyOptions:hd="both",attributeName:md="[data-radix-vue-collection-item]",itemsArray:gd=[],loop:yd=!0,dir:vd="ltr",preventScroll:Cd=!0,focus:wd=!1}=dd,[Nd,Ld,Ud,jd,Gd,Yd]=[Ra.key==="ArrowRight",Ra.key==="ArrowLeft",Ra.key==="ArrowUp",Ra.key==="ArrowDown",Ra.key==="Home",Ra.key==="End"],zd=Ud||jd,qd=Nd||Ld;if(!Gd&&!Yd&&(!zd&&!qd||hd==="vertical"&&qd||hd==="horizontal"&&zd))return null;const Wd=ud?Array.from(ud.querySelectorAll(md)):gd;if(!Wd.length)return null;Cd&&Ra.preventDefault();let Xd=null;return qd||zd?Xd=Ml$3(Wd,ed,{goForward:zd?jd:vd==="ltr"?Nd:Ld,loop:yd}):Gd?Xd=Wd.at(0)||null:Yd&&(Xd=Wd.at(-1)||null),wd&&(Xd==null||Xd.focus()),Xd}function Ml$3(Ra,ed,ud,dd=Ra.length){if(--dd===0)return null;const hd=Ra.indexOf(ed),md=ud.goForward?hd+1:hd-1;if(!ud.loop&&(md<0||md>=Ra.length))return null;const gd=(md+Ra.length)%Ra.length,yd=Ra[gd];return yd?yd.hasAttribute("disabled")&&yd.getAttribute("disabled")!=="false"?Ml$3(Ra,yd,ud,dd):yd:null}function Cn$3(Ra){if(Ra===null||typeof Ra!="object")return!1;const ed=Object.getPrototypeOf(Ra);return ed!==null&&ed!==Object.prototype&&Object.getPrototypeOf(ed)!==null||Symbol.iterator in Ra?!1:Symbol.toStringTag in Ra?Object.prototype.toString.call(Ra)==="[object Module]":!0}function $n$4(Ra,ed,ud=".",dd){if(!Cn$3(ed))return $n$4(Ra,{},ud);const hd=Object.assign({},ed);for(const md in Ra){if(md==="__proto__"||md==="constructor")continue;const gd=Ra[md];gd!=null&&(Array.isArray(gd)&&Array.isArray(hd[md])?hd[md]=[...gd,...hd[md]]:Cn$3(gd)&&Cn$3(hd[md])?hd[md]=$n$4(gd,hd[md],(ud?`${ud}.`:"")+md.toString()):hd[md]=gd)}return hd}function Pi$2(Ra){return(...ed)=>ed.reduce((ud,dd)=>$n$4(ud,dd,""),{})}const Di$3=Pi$2(),[Ya$2,$i$2]=te$5("ConfigProvider");let Bi$2="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ii$1=(Ra=21)=>{let ed="",ud=Ra;for(;ud--;)ed+=Bi$2[Math.random()*64|0];return ed};const Ti$2=Dl$3(()=>{const Ra=ref$1(new Map),ed=ref$1(),ud=computed(()=>{for(const gd of Ra.value.values())if(gd)return!0;return!1}),dd=Ya$2({scrollBody:ref$1(!0)});let hd=null;const md=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=ed.value??"",jo$2&&(hd==null||hd()),ed.value=void 0};return watch(ud,(gd,yd)=>{var vd;if(!Je$3)return;if(!gd){yd&&md();return}ed.value===void 0&&(ed.value=document.body.style.overflow);const Cd=window.innerWidth-document.documentElement.clientWidth,wd={padding:Cd,margin:0},Nd=(vd=dd.scrollBody)!=null&&vd.value?typeof dd.scrollBody.value=="object"?Di$3({padding:dd.scrollBody.value.padding===!0?Cd:dd.scrollBody.value.padding,margin:dd.scrollBody.value.margin===!0?Cd:dd.scrollBody.value.margin},wd):wd:{padding:0,margin:0};Cd>0&&(document.body.style.paddingRight=typeof Nd.padding=="number"?`${Nd.padding}px`:String(Nd.padding),document.body.style.marginRight=typeof Nd.margin=="number"?`${Nd.margin}px`:String(Nd.margin),document.body.style.setProperty("--scrollbar-width",`${Cd}px`),document.body.style.overflow="hidden"),jo$2&&(hd=He$4(document,"touchmove",Ld=>Ri$1(Ld),{passive:!1})),nextTick$1(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),Ra});function ya$1(Ra){const ed=Ii$1(6),ud=Ti$2();ud.value.set(ed,Ra??!1);const dd=computed({get:()=>ud.value.get(ed)??!1,set:hd=>ud.value.set(ed,hd)});return hi$3(()=>{ud.value.delete(ed)}),dd}function Vl$3(Ra){const ed=window.getComputedStyle(Ra);if(ed.overflowX==="scroll"||ed.overflowY==="scroll"||ed.overflowX==="auto"&&Ra.clientWidth1?!0:(ed.preventDefault&&ed.cancelable&&ed.preventDefault(),!1)}const Ai$2="data-radix-vue-collection-item";function Fe$5(Ra,ed=Ai$2){const ud=Ra??Symbol();return{createCollection:dd=>{const hd=ref$1([]);function md(){const gd=$e$4(dd);return gd?hd.value=Array.from(gd.querySelectorAll(`[${ed}]:not([data-disabled])`)):hd.value=[]}return onBeforeUpdate(()=>{hd.value=[]}),onMounted(md),onUpdated(md),watch(()=>dd==null?void 0:dd.value,md,{immediate:!0}),provide(ud,hd),hd},injectCollection:()=>inject(ud,ref$1([]))}}function we$5(Ra){const ed=Ya$2({dir:ref$1("ltr")});return computed(()=>{var ud;return(Ra==null?void 0:Ra.value)||((ud=ed.dir)==null?void 0:ud.value)||"ltr"})}function Te$5(Ra){const ed=getCurrentInstance(),ud=ed==null?void 0:ed.type.emits,dd={};return ud!=null&&ud.length||console.warn(`No emitted event found. Please check component: ${ed==null?void 0:ed.type.__name}`),ud==null||ud.forEach(hd=>{dd[toHandlerKey(camelize(hd))]=(...md)=>Ra(hd,...md)}),dd}let wn$3=0;function Yn$3(){watchEffect(Ra=>{if(!Je$3)return;const ed=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",ed[0]??Go$2()),document.body.insertAdjacentElement("beforeend",ed[1]??Go$2()),wn$3++,Ra(()=>{wn$3===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(ud=>ud.remove()),wn$3--})})}function Go$2(){const Ra=document.createElement("span");return Ra.setAttribute("data-radix-focus-guard",""),Ra.tabIndex=0,Ra.style.outline="none",Ra.style.opacity="0",Ra.style.position="fixed",Ra.style.pointerEvents="none",Ra}function at$6(Ra){return computed(()=>{var ed;return je$6(Ra)?!!((ed=$e$4(Ra))!=null&&ed.closest("form")):!0})}function Ot$3(Ra){const ed=getCurrentInstance(),ud=Object.keys((ed==null?void 0:ed.type.props)??{}).reduce((hd,md)=>{const gd=(ed==null?void 0:ed.type.props[md]).default;return gd!==void 0&&(hd[md]=gd),hd},{}),dd=toRef$1(Ra);return computed(()=>{const hd={},md=(ed==null?void 0:ed.vnode.props)??{};return Object.keys(md).forEach(gd=>{hd[camelize(gd)]=md[gd]}),Object.keys({...ud,...hd}).reduce((gd,yd)=>(dd.value[yd]!==void 0&&(gd[yd]=dd.value[yd]),gd),{})})}function Se$6(Ra,ed){const ud=Ot$3(Ra),dd=ed?Te$5(ed):{};return computed(()=>({...ud.value,...dd}))}function R$6(){const Ra=getCurrentInstance(),ed=ref$1(),ud=computed(()=>{var gd,yd;return["#text","#comment"].includes((gd=ed.value)==null?void 0:gd.$el.nodeName)?(yd=ed.value)==null?void 0:yd.$el.nextElementSibling:$e$4(ed)}),dd=Object.assign({},Ra.exposed),hd={};for(const gd in Ra.props)Object.defineProperty(hd,gd,{enumerable:!0,configurable:!0,get:()=>Ra.props[gd]});if(Object.keys(dd).length>0)for(const gd in dd)Object.defineProperty(hd,gd,{enumerable:!0,configurable:!0,get:()=>dd[gd]});Object.defineProperty(hd,"$el",{enumerable:!0,configurable:!0,get:()=>Ra.vnode.el}),Ra.exposed=hd;function md(gd){ed.value=gd,gd&&(Object.defineProperty(hd,"$el",{enumerable:!0,configurable:!0,get:()=>gd instanceof Element?gd:gd.$el}),Ra.exposed=hd)}return{forwardRef:md,currentRef:ed,currentElement:ud}}function Fl$3(Ra,ed){const ud=Tt$3(!1,300),dd=ref$1(null),hd=ua$2();function md(){dd.value=null,ud.value=!1}function gd(yd,vd){const Cd=yd.currentTarget,wd={x:yd.clientX,y:yd.clientY},Nd=Oi$1(wd,Cd.getBoundingClientRect()),Ld=ki$2(wd,Nd),Ud=Mi$2(vd.getBoundingClientRect()),jd=Fi$2([...Ld,...Ud]);dd.value=jd,ud.value=!0}return watchEffect(yd=>{if(Ra.value&&ed.value){const vd=wd=>gd(wd,ed.value),Cd=wd=>gd(wd,Ra.value);Ra.value.addEventListener("pointerleave",vd),ed.value.addEventListener("pointerleave",Cd),yd(()=>{var wd,Nd;(wd=Ra.value)==null||wd.removeEventListener("pointerleave",vd),(Nd=ed.value)==null||Nd.removeEventListener("pointerleave",Cd)})}}),watchEffect(yd=>{var vd;if(dd.value){const Cd=wd=>{var Nd,Ld;if(!dd.value)return;const Ud=wd.target,jd={x:wd.clientX,y:wd.clientY},Gd=((Nd=Ra.value)==null?void 0:Nd.contains(Ud))||((Ld=ed.value)==null?void 0:Ld.contains(Ud)),Yd=!Vi$1(jd,dd.value),zd=!!Ud.closest("[data-grace-area-trigger]");Gd?md():(Yd||zd)&&(md(),hd.trigger())};(vd=Ra.value)==null||vd.ownerDocument.addEventListener("pointermove",Cd),yd(()=>{var wd;return(wd=Ra.value)==null?void 0:wd.ownerDocument.removeEventListener("pointermove",Cd)})}}),{isPointerInTransit:ud,onPointerExit:hd.on}}function Oi$1(Ra,ed){const ud=Math.abs(ed.top-Ra.y),dd=Math.abs(ed.bottom-Ra.y),hd=Math.abs(ed.right-Ra.x),md=Math.abs(ed.left-Ra.x);switch(Math.min(ud,dd,hd,md)){case md:return"left";case hd:return"right";case ud:return"top";case dd:return"bottom";default:throw new Error("unreachable")}}function ki$2(Ra,ed,ud=5){const dd=[];switch(ed){case"top":dd.push({x:Ra.x-ud,y:Ra.y+ud},{x:Ra.x+ud,y:Ra.y+ud});break;case"bottom":dd.push({x:Ra.x-ud,y:Ra.y-ud},{x:Ra.x+ud,y:Ra.y-ud});break;case"left":dd.push({x:Ra.x+ud,y:Ra.y-ud},{x:Ra.x+ud,y:Ra.y+ud});break;case"right":dd.push({x:Ra.x-ud,y:Ra.y-ud},{x:Ra.x-ud,y:Ra.y+ud});break}return dd}function Mi$2(Ra){const{top:ed,right:ud,bottom:dd,left:hd}=Ra;return[{x:hd,y:ed},{x:ud,y:ed},{x:ud,y:dd},{x:hd,y:dd}]}function Vi$1(Ra,ed){const{x:ud,y:dd}=Ra;let hd=!1;for(let md=0,gd=ed.length-1;mddd!=wd>dd&&ud<(Cd-yd)*(dd-vd)/(wd-vd)+yd&&(hd=!hd)}return hd}function Fi$2(Ra){const ed=Ra.slice();return ed.sort((ud,dd)=>ud.xdd.x?1:ud.ydd.y?1:0),Ni$1(ed)}function Ni$1(Ra){if(Ra.length<=1)return Ra.slice();const ed=[];for(let dd=0;dd=2;){const md=ed[ed.length-1],gd=ed[ed.length-2];if((md.x-gd.x)*(hd.y-gd.y)>=(md.y-gd.y)*(hd.x-gd.x))ed.pop();else break}ed.push(hd)}ed.pop();const ud=[];for(let dd=Ra.length-1;dd>=0;dd--){const hd=Ra[dd];for(;ud.length>=2;){const md=ud[ud.length-1],gd=ud[ud.length-2];if((md.x-gd.x)*(hd.y-gd.y)>=(md.y-gd.y)*(hd.x-gd.x))ud.pop();else break}ud.push(hd)}return ud.pop(),ed.length===1&&ud.length===1&&ed[0].x===ud[0].x&&ed[0].y===ud[0].y?ed:ed.concat(ud)}var Li$1=function(Ra){if(typeof document>"u")return null;var ed=Array.isArray(Ra)?Ra[0]:Ra;return ed.ownerDocument.body},Kt$1=new WeakMap,$a$2=new WeakMap,Ba$2={},_n$3=0,Nl$3=function(Ra){return Ra&&(Ra.host||Nl$3(Ra.parentNode))},zi$1=function(Ra,ed){return ed.map(function(ud){if(Ra.contains(ud))return ud;var dd=Nl$3(ud);return dd&&Ra.contains(dd)?dd:(console.error("aria-hidden",ud,"in not contained inside",Ra,". Doing nothing"),null)}).filter(function(ud){return!!ud})},Ki$2=function(Ra,ed,ud,dd){var hd=zi$1(ed,Array.isArray(Ra)?Ra:[Ra]);Ba$2[ud]||(Ba$2[ud]=new WeakMap);var md=Ba$2[ud],gd=[],yd=new Set,vd=new Set(hd),Cd=function(Nd){!Nd||yd.has(Nd)||(yd.add(Nd),Cd(Nd.parentNode))};hd.forEach(Cd);var wd=function(Nd){!Nd||vd.has(Nd)||Array.prototype.forEach.call(Nd.children,function(Ld){if(yd.has(Ld))wd(Ld);else try{var Ud=Ld.getAttribute(dd),jd=Ud!==null&&Ud!=="false",Gd=(Kt$1.get(Ld)||0)+1,Yd=(md.get(Ld)||0)+1;Kt$1.set(Ld,Gd),md.set(Ld,Yd),gd.push(Ld),Gd===1&&jd&&$a$2.set(Ld,!0),Yd===1&&Ld.setAttribute(ud,"true"),jd||Ld.setAttribute(dd,"true")}catch(zd){console.error("aria-hidden: cannot operate on ",Ld,zd)}})};return wd(ed),yd.clear(),_n$3++,function(){gd.forEach(function(Nd){var Ld=Kt$1.get(Nd)-1,Ud=md.get(Nd)-1;Kt$1.set(Nd,Ld),md.set(Nd,Ud),Ld||($a$2.has(Nd)||Nd.removeAttribute(dd),$a$2.delete(Nd)),Ud||Nd.removeAttribute(ud)}),_n$3--,_n$3||(Kt$1=new WeakMap,Kt$1=new WeakMap,$a$2=new WeakMap,Ba$2={})}},Hi$1=function(Ra,ed,ud){ud===void 0&&(ud="data-aria-hidden");var dd=Array.from(Array.isArray(Ra)?Ra:[Ra]),hd=Li$1(Ra);return hd?(dd.push.apply(dd,Array.from(hd.querySelectorAll("[aria-live]"))),Ki$2(dd,hd,ud,"aria-hidden")):function(){return null}};function ga$2(Ra){let ed;watch(()=>$e$4(Ra),ud=>{ud?ed=Hi$1(ud):ed&&ed()}),onUnmounted(()=>{ed&&ed()})}let Wi$2=0;function ge$7(Ra,ed="radix"){if(Ra)return Ra;const ud=Ya$2({useId:void 0});return useId?`${ed}-${useId()}`:ud.useId?`${ed}-${ud.useId()}`:`${ed}-${++Wi$2}`}function Ll$3(Ra){const ed=ref$1(),ud=computed(()=>{var hd;return((hd=ed.value)==null?void 0:hd.width)??0}),dd=computed(()=>{var hd;return((hd=ed.value)==null?void 0:hd.height)??0});return onMounted(()=>{const hd=$e$4(Ra);if(hd){ed.value={width:hd.offsetWidth,height:hd.offsetHeight};const md=new ResizeObserver(gd=>{if(!Array.isArray(gd)||!gd.length)return;const yd=gd[0];let vd,Cd;if("borderBoxSize"in yd){const wd=yd.borderBoxSize,Nd=Array.isArray(wd)?wd[0]:wd;vd=Nd.inlineSize,Cd=Nd.blockSize}else vd=hd.offsetWidth,Cd=hd.offsetHeight;ed.value={width:vd,height:Cd}});return md.observe(hd,{box:"border-box"}),()=>md.unobserve(hd)}else ed.value=void 0}),{width:ud,height:dd}}function zl$3(Ra,ed){const ud=ref$1(Ra);function dd(hd){return ed[ud.value][hd]??ud.value}return{state:ud,dispatch:hd=>{ud.value=dd(hd)}}}const Ui$1="data-item-text";function ba$3(Ra){const ed=Tt$3("",1e3);return{search:ed,handleTypeaheadSearch:(ud,dd)=>{if(!(Ra!=null&&Ra.value)&&!dd)return;ed.value=ed.value+ud;const hd=(Ra==null?void 0:Ra.value)??dd,md=me$4(),gd=hd.map(Nd=>{var Ld;return{ref:Nd,textValue:((Ld=(Nd.querySelector(`[${Ui$1}]`)??Nd).textContent)==null?void 0:Ld.trim())??""}}),yd=gd.find(Nd=>Nd.ref===md),vd=gd.map(Nd=>Nd.textValue),Cd=Zn$4(vd,ed.value,yd==null?void 0:yd.textValue),wd=gd.find(Nd=>Nd.textValue===Cd);return wd&&wd.ref.focus(),wd==null?void 0:wd.ref},resetTypeahead:()=>{ed.value=""}}}function Xn$4(Ra,ed){return Ra.map((ud,dd)=>Ra[(ed+dd)%Ra.length])}function Zn$4(Ra,ed,ud){const dd=ed.length>1&&Array.from(ed).every(yd=>yd===ed[0])?ed[0]:ed,hd=ud?Ra.indexOf(ud):-1;let md=Xn$4(Ra,Math.max(hd,0));dd.length===1&&(md=md.filter(yd=>yd!==ud));const gd=md.find(yd=>yd.toLowerCase().startsWith(dd.toLowerCase()));return gd!==ud?gd:void 0}const Jn$4=defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(Ra,{attrs:ed,slots:ud}){return()=>{var dd,hd;if(!ud.default)return null;const md=qa(ud.default()),gd=md.findIndex(wd=>wd.type!==Comment$2);if(gd===-1)return md;const yd=md[gd];(dd=yd.props)==null||delete dd.ref;const vd=yd.props?mergeProps(ed,yd.props):ed;ed.class&&(hd=yd.props)!=null&&hd.class&&delete yd.props.class;const Cd=cloneVNode(yd,vd);for(const wd in vd)wd.startsWith("on")&&(Cd.props||(Cd.props={}),Cd.props[wd]=vd[wd]);return md.length===1?Cd:(md[gd]=Cd,md)}}}),O$4=defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(Ra,{attrs:ed,slots:ud}){const dd=Ra.asChild?"template":Ra.as;return typeof dd=="string"&&["area","img","input"].includes(dd)?()=>h$2(dd,ed):dd!=="template"?()=>h$2(Ra.as,ed,{default:ud.default}):()=>h$2(Jn$4,ed,{default:ud.default})}});function Re$7(){const Ra=ref$1(),ed=computed(()=>{var ud,dd;return["#text","#comment"].includes((ud=Ra.value)==null?void 0:ud.$el.nodeName)?(dd=Ra.value)==null?void 0:dd.$el.nextElementSibling:$e$4(Ra)});return{primitiveElement:Ra,currentElement:ed}}function Xi$1(Ra,ed){var ud;const dd=ref$1({}),hd=ref$1("none"),md=ref$1(Ra),gd=Ra.value?"mounted":"unmounted";let yd;const vd=((ud=ed.value)==null?void 0:ud.ownerDocument.defaultView)??Rt$4,{state:Cd,dispatch:wd}=zl$3(gd,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),Nd=Yd=>{var zd;if(Je$3){const qd=new CustomEvent(Yd,{bubbles:!1,cancelable:!1});(zd=ed.value)==null||zd.dispatchEvent(qd)}};watch(Ra,async(Yd,zd)=>{var qd;const Wd=zd!==Yd;if(await nextTick$1(),Wd){const Xd=hd.value,Jd=Ia$2(ed.value);Yd?(wd("MOUNT"),Nd("enter"),Jd==="none"&&Nd("after-enter")):Jd==="none"||((qd=dd.value)==null?void 0:qd.display)==="none"?(wd("UNMOUNT"),Nd("leave"),Nd("after-leave")):zd&&Xd!==Jd?(wd("ANIMATION_OUT"),Nd("leave")):(wd("UNMOUNT"),Nd("after-leave"))}},{immediate:!0});const Ld=Yd=>{const zd=Ia$2(ed.value),qd=zd.includes(Yd.animationName),Wd=Cd.value==="mounted"?"enter":"leave";if(Yd.target===ed.value&&qd&&(Nd(`after-${Wd}`),wd("ANIMATION_END"),!md.value)){const Xd=ed.value.style.animationFillMode;ed.value.style.animationFillMode="forwards",yd=vd==null?void 0:vd.setTimeout(()=>{var Jd;((Jd=ed.value)==null?void 0:Jd.style.animationFillMode)==="forwards"&&(ed.value.style.animationFillMode=Xd)})}Yd.target===ed.value&&zd==="none"&&wd("ANIMATION_END")},Ud=Yd=>{Yd.target===ed.value&&(hd.value=Ia$2(ed.value))},jd=watch(ed,(Yd,zd)=>{Yd?(dd.value=getComputedStyle(Yd),Yd.addEventListener("animationstart",Ud),Yd.addEventListener("animationcancel",Ld),Yd.addEventListener("animationend",Ld)):(wd("ANIMATION_END"),yd!==void 0&&(vd==null||vd.clearTimeout(yd)),zd==null||zd.removeEventListener("animationstart",Ud),zd==null||zd.removeEventListener("animationcancel",Ld),zd==null||zd.removeEventListener("animationend",Ld))},{immediate:!0}),Gd=watch(Cd,()=>{const Yd=Ia$2(ed.value);hd.value=Cd.value==="mounted"?Yd:"none"});return onUnmounted(()=>{jd(),Gd()}),{isPresent:computed(()=>["mounted","unmountSuspended"].includes(Cd.value))}}function Ia$2(Ra){return Ra&&getComputedStyle(Ra).animationName||"none"}const Pe$6=defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(Ra,{slots:ed,expose:ud}){var dd;const{present:hd,forceMount:md}=toRefs(Ra),gd=ref$1(),{isPresent:yd}=Xi$1(hd,gd);ud({present:yd});let vd=ed.default({present:yd});vd=qa(vd||[]);const Cd=getCurrentInstance();if(vd&&(vd==null?void 0:vd.length)>1){const wd=(dd=Cd==null?void 0:Cd.parent)!=null&&dd.type.name?`<${Cd.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${wd}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(Nd=>` - ${Nd}`).join(` `)].join(` -`))}return()=>fd.value||pd.value||md.value?h$2(qa.default({present:md})[0],{ref:vd=>{const Nd=$e$4(vd);return typeof(Nd==null?void 0:Nd.hasAttribute)>"u"||(Nd!=null&&Nd.hasAttribute("data-radix-popper-content-wrapper")?hd.value=Nd.firstElementChild:hd.value=Nd),Nd}}):null}}),[tt$4,Qi$1]=Q$6("DialogRoot"),eu$2=defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=ne$5(rd,"open",qa,{defaultValue:rd.defaultOpen,passive:rd.open===void 0}),pd=ref$1(),fd=ref$1(),{modal:hd}=toRefs(rd);return Qi$1({open:sd,modal:hd,openModal:()=>{sd.value=!0},onOpenChange:md=>{sd.value=md},onOpenToggle:()=>{sd.value=!sd.value},contentId:"",titleId:"",descriptionId:"",triggerElement:pd,contentElement:fd}),(md,gd)=>renderSlot(md.$slots,"default",{open:unref(sd)})}}),tu$3=defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=tt$4(),{forwardRef:sd,currentElement:pd}=R$6();return rd.contentId||(rd.contentId=he$4(void 0,"radix-vue-dialog-content")),onMounted(()=>{rd.triggerElement.value=pd.value}),(fd,hd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{ref:unref(sd),type:fd.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":unref(rd).open.value||!1,"aria-controls":unref(rd).open.value?unref(rd).contentId:void 0,"data-state":unref(rd).open.value?"open":"closed",onClick:unref(rd).onOpenToggle}),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),ot$3=defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=ja$1();return(rd,sd)=>unref(qa)||rd.forceMount?(openBlock(),createBlock(Teleport,{key:0,to:rd.to,disabled:rd.disabled},[renderSlot(rd.$slots,"default")],8,["to","disabled"])):createCommentVNode("",!0)}}),Dv=defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(ot$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),au$4="dismissableLayer.pointerDownOutside",nu$4="dismissableLayer.focusOutside";function Kl$3(Ra,qa){const rd=qa.closest("[data-dismissable-layer]"),sd=Ra.dataset.dismissableLayer===""?Ra:Ra.querySelector("[data-dismissable-layer]"),pd=Array.from(Ra.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(rd&&sd===rd||pd.indexOf(sd){});return watchEffect(hd=>{if(!Ye$4)return;const md=async yd=>{const vd=yd.target;if(qa!=null&&qa.value){if(Kl$3(qa.value,vd)){pd.value=!1;return}if(yd.target&&!pd.value){let Nd=function(){Wt$3(au$4,Ra,Md)};const Md={originalEvent:yd};yd.pointerType==="touch"?(sd.removeEventListener("click",fd.value),fd.value=Nd,sd.addEventListener("click",fd.value,{once:!0})):Nd()}else sd.removeEventListener("click",fd.value);pd.value=!1}},gd=window.setTimeout(()=>{sd.addEventListener("pointerdown",md)},0);hd(()=>{window.clearTimeout(gd),sd.removeEventListener("pointerdown",md),sd.removeEventListener("click",fd.value)})}),{onPointerDownCapture:()=>pd.value=!0}}function Wl$3(Ra,qa){var rd;const sd=((rd=qa==null?void 0:qa.value)==null?void 0:rd.ownerDocument)??(globalThis==null?void 0:globalThis.document),pd=ref$1(!1);return watchEffect(fd=>{if(!Ye$4)return;const hd=async md=>{qa!=null&&qa.value&&(await nextTick$1(),!(!qa.value||Kl$3(qa.value,md.target))&&md.target&&!pd.value&&Wt$3(nu$4,Ra,{originalEvent:md}))};sd.addEventListener("focusin",hd),fd(()=>sd.removeEventListener("focusin",hd))}),{onFocusCapture:()=>pd.value=!0,onBlurCapture:()=>pd.value=!1}}const je$6=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gt$3=defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{forwardRef:pd,currentElement:fd}=R$6(),hd=computed(()=>{var Fd;return((Fd=fd.value)==null?void 0:Fd.ownerDocument)??globalThis.document}),md=computed(()=>je$6.layersRoot),gd=computed(()=>fd.value?Array.from(md.value).indexOf(fd.value):-1),yd=computed(()=>je$6.layersWithOutsidePointerEventsDisabled.size>0),vd=computed(()=>{const Fd=Array.from(md.value),[Hd]=[...je$6.layersWithOutsidePointerEventsDisabled].slice(-1),Vd=Fd.indexOf(Hd);return gd.value>=Vd}),Nd=Hl$3(async Fd=>{const Hd=[...je$6.branches].some(Vd=>Vd==null?void 0:Vd.contains(Fd.target));!vd.value||Hd||(sd("pointerDownOutside",Fd),sd("interactOutside",Fd),await nextTick$1(),Fd.defaultPrevented||sd("dismiss"))},fd),Md=Wl$3(Fd=>{[...je$6.branches].some(Hd=>Hd==null?void 0:Hd.contains(Fd.target))||(sd("focusOutside",Fd),sd("interactOutside",Fd),Fd.defaultPrevented||sd("dismiss"))},fd);jn$3("Escape",Fd=>{gd.value===md.value.size-1&&(sd("escapeKeyDown",Fd),Fd.defaultPrevented||sd("dismiss"))});let Ld;return watchEffect(Fd=>{fd.value&&(rd.disableOutsidePointerEvents&&(je$6.layersWithOutsidePointerEventsDisabled.size===0&&(Ld=hd.value.body.style.pointerEvents,hd.value.body.style.pointerEvents="none"),je$6.layersWithOutsidePointerEventsDisabled.add(fd.value)),md.value.add(fd.value),Fd(()=>{rd.disableOutsidePointerEvents&&je$6.layersWithOutsidePointerEventsDisabled.size===1&&(hd.value.body.style.pointerEvents=Ld)}))}),watchEffect(Fd=>{Fd(()=>{fd.value&&(md.value.delete(fd.value),je$6.layersWithOutsidePointerEventsDisabled.delete(fd.value))})}),(Fd,Hd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(pd),"as-child":Fd.asChild,as:Fd.as,"data-dismissable-layer":"",style:normalizeStyle({pointerEvents:yd.value?vd.value?"auto":"none":void 0}),onFocusCapture:unref(Md).onFocusCapture,onBlurCapture:unref(Md).onBlurCapture,onPointerdownCapture:unref(Nd).onPointerDownCapture},{default:withCtx(()=>[renderSlot(Fd.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),wn$3="focusScope.autoFocusOnMount",_n$3="focusScope.autoFocusOnUnmount",jo$2={bubbles:!1,cancelable:!0};function Oa$3(Ra,{select:qa=!1}={}){const rd=document.activeElement;for(const sd of Ra)if(ct$3(sd,{select:qa}),document.activeElement!==rd)return!0}function lu$3(Ra){const qa=Jn$4(Ra),rd=Uo$3(qa,Ra),sd=Uo$3(qa.reverse(),Ra);return[rd,sd]}function Jn$4(Ra){const qa=[],rd=document.createTreeWalker(Ra,NodeFilter.SHOW_ELEMENT,{acceptNode:sd=>{const pd=sd.tagName==="INPUT"&&sd.type==="hidden";return sd.disabled||sd.hidden||pd?NodeFilter.FILTER_SKIP:sd.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;rd.nextNode();)qa.push(rd.currentNode);return qa}function Uo$3(Ra,qa){for(const rd of Ra)if(!su$3(rd,{upTo:qa}))return rd}function su$3(Ra,{upTo:qa}){if(getComputedStyle(Ra).visibility==="hidden")return!0;for(;Ra;){if(qa!==void 0&&Ra===qa)return!1;if(getComputedStyle(Ra).display==="none")return!0;Ra=Ra.parentElement}return!1}function ru$3(Ra){return Ra instanceof HTMLInputElement&&"select"in Ra}function ct$3(Ra,{select:qa=!1}={}){if(Ra&&Ra.focus){const rd=document.activeElement;Ra.focus({preventScroll:!0}),Ra!==rd&&ru$3(Ra)&&qa&&Ra.select()}}const iu$2=ai$5(()=>ref$1([]));function uu$4(){const Ra=iu$2();return{add(qa){const rd=Ra.value[0];qa!==rd&&(rd==null||rd.pause()),Ra.value=Go$2(Ra.value,qa),Ra.value.unshift(qa)},remove(qa){var rd;Ra.value=Go$2(Ra.value,qa),(rd=Ra.value[0])==null||rd.resume()}}}function Go$2(Ra,qa){const rd=[...Ra],sd=rd.indexOf(qa);return sd!==-1&&rd.splice(sd,1),rd}function du$3(Ra){return Ra.filter(qa=>qa.tagName!=="A")}const Ya$2=defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{currentRef:pd,currentElement:fd}=R$6(),hd=ref$1(null),md=uu$4(),gd=reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});watchEffect(vd=>{if(!Ye$4)return;const Nd=fd.value;if(!rd.trapped)return;function Md(Vd){if(gd.paused||!Nd)return;const Gd=Vd.target;Nd.contains(Gd)?hd.value=Gd:ct$3(hd.value,{select:!0})}function Ld(Vd){if(gd.paused||!Nd)return;const Gd=Vd.relatedTarget;Gd!==null&&(Nd.contains(Gd)||ct$3(hd.value,{select:!0}))}function Fd(Vd){Nd.contains(hd.value)||ct$3(Nd)}document.addEventListener("focusin",Md),document.addEventListener("focusout",Ld);const Hd=new MutationObserver(Fd);Nd&&Hd.observe(Nd,{childList:!0,subtree:!0}),vd(()=>{document.removeEventListener("focusin",Md),document.removeEventListener("focusout",Ld),Hd.disconnect()})}),watchEffect(async vd=>{const Nd=fd.value;if(await nextTick$1(),!Nd)return;md.add(gd);const Md=document.activeElement;if(!Nd.contains(Md)){const Ld=new CustomEvent(wn$3,jo$2);Nd.addEventListener(wn$3,Fd=>sd("mountAutoFocus",Fd)),Nd.dispatchEvent(Ld),Ld.defaultPrevented||(Oa$3(du$3(Jn$4(Nd)),{select:!0}),document.activeElement===Md&&ct$3(Nd))}vd(()=>{Nd.removeEventListener(wn$3,Hd=>sd("mountAutoFocus",Hd));const Ld=new CustomEvent(_n$3,jo$2),Fd=Hd=>{sd("unmountAutoFocus",Hd)};Nd.addEventListener(_n$3,Fd),Nd.dispatchEvent(Ld),setTimeout(()=>{Ld.defaultPrevented||ct$3(Md??document.body,{select:!0}),Nd.removeEventListener(_n$3,Fd),md.remove(gd)},0)})});function yd(vd){if(!rd.loop&&!rd.trapped||gd.paused)return;const Nd=vd.key==="Tab"&&!vd.altKey&&!vd.ctrlKey&&!vd.metaKey,Md=document.activeElement;if(Nd&&Md){const Ld=vd.currentTarget,[Fd,Hd]=lu$3(Ld);Fd&&Hd?!vd.shiftKey&&Md===Hd?(vd.preventDefault(),rd.loop&&ct$3(Fd,{select:!0})):vd.shiftKey&&Md===Fd&&(vd.preventDefault(),rd.loop&&ct$3(Hd,{select:!0})):Md===Ld&&vd.preventDefault()}}return(vd,Nd)=>(openBlock(),createBlock(unref(O$4),{ref_key:"currentRef",ref:pd,tabindex:"-1","as-child":vd.asChild,as:vd.as,onKeydown:yd},{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},8,["as-child","as"]))}}),cu$4="menu.itemSelect",Dn$3=["Enter"," "],fu$2=["ArrowDown","PageUp","Home"],jl$3=["ArrowUp","PageDown","End"],pu$3=[...fu$2,...jl$3],vu$3={ltr:[...Dn$3,"ArrowRight"],rtl:[...Dn$3,"ArrowLeft"]},mu$3={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function Qn$4(Ra){return Ra?"open":"closed"}function Fa$1(Ra){return Ra==="indeterminate"}function eo$2(Ra){return Fa$1(Ra)?"indeterminate":Ra?"checked":"unchecked"}function $n$4(Ra){const qa=document.activeElement;for(const rd of Ra)if(rd===qa||(rd.focus(),document.activeElement!==qa))return}function hu$3(Ra,qa){const{x:rd,y:sd}=Ra;let pd=!1;for(let fd=0,hd=qa.length-1;fdsd!=vd>sd&&rd<(yd-md)*(sd-gd)/(vd-gd)+md&&(pd=!pd)}return pd}function yu$2(Ra,qa){if(!qa)return!1;const rd={x:Ra.clientX,y:Ra.clientY};return hu$3(rd,qa)}function ua$2(Ra){return Ra.pointerType==="mouse"}const Ul$3=defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=tt$4(),{forwardRef:fd,currentElement:hd}=R$6();return pd.titleId||(pd.titleId=he$4(void 0,"radix-vue-dialog-title")),pd.descriptionId||(pd.descriptionId=he$4(void 0,"radix-vue-dialog-description")),onMounted(()=>{pd.contentElement=hd,document.activeElement!==document.body&&(pd.triggerElement.value=document.activeElement)}),(md,gd)=>(openBlock(),createBlock(unref(Ya$2),{"as-child":"",loop:"",trapped:rd.trapFocus,onMountAutoFocus:gd[5]||(gd[5]=yd=>sd("openAutoFocus",yd)),onUnmountAutoFocus:gd[6]||(gd[6]=yd=>sd("closeAutoFocus",yd))},{default:withCtx(()=>[createVNode(unref(gt$3),mergeProps({id:unref(pd).contentId,ref:unref(fd),as:md.as,"as-child":md.asChild,"disable-outside-pointer-events":md.disableOutsidePointerEvents,role:"dialog","aria-describedby":unref(pd).descriptionId,"aria-labelledby":unref(pd).titleId,"data-state":unref(Qn$4)(unref(pd).open.value)},md.$attrs,{onDismiss:gd[0]||(gd[0]=yd=>unref(pd).onOpenChange(!1)),onEscapeKeyDown:gd[1]||(gd[1]=yd=>sd("escapeKeyDown",yd)),onFocusOutside:gd[2]||(gd[2]=yd=>sd("focusOutside",yd)),onInteractOutside:gd[3]||(gd[3]=yd=>sd("interactOutside",yd)),onPointerDownOutside:gd[4]||(gd[4]=yd=>sd("pointerDownOutside",yd))}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),wu$3=defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=tt$4(),fd=Ae$5(sd),{forwardRef:hd,currentElement:md}=R$6();return ya$1(md),(gd,yd)=>(openBlock(),createBlock(Ul$3,mergeProps({...rd,...unref(fd)},{ref:unref(hd),"trap-focus":unref(pd).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:yd[0]||(yd[0]=vd=>{var Nd;vd.defaultPrevented||(vd.preventDefault(),(Nd=unref(pd).triggerElement.value)==null||Nd.focus())}),onPointerDownOutside:yd[1]||(yd[1]=vd=>{const Nd=vd.detail.originalEvent,Md=Nd.button===0&&Nd.ctrlKey===!0;(Nd.button===2||Md)&&vd.preventDefault()}),onFocusOutside:yd[2]||(yd[2]=vd=>{vd.preventDefault()})}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["trap-focus"]))}}),_u$3=defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);R$6();const pd=tt$4(),fd=ref$1(!1),hd=ref$1(!1);return(md,gd)=>(openBlock(),createBlock(Ul$3,mergeProps({...rd,...unref(sd)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:gd[0]||(gd[0]=yd=>{var vd;yd.defaultPrevented||(fd.value||(vd=unref(pd).triggerElement.value)==null||vd.focus(),yd.preventDefault()),fd.value=!1,hd.value=!1}),onInteractOutside:gd[1]||(gd[1]=yd=>{var vd;yd.defaultPrevented||(fd.value=!0,yd.detail.originalEvent.type==="pointerdown"&&(hd.value=!0));const Nd=yd.target;(vd=unref(pd).triggerElement.value)!=null&&vd.contains(Nd)&&yd.preventDefault(),yd.detail.originalEvent.type==="focusin"&&hd.value&&yd.preventDefault()})}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),xu$2=defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=tt$4(),fd=Ae$5(sd),{forwardRef:hd}=R$6();return(md,gd)=>(openBlock(),createBlock(unref(Pe$6),{present:md.forceMount||unref(pd).open.value},{default:withCtx(()=>[unref(pd).modal.value?(openBlock(),createBlock(wu$3,mergeProps({key:0,ref:unref(hd)},{...rd,...unref(fd),...md.$attrs}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16)):(openBlock(),createBlock(_u$3,mergeProps({key:1,ref:unref(hd)},{...rd,...unref(fd),...md.$attrs}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Su$2=defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=tt$4();return ha$1(!0),R$6(),(rd,sd)=>(openBlock(),createBlock(unref(O$4),{as:rd.as,"as-child":rd.asChild,"data-state":unref(qa).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),Eu$3=defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=tt$4(),{forwardRef:rd}=R$6();return(sd,pd)=>{var fd;return(fd=unref(qa))!=null&&fd.modal.value?(openBlock(),createBlock(unref(Pe$6),{key:0,present:sd.forceMount||unref(qa).open.value},{default:withCtx(()=>[createVNode(Su$2,mergeProps(sd.$attrs,{ref:unref(rd),as:sd.as,"as-child":sd.asChild}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):createCommentVNode("",!0)}}}),Gl$3=defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra;R$6();const rd=tt$4();return(sd,pd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{type:sd.as==="button"?"button":void 0,onClick:pd[0]||(pd[0]=fd=>unref(rd).onOpenChange(!1))}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["type"]))}}),Pu$2=defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(Ra){const qa=Ra,rd=tt$4();return R$6(),(sd,pd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{id:unref(rd).titleId}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["id"]))}}),Du$3=defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(Ra){const qa=Ra;R$6();const rd=tt$4();return(sd,pd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{id:unref(rd).descriptionId}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["id"]))}}),$v=defineComponent({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa);return R$6(),(sd,pd)=>(openBlock(),createBlock(unref(eu$2),mergeProps(unref(rd),{modal:!0}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16))}}),Iv=defineComponent({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(ot$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),[$u$3,Bu$2]=Q$6("AlertDialogContent"),Tv=defineComponent({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);R$6();const pd=ref$1();return Bu$2({onCancelElementChange:fd=>{pd.value=fd}}),(fd,hd)=>(openBlock(),createBlock(unref(xu$2),mergeProps({...rd,...unref(sd)},{role:"alertdialog",onPointerDownOutside:hd[0]||(hd[0]=withModifiers(()=>{},["prevent"])),onInteractOutside:hd[1]||(hd[1]=withModifiers(()=>{},["prevent"])),onOpenAutoFocus:hd[2]||(hd[2]=()=>{nextTick$1(()=>{var md;(md=pd.value)==null||md.focus({preventScroll:!0})})})}),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),Rv=defineComponent({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(Eu$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),Av=defineComponent({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=$u$3(),{forwardRef:sd,currentElement:pd}=R$6();return onMounted(()=>{rd.onCancelElementChange(pd.value)}),(fd,hd)=>(openBlock(),createBlock(unref(Gl$3),mergeProps(qa,{ref:unref(sd)}),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),Ov=defineComponent({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(Pu$2),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),kv=defineComponent({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(Du$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),Mv=defineComponent({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(Gl$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}});function Na$1(Ra){return Ra==="indeterminate"}function Xl$3(Ra){return Na$1(Ra)?"indeterminate":Ra?"checked":"unchecked"}const Ju$3=["value","checked","name","disabled","required"],[Qu$3,ed]=Q$6("CheckboxRoot"),zv=defineComponent({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{disabled:pd}=toRefs(rd),fd=ne$5(rd,"checked",sd,{defaultValue:rd.defaultChecked,passive:rd.checked===void 0}),{forwardRef:hd,currentElement:md}=R$6(),gd=Qe$3(md),yd=computed(()=>{var vd;return rd.id&&md.value?(vd=document.querySelector(`[for="${rd.id}"]`))==null?void 0:vd.innerText:void 0});return ed({disabled:pd,state:fd}),(vd,Nd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps(vd.$attrs,{id:vd.id,ref:unref(hd),role:"checkbox","as-child":rd.asChild,as:vd.as,type:vd.as==="button"?"button":void 0,"aria-checked":unref(Na$1)(unref(fd))?"mixed":unref(fd),"aria-required":!1,"aria-label":vd.$attrs["aria-label"]||yd.value,"data-state":unref(Xl$3)(unref(fd)),"data-disabled":unref(pd)?"":void 0,disabled:unref(pd),onKeydown:withKeys(withModifiers(()=>{},["prevent"]),["enter"]),onClick:Nd[0]||(Nd[0]=Md=>fd.value=unref(Na$1)(unref(fd))?!0:!unref(fd))}),{default:withCtx(()=>[renderSlot(vd.$slots,"default",{checked:unref(fd)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-label","data-state","data-disabled","disabled","onKeydown"]),unref(gd)?(openBlock(),createElementBlock("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:vd.value,checked:!!unref(fd),name:rd.name,disabled:rd.disabled,required:rd.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Ju$3)):createCommentVNode("",!0)],64))}}),Kv=defineComponent({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const{forwardRef:qa}=R$6(),rd=Qu$3();return(sd,pd)=>(openBlock(),createBlock(unref(Pe$6),{present:sd.forceMount||unref(Na$1)(unref(rd).state.value)||unref(rd).state.value===!0},{default:withCtx(()=>[createVNode(unref(O$4),mergeProps({ref:unref(qa),"data-state":unref(Xl$3)(unref(rd).state.value),"data-disabled":unref(rd).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":sd.asChild,as:sd.as},sd.$attrs),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[Zl$3,td]=Q$6("PopperRoot"),Ot$3=defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(Ra){const qa=ref$1();return td({anchor:qa,onAnchorChange:rd=>qa.value=rd}),(rd,sd)=>renderSlot(rd.$slots,"default")}}),kt$4=defineComponent({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,{forwardRef:rd,currentElement:sd}=R$6(),pd=Zl$3();return watchEffect(()=>{pd.onAnchorChange(qa.element??sd.value)}),(fd,hd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(rd),as:fd.as,"as-child":fd.asChild},{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},8,["as","as-child"]))}});function ad$1(Ra){return Ra!==null}function nd(Ra){return{name:"transformOrigin",options:Ra,fn(qa){var rd,sd,pd;const{placement:fd,rects:hd,middlewareData:md}=qa,gd=((rd=md.arrow)==null?void 0:rd.centerOffset)!==0,yd=gd?0:Ra.arrowWidth,vd=gd?0:Ra.arrowHeight,[Nd,Md]=Bn$3(fd),Ld={start:"0%",center:"50%",end:"100%"}[Md],Fd=(((sd=md.arrow)==null?void 0:sd.x)??0)+yd/2,Hd=(((pd=md.arrow)==null?void 0:pd.y)??0)+vd/2;let Vd="",Gd="";return Nd==="bottom"?(Vd=gd?Ld:`${Fd}px`,Gd=`${-vd}px`):Nd==="top"?(Vd=gd?Ld:`${Fd}px`,Gd=`${hd.floating.height+vd}px`):Nd==="right"?(Vd=`${-vd}px`,Gd=gd?Ld:`${Hd}px`):Nd==="left"&&(Vd=`${hd.floating.width+vd}px`,Gd=gd?Ld:`${Hd}px`),{data:{x:Vd,y:Gd}}}}}function Bn$3(Ra){const[qa,rd="center"]=Ra.split("-");return[qa,rd]}const Jl$3={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[od,ld]=Q$6("PopperContent"),Bt$4=defineComponent({inheritAttrs:!1,__name:"PopperContent",props:mergeDefaults({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Jl$3}),emits:["placed"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=Zl$3(),{forwardRef:fd,currentElement:hd}=R$6(),md=ref$1(),gd=ref$1(),{width:yd,height:vd}=Vl$3(gd),Nd=computed(()=>rd.side+(rd.align!=="center"?`-${rd.align}`:"")),Md=computed(()=>typeof rd.collisionPadding=="number"?rd.collisionPadding:{top:0,right:0,bottom:0,left:0,...rd.collisionPadding}),Ld=computed(()=>Array.isArray(rd.collisionBoundary)?rd.collisionBoundary:[rd.collisionBoundary]),Fd=computed(()=>({padding:Md.value,boundary:Ld.value.filter(ad$1),altBoundary:Ld.value.length>0})),Hd=ei$4(()=>[offset$2({mainAxis:rd.sideOffset+vd.value,alignmentAxis:rd.alignOffset}),rd.prioritizePosition&&rd.avoidCollisions&&flip$2({...Fd.value}),rd.avoidCollisions&&shift({mainAxis:!0,crossAxis:!!rd.prioritizePosition,limiter:rd.sticky==="partial"?limitShift():void 0,...Fd.value}),!rd.prioritizePosition&&rd.avoidCollisions&&flip$2({...Fd.value}),size({...Fd.value,apply:({elements:mf,rects:_f,availableWidth:xf,availableHeight:Cf})=>{const{width:If,height:Sf}=_f.reference,wf=mf.floating.style;wf.setProperty("--radix-popper-available-width",`${xf}px`),wf.setProperty("--radix-popper-available-height",`${Cf}px`),wf.setProperty("--radix-popper-anchor-width",`${If}px`),wf.setProperty("--radix-popper-anchor-height",`${Sf}px`)}}),gd.value&&arrow$2({element:gd.value,padding:rd.arrowPadding}),nd({arrowWidth:yd.value,arrowHeight:vd.value}),rd.hideWhenDetached&&hide$2({strategy:"referenceHidden",...Fd.value})]),{floatingStyles:Vd,placement:Gd,isPositioned:Ud,middlewareData:qd}=useFloating(pd.anchor,md,{strategy:"fixed",placement:Nd,whileElementsMounted:(...mf)=>autoUpdate(...mf,{animationFrame:rd.updatePositionStrategy==="always"}),middleware:Hd}),Wd=computed(()=>Bn$3(Gd.value)[0]),Kd=computed(()=>Bn$3(Gd.value)[1]);watchPostEffect(()=>{Ud.value&&sd("placed")});const Xd=computed(()=>{var mf;return((mf=qd.value.arrow)==null?void 0:mf.centerOffset)!==0}),df=ref$1("");watchEffect(()=>{hd.value&&(df.value=window.getComputedStyle(hd.value).zIndex)});const Ef=computed(()=>{var mf;return((mf=qd.value.arrow)==null?void 0:mf.x)??0}),pf=computed(()=>{var mf;return((mf=qd.value.arrow)==null?void 0:mf.y)??0});return ld({placedSide:Wd,onArrowChange:mf=>gd.value=mf,arrowX:Ef,arrowY:pf,shouldHideArrow:Xd}),(mf,_f)=>{var xf,Cf,If;return openBlock(),createElementBlock("div",{ref_key:"floatingRef",ref:md,"data-radix-popper-content-wrapper":"",style:normalizeStyle({...unref(Vd),transform:unref(Ud)?unref(Vd).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:df.value,"--radix-popper-transform-origin":[(xf=unref(qd).transformOrigin)==null?void 0:xf.x,(Cf=unref(qd).transformOrigin)==null?void 0:Cf.y].join(" "),...((If=unref(qd).hide)==null?void 0:If.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[createVNode(unref(O$4),mergeProps({ref:unref(fd)},mf.$attrs,{"as-child":rd.asChild,as:mf.as,"data-side":Wd.value,"data-align":Kd.value,style:{animation:unref(Ud)?void 0:"none"}}),{default:withCtx(()=>[renderSlot(mf.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Zt$3=defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){return R$6(),(qa,rd)=>(openBlock(),createBlock(unref(O$4),{as:qa.as,"as-child":qa.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:withCtx(()=>[renderSlot(qa.$slots,"default")]),_:3},8,["as","as-child"]))}}),ud="data-radix-vue-collection-item",[ao$2,dd]=Q$6("CollectionProvider");function ba$3(Ra=ud){const qa=ref$1(new Map),rd=ref$1(),sd=dd({collectionRef:rd,itemMap:qa,attrName:Ra}),{getItems:pd}=Qt$3(sd),fd=computed(()=>Array.from(sd.itemMap.value.values())),hd=computed(()=>sd.itemMap.value.size);return{getItems:pd,reactiveItems:fd,itemMapSize:hd}}const Ca$1=defineComponent({name:"CollectionSlot",setup(Ra,{slots:qa}){const rd=ao$2(),{primitiveElement:sd,currentElement:pd}=Ie$5();return watch(pd,()=>{rd.collectionRef.value=pd.value}),()=>h$2(Xn$4,{ref:sd},qa)}}),Jt$4=defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(Ra,{slots:qa,attrs:rd}){const sd=ao$2(),{primitiveElement:pd,currentElement:fd}=Ie$5();return watchEffect(hd=>{if(fd.value){const md=markRaw(fd.value);sd.itemMap.value.set(md,{ref:fd.value,value:Ra.value}),hd(()=>sd.itemMap.value.delete(md))}}),()=>h$2(Xn$4,{...rd,[sd.attrName]:"",ref:pd},qa)}});function Qt$3(Ra){const qa=Ra??ao$2();return{getItems:()=>{const rd=qa.collectionRef.value;if(!rd)return[];const sd=Array.from(rd.querySelectorAll(`[${qa.attrName}]`));return Array.from(qa.itemMap.value.values()).sort((pd,fd)=>sd.indexOf(pd.ref)-sd.indexOf(fd.ref))}}}function Xa$2(Ra){const qa=Ga$2({nonce:ref$1()});return computed(()=>{var rd;return(Ra==null?void 0:Ra.value)||((rd=qa.nonce)==null?void 0:rd.value)})}const Za$1=defineComponent({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(kt$4),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}});function bd$1(){const Ra=ref$1(!1);return onMounted(()=>{Le$5("keydown",()=>{Ra.value=!0},{capture:!0,passive:!0}),Le$5(["pointerdown","pointermove"],()=>{Ra.value=!1},{capture:!0,passive:!0})}),Ra}const Cd=Sl$3(bd$1),[Mt$4,es$2]=Q$6(["MenuRoot","MenuSub"],"MenuContext"),[wa$1,wd]=Q$6("MenuRoot"),oo$4=defineComponent({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{modal:pd,dir:fd}=toRefs(rd),hd=be$8(fd),md=ne$5(rd,"open",sd),gd=ref$1(),yd=Cd();return es$2({open:md,onOpenChange:vd=>{md.value=vd},content:gd,onContentChange:vd=>{gd.value=vd}}),wd({onClose:()=>{md.value=!1},isUsingKeyboardRef:yd,dir:hd,modal:pd}),(vd,Nd)=>(openBlock(),createBlock(unref(Ot$3),null,{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3}))}}),_d="rovingFocusGroup.onEntryFocus",xd={bubbles:!1,cancelable:!0},Ja={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sd(Ra,qa){return qa!=="rtl"?Ra:Ra==="ArrowLeft"?"ArrowRight":Ra==="ArrowRight"?"ArrowLeft":Ra}function ts$1(Ra,qa,rd){const sd=Sd(Ra.key,rd);if(!(qa==="vertical"&&["ArrowLeft","ArrowRight"].includes(sd))&&!(qa==="horizontal"&&["ArrowUp","ArrowDown"].includes(sd)))return Ja[sd]}function as$2(Ra,qa=!1,rd){const sd=(rd==null?void 0:rd.activeElement)??document.activeElement;for(const pd of Ra)if(pd===sd||(pd.focus({preventScroll:qa}),document.activeElement!==sd))return}function Ed(Ra,qa){return Ra.map((rd,sd)=>Ra[(qa+sd)%Ra.length])}const[Pd,Dd]=Q$6("RovingFocusGroup"),Vt$3=defineComponent({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(Ra,{expose:qa,emit:rd}){const sd=Ra,pd=rd,{loop:fd,orientation:hd,dir:md}=toRefs(sd),gd=be$8(md),yd=ne$5(sd,"currentTabStopId",pd,{defaultValue:sd.defaultCurrentTabStopId,passive:sd.currentTabStopId===void 0}),vd=ref$1(!1),Nd=ref$1(!1),Md=ref$1(0),{getItems:Ld}=ba$3();function Fd(Vd){const Gd=!Nd.value;if(Vd.currentTarget&&Vd.target===Vd.currentTarget&&Gd&&!vd.value){const Ud=new CustomEvent(_d,xd);if(Vd.currentTarget.dispatchEvent(Ud),pd("entryFocus",Ud),!Ud.defaultPrevented){const qd=Ld().map(df=>df.ref).filter(df=>df.dataset.disabled!==""),Wd=qd.find(df=>df.getAttribute("data-active")==="true"),Kd=qd.find(df=>df.id===yd.value),Xd=[Wd,Kd,...qd].filter(Boolean);as$2(Xd,sd.preventScrollOnEntryFocus)}}Nd.value=!1}function Hd(){setTimeout(()=>{Nd.value=!1},1)}return qa({getItems:Ld}),Dd({loop:fd,dir:gd,orientation:hd,currentTabStopId:yd,onItemFocus:Vd=>{yd.value=Vd},onItemShiftTab:()=>{vd.value=!0},onFocusableItemAdd:()=>{Md.value++},onFocusableItemRemove:()=>{Md.value--}}),(Vd,Gd)=>(openBlock(),createBlock(unref(Ca$1),null,{default:withCtx(()=>[createVNode(unref(O$4),{tabindex:vd.value||Md.value===0?-1:0,"data-orientation":unref(hd),as:Vd.as,"as-child":Vd.asChild,dir:unref(gd),style:{outline:"none"},onMousedown:Gd[0]||(Gd[0]=Ud=>Nd.value=!0),onMouseup:Hd,onFocus:Fd,onBlur:Gd[1]||(Gd[1]=Ud=>vd.value=!1)},{default:withCtx(()=>[renderSlot(Vd.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Ft$4=defineComponent({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const qa=Ra,rd=Pd(),sd=computed(()=>qa.tabStopId||he$4()),pd=computed(()=>rd.currentTabStopId.value===sd.value),{getItems:fd}=Qt$3(),{primitiveElement:hd,currentElement:md}=Ie$5(),gd=computed(()=>{var vd;return(vd=md.value)==null?void 0:vd.getRootNode()});onMounted(()=>{qa.focusable&&rd.onFocusableItemAdd()}),onUnmounted(()=>{qa.focusable&&rd.onFocusableItemRemove()});function yd(vd){if(vd.key==="Tab"&&vd.shiftKey){rd.onItemShiftTab();return}if(vd.target!==vd.currentTarget)return;const Nd=ts$1(vd,rd.orientation.value,rd.dir.value);if(Nd!==void 0){if(vd.metaKey||vd.ctrlKey||vd.altKey||!qa.allowShiftKey&&vd.shiftKey)return;vd.preventDefault();let Md=[...fd().map(Ld=>Ld.ref).filter(Ld=>Ld.dataset.disabled!=="")];if(Nd==="last")Md.reverse();else if(Nd==="prev"||Nd==="next"){Nd==="prev"&&Md.reverse();const Ld=Md.indexOf(vd.currentTarget);Md=rd.loop.value?Ed(Md,Ld+1):Md.slice(Ld+1)}nextTick$1(()=>as$2(Md,!1,gd.value))}}return(vd,Nd)=>(openBlock(),createBlock(unref(Jt$4),null,{default:withCtx(()=>[createVNode(unref(O$4),{ref_key:"primitiveElement",ref:hd,tabindex:pd.value?0:-1,"data-orientation":unref(rd).orientation.value,"data-active":vd.active,"data-disabled":vd.focusable?void 0:"",as:vd.as,"as-child":vd.asChild,onMousedown:Nd[0]||(Nd[0]=Md=>{vd.focusable?unref(rd).onItemFocus(sd.value):Md.preventDefault()}),onFocus:Nd[1]||(Nd[1]=Md=>unref(rd).onItemFocus(sd.value)),onKeydown:yd},{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[lo$3,$d$1]=Q$6("MenuContent"),so$2=defineComponent({__name:"MenuContentImpl",props:mergeDefaults({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...Jl$3}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=Mt$4(),fd=wa$1(),{trapFocus:hd,disableOutsidePointerEvents:md,loop:gd}=toRefs(rd);Gn$4(),ha$1(md.value);const yd=ref$1(""),vd=ref$1(0),Nd=ref$1(0),Md=ref$1(null),Ld=ref$1("right"),Fd=ref$1(0),Hd=ref$1(null),{createCollection:Vd}=Me$7(),{forwardRef:Gd,currentElement:Ud}=R$6(),qd=Vd(Ud);watch(Ud,mf=>{pd.onContentChange(mf)});const{handleTypeaheadSearch:Wd}=ga$2(qd);onUnmounted(()=>{window.clearTimeout(vd.value)});function Kd(mf){var _f,xf;return Ld.value===((_f=Md.value)==null?void 0:_f.side)&&yu$2(mf,(xf=Md.value)==null?void 0:xf.area)}async function Xd(mf){var _f;sd("openAutoFocus",mf),!mf.defaultPrevented&&(mf.preventDefault(),(_f=Ud.value)==null||_f.focus({preventScroll:!0}))}function df(mf){if(mf.defaultPrevented)return;const _f=mf.target.closest("[data-radix-menu-content]")===mf.currentTarget,xf=mf.ctrlKey||mf.altKey||mf.metaKey,Cf=mf.key.length===1,If=Rt$4(mf,document.activeElement,Ud.value,{loop:gd.value,arrowKeyOptions:"vertical",dir:fd==null?void 0:fd.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(If)return If==null?void 0:If.focus();if(mf.code==="Space"||(_f&&(mf.key==="Tab"&&mf.preventDefault(),!xf&&Cf&&Wd(mf.key)),mf.target!==Ud.value)||!pu$3.includes(mf.key))return;mf.preventDefault();const Sf=qd.value;jl$3.includes(mf.key)&&Sf.reverse(),$n$4(Sf)}function Ef(mf){var _f,xf;(xf=(_f=mf==null?void 0:mf.currentTarget)==null?void 0:_f.contains)!=null&&xf.call(_f,mf.target)||(window.clearTimeout(vd.value),yd.value="")}function pf(mf){var _f;if(!ua$2(mf))return;const xf=mf.target,Cf=Fd.value!==mf.clientX;if((_f=mf==null?void 0:mf.currentTarget)!=null&&_f.contains(xf)&&Cf){const If=mf.clientX>Fd.value?"right":"left";Ld.value=If,Fd.value=mf.clientX}}return $d$1({onItemEnter:mf=>!!Kd(mf),onItemLeave:mf=>{var _f;Kd(mf)||((_f=Ud.value)==null||_f.focus(),Hd.value=null)},onTriggerLeave:mf=>!!Kd(mf),searchRef:yd,pointerGraceTimerRef:Nd,onPointerGraceIntentChange:mf=>{Md.value=mf}}),(mf,_f)=>(openBlock(),createBlock(unref(Ya$2),{"as-child":"",trapped:unref(hd),onMountAutoFocus:Xd,onUnmountAutoFocus:_f[7]||(_f[7]=xf=>sd("closeAutoFocus",xf))},{default:withCtx(()=>[createVNode(unref(gt$3),{"as-child":"","disable-outside-pointer-events":unref(md),onEscapeKeyDown:_f[2]||(_f[2]=xf=>sd("escapeKeyDown",xf)),onPointerDownOutside:_f[3]||(_f[3]=xf=>sd("pointerDownOutside",xf)),onFocusOutside:_f[4]||(_f[4]=xf=>sd("focusOutside",xf)),onInteractOutside:_f[5]||(_f[5]=xf=>sd("interactOutside",xf)),onDismiss:_f[6]||(_f[6]=xf=>sd("dismiss"))},{default:withCtx(()=>[createVNode(unref(Vt$3),{"current-tab-stop-id":Hd.value,"onUpdate:currentTabStopId":_f[0]||(_f[0]=xf=>Hd.value=xf),"as-child":"",orientation:"vertical",dir:unref(fd).dir.value,loop:unref(gd),onEntryFocus:_f[1]||(_f[1]=xf=>{sd("entryFocus",xf),unref(fd).isUsingKeyboardRef.value||xf.preventDefault()})},{default:withCtx(()=>[createVNode(unref(Bt$4),{ref:unref(Gd),role:"menu",as:mf.as,"as-child":mf.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":unref(Qn$4)(unref(pd).open.value),dir:unref(fd).dir.value,side:mf.side,"side-offset":mf.sideOffset,align:mf.align,"align-offset":mf.alignOffset,"avoid-collisions":mf.avoidCollisions,"collision-boundary":mf.collisionBoundary,"collision-padding":mf.collisionPadding,"arrow-padding":mf.arrowPadding,"prioritize-position":mf.prioritizePosition,sticky:mf.sticky,"hide-when-detached":mf.hideWhenDetached,onKeydown:df,onBlur:Ef,onPointermove:pf},{default:withCtx(()=>[renderSlot(mf.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),ns$2=defineComponent({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,rd=lo$3(),{forwardRef:sd}=R$6(),pd=ref$1(!1);async function fd(md){if(!md.defaultPrevented&&ua$2(md)){if(qa.disabled)rd.onItemLeave(md);else if(!rd.onItemEnter(md)){const gd=md.currentTarget;gd==null||gd.focus({preventScroll:!0})}}}async function hd(md){await nextTick$1(),!md.defaultPrevented&&ua$2(md)&&rd.onItemLeave(md)}return(md,gd)=>(openBlock(),createBlock(unref(Jt$4),{value:{textValue:md.textValue}},{default:withCtx(()=>[createVNode(unref(O$4),mergeProps({ref:unref(sd),role:"menuitem",tabindex:"-1"},md.$attrs,{as:md.as,"as-child":md.asChild,"data-radix-vue-collection-item":"","aria-disabled":md.disabled||void 0,"data-disabled":md.disabled?"":void 0,"data-highlighted":pd.value?"":void 0,onPointermove:fd,onPointerleave:hd,onFocus:gd[0]||(gd[0]=async yd=>{await nextTick$1(),!(yd.defaultPrevented||md.disabled)&&(pd.value=!0)}),onBlur:gd[1]||(gd[1]=async yd=>{await nextTick$1(),!yd.defaultPrevented&&(pd.value=!1)})}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),_a$3=defineComponent({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{forwardRef:pd,currentElement:fd}=R$6(),hd=wa$1(),md=lo$3(),gd=ref$1(!1);async function yd(){const vd=fd.value;if(!rd.disabled&&vd){const Nd=new CustomEvent(cu$4,{bubbles:!0,cancelable:!0});sd("select",Nd),await nextTick$1(),Nd.defaultPrevented?gd.value=!1:hd.onClose()}}return(vd,Nd)=>(openBlock(),createBlock(ns$2,mergeProps(rd,{ref:unref(pd),onClick:yd,onPointerdown:Nd[0]||(Nd[0]=()=>{gd.value=!0}),onPointerup:Nd[1]||(Nd[1]=async Md=>{var Ld;await nextTick$1(),!Md.defaultPrevented&&(gd.value||(Ld=Md.currentTarget)==null||Ld.click())}),onKeydown:Nd[2]||(Nd[2]=async Md=>{const Ld=unref(md).searchRef.value!=="";vd.disabled||Ld&&Md.key===" "||unref(Dn$3).includes(Md.key)&&(Md.currentTarget.click(),Md.preventDefault())})}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16))}}),[Bd,os$2]=Q$6(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext"),ro$2=defineComponent({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const qa=Bd({checked:ref$1(!1)});return(rd,sd)=>(openBlock(),createBlock(unref(Pe$6),{present:rd.forceMount||unref(Fa$1)(unref(qa).checked.value)||unref(qa).checked.value===!0},{default:withCtx(()=>[createVNode(unref(O$4),{as:rd.as,"as-child":rd.asChild,"data-state":unref(eo$2)(unref(qa).checked.value)},{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),io$3=defineComponent({__name:"MenuCheckboxItem",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=ne$5(rd,"checked",sd);return os$2({checked:pd}),(fd,hd)=>(openBlock(),createBlock(_a$3,mergeProps({role:"menuitemcheckbox"},rd,{"aria-checked":unref(Fa$1)(unref(pd))?"mixed":unref(pd),"data-state":unref(eo$2)(unref(pd)),onSelect:hd[0]||(hd[0]=async md=>{sd("select",md),unref(Fa$1)(unref(pd))?pd.value=!0:pd.value=!unref(pd)})}),{default:withCtx(()=>[renderSlot(fd.$slots,"default",{checked:unref(pd)})]),_:3},16,["aria-checked","data-state"]))}}),Id=defineComponent({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=xe$5(rd,sd),fd=Mt$4(),{forwardRef:hd,currentElement:md}=R$6();return ya$1(md),(gd,yd)=>(openBlock(),createBlock(so$2,mergeProps(unref(pd),{ref:unref(hd),"trap-focus":unref(fd).open.value,"disable-outside-pointer-events":unref(fd).open.value,"disable-outside-scroll":!0,onDismiss:yd[0]||(yd[0]=vd=>unref(fd).onOpenChange(!1)),onFocusOutside:yd[1]||(yd[1]=withModifiers(vd=>sd("focusOutside",vd),["prevent"]))}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),Td=defineComponent({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa),sd=Mt$4();return(pd,fd)=>(openBlock(),createBlock(so$2,mergeProps(unref(rd),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:fd[0]||(fd[0]=hd=>unref(sd).onOpenChange(!1))}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16))}}),uo$3=defineComponent({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa),sd=Mt$4(),pd=wa$1();return(fd,hd)=>(openBlock(),createBlock(unref(Pe$6),{present:fd.forceMount||unref(sd).open.value},{default:withCtx(()=>[unref(pd).modal.value?(openBlock(),createBlock(Id,normalizeProps(mergeProps({key:0},{...fd.$attrs,...unref(rd)})),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16)):(openBlock(),createBlock(Td,normalizeProps(mergeProps({key:1},{...fd.$attrs,...unref(rd)})),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Qa$1=defineComponent({__name:"MenuGroup",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(O$4),mergeProps({role:"group"},qa),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),fo$2=defineComponent({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(ot$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),[Rd,Ad]=Q$6("MenuRadioGroup"),po$2=defineComponent({__name:"MenuRadioGroup",props:{modelValue:{default:""},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=ne$5(rd,"modelValue",qa);return Ad({modelValue:sd,onValueChange:pd=>{sd.value=pd}}),(pd,fd)=>(openBlock(),createBlock(Qa$1,normalizeProps(guardReactiveProps(rd)),{default:withCtx(()=>[renderSlot(pd.$slots,"default",{modelValue:unref(sd)})]),_:3},16))}}),vo$1=defineComponent({__name:"MenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{value:pd}=toRefs(rd),fd=Rd(),hd=computed(()=>fd.modelValue.value===(pd==null?void 0:pd.value));return os$2({checked:hd}),(md,gd)=>(openBlock(),createBlock(_a$3,mergeProps({role:"menuitemradio"},rd,{"aria-checked":hd.value,"data-state":unref(eo$2)(hd.value),onSelect:gd[0]||(gd[0]=async yd=>{sd("select",yd),unref(fd).onValueChange(unref(pd))})}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),mo$3=defineComponent({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{role:"separator","aria-orientation":"horizontal"}),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),[ls$2,Od]=Q$6("MenuSub"),ho$2=defineComponent({__name:"MenuSub",props:{open:{type:Boolean,default:void 0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=ne$5(rd,"open",qa,{defaultValue:!1,passive:rd.open===void 0}),pd=Mt$4(),fd=ref$1(),hd=ref$1();return watchEffect(md=>{(pd==null?void 0:pd.open.value)===!1&&(sd.value=!1),md(()=>sd.value=!1)}),es$2({open:sd,onOpenChange:md=>{sd.value=md},content:hd,onContentChange:md=>{hd.value=md}}),Od({triggerId:"",contentId:"",trigger:fd,onTriggerChange:md=>{fd.value=md}}),(md,gd)=>(openBlock(),createBlock(unref(Ot$3),null,{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3}))}}),yo$3=defineComponent({__name:"MenuSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa),sd=Mt$4(),pd=wa$1(),fd=ls$2(),{forwardRef:hd,currentElement:md}=R$6();return fd.contentId||(fd.contentId=he$4(void 0,"radix-vue-menu-sub-content")),(gd,yd)=>(openBlock(),createBlock(unref(Pe$6),{present:gd.forceMount||unref(sd).open.value},{default:withCtx(()=>[createVNode(so$2,mergeProps(unref(rd),{id:unref(fd).contentId,ref:unref(hd),"aria-labelledby":unref(fd).triggerId,align:"start",side:unref(pd).dir.value==="rtl"?"left":"right","disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:yd[0]||(yd[0]=withModifiers(vd=>{var Nd;unref(pd).isUsingKeyboardRef.value&&((Nd=unref(md))==null||Nd.focus())},["prevent"])),onCloseAutoFocus:yd[1]||(yd[1]=withModifiers(()=>{},["prevent"])),onFocusOutside:yd[2]||(yd[2]=vd=>{vd.defaultPrevented||vd.target!==unref(fd).trigger.value&&unref(sd).onOpenChange(!1)}),onEscapeKeyDown:yd[3]||(yd[3]=vd=>{unref(pd).onClose(),vd.preventDefault()}),onKeydown:yd[4]||(yd[4]=vd=>{var Nd,Md;const Ld=(Nd=vd.currentTarget)==null?void 0:Nd.contains(vd.target),Fd=unref(mu$3)[unref(pd).dir.value].includes(vd.key);Ld&&Fd&&(unref(sd).onOpenChange(!1),(Md=unref(fd).trigger.value)==null||Md.focus(),vd.preventDefault())})}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),go$3=defineComponent({__name:"MenuSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,rd=Mt$4(),sd=wa$1(),pd=ls$2(),fd=lo$3(),hd=ref$1(null);pd.triggerId||(pd.triggerId=he$4(void 0,"radix-vue-menu-sub-trigger"));function md(){hd.value&&window.clearTimeout(hd.value),hd.value=null}onUnmounted(()=>{md()});function gd(Nd){!ua$2(Nd)||fd.onItemEnter(Nd)||!qa.disabled&&!rd.open.value&&!hd.value&&(fd.onPointerGraceIntentChange(null),hd.value=window.setTimeout(()=>{rd.onOpenChange(!0),md()},100))}async function yd(Nd){var Md,Ld;if(!ua$2(Nd))return;md();const Fd=(Md=rd.content.value)==null?void 0:Md.getBoundingClientRect();if(Fd!=null&&Fd.width){const Hd=(Ld=rd.content.value)==null?void 0:Ld.dataset.side,Vd=Hd==="right",Gd=Vd?-5:5,Ud=Fd[Vd?"left":"right"],qd=Fd[Vd?"right":"left"];fd.onPointerGraceIntentChange({area:[{x:Nd.clientX+Gd,y:Nd.clientY},{x:Ud,y:Fd.top},{x:qd,y:Fd.top},{x:qd,y:Fd.bottom},{x:Ud,y:Fd.bottom}],side:Hd}),window.clearTimeout(fd.pointerGraceTimerRef.value),fd.pointerGraceTimerRef.value=window.setTimeout(()=>fd.onPointerGraceIntentChange(null),300)}else{if(fd.onTriggerLeave(Nd))return;fd.onPointerGraceIntentChange(null)}}async function vd(Nd){var Md;const Ld=fd.searchRef.value!=="";qa.disabled||Ld&&Nd.key===" "||vu$3[sd.dir.value].includes(Nd.key)&&(rd.onOpenChange(!0),await nextTick$1(),(Md=rd.content.value)==null||Md.focus(),Nd.preventDefault())}return(Nd,Md)=>(openBlock(),createBlock(Za$1,{"as-child":""},{default:withCtx(()=>[createVNode(ns$2,mergeProps(qa,{id:unref(pd).triggerId,ref:Ld=>{var Fd;(Fd=unref(pd))==null||Fd.onTriggerChange(Ld==null?void 0:Ld.$el)},"aria-haspopup":"menu","aria-expanded":unref(rd).open.value,"aria-controls":unref(pd).contentId,"data-state":unref(Qn$4)(unref(rd).open.value),onClick:Md[0]||(Md[0]=async Ld=>{qa.disabled||Ld.defaultPrevented||(Ld.currentTarget.focus(),unref(rd).open.value||unref(rd).onOpenChange(!0))}),onPointermove:gd,onPointerleave:yd,onKeydown:vd}),{default:withCtx(()=>[renderSlot(Nd.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),[ss$2,kd]=Q$6("ContextMenuRoot"),om=defineComponent({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{dir:pd,modal:fd}=toRefs(rd);R$6();const hd=be$8(pd),md=ref$1(!1);return kd({open:md,onOpenChange:gd=>{md.value=gd},dir:hd,modal:fd}),watch(md,gd=>{sd("update:open",gd)}),(gd,yd)=>(openBlock(),createBlock(unref(oo$4),{open:md.value,"onUpdate:open":yd[0]||(yd[0]=vd=>md.value=vd),dir:unref(hd),modal:unref(fd)},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function qo$2(Ra){return Ra.pointerType!=="mouse"}const lm=defineComponent({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const qa=Ra,{disabled:rd}=toRefs(qa),{forwardRef:sd}=R$6(),pd=ss$2(),fd=ref$1({x:0,y:0}),hd=computed(()=>({getBoundingClientRect:()=>({width:0,height:0,left:fd.value.x,right:fd.value.x,top:fd.value.y,bottom:fd.value.y,...fd.value})})),md=ref$1(0);function gd(){window.clearTimeout(md.value)}function yd(Ld){fd.value={x:Ld.clientX,y:Ld.clientY},pd.onOpenChange(!0)}async function vd(Ld){rd.value||(await nextTick$1(),Ld.defaultPrevented||(gd(),yd(Ld),Ld.preventDefault()))}async function Nd(Ld){rd.value||(await nextTick$1(),qo$2(Ld)&&!Ld.defaultPrevented&&(gd(),md.value=window.setTimeout(()=>yd(Ld),700)))}async function Md(Ld){rd.value||(await nextTick$1(),qo$2(Ld)&&!Ld.defaultPrevented&&gd())}return(Ld,Fd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(Za$1),{as:"template",element:hd.value},null,8,["element"]),createVNode(unref(O$4),mergeProps({ref:unref(sd),as:Ld.as,"as-child":Ld.asChild,"data-state":unref(pd).open.value?"open":"closed","data-disabled":unref(rd)?"":void 0,style:{WebkitTouchCallout:"none"}},Ld.$attrs,{onContextmenu:vd,onPointerdown:Nd,onPointermove:Md,onPointercancel:Md,onPointerup:Md}),{default:withCtx(()=>[renderSlot(Ld.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),sm=defineComponent({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(fo$2),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),rm$1=defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa);R$6();const sd=ss$2(),pd=ref$1(!1);return(fd,hd)=>(openBlock(),createBlock(unref(uo$3),mergeProps(unref(rd),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:hd[0]||(hd[0]=md=>{!md.defaultPrevented&&pd.value&&md.preventDefault(),pd.value=!1}),onInteractOutside:hd[1]||(hd[1]=md=>{!md.defaultPrevented&&!unref(sd).modal.value&&(pd.value=!0)})}),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),um=defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);return R$6(),(pd,fd)=>(openBlock(),createBlock(unref(_a$3),normalizeProps(guardReactiveProps({...rd,...unref(sd)})),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16))}}),cm$1=defineComponent({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(mo$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),[us$3,ic$2]=Q$6("DropdownMenuRoot"),sh=defineComponent({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa;R$6();const pd=ne$5(rd,"open",sd,{defaultValue:rd.defaultOpen,passive:rd.open===void 0}),fd=ref$1(),{modal:hd,dir:md}=toRefs(rd),gd=be$8(md);return ic$2({open:pd,onOpenChange:yd=>{pd.value=yd},onOpenToggle:()=>{pd.value=!pd.value},triggerId:"",triggerElement:fd,contentId:"",modal:hd,dir:gd}),(yd,vd)=>(openBlock(),createBlock(unref(oo$4),{open:unref(pd),"onUpdate:open":vd[0]||(vd[0]=Nd=>isRef(pd)?pd.value=Nd:null),dir:unref(gd),modal:unref(hd)},{default:withCtx(()=>[renderSlot(yd.$slots,"default",{open:unref(pd)})]),_:3},8,["open","dir","modal"]))}}),rh=defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=us$3(),{forwardRef:sd,currentElement:pd}=R$6();return onMounted(()=>{rd.triggerElement=pd}),rd.triggerId||(rd.triggerId=he$4(void 0,"radix-vue-dropdown-menu-trigger")),(fd,hd)=>(openBlock(),createBlock(unref(Za$1),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{id:unref(rd).triggerId,ref:unref(sd),type:fd.as==="button"?"button":void 0,"as-child":qa.asChild,as:fd.as,"aria-haspopup":"menu","aria-expanded":unref(rd).open.value,"aria-controls":unref(rd).open.value?unref(rd).contentId:void 0,"data-disabled":fd.disabled?"":void 0,disabled:fd.disabled,"data-state":unref(rd).open.value?"open":"closed",onClick:hd[0]||(hd[0]=async md=>{var gd;!fd.disabled&&md.button===0&&md.ctrlKey===!1&&((gd=unref(rd))==null||gd.onOpenToggle(),await nextTick$1(),unref(rd).open.value&&md.preventDefault())}),onKeydown:hd[1]||(hd[1]=withKeys(md=>{fd.disabled||(["Enter"," "].includes(md.key)&&unref(rd).onOpenToggle(),md.key==="ArrowDown"&&unref(rd).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(md.key)&&md.preventDefault())},["enter","space","arrow-down"]))},{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),ih=defineComponent({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(fo$2),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),uh=defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa);R$6();const sd=us$3(),pd=ref$1(!1);function fd(hd){hd.defaultPrevented||(pd.value||setTimeout(()=>{var md;(md=sd.triggerElement.value)==null||md.focus()},0),pd.value=!1,hd.preventDefault())}return sd.contentId||(sd.contentId=he$4(void 0,"radix-vue-dropdown-menu-content")),(hd,md)=>{var gd;return openBlock(),createBlock(unref(uo$3),mergeProps(unref(rd),{id:unref(sd).contentId,"aria-labelledby":(gd=unref(sd))==null?void 0:gd.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:fd,onInteractOutside:md[0]||(md[0]=yd=>{var vd;if(yd.defaultPrevented)return;const Nd=yd.detail.originalEvent,Md=Nd.button===0&&Nd.ctrlKey===!0,Ld=Nd.button===2||Md;(!unref(sd).modal.value||Ld)&&(pd.value=!0),(vd=unref(sd).triggerElement.value)!=null&&vd.contains(yd.target)&&yd.preventDefault()})}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),ch$1=defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);return R$6(),(pd,fd)=>(openBlock(),createBlock(unref(_a$3),normalizeProps(guardReactiveProps({...rd,...unref(sd)})),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16))}}),mh=defineComponent({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(ro$2),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),yh=defineComponent({__name:"DropdownMenuRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);return R$6(),(pd,fd)=>(openBlock(),createBlock(unref(po$2),normalizeProps(guardReactiveProps({...rd,...unref(sd)})),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16))}}),gh=defineComponent({__name:"DropdownMenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa);return R$6(),(sd,pd)=>(openBlock(),createBlock(unref(vo$1),normalizeProps(guardReactiveProps(unref(rd))),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16))}}),[wo$2,cc$2]=Q$6("HoverCardRoot"),Bh=defineComponent({__name:"HoverCardRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},openDelay:{default:700},closeDelay:{default:300}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{openDelay:pd,closeDelay:fd}=toRefs(rd);R$6();const hd=ne$5(rd,"open",sd,{defaultValue:rd.defaultOpen,passive:rd.open===void 0}),md=ref$1(0),gd=ref$1(0),yd=ref$1(!1),vd=ref$1(!1),Nd=ref$1(!1),Md=ref$1();function Ld(){clearTimeout(gd.value),md.value=window.setTimeout(()=>hd.value=!0,pd.value)}function Fd(){clearTimeout(md.value),!yd.value&&!vd.value&&(gd.value=window.setTimeout(()=>hd.value=!1,fd.value))}function Hd(){hd.value=!1}return cc$2({open:hd,onOpenChange(Vd){hd.value=Vd},onOpen:Ld,onClose:Fd,onDismiss:Hd,hasSelectionRef:yd,isPointerDownOnContentRef:vd,isPointerInTransitRef:Nd,triggerElement:Md}),(Vd,Gd)=>(openBlock(),createBlock(unref(Ot$3),null,{default:withCtx(()=>[renderSlot(Vd.$slots,"default",{open:unref(hd)})]),_:3}))}});function Tn$3(Ra){return qa=>qa.pointerType==="touch"?void 0:Ra()}function fc$1(Ra){const qa=[],rd=document.createTreeWalker(Ra,NodeFilter.SHOW_ELEMENT,{acceptNode:sd=>sd.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;rd.nextNode();)qa.push(rd.currentNode);return qa}const Ih=defineComponent({__name:"HoverCardTrigger",props:{asChild:{type:Boolean},as:{default:"a"}},setup(Ra){const{forwardRef:qa,currentElement:rd}=R$6(),sd=wo$2();sd.triggerElement=rd;function pd(){setTimeout(()=>{!sd.isPointerInTransitRef.value&&!sd.open.value&&sd.onClose()},0)}return(fd,hd)=>(openBlock(),createBlock(unref(kt$4),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{ref:unref(qa),"as-child":fd.asChild,as:fd.as,"data-state":unref(sd).open.value?"open":"closed","data-grace-area-trigger":"",onPointerenter:hd[0]||(hd[0]=md=>unref(Tn$3)(unref(sd).onOpen)(md)),onPointerleave:hd[1]||(hd[1]=md=>unref(Tn$3)(pd)(md)),onFocus:hd[2]||(hd[2]=md=>unref(sd).onOpen()),onBlur:hd[3]||(hd[3]=md=>unref(sd).onClose())},{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},8,["as-child","as","data-state"])]),_:3}))}}),Th=defineComponent({__name:"HoverCardPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(ot$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),pc$1=defineComponent({__name:"HoverCardContentImpl",props:{side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=At$5(rd),{forwardRef:fd,currentElement:hd}=R$6(),md=wo$2(),{isPointerInTransit:gd,onPointerExit:yd}=kl$3(md.triggerElement,hd);fi$4(md.isPointerInTransitRef,gd,{direction:"rtl"}),yd(()=>{md.onClose()});const vd=ref$1(!1);let Nd;watchEffect(Ld=>{if(vd.value){const Fd=document.body;Nd=Fd.style.userSelect||Fd.style.webkitUserSelect,Fd.style.userSelect="none",Fd.style.webkitUserSelect="none",Ld(()=>{Fd.style.userSelect=Nd,Fd.style.webkitUserSelect=Nd})}});function Md(){vd.value=!1,md.isPointerDownOnContentRef.value=!1,nextTick$1(()=>{var Ld;((Ld=document.getSelection())==null?void 0:Ld.toString())!==""&&(md.hasSelectionRef.value=!0)})}return onMounted(()=>{hd.value&&(document.addEventListener("pointerup",Md),fc$1(hd.value).forEach(Ld=>Ld.setAttribute("tabindex","-1")))}),onUnmounted(()=>{document.removeEventListener("pointerup",Md),md.hasSelectionRef.value=!1,md.isPointerDownOnContentRef.value=!1}),(Ld,Fd)=>(openBlock(),createBlock(unref(gt$3),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:Fd[1]||(Fd[1]=Hd=>sd("escapeKeyDown",Hd)),onPointerDownOutside:Fd[2]||(Fd[2]=Hd=>sd("pointerDownOutside",Hd)),onFocusOutside:Fd[3]||(Fd[3]=withModifiers(Hd=>sd("focusOutside",Hd),["prevent"])),onDismiss:unref(md).onDismiss},{default:withCtx(()=>[createVNode(unref(Bt$4),mergeProps({...unref(pd),...Ld.$attrs},{ref:unref(fd),"data-state":unref(md).open.value?"open":"closed",style:{userSelect:vd.value?"text":void 0,WebkitUserSelect:vd.value?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"},onPointerdown:Fd[0]||(Fd[0]=Hd=>{Hd.currentTarget.contains(Hd.target)&&(vd.value=!0),unref(md).hasSelectionRef.value=!1,unref(md).isPointerDownOnContentRef.value=!0})}),{default:withCtx(()=>[renderSlot(Ld.$slots,"default")]),_:3},16,["data-state","style"])]),_:3},8,["onDismiss"]))}}),Rh=defineComponent({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa),{forwardRef:sd}=R$6(),pd=wo$2();return(fd,hd)=>(openBlock(),createBlock(unref(Pe$6),{present:fd.forceMount||unref(pd).open.value},{default:withCtx(()=>[createVNode(pc$1,mergeProps(unref(rd),{ref:unref(sd),onPointerenter:hd[0]||(hd[0]=md=>unref(Tn$3)(unref(pd).onOpen)(md))}),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Oh=defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{onMousedown:sd[0]||(sd[0]=pd=>{!pd.defaultPrevented&&pd.detail>1&&pd.preventDefault()})}),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),[tn$3,Oc$1]=Q$6("MenubarRoot"),Hh=defineComponent({__name:"MenubarRoot",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{forwardRef:pd,currentElement:fd}=R$6(),{createCollection:hd}=Me$7("menubar");hd(fd);const md=ne$5(rd,"modelValue",sd,{defaultValue:rd.defaultValue??"",passive:rd.modelValue===void 0}),gd=ref$1(null),{dir:yd,loop:vd}=toRefs(rd),Nd=be$8(yd);return Oc$1({modelValue:md,dir:Nd,loop:vd,onMenuOpen:Md=>{md.value=Md,gd.value=Md},onMenuClose:()=>{md.value=""},onMenuToggle:Md=>{md.value=md.value?"":Md,gd.value=Md}}),(Md,Ld)=>(openBlock(),createBlock(unref(Vt$3),{"current-tab-stop-id":gd.value,"onUpdate:currentTabStopId":Ld[0]||(Ld[0]=Fd=>gd.value=Fd),orientation:"horizontal",loop:unref(vd),dir:unref(Nd),"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{ref:unref(pd),role:"menubar"},{default:withCtx(()=>[renderSlot(Md.$slots,"default",{modelValue:unref(md)})]),_:3},512)]),_:3},8,["current-tab-stop-id","loop","dir"]))}}),[_o$2,kc$2]=Q$6("MenubarMenu"),Wh=defineComponent({__name:"MenubarMenu",props:{value:{}},setup(Ra){const qa=he$4(Ra.value),rd=tn$3();R$6();const sd=ref$1(),pd=ref$1(!1),fd=computed(()=>rd.modelValue.value===qa);return watch(fd,()=>{fd.value||(pd.value=!1)}),kc$2({value:qa,triggerElement:sd,triggerId:qa,contentId:"",wasKeyboardTriggerOpenRef:pd}),(hd,md)=>(openBlock(),createBlock(unref(oo$4),{open:fd.value,modal:!1,dir:unref(rd).dir.value,"onUpdate:open":md[0]||(md[0]=gd=>{gd||unref(rd).onMenuClose()})},{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},8,["open","dir"]))}}),jh=defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=tn$3(),rd=_o$2(),{forwardRef:sd,currentElement:pd}=R$6(),fd=ref$1(!1),hd=computed(()=>qa.modelValue.value===rd.value);return onMounted(()=>{rd.triggerElement=pd}),(md,gd)=>(openBlock(),createBlock(unref(Ft$4),{"as-child":"",focusable:!md.disabled,"tab-stop-id":unref(rd).value},{default:withCtx(()=>[createVNode(unref(Za$1),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{id:unref(rd).triggerId,ref:unref(sd),as:md.as,type:md.as==="button"?"button":void 0,role:"menuitem","aria-haspopup":"menu","aria-expanded":hd.value,"aria-controls":hd.value?unref(rd).contentId:void 0,"data-highlighted":fd.value?"":void 0,"data-state":hd.value?"open":"closed","data-disabled":md.disabled?"":void 0,disabled:md.disabled,"data-value":unref(rd).value,"data-radix-vue-collection-item":"",onPointerdown:gd[0]||(gd[0]=yd=>{!md.disabled&&yd.button===0&&yd.ctrlKey===!1&&(unref(qa).onMenuOpen(unref(rd).value),hd.value||yd.preventDefault())}),onPointerenter:gd[1]||(gd[1]=()=>{var yd;unref(qa).modelValue.value&&!hd.value&&(unref(qa).onMenuOpen(unref(rd).value),(yd=unref(pd))==null||yd.focus())}),onKeydown:gd[2]||(gd[2]=withKeys(yd=>{md.disabled||(["Enter"," "].includes(yd.key)&&unref(qa).onMenuToggle(unref(rd).value),yd.key==="ArrowDown"&&unref(qa).onMenuOpen(unref(rd).value),["Enter"," ","ArrowDown"].includes(yd.key)&&(unref(rd).wasKeyboardTriggerOpenRef.value=!0,yd.preventDefault()))},["enter","space","arrow-down"])),onFocus:gd[3]||(gd[3]=yd=>fd.value=!0),onBlur:gd[4]||(gd[4]=yd=>fd.value=!1)},{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},8,["id","as","type","aria-expanded","aria-controls","data-highlighted","data-state","data-disabled","disabled","data-value"])]),_:3})]),_:3},8,["focusable","tab-stop-id"]))}}),Uh=defineComponent({__name:"MenubarPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(fo$2),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),Gh=defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa);R$6();const sd=tn$3(),pd=_o$2();pd.contentId||(pd.contentId=he$4(void 0,"radix-vue-menubar-content"));const{injectCollection:fd}=Me$7("menubar"),hd=fd(),md=ref$1(!1);function gd(yd){const vd=yd.target.hasAttribute("data-radix-menubar-subtrigger"),Nd=(sd.dir.value==="rtl"?"ArrowRight":"ArrowLeft")===yd.key;if(!Nd&&vd)return;let Md=hd.value.map(Hd=>Hd.dataset.value);Nd&&Md.reverse();const Ld=Md.indexOf(pd.value);Md=sd.loop.value?qn$3(Md,Ld+1):Md.slice(Ld+1);const[Fd]=Md;Fd&&sd.onMenuOpen(Fd)}return(yd,vd)=>(openBlock(),createBlock(unref(uo$3),mergeProps(unref(rd),{id:unref(pd).contentId,"data-radix-menubar-content":"","aria-labelledby":unref(pd).triggerId,style:{"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:vd[0]||(vd[0]=Nd=>{var Md;!unref(sd).modelValue.value&&!md.value&&((Md=unref(pd).triggerElement.value)==null||Md.focus()),md.value=!1,Nd.preventDefault()}),onFocusOutside:vd[1]||(vd[1]=Nd=>{const Md=Nd.target;unref(hd).some(Ld=>Ld.contains(Md))&&Nd.preventDefault()}),onInteractOutside:vd[2]||(vd[2]=Nd=>{md.value=!0}),onEntryFocus:vd[3]||(vd[3]=Nd=>{unref(pd).wasKeyboardTriggerOpenRef.value||Nd.preventDefault()}),onKeydown:withKeys(gd,["arrow-right","arrow-left"])}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),Yh=defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);return R$6(),(pd,fd)=>(openBlock(),createBlock(unref(_a$3),normalizeProps(guardReactiveProps({...rd,...unref(sd)})),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16))}}),Zh=defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(mo$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),Jh=defineComponent({__name:"MenubarCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(Ra,{emit:qa}){const rd=Ra,sd=Ae$5(qa);return R$6(),(pd,fd)=>(openBlock(),createBlock(unref(io$3),normalizeProps(guardReactiveProps({...rd,...unref(sd)})),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16))}}),Qh=defineComponent({__name:"MenubarItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(ro$2),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),ny=defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa;R$6();const pd=ne$5(rd,"open",sd,{defaultValue:rd.defaultOpen??!1,passive:rd.open===void 0});return(fd,hd)=>(openBlock(),createBlock(unref(ho$2),{open:unref(pd),"onUpdate:open":hd[0]||(hd[0]=md=>isRef(pd)?pd.value=md:null)},{default:withCtx(()=>[renderSlot(fd.$slots,"default",{open:unref(pd)})]),_:3},8,["open"]))}}),oy=defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=xe$5(Ra,qa);R$6();const{injectCollection:sd}=Me$7("menubar"),pd=tn$3(),fd=_o$2(),hd=sd();function md(gd){if(gd.target.hasAttribute("data-radix-menubar-subtrigger"))return;let yd=hd.value.map(Md=>Md.dataset.value);const vd=yd.indexOf(fd.value);yd=pd.loop.value?qn$3(yd,vd+1):yd.slice(vd+1);const[Nd]=yd;Nd&&pd.onMenuOpen(Nd)}return(gd,yd)=>(openBlock(),createBlock(unref(yo$3),mergeProps(unref(rd),{"data-radix-menubar-content":"",style:{"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"},onKeydown:withKeys(md,["arrow-right"])}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16))}}),ly$1=defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return R$6(),(rd,sd)=>(openBlock(),createBlock(unref(go$3),mergeProps(qa,{"data-radix-menubar-subtrigger":""}),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}});function hs$1(Ra){const{disabled:qa}=Ra,rd=ref$1(),sd=ia$1(),pd=()=>window.clearTimeout(rd.value),fd=Md=>{pd(),!qa.value&&(sd.trigger(),rd.value=window.setTimeout(()=>{fd(60)},Md))},hd=()=>{fd(400)},md=()=>{pd()},gd=ref$1(!1),yd=computed(()=>$e$4(Ra.target)),vd=Md=>{Md.button!==0||gd.value||(Md.preventDefault(),gd.value=!0,hd())},Nd=()=>{gd.value=!1,md()};return Ye$4&&(Le$5(yd||window,"pointerdown",vd),Le$5(window,"pointerup",Nd),Le$5(window,"pointercancel",Nd)),{isPressed:gd,onTrigger:sd.on}}function Xo$2(Ra,qa=ref$1({})){return El$3(()=>new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(Ra.value,qa.value))}function zc$2(Ra,qa=ref$1({})){return El$3(()=>new $6c7bd7858deea686$export$cd11ab140839f11d(Ra.value,qa.value))}function Zo$3(Ra,qa,rd){let sd=Ra==="+"?qa+rd:qa-rd;if(qa%1!==0||rd%1!==0){const pd=qa.toString().split("."),fd=rd.toString().split("."),hd=pd[1]&&pd[1].length||0,md=fd[1]&&fd[1].length||0,gd=10**Math.max(hd,md);qa=Math.round(qa*gd),rd=Math.round(rd*gd),sd=Ra==="+"?qa+rd:qa-rd,sd/=gd}return sd}const Kc$2=["value","name","disabled","required"],[Eo$2,Hc$2]=Q$6("NumberFieldRoot"),my$1=defineComponent({inheritAttrs:!1,__name:"NumberFieldRoot",props:{defaultValue:{default:void 0},modelValue:{},min:{},max:{},step:{default:1},formatOptions:{},locale:{default:"en-US"},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},asChild:{type:Boolean},as:{default:"div"}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{disabled:pd,min:fd,max:hd,step:md,locale:gd,formatOptions:yd,id:vd}=toRefs(rd),Nd=ne$5(rd,"modelValue",sd,{defaultValue:rd.defaultValue,passive:rd.modelValue===void 0}),{primitiveElement:Md,currentElement:Ld}=Ie$5(),Fd=Qe$3(Ld),Hd=ref$1(),Vd=computed(()=>Cf(Nd.value)===fd.value||(fd.value&&!isNaN(Nd.value)?Zo$3("-",Nd.value,md.value)Cf(Nd.value)===hd.value||(hd.value&&!isNaN(Nd.value)?Zo$3("+",Nd.value,md.value)>hd.value:!1));function Ud(Sf,wf=1){var Pf;const lh=df.parse(((Pf=Hd.value)==null?void 0:Pf.value)??"");rd.disabled||(isNaN(lh)?Nd.value=fd.value??0:Sf==="increase"?Nd.value=Cf(lh+(md.value??1)*wf):Nd.value=Cf(lh-(md.value??1)*wf))}function qd(Sf=1){Ud("increase",Sf)}function Wd(Sf=1){Ud("decrease",Sf)}function Kd(Sf){Sf==="min"&&fd.value!==void 0?Nd.value=Cf(fd.value):Sf==="max"&&hd.value!==void 0&&(Nd.value=Cf(hd.value))}const Xd=Xo$2(gd,yd),df=zc$2(gd,yd),Ef=computed(()=>Xd.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),pf=Xo$2(gd,yd),mf=computed(()=>isNaN(Nd.value)?"":pf.format(Nd.value));function _f(Sf){return df.isValidPartialNumber(Sf,fd.value,hd.value)}function xf(Sf){Hd.value&&(Hd.value.value=Sf)}function Cf(Sf){let wf;return md.value===void 0||isNaN(md.value)?wf=jt$3(Sf,fd.value,hd.value):wf=zr$4(Sf,fd.value,hd.value,md.value),wf=df.parse(Xd.format(wf)),wf}function If(Sf){const wf=df.parse(Sf);return Nd.value=Cf(wf),Sf.length?xf(mf.value):xf(Sf)}return Hc$2({modelValue:Nd,handleDecrease:Wd,handleIncrease:qd,handleMinMaxValue:Kd,inputMode:Ef,inputEl:Hd,onInputElement:Sf=>Hd.value=Sf,textValue:mf,validate:_f,applyInputValue:If,disabled:pd,max:hd,min:fd,isDecreaseDisabled:Vd,isIncreaseDisabled:Gd,id:vd}),(Sf,wf)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps(Sf.$attrs,{ref_key:"primitiveElement",ref:Md,role:"group",as:Sf.as,"as-child":Sf.asChild,"data-disabled":unref(pd)?"":void 0}),{default:withCtx(()=>[renderSlot(Sf.$slots,"default",{modelValue:unref(Nd),textValue:mf.value})]),_:3},16,["as","as-child","data-disabled"]),unref(Fd)?(openBlock(),createElementBlock("input",{key:0,type:"text",tabindex:"-1","aria-hidden":"true",value:unref(Nd),name:rd.name,disabled:rd.disabled,required:rd.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Kc$2)):createCommentVNode("",!0)],64))}}),hy$1=defineComponent({__name:"NumberFieldInput",props:{asChild:{type:Boolean},as:{default:"input"}},setup(Ra){const qa=Ra,{primitiveElement:rd,currentElement:sd}=Ie$5(),pd=Eo$2();function fd(gd){gd.target===document.activeElement&&(Math.abs(gd.deltaY)<=Math.abs(gd.deltaX)||(gd.preventDefault(),gd.deltaY>0?pd.handleIncrease():gd.deltaY<0&&pd.handleDecrease()))}onMounted(()=>{pd.onInputElement(sd.value)});const hd=ref$1(pd.textValue.value);watch(()=>pd.textValue.value,()=>{hd.value=pd.textValue.value},{immediate:!0,deep:!0});function md(){requestAnimationFrame(()=>{hd.value=pd.textValue.value})}return(gd,yd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{id:unref(pd).id.value,ref_key:"primitiveElement",ref:rd,value:hd.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:unref(pd).inputMode.value,disabled:unref(pd).disabled.value?"":void 0,"data-disabled":unref(pd).disabled.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":unref(pd).modelValue.value,"aria-valuemin":unref(pd).min.value,"aria-valuemax":unref(pd).max.value,onKeydown:[yd[0]||(yd[0]=withKeys(withModifiers(vd=>unref(pd).handleIncrease(),["prevent"]),["up"])),yd[1]||(yd[1]=withKeys(withModifiers(vd=>unref(pd).handleDecrease(),["prevent"]),["down"])),yd[2]||(yd[2]=withKeys(withModifiers(vd=>unref(pd).handleIncrease(10),["prevent"]),["page-up"])),yd[3]||(yd[3]=withKeys(withModifiers(vd=>unref(pd).handleDecrease(10),["prevent"]),["page-down"])),yd[4]||(yd[4]=withKeys(withModifiers(vd=>unref(pd).handleMinMaxValue("min"),["prevent"]),["home"])),yd[5]||(yd[5]=withKeys(withModifiers(vd=>unref(pd).handleMinMaxValue("max"),["prevent"]),["end"])),yd[8]||(yd[8]=withKeys(vd=>{var Nd;return unref(pd).applyInputValue((Nd=vd.target)==null?void 0:Nd.value)},["enter"]))],onWheel:fd,onBeforeinput:yd[6]||(yd[6]=vd=>{const Nd=vd.target;let Md=Nd.value.slice(0,Nd.selectionStart??void 0)+(vd.data??"")+Nd.value.slice(Nd.selectionEnd??void 0);unref(pd).validate(Md)||vd.preventDefault()}),onInput:yd[7]||(yd[7]=vd=>{const Nd=vd.target;hd.value=Nd.value}),onChange:md,onBlur:yd[9]||(yd[9]=vd=>{var Nd;return unref(pd).applyInputValue((Nd=vd.target)==null?void 0:Nd.value)})}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","aria-valuenow","aria-valuemin","aria-valuemax"]))}}),yy$1=defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=Eo$2(),sd=computed(()=>{var gd;return((gd=rd.disabled)==null?void 0:gd.value)||qa.disabled||rd.isIncreaseDisabled.value}),{primitiveElement:pd,currentElement:fd}=Ie$5(),{isPressed:hd,onTrigger:md}=hs$1({target:fd,disabled:sd});return md(()=>{rd.handleIncrease()}),(gd,yd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{ref_key:"primitiveElement",ref:pd,tabindex:"-1","aria-label":"Increase",type:gd.as==="button"?"button":void 0,style:{userSelect:unref(hd)?"none":void 0},disabled:sd.value?"":void 0,"data-disabled":sd.value?"":void 0,"data-pressed":unref(hd)?"true":void 0,onContextmenu:yd[0]||(yd[0]=withModifiers(()=>{},["prevent"]))}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),gy$1=defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=Eo$2(),sd=computed(()=>{var gd;return((gd=rd.disabled)==null?void 0:gd.value)||qa.disabled||rd.isDecreaseDisabled.value}),{primitiveElement:pd,currentElement:fd}=Ie$5(),{isPressed:hd,onTrigger:md}=hs$1({target:fd,disabled:sd});return md(()=>{rd.handleDecrease()}),(gd,yd)=>(openBlock(),createBlock(unref(O$4),mergeProps(qa,{ref_key:"primitiveElement",ref:pd,tabindex:"-1","aria-label":"Decrease",type:gd.as==="button"?"button":void 0,style:{userSelect:unref(hd)?"none":void 0},disabled:sd.value?"":void 0,"data-disabled":sd.value?"":void 0,"data-pressed":unref(hd)?"true":void 0,onContextmenu:yd[0]||(yd[0]=withModifiers(()=>{},["prevent"]))}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),Mf=["default-value"],Vf=defineComponent({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(Ra){const qa=Ra,{value:rd}=toRefs(qa),sd=ref$1();return(pd,fd)=>(openBlock(),createBlock(unref(Zt$3),{"as-child":""},{default:withCtx(()=>[withDirectives(createBaseVNode("select",mergeProps({ref_key:"selectElement",ref:sd},qa,{"onUpdate:modelValue":fd[0]||(fd[0]=hd=>isRef(rd)?rd.value=hd:null),"default-value":unref(rd)}),[renderSlot(pd.$slots,"default")],16,Mf),[[vModelSelect,unref(rd)]])]),_:3}))}}),Ff={key:0,value:""},[wt$3,Bs$3]=Q$6("SelectRoot"),[Nf,Lf]=Q$6("SelectRoot"),Ny=defineComponent({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=ne$5(rd,"modelValue",sd,{defaultValue:rd.defaultValue,passive:rd.modelValue===void 0}),fd=ne$5(rd,"open",sd,{defaultValue:rd.defaultOpen,passive:rd.open===void 0}),hd=ref$1(),md=ref$1(),gd=ref$1({x:0,y:0}),yd=ref$1(!1),{required:vd,disabled:Nd,dir:Md}=toRefs(rd),Ld=be$8(Md);Bs$3({triggerElement:hd,onTriggerChange:Gd=>{hd.value=Gd},valueElement:md,onValueElementChange:Gd=>{md.value=Gd},valueElementHasChildren:yd,onValueElementHasChildrenChange:Gd=>{yd.value=Gd},contentId:"",modelValue:pd,onValueChange:Gd=>{pd.value=Gd},open:fd,required:vd,onOpenChange:Gd=>{fd.value=Gd},dir:Ld,triggerPointerDownPosRef:gd,disabled:Nd});const Fd=Qe$3(hd),Hd=ref$1(new Set),Vd=computed(()=>Array.from(Hd.value).map(Gd=>{var Ud;return(Ud=Gd.props)==null?void 0:Ud.value}).join(";"));return Lf({onNativeOptionAdd:Gd=>{Hd.value.add(Gd)},onNativeOptionRemove:Gd=>{Hd.value.delete(Gd)}}),(Gd,Ud)=>(openBlock(),createBlock(unref(Ot$3),null,{default:withCtx(()=>[renderSlot(Gd.$slots,"default",{modelValue:unref(pd),open:unref(fd)}),unref(Fd)?(openBlock(),createBlock(Vf,mergeProps({key:Vd.value},Gd.$attrs,{"aria-hidden":"true",tabindex:"-1",required:unref(vd),name:Gd.name,autocomplete:Gd.autocomplete,disabled:unref(Nd),value:unref(pd),onChange:Ud[0]||(Ud[0]=qd=>pd.value=qd.target.value)}),{default:withCtx(()=>[unref(pd)===void 0?(openBlock(),createElementBlock("option",Ff)):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Array.from(Hd.value),qd=>(openBlock(),createBlock(resolveDynamicComponent(qd),mergeProps({ref_for:!0},qd.props,{key:qd.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):createCommentVNode("",!0)]),_:3}))}}),zf=[" ","Enter","ArrowUp","ArrowDown"],Kf=[" ","Enter"],Ue$5=10;function Is$3(Ra){return Ra===""||vt$5(Ra)}const Ly=defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=wt$3(),sd=computed(()=>{var Ld;return((Ld=rd.disabled)==null?void 0:Ld.value)||qa.disabled}),{forwardRef:pd,currentElement:fd}=R$6();rd.contentId||(rd.contentId=he$4(void 0,"radix-vue-select-content")),onMounted(()=>{rd.triggerElement=fd});const{injectCollection:hd}=Me$7(),md=hd(),{search:gd,handleTypeaheadSearch:yd,resetTypeahead:vd}=ga$2(md);function Nd(){sd.value||(rd.onOpenChange(!0),vd())}function Md(Ld){Nd(),rd.triggerPointerDownPosRef.value={x:Math.round(Ld.pageX),y:Math.round(Ld.pageY)}}return(Ld,Fd)=>(openBlock(),createBlock(unref(kt$4),{"as-child":""},{default:withCtx(()=>{var Hd,Vd,Gd,Ud;return[createVNode(unref(O$4),{ref:unref(pd),role:"combobox",type:Ld.as==="button"?"button":void 0,"aria-controls":unref(rd).contentId,"aria-expanded":unref(rd).open.value||!1,"aria-required":(Hd=unref(rd).required)==null?void 0:Hd.value,"aria-autocomplete":"none",disabled:sd.value,dir:(Vd=unref(rd))==null?void 0:Vd.dir.value,"data-state":(Gd=unref(rd))!=null&&Gd.open.value?"open":"closed","data-disabled":sd.value?"":void 0,"data-placeholder":unref(Is$3)((Ud=unref(rd).modelValue)==null?void 0:Ud.value)?"":void 0,"as-child":Ld.asChild,as:Ld.as,onClick:Fd[0]||(Fd[0]=qd=>{var Wd;(Wd=qd==null?void 0:qd.currentTarget)==null||Wd.focus()}),onPointerdown:Fd[1]||(Fd[1]=qd=>{if(qd.pointerType==="touch")return qd.preventDefault();const Wd=qd.target;Wd.hasPointerCapture(qd.pointerId)&&Wd.releasePointerCapture(qd.pointerId),qd.button===0&&qd.ctrlKey===!1&&(Md(qd),qd.preventDefault())}),onPointerup:Fd[2]||(Fd[2]=withModifiers(qd=>{qd.pointerType==="touch"&&Md(qd)},["prevent"])),onKeydown:Fd[3]||(Fd[3]=qd=>{const Wd=unref(gd)!=="";!(qd.ctrlKey||qd.altKey||qd.metaKey)&&qd.key.length===1&&Wd&&qd.key===" "||(unref(yd)(qd.key),unref(zf).includes(qd.key)&&(Nd(),qd.preventDefault()))})},{default:withCtx(()=>[renderSlot(Ld.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),zy=defineComponent({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(ot$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),[$o$2,Hf$1]=Q$6("SelectItemAlignedPosition"),Wf=defineComponent({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{injectCollection:pd}=Me$7(),fd=wt$3(),hd=_t$3(),md=pd(),gd=ref$1(!1),yd=ref$1(!0),vd=ref$1(),{forwardRef:Nd,currentElement:Md}=R$6(),{viewport:Ld,selectedItem:Fd,selectedItemText:Hd,focusSelectedItem:Vd}=hd;function Gd(){if(fd.triggerElement.value&&fd.valueElement.value&&vd.value&&Md.value&&Ld!=null&&Ld.value&&Fd!=null&&Fd.value&&Hd!=null&&Hd.value){const Wd=fd.triggerElement.value.getBoundingClientRect(),Kd=Md.value.getBoundingClientRect(),Xd=fd.valueElement.value.getBoundingClientRect(),df=Hd.value.getBoundingClientRect();if(fd.dir.value!=="rtl"){const Df=df.left-Kd.left,Af=Xd.left-Df,_h=Wd.left-Af,Nh=Wd.width+_h,dm=Math.max(Nh,Kd.width),Jf=window.innerWidth-Ue$5,oh=jt$3(Af,Ue$5,Math.max(Ue$5,Jf-dm));vd.value.style.minWidth=`${Nh}px`,vd.value.style.left=`${oh}px`}else{const Df=Kd.right-df.right,Af=window.innerWidth-Xd.right-Df,_h=window.innerWidth-Wd.right-Af,Nh=Wd.width+_h,dm=Math.max(Nh,Kd.width),Jf=window.innerWidth-Ue$5,oh=jt$3(Af,Ue$5,Math.max(Ue$5,Jf-dm));vd.value.style.minWidth=`${Nh}px`,vd.value.style.right=`${oh}px`}const Ef=md.value,pf=window.innerHeight-Ue$5*2,mf=Ld.value.scrollHeight,_f=window.getComputedStyle(Md.value),xf=Number.parseInt(_f.borderTopWidth,10),Cf=Number.parseInt(_f.paddingTop,10),If=Number.parseInt(_f.borderBottomWidth,10),Sf=Number.parseInt(_f.paddingBottom,10),wf=xf+Cf+mf+Sf+If,Pf=Math.min(Fd.value.offsetHeight*5,wf),lh=window.getComputedStyle(Ld.value),xh=Number.parseInt(lh.paddingTop,10),Eh=Number.parseInt(lh.paddingBottom,10),Mh=Wd.top+Wd.height/2-Ue$5,dh=pf-Mh,eh=Fd.value.offsetHeight/2,fh=Fd.value.offsetTop+eh,Sh=xf+Cf+fh,vh=wf-Sh;if(Sh<=Mh){const Df=Fd.value===Ef[Ef.length-1];vd.value.style.bottom="0px";const Af=Md.value.clientHeight-Ld.value.offsetTop-Ld.value.offsetHeight,_h=Math.max(dh,eh+(Df?Eh:0)+Af+If),Nh=Sh+_h;vd.value.style.height=`${Nh}px`}else{const Df=Fd.value===Ef[0];vd.value.style.top="0px";const Af=Math.max(Mh,xf+Ld.value.offsetTop+(Df?xh:0)+eh)+vh;vd.value.style.height=`${Af}px`,Ld.value.scrollTop=Sh-Mh+Ld.value.offsetTop}vd.value.style.margin=`${Ue$5}px 0`,vd.value.style.minHeight=`${Pf}px`,vd.value.style.maxHeight=`${pf}px`,sd("placed"),requestAnimationFrame(()=>gd.value=!0)}}const Ud=ref$1("");onMounted(async()=>{await nextTick$1(),Gd(),Md.value&&(Ud.value=window.getComputedStyle(Md.value).zIndex)});function qd(Wd){Wd&&yd.value===!0&&(Gd(),Vd==null||Vd(),yd.value=!1)}return Hf$1({contentWrapper:vd,shouldExpandOnScrollRef:gd,onScrollButtonChange:qd}),(Wd,Kd)=>(openBlock(),createElementBlock("div",{ref_key:"contentWrapperElement",ref:vd,style:normalizeStyle({display:"flex",flexDirection:"column",position:"fixed",zIndex:Ud.value})},[createVNode(unref(O$4),mergeProps({ref:unref(Nd),style:{boxSizing:"border-box",maxHeight:"100%"}},{...Wd.$attrs,...rd}),{default:withCtx(()=>[renderSlot(Wd.$slots,"default")]),_:3},16)],4))}}),jf=defineComponent({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:Ue$5},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=At$5(Ra);return(rd,sd)=>(openBlock(),createBlock(unref(Bt$4),mergeProps(unref(qa),{style:{boxSizing:"border-box","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),Lt$3={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[_t$3,Uf]=Q$6("SelectContent"),Gf=defineComponent({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=wt$3();Gn$4(),ha$1(rd.bodyLock);const{createCollection:fd}=Me$7(),hd=ref$1();ya$1(hd);const md=fd(hd),{search:gd,handleTypeaheadSearch:yd}=ga$2(md),vd=ref$1(),Nd=ref$1(),Md=ref$1(),Ld=ref$1(!1),Fd=ref$1(!1);function Hd(){Nd.value&&hd.value&&$n$4([Nd.value,hd.value])}watch(Ld,()=>{Hd()});const{onOpenChange:Vd,triggerPointerDownPosRef:Gd}=pd;watchEffect(Kd=>{if(!hd.value)return;let Xd={x:0,y:0};const df=pf=>{var mf,_f;Xd={x:Math.abs(Math.round(pf.pageX)-(((mf=Gd.value)==null?void 0:mf.x)??0)),y:Math.abs(Math.round(pf.pageY)-(((_f=Gd.value)==null?void 0:_f.y)??0))}},Ef=pf=>{var mf;pf.pointerType!=="touch"&&(Xd.x<=10&&Xd.y<=10?pf.preventDefault():(mf=hd.value)!=null&&mf.contains(pf.target)||Vd(!1),document.removeEventListener("pointermove",df),Gd.value=null)};Gd.value!==null&&(document.addEventListener("pointermove",df),document.addEventListener("pointerup",Ef,{capture:!0,once:!0})),Kd(()=>{document.removeEventListener("pointermove",df),document.removeEventListener("pointerup",Ef,{capture:!0})})});function Ud(Kd){const Xd=Kd.ctrlKey||Kd.altKey||Kd.metaKey;if(Kd.key==="Tab"&&Kd.preventDefault(),!Xd&&Kd.key.length===1&&yd(Kd.key),["ArrowUp","ArrowDown","Home","End"].includes(Kd.key)){let df=md.value;if(["ArrowUp","End"].includes(Kd.key)&&(df=df.slice().reverse()),["ArrowUp","ArrowDown"].includes(Kd.key)){const Ef=Kd.target,pf=df.indexOf(Ef);df=df.slice(pf+1)}setTimeout(()=>$n$4(df)),Kd.preventDefault()}}const qd=computed(()=>rd.position==="popper"?rd:{}),Wd=At$5(qd.value);return Uf({content:hd,viewport:vd,onViewportChange:Kd=>{vd.value=Kd},itemRefCallback:(Kd,Xd,df)=>{var Ef,pf;const mf=!Fd.value&&!df;(((Ef=pd.modelValue)==null?void 0:Ef.value)!==void 0&&((pf=pd.modelValue)==null?void 0:pf.value)===Xd||mf)&&(Nd.value=Kd,mf&&(Fd.value=!0))},selectedItem:Nd,selectedItemText:Md,onItemLeave:()=>{var Kd;(Kd=hd.value)==null||Kd.focus()},itemTextRefCallback:(Kd,Xd,df)=>{var Ef,pf;const mf=!Fd.value&&!df;(((Ef=pd.modelValue)==null?void 0:Ef.value)!==void 0&&((pf=pd.modelValue)==null?void 0:pf.value)===Xd||mf)&&(Md.value=Kd)},focusSelectedItem:Hd,position:rd.position,isPositioned:Ld,searchRef:gd}),(Kd,Xd)=>(openBlock(),createBlock(unref(Ya$2),{"as-child":"",onMountAutoFocus:Xd[6]||(Xd[6]=withModifiers(()=>{},["prevent"])),onUnmountAutoFocus:Xd[7]||(Xd[7]=df=>{var Ef;sd("closeAutoFocus",df),!df.defaultPrevented&&((Ef=unref(pd).triggerElement.value)==null||Ef.focus({preventScroll:!0}),df.preventDefault())})},{default:withCtx(()=>[createVNode(unref(gt$3),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:Xd[2]||(Xd[2]=withModifiers(()=>{},["prevent"])),onDismiss:Xd[3]||(Xd[3]=df=>unref(pd).onOpenChange(!1)),onEscapeKeyDown:Xd[4]||(Xd[4]=df=>sd("escapeKeyDown",df)),onPointerDownOutside:Xd[5]||(Xd[5]=df=>sd("pointerDownOutside",df))},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(Kd.position==="popper"?jf:Wf),mergeProps({...Kd.$attrs,...unref(Wd)},{id:unref(pd).contentId,ref:df=>{hd.value=unref($e$4)(df)},role:"listbox","data-state":unref(pd).open.value?"open":"closed",dir:unref(pd).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:Xd[0]||(Xd[0]=withModifiers(()=>{},["prevent"])),onPlaced:Xd[1]||(Xd[1]=df=>Ld.value=!0),onKeydown:Ud}),{default:withCtx(()=>[renderSlot(Kd.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),qf=defineComponent({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(Ra){return Bs$3(Ra.context),(qa,rd)=>renderSlot(qa.$slots,"default")}}),Yf={key:1},Ky=defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=xe$5(rd,qa),pd=wt$3(),fd=ref$1();onMounted(()=>{fd.value=new DocumentFragment});const hd=ref$1(),md=computed(()=>rd.forceMount||pd.open.value);return(gd,yd)=>{var vd;return md.value?(openBlock(),createBlock(unref(Pe$6),{key:0,ref_key:"presenceRef",ref:hd,present:!0},{default:withCtx(()=>[createVNode(Gf,normalizeProps(guardReactiveProps({...unref(sd),...gd.$attrs})),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16)]),_:3},512)):!((vd=hd.value)!=null&&vd.present)&&fd.value?(openBlock(),createElementBlock("div",Yf,[(openBlock(),createBlock(Teleport,{to:fd.value},[createVNode(qf,{context:unref(pd)},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):createCommentVNode("",!0)}}}),[Ts$3,Xf]=Q$6("SelectItem"),jy=defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,{disabled:rd}=toRefs(qa),sd=wt$3(),pd=_t$3(Lt$3),{forwardRef:fd,currentElement:hd}=R$6(),md=computed(()=>{var Hd;return((Hd=sd.modelValue)==null?void 0:Hd.value)===qa.value}),gd=ref$1(!1),yd=ref$1(qa.textValue??""),vd=he$4(void 0,"radix-vue-select-item-text");async function Nd(Hd){await nextTick$1(),!(Hd!=null&&Hd.defaultPrevented)&&(rd.value||(sd.onValueChange(qa.value),sd.onOpenChange(!1)))}async function Md(Hd){var Vd;await nextTick$1(),!Hd.defaultPrevented&&(rd.value?(Vd=pd.onItemLeave)==null||Vd.call(pd):Hd.currentTarget.focus({preventScroll:!0}))}async function Ld(Hd){var Vd;await nextTick$1(),!Hd.defaultPrevented&&Hd.currentTarget===document.activeElement&&((Vd=pd.onItemLeave)==null||Vd.call(pd))}async function Fd(Hd){var Vd;await nextTick$1(),!(Hd.defaultPrevented||((Vd=pd.searchRef)==null?void 0:Vd.value)!==""&&Hd.key===" ")&&(Kf.includes(Hd.key)&&Nd(),Hd.key===" "&&Hd.preventDefault())}if(qa.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return onMounted(()=>{hd.value&&pd.itemRefCallback(hd.value,qa.value,qa.disabled)}),Xf({value:qa.value,disabled:rd,textId:vd,isSelected:md,onItemTextChange:Hd=>{yd.value=((yd.value||(Hd==null?void 0:Hd.textContent))??"").trim()}}),(Hd,Vd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(fd),role:"option","data-radix-vue-collection-item":"","aria-labelledby":unref(vd),"data-highlighted":gd.value?"":void 0,"aria-selected":md.value,"data-state":md.value?"checked":"unchecked","aria-disabled":unref(rd)||void 0,"data-disabled":unref(rd)?"":void 0,tabindex:unref(rd)?void 0:-1,as:Hd.as,"as-child":Hd.asChild,onFocus:Vd[0]||(Vd[0]=Gd=>gd.value=!0),onBlur:Vd[1]||(Vd[1]=Gd=>gd.value=!1),onPointerup:Nd,onPointerdown:Vd[2]||(Vd[2]=Gd=>{Gd.currentTarget.focus({preventScroll:!0})}),onTouchend:Vd[3]||(Vd[3]=withModifiers(()=>{},["prevent","stop"])),onPointermove:Md,onPointerleave:Ld,onKeydown:Fd},{default:withCtx(()=>[renderSlot(Hd.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),Uy=defineComponent({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const qa=Ra,rd=Ts$3();return(sd,pd)=>unref(rd).isSelected.value?(openBlock(),createBlock(unref(O$4),mergeProps({key:0,"aria-hidden":"true"},qa),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16)):createCommentVNode("",!0)}}),Yy=defineComponent({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const qa=Ra,rd=wt$3(),sd=_t$3(Lt$3),pd=Nf(),fd=Ts$3(),{forwardRef:hd,currentElement:md}=R$6(),gd=computed(()=>{var yd;return h$2("option",{key:fd.value,value:fd.value,disabled:fd.disabled.value,textContent:(yd=md.value)==null?void 0:yd.textContent})});return onMounted(()=>{md.value&&(fd.onItemTextChange(md.value),sd.itemTextRefCallback(md.value,fd.value,fd.disabled.value),pd.onNativeOptionAdd(gd.value))}),onBeforeUnmount(()=>{pd.onNativeOptionRemove(gd.value)}),(yd,vd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps({id:unref(fd).textId,ref:unref(hd)},{...qa,...yd.$attrs},{"data-item-text":""}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16,["id"]),unref(fd).isSelected.value&&unref(rd).valueElement.value&&!unref(rd).valueElementHasChildren.value?(openBlock(),createBlock(Teleport,{key:0,to:unref(rd).valueElement.value},[renderSlot(yd.$slots,"default")],8,["to"])):createCommentVNode("",!0)],64))}}),Xy=defineComponent({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,{nonce:rd}=toRefs(qa),sd=Xa$2(rd),pd=_t$3(Lt$3),fd=pd.position==="item-aligned"?$o$2():void 0,{forwardRef:hd,currentElement:md}=R$6();onMounted(()=>{pd==null||pd.onViewportChange(md.value)});const gd=ref$1(0);function yd(vd){const Nd=vd.currentTarget,{shouldExpandOnScrollRef:Md,contentWrapper:Ld}=fd??{};if(Md!=null&&Md.value&&Ld!=null&&Ld.value){const Fd=Math.abs(gd.value-Nd.scrollTop);if(Fd>0){const Hd=window.innerHeight-Ue$5*2,Vd=Number.parseFloat(Ld.value.style.minHeight),Gd=Number.parseFloat(Ld.value.style.height),Ud=Math.max(Vd,Gd);if(Ud0?Kd:0,Ld.value.style.justifyContent="flex-end")}}}gd.value=Nd.scrollTop}return(vd,Nd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps({ref:unref(hd),"data-radix-select-viewport":"",role:"presentation"},{...vd.$attrs,...qa},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:yd}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16),createVNode(unref(O$4),{as:"style",nonce:unref(sd)},{default:withCtx(()=>[createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),Rs$1=defineComponent({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(Ra,{emit:qa}){const rd=qa,{injectCollection:sd}=Me$7(),pd=sd(),fd=_t$3(Lt$3),hd=ref$1(null);function md(){hd.value!==null&&(window.clearInterval(hd.value),hd.value=null)}watchEffect(()=>{const vd=pd.value.find(Nd=>Nd===document.activeElement);vd==null||vd.scrollIntoView({block:"nearest"})});function gd(){hd.value===null&&(hd.value=window.setInterval(()=>{rd("autoScroll")},50))}function yd(){var vd;(vd=fd.onItemLeave)==null||vd.call(fd),hd.value===null&&(hd.value=window.setInterval(()=>{rd("autoScroll")},50))}return onBeforeUnmount(()=>md()),(vd,Nd)=>{var Md;return openBlock(),createBlock(unref(O$4),mergeProps({"aria-hidden":"true",style:{flexShrink:0}},(Md=vd.$parent)==null?void 0:Md.$props,{onPointerdown:gd,onPointermove:yd,onPointerleave:Nd[0]||(Nd[0]=()=>{md()})}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16)}}}),Zy=defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=_t$3(Lt$3),rd=qa.position==="item-aligned"?$o$2():void 0,{forwardRef:sd,currentElement:pd}=R$6(),fd=ref$1(!1);return watchEffect(hd=>{var md,gd;if((md=qa.viewport)!=null&&md.value&&(gd=qa.isPositioned)!=null&&gd.value){let yd=function(){fd.value=vd.scrollTop>0};const vd=qa.viewport.value;yd(),vd.addEventListener("scroll",yd),hd(()=>vd.removeEventListener("scroll",yd))}}),watch(pd,()=>{pd.value&&(rd==null||rd.onScrollButtonChange(pd.value))}),(hd,md)=>fd.value?(openBlock(),createBlock(Rs$1,{key:0,ref:unref(sd),onAutoScroll:md[0]||(md[0]=()=>{const{viewport:gd,selectedItem:yd}=unref(qa);gd!=null&&gd.value&&yd!=null&&yd.value&&(gd.value.scrollTop=gd.value.scrollTop-yd.value.offsetHeight)})},{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},512)):createCommentVNode("",!0)}}),Jy=defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=_t$3(Lt$3),rd=qa.position==="item-aligned"?$o$2():void 0,{forwardRef:sd,currentElement:pd}=R$6(),fd=ref$1(!1);return watchEffect(hd=>{var md,gd;if((md=qa.viewport)!=null&&md.value&&(gd=qa.isPositioned)!=null&&gd.value){let yd=function(){const Nd=vd.scrollHeight-vd.clientHeight;fd.value=Math.ceil(vd.scrollTop)vd.removeEventListener("scroll",yd))}}),watch(pd,()=>{pd.value&&(rd==null||rd.onScrollButtonChange(pd.value))}),(hd,md)=>fd.value?(openBlock(),createBlock(Rs$1,{key:0,ref:unref(sd),onAutoScroll:md[0]||(md[0]=()=>{const{viewport:gd,selectedItem:yd}=unref(qa);gd!=null&&gd.value&&yd!=null&&yd.value&&(gd.value.scrollTop=gd.value.scrollTop+yd.value.offsetHeight)})},{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},512)):createCommentVNode("",!0)}}),Qy=defineComponent({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const{forwardRef:qa,currentElement:rd}=R$6(),sd=wt$3(),pd=useSlots();return onBeforeMount(()=>{var fd;const hd=!!Ua$3((fd=pd==null?void 0:pd.default)==null?void 0:fd.call(pd)).length;sd.onValueElementHasChildrenChange(hd)}),onMounted(()=>{sd.valueElement=rd}),(fd,hd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(qa),as:fd.as,"as-child":fd.asChild,style:{pointerEvents:"none"}},{default:withCtx(()=>{var md;return[unref(Is$3)((md=unref(sd).modelValue)==null?void 0:md.value)?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(fd.placeholder),1)],64)):renderSlot(fd.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),eg=defineComponent({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){return(qa,rd)=>(openBlock(),createBlock(unref(O$4),{"aria-hidden":"true",as:qa.as,"as-child":qa.asChild},{default:withCtx(()=>[renderSlot(qa.$slots,"default",{},()=>[createTextVNode("▼")])]),_:3},8,["as","as-child"]))}}),As$3=defineComponent({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,rd=["horizontal","vertical"];function sd(md){return rd.includes(md)}const pd=computed(()=>sd(qa.orientation)?qa.orientation:"horizontal"),fd=computed(()=>pd.value==="vertical"?qa.orientation:void 0),hd=computed(()=>qa.decorative?{role:"none"}:{"aria-orientation":fd.value,role:"separator"});return(md,gd)=>(openBlock(),createBlock(unref(O$4),mergeProps({as:md.as,"as-child":md.asChild,"data-orientation":pd.value},hd.value),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),Qf=defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(As$3,normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}});function Cp$1(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}Cp$1();const Np$1=["name","disabled","required","value","checked","data-state","data-disabled"],[Lp$1,zp$1]=Q$6("SwitchRoot"),mg=defineComponent({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{disabled:pd}=toRefs(rd),fd=ne$5(rd,"checked",sd,{defaultValue:rd.defaultChecked,passive:rd.checked===void 0});function hd(){pd.value||(fd.value=!fd.value)}const{forwardRef:md,currentElement:gd}=R$6(),yd=Qe$3(gd),vd=computed(()=>{var Nd;return rd.id&&gd.value?(Nd=document.querySelector(`[for="${rd.id}"]`))==null?void 0:Nd.innerText:void 0});return zp$1({checked:fd,toggleCheck:hd,disabled:pd}),(Nd,Md)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps(Nd.$attrs,{id:Nd.id,ref:unref(md),role:"switch",type:Nd.as==="button"?"button":void 0,value:Nd.value,"aria-label":Nd.$attrs["aria-label"]||vd.value,"aria-checked":unref(fd),"aria-required":Nd.required,"data-state":unref(fd)?"checked":"unchecked","data-disabled":unref(pd)?"":void 0,"as-child":Nd.asChild,as:Nd.as,disabled:unref(pd),onClick:hd,onKeydown:withKeys(withModifiers(hd,["prevent"]),["enter"])}),{default:withCtx(()=>[renderSlot(Nd.$slots,"default",{checked:unref(fd)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),unref(yd)?(openBlock(),createElementBlock("input",{key:0,type:"checkbox",name:Nd.name,tabindex:"-1","aria-hidden":"true",disabled:unref(pd),required:Nd.required,value:Nd.value,checked:!!unref(fd),"data-state":unref(fd)?"checked":"unchecked","data-disabled":unref(pd)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Np$1)):createCommentVNode("",!0)],64))}}),hg=defineComponent({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const qa=Lp$1();return R$6(),(rd,sd)=>{var pd;return openBlock(),createBlock(unref(O$4),{"data-state":(pd=unref(qa).checked)!=null&&pd.value?"checked":"unchecked","data-disabled":unref(qa).disabled.value?"":void 0,"as-child":rd.asChild,as:rd.as},{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[fn$4,Kp$1]=Q$6("TabsRoot"),yg=defineComponent({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,{orientation:pd,dir:fd}=toRefs(rd),hd=be$8(fd);R$6();const md=ne$5(rd,"modelValue",sd,{defaultValue:rd.defaultValue,passive:rd.modelValue===void 0}),gd=ref$1();return Kp$1({modelValue:md,changeModelValue:yd=>{md.value=yd},orientation:pd,dir:hd,activationMode:rd.activationMode,baseId:he$4(void 0,"radix-vue-tabs"),tabsList:gd}),(yd,vd)=>(openBlock(),createBlock(unref(O$4),{dir:unref(hd),"data-orientation":unref(pd),"as-child":yd.asChild,as:yd.as},{default:withCtx(()=>[renderSlot(yd.$slots,"default",{modelValue:unref(md)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),gg$1=defineComponent({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,{loop:rd}=toRefs(qa),{forwardRef:sd,currentElement:pd}=R$6(),fd=fn$4();return fd.tabsList=pd,(hd,md)=>(openBlock(),createBlock(unref(Vt$3),{"as-child":"",orientation:unref(fd).orientation.value,dir:unref(fd).dir.value,loop:unref(rd)},{default:withCtx(()=>[createVNode(unref(O$4),{ref:unref(sd),role:"tablist","as-child":hd.asChild,as:hd.as,"aria-orientation":unref(fd).orientation.value},{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}});function lr$2(Ra,qa){return`${Ra}-trigger-${qa}`}function sr$3(Ra,qa){return`${Ra}-content-${qa}`}const bg$1=defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra,{forwardRef:rd}=R$6(),sd=fn$4(),pd=computed(()=>lr$2(sd.baseId,qa.value)),fd=computed(()=>sr$3(sd.baseId,qa.value)),hd=computed(()=>qa.value===sd.modelValue.value),md=ref$1(hd.value);return onMounted(()=>{requestAnimationFrame(()=>{md.value=!1})}),(gd,yd)=>(openBlock(),createBlock(unref(Pe$6),{present:hd.value,"force-mount":""},{default:withCtx(({present:vd})=>[createVNode(unref(O$4),{id:fd.value,ref:unref(rd),"as-child":gd.asChild,as:gd.as,role:"tabpanel","data-state":hd.value?"active":"inactive","data-orientation":unref(sd).orientation.value,"aria-labelledby":pd.value,hidden:!vd.value,tabindex:"0",style:normalizeStyle({animationDuration:md.value?"0s":void 0})},{default:withCtx(()=>[gd.forceMount||hd.value?renderSlot(gd.$slots,"default",{key:0}):createCommentVNode("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),Cg=defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,{forwardRef:rd}=R$6(),sd=fn$4(),pd=computed(()=>lr$2(sd.baseId,qa.value)),fd=computed(()=>sr$3(sd.baseId,qa.value)),hd=computed(()=>qa.value===sd.modelValue.value);return(md,gd)=>(openBlock(),createBlock(unref(Ft$4),{"as-child":"",focusable:!md.disabled,active:hd.value},{default:withCtx(()=>[createVNode(unref(O$4),{id:pd.value,ref:unref(rd),role:"tab",type:md.as==="button"?"button":void 0,as:md.as,"as-child":md.asChild,"aria-selected":hd.value?"true":"false","aria-controls":fd.value,"data-state":hd.value?"active":"inactive",disabled:md.disabled,"data-disabled":md.disabled?"":void 0,"data-orientation":unref(sd).orientation.value,onMousedown:gd[0]||(gd[0]=withModifiers(yd=>{!md.disabled&&yd.ctrlKey===!1?unref(sd).changeModelValue(md.value):yd.preventDefault()},["left"])),onKeydown:gd[1]||(gd[1]=withKeys(yd=>unref(sd).changeModelValue(md.value),["enter","space"])),onFocus:gd[2]||(gd[2]=()=>{const yd=unref(sd).activationMode!=="manual";!hd.value&&!md.disabled&&yd&&unref(sd).changeModelValue(md.value)})},{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),cr$4="tooltip.open",[Oo$2,uv]=Q$6("TooltipProvider"),Lg=defineComponent({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(Ra){const qa=Ra,{delayDuration:rd,skipDelayDuration:sd,disableHoverableContent:pd,disableClosingTrigger:fd,ignoreNonKeyboardFocus:hd,disabled:md}=toRefs(qa);R$6();const gd=ref$1(!0),yd=ref$1(!1),{start:vd,stop:Nd}=Wn$3(()=>{gd.value=!0},sd,{immediate:!1});return uv({isOpenDelayed:gd,delayDuration:rd,onOpen(){Nd(),gd.value=!1},onClose(){vd()},isPointerInTransitRef:yd,disableHoverableContent:pd,disableClosingTrigger:fd,disabled:md,ignoreNonKeyboardFocus:hd}),(Md,Ld)=>renderSlot(Md.$slots,"default")}}),[mn$3,dv]=Q$6("TooltipRoot"),zg=defineComponent({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa;R$6();const pd=Oo$2(),fd=computed(()=>rd.disableHoverableContent??pd.disableHoverableContent.value),hd=computed(()=>rd.disableClosingTrigger??pd.disableClosingTrigger.value),md=computed(()=>rd.disabled??pd.disabled.value),gd=computed(()=>rd.delayDuration??pd.delayDuration.value),yd=computed(()=>rd.ignoreNonKeyboardFocus??pd.ignoreNonKeyboardFocus.value),vd=ne$5(rd,"open",sd,{defaultValue:rd.defaultOpen,passive:rd.open===void 0});watch(vd,qd=>{pd.onClose&&(qd?(pd.onOpen(),document.dispatchEvent(new CustomEvent(cr$4))):pd.onClose())});const Nd=ref$1(!1),Md=ref$1(),Ld=computed(()=>vd.value?Nd.value?"delayed-open":"instant-open":"closed"),{start:Fd,stop:Hd}=Wn$3(()=>{Nd.value=!0,vd.value=!0},gd,{immediate:!1});function Vd(){Hd(),Nd.value=!1,vd.value=!0}function Gd(){Hd(),vd.value=!1}function Ud(){Fd()}return dv({contentId:"",open:vd,stateAttribute:Ld,trigger:Md,onTriggerChange(qd){Md.value=qd},onTriggerEnter(){pd.isOpenDelayed.value?Ud():Vd()},onTriggerLeave(){fd.value?Gd():Hd()},onOpen:Vd,onClose:Gd,disableHoverableContent:fd,disableClosingTrigger:hd,disabled:md,ignoreNonKeyboardFocus:yd}),(qd,Wd)=>(openBlock(),createBlock(unref(Ot$3),null,{default:withCtx(()=>[renderSlot(qd.$slots,"default",{open:unref(vd)})]),_:3}))}}),Kg=defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra,rd=mn$3(),sd=Oo$2();rd.contentId||(rd.contentId=he$4(void 0,"radix-vue-tooltip-content"));const{forwardRef:pd,currentElement:fd}=R$6(),hd=ref$1(!1),md=ref$1(!1),gd=computed(()=>rd.disabled.value?{}:{click:Hd,focus:Ld,pointermove:Nd,pointerleave:Md,pointerdown:vd,blur:Fd});onMounted(()=>{rd.onTriggerChange(fd.value)});function yd(){setTimeout(()=>{hd.value=!1},1)}function vd(){hd.value=!0,document.addEventListener("pointerup",yd,{once:!0})}function Nd(Vd){Vd.pointerType!=="touch"&&!md.value&&!sd.isPointerInTransitRef.value&&(rd.onTriggerEnter(),md.value=!0)}function Md(){rd.onTriggerLeave(),md.value=!1}function Ld(Vd){var Gd,Ud;hd.value||rd.ignoreNonKeyboardFocus.value&&!((Ud=(Gd=Vd.target).matches)!=null&&Ud.call(Gd,":focus-visible"))||rd.onOpen()}function Fd(){rd.onClose()}function Hd(){rd.disableClosingTrigger.value||rd.onClose()}return(Vd,Gd)=>(openBlock(),createBlock(unref(kt$4),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),mergeProps({ref:unref(pd),"aria-describedby":unref(rd).open.value?unref(rd).contentId:void 0,"data-state":unref(rd).stateAttribute.value,as:Vd.as,"as-child":qa.asChild,"data-grace-area-trigger":""},toHandlers(gd.value)),{default:withCtx(()=>[renderSlot(Vd.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),fr$2=defineComponent({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=mn$3(),{forwardRef:fd}=R$6(),hd=useSlots(),md=computed(()=>{var vd;return(vd=hd.default)==null?void 0:vd.call(hd)}),gd=computed(()=>{var vd;if(rd.ariaLabel)return rd.ariaLabel;let Nd="";function Md(Ld){typeof Ld.children=="string"&&Ld.type!==Comment$2?Nd+=Ld.children:Array.isArray(Ld.children)&&Ld.children.forEach(Fd=>Md(Fd))}return(vd=md.value)==null||vd.forEach(Ld=>Md(Ld)),Nd}),yd=computed(()=>{const{ariaLabel:vd,...Nd}=rd;return Nd});return onMounted(()=>{Le$5(window,"scroll",vd=>{const Nd=vd.target;Nd!=null&&Nd.contains(pd.trigger.value)&&pd.onClose()}),Le$5(window,cr$4,pd.onClose)}),(vd,Nd)=>(openBlock(),createBlock(unref(gt$3),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:Nd[0]||(Nd[0]=Md=>sd("escapeKeyDown",Md)),onPointerDownOutside:Nd[1]||(Nd[1]=Md=>{var Ld;unref(pd).disableClosingTrigger.value&&(Ld=unref(pd).trigger.value)!=null&&Ld.contains(Md.target)&&Md.preventDefault(),sd("pointerDownOutside",Md)}),onFocusOutside:Nd[2]||(Nd[2]=withModifiers(()=>{},["prevent"])),onDismiss:Nd[3]||(Nd[3]=Md=>unref(pd).onClose())},{default:withCtx(()=>[createVNode(unref(Bt$4),mergeProps({ref:unref(fd),"data-state":unref(pd).stateAttribute.value},{...vd.$attrs,...yd.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:withCtx(()=>[renderSlot(vd.$slots,"default"),createVNode(unref(Zt$3),{id:unref(pd).contentId,role:"tooltip"},{default:withCtx(()=>[createTextVNode(toDisplayString(gd.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),cv$1=defineComponent({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(Ra){const qa=At$5(Ra),{forwardRef:rd,currentElement:sd}=R$6(),{trigger:pd,onClose:fd}=mn$3(),hd=Oo$2(),{isPointerInTransit:md,onPointerExit:gd}=kl$3(pd,sd);return hd.isPointerInTransitRef=md,gd(()=>{fd()}),(yd,vd)=>(openBlock(),createBlock(fr$2,mergeProps({ref:unref(rd)},unref(qa)),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16))}}),Hg=defineComponent({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=mn$3(),fd=xe$5(rd,sd),{forwardRef:hd}=R$6();return(md,gd)=>(openBlock(),createBlock(unref(Pe$6),{present:md.forceMount||unref(pd).open.value},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(pd).disableHoverableContent.value?fr$2:cv$1),mergeProps({ref:unref(hd)},unref(fd)),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),jg=defineComponent({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(ot$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_sfc_main$1r=defineComponent({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref($v),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}});function r$2(Ra){var qa,rd,sd="";if(typeof Ra=="string"||typeof Ra=="number")sd+=Ra;else if(typeof Ra=="object")if(Array.isArray(Ra)){var pd=Ra.length;for(qa=0;qa{const qa=createClassMap(Ra),{conflictingClassGroups:rd,conflictingClassGroupModifiers:sd}=Ra;return{getClassGroupId:hd=>{const md=hd.split(CLASS_PART_SEPARATOR);return md[0]===""&&md.length!==1&&md.shift(),getGroupRecursive(md,qa)||getGroupIdForArbitraryProperty(hd)},getConflictingClassGroupIds:(hd,md)=>{const gd=rd[hd]||[];return md&&sd[hd]?[...gd,...sd[hd]]:gd}}},getGroupRecursive=(Ra,qa)=>{var hd;if(Ra.length===0)return qa.classGroupId;const rd=Ra[0],sd=qa.nextPart.get(rd),pd=sd?getGroupRecursive(Ra.slice(1),sd):void 0;if(pd)return pd;if(qa.validators.length===0)return;const fd=Ra.join(CLASS_PART_SEPARATOR);return(hd=qa.validators.find(({validator:md})=>md(fd)))==null?void 0:hd.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=Ra=>{if(arbitraryPropertyRegex.test(Ra)){const qa=arbitraryPropertyRegex.exec(Ra)[1],rd=qa==null?void 0:qa.substring(0,qa.indexOf(":"));if(rd)return"arbitrary.."+rd}},createClassMap=Ra=>{const{theme:qa,prefix:rd}=Ra,sd={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(Ra.classGroups),rd).forEach(([fd,hd])=>{processClassesRecursively(hd,sd,fd,qa)}),sd},processClassesRecursively=(Ra,qa,rd,sd)=>{Ra.forEach(pd=>{if(typeof pd=="string"){const fd=pd===""?qa:getPart(qa,pd);fd.classGroupId=rd;return}if(typeof pd=="function"){if(isThemeGetter(pd)){processClassesRecursively(pd(sd),qa,rd,sd);return}qa.validators.push({validator:pd,classGroupId:rd});return}Object.entries(pd).forEach(([fd,hd])=>{processClassesRecursively(hd,getPart(qa,fd),rd,sd)})})},getPart=(Ra,qa)=>{let rd=Ra;return qa.split(CLASS_PART_SEPARATOR).forEach(sd=>{rd.nextPart.has(sd)||rd.nextPart.set(sd,{nextPart:new Map,validators:[]}),rd=rd.nextPart.get(sd)}),rd},isThemeGetter=Ra=>Ra.isThemeGetter,getPrefixedClassGroupEntries=(Ra,qa)=>qa?Ra.map(([rd,sd])=>{const pd=sd.map(fd=>typeof fd=="string"?qa+fd:typeof fd=="object"?Object.fromEntries(Object.entries(fd).map(([hd,md])=>[qa+hd,md])):fd);return[rd,pd]}):Ra,createLruCache=Ra=>{if(Ra<1)return{get:()=>{},set:()=>{}};let qa=0,rd=new Map,sd=new Map;const pd=(fd,hd)=>{rd.set(fd,hd),qa++,qa>Ra&&(qa=0,sd=rd,rd=new Map)};return{get(fd){let hd=rd.get(fd);if(hd!==void 0)return hd;if((hd=sd.get(fd))!==void 0)return pd(fd,hd),hd},set(fd,hd){rd.has(fd)?rd.set(fd,hd):pd(fd,hd)}}},IMPORTANT_MODIFIER="!",createParseClassName=Ra=>{const{separator:qa,experimentalParseClassName:rd}=Ra,sd=qa.length===1,pd=qa[0],fd=qa.length,hd=md=>{const gd=[];let yd=0,vd=0,Nd;for(let Vd=0;Vdvd?Nd-vd:void 0;return{modifiers:gd,hasImportantModifier:Ld,baseClassName:Fd,maybePostfixModifierPosition:Hd}};return rd?md=>rd({className:md,parseClassName:hd}):hd},sortModifiers=Ra=>{if(Ra.length<=1)return Ra;const qa=[];let rd=[];return Ra.forEach(sd=>{sd[0]==="["?(qa.push(...rd.sort(),sd),rd=[]):rd.push(sd)}),qa.push(...rd.sort()),qa},createConfigUtils=Ra=>({cache:createLruCache(Ra.cacheSize),parseClassName:createParseClassName(Ra),...createClassGroupUtils(Ra)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(Ra,qa)=>{const{parseClassName:rd,getClassGroupId:sd,getConflictingClassGroupIds:pd}=qa,fd=[],hd=Ra.trim().split(SPLIT_CLASSES_REGEX);let md="";for(let gd=hd.length-1;gd>=0;gd-=1){const yd=hd[gd],{modifiers:vd,hasImportantModifier:Nd,baseClassName:Md,maybePostfixModifierPosition:Ld}=rd(yd);let Fd=!!Ld,Hd=sd(Fd?Md.substring(0,Ld):Md);if(!Hd){if(!Fd){md=yd+(md.length>0?" "+md:md);continue}if(Hd=sd(Md),!Hd){md=yd+(md.length>0?" "+md:md);continue}Fd=!1}const Vd=sortModifiers(vd).join(":"),Gd=Nd?Vd+IMPORTANT_MODIFIER:Vd,Ud=Gd+Hd;if(fd.includes(Ud))continue;fd.push(Ud);const qd=pd(Hd,Fd);for(let Wd=0;Wd0?" "+md:md)}return md};function twJoin(){let Ra=0,qa,rd,sd="";for(;Ra{if(typeof Ra=="string")return Ra;let qa,rd="";for(let sd=0;sdNd(vd),Ra());return rd=createConfigUtils(yd),sd=rd.cache.get,pd=rd.cache.set,fd=md,md(gd)}function md(gd){const yd=sd(gd);if(yd)return yd;const vd=mergeClassList(gd,rd);return pd(gd,vd),vd}return function(){return fd(twJoin.apply(null,arguments))}}const fromTheme=Ra=>{const qa=rd=>rd[Ra]||[];return qa.isThemeGetter=!0,qa},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength$1=Ra=>isNumber$3(Ra)||stringLengths.has(Ra)||fractionRegex.test(Ra),isArbitraryLength=Ra=>getIsArbitraryValue(Ra,"length",isLengthOnly),isNumber$3=Ra=>!!Ra&&!Number.isNaN(Number(Ra)),isArbitraryNumber=Ra=>getIsArbitraryValue(Ra,"number",isNumber$3),isInteger$2=Ra=>!!Ra&&Number.isInteger(Number(Ra)),isPercent=Ra=>Ra.endsWith("%")&&isNumber$3(Ra.slice(0,-1)),isArbitraryValue=Ra=>arbitraryValueRegex.test(Ra),isTshirtSize=Ra=>tshirtUnitRegex.test(Ra),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=Ra=>getIsArbitraryValue(Ra,sizeLabels,isNever),isArbitraryPosition=Ra=>getIsArbitraryValue(Ra,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=Ra=>getIsArbitraryValue(Ra,imageLabels,isImage),isArbitraryShadow=Ra=>getIsArbitraryValue(Ra,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(Ra,qa,rd)=>{const sd=arbitraryValueRegex.exec(Ra);return sd?sd[1]?typeof qa=="string"?sd[1]===qa:qa.has(sd[1]):rd(sd[2]):!1},isLengthOnly=Ra=>lengthUnitRegex.test(Ra)&&!colorFunctionRegex.test(Ra),isNever=()=>!1,isShadow=Ra=>shadowRegex.test(Ra),isImage=Ra=>imageRegex.test(Ra),getDefaultConfig=()=>{const Ra=fromTheme("colors"),qa=fromTheme("spacing"),rd=fromTheme("blur"),sd=fromTheme("brightness"),pd=fromTheme("borderColor"),fd=fromTheme("borderRadius"),hd=fromTheme("borderSpacing"),md=fromTheme("borderWidth"),gd=fromTheme("contrast"),yd=fromTheme("grayscale"),vd=fromTheme("hueRotate"),Nd=fromTheme("invert"),Md=fromTheme("gap"),Ld=fromTheme("gradientColorStops"),Fd=fromTheme("gradientColorStopPositions"),Hd=fromTheme("inset"),Vd=fromTheme("margin"),Gd=fromTheme("opacity"),Ud=fromTheme("padding"),qd=fromTheme("saturate"),Wd=fromTheme("scale"),Kd=fromTheme("sepia"),Xd=fromTheme("skew"),df=fromTheme("space"),Ef=fromTheme("translate"),pf=()=>["auto","contain","none"],mf=()=>["auto","hidden","clip","visible","scroll"],_f=()=>["auto",isArbitraryValue,qa],xf=()=>[isArbitraryValue,qa],Cf=()=>["",isLength$1,isArbitraryLength],If=()=>["auto",isNumber$3,isArbitraryValue],Sf=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],wf=()=>["solid","dashed","dotted","double","none"],Pf=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],lh=()=>["start","end","center","between","around","evenly","stretch"],xh=()=>["","0",isArbitraryValue],Eh=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Mh=()=>[isNumber$3,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength$1,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:Mh(),borderColor:[Ra],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:xf(),borderWidth:Cf(),contrast:Mh(),grayscale:xh(),hueRotate:Mh(),invert:xh(),gap:xf(),gradientColorStops:[Ra],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:_f(),margin:_f(),opacity:Mh(),padding:xf(),saturate:Mh(),scale:Mh(),sepia:xh(),skew:Mh(),space:xf(),translate:xf()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":Eh()}],"break-before":[{"break-before":Eh()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Sf(),isArbitraryValue]}],overflow:[{overflow:mf()}],"overflow-x":[{"overflow-x":mf()}],"overflow-y":[{"overflow-y":mf()}],overscroll:[{overscroll:pf()}],"overscroll-x":[{"overscroll-x":pf()}],"overscroll-y":[{"overscroll-y":pf()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[Hd]}],"inset-x":[{"inset-x":[Hd]}],"inset-y":[{"inset-y":[Hd]}],start:[{start:[Hd]}],end:[{end:[Hd]}],top:[{top:[Hd]}],right:[{right:[Hd]}],bottom:[{bottom:[Hd]}],left:[{left:[Hd]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger$2,isArbitraryValue]}],basis:[{basis:_f()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:xh()}],shrink:[{shrink:xh()}],order:[{order:["first","last","none",isInteger$2,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger$2,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":If()}],"col-end":[{"col-end":If()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger$2,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":If()}],"row-end":[{"row-end":If()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[Md]}],"gap-x":[{"gap-x":[Md]}],"gap-y":[{"gap-y":[Md]}],"justify-content":[{justify:["normal",...lh()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...lh(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...lh(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Ud]}],px:[{px:[Ud]}],py:[{py:[Ud]}],ps:[{ps:[Ud]}],pe:[{pe:[Ud]}],pt:[{pt:[Ud]}],pr:[{pr:[Ud]}],pb:[{pb:[Ud]}],pl:[{pl:[Ud]}],m:[{m:[Vd]}],mx:[{mx:[Vd]}],my:[{my:[Vd]}],ms:[{ms:[Vd]}],me:[{me:[Vd]}],mt:[{mt:[Vd]}],mr:[{mr:[Vd]}],mb:[{mb:[Vd]}],ml:[{ml:[Vd]}],"space-x":[{"space-x":[df]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[df]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,qa]}],"min-w":[{"min-w":[isArbitraryValue,qa,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,qa,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,qa,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,qa,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,qa,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,qa,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$3,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength$1,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Ra]}],"placeholder-opacity":[{"placeholder-opacity":[Gd]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Ra]}],"text-opacity":[{"text-opacity":[Gd]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...wf(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength$1,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength$1,isArbitraryValue]}],"text-decoration-color":[{decoration:[Ra]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:xf()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Gd]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Sf(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[Ra]}],"gradient-from-pos":[{from:[Fd]}],"gradient-via-pos":[{via:[Fd]}],"gradient-to-pos":[{to:[Fd]}],"gradient-from":[{from:[Ld]}],"gradient-via":[{via:[Ld]}],"gradient-to":[{to:[Ld]}],rounded:[{rounded:[fd]}],"rounded-s":[{"rounded-s":[fd]}],"rounded-e":[{"rounded-e":[fd]}],"rounded-t":[{"rounded-t":[fd]}],"rounded-r":[{"rounded-r":[fd]}],"rounded-b":[{"rounded-b":[fd]}],"rounded-l":[{"rounded-l":[fd]}],"rounded-ss":[{"rounded-ss":[fd]}],"rounded-se":[{"rounded-se":[fd]}],"rounded-ee":[{"rounded-ee":[fd]}],"rounded-es":[{"rounded-es":[fd]}],"rounded-tl":[{"rounded-tl":[fd]}],"rounded-tr":[{"rounded-tr":[fd]}],"rounded-br":[{"rounded-br":[fd]}],"rounded-bl":[{"rounded-bl":[fd]}],"border-w":[{border:[md]}],"border-w-x":[{"border-x":[md]}],"border-w-y":[{"border-y":[md]}],"border-w-s":[{"border-s":[md]}],"border-w-e":[{"border-e":[md]}],"border-w-t":[{"border-t":[md]}],"border-w-r":[{"border-r":[md]}],"border-w-b":[{"border-b":[md]}],"border-w-l":[{"border-l":[md]}],"border-opacity":[{"border-opacity":[Gd]}],"border-style":[{border:[...wf(),"hidden"]}],"divide-x":[{"divide-x":[md]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[md]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Gd]}],"divide-style":[{divide:wf()}],"border-color":[{border:[pd]}],"border-color-x":[{"border-x":[pd]}],"border-color-y":[{"border-y":[pd]}],"border-color-s":[{"border-s":[pd]}],"border-color-e":[{"border-e":[pd]}],"border-color-t":[{"border-t":[pd]}],"border-color-r":[{"border-r":[pd]}],"border-color-b":[{"border-b":[pd]}],"border-color-l":[{"border-l":[pd]}],"divide-color":[{divide:[pd]}],"outline-style":[{outline:["",...wf()]}],"outline-offset":[{"outline-offset":[isLength$1,isArbitraryValue]}],"outline-w":[{outline:[isLength$1,isArbitraryLength]}],"outline-color":[{outline:[Ra]}],"ring-w":[{ring:Cf()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Ra]}],"ring-opacity":[{"ring-opacity":[Gd]}],"ring-offset-w":[{"ring-offset":[isLength$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[Ra]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[Gd]}],"mix-blend":[{"mix-blend":[...Pf(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Pf()}],filter:[{filter:["","none"]}],blur:[{blur:[rd]}],brightness:[{brightness:[sd]}],contrast:[{contrast:[gd]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[yd]}],"hue-rotate":[{"hue-rotate":[vd]}],invert:[{invert:[Nd]}],saturate:[{saturate:[qd]}],sepia:[{sepia:[Kd]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[rd]}],"backdrop-brightness":[{"backdrop-brightness":[sd]}],"backdrop-contrast":[{"backdrop-contrast":[gd]}],"backdrop-grayscale":[{"backdrop-grayscale":[yd]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[vd]}],"backdrop-invert":[{"backdrop-invert":[Nd]}],"backdrop-opacity":[{"backdrop-opacity":[Gd]}],"backdrop-saturate":[{"backdrop-saturate":[qd]}],"backdrop-sepia":[{"backdrop-sepia":[Kd]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[hd]}],"border-spacing-x":[{"border-spacing-x":[hd]}],"border-spacing-y":[{"border-spacing-y":[hd]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:Mh()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:Mh()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Wd]}],"scale-x":[{"scale-x":[Wd]}],"scale-y":[{"scale-y":[Wd]}],rotate:[{rotate:[isInteger$2,isArbitraryValue]}],"translate-x":[{"translate-x":[Ef]}],"translate-y":[{"translate-y":[Ef]}],"skew-x":[{"skew-x":[Xd]}],"skew-y":[{"skew-y":[Xd]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",Ra]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[Ra]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":xf()}],"scroll-mx":[{"scroll-mx":xf()}],"scroll-my":[{"scroll-my":xf()}],"scroll-ms":[{"scroll-ms":xf()}],"scroll-me":[{"scroll-me":xf()}],"scroll-mt":[{"scroll-mt":xf()}],"scroll-mr":[{"scroll-mr":xf()}],"scroll-mb":[{"scroll-mb":xf()}],"scroll-ml":[{"scroll-ml":xf()}],"scroll-p":[{"scroll-p":xf()}],"scroll-px":[{"scroll-px":xf()}],"scroll-py":[{"scroll-py":xf()}],"scroll-ps":[{"scroll-ps":xf()}],"scroll-pe":[{"scroll-pe":xf()}],"scroll-pt":[{"scroll-pt":xf()}],"scroll-pr":[{"scroll-pr":xf()}],"scroll-pb":[{"scroll-pb":xf()}],"scroll-pl":[{"scroll-pl":xf()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[Ra,"none"]}],"stroke-w":[{stroke:[isLength$1,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[Ra,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig);function cn$4(...Ra){return twMerge(clsx(Ra))}const _sfc_main$1q=defineComponent({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(Iv),null,{default:withCtx(()=>[createVNode(unref(Rv),{class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),createVNode(unref(Tv),mergeProps(unref(fd),{class:unref(cn$4)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$1p=defineComponent({__name:"AlertDialogFooter",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),falsyToString=Ra=>typeof Ra=="boolean"?`${Ra}`:Ra===0?"0":Ra,cx$1=clsx,cva=(Ra,qa)=>rd=>{var sd;if((qa==null?void 0:qa.variants)==null)return cx$1(Ra,rd==null?void 0:rd.class,rd==null?void 0:rd.className);const{variants:pd,defaultVariants:fd}=qa,hd=Object.keys(pd).map(yd=>{const vd=rd==null?void 0:rd[yd],Nd=fd==null?void 0:fd[yd];if(vd===null)return null;const Md=falsyToString(vd)||falsyToString(Nd);return pd[yd][Md]}),md=rd&&Object.entries(rd).reduce((yd,vd)=>{let[Nd,Md]=vd;return Md===void 0||(yd[Nd]=Md),yd},{}),gd=qa==null||(sd=qa.compoundVariants)===null||sd===void 0?void 0:sd.reduce((yd,vd)=>{let{class:Nd,className:Md,...Ld}=vd;return Object.entries(Ld).every(Fd=>{let[Hd,Vd]=Fd;return Array.isArray(Vd)?Vd.includes({...fd,...md}[Hd]):{...fd,...md}[Hd]===Vd})?[...yd,Nd,Md]:yd},[]);return cx$1(Ra,hd,gd,rd==null?void 0:rd.class,rd==null?void 0:rd.className)},_sfc_main$1o=defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(O$4),{as:rd.as,"as-child":rd.asChild,class:normalizeClass(unref(cn$4)(unref(buttonVariants)({variant:rd.variant,size:rd.size}),qa.class))},{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),buttonVariants=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_sfc_main$1n=defineComponent({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(Mv),mergeProps(rd.value,{class:unref(cn$4)(unref(buttonVariants)(),qa.class)}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1m=defineComponent({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(Av),mergeProps(rd.value,{class:unref(cn$4)(unref(buttonVariants)({variant:"outline"}),"mt-2 sm:mt-0",qa.class)}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1l=defineComponent({__name:"AlertDialogHeader",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col gap-y-2 text-center sm:text-left",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$1k=defineComponent({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(kv),mergeProps(rd.value,{class:unref(cn$4)("text-sm text-muted-foreground",qa.class)}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1j=defineComponent({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(Ov),mergeProps(rd.value,{class:unref(cn$4)("text-lg font-semibold",qa.class)}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$f={key:0,class:"loading"},_sfc_main$1i=defineComponent({__name:"RunLoading",setup(Ra){const qa=ref$1(!0);return onMounted(()=>{setTimeout(()=>{qa.value=!1},100)}),(rd,sd)=>(openBlock(),createBlock(Transition$1,{name:"fade"},{default:withCtx(()=>[unref(qa)?(openBlock(),createElementBlock("div",_hoisted_1$f,sd[0]||(sd[0]=[createBaseVNode("strong",null,"致力于让 Markdown 编辑更简单",-1)]))):createCommentVNode("",!0)]),_:1}))}}),_export_sfc=(Ra,qa)=>{const rd=Ra.__vccOpts||Ra;for(const[sd,pd]of qa)rd[sd]=pd;return rd},__unplugin_components_13$1=_export_sfc(_sfc_main$1i,[["__scopeId","data-v-8781f9ec"]]),_sfc_main$1h=defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(eu$2),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}});/** +`))}return()=>md.value||hd.value||yd.value?h$2(ed.default({present:yd})[0],{ref:wd=>{const Nd=$e$4(wd);return typeof(Nd==null?void 0:Nd.hasAttribute)>"u"||(Nd!=null&&Nd.hasAttribute("data-radix-popper-content-wrapper")?gd.value=Nd.firstElementChild:gd.value=Nd),Nd}}):null}}),[ot$3,au$4]=te$5("DialogRoot"),nu$4=defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ne$5(ud,"open",ed,{defaultValue:ud.defaultOpen,passive:ud.open===void 0}),hd=ref$1(),md=ref$1(),{modal:gd}=toRefs(ud);return au$4({open:dd,modal:gd,openModal:()=>{dd.value=!0},onOpenChange:yd=>{dd.value=yd},onOpenToggle:()=>{dd.value=!dd.value},contentId:"",titleId:"",descriptionId:"",triggerElement:hd,contentElement:md}),(yd,vd)=>renderSlot(yd.$slots,"default",{open:unref(dd)})}}),ou$3=defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=ot$3(),{forwardRef:dd,currentElement:hd}=R$6();return ud.contentId||(ud.contentId=ge$7(void 0,"radix-vue-dialog-content")),onMounted(()=>{ud.triggerElement.value=hd.value}),(md,gd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{ref:unref(dd),type:md.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":unref(ud).open.value||!1,"aria-controls":unref(ud).open.value?unref(ud).contentId:void 0,"data-state":unref(ud).open.value?"open":"closed",onClick:unref(ud).onOpenToggle}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),rt$3=defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ga$2();return(ud,dd)=>unref(ed)||ud.forceMount?(openBlock(),createBlock(Teleport,{key:0,to:ud.to,disabled:ud.disabled},[renderSlot(ud.$slots,"default")],8,["to","disabled"])):createCommentVNode("",!0)}}),Iv=defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(rt$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),lu$3="dismissableLayer.pointerDownOutside",su$3="dismissableLayer.focusOutside";function jl$3(Ra,ed){const ud=ed.closest("[data-dismissable-layer]"),dd=Ra.dataset.dismissableLayer===""?Ra:Ra.querySelector("[data-dismissable-layer]"),hd=Array.from(Ra.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(ud&&dd===ud||hd.indexOf(dd){});return watchEffect(gd=>{if(!Je$3)return;const yd=async Cd=>{const wd=Cd.target;if(ed!=null&&ed.value){if(jl$3(ed.value,wd)){hd.value=!1;return}if(Cd.target&&!hd.value){let Nd=function(){jt$3(lu$3,Ra,Ld)};const Ld={originalEvent:Cd};Cd.pointerType==="touch"?(dd.removeEventListener("click",md.value),md.value=Nd,dd.addEventListener("click",md.value,{once:!0})):Nd()}else dd.removeEventListener("click",md.value);hd.value=!1}},vd=window.setTimeout(()=>{dd.addEventListener("pointerdown",yd)},0);gd(()=>{window.clearTimeout(vd),dd.removeEventListener("pointerdown",yd),dd.removeEventListener("click",md.value)})}),{onPointerDownCapture:()=>hd.value=!0}}function Gl$3(Ra,ed){var ud;const dd=((ud=ed==null?void 0:ed.value)==null?void 0:ud.ownerDocument)??(globalThis==null?void 0:globalThis.document),hd=ref$1(!1);return watchEffect(md=>{if(!Je$3)return;const gd=async yd=>{ed!=null&&ed.value&&(await nextTick$1(),!(!ed.value||jl$3(ed.value,yd.target))&&yd.target&&!hd.value&&jt$3(su$3,Ra,{originalEvent:yd}))};dd.addEventListener("focusin",gd),md(()=>dd.removeEventListener("focusin",gd))}),{onFocusCapture:()=>hd.value=!0,onBlurCapture:()=>hd.value=!1}}const Ge$3=reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ct$4=defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{forwardRef:hd,currentElement:md}=R$6(),gd=computed(()=>{var jd;return((jd=md.value)==null?void 0:jd.ownerDocument)??globalThis.document}),yd=computed(()=>Ge$3.layersRoot),vd=computed(()=>md.value?Array.from(yd.value).indexOf(md.value):-1),Cd=computed(()=>Ge$3.layersWithOutsidePointerEventsDisabled.size>0),wd=computed(()=>{const jd=Array.from(yd.value),[Gd]=[...Ge$3.layersWithOutsidePointerEventsDisabled].slice(-1),Yd=jd.indexOf(Gd);return vd.value>=Yd}),Nd=Ul$3(async jd=>{const Gd=[...Ge$3.branches].some(Yd=>Yd==null?void 0:Yd.contains(jd.target));!wd.value||Gd||(dd("pointerDownOutside",jd),dd("interactOutside",jd),await nextTick$1(),jd.defaultPrevented||dd("dismiss"))},md),Ld=Gl$3(jd=>{[...Ge$3.branches].some(Gd=>Gd==null?void 0:Gd.contains(jd.target))||(dd("focusOutside",jd),dd("interactOutside",jd),jd.defaultPrevented||dd("dismiss"))},md);Gn$4("Escape",jd=>{vd.value===yd.value.size-1&&(dd("escapeKeyDown",jd),jd.defaultPrevented||dd("dismiss"))});let Ud;return watchEffect(jd=>{md.value&&(ud.disableOutsidePointerEvents&&(Ge$3.layersWithOutsidePointerEventsDisabled.size===0&&(Ud=gd.value.body.style.pointerEvents,gd.value.body.style.pointerEvents="none"),Ge$3.layersWithOutsidePointerEventsDisabled.add(md.value)),yd.value.add(md.value),jd(()=>{ud.disableOutsidePointerEvents&&Ge$3.layersWithOutsidePointerEventsDisabled.size===1&&(gd.value.body.style.pointerEvents=Ud)}))}),watchEffect(jd=>{jd(()=>{md.value&&(yd.value.delete(md.value),Ge$3.layersWithOutsidePointerEventsDisabled.delete(md.value))})}),(jd,Gd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(hd),"as-child":jd.asChild,as:jd.as,"data-dismissable-layer":"",style:normalizeStyle({pointerEvents:Cd.value?wd.value?"auto":"none":void 0}),onFocusCapture:unref(Ld).onFocusCapture,onBlurCapture:unref(Ld).onBlurCapture,onPointerdownCapture:unref(Nd).onPointerDownCapture},{default:withCtx(()=>[renderSlot(jd.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),xn$3="focusScope.autoFocusOnMount",Sn$4="focusScope.autoFocusOnUnmount",qo$2={bubbles:!1,cancelable:!0};function Ma$1(Ra,{select:ed=!1}={}){const ud=me$4();for(const dd of Ra)if(pt$4(dd,{select:ed}),me$4()!==ud)return!0}function iu$2(Ra){const ed=eo$2(Ra),ud=Yo$2(ed,Ra),dd=Yo$2(ed.reverse(),Ra);return[ud,dd]}function eo$2(Ra){const ed=[],ud=document.createTreeWalker(Ra,NodeFilter.SHOW_ELEMENT,{acceptNode:dd=>{const hd=dd.tagName==="INPUT"&&dd.type==="hidden";return dd.disabled||dd.hidden||hd?NodeFilter.FILTER_SKIP:dd.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;ud.nextNode();)ed.push(ud.currentNode);return ed}function Yo$2(Ra,ed){for(const ud of Ra)if(!uu$4(ud,{upTo:ed}))return ud}function uu$4(Ra,{upTo:ed}){if(getComputedStyle(Ra).visibility==="hidden")return!0;for(;Ra;){if(ed!==void 0&&Ra===ed)return!1;if(getComputedStyle(Ra).display==="none")return!0;Ra=Ra.parentElement}return!1}function du$3(Ra){return Ra instanceof HTMLInputElement&&"select"in Ra}function pt$4(Ra,{select:ed=!1}={}){if(Ra&&Ra.focus){const ud=me$4();Ra.focus({preventScroll:!0}),Ra!==ud&&du$3(Ra)&&ed&&Ra.select()}}const cu$4=li$4(()=>ref$1([]));function fu$2(){const Ra=cu$4();return{add(ed){const ud=Ra.value[0];ed!==ud&&(ud==null||ud.pause()),Ra.value=Xo$2(Ra.value,ed),Ra.value.unshift(ed)},remove(ed){var ud;Ra.value=Xo$2(Ra.value,ed),(ud=Ra.value[0])==null||ud.resume()}}}function Xo$2(Ra,ed){const ud=[...Ra],dd=ud.indexOf(ed);return dd!==-1&&ud.splice(dd,1),ud}function pu$3(Ra){return Ra.filter(ed=>ed.tagName!=="A")}const Za$1=defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{currentRef:hd,currentElement:md}=R$6(),gd=ref$1(null),yd=fu$2(),vd=reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});watchEffect(wd=>{if(!Je$3)return;const Nd=md.value;if(!ud.trapped)return;function Ld(Yd){if(vd.paused||!Nd)return;const zd=Yd.target;Nd.contains(zd)?gd.value=zd:pt$4(gd.value,{select:!0})}function Ud(Yd){if(vd.paused||!Nd)return;const zd=Yd.relatedTarget;zd!==null&&(Nd.contains(zd)||pt$4(gd.value,{select:!0}))}function jd(Yd){Nd.contains(gd.value)||pt$4(Nd)}document.addEventListener("focusin",Ld),document.addEventListener("focusout",Ud);const Gd=new MutationObserver(jd);Nd&&Gd.observe(Nd,{childList:!0,subtree:!0}),wd(()=>{document.removeEventListener("focusin",Ld),document.removeEventListener("focusout",Ud),Gd.disconnect()})}),watchEffect(async wd=>{const Nd=md.value;if(await nextTick$1(),!Nd)return;yd.add(vd);const Ld=me$4();if(!Nd.contains(Ld)){const Ud=new CustomEvent(xn$3,qo$2);Nd.addEventListener(xn$3,jd=>dd("mountAutoFocus",jd)),Nd.dispatchEvent(Ud),Ud.defaultPrevented||(Ma$1(pu$3(eo$2(Nd)),{select:!0}),me$4()===Ld&&pt$4(Nd))}wd(()=>{Nd.removeEventListener(xn$3,Gd=>dd("mountAutoFocus",Gd));const Ud=new CustomEvent(Sn$4,qo$2),jd=Gd=>{dd("unmountAutoFocus",Gd)};Nd.addEventListener(Sn$4,jd),Nd.dispatchEvent(Ud),setTimeout(()=>{Ud.defaultPrevented||pt$4(Ld??document.body,{select:!0}),Nd.removeEventListener(Sn$4,jd),yd.remove(vd)},0)})});function Cd(wd){if(!ud.loop&&!ud.trapped||vd.paused)return;const Nd=wd.key==="Tab"&&!wd.altKey&&!wd.ctrlKey&&!wd.metaKey,Ld=me$4();if(Nd&&Ld){const Ud=wd.currentTarget,[jd,Gd]=iu$2(Ud);jd&&Gd?!wd.shiftKey&&Ld===Gd?(wd.preventDefault(),ud.loop&&pt$4(jd,{select:!0})):wd.shiftKey&&Ld===jd&&(wd.preventDefault(),ud.loop&&pt$4(Gd,{select:!0})):Ld===Ud&&wd.preventDefault()}}return(wd,Nd)=>(openBlock(),createBlock(unref(O$4),{ref_key:"currentRef",ref:hd,tabindex:"-1","as-child":wd.asChild,as:wd.as,onKeydown:Cd},{default:withCtx(()=>[renderSlot(wd.$slots,"default")]),_:3},8,["as-child","as"]))}}),vu$3="menu.itemSelect",Bn$3=["Enter"," "],mu$3=["ArrowDown","PageUp","Home"],ql$3=["ArrowUp","PageDown","End"],hu$3=[...mu$3,...ql$3],yu$2={ltr:[...Bn$3,"ArrowRight"],rtl:[...Bn$3,"ArrowLeft"]},gu$2={ltr:["ArrowLeft"],rtl:["ArrowRight"]};function to$2(Ra){return Ra?"open":"closed"}function La$2(Ra){return Ra==="indeterminate"}function ao$2(Ra){return La$2(Ra)?"indeterminate":Ra?"checked":"unchecked"}function In$2(Ra){const ed=me$4();for(const ud of Ra)if(ud===ed||(ud.focus(),me$4()!==ed))return}function bu$3(Ra,ed){const{x:ud,y:dd}=Ra;let hd=!1;for(let md=0,gd=ed.length-1;mddd!=wd>dd&&ud<(Cd-yd)*(dd-vd)/(wd-vd)+yd&&(hd=!hd)}return hd}function Cu$3(Ra,ed){if(!ed)return!1;const ud={x:Ra.clientX,y:Ra.clientY};return bu$3(ud,ed)}function da$1(Ra){return Ra.pointerType==="mouse"}const Yl$3=defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=ot$3(),{forwardRef:md,currentElement:gd}=R$6();return hd.titleId||(hd.titleId=ge$7(void 0,"radix-vue-dialog-title")),hd.descriptionId||(hd.descriptionId=ge$7(void 0,"radix-vue-dialog-description")),onMounted(()=>{hd.contentElement=gd,me$4()!==document.body&&(hd.triggerElement.value=me$4())}),(yd,vd)=>(openBlock(),createBlock(unref(Za$1),{"as-child":"",loop:"",trapped:ud.trapFocus,onMountAutoFocus:vd[5]||(vd[5]=Cd=>dd("openAutoFocus",Cd)),onUnmountAutoFocus:vd[6]||(vd[6]=Cd=>dd("closeAutoFocus",Cd))},{default:withCtx(()=>[createVNode(unref(Ct$4),mergeProps({id:unref(hd).contentId,ref:unref(md),as:yd.as,"as-child":yd.asChild,"disable-outside-pointer-events":yd.disableOutsidePointerEvents,role:"dialog","aria-describedby":unref(hd).descriptionId,"aria-labelledby":unref(hd).titleId,"data-state":unref(to$2)(unref(hd).open.value)},yd.$attrs,{onDismiss:vd[0]||(vd[0]=Cd=>unref(hd).onOpenChange(!1)),onEscapeKeyDown:vd[1]||(vd[1]=Cd=>dd("escapeKeyDown",Cd)),onFocusOutside:vd[2]||(vd[2]=Cd=>dd("focusOutside",Cd)),onInteractOutside:vd[3]||(vd[3]=Cd=>dd("interactOutside",Cd)),onPointerDownOutside:vd[4]||(vd[4]=Cd=>dd("pointerDownOutside",Cd))}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),Su$2=defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=ot$3(),md=Te$5(dd),{forwardRef:gd,currentElement:yd}=R$6();return ga$2(yd),(vd,Cd)=>(openBlock(),createBlock(Yl$3,mergeProps({...ud,...unref(md)},{ref:unref(gd),"trap-focus":unref(hd).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:Cd[0]||(Cd[0]=wd=>{var Nd;wd.defaultPrevented||(wd.preventDefault(),(Nd=unref(hd).triggerElement.value)==null||Nd.focus())}),onPointerDownOutside:Cd[1]||(Cd[1]=wd=>{const Nd=wd.detail.originalEvent,Ld=Nd.button===0&&Nd.ctrlKey===!0;(Nd.button===2||Ld)&&wd.preventDefault()}),onFocusOutside:Cd[2]||(Cd[2]=wd=>{wd.preventDefault()})}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16,["trap-focus"]))}}),Eu$3=defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);R$6();const hd=ot$3(),md=ref$1(!1),gd=ref$1(!1);return(yd,vd)=>(openBlock(),createBlock(Yl$3,mergeProps({...ud,...unref(dd)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:vd[0]||(vd[0]=Cd=>{var wd;Cd.defaultPrevented||(md.value||(wd=unref(hd).triggerElement.value)==null||wd.focus(),Cd.preventDefault()),md.value=!1,gd.value=!1}),onInteractOutside:vd[1]||(vd[1]=Cd=>{var wd;Cd.defaultPrevented||(md.value=!0,Cd.detail.originalEvent.type==="pointerdown"&&(gd.value=!0));const Nd=Cd.target;(wd=unref(hd).triggerElement.value)!=null&&wd.contains(Nd)&&Cd.preventDefault(),Cd.detail.originalEvent.type==="focusin"&&gd.value&&Cd.preventDefault()})}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16))}}),Pu$2=defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=ot$3(),md=Te$5(dd),{forwardRef:gd}=R$6();return(yd,vd)=>(openBlock(),createBlock(unref(Pe$6),{present:yd.forceMount||unref(hd).open.value},{default:withCtx(()=>[unref(hd).modal.value?(openBlock(),createBlock(Su$2,mergeProps({key:0,ref:unref(gd)},{...ud,...unref(md),...yd.$attrs}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16)):(openBlock(),createBlock(Eu$3,mergeProps({key:1,ref:unref(gd)},{...ud,...unref(md),...yd.$attrs}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),Du$3=defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=ot$3();return ya$1(!0),R$6(),(ud,dd)=>(openBlock(),createBlock(unref(O$4),{as:ud.as,"as-child":ud.asChild,"data-state":unref(ed).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),$u$3=defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=ot$3(),{forwardRef:ud}=R$6();return(dd,hd)=>{var md;return(md=unref(ed))!=null&&md.modal.value?(openBlock(),createBlock(unref(Pe$6),{key:0,present:dd.forceMount||unref(ed).open.value},{default:withCtx(()=>[createVNode(Du$3,mergeProps(dd.$attrs,{ref:unref(ud),as:dd.as,"as-child":dd.asChild}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):createCommentVNode("",!0)}}}),Xl$3=defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra;R$6();const ud=ot$3();return(dd,hd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{type:dd.as==="button"?"button":void 0,onClick:hd[0]||(hd[0]=md=>unref(ud).onOpenChange(!1))}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["type"]))}}),Bu$2=defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(Ra){const ed=Ra,ud=ot$3();return R$6(),(dd,hd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{id:unref(ud).titleId}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["id"]))}}),Iu$3=defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(Ra){const ed=Ra;R$6();const ud=ot$3();return(dd,hd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{id:unref(ud).descriptionId}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["id"]))}}),Tv=defineComponent({__name:"AlertDialogRoot",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed);return R$6(),(dd,hd)=>(openBlock(),createBlock(unref(nu$4),mergeProps(unref(ud),{modal:!0}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16))}}),Av=defineComponent({__name:"AlertDialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(rt$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),[Tu$3,Ru$3]=te$5("AlertDialogContent"),Ov=defineComponent({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);R$6();const hd=ref$1();return Ru$3({onCancelElementChange:md=>{hd.value=md}}),(md,gd)=>(openBlock(),createBlock(unref(Pu$2),mergeProps({...ud,...unref(dd)},{role:"alertdialog",onPointerDownOutside:gd[0]||(gd[0]=withModifiers(()=>{},["prevent"])),onInteractOutside:gd[1]||(gd[1]=withModifiers(()=>{},["prevent"])),onOpenAutoFocus:gd[2]||(gd[2]=()=>{nextTick$1(()=>{var yd;(yd=hd.value)==null||yd.focus({preventScroll:!0})})})}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),kv=defineComponent({__name:"AlertDialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref($u$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),Mv=defineComponent({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=Tu$3(),{forwardRef:dd,currentElement:hd}=R$6();return onMounted(()=>{ud.onCancelElementChange(hd.value)}),(md,gd)=>(openBlock(),createBlock(unref(Xl$3),mergeProps(ed,{ref:unref(dd)}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),Vv=defineComponent({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(Bu$2),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),Fv=defineComponent({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(Iu$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),Nv=defineComponent({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(Xl$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}});function za$1(Ra){return Ra==="indeterminate"}function Ql$3(Ra){return za$1(Ra)?"indeterminate":Ra?"checked":"unchecked"}const td=["value","checked","name","disabled","required"],[ad$1,nd]=te$5("CheckboxRoot"),Wv=defineComponent({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{disabled:hd}=toRefs(ud),md=ne$5(ud,"checked",dd,{defaultValue:ud.defaultChecked,passive:ud.checked===void 0}),{forwardRef:gd,currentElement:yd}=R$6(),vd=at$6(yd),Cd=computed(()=>{var wd;return ud.id&&yd.value?(wd=document.querySelector(`[for="${ud.id}"]`))==null?void 0:wd.innerText:void 0});return nd({disabled:hd,state:md}),(wd,Nd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps(wd.$attrs,{id:wd.id,ref:unref(gd),role:"checkbox","as-child":ud.asChild,as:wd.as,type:wd.as==="button"?"button":void 0,"aria-checked":unref(za$1)(unref(md))?"mixed":unref(md),"aria-required":ud.required,"aria-label":wd.$attrs["aria-label"]||Cd.value,"data-state":unref(Ql$3)(unref(md)),"data-disabled":unref(hd)?"":void 0,disabled:unref(hd),onKeydown:withKeys(withModifiers(()=>{},["prevent"]),["enter"]),onClick:Nd[0]||(Nd[0]=Ld=>md.value=unref(za$1)(unref(md))?!0:!unref(md))}),{default:withCtx(()=>[renderSlot(wd.$slots,"default",{checked:unref(md)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","onKeydown"]),unref(vd)?(openBlock(),createElementBlock("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:wd.value,checked:!!unref(md),name:ud.name,disabled:ud.disabled,required:ud.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,td)):createCommentVNode("",!0)],64))}}),jv=defineComponent({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const{forwardRef:ed}=R$6(),ud=ad$1();return(dd,hd)=>(openBlock(),createBlock(unref(Pe$6),{present:dd.forceMount||unref(za$1)(unref(ud).state.value)||unref(ud).state.value===!0},{default:withCtx(()=>[createVNode(unref(O$4),mergeProps({ref:unref(ed),"data-state":unref(Ql$3)(unref(ud).state.value),"data-disabled":unref(ud).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":dd.asChild,as:dd.as},dd.$attrs),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[es$2,od]=te$5("PopperRoot"),kt$4=defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(Ra){const ed=ref$1();return od({anchor:ed,onAnchorChange:ud=>ed.value=ud}),(ud,dd)=>renderSlot(ud.$slots,"default")}}),Mt$4=defineComponent({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,{forwardRef:ud,currentElement:dd}=R$6(),hd=es$2();return watchEffect(()=>{hd.onAnchorChange(ed.element??dd.value)}),(md,gd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(ud),as:md.as,"as-child":md.asChild},{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},8,["as","as-child"]))}});function ld(Ra){return Ra!==null}function sd(Ra){return{name:"transformOrigin",options:Ra,fn(ed){var ud,dd,hd;const{placement:md,rects:gd,middlewareData:yd}=ed,vd=((ud=yd.arrow)==null?void 0:ud.centerOffset)!==0,Cd=vd?0:Ra.arrowWidth,wd=vd?0:Ra.arrowHeight,[Nd,Ld]=Tn$3(md),Ud={start:"0%",center:"50%",end:"100%"}[Ld],jd=(((dd=yd.arrow)==null?void 0:dd.x)??0)+Cd/2,Gd=(((hd=yd.arrow)==null?void 0:hd.y)??0)+wd/2;let Yd="",zd="";return Nd==="bottom"?(Yd=vd?Ud:`${jd}px`,zd=`${-wd}px`):Nd==="top"?(Yd=vd?Ud:`${jd}px`,zd=`${gd.floating.height+wd}px`):Nd==="right"?(Yd=`${-wd}px`,zd=vd?Ud:`${Gd}px`):Nd==="left"&&(Yd=`${gd.floating.width+wd}px`,zd=vd?Ud:`${Gd}px`),{data:{x:Yd,y:zd}}}}}function Tn$3(Ra){const[ed,ud="center"]=Ra.split("-");return[ed,ud]}const ts$1={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[rd,id$2]=te$5("PopperContent"),It$3=defineComponent({inheritAttrs:!1,__name:"PopperContent",props:mergeDefaults({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ts$1}),emits:["placed"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=es$2(),{forwardRef:md,currentElement:gd}=R$6(),yd=ref$1(),vd=ref$1(),{width:Cd,height:wd}=Ll$3(vd),Nd=computed(()=>ud.side+(ud.align!=="center"?`-${ud.align}`:"")),Ld=computed(()=>typeof ud.collisionPadding=="number"?ud.collisionPadding:{top:0,right:0,bottom:0,left:0,...ud.collisionPadding}),Ud=computed(()=>Array.isArray(ud.collisionBoundary)?ud.collisionBoundary:[ud.collisionBoundary]),jd=computed(()=>({padding:Ld.value,boundary:Ud.value.filter(ld),altBoundary:Ud.value.length>0})),Gd=ni$4(()=>[offset$2({mainAxis:ud.sideOffset+wd.value,alignmentAxis:ud.alignOffset}),ud.prioritizePosition&&ud.avoidCollisions&&flip$2({...jd.value}),ud.avoidCollisions&&shift({mainAxis:!0,crossAxis:!!ud.prioritizePosition,limiter:ud.sticky==="partial"?limitShift():void 0,...jd.value}),!ud.prioritizePosition&&ud.avoidCollisions&&flip$2({...jd.value}),size({...jd.value,apply:({elements:vf,rects:gf,availableWidth:Af,availableHeight:Df})=>{const{width:Of,height:Cf}=gf.reference,If=vf.floating.style;If.setProperty("--radix-popper-available-width",`${Af}px`),If.setProperty("--radix-popper-available-height",`${Df}px`),If.setProperty("--radix-popper-anchor-width",`${Of}px`),If.setProperty("--radix-popper-anchor-height",`${Cf}px`)}}),vd.value&&arrow$2({element:vd.value,padding:ud.arrowPadding}),sd({arrowWidth:Cd.value,arrowHeight:wd.value}),ud.hideWhenDetached&&hide$2({strategy:"referenceHidden",...jd.value})]),{floatingStyles:Yd,placement:zd,isPositioned:qd,middlewareData:Wd}=useFloating(hd.anchor,yd,{strategy:"fixed",placement:Nd,whileElementsMounted:(...vf)=>autoUpdate(...vf,{animationFrame:ud.updatePositionStrategy==="always"}),middleware:Gd}),Xd=computed(()=>Tn$3(zd.value)[0]),Jd=computed(()=>Tn$3(zd.value)[1]);watchPostEffect(()=>{qd.value&&dd("placed")});const Zd=computed(()=>{var vf;return((vf=Wd.value.arrow)==null?void 0:vf.centerOffset)!==0}),mf=ref$1("");watchEffect(()=>{gd.value&&(mf.value=window.getComputedStyle(gd.value).zIndex)});const xf=computed(()=>{var vf;return((vf=Wd.value.arrow)==null?void 0:vf.x)??0}),_f=computed(()=>{var vf;return((vf=Wd.value.arrow)==null?void 0:vf.y)??0});return id$2({placedSide:Xd,onArrowChange:vf=>vd.value=vf,arrowX:xf,arrowY:_f,shouldHideArrow:Zd}),(vf,gf)=>{var Af,Df,Of;return openBlock(),createElementBlock("div",{ref_key:"floatingRef",ref:yd,"data-radix-popper-content-wrapper":"",style:normalizeStyle({...unref(Yd),transform:unref(qd)?unref(Yd).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:mf.value,"--radix-popper-transform-origin":[(Af=unref(Wd).transformOrigin)==null?void 0:Af.x,(Df=unref(Wd).transformOrigin)==null?void 0:Df.y].join(" "),...((Of=unref(Wd).hide)==null?void 0:Of.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[createVNode(unref(O$4),mergeProps({ref:unref(md)},vf.$attrs,{"as-child":ud.asChild,as:vf.as,"data-side":Xd.value,"data-align":Jd.value,style:{animation:unref(qd)?void 0:"none"}}),{default:withCtx(()=>[renderSlot(vf.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),Jt$4=defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){return R$6(),(ed,ud)=>(openBlock(),createBlock(unref(O$4),{as:ed.as,"as-child":ed.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:withCtx(()=>[renderSlot(ed.$slots,"default")]),_:3},8,["as","as-child"]))}}),fd="data-radix-vue-collection-item",[oo$4,pd]=te$5("CollectionProvider");function Ca$1(Ra=fd){const ed=ref$1(new Map),ud=ref$1(),dd=pd({collectionRef:ud,itemMap:ed,attrName:Ra}),{getItems:hd}=ea$1(dd),md=computed(()=>Array.from(dd.itemMap.value.values())),gd=computed(()=>dd.itemMap.value.size);return{getItems:hd,reactiveItems:md,itemMapSize:gd}}const wa$1=defineComponent({name:"CollectionSlot",setup(Ra,{slots:ed}){const ud=oo$4(),{primitiveElement:dd,currentElement:hd}=Re$7();return watch(hd,()=>{ud.collectionRef.value=hd.value}),()=>h$2(Jn$4,{ref:dd},ed)}}),Qt$3=defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(Ra,{slots:ed,attrs:ud}){const dd=oo$4(),{primitiveElement:hd,currentElement:md}=Re$7();return watchEffect(gd=>{if(md.value){const yd=markRaw(md.value);dd.itemMap.value.set(yd,{ref:md.value,value:Ra.value}),gd(()=>dd.itemMap.value.delete(yd))}}),()=>h$2(Jn$4,{...ud,[dd.attrName]:"",ref:hd},ed)}});function ea$1(Ra){const ed=Ra??oo$4();return{getItems:()=>{const ud=ed.collectionRef.value;if(!ud)return[];const dd=Array.from(ud.querySelectorAll(`[${ed.attrName}]`));return Array.from(ed.itemMap.value.values()).sort((hd,md)=>dd.indexOf(hd.ref)-dd.indexOf(md.ref))}}}function Ja(Ra){const ed=Ya$2({nonce:ref$1()});return computed(()=>{var ud;return(Ra==null?void 0:Ra.value)||((ud=ed.nonce)==null?void 0:ud.value)})}const Qa$1=defineComponent({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(Mt$4),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}});function _d(){const Ra=ref$1(!1);return onMounted(()=>{He$4("keydown",()=>{Ra.value=!0},{capture:!0,passive:!0}),He$4(["pointerdown","pointermove"],()=>{Ra.value=!1},{capture:!0,passive:!0})}),Ra}const xd=Dl$3(_d),[Vt$3,ns$2]=te$5(["MenuRoot","MenuSub"],"MenuContext"),[_a$3,Sd]=te$5("MenuRoot"),so$2=defineComponent({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{modal:hd,dir:md}=toRefs(ud),gd=we$5(md),yd=ne$5(ud,"open",dd),vd=ref$1(),Cd=xd();return ns$2({open:yd,onOpenChange:wd=>{yd.value=wd},content:vd,onContentChange:wd=>{vd.value=wd}}),Sd({onClose:()=>{yd.value=!1},isUsingKeyboardRef:Cd,dir:gd,modal:hd}),(wd,Nd)=>(openBlock(),createBlock(unref(kt$4),null,{default:withCtx(()=>[renderSlot(wd.$slots,"default")]),_:3}))}}),Ed="rovingFocusGroup.onEntryFocus",Pd={bubbles:!1,cancelable:!0},en$3={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Dd(Ra,ed){return ed!=="rtl"?Ra:Ra==="ArrowLeft"?"ArrowRight":Ra==="ArrowRight"?"ArrowLeft":Ra}function os$2(Ra,ed,ud){const dd=Dd(Ra.key,ud);if(!(ed==="vertical"&&["ArrowLeft","ArrowRight"].includes(dd))&&!(ed==="horizontal"&&["ArrowUp","ArrowDown"].includes(dd)))return en$3[dd]}function ls$2(Ra,ed=!1){const ud=me$4();for(const dd of Ra)if(dd===ud||(dd.focus({preventScroll:ed}),me$4()!==ud))return}function $d$1(Ra,ed){return Ra.map((ud,dd)=>Ra[(ed+dd)%Ra.length])}const[Bd,Id]=te$5("RovingFocusGroup"),Ft$4=defineComponent({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(Ra,{expose:ed,emit:ud}){const dd=Ra,hd=ud,{loop:md,orientation:gd,dir:yd}=toRefs(dd),vd=we$5(yd),Cd=ne$5(dd,"currentTabStopId",hd,{defaultValue:dd.defaultCurrentTabStopId,passive:dd.currentTabStopId===void 0}),wd=ref$1(!1),Nd=ref$1(!1),Ld=ref$1(0),{getItems:Ud}=Ca$1();function jd(Yd){const zd=!Nd.value;if(Yd.currentTarget&&Yd.target===Yd.currentTarget&&zd&&!wd.value){const qd=new CustomEvent(Ed,Pd);if(Yd.currentTarget.dispatchEvent(qd),hd("entryFocus",qd),!qd.defaultPrevented){const Wd=Ud().map(mf=>mf.ref).filter(mf=>mf.dataset.disabled!==""),Xd=Wd.find(mf=>mf.getAttribute("data-active")==="true"),Jd=Wd.find(mf=>mf.id===Cd.value),Zd=[Xd,Jd,...Wd].filter(Boolean);ls$2(Zd,dd.preventScrollOnEntryFocus)}}Nd.value=!1}function Gd(){setTimeout(()=>{Nd.value=!1},1)}return ed({getItems:Ud}),Id({loop:md,dir:vd,orientation:gd,currentTabStopId:Cd,onItemFocus:Yd=>{Cd.value=Yd},onItemShiftTab:()=>{wd.value=!0},onFocusableItemAdd:()=>{Ld.value++},onFocusableItemRemove:()=>{Ld.value--}}),(Yd,zd)=>(openBlock(),createBlock(unref(wa$1),null,{default:withCtx(()=>[createVNode(unref(O$4),{tabindex:wd.value||Ld.value===0?-1:0,"data-orientation":unref(gd),as:Yd.as,"as-child":Yd.asChild,dir:unref(vd),style:{outline:"none"},onMousedown:zd[0]||(zd[0]=qd=>Nd.value=!0),onMouseup:Gd,onFocus:jd,onBlur:zd[1]||(zd[1]=qd=>wd.value=!1)},{default:withCtx(()=>[renderSlot(Yd.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Nt$4=defineComponent({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const ed=Ra,ud=Bd(),dd=computed(()=>ed.tabStopId||ge$7()),hd=computed(()=>ud.currentTabStopId.value===dd.value),{getItems:md}=ea$1();onMounted(()=>{ed.focusable&&ud.onFocusableItemAdd()}),onUnmounted(()=>{ed.focusable&&ud.onFocusableItemRemove()});function gd(yd){if(yd.key==="Tab"&&yd.shiftKey){ud.onItemShiftTab();return}if(yd.target!==yd.currentTarget)return;const vd=os$2(yd,ud.orientation.value,ud.dir.value);if(vd!==void 0){if(yd.metaKey||yd.ctrlKey||yd.altKey||!ed.allowShiftKey&&yd.shiftKey)return;yd.preventDefault();let Cd=[...md().map(wd=>wd.ref).filter(wd=>wd.dataset.disabled!=="")];if(vd==="last")Cd.reverse();else if(vd==="prev"||vd==="next"){vd==="prev"&&Cd.reverse();const wd=Cd.indexOf(yd.currentTarget);Cd=ud.loop.value?$d$1(Cd,wd+1):Cd.slice(wd+1)}nextTick$1(()=>ls$2(Cd))}}return(yd,vd)=>(openBlock(),createBlock(unref(Qt$3),null,{default:withCtx(()=>[createVNode(unref(O$4),{tabindex:hd.value?0:-1,"data-orientation":unref(ud).orientation.value,"data-active":yd.active,"data-disabled":yd.focusable?void 0:"",as:yd.as,"as-child":yd.asChild,onMousedown:vd[0]||(vd[0]=Cd=>{yd.focusable?unref(ud).onItemFocus(dd.value):Cd.preventDefault()}),onFocus:vd[1]||(vd[1]=Cd=>unref(ud).onItemFocus(dd.value)),onKeydown:gd},{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[ro$2,Td]=te$5("MenuContent"),io$3=defineComponent({__name:"MenuContentImpl",props:mergeDefaults({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ts$1}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=Vt$3(),md=_a$3(),{trapFocus:gd,disableOutsidePointerEvents:yd,loop:vd}=toRefs(ud);Yn$3(),ya$1(yd.value);const Cd=ref$1(""),wd=ref$1(0),Nd=ref$1(0),Ld=ref$1(null),Ud=ref$1("right"),jd=ref$1(0),Gd=ref$1(null),{createCollection:Yd}=Fe$5(),{forwardRef:zd,currentElement:qd}=R$6(),Wd=Yd(qd);watch(qd,vf=>{hd.onContentChange(vf)});const{handleTypeaheadSearch:Xd}=ba$3(Wd);onUnmounted(()=>{window.clearTimeout(wd.value)});function Jd(vf){var gf,Af;return Ud.value===((gf=Ld.value)==null?void 0:gf.side)&&Cu$3(vf,(Af=Ld.value)==null?void 0:Af.area)}async function Zd(vf){var gf;dd("openAutoFocus",vf),!vf.defaultPrevented&&(vf.preventDefault(),(gf=qd.value)==null||gf.focus({preventScroll:!0}))}function mf(vf){if(vf.defaultPrevented)return;const gf=vf.target.closest("[data-radix-menu-content]")===vf.currentTarget,Af=vf.ctrlKey||vf.altKey||vf.metaKey,Df=vf.key.length===1,Of=At$5(vf,me$4(),qd.value,{loop:vd.value,arrowKeyOptions:"vertical",dir:md==null?void 0:md.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(Of)return Of==null?void 0:Of.focus();if(vf.code==="Space"||(gf&&(vf.key==="Tab"&&vf.preventDefault(),!Af&&Df&&Xd(vf.key)),vf.target!==qd.value)||!hu$3.includes(vf.key))return;vf.preventDefault();const Cf=Wd.value;ql$3.includes(vf.key)&&Cf.reverse(),In$2(Cf)}function xf(vf){var gf,Af;(Af=(gf=vf==null?void 0:vf.currentTarget)==null?void 0:gf.contains)!=null&&Af.call(gf,vf.target)||(window.clearTimeout(wd.value),Cd.value="")}function _f(vf){var gf;if(!da$1(vf))return;const Af=vf.target,Df=jd.value!==vf.clientX;if((gf=vf==null?void 0:vf.currentTarget)!=null&&gf.contains(Af)&&Df){const Of=vf.clientX>jd.value?"right":"left";Ud.value=Of,jd.value=vf.clientX}}return Td({onItemEnter:vf=>!!Jd(vf),onItemLeave:vf=>{var gf;Jd(vf)||((gf=qd.value)==null||gf.focus(),Gd.value=null)},onTriggerLeave:vf=>!!Jd(vf),searchRef:Cd,pointerGraceTimerRef:Nd,onPointerGraceIntentChange:vf=>{Ld.value=vf}}),(vf,gf)=>(openBlock(),createBlock(unref(Za$1),{"as-child":"",trapped:unref(gd),onMountAutoFocus:Zd,onUnmountAutoFocus:gf[7]||(gf[7]=Af=>dd("closeAutoFocus",Af))},{default:withCtx(()=>[createVNode(unref(Ct$4),{"as-child":"","disable-outside-pointer-events":unref(yd),onEscapeKeyDown:gf[2]||(gf[2]=Af=>dd("escapeKeyDown",Af)),onPointerDownOutside:gf[3]||(gf[3]=Af=>dd("pointerDownOutside",Af)),onFocusOutside:gf[4]||(gf[4]=Af=>dd("focusOutside",Af)),onInteractOutside:gf[5]||(gf[5]=Af=>dd("interactOutside",Af)),onDismiss:gf[6]||(gf[6]=Af=>dd("dismiss"))},{default:withCtx(()=>[createVNode(unref(Ft$4),{"current-tab-stop-id":Gd.value,"onUpdate:currentTabStopId":gf[0]||(gf[0]=Af=>Gd.value=Af),"as-child":"",orientation:"vertical",dir:unref(md).dir.value,loop:unref(vd),onEntryFocus:gf[1]||(gf[1]=Af=>{dd("entryFocus",Af),unref(md).isUsingKeyboardRef.value||Af.preventDefault()})},{default:withCtx(()=>[createVNode(unref(It$3),{ref:unref(zd),role:"menu",as:vf.as,"as-child":vf.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":unref(to$2)(unref(hd).open.value),dir:unref(md).dir.value,side:vf.side,"side-offset":vf.sideOffset,align:vf.align,"align-offset":vf.alignOffset,"avoid-collisions":vf.avoidCollisions,"collision-boundary":vf.collisionBoundary,"collision-padding":vf.collisionPadding,"arrow-padding":vf.arrowPadding,"prioritize-position":vf.prioritizePosition,sticky:vf.sticky,"hide-when-detached":vf.hideWhenDetached,onKeydown:mf,onBlur:xf,onPointermove:_f},{default:withCtx(()=>[renderSlot(vf.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),ss$2=defineComponent({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,ud=ro$2(),{forwardRef:dd}=R$6(),hd=ref$1(!1);async function md(yd){if(!yd.defaultPrevented&&da$1(yd)){if(ed.disabled)ud.onItemLeave(yd);else if(!ud.onItemEnter(yd)){const vd=yd.currentTarget;vd==null||vd.focus({preventScroll:!0})}}}async function gd(yd){await nextTick$1(),!yd.defaultPrevented&&da$1(yd)&&ud.onItemLeave(yd)}return(yd,vd)=>(openBlock(),createBlock(unref(Qt$3),{value:{textValue:yd.textValue}},{default:withCtx(()=>[createVNode(unref(O$4),mergeProps({ref:unref(dd),role:"menuitem",tabindex:"-1"},yd.$attrs,{as:yd.as,"as-child":yd.asChild,"data-radix-vue-collection-item":"","aria-disabled":yd.disabled||void 0,"data-disabled":yd.disabled?"":void 0,"data-highlighted":hd.value?"":void 0,onPointermove:md,onPointerleave:gd,onFocus:vd[0]||(vd[0]=async Cd=>{await nextTick$1(),!(Cd.defaultPrevented||yd.disabled)&&(hd.value=!0)}),onBlur:vd[1]||(vd[1]=async Cd=>{await nextTick$1(),!Cd.defaultPrevented&&(hd.value=!1)})}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),xa$3=defineComponent({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{forwardRef:hd,currentElement:md}=R$6(),gd=_a$3(),yd=ro$2(),vd=ref$1(!1);async function Cd(){const wd=md.value;if(!ud.disabled&&wd){const Nd=new CustomEvent(vu$3,{bubbles:!0,cancelable:!0});dd("select",Nd),await nextTick$1(),Nd.defaultPrevented?vd.value=!1:gd.onClose()}}return(wd,Nd)=>(openBlock(),createBlock(ss$2,mergeProps(ud,{ref:unref(hd),onClick:Cd,onPointerdown:Nd[0]||(Nd[0]=()=>{vd.value=!0}),onPointerup:Nd[1]||(Nd[1]=async Ld=>{var Ud;await nextTick$1(),!Ld.defaultPrevented&&(vd.value||(Ud=Ld.currentTarget)==null||Ud.click())}),onKeydown:Nd[2]||(Nd[2]=async Ld=>{const Ud=unref(yd).searchRef.value!=="";wd.disabled||Ud&&Ld.key===" "||unref(Bn$3).includes(Ld.key)&&(Ld.currentTarget.click(),Ld.preventDefault())})}),{default:withCtx(()=>[renderSlot(wd.$slots,"default")]),_:3},16))}}),[Rd,rs$2]=te$5(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext"),uo$3=defineComponent({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const ed=Rd({checked:ref$1(!1)});return(ud,dd)=>(openBlock(),createBlock(unref(Pe$6),{present:ud.forceMount||unref(La$2)(unref(ed).checked.value)||unref(ed).checked.value===!0},{default:withCtx(()=>[createVNode(unref(O$4),{as:ud.as,"as-child":ud.asChild,"data-state":unref(ao$2)(unref(ed).checked.value)},{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),co$4=defineComponent({__name:"MenuCheckboxItem",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=ne$5(ud,"checked",dd);return rs$2({checked:hd}),(md,gd)=>(openBlock(),createBlock(xa$3,mergeProps({role:"menuitemcheckbox"},ud,{"aria-checked":unref(La$2)(unref(hd))?"mixed":unref(hd),"data-state":unref(ao$2)(unref(hd)),onSelect:gd[0]||(gd[0]=async yd=>{dd("select",yd),unref(La$2)(unref(hd))?hd.value=!0:hd.value=!unref(hd)})}),{default:withCtx(()=>[renderSlot(md.$slots,"default",{checked:unref(hd)})]),_:3},16,["aria-checked","data-state"]))}}),Ad=defineComponent({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=Se$6(ud,dd),md=Vt$3(),{forwardRef:gd,currentElement:yd}=R$6();return ga$2(yd),(vd,Cd)=>(openBlock(),createBlock(io$3,mergeProps(unref(hd),{ref:unref(gd),"trap-focus":unref(md).open.value,"disable-outside-pointer-events":unref(md).open.value,"disable-outside-scroll":!0,onDismiss:Cd[0]||(Cd[0]=wd=>unref(md).onOpenChange(!1)),onFocusOutside:Cd[1]||(Cd[1]=withModifiers(wd=>dd("focusOutside",wd),["prevent"]))}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),Od=defineComponent({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed),dd=Vt$3();return(hd,md)=>(openBlock(),createBlock(io$3,mergeProps(unref(ud),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:md[0]||(md[0]=gd=>unref(dd).onOpenChange(!1))}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16))}}),fo$2=defineComponent({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed),dd=Vt$3(),hd=_a$3();return(md,gd)=>(openBlock(),createBlock(unref(Pe$6),{present:md.forceMount||unref(dd).open.value},{default:withCtx(()=>[unref(hd).modal.value?(openBlock(),createBlock(Ad,normalizeProps(mergeProps({key:0},{...md.$attrs,...unref(ud)})),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16)):(openBlock(),createBlock(Od,normalizeProps(mergeProps({key:1},{...md.$attrs,...unref(ud)})),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),tn$3=defineComponent({__name:"MenuGroup",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(O$4),mergeProps({role:"group"},ed),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),vo$1=defineComponent({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(rt$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),[kd,Md]=te$5("MenuRadioGroup"),mo$3=defineComponent({__name:"MenuRadioGroup",props:{modelValue:{default:""},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=ne$5(ud,"modelValue",ed);return Md({modelValue:dd,onValueChange:hd=>{dd.value=hd}}),(hd,md)=>(openBlock(),createBlock(tn$3,normalizeProps(guardReactiveProps(ud)),{default:withCtx(()=>[renderSlot(hd.$slots,"default",{modelValue:unref(dd)})]),_:3},16))}}),ho$2=defineComponent({__name:"MenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{value:hd}=toRefs(ud),md=kd(),gd=computed(()=>md.modelValue.value===(hd==null?void 0:hd.value));return rs$2({checked:gd}),(yd,vd)=>(openBlock(),createBlock(xa$3,mergeProps({role:"menuitemradio"},ud,{"aria-checked":gd.value,"data-state":unref(ao$2)(gd.value),onSelect:vd[0]||(vd[0]=async Cd=>{dd("select",Cd),unref(md).onValueChange(unref(hd))})}),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),yo$3=defineComponent({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{role:"separator","aria-orientation":"horizontal"}),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),[is$4,Vd]=te$5("MenuSub"),go$3=defineComponent({__name:"MenuSub",props:{open:{type:Boolean,default:void 0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ne$5(ud,"open",ed,{defaultValue:!1,passive:ud.open===void 0}),hd=Vt$3(),md=ref$1(),gd=ref$1();return watchEffect(yd=>{(hd==null?void 0:hd.open.value)===!1&&(dd.value=!1),yd(()=>dd.value=!1)}),ns$2({open:dd,onOpenChange:yd=>{dd.value=yd},content:gd,onContentChange:yd=>{gd.value=yd}}),Vd({triggerId:"",contentId:"",trigger:md,onTriggerChange:yd=>{md.value=yd}}),(yd,vd)=>(openBlock(),createBlock(unref(kt$4),null,{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3}))}}),bo$3=defineComponent({__name:"MenuSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed),dd=Vt$3(),hd=_a$3(),md=is$4(),{forwardRef:gd,currentElement:yd}=R$6();return md.contentId||(md.contentId=ge$7(void 0,"radix-vue-menu-sub-content")),(vd,Cd)=>(openBlock(),createBlock(unref(Pe$6),{present:vd.forceMount||unref(dd).open.value},{default:withCtx(()=>[createVNode(io$3,mergeProps(unref(ud),{id:unref(md).contentId,ref:unref(gd),"aria-labelledby":unref(md).triggerId,align:"start",side:unref(hd).dir.value==="rtl"?"left":"right","disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:Cd[0]||(Cd[0]=withModifiers(wd=>{var Nd;unref(hd).isUsingKeyboardRef.value&&((Nd=unref(yd))==null||Nd.focus())},["prevent"])),onCloseAutoFocus:Cd[1]||(Cd[1]=withModifiers(()=>{},["prevent"])),onFocusOutside:Cd[2]||(Cd[2]=wd=>{wd.defaultPrevented||wd.target!==unref(md).trigger.value&&unref(dd).onOpenChange(!1)}),onEscapeKeyDown:Cd[3]||(Cd[3]=wd=>{unref(hd).onClose(),wd.preventDefault()}),onKeydown:Cd[4]||(Cd[4]=wd=>{var Nd,Ld;const Ud=(Nd=wd.currentTarget)==null?void 0:Nd.contains(wd.target),jd=unref(gu$2)[unref(hd).dir.value].includes(wd.key);Ud&&jd&&(unref(dd).onOpenChange(!1),(Ld=unref(md).trigger.value)==null||Ld.focus(),wd.preventDefault())})}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),Co$1=defineComponent({__name:"MenuSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,ud=Vt$3(),dd=_a$3(),hd=is$4(),md=ro$2(),gd=ref$1(null);hd.triggerId||(hd.triggerId=ge$7(void 0,"radix-vue-menu-sub-trigger"));function yd(){gd.value&&window.clearTimeout(gd.value),gd.value=null}onUnmounted(()=>{yd()});function vd(Nd){!da$1(Nd)||md.onItemEnter(Nd)||!ed.disabled&&!ud.open.value&&!gd.value&&(md.onPointerGraceIntentChange(null),gd.value=window.setTimeout(()=>{ud.onOpenChange(!0),yd()},100))}async function Cd(Nd){var Ld,Ud;if(!da$1(Nd))return;yd();const jd=(Ld=ud.content.value)==null?void 0:Ld.getBoundingClientRect();if(jd!=null&&jd.width){const Gd=(Ud=ud.content.value)==null?void 0:Ud.dataset.side,Yd=Gd==="right",zd=Yd?-5:5,qd=jd[Yd?"left":"right"],Wd=jd[Yd?"right":"left"];md.onPointerGraceIntentChange({area:[{x:Nd.clientX+zd,y:Nd.clientY},{x:qd,y:jd.top},{x:Wd,y:jd.top},{x:Wd,y:jd.bottom},{x:qd,y:jd.bottom}],side:Gd}),window.clearTimeout(md.pointerGraceTimerRef.value),md.pointerGraceTimerRef.value=window.setTimeout(()=>md.onPointerGraceIntentChange(null),300)}else{if(md.onTriggerLeave(Nd))return;md.onPointerGraceIntentChange(null)}}async function wd(Nd){var Ld;const Ud=md.searchRef.value!=="";ed.disabled||Ud&&Nd.key===" "||yu$2[dd.dir.value].includes(Nd.key)&&(ud.onOpenChange(!0),await nextTick$1(),(Ld=ud.content.value)==null||Ld.focus(),Nd.preventDefault())}return(Nd,Ld)=>(openBlock(),createBlock(Qa$1,{"as-child":""},{default:withCtx(()=>[createVNode(ss$2,mergeProps(ed,{id:unref(hd).triggerId,ref:Ud=>{var jd;(jd=unref(hd))==null||jd.onTriggerChange(Ud==null?void 0:Ud.$el)},"aria-haspopup":"menu","aria-expanded":unref(ud).open.value,"aria-controls":unref(hd).contentId,"data-state":unref(to$2)(unref(ud).open.value),onClick:Ld[0]||(Ld[0]=async Ud=>{ed.disabled||Ud.defaultPrevented||(Ud.currentTarget.focus(),unref(ud).open.value||unref(ud).onOpenChange(!0))}),onPointermove:vd,onPointerleave:Cd,onKeydown:wd}),{default:withCtx(()=>[renderSlot(Nd.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),[us$3,Fd]=te$5("ContextMenuRoot"),rm$1=defineComponent({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{dir:hd,modal:md}=toRefs(ud);R$6();const gd=we$5(hd),yd=ref$1(!1);return Fd({open:yd,onOpenChange:vd=>{yd.value=vd},dir:gd,modal:md}),watch(yd,vd=>{dd("update:open",vd)}),(vd,Cd)=>(openBlock(),createBlock(unref(so$2),{open:yd.value,"onUpdate:open":Cd[0]||(Cd[0]=wd=>yd.value=wd),dir:unref(gd),modal:unref(md)},{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function Zo$3(Ra){return Ra.pointerType!=="mouse"}const im=defineComponent({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const ed=Ra,{disabled:ud}=toRefs(ed),{forwardRef:dd}=R$6(),hd=us$3(),md=ref$1({x:0,y:0}),gd=computed(()=>({getBoundingClientRect:()=>({width:0,height:0,left:md.value.x,right:md.value.x,top:md.value.y,bottom:md.value.y,...md.value})})),yd=ref$1(0);function vd(){window.clearTimeout(yd.value)}function Cd(Ud){md.value={x:Ud.clientX,y:Ud.clientY},hd.onOpenChange(!0)}async function wd(Ud){ud.value||(await nextTick$1(),Ud.defaultPrevented||(vd(),Cd(Ud),Ud.preventDefault()))}async function Nd(Ud){ud.value||(await nextTick$1(),Zo$3(Ud)&&!Ud.defaultPrevented&&(vd(),yd.value=window.setTimeout(()=>Cd(Ud),700)))}async function Ld(Ud){ud.value||(await nextTick$1(),Zo$3(Ud)&&!Ud.defaultPrevented&&vd())}return(Ud,jd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(Qa$1),{as:"template",element:gd.value},null,8,["element"]),createVNode(unref(O$4),mergeProps({ref:unref(dd),as:Ud.as,"as-child":Ud.asChild,"data-state":unref(hd).open.value?"open":"closed","data-disabled":unref(ud)?"":void 0,style:{WebkitTouchCallout:"none"}},Ud.$attrs,{onContextmenu:wd,onPointerdown:Nd,onPointermove:Ld,onPointercancel:Ld,onPointerup:Ld}),{default:withCtx(()=>[renderSlot(Ud.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),um=defineComponent({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(vo$1),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),dm=defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed);R$6();const dd=us$3(),hd=ref$1(!1);return(md,gd)=>(openBlock(),createBlock(unref(fo$2),mergeProps(unref(ud),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:gd[0]||(gd[0]=yd=>{!yd.defaultPrevented&&hd.value&&yd.preventDefault(),hd.value=!1}),onInteractOutside:gd[1]||(gd[1]=yd=>{!yd.defaultPrevented&&!unref(dd).modal.value&&(hd.value=!0)})}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),fm=defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);return R$6(),(hd,md)=>(openBlock(),createBlock(unref(xa$3),normalizeProps(guardReactiveProps({...ud,...unref(dd)})),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16))}}),vm$1=defineComponent({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(yo$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),[fs$3,cc$2]=te$5("DropdownMenuRoot"),uh=defineComponent({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed;R$6();const hd=ne$5(ud,"open",dd,{defaultValue:ud.defaultOpen,passive:ud.open===void 0}),md=ref$1(),{modal:gd,dir:yd}=toRefs(ud),vd=we$5(yd);return cc$2({open:hd,onOpenChange:Cd=>{hd.value=Cd},onOpenToggle:()=>{hd.value=!hd.value},triggerId:"",triggerElement:md,contentId:"",modal:gd,dir:vd}),(Cd,wd)=>(openBlock(),createBlock(unref(so$2),{open:unref(hd),"onUpdate:open":wd[0]||(wd[0]=Nd=>isRef(hd)?hd.value=Nd:null),dir:unref(vd),modal:unref(gd)},{default:withCtx(()=>[renderSlot(Cd.$slots,"default",{open:unref(hd)})]),_:3},8,["open","dir","modal"]))}}),dh=defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=fs$3(),{forwardRef:dd,currentElement:hd}=R$6();return onMounted(()=>{ud.triggerElement=hd}),ud.triggerId||(ud.triggerId=ge$7(void 0,"radix-vue-dropdown-menu-trigger")),(md,gd)=>(openBlock(),createBlock(unref(Qa$1),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{id:unref(ud).triggerId,ref:unref(dd),type:md.as==="button"?"button":void 0,"as-child":ed.asChild,as:md.as,"aria-haspopup":"menu","aria-expanded":unref(ud).open.value,"aria-controls":unref(ud).open.value?unref(ud).contentId:void 0,"data-disabled":md.disabled?"":void 0,disabled:md.disabled,"data-state":unref(ud).open.value?"open":"closed",onClick:gd[0]||(gd[0]=async yd=>{var vd;!md.disabled&&yd.button===0&&yd.ctrlKey===!1&&((vd=unref(ud))==null||vd.onOpenToggle(),await nextTick$1(),unref(ud).open.value&&yd.preventDefault())}),onKeydown:gd[1]||(gd[1]=withKeys(yd=>{md.disabled||(["Enter"," "].includes(yd.key)&&unref(ud).onOpenToggle(),yd.key==="ArrowDown"&&unref(ud).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(yd.key)&&yd.preventDefault())},["enter","space","arrow-down"]))},{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),ch$1=defineComponent({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(vo$1),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),fh=defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed);R$6();const dd=fs$3(),hd=ref$1(!1);function md(gd){gd.defaultPrevented||(hd.value||setTimeout(()=>{var yd;(yd=dd.triggerElement.value)==null||yd.focus()},0),hd.value=!1,gd.preventDefault())}return dd.contentId||(dd.contentId=ge$7(void 0,"radix-vue-dropdown-menu-content")),(gd,yd)=>{var vd;return openBlock(),createBlock(unref(fo$2),mergeProps(unref(ud),{id:unref(dd).contentId,"aria-labelledby":(vd=unref(dd))==null?void 0:vd.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:md,onInteractOutside:yd[0]||(yd[0]=Cd=>{var wd;if(Cd.defaultPrevented)return;const Nd=Cd.detail.originalEvent,Ld=Nd.button===0&&Nd.ctrlKey===!0,Ud=Nd.button===2||Ld;(!unref(dd).modal.value||Ud)&&(hd.value=!0),(wd=unref(dd).triggerElement.value)!=null&&wd.contains(Cd.target)&&Cd.preventDefault()})}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),vh=defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);return R$6(),(hd,md)=>(openBlock(),createBlock(unref(xa$3),normalizeProps(guardReactiveProps({...ud,...unref(dd)})),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16))}}),gh=defineComponent({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(uo$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),Ch=defineComponent({__name:"DropdownMenuRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);return R$6(),(hd,md)=>(openBlock(),createBlock(unref(mo$3),normalizeProps(guardReactiveProps({...ud,...unref(dd)})),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16))}}),wh=defineComponent({__name:"DropdownMenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed);return R$6(),(dd,hd)=>(openBlock(),createBlock(unref(ho$2),normalizeProps(guardReactiveProps(unref(ud))),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16))}}),[xo$4,vc$1]=te$5("HoverCardRoot"),Rh=defineComponent({__name:"HoverCardRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},openDelay:{default:700},closeDelay:{default:300}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{openDelay:hd,closeDelay:md}=toRefs(ud);R$6();const gd=ne$5(ud,"open",dd,{defaultValue:ud.defaultOpen,passive:ud.open===void 0}),yd=ref$1(0),vd=ref$1(0),Cd=ref$1(!1),wd=ref$1(!1),Nd=ref$1(!1),Ld=ref$1();function Ud(){clearTimeout(vd.value),yd.value=window.setTimeout(()=>gd.value=!0,hd.value)}function jd(){clearTimeout(yd.value),!Cd.value&&!wd.value&&(vd.value=window.setTimeout(()=>gd.value=!1,md.value))}function Gd(){gd.value=!1}return vc$1({open:gd,onOpenChange(Yd){gd.value=Yd},onOpen:Ud,onClose:jd,onDismiss:Gd,hasSelectionRef:Cd,isPointerDownOnContentRef:wd,isPointerInTransitRef:Nd,triggerElement:Ld}),(Yd,zd)=>(openBlock(),createBlock(unref(kt$4),null,{default:withCtx(()=>[renderSlot(Yd.$slots,"default",{open:unref(gd)})]),_:3}))}});function An$3(Ra){return ed=>ed.pointerType==="touch"?void 0:Ra()}function mc$1(Ra){const ed=[],ud=document.createTreeWalker(Ra,NodeFilter.SHOW_ELEMENT,{acceptNode:dd=>dd.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;ud.nextNode();)ed.push(ud.currentNode);return ed}const Ah=defineComponent({__name:"HoverCardTrigger",props:{asChild:{type:Boolean},as:{default:"a"}},setup(Ra){const{forwardRef:ed,currentElement:ud}=R$6(),dd=xo$4();dd.triggerElement=ud;function hd(){setTimeout(()=>{!dd.isPointerInTransitRef.value&&!dd.open.value&&dd.onClose()},0)}return(md,gd)=>(openBlock(),createBlock(unref(Mt$4),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{ref:unref(ed),"as-child":md.asChild,as:md.as,"data-state":unref(dd).open.value?"open":"closed","data-grace-area-trigger":"",onPointerenter:gd[0]||(gd[0]=yd=>unref(An$3)(unref(dd).onOpen)(yd)),onPointerleave:gd[1]||(gd[1]=yd=>unref(An$3)(hd)(yd)),onFocus:gd[2]||(gd[2]=yd=>unref(dd).onOpen()),onBlur:gd[3]||(gd[3]=yd=>unref(dd).onClose())},{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},8,["as-child","as","data-state"])]),_:3}))}}),Oh=defineComponent({__name:"HoverCardPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(rt$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),hc$1=defineComponent({__name:"HoverCardContentImpl",props:{side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=Ot$3(ud),{forwardRef:md,currentElement:gd}=R$6(),yd=xo$4(),{isPointerInTransit:vd,onPointerExit:Cd}=Fl$3(yd.triggerElement,gd);mi$2(yd.isPointerInTransitRef,vd,{direction:"rtl"}),Cd(()=>{yd.onClose()});const wd=ref$1(!1);let Nd;watchEffect(Ud=>{if(wd.value){const jd=document.body;Nd=jd.style.userSelect||jd.style.webkitUserSelect,jd.style.userSelect="none",jd.style.webkitUserSelect="none",Ud(()=>{jd.style.userSelect=Nd,jd.style.webkitUserSelect=Nd})}});function Ld(){wd.value=!1,yd.isPointerDownOnContentRef.value=!1,nextTick$1(()=>{var Ud;((Ud=document.getSelection())==null?void 0:Ud.toString())!==""&&(yd.hasSelectionRef.value=!0)})}return onMounted(()=>{gd.value&&(document.addEventListener("pointerup",Ld),mc$1(gd.value).forEach(Ud=>Ud.setAttribute("tabindex","-1")))}),onUnmounted(()=>{document.removeEventListener("pointerup",Ld),yd.hasSelectionRef.value=!1,yd.isPointerDownOnContentRef.value=!1}),(Ud,jd)=>(openBlock(),createBlock(unref(Ct$4),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:jd[1]||(jd[1]=Gd=>dd("escapeKeyDown",Gd)),onPointerDownOutside:jd[2]||(jd[2]=Gd=>dd("pointerDownOutside",Gd)),onFocusOutside:jd[3]||(jd[3]=withModifiers(Gd=>dd("focusOutside",Gd),["prevent"])),onDismiss:unref(yd).onDismiss},{default:withCtx(()=>[createVNode(unref(It$3),mergeProps({...unref(hd),...Ud.$attrs},{ref:unref(md),"data-state":unref(yd).open.value?"open":"closed",style:{userSelect:wd.value?"text":void 0,WebkitUserSelect:wd.value?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"},onPointerdown:jd[0]||(jd[0]=Gd=>{Gd.currentTarget.contains(Gd.target)&&(wd.value=!0),unref(yd).hasSelectionRef.value=!1,unref(yd).isPointerDownOnContentRef.value=!0})}),{default:withCtx(()=>[renderSlot(Ud.$slots,"default")]),_:3},16,["data-state","style"])]),_:3},8,["onDismiss"]))}}),kh=defineComponent({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed),{forwardRef:dd}=R$6(),hd=xo$4();return(md,gd)=>(openBlock(),createBlock(unref(Pe$6),{present:md.forceMount||unref(hd).open.value},{default:withCtx(()=>[createVNode(hc$1,mergeProps(unref(ud),{ref:unref(dd),onPointerenter:gd[0]||(gd[0]=yd=>unref(An$3)(unref(hd).onOpen)(yd))}),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),Vh=defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{onMousedown:dd[0]||(dd[0]=hd=>{!hd.defaultPrevented&&hd.detail>1&&hd.preventDefault()})}),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),[nn$3,Vc$2]=te$5("MenubarRoot"),Uh=defineComponent({__name:"MenubarRoot",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{forwardRef:hd,currentElement:md}=R$6(),{createCollection:gd}=Fe$5("menubar");gd(md);const yd=ne$5(ud,"modelValue",dd,{defaultValue:ud.defaultValue??"",passive:ud.modelValue===void 0}),vd=ref$1(null),{dir:Cd,loop:wd}=toRefs(ud),Nd=we$5(Cd);return Vc$2({modelValue:yd,dir:Nd,loop:wd,onMenuOpen:Ld=>{yd.value=Ld,vd.value=Ld},onMenuClose:()=>{yd.value=""},onMenuToggle:Ld=>{yd.value=yd.value?"":Ld,vd.value=Ld}}),(Ld,Ud)=>(openBlock(),createBlock(unref(Ft$4),{"current-tab-stop-id":vd.value,"onUpdate:currentTabStopId":Ud[0]||(Ud[0]=jd=>vd.value=jd),orientation:"horizontal",loop:unref(wd),dir:unref(Nd),"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{ref:unref(hd),role:"menubar"},{default:withCtx(()=>[renderSlot(Ld.$slots,"default",{modelValue:unref(yd)})]),_:3},512)]),_:3},8,["current-tab-stop-id","loop","dir"]))}}),[So$1,Fc$2]=te$5("MenubarMenu"),Gh=defineComponent({__name:"MenubarMenu",props:{value:{}},setup(Ra){const ed=ge$7(Ra.value),ud=nn$3();R$6();const dd=ref$1(),hd=ref$1(!1),md=computed(()=>ud.modelValue.value===ed);return watch(md,()=>{md.value||(hd.value=!1)}),Fc$2({value:ed,triggerElement:dd,triggerId:ed,contentId:"",wasKeyboardTriggerOpenRef:hd}),(gd,yd)=>(openBlock(),createBlock(unref(so$2),{open:md.value,modal:!1,dir:unref(ud).dir.value,"onUpdate:open":yd[0]||(yd[0]=vd=>{vd||unref(ud).onMenuClose()})},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},8,["open","dir"]))}}),qh=defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=nn$3(),ud=So$1(),{forwardRef:dd,currentElement:hd}=R$6(),md=ref$1(!1),gd=computed(()=>ed.modelValue.value===ud.value);return onMounted(()=>{ud.triggerElement=hd}),(yd,vd)=>(openBlock(),createBlock(unref(Nt$4),{"as-child":"",focusable:!yd.disabled,"tab-stop-id":unref(ud).value},{default:withCtx(()=>[createVNode(unref(Qa$1),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),{id:unref(ud).triggerId,ref:unref(dd),as:yd.as,type:yd.as==="button"?"button":void 0,role:"menuitem","aria-haspopup":"menu","aria-expanded":gd.value,"aria-controls":gd.value?unref(ud).contentId:void 0,"data-highlighted":md.value?"":void 0,"data-state":gd.value?"open":"closed","data-disabled":yd.disabled?"":void 0,disabled:yd.disabled,"data-value":unref(ud).value,"data-radix-vue-collection-item":"",onPointerdown:vd[0]||(vd[0]=Cd=>{!yd.disabled&&Cd.button===0&&Cd.ctrlKey===!1&&(unref(ed).onMenuOpen(unref(ud).value),gd.value||Cd.preventDefault())}),onPointerenter:vd[1]||(vd[1]=()=>{var Cd;unref(ed).modelValue.value&&!gd.value&&(unref(ed).onMenuOpen(unref(ud).value),(Cd=unref(hd))==null||Cd.focus())}),onKeydown:vd[2]||(vd[2]=withKeys(Cd=>{yd.disabled||(["Enter"," "].includes(Cd.key)&&unref(ed).onMenuToggle(unref(ud).value),Cd.key==="ArrowDown"&&unref(ed).onMenuOpen(unref(ud).value),["Enter"," ","ArrowDown"].includes(Cd.key)&&(unref(ud).wasKeyboardTriggerOpenRef.value=!0,Cd.preventDefault()))},["enter","space","arrow-down"])),onFocus:vd[3]||(vd[3]=Cd=>md.value=!0),onBlur:vd[4]||(vd[4]=Cd=>md.value=!1)},{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},8,["id","as","type","aria-expanded","aria-controls","data-highlighted","data-state","data-disabled","disabled","data-value"])]),_:3})]),_:3},8,["focusable","tab-stop-id"]))}}),Yh=defineComponent({__name:"MenubarPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(vo$1),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),Xh=defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed);R$6();const dd=nn$3(),hd=So$1();hd.contentId||(hd.contentId=ge$7(void 0,"radix-vue-menubar-content"));const{injectCollection:md}=Fe$5("menubar"),gd=md(),yd=ref$1(!1);function vd(Cd){const wd=Cd.target.hasAttribute("data-radix-menubar-subtrigger"),Nd=(dd.dir.value==="rtl"?"ArrowRight":"ArrowLeft")===Cd.key;if(!Nd&&wd)return;let Ld=gd.value.map(Gd=>Gd.dataset.value);Nd&&Ld.reverse();const Ud=Ld.indexOf(hd.value);Ld=dd.loop.value?Xn$4(Ld,Ud+1):Ld.slice(Ud+1);const[jd]=Ld;jd&&dd.onMenuOpen(jd)}return(Cd,wd)=>(openBlock(),createBlock(unref(fo$2),mergeProps(unref(ud),{id:unref(hd).contentId,"data-radix-menubar-content":"","aria-labelledby":unref(hd).triggerId,style:{"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:wd[0]||(wd[0]=Nd=>{var Ld;!unref(dd).modelValue.value&&!yd.value&&((Ld=unref(hd).triggerElement.value)==null||Ld.focus()),yd.value=!1,Nd.preventDefault()}),onFocusOutside:wd[1]||(wd[1]=Nd=>{const Ld=Nd.target;unref(gd).some(Ud=>Ud.contains(Ld))&&Nd.preventDefault()}),onInteractOutside:wd[2]||(wd[2]=Nd=>{yd.value=!0}),onEntryFocus:wd[3]||(wd[3]=Nd=>{unref(hd).wasKeyboardTriggerOpenRef.value||Nd.preventDefault()}),onKeydown:withKeys(vd,["arrow-right","arrow-left"])}),{default:withCtx(()=>[renderSlot(Cd.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),Jh=defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);return R$6(),(hd,md)=>(openBlock(),createBlock(unref(xa$3),normalizeProps(guardReactiveProps({...ud,...unref(dd)})),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16))}}),ey=defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(yo$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),ty=defineComponent({__name:"MenubarCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(Ra,{emit:ed}){const ud=Ra,dd=Te$5(ed);return R$6(),(hd,md)=>(openBlock(),createBlock(unref(co$4),normalizeProps(guardReactiveProps({...ud,...unref(dd)})),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16))}}),ay$1=defineComponent({__name:"MenubarItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(uo$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),sy=defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed;R$6();const hd=ne$5(ud,"open",dd,{defaultValue:ud.defaultOpen??!1,passive:ud.open===void 0});return(md,gd)=>(openBlock(),createBlock(unref(go$3),{open:unref(hd),"onUpdate:open":gd[0]||(gd[0]=yd=>isRef(hd)?hd.value=yd:null)},{default:withCtx(()=>[renderSlot(md.$slots,"default",{open:unref(hd)})]),_:3},8,["open"]))}}),ry=defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Se$6(Ra,ed);R$6();const{injectCollection:dd}=Fe$5("menubar"),hd=nn$3(),md=So$1(),gd=dd();function yd(vd){if(vd.target.hasAttribute("data-radix-menubar-subtrigger"))return;let Cd=gd.value.map(Ld=>Ld.dataset.value);const wd=Cd.indexOf(md.value);Cd=hd.loop.value?Xn$4(Cd,wd+1):Cd.slice(wd+1);const[Nd]=Cd;Nd&&hd.onMenuOpen(Nd)}return(vd,Cd)=>(openBlock(),createBlock(unref(bo$3),mergeProps(unref(ud),{"data-radix-menubar-content":"",style:{"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"},onKeydown:withKeys(yd,["arrow-right"])}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16))}}),iy=defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return R$6(),(ud,dd)=>(openBlock(),createBlock(unref(Co$1),mergeProps(ed,{"data-radix-menubar-subtrigger":""}),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}});function bs$3(Ra){const{disabled:ed}=Ra,ud=ref$1(),dd=ua$2(),hd=()=>window.clearTimeout(ud.value),md=Ld=>{hd(),!ed.value&&(dd.trigger(),ud.value=window.setTimeout(()=>{md(60)},Ld))},gd=()=>{md(400)},yd=()=>{hd()},vd=ref$1(!1),Cd=computed(()=>$e$4(Ra.target)),wd=Ld=>{Ld.button!==0||vd.value||(Ld.preventDefault(),vd.value=!0,gd())},Nd=()=>{vd.value=!1,yd()};return Je$3&&(He$4(Cd||window,"pointerdown",wd),He$4(window,"pointerup",Nd),He$4(window,"pointercancel",Nd)),{isPressed:vd,onTrigger:dd.on}}function Qo$3(Ra,ed=ref$1({})){return $l$3(()=>new $488c6ddbf4ef74c2$export$cc77c4ff7e8673c5(Ra.value,ed.value))}function Wc$2(Ra,ed=ref$1({})){return $l$3(()=>new $6c7bd7858deea686$export$cd11ab140839f11d(Ra.value,ed.value))}function el$3(Ra,ed,ud){let dd=Ra==="+"?ed+ud:ed-ud;if(ed%1!==0||ud%1!==0){const hd=ed.toString().split("."),md=ud.toString().split("."),gd=hd[1]&&hd[1].length||0,yd=md[1]&&md[1].length||0,vd=10**Math.max(gd,yd);ed=Math.round(ed*vd),ud=Math.round(ud*vd),dd=Ra==="+"?ed+ud:ed-ud,dd/=vd}return dd}const jc$2=["value","name","disabled","required"],[Do$3,Uc$2]=te$5("NumberFieldRoot"),gy$1=defineComponent({inheritAttrs:!1,__name:"NumberFieldRoot",props:{defaultValue:{default:void 0},modelValue:{},min:{},max:{},step:{default:1},formatOptions:{},locale:{default:"en-US"},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},asChild:{type:Boolean},as:{default:"div"}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{disabled:hd,min:md,max:gd,step:yd,locale:vd,formatOptions:Cd,id:wd}=toRefs(ud),Nd=ne$5(ud,"modelValue",dd,{defaultValue:ud.defaultValue,passive:ud.modelValue===void 0}),{primitiveElement:Ld,currentElement:Ud}=Re$7(),jd=at$6(Ud),Gd=ref$1(),Yd=computed(()=>Df(Nd.value)===md.value||(md.value&&!isNaN(Nd.value)?el$3("-",Nd.value,yd.value)Df(Nd.value)===gd.value||(gd.value&&!isNaN(Nd.value)?el$3("+",Nd.value,yd.value)>gd.value:!1));function qd(Cf,If=1){var Ff;const sh=mf.parse(((Ff=Gd.value)==null?void 0:Ff.value)??"");ud.disabled||(isNaN(sh)?Nd.value=md.value??0:Cf==="increase"?Nd.value=Df(sh+(yd.value??1)*If):Nd.value=Df(sh-(yd.value??1)*If))}function Wd(Cf=1){qd("increase",Cf)}function Xd(Cf=1){qd("decrease",Cf)}function Jd(Cf){Cf==="min"&&md.value!==void 0?Nd.value=Df(md.value):Cf==="max"&&gd.value!==void 0&&(Nd.value=Df(gd.value))}const Zd=Qo$3(vd,Cd),mf=Wc$2(vd,Cd),xf=computed(()=>Zd.resolvedOptions().maximumFractionDigits>0?"decimal":"numeric"),_f=Qo$3(vd,Cd),vf=computed(()=>isNaN(Nd.value)?"":_f.format(Nd.value));function gf(Cf){return mf.isValidPartialNumber(Cf,md.value,gd.value)}function Af(Cf){Gd.value&&(Gd.value.value=Cf)}function Df(Cf){let If;return yd.value===void 0||isNaN(yd.value)?If=Ut$4(Cf,md.value,gd.value):If=Wr$4(Cf,md.value,gd.value,yd.value),If=mf.parse(Zd.format(If)),If}function Of(Cf){const If=mf.parse(Cf);return Nd.value=Df(If),Cf.length?Af(vf.value):Af(Cf)}return Uc$2({modelValue:Nd,handleDecrease:Xd,handleIncrease:Wd,handleMinMaxValue:Jd,inputMode:xf,inputEl:Gd,onInputElement:Cf=>Gd.value=Cf,textValue:vf,validate:gf,applyInputValue:Of,disabled:hd,max:gd,min:md,isDecreaseDisabled:Yd,isIncreaseDisabled:zd,id:wd}),(Cf,If)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps(Cf.$attrs,{ref_key:"primitiveElement",ref:Ld,role:"group",as:Cf.as,"as-child":Cf.asChild,"data-disabled":unref(hd)?"":void 0}),{default:withCtx(()=>[renderSlot(Cf.$slots,"default",{modelValue:unref(Nd),textValue:vf.value})]),_:3},16,["as","as-child","data-disabled"]),unref(jd)?(openBlock(),createElementBlock("input",{key:0,type:"text",tabindex:"-1","aria-hidden":"true",value:unref(Nd),name:ud.name,disabled:ud.disabled,required:ud.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,jc$2)):createCommentVNode("",!0)],64))}}),by$2=defineComponent({__name:"NumberFieldInput",props:{asChild:{type:Boolean},as:{default:"input"}},setup(Ra){const ed=Ra,{primitiveElement:ud,currentElement:dd}=Re$7(),hd=Do$3();function md(vd){vd.target===me$4()&&(Math.abs(vd.deltaY)<=Math.abs(vd.deltaX)||(vd.preventDefault(),vd.deltaY>0?hd.handleIncrease():vd.deltaY<0&&hd.handleDecrease()))}onMounted(()=>{hd.onInputElement(dd.value)});const gd=ref$1(hd.textValue.value);watch(()=>hd.textValue.value,()=>{gd.value=hd.textValue.value},{immediate:!0,deep:!0});function yd(){requestAnimationFrame(()=>{gd.value=hd.textValue.value})}return(vd,Cd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{id:unref(hd).id.value,ref_key:"primitiveElement",ref:ud,value:gd.value,role:"spinbutton",type:"text",tabindex:"0",inputmode:unref(hd).inputMode.value,disabled:unref(hd).disabled.value?"":void 0,"data-disabled":unref(hd).disabled.value?"":void 0,autocomplete:"off",autocorrect:"off",spellcheck:"false","aria-roledescription":"Number field","aria-valuenow":unref(hd).modelValue.value,"aria-valuemin":unref(hd).min.value,"aria-valuemax":unref(hd).max.value,onKeydown:[Cd[0]||(Cd[0]=withKeys(withModifiers(wd=>unref(hd).handleIncrease(),["prevent"]),["up"])),Cd[1]||(Cd[1]=withKeys(withModifiers(wd=>unref(hd).handleDecrease(),["prevent"]),["down"])),Cd[2]||(Cd[2]=withKeys(withModifiers(wd=>unref(hd).handleIncrease(10),["prevent"]),["page-up"])),Cd[3]||(Cd[3]=withKeys(withModifiers(wd=>unref(hd).handleDecrease(10),["prevent"]),["page-down"])),Cd[4]||(Cd[4]=withKeys(withModifiers(wd=>unref(hd).handleMinMaxValue("min"),["prevent"]),["home"])),Cd[5]||(Cd[5]=withKeys(withModifiers(wd=>unref(hd).handleMinMaxValue("max"),["prevent"]),["end"])),Cd[8]||(Cd[8]=withKeys(wd=>{var Nd;return unref(hd).applyInputValue((Nd=wd.target)==null?void 0:Nd.value)},["enter"]))],onWheel:md,onBeforeinput:Cd[6]||(Cd[6]=wd=>{const Nd=wd.target;let Ld=Nd.value.slice(0,Nd.selectionStart??void 0)+(wd.data??"")+Nd.value.slice(Nd.selectionEnd??void 0);unref(hd).validate(Ld)||wd.preventDefault()}),onInput:Cd[7]||(Cd[7]=wd=>{const Nd=wd.target;gd.value=Nd.value}),onChange:yd,onBlur:Cd[9]||(Cd[9]=wd=>{var Nd;return unref(hd).applyInputValue((Nd=wd.target)==null?void 0:Nd.value)})}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16,["id","value","inputmode","disabled","data-disabled","aria-valuenow","aria-valuemin","aria-valuemax"]))}}),Cy=defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=Do$3(),dd=computed(()=>{var vd;return((vd=ud.disabled)==null?void 0:vd.value)||ed.disabled||ud.isIncreaseDisabled.value}),{primitiveElement:hd,currentElement:md}=Re$7(),{isPressed:gd,onTrigger:yd}=bs$3({target:md,disabled:dd});return yd(()=>{ud.handleIncrease()}),(vd,Cd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{ref_key:"primitiveElement",ref:hd,tabindex:"-1","aria-label":"Increase",type:vd.as==="button"?"button":void 0,style:{userSelect:unref(gd)?"none":void 0},disabled:dd.value?"":void 0,"data-disabled":dd.value?"":void 0,"data-pressed":unref(gd)?"true":void 0,onContextmenu:Cd[0]||(Cd[0]=withModifiers(()=>{},["prevent"]))}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),wy$1=defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=Do$3(),dd=computed(()=>{var vd;return((vd=ud.disabled)==null?void 0:vd.value)||ed.disabled||ud.isDecreaseDisabled.value}),{primitiveElement:hd,currentElement:md}=Re$7(),{isPressed:gd,onTrigger:yd}=bs$3({target:md,disabled:dd});return yd(()=>{ud.handleDecrease()}),(vd,Cd)=>(openBlock(),createBlock(unref(O$4),mergeProps(ed,{ref_key:"primitiveElement",ref:hd,tabindex:"-1","aria-label":"Decrease",type:vd.as==="button"?"button":void 0,style:{userSelect:unref(gd)?"none":void 0},disabled:dd.value?"":void 0,"data-disabled":dd.value?"":void 0,"data-pressed":unref(gd)?"true":void 0,onContextmenu:Cd[0]||(Cd[0]=withModifiers(()=>{},["prevent"]))}),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16,["type","style","disabled","data-disabled","data-pressed"]))}}),Nf=["default-value"],Lf=defineComponent({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(Ra){const ed=Ra,{value:ud}=toRefs(ed),dd=ref$1();return(hd,md)=>(openBlock(),createBlock(unref(Jt$4),{"as-child":""},{default:withCtx(()=>[withDirectives(createBaseVNode("select",mergeProps({ref_key:"selectElement",ref:dd},ed,{"onUpdate:modelValue":md[0]||(md[0]=gd=>isRef(ud)?ud.value=gd:null),"default-value":unref(ud)}),[renderSlot(hd.$slots,"default")],16,Nf),[[vModelSelect,unref(ud)]])]),_:3}))}}),zf={key:0,value:""},[xt$1,Rs$1]=te$5("SelectRoot"),[Kf,Hf$1]=te$5("SelectRoot"),Ky=defineComponent({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=ne$5(ud,"modelValue",dd,{defaultValue:ud.defaultValue,passive:ud.modelValue===void 0}),md=ne$5(ud,"open",dd,{defaultValue:ud.defaultOpen,passive:ud.open===void 0}),gd=ref$1(),yd=ref$1(),vd=ref$1({x:0,y:0}),Cd=ref$1(!1),{required:wd,disabled:Nd,dir:Ld}=toRefs(ud),Ud=we$5(Ld);Rs$1({triggerElement:gd,onTriggerChange:zd=>{gd.value=zd},valueElement:yd,onValueElementChange:zd=>{yd.value=zd},valueElementHasChildren:Cd,onValueElementHasChildrenChange:zd=>{Cd.value=zd},contentId:"",modelValue:hd,onValueChange:zd=>{hd.value=zd},open:md,required:wd,onOpenChange:zd=>{md.value=zd},dir:Ud,triggerPointerDownPosRef:vd,disabled:Nd});const jd=at$6(gd),Gd=ref$1(new Set),Yd=computed(()=>Array.from(Gd.value).map(zd=>{var qd;return(qd=zd.props)==null?void 0:qd.value}).join(";"));return Hf$1({onNativeOptionAdd:zd=>{Gd.value.add(zd)},onNativeOptionRemove:zd=>{Gd.value.delete(zd)}}),(zd,qd)=>(openBlock(),createBlock(unref(kt$4),null,{default:withCtx(()=>[renderSlot(zd.$slots,"default",{modelValue:unref(hd),open:unref(md)}),unref(jd)?(openBlock(),createBlock(Lf,mergeProps({key:Yd.value},zd.$attrs,{"aria-hidden":"true",tabindex:"-1",required:unref(wd),name:zd.name,autocomplete:zd.autocomplete,disabled:unref(Nd),value:unref(hd),onChange:qd[0]||(qd[0]=Wd=>hd.value=Wd.target.value)}),{default:withCtx(()=>[unref(hd)===void 0?(openBlock(),createElementBlock("option",zf)):createCommentVNode("",!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(Array.from(Gd.value),Wd=>(openBlock(),createBlock(resolveDynamicComponent(Wd),mergeProps({ref_for:!0},Wd.props,{key:Wd.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):createCommentVNode("",!0)]),_:3}))}}),Wf=[" ","Enter","ArrowUp","ArrowDown"],jf=[" ","Enter"],qe$3=10;function As$3(Ra){return Ra===""||ht$3(Ra)}const Hy=defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=xt$1(),dd=computed(()=>{var Ud;return((Ud=ud.disabled)==null?void 0:Ud.value)||ed.disabled}),{forwardRef:hd,currentElement:md}=R$6();ud.contentId||(ud.contentId=ge$7(void 0,"radix-vue-select-content")),onMounted(()=>{ud.triggerElement=md});const{injectCollection:gd}=Fe$5(),yd=gd(),{search:vd,handleTypeaheadSearch:Cd,resetTypeahead:wd}=ba$3(yd);function Nd(){dd.value||(ud.onOpenChange(!0),wd())}function Ld(Ud){Nd(),ud.triggerPointerDownPosRef.value={x:Math.round(Ud.pageX),y:Math.round(Ud.pageY)}}return(Ud,jd)=>(openBlock(),createBlock(unref(Mt$4),{"as-child":""},{default:withCtx(()=>{var Gd,Yd,zd,qd;return[createVNode(unref(O$4),{ref:unref(hd),role:"combobox",type:Ud.as==="button"?"button":void 0,"aria-controls":unref(ud).contentId,"aria-expanded":unref(ud).open.value||!1,"aria-required":(Gd=unref(ud).required)==null?void 0:Gd.value,"aria-autocomplete":"none",disabled:dd.value,dir:(Yd=unref(ud))==null?void 0:Yd.dir.value,"data-state":(zd=unref(ud))!=null&&zd.open.value?"open":"closed","data-disabled":dd.value?"":void 0,"data-placeholder":unref(As$3)((qd=unref(ud).modelValue)==null?void 0:qd.value)?"":void 0,"as-child":Ud.asChild,as:Ud.as,onClick:jd[0]||(jd[0]=Wd=>{var Xd;(Xd=Wd==null?void 0:Wd.currentTarget)==null||Xd.focus()}),onPointerdown:jd[1]||(jd[1]=Wd=>{if(Wd.pointerType==="touch")return Wd.preventDefault();const Xd=Wd.target;Xd.hasPointerCapture(Wd.pointerId)&&Xd.releasePointerCapture(Wd.pointerId),Wd.button===0&&Wd.ctrlKey===!1&&(Ld(Wd),Wd.preventDefault())}),onPointerup:jd[2]||(jd[2]=withModifiers(Wd=>{Wd.pointerType==="touch"&&Ld(Wd)},["prevent"])),onKeydown:jd[3]||(jd[3]=Wd=>{const Xd=unref(vd)!=="";!(Wd.ctrlKey||Wd.altKey||Wd.metaKey)&&Wd.key.length===1&&Xd&&Wd.key===" "||(unref(Cd)(Wd.key),unref(Wf).includes(Wd.key)&&(Nd(),Wd.preventDefault()))})},{default:withCtx(()=>[renderSlot(Ud.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),Wy=defineComponent({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(rt$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),[Io$2,Uf]=te$5("SelectItemAlignedPosition"),Gf=defineComponent({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{injectCollection:hd}=Fe$5(),md=xt$1(),gd=St$4(),yd=hd(),vd=ref$1(!1),Cd=ref$1(!0),wd=ref$1(),{forwardRef:Nd,currentElement:Ld}=R$6(),{viewport:Ud,selectedItem:jd,selectedItemText:Gd,focusSelectedItem:Yd}=gd;function zd(){if(md.triggerElement.value&&md.valueElement.value&&wd.value&&Ld.value&&Ud!=null&&Ud.value&&jd!=null&&jd.value&&Gd!=null&&Gd.value){const Xd=md.triggerElement.value.getBoundingClientRect(),Jd=Ld.value.getBoundingClientRect(),Zd=md.valueElement.value.getBoundingClientRect(),mf=Gd.value.getBoundingClientRect();if(md.dir.value!=="rtl"){const kf=mf.left-Jd.left,Rf=Zd.left-kf,_h=Xd.left-Rf,Ph=Xd.width+_h,sm=Math.max(Ph,Jd.width),th=window.innerWidth-qe$3,oh=Ut$4(Rf,qe$3,Math.max(qe$3,th-sm));wd.value.style.minWidth=`${Ph}px`,wd.value.style.left=`${oh}px`}else{const kf=Jd.right-mf.right,Rf=window.innerWidth-Zd.right-kf,_h=window.innerWidth-Xd.right-Rf,Ph=Xd.width+_h,sm=Math.max(Ph,Jd.width),th=window.innerWidth-qe$3,oh=Ut$4(Rf,qe$3,Math.max(qe$3,th-sm));wd.value.style.minWidth=`${Ph}px`,wd.value.style.right=`${oh}px`}const xf=yd.value,_f=window.innerHeight-qe$3*2,vf=Ud.value.scrollHeight,gf=window.getComputedStyle(Ld.value),Af=Number.parseInt(gf.borderTopWidth,10),Df=Number.parseInt(gf.paddingTop,10),Of=Number.parseInt(gf.borderBottomWidth,10),Cf=Number.parseInt(gf.paddingBottom,10),If=Af+Df+vf+Cf+Of,Ff=Math.min(jd.value.offsetHeight*5,If),sh=window.getComputedStyle(Ud.value),Sh=Number.parseInt(sh.paddingTop,10),yh=Number.parseInt(sh.paddingBottom,10),Mh=Xd.top+Xd.height/2-qe$3,lh=_f-Mh,rh=jd.value.offsetHeight/2,mh=jd.value.offsetTop+rh,xh=Af+Df+mh,Eh=If-xh;if(xh<=Mh){const kf=jd.value===xf[xf.length-1];wd.value.style.bottom="0px";const Rf=Ld.value.clientHeight-Ud.value.offsetTop-Ud.value.offsetHeight,_h=Math.max(lh,rh+(kf?yh:0)+Rf+Of),Ph=xh+_h;wd.value.style.height=`${Ph}px`}else{const kf=jd.value===xf[0];wd.value.style.top="0px";const Rf=Math.max(Mh,Af+Ud.value.offsetTop+(kf?Sh:0)+rh)+Eh;wd.value.style.height=`${Rf}px`,Ud.value.scrollTop=xh-Mh+Ud.value.offsetTop}wd.value.style.margin=`${qe$3}px 0`,wd.value.style.minHeight=`${Ff}px`,wd.value.style.maxHeight=`${_f}px`,dd("placed"),requestAnimationFrame(()=>vd.value=!0)}}const qd=ref$1("");onMounted(async()=>{await nextTick$1(),zd(),Ld.value&&(qd.value=window.getComputedStyle(Ld.value).zIndex)});function Wd(Xd){Xd&&Cd.value===!0&&(zd(),Yd==null||Yd(),Cd.value=!1)}return Uf({contentWrapper:wd,shouldExpandOnScrollRef:vd,onScrollButtonChange:Wd}),(Xd,Jd)=>(openBlock(),createElementBlock("div",{ref_key:"contentWrapperElement",ref:wd,style:normalizeStyle({display:"flex",flexDirection:"column",position:"fixed",zIndex:qd.value})},[createVNode(unref(O$4),mergeProps({ref:unref(Nd),style:{boxSizing:"border-box",maxHeight:"100%"}},{...Xd.$attrs,...ud}),{default:withCtx(()=>[renderSlot(Xd.$slots,"default")]),_:3},16)],4))}}),qf=defineComponent({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:qe$3},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ot$3(Ra);return(ud,dd)=>(openBlock(),createBlock(unref(It$3),mergeProps(unref(ed),{style:{boxSizing:"border-box","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),zt$1={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[St$4,Yf]=te$5("SelectContent"),Xf=defineComponent({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=xt$1();Yn$3(),ya$1(ud.bodyLock);const{createCollection:md}=Fe$5(),gd=ref$1();ga$2(gd);const yd=md(gd),{search:vd,handleTypeaheadSearch:Cd}=ba$3(yd),wd=ref$1(),Nd=ref$1(),Ld=ref$1(),Ud=ref$1(!1),jd=ref$1(!1);function Gd(){Nd.value&&gd.value&&In$2([Nd.value,gd.value])}watch(Ud,()=>{Gd()});const{onOpenChange:Yd,triggerPointerDownPosRef:zd}=hd;watchEffect(Jd=>{if(!gd.value)return;let Zd={x:0,y:0};const mf=_f=>{var vf,gf;Zd={x:Math.abs(Math.round(_f.pageX)-(((vf=zd.value)==null?void 0:vf.x)??0)),y:Math.abs(Math.round(_f.pageY)-(((gf=zd.value)==null?void 0:gf.y)??0))}},xf=_f=>{var vf;_f.pointerType!=="touch"&&(Zd.x<=10&&Zd.y<=10?_f.preventDefault():(vf=gd.value)!=null&&vf.contains(_f.target)||Yd(!1),document.removeEventListener("pointermove",mf),zd.value=null)};zd.value!==null&&(document.addEventListener("pointermove",mf),document.addEventListener("pointerup",xf,{capture:!0,once:!0})),Jd(()=>{document.removeEventListener("pointermove",mf),document.removeEventListener("pointerup",xf,{capture:!0})})});function qd(Jd){const Zd=Jd.ctrlKey||Jd.altKey||Jd.metaKey;if(Jd.key==="Tab"&&Jd.preventDefault(),!Zd&&Jd.key.length===1&&Cd(Jd.key),["ArrowUp","ArrowDown","Home","End"].includes(Jd.key)){let mf=yd.value;if(["ArrowUp","End"].includes(Jd.key)&&(mf=mf.slice().reverse()),["ArrowUp","ArrowDown"].includes(Jd.key)){const xf=Jd.target,_f=mf.indexOf(xf);mf=mf.slice(_f+1)}setTimeout(()=>In$2(mf)),Jd.preventDefault()}}const Wd=computed(()=>ud.position==="popper"?ud:{}),Xd=Ot$3(Wd.value);return Yf({content:gd,viewport:wd,onViewportChange:Jd=>{wd.value=Jd},itemRefCallback:(Jd,Zd,mf)=>{var xf,_f;const vf=!jd.value&&!mf;(((xf=hd.modelValue)==null?void 0:xf.value)!==void 0&&((_f=hd.modelValue)==null?void 0:_f.value)===Zd||vf)&&(Nd.value=Jd,vf&&(jd.value=!0))},selectedItem:Nd,selectedItemText:Ld,onItemLeave:()=>{var Jd;(Jd=gd.value)==null||Jd.focus()},itemTextRefCallback:(Jd,Zd,mf)=>{var xf,_f;const vf=!jd.value&&!mf;(((xf=hd.modelValue)==null?void 0:xf.value)!==void 0&&((_f=hd.modelValue)==null?void 0:_f.value)===Zd||vf)&&(Ld.value=Jd)},focusSelectedItem:Gd,position:ud.position,isPositioned:Ud,searchRef:vd}),(Jd,Zd)=>(openBlock(),createBlock(unref(Za$1),{"as-child":"",onMountAutoFocus:Zd[6]||(Zd[6]=withModifiers(()=>{},["prevent"])),onUnmountAutoFocus:Zd[7]||(Zd[7]=mf=>{var xf;dd("closeAutoFocus",mf),!mf.defaultPrevented&&((xf=unref(hd).triggerElement.value)==null||xf.focus({preventScroll:!0}),mf.preventDefault())})},{default:withCtx(()=>[createVNode(unref(Ct$4),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:Zd[2]||(Zd[2]=withModifiers(()=>{},["prevent"])),onDismiss:Zd[3]||(Zd[3]=mf=>unref(hd).onOpenChange(!1)),onEscapeKeyDown:Zd[4]||(Zd[4]=mf=>dd("escapeKeyDown",mf)),onPointerDownOutside:Zd[5]||(Zd[5]=mf=>dd("pointerDownOutside",mf))},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(Jd.position==="popper"?qf:Gf),mergeProps({...Jd.$attrs,...unref(Xd)},{id:unref(hd).contentId,ref:mf=>{gd.value=unref($e$4)(mf)},role:"listbox","data-state":unref(hd).open.value?"open":"closed",dir:unref(hd).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:Zd[0]||(Zd[0]=withModifiers(()=>{},["prevent"])),onPlaced:Zd[1]||(Zd[1]=mf=>Ud.value=!0),onKeydown:qd}),{default:withCtx(()=>[renderSlot(Jd.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),Zf=defineComponent({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(Ra){return Rs$1(Ra.context),(ed,ud)=>renderSlot(ed.$slots,"default")}}),Jf={key:1},jy=defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=Se$6(ud,ed),hd=xt$1(),md=ref$1();onMounted(()=>{md.value=new DocumentFragment});const gd=ref$1(),yd=computed(()=>ud.forceMount||hd.open.value);return(vd,Cd)=>{var wd;return yd.value?(openBlock(),createBlock(unref(Pe$6),{key:0,ref_key:"presenceRef",ref:gd,present:!0},{default:withCtx(()=>[createVNode(Xf,normalizeProps(guardReactiveProps({...unref(dd),...vd.$attrs})),{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},16)]),_:3},512)):!((wd=gd.value)!=null&&wd.present)&&md.value?(openBlock(),createElementBlock("div",Jf,[(openBlock(),createBlock(Teleport,{to:md.value},[createVNode(Zf,{context:unref(hd)},{default:withCtx(()=>[renderSlot(vd.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):createCommentVNode("",!0)}}}),[Os$4,Qf]=te$5("SelectItem"),qy=defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,{disabled:ud}=toRefs(ed),dd=xt$1(),hd=St$4(zt$1),{forwardRef:md,currentElement:gd}=R$6(),yd=computed(()=>{var Gd;return((Gd=dd.modelValue)==null?void 0:Gd.value)===ed.value}),vd=ref$1(!1),Cd=ref$1(ed.textValue??""),wd=ge$7(void 0,"radix-vue-select-item-text");async function Nd(Gd){await nextTick$1(),!(Gd!=null&&Gd.defaultPrevented)&&(ud.value||(dd.onValueChange(ed.value),dd.onOpenChange(!1)))}async function Ld(Gd){var Yd;await nextTick$1(),!Gd.defaultPrevented&&(ud.value?(Yd=hd.onItemLeave)==null||Yd.call(hd):Gd.currentTarget.focus({preventScroll:!0}))}async function Ud(Gd){var Yd;await nextTick$1(),!Gd.defaultPrevented&&Gd.currentTarget===me$4()&&((Yd=hd.onItemLeave)==null||Yd.call(hd))}async function jd(Gd){var Yd;await nextTick$1(),!(Gd.defaultPrevented||((Yd=hd.searchRef)==null?void 0:Yd.value)!==""&&Gd.key===" ")&&(jf.includes(Gd.key)&&Nd(),Gd.key===" "&&Gd.preventDefault())}if(ed.value==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return onMounted(()=>{gd.value&&hd.itemRefCallback(gd.value,ed.value,ed.disabled)}),Qf({value:ed.value,disabled:ud,textId:wd,isSelected:yd,onItemTextChange:Gd=>{Cd.value=((Cd.value||(Gd==null?void 0:Gd.textContent))??"").trim()}}),(Gd,Yd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(md),role:"option","data-radix-vue-collection-item":"","aria-labelledby":unref(wd),"data-highlighted":vd.value?"":void 0,"aria-selected":yd.value,"data-state":yd.value?"checked":"unchecked","aria-disabled":unref(ud)||void 0,"data-disabled":unref(ud)?"":void 0,tabindex:unref(ud)?void 0:-1,as:Gd.as,"as-child":Gd.asChild,onFocus:Yd[0]||(Yd[0]=zd=>vd.value=!0),onBlur:Yd[1]||(Yd[1]=zd=>vd.value=!1),onPointerup:Nd,onPointerdown:Yd[2]||(Yd[2]=zd=>{zd.currentTarget.focus({preventScroll:!0})}),onTouchend:Yd[3]||(Yd[3]=withModifiers(()=>{},["prevent","stop"])),onPointermove:Ld,onPointerleave:Ud,onKeydown:jd},{default:withCtx(()=>[renderSlot(Gd.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),Yy=defineComponent({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const ed=Ra,ud=Os$4();return(dd,hd)=>unref(ud).isSelected.value?(openBlock(),createBlock(unref(O$4),mergeProps({key:0,"aria-hidden":"true"},ed),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16)):createCommentVNode("",!0)}}),Jy=defineComponent({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const ed=Ra,ud=xt$1(),dd=St$4(zt$1),hd=Kf(),md=Os$4(),{forwardRef:gd,currentElement:yd}=R$6(),vd=computed(()=>{var Cd;return h$2("option",{key:md.value,value:md.value,disabled:md.disabled.value,textContent:(Cd=yd.value)==null?void 0:Cd.textContent})});return onMounted(()=>{yd.value&&(md.onItemTextChange(yd.value),dd.itemTextRefCallback(yd.value,md.value,md.disabled.value),hd.onNativeOptionAdd(vd.value))}),onBeforeUnmount(()=>{hd.onNativeOptionRemove(vd.value)}),(Cd,wd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps({id:unref(md).textId,ref:unref(gd)},{...ed,...Cd.$attrs},{"data-item-text":""}),{default:withCtx(()=>[renderSlot(Cd.$slots,"default")]),_:3},16,["id"]),unref(md).isSelected.value&&unref(ud).valueElement.value&&!unref(ud).valueElementHasChildren.value?(openBlock(),createBlock(Teleport,{key:0,to:unref(ud).valueElement.value},[renderSlot(Cd.$slots,"default")],8,["to"])):createCommentVNode("",!0)],64))}}),Qy=defineComponent({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,{nonce:ud}=toRefs(ed),dd=Ja(ud),hd=St$4(zt$1),md=hd.position==="item-aligned"?Io$2():void 0,{forwardRef:gd,currentElement:yd}=R$6();onMounted(()=>{hd==null||hd.onViewportChange(yd.value)});const vd=ref$1(0);function Cd(wd){const Nd=wd.currentTarget,{shouldExpandOnScrollRef:Ld,contentWrapper:Ud}=md??{};if(Ld!=null&&Ld.value&&Ud!=null&&Ud.value){const jd=Math.abs(vd.value-Nd.scrollTop);if(jd>0){const Gd=window.innerHeight-qe$3*2,Yd=Number.parseFloat(Ud.value.style.minHeight),zd=Number.parseFloat(Ud.value.style.height),qd=Math.max(Yd,zd);if(qd0?Jd:0,Ud.value.style.justifyContent="flex-end")}}}vd.value=Nd.scrollTop}return(wd,Nd)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps({ref:unref(gd),"data-radix-select-viewport":"",role:"presentation"},{...wd.$attrs,...ed},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:Cd}),{default:withCtx(()=>[renderSlot(wd.$slots,"default")]),_:3},16),createVNode(unref(O$4),{as:"style",nonce:unref(dd)},{default:withCtx(()=>[createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),ks$2=defineComponent({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(Ra,{emit:ed}){const ud=ed,{injectCollection:dd}=Fe$5(),hd=dd(),md=St$4(zt$1),gd=ref$1(null);function yd(){gd.value!==null&&(window.clearInterval(gd.value),gd.value=null)}watchEffect(()=>{const wd=hd.value.find(Nd=>Nd===me$4());wd==null||wd.scrollIntoView({block:"nearest"})});function vd(){gd.value===null&&(gd.value=window.setInterval(()=>{ud("autoScroll")},50))}function Cd(){var wd;(wd=md.onItemLeave)==null||wd.call(md),gd.value===null&&(gd.value=window.setInterval(()=>{ud("autoScroll")},50))}return onBeforeUnmount(()=>yd()),(wd,Nd)=>{var Ld;return openBlock(),createBlock(unref(O$4),mergeProps({"aria-hidden":"true",style:{flexShrink:0}},(Ld=wd.$parent)==null?void 0:Ld.$props,{onPointerdown:vd,onPointermove:Cd,onPointerleave:Nd[0]||(Nd[0]=()=>{yd()})}),{default:withCtx(()=>[renderSlot(wd.$slots,"default")]),_:3},16)}}}),eg=defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=St$4(zt$1),ud=ed.position==="item-aligned"?Io$2():void 0,{forwardRef:dd,currentElement:hd}=R$6(),md=ref$1(!1);return watchEffect(gd=>{var yd,vd;if((yd=ed.viewport)!=null&&yd.value&&(vd=ed.isPositioned)!=null&&vd.value){let Cd=function(){md.value=wd.scrollTop>0};const wd=ed.viewport.value;Cd(),wd.addEventListener("scroll",Cd),gd(()=>wd.removeEventListener("scroll",Cd))}}),watch(hd,()=>{hd.value&&(ud==null||ud.onScrollButtonChange(hd.value))}),(gd,yd)=>md.value?(openBlock(),createBlock(ks$2,{key:0,ref:unref(dd),onAutoScroll:yd[0]||(yd[0]=()=>{const{viewport:vd,selectedItem:Cd}=unref(ed);vd!=null&&vd.value&&Cd!=null&&Cd.value&&(vd.value.scrollTop=vd.value.scrollTop-Cd.value.offsetHeight)})},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},512)):createCommentVNode("",!0)}}),tg=defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=St$4(zt$1),ud=ed.position==="item-aligned"?Io$2():void 0,{forwardRef:dd,currentElement:hd}=R$6(),md=ref$1(!1);return watchEffect(gd=>{var yd,vd;if((yd=ed.viewport)!=null&&yd.value&&(vd=ed.isPositioned)!=null&&vd.value){let Cd=function(){const Nd=wd.scrollHeight-wd.clientHeight;md.value=Math.ceil(wd.scrollTop)wd.removeEventListener("scroll",Cd))}}),watch(hd,()=>{hd.value&&(ud==null||ud.onScrollButtonChange(hd.value))}),(gd,yd)=>md.value?(openBlock(),createBlock(ks$2,{key:0,ref:unref(dd),onAutoScroll:yd[0]||(yd[0]=()=>{const{viewport:vd,selectedItem:Cd}=unref(ed);vd!=null&&vd.value&&Cd!=null&&Cd.value&&(vd.value.scrollTop=vd.value.scrollTop+Cd.value.offsetHeight)})},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},512)):createCommentVNode("",!0)}}),ag$1=defineComponent({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const{forwardRef:ed,currentElement:ud}=R$6(),dd=xt$1(),hd=useSlots();return onBeforeMount(()=>{var md;const gd=!!qa((md=hd==null?void 0:hd.default)==null?void 0:md.call(hd)).length;dd.onValueElementHasChildrenChange(gd)}),onMounted(()=>{dd.valueElement=ud}),(md,gd)=>(openBlock(),createBlock(unref(O$4),{ref:unref(ed),as:md.as,"as-child":md.asChild,style:{pointerEvents:"none"}},{default:withCtx(()=>{var yd;return[unref(As$3)((yd=unref(dd).modelValue)==null?void 0:yd.value)?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(md.placeholder),1)],64)):renderSlot(md.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),ng=defineComponent({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){return(ed,ud)=>(openBlock(),createBlock(unref(O$4),{"aria-hidden":"true",as:ed.as,"as-child":ed.asChild},{default:withCtx(()=>[renderSlot(ed.$slots,"default",{},()=>[createTextVNode("▼")])]),_:3},8,["as","as-child"]))}}),Ms$1=defineComponent({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,ud=["horizontal","vertical"];function dd(yd){return ud.includes(yd)}const hd=computed(()=>dd(ed.orientation)?ed.orientation:"horizontal"),md=computed(()=>hd.value==="vertical"?ed.orientation:void 0),gd=computed(()=>ed.decorative?{role:"none"}:{"aria-orientation":md.value,role:"separator"});return(yd,vd)=>(openBlock(),createBlock(unref(O$4),mergeProps({as:yd.as,"as-child":yd.asChild,"data-orientation":hd.value},gd.value),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),ap$3=defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(Ms$1,normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}});function xp$1(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}xp$1();const Kp$1=["name","disabled","required","value","checked","data-state","data-disabled"],[Hp$1,Wp$1]=te$5("SwitchRoot"),gg$1=defineComponent({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{disabled:hd}=toRefs(ud),md=ne$5(ud,"checked",dd,{defaultValue:ud.defaultChecked,passive:ud.checked===void 0});function gd(){hd.value||(md.value=!md.value)}const{forwardRef:yd,currentElement:vd}=R$6(),Cd=at$6(vd),wd=computed(()=>{var Nd;return ud.id&&vd.value?(Nd=document.querySelector(`[for="${ud.id}"]`))==null?void 0:Nd.innerText:void 0});return Wp$1({checked:md,toggleCheck:gd,disabled:hd}),(Nd,Ld)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(unref(O$4),mergeProps(Nd.$attrs,{id:Nd.id,ref:unref(yd),role:"switch",type:Nd.as==="button"?"button":void 0,value:Nd.value,"aria-label":Nd.$attrs["aria-label"]||wd.value,"aria-checked":unref(md),"aria-required":Nd.required,"data-state":unref(md)?"checked":"unchecked","data-disabled":unref(hd)?"":void 0,"as-child":Nd.asChild,as:Nd.as,disabled:unref(hd),onClick:gd,onKeydown:withKeys(withModifiers(gd,["prevent"]),["enter"])}),{default:withCtx(()=>[renderSlot(Nd.$slots,"default",{checked:unref(md)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),unref(Cd)?(openBlock(),createElementBlock("input",{key:0,type:"checkbox",name:Nd.name,tabindex:"-1","aria-hidden":"true",disabled:unref(hd),required:Nd.required,value:Nd.value,checked:!!unref(md),"data-state":unref(md)?"checked":"unchecked","data-disabled":unref(hd)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,Kp$1)):createCommentVNode("",!0)],64))}}),bg$1=defineComponent({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(Ra){const ed=Hp$1();return R$6(),(ud,dd)=>{var hd;return openBlock(),createBlock(unref(O$4),{"data-state":(hd=unref(ed).checked)!=null&&hd.value?"checked":"unchecked","data-disabled":unref(ed).disabled.value?"":void 0,"as-child":ud.asChild,as:ud.as},{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[vn$3,jp$1]=te$5("TabsRoot"),Cg=defineComponent({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,{orientation:hd,dir:md}=toRefs(ud),gd=we$5(md);R$6();const yd=ne$5(ud,"modelValue",dd,{defaultValue:ud.defaultValue,passive:ud.modelValue===void 0}),vd=ref$1();return jp$1({modelValue:yd,changeModelValue:Cd=>{yd.value=Cd},orientation:hd,dir:gd,activationMode:ud.activationMode,baseId:ge$7(void 0,"radix-vue-tabs"),tabsList:vd}),(Cd,wd)=>(openBlock(),createBlock(unref(O$4),{dir:unref(gd),"data-orientation":unref(hd),"as-child":Cd.asChild,as:Cd.as},{default:withCtx(()=>[renderSlot(Cd.$slots,"default",{modelValue:unref(yd)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),wg=defineComponent({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,{loop:ud}=toRefs(ed),{forwardRef:dd,currentElement:hd}=R$6(),md=vn$3();return md.tabsList=hd,(gd,yd)=>(openBlock(),createBlock(unref(Ft$4),{"as-child":"",orientation:unref(md).orientation.value,dir:unref(md).dir.value,loop:unref(ud)},{default:withCtx(()=>[createVNode(unref(O$4),{ref:unref(dd),role:"tablist","as-child":gd.asChild,as:gd.as,"aria-orientation":unref(md).orientation.value},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}});function ir$4(Ra,ed){return`${Ra}-trigger-${ed}`}function ur$3(Ra,ed){return`${Ra}-content-${ed}`}const _g=defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra,{forwardRef:ud}=R$6(),dd=vn$3(),hd=computed(()=>ir$4(dd.baseId,ed.value)),md=computed(()=>ur$3(dd.baseId,ed.value)),gd=computed(()=>ed.value===dd.modelValue.value),yd=ref$1(gd.value);return onMounted(()=>{requestAnimationFrame(()=>{yd.value=!1})}),(vd,Cd)=>(openBlock(),createBlock(unref(Pe$6),{present:gd.value,"force-mount":""},{default:withCtx(({present:wd})=>[createVNode(unref(O$4),{id:md.value,ref:unref(ud),"as-child":vd.asChild,as:vd.as,role:"tabpanel","data-state":gd.value?"active":"inactive","data-orientation":unref(dd).orientation.value,"aria-labelledby":hd.value,hidden:!wd.value,tabindex:"0",style:normalizeStyle({animationDuration:yd.value?"0s":void 0})},{default:withCtx(()=>[vd.forceMount||gd.value?renderSlot(vd.$slots,"default",{key:0}):createCommentVNode("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),xg=defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,{forwardRef:ud}=R$6(),dd=vn$3(),hd=computed(()=>ir$4(dd.baseId,ed.value)),md=computed(()=>ur$3(dd.baseId,ed.value)),gd=computed(()=>ed.value===dd.modelValue.value);return(yd,vd)=>(openBlock(),createBlock(unref(Nt$4),{"as-child":"",focusable:!yd.disabled,active:gd.value},{default:withCtx(()=>[createVNode(unref(O$4),{id:hd.value,ref:unref(ud),role:"tab",type:yd.as==="button"?"button":void 0,as:yd.as,"as-child":yd.asChild,"aria-selected":gd.value?"true":"false","aria-controls":md.value,"data-state":gd.value?"active":"inactive",disabled:yd.disabled,"data-disabled":yd.disabled?"":void 0,"data-orientation":unref(dd).orientation.value,onMousedown:vd[0]||(vd[0]=withModifiers(Cd=>{!yd.disabled&&Cd.ctrlKey===!1?unref(dd).changeModelValue(yd.value):Cd.preventDefault()},["left"])),onKeydown:vd[1]||(vd[1]=withKeys(Cd=>unref(dd).changeModelValue(yd.value),["enter","space"])),onFocus:vd[2]||(vd[2]=()=>{const Cd=unref(dd).activationMode!=="manual";!gd.value&&!yd.disabled&&Cd&&unref(dd).changeModelValue(yd.value)})},{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),vr$3="tooltip.open",[Mo$4,fv]=te$5("TooltipProvider"),Hg=defineComponent({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(Ra){const ed=Ra,{delayDuration:ud,skipDelayDuration:dd,disableHoverableContent:hd,disableClosingTrigger:md,ignoreNonKeyboardFocus:gd,disabled:yd}=toRefs(ed);R$6();const vd=ref$1(!0),Cd=ref$1(!1),{start:wd,stop:Nd}=Un$4(()=>{vd.value=!0},dd,{immediate:!1});return fv({isOpenDelayed:vd,delayDuration:ud,onOpen(){Nd(),vd.value=!1},onClose(){wd()},isPointerInTransitRef:Cd,disableHoverableContent:hd,disableClosingTrigger:md,disabled:yd,ignoreNonKeyboardFocus:gd}),(Ld,Ud)=>renderSlot(Ld.$slots,"default")}}),[yn$4,pv]=te$5("TooltipRoot"),Wg=defineComponent({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed;R$6();const hd=Mo$4(),md=computed(()=>ud.disableHoverableContent??hd.disableHoverableContent.value),gd=computed(()=>ud.disableClosingTrigger??hd.disableClosingTrigger.value),yd=computed(()=>ud.disabled??hd.disabled.value),vd=computed(()=>ud.delayDuration??hd.delayDuration.value),Cd=computed(()=>ud.ignoreNonKeyboardFocus??hd.ignoreNonKeyboardFocus.value),wd=ne$5(ud,"open",dd,{defaultValue:ud.defaultOpen,passive:ud.open===void 0});watch(wd,Wd=>{hd.onClose&&(Wd?(hd.onOpen(),document.dispatchEvent(new CustomEvent(vr$3))):hd.onClose())});const Nd=ref$1(!1),Ld=ref$1(),Ud=computed(()=>wd.value?Nd.value?"delayed-open":"instant-open":"closed"),{start:jd,stop:Gd}=Un$4(()=>{Nd.value=!0,wd.value=!0},vd,{immediate:!1});function Yd(){Gd(),Nd.value=!1,wd.value=!0}function zd(){Gd(),wd.value=!1}function qd(){jd()}return pv({contentId:"",open:wd,stateAttribute:Ud,trigger:Ld,onTriggerChange(Wd){Ld.value=Wd},onTriggerEnter(){hd.isOpenDelayed.value?qd():Yd()},onTriggerLeave(){md.value?zd():Gd()},onOpen:Yd,onClose:zd,disableHoverableContent:md,disableClosingTrigger:gd,disabled:yd,ignoreNonKeyboardFocus:Cd}),(Wd,Xd)=>(openBlock(),createBlock(unref(kt$4),null,{default:withCtx(()=>[renderSlot(Wd.$slots,"default",{open:unref(wd)})]),_:3}))}}),jg=defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra,ud=yn$4(),dd=Mo$4();ud.contentId||(ud.contentId=ge$7(void 0,"radix-vue-tooltip-content"));const{forwardRef:hd,currentElement:md}=R$6(),gd=ref$1(!1),yd=ref$1(!1),vd=computed(()=>ud.disabled.value?{}:{click:Gd,focus:Ud,pointermove:Nd,pointerleave:Ld,pointerdown:wd,blur:jd});onMounted(()=>{ud.onTriggerChange(md.value)});function Cd(){setTimeout(()=>{gd.value=!1},1)}function wd(){gd.value=!0,document.addEventListener("pointerup",Cd,{once:!0})}function Nd(Yd){Yd.pointerType!=="touch"&&!yd.value&&!dd.isPointerInTransitRef.value&&(ud.onTriggerEnter(),yd.value=!0)}function Ld(){ud.onTriggerLeave(),yd.value=!1}function Ud(Yd){var zd,qd;gd.value||ud.ignoreNonKeyboardFocus.value&&!((qd=(zd=Yd.target).matches)!=null&&qd.call(zd,":focus-visible"))||ud.onOpen()}function jd(){ud.onClose()}function Gd(){ud.disableClosingTrigger.value||ud.onClose()}return(Yd,zd)=>(openBlock(),createBlock(unref(Mt$4),{"as-child":""},{default:withCtx(()=>[createVNode(unref(O$4),mergeProps({ref:unref(hd),"aria-describedby":unref(ud).open.value?unref(ud).contentId:void 0,"data-state":unref(ud).stateAttribute.value,as:Yd.as,"as-child":ed.asChild,"data-grace-area-trigger":""},toHandlers(vd.value)),{default:withCtx(()=>[renderSlot(Yd.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),mr$3=defineComponent({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=yn$4(),{forwardRef:md}=R$6(),gd=useSlots(),yd=computed(()=>{var wd;return(wd=gd.default)==null?void 0:wd.call(gd)}),vd=computed(()=>{var wd;if(ud.ariaLabel)return ud.ariaLabel;let Nd="";function Ld(Ud){typeof Ud.children=="string"&&Ud.type!==Comment$2?Nd+=Ud.children:Array.isArray(Ud.children)&&Ud.children.forEach(jd=>Ld(jd))}return(wd=yd.value)==null||wd.forEach(Ud=>Ld(Ud)),Nd}),Cd=computed(()=>{const{ariaLabel:wd,...Nd}=ud;return Nd});return onMounted(()=>{He$4(window,"scroll",wd=>{const Nd=wd.target;Nd!=null&&Nd.contains(hd.trigger.value)&&hd.onClose()}),He$4(window,vr$3,hd.onClose)}),(wd,Nd)=>(openBlock(),createBlock(unref(Ct$4),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:Nd[0]||(Nd[0]=Ld=>dd("escapeKeyDown",Ld)),onPointerDownOutside:Nd[1]||(Nd[1]=Ld=>{var Ud;unref(hd).disableClosingTrigger.value&&(Ud=unref(hd).trigger.value)!=null&&Ud.contains(Ld.target)&&Ld.preventDefault(),dd("pointerDownOutside",Ld)}),onFocusOutside:Nd[2]||(Nd[2]=withModifiers(()=>{},["prevent"])),onDismiss:Nd[3]||(Nd[3]=Ld=>unref(hd).onClose())},{default:withCtx(()=>[createVNode(unref(It$3),mergeProps({ref:unref(md),"data-state":unref(hd).stateAttribute.value},{...wd.$attrs,...Cd.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:withCtx(()=>[renderSlot(wd.$slots,"default"),createVNode(unref(Jt$4),{id:unref(hd).contentId,role:"tooltip"},{default:withCtx(()=>[createTextVNode(toDisplayString(vd.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),vv=defineComponent({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(Ra){const ed=Ot$3(Ra),{forwardRef:ud,currentElement:dd}=R$6(),{trigger:hd,onClose:md}=yn$4(),gd=Mo$4(),{isPointerInTransit:yd,onPointerExit:vd}=Fl$3(hd,dd);return gd.isPointerInTransitRef=yd,vd(()=>{md()}),(Cd,wd)=>(openBlock(),createBlock(mr$3,mergeProps({ref:unref(ud)},unref(ed)),{default:withCtx(()=>[renderSlot(Cd.$slots,"default")]),_:3},16))}}),Ug=defineComponent({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=yn$4(),md=Se$6(ud,dd),{forwardRef:gd}=R$6();return(yd,vd)=>(openBlock(),createBlock(unref(Pe$6),{present:yd.forceMount||unref(hd).open.value},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(unref(hd).disableHoverableContent.value?mr$3:vv),mergeProps({ref:unref(gd)},unref(md)),{default:withCtx(()=>[renderSlot(yd.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),qg=defineComponent({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(rt$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_sfc_main$1r=defineComponent({__name:"AlertDialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(Tv),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}});function r$2(Ra){var ed,ud,dd="";if(typeof Ra=="string"||typeof Ra=="number")dd+=Ra;else if(typeof Ra=="object")if(Array.isArray(Ra)){var hd=Ra.length;for(ed=0;ed{const ed=createClassMap(Ra),{conflictingClassGroups:ud,conflictingClassGroupModifiers:dd}=Ra;return{getClassGroupId:gd=>{const yd=gd.split(CLASS_PART_SEPARATOR);return yd[0]===""&&yd.length!==1&&yd.shift(),getGroupRecursive(yd,ed)||getGroupIdForArbitraryProperty(gd)},getConflictingClassGroupIds:(gd,yd)=>{const vd=ud[gd]||[];return yd&&dd[gd]?[...vd,...dd[gd]]:vd}}},getGroupRecursive=(Ra,ed)=>{var gd;if(Ra.length===0)return ed.classGroupId;const ud=Ra[0],dd=ed.nextPart.get(ud),hd=dd?getGroupRecursive(Ra.slice(1),dd):void 0;if(hd)return hd;if(ed.validators.length===0)return;const md=Ra.join(CLASS_PART_SEPARATOR);return(gd=ed.validators.find(({validator:yd})=>yd(md)))==null?void 0:gd.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=Ra=>{if(arbitraryPropertyRegex.test(Ra)){const ed=arbitraryPropertyRegex.exec(Ra)[1],ud=ed==null?void 0:ed.substring(0,ed.indexOf(":"));if(ud)return"arbitrary.."+ud}},createClassMap=Ra=>{const{theme:ed,prefix:ud}=Ra,dd={nextPart:new Map,validators:[]};return getPrefixedClassGroupEntries(Object.entries(Ra.classGroups),ud).forEach(([md,gd])=>{processClassesRecursively(gd,dd,md,ed)}),dd},processClassesRecursively=(Ra,ed,ud,dd)=>{Ra.forEach(hd=>{if(typeof hd=="string"){const md=hd===""?ed:getPart(ed,hd);md.classGroupId=ud;return}if(typeof hd=="function"){if(isThemeGetter(hd)){processClassesRecursively(hd(dd),ed,ud,dd);return}ed.validators.push({validator:hd,classGroupId:ud});return}Object.entries(hd).forEach(([md,gd])=>{processClassesRecursively(gd,getPart(ed,md),ud,dd)})})},getPart=(Ra,ed)=>{let ud=Ra;return ed.split(CLASS_PART_SEPARATOR).forEach(dd=>{ud.nextPart.has(dd)||ud.nextPart.set(dd,{nextPart:new Map,validators:[]}),ud=ud.nextPart.get(dd)}),ud},isThemeGetter=Ra=>Ra.isThemeGetter,getPrefixedClassGroupEntries=(Ra,ed)=>ed?Ra.map(([ud,dd])=>{const hd=dd.map(md=>typeof md=="string"?ed+md:typeof md=="object"?Object.fromEntries(Object.entries(md).map(([gd,yd])=>[ed+gd,yd])):md);return[ud,hd]}):Ra,createLruCache=Ra=>{if(Ra<1)return{get:()=>{},set:()=>{}};let ed=0,ud=new Map,dd=new Map;const hd=(md,gd)=>{ud.set(md,gd),ed++,ed>Ra&&(ed=0,dd=ud,ud=new Map)};return{get(md){let gd=ud.get(md);if(gd!==void 0)return gd;if((gd=dd.get(md))!==void 0)return hd(md,gd),gd},set(md,gd){ud.has(md)?ud.set(md,gd):hd(md,gd)}}},IMPORTANT_MODIFIER="!",createParseClassName=Ra=>{const{separator:ed,experimentalParseClassName:ud}=Ra,dd=ed.length===1,hd=ed[0],md=ed.length,gd=yd=>{const vd=[];let Cd=0,wd=0,Nd;for(let Yd=0;Ydwd?Nd-wd:void 0;return{modifiers:vd,hasImportantModifier:Ud,baseClassName:jd,maybePostfixModifierPosition:Gd}};return ud?yd=>ud({className:yd,parseClassName:gd}):gd},sortModifiers=Ra=>{if(Ra.length<=1)return Ra;const ed=[];let ud=[];return Ra.forEach(dd=>{dd[0]==="["?(ed.push(...ud.sort(),dd),ud=[]):ud.push(dd)}),ed.push(...ud.sort()),ed},createConfigUtils=Ra=>({cache:createLruCache(Ra.cacheSize),parseClassName:createParseClassName(Ra),...createClassGroupUtils(Ra)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(Ra,ed)=>{const{parseClassName:ud,getClassGroupId:dd,getConflictingClassGroupIds:hd}=ed,md=[],gd=Ra.trim().split(SPLIT_CLASSES_REGEX);let yd="";for(let vd=gd.length-1;vd>=0;vd-=1){const Cd=gd[vd],{modifiers:wd,hasImportantModifier:Nd,baseClassName:Ld,maybePostfixModifierPosition:Ud}=ud(Cd);let jd=!!Ud,Gd=dd(jd?Ld.substring(0,Ud):Ld);if(!Gd){if(!jd){yd=Cd+(yd.length>0?" "+yd:yd);continue}if(Gd=dd(Ld),!Gd){yd=Cd+(yd.length>0?" "+yd:yd);continue}jd=!1}const Yd=sortModifiers(wd).join(":"),zd=Nd?Yd+IMPORTANT_MODIFIER:Yd,qd=zd+Gd;if(md.includes(qd))continue;md.push(qd);const Wd=hd(Gd,jd);for(let Xd=0;Xd0?" "+yd:yd)}return yd};function twJoin(){let Ra=0,ed,ud,dd="";for(;Ra{if(typeof Ra=="string")return Ra;let ed,ud="";for(let dd=0;ddNd(wd),Ra());return ud=createConfigUtils(Cd),dd=ud.cache.get,hd=ud.cache.set,md=yd,yd(vd)}function yd(vd){const Cd=dd(vd);if(Cd)return Cd;const wd=mergeClassList(vd,ud);return hd(vd,wd),wd}return function(){return md(twJoin.apply(null,arguments))}}const fromTheme=Ra=>{const ed=ud=>ud[Ra]||[];return ed.isThemeGetter=!0,ed},arbitraryValueRegex=/^\[(?:([a-z-]+):)?(.+)\]$/i,fractionRegex=/^\d+\/\d+$/,stringLengths=new Set(["px","full","screen"]),tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isLength$1=Ra=>isNumber$3(Ra)||stringLengths.has(Ra)||fractionRegex.test(Ra),isArbitraryLength=Ra=>getIsArbitraryValue(Ra,"length",isLengthOnly),isNumber$3=Ra=>!!Ra&&!Number.isNaN(Number(Ra)),isArbitraryNumber=Ra=>getIsArbitraryValue(Ra,"number",isNumber$3),isInteger$2=Ra=>!!Ra&&Number.isInteger(Number(Ra)),isPercent=Ra=>Ra.endsWith("%")&&isNumber$3(Ra.slice(0,-1)),isArbitraryValue=Ra=>arbitraryValueRegex.test(Ra),isTshirtSize=Ra=>tshirtUnitRegex.test(Ra),sizeLabels=new Set(["length","size","percentage"]),isArbitrarySize=Ra=>getIsArbitraryValue(Ra,sizeLabels,isNever),isArbitraryPosition=Ra=>getIsArbitraryValue(Ra,"position",isNever),imageLabels=new Set(["image","url"]),isArbitraryImage=Ra=>getIsArbitraryValue(Ra,imageLabels,isImage),isArbitraryShadow=Ra=>getIsArbitraryValue(Ra,"",isShadow),isAny=()=>!0,getIsArbitraryValue=(Ra,ed,ud)=>{const dd=arbitraryValueRegex.exec(Ra);return dd?dd[1]?typeof ed=="string"?dd[1]===ed:ed.has(dd[1]):ud(dd[2]):!1},isLengthOnly=Ra=>lengthUnitRegex.test(Ra)&&!colorFunctionRegex.test(Ra),isNever=()=>!1,isShadow=Ra=>shadowRegex.test(Ra),isImage=Ra=>imageRegex.test(Ra),getDefaultConfig=()=>{const Ra=fromTheme("colors"),ed=fromTheme("spacing"),ud=fromTheme("blur"),dd=fromTheme("brightness"),hd=fromTheme("borderColor"),md=fromTheme("borderRadius"),gd=fromTheme("borderSpacing"),yd=fromTheme("borderWidth"),vd=fromTheme("contrast"),Cd=fromTheme("grayscale"),wd=fromTheme("hueRotate"),Nd=fromTheme("invert"),Ld=fromTheme("gap"),Ud=fromTheme("gradientColorStops"),jd=fromTheme("gradientColorStopPositions"),Gd=fromTheme("inset"),Yd=fromTheme("margin"),zd=fromTheme("opacity"),qd=fromTheme("padding"),Wd=fromTheme("saturate"),Xd=fromTheme("scale"),Jd=fromTheme("sepia"),Zd=fromTheme("skew"),mf=fromTheme("space"),xf=fromTheme("translate"),_f=()=>["auto","contain","none"],vf=()=>["auto","hidden","clip","visible","scroll"],gf=()=>["auto",isArbitraryValue,ed],Af=()=>[isArbitraryValue,ed],Df=()=>["",isLength$1,isArbitraryLength],Of=()=>["auto",isNumber$3,isArbitraryValue],Cf=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],If=()=>["solid","dashed","dotted","double","none"],Ff=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],sh=()=>["start","end","center","between","around","evenly","stretch"],Sh=()=>["","0",isArbitraryValue],yh=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Mh=()=>[isNumber$3,isArbitraryValue];return{cacheSize:500,separator:":",theme:{colors:[isAny],spacing:[isLength$1,isArbitraryLength],blur:["none","",isTshirtSize,isArbitraryValue],brightness:Mh(),borderColor:[Ra],borderRadius:["none","","full",isTshirtSize,isArbitraryValue],borderSpacing:Af(),borderWidth:Df(),contrast:Mh(),grayscale:Sh(),hueRotate:Mh(),invert:Sh(),gap:Af(),gradientColorStops:[Ra],gradientColorStopPositions:[isPercent,isArbitraryLength],inset:gf(),margin:gf(),opacity:Mh(),padding:Af(),saturate:Mh(),scale:Mh(),sepia:Sh(),skew:Mh(),space:Af(),translate:Af()},classGroups:{aspect:[{aspect:["auto","square","video",isArbitraryValue]}],container:["container"],columns:[{columns:[isTshirtSize]}],"break-after":[{"break-after":yh()}],"break-before":[{"break-before":yh()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Cf(),isArbitraryValue]}],overflow:[{overflow:vf()}],"overflow-x":[{"overflow-x":vf()}],"overflow-y":[{"overflow-y":vf()}],overscroll:[{overscroll:_f()}],"overscroll-x":[{"overscroll-x":_f()}],"overscroll-y":[{"overscroll-y":_f()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[Gd]}],"inset-x":[{"inset-x":[Gd]}],"inset-y":[{"inset-y":[Gd]}],start:[{start:[Gd]}],end:[{end:[Gd]}],top:[{top:[Gd]}],right:[{right:[Gd]}],bottom:[{bottom:[Gd]}],left:[{left:[Gd]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",isInteger$2,isArbitraryValue]}],basis:[{basis:gf()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",isArbitraryValue]}],grow:[{grow:Sh()}],shrink:[{shrink:Sh()}],order:[{order:["first","last","none",isInteger$2,isArbitraryValue]}],"grid-cols":[{"grid-cols":[isAny]}],"col-start-end":[{col:["auto",{span:["full",isInteger$2,isArbitraryValue]},isArbitraryValue]}],"col-start":[{"col-start":Of()}],"col-end":[{"col-end":Of()}],"grid-rows":[{"grid-rows":[isAny]}],"row-start-end":[{row:["auto",{span:[isInteger$2,isArbitraryValue]},isArbitraryValue]}],"row-start":[{"row-start":Of()}],"row-end":[{"row-end":Of()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",isArbitraryValue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",isArbitraryValue]}],gap:[{gap:[Ld]}],"gap-x":[{"gap-x":[Ld]}],"gap-y":[{"gap-y":[Ld]}],"justify-content":[{justify:["normal",...sh()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...sh(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...sh(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[qd]}],px:[{px:[qd]}],py:[{py:[qd]}],ps:[{ps:[qd]}],pe:[{pe:[qd]}],pt:[{pt:[qd]}],pr:[{pr:[qd]}],pb:[{pb:[qd]}],pl:[{pl:[qd]}],m:[{m:[Yd]}],mx:[{mx:[Yd]}],my:[{my:[Yd]}],ms:[{ms:[Yd]}],me:[{me:[Yd]}],mt:[{mt:[Yd]}],mr:[{mr:[Yd]}],mb:[{mb:[Yd]}],ml:[{ml:[Yd]}],"space-x":[{"space-x":[mf]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[mf]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",isArbitraryValue,ed]}],"min-w":[{"min-w":[isArbitraryValue,ed,"min","max","fit"]}],"max-w":[{"max-w":[isArbitraryValue,ed,"none","full","min","max","fit","prose",{screen:[isTshirtSize]},isTshirtSize]}],h:[{h:[isArbitraryValue,ed,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[isArbitraryValue,ed,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[isArbitraryValue,ed,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[isArbitraryValue,ed,"auto","min","max","fit"]}],"font-size":[{text:["base",isTshirtSize,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",isArbitraryNumber]}],"font-family":[{font:[isAny]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",isArbitraryValue]}],"line-clamp":[{"line-clamp":["none",isNumber$3,isArbitraryNumber]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",isLength$1,isArbitraryValue]}],"list-image":[{"list-image":["none",isArbitraryValue]}],"list-style-type":[{list:["none","disc","decimal",isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Ra]}],"placeholder-opacity":[{"placeholder-opacity":[zd]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Ra]}],"text-opacity":[{"text-opacity":[zd]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...If(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",isLength$1,isArbitraryLength]}],"underline-offset":[{"underline-offset":["auto",isLength$1,isArbitraryValue]}],"text-decoration-color":[{decoration:[Ra]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Af()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[zd]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Cf(),isArbitraryPosition]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",isArbitrarySize]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},isArbitraryImage]}],"bg-color":[{bg:[Ra]}],"gradient-from-pos":[{from:[jd]}],"gradient-via-pos":[{via:[jd]}],"gradient-to-pos":[{to:[jd]}],"gradient-from":[{from:[Ud]}],"gradient-via":[{via:[Ud]}],"gradient-to":[{to:[Ud]}],rounded:[{rounded:[md]}],"rounded-s":[{"rounded-s":[md]}],"rounded-e":[{"rounded-e":[md]}],"rounded-t":[{"rounded-t":[md]}],"rounded-r":[{"rounded-r":[md]}],"rounded-b":[{"rounded-b":[md]}],"rounded-l":[{"rounded-l":[md]}],"rounded-ss":[{"rounded-ss":[md]}],"rounded-se":[{"rounded-se":[md]}],"rounded-ee":[{"rounded-ee":[md]}],"rounded-es":[{"rounded-es":[md]}],"rounded-tl":[{"rounded-tl":[md]}],"rounded-tr":[{"rounded-tr":[md]}],"rounded-br":[{"rounded-br":[md]}],"rounded-bl":[{"rounded-bl":[md]}],"border-w":[{border:[yd]}],"border-w-x":[{"border-x":[yd]}],"border-w-y":[{"border-y":[yd]}],"border-w-s":[{"border-s":[yd]}],"border-w-e":[{"border-e":[yd]}],"border-w-t":[{"border-t":[yd]}],"border-w-r":[{"border-r":[yd]}],"border-w-b":[{"border-b":[yd]}],"border-w-l":[{"border-l":[yd]}],"border-opacity":[{"border-opacity":[zd]}],"border-style":[{border:[...If(),"hidden"]}],"divide-x":[{"divide-x":[yd]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[yd]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[zd]}],"divide-style":[{divide:If()}],"border-color":[{border:[hd]}],"border-color-x":[{"border-x":[hd]}],"border-color-y":[{"border-y":[hd]}],"border-color-s":[{"border-s":[hd]}],"border-color-e":[{"border-e":[hd]}],"border-color-t":[{"border-t":[hd]}],"border-color-r":[{"border-r":[hd]}],"border-color-b":[{"border-b":[hd]}],"border-color-l":[{"border-l":[hd]}],"divide-color":[{divide:[hd]}],"outline-style":[{outline:["",...If()]}],"outline-offset":[{"outline-offset":[isLength$1,isArbitraryValue]}],"outline-w":[{outline:[isLength$1,isArbitraryLength]}],"outline-color":[{outline:[Ra]}],"ring-w":[{ring:Df()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Ra]}],"ring-opacity":[{"ring-opacity":[zd]}],"ring-offset-w":[{"ring-offset":[isLength$1,isArbitraryLength]}],"ring-offset-color":[{"ring-offset":[Ra]}],shadow:[{shadow:["","inner","none",isTshirtSize,isArbitraryShadow]}],"shadow-color":[{shadow:[isAny]}],opacity:[{opacity:[zd]}],"mix-blend":[{"mix-blend":[...Ff(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ff()}],filter:[{filter:["","none"]}],blur:[{blur:[ud]}],brightness:[{brightness:[dd]}],contrast:[{contrast:[vd]}],"drop-shadow":[{"drop-shadow":["","none",isTshirtSize,isArbitraryValue]}],grayscale:[{grayscale:[Cd]}],"hue-rotate":[{"hue-rotate":[wd]}],invert:[{invert:[Nd]}],saturate:[{saturate:[Wd]}],sepia:[{sepia:[Jd]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[ud]}],"backdrop-brightness":[{"backdrop-brightness":[dd]}],"backdrop-contrast":[{"backdrop-contrast":[vd]}],"backdrop-grayscale":[{"backdrop-grayscale":[Cd]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wd]}],"backdrop-invert":[{"backdrop-invert":[Nd]}],"backdrop-opacity":[{"backdrop-opacity":[zd]}],"backdrop-saturate":[{"backdrop-saturate":[Wd]}],"backdrop-sepia":[{"backdrop-sepia":[Jd]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[gd]}],"border-spacing-x":[{"border-spacing-x":[gd]}],"border-spacing-y":[{"border-spacing-y":[gd]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",isArbitraryValue]}],duration:[{duration:Mh()}],ease:[{ease:["linear","in","out","in-out",isArbitraryValue]}],delay:[{delay:Mh()}],animate:[{animate:["none","spin","ping","pulse","bounce",isArbitraryValue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Xd]}],"scale-x":[{"scale-x":[Xd]}],"scale-y":[{"scale-y":[Xd]}],rotate:[{rotate:[isInteger$2,isArbitraryValue]}],"translate-x":[{"translate-x":[xf]}],"translate-y":[{"translate-y":[xf]}],"skew-x":[{"skew-x":[Zd]}],"skew-y":[{"skew-y":[Zd]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",isArbitraryValue]}],accent:[{accent:["auto",Ra]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryValue]}],"caret-color":[{caret:[Ra]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Af()}],"scroll-mx":[{"scroll-mx":Af()}],"scroll-my":[{"scroll-my":Af()}],"scroll-ms":[{"scroll-ms":Af()}],"scroll-me":[{"scroll-me":Af()}],"scroll-mt":[{"scroll-mt":Af()}],"scroll-mr":[{"scroll-mr":Af()}],"scroll-mb":[{"scroll-mb":Af()}],"scroll-ml":[{"scroll-ml":Af()}],"scroll-p":[{"scroll-p":Af()}],"scroll-px":[{"scroll-px":Af()}],"scroll-py":[{"scroll-py":Af()}],"scroll-ps":[{"scroll-ps":Af()}],"scroll-pe":[{"scroll-pe":Af()}],"scroll-pt":[{"scroll-pt":Af()}],"scroll-pr":[{"scroll-pr":Af()}],"scroll-pb":[{"scroll-pb":Af()}],"scroll-pl":[{"scroll-pl":Af()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryValue]}],fill:[{fill:[Ra,"none"]}],"stroke-w":[{stroke:[isLength$1,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:[Ra,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},twMerge=createTailwindMerge(getDefaultConfig);function cn$4(...Ra){return twMerge(clsx(Ra))}const _sfc_main$1q=defineComponent({__name:"AlertDialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(Av),null,{default:withCtx(()=>[createVNode(unref(kv),{class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),createVNode(unref(Ov),mergeProps(unref(md),{class:unref(cn$4)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$1p=defineComponent({__name:"AlertDialogFooter",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),falsyToString=Ra=>typeof Ra=="boolean"?`${Ra}`:Ra===0?"0":Ra,cx$1=clsx,cva=(Ra,ed)=>ud=>{var dd;if((ed==null?void 0:ed.variants)==null)return cx$1(Ra,ud==null?void 0:ud.class,ud==null?void 0:ud.className);const{variants:hd,defaultVariants:md}=ed,gd=Object.keys(hd).map(Cd=>{const wd=ud==null?void 0:ud[Cd],Nd=md==null?void 0:md[Cd];if(wd===null)return null;const Ld=falsyToString(wd)||falsyToString(Nd);return hd[Cd][Ld]}),yd=ud&&Object.entries(ud).reduce((Cd,wd)=>{let[Nd,Ld]=wd;return Ld===void 0||(Cd[Nd]=Ld),Cd},{}),vd=ed==null||(dd=ed.compoundVariants)===null||dd===void 0?void 0:dd.reduce((Cd,wd)=>{let{class:Nd,className:Ld,...Ud}=wd;return Object.entries(Ud).every(jd=>{let[Gd,Yd]=jd;return Array.isArray(Yd)?Yd.includes({...md,...yd}[Gd]):{...md,...yd}[Gd]===Yd})?[...Cd,Nd,Ld]:Cd},[]);return cx$1(Ra,gd,vd,ud==null?void 0:ud.class,ud==null?void 0:ud.className)},_sfc_main$1o=defineComponent({__name:"Button",props:{variant:{},size:{},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(O$4),{as:ud.as,"as-child":ud.asChild,class:normalizeClass(unref(cn$4)(unref(buttonVariants)({variant:ud.variant,size:ud.size}),ed.class))},{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),buttonVariants=cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",xs:"h-7 rounded px-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),_sfc_main$1n=defineComponent({__name:"AlertDialogAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(Nv),mergeProps(ud.value,{class:unref(cn$4)(unref(buttonVariants)(),ed.class)}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1m=defineComponent({__name:"AlertDialogCancel",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(Mv),mergeProps(ud.value,{class:unref(cn$4)(unref(buttonVariants)({variant:"outline"}),"mt-2 sm:mt-0",ed.class)}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1l=defineComponent({__name:"AlertDialogHeader",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col gap-y-2 text-center sm:text-left",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$1k=defineComponent({__name:"AlertDialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(Fv),mergeProps(ud.value,{class:unref(cn$4)("text-sm text-muted-foreground",ed.class)}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1j=defineComponent({__name:"AlertDialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(Vv),mergeProps(ud.value,{class:unref(cn$4)("text-lg font-semibold",ed.class)}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$f={key:0,class:"loading"},_sfc_main$1i=defineComponent({__name:"RunLoading",setup(Ra){const ed=ref$1(!0);return onMounted(()=>{setTimeout(()=>{ed.value=!1},100)}),(ud,dd)=>(openBlock(),createBlock(Transition$1,{name:"fade"},{default:withCtx(()=>[unref(ed)?(openBlock(),createElementBlock("div",_hoisted_1$f,dd[0]||(dd[0]=[createBaseVNode("strong",null,"致力于让 Markdown 编辑更简单",-1)]))):createCommentVNode("",!0)]),_:1}))}}),_export_sfc=(Ra,ed)=>{const ud=Ra.__vccOpts||Ra;for(const[dd,hd]of ed)ud[dd]=hd;return ud},__unplugin_components_13$1=_export_sfc(_sfc_main$1i,[["__scopeId","data-v-8781f9ec"]]),_sfc_main$1h=defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(nu$4),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}});/** * @license lucide-vue-next v0.473.0 - ISC * * This source code is licensed under the ISC license. @@ -35,12 +35,12 @@ var ZN=Object.defineProperty;var LC=Ra=>{throw TypeError(Ra)};var eI=(Ra,qa,rd)= * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Icon=({size:Ra,strokeWidth:qa=2,absoluteStrokeWidth:rd,color:sd,iconNode:pd,name:fd,class:hd,...md},{slots:gd})=>h$2("svg",{...defaultAttributes,width:Ra||defaultAttributes.width,height:Ra||defaultAttributes.height,stroke:sd||defaultAttributes.stroke,"stroke-width":rd?Number(qa)*24/Number(Ra):qa,class:["lucide",`lucide-${toKebabCase(fd??"icon")}`],...md},[...pd.map(yd=>h$2(...yd)),...gd.default?[gd.default()]:[]]);/** + */const Icon=({size:Ra,strokeWidth:ed=2,absoluteStrokeWidth:ud,color:dd,iconNode:hd,name:md,class:gd,...yd},{slots:vd})=>h$2("svg",{...defaultAttributes,width:Ra||defaultAttributes.width,height:Ra||defaultAttributes.height,stroke:dd||defaultAttributes.stroke,"stroke-width":ud?Number(ed)*24/Number(Ra):ed,class:["lucide",`lucide-${toKebabCase(md??"icon")}`],...yd},[...hd.map(Cd=>h$2(...Cd)),...vd.default?[vd.default()]:[]]);/** * @license lucide-vue-next v0.473.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const createLucideIcon=(Ra,qa)=>(rd,{slots:sd})=>h$2(Icon,{...rd,iconNode:qa,name:Ra},sd);/** + */const createLucideIcon=(Ra,ed)=>(ud,{slots:dd})=>h$2(Icon,{...ud,iconNode:ed,name:Ra},dd);/** * @license lucide-vue-next v0.473.0 - ISC * * This source code is licensed under the ISC license. @@ -155,7 +155,7 @@ var ZN=Object.defineProperty;var LC=Ra=>{throw TypeError(Ra)};var eI=(Ra,qa,rd)= * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const X$6=createLucideIcon("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_sfc_main$1g=defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(Dv),null,{default:withCtx(()=>[createVNode(unref(Eu$3),{class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),createVNode(unref(xu$2),mergeProps(unref(fd),{class:unref(cn$4)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default"),createVNode(unref(Gl$3),{class:"data-[state=open]:bg-accent ring-offset-background data-[state=open]:text-muted-foreground focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity disabled:pointer-events-none hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2"},{default:withCtx(()=>[createVNode(unref(X$6),{class:"h-4 w-4"}),md[0]||(md[0]=createBaseVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),_sfc_main$1f=defineComponent({__name:"DialogFooter",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",qa.class))},[renderSlot(rd.$slots,"default")],2))}});function tryOnScopeDispose(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function createEventHook(){const Ra=new Set,qa=fd=>{Ra.delete(fd)};return{on:fd=>{Ra.add(fd);const hd=()=>qa(fd);return tryOnScopeDispose(hd),{off:hd}},off:qa,trigger:(...fd)=>Promise.all(Array.from(Ra).map(hd=>hd(...fd))),clear:()=>{Ra.clear()}}}const localProvidedStateMap=new WeakMap,injectLocal=(...Ra)=>{var qa;const rd=Ra[0],sd=(qa=getCurrentInstance())==null?void 0:qa.proxy;if(sd==null&&!hasInjectionContext())throw new Error("injectLocal must be called in setup");return sd&&localProvidedStateMap.has(sd)&&rd in localProvidedStateMap.get(sd)?localProvidedStateMap.get(sd)[rd]:inject(...Ra)},isClient$1=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const isDef=Ra=>typeof Ra<"u",toString$4=Object.prototype.toString,isObject$8=Ra=>toString$4.call(Ra)==="[object Object]",noop$5=()=>{},hasOwn$3=(Ra,qa)=>Object.prototype.hasOwnProperty.call(Ra,qa);function createFilterWrapper(Ra,qa){function rd(...sd){return new Promise((pd,fd)=>{Promise.resolve(Ra(()=>qa.apply(this,sd),{fn:qa,thisArg:this,args:sd})).then(pd).catch(fd)})}return rd}const bypassFilter=Ra=>Ra();function pausableFilter(Ra=bypassFilter){const qa=ref$1(!0);function rd(){qa.value=!1}function sd(){qa.value=!0}const pd=(...fd)=>{qa.value&&Ra(...fd)};return{isActive:readonly(qa),pause:rd,resume:sd,eventFilter:pd}}function createSingletonPromise(Ra){let qa;function rd(){return qa||(qa=Ra()),qa}return rd.reset=async()=>{const sd=qa;qa=void 0,sd&&await sd},rd}function pxValue(Ra){return Ra.endsWith("rem")?Number.parseFloat(Ra)*16:Number.parseFloat(Ra)}function getLifeCycleTarget(Ra){return getCurrentInstance()}function toArray$6(Ra){return Array.isArray(Ra)?Ra:[Ra]}function toRef(...Ra){if(Ra.length!==1)return toRef$1(...Ra);const qa=Ra[0];return typeof qa=="function"?readonly(customRef(()=>({get:qa,set:noop$5}))):ref$1(qa)}function watchWithFilter(Ra,qa,rd={}){const{eventFilter:sd=bypassFilter,...pd}=rd;return watch(Ra,createFilterWrapper(sd,qa),pd)}function watchPausable(Ra,qa,rd={}){const{eventFilter:sd,...pd}=rd,{eventFilter:fd,pause:hd,resume:md,isActive:gd}=pausableFilter(sd);return{stop:watchWithFilter(Ra,qa,{...pd,eventFilter:fd}),pause:hd,resume:md,isActive:gd}}function tryOnMounted(Ra,qa=!0,rd){getLifeCycleTarget()?onMounted(Ra,rd):qa?Ra():nextTick$1(Ra)}function useTimeoutFn(Ra,qa,rd={}){const{immediate:sd=!0}=rd,pd=ref$1(!1);let fd=null;function hd(){fd&&(clearTimeout(fd),fd=null)}function md(){pd.value=!1,hd()}function gd(...yd){hd(),pd.value=!0,fd=setTimeout(()=>{pd.value=!1,fd=null,Ra(...yd)},toValue$2(qa))}return sd&&(pd.value=!0,isClient$1&&gd()),tryOnScopeDispose(md),{isPending:readonly(pd),start:gd,stop:md}}function useToggle(Ra=!1,qa={}){const{truthyValue:rd=!0,falsyValue:sd=!1}=qa,pd=isRef(Ra),fd=ref$1(Ra);function hd(md){if(arguments.length)return fd.value=md,fd.value;{const gd=toValue$2(rd);return fd.value=fd.value===gd?toValue$2(sd):gd,fd.value}}return pd?hd:[fd,hd]}function watchImmediate(Ra,qa,rd){return watch(Ra,qa,{...rd,immediate:!0})}const defaultWindow=isClient$1?window:void 0,defaultDocument=isClient$1?window.document:void 0,defaultNavigator=isClient$1?window.navigator:void 0;function unrefElement(Ra){var qa;const rd=toValue$2(Ra);return(qa=rd==null?void 0:rd.$el)!=null?qa:rd}function useEventListener(...Ra){const qa=[],rd=()=>{qa.forEach(md=>md()),qa.length=0},sd=(md,gd,yd,vd)=>(md.addEventListener(gd,yd,vd),()=>md.removeEventListener(gd,yd,vd)),pd=computed(()=>{const md=toArray$6(toValue$2(Ra[0])).filter(gd=>gd!=null);return md.every(gd=>typeof gd!="string")?md:void 0}),fd=watchImmediate(()=>{var md,gd;return[(gd=(md=pd.value)==null?void 0:md.map(yd=>unrefElement(yd)))!=null?gd:[defaultWindow].filter(yd=>yd!=null),toArray$6(toValue$2(pd.value?Ra[1]:Ra[0])),toArray$6(unref(pd.value?Ra[2]:Ra[1])),toValue$2(pd.value?Ra[3]:Ra[2])]},([md,gd,yd,vd])=>{if(rd(),!(md!=null&&md.length)||!(gd!=null&&gd.length)||!(yd!=null&&yd.length))return;const Nd=isObject$8(vd)?{...vd}:vd;qa.push(...md.flatMap(Md=>gd.flatMap(Ld=>yd.map(Fd=>sd(Md,Ld,Fd,Nd)))))},{flush:"post"}),hd=()=>{fd(),rd()};return tryOnScopeDispose(rd),hd}function useMounted(){const Ra=ref$1(!1),qa=getCurrentInstance();return qa&&onMounted(()=>{Ra.value=!0},qa),Ra}function useSupported(Ra){const qa=useMounted();return computed(()=>(qa.value,!!Ra()))}const ssrWidthSymbol=Symbol("vueuse-ssr-width");function useSSRWidth(){const Ra=hasInjectionContext()?injectLocal(ssrWidthSymbol,null):null;return typeof Ra=="number"?Ra:void 0}function useMediaQuery(Ra,qa={}){const{window:rd=defaultWindow,ssrWidth:sd=useSSRWidth()}=qa,pd=useSupported(()=>rd&&"matchMedia"in rd&&typeof rd.matchMedia=="function"),fd=ref$1(typeof sd=="number"),hd=shallowRef(),md=ref$1(!1),gd=yd=>{md.value=yd.matches};return watchEffect(()=>{if(fd.value){fd.value=!pd.value;const yd=toValue$2(Ra).split(",");md.value=yd.some(vd=>{const Nd=vd.includes("not all"),Md=vd.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),Ld=vd.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let Fd=!!(Md||Ld);return Md&&Fd&&(Fd=sd>=pxValue(Md[1])),Ld&&Fd&&(Fd=sd<=pxValue(Ld[1])),Nd?!Fd:Fd});return}pd.value&&(hd.value=rd.matchMedia(toValue$2(Ra)),md.value=hd.value.matches)}),useEventListener(hd,"change",gd,{passive:!0}),computed(()=>md.value)}function usePermission(Ra,qa={}){const{controls:rd=!1,navigator:sd=defaultNavigator}=qa,pd=useSupported(()=>sd&&"permissions"in sd),fd=shallowRef(),hd=typeof Ra=="string"?{name:Ra}:Ra,md=shallowRef(),gd=()=>{var vd,Nd;md.value=(Nd=(vd=fd.value)==null?void 0:vd.state)!=null?Nd:"prompt"};useEventListener(fd,"change",gd,{passive:!0});const yd=createSingletonPromise(async()=>{if(pd.value){if(!fd.value)try{fd.value=await sd.permissions.query(hd)}catch{fd.value=void 0}finally{gd()}if(rd)return toRaw(fd.value)}});return yd(),rd?{state:md,isSupported:pd,query:yd}:md}function useClipboard(Ra={}){const{navigator:qa=defaultNavigator,read:rd=!1,source:sd,copiedDuring:pd=1500,legacy:fd=!1}=Ra,hd=useSupported(()=>qa&&"clipboard"in qa),md=usePermission("clipboard-read"),gd=usePermission("clipboard-write"),yd=computed(()=>hd.value||fd),vd=ref$1(""),Nd=ref$1(!1),Md=useTimeoutFn(()=>Nd.value=!1,pd,{immediate:!1});function Ld(){let Ud=!(hd.value&&Gd(md.value));if(!Ud)try{qa.clipboard.readText().then(qd=>{vd.value=qd})}catch{Ud=!0}Ud&&(vd.value=Vd())}yd.value&&rd&&useEventListener(["copy","cut"],Ld,{passive:!0});async function Fd(Ud=toValue$2(sd)){if(yd.value&&Ud!=null){let qd=!(hd.value&&Gd(gd.value));if(!qd)try{await qa.clipboard.writeText(Ud)}catch{qd=!0}qd&&Hd(Ud),vd.value=Ud,Nd.value=!0,Md.start()}}function Hd(Ud){const qd=document.createElement("textarea");qd.value=Ud??"",qd.style.position="absolute",qd.style.opacity="0",document.body.appendChild(qd),qd.select(),document.execCommand("copy"),qd.remove()}function Vd(){var Ud,qd,Wd;return(Wd=(qd=(Ud=document==null?void 0:document.getSelection)==null?void 0:Ud.call(document))==null?void 0:qd.toString())!=null?Wd:""}function Gd(Ud){return Ud==="granted"||Ud==="prompt"}return{isSupported:yd,text:vd,copied:Nd,copy:Fd}}function cloneFnJSON(Ra){return JSON.parse(JSON.stringify(Ra))}const _global$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global$1<"u"?global$1:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global$1||(_global$1[globalKey]=_global$1[globalKey]||{}),_global$1[globalKey]}function getSSRHandler(Ra,qa){return handlers[Ra]||qa}function usePreferredDark(Ra){return useMediaQuery("(prefers-color-scheme: dark)",Ra)}function guessSerializerType(Ra){return Ra==null?"any":Ra instanceof Set?"set":Ra instanceof Map?"map":Ra instanceof Date?"date":typeof Ra=="boolean"?"boolean":typeof Ra=="string"?"string":typeof Ra=="object"?"object":Number.isNaN(Ra)?"any":"number"}const StorageSerializers={boolean:{read:Ra=>Ra==="true",write:Ra=>String(Ra)},object:{read:Ra=>JSON.parse(Ra),write:Ra=>JSON.stringify(Ra)},number:{read:Ra=>Number.parseFloat(Ra),write:Ra=>String(Ra)},any:{read:Ra=>Ra,write:Ra=>String(Ra)},string:{read:Ra=>Ra,write:Ra=>String(Ra)},map:{read:Ra=>new Map(JSON.parse(Ra)),write:Ra=>JSON.stringify(Array.from(Ra.entries()))},set:{read:Ra=>new Set(JSON.parse(Ra)),write:Ra=>JSON.stringify(Array.from(Ra))},date:{read:Ra=>new Date(Ra),write:Ra=>Ra.toISOString()}},customStorageEventName="vueuse-storage";function useStorage(Ra,qa,rd,sd={}){var pd;const{flush:fd="pre",deep:hd=!0,listenToStorageChanges:md=!0,writeDefaults:gd=!0,mergeDefaults:yd=!1,shallow:vd,window:Nd=defaultWindow,eventFilter:Md,onError:Ld=_f=>{console.error(_f)},initOnMounted:Fd}=sd,Hd=(vd?shallowRef:ref$1)(typeof qa=="function"?qa():qa),Vd=computed(()=>toValue$2(Ra));if(!rd)try{rd=getSSRHandler("getDefaultStorage",()=>{var _f;return(_f=defaultWindow)==null?void 0:_f.localStorage})()}catch(_f){Ld(_f)}if(!rd)return Hd;const Gd=toValue$2(qa),Ud=guessSerializerType(Gd),qd=(pd=sd.serializer)!=null?pd:StorageSerializers[Ud],{pause:Wd,resume:Kd}=watchPausable(Hd,()=>df(Hd.value),{flush:fd,deep:hd,eventFilter:Md});watch(Vd,()=>pf(),{flush:fd}),Nd&&md&&tryOnMounted(()=>{rd instanceof Storage?useEventListener(Nd,"storage",pf,{passive:!0}):useEventListener(Nd,customStorageEventName,mf),Fd&&pf()}),Fd||pf();function Xd(_f,xf){if(Nd){const Cf={key:Vd.value,oldValue:_f,newValue:xf,storageArea:rd};Nd.dispatchEvent(rd instanceof Storage?new StorageEvent("storage",Cf):new CustomEvent(customStorageEventName,{detail:Cf}))}}function df(_f){try{const xf=rd.getItem(Vd.value);if(_f==null)Xd(xf,null),rd.removeItem(Vd.value);else{const Cf=qd.write(_f);xf!==Cf&&(rd.setItem(Vd.value,Cf),Xd(xf,Cf))}}catch(xf){Ld(xf)}}function Ef(_f){const xf=_f?_f.newValue:rd.getItem(Vd.value);if(xf==null)return gd&&Gd!=null&&rd.setItem(Vd.value,qd.write(Gd)),Gd;if(!_f&&yd){const Cf=qd.read(xf);return typeof yd=="function"?yd(Cf,Gd):Ud==="object"&&!Array.isArray(Cf)?{...Gd,...Cf}:Cf}else return typeof xf!="string"?xf:qd.read(xf)}function pf(_f){if(!(_f&&_f.storageArea!==rd)){if(_f&&_f.key==null){Hd.value=Gd;return}if(!(_f&&_f.key!==Vd.value)){Wd();try{(_f==null?void 0:_f.newValue)!==qd.write(Hd.value)&&(Hd.value=Ef(_f))}catch(xf){Ld(xf)}finally{_f?nextTick$1(Kd):Kd()}}}}function mf(_f){pf(_f.detail)}return Hd}const CSS_DISABLE_TRANS="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function useColorMode(Ra={}){const{selector:qa="html",attribute:rd="class",initialValue:sd="auto",window:pd=defaultWindow,storage:fd,storageKey:hd="vueuse-color-scheme",listenToStorageChanges:md=!0,storageRef:gd,emitAuto:yd,disableTransition:vd=!0}=Ra,Nd={auto:"",light:"light",dark:"dark",...Ra.modes||{}},Md=usePreferredDark({window:pd}),Ld=computed(()=>Md.value?"dark":"light"),Fd=gd||(hd==null?toRef(sd):useStorage(hd,sd,fd,{window:pd,listenToStorageChanges:md})),Hd=computed(()=>Fd.value==="auto"?Ld.value:Fd.value),Vd=getSSRHandler("updateHTMLAttrs",(Wd,Kd,Xd)=>{const df=typeof Wd=="string"?pd==null?void 0:pd.document.querySelector(Wd):unrefElement(Wd);if(!df)return;const Ef=new Set,pf=new Set;let mf=null;if(Kd==="class"){const xf=Xd.split(/\s/g);Object.values(Nd).flatMap(Cf=>(Cf||"").split(/\s/g)).filter(Boolean).forEach(Cf=>{xf.includes(Cf)?Ef.add(Cf):pf.add(Cf)})}else mf={key:Kd,value:Xd};if(Ef.size===0&&pf.size===0&&mf===null)return;let _f;vd&&(_f=pd.document.createElement("style"),_f.appendChild(document.createTextNode(CSS_DISABLE_TRANS)),pd.document.head.appendChild(_f));for(const xf of Ef)df.classList.add(xf);for(const xf of pf)df.classList.remove(xf);mf&&df.setAttribute(mf.key,mf.value),vd&&(pd.getComputedStyle(_f).opacity,document.head.removeChild(_f))});function Gd(Wd){var Kd;Vd(qa,rd,(Kd=Nd[Wd])!=null?Kd:Wd)}function Ud(Wd){Ra.onChanged?Ra.onChanged(Wd,Gd):Gd(Wd)}watch(Hd,Ud,{flush:"post",immediate:!0}),tryOnMounted(()=>Ud(Hd.value));const qd=computed({get(){return yd?Fd.value:Hd.value},set(Wd){Fd.value=Wd}});return Object.assign(qd,{store:Fd,system:Ld,state:Hd})}function useDark(Ra={}){const{valueDark:qa="dark",valueLight:rd=""}=Ra,sd=useColorMode({...Ra,onChanged:(hd,md)=>{var gd;Ra.onChanged?(gd=Ra.onChanged)==null||gd.call(Ra,hd==="dark",md,hd):md(hd)},modes:{dark:qa,light:rd}}),pd=computed(()=>sd.system.value);return computed({get(){return sd.value==="dark"},set(hd){const md=hd?"dark":"light";pd.value===md?sd.value="auto":sd.value=md}})}const DEFAULT_OPTIONS$1={multiple:!0,accept:"*",reset:!1,directory:!1};function prepareInitialFiles(Ra){if(!Ra)return null;if(Ra instanceof FileList)return Ra;const qa=new DataTransfer;for(const rd of Ra)qa.items.add(rd);return qa.files}function useFileDialog(Ra={}){const{document:qa=defaultDocument}=Ra,rd=ref$1(prepareInitialFiles(Ra.initialFiles)),{on:sd,trigger:pd}=createEventHook(),{on:fd,trigger:hd}=createEventHook();let md;qa&&(md=qa.createElement("input"),md.type="file",md.onchange=vd=>{const Nd=vd.target;rd.value=Nd.files,pd(rd.value)},md.oncancel=()=>{hd()});const gd=()=>{rd.value=null,md&&md.value&&(md.value="",pd(null))},yd=vd=>{if(!md)return;const Nd={...DEFAULT_OPTIONS$1,...Ra,...vd};md.multiple=Nd.multiple,md.accept=Nd.accept,md.webkitdirectory=Nd.directory,hasOwn$3(Nd,"capture")&&(md.capture=Nd.capture),Nd.reset&&gd(),md.click()};return{files:readonly(rd),open:yd,reset:gd,onCancel:fd,onChange:sd}}function useLocalStorage(Ra,qa,rd={}){const{window:sd=defaultWindow}=rd;return useStorage(Ra,qa,sd==null?void 0:sd.localStorage,rd)}function useVModel$1(Ra,qa,rd,sd={}){var pd,fd,hd;const{clone:md=!1,passive:gd=!1,eventName:yd,deep:vd=!1,defaultValue:Nd,shouldEmit:Md}=sd,Ld=getCurrentInstance(),Fd=rd||(Ld==null?void 0:Ld.emit)||((pd=Ld==null?void 0:Ld.$emit)==null?void 0:pd.bind(Ld))||((hd=(fd=Ld==null?void 0:Ld.proxy)==null?void 0:fd.$emit)==null?void 0:hd.bind(Ld==null?void 0:Ld.proxy));let Hd=yd;Hd=Hd||`update:${qa.toString()}`;const Vd=qd=>md?typeof md=="function"?md(qd):cloneFnJSON(qd):qd,Gd=()=>isDef(Ra[qa])?Vd(Ra[qa]):Nd,Ud=qd=>{Md?Md(qd)&&Fd(Hd,qd):Fd(Hd,qd)};if(gd){const qd=Gd(),Wd=ref$1(qd);let Kd=!1;return watch(()=>Ra[qa],Xd=>{Kd||(Kd=!0,Wd.value=Vd(Xd),nextTick$1(()=>Kd=!1))}),watch(Wd,Xd=>{!Kd&&(Xd!==Ra[qa]||vd)&&Ud(Xd)},{deep:vd}),Wd}else return computed({get(){return Gd()},set(qd){Ud(qd)}})}const _sfc_main$1e=defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},setup(Ra,{emit:qa}){const rd=Ra,pd=useVModel$1(rd,"modelValue",qa,{passive:!0,defaultValue:rd.defaultValue});return(fd,hd)=>withDirectives((openBlock(),createElementBlock("input",{"onUpdate:modelValue":hd[0]||(hd[0]=md=>isRef(pd)?pd.value=md:null),class:normalizeClass(unref(cn$4)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",rd.class))},null,2)),[[vModelText,unref(pd)]])}}),_sfc_main$1d=defineComponent({__name:"NumberField",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},formatOptions:{},locale:{},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(my$1),mergeProps(unref(fd),{class:unref(cn$4)("grid gap-1.5",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1c=defineComponent({__name:"NumberFieldContent",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$1b=defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(yy$1),mergeProps({"data-slot":"increment"},unref(sd),{class:unref(cn$4)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default",{},()=>[createVNode(unref(Plus),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$1a=defineComponent({__name:"NumberFieldInput",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(hy$1),{"data-slot":"input",class:normalizeClass(unref(cn$4)("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",qa.class))},null,8,["class"]))}}),_sfc_main$19=defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(gy$1),mergeProps({"data-slot":"decrement"},unref(sd),{class:unref(cn$4)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default",{},()=>[createVNode(unref(Minus),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$18=defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(Oh),mergeProps(rd.value,{class:unref(cn$4)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",qa.class)}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$17=defineComponent({__name:"DialogHeader",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col gap-y-1.5 text-center sm:text-left",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$16=defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Pu$2),mergeProps(unref(sd),{class:unref(cn$4)("text-lg font-semibold leading-none tracking-tight",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16,["class"]))}}),DEFAULT_CONTENT=`# 探索 Markdown 的奇妙世界 + */const X$6=createLucideIcon("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_sfc_main$1g=defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(Iv),null,{default:withCtx(()=>[createVNode(unref($u$3),{class:"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80"}),createVNode(unref(Pu$2),mergeProps(unref(md),{class:unref(cn$4)("fixed left-1/2 top-1/2 z-50 grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default"),createVNode(unref(Xl$3),{class:"data-[state=open]:bg-accent ring-offset-background data-[state=open]:text-muted-foreground focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity disabled:pointer-events-none hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2"},{default:withCtx(()=>[createVNode(unref(X$6),{class:"h-4 w-4"}),yd[0]||(yd[0]=createBaseVNode("span",{class:"sr-only"},"Close",-1))]),_:1})]),_:3},16,["class"])]),_:3}))}}),_sfc_main$1f=defineComponent({__name:"DialogFooter",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",ed.class))},[renderSlot(ud.$slots,"default")],2))}});function tryOnScopeDispose(Ra){return getCurrentScope()?(onScopeDispose(Ra),!0):!1}function createEventHook(){const Ra=new Set,ed=md=>{Ra.delete(md)};return{on:md=>{Ra.add(md);const gd=()=>ed(md);return tryOnScopeDispose(gd),{off:gd}},off:ed,trigger:(...md)=>Promise.all(Array.from(Ra).map(gd=>gd(...md))),clear:()=>{Ra.clear()}}}const localProvidedStateMap=new WeakMap,injectLocal=(...Ra)=>{var ed;const ud=Ra[0],dd=(ed=getCurrentInstance())==null?void 0:ed.proxy;if(dd==null&&!hasInjectionContext())throw new Error("injectLocal must be called in setup");return dd&&localProvidedStateMap.has(dd)&&ud in localProvidedStateMap.get(dd)?localProvidedStateMap.get(dd)[ud]:inject(...Ra)},isClient$1=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const isDef=Ra=>typeof Ra<"u",toString$4=Object.prototype.toString,isObject$8=Ra=>toString$4.call(Ra)==="[object Object]",noop$5=()=>{},hasOwn$3=(Ra,ed)=>Object.prototype.hasOwnProperty.call(Ra,ed);function createFilterWrapper(Ra,ed){function ud(...dd){return new Promise((hd,md)=>{Promise.resolve(Ra(()=>ed.apply(this,dd),{fn:ed,thisArg:this,args:dd})).then(hd).catch(md)})}return ud}const bypassFilter=Ra=>Ra();function pausableFilter(Ra=bypassFilter,ed={}){const{initialState:ud="active"}=ed,dd=toRef(ud==="active");function hd(){dd.value=!1}function md(){dd.value=!0}const gd=(...yd)=>{dd.value&&Ra(...yd)};return{isActive:readonly(dd),pause:hd,resume:md,eventFilter:gd}}function createSingletonPromise(Ra){let ed;function ud(){return ed||(ed=Ra()),ed}return ud.reset=async()=>{const dd=ed;ed=void 0,dd&&await dd},ud}function pxValue(Ra){return Ra.endsWith("rem")?Number.parseFloat(Ra)*16:Number.parseFloat(Ra)}function getLifeCycleTarget(Ra){return getCurrentInstance()}function toArray$6(Ra){return Array.isArray(Ra)?Ra:[Ra]}function toRef(...Ra){if(Ra.length!==1)return toRef$1(...Ra);const ed=Ra[0];return typeof ed=="function"?readonly(customRef(()=>({get:ed,set:noop$5}))):ref$1(ed)}function watchWithFilter(Ra,ed,ud={}){const{eventFilter:dd=bypassFilter,...hd}=ud;return watch(Ra,createFilterWrapper(dd,ed),hd)}function watchPausable(Ra,ed,ud={}){const{eventFilter:dd,initialState:hd="active",...md}=ud,{eventFilter:gd,pause:yd,resume:vd,isActive:Cd}=pausableFilter(dd,{initialState:hd});return{stop:watchWithFilter(Ra,ed,{...md,eventFilter:gd}),pause:yd,resume:vd,isActive:Cd}}function tryOnMounted(Ra,ed=!0,ud){getLifeCycleTarget()?onMounted(Ra,ud):ed?Ra():nextTick$1(Ra)}function useTimeoutFn(Ra,ed,ud={}){const{immediate:dd=!0,immediateCallback:hd=!1}=ud,md=shallowRef(!1);let gd=null;function yd(){gd&&(clearTimeout(gd),gd=null)}function vd(){md.value=!1,yd()}function Cd(...wd){hd&&Ra(),yd(),md.value=!0,gd=setTimeout(()=>{md.value=!1,gd=null,Ra(...wd)},toValue$2(ed))}return dd&&(md.value=!0,isClient$1&&Cd()),tryOnScopeDispose(vd),{isPending:readonly(md),start:Cd,stop:vd}}function useToggle(Ra=!1,ed={}){const{truthyValue:ud=!0,falsyValue:dd=!1}=ed,hd=isRef(Ra),md=shallowRef(Ra);function gd(yd){if(arguments.length)return md.value=yd,md.value;{const vd=toValue$2(ud);return md.value=md.value===vd?toValue$2(dd):vd,md.value}}return hd?gd:[md,gd]}function watchImmediate(Ra,ed,ud){return watch(Ra,ed,{...ud,immediate:!0})}const defaultWindow=isClient$1?window:void 0,defaultDocument=isClient$1?window.document:void 0,defaultNavigator=isClient$1?window.navigator:void 0;function unrefElement(Ra){var ed;const ud=toValue$2(Ra);return(ed=ud==null?void 0:ud.$el)!=null?ed:ud}function useEventListener(...Ra){const ed=[],ud=()=>{ed.forEach(yd=>yd()),ed.length=0},dd=(yd,vd,Cd,wd)=>(yd.addEventListener(vd,Cd,wd),()=>yd.removeEventListener(vd,Cd,wd)),hd=computed(()=>{const yd=toArray$6(toValue$2(Ra[0])).filter(vd=>vd!=null);return yd.every(vd=>typeof vd!="string")?yd:void 0}),md=watchImmediate(()=>{var yd,vd;return[(vd=(yd=hd.value)==null?void 0:yd.map(Cd=>unrefElement(Cd)))!=null?vd:[defaultWindow].filter(Cd=>Cd!=null),toArray$6(toValue$2(hd.value?Ra[1]:Ra[0])),toArray$6(unref(hd.value?Ra[2]:Ra[1])),toValue$2(hd.value?Ra[3]:Ra[2])]},([yd,vd,Cd,wd])=>{if(ud(),!(yd!=null&&yd.length)||!(vd!=null&&vd.length)||!(Cd!=null&&Cd.length))return;const Nd=isObject$8(wd)?{...wd}:wd;ed.push(...yd.flatMap(Ld=>vd.flatMap(Ud=>Cd.map(jd=>dd(Ld,Ud,jd,Nd)))))},{flush:"post"}),gd=()=>{md(),ud()};return tryOnScopeDispose(ud),gd}function useMounted(){const Ra=shallowRef(!1),ed=getCurrentInstance();return ed&&onMounted(()=>{Ra.value=!0},ed),Ra}function useSupported(Ra){const ed=useMounted();return computed(()=>(ed.value,!!Ra()))}const ssrWidthSymbol=Symbol("vueuse-ssr-width");function useSSRWidth(){const Ra=hasInjectionContext()?injectLocal(ssrWidthSymbol,null):null;return typeof Ra=="number"?Ra:void 0}function useMediaQuery(Ra,ed={}){const{window:ud=defaultWindow,ssrWidth:dd=useSSRWidth()}=ed,hd=useSupported(()=>ud&&"matchMedia"in ud&&typeof ud.matchMedia=="function"),md=shallowRef(typeof dd=="number"),gd=shallowRef(),yd=shallowRef(!1),vd=Cd=>{yd.value=Cd.matches};return watchEffect(()=>{if(md.value){md.value=!hd.value;const Cd=toValue$2(Ra).split(",");yd.value=Cd.some(wd=>{const Nd=wd.includes("not all"),Ld=wd.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),Ud=wd.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let jd=!!(Ld||Ud);return Ld&&jd&&(jd=dd>=pxValue(Ld[1])),Ud&&jd&&(jd=dd<=pxValue(Ud[1])),Nd?!jd:jd});return}hd.value&&(gd.value=ud.matchMedia(toValue$2(Ra)),yd.value=gd.value.matches)}),useEventListener(gd,"change",vd,{passive:!0}),computed(()=>yd.value)}function usePermission(Ra,ed={}){const{controls:ud=!1,navigator:dd=defaultNavigator}=ed,hd=useSupported(()=>dd&&"permissions"in dd),md=shallowRef(),gd=typeof Ra=="string"?{name:Ra}:Ra,yd=shallowRef(),vd=()=>{var wd,Nd;yd.value=(Nd=(wd=md.value)==null?void 0:wd.state)!=null?Nd:"prompt"};useEventListener(md,"change",vd,{passive:!0});const Cd=createSingletonPromise(async()=>{if(hd.value){if(!md.value)try{md.value=await dd.permissions.query(gd)}catch{md.value=void 0}finally{vd()}if(ud)return toRaw(md.value)}});return Cd(),ud?{state:yd,isSupported:hd,query:Cd}:yd}function useClipboard(Ra={}){const{navigator:ed=defaultNavigator,read:ud=!1,source:dd,copiedDuring:hd=1500,legacy:md=!1}=Ra,gd=useSupported(()=>ed&&"clipboard"in ed),yd=usePermission("clipboard-read"),vd=usePermission("clipboard-write"),Cd=computed(()=>gd.value||md),wd=shallowRef(""),Nd=shallowRef(!1),Ld=useTimeoutFn(()=>Nd.value=!1,hd,{immediate:!1});async function Ud(){let qd=!(gd.value&&zd(yd.value));if(!qd)try{wd.value=await ed.clipboard.readText()}catch{qd=!0}qd&&(wd.value=Yd())}Cd.value&&ud&&useEventListener(["copy","cut"],Ud,{passive:!0});async function jd(qd=toValue$2(dd)){if(Cd.value&&qd!=null){let Wd=!(gd.value&&zd(vd.value));if(!Wd)try{await ed.clipboard.writeText(qd)}catch{Wd=!0}Wd&&Gd(qd),wd.value=qd,Nd.value=!0,Ld.start()}}function Gd(qd){const Wd=document.createElement("textarea");Wd.value=qd??"",Wd.style.position="absolute",Wd.style.opacity="0",document.body.appendChild(Wd),Wd.select(),document.execCommand("copy"),Wd.remove()}function Yd(){var qd,Wd,Xd;return(Xd=(Wd=(qd=document==null?void 0:document.getSelection)==null?void 0:qd.call(document))==null?void 0:Wd.toString())!=null?Xd:""}function zd(qd){return qd==="granted"||qd==="prompt"}return{isSupported:Cd,text:wd,copied:Nd,copy:jd}}function cloneFnJSON(Ra){return JSON.parse(JSON.stringify(Ra))}const _global$1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global$1<"u"?global$1:typeof self<"u"?self:{},globalKey="__vueuse_ssr_handlers__",handlers=getHandlers();function getHandlers(){return globalKey in _global$1||(_global$1[globalKey]=_global$1[globalKey]||{}),_global$1[globalKey]}function getSSRHandler(Ra,ed){return handlers[Ra]||ed}function usePreferredDark(Ra){return useMediaQuery("(prefers-color-scheme: dark)",Ra)}function guessSerializerType(Ra){return Ra==null?"any":Ra instanceof Set?"set":Ra instanceof Map?"map":Ra instanceof Date?"date":typeof Ra=="boolean"?"boolean":typeof Ra=="string"?"string":typeof Ra=="object"?"object":Number.isNaN(Ra)?"any":"number"}const StorageSerializers={boolean:{read:Ra=>Ra==="true",write:Ra=>String(Ra)},object:{read:Ra=>JSON.parse(Ra),write:Ra=>JSON.stringify(Ra)},number:{read:Ra=>Number.parseFloat(Ra),write:Ra=>String(Ra)},any:{read:Ra=>Ra,write:Ra=>String(Ra)},string:{read:Ra=>Ra,write:Ra=>String(Ra)},map:{read:Ra=>new Map(JSON.parse(Ra)),write:Ra=>JSON.stringify(Array.from(Ra.entries()))},set:{read:Ra=>new Set(JSON.parse(Ra)),write:Ra=>JSON.stringify(Array.from(Ra))},date:{read:Ra=>new Date(Ra),write:Ra=>Ra.toISOString()}},customStorageEventName="vueuse-storage";function useStorage(Ra,ed,ud,dd={}){var hd;const{flush:md="pre",deep:gd=!0,listenToStorageChanges:yd=!0,writeDefaults:vd=!0,mergeDefaults:Cd=!1,shallow:wd,window:Nd=defaultWindow,eventFilter:Ld,onError:Ud=gf=>{console.error(gf)},initOnMounted:jd}=dd,Gd=(wd?shallowRef:ref$1)(typeof ed=="function"?ed():ed),Yd=computed(()=>toValue$2(Ra));if(!ud)try{ud=getSSRHandler("getDefaultStorage",()=>{var gf;return(gf=defaultWindow)==null?void 0:gf.localStorage})()}catch(gf){Ud(gf)}if(!ud)return Gd;const zd=toValue$2(ed),qd=guessSerializerType(zd),Wd=(hd=dd.serializer)!=null?hd:StorageSerializers[qd],{pause:Xd,resume:Jd}=watchPausable(Gd,()=>mf(Gd.value),{flush:md,deep:gd,eventFilter:Ld});watch(Yd,()=>_f(),{flush:md}),Nd&&yd&&tryOnMounted(()=>{ud instanceof Storage?useEventListener(Nd,"storage",_f,{passive:!0}):useEventListener(Nd,customStorageEventName,vf),jd&&_f()}),jd||_f();function Zd(gf,Af){if(Nd){const Df={key:Yd.value,oldValue:gf,newValue:Af,storageArea:ud};Nd.dispatchEvent(ud instanceof Storage?new StorageEvent("storage",Df):new CustomEvent(customStorageEventName,{detail:Df}))}}function mf(gf){try{const Af=ud.getItem(Yd.value);if(gf==null)Zd(Af,null),ud.removeItem(Yd.value);else{const Df=Wd.write(gf);Af!==Df&&(ud.setItem(Yd.value,Df),Zd(Af,Df))}}catch(Af){Ud(Af)}}function xf(gf){const Af=gf?gf.newValue:ud.getItem(Yd.value);if(Af==null)return vd&&zd!=null&&ud.setItem(Yd.value,Wd.write(zd)),zd;if(!gf&&Cd){const Df=Wd.read(Af);return typeof Cd=="function"?Cd(Df,zd):qd==="object"&&!Array.isArray(Df)?{...zd,...Df}:Df}else return typeof Af!="string"?Af:Wd.read(Af)}function _f(gf){if(!(gf&&gf.storageArea!==ud)){if(gf&&gf.key==null){Gd.value=zd;return}if(!(gf&&gf.key!==Yd.value)){Xd();try{(gf==null?void 0:gf.newValue)!==Wd.write(Gd.value)&&(Gd.value=xf(gf))}catch(Af){Ud(Af)}finally{gf?nextTick$1(Jd):Jd()}}}}function vf(gf){_f(gf.detail)}return Gd}const CSS_DISABLE_TRANS="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function useColorMode(Ra={}){const{selector:ed="html",attribute:ud="class",initialValue:dd="auto",window:hd=defaultWindow,storage:md,storageKey:gd="vueuse-color-scheme",listenToStorageChanges:yd=!0,storageRef:vd,emitAuto:Cd,disableTransition:wd=!0}=Ra,Nd={auto:"",light:"light",dark:"dark",...Ra.modes||{}},Ld=usePreferredDark({window:hd}),Ud=computed(()=>Ld.value?"dark":"light"),jd=vd||(gd==null?toRef(dd):useStorage(gd,dd,md,{window:hd,listenToStorageChanges:yd})),Gd=computed(()=>jd.value==="auto"?Ud.value:jd.value),Yd=getSSRHandler("updateHTMLAttrs",(Xd,Jd,Zd)=>{const mf=typeof Xd=="string"?hd==null?void 0:hd.document.querySelector(Xd):unrefElement(Xd);if(!mf)return;const xf=new Set,_f=new Set;let vf=null;if(Jd==="class"){const Af=Zd.split(/\s/g);Object.values(Nd).flatMap(Df=>(Df||"").split(/\s/g)).filter(Boolean).forEach(Df=>{Af.includes(Df)?xf.add(Df):_f.add(Df)})}else vf={key:Jd,value:Zd};if(xf.size===0&&_f.size===0&&vf===null)return;let gf;wd&&(gf=hd.document.createElement("style"),gf.appendChild(document.createTextNode(CSS_DISABLE_TRANS)),hd.document.head.appendChild(gf));for(const Af of xf)mf.classList.add(Af);for(const Af of _f)mf.classList.remove(Af);vf&&mf.setAttribute(vf.key,vf.value),wd&&(hd.getComputedStyle(gf).opacity,document.head.removeChild(gf))});function zd(Xd){var Jd;Yd(ed,ud,(Jd=Nd[Xd])!=null?Jd:Xd)}function qd(Xd){Ra.onChanged?Ra.onChanged(Xd,zd):zd(Xd)}watch(Gd,qd,{flush:"post",immediate:!0}),tryOnMounted(()=>qd(Gd.value));const Wd=computed({get(){return Cd?jd.value:Gd.value},set(Xd){jd.value=Xd}});return Object.assign(Wd,{store:jd,system:Ud,state:Gd})}function useDark(Ra={}){const{valueDark:ed="dark",valueLight:ud=""}=Ra,dd=useColorMode({...Ra,onChanged:(gd,yd)=>{var vd;Ra.onChanged?(vd=Ra.onChanged)==null||vd.call(Ra,gd==="dark",yd,gd):yd(gd)},modes:{dark:ed,light:ud}}),hd=computed(()=>dd.system.value);return computed({get(){return dd.value==="dark"},set(gd){const yd=gd?"dark":"light";hd.value===yd?dd.value="auto":dd.value=yd}})}const DEFAULT_OPTIONS$1={multiple:!0,accept:"*",reset:!1,directory:!1};function prepareInitialFiles(Ra){if(!Ra)return null;if(Ra instanceof FileList)return Ra;const ed=new DataTransfer;for(const ud of Ra)ed.items.add(ud);return ed.files}function useFileDialog(Ra={}){const{document:ed=defaultDocument}=Ra,ud=ref$1(prepareInitialFiles(Ra.initialFiles)),{on:dd,trigger:hd}=createEventHook(),{on:md,trigger:gd}=createEventHook();let yd;ed&&(yd=ed.createElement("input"),yd.type="file",yd.onchange=wd=>{const Nd=wd.target;ud.value=Nd.files,hd(ud.value)},yd.oncancel=()=>{gd()});const vd=()=>{ud.value=null,yd&&yd.value&&(yd.value="",hd(null))},Cd=wd=>{if(!yd)return;const Nd={...DEFAULT_OPTIONS$1,...Ra,...wd};yd.multiple=Nd.multiple,yd.accept=Nd.accept,yd.webkitdirectory=Nd.directory,hasOwn$3(Nd,"capture")&&(yd.capture=Nd.capture),Nd.reset&&vd(),yd.click()};return{files:readonly(ud),open:Cd,reset:vd,onCancel:md,onChange:dd}}function useLocalStorage(Ra,ed,ud={}){const{window:dd=defaultWindow}=ud;return useStorage(Ra,ed,dd==null?void 0:dd.localStorage,ud)}function useVModel$1(Ra,ed,ud,dd={}){var hd,md,gd;const{clone:yd=!1,passive:vd=!1,eventName:Cd,deep:wd=!1,defaultValue:Nd,shouldEmit:Ld}=dd,Ud=getCurrentInstance(),jd=ud||(Ud==null?void 0:Ud.emit)||((hd=Ud==null?void 0:Ud.$emit)==null?void 0:hd.bind(Ud))||((gd=(md=Ud==null?void 0:Ud.proxy)==null?void 0:md.$emit)==null?void 0:gd.bind(Ud==null?void 0:Ud.proxy));let Gd=Cd;Gd=Gd||`update:${ed.toString()}`;const Yd=Wd=>yd?typeof yd=="function"?yd(Wd):cloneFnJSON(Wd):Wd,zd=()=>isDef(Ra[ed])?Yd(Ra[ed]):Nd,qd=Wd=>{Ld?Ld(Wd)&&jd(Gd,Wd):jd(Gd,Wd)};if(vd){const Wd=zd(),Xd=ref$1(Wd);let Jd=!1;return watch(()=>Ra[ed],Zd=>{Jd||(Jd=!0,Xd.value=Yd(Zd),nextTick$1(()=>Jd=!1))}),watch(Xd,Zd=>{!Jd&&(Zd!==Ra[ed]||wd)&&qd(Zd)},{deep:wd}),Xd}else return computed({get(){return zd()},set(Wd){qd(Wd)}})}const _sfc_main$1e=defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},setup(Ra,{emit:ed}){const ud=Ra,hd=useVModel$1(ud,"modelValue",ed,{passive:!0,defaultValue:ud.defaultValue});return(md,gd)=>withDirectives((openBlock(),createElementBlock("input",{"onUpdate:modelValue":gd[0]||(gd[0]=yd=>isRef(hd)?hd.value=yd:null),class:normalizeClass(unref(cn$4)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",ud.class))},null,2)),[[vModelText,unref(hd)]])}}),_sfc_main$1d=defineComponent({__name:"NumberField",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},formatOptions:{},locale:{},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(gy$1),mergeProps(unref(md),{class:unref(cn$4)("grid gap-1.5",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$1c=defineComponent({__name:"NumberFieldContent",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$1b=defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(Cy),mergeProps({"data-slot":"increment"},unref(dd),{class:unref(cn$4)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default",{},()=>[createVNode(unref(Plus),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$1a=defineComponent({__name:"NumberFieldInput",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(by$2),{"data-slot":"input",class:normalizeClass(unref(cn$4)("flex h-10 w-full rounded-md border border-input bg-background py-2 text-sm text-center ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",ed.class))},null,8,["class"]))}}),_sfc_main$19=defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(wy$1),mergeProps({"data-slot":"decrement"},unref(dd),{class:unref(cn$4)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default",{},()=>[createVNode(unref(Minus),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$18=defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(Vh),mergeProps(ud.value,{class:unref(cn$4)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",ed.class)}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$17=defineComponent({__name:"DialogHeader",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("flex flex-col gap-y-1.5 text-center sm:text-left",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$16=defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(Bu$2),mergeProps(unref(dd),{class:unref(cn$4)("text-lg font-semibold leading-none tracking-tight",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),DEFAULT_CONTENT=`# 探索 Markdown 的奇妙世界 欢迎来到 Markdown 的奇妙世界!无论你是写作爱好者、开发者、博主,还是想要简单记录点什么的人,Markdown 都能成为你新的好伙伴。它不仅让写作变得简单明了,还能轻松地将内容转化为漂亮的网页格式。今天,我们将全面探讨 Markdown 的基础和进阶语法,让你在这个过程中充分享受写作的乐趣! @@ -466,348 +466,348 @@ code { /* 代码块外层样式 */ code_pre { } -`,githubConfig={username:"bucketio",repoList:Array.from({length:20},(Ra,qa)=>`img${qa}`),branch:"main",accessTokenList:["ghp_sqQg5y7XC7Fy8XdoocsmdVEYRiRiTZPvbwzTL4MRjQc","ghp_jB5JXzBjpGbgzdoocsmdogWfSHhfCKGVstozw1cAsPv","ghp_zvy8wkHo259g7doocsmdJnUKOQd1WO1SPzZ9G0O9cJD","ghp_DnCJc2Ms0RVZ1doocsmdiWOAN78FurfSeD1Pv2Y28pO","ghp_EsMYDv9WVjXWP5doocsmd1nnDml2DEP95rOiz44bSo0","ghp_L4isHf01nllOOdoocsmdHBGoDG6jscCA09WV44QDvlg","ghp_qWciwYXHPakAUGdoocsmdBOBZdRcV08JThKey3mBZNJ","ghp_rxkvIO08wVL2DMdoocsmd2jDEhcatp2rfVyhd3A7RiS","ghp_1RvkWKboSxr0yVdoocsmd7OtBCpecYwoV6deh3utifJ","ghp_cduanDnAug60ngdoocsmdF1uDstXUi6S9RMhY1qdada","ghp_q6mxuJIkqAcsCXdoocsmdkkjWvzGlMVRuy5zI0IWNDx","ghp_Pv4npPeJpChKFMTdoocsmdCQneopUcqJrqrjl3vrt9A","ghp_gKMCFqMaQiLTqhjdoocsmd7BJE8RyK6AdRw4b42CutS","ghp_2oShgb33qFlqBmadoocsmdludmuLYxBFY5bao1XrsVo","ghp_eYyd3kxWTZmsV8doocsmdDFbAa7AEGQTJgmOd0GUmtY"]},giteeConfig={username:"filesss",repoList:Array.from({length:20},(Ra,qa)=>`img${qa}`),branch:"main",accessTokenList:["ed5fc9866bd6c2fdoocsmddd433f806fd2f399c","5448ffebbbf1151doocsmdc4e337cf814fc8a62","25b05efd2557ca2doocsmd75b5c0835e3395911","11628c7a5aef015doocsmd2eeff9fb9566f0458","cb2f5145ed938dedoocsmdbd063b4ed244eecf8","d8c0b57500672c1doocsmd55f48b866b5ebcd98","78c56eadb88e453doocsmd43ddd95753351771a","03e1a688003948fdoocsmda16fcf41e6f03f1f0","c49121cf4d191fbdoocsmdd6a7877ed537e474a","adfeb2fadcdc4aadoocsmdfe1ee869ac9c968ff","116c94549ca4a0ddoocsmd192653af5c0694616","ecf30ed7f2eb184doocsmd51ea4ec8300371d9e","5837cf2bd5afd93doocsmd73904bed31934949e","b5b7e1c7d57e01fdoocsmd5266f552574297d78","684d55564ffbd0bdoocsmd7d747e5cc23aed6d6","3fc04a9d272ab71doocsmd010c56cb57d88d2ba"]},fontFamilyOptions=[{label:"无衬线",value:"-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif",desc:"字体123Abc"},{label:"衬线",value:"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif",desc:"字体123Abc"},{label:"等宽",value:"Menlo, Monaco, 'Courier New', monospace",desc:"字体123Abc"}],fontSizeOptions=[{label:"12px",value:"12px",desc:"更小"},{label:"13px",value:"13px",desc:"稍小"},{label:"14px",value:"14px",desc:"推荐"},{label:"15px",value:"15px",desc:"稍大"},{label:"16px",value:"16px",desc:"更大"}],colorOptions=[{label:"经典蓝",value:"#0F4C81",desc:"稳重冷静"},{label:"翡翠绿",value:"#009874",desc:"自然平衡"},{label:"活力橘",value:"#FA5151",desc:"热情活力"},{label:"柠檬黄",value:"#FECE00",desc:"明亮温暖"},{label:"薰衣紫",value:"#92617E",desc:"优雅神秘"},{label:"天空蓝",value:"#55C9EA",desc:"清爽自由"},{label:"玫瑰金",value:"#B76E79",desc:"奢华现代"},{label:"橄榄绿",value:"#556B2F",desc:"沉稳自然"},{label:"石墨黑",value:"#333333",desc:"内敛极简"},{label:"雾烟灰",value:"#A9A9A9",desc:"柔和低调"},{label:"樱花粉",value:"#FFB7C5",desc:"浪漫甜美"}],codeBlockUrlPrefix="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/highlightjs/11.11.1/styles/",codeBlockThemeList=["1c-light.min.css","a11y-dark.min.css","a11y-light.min.css","agate.min.css","an-old-hope.min.css","androidstudio.min.css","arduino-light.min.css","arta.min.css","ascetic.min.css","atom-one-dark-reasonable.min.css","atom-one-dark.min.css","atom-one-light.min.css","brown-paper.min.css","codepen-embed.min.css","color-brewer.min.css","dark.min.css","default.min.css","devibeans.min.css","docco.min.css","far.min.css","felipec.min.css","foundation.min.css","github-dark-dimmed.min.css","github-dark.min.css","github.min.css","gml.min.css","googlecode.min.css","gradient-dark.min.css","gradient-light.min.css","grayscale.min.css","hybrid.min.css","idea.min.css","intellij-light.min.css","ir-black.min.css","isbl-editor-dark.min.css","isbl-editor-light.min.css","kimbie-dark.min.css","kimbie-light.min.css","lightfair.min.css","lioshi.min.css","magula.min.css","mono-blue.min.css","monokai-sublime.min.css","monokai.min.css","night-owl.min.css","nnfx-dark.min.css","nnfx-light.min.css","nord.min.css","obsidian.min.css","panda-syntax-dark.min.css","panda-syntax-light.min.css","paraiso-dark.min.css","paraiso-light.min.css","pojoaque.min.css","purebasic.min.css","qtcreator-dark.min.css","qtcreator-light.min.css","rainbow.min.css","routeros.min.css","school-book.min.css","shades-of-purple.min.css","srcery.min.css","stackoverflow-dark.min.css","stackoverflow-light.min.css","sunburst.min.css","tokyo-night-dark.min.css","tokyo-night-light.min.css","tomorrow-night-blue.min.css","tomorrow-night-bright.min.css","vs.min.css","vs2015.min.css","xcode.min.css","xt256.min.css"].sort(),codeBlockThemeOptions=codeBlockThemeList.map(Ra=>{const qa=Ra.replace(".min.css",""),rd=`${codeBlockUrlPrefix}${Ra}`;return{label:qa,value:rd,desc:""}}),legendOptions=[{label:"title 优先",value:"title-alt",desc:""},{label:"alt 优先",value:"alt-title",desc:""},{label:"只显示 title",value:"title",desc:""},{label:"只显示 alt",value:"alt",desc:""},{label:"不显示",value:"none",desc:""}];function debounce$1(Ra,qa,{signal:rd,edges:sd}={}){let pd,fd=null;const hd=sd!=null&&sd.includes("leading"),md=sd==null||sd.includes("trailing"),gd=()=>{fd!==null&&(Ra.apply(pd,fd),pd=void 0,fd=null)},yd=()=>{md&&gd(),Ld()};let vd=null;const Nd=()=>{vd!=null&&clearTimeout(vd),vd=setTimeout(()=>{vd=null,yd()},qa)},Md=()=>{vd!==null&&(clearTimeout(vd),vd=null)},Ld=()=>{Md(),pd=void 0,fd=null},Fd=()=>{Md(),gd()},Hd=function(...Vd){if(rd!=null&&rd.aborted)return;pd=this,fd=Vd;const Gd=vd==null;Nd(),hd&&Gd&&gd()};return Hd.schedule=Nd,Hd.cancel=Ld,Hd.flush=Fd,rd==null||rd.addEventListener("abort",Ld,{once:!0}),Hd}function throttle$1(Ra,qa,{signal:rd,edges:sd=["leading","trailing"]}={}){let pd=null;const fd=debounce$1(Ra,qa,{signal:rd,edges:sd}),hd=function(...md){pd==null?pd=Date.now():Date.now()-pd>=qa&&(pd=Date.now(),fd.cancel(),fd(...md)),fd(...md)};return hd.cancel=fd.cancel,hd.flush=fd.flush,hd}function isPrimitive(Ra){return Ra==null||typeof Ra!="object"&&typeof Ra!="function"}function isTypedArray$3(Ra){return ArrayBuffer.isView(Ra)&&!(Ra instanceof DataView)}var buffer$1={},base64Js$1={};base64Js$1.byteLength=byteLength;base64Js$1.toByteArray=toByteArray;base64Js$1.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$4=0,len=code.length;i$40)throw new Error("Invalid string. Length must be a multiple of 4");var rd=Ra.indexOf("=");rd===-1&&(rd=qa);var sd=rd===qa?0:4-rd%4;return[rd,sd]}function byteLength(Ra){var qa=getLens(Ra),rd=qa[0],sd=qa[1];return(rd+sd)*3/4-sd}function _byteLength(Ra,qa,rd){return(qa+rd)*3/4-rd}function toByteArray(Ra){var qa,rd=getLens(Ra),sd=rd[0],pd=rd[1],fd=new Arr(_byteLength(Ra,sd,pd)),hd=0,md=pd>0?sd-4:sd,gd;for(gd=0;gd>16&255,fd[hd++]=qa>>8&255,fd[hd++]=qa&255;return pd===2&&(qa=revLookup[Ra.charCodeAt(gd)]<<2|revLookup[Ra.charCodeAt(gd+1)]>>4,fd[hd++]=qa&255),pd===1&&(qa=revLookup[Ra.charCodeAt(gd)]<<10|revLookup[Ra.charCodeAt(gd+1)]<<4|revLookup[Ra.charCodeAt(gd+2)]>>2,fd[hd++]=qa>>8&255,fd[hd++]=qa&255),fd}function tripletToBase64(Ra){return lookup[Ra>>18&63]+lookup[Ra>>12&63]+lookup[Ra>>6&63]+lookup[Ra&63]}function encodeChunk(Ra,qa,rd){for(var sd,pd=[],fd=qa;fdmd?md:hd+fd));return sd===1?(qa=Ra[rd-1],pd.push(lookup[qa>>2]+lookup[qa<<4&63]+"==")):sd===2&&(qa=(Ra[rd-2]<<8)+Ra[rd-1],pd.push(lookup[qa>>10]+lookup[qa>>4&63]+lookup[qa<<2&63]+"=")),pd.join("")}var ieee754$1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754$1.read=function(Ra,qa,rd,sd,pd){var fd,hd,md=pd*8-sd-1,gd=(1<>1,vd=-7,Nd=rd?pd-1:0,Md=rd?-1:1,Ld=Ra[qa+Nd];for(Nd+=Md,fd=Ld&(1<<-vd)-1,Ld>>=-vd,vd+=md;vd>0;fd=fd*256+Ra[qa+Nd],Nd+=Md,vd-=8);for(hd=fd&(1<<-vd)-1,fd>>=-vd,vd+=sd;vd>0;hd=hd*256+Ra[qa+Nd],Nd+=Md,vd-=8);if(fd===0)fd=1-yd;else{if(fd===gd)return hd?NaN:(Ld?-1:1)*(1/0);hd=hd+Math.pow(2,sd),fd=fd-yd}return(Ld?-1:1)*hd*Math.pow(2,fd-sd)};ieee754$1.write=function(Ra,qa,rd,sd,pd,fd){var hd,md,gd,yd=fd*8-pd-1,vd=(1<>1,Md=pd===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ld=sd?0:fd-1,Fd=sd?1:-1,Hd=qa<0||qa===0&&1/qa<0?1:0;for(qa=Math.abs(qa),isNaN(qa)||qa===1/0?(md=isNaN(qa)?1:0,hd=vd):(hd=Math.floor(Math.log(qa)/Math.LN2),qa*(gd=Math.pow(2,-hd))<1&&(hd--,gd*=2),hd+Nd>=1?qa+=Md/gd:qa+=Md*Math.pow(2,1-Nd),qa*gd>=2&&(hd++,gd/=2),hd+Nd>=vd?(md=0,hd=vd):hd+Nd>=1?(md=(qa*gd-1)*Math.pow(2,pd),hd=hd+Nd):(md=qa*Math.pow(2,Nd-1)*Math.pow(2,pd),hd=0));pd>=8;Ra[rd+Ld]=md&255,Ld+=Fd,md/=256,pd-=8);for(hd=hd<0;Ra[rd+Ld]=hd&255,Ld+=Fd,hd/=256,yd-=8);Ra[rd+Ld-Fd]|=Hd*128};/*! +`,githubConfig={username:"bucketio",repoList:Array.from({length:20},(Ra,ed)=>`img${ed}`),branch:"main",accessTokenList:["ghp_sqQg5y7XC7Fy8XdoocsmdVEYRiRiTZPvbwzTL4MRjQc","ghp_jB5JXzBjpGbgzdoocsmdogWfSHhfCKGVstozw1cAsPv","ghp_zvy8wkHo259g7doocsmdJnUKOQd1WO1SPzZ9G0O9cJD","ghp_DnCJc2Ms0RVZ1doocsmdiWOAN78FurfSeD1Pv2Y28pO","ghp_EsMYDv9WVjXWP5doocsmd1nnDml2DEP95rOiz44bSo0","ghp_L4isHf01nllOOdoocsmdHBGoDG6jscCA09WV44QDvlg","ghp_qWciwYXHPakAUGdoocsmdBOBZdRcV08JThKey3mBZNJ","ghp_rxkvIO08wVL2DMdoocsmd2jDEhcatp2rfVyhd3A7RiS","ghp_1RvkWKboSxr0yVdoocsmd7OtBCpecYwoV6deh3utifJ","ghp_cduanDnAug60ngdoocsmdF1uDstXUi6S9RMhY1qdada","ghp_q6mxuJIkqAcsCXdoocsmdkkjWvzGlMVRuy5zI0IWNDx","ghp_Pv4npPeJpChKFMTdoocsmdCQneopUcqJrqrjl3vrt9A","ghp_gKMCFqMaQiLTqhjdoocsmd7BJE8RyK6AdRw4b42CutS","ghp_2oShgb33qFlqBmadoocsmdludmuLYxBFY5bao1XrsVo","ghp_eYyd3kxWTZmsV8doocsmdDFbAa7AEGQTJgmOd0GUmtY"]},giteeConfig={username:"filesss",repoList:Array.from({length:20},(Ra,ed)=>`img${ed}`),branch:"main",accessTokenList:["ed5fc9866bd6c2fdoocsmddd433f806fd2f399c","5448ffebbbf1151doocsmdc4e337cf814fc8a62","25b05efd2557ca2doocsmd75b5c0835e3395911","11628c7a5aef015doocsmd2eeff9fb9566f0458","cb2f5145ed938dedoocsmdbd063b4ed244eecf8","d8c0b57500672c1doocsmd55f48b866b5ebcd98","78c56eadb88e453doocsmd43ddd95753351771a","03e1a688003948fdoocsmda16fcf41e6f03f1f0","c49121cf4d191fbdoocsmdd6a7877ed537e474a","adfeb2fadcdc4aadoocsmdfe1ee869ac9c968ff","116c94549ca4a0ddoocsmd192653af5c0694616","ecf30ed7f2eb184doocsmd51ea4ec8300371d9e","5837cf2bd5afd93doocsmd73904bed31934949e","b5b7e1c7d57e01fdoocsmd5266f552574297d78","684d55564ffbd0bdoocsmd7d747e5cc23aed6d6","3fc04a9d272ab71doocsmd010c56cb57d88d2ba"]},fontFamilyOptions=[{label:"无衬线",value:"-apple-system-font,BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB , Microsoft YaHei UI , Microsoft YaHei ,Arial,sans-serif",desc:"字体123Abc"},{label:"衬线",value:"Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif",desc:"字体123Abc"},{label:"等宽",value:"Menlo, Monaco, 'Courier New', monospace",desc:"字体123Abc"}],fontSizeOptions=[{label:"12px",value:"12px",desc:"更小"},{label:"13px",value:"13px",desc:"稍小"},{label:"14px",value:"14px",desc:"推荐"},{label:"15px",value:"15px",desc:"稍大"},{label:"16px",value:"16px",desc:"更大"}],colorOptions=[{label:"经典蓝",value:"#0F4C81",desc:"稳重冷静"},{label:"翡翠绿",value:"#009874",desc:"自然平衡"},{label:"活力橘",value:"#FA5151",desc:"热情活力"},{label:"柠檬黄",value:"#FECE00",desc:"明亮温暖"},{label:"薰衣紫",value:"#92617E",desc:"优雅神秘"},{label:"天空蓝",value:"#55C9EA",desc:"清爽自由"},{label:"玫瑰金",value:"#B76E79",desc:"奢华现代"},{label:"橄榄绿",value:"#556B2F",desc:"沉稳自然"},{label:"石墨黑",value:"#333333",desc:"内敛极简"},{label:"雾烟灰",value:"#A9A9A9",desc:"柔和低调"},{label:"樱花粉",value:"#FFB7C5",desc:"浪漫甜美"}],codeBlockUrlPrefix="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/npm/highlightjs/11.11.1/styles/",codeBlockThemeList=["1c-light.min.css","a11y-dark.min.css","a11y-light.min.css","agate.min.css","an-old-hope.min.css","androidstudio.min.css","arduino-light.min.css","arta.min.css","ascetic.min.css","atom-one-dark-reasonable.min.css","atom-one-dark.min.css","atom-one-light.min.css","brown-paper.min.css","codepen-embed.min.css","color-brewer.min.css","dark.min.css","default.min.css","devibeans.min.css","docco.min.css","far.min.css","felipec.min.css","foundation.min.css","github-dark-dimmed.min.css","github-dark.min.css","github.min.css","gml.min.css","googlecode.min.css","gradient-dark.min.css","gradient-light.min.css","grayscale.min.css","hybrid.min.css","idea.min.css","intellij-light.min.css","ir-black.min.css","isbl-editor-dark.min.css","isbl-editor-light.min.css","kimbie-dark.min.css","kimbie-light.min.css","lightfair.min.css","lioshi.min.css","magula.min.css","mono-blue.min.css","monokai-sublime.min.css","monokai.min.css","night-owl.min.css","nnfx-dark.min.css","nnfx-light.min.css","nord.min.css","obsidian.min.css","panda-syntax-dark.min.css","panda-syntax-light.min.css","paraiso-dark.min.css","paraiso-light.min.css","pojoaque.min.css","purebasic.min.css","qtcreator-dark.min.css","qtcreator-light.min.css","rainbow.min.css","routeros.min.css","school-book.min.css","shades-of-purple.min.css","srcery.min.css","stackoverflow-dark.min.css","stackoverflow-light.min.css","sunburst.min.css","tokyo-night-dark.min.css","tokyo-night-light.min.css","tomorrow-night-blue.min.css","tomorrow-night-bright.min.css","vs.min.css","vs2015.min.css","xcode.min.css","xt256.min.css"].sort(),codeBlockThemeOptions=codeBlockThemeList.map(Ra=>{const ed=Ra.replace(".min.css",""),ud=`${codeBlockUrlPrefix}${Ra}`;return{label:ed,value:ud,desc:""}}),legendOptions=[{label:"title 优先",value:"title-alt",desc:""},{label:"alt 优先",value:"alt-title",desc:""},{label:"只显示 title",value:"title",desc:""},{label:"只显示 alt",value:"alt",desc:""},{label:"不显示",value:"none",desc:""}];function debounce$1(Ra,ed,{signal:ud,edges:dd}={}){let hd,md=null;const gd=dd!=null&&dd.includes("leading"),yd=dd==null||dd.includes("trailing"),vd=()=>{md!==null&&(Ra.apply(hd,md),hd=void 0,md=null)},Cd=()=>{yd&&vd(),Ud()};let wd=null;const Nd=()=>{wd!=null&&clearTimeout(wd),wd=setTimeout(()=>{wd=null,Cd()},ed)},Ld=()=>{wd!==null&&(clearTimeout(wd),wd=null)},Ud=()=>{Ld(),hd=void 0,md=null},jd=()=>{Ld(),vd()},Gd=function(...Yd){if(ud!=null&&ud.aborted)return;hd=this,md=Yd;const zd=wd==null;Nd(),gd&&zd&&vd()};return Gd.schedule=Nd,Gd.cancel=Ud,Gd.flush=jd,ud==null||ud.addEventListener("abort",Ud,{once:!0}),Gd}function throttle$1(Ra,ed,{signal:ud,edges:dd=["leading","trailing"]}={}){let hd=null;const md=debounce$1(Ra,ed,{signal:ud,edges:dd}),gd=function(...yd){hd==null?hd=Date.now():Date.now()-hd>=ed&&(hd=Date.now(),md.cancel(),md(...yd)),md(...yd)};return gd.cancel=md.cancel,gd.flush=md.flush,gd}function isPrimitive(Ra){return Ra==null||typeof Ra!="object"&&typeof Ra!="function"}function isTypedArray$3(Ra){return ArrayBuffer.isView(Ra)&&!(Ra instanceof DataView)}var buffer$1={},base64Js$1={};base64Js$1.byteLength=byteLength;base64Js$1.toByteArray=toByteArray;base64Js$1.fromByteArray=fromByteArray;var lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var i$4=0,len=code.length;i$40)throw new Error("Invalid string. Length must be a multiple of 4");var ud=Ra.indexOf("=");ud===-1&&(ud=ed);var dd=ud===ed?0:4-ud%4;return[ud,dd]}function byteLength(Ra){var ed=getLens(Ra),ud=ed[0],dd=ed[1];return(ud+dd)*3/4-dd}function _byteLength(Ra,ed,ud){return(ed+ud)*3/4-ud}function toByteArray(Ra){var ed,ud=getLens(Ra),dd=ud[0],hd=ud[1],md=new Arr(_byteLength(Ra,dd,hd)),gd=0,yd=hd>0?dd-4:dd,vd;for(vd=0;vd>16&255,md[gd++]=ed>>8&255,md[gd++]=ed&255;return hd===2&&(ed=revLookup[Ra.charCodeAt(vd)]<<2|revLookup[Ra.charCodeAt(vd+1)]>>4,md[gd++]=ed&255),hd===1&&(ed=revLookup[Ra.charCodeAt(vd)]<<10|revLookup[Ra.charCodeAt(vd+1)]<<4|revLookup[Ra.charCodeAt(vd+2)]>>2,md[gd++]=ed>>8&255,md[gd++]=ed&255),md}function tripletToBase64(Ra){return lookup[Ra>>18&63]+lookup[Ra>>12&63]+lookup[Ra>>6&63]+lookup[Ra&63]}function encodeChunk(Ra,ed,ud){for(var dd,hd=[],md=ed;mdyd?yd:gd+md));return dd===1?(ed=Ra[ud-1],hd.push(lookup[ed>>2]+lookup[ed<<4&63]+"==")):dd===2&&(ed=(Ra[ud-2]<<8)+Ra[ud-1],hd.push(lookup[ed>>10]+lookup[ed>>4&63]+lookup[ed<<2&63]+"=")),hd.join("")}var ieee754$1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ieee754$1.read=function(Ra,ed,ud,dd,hd){var md,gd,yd=hd*8-dd-1,vd=(1<>1,wd=-7,Nd=ud?hd-1:0,Ld=ud?-1:1,Ud=Ra[ed+Nd];for(Nd+=Ld,md=Ud&(1<<-wd)-1,Ud>>=-wd,wd+=yd;wd>0;md=md*256+Ra[ed+Nd],Nd+=Ld,wd-=8);for(gd=md&(1<<-wd)-1,md>>=-wd,wd+=dd;wd>0;gd=gd*256+Ra[ed+Nd],Nd+=Ld,wd-=8);if(md===0)md=1-Cd;else{if(md===vd)return gd?NaN:(Ud?-1:1)*(1/0);gd=gd+Math.pow(2,dd),md=md-Cd}return(Ud?-1:1)*gd*Math.pow(2,md-dd)};ieee754$1.write=function(Ra,ed,ud,dd,hd,md){var gd,yd,vd,Cd=md*8-hd-1,wd=(1<>1,Ld=hd===23?Math.pow(2,-24)-Math.pow(2,-77):0,Ud=dd?0:md-1,jd=dd?1:-1,Gd=ed<0||ed===0&&1/ed<0?1:0;for(ed=Math.abs(ed),isNaN(ed)||ed===1/0?(yd=isNaN(ed)?1:0,gd=wd):(gd=Math.floor(Math.log(ed)/Math.LN2),ed*(vd=Math.pow(2,-gd))<1&&(gd--,vd*=2),gd+Nd>=1?ed+=Ld/vd:ed+=Ld*Math.pow(2,1-Nd),ed*vd>=2&&(gd++,vd/=2),gd+Nd>=wd?(yd=0,gd=wd):gd+Nd>=1?(yd=(ed*vd-1)*Math.pow(2,hd),gd=gd+Nd):(yd=ed*Math.pow(2,Nd-1)*Math.pow(2,hd),gd=0));hd>=8;Ra[ud+Ud]=yd&255,Ud+=jd,yd/=256,hd-=8);for(gd=gd<0;Ra[ud+Ud]=gd&255,Ud+=jd,gd/=256,Cd-=8);Ra[ud+Ud-jd]|=Gd*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */(function(Ra){const qa=base64Js$1,rd=ieee754$1,sd=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ra.Buffer=vd,Ra.SlowBuffer=Kd,Ra.INSPECT_MAX_BYTES=50;const pd=2147483647;Ra.kMaxLength=pd;const{Uint8Array:fd,ArrayBuffer:hd,SharedArrayBuffer:md}=globalThis;vd.TYPED_ARRAY_SUPPORT=gd(),!vd.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function gd(){try{const Fh=new fd(1),kf={foo:function(){return 42}};return Object.setPrototypeOf(kf,fd.prototype),Object.setPrototypeOf(Fh,kf),Fh.foo()===42}catch{return!1}}Object.defineProperty(vd.prototype,"parent",{enumerable:!0,get:function(){if(vd.isBuffer(this))return this.buffer}}),Object.defineProperty(vd.prototype,"offset",{enumerable:!0,get:function(){if(vd.isBuffer(this))return this.byteOffset}});function yd(Fh){if(Fh>pd)throw new RangeError('The value "'+Fh+'" is invalid for option "size"');const kf=new fd(Fh);return Object.setPrototypeOf(kf,vd.prototype),kf}function vd(Fh,kf,Rf){if(typeof Fh=="number"){if(typeof kf=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Fd(Fh)}return Nd(Fh,kf,Rf)}vd.poolSize=8192;function Nd(Fh,kf,Rf){if(typeof Fh=="string")return Hd(Fh,kf);if(hd.isView(Fh))return Gd(Fh);if(Fh==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Fh);if(tg(Fh,hd)||Fh&&tg(Fh.buffer,hd)||typeof md<"u"&&(tg(Fh,md)||Fh&&tg(Fh.buffer,md)))return Ud(Fh,kf,Rf);if(typeof Fh=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Dh=Fh.valueOf&&Fh.valueOf();if(Dh!=null&&Dh!==Fh)return vd.from(Dh,kf,Rf);const Vh=qd(Fh);if(Vh)return Vh;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Fh[Symbol.toPrimitive]=="function")return vd.from(Fh[Symbol.toPrimitive]("string"),kf,Rf);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Fh)}vd.from=function(Fh,kf,Rf){return Nd(Fh,kf,Rf)},Object.setPrototypeOf(vd.prototype,fd.prototype),Object.setPrototypeOf(vd,fd);function Md(Fh){if(typeof Fh!="number")throw new TypeError('"size" argument must be of type number');if(Fh<0)throw new RangeError('The value "'+Fh+'" is invalid for option "size"')}function Ld(Fh,kf,Rf){return Md(Fh),Fh<=0?yd(Fh):kf!==void 0?typeof Rf=="string"?yd(Fh).fill(kf,Rf):yd(Fh).fill(kf):yd(Fh)}vd.alloc=function(Fh,kf,Rf){return Ld(Fh,kf,Rf)};function Fd(Fh){return Md(Fh),yd(Fh<0?0:Wd(Fh)|0)}vd.allocUnsafe=function(Fh){return Fd(Fh)},vd.allocUnsafeSlow=function(Fh){return Fd(Fh)};function Hd(Fh,kf){if((typeof kf!="string"||kf==="")&&(kf="utf8"),!vd.isEncoding(kf))throw new TypeError("Unknown encoding: "+kf);const Rf=Xd(Fh,kf)|0;let Dh=yd(Rf);const Vh=Dh.write(Fh,kf);return Vh!==Rf&&(Dh=Dh.slice(0,Vh)),Dh}function Vd(Fh){const kf=Fh.length<0?0:Wd(Fh.length)|0,Rf=yd(kf);for(let Dh=0;Dh=pd)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pd.toString(16)+" bytes");return Fh|0}function Kd(Fh){return+Fh!=Fh&&(Fh=0),vd.alloc(+Fh)}vd.isBuffer=function(kf){return kf!=null&&kf._isBuffer===!0&&kf!==vd.prototype},vd.compare=function(kf,Rf){if(tg(kf,fd)&&(kf=vd.from(kf,kf.offset,kf.byteLength)),tg(Rf,fd)&&(Rf=vd.from(Rf,Rf.offset,Rf.byteLength)),!vd.isBuffer(kf)||!vd.isBuffer(Rf))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(kf===Rf)return 0;let Dh=kf.length,Vh=Rf.length;for(let Sm=0,$m=Math.min(Dh,Vh);Sm<$m;++Sm)if(kf[Sm]!==Rf[Sm]){Dh=kf[Sm],Vh=Rf[Sm];break}return DhVh.length?(vd.isBuffer($m)||($m=vd.from($m)),$m.copy(Vh,Sm)):fd.prototype.set.call(Vh,$m,Sm);else if(vd.isBuffer($m))$m.copy(Vh,Sm);else throw new TypeError('"list" argument must be an Array of Buffers');Sm+=$m.length}return Vh};function Xd(Fh,kf){if(vd.isBuffer(Fh))return Fh.length;if(hd.isView(Fh)||tg(Fh,hd))return Fh.byteLength;if(typeof Fh!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Fh);const Rf=Fh.length,Dh=arguments.length>2&&arguments[2]===!0;if(!Dh&&Rf===0)return 0;let Vh=!1;for(;;)switch(kf){case"ascii":case"latin1":case"binary":return Rf;case"utf8":case"utf-8":return wh(Fh).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Rf*2;case"hex":return Rf>>>1;case"base64":return Mm(Fh).length;default:if(Vh)return Dh?-1:wh(Fh).length;kf=(""+kf).toLowerCase(),Vh=!0}}vd.byteLength=Xd;function df(Fh,kf,Rf){let Dh=!1;if((kf===void 0||kf<0)&&(kf=0),kf>this.length||((Rf===void 0||Rf>this.length)&&(Rf=this.length),Rf<=0)||(Rf>>>=0,kf>>>=0,Rf<=kf))return"";for(Fh||(Fh="utf8");;)switch(Fh){case"hex":return dh(this,kf,Rf);case"utf8":case"utf-8":return Pf(this,kf,Rf);case"ascii":return Eh(this,kf,Rf);case"latin1":case"binary":return Mh(this,kf,Rf);case"base64":return wf(this,kf,Rf);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return eh(this,kf,Rf);default:if(Dh)throw new TypeError("Unknown encoding: "+Fh);Fh=(Fh+"").toLowerCase(),Dh=!0}}vd.prototype._isBuffer=!0;function Ef(Fh,kf,Rf){const Dh=Fh[kf];Fh[kf]=Fh[Rf],Fh[Rf]=Dh}vd.prototype.swap16=function(){const kf=this.length;if(kf%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Rf=0;RfRf&&(kf+=" ... "),""},sd&&(vd.prototype[sd]=vd.prototype.inspect),vd.prototype.compare=function(kf,Rf,Dh,Vh,Sm){if(tg(kf,fd)&&(kf=vd.from(kf,kf.offset,kf.byteLength)),!vd.isBuffer(kf))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof kf);if(Rf===void 0&&(Rf=0),Dh===void 0&&(Dh=kf?kf.length:0),Vh===void 0&&(Vh=0),Sm===void 0&&(Sm=this.length),Rf<0||Dh>kf.length||Vh<0||Sm>this.length)throw new RangeError("out of range index");if(Vh>=Sm&&Rf>=Dh)return 0;if(Vh>=Sm)return-1;if(Rf>=Dh)return 1;if(Rf>>>=0,Dh>>>=0,Vh>>>=0,Sm>>>=0,this===kf)return 0;let $m=Sm-Vh,Km=Dh-Rf;const Ag=Math.min($m,Km),ig=this.slice(Vh,Sm),_g=kf.slice(Rf,Dh);for(let vg=0;vg2147483647?Rf=2147483647:Rf<-2147483648&&(Rf=-2147483648),Rf=+Rf,Fm(Rf)&&(Rf=Vh?0:Fh.length-1),Rf<0&&(Rf=Fh.length+Rf),Rf>=Fh.length){if(Vh)return-1;Rf=Fh.length-1}else if(Rf<0)if(Vh)Rf=0;else return-1;if(typeof kf=="string"&&(kf=vd.from(kf,Dh)),vd.isBuffer(kf))return kf.length===0?-1:mf(Fh,kf,Rf,Dh,Vh);if(typeof kf=="number")return kf=kf&255,typeof fd.prototype.indexOf=="function"?Vh?fd.prototype.indexOf.call(Fh,kf,Rf):fd.prototype.lastIndexOf.call(Fh,kf,Rf):mf(Fh,[kf],Rf,Dh,Vh);throw new TypeError("val must be string, number or Buffer")}function mf(Fh,kf,Rf,Dh,Vh){let Sm=1,$m=Fh.length,Km=kf.length;if(Dh!==void 0&&(Dh=String(Dh).toLowerCase(),Dh==="ucs2"||Dh==="ucs-2"||Dh==="utf16le"||Dh==="utf-16le")){if(Fh.length<2||kf.length<2)return-1;Sm=2,$m/=2,Km/=2,Rf/=2}function Ag(_g,vg){return Sm===1?_g[vg]:_g.readUInt16BE(vg*Sm)}let ig;if(Vh){let _g=-1;for(ig=Rf;ig<$m;ig++)if(Ag(Fh,ig)===Ag(kf,_g===-1?0:ig-_g)){if(_g===-1&&(_g=ig),ig-_g+1===Km)return _g*Sm}else _g!==-1&&(ig-=ig-_g),_g=-1}else for(Rf+Km>$m&&(Rf=$m-Km),ig=Rf;ig>=0;ig--){let _g=!0;for(let vg=0;vgVh&&(Dh=Vh)):Dh=Vh;const Sm=kf.length;Dh>Sm/2&&(Dh=Sm/2);let $m;for($m=0;$m>>0,isFinite(Dh)?(Dh=Dh>>>0,Vh===void 0&&(Vh="utf8")):(Vh=Dh,Dh=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Sm=this.length-Rf;if((Dh===void 0||Dh>Sm)&&(Dh=Sm),kf.length>0&&(Dh<0||Rf<0)||Rf>this.length)throw new RangeError("Attempt to write outside buffer bounds");Vh||(Vh="utf8");let $m=!1;for(;;)switch(Vh){case"hex":return _f(this,kf,Rf,Dh);case"utf8":case"utf-8":return xf(this,kf,Rf,Dh);case"ascii":case"latin1":case"binary":return Cf(this,kf,Rf,Dh);case"base64":return If(this,kf,Rf,Dh);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sf(this,kf,Rf,Dh);default:if($m)throw new TypeError("Unknown encoding: "+Vh);Vh=(""+Vh).toLowerCase(),$m=!0}},vd.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wf(Fh,kf,Rf){return kf===0&&Rf===Fh.length?qa.fromByteArray(Fh):qa.fromByteArray(Fh.slice(kf,Rf))}function Pf(Fh,kf,Rf){Rf=Math.min(Fh.length,Rf);const Dh=[];let Vh=kf;for(;Vh239?4:Sm>223?3:Sm>191?2:1;if(Vh+Km<=Rf){let Ag,ig,_g,vg;switch(Km){case 1:Sm<128&&($m=Sm);break;case 2:Ag=Fh[Vh+1],(Ag&192)===128&&(vg=(Sm&31)<<6|Ag&63,vg>127&&($m=vg));break;case 3:Ag=Fh[Vh+1],ig=Fh[Vh+2],(Ag&192)===128&&(ig&192)===128&&(vg=(Sm&15)<<12|(Ag&63)<<6|ig&63,vg>2047&&(vg<55296||vg>57343)&&($m=vg));break;case 4:Ag=Fh[Vh+1],ig=Fh[Vh+2],_g=Fh[Vh+3],(Ag&192)===128&&(ig&192)===128&&(_g&192)===128&&(vg=(Sm&15)<<18|(Ag&63)<<12|(ig&63)<<6|_g&63,vg>65535&&vg<1114112&&($m=vg))}}$m===null?($m=65533,Km=1):$m>65535&&($m-=65536,Dh.push($m>>>10&1023|55296),$m=56320|$m&1023),Dh.push($m),Vh+=Km}return xh(Dh)}const lh=4096;function xh(Fh){const kf=Fh.length;if(kf<=lh)return String.fromCharCode.apply(String,Fh);let Rf="",Dh=0;for(;DhDh)&&(Rf=Dh);let Vh="";for(let Sm=kf;SmDh&&(kf=Dh),Rf<0?(Rf+=Dh,Rf<0&&(Rf=0)):Rf>Dh&&(Rf=Dh),RfRf)throw new RangeError("Trying to access beyond buffer length")}vd.prototype.readUintLE=vd.prototype.readUIntLE=function(kf,Rf,Dh){kf=kf>>>0,Rf=Rf>>>0,Dh||fh(kf,Rf,this.length);let Vh=this[kf],Sm=1,$m=0;for(;++$m>>0,Rf=Rf>>>0,Dh||fh(kf,Rf,this.length);let Vh=this[kf+--Rf],Sm=1;for(;Rf>0&&(Sm*=256);)Vh+=this[kf+--Rf]*Sm;return Vh},vd.prototype.readUint8=vd.prototype.readUInt8=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,1,this.length),this[kf]},vd.prototype.readUint16LE=vd.prototype.readUInt16LE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,2,this.length),this[kf]|this[kf+1]<<8},vd.prototype.readUint16BE=vd.prototype.readUInt16BE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,2,this.length),this[kf]<<8|this[kf+1]},vd.prototype.readUint32LE=vd.prototype.readUInt32LE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,4,this.length),(this[kf]|this[kf+1]<<8|this[kf+2]<<16)+this[kf+3]*16777216},vd.prototype.readUint32BE=vd.prototype.readUInt32BE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,4,this.length),this[kf]*16777216+(this[kf+1]<<16|this[kf+2]<<8|this[kf+3])},vd.prototype.readBigUInt64LE=rg(function(kf){kf=kf>>>0,kh(kf,"offset");const Rf=this[kf],Dh=this[kf+7];(Rf===void 0||Dh===void 0)&&Zf(kf,this.length-8);const Vh=Rf+this[++kf]*2**8+this[++kf]*2**16+this[++kf]*2**24,Sm=this[++kf]+this[++kf]*2**8+this[++kf]*2**16+Dh*2**24;return BigInt(Vh)+(BigInt(Sm)<>>0,kh(kf,"offset");const Rf=this[kf],Dh=this[kf+7];(Rf===void 0||Dh===void 0)&&Zf(kf,this.length-8);const Vh=Rf*2**24+this[++kf]*2**16+this[++kf]*2**8+this[++kf],Sm=this[++kf]*2**24+this[++kf]*2**16+this[++kf]*2**8+Dh;return(BigInt(Vh)<>>0,Rf=Rf>>>0,Dh||fh(kf,Rf,this.length);let Vh=this[kf],Sm=1,$m=0;for(;++$m=Sm&&(Vh-=Math.pow(2,8*Rf)),Vh},vd.prototype.readIntBE=function(kf,Rf,Dh){kf=kf>>>0,Rf=Rf>>>0,Dh||fh(kf,Rf,this.length);let Vh=Rf,Sm=1,$m=this[kf+--Vh];for(;Vh>0&&(Sm*=256);)$m+=this[kf+--Vh]*Sm;return Sm*=128,$m>=Sm&&($m-=Math.pow(2,8*Rf)),$m},vd.prototype.readInt8=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,1,this.length),this[kf]&128?(255-this[kf]+1)*-1:this[kf]},vd.prototype.readInt16LE=function(kf,Rf){kf=kf>>>0,Rf||fh(kf,2,this.length);const Dh=this[kf]|this[kf+1]<<8;return Dh&32768?Dh|4294901760:Dh},vd.prototype.readInt16BE=function(kf,Rf){kf=kf>>>0,Rf||fh(kf,2,this.length);const Dh=this[kf+1]|this[kf]<<8;return Dh&32768?Dh|4294901760:Dh},vd.prototype.readInt32LE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,4,this.length),this[kf]|this[kf+1]<<8|this[kf+2]<<16|this[kf+3]<<24},vd.prototype.readInt32BE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,4,this.length),this[kf]<<24|this[kf+1]<<16|this[kf+2]<<8|this[kf+3]},vd.prototype.readBigInt64LE=rg(function(kf){kf=kf>>>0,kh(kf,"offset");const Rf=this[kf],Dh=this[kf+7];(Rf===void 0||Dh===void 0)&&Zf(kf,this.length-8);const Vh=this[kf+4]+this[kf+5]*2**8+this[kf+6]*2**16+(Dh<<24);return(BigInt(Vh)<>>0,kh(kf,"offset");const Rf=this[kf],Dh=this[kf+7];(Rf===void 0||Dh===void 0)&&Zf(kf,this.length-8);const Vh=(Rf<<24)+this[++kf]*2**16+this[++kf]*2**8+this[++kf];return(BigInt(Vh)<>>0,Rf||fh(kf,4,this.length),rd.read(this,kf,!0,23,4)},vd.prototype.readFloatBE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,4,this.length),rd.read(this,kf,!1,23,4)},vd.prototype.readDoubleLE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,8,this.length),rd.read(this,kf,!0,52,8)},vd.prototype.readDoubleBE=function(kf,Rf){return kf=kf>>>0,Rf||fh(kf,8,this.length),rd.read(this,kf,!1,52,8)};function Sh(Fh,kf,Rf,Dh,Vh,Sm){if(!vd.isBuffer(Fh))throw new TypeError('"buffer" argument must be a Buffer instance');if(kf>Vh||kfFh.length)throw new RangeError("Index out of range")}vd.prototype.writeUintLE=vd.prototype.writeUIntLE=function(kf,Rf,Dh,Vh){if(kf=+kf,Rf=Rf>>>0,Dh=Dh>>>0,!Vh){const Km=Math.pow(2,8*Dh)-1;Sh(this,kf,Rf,Dh,Km,0)}let Sm=1,$m=0;for(this[Rf]=kf&255;++$m>>0,Dh=Dh>>>0,!Vh){const Km=Math.pow(2,8*Dh)-1;Sh(this,kf,Rf,Dh,Km,0)}let Sm=Dh-1,$m=1;for(this[Rf+Sm]=kf&255;--Sm>=0&&($m*=256);)this[Rf+Sm]=kf/$m&255;return Rf+Dh},vd.prototype.writeUint8=vd.prototype.writeUInt8=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,1,255,0),this[Rf]=kf&255,Rf+1},vd.prototype.writeUint16LE=vd.prototype.writeUInt16LE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,2,65535,0),this[Rf]=kf&255,this[Rf+1]=kf>>>8,Rf+2},vd.prototype.writeUint16BE=vd.prototype.writeUInt16BE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,2,65535,0),this[Rf]=kf>>>8,this[Rf+1]=kf&255,Rf+2},vd.prototype.writeUint32LE=vd.prototype.writeUInt32LE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,4,4294967295,0),this[Rf+3]=kf>>>24,this[Rf+2]=kf>>>16,this[Rf+1]=kf>>>8,this[Rf]=kf&255,Rf+4},vd.prototype.writeUint32BE=vd.prototype.writeUInt32BE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,4,4294967295,0),this[Rf]=kf>>>24,this[Rf+1]=kf>>>16,this[Rf+2]=kf>>>8,this[Rf+3]=kf&255,Rf+4};function vh(Fh,kf,Rf,Dh,Vh){Tm(kf,Dh,Vh,Fh,Rf,7);let Sm=Number(kf&BigInt(4294967295));Fh[Rf++]=Sm,Sm=Sm>>8,Fh[Rf++]=Sm,Sm=Sm>>8,Fh[Rf++]=Sm,Sm=Sm>>8,Fh[Rf++]=Sm;let $m=Number(kf>>BigInt(32)&BigInt(4294967295));return Fh[Rf++]=$m,$m=$m>>8,Fh[Rf++]=$m,$m=$m>>8,Fh[Rf++]=$m,$m=$m>>8,Fh[Rf++]=$m,Rf}function Df(Fh,kf,Rf,Dh,Vh){Tm(kf,Dh,Vh,Fh,Rf,7);let Sm=Number(kf&BigInt(4294967295));Fh[Rf+7]=Sm,Sm=Sm>>8,Fh[Rf+6]=Sm,Sm=Sm>>8,Fh[Rf+5]=Sm,Sm=Sm>>8,Fh[Rf+4]=Sm;let $m=Number(kf>>BigInt(32)&BigInt(4294967295));return Fh[Rf+3]=$m,$m=$m>>8,Fh[Rf+2]=$m,$m=$m>>8,Fh[Rf+1]=$m,$m=$m>>8,Fh[Rf]=$m,Rf+8}vd.prototype.writeBigUInt64LE=rg(function(kf,Rf=0){return vh(this,kf,Rf,BigInt(0),BigInt("0xffffffffffffffff"))}),vd.prototype.writeBigUInt64BE=rg(function(kf,Rf=0){return Df(this,kf,Rf,BigInt(0),BigInt("0xffffffffffffffff"))}),vd.prototype.writeIntLE=function(kf,Rf,Dh,Vh){if(kf=+kf,Rf=Rf>>>0,!Vh){const Ag=Math.pow(2,8*Dh-1);Sh(this,kf,Rf,Dh,Ag-1,-Ag)}let Sm=0,$m=1,Km=0;for(this[Rf]=kf&255;++Sm>0)-Km&255;return Rf+Dh},vd.prototype.writeIntBE=function(kf,Rf,Dh,Vh){if(kf=+kf,Rf=Rf>>>0,!Vh){const Ag=Math.pow(2,8*Dh-1);Sh(this,kf,Rf,Dh,Ag-1,-Ag)}let Sm=Dh-1,$m=1,Km=0;for(this[Rf+Sm]=kf&255;--Sm>=0&&($m*=256);)kf<0&&Km===0&&this[Rf+Sm+1]!==0&&(Km=1),this[Rf+Sm]=(kf/$m>>0)-Km&255;return Rf+Dh},vd.prototype.writeInt8=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,1,127,-128),kf<0&&(kf=255+kf+1),this[Rf]=kf&255,Rf+1},vd.prototype.writeInt16LE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,2,32767,-32768),this[Rf]=kf&255,this[Rf+1]=kf>>>8,Rf+2},vd.prototype.writeInt16BE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,2,32767,-32768),this[Rf]=kf>>>8,this[Rf+1]=kf&255,Rf+2},vd.prototype.writeInt32LE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,4,2147483647,-2147483648),this[Rf]=kf&255,this[Rf+1]=kf>>>8,this[Rf+2]=kf>>>16,this[Rf+3]=kf>>>24,Rf+4},vd.prototype.writeInt32BE=function(kf,Rf,Dh){return kf=+kf,Rf=Rf>>>0,Dh||Sh(this,kf,Rf,4,2147483647,-2147483648),kf<0&&(kf=4294967295+kf+1),this[Rf]=kf>>>24,this[Rf+1]=kf>>>16,this[Rf+2]=kf>>>8,this[Rf+3]=kf&255,Rf+4},vd.prototype.writeBigInt64LE=rg(function(kf,Rf=0){return vh(this,kf,Rf,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),vd.prototype.writeBigInt64BE=rg(function(kf,Rf=0){return Df(this,kf,Rf,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Af(Fh,kf,Rf,Dh,Vh,Sm){if(Rf+Dh>Fh.length)throw new RangeError("Index out of range");if(Rf<0)throw new RangeError("Index out of range")}function _h(Fh,kf,Rf,Dh,Vh){return kf=+kf,Rf=Rf>>>0,Vh||Af(Fh,kf,Rf,4),rd.write(Fh,kf,Rf,Dh,23,4),Rf+4}vd.prototype.writeFloatLE=function(kf,Rf,Dh){return _h(this,kf,Rf,!0,Dh)},vd.prototype.writeFloatBE=function(kf,Rf,Dh){return _h(this,kf,Rf,!1,Dh)};function Nh(Fh,kf,Rf,Dh,Vh){return kf=+kf,Rf=Rf>>>0,Vh||Af(Fh,kf,Rf,8),rd.write(Fh,kf,Rf,Dh,52,8),Rf+8}vd.prototype.writeDoubleLE=function(kf,Rf,Dh){return Nh(this,kf,Rf,!0,Dh)},vd.prototype.writeDoubleBE=function(kf,Rf,Dh){return Nh(this,kf,Rf,!1,Dh)},vd.prototype.copy=function(kf,Rf,Dh,Vh){if(!vd.isBuffer(kf))throw new TypeError("argument should be a Buffer");if(Dh||(Dh=0),!Vh&&Vh!==0&&(Vh=this.length),Rf>=kf.length&&(Rf=kf.length),Rf||(Rf=0),Vh>0&&Vh=this.length)throw new RangeError("Index out of range");if(Vh<0)throw new RangeError("sourceEnd out of bounds");Vh>this.length&&(Vh=this.length),kf.length-Rf>>0,Dh=Dh===void 0?this.length:Dh>>>0,kf||(kf=0);let Sm;if(typeof kf=="number")for(Sm=Rf;Sm2**32?Vh=oh(String(Rf)):typeof Rf=="bigint"&&(Vh=String(Rf),(Rf>BigInt(2)**BigInt(32)||Rf<-(BigInt(2)**BigInt(32)))&&(Vh=oh(Vh)),Vh+="n"),Dh+=` It must be ${kf}. Received ${Vh}`,Dh},RangeError);function oh(Fh){let kf="",Rf=Fh.length;const Dh=Fh[0]==="-"?1:0;for(;Rf>=Dh+4;Rf-=3)kf=`_${Fh.slice(Rf-3,Rf)}${kf}`;return`${Fh.slice(0,Rf)}${kf}`}function Xh(Fh,kf,Rf){kh(kf,"offset"),(Fh[kf]===void 0||Fh[kf+Rf]===void 0)&&Zf(kf,Fh.length-(Rf+1))}function Tm(Fh,kf,Rf,Dh,Vh,Sm){if(Fh>Rf||Fh= 0${$m} and < 2${$m} ** ${(Sm+1)*8}${$m}`:Km=`>= -(2${$m} ** ${(Sm+1)*8-1}${$m}) and < 2 ** ${(Sm+1)*8-1}${$m}`,new dm.ERR_OUT_OF_RANGE("value",Km,Fh)}Xh(Dh,Vh,Sm)}function kh(Fh,kf){if(typeof Fh!="number")throw new dm.ERR_INVALID_ARG_TYPE(kf,"number",Fh)}function Zf(Fh,kf,Rf){throw Math.floor(Fh)!==Fh?(kh(Fh,Rf),new dm.ERR_OUT_OF_RANGE("offset","an integer",Fh)):kf<0?new dm.ERR_BUFFER_OUT_OF_BOUNDS:new dm.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${kf}`,Fh)}const th=/[^+/0-9A-Za-z-_]/g;function $h(Fh){if(Fh=Fh.split("=")[0],Fh=Fh.trim().replace(th,""),Fh.length<2)return"";for(;Fh.length%4!==0;)Fh=Fh+"=";return Fh}function wh(Fh,kf){kf=kf||1/0;let Rf;const Dh=Fh.length;let Vh=null;const Sm=[];for(let $m=0;$m55295&&Rf<57344){if(!Vh){if(Rf>56319){(kf-=3)>-1&&Sm.push(239,191,189);continue}else if($m+1===Dh){(kf-=3)>-1&&Sm.push(239,191,189);continue}Vh=Rf;continue}if(Rf<56320){(kf-=3)>-1&&Sm.push(239,191,189),Vh=Rf;continue}Rf=(Vh-55296<<10|Rf-56320)+65536}else Vh&&(kf-=3)>-1&&Sm.push(239,191,189);if(Vh=null,Rf<128){if((kf-=1)<0)break;Sm.push(Rf)}else if(Rf<2048){if((kf-=2)<0)break;Sm.push(Rf>>6|192,Rf&63|128)}else if(Rf<65536){if((kf-=3)<0)break;Sm.push(Rf>>12|224,Rf>>6&63|128,Rf&63|128)}else if(Rf<1114112){if((kf-=4)<0)break;Sm.push(Rf>>18|240,Rf>>12&63|128,Rf>>6&63|128,Rf&63|128)}else throw new Error("Invalid code point")}return Sm}function fm(Fh){const kf=[];for(let Rf=0;Rf>8,Vh=Rf%256,Sm.push(Vh),Sm.push(Dh);return Sm}function Mm(Fh){return qa.toByteArray($h(Fh))}function Rm(Fh,kf,Rf,Dh){let Vh;for(Vh=0;Vh=kf.length||Vh>=Fh.length);++Vh)kf[Vh+Rf]=Fh[Vh];return Vh}function tg(Fh,kf){return Fh instanceof kf||Fh!=null&&Fh.constructor!=null&&Fh.constructor.name!=null&&Fh.constructor.name===kf.name}function Fm(Fh){return Fh!==Fh}const Ym=function(){const Fh="0123456789abcdef",kf=new Array(256);for(let Rf=0;Rf<16;++Rf){const Dh=Rf*16;for(let Vh=0;Vh<16;++Vh)kf[Dh+Vh]=Fh[Rf]+Fh[Vh]}return kf}();function rg(Fh){return typeof BigInt>"u"?Eg:Fh}function Eg(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer$4=buffer$1.Buffer;function getSymbols(Ra){return Object.getOwnPropertySymbols(Ra).filter(qa=>Object.prototype.propertyIsEnumerable.call(Ra,qa))}function cloneDeepWithImpl(Ra,qa,rd,sd=new Map,pd=void 0){const fd=pd==null?void 0:pd(Ra,qa,rd,sd);if(fd!=null)return fd;if(isPrimitive(Ra))return Ra;if(sd.has(Ra))return sd.get(Ra);if(Array.isArray(Ra)){const hd=new Array(Ra.length);sd.set(Ra,hd);for(let md=0;md0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(qa){this.children=qa}}class CDATA extends NodeWithChildren{constructor(){super(...arguments),this.type=ElementType.CDATA}get nodeType(){return 4}}class Document extends NodeWithChildren{constructor(){super(...arguments),this.type=ElementType.Root}get nodeType(){return 9}}let Element$1=class extends NodeWithChildren{constructor(qa,rd,sd=[],pd=qa==="script"?ElementType.Script:qa==="style"?ElementType.Style:ElementType.Tag){super(sd),this.name=qa,this.attribs=rd,this.type=pd}get nodeType(){return 1}get tagName(){return this.name}set tagName(qa){this.name=qa}get attributes(){return Object.keys(this.attribs).map(qa=>{var rd,sd;return{name:qa,value:this.attribs[qa],namespace:(rd=this["x-attribsNamespace"])===null||rd===void 0?void 0:rd[qa],prefix:(sd=this["x-attribsPrefix"])===null||sd===void 0?void 0:sd[qa]}})}};function isTag(Ra){return isTag$1(Ra)}function isCDATA(Ra){return Ra.type===ElementType.CDATA}function isText(Ra){return Ra.type===ElementType.Text}function isComment(Ra){return Ra.type===ElementType.Comment}function isDirective(Ra){return Ra.type===ElementType.Directive}function isDocument(Ra){return Ra.type===ElementType.Root}function hasChildren(Ra){return Object.prototype.hasOwnProperty.call(Ra,"children")}function cloneNode(Ra,qa=!1){let rd;if(isText(Ra))rd=new Text(Ra.data);else if(isComment(Ra))rd=new Comment(Ra.data);else if(isTag(Ra)){const sd=qa?cloneChildren(Ra.children):[],pd=new Element$1(Ra.name,{...Ra.attribs},sd);sd.forEach(fd=>fd.parent=pd),Ra.namespace!=null&&(pd.namespace=Ra.namespace),Ra["x-attribsNamespace"]&&(pd["x-attribsNamespace"]={...Ra["x-attribsNamespace"]}),Ra["x-attribsPrefix"]&&(pd["x-attribsPrefix"]={...Ra["x-attribsPrefix"]}),rd=pd}else if(isCDATA(Ra)){const sd=qa?cloneChildren(Ra.children):[],pd=new CDATA(sd);sd.forEach(fd=>fd.parent=pd),rd=pd}else if(isDocument(Ra)){const sd=qa?cloneChildren(Ra.children):[],pd=new Document(sd);sd.forEach(fd=>fd.parent=pd),Ra["x-mode"]&&(pd["x-mode"]=Ra["x-mode"]),rd=pd}else if(isDirective(Ra)){const sd=new ProcessingInstruction(Ra.name,Ra.data);Ra["x-name"]!=null&&(sd["x-name"]=Ra["x-name"],sd["x-publicId"]=Ra["x-publicId"],sd["x-systemId"]=Ra["x-systemId"]),rd=sd}else throw new Error(`Not implemented yet: ${Ra.type}`);return rd.startIndex=Ra.startIndex,rd.endIndex=Ra.endIndex,Ra.sourceCodeLocation!=null&&(rd.sourceCodeLocation=Ra.sourceCodeLocation),rd}function cloneChildren(Ra){const qa=Ra.map(rd=>cloneNode(rd,!0));for(let rd=1;rd䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(Ra=>Ra.charCodeAt(0))),xmlDecodeTree=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(Ra=>Ra.charCodeAt(0)));var _a$2;const decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fromCodePoint=(_a$2=String.fromCodePoint)!==null&&_a$2!==void 0?_a$2:function(Ra){let qa="";return Ra>65535&&(Ra-=65536,qa+=String.fromCharCode(Ra>>>10&1023|55296),Ra=56320|Ra&1023),qa+=String.fromCharCode(Ra),qa};function replaceCodePoint(Ra){var qa;return Ra>=55296&&Ra<=57343||Ra>1114111?65533:(qa=decodeMap.get(Ra))!==null&&qa!==void 0?qa:Ra}var CharCodes$1;(function(Ra){Ra[Ra.NUM=35]="NUM",Ra[Ra.SEMI=59]="SEMI",Ra[Ra.EQUALS=61]="EQUALS",Ra[Ra.ZERO=48]="ZERO",Ra[Ra.NINE=57]="NINE",Ra[Ra.LOWER_A=97]="LOWER_A",Ra[Ra.LOWER_F=102]="LOWER_F",Ra[Ra.LOWER_X=120]="LOWER_X",Ra[Ra.LOWER_Z=122]="LOWER_Z",Ra[Ra.UPPER_A=65]="UPPER_A",Ra[Ra.UPPER_F=70]="UPPER_F",Ra[Ra.UPPER_Z=90]="UPPER_Z"})(CharCodes$1||(CharCodes$1={}));const TO_LOWER_BIT=32;var BinTrieFlags;(function(Ra){Ra[Ra.VALUE_LENGTH=49152]="VALUE_LENGTH",Ra[Ra.BRANCH_LENGTH=16256]="BRANCH_LENGTH",Ra[Ra.JUMP_TABLE=127]="JUMP_TABLE"})(BinTrieFlags||(BinTrieFlags={}));function isNumber$2(Ra){return Ra>=CharCodes$1.ZERO&&Ra<=CharCodes$1.NINE}function isHexadecimalCharacter(Ra){return Ra>=CharCodes$1.UPPER_A&&Ra<=CharCodes$1.UPPER_F||Ra>=CharCodes$1.LOWER_A&&Ra<=CharCodes$1.LOWER_F}function isAsciiAlphaNumeric$1(Ra){return Ra>=CharCodes$1.UPPER_A&&Ra<=CharCodes$1.UPPER_Z||Ra>=CharCodes$1.LOWER_A&&Ra<=CharCodes$1.LOWER_Z||isNumber$2(Ra)}function isEntityInAttributeInvalidEnd(Ra){return Ra===CharCodes$1.EQUALS||isAsciiAlphaNumeric$1(Ra)}var EntityDecoderState;(function(Ra){Ra[Ra.EntityStart=0]="EntityStart",Ra[Ra.NumericStart=1]="NumericStart",Ra[Ra.NumericDecimal=2]="NumericDecimal",Ra[Ra.NumericHex=3]="NumericHex",Ra[Ra.NamedEntity=4]="NamedEntity"})(EntityDecoderState||(EntityDecoderState={}));var DecodingMode;(function(Ra){Ra[Ra.Legacy=0]="Legacy",Ra[Ra.Strict=1]="Strict",Ra[Ra.Attribute=2]="Attribute"})(DecodingMode||(DecodingMode={}));class EntityDecoder{constructor(qa,rd,sd){this.decodeTree=qa,this.emitCodePoint=rd,this.errors=sd,this.state=EntityDecoderState.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=DecodingMode.Strict}startEntity(qa){this.decodeMode=qa,this.state=EntityDecoderState.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(qa,rd){switch(this.state){case EntityDecoderState.EntityStart:return qa.charCodeAt(rd)===CharCodes$1.NUM?(this.state=EntityDecoderState.NumericStart,this.consumed+=1,this.stateNumericStart(qa,rd+1)):(this.state=EntityDecoderState.NamedEntity,this.stateNamedEntity(qa,rd));case EntityDecoderState.NumericStart:return this.stateNumericStart(qa,rd);case EntityDecoderState.NumericDecimal:return this.stateNumericDecimal(qa,rd);case EntityDecoderState.NumericHex:return this.stateNumericHex(qa,rd);case EntityDecoderState.NamedEntity:return this.stateNamedEntity(qa,rd)}}stateNumericStart(qa,rd){return rd>=qa.length?-1:(qa.charCodeAt(rd)|TO_LOWER_BIT)===CharCodes$1.LOWER_X?(this.state=EntityDecoderState.NumericHex,this.consumed+=1,this.stateNumericHex(qa,rd+1)):(this.state=EntityDecoderState.NumericDecimal,this.stateNumericDecimal(qa,rd))}addToNumericResult(qa,rd,sd,pd){if(rd!==sd){const fd=sd-rd;this.result=this.result*Math.pow(pd,fd)+parseInt(qa.substr(rd,fd),pd),this.consumed+=fd}}stateNumericHex(qa,rd){const sd=rd;for(;rd>14;for(;rd>14,fd!==0){if(hd===CharCodes$1.SEMI)return this.emitNamedEntityData(this.treeIndex,fd,this.consumed+this.excess);this.decodeMode!==DecodingMode.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var qa;const{result:rd,decodeTree:sd}=this,pd=(sd[rd]&BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(rd,pd,this.consumed),(qa=this.errors)===null||qa===void 0||qa.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(qa,rd,sd){const{decodeTree:pd}=this;return this.emitCodePoint(rd===1?pd[qa]&~BinTrieFlags.VALUE_LENGTH:pd[qa+1],sd),rd===3&&this.emitCodePoint(pd[qa+2],sd),sd}end(){var qa;switch(this.state){case EntityDecoderState.NamedEntity:return this.result!==0&&(this.decodeMode!==DecodingMode.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case EntityDecoderState.NumericDecimal:return this.emitNumericEntity(0,2);case EntityDecoderState.NumericHex:return this.emitNumericEntity(0,3);case EntityDecoderState.NumericStart:return(qa=this.errors)===null||qa===void 0||qa.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case EntityDecoderState.EntityStart:return 0}}}function getDecoder(Ra){let qa="";const rd=new EntityDecoder(Ra,sd=>qa+=fromCodePoint(sd));return function(pd,fd){let hd=0,md=0;for(;(md=pd.indexOf("&",md))>=0;){qa+=pd.slice(hd,md),rd.startEntity(fd);const yd=rd.write(pd,md+1);if(yd<0){hd=md+rd.end();break}hd=md+yd,md=yd===0?hd+1:hd}const gd=qa+pd.slice(hd);return qa="",gd}}function determineBranch(Ra,qa,rd,sd){const pd=(qa&BinTrieFlags.BRANCH_LENGTH)>>7,fd=qa&BinTrieFlags.JUMP_TABLE;if(pd===0)return fd!==0&&sd===fd?rd:-1;if(fd){const gd=sd-fd;return gd<0||gd>=pd?-1:Ra[rd+gd]-1}let hd=rd,md=hd+pd-1;for(;hd<=md;){const gd=hd+md>>>1,yd=Ra[gd];if(ydsd)md=gd-1;else return Ra[gd+pd]}return-1}getDecoder(htmlDecodeTree);getDecoder(xmlDecodeTree);const xmlReplacer=/["&'<>$\x80-\uFFFF]/g,xmlCodeMap=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),getCodePoint=String.prototype.codePointAt!=null?(Ra,qa)=>Ra.codePointAt(qa):(Ra,qa)=>(Ra.charCodeAt(qa)&64512)===55296?(Ra.charCodeAt(qa)-55296)*1024+Ra.charCodeAt(qa+1)-56320+65536:Ra.charCodeAt(qa);function encodeXML(Ra){let qa="",rd=0,sd;for(;(sd=xmlReplacer.exec(Ra))!==null;){const pd=sd.index,fd=Ra.charCodeAt(pd),hd=xmlCodeMap.get(fd);hd!==void 0?(qa+=Ra.substring(rd,pd)+hd,rd=pd+1):(qa+=`${Ra.substring(rd,pd)}&#x${getCodePoint(Ra,pd).toString(16)};`,rd=xmlReplacer.lastIndex+=+((fd&64512)===55296))}return qa+Ra.substr(rd)}function getEscaper(Ra,qa){return function(sd){let pd,fd=0,hd="";for(;pd=Ra.exec(sd);)fd!==pd.index&&(hd+=sd.substring(fd,pd.index)),hd+=qa.get(pd[0].charCodeAt(0)),fd=pd.index+1;return hd+sd.substring(fd)}}const escapeAttribute=getEscaper(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),escapeText=getEscaper(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(Ra=>[Ra.toLowerCase(),Ra])),attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(Ra=>[Ra.toLowerCase(),Ra])),unencodedElements=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function replaceQuotes(Ra){return Ra.replace(/"/g,""")}function formatAttributes(Ra,qa){var rd;if(!Ra)return;const sd=((rd=qa.encodeEntities)!==null&&rd!==void 0?rd:qa.decodeEntities)===!1?replaceQuotes:qa.xmlMode||qa.encodeEntities!=="utf8"?encodeXML:escapeAttribute;return Object.keys(Ra).map(pd=>{var fd,hd;const md=(fd=Ra[pd])!==null&&fd!==void 0?fd:"";return qa.xmlMode==="foreign"&&(pd=(hd=attributeNames.get(pd))!==null&&hd!==void 0?hd:pd),!qa.emptyAttrs&&!qa.xmlMode&&md===""?pd:`${pd}="${sd(md)}"`}).join(" ")}const singleTag=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function render$3(Ra,qa={}){const rd="length"in Ra?Ra:[Ra];let sd="";for(let pd=0;pd0&&(sd+=render$3(Ra.children,qa)),(qa.xmlMode||!singleTag.has(Ra.name))&&(sd+=``)),sd}function renderDirective(Ra){return`<${Ra.data}>`}function renderText(Ra,qa){var rd;let sd=Ra.data||"";return((rd=qa.encodeEntities)!==null&&rd!==void 0?rd:qa.decodeEntities)!==!1&&!(!qa.xmlMode&&Ra.parent&&unencodedElements.has(Ra.parent.name))&&(sd=qa.xmlMode||qa.encodeEntities!=="utf8"?encodeXML(sd):escapeText(sd)),sd}function renderCdata(Ra){return``}function renderComment(Ra){return``}function getOuterHTML(Ra,qa){return render$3(Ra,qa)}function getInnerHTML(Ra,qa){return hasChildren(Ra)?Ra.children.map(rd=>getOuterHTML(rd,qa)).join(""):""}function getText(Ra){return Array.isArray(Ra)?Ra.map(getText).join(""):isTag(Ra)?Ra.name==="br"?` -`:getText(Ra.children):isCDATA(Ra)?getText(Ra.children):isText(Ra)?Ra.data:""}function textContent(Ra){return Array.isArray(Ra)?Ra.map(textContent).join(""):hasChildren(Ra)&&!isComment(Ra)?textContent(Ra.children):isText(Ra)?Ra.data:""}function innerText(Ra){return Array.isArray(Ra)?Ra.map(innerText).join(""):hasChildren(Ra)&&(Ra.type===ElementType.Tag||isCDATA(Ra))?innerText(Ra.children):isText(Ra)?Ra.data:""}function getChildren(Ra){return hasChildren(Ra)?Ra.children:[]}function getParent(Ra){return Ra.parent||null}function getSiblings(Ra){const qa=getParent(Ra);if(qa!=null)return getChildren(qa);const rd=[Ra];let{prev:sd,next:pd}=Ra;for(;sd!=null;)rd.unshift(sd),{prev:sd}=sd;for(;pd!=null;)rd.push(pd),{next:pd}=pd;return rd}function getAttributeValue(Ra,qa){var rd;return(rd=Ra.attribs)===null||rd===void 0?void 0:rd[qa]}function hasAttrib(Ra,qa){return Ra.attribs!=null&&Object.prototype.hasOwnProperty.call(Ra.attribs,qa)&&Ra.attribs[qa]!=null}function getName(Ra){return Ra.name}function nextElementSibling(Ra){let{next:qa}=Ra;for(;qa!==null&&!isTag(qa);)({next:qa}=qa);return qa}function prevElementSibling(Ra){let{prev:qa}=Ra;for(;qa!==null&&!isTag(qa);)({prev:qa}=qa);return qa}function removeElement(Ra){if(Ra.prev&&(Ra.prev.next=Ra.next),Ra.next&&(Ra.next.prev=Ra.prev),Ra.parent){const qa=Ra.parent.children,rd=qa.lastIndexOf(Ra);rd>=0&&qa.splice(rd,1)}Ra.next=null,Ra.prev=null,Ra.parent=null}function replaceElement(Ra,qa){const rd=qa.prev=Ra.prev;rd&&(rd.next=qa);const sd=qa.next=Ra.next;sd&&(sd.prev=qa);const pd=qa.parent=Ra.parent;if(pd){const fd=pd.children;fd[fd.lastIndexOf(Ra)]=qa,Ra.parent=null}}function appendChild(Ra,qa){if(removeElement(qa),qa.next=null,qa.parent=Ra,Ra.children.push(qa)>1){const rd=Ra.children[Ra.children.length-2];rd.next=qa,qa.prev=rd}else qa.prev=null}function append$3(Ra,qa){removeElement(qa);const{parent:rd}=Ra,sd=Ra.next;if(qa.next=sd,qa.prev=Ra,Ra.next=qa,qa.parent=rd,sd){if(sd.prev=qa,rd){const pd=rd.children;pd.splice(pd.lastIndexOf(sd),0,qa)}}else rd&&rd.children.push(qa)}function prependChild(Ra,qa){if(removeElement(qa),qa.parent=Ra,qa.prev=null,Ra.children.unshift(qa)!==1){const rd=Ra.children[1];rd.prev=qa,qa.next=rd}else qa.next=null}function prepend$1(Ra,qa){removeElement(qa);const{parent:rd}=Ra;if(rd){const sd=rd.children;sd.splice(sd.indexOf(Ra),0,qa)}Ra.prev&&(Ra.prev.next=qa),qa.parent=rd,qa.prev=Ra.prev,qa.next=Ra,Ra.prev=qa}function filter$5(Ra,qa,rd=!0,sd=1/0){return find$3(Ra,Array.isArray(qa)?qa:[qa],rd,sd)}function find$3(Ra,qa,rd,sd){const pd=[],fd=[Array.isArray(qa)?qa:[qa]],hd=[0];for(;;){if(hd[0]>=fd[0].length){if(hd.length===1)return pd;fd.shift(),hd.shift();continue}const md=fd[0][hd[0]++];if(Ra(md)&&(pd.push(md),--sd<=0))return pd;rd&&hasChildren(md)&&md.children.length>0&&(hd.unshift(0),fd.unshift(md.children))}}function findOneChild(Ra,qa){return qa.find(Ra)}function findOne(Ra,qa,rd=!0){const sd=Array.isArray(qa)?qa:[qa];for(let pd=0;pd0){const hd=findOne(Ra,fd.children,!0);if(hd)return hd}}return null}function existsOne(Ra,qa){return(Array.isArray(qa)?qa:[qa]).some(rd=>isTag(rd)&&Ra(rd)||hasChildren(rd)&&existsOne(Ra,rd.children))}function findAll(Ra,qa){const rd=[],sd=[Array.isArray(qa)?qa:[qa]],pd=[0];for(;;){if(pd[0]>=sd[0].length){if(sd.length===1)return rd;sd.shift(),pd.shift();continue}const fd=sd[0][pd[0]++];isTag(fd)&&Ra(fd)&&rd.push(fd),hasChildren(fd)&&fd.children.length>0&&(pd.unshift(0),sd.unshift(fd.children))}}const Checks={tag_name(Ra){return typeof Ra=="function"?qa=>isTag(qa)&&Ra(qa.name):Ra==="*"?isTag:qa=>isTag(qa)&&qa.name===Ra},tag_type(Ra){return typeof Ra=="function"?qa=>Ra(qa.type):qa=>qa.type===Ra},tag_contains(Ra){return typeof Ra=="function"?qa=>isText(qa)&&Ra(qa.data):qa=>isText(qa)&&qa.data===Ra}};function getAttribCheck(Ra,qa){return typeof qa=="function"?rd=>isTag(rd)&&qa(rd.attribs[Ra]):rd=>isTag(rd)&&rd.attribs[Ra]===qa}function combineFuncs(Ra,qa){return rd=>Ra(rd)||qa(rd)}function compileTest(Ra){const qa=Object.keys(Ra).map(rd=>{const sd=Ra[rd];return Object.prototype.hasOwnProperty.call(Checks,rd)?Checks[rd](sd):getAttribCheck(rd,sd)});return qa.length===0?null:qa.reduce(combineFuncs)}function testElement(Ra,qa){const rd=compileTest(Ra);return rd?rd(qa):!0}function getElements(Ra,qa,rd,sd=1/0){const pd=compileTest(Ra);return pd?filter$5(pd,qa,rd,sd):[]}function getElementById(Ra,qa,rd=!0){return Array.isArray(qa)||(qa=[qa]),findOne(getAttribCheck("id",Ra),qa,rd)}function getElementsByTagName(Ra,qa,rd=!0,sd=1/0){return filter$5(Checks.tag_name(Ra),qa,rd,sd)}function getElementsByClassName(Ra,qa,rd=!0,sd=1/0){return filter$5(getAttribCheck("class",Ra),qa,rd,sd)}function getElementsByTagType(Ra,qa,rd=!0,sd=1/0){return filter$5(Checks.tag_type(Ra),qa,rd,sd)}function removeSubsets(Ra){let qa=Ra.length;for(;--qa>=0;){const rd=Ra[qa];if(qa>0&&Ra.lastIndexOf(rd,qa-1)>=0){Ra.splice(qa,1);continue}for(let sd=rd.parent;sd;sd=sd.parent)if(Ra.includes(sd)){Ra.splice(qa,1);break}}return Ra}var DocumentPosition$1;(function(Ra){Ra[Ra.DISCONNECTED=1]="DISCONNECTED",Ra[Ra.PRECEDING=2]="PRECEDING",Ra[Ra.FOLLOWING=4]="FOLLOWING",Ra[Ra.CONTAINS=8]="CONTAINS",Ra[Ra.CONTAINED_BY=16]="CONTAINED_BY"})(DocumentPosition$1||(DocumentPosition$1={}));function compareDocumentPosition(Ra,qa){const rd=[],sd=[];if(Ra===qa)return 0;let pd=hasChildren(Ra)?Ra:Ra.parent;for(;pd;)rd.unshift(pd),pd=pd.parent;for(pd=hasChildren(qa)?qa:qa.parent;pd;)sd.unshift(pd),pd=pd.parent;const fd=Math.min(rd.length,sd.length);let hd=0;for(;hdgd.indexOf(vd)?md===qa?DocumentPosition$1.FOLLOWING|DocumentPosition$1.CONTAINED_BY:DocumentPosition$1.FOLLOWING:md===Ra?DocumentPosition$1.PRECEDING|DocumentPosition$1.CONTAINS:DocumentPosition$1.PRECEDING}function uniqueSort(Ra){return Ra=Ra.filter((qa,rd,sd)=>!sd.includes(qa,rd+1)),Ra.sort((qa,rd)=>{const sd=compareDocumentPosition(qa,rd);return sd&DocumentPosition$1.PRECEDING?-1:sd&DocumentPosition$1.FOLLOWING?1:0}),Ra}function getFeed(Ra){const qa=getOneElement(isValidFeed,Ra);return qa?qa.name==="feed"?getAtomFeed(qa):getRssFeed(qa):null}function getAtomFeed(Ra){var qa;const rd=Ra.children,sd={type:"atom",items:getElementsByTagName("entry",rd).map(hd=>{var md;const{children:gd}=hd,yd={media:getMediaElements(gd)};addConditionally(yd,"id","id",gd),addConditionally(yd,"title","title",gd);const vd=(md=getOneElement("link",gd))===null||md===void 0?void 0:md.attribs.href;vd&&(yd.link=vd);const Nd=fetch$1("summary",gd)||fetch$1("content",gd);Nd&&(yd.description=Nd);const Md=fetch$1("updated",gd);return Md&&(yd.pubDate=new Date(Md)),yd})};addConditionally(sd,"id","id",rd),addConditionally(sd,"title","title",rd);const pd=(qa=getOneElement("link",rd))===null||qa===void 0?void 0:qa.attribs.href;pd&&(sd.link=pd),addConditionally(sd,"description","subtitle",rd);const fd=fetch$1("updated",rd);return fd&&(sd.updated=new Date(fd)),addConditionally(sd,"author","email",rd,!0),sd}function getRssFeed(Ra){var qa,rd;const sd=(rd=(qa=getOneElement("channel",Ra.children))===null||qa===void 0?void 0:qa.children)!==null&&rd!==void 0?rd:[],pd={type:Ra.name.substr(0,3),id:"",items:getElementsByTagName("item",Ra.children).map(hd=>{const{children:md}=hd,gd={media:getMediaElements(md)};addConditionally(gd,"id","guid",md),addConditionally(gd,"title","title",md),addConditionally(gd,"link","link",md),addConditionally(gd,"description","description",md);const yd=fetch$1("pubDate",md)||fetch$1("dc:date",md);return yd&&(gd.pubDate=new Date(yd)),gd})};addConditionally(pd,"title","title",sd),addConditionally(pd,"link","link",sd),addConditionally(pd,"description","description",sd);const fd=fetch$1("lastBuildDate",sd);return fd&&(pd.updated=new Date(fd)),addConditionally(pd,"author","managingEditor",sd,!0),pd}const MEDIA_KEYS_STRING=["url","type","lang"],MEDIA_KEYS_INT=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function getMediaElements(Ra){return getElementsByTagName("media:content",Ra).map(qa=>{const{attribs:rd}=qa,sd={medium:rd.medium,isDefault:!!rd.isDefault};for(const pd of MEDIA_KEYS_STRING)rd[pd]&&(sd[pd]=rd[pd]);for(const pd of MEDIA_KEYS_INT)rd[pd]&&(sd[pd]=parseInt(rd[pd],10));return rd.expression&&(sd.expression=rd.expression),sd})}function getOneElement(Ra,qa){return getElementsByTagName(Ra,qa,!0,1)[0]}function fetch$1(Ra,qa,rd=!1){return textContent(getElementsByTagName(Ra,qa,rd,1)).trim()}function addConditionally(Ra,qa,rd,sd,pd=!1){const fd=fetch$1(rd,sd,pd);fd&&(Ra[qa]=fd)}function isValidFeed(Ra){return Ra==="rss"||Ra==="feed"||Ra==="rdf:RDF"}const DomUtils=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return DocumentPosition$1},append:append$3,appendChild,compareDocumentPosition,existsOne,filter:filter$5,find:find$3,findAll,findOne,findOneChild,getAttributeValue,getChildren,getElementById,getElements,getElementsByClassName,getElementsByTagName,getElementsByTagType,getFeed,getInnerHTML,getName,getOuterHTML,getParent,getSiblings,getText,hasAttrib,hasChildren,innerText,isCDATA,isComment,isDocument,isTag,isText,nextElementSibling,prepend:prepend$1,prependChild,prevElementSibling,removeElement,removeSubsets,replaceElement,testElement,textContent,uniqueSort},Symbol.toStringTag,{value:"Module"})),defaultOpts$1={_useHtmlParser2:!1};function flattenOptions(Ra,qa){if(!Ra)return qa??defaultOpts$1;const rd={_useHtmlParser2:!!Ra.xmlMode,...qa,...Ra};return Ra.xml?(rd._useHtmlParser2=!0,rd.xmlMode=!0,Ra.xml!==!0&&Object.assign(rd,Ra.xml)):Ra.xmlMode&&(rd._useHtmlParser2=!0),rd}function render$2(Ra,qa,rd){return Ra?Ra(qa??Ra._root.children,null,void 0,rd).toString():""}function isOptions(Ra,qa){return typeof Ra=="object"&&Ra!=null&&!("length"in Ra)&&!("type"in Ra)}function html$5(Ra,qa){const rd=isOptions(Ra)?(qa=Ra,void 0):Ra,sd={...this===null||this===void 0?void 0:this._options,...flattenOptions(qa)};return render$2(this,rd,sd)}function xml$4(Ra){const qa={...this._options,xmlMode:!0};return render$2(this,Ra,qa)}function text$3(Ra){const qa=Ra??(this?this.root():[]);let rd="";for(let sd=0;sdrd.toUpperCase())}function cssCase(Ra){return Ra.replace(/[A-Z]/g,"-$&").toLowerCase()}function domEach(Ra,qa){const rd=Ra.length;for(let sd=0;sdRa.length-3)return!1;const rd=Ra.charCodeAt(qa+1);return(rd>=CharacterCodes.LowerA&&rd<=CharacterCodes.LowerZ||rd>=CharacterCodes.UpperA&&rd<=CharacterCodes.UpperZ||rd===CharacterCodes.Exclamation)&&Ra.includes(">",qa+2)}const hasOwn$2=Object.prototype.hasOwnProperty,rspace=/\s+/,dataAttrPrefix="data-",rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,rbrace=/^{[^]*}$|^\[[^]*]$/;function getAttr$1(Ra,qa,rd){var sd;if(!(!Ra||!isTag(Ra))){if((sd=Ra.attribs)!==null&&sd!==void 0||(Ra.attribs={}),!qa)return Ra.attribs;if(hasOwn$2.call(Ra.attribs,qa))return!rd&&rboolean.test(qa)?qa:Ra.attribs[qa];if(Ra.name==="option"&&qa==="value")return text$3(Ra.children);if(Ra.name==="input"&&(Ra.attribs.type==="radio"||Ra.attribs.type==="checkbox")&&qa==="value")return"on"}}function setAttr(Ra,qa,rd){rd===null?removeAttribute(Ra,qa):Ra.attribs[qa]=`${rd}`}function attr(Ra,qa){if(typeof Ra=="object"||qa!==void 0){if(typeof qa=="function"){if(typeof Ra!="string")throw new Error("Bad combination of arguments.");return domEach(this,(rd,sd)=>{isTag(rd)&&setAttr(rd,Ra,qa.call(rd,sd,rd.attribs[Ra]))})}return domEach(this,rd=>{if(isTag(rd))if(typeof Ra=="object")for(const sd of Object.keys(Ra)){const pd=Ra[sd];setAttr(rd,sd,pd)}else setAttr(rd,Ra,qa)})}return arguments.length>1?this:getAttr$1(this[0],Ra,this.options.xmlMode)}function getProp(Ra,qa,rd){return qa in Ra?Ra[qa]:!rd&&rboolean.test(qa)?getAttr$1(Ra,qa,!1)!==void 0:getAttr$1(Ra,qa,rd)}function setProp(Ra,qa,rd,sd){qa in Ra?Ra[qa]=rd:setAttr(Ra,qa,!sd&&rboolean.test(qa)?rd?"":null:`${rd}`)}function prop(Ra,qa){var rd;if(typeof Ra=="string"&&qa===void 0){const sd=this[0];if(!sd||!isTag(sd))return;switch(Ra){case"style":{const pd=this.css(),fd=Object.keys(pd);for(let hd=0;hd").parent().html();case"innerHTML":return this.html();default:return getProp(sd,Ra,this.options.xmlMode)}}if(typeof Ra=="object"||qa!==void 0){if(typeof qa=="function"){if(typeof Ra=="object")throw new TypeError("Bad combination of arguments.");return domEach(this,(sd,pd)=>{isTag(sd)&&setProp(sd,Ra,qa.call(sd,pd,getProp(sd,Ra,this.options.xmlMode)),this.options.xmlMode)})}return domEach(this,sd=>{if(isTag(sd))if(typeof Ra=="object")for(const pd of Object.keys(Ra)){const fd=Ra[pd];setProp(sd,pd,fd,this.options.xmlMode)}else setProp(sd,Ra,qa,this.options.xmlMode)})}}function setData(Ra,qa,rd){var sd;(sd=Ra.data)!==null&&sd!==void 0||(Ra.data={}),typeof qa=="object"?Object.assign(Ra.data,qa):typeof qa=="string"&&rd!==void 0&&(Ra.data[qa]=rd)}function readAllData(Ra){for(const qa of Object.keys(Ra.attribs)){if(!qa.startsWith(dataAttrPrefix))continue;const rd=camelCase$1(qa.slice(dataAttrPrefix.length));hasOwn$2.call(Ra.data,rd)||(Ra.data[rd]=parseDataValue(Ra.attribs[qa]))}return Ra.data}function readData(Ra,qa){const rd=dataAttrPrefix+cssCase(qa),sd=Ra.data;if(hasOwn$2.call(sd,qa))return sd[qa];if(hasOwn$2.call(Ra.attribs,rd))return sd[qa]=parseDataValue(Ra.attribs[rd])}function parseDataValue(Ra){if(Ra==="null")return null;if(Ra==="true")return!0;if(Ra==="false")return!1;const qa=Number(Ra);if(Ra===String(qa))return qa;if(rbrace.test(Ra))try{return JSON.parse(Ra)}catch{}return Ra}function data(Ra,qa){var rd;const sd=this[0];if(!sd||!isTag(sd))return;const pd=sd;return(rd=pd.data)!==null&&rd!==void 0||(pd.data={}),Ra==null?readAllData(pd):typeof Ra=="object"||qa!==void 0?(domEach(this,fd=>{isTag(fd)&&(typeof Ra=="object"?setData(fd,Ra):setData(fd,Ra,qa))}),this):readData(pd,Ra)}function val$1(Ra){const qa=arguments.length===0,rd=this[0];if(!rd||!isTag(rd))return qa?void 0:this;switch(rd.name){case"textarea":return this.text(Ra);case"select":{const sd=this.find("option:selected");if(!qa){if(this.attr("multiple")==null&&typeof Ra=="object")return this;this.find("option").removeAttr("selected");const pd=typeof Ra=="object"?Ra:[Ra];for(const fd of pd)this.find(`option[value="${fd}"]`).attr("selected","");return this}return this.attr("multiple")?sd.toArray().map(pd=>text$3(pd.children)):sd.attr("value")}case"input":case"option":return qa?this.attr("value"):this.attr("value",Ra)}}function removeAttribute(Ra,qa){!Ra.attribs||!hasOwn$2.call(Ra.attribs,qa)||delete Ra.attribs[qa]}function splitNames(Ra){return Ra?Ra.trim().split(rspace):[]}function removeAttr(Ra){const qa=splitNames(Ra);for(const rd of qa)domEach(this,sd=>{isTag(sd)&&removeAttribute(sd,rd)});return this}function hasClass(Ra){return this.toArray().some(qa=>{const rd=isTag(qa)&&qa.attribs.class;let sd=-1;if(rd&&Ra.length>0)for(;(sd=rd.indexOf(Ra,sd+1))>-1;){const pd=sd+Ra.length;if((sd===0||rspace.test(rd[sd-1]))&&(pd===rd.length||rspace.test(rd[pd])))return!0}return!1})}function addClass(Ra){if(typeof Ra=="function")return domEach(this,(sd,pd)=>{if(isTag(sd)){const fd=sd.attribs.class||"";addClass.call([sd],Ra.call(sd,pd,fd))}});if(!Ra||typeof Ra!="string")return this;const qa=Ra.split(rspace),rd=this.length;for(let sd=0;sd{isTag(pd)&&removeClass.call([pd],Ra.call(pd,fd,pd.attribs.class||""))});const qa=splitNames(Ra),rd=qa.length,sd=arguments.length===0;return domEach(this,pd=>{if(isTag(pd))if(sd)pd.attribs.class="";else{const fd=splitNames(pd.attribs.class);let hd=!1;for(let md=0;md=0&&(fd.splice(gd,1),hd=!0,md--)}hd&&(pd.attribs.class=fd.join(" "))}})}function toggleClass(Ra,qa){if(typeof Ra=="function")return domEach(this,(hd,md)=>{isTag(hd)&&toggleClass.call([hd],Ra.call(hd,md,hd.attribs.class||"",qa),qa)});if(!Ra||typeof Ra!="string")return this;const rd=Ra.split(rspace),sd=rd.length,pd=typeof qa=="boolean"?qa?1:-1:0,fd=this.length;for(let hd=0;hd=0&&vd<0?gd.push(rd[yd]):pd<=0&&vd>=0&&gd.splice(vd,1)}md.attribs.class=gd.join(" ")}return this}const Attributes=Object.freeze(Object.defineProperty({__proto__:null,addClass,attr,data,hasClass,prop,removeAttr,removeClass,toggleClass,val:val$1},Symbol.toStringTag,{value:"Module"}));var SelectorType$2;(function(Ra){Ra.Attribute="attribute",Ra.Pseudo="pseudo",Ra.PseudoElement="pseudo-element",Ra.Tag="tag",Ra.Universal="universal",Ra.Adjacent="adjacent",Ra.Child="child",Ra.Descendant="descendant",Ra.Parent="parent",Ra.Sibling="sibling",Ra.ColumnCombinator="column-combinator"})(SelectorType$2||(SelectorType$2={}));var AttributeAction;(function(Ra){Ra.Any="any",Ra.Element="element",Ra.End="end",Ra.Equals="equals",Ra.Exists="exists",Ra.Hyphen="hyphen",Ra.Not="not",Ra.Start="start"})(AttributeAction||(AttributeAction={}));const reName=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,reEscape=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,actionTypes=new Map([[126,AttributeAction.Element],[94,AttributeAction.Start],[36,AttributeAction.End],[42,AttributeAction.Any],[33,AttributeAction.Not],[124,AttributeAction.Hyphen]]),unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal$1(Ra){switch(Ra.type){case SelectorType$2.Adjacent:case SelectorType$2.Child:case SelectorType$2.Descendant:case SelectorType$2.Parent:case SelectorType$2.Sibling:case SelectorType$2.ColumnCombinator:return!0;default:return!1}}const stripQuotesFromPseudos=new Set(["contains","icontains"]);function funescape(Ra,qa,rd){const sd=parseInt(qa,16)-65536;return sd!==sd||rd?qa:sd<0?String.fromCharCode(sd+65536):String.fromCharCode(sd>>10|55296,sd&1023|56320)}function unescapeCSS(Ra){return Ra.replace(reEscape,funescape)}function isQuote(Ra){return Ra===39||Ra===34}function isWhitespace$4(Ra){return Ra===32||Ra===9||Ra===10||Ra===12||Ra===13}function parse$8(Ra){const qa=[],rd=parseSelector(qa,`${Ra}`,0);if(rd0&&rd0&&isTraversal$1(sd[sd.length-1]))throw new Error("Did not expect successive traversals.")}function yd(Md){if(sd.length>0&&sd[sd.length-1].type===SelectorType$2.Descendant){sd[sd.length-1].type=Md;return}gd(),sd.push({type:Md})}function vd(Md,Ld){sd.push({type:SelectorType$2.Attribute,name:Md,action:Ld,value:pd(1),namespace:null,ignoreCase:"quirks"})}function Nd(){if(sd.length&&sd[sd.length-1].type===SelectorType$2.Descendant&&sd.pop(),sd.length===0)throw new Error("Empty sub-selector");Ra.push(sd)}if(fd(0),qa.length===rd)return rd;e:for(;rd=0&&sd>=1)):Ra.type===SelectorType$2.Pseudo&&(Ra.data?Ra.name==="has"||Ra.name==="contains"?sd=0:Array.isArray(Ra.data)?(sd=Math.min(...Ra.data.map(pd=>Math.min(...pd.map(getProcedure)))),sd<0&&(sd=0)):sd=2:sd=3),sd}const reChars=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(Ra){return Ra.replace(reChars,"\\$&")}const caseInsensitiveAttributes=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function shouldIgnoreCase(Ra,qa){return typeof Ra.ignoreCase=="boolean"?Ra.ignoreCase:Ra.ignoreCase==="quirks"?!!qa.quirksMode:!qa.xmlMode&&caseInsensitiveAttributes.has(Ra.name)}const attributeRules={equals(Ra,qa,rd){const{adapter:sd}=rd,{name:pd}=qa;let{value:fd}=qa;return shouldIgnoreCase(qa,rd)?(fd=fd.toLowerCase(),hd=>{const md=sd.getAttributeValue(hd,pd);return md!=null&&md.length===fd.length&&md.toLowerCase()===fd&&Ra(hd)}):hd=>sd.getAttributeValue(hd,pd)===fd&&Ra(hd)},hyphen(Ra,qa,rd){const{adapter:sd}=rd,{name:pd}=qa;let{value:fd}=qa;const hd=fd.length;return shouldIgnoreCase(qa,rd)?(fd=fd.toLowerCase(),function(gd){const yd=sd.getAttributeValue(gd,pd);return yd!=null&&(yd.length===hd||yd.charAt(hd)==="-")&&yd.substr(0,hd).toLowerCase()===fd&&Ra(gd)}):function(gd){const yd=sd.getAttributeValue(gd,pd);return yd!=null&&(yd.length===hd||yd.charAt(hd)==="-")&&yd.substr(0,hd)===fd&&Ra(gd)}},element(Ra,qa,rd){const{adapter:sd}=rd,{name:pd,value:fd}=qa;if(/\s/.test(fd))return boolbase$1.falseFunc;const hd=new RegExp(`(?:^|\\s)${escapeRegex(fd)}(?:$|\\s)`,shouldIgnoreCase(qa,rd)?"i":"");return function(gd){const yd=sd.getAttributeValue(gd,pd);return yd!=null&&yd.length>=fd.length&&hd.test(yd)&&Ra(gd)}},exists(Ra,{name:qa},{adapter:rd}){return sd=>rd.hasAttrib(sd,qa)&&Ra(sd)},start(Ra,qa,rd){const{adapter:sd}=rd,{name:pd}=qa;let{value:fd}=qa;const hd=fd.length;return hd===0?boolbase$1.falseFunc:shouldIgnoreCase(qa,rd)?(fd=fd.toLowerCase(),md=>{const gd=sd.getAttributeValue(md,pd);return gd!=null&&gd.length>=hd&&gd.substr(0,hd).toLowerCase()===fd&&Ra(md)}):md=>{var gd;return!!(!((gd=sd.getAttributeValue(md,pd))===null||gd===void 0)&&gd.startsWith(fd))&&Ra(md)}},end(Ra,qa,rd){const{adapter:sd}=rd,{name:pd}=qa;let{value:fd}=qa;const hd=-fd.length;return hd===0?boolbase$1.falseFunc:shouldIgnoreCase(qa,rd)?(fd=fd.toLowerCase(),md=>{var gd;return((gd=sd.getAttributeValue(md,pd))===null||gd===void 0?void 0:gd.substr(hd).toLowerCase())===fd&&Ra(md)}):md=>{var gd;return!!(!((gd=sd.getAttributeValue(md,pd))===null||gd===void 0)&&gd.endsWith(fd))&&Ra(md)}},any(Ra,qa,rd){const{adapter:sd}=rd,{name:pd,value:fd}=qa;if(fd==="")return boolbase$1.falseFunc;if(shouldIgnoreCase(qa,rd)){const hd=new RegExp(escapeRegex(fd),"i");return function(gd){const yd=sd.getAttributeValue(gd,pd);return yd!=null&&yd.length>=fd.length&&hd.test(yd)&&Ra(gd)}}return hd=>{var md;return!!(!((md=sd.getAttributeValue(hd,pd))===null||md===void 0)&&md.includes(fd))&&Ra(hd)}},not(Ra,qa,rd){const{adapter:sd}=rd,{name:pd}=qa;let{value:fd}=qa;return fd===""?hd=>!!sd.getAttributeValue(hd,pd)&&Ra(hd):shouldIgnoreCase(qa,rd)?(fd=fd.toLowerCase(),hd=>{const md=sd.getAttributeValue(hd,pd);return(md==null||md.length!==fd.length||md.toLowerCase()!==fd)&&Ra(hd)}):hd=>sd.getAttributeValue(hd,pd)!==fd&&Ra(hd)}},whitespace$1=new Set([9,10,12,13,32]),ZERO=48,NINE=57;function parse$7(Ra){if(Ra=Ra.trim().toLowerCase(),Ra==="even")return[2,0];if(Ra==="odd")return[2,1];let qa=0,rd=0,sd=fd(),pd=hd();if(qa=ZERO&&Ra.charCodeAt(qa)<=NINE;)yd=yd*10+(Ra.charCodeAt(qa)-ZERO),qa++;return qa===gd?null:yd}function md(){for(;qafd<=rd;if(qa===0)return fd=>fd===rd;if(qa===1)return rd<0?boolbase$1.trueFunc:fd=>fd>=rd;const sd=Math.abs(qa),pd=(rd%sd+sd)%sd;return qa>1?fd=>fd>=rd&&fd%sd===pd:fd=>fd<=rd&&fd%sd===pd}function nthCheck(Ra){return compile$1(parse$7(Ra))}function getChildFunc(Ra,qa){return rd=>{const sd=qa.getParent(rd);return sd!=null&&qa.isTag(sd)&&Ra(rd)}}const filters={contains(Ra,qa,{adapter:rd}){return function(pd){return Ra(pd)&&rd.getText(pd).includes(qa)}},icontains(Ra,qa,{adapter:rd}){const sd=qa.toLowerCase();return function(fd){return Ra(fd)&&rd.getText(fd).toLowerCase().includes(sd)}},"nth-child"(Ra,qa,{adapter:rd,equals:sd}){const pd=nthCheck(qa);return pd===boolbase$1.falseFunc?boolbase$1.falseFunc:pd===boolbase$1.trueFunc?getChildFunc(Ra,rd):function(hd){const md=rd.getSiblings(hd);let gd=0;for(let yd=0;yd=0&&!sd(hd,md[yd]);yd--)rd.isTag(md[yd])&&gd++;return pd(gd)&&Ra(hd)}},"nth-of-type"(Ra,qa,{adapter:rd,equals:sd}){const pd=nthCheck(qa);return pd===boolbase$1.falseFunc?boolbase$1.falseFunc:pd===boolbase$1.trueFunc?getChildFunc(Ra,rd):function(hd){const md=rd.getSiblings(hd);let gd=0;for(let yd=0;yd=0;yd--){const vd=md[yd];if(sd(hd,vd))break;rd.isTag(vd)&&rd.getName(vd)===rd.getName(hd)&&gd++}return pd(gd)&&Ra(hd)}},root(Ra,qa,{adapter:rd}){return sd=>{const pd=rd.getParent(sd);return(pd==null||!rd.isTag(pd))&&Ra(sd)}},scope(Ra,qa,rd,sd){const{equals:pd}=rd;return!sd||sd.length===0?filters.root(Ra,qa,rd):sd.length===1?fd=>pd(sd[0],fd)&&Ra(fd):fd=>sd.includes(fd)&&Ra(fd)},hover:dynamicStatePseudo("isHovered"),visited:dynamicStatePseudo("isVisited"),active:dynamicStatePseudo("isActive")};function dynamicStatePseudo(Ra){return function(rd,sd,{adapter:pd}){const fd=pd[Ra];return typeof fd!="function"?boolbase$1.falseFunc:function(md){return fd(md)&&rd(md)}}}const pseudos={empty(Ra,{adapter:qa}){return!qa.getChildren(Ra).some(rd=>qa.isTag(rd)||qa.getText(rd)!=="")},"first-child"(Ra,{adapter:qa,equals:rd}){if(qa.prevElementSibling)return qa.prevElementSibling(Ra)==null;const sd=qa.getSiblings(Ra).find(pd=>qa.isTag(pd));return sd!=null&&rd(Ra,sd)},"last-child"(Ra,{adapter:qa,equals:rd}){const sd=qa.getSiblings(Ra);for(let pd=sd.length-1;pd>=0;pd--){if(rd(Ra,sd[pd]))return!0;if(qa.isTag(sd[pd]))break}return!1},"first-of-type"(Ra,{adapter:qa,equals:rd}){const sd=qa.getSiblings(Ra),pd=qa.getName(Ra);for(let fd=0;fd=0;fd--){const hd=sd[fd];if(rd(Ra,hd))return!0;if(qa.isTag(hd)&&qa.getName(hd)===pd)break}return!1},"only-of-type"(Ra,{adapter:qa,equals:rd}){const sd=qa.getName(Ra);return qa.getSiblings(Ra).every(pd=>rd(Ra,pd)||!qa.isTag(pd)||qa.getName(pd)!==sd)},"only-child"(Ra,{adapter:qa,equals:rd}){return qa.getSiblings(Ra).every(sd=>rd(Ra,sd)||!qa.isTag(sd))}};function verifyPseudoArgs(Ra,qa,rd,sd){if(rd===null){if(Ra.length>sd)throw new Error(`Pseudo-class :${qa} requires an argument`)}else if(Ra.length===sd)throw new Error(`Pseudo-class :${qa} doesn't have any arguments`)}const aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( + */(function(Ra){const ed=base64Js$1,ud=ieee754$1,dd=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ra.Buffer=wd,Ra.SlowBuffer=Jd,Ra.INSPECT_MAX_BYTES=50;const hd=2147483647;Ra.kMaxLength=hd;const{Uint8Array:md,ArrayBuffer:gd,SharedArrayBuffer:yd}=globalThis;wd.TYPED_ARRAY_SUPPORT=vd(),!wd.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function vd(){try{const jh=new md(1),Pf={foo:function(){return 42}};return Object.setPrototypeOf(Pf,md.prototype),Object.setPrototypeOf(jh,Pf),jh.foo()===42}catch{return!1}}Object.defineProperty(wd.prototype,"parent",{enumerable:!0,get:function(){if(wd.isBuffer(this))return this.buffer}}),Object.defineProperty(wd.prototype,"offset",{enumerable:!0,get:function(){if(wd.isBuffer(this))return this.byteOffset}});function Cd(jh){if(jh>hd)throw new RangeError('The value "'+jh+'" is invalid for option "size"');const Pf=new md(jh);return Object.setPrototypeOf(Pf,wd.prototype),Pf}function wd(jh,Pf,$f){if(typeof jh=="number"){if(typeof Pf=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return jd(jh)}return Nd(jh,Pf,$f)}wd.poolSize=8192;function Nd(jh,Pf,$f){if(typeof jh=="string")return Gd(jh,Pf);if(gd.isView(jh))return zd(jh);if(jh==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof jh);if(Zm(jh,gd)||jh&&Zm(jh.buffer,gd)||typeof yd<"u"&&(Zm(jh,yd)||jh&&Zm(jh.buffer,yd)))return qd(jh,Pf,$f);if(typeof jh=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Nh=jh.valueOf&&jh.valueOf();if(Nh!=null&&Nh!==jh)return wd.from(Nh,Pf,$f);const Wh=Wd(jh);if(Wh)return Wh;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof jh[Symbol.toPrimitive]=="function")return wd.from(jh[Symbol.toPrimitive]("string"),Pf,$f);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof jh)}wd.from=function(jh,Pf,$f){return Nd(jh,Pf,$f)},Object.setPrototypeOf(wd.prototype,md.prototype),Object.setPrototypeOf(wd,md);function Ld(jh){if(typeof jh!="number")throw new TypeError('"size" argument must be of type number');if(jh<0)throw new RangeError('The value "'+jh+'" is invalid for option "size"')}function Ud(jh,Pf,$f){return Ld(jh),jh<=0?Cd(jh):Pf!==void 0?typeof $f=="string"?Cd(jh).fill(Pf,$f):Cd(jh).fill(Pf):Cd(jh)}wd.alloc=function(jh,Pf,$f){return Ud(jh,Pf,$f)};function jd(jh){return Ld(jh),Cd(jh<0?0:Xd(jh)|0)}wd.allocUnsafe=function(jh){return jd(jh)},wd.allocUnsafeSlow=function(jh){return jd(jh)};function Gd(jh,Pf){if((typeof Pf!="string"||Pf==="")&&(Pf="utf8"),!wd.isEncoding(Pf))throw new TypeError("Unknown encoding: "+Pf);const $f=Zd(jh,Pf)|0;let Nh=Cd($f);const Wh=Nh.write(jh,Pf);return Wh!==$f&&(Nh=Nh.slice(0,Wh)),Nh}function Yd(jh){const Pf=jh.length<0?0:Xd(jh.length)|0,$f=Cd(Pf);for(let Nh=0;Nh=hd)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+hd.toString(16)+" bytes");return jh|0}function Jd(jh){return+jh!=jh&&(jh=0),wd.alloc(+jh)}wd.isBuffer=function(Pf){return Pf!=null&&Pf._isBuffer===!0&&Pf!==wd.prototype},wd.compare=function(Pf,$f){if(Zm(Pf,md)&&(Pf=wd.from(Pf,Pf.offset,Pf.byteLength)),Zm($f,md)&&($f=wd.from($f,$f.offset,$f.byteLength)),!wd.isBuffer(Pf)||!wd.isBuffer($f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Pf===$f)return 0;let Nh=Pf.length,Wh=$f.length;for(let _m=0,$m=Math.min(Nh,Wh);_m<$m;++_m)if(Pf[_m]!==$f[_m]){Nh=Pf[_m],Wh=$f[_m];break}return NhWh.length?(wd.isBuffer($m)||($m=wd.from($m)),$m.copy(Wh,_m)):md.prototype.set.call(Wh,$m,_m);else if(wd.isBuffer($m))$m.copy(Wh,_m);else throw new TypeError('"list" argument must be an Array of Buffers');_m+=$m.length}return Wh};function Zd(jh,Pf){if(wd.isBuffer(jh))return jh.length;if(gd.isView(jh)||Zm(jh,gd))return jh.byteLength;if(typeof jh!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof jh);const $f=jh.length,Nh=arguments.length>2&&arguments[2]===!0;if(!Nh&&$f===0)return 0;let Wh=!1;for(;;)switch(Pf){case"ascii":case"latin1":case"binary":return $f;case"utf8":case"utf-8":return Ih(jh).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $f*2;case"hex":return $f>>>1;case"base64":return Om(jh).length;default:if(Wh)return Nh?-1:Ih(jh).length;Pf=(""+Pf).toLowerCase(),Wh=!0}}wd.byteLength=Zd;function mf(jh,Pf,$f){let Nh=!1;if((Pf===void 0||Pf<0)&&(Pf=0),Pf>this.length||(($f===void 0||$f>this.length)&&($f=this.length),$f<=0)||($f>>>=0,Pf>>>=0,$f<=Pf))return"";for(jh||(jh="utf8");;)switch(jh){case"hex":return lh(this,Pf,$f);case"utf8":case"utf-8":return Ff(this,Pf,$f);case"ascii":return yh(this,Pf,$f);case"latin1":case"binary":return Mh(this,Pf,$f);case"base64":return If(this,Pf,$f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rh(this,Pf,$f);default:if(Nh)throw new TypeError("Unknown encoding: "+jh);jh=(jh+"").toLowerCase(),Nh=!0}}wd.prototype._isBuffer=!0;function xf(jh,Pf,$f){const Nh=jh[Pf];jh[Pf]=jh[$f],jh[$f]=Nh}wd.prototype.swap16=function(){const Pf=this.length;if(Pf%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let $f=0;$f$f&&(Pf+=" ... "),""},dd&&(wd.prototype[dd]=wd.prototype.inspect),wd.prototype.compare=function(Pf,$f,Nh,Wh,_m){if(Zm(Pf,md)&&(Pf=wd.from(Pf,Pf.offset,Pf.byteLength)),!wd.isBuffer(Pf))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Pf);if($f===void 0&&($f=0),Nh===void 0&&(Nh=Pf?Pf.length:0),Wh===void 0&&(Wh=0),_m===void 0&&(_m=this.length),$f<0||Nh>Pf.length||Wh<0||_m>this.length)throw new RangeError("out of range index");if(Wh>=_m&&$f>=Nh)return 0;if(Wh>=_m)return-1;if($f>=Nh)return 1;if($f>>>=0,Nh>>>=0,Wh>>>=0,_m>>>=0,this===Pf)return 0;let $m=_m-Wh,Ym=Nh-$f;const Ag=Math.min($m,Ym),sg=this.slice(Wh,_m),mg=Pf.slice($f,Nh);for(let vg=0;vg2147483647?$f=2147483647:$f<-2147483648&&($f=-2147483648),$f=+$f,Lm($f)&&($f=Wh?0:jh.length-1),$f<0&&($f=jh.length+$f),$f>=jh.length){if(Wh)return-1;$f=jh.length-1}else if($f<0)if(Wh)$f=0;else return-1;if(typeof Pf=="string"&&(Pf=wd.from(Pf,Nh)),wd.isBuffer(Pf))return Pf.length===0?-1:vf(jh,Pf,$f,Nh,Wh);if(typeof Pf=="number")return Pf=Pf&255,typeof md.prototype.indexOf=="function"?Wh?md.prototype.indexOf.call(jh,Pf,$f):md.prototype.lastIndexOf.call(jh,Pf,$f):vf(jh,[Pf],$f,Nh,Wh);throw new TypeError("val must be string, number or Buffer")}function vf(jh,Pf,$f,Nh,Wh){let _m=1,$m=jh.length,Ym=Pf.length;if(Nh!==void 0&&(Nh=String(Nh).toLowerCase(),Nh==="ucs2"||Nh==="ucs-2"||Nh==="utf16le"||Nh==="utf-16le")){if(jh.length<2||Pf.length<2)return-1;_m=2,$m/=2,Ym/=2,$f/=2}function Ag(mg,vg){return _m===1?mg[vg]:mg.readUInt16BE(vg*_m)}let sg;if(Wh){let mg=-1;for(sg=$f;sg<$m;sg++)if(Ag(jh,sg)===Ag(Pf,mg===-1?0:sg-mg)){if(mg===-1&&(mg=sg),sg-mg+1===Ym)return mg*_m}else mg!==-1&&(sg-=sg-mg),mg=-1}else for($f+Ym>$m&&($f=$m-Ym),sg=$f;sg>=0;sg--){let mg=!0;for(let vg=0;vgWh&&(Nh=Wh)):Nh=Wh;const _m=Pf.length;Nh>_m/2&&(Nh=_m/2);let $m;for($m=0;$m>>0,isFinite(Nh)?(Nh=Nh>>>0,Wh===void 0&&(Wh="utf8")):(Wh=Nh,Nh=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const _m=this.length-$f;if((Nh===void 0||Nh>_m)&&(Nh=_m),Pf.length>0&&(Nh<0||$f<0)||$f>this.length)throw new RangeError("Attempt to write outside buffer bounds");Wh||(Wh="utf8");let $m=!1;for(;;)switch(Wh){case"hex":return gf(this,Pf,$f,Nh);case"utf8":case"utf-8":return Af(this,Pf,$f,Nh);case"ascii":case"latin1":case"binary":return Df(this,Pf,$f,Nh);case"base64":return Of(this,Pf,$f,Nh);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Cf(this,Pf,$f,Nh);default:if($m)throw new TypeError("Unknown encoding: "+Wh);Wh=(""+Wh).toLowerCase(),$m=!0}},wd.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function If(jh,Pf,$f){return Pf===0&&$f===jh.length?ed.fromByteArray(jh):ed.fromByteArray(jh.slice(Pf,$f))}function Ff(jh,Pf,$f){$f=Math.min(jh.length,$f);const Nh=[];let Wh=Pf;for(;Wh<$f;){const _m=jh[Wh];let $m=null,Ym=_m>239?4:_m>223?3:_m>191?2:1;if(Wh+Ym<=$f){let Ag,sg,mg,vg;switch(Ym){case 1:_m<128&&($m=_m);break;case 2:Ag=jh[Wh+1],(Ag&192)===128&&(vg=(_m&31)<<6|Ag&63,vg>127&&($m=vg));break;case 3:Ag=jh[Wh+1],sg=jh[Wh+2],(Ag&192)===128&&(sg&192)===128&&(vg=(_m&15)<<12|(Ag&63)<<6|sg&63,vg>2047&&(vg<55296||vg>57343)&&($m=vg));break;case 4:Ag=jh[Wh+1],sg=jh[Wh+2],mg=jh[Wh+3],(Ag&192)===128&&(sg&192)===128&&(mg&192)===128&&(vg=(_m&15)<<18|(Ag&63)<<12|(sg&63)<<6|mg&63,vg>65535&&vg<1114112&&($m=vg))}}$m===null?($m=65533,Ym=1):$m>65535&&($m-=65536,Nh.push($m>>>10&1023|55296),$m=56320|$m&1023),Nh.push($m),Wh+=Ym}return Sh(Nh)}const sh=4096;function Sh(jh){const Pf=jh.length;if(Pf<=sh)return String.fromCharCode.apply(String,jh);let $f="",Nh=0;for(;NhNh)&&($f=Nh);let Wh="";for(let _m=Pf;_m<$f;++_m)Wh+=Wm[jh[_m]];return Wh}function rh(jh,Pf,$f){const Nh=jh.slice(Pf,$f);let Wh="";for(let _m=0;_mNh&&(Pf=Nh),$f<0?($f+=Nh,$f<0&&($f=0)):$f>Nh&&($f=Nh),$f$f)throw new RangeError("Trying to access beyond buffer length")}wd.prototype.readUintLE=wd.prototype.readUIntLE=function(Pf,$f,Nh){Pf=Pf>>>0,$f=$f>>>0,Nh||mh(Pf,$f,this.length);let Wh=this[Pf],_m=1,$m=0;for(;++$m<$f&&(_m*=256);)Wh+=this[Pf+$m]*_m;return Wh},wd.prototype.readUintBE=wd.prototype.readUIntBE=function(Pf,$f,Nh){Pf=Pf>>>0,$f=$f>>>0,Nh||mh(Pf,$f,this.length);let Wh=this[Pf+--$f],_m=1;for(;$f>0&&(_m*=256);)Wh+=this[Pf+--$f]*_m;return Wh},wd.prototype.readUint8=wd.prototype.readUInt8=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,1,this.length),this[Pf]},wd.prototype.readUint16LE=wd.prototype.readUInt16LE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,2,this.length),this[Pf]|this[Pf+1]<<8},wd.prototype.readUint16BE=wd.prototype.readUInt16BE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,2,this.length),this[Pf]<<8|this[Pf+1]},wd.prototype.readUint32LE=wd.prototype.readUInt32LE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,4,this.length),(this[Pf]|this[Pf+1]<<8|this[Pf+2]<<16)+this[Pf+3]*16777216},wd.prototype.readUint32BE=wd.prototype.readUInt32BE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,4,this.length),this[Pf]*16777216+(this[Pf+1]<<16|this[Pf+2]<<8|this[Pf+3])},wd.prototype.readBigUInt64LE=ig(function(Pf){Pf=Pf>>>0,$h(Pf,"offset");const $f=this[Pf],Nh=this[Pf+7];($f===void 0||Nh===void 0)&&Vf(Pf,this.length-8);const Wh=$f+this[++Pf]*2**8+this[++Pf]*2**16+this[++Pf]*2**24,_m=this[++Pf]+this[++Pf]*2**8+this[++Pf]*2**16+Nh*2**24;return BigInt(Wh)+(BigInt(_m)<>>0,$h(Pf,"offset");const $f=this[Pf],Nh=this[Pf+7];($f===void 0||Nh===void 0)&&Vf(Pf,this.length-8);const Wh=$f*2**24+this[++Pf]*2**16+this[++Pf]*2**8+this[++Pf],_m=this[++Pf]*2**24+this[++Pf]*2**16+this[++Pf]*2**8+Nh;return(BigInt(Wh)<>>0,$f=$f>>>0,Nh||mh(Pf,$f,this.length);let Wh=this[Pf],_m=1,$m=0;for(;++$m<$f&&(_m*=256);)Wh+=this[Pf+$m]*_m;return _m*=128,Wh>=_m&&(Wh-=Math.pow(2,8*$f)),Wh},wd.prototype.readIntBE=function(Pf,$f,Nh){Pf=Pf>>>0,$f=$f>>>0,Nh||mh(Pf,$f,this.length);let Wh=$f,_m=1,$m=this[Pf+--Wh];for(;Wh>0&&(_m*=256);)$m+=this[Pf+--Wh]*_m;return _m*=128,$m>=_m&&($m-=Math.pow(2,8*$f)),$m},wd.prototype.readInt8=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,1,this.length),this[Pf]&128?(255-this[Pf]+1)*-1:this[Pf]},wd.prototype.readInt16LE=function(Pf,$f){Pf=Pf>>>0,$f||mh(Pf,2,this.length);const Nh=this[Pf]|this[Pf+1]<<8;return Nh&32768?Nh|4294901760:Nh},wd.prototype.readInt16BE=function(Pf,$f){Pf=Pf>>>0,$f||mh(Pf,2,this.length);const Nh=this[Pf+1]|this[Pf]<<8;return Nh&32768?Nh|4294901760:Nh},wd.prototype.readInt32LE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,4,this.length),this[Pf]|this[Pf+1]<<8|this[Pf+2]<<16|this[Pf+3]<<24},wd.prototype.readInt32BE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,4,this.length),this[Pf]<<24|this[Pf+1]<<16|this[Pf+2]<<8|this[Pf+3]},wd.prototype.readBigInt64LE=ig(function(Pf){Pf=Pf>>>0,$h(Pf,"offset");const $f=this[Pf],Nh=this[Pf+7];($f===void 0||Nh===void 0)&&Vf(Pf,this.length-8);const Wh=this[Pf+4]+this[Pf+5]*2**8+this[Pf+6]*2**16+(Nh<<24);return(BigInt(Wh)<>>0,$h(Pf,"offset");const $f=this[Pf],Nh=this[Pf+7];($f===void 0||Nh===void 0)&&Vf(Pf,this.length-8);const Wh=($f<<24)+this[++Pf]*2**16+this[++Pf]*2**8+this[++Pf];return(BigInt(Wh)<>>0,$f||mh(Pf,4,this.length),ud.read(this,Pf,!0,23,4)},wd.prototype.readFloatBE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,4,this.length),ud.read(this,Pf,!1,23,4)},wd.prototype.readDoubleLE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,8,this.length),ud.read(this,Pf,!0,52,8)},wd.prototype.readDoubleBE=function(Pf,$f){return Pf=Pf>>>0,$f||mh(Pf,8,this.length),ud.read(this,Pf,!1,52,8)};function xh(jh,Pf,$f,Nh,Wh,_m){if(!wd.isBuffer(jh))throw new TypeError('"buffer" argument must be a Buffer instance');if(Pf>Wh||Pf<_m)throw new RangeError('"value" argument is out of bounds');if($f+Nh>jh.length)throw new RangeError("Index out of range")}wd.prototype.writeUintLE=wd.prototype.writeUIntLE=function(Pf,$f,Nh,Wh){if(Pf=+Pf,$f=$f>>>0,Nh=Nh>>>0,!Wh){const Ym=Math.pow(2,8*Nh)-1;xh(this,Pf,$f,Nh,Ym,0)}let _m=1,$m=0;for(this[$f]=Pf&255;++$m>>0,Nh=Nh>>>0,!Wh){const Ym=Math.pow(2,8*Nh)-1;xh(this,Pf,$f,Nh,Ym,0)}let _m=Nh-1,$m=1;for(this[$f+_m]=Pf&255;--_m>=0&&($m*=256);)this[$f+_m]=Pf/$m&255;return $f+Nh},wd.prototype.writeUint8=wd.prototype.writeUInt8=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,1,255,0),this[$f]=Pf&255,$f+1},wd.prototype.writeUint16LE=wd.prototype.writeUInt16LE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,2,65535,0),this[$f]=Pf&255,this[$f+1]=Pf>>>8,$f+2},wd.prototype.writeUint16BE=wd.prototype.writeUInt16BE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,2,65535,0),this[$f]=Pf>>>8,this[$f+1]=Pf&255,$f+2},wd.prototype.writeUint32LE=wd.prototype.writeUInt32LE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,4,4294967295,0),this[$f+3]=Pf>>>24,this[$f+2]=Pf>>>16,this[$f+1]=Pf>>>8,this[$f]=Pf&255,$f+4},wd.prototype.writeUint32BE=wd.prototype.writeUInt32BE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,4,4294967295,0),this[$f]=Pf>>>24,this[$f+1]=Pf>>>16,this[$f+2]=Pf>>>8,this[$f+3]=Pf&255,$f+4};function Eh(jh,Pf,$f,Nh,Wh){Sm(Pf,Nh,Wh,jh,$f,7);let _m=Number(Pf&BigInt(4294967295));jh[$f++]=_m,_m=_m>>8,jh[$f++]=_m,_m=_m>>8,jh[$f++]=_m,_m=_m>>8,jh[$f++]=_m;let $m=Number(Pf>>BigInt(32)&BigInt(4294967295));return jh[$f++]=$m,$m=$m>>8,jh[$f++]=$m,$m=$m>>8,jh[$f++]=$m,$m=$m>>8,jh[$f++]=$m,$f}function kf(jh,Pf,$f,Nh,Wh){Sm(Pf,Nh,Wh,jh,$f,7);let _m=Number(Pf&BigInt(4294967295));jh[$f+7]=_m,_m=_m>>8,jh[$f+6]=_m,_m=_m>>8,jh[$f+5]=_m,_m=_m>>8,jh[$f+4]=_m;let $m=Number(Pf>>BigInt(32)&BigInt(4294967295));return jh[$f+3]=$m,$m=$m>>8,jh[$f+2]=$m,$m=$m>>8,jh[$f+1]=$m,$m=$m>>8,jh[$f]=$m,$f+8}wd.prototype.writeBigUInt64LE=ig(function(Pf,$f=0){return Eh(this,Pf,$f,BigInt(0),BigInt("0xffffffffffffffff"))}),wd.prototype.writeBigUInt64BE=ig(function(Pf,$f=0){return kf(this,Pf,$f,BigInt(0),BigInt("0xffffffffffffffff"))}),wd.prototype.writeIntLE=function(Pf,$f,Nh,Wh){if(Pf=+Pf,$f=$f>>>0,!Wh){const Ag=Math.pow(2,8*Nh-1);xh(this,Pf,$f,Nh,Ag-1,-Ag)}let _m=0,$m=1,Ym=0;for(this[$f]=Pf&255;++_m>0)-Ym&255;return $f+Nh},wd.prototype.writeIntBE=function(Pf,$f,Nh,Wh){if(Pf=+Pf,$f=$f>>>0,!Wh){const Ag=Math.pow(2,8*Nh-1);xh(this,Pf,$f,Nh,Ag-1,-Ag)}let _m=Nh-1,$m=1,Ym=0;for(this[$f+_m]=Pf&255;--_m>=0&&($m*=256);)Pf<0&&Ym===0&&this[$f+_m+1]!==0&&(Ym=1),this[$f+_m]=(Pf/$m>>0)-Ym&255;return $f+Nh},wd.prototype.writeInt8=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,1,127,-128),Pf<0&&(Pf=255+Pf+1),this[$f]=Pf&255,$f+1},wd.prototype.writeInt16LE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,2,32767,-32768),this[$f]=Pf&255,this[$f+1]=Pf>>>8,$f+2},wd.prototype.writeInt16BE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,2,32767,-32768),this[$f]=Pf>>>8,this[$f+1]=Pf&255,$f+2},wd.prototype.writeInt32LE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,4,2147483647,-2147483648),this[$f]=Pf&255,this[$f+1]=Pf>>>8,this[$f+2]=Pf>>>16,this[$f+3]=Pf>>>24,$f+4},wd.prototype.writeInt32BE=function(Pf,$f,Nh){return Pf=+Pf,$f=$f>>>0,Nh||xh(this,Pf,$f,4,2147483647,-2147483648),Pf<0&&(Pf=4294967295+Pf+1),this[$f]=Pf>>>24,this[$f+1]=Pf>>>16,this[$f+2]=Pf>>>8,this[$f+3]=Pf&255,$f+4},wd.prototype.writeBigInt64LE=ig(function(Pf,$f=0){return Eh(this,Pf,$f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),wd.prototype.writeBigInt64BE=ig(function(Pf,$f=0){return kf(this,Pf,$f,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Rf(jh,Pf,$f,Nh,Wh,_m){if($f+Nh>jh.length)throw new RangeError("Index out of range");if($f<0)throw new RangeError("Index out of range")}function _h(jh,Pf,$f,Nh,Wh){return Pf=+Pf,$f=$f>>>0,Wh||Rf(jh,Pf,$f,4),ud.write(jh,Pf,$f,Nh,23,4),$f+4}wd.prototype.writeFloatLE=function(Pf,$f,Nh){return _h(this,Pf,$f,!0,Nh)},wd.prototype.writeFloatBE=function(Pf,$f,Nh){return _h(this,Pf,$f,!1,Nh)};function Ph(jh,Pf,$f,Nh,Wh){return Pf=+Pf,$f=$f>>>0,Wh||Rf(jh,Pf,$f,8),ud.write(jh,Pf,$f,Nh,52,8),$f+8}wd.prototype.writeDoubleLE=function(Pf,$f,Nh){return Ph(this,Pf,$f,!0,Nh)},wd.prototype.writeDoubleBE=function(Pf,$f,Nh){return Ph(this,Pf,$f,!1,Nh)},wd.prototype.copy=function(Pf,$f,Nh,Wh){if(!wd.isBuffer(Pf))throw new TypeError("argument should be a Buffer");if(Nh||(Nh=0),!Wh&&Wh!==0&&(Wh=this.length),$f>=Pf.length&&($f=Pf.length),$f||($f=0),Wh>0&&Wh=this.length)throw new RangeError("Index out of range");if(Wh<0)throw new RangeError("sourceEnd out of bounds");Wh>this.length&&(Wh=this.length),Pf.length-$f>>0,Nh=Nh===void 0?this.length:Nh>>>0,Pf||(Pf=0);let _m;if(typeof Pf=="number")for(_m=$f;_m2**32?Wh=oh(String($f)):typeof $f=="bigint"&&(Wh=String($f),($f>BigInt(2)**BigInt(32)||$f<-(BigInt(2)**BigInt(32)))&&(Wh=oh(Wh)),Wh+="n"),Nh+=` It must be ${Pf}. Received ${Wh}`,Nh},RangeError);function oh(jh){let Pf="",$f=jh.length;const Nh=jh[0]==="-"?1:0;for(;$f>=Nh+4;$f-=3)Pf=`_${jh.slice($f-3,$f)}${Pf}`;return`${jh.slice(0,$f)}${Pf}`}function Zh(jh,Pf,$f){$h(Pf,"offset"),(jh[Pf]===void 0||jh[Pf+$f]===void 0)&&Vf(Pf,jh.length-($f+1))}function Sm(jh,Pf,$f,Nh,Wh,_m){if(jh>$f||jh= 0${$m} and < 2${$m} ** ${(_m+1)*8}${$m}`:Ym=`>= -(2${$m} ** ${(_m+1)*8-1}${$m}) and < 2 ** ${(_m+1)*8-1}${$m}`,new sm.ERR_OUT_OF_RANGE("value",Ym,jh)}Zh(Nh,Wh,_m)}function $h(jh,Pf){if(typeof jh!="number")throw new sm.ERR_INVALID_ARG_TYPE(Pf,"number",jh)}function Vf(jh,Pf,$f){throw Math.floor(jh)!==jh?($h(jh,$f),new sm.ERR_OUT_OF_RANGE("offset","an integer",jh)):Pf<0?new sm.ERR_BUFFER_OUT_OF_BOUNDS:new sm.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Pf}`,jh)}const nh=/[^+/0-9A-Za-z-_]/g;function Lh(jh){if(jh=jh.split("=")[0],jh=jh.trim().replace(nh,""),jh.length<2)return"";for(;jh.length%4!==0;)jh=jh+"=";return jh}function Ih(jh,Pf){Pf=Pf||1/0;let $f;const Nh=jh.length;let Wh=null;const _m=[];for(let $m=0;$m55295&&$f<57344){if(!Wh){if($f>56319){(Pf-=3)>-1&&_m.push(239,191,189);continue}else if($m+1===Nh){(Pf-=3)>-1&&_m.push(239,191,189);continue}Wh=$f;continue}if($f<56320){(Pf-=3)>-1&&_m.push(239,191,189),Wh=$f;continue}$f=(Wh-55296<<10|$f-56320)+65536}else Wh&&(Pf-=3)>-1&&_m.push(239,191,189);if(Wh=null,$f<128){if((Pf-=1)<0)break;_m.push($f)}else if($f<2048){if((Pf-=2)<0)break;_m.push($f>>6|192,$f&63|128)}else if($f<65536){if((Pf-=3)<0)break;_m.push($f>>12|224,$f>>6&63|128,$f&63|128)}else if($f<1114112){if((Pf-=4)<0)break;_m.push($f>>18|240,$f>>12&63|128,$f>>6&63|128,$f&63|128)}else throw new Error("Invalid code point")}return _m}function om(jh){const Pf=[];for(let $f=0;$f>8,Wh=$f%256,_m.push(Wh),_m.push(Nh);return _m}function Om(jh){return ed.toByteArray(Lh(jh))}function Im(jh,Pf,$f,Nh){let Wh;for(Wh=0;Wh=Pf.length||Wh>=jh.length);++Wh)Pf[Wh+$f]=jh[Wh];return Wh}function Zm(jh,Pf){return jh instanceof Pf||jh!=null&&jh.constructor!=null&&jh.constructor.name!=null&&jh.constructor.name===Pf.name}function Lm(jh){return jh!==jh}const Wm=function(){const jh="0123456789abcdef",Pf=new Array(256);for(let $f=0;$f<16;++$f){const Nh=$f*16;for(let Wh=0;Wh<16;++Wh)Pf[Nh+Wh]=jh[$f]+jh[Wh]}return Pf}();function ig(jh){return typeof BigInt>"u"?yg:jh}function yg(){throw new Error("BigInt not supported")}})(buffer$1);const Buffer$4=buffer$1.Buffer;function getSymbols(Ra){return Object.getOwnPropertySymbols(Ra).filter(ed=>Object.prototype.propertyIsEnumerable.call(Ra,ed))}function getTag$3(Ra){return Ra==null?Ra===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(Ra)}const regexpTag$1="[object RegExp]",stringTag$1="[object String]",numberTag$1="[object Number]",booleanTag="[object Boolean]",argumentsTag="[object Arguments]",symbolTag="[object Symbol]",dateTag$1="[object Date]",mapTag$3="[object Map]",setTag$3="[object Set]",arrayTag$1="[object Array]",arrayBufferTag$1="[object ArrayBuffer]",objectTag$3="[object Object]",dataViewTag$2="[object DataView]",uint8ArrayTag="[object Uint8Array]",uint8ClampedArrayTag="[object Uint8ClampedArray]",uint16ArrayTag="[object Uint16Array]",uint32ArrayTag="[object Uint32Array]",int8ArrayTag="[object Int8Array]",int16ArrayTag="[object Int16Array]",int32ArrayTag="[object Int32Array]",float32ArrayTag="[object Float32Array]",float64ArrayTag="[object Float64Array]";function cloneDeepWithImpl(Ra,ed,ud,dd=new Map,hd=void 0){const md=hd==null?void 0:hd(Ra,ed,ud,dd);if(md!=null)return md;if(isPrimitive(Ra))return Ra;if(dd.has(Ra))return dd.get(Ra);if(Array.isArray(Ra)){const gd=new Array(Ra.length);dd.set(Ra,gd);for(let yd=0;yd0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(ed){this.children=ed}}class CDATA extends NodeWithChildren{constructor(){super(...arguments),this.type=ElementType.CDATA}get nodeType(){return 4}}class Document extends NodeWithChildren{constructor(){super(...arguments),this.type=ElementType.Root}get nodeType(){return 9}}let Element$1=class extends NodeWithChildren{constructor(ed,ud,dd=[],hd=ed==="script"?ElementType.Script:ed==="style"?ElementType.Style:ElementType.Tag){super(dd),this.name=ed,this.attribs=ud,this.type=hd}get nodeType(){return 1}get tagName(){return this.name}set tagName(ed){this.name=ed}get attributes(){return Object.keys(this.attribs).map(ed=>{var ud,dd;return{name:ed,value:this.attribs[ed],namespace:(ud=this["x-attribsNamespace"])===null||ud===void 0?void 0:ud[ed],prefix:(dd=this["x-attribsPrefix"])===null||dd===void 0?void 0:dd[ed]}})}};function isTag(Ra){return isTag$1(Ra)}function isCDATA(Ra){return Ra.type===ElementType.CDATA}function isText(Ra){return Ra.type===ElementType.Text}function isComment$1(Ra){return Ra.type===ElementType.Comment}function isDirective(Ra){return Ra.type===ElementType.Directive}function isDocument(Ra){return Ra.type===ElementType.Root}function hasChildren(Ra){return Object.prototype.hasOwnProperty.call(Ra,"children")}function cloneNode(Ra,ed=!1){let ud;if(isText(Ra))ud=new Text(Ra.data);else if(isComment$1(Ra))ud=new Comment(Ra.data);else if(isTag(Ra)){const dd=ed?cloneChildren(Ra.children):[],hd=new Element$1(Ra.name,{...Ra.attribs},dd);dd.forEach(md=>md.parent=hd),Ra.namespace!=null&&(hd.namespace=Ra.namespace),Ra["x-attribsNamespace"]&&(hd["x-attribsNamespace"]={...Ra["x-attribsNamespace"]}),Ra["x-attribsPrefix"]&&(hd["x-attribsPrefix"]={...Ra["x-attribsPrefix"]}),ud=hd}else if(isCDATA(Ra)){const dd=ed?cloneChildren(Ra.children):[],hd=new CDATA(dd);dd.forEach(md=>md.parent=hd),ud=hd}else if(isDocument(Ra)){const dd=ed?cloneChildren(Ra.children):[],hd=new Document(dd);dd.forEach(md=>md.parent=hd),Ra["x-mode"]&&(hd["x-mode"]=Ra["x-mode"]),ud=hd}else if(isDirective(Ra)){const dd=new ProcessingInstruction(Ra.name,Ra.data);Ra["x-name"]!=null&&(dd["x-name"]=Ra["x-name"],dd["x-publicId"]=Ra["x-publicId"],dd["x-systemId"]=Ra["x-systemId"]),ud=dd}else throw new Error(`Not implemented yet: ${Ra.type}`);return ud.startIndex=Ra.startIndex,ud.endIndex=Ra.endIndex,Ra.sourceCodeLocation!=null&&(ud.sourceCodeLocation=Ra.sourceCodeLocation),ud}function cloneChildren(Ra){const ed=Ra.map(ud=>cloneNode(ud,!0));for(let ud=1;ud䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(function(Ra){return Ra.charCodeAt(0)}));var decodeDataXml={};Object.defineProperty(decodeDataXml,"__esModule",{value:!0});decodeDataXml.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(Ra){return Ra.charCodeAt(0)}));var decode_codepoint={};(function(Ra){var ed;Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.replaceCodePoint=Ra.fromCodePoint=void 0;var ud=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);Ra.fromCodePoint=(ed=String.fromCodePoint)!==null&&ed!==void 0?ed:function(md){var gd="";return md>65535&&(md-=65536,gd+=String.fromCharCode(md>>>10&1023|55296),md=56320|md&1023),gd+=String.fromCharCode(md),gd};function dd(md){var gd;return md>=55296&&md<=57343||md>1114111?65533:(gd=ud.get(md))!==null&&gd!==void 0?gd:md}Ra.replaceCodePoint=dd;function hd(md){return(0,Ra.fromCodePoint)(dd(md))}Ra.default=hd})(decode_codepoint);(function(Ra){var ed=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(gf,Af,Df,Of){Of===void 0&&(Of=Df);var Cf=Object.getOwnPropertyDescriptor(Af,Df);(!Cf||("get"in Cf?!Af.__esModule:Cf.writable||Cf.configurable))&&(Cf={enumerable:!0,get:function(){return Af[Df]}}),Object.defineProperty(gf,Of,Cf)}:function(gf,Af,Df,Of){Of===void 0&&(Of=Df),gf[Of]=Af[Df]}),ud=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(gf,Af){Object.defineProperty(gf,"default",{enumerable:!0,value:Af})}:function(gf,Af){gf.default=Af}),dd=commonjsGlobal&&commonjsGlobal.__importStar||function(gf){if(gf&&gf.__esModule)return gf;var Af={};if(gf!=null)for(var Df in gf)Df!=="default"&&Object.prototype.hasOwnProperty.call(gf,Df)&&ed(Af,gf,Df);return ud(Af,gf),Af},hd=commonjsGlobal&&commonjsGlobal.__importDefault||function(gf){return gf&&gf.__esModule?gf:{default:gf}};Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.decodeXML=Ra.decodeHTMLStrict=Ra.decodeHTMLAttribute=Ra.decodeHTML=Ra.determineBranch=Ra.EntityDecoder=Ra.DecodingMode=Ra.BinTrieFlags=Ra.fromCodePoint=Ra.replaceCodePoint=Ra.decodeCodePoint=Ra.xmlDecodeTree=Ra.htmlDecodeTree=void 0;var md=hd(decodeDataHtml);Ra.htmlDecodeTree=md.default;var gd=hd(decodeDataXml);Ra.xmlDecodeTree=gd.default;var yd=dd(decode_codepoint);Ra.decodeCodePoint=yd.default;var vd=decode_codepoint;Object.defineProperty(Ra,"replaceCodePoint",{enumerable:!0,get:function(){return vd.replaceCodePoint}}),Object.defineProperty(Ra,"fromCodePoint",{enumerable:!0,get:function(){return vd.fromCodePoint}});var Cd;(function(gf){gf[gf.NUM=35]="NUM",gf[gf.SEMI=59]="SEMI",gf[gf.EQUALS=61]="EQUALS",gf[gf.ZERO=48]="ZERO",gf[gf.NINE=57]="NINE",gf[gf.LOWER_A=97]="LOWER_A",gf[gf.LOWER_F=102]="LOWER_F",gf[gf.LOWER_X=120]="LOWER_X",gf[gf.LOWER_Z=122]="LOWER_Z",gf[gf.UPPER_A=65]="UPPER_A",gf[gf.UPPER_F=70]="UPPER_F",gf[gf.UPPER_Z=90]="UPPER_Z"})(Cd||(Cd={}));var wd=32,Nd;(function(gf){gf[gf.VALUE_LENGTH=49152]="VALUE_LENGTH",gf[gf.BRANCH_LENGTH=16256]="BRANCH_LENGTH",gf[gf.JUMP_TABLE=127]="JUMP_TABLE"})(Nd=Ra.BinTrieFlags||(Ra.BinTrieFlags={}));function Ld(gf){return gf>=Cd.ZERO&&gf<=Cd.NINE}function Ud(gf){return gf>=Cd.UPPER_A&&gf<=Cd.UPPER_F||gf>=Cd.LOWER_A&&gf<=Cd.LOWER_F}function jd(gf){return gf>=Cd.UPPER_A&&gf<=Cd.UPPER_Z||gf>=Cd.LOWER_A&&gf<=Cd.LOWER_Z||Ld(gf)}function Gd(gf){return gf===Cd.EQUALS||jd(gf)}var Yd;(function(gf){gf[gf.EntityStart=0]="EntityStart",gf[gf.NumericStart=1]="NumericStart",gf[gf.NumericDecimal=2]="NumericDecimal",gf[gf.NumericHex=3]="NumericHex",gf[gf.NamedEntity=4]="NamedEntity"})(Yd||(Yd={}));var zd;(function(gf){gf[gf.Legacy=0]="Legacy",gf[gf.Strict=1]="Strict",gf[gf.Attribute=2]="Attribute"})(zd=Ra.DecodingMode||(Ra.DecodingMode={}));var qd=function(){function gf(Af,Df,Of){this.decodeTree=Af,this.emitCodePoint=Df,this.errors=Of,this.state=Yd.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=zd.Strict}return gf.prototype.startEntity=function(Af){this.decodeMode=Af,this.state=Yd.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},gf.prototype.write=function(Af,Df){switch(this.state){case Yd.EntityStart:return Af.charCodeAt(Df)===Cd.NUM?(this.state=Yd.NumericStart,this.consumed+=1,this.stateNumericStart(Af,Df+1)):(this.state=Yd.NamedEntity,this.stateNamedEntity(Af,Df));case Yd.NumericStart:return this.stateNumericStart(Af,Df);case Yd.NumericDecimal:return this.stateNumericDecimal(Af,Df);case Yd.NumericHex:return this.stateNumericHex(Af,Df);case Yd.NamedEntity:return this.stateNamedEntity(Af,Df)}},gf.prototype.stateNumericStart=function(Af,Df){return Df>=Af.length?-1:(Af.charCodeAt(Df)|wd)===Cd.LOWER_X?(this.state=Yd.NumericHex,this.consumed+=1,this.stateNumericHex(Af,Df+1)):(this.state=Yd.NumericDecimal,this.stateNumericDecimal(Af,Df))},gf.prototype.addToNumericResult=function(Af,Df,Of,Cf){if(Df!==Of){var If=Of-Df;this.result=this.result*Math.pow(Cf,If)+parseInt(Af.substr(Df,If),Cf),this.consumed+=If}},gf.prototype.stateNumericHex=function(Af,Df){for(var Of=Df;Df>14;Df>14,If!==0){if(Ff===Cd.SEMI)return this.emitNamedEntityData(this.treeIndex,If,this.consumed+this.excess);this.decodeMode!==zd.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},gf.prototype.emitNotTerminatedNamedEntity=function(){var Af,Df=this,Of=Df.result,Cf=Df.decodeTree,If=(Cf[Of]&Nd.VALUE_LENGTH)>>14;return this.emitNamedEntityData(Of,If,this.consumed),(Af=this.errors)===null||Af===void 0||Af.missingSemicolonAfterCharacterReference(),this.consumed},gf.prototype.emitNamedEntityData=function(Af,Df,Of){var Cf=this.decodeTree;return this.emitCodePoint(Df===1?Cf[Af]&~Nd.VALUE_LENGTH:Cf[Af+1],Of),Df===3&&this.emitCodePoint(Cf[Af+2],Of),Of},gf.prototype.end=function(){var Af;switch(this.state){case Yd.NamedEntity:return this.result!==0&&(this.decodeMode!==zd.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Yd.NumericDecimal:return this.emitNumericEntity(0,2);case Yd.NumericHex:return this.emitNumericEntity(0,3);case Yd.NumericStart:return(Af=this.errors)===null||Af===void 0||Af.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Yd.EntityStart:return 0}},gf}();Ra.EntityDecoder=qd;function Wd(gf){var Af="",Df=new qd(gf,function(Of){return Af+=(0,yd.fromCodePoint)(Of)});return function(Cf,If){for(var Ff=0,sh=0;(sh=Cf.indexOf("&",sh))>=0;){Af+=Cf.slice(Ff,sh),Df.startEntity(If);var Sh=Df.write(Cf,sh+1);if(Sh<0){Ff=sh+Df.end();break}Ff=sh+Sh,sh=Sh===0?Ff+1:Ff}var yh=Af+Cf.slice(Ff);return Af="",yh}}function Xd(gf,Af,Df,Of){var Cf=(Af&Nd.BRANCH_LENGTH)>>7,If=Af&Nd.JUMP_TABLE;if(Cf===0)return If!==0&&Of===If?Df:-1;if(If){var Ff=Of-If;return Ff<0||Ff>=Cf?-1:gf[Df+Ff]-1}for(var sh=Df,Sh=sh+Cf-1;sh<=Sh;){var yh=sh+Sh>>>1,Mh=gf[yh];if(MhOf)Sh=yh-1;else return gf[yh+Cf]}return-1}Ra.determineBranch=Xd;var Jd=Wd(md.default),Zd=Wd(gd.default);function mf(gf,Af){return Af===void 0&&(Af=zd.Legacy),Jd(gf,Af)}Ra.decodeHTML=mf;function xf(gf){return Jd(gf,zd.Attribute)}Ra.decodeHTMLAttribute=xf;function _f(gf){return Jd(gf,zd.Strict)}Ra.decodeHTMLStrict=_f;function vf(gf){return Zd(gf,zd.Strict)}Ra.decodeXML=vf})(decode$2);var encode$3={},encodeHtml={};Object.defineProperty(encodeHtml,"__esModule",{value:!0});function restoreDiff(Ra){for(var ed=1;ed$\x80-\uFFFF]/g;var ed=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);Ra.getCodePoint=String.prototype.codePointAt!=null?function(hd,md){return hd.codePointAt(md)}:function(hd,md){return(hd.charCodeAt(md)&64512)===55296?(hd.charCodeAt(md)-55296)*1024+hd.charCodeAt(md+1)-56320+65536:hd.charCodeAt(md)};function ud(hd){for(var md="",gd=0,yd;(yd=Ra.xmlReplacer.exec(hd))!==null;){var vd=yd.index,Cd=hd.charCodeAt(vd),wd=ed.get(Cd);wd!==void 0?(md+=hd.substring(gd,vd)+wd,gd=vd+1):(md+="".concat(hd.substring(gd,vd),"&#x").concat((0,Ra.getCodePoint)(hd,vd).toString(16),";"),gd=Ra.xmlReplacer.lastIndex+=+((Cd&64512)===55296))}return md+hd.substr(gd)}Ra.encodeXML=ud,Ra.escape=ud;function dd(hd,md){return function(yd){for(var vd,Cd=0,wd="";vd=hd.exec(yd);)Cd!==vd.index&&(wd+=yd.substring(Cd,vd.index)),wd+=md.get(vd[0].charCodeAt(0)),Cd=vd.index+1;return wd+yd.substring(Cd)}}Ra.escapeUTF8=dd(/[&<>'"]/g,ed),Ra.escapeAttribute=dd(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Ra.escapeText=dd(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(_escape);var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(Ra){return Ra&&Ra.__esModule?Ra:{default:Ra}};Object.defineProperty(encode$3,"__esModule",{value:!0});encode$3.encodeNonAsciiHTML=encode$3.encodeHTML=void 0;var encode_html_js_1=__importDefault(encodeHtml),escape_js_1=_escape,htmlReplacer=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function encodeHTML(Ra){return encodeHTMLTrieRe(htmlReplacer,Ra)}encode$3.encodeHTML=encodeHTML;function encodeNonAsciiHTML(Ra){return encodeHTMLTrieRe(escape_js_1.xmlReplacer,Ra)}encode$3.encodeNonAsciiHTML=encodeNonAsciiHTML;function encodeHTMLTrieRe(Ra,ed){for(var ud="",dd=0,hd;(hd=Ra.exec(ed))!==null;){var md=hd.index;ud+=ed.substring(dd,md);var gd=ed.charCodeAt(md),yd=encode_html_js_1.default.get(gd);if(typeof yd=="object"){if(md+1[Ra.toLowerCase(),Ra])),attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(Ra=>[Ra.toLowerCase(),Ra])),unencodedElements=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function replaceQuotes(Ra){return Ra.replace(/"/g,""")}function formatAttributes(Ra,ed){var ud;if(!Ra)return;const dd=((ud=ed.encodeEntities)!==null&&ud!==void 0?ud:ed.decodeEntities)===!1?replaceQuotes:ed.xmlMode||ed.encodeEntities!=="utf8"?lib$4.encodeXML:lib$4.escapeAttribute;return Object.keys(Ra).map(hd=>{var md,gd;const yd=(md=Ra[hd])!==null&&md!==void 0?md:"";return ed.xmlMode==="foreign"&&(hd=(gd=attributeNames.get(hd))!==null&&gd!==void 0?gd:hd),!ed.emptyAttrs&&!ed.xmlMode&&yd===""?hd:`${hd}="${dd(yd)}"`}).join(" ")}const singleTag=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function render$3(Ra,ed={}){const ud="length"in Ra?Ra:[Ra];let dd="";for(let hd=0;hd0&&(dd+=render$3(Ra.children,ed)),(ed.xmlMode||!singleTag.has(Ra.name))&&(dd+=``)),dd}function renderDirective(Ra){return`<${Ra.data}>`}function renderText(Ra,ed){var ud;let dd=Ra.data||"";return((ud=ed.encodeEntities)!==null&&ud!==void 0?ud:ed.decodeEntities)!==!1&&!(!ed.xmlMode&&Ra.parent&&unencodedElements.has(Ra.parent.name))&&(dd=ed.xmlMode||ed.encodeEntities!=="utf8"?lib$4.encodeXML(dd):lib$4.escapeText(dd)),dd}function renderCdata(Ra){return``}function renderComment(Ra){return``}function getOuterHTML(Ra,ed){return render$3(Ra,ed)}function getInnerHTML(Ra,ed){return hasChildren(Ra)?Ra.children.map(ud=>getOuterHTML(ud,ed)).join(""):""}function getText(Ra){return Array.isArray(Ra)?Ra.map(getText).join(""):isTag(Ra)?Ra.name==="br"?` +`:getText(Ra.children):isCDATA(Ra)?getText(Ra.children):isText(Ra)?Ra.data:""}function textContent(Ra){return Array.isArray(Ra)?Ra.map(textContent).join(""):hasChildren(Ra)&&!isComment$1(Ra)?textContent(Ra.children):isText(Ra)?Ra.data:""}function innerText(Ra){return Array.isArray(Ra)?Ra.map(innerText).join(""):hasChildren(Ra)&&(Ra.type===ElementType.Tag||isCDATA(Ra))?innerText(Ra.children):isText(Ra)?Ra.data:""}function getChildren(Ra){return hasChildren(Ra)?Ra.children:[]}function getParent(Ra){return Ra.parent||null}function getSiblings(Ra){const ed=getParent(Ra);if(ed!=null)return getChildren(ed);const ud=[Ra];let{prev:dd,next:hd}=Ra;for(;dd!=null;)ud.unshift(dd),{prev:dd}=dd;for(;hd!=null;)ud.push(hd),{next:hd}=hd;return ud}function getAttributeValue(Ra,ed){var ud;return(ud=Ra.attribs)===null||ud===void 0?void 0:ud[ed]}function hasAttrib(Ra,ed){return Ra.attribs!=null&&Object.prototype.hasOwnProperty.call(Ra.attribs,ed)&&Ra.attribs[ed]!=null}function getName(Ra){return Ra.name}function nextElementSibling(Ra){let{next:ed}=Ra;for(;ed!==null&&!isTag(ed);)({next:ed}=ed);return ed}function prevElementSibling(Ra){let{prev:ed}=Ra;for(;ed!==null&&!isTag(ed);)({prev:ed}=ed);return ed}function removeElement(Ra){if(Ra.prev&&(Ra.prev.next=Ra.next),Ra.next&&(Ra.next.prev=Ra.prev),Ra.parent){const ed=Ra.parent.children,ud=ed.lastIndexOf(Ra);ud>=0&&ed.splice(ud,1)}Ra.next=null,Ra.prev=null,Ra.parent=null}function replaceElement(Ra,ed){const ud=ed.prev=Ra.prev;ud&&(ud.next=ed);const dd=ed.next=Ra.next;dd&&(dd.prev=ed);const hd=ed.parent=Ra.parent;if(hd){const md=hd.children;md[md.lastIndexOf(Ra)]=ed,Ra.parent=null}}function appendChild(Ra,ed){if(removeElement(ed),ed.next=null,ed.parent=Ra,Ra.children.push(ed)>1){const ud=Ra.children[Ra.children.length-2];ud.next=ed,ed.prev=ud}else ed.prev=null}function append$3(Ra,ed){removeElement(ed);const{parent:ud}=Ra,dd=Ra.next;if(ed.next=dd,ed.prev=Ra,Ra.next=ed,ed.parent=ud,dd){if(dd.prev=ed,ud){const hd=ud.children;hd.splice(hd.lastIndexOf(dd),0,ed)}}else ud&&ud.children.push(ed)}function prependChild(Ra,ed){if(removeElement(ed),ed.parent=Ra,ed.prev=null,Ra.children.unshift(ed)!==1){const ud=Ra.children[1];ud.prev=ed,ed.next=ud}else ed.next=null}function prepend$1(Ra,ed){removeElement(ed);const{parent:ud}=Ra;if(ud){const dd=ud.children;dd.splice(dd.indexOf(Ra),0,ed)}Ra.prev&&(Ra.prev.next=ed),ed.parent=ud,ed.prev=Ra.prev,ed.next=Ra,Ra.prev=ed}function filter$5(Ra,ed,ud=!0,dd=1/0){return find$3(Ra,Array.isArray(ed)?ed:[ed],ud,dd)}function find$3(Ra,ed,ud,dd){const hd=[],md=[Array.isArray(ed)?ed:[ed]],gd=[0];for(;;){if(gd[0]>=md[0].length){if(gd.length===1)return hd;md.shift(),gd.shift();continue}const yd=md[0][gd[0]++];if(Ra(yd)&&(hd.push(yd),--dd<=0))return hd;ud&&hasChildren(yd)&&yd.children.length>0&&(gd.unshift(0),md.unshift(yd.children))}}function findOneChild(Ra,ed){return ed.find(Ra)}function findOne(Ra,ed,ud=!0){const dd=Array.isArray(ed)?ed:[ed];for(let hd=0;hd0){const gd=findOne(Ra,md.children,!0);if(gd)return gd}}return null}function existsOne(Ra,ed){return(Array.isArray(ed)?ed:[ed]).some(ud=>isTag(ud)&&Ra(ud)||hasChildren(ud)&&existsOne(Ra,ud.children))}function findAll(Ra,ed){const ud=[],dd=[Array.isArray(ed)?ed:[ed]],hd=[0];for(;;){if(hd[0]>=dd[0].length){if(dd.length===1)return ud;dd.shift(),hd.shift();continue}const md=dd[0][hd[0]++];isTag(md)&&Ra(md)&&ud.push(md),hasChildren(md)&&md.children.length>0&&(hd.unshift(0),dd.unshift(md.children))}}const Checks={tag_name(Ra){return typeof Ra=="function"?ed=>isTag(ed)&&Ra(ed.name):Ra==="*"?isTag:ed=>isTag(ed)&&ed.name===Ra},tag_type(Ra){return typeof Ra=="function"?ed=>Ra(ed.type):ed=>ed.type===Ra},tag_contains(Ra){return typeof Ra=="function"?ed=>isText(ed)&&Ra(ed.data):ed=>isText(ed)&&ed.data===Ra}};function getAttribCheck(Ra,ed){return typeof ed=="function"?ud=>isTag(ud)&&ed(ud.attribs[Ra]):ud=>isTag(ud)&&ud.attribs[Ra]===ed}function combineFuncs(Ra,ed){return ud=>Ra(ud)||ed(ud)}function compileTest(Ra){const ed=Object.keys(Ra).map(ud=>{const dd=Ra[ud];return Object.prototype.hasOwnProperty.call(Checks,ud)?Checks[ud](dd):getAttribCheck(ud,dd)});return ed.length===0?null:ed.reduce(combineFuncs)}function testElement(Ra,ed){const ud=compileTest(Ra);return ud?ud(ed):!0}function getElements(Ra,ed,ud,dd=1/0){const hd=compileTest(Ra);return hd?filter$5(hd,ed,ud,dd):[]}function getElementById(Ra,ed,ud=!0){return Array.isArray(ed)||(ed=[ed]),findOne(getAttribCheck("id",Ra),ed,ud)}function getElementsByTagName(Ra,ed,ud=!0,dd=1/0){return filter$5(Checks.tag_name(Ra),ed,ud,dd)}function getElementsByClassName(Ra,ed,ud=!0,dd=1/0){return filter$5(getAttribCheck("class",Ra),ed,ud,dd)}function getElementsByTagType(Ra,ed,ud=!0,dd=1/0){return filter$5(Checks.tag_type(Ra),ed,ud,dd)}function removeSubsets(Ra){let ed=Ra.length;for(;--ed>=0;){const ud=Ra[ed];if(ed>0&&Ra.lastIndexOf(ud,ed-1)>=0){Ra.splice(ed,1);continue}for(let dd=ud.parent;dd;dd=dd.parent)if(Ra.includes(dd)){Ra.splice(ed,1);break}}return Ra}var DocumentPosition$1;(function(Ra){Ra[Ra.DISCONNECTED=1]="DISCONNECTED",Ra[Ra.PRECEDING=2]="PRECEDING",Ra[Ra.FOLLOWING=4]="FOLLOWING",Ra[Ra.CONTAINS=8]="CONTAINS",Ra[Ra.CONTAINED_BY=16]="CONTAINED_BY"})(DocumentPosition$1||(DocumentPosition$1={}));function compareDocumentPosition(Ra,ed){const ud=[],dd=[];if(Ra===ed)return 0;let hd=hasChildren(Ra)?Ra:Ra.parent;for(;hd;)ud.unshift(hd),hd=hd.parent;for(hd=hasChildren(ed)?ed:ed.parent;hd;)dd.unshift(hd),hd=hd.parent;const md=Math.min(ud.length,dd.length);let gd=0;for(;gdvd.indexOf(wd)?yd===ed?DocumentPosition$1.FOLLOWING|DocumentPosition$1.CONTAINED_BY:DocumentPosition$1.FOLLOWING:yd===Ra?DocumentPosition$1.PRECEDING|DocumentPosition$1.CONTAINS:DocumentPosition$1.PRECEDING}function uniqueSort(Ra){return Ra=Ra.filter((ed,ud,dd)=>!dd.includes(ed,ud+1)),Ra.sort((ed,ud)=>{const dd=compareDocumentPosition(ed,ud);return dd&DocumentPosition$1.PRECEDING?-1:dd&DocumentPosition$1.FOLLOWING?1:0}),Ra}function getFeed(Ra){const ed=getOneElement(isValidFeed,Ra);return ed?ed.name==="feed"?getAtomFeed(ed):getRssFeed(ed):null}function getAtomFeed(Ra){var ed;const ud=Ra.children,dd={type:"atom",items:getElementsByTagName("entry",ud).map(gd=>{var yd;const{children:vd}=gd,Cd={media:getMediaElements(vd)};addConditionally(Cd,"id","id",vd),addConditionally(Cd,"title","title",vd);const wd=(yd=getOneElement("link",vd))===null||yd===void 0?void 0:yd.attribs.href;wd&&(Cd.link=wd);const Nd=fetch$1("summary",vd)||fetch$1("content",vd);Nd&&(Cd.description=Nd);const Ld=fetch$1("updated",vd);return Ld&&(Cd.pubDate=new Date(Ld)),Cd})};addConditionally(dd,"id","id",ud),addConditionally(dd,"title","title",ud);const hd=(ed=getOneElement("link",ud))===null||ed===void 0?void 0:ed.attribs.href;hd&&(dd.link=hd),addConditionally(dd,"description","subtitle",ud);const md=fetch$1("updated",ud);return md&&(dd.updated=new Date(md)),addConditionally(dd,"author","email",ud,!0),dd}function getRssFeed(Ra){var ed,ud;const dd=(ud=(ed=getOneElement("channel",Ra.children))===null||ed===void 0?void 0:ed.children)!==null&&ud!==void 0?ud:[],hd={type:Ra.name.substr(0,3),id:"",items:getElementsByTagName("item",Ra.children).map(gd=>{const{children:yd}=gd,vd={media:getMediaElements(yd)};addConditionally(vd,"id","guid",yd),addConditionally(vd,"title","title",yd),addConditionally(vd,"link","link",yd),addConditionally(vd,"description","description",yd);const Cd=fetch$1("pubDate",yd)||fetch$1("dc:date",yd);return Cd&&(vd.pubDate=new Date(Cd)),vd})};addConditionally(hd,"title","title",dd),addConditionally(hd,"link","link",dd),addConditionally(hd,"description","description",dd);const md=fetch$1("lastBuildDate",dd);return md&&(hd.updated=new Date(md)),addConditionally(hd,"author","managingEditor",dd,!0),hd}const MEDIA_KEYS_STRING=["url","type","lang"],MEDIA_KEYS_INT=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function getMediaElements(Ra){return getElementsByTagName("media:content",Ra).map(ed=>{const{attribs:ud}=ed,dd={medium:ud.medium,isDefault:!!ud.isDefault};for(const hd of MEDIA_KEYS_STRING)ud[hd]&&(dd[hd]=ud[hd]);for(const hd of MEDIA_KEYS_INT)ud[hd]&&(dd[hd]=parseInt(ud[hd],10));return ud.expression&&(dd.expression=ud.expression),dd})}function getOneElement(Ra,ed){return getElementsByTagName(Ra,ed,!0,1)[0]}function fetch$1(Ra,ed,ud=!1){return textContent(getElementsByTagName(Ra,ed,ud,1)).trim()}function addConditionally(Ra,ed,ud,dd,hd=!1){const md=fetch$1(ud,dd,hd);md&&(Ra[ed]=md)}function isValidFeed(Ra){return Ra==="rss"||Ra==="feed"||Ra==="rdf:RDF"}const DomUtils=Object.freeze(Object.defineProperty({__proto__:null,get DocumentPosition(){return DocumentPosition$1},append:append$3,appendChild,compareDocumentPosition,existsOne,filter:filter$5,find:find$3,findAll,findOne,findOneChild,getAttributeValue,getChildren,getElementById,getElements,getElementsByClassName,getElementsByTagName,getElementsByTagType,getFeed,getInnerHTML,getName,getOuterHTML,getParent,getSiblings,getText,hasAttrib,hasChildren,innerText,isCDATA,isComment:isComment$1,isDocument,isTag,isText,nextElementSibling,prepend:prepend$1,prependChild,prevElementSibling,removeElement,removeSubsets,replaceElement,testElement,textContent,uniqueSort},Symbol.toStringTag,{value:"Module"})),defaultOpts$1={_useHtmlParser2:!1};function flattenOptions(Ra,ed){if(!Ra)return ed??defaultOpts$1;const ud={_useHtmlParser2:!!Ra.xmlMode,...ed,...Ra};return Ra.xml?(ud._useHtmlParser2=!0,ud.xmlMode=!0,Ra.xml!==!0&&Object.assign(ud,Ra.xml)):Ra.xmlMode&&(ud._useHtmlParser2=!0),ud}function render$2(Ra,ed,ud){return Ra?Ra(ed??Ra._root.children,null,void 0,ud).toString():""}function isOptions(Ra,ed){return typeof Ra=="object"&&Ra!=null&&!("length"in Ra)&&!("type"in Ra)}function html$5(Ra,ed){const ud=isOptions(Ra)?(ed=Ra,void 0):Ra,dd={...this===null||this===void 0?void 0:this._options,...flattenOptions(ed)};return render$2(this,ud,dd)}function xml$4(Ra){const ed={...this._options,xmlMode:!0};return render$2(this,Ra,ed)}function text$3(Ra){const ed=Ra??(this?this.root():[]);let ud="";for(let dd=0;ddud.toUpperCase())}function cssCase(Ra){return Ra.replace(/[A-Z]/g,"-$&").toLowerCase()}function domEach(Ra,ed){const ud=Ra.length;for(let dd=0;ddRa.length-3)return!1;const ud=Ra.charCodeAt(ed+1);return(ud>=CharacterCodes.LowerA&&ud<=CharacterCodes.LowerZ||ud>=CharacterCodes.UpperA&&ud<=CharacterCodes.UpperZ||ud===CharacterCodes.Exclamation)&&Ra.includes(">",ed+2)}const hasOwn$2=Object.prototype.hasOwnProperty,rspace=/\s+/,dataAttrPrefix="data-",rboolean=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,rbrace=/^{[^]*}$|^\[[^]*]$/;function getAttr$1(Ra,ed,ud){var dd;if(!(!Ra||!isTag(Ra))){if((dd=Ra.attribs)!==null&&dd!==void 0||(Ra.attribs={}),!ed)return Ra.attribs;if(hasOwn$2.call(Ra.attribs,ed))return!ud&&rboolean.test(ed)?ed:Ra.attribs[ed];if(Ra.name==="option"&&ed==="value")return text$3(Ra.children);if(Ra.name==="input"&&(Ra.attribs.type==="radio"||Ra.attribs.type==="checkbox")&&ed==="value")return"on"}}function setAttr(Ra,ed,ud){ud===null?removeAttribute(Ra,ed):Ra.attribs[ed]=`${ud}`}function attr(Ra,ed){if(typeof Ra=="object"||ed!==void 0){if(typeof ed=="function"){if(typeof Ra!="string")throw new Error("Bad combination of arguments.");return domEach(this,(ud,dd)=>{isTag(ud)&&setAttr(ud,Ra,ed.call(ud,dd,ud.attribs[Ra]))})}return domEach(this,ud=>{if(isTag(ud))if(typeof Ra=="object")for(const dd of Object.keys(Ra)){const hd=Ra[dd];setAttr(ud,dd,hd)}else setAttr(ud,Ra,ed)})}return arguments.length>1?this:getAttr$1(this[0],Ra,this.options.xmlMode)}function getProp(Ra,ed,ud){return ed in Ra?Ra[ed]:!ud&&rboolean.test(ed)?getAttr$1(Ra,ed,!1)!==void 0:getAttr$1(Ra,ed,ud)}function setProp(Ra,ed,ud,dd){ed in Ra?Ra[ed]=ud:setAttr(Ra,ed,!dd&&rboolean.test(ed)?ud?"":null:`${ud}`)}function prop(Ra,ed){var ud;if(typeof Ra=="string"&&ed===void 0){const dd=this[0];if(!dd||!isTag(dd))return;switch(Ra){case"style":{const hd=this.css(),md=Object.keys(hd);for(let gd=0;gd").parent().html();case"innerHTML":return this.html();default:return getProp(dd,Ra,this.options.xmlMode)}}if(typeof Ra=="object"||ed!==void 0){if(typeof ed=="function"){if(typeof Ra=="object")throw new TypeError("Bad combination of arguments.");return domEach(this,(dd,hd)=>{isTag(dd)&&setProp(dd,Ra,ed.call(dd,hd,getProp(dd,Ra,this.options.xmlMode)),this.options.xmlMode)})}return domEach(this,dd=>{if(isTag(dd))if(typeof Ra=="object")for(const hd of Object.keys(Ra)){const md=Ra[hd];setProp(dd,hd,md,this.options.xmlMode)}else setProp(dd,Ra,ed,this.options.xmlMode)})}}function setData(Ra,ed,ud){var dd;(dd=Ra.data)!==null&&dd!==void 0||(Ra.data={}),typeof ed=="object"?Object.assign(Ra.data,ed):typeof ed=="string"&&ud!==void 0&&(Ra.data[ed]=ud)}function readAllData(Ra){for(const ed of Object.keys(Ra.attribs)){if(!ed.startsWith(dataAttrPrefix))continue;const ud=camelCase$1(ed.slice(dataAttrPrefix.length));hasOwn$2.call(Ra.data,ud)||(Ra.data[ud]=parseDataValue(Ra.attribs[ed]))}return Ra.data}function readData(Ra,ed){const ud=dataAttrPrefix+cssCase(ed),dd=Ra.data;if(hasOwn$2.call(dd,ed))return dd[ed];if(hasOwn$2.call(Ra.attribs,ud))return dd[ed]=parseDataValue(Ra.attribs[ud])}function parseDataValue(Ra){if(Ra==="null")return null;if(Ra==="true")return!0;if(Ra==="false")return!1;const ed=Number(Ra);if(Ra===String(ed))return ed;if(rbrace.test(Ra))try{return JSON.parse(Ra)}catch{}return Ra}function data(Ra,ed){var ud;const dd=this[0];if(!dd||!isTag(dd))return;const hd=dd;return(ud=hd.data)!==null&&ud!==void 0||(hd.data={}),Ra==null?readAllData(hd):typeof Ra=="object"||ed!==void 0?(domEach(this,md=>{isTag(md)&&(typeof Ra=="object"?setData(md,Ra):setData(md,Ra,ed))}),this):readData(hd,Ra)}function val$1(Ra){const ed=arguments.length===0,ud=this[0];if(!ud||!isTag(ud))return ed?void 0:this;switch(ud.name){case"textarea":return this.text(Ra);case"select":{const dd=this.find("option:selected");if(!ed){if(this.attr("multiple")==null&&typeof Ra=="object")return this;this.find("option").removeAttr("selected");const hd=typeof Ra=="object"?Ra:[Ra];for(const md of hd)this.find(`option[value="${md}"]`).attr("selected","");return this}return this.attr("multiple")?dd.toArray().map(hd=>text$3(hd.children)):dd.attr("value")}case"input":case"option":return ed?this.attr("value"):this.attr("value",Ra)}}function removeAttribute(Ra,ed){!Ra.attribs||!hasOwn$2.call(Ra.attribs,ed)||delete Ra.attribs[ed]}function splitNames(Ra){return Ra?Ra.trim().split(rspace):[]}function removeAttr(Ra){const ed=splitNames(Ra);for(const ud of ed)domEach(this,dd=>{isTag(dd)&&removeAttribute(dd,ud)});return this}function hasClass(Ra){return this.toArray().some(ed=>{const ud=isTag(ed)&&ed.attribs.class;let dd=-1;if(ud&&Ra.length>0)for(;(dd=ud.indexOf(Ra,dd+1))>-1;){const hd=dd+Ra.length;if((dd===0||rspace.test(ud[dd-1]))&&(hd===ud.length||rspace.test(ud[hd])))return!0}return!1})}function addClass(Ra){if(typeof Ra=="function")return domEach(this,(dd,hd)=>{if(isTag(dd)){const md=dd.attribs.class||"";addClass.call([dd],Ra.call(dd,hd,md))}});if(!Ra||typeof Ra!="string")return this;const ed=Ra.split(rspace),ud=this.length;for(let dd=0;dd{isTag(hd)&&removeClass.call([hd],Ra.call(hd,md,hd.attribs.class||""))});const ed=splitNames(Ra),ud=ed.length,dd=arguments.length===0;return domEach(this,hd=>{if(isTag(hd))if(dd)hd.attribs.class="";else{const md=splitNames(hd.attribs.class);let gd=!1;for(let yd=0;yd=0&&(md.splice(vd,1),gd=!0,yd--)}gd&&(hd.attribs.class=md.join(" "))}})}function toggleClass(Ra,ed){if(typeof Ra=="function")return domEach(this,(gd,yd)=>{isTag(gd)&&toggleClass.call([gd],Ra.call(gd,yd,gd.attribs.class||"",ed),ed)});if(!Ra||typeof Ra!="string")return this;const ud=Ra.split(rspace),dd=ud.length,hd=typeof ed=="boolean"?ed?1:-1:0,md=this.length;for(let gd=0;gd=0&&wd<0?vd.push(ud[Cd]):hd<=0&&wd>=0&&vd.splice(wd,1)}yd.attribs.class=vd.join(" ")}return this}const Attributes=Object.freeze(Object.defineProperty({__proto__:null,addClass,attr,data,hasClass,prop,removeAttr,removeClass,toggleClass,val:val$1},Symbol.toStringTag,{value:"Module"}));var SelectorType$2;(function(Ra){Ra.Attribute="attribute",Ra.Pseudo="pseudo",Ra.PseudoElement="pseudo-element",Ra.Tag="tag",Ra.Universal="universal",Ra.Adjacent="adjacent",Ra.Child="child",Ra.Descendant="descendant",Ra.Parent="parent",Ra.Sibling="sibling",Ra.ColumnCombinator="column-combinator"})(SelectorType$2||(SelectorType$2={}));var AttributeAction;(function(Ra){Ra.Any="any",Ra.Element="element",Ra.End="end",Ra.Equals="equals",Ra.Exists="exists",Ra.Hyphen="hyphen",Ra.Not="not",Ra.Start="start"})(AttributeAction||(AttributeAction={}));const reName=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,reEscape=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,actionTypes=new Map([[126,AttributeAction.Element],[94,AttributeAction.Start],[36,AttributeAction.End],[42,AttributeAction.Any],[33,AttributeAction.Not],[124,AttributeAction.Hyphen]]),unpackPseudos=new Set(["has","not","matches","is","where","host","host-context"]);function isTraversal$1(Ra){switch(Ra.type){case SelectorType$2.Adjacent:case SelectorType$2.Child:case SelectorType$2.Descendant:case SelectorType$2.Parent:case SelectorType$2.Sibling:case SelectorType$2.ColumnCombinator:return!0;default:return!1}}const stripQuotesFromPseudos=new Set(["contains","icontains"]);function funescape(Ra,ed,ud){const dd=parseInt(ed,16)-65536;return dd!==dd||ud?ed:dd<0?String.fromCharCode(dd+65536):String.fromCharCode(dd>>10|55296,dd&1023|56320)}function unescapeCSS(Ra){return Ra.replace(reEscape,funescape)}function isQuote(Ra){return Ra===39||Ra===34}function isWhitespace$4(Ra){return Ra===32||Ra===9||Ra===10||Ra===12||Ra===13}function parse$8(Ra){const ed=[],ud=parseSelector(ed,`${Ra}`,0);if(ud0&&ud0&&isTraversal$1(dd[dd.length-1]))throw new Error("Did not expect successive traversals.")}function Cd(Ld){if(dd.length>0&&dd[dd.length-1].type===SelectorType$2.Descendant){dd[dd.length-1].type=Ld;return}vd(),dd.push({type:Ld})}function wd(Ld,Ud){dd.push({type:SelectorType$2.Attribute,name:Ld,action:Ud,value:hd(1),namespace:null,ignoreCase:"quirks"})}function Nd(){if(dd.length&&dd[dd.length-1].type===SelectorType$2.Descendant&&dd.pop(),dd.length===0)throw new Error("Empty sub-selector");Ra.push(dd)}if(md(0),ed.length===ud)return ud;e:for(;ud=0&&dd>=1)):Ra.type===SelectorType$2.Pseudo&&(Ra.data?Ra.name==="has"||Ra.name==="contains"?dd=0:Array.isArray(Ra.data)?(dd=Math.min(...Ra.data.map(hd=>Math.min(...hd.map(getProcedure)))),dd<0&&(dd=0)):dd=2:dd=3),dd}const reChars=/[-[\]{}()*+?.,\\^$|#\s]/g;function escapeRegex(Ra){return Ra.replace(reChars,"\\$&")}const caseInsensitiveAttributes=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function shouldIgnoreCase(Ra,ed){return typeof Ra.ignoreCase=="boolean"?Ra.ignoreCase:Ra.ignoreCase==="quirks"?!!ed.quirksMode:!ed.xmlMode&&caseInsensitiveAttributes.has(Ra.name)}const attributeRules={equals(Ra,ed,ud){const{adapter:dd}=ud,{name:hd}=ed;let{value:md}=ed;return shouldIgnoreCase(ed,ud)?(md=md.toLowerCase(),gd=>{const yd=dd.getAttributeValue(gd,hd);return yd!=null&&yd.length===md.length&&yd.toLowerCase()===md&&Ra(gd)}):gd=>dd.getAttributeValue(gd,hd)===md&&Ra(gd)},hyphen(Ra,ed,ud){const{adapter:dd}=ud,{name:hd}=ed;let{value:md}=ed;const gd=md.length;return shouldIgnoreCase(ed,ud)?(md=md.toLowerCase(),function(vd){const Cd=dd.getAttributeValue(vd,hd);return Cd!=null&&(Cd.length===gd||Cd.charAt(gd)==="-")&&Cd.substr(0,gd).toLowerCase()===md&&Ra(vd)}):function(vd){const Cd=dd.getAttributeValue(vd,hd);return Cd!=null&&(Cd.length===gd||Cd.charAt(gd)==="-")&&Cd.substr(0,gd)===md&&Ra(vd)}},element(Ra,ed,ud){const{adapter:dd}=ud,{name:hd,value:md}=ed;if(/\s/.test(md))return boolbase$1.falseFunc;const gd=new RegExp(`(?:^|\\s)${escapeRegex(md)}(?:$|\\s)`,shouldIgnoreCase(ed,ud)?"i":"");return function(vd){const Cd=dd.getAttributeValue(vd,hd);return Cd!=null&&Cd.length>=md.length&&gd.test(Cd)&&Ra(vd)}},exists(Ra,{name:ed},{adapter:ud}){return dd=>ud.hasAttrib(dd,ed)&&Ra(dd)},start(Ra,ed,ud){const{adapter:dd}=ud,{name:hd}=ed;let{value:md}=ed;const gd=md.length;return gd===0?boolbase$1.falseFunc:shouldIgnoreCase(ed,ud)?(md=md.toLowerCase(),yd=>{const vd=dd.getAttributeValue(yd,hd);return vd!=null&&vd.length>=gd&&vd.substr(0,gd).toLowerCase()===md&&Ra(yd)}):yd=>{var vd;return!!(!((vd=dd.getAttributeValue(yd,hd))===null||vd===void 0)&&vd.startsWith(md))&&Ra(yd)}},end(Ra,ed,ud){const{adapter:dd}=ud,{name:hd}=ed;let{value:md}=ed;const gd=-md.length;return gd===0?boolbase$1.falseFunc:shouldIgnoreCase(ed,ud)?(md=md.toLowerCase(),yd=>{var vd;return((vd=dd.getAttributeValue(yd,hd))===null||vd===void 0?void 0:vd.substr(gd).toLowerCase())===md&&Ra(yd)}):yd=>{var vd;return!!(!((vd=dd.getAttributeValue(yd,hd))===null||vd===void 0)&&vd.endsWith(md))&&Ra(yd)}},any(Ra,ed,ud){const{adapter:dd}=ud,{name:hd,value:md}=ed;if(md==="")return boolbase$1.falseFunc;if(shouldIgnoreCase(ed,ud)){const gd=new RegExp(escapeRegex(md),"i");return function(vd){const Cd=dd.getAttributeValue(vd,hd);return Cd!=null&&Cd.length>=md.length&&gd.test(Cd)&&Ra(vd)}}return gd=>{var yd;return!!(!((yd=dd.getAttributeValue(gd,hd))===null||yd===void 0)&&yd.includes(md))&&Ra(gd)}},not(Ra,ed,ud){const{adapter:dd}=ud,{name:hd}=ed;let{value:md}=ed;return md===""?gd=>!!dd.getAttributeValue(gd,hd)&&Ra(gd):shouldIgnoreCase(ed,ud)?(md=md.toLowerCase(),gd=>{const yd=dd.getAttributeValue(gd,hd);return(yd==null||yd.length!==md.length||yd.toLowerCase()!==md)&&Ra(gd)}):gd=>dd.getAttributeValue(gd,hd)!==md&&Ra(gd)}},whitespace$1=new Set([9,10,12,13,32]),ZERO=48,NINE=57;function parse$7(Ra){if(Ra=Ra.trim().toLowerCase(),Ra==="even")return[2,0];if(Ra==="odd")return[2,1];let ed=0,ud=0,dd=md(),hd=gd();if(ed=ZERO&&Ra.charCodeAt(ed)<=NINE;)Cd=Cd*10+(Ra.charCodeAt(ed)-ZERO),ed++;return ed===vd?null:Cd}function yd(){for(;edmd<=ud;if(ed===0)return md=>md===ud;if(ed===1)return ud<0?boolbase$1.trueFunc:md=>md>=ud;const dd=Math.abs(ed),hd=(ud%dd+dd)%dd;return ed>1?md=>md>=ud&&md%dd===hd:md=>md<=ud&&md%dd===hd}function nthCheck(Ra){return compile$1(parse$7(Ra))}function getChildFunc(Ra,ed){return ud=>{const dd=ed.getParent(ud);return dd!=null&&ed.isTag(dd)&&Ra(ud)}}const filters={contains(Ra,ed,{adapter:ud}){return function(hd){return Ra(hd)&&ud.getText(hd).includes(ed)}},icontains(Ra,ed,{adapter:ud}){const dd=ed.toLowerCase();return function(md){return Ra(md)&&ud.getText(md).toLowerCase().includes(dd)}},"nth-child"(Ra,ed,{adapter:ud,equals:dd}){const hd=nthCheck(ed);return hd===boolbase$1.falseFunc?boolbase$1.falseFunc:hd===boolbase$1.trueFunc?getChildFunc(Ra,ud):function(gd){const yd=ud.getSiblings(gd);let vd=0;for(let Cd=0;Cd=0&&!dd(gd,yd[Cd]);Cd--)ud.isTag(yd[Cd])&&vd++;return hd(vd)&&Ra(gd)}},"nth-of-type"(Ra,ed,{adapter:ud,equals:dd}){const hd=nthCheck(ed);return hd===boolbase$1.falseFunc?boolbase$1.falseFunc:hd===boolbase$1.trueFunc?getChildFunc(Ra,ud):function(gd){const yd=ud.getSiblings(gd);let vd=0;for(let Cd=0;Cd=0;Cd--){const wd=yd[Cd];if(dd(gd,wd))break;ud.isTag(wd)&&ud.getName(wd)===ud.getName(gd)&&vd++}return hd(vd)&&Ra(gd)}},root(Ra,ed,{adapter:ud}){return dd=>{const hd=ud.getParent(dd);return(hd==null||!ud.isTag(hd))&&Ra(dd)}},scope(Ra,ed,ud,dd){const{equals:hd}=ud;return!dd||dd.length===0?filters.root(Ra,ed,ud):dd.length===1?md=>hd(dd[0],md)&&Ra(md):md=>dd.includes(md)&&Ra(md)},hover:dynamicStatePseudo("isHovered"),visited:dynamicStatePseudo("isVisited"),active:dynamicStatePseudo("isActive")};function dynamicStatePseudo(Ra){return function(ud,dd,{adapter:hd}){const md=hd[Ra];return typeof md!="function"?boolbase$1.falseFunc:function(yd){return md(yd)&&ud(yd)}}}const pseudos={empty(Ra,{adapter:ed}){return!ed.getChildren(Ra).some(ud=>ed.isTag(ud)||ed.getText(ud)!=="")},"first-child"(Ra,{adapter:ed,equals:ud}){if(ed.prevElementSibling)return ed.prevElementSibling(Ra)==null;const dd=ed.getSiblings(Ra).find(hd=>ed.isTag(hd));return dd!=null&&ud(Ra,dd)},"last-child"(Ra,{adapter:ed,equals:ud}){const dd=ed.getSiblings(Ra);for(let hd=dd.length-1;hd>=0;hd--){if(ud(Ra,dd[hd]))return!0;if(ed.isTag(dd[hd]))break}return!1},"first-of-type"(Ra,{adapter:ed,equals:ud}){const dd=ed.getSiblings(Ra),hd=ed.getName(Ra);for(let md=0;md=0;md--){const gd=dd[md];if(ud(Ra,gd))return!0;if(ed.isTag(gd)&&ed.getName(gd)===hd)break}return!1},"only-of-type"(Ra,{adapter:ed,equals:ud}){const dd=ed.getName(Ra);return ed.getSiblings(Ra).every(hd=>ud(Ra,hd)||!ed.isTag(hd)||ed.getName(hd)!==dd)},"only-child"(Ra,{adapter:ed,equals:ud}){return ed.getSiblings(Ra).every(dd=>ud(Ra,dd)||!ed.isTag(dd))}};function verifyPseudoArgs(Ra,ed,ud,dd){if(ud===null){if(Ra.length>dd)throw new Error(`Pseudo-class :${ed} requires an argument`)}else if(Ra.length===dd)throw new Error(`Pseudo-class :${ed} doesn't have any arguments`)}const aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) - )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},PLACEHOLDER_ELEMENT={};function ensureIsTag(Ra,qa){return Ra===boolbase$1.falseFunc?boolbase$1.falseFunc:rd=>qa.isTag(rd)&&Ra(rd)}function getNextSiblings(Ra,qa){const rd=qa.getSiblings(Ra);if(rd.length<=1)return[];const sd=rd.indexOf(Ra);return sd<0||sd===rd.length-1?[]:rd.slice(sd+1).filter(qa.isTag)}function copyOptions(Ra){return{xmlMode:!!Ra.xmlMode,lowerCaseAttributeNames:!!Ra.lowerCaseAttributeNames,lowerCaseTags:!!Ra.lowerCaseTags,quirksMode:!!Ra.quirksMode,cacheResults:!!Ra.cacheResults,pseudos:Ra.pseudos,adapter:Ra.adapter,equals:Ra.equals}}const is$3=(Ra,qa,rd,sd,pd)=>{const fd=pd(qa,copyOptions(rd),sd);return fd===boolbase$1.trueFunc?Ra:fd===boolbase$1.falseFunc?boolbase$1.falseFunc:hd=>fd(hd)&&Ra(hd)},subselects={is:is$3,matches:is$3,where:is$3,not(Ra,qa,rd,sd,pd){const fd=pd(qa,copyOptions(rd),sd);return fd===boolbase$1.falseFunc?Ra:fd===boolbase$1.trueFunc?boolbase$1.falseFunc:hd=>!fd(hd)&&Ra(hd)},has(Ra,qa,rd,sd,pd){const{adapter:fd}=rd,hd=copyOptions(rd);hd.relativeSelector=!0;const md=qa.some(vd=>vd.some(isTraversal))?[PLACEHOLDER_ELEMENT]:void 0,gd=pd(qa,hd,md);if(gd===boolbase$1.falseFunc)return boolbase$1.falseFunc;const yd=ensureIsTag(gd,fd);if(md&&gd!==boolbase$1.trueFunc){const{shouldTestNextSiblings:vd=!1}=gd;return Nd=>{if(!Ra(Nd))return!1;md[0]=Nd;const Md=fd.getChildren(Nd),Ld=vd?[...Md,...getNextSiblings(Nd,fd)]:Md;return fd.existsOne(yd,Ld)}}return vd=>Ra(vd)&&fd.existsOne(yd,fd.getChildren(vd))}};function compilePseudoSelector(Ra,qa,rd,sd,pd){var fd;const{name:hd,data:md}=qa;if(Array.isArray(md)){if(!(hd in subselects))throw new Error(`Unknown pseudo-class :${hd}(${md})`);return subselects[hd](Ra,md,rd,sd,pd)}const gd=(fd=rd.pseudos)===null||fd===void 0?void 0:fd[hd],yd=typeof gd=="string"?gd:aliases[hd];if(typeof yd=="string"){if(md!=null)throw new Error(`Pseudo ${hd} doesn't have any arguments`);const vd=parse$8(yd);return subselects.is(Ra,vd,rd,sd,pd)}if(typeof gd=="function")return verifyPseudoArgs(gd,hd,md,1),vd=>gd(vd,md)&&Ra(vd);if(hd in filters)return filters[hd](Ra,md,rd,sd);if(hd in pseudos){const vd=pseudos[hd];return verifyPseudoArgs(vd,hd,md,2),Nd=>vd(Nd,rd,md)&&Ra(Nd)}throw new Error(`Unknown pseudo-class :${hd}`)}function getElementParent(Ra,qa){const rd=qa.getParent(Ra);return rd&&qa.isTag(rd)?rd:null}function compileGeneralSelector(Ra,qa,rd,sd,pd){const{adapter:fd,equals:hd}=rd;switch(qa.type){case SelectorType$2.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case SelectorType$2.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case SelectorType$2.Attribute:{if(qa.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!rd.xmlMode||rd.lowerCaseAttributeNames)&&(qa.name=qa.name.toLowerCase()),attributeRules[qa.action](Ra,qa,rd)}case SelectorType$2.Pseudo:return compilePseudoSelector(Ra,qa,rd,sd,pd);case SelectorType$2.Tag:{if(qa.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:md}=qa;return(!rd.xmlMode||rd.lowerCaseTags)&&(md=md.toLowerCase()),function(yd){return fd.getName(yd)===md&&Ra(yd)}}case SelectorType$2.Descendant:{if(rd.cacheResults===!1||typeof WeakSet>"u")return function(yd){let vd=yd;for(;vd=getElementParent(vd,fd);)if(Ra(vd))return!0;return!1};const md=new WeakSet;return function(yd){let vd=yd;for(;vd=getElementParent(vd,fd);)if(!md.has(vd)){if(fd.isTag(vd)&&Ra(vd))return!0;md.add(vd)}return!1}}case"_flexibleDescendant":return function(gd){let yd=gd;do if(Ra(yd))return!0;while(yd=getElementParent(yd,fd));return!1};case SelectorType$2.Parent:return function(gd){return fd.getChildren(gd).some(yd=>fd.isTag(yd)&&Ra(yd))};case SelectorType$2.Child:return function(gd){const yd=fd.getParent(gd);return yd!=null&&fd.isTag(yd)&&Ra(yd)};case SelectorType$2.Sibling:return function(gd){const yd=fd.getSiblings(gd);for(let vd=0;vdqa.some(includesScopePseudo)))}const DESCENDANT_TOKEN={type:SelectorType$2.Descendant},FLEXIBLE_DESCENDANT_TOKEN={type:"_flexibleDescendant"},SCOPE_TOKEN={type:SelectorType$2.Pseudo,name:"scope",data:null};function absolutize(Ra,{adapter:qa},rd){const sd=!!(rd!=null&&rd.every(pd=>{const fd=qa.isTag(pd)&&qa.getParent(pd);return pd===PLACEHOLDER_ELEMENT||fd&&qa.isTag(fd)}));for(const pd of Ra){if(!(pd.length>0&&isTraversal(pd[0])&&pd[0].type!==SelectorType$2.Descendant))if(sd&&!pd.some(includesScopePseudo))pd.unshift(DESCENDANT_TOKEN);else continue;pd.unshift(SCOPE_TOKEN)}}function compileToken(Ra,qa,rd){var sd;Ra.forEach(sortByProcedure),rd=(sd=qa.context)!==null&&sd!==void 0?sd:rd;const pd=Array.isArray(rd),fd=rd&&(Array.isArray(rd)?rd:[rd]);if(qa.relativeSelector!==!1)absolutize(Ra,qa,fd);else if(Ra.some(gd=>gd.length>0&&isTraversal(gd[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let hd=!1;const md=Ra.map(gd=>{if(gd.length>=2){const[yd,vd]=gd;yd.type!==SelectorType$2.Pseudo||yd.name!=="scope"||(pd&&vd.type===SelectorType$2.Descendant?gd[1]=FLEXIBLE_DESCENDANT_TOKEN:(vd.type===SelectorType$2.Adjacent||vd.type===SelectorType$2.Sibling)&&(hd=!0))}return compileRules(gd,qa,fd)}).reduce(reduceRules,boolbase$1.falseFunc);return md.shouldTestNextSiblings=hd,md}function compileRules(Ra,qa,rd){var sd;return Ra.reduce((pd,fd)=>pd===boolbase$1.falseFunc?boolbase$1.falseFunc:compileGeneralSelector(pd,fd,qa,rd,compileToken),(sd=qa.rootFunc)!==null&&sd!==void 0?sd:boolbase$1.trueFunc)}function reduceRules(Ra,qa){return qa===boolbase$1.falseFunc||Ra===boolbase$1.trueFunc?Ra:Ra===boolbase$1.falseFunc||qa===boolbase$1.trueFunc?qa:function(sd){return Ra(sd)||qa(sd)}}const defaultEquals=(Ra,qa)=>Ra===qa,defaultOptions$3={adapter:DomUtils,equals:defaultEquals};function convertOptionFormats(Ra){var qa,rd,sd,pd;const fd=Ra??defaultOptions$3;return(qa=fd.adapter)!==null&&qa!==void 0||(fd.adapter=DomUtils),(rd=fd.equals)!==null&&rd!==void 0||(fd.equals=(pd=(sd=fd.adapter)===null||sd===void 0?void 0:sd.equals)!==null&&pd!==void 0?pd:defaultEquals),fd}function wrapCompile(Ra){return function(rd,sd,pd){const fd=convertOptionFormats(sd);return Ra(rd,fd,pd)}}const _compileToken=wrapCompile(compileToken);function prepareContext(Ra,qa,rd=!1){return rd&&(Ra=appendNextSiblings(Ra,qa)),Array.isArray(Ra)?qa.removeSubsets(Ra):qa.getChildren(Ra)}function appendNextSiblings(Ra,qa){const rd=Array.isArray(Ra)?Ra.slice(0):[Ra],sd=rd.length;for(let pd=0;pdqa.some(isFilter)):!1}function getLimit(Ra,qa,rd){const sd=qa!=null?parseInt(qa,10):NaN;switch(Ra){case"first":return 1;case"nth":case"eq":return isFinite(sd)?sd>=0?sd+1:1/0:0;case"lt":return isFinite(sd)?sd>=0?Math.min(sd,rd):1/0:0;case"gt":return isFinite(sd)?1/0:0;case"odd":return 2*rd;case"even":return 2*rd-1;case"last":case"not":return 1/0}}function getDocumentRoot(Ra){for(;Ra.parent;)Ra=Ra.parent;return Ra}function groupSelectors(Ra){const qa=[],rd=[];for(const sd of Ra)sd.some(isFilter)?qa.push(sd):rd.push(sd);return[rd,qa]}const UNIVERSAL_SELECTOR={type:SelectorType$2.Universal,namespace:null},SCOPE_PSEUDO={type:SelectorType$2.Pseudo,name:"scope",data:null};function is$2(Ra,qa,rd={}){return some$2([Ra],qa,rd)}function some$2(Ra,qa,rd={}){if(typeof qa=="function")return Ra.some(qa);const[sd,pd]=groupSelectors(parse$8(qa));return sd.length>0&&Ra.some(_compileToken(sd,rd))||pd.some(fd=>filterBySelector(fd,Ra,rd).length>0)}function filterByPosition(Ra,qa,rd,sd){const pd=typeof rd=="string"?parseInt(rd,10):NaN;switch(Ra){case"first":case"lt":return qa;case"last":return qa.length>0?[qa[qa.length-1]]:qa;case"nth":case"eq":return isFinite(pd)&&Math.abs(pd)hd%2===0);case"odd":return qa.filter((fd,hd)=>hd%2===1);case"not":{const fd=new Set(filterParsed(rd,qa,sd));return qa.filter(hd=>!fd.has(hd))}}}function filter$4(Ra,qa,rd={}){return filterParsed(parse$8(Ra),qa,rd)}function filterParsed(Ra,qa,rd){if(qa.length===0)return[];const[sd,pd]=groupSelectors(Ra);let fd;if(sd.length){const hd=filterElements(qa,sd,rd);if(pd.length===0)return hd;hd.length&&(fd=new Set(hd))}for(let hd=0;hdisTag(vd)&&!fd.has(vd)):qa).length===0)break;const yd=filterBySelector(md,qa,rd);if(yd.length)if(fd)yd.forEach(vd=>fd.add(vd));else{if(hd===pd.length-1)return yd;fd=new Set(yd)}}return typeof fd<"u"?fd.size===qa.length?qa:qa.filter(hd=>fd.has(hd)):[]}function filterBySelector(Ra,qa,rd){var sd;if(Ra.some(isTraversal$1)){const pd=(sd=rd.root)!==null&&sd!==void 0?sd:getDocumentRoot(qa[0]),fd={...rd,context:qa,relativeSelector:!1};return Ra.push(SCOPE_PSEUDO),findFilterElements(pd,Ra,fd,!0,qa.length)}return findFilterElements(qa,Ra,rd,!1,qa.length)}function select$1(Ra,qa,rd={},sd=1/0){if(typeof Ra=="function")return find$2(qa,Ra);const[pd,fd]=groupSelectors(parse$8(Ra)),hd=fd.map(md=>findFilterElements(qa,md,rd,!0,sd));return pd.length&&hd.push(findElements(qa,pd,rd,sd)),hd.length===0?[]:hd.length===1?hd[0]:uniqueSort(hd.reduce((md,gd)=>[...md,...gd]))}function findFilterElements(Ra,qa,rd,sd,pd){const fd=qa.findIndex(isFilter),hd=qa.slice(0,fd),md=qa[fd],gd=qa.length-1===fd?pd:1/0,yd=getLimit(md.name,md.data,gd);if(yd===0)return[];const Nd=(hd.length===0&&!Array.isArray(Ra)?getChildren(Ra).filter(isTag):hd.length===0?(Array.isArray(Ra)?Ra:[Ra]).filter(isTag):sd||hd.some(isTraversal$1)?findElements(Ra,[hd],rd,yd):filterElements(Ra,[hd],rd)).slice(0,yd);let Md=filterByPosition(md.name,Nd,md.data,rd);if(Md.length===0||qa.length===fd+1)return Md;const Ld=qa.slice(fd+1),Fd=Ld.some(isTraversal$1);if(Fd){if(isTraversal$1(Ld[0])){const{type:Hd}=Ld[0];(Hd===SelectorType$2.Sibling||Hd===SelectorType$2.Adjacent)&&(Md=prepareContext(Md,DomUtils,!0)),Ld.unshift(UNIVERSAL_SELECTOR)}rd={...rd,relativeSelector:!1,rootFunc:Hd=>Md.includes(Hd)}}else rd.rootFunc&&rd.rootFunc!==boolbase.trueFunc&&(rd={...rd,rootFunc:boolbase.trueFunc});return Ld.some(isFilter)?findFilterElements(Md,Ld,rd,!1,pd):Fd?findElements(Md,[Ld],rd,pd):filterElements(Md,[Ld],rd)}function findElements(Ra,qa,rd,sd){const pd=_compileToken(qa,rd,Ra);return find$2(Ra,pd,sd)}function find$2(Ra,qa,rd=1/0){const sd=prepareContext(Ra,DomUtils,qa.shouldTestNextSiblings);return find$3(pd=>isTag(pd)&&qa(pd),sd,!0,rd)}function filterElements(Ra,qa,rd){const sd=(Array.isArray(Ra)?Ra:[Ra]).filter(isTag);if(sd.length===0)return sd;const pd=_compileToken(qa,rd);return pd===boolbase.trueFunc?sd:sd.filter(pd)}const reSiblingSelector=/^\s*[+~]/;function find$1(Ra){if(!Ra)return this._make([]);if(typeof Ra!="string"){const qa=isCheerio(Ra)?Ra.toArray():[Ra],rd=this.toArray();return this._make(qa.filter(sd=>rd.some(pd=>contains$1(pd,sd))))}return this._findBySelector(Ra,Number.POSITIVE_INFINITY)}function _findBySelector(Ra,qa){var rd;const sd=this.toArray(),pd=reSiblingSelector.test(Ra)?sd:this.children().toArray(),fd={context:sd,root:(rd=this._root)===null||rd===void 0?void 0:rd[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(select$1(Ra,pd,fd,qa))}function _getMatcher(Ra){return function(qa,...rd){return function(sd){var pd;let fd=Ra(qa,this);return sd&&(fd=filterArray$1(fd,sd,this.options.xmlMode,(pd=this._root)===null||pd===void 0?void 0:pd[0])),this._make(this.length>1&&fd.length>1?rd.reduce((hd,md)=>md(hd),fd):fd)}}}const _matcher=_getMatcher((Ra,qa)=>{let rd=[];for(let sd=0;sd0&&(rd=rd.concat(pd))}return rd}),_singleMatcher=_getMatcher((Ra,qa)=>{const rd=[];for(let sd=0;sd{const hd=[];return domEach(fd,md=>{for(let gd;(gd=pd(md))&&!(rd!=null&&rd(gd,hd.length));md=gd)hd.push(gd)}),hd})(Ra,...qa);return function(pd,fd){rd=typeof pd=="string"?md=>is$2(md,pd,this.options):pd?getFilterFn(pd):null;const hd=sd.call(this,fd);return rd=null,hd}}function _removeDuplicates(Ra){return Ra.length>1?Array.from(new Set(Ra)):Ra}const parent$1=_singleMatcher(({parent:Ra})=>Ra&&!isDocument(Ra)?Ra:null,_removeDuplicates),parents=_matcher(Ra=>{const qa=[];for(;Ra.parent&&!isDocument(Ra.parent);)qa.push(Ra.parent),Ra=Ra.parent;return qa},uniqueSort,Ra=>Ra.reverse()),parentsUntil=_matchUntil(({parent:Ra})=>Ra&&!isDocument(Ra)?Ra:null,uniqueSort,Ra=>Ra.reverse());function closest(Ra){var qa;const rd=[];if(!Ra)return this._make(rd);const sd={xmlMode:this.options.xmlMode,root:(qa=this._root)===null||qa===void 0?void 0:qa[0]},pd=typeof Ra=="string"?fd=>is$2(fd,Ra,sd):getFilterFn(Ra);return domEach(this,fd=>{for(fd&&!isDocument(fd)&&!isTag(fd)&&(fd=fd.parent);fd&&isTag(fd);){if(pd(fd,0)){rd.includes(fd)||rd.push(fd);break}fd=fd.parent}}),this._make(rd)}const next$1=_singleMatcher(Ra=>nextElementSibling(Ra)),nextAll=_matcher(Ra=>{const qa=[];for(;Ra.next;)Ra=Ra.next,isTag(Ra)&&qa.push(Ra);return qa},_removeDuplicates),nextUntil=_matchUntil(Ra=>nextElementSibling(Ra),_removeDuplicates),prev$1=_singleMatcher(Ra=>prevElementSibling(Ra)),prevAll=_matcher(Ra=>{const qa=[];for(;Ra.prev;)Ra=Ra.prev,isTag(Ra)&&qa.push(Ra);return qa},_removeDuplicates),prevUntil=_matchUntil(Ra=>prevElementSibling(Ra),_removeDuplicates),siblings=_matcher(Ra=>getSiblings(Ra).filter(qa=>isTag(qa)&&qa!==Ra),uniqueSort),children$2=_matcher(Ra=>getChildren(Ra).filter(isTag),_removeDuplicates);function contents(){const Ra=this.toArray().reduce((qa,rd)=>hasChildren(rd)?qa.concat(rd.children):qa,[]);return this._make(Ra)}function each$1(Ra){let qa=0;const rd=this.length;for(;qaRa.call(qa,rd,qa):isCheerio(Ra)?qa=>Array.prototype.includes.call(Ra,qa):function(qa){return Ra===qa}}function filter$3(Ra){var qa;return this._make(filterArray$1(this.toArray(),Ra,this.options.xmlMode,(qa=this._root)===null||qa===void 0?void 0:qa[0]))}function filterArray$1(Ra,qa,rd,sd){return typeof qa=="string"?filter$4(qa,Ra,{xmlMode:rd,root:sd}):Ra.filter(getFilterFn(qa))}function is$1(Ra){const qa=this.toArray();return typeof Ra=="string"?some$2(qa.filter(isTag),Ra,this.options):Ra?qa.some(getFilterFn(Ra)):!1}function not$1(Ra){let qa=this.toArray();if(typeof Ra=="string"){const rd=new Set(filter$4(Ra,qa,this.options));qa=qa.filter(sd=>!rd.has(sd))}else{const rd=getFilterFn(Ra);qa=qa.filter((sd,pd)=>!rd(sd,pd))}return this._make(qa)}function has(Ra){return this.filter(typeof Ra=="string"?`:has(${Ra})`:(qa,rd)=>this._make(rd).find(Ra).length>0)}function first(){return this.length>1?this._make(this[0]):this}function last(){return this.length>0?this._make(this[this.length-1]):this}function eq$1(Ra){var qa;return Ra=+Ra,Ra===0&&this.length<=1?this:(Ra<0&&(Ra=this.length+Ra),this._make((qa=this[Ra])!==null&&qa!==void 0?qa:[]))}function get$3(Ra){return Ra==null?this.toArray():this[Ra<0?this.length+Ra:Ra]}function toArray$5(){return Array.prototype.slice.call(this)}function index$1(Ra){let qa,rd;return Ra==null?(qa=this.parent().children(),rd=this[0]):typeof Ra=="string"?(qa=this._make(Ra),rd=this[0]):(qa=this,rd=isCheerio(Ra)?Ra[0]:Ra),Array.prototype.indexOf.call(qa,rd)}function slice$1(Ra,qa){return this._make(Array.prototype.slice.call(this,Ra,qa))}function end$1(){var Ra;return(Ra=this.prevObject)!==null&&Ra!==void 0?Ra:this._make([])}function add(Ra,qa){const rd=this._make(Ra,qa),sd=uniqueSort([...this.get(),...rd.get()]);return this._make(sd)}function addBack(Ra){return this.prevObject?this.add(Ra?this.prevObject.filter(Ra):this.prevObject):this}const Traversing=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector,add,addBack,children:children$2,closest,contents,each:each$1,end:end$1,eq:eq$1,filter:filter$3,filterArray:filterArray$1,find:find$1,first,get:get$3,has,index:index$1,is:is$1,last,map:map$5,next:next$1,nextAll,nextUntil,not:not$1,parent:parent$1,parents,parentsUntil,prev:prev$1,prevAll,prevUntil,siblings,slice:slice$1,toArray:toArray$5},Symbol.toStringTag,{value:"Module"}));function getParse(Ra){return function(rd,sd,pd,fd){if(typeof Buffer$4<"u"&&Buffer$4.isBuffer(rd)&&(rd=rd.toString()),typeof rd=="string")return Ra(rd,sd,pd,fd);const hd=rd;if(!Array.isArray(hd)&&isDocument(hd))return hd;const md=new Document([]);return update(hd,md),md}}function update(Ra,qa){const rd=Array.isArray(Ra)?Ra:[Ra];qa?qa.children=rd:qa=null;for(let sd=0;sd{if(!hasChildren(sd))return;const fd=typeof qa[0]=="function"?qa[0].call(sd,pd,this._render(sd.children)):qa,hd=this._makeDomArray(fd,pd=Ra.length?null:Ra[qa+rd];for(let vd=0;vd-1&&(Md.children.splice(Fd,1),pd===Md&&qa>Fd&&md[0]--)}Nd.parent=pd,Nd.prev&&(Nd.prev.next=(fd=Nd.next)!==null&&fd!==void 0?fd:null),Nd.next&&(Nd.next.prev=(hd=Nd.prev)!==null&&hd!==void 0?hd:null),Nd.prev=vd===0?gd:sd[vd-1],Nd.next=vd===sd.length-1?yd:sd[vd+1]}return gd&&(gd.next=sd[0]),yd&&(yd.prev=sd[sd.length-1]),Ra.splice(...md)}function appendTo(Ra){return(isCheerio(Ra)?Ra:this._make(Ra)).append(this),this}function prependTo(Ra){return(isCheerio(Ra)?Ra:this._make(Ra)).prepend(this),this}const append$2=_insert((Ra,qa,rd)=>{uniqueSplice(qa,qa.length,0,Ra,rd)}),prepend=_insert((Ra,qa,rd)=>{uniqueSplice(qa,0,0,Ra,rd)});function _wrap(Ra){return function(qa){const rd=this.length-1,sd=this.parents().last();for(let pd=0;pd{const{parent:sd}=Ra;if(!sd)return;const pd=sd.children,fd=pd.indexOf(Ra);update([Ra],qa),uniqueSplice(pd,fd,0,rd,sd)}),wrapInner=_wrap((Ra,qa,rd)=>{hasChildren(Ra)&&(update(Ra.children,qa),update(rd,Ra))});function unwrap(Ra){return this.parent(Ra).not("body").each((qa,rd)=>{this._make(rd).replaceWith(rd.children)}),this}function wrapAll(Ra){const qa=this[0];if(qa){const rd=this._make(typeof Ra=="function"?Ra.call(qa,0,qa):Ra).insertBefore(qa);let sd;for(let fd=0;fd{if(!hasChildren(rd)||!rd.parent)return;const pd=rd.parent.children,fd=pd.indexOf(rd);if(fd<0)return;const hd=typeof Ra[0]=="function"?Ra[0].call(rd,sd,this._render(rd.children)):Ra,md=this._makeDomArray(hd,sd{if(!hasChildren(rd)||!rd.parent)return;const pd=rd.parent.children,fd=pd.indexOf(rd);if(fd<0)return;const hd=typeof Ra[0]=="function"?Ra[0].call(rd,sd,this._render(rd.children)):Ra,md=this._makeDomArray(hd,sd{const pd=this.clone().toArray(),{parent:fd}=sd;if(!fd)return;const hd=fd.children,md=hd.indexOf(sd);md<0||(uniqueSplice(hd,md,0,pd,fd),rd.push(...pd))}),this._make(rd)}function remove$1(Ra){const qa=Ra?this.filter(Ra):this;return domEach(qa,rd=>{removeElement(rd),rd.prev=rd.next=rd.parent=null}),this}function replaceWith(Ra){return domEach(this,(qa,rd)=>{const{parent:sd}=qa;if(!sd)return;const pd=sd.children,fd=typeof Ra=="function"?Ra.call(qa,rd,qa):Ra,hd=this._makeDomArray(fd);update(hd,null);const md=pd.indexOf(qa);uniqueSplice(pd,md,1,hd,sd),hd.includes(qa)||(qa.parent=qa.prev=qa.next=null)})}function empty$1(){return domEach(this,Ra=>{if(hasChildren(Ra)){for(const qa of Ra.children)qa.next=qa.prev=qa.parent=null;Ra.children.length=0}})}function html$4(Ra){if(Ra===void 0){const qa=this[0];return!qa||!hasChildren(qa)?null:this._render(qa.children)}return domEach(this,qa=>{if(!hasChildren(qa))return;for(const sd of qa.children)sd.next=sd.prev=sd.parent=null;const rd=isCheerio(Ra)?Ra.toArray():this._parse(`${Ra}`,this.options,!1,qa).children;update(rd,qa)})}function toString$3(){return this._render(this)}function text$2(Ra){return Ra===void 0?text$3(this):typeof Ra=="function"?domEach(this,(qa,rd)=>this._make(qa).text(Ra.call(qa,rd,text$3([qa])))):domEach(this,qa=>{if(!hasChildren(qa))return;for(const sd of qa.children)sd.next=sd.prev=sd.parent=null;const rd=new Text(`${Ra}`);update(rd,qa)})}function clone$2(){const Ra=Array.prototype.map.call(this.get(),rd=>cloneNode(rd,!0)),qa=new Document(Ra);for(const rd of Ra)rd.parent=qa;return this._make(Ra)}const Manipulation=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray,after,append:append$2,appendTo,before,clone:clone$2,empty:empty$1,html:html$4,insertAfter,insertBefore,prepend,prependTo,remove:remove$1,replaceWith,text:text$2,toString:toString$3,unwrap,wrap:wrap$1,wrapAll,wrapInner},Symbol.toStringTag,{value:"Module"}));function css$1(Ra,qa){if(Ra!=null&&qa!=null||typeof Ra=="object"&&!Array.isArray(Ra))return domEach(this,(rd,sd)=>{isTag(rd)&&setCss(rd,Ra,qa,sd)});if(this.length!==0)return getCss(this[0],Ra)}function setCss(Ra,qa,rd,sd){if(typeof qa=="string"){const pd=getCss(Ra),fd=typeof rd=="function"?rd.call(Ra,sd,pd[qa]):rd;fd===""?delete pd[qa]:fd!=null&&(pd[qa]=fd),Ra.attribs.style=stringify$3(pd)}else if(typeof qa=="object"){const pd=Object.keys(qa);for(let fd=0;fd`${qa}${qa?" ":""}${rd}: ${Ra[rd]};`,"")}function parse$6(Ra){if(Ra=(Ra||"").trim(),!Ra)return{};const qa={};let rd;for(const sd of Ra.split(";")){const pd=sd.indexOf(":");if(pd<1||pd===sd.length-1){const fd=sd.trimEnd();fd.length>0&&rd!==void 0&&(qa[rd]+=`;${fd}`)}else rd=sd.slice(0,pd).trim(),qa[rd]=sd.slice(pd+1).trim()}return qa}const Css=Object.freeze(Object.defineProperty({__proto__:null,css:css$1},Symbol.toStringTag,{value:"Module"})),submittableSelector="input,select,textarea,keygen",r20=/%20/g,rCRLF=/\r?\n/g;function serialize$1(){return this.serializeArray().map(rd=>`${encodeURIComponent(rd.name)}=${encodeURIComponent(rd.value)}`).join("&").replace(r20,"+")}function serializeArray(){return this.map((Ra,qa)=>{const rd=this._make(qa);return isTag(qa)&&qa.name==="form"?rd.find(submittableSelector).toArray():rd.filter(submittableSelector).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((Ra,qa)=>{var rd;const sd=this._make(qa),pd=sd.attr("name"),fd=(rd=sd.val())!==null&&rd!==void 0?rd:"";return Array.isArray(fd)?fd.map(hd=>({name:pd,value:hd.replace(rCRLF,`\r -`)})):{name:pd,value:fd.replace(rCRLF,`\r -`)}}).toArray()}const Forms=Object.freeze(Object.defineProperty({__proto__:null,serialize:serialize$1,serializeArray},Symbol.toStringTag,{value:"Module"}));function getExtractDescr(Ra){var qa;return typeof Ra=="string"?{selector:Ra,value:"textContent"}:{selector:Ra.selector,value:(qa=Ra.value)!==null&&qa!==void 0?qa:"textContent"}}function extract(Ra){const qa={};for(const rd in Ra){const sd=Ra[rd],pd=Array.isArray(sd),{selector:fd,value:hd}=getExtractDescr(pd?sd[0]:sd),md=typeof hd=="function"?hd:typeof hd=="string"?gd=>this._make(gd).prop(hd):gd=>this._make(gd).extract(hd);if(pd)qa[rd]=this._findBySelector(fd,Number.POSITIVE_INFINITY).map((gd,yd)=>md(yd,rd,qa)).get();else{const gd=this._findBySelector(fd,1);qa[rd]=gd.length>0?md(gd[0],rd,qa):void 0}}return qa}const Extract=Object.freeze(Object.defineProperty({__proto__:null,extract},Symbol.toStringTag,{value:"Module"}));class Cheerio{constructor(qa,rd,sd){if(this.length=0,this.options=sd,this._root=rd,qa){for(let pd=0;pd=55296&&Ra<=57343}function isSurrogatePair(Ra){return Ra>=56320&&Ra<=57343}function getSurrogatePairCodePoint(Ra,qa){return(Ra-55296)*1024+9216+qa}function isControlCodePoint(Ra){return Ra!==32&&Ra!==10&&Ra!==13&&Ra!==9&&Ra!==12&&Ra>=1&&Ra<=31||Ra>=127&&Ra<=159}function isUndefinedCodePoint(Ra){return Ra>=64976&&Ra<=65007||UNDEFINED_CODE_POINTS.has(Ra)}var ERR;(function(Ra){Ra.controlCharacterInInputStream="control-character-in-input-stream",Ra.noncharacterInInputStream="noncharacter-in-input-stream",Ra.surrogateInInputStream="surrogate-in-input-stream",Ra.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Ra.endTagWithAttributes="end-tag-with-attributes",Ra.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Ra.unexpectedSolidusInTag="unexpected-solidus-in-tag",Ra.unexpectedNullCharacter="unexpected-null-character",Ra.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Ra.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Ra.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Ra.missingEndTagName="missing-end-tag-name",Ra.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Ra.unknownNamedCharacterReference="unknown-named-character-reference",Ra.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Ra.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Ra.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Ra.eofBeforeTagName="eof-before-tag-name",Ra.eofInTag="eof-in-tag",Ra.missingAttributeValue="missing-attribute-value",Ra.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Ra.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Ra.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Ra.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Ra.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Ra.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Ra.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Ra.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Ra.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Ra.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Ra.cdataInHtmlContent="cdata-in-html-content",Ra.incorrectlyOpenedComment="incorrectly-opened-comment",Ra.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Ra.eofInDoctype="eof-in-doctype",Ra.nestedComment="nested-comment",Ra.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Ra.eofInComment="eof-in-comment",Ra.incorrectlyClosedComment="incorrectly-closed-comment",Ra.eofInCdata="eof-in-cdata",Ra.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Ra.nullCharacterReference="null-character-reference",Ra.surrogateCharacterReference="surrogate-character-reference",Ra.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Ra.controlCharacterReference="control-character-reference",Ra.noncharacterCharacterReference="noncharacter-character-reference",Ra.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Ra.missingDoctypeName="missing-doctype-name",Ra.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Ra.duplicateAttribute="duplicate-attribute",Ra.nonConformingDoctype="non-conforming-doctype",Ra.missingDoctype="missing-doctype",Ra.misplacedDoctype="misplaced-doctype",Ra.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Ra.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Ra.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Ra.openElementsLeftAfterEof="open-elements-left-after-eof",Ra.abandonedHeadElementChild="abandoned-head-element-child",Ra.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Ra.nestedNoscriptInHead="nested-noscript-in-head",Ra.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ERR||(ERR={}));const DEFAULT_BUFFER_WATERLINE=65536;class Preprocessor{constructor(qa){this.handler=qa,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(qa,rd){const{line:sd,col:pd,offset:fd}=this,hd=pd+rd,md=fd+rd;return{code:qa,startLine:sd,endLine:sd,startCol:hd,endCol:hd,startOffset:md,endOffset:md}}_err(qa){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(qa,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(qa){if(this.pos!==this.html.length-1){const rd=this.html.charCodeAt(this.pos+1);if(isSurrogatePair(rd))return this.pos++,this._addGap(),getSurrogatePairCodePoint(qa,rd)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,CODE_POINTS.EOF;return this._err(ERR.surrogateInInputStream),qa}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(qa,rd){this.html.length>0?this.html+=qa:this.html=qa,this.endOfChunkHit=!1,this.lastChunkWritten=rd}insertHtmlAtCurrentPos(qa){this.html=this.html.substring(0,this.pos+1)+qa+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(qa,rd){if(this.pos+qa.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(rd)return this.html.startsWith(qa,this.pos);for(let sd=0;sd=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;const sd=this.html.charCodeAt(rd);return sd===CODE_POINTS.CARRIAGE_RETURN?CODE_POINTS.LINE_FEED:sd}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;let qa=this.html.charCodeAt(this.pos);return qa===CODE_POINTS.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,CODE_POINTS.LINE_FEED):qa===CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,isSurrogate(qa)&&(qa=this._processSurrogate(qa)),this.handler.onParseError===null||qa>31&&qa<127||qa===CODE_POINTS.LINE_FEED||qa===CODE_POINTS.CARRIAGE_RETURN||qa>159&&qa<64976||this._checkForProblematicCharacters(qa),qa)}_checkForProblematicCharacters(qa){isControlCodePoint(qa)?this._err(ERR.controlCharacterInInputStream):isUndefinedCodePoint(qa)&&this._err(ERR.noncharacterInInputStream)}retreat(qa){for(this.pos-=qa;this.pos=0;rd--)if(Ra.attrs[rd].name===qa)return Ra.attrs[rd].value;return null}var NS;(function(Ra){Ra.HTML="http://www.w3.org/1999/xhtml",Ra.MATHML="http://www.w3.org/1998/Math/MathML",Ra.SVG="http://www.w3.org/2000/svg",Ra.XLINK="http://www.w3.org/1999/xlink",Ra.XML="http://www.w3.org/XML/1998/namespace",Ra.XMLNS="http://www.w3.org/2000/xmlns/"})(NS||(NS={}));var ATTRS;(function(Ra){Ra.TYPE="type",Ra.ACTION="action",Ra.ENCODING="encoding",Ra.PROMPT="prompt",Ra.NAME="name",Ra.COLOR="color",Ra.FACE="face",Ra.SIZE="size"})(ATTRS||(ATTRS={}));var DOCUMENT_MODE;(function(Ra){Ra.NO_QUIRKS="no-quirks",Ra.QUIRKS="quirks",Ra.LIMITED_QUIRKS="limited-quirks"})(DOCUMENT_MODE||(DOCUMENT_MODE={}));var TAG_NAMES;(function(Ra){Ra.A="a",Ra.ADDRESS="address",Ra.ANNOTATION_XML="annotation-xml",Ra.APPLET="applet",Ra.AREA="area",Ra.ARTICLE="article",Ra.ASIDE="aside",Ra.B="b",Ra.BASE="base",Ra.BASEFONT="basefont",Ra.BGSOUND="bgsound",Ra.BIG="big",Ra.BLOCKQUOTE="blockquote",Ra.BODY="body",Ra.BR="br",Ra.BUTTON="button",Ra.CAPTION="caption",Ra.CENTER="center",Ra.CODE="code",Ra.COL="col",Ra.COLGROUP="colgroup",Ra.DD="dd",Ra.DESC="desc",Ra.DETAILS="details",Ra.DIALOG="dialog",Ra.DIR="dir",Ra.DIV="div",Ra.DL="dl",Ra.DT="dt",Ra.EM="em",Ra.EMBED="embed",Ra.FIELDSET="fieldset",Ra.FIGCAPTION="figcaption",Ra.FIGURE="figure",Ra.FONT="font",Ra.FOOTER="footer",Ra.FOREIGN_OBJECT="foreignObject",Ra.FORM="form",Ra.FRAME="frame",Ra.FRAMESET="frameset",Ra.H1="h1",Ra.H2="h2",Ra.H3="h3",Ra.H4="h4",Ra.H5="h5",Ra.H6="h6",Ra.HEAD="head",Ra.HEADER="header",Ra.HGROUP="hgroup",Ra.HR="hr",Ra.HTML="html",Ra.I="i",Ra.IMG="img",Ra.IMAGE="image",Ra.INPUT="input",Ra.IFRAME="iframe",Ra.KEYGEN="keygen",Ra.LABEL="label",Ra.LI="li",Ra.LINK="link",Ra.LISTING="listing",Ra.MAIN="main",Ra.MALIGNMARK="malignmark",Ra.MARQUEE="marquee",Ra.MATH="math",Ra.MENU="menu",Ra.META="meta",Ra.MGLYPH="mglyph",Ra.MI="mi",Ra.MO="mo",Ra.MN="mn",Ra.MS="ms",Ra.MTEXT="mtext",Ra.NAV="nav",Ra.NOBR="nobr",Ra.NOFRAMES="noframes",Ra.NOEMBED="noembed",Ra.NOSCRIPT="noscript",Ra.OBJECT="object",Ra.OL="ol",Ra.OPTGROUP="optgroup",Ra.OPTION="option",Ra.P="p",Ra.PARAM="param",Ra.PLAINTEXT="plaintext",Ra.PRE="pre",Ra.RB="rb",Ra.RP="rp",Ra.RT="rt",Ra.RTC="rtc",Ra.RUBY="ruby",Ra.S="s",Ra.SCRIPT="script",Ra.SEARCH="search",Ra.SECTION="section",Ra.SELECT="select",Ra.SOURCE="source",Ra.SMALL="small",Ra.SPAN="span",Ra.STRIKE="strike",Ra.STRONG="strong",Ra.STYLE="style",Ra.SUB="sub",Ra.SUMMARY="summary",Ra.SUP="sup",Ra.TABLE="table",Ra.TBODY="tbody",Ra.TEMPLATE="template",Ra.TEXTAREA="textarea",Ra.TFOOT="tfoot",Ra.TD="td",Ra.TH="th",Ra.THEAD="thead",Ra.TITLE="title",Ra.TR="tr",Ra.TRACK="track",Ra.TT="tt",Ra.U="u",Ra.UL="ul",Ra.SVG="svg",Ra.VAR="var",Ra.WBR="wbr",Ra.XMP="xmp"})(TAG_NAMES||(TAG_NAMES={}));var TAG_ID;(function(Ra){Ra[Ra.UNKNOWN=0]="UNKNOWN",Ra[Ra.A=1]="A",Ra[Ra.ADDRESS=2]="ADDRESS",Ra[Ra.ANNOTATION_XML=3]="ANNOTATION_XML",Ra[Ra.APPLET=4]="APPLET",Ra[Ra.AREA=5]="AREA",Ra[Ra.ARTICLE=6]="ARTICLE",Ra[Ra.ASIDE=7]="ASIDE",Ra[Ra.B=8]="B",Ra[Ra.BASE=9]="BASE",Ra[Ra.BASEFONT=10]="BASEFONT",Ra[Ra.BGSOUND=11]="BGSOUND",Ra[Ra.BIG=12]="BIG",Ra[Ra.BLOCKQUOTE=13]="BLOCKQUOTE",Ra[Ra.BODY=14]="BODY",Ra[Ra.BR=15]="BR",Ra[Ra.BUTTON=16]="BUTTON",Ra[Ra.CAPTION=17]="CAPTION",Ra[Ra.CENTER=18]="CENTER",Ra[Ra.CODE=19]="CODE",Ra[Ra.COL=20]="COL",Ra[Ra.COLGROUP=21]="COLGROUP",Ra[Ra.DD=22]="DD",Ra[Ra.DESC=23]="DESC",Ra[Ra.DETAILS=24]="DETAILS",Ra[Ra.DIALOG=25]="DIALOG",Ra[Ra.DIR=26]="DIR",Ra[Ra.DIV=27]="DIV",Ra[Ra.DL=28]="DL",Ra[Ra.DT=29]="DT",Ra[Ra.EM=30]="EM",Ra[Ra.EMBED=31]="EMBED",Ra[Ra.FIELDSET=32]="FIELDSET",Ra[Ra.FIGCAPTION=33]="FIGCAPTION",Ra[Ra.FIGURE=34]="FIGURE",Ra[Ra.FONT=35]="FONT",Ra[Ra.FOOTER=36]="FOOTER",Ra[Ra.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",Ra[Ra.FORM=38]="FORM",Ra[Ra.FRAME=39]="FRAME",Ra[Ra.FRAMESET=40]="FRAMESET",Ra[Ra.H1=41]="H1",Ra[Ra.H2=42]="H2",Ra[Ra.H3=43]="H3",Ra[Ra.H4=44]="H4",Ra[Ra.H5=45]="H5",Ra[Ra.H6=46]="H6",Ra[Ra.HEAD=47]="HEAD",Ra[Ra.HEADER=48]="HEADER",Ra[Ra.HGROUP=49]="HGROUP",Ra[Ra.HR=50]="HR",Ra[Ra.HTML=51]="HTML",Ra[Ra.I=52]="I",Ra[Ra.IMG=53]="IMG",Ra[Ra.IMAGE=54]="IMAGE",Ra[Ra.INPUT=55]="INPUT",Ra[Ra.IFRAME=56]="IFRAME",Ra[Ra.KEYGEN=57]="KEYGEN",Ra[Ra.LABEL=58]="LABEL",Ra[Ra.LI=59]="LI",Ra[Ra.LINK=60]="LINK",Ra[Ra.LISTING=61]="LISTING",Ra[Ra.MAIN=62]="MAIN",Ra[Ra.MALIGNMARK=63]="MALIGNMARK",Ra[Ra.MARQUEE=64]="MARQUEE",Ra[Ra.MATH=65]="MATH",Ra[Ra.MENU=66]="MENU",Ra[Ra.META=67]="META",Ra[Ra.MGLYPH=68]="MGLYPH",Ra[Ra.MI=69]="MI",Ra[Ra.MO=70]="MO",Ra[Ra.MN=71]="MN",Ra[Ra.MS=72]="MS",Ra[Ra.MTEXT=73]="MTEXT",Ra[Ra.NAV=74]="NAV",Ra[Ra.NOBR=75]="NOBR",Ra[Ra.NOFRAMES=76]="NOFRAMES",Ra[Ra.NOEMBED=77]="NOEMBED",Ra[Ra.NOSCRIPT=78]="NOSCRIPT",Ra[Ra.OBJECT=79]="OBJECT",Ra[Ra.OL=80]="OL",Ra[Ra.OPTGROUP=81]="OPTGROUP",Ra[Ra.OPTION=82]="OPTION",Ra[Ra.P=83]="P",Ra[Ra.PARAM=84]="PARAM",Ra[Ra.PLAINTEXT=85]="PLAINTEXT",Ra[Ra.PRE=86]="PRE",Ra[Ra.RB=87]="RB",Ra[Ra.RP=88]="RP",Ra[Ra.RT=89]="RT",Ra[Ra.RTC=90]="RTC",Ra[Ra.RUBY=91]="RUBY",Ra[Ra.S=92]="S",Ra[Ra.SCRIPT=93]="SCRIPT",Ra[Ra.SEARCH=94]="SEARCH",Ra[Ra.SECTION=95]="SECTION",Ra[Ra.SELECT=96]="SELECT",Ra[Ra.SOURCE=97]="SOURCE",Ra[Ra.SMALL=98]="SMALL",Ra[Ra.SPAN=99]="SPAN",Ra[Ra.STRIKE=100]="STRIKE",Ra[Ra.STRONG=101]="STRONG",Ra[Ra.STYLE=102]="STYLE",Ra[Ra.SUB=103]="SUB",Ra[Ra.SUMMARY=104]="SUMMARY",Ra[Ra.SUP=105]="SUP",Ra[Ra.TABLE=106]="TABLE",Ra[Ra.TBODY=107]="TBODY",Ra[Ra.TEMPLATE=108]="TEMPLATE",Ra[Ra.TEXTAREA=109]="TEXTAREA",Ra[Ra.TFOOT=110]="TFOOT",Ra[Ra.TD=111]="TD",Ra[Ra.TH=112]="TH",Ra[Ra.THEAD=113]="THEAD",Ra[Ra.TITLE=114]="TITLE",Ra[Ra.TR=115]="TR",Ra[Ra.TRACK=116]="TRACK",Ra[Ra.TT=117]="TT",Ra[Ra.U=118]="U",Ra[Ra.UL=119]="UL",Ra[Ra.SVG=120]="SVG",Ra[Ra.VAR=121]="VAR",Ra[Ra.WBR=122]="WBR",Ra[Ra.XMP=123]="XMP"})(TAG_ID||(TAG_ID={}));const TAG_NAME_TO_ID=new Map([[TAG_NAMES.A,TAG_ID.A],[TAG_NAMES.ADDRESS,TAG_ID.ADDRESS],[TAG_NAMES.ANNOTATION_XML,TAG_ID.ANNOTATION_XML],[TAG_NAMES.APPLET,TAG_ID.APPLET],[TAG_NAMES.AREA,TAG_ID.AREA],[TAG_NAMES.ARTICLE,TAG_ID.ARTICLE],[TAG_NAMES.ASIDE,TAG_ID.ASIDE],[TAG_NAMES.B,TAG_ID.B],[TAG_NAMES.BASE,TAG_ID.BASE],[TAG_NAMES.BASEFONT,TAG_ID.BASEFONT],[TAG_NAMES.BGSOUND,TAG_ID.BGSOUND],[TAG_NAMES.BIG,TAG_ID.BIG],[TAG_NAMES.BLOCKQUOTE,TAG_ID.BLOCKQUOTE],[TAG_NAMES.BODY,TAG_ID.BODY],[TAG_NAMES.BR,TAG_ID.BR],[TAG_NAMES.BUTTON,TAG_ID.BUTTON],[TAG_NAMES.CAPTION,TAG_ID.CAPTION],[TAG_NAMES.CENTER,TAG_ID.CENTER],[TAG_NAMES.CODE,TAG_ID.CODE],[TAG_NAMES.COL,TAG_ID.COL],[TAG_NAMES.COLGROUP,TAG_ID.COLGROUP],[TAG_NAMES.DD,TAG_ID.DD],[TAG_NAMES.DESC,TAG_ID.DESC],[TAG_NAMES.DETAILS,TAG_ID.DETAILS],[TAG_NAMES.DIALOG,TAG_ID.DIALOG],[TAG_NAMES.DIR,TAG_ID.DIR],[TAG_NAMES.DIV,TAG_ID.DIV],[TAG_NAMES.DL,TAG_ID.DL],[TAG_NAMES.DT,TAG_ID.DT],[TAG_NAMES.EM,TAG_ID.EM],[TAG_NAMES.EMBED,TAG_ID.EMBED],[TAG_NAMES.FIELDSET,TAG_ID.FIELDSET],[TAG_NAMES.FIGCAPTION,TAG_ID.FIGCAPTION],[TAG_NAMES.FIGURE,TAG_ID.FIGURE],[TAG_NAMES.FONT,TAG_ID.FONT],[TAG_NAMES.FOOTER,TAG_ID.FOOTER],[TAG_NAMES.FOREIGN_OBJECT,TAG_ID.FOREIGN_OBJECT],[TAG_NAMES.FORM,TAG_ID.FORM],[TAG_NAMES.FRAME,TAG_ID.FRAME],[TAG_NAMES.FRAMESET,TAG_ID.FRAMESET],[TAG_NAMES.H1,TAG_ID.H1],[TAG_NAMES.H2,TAG_ID.H2],[TAG_NAMES.H3,TAG_ID.H3],[TAG_NAMES.H4,TAG_ID.H4],[TAG_NAMES.H5,TAG_ID.H5],[TAG_NAMES.H6,TAG_ID.H6],[TAG_NAMES.HEAD,TAG_ID.HEAD],[TAG_NAMES.HEADER,TAG_ID.HEADER],[TAG_NAMES.HGROUP,TAG_ID.HGROUP],[TAG_NAMES.HR,TAG_ID.HR],[TAG_NAMES.HTML,TAG_ID.HTML],[TAG_NAMES.I,TAG_ID.I],[TAG_NAMES.IMG,TAG_ID.IMG],[TAG_NAMES.IMAGE,TAG_ID.IMAGE],[TAG_NAMES.INPUT,TAG_ID.INPUT],[TAG_NAMES.IFRAME,TAG_ID.IFRAME],[TAG_NAMES.KEYGEN,TAG_ID.KEYGEN],[TAG_NAMES.LABEL,TAG_ID.LABEL],[TAG_NAMES.LI,TAG_ID.LI],[TAG_NAMES.LINK,TAG_ID.LINK],[TAG_NAMES.LISTING,TAG_ID.LISTING],[TAG_NAMES.MAIN,TAG_ID.MAIN],[TAG_NAMES.MALIGNMARK,TAG_ID.MALIGNMARK],[TAG_NAMES.MARQUEE,TAG_ID.MARQUEE],[TAG_NAMES.MATH,TAG_ID.MATH],[TAG_NAMES.MENU,TAG_ID.MENU],[TAG_NAMES.META,TAG_ID.META],[TAG_NAMES.MGLYPH,TAG_ID.MGLYPH],[TAG_NAMES.MI,TAG_ID.MI],[TAG_NAMES.MO,TAG_ID.MO],[TAG_NAMES.MN,TAG_ID.MN],[TAG_NAMES.MS,TAG_ID.MS],[TAG_NAMES.MTEXT,TAG_ID.MTEXT],[TAG_NAMES.NAV,TAG_ID.NAV],[TAG_NAMES.NOBR,TAG_ID.NOBR],[TAG_NAMES.NOFRAMES,TAG_ID.NOFRAMES],[TAG_NAMES.NOEMBED,TAG_ID.NOEMBED],[TAG_NAMES.NOSCRIPT,TAG_ID.NOSCRIPT],[TAG_NAMES.OBJECT,TAG_ID.OBJECT],[TAG_NAMES.OL,TAG_ID.OL],[TAG_NAMES.OPTGROUP,TAG_ID.OPTGROUP],[TAG_NAMES.OPTION,TAG_ID.OPTION],[TAG_NAMES.P,TAG_ID.P],[TAG_NAMES.PARAM,TAG_ID.PARAM],[TAG_NAMES.PLAINTEXT,TAG_ID.PLAINTEXT],[TAG_NAMES.PRE,TAG_ID.PRE],[TAG_NAMES.RB,TAG_ID.RB],[TAG_NAMES.RP,TAG_ID.RP],[TAG_NAMES.RT,TAG_ID.RT],[TAG_NAMES.RTC,TAG_ID.RTC],[TAG_NAMES.RUBY,TAG_ID.RUBY],[TAG_NAMES.S,TAG_ID.S],[TAG_NAMES.SCRIPT,TAG_ID.SCRIPT],[TAG_NAMES.SEARCH,TAG_ID.SEARCH],[TAG_NAMES.SECTION,TAG_ID.SECTION],[TAG_NAMES.SELECT,TAG_ID.SELECT],[TAG_NAMES.SOURCE,TAG_ID.SOURCE],[TAG_NAMES.SMALL,TAG_ID.SMALL],[TAG_NAMES.SPAN,TAG_ID.SPAN],[TAG_NAMES.STRIKE,TAG_ID.STRIKE],[TAG_NAMES.STRONG,TAG_ID.STRONG],[TAG_NAMES.STYLE,TAG_ID.STYLE],[TAG_NAMES.SUB,TAG_ID.SUB],[TAG_NAMES.SUMMARY,TAG_ID.SUMMARY],[TAG_NAMES.SUP,TAG_ID.SUP],[TAG_NAMES.TABLE,TAG_ID.TABLE],[TAG_NAMES.TBODY,TAG_ID.TBODY],[TAG_NAMES.TEMPLATE,TAG_ID.TEMPLATE],[TAG_NAMES.TEXTAREA,TAG_ID.TEXTAREA],[TAG_NAMES.TFOOT,TAG_ID.TFOOT],[TAG_NAMES.TD,TAG_ID.TD],[TAG_NAMES.TH,TAG_ID.TH],[TAG_NAMES.THEAD,TAG_ID.THEAD],[TAG_NAMES.TITLE,TAG_ID.TITLE],[TAG_NAMES.TR,TAG_ID.TR],[TAG_NAMES.TRACK,TAG_ID.TRACK],[TAG_NAMES.TT,TAG_ID.TT],[TAG_NAMES.U,TAG_ID.U],[TAG_NAMES.UL,TAG_ID.UL],[TAG_NAMES.SVG,TAG_ID.SVG],[TAG_NAMES.VAR,TAG_ID.VAR],[TAG_NAMES.WBR,TAG_ID.WBR],[TAG_NAMES.XMP,TAG_ID.XMP]]);function getTagID(Ra){var qa;return(qa=TAG_NAME_TO_ID.get(Ra))!==null&&qa!==void 0?qa:TAG_ID.UNKNOWN}const $$4=TAG_ID,SPECIAL_ELEMENTS={[NS.HTML]:new Set([$$4.ADDRESS,$$4.APPLET,$$4.AREA,$$4.ARTICLE,$$4.ASIDE,$$4.BASE,$$4.BASEFONT,$$4.BGSOUND,$$4.BLOCKQUOTE,$$4.BODY,$$4.BR,$$4.BUTTON,$$4.CAPTION,$$4.CENTER,$$4.COL,$$4.COLGROUP,$$4.DD,$$4.DETAILS,$$4.DIR,$$4.DIV,$$4.DL,$$4.DT,$$4.EMBED,$$4.FIELDSET,$$4.FIGCAPTION,$$4.FIGURE,$$4.FOOTER,$$4.FORM,$$4.FRAME,$$4.FRAMESET,$$4.H1,$$4.H2,$$4.H3,$$4.H4,$$4.H5,$$4.H6,$$4.HEAD,$$4.HEADER,$$4.HGROUP,$$4.HR,$$4.HTML,$$4.IFRAME,$$4.IMG,$$4.INPUT,$$4.LI,$$4.LINK,$$4.LISTING,$$4.MAIN,$$4.MARQUEE,$$4.MENU,$$4.META,$$4.NAV,$$4.NOEMBED,$$4.NOFRAMES,$$4.NOSCRIPT,$$4.OBJECT,$$4.OL,$$4.P,$$4.PARAM,$$4.PLAINTEXT,$$4.PRE,$$4.SCRIPT,$$4.SECTION,$$4.SELECT,$$4.SOURCE,$$4.STYLE,$$4.SUMMARY,$$4.TABLE,$$4.TBODY,$$4.TD,$$4.TEMPLATE,$$4.TEXTAREA,$$4.TFOOT,$$4.TH,$$4.THEAD,$$4.TITLE,$$4.TR,$$4.TRACK,$$4.UL,$$4.WBR,$$4.XMP]),[NS.MATHML]:new Set([$$4.MI,$$4.MO,$$4.MN,$$4.MS,$$4.MTEXT,$$4.ANNOTATION_XML]),[NS.SVG]:new Set([$$4.TITLE,$$4.FOREIGN_OBJECT,$$4.DESC]),[NS.XLINK]:new Set,[NS.XML]:new Set,[NS.XMLNS]:new Set},NUMBERED_HEADERS=new Set([$$4.H1,$$4.H2,$$4.H3,$$4.H4,$$4.H5,$$4.H6]),UNESCAPED_TEXT=new Set([TAG_NAMES.STYLE,TAG_NAMES.SCRIPT,TAG_NAMES.XMP,TAG_NAMES.IFRAME,TAG_NAMES.NOEMBED,TAG_NAMES.NOFRAMES,TAG_NAMES.PLAINTEXT]);function hasUnescapedText(Ra,qa){return UNESCAPED_TEXT.has(Ra)||qa&&Ra===TAG_NAMES.NOSCRIPT}var State$5;(function(Ra){Ra[Ra.DATA=0]="DATA",Ra[Ra.RCDATA=1]="RCDATA",Ra[Ra.RAWTEXT=2]="RAWTEXT",Ra[Ra.SCRIPT_DATA=3]="SCRIPT_DATA",Ra[Ra.PLAINTEXT=4]="PLAINTEXT",Ra[Ra.TAG_OPEN=5]="TAG_OPEN",Ra[Ra.END_TAG_OPEN=6]="END_TAG_OPEN",Ra[Ra.TAG_NAME=7]="TAG_NAME",Ra[Ra.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Ra[Ra.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Ra[Ra.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Ra[Ra.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Ra[Ra.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Ra[Ra.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Ra[Ra.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Ra[Ra.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Ra[Ra.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Ra[Ra.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Ra[Ra.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Ra[Ra.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Ra[Ra.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Ra[Ra.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Ra[Ra.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Ra[Ra.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Ra[Ra.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Ra[Ra.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Ra[Ra.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Ra[Ra.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Ra[Ra.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Ra[Ra.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Ra[Ra.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Ra[Ra.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Ra[Ra.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Ra[Ra.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Ra[Ra.BOGUS_COMMENT=40]="BOGUS_COMMENT",Ra[Ra.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Ra[Ra.COMMENT_START=42]="COMMENT_START",Ra[Ra.COMMENT_START_DASH=43]="COMMENT_START_DASH",Ra[Ra.COMMENT=44]="COMMENT",Ra[Ra.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Ra[Ra.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Ra[Ra.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Ra[Ra.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Ra[Ra.COMMENT_END_DASH=49]="COMMENT_END_DASH",Ra[Ra.COMMENT_END=50]="COMMENT_END",Ra[Ra.COMMENT_END_BANG=51]="COMMENT_END_BANG",Ra[Ra.DOCTYPE=52]="DOCTYPE",Ra[Ra.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Ra[Ra.DOCTYPE_NAME=54]="DOCTYPE_NAME",Ra[Ra.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Ra[Ra.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Ra[Ra.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Ra[Ra.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Ra[Ra.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Ra[Ra.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Ra[Ra.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Ra[Ra.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Ra[Ra.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Ra[Ra.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Ra[Ra.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Ra[Ra.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Ra[Ra.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Ra[Ra.CDATA_SECTION=68]="CDATA_SECTION",Ra[Ra.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Ra[Ra.CDATA_SECTION_END=70]="CDATA_SECTION_END",Ra[Ra.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Ra[Ra.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(State$5||(State$5={}));const TokenizerMode={DATA:State$5.DATA,RCDATA:State$5.RCDATA,RAWTEXT:State$5.RAWTEXT,SCRIPT_DATA:State$5.SCRIPT_DATA,PLAINTEXT:State$5.PLAINTEXT,CDATA_SECTION:State$5.CDATA_SECTION};function isAsciiDigit(Ra){return Ra>=CODE_POINTS.DIGIT_0&&Ra<=CODE_POINTS.DIGIT_9}function isAsciiUpper(Ra){return Ra>=CODE_POINTS.LATIN_CAPITAL_A&&Ra<=CODE_POINTS.LATIN_CAPITAL_Z}function isAsciiLower(Ra){return Ra>=CODE_POINTS.LATIN_SMALL_A&&Ra<=CODE_POINTS.LATIN_SMALL_Z}function isAsciiLetter(Ra){return isAsciiLower(Ra)||isAsciiUpper(Ra)}function isAsciiAlphaNumeric(Ra){return isAsciiLetter(Ra)||isAsciiDigit(Ra)}function toAsciiLower(Ra){return Ra+32}function isWhitespace$3(Ra){return Ra===CODE_POINTS.SPACE||Ra===CODE_POINTS.LINE_FEED||Ra===CODE_POINTS.TABULATION||Ra===CODE_POINTS.FORM_FEED}function isScriptDataDoubleEscapeSequenceEnd(Ra){return isWhitespace$3(Ra)||Ra===CODE_POINTS.SOLIDUS||Ra===CODE_POINTS.GREATER_THAN_SIGN}function getErrorForNumericCharacterReference(Ra){return Ra===CODE_POINTS.NULL?ERR.nullCharacterReference:Ra>1114111?ERR.characterReferenceOutsideUnicodeRange:isSurrogate(Ra)?ERR.surrogateCharacterReference:isUndefinedCodePoint(Ra)?ERR.noncharacterCharacterReference:isControlCodePoint(Ra)||Ra===CODE_POINTS.CARRIAGE_RETURN?ERR.controlCharacterReference:null}let Tokenizer$1=class{constructor(qa,rd){this.options=qa,this.handler=rd,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=State$5.DATA,this.returnState=State$5.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Preprocessor(rd),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new EntityDecoder(htmlDecodeTree,(sd,pd)=>{this.preprocessor.pos=this.entityStartPos+pd-1,this._flushCodePointConsumedAsCharacterReference(sd)},rd.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ERR.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:sd=>{this._err(ERR.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+sd)},validateNumericCharacterReference:sd=>{const pd=getErrorForNumericCharacterReference(sd);pd&&this._err(pd,1)}}:void 0)}_err(qa,rd=0){var sd,pd;(pd=(sd=this.handler).onParseError)===null||pd===void 0||pd.call(sd,this.preprocessor.getError(qa,rd))}getCurrentLocation(qa){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-qa,startOffset:this.preprocessor.offset-qa,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const qa=this._consume();this._ensureHibernation()||this._callState(qa)}this.inLoop=!1}}pause(){this.paused=!0}resume(qa){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||qa==null||qa())}write(qa,rd,sd){this.active=!0,this.preprocessor.write(qa,rd),this._runParsingLoop(),this.paused||sd==null||sd()}insertHtmlAtCurrentPos(qa){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(qa),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(qa){this.consumedAfterSnapshot+=qa;for(let rd=0;rd0&&this._err(ERR.endTagWithAttributes),qa.selfClosing&&this._err(ERR.endTagWithTrailingSolidus),this.handler.onEndTag(qa)),this.preprocessor.dropParsedChunk()}emitCurrentComment(qa){this.prepareToken(qa),this.handler.onComment(qa),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(qa){this.prepareToken(qa),this.handler.onDoctype(qa),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(qa){if(this.currentCharacterToken){switch(qa&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=qa.startLine,this.currentCharacterToken.location.endCol=qa.startCol,this.currentCharacterToken.location.endOffset=qa.startOffset),this.currentCharacterToken.type){case TokenType.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case TokenType.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case TokenType.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const qa=this.getCurrentLocation(0);qa&&(qa.endLine=qa.startLine,qa.endCol=qa.startCol,qa.endOffset=qa.startOffset),this._emitCurrentCharacterToken(qa),this.handler.onEof({type:TokenType.EOF,location:qa}),this.active=!1}_appendCharToCurrentCharacterToken(qa,rd){if(this.currentCharacterToken)if(this.currentCharacterToken.type===qa){this.currentCharacterToken.chars+=rd;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(qa,rd)}_emitCodePoint(qa){const rd=isWhitespace$3(qa)?TokenType.WHITESPACE_CHARACTER:qa===CODE_POINTS.NULL?TokenType.NULL_CHARACTER:TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(rd,String.fromCodePoint(qa))}_emitChars(qa){this._appendCharToCurrentCharacterToken(TokenType.CHARACTER,qa)}_startCharacterReference(){this.returnState=this.state,this.state=State$5.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?DecodingMode.Attribute:DecodingMode.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===State$5.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===State$5.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===State$5.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(qa){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(qa):this._emitCodePoint(qa)}_callState(qa){switch(this.state){case State$5.DATA:{this._stateData(qa);break}case State$5.RCDATA:{this._stateRcdata(qa);break}case State$5.RAWTEXT:{this._stateRawtext(qa);break}case State$5.SCRIPT_DATA:{this._stateScriptData(qa);break}case State$5.PLAINTEXT:{this._statePlaintext(qa);break}case State$5.TAG_OPEN:{this._stateTagOpen(qa);break}case State$5.END_TAG_OPEN:{this._stateEndTagOpen(qa);break}case State$5.TAG_NAME:{this._stateTagName(qa);break}case State$5.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(qa);break}case State$5.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(qa);break}case State$5.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(qa);break}case State$5.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(qa);break}case State$5.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(qa);break}case State$5.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(qa);break}case State$5.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(qa);break}case State$5.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(qa);break}case State$5.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(qa);break}case State$5.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(qa);break}case State$5.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(qa);break}case State$5.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(qa);break}case State$5.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(qa);break}case State$5.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(qa);break}case State$5.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(qa);break}case State$5.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(qa);break}case State$5.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(qa);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(qa);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(qa);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(qa);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(qa);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(qa);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(qa);break}case State$5.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(qa);break}case State$5.ATTRIBUTE_NAME:{this._stateAttributeName(qa);break}case State$5.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(qa);break}case State$5.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(qa);break}case State$5.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(qa);break}case State$5.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(qa);break}case State$5.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(qa);break}case State$5.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(qa);break}case State$5.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(qa);break}case State$5.BOGUS_COMMENT:{this._stateBogusComment(qa);break}case State$5.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(qa);break}case State$5.COMMENT_START:{this._stateCommentStart(qa);break}case State$5.COMMENT_START_DASH:{this._stateCommentStartDash(qa);break}case State$5.COMMENT:{this._stateComment(qa);break}case State$5.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(qa);break}case State$5.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(qa);break}case State$5.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(qa);break}case State$5.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(qa);break}case State$5.COMMENT_END_DASH:{this._stateCommentEndDash(qa);break}case State$5.COMMENT_END:{this._stateCommentEnd(qa);break}case State$5.COMMENT_END_BANG:{this._stateCommentEndBang(qa);break}case State$5.DOCTYPE:{this._stateDoctype(qa);break}case State$5.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(qa);break}case State$5.DOCTYPE_NAME:{this._stateDoctypeName(qa);break}case State$5.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(qa);break}case State$5.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(qa);break}case State$5.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(qa);break}case State$5.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(qa);break}case State$5.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(qa);break}case State$5.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(qa);break}case State$5.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(qa);break}case State$5.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(qa);break}case State$5.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(qa);break}case State$5.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(qa);break}case State$5.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(qa);break}case State$5.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(qa);break}case State$5.BOGUS_DOCTYPE:{this._stateBogusDoctype(qa);break}case State$5.CDATA_SECTION:{this._stateCdataSection(qa);break}case State$5.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(qa);break}case State$5.CDATA_SECTION_END:{this._stateCdataSectionEnd(qa);break}case State$5.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case State$5.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(qa);break}default:throw new Error("Unknown state")}}_stateData(qa){switch(qa){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.TAG_OPEN;break}case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitCodePoint(qa);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(qa)}}_stateRcdata(qa){switch(qa){case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.RCDATA_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(qa)}}_stateRawtext(qa){switch(qa){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.RAWTEXT_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(qa)}}_stateScriptData(qa){switch(qa){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.SCRIPT_DATA_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(qa)}}_statePlaintext(qa){switch(qa){case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(qa)}}_stateTagOpen(qa){if(isAsciiLetter(qa))this._createStartTagToken(),this.state=State$5.TAG_NAME,this._stateTagName(qa);else switch(qa){case CODE_POINTS.EXCLAMATION_MARK:{this.state=State$5.MARKUP_DECLARATION_OPEN;break}case CODE_POINTS.SOLIDUS:{this.state=State$5.END_TAG_OPEN;break}case CODE_POINTS.QUESTION_MARK:{this._err(ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=State$5.BOGUS_COMMENT,this._stateBogusComment(qa);break}case CODE_POINTS.EOF:{this._err(ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=State$5.DATA,this._stateData(qa)}}_stateEndTagOpen(qa){if(isAsciiLetter(qa))this._createEndTagToken(),this.state=State$5.TAG_NAME,this._stateTagName(qa);else switch(qa){case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingEndTagName),this.state=State$5.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofBeforeTagName),this._emitChars("");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$5.SCRIPT_DATA_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$5.SCRIPT_DATA_ESCAPED,this._emitCodePoint(qa)}}_stateScriptDataEscapedLessThanSign(qa){qa===CODE_POINTS.SOLIDUS?this.state=State$5.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:isAsciiLetter(qa)?(this._emitChars("<"),this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(qa)):(this._emitChars("<"),this.state=State$5.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(qa))}_stateScriptDataEscapedEndTagOpen(qa){isAsciiLetter(qa)?(this.state=State$5.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(qa)):(this._emitChars("");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(qa)}}_stateScriptDataDoubleEscapedLessThanSign(qa){qa===CODE_POINTS.SOLIDUS?(this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(qa))}_stateScriptDataDoubleEscapeEnd(qa){if(this.preprocessor.startsWith(SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))){this._emitCodePoint(qa);for(let rd=0;rd0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(qa,!0)}replace(qa,rd){const sd=this._indexOf(qa);this.items[sd]=rd,sd===this.stackTop&&(this.current=rd)}insertAfter(qa,rd,sd){const pd=this._indexOf(qa)+1;this.items.splice(pd,0,rd),this.tagIDs.splice(pd,0,sd),this.stackTop++,pd===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,pd===this.stackTop)}popUntilTagNamePopped(qa){let rd=this.stackTop+1;do rd=this.tagIDs.lastIndexOf(qa,rd-1);while(rd>0&&this.treeAdapter.getNamespaceURI(this.items[rd])!==NS.HTML);this.shortenToLength(rd<0?0:rd)}shortenToLength(qa){for(;this.stackTop>=qa;){const rd=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(rd,this.stackTop=0;sd--)if(qa.has(this.tagIDs[sd])&&this.treeAdapter.getNamespaceURI(this.items[sd])===rd)return sd;return-1}clearBackTo(qa,rd){const sd=this._indexOfTagNames(qa,rd);this.shortenToLength(sd+1)}clearBackToTableContext(){this.clearBackTo(TABLE_CONTEXT,NS.HTML)}clearBackToTableBodyContext(){this.clearBackTo(TABLE_BODY_CONTEXT,NS.HTML)}clearBackToTableRowContext(){this.clearBackTo(TABLE_ROW_CONTEXT,NS.HTML)}remove(qa){const rd=this._indexOf(qa);rd>=0&&(rd===this.stackTop?this.pop():(this.items.splice(rd,1),this.tagIDs.splice(rd,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(qa,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===TAG_ID.BODY?this.items[1]:null}contains(qa){return this._indexOf(qa)>-1}getCommonAncestor(qa){const rd=this._indexOf(qa)-1;return rd>=0?this.items[rd]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===TAG_ID.HTML}hasInDynamicScope(qa,rd){for(let sd=this.stackTop;sd>=0;sd--){const pd=this.tagIDs[sd];switch(this.treeAdapter.getNamespaceURI(this.items[sd])){case NS.HTML:{if(pd===qa)return!0;if(rd.has(pd))return!1;break}case NS.SVG:{if(SCOPING_ELEMENTS_SVG.has(pd))return!1;break}case NS.MATHML:{if(SCOPING_ELEMENTS_MATHML.has(pd))return!1;break}}}return!0}hasInScope(qa){return this.hasInDynamicScope(qa,SCOPING_ELEMENTS_HTML)}hasInListItemScope(qa){return this.hasInDynamicScope(qa,SCOPING_ELEMENTS_HTML_LIST)}hasInButtonScope(qa){return this.hasInDynamicScope(qa,SCOPING_ELEMENTS_HTML_BUTTON)}hasNumberedHeaderInScope(){for(let qa=this.stackTop;qa>=0;qa--){const rd=this.tagIDs[qa];switch(this.treeAdapter.getNamespaceURI(this.items[qa])){case NS.HTML:{if(NUMBERED_HEADERS.has(rd))return!0;if(SCOPING_ELEMENTS_HTML.has(rd))return!1;break}case NS.SVG:{if(SCOPING_ELEMENTS_SVG.has(rd))return!1;break}case NS.MATHML:{if(SCOPING_ELEMENTS_MATHML.has(rd))return!1;break}}}return!0}hasInTableScope(qa){for(let rd=this.stackTop;rd>=0;rd--)if(this.treeAdapter.getNamespaceURI(this.items[rd])===NS.HTML)switch(this.tagIDs[rd]){case qa:return!0;case TAG_ID.TABLE:case TAG_ID.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let qa=this.stackTop;qa>=0;qa--)if(this.treeAdapter.getNamespaceURI(this.items[qa])===NS.HTML)switch(this.tagIDs[qa]){case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:return!0;case TAG_ID.TABLE:case TAG_ID.HTML:return!1}return!0}hasInSelectScope(qa){for(let rd=this.stackTop;rd>=0;rd--)if(this.treeAdapter.getNamespaceURI(this.items[rd])===NS.HTML)switch(this.tagIDs[rd]){case qa:return!0;case TAG_ID.OPTION:case TAG_ID.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(qa){for(;this.currentTagId!==qa&&IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}}const NOAH_ARK_CAPACITY=3;var EntryType;(function(Ra){Ra[Ra.Marker=0]="Marker",Ra[Ra.Element=1]="Element"})(EntryType||(EntryType={}));const MARKER={type:EntryType.Marker};class FormattingElementList{constructor(qa){this.treeAdapter=qa,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(qa,rd){const sd=[],pd=rd.length,fd=this.treeAdapter.getTagName(qa),hd=this.treeAdapter.getNamespaceURI(qa);for(let md=0;md[hd.name,hd.value]));let fd=0;for(let hd=0;hdpd.get(gd.name)===gd.value)&&(fd+=1,fd>=NOAH_ARK_CAPACITY&&this.entries.splice(md.idx,1))}}insertMarker(){this.entries.unshift(MARKER)}pushElement(qa,rd){this._ensureNoahArkCondition(qa),this.entries.unshift({type:EntryType.Element,element:qa,token:rd})}insertElementAfterBookmark(qa,rd){const sd=this.entries.indexOf(this.bookmark);this.entries.splice(sd,0,{type:EntryType.Element,element:qa,token:rd})}removeEntry(qa){const rd=this.entries.indexOf(qa);rd>=0&&this.entries.splice(rd,1)}clearToLastMarker(){const qa=this.entries.indexOf(MARKER);qa>=0?this.entries.splice(0,qa+1):this.entries.length=0}getElementEntryInScopeWithTagName(qa){const rd=this.entries.find(sd=>sd.type===EntryType.Marker||this.treeAdapter.getTagName(sd.element)===qa);return rd&&rd.type===EntryType.Element?rd:null}getElementEntry(qa){return this.entries.find(rd=>rd.type===EntryType.Element&&rd.element===qa)}}const defaultTreeAdapter={createDocument(){return{nodeName:"#document",mode:DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(Ra,qa,rd){return{nodeName:Ra,tagName:Ra,attrs:rd,namespaceURI:qa,childNodes:[],parentNode:null}},createCommentNode(Ra){return{nodeName:"#comment",data:Ra,parentNode:null}},createTextNode(Ra){return{nodeName:"#text",value:Ra,parentNode:null}},appendChild(Ra,qa){Ra.childNodes.push(qa),qa.parentNode=Ra},insertBefore(Ra,qa,rd){const sd=Ra.childNodes.indexOf(rd);Ra.childNodes.splice(sd,0,qa),qa.parentNode=Ra},setTemplateContent(Ra,qa){Ra.content=qa},getTemplateContent(Ra){return Ra.content},setDocumentType(Ra,qa,rd,sd){const pd=Ra.childNodes.find(fd=>fd.nodeName==="#documentType");if(pd)pd.name=qa,pd.publicId=rd,pd.systemId=sd;else{const fd={nodeName:"#documentType",name:qa,publicId:rd,systemId:sd,parentNode:null};defaultTreeAdapter.appendChild(Ra,fd)}},setDocumentMode(Ra,qa){Ra.mode=qa},getDocumentMode(Ra){return Ra.mode},detachNode(Ra){if(Ra.parentNode){const qa=Ra.parentNode.childNodes.indexOf(Ra);Ra.parentNode.childNodes.splice(qa,1),Ra.parentNode=null}},insertText(Ra,qa){if(Ra.childNodes.length>0){const rd=Ra.childNodes[Ra.childNodes.length-1];if(defaultTreeAdapter.isTextNode(rd)){rd.value+=qa;return}}defaultTreeAdapter.appendChild(Ra,defaultTreeAdapter.createTextNode(qa))},insertTextBefore(Ra,qa,rd){const sd=Ra.childNodes[Ra.childNodes.indexOf(rd)-1];sd&&defaultTreeAdapter.isTextNode(sd)?sd.value+=qa:defaultTreeAdapter.insertBefore(Ra,defaultTreeAdapter.createTextNode(qa),rd)},adoptAttributes(Ra,qa){const rd=new Set(Ra.attrs.map(sd=>sd.name));for(let sd=0;sdRa.startsWith(rd))}function isConforming(Ra){return Ra.name===VALID_DOCTYPE_NAME&&Ra.publicId===null&&(Ra.systemId===null||Ra.systemId===VALID_SYSTEM_ID)}function getDocumentMode(Ra){if(Ra.name!==VALID_DOCTYPE_NAME)return DOCUMENT_MODE.QUIRKS;const{systemId:qa}=Ra;if(qa&&qa.toLowerCase()===QUIRKS_MODE_SYSTEM_ID)return DOCUMENT_MODE.QUIRKS;let{publicId:rd}=Ra;if(rd!==null){if(rd=rd.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS.has(rd))return DOCUMENT_MODE.QUIRKS;let sd=qa===null?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(rd,sd))return DOCUMENT_MODE.QUIRKS;if(sd=qa===null?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(rd,sd))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS}const MIME_TYPES={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},DEFINITION_URL_ATTR="definitionurl",ADJUSTED_DEFINITION_URL_ATTR="definitionURL",SVG_ATTRS_ADJUSTMENT_MAP=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(Ra=>[Ra.toLowerCase(),Ra])),XML_ATTRS_ADJUSTMENT_MAP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:NS.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:NS.XMLNS}]]),SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(Ra=>[Ra.toLowerCase(),Ra])),EXITS_FOREIGN_CONTENT=new Set([TAG_ID.B,TAG_ID.BIG,TAG_ID.BLOCKQUOTE,TAG_ID.BODY,TAG_ID.BR,TAG_ID.CENTER,TAG_ID.CODE,TAG_ID.DD,TAG_ID.DIV,TAG_ID.DL,TAG_ID.DT,TAG_ID.EM,TAG_ID.EMBED,TAG_ID.H1,TAG_ID.H2,TAG_ID.H3,TAG_ID.H4,TAG_ID.H5,TAG_ID.H6,TAG_ID.HEAD,TAG_ID.HR,TAG_ID.I,TAG_ID.IMG,TAG_ID.LI,TAG_ID.LISTING,TAG_ID.MENU,TAG_ID.META,TAG_ID.NOBR,TAG_ID.OL,TAG_ID.P,TAG_ID.PRE,TAG_ID.RUBY,TAG_ID.S,TAG_ID.SMALL,TAG_ID.SPAN,TAG_ID.STRONG,TAG_ID.STRIKE,TAG_ID.SUB,TAG_ID.SUP,TAG_ID.TABLE,TAG_ID.TT,TAG_ID.U,TAG_ID.UL,TAG_ID.VAR]);function causesExit(Ra){const qa=Ra.tagID;return qa===TAG_ID.FONT&&Ra.attrs.some(({name:sd})=>sd===ATTRS.COLOR||sd===ATTRS.SIZE||sd===ATTRS.FACE)||EXITS_FOREIGN_CONTENT.has(qa)}function adjustTokenMathMLAttrs(Ra){for(let qa=0;qa0&&this._setContextModes(qa,rd)}onItemPop(qa,rd){var sd,pd;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(qa,this.currentToken),(pd=(sd=this.treeAdapter).onItemPop)===null||pd===void 0||pd.call(sd,qa,this.openElements.current),rd){let fd,hd;this.openElements.stackTop===0&&this.fragmentContext?(fd=this.fragmentContext,hd=this.fragmentContextID):{current:fd,currentTagId:hd}=this.openElements,this._setContextModes(fd,hd)}}_setContextModes(qa,rd){const sd=qa===this.document||this.treeAdapter.getNamespaceURI(qa)===NS.HTML;this.currentNotInHTML=!sd,this.tokenizer.inForeignNode=!sd&&!this._isIntegrationPoint(rd,qa)}_switchToTextParsing(qa,rd){this._insertElement(qa,NS.HTML),this.tokenizer.state=rd,this.originalInsertionMode=this.insertionMode,this.insertionMode=InsertionMode.TEXT}switchToPlaintextParsing(){this.insertionMode=InsertionMode.TEXT,this.originalInsertionMode=InsertionMode.IN_BODY,this.tokenizer.state=TokenizerMode.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let qa=this.fragmentContext;for(;qa;){if(this.treeAdapter.getTagName(qa)===TAG_NAMES.FORM){this.formElement=qa;break}qa=this.treeAdapter.getParentNode(qa)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==NS.HTML))switch(this.fragmentContextID){case TAG_ID.TITLE:case TAG_ID.TEXTAREA:{this.tokenizer.state=TokenizerMode.RCDATA;break}case TAG_ID.STYLE:case TAG_ID.XMP:case TAG_ID.IFRAME:case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:case TAG_ID.NOSCRIPT:{this.tokenizer.state=TokenizerMode.RAWTEXT;break}case TAG_ID.SCRIPT:{this.tokenizer.state=TokenizerMode.SCRIPT_DATA;break}case TAG_ID.PLAINTEXT:{this.tokenizer.state=TokenizerMode.PLAINTEXT;break}}}_setDocumentType(qa){const rd=qa.name||"",sd=qa.publicId||"",pd=qa.systemId||"";if(this.treeAdapter.setDocumentType(this.document,rd,sd,pd),qa.location){const hd=this.treeAdapter.getChildNodes(this.document).find(md=>this.treeAdapter.isDocumentTypeNode(md));hd&&this.treeAdapter.setNodeSourceCodeLocation(hd,qa.location)}}_attachElementToTree(qa,rd){if(this.options.sourceCodeLocationInfo){const sd=rd&&{...rd,startTag:rd};this.treeAdapter.setNodeSourceCodeLocation(qa,sd)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(qa);else{const sd=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(sd,qa)}}_appendElement(qa,rd){const sd=this.treeAdapter.createElement(qa.tagName,rd,qa.attrs);this._attachElementToTree(sd,qa.location)}_insertElement(qa,rd){const sd=this.treeAdapter.createElement(qa.tagName,rd,qa.attrs);this._attachElementToTree(sd,qa.location),this.openElements.push(sd,qa.tagID)}_insertFakeElement(qa,rd){const sd=this.treeAdapter.createElement(qa,NS.HTML,[]);this._attachElementToTree(sd,null),this.openElements.push(sd,rd)}_insertTemplate(qa){const rd=this.treeAdapter.createElement(qa.tagName,NS.HTML,qa.attrs),sd=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(rd,sd),this._attachElementToTree(rd,qa.location),this.openElements.push(rd,qa.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(sd,null)}_insertFakeRootElement(){const qa=this.treeAdapter.createElement(TAG_NAMES.HTML,NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(qa,null),this.treeAdapter.appendChild(this.openElements.current,qa),this.openElements.push(qa,TAG_ID.HTML)}_appendCommentNode(qa,rd){const sd=this.treeAdapter.createCommentNode(qa.data);this.treeAdapter.appendChild(rd,sd),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(sd,qa.location)}_insertCharacters(qa){let rd,sd;if(this._shouldFosterParentOnInsertion()?({parent:rd,beforeElement:sd}=this._findFosterParentingLocation(),sd?this.treeAdapter.insertTextBefore(rd,qa.chars,sd):this.treeAdapter.insertText(rd,qa.chars)):(rd=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(rd,qa.chars)),!qa.location)return;const pd=this.treeAdapter.getChildNodes(rd),fd=sd?pd.lastIndexOf(sd):pd.length,hd=pd[fd-1];if(this.treeAdapter.getNodeSourceCodeLocation(hd)){const{endLine:gd,endCol:yd,endOffset:vd}=qa.location;this.treeAdapter.updateNodeSourceCodeLocation(hd,{endLine:gd,endCol:yd,endOffset:vd})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(hd,qa.location)}_adoptNodes(qa,rd){for(let sd=this.treeAdapter.getFirstChild(qa);sd;sd=this.treeAdapter.getFirstChild(qa))this.treeAdapter.detachNode(sd),this.treeAdapter.appendChild(rd,sd)}_setEndLocation(qa,rd){if(this.treeAdapter.getNodeSourceCodeLocation(qa)&&rd.location){const sd=rd.location,pd=this.treeAdapter.getTagName(qa),fd=rd.type===TokenType.END_TAG&&pd===rd.tagName?{endTag:{...sd},endLine:sd.endLine,endCol:sd.endCol,endOffset:sd.endOffset}:{endLine:sd.startLine,endCol:sd.startCol,endOffset:sd.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(qa,fd)}}shouldProcessStartTagTokenInForeignContent(qa){if(!this.currentNotInHTML)return!1;let rd,sd;return this.openElements.stackTop===0&&this.fragmentContext?(rd=this.fragmentContext,sd=this.fragmentContextID):{current:rd,currentTagId:sd}=this.openElements,qa.tagID===TAG_ID.SVG&&this.treeAdapter.getTagName(rd)===TAG_NAMES.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(rd)===NS.MATHML?!1:this.tokenizer.inForeignNode||(qa.tagID===TAG_ID.MGLYPH||qa.tagID===TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(sd,rd,NS.HTML)}_processToken(qa){switch(qa.type){case TokenType.CHARACTER:{this.onCharacter(qa);break}case TokenType.NULL_CHARACTER:{this.onNullCharacter(qa);break}case TokenType.COMMENT:{this.onComment(qa);break}case TokenType.DOCTYPE:{this.onDoctype(qa);break}case TokenType.START_TAG:{this._processStartTag(qa);break}case TokenType.END_TAG:{this.onEndTag(qa);break}case TokenType.EOF:{this.onEof(qa);break}case TokenType.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(qa);break}}}_isIntegrationPoint(qa,rd,sd){const pd=this.treeAdapter.getNamespaceURI(rd),fd=this.treeAdapter.getAttrList(rd);return isIntegrationPoint(qa,pd,fd,sd)}_reconstructActiveFormattingElements(){const qa=this.activeFormattingElements.entries.length;if(qa){const rd=this.activeFormattingElements.entries.findIndex(pd=>pd.type===EntryType.Marker||this.openElements.contains(pd.element)),sd=rd<0?qa-1:rd-1;for(let pd=sd;pd>=0;pd--){const fd=this.activeFormattingElements.entries[pd];this._insertElement(fd.token,this.treeAdapter.getNamespaceURI(fd.element)),fd.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=InsertionMode.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P),this.openElements.popUntilTagNamePopped(TAG_ID.P)}_resetInsertionMode(){for(let qa=this.openElements.stackTop;qa>=0;qa--)switch(qa===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[qa]){case TAG_ID.TR:{this.insertionMode=InsertionMode.IN_ROW;return}case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:{this.insertionMode=InsertionMode.IN_TABLE_BODY;return}case TAG_ID.CAPTION:{this.insertionMode=InsertionMode.IN_CAPTION;return}case TAG_ID.COLGROUP:{this.insertionMode=InsertionMode.IN_COLUMN_GROUP;return}case TAG_ID.TABLE:{this.insertionMode=InsertionMode.IN_TABLE;return}case TAG_ID.BODY:{this.insertionMode=InsertionMode.IN_BODY;return}case TAG_ID.FRAMESET:{this.insertionMode=InsertionMode.IN_FRAMESET;return}case TAG_ID.SELECT:{this._resetInsertionModeForSelect(qa);return}case TAG_ID.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case TAG_ID.HTML:{this.insertionMode=this.headElement?InsertionMode.AFTER_HEAD:InsertionMode.BEFORE_HEAD;return}case TAG_ID.TD:case TAG_ID.TH:{if(qa>0){this.insertionMode=InsertionMode.IN_CELL;return}break}case TAG_ID.HEAD:{if(qa>0){this.insertionMode=InsertionMode.IN_HEAD;return}break}}this.insertionMode=InsertionMode.IN_BODY}_resetInsertionModeForSelect(qa){if(qa>0)for(let rd=qa-1;rd>0;rd--){const sd=this.openElements.tagIDs[rd];if(sd===TAG_ID.TEMPLATE)break;if(sd===TAG_ID.TABLE){this.insertionMode=InsertionMode.IN_SELECT_IN_TABLE;return}}this.insertionMode=InsertionMode.IN_SELECT}_isElementCausesFosterParenting(qa){return TABLE_STRUCTURE_TAGS.has(qa)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let qa=this.openElements.stackTop;qa>=0;qa--){const rd=this.openElements.items[qa];switch(this.openElements.tagIDs[qa]){case TAG_ID.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(rd)===NS.HTML)return{parent:this.treeAdapter.getTemplateContent(rd),beforeElement:null};break}case TAG_ID.TABLE:{const sd=this.treeAdapter.getParentNode(rd);return sd?{parent:sd,beforeElement:rd}:{parent:this.openElements.items[qa-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(qa){const rd=this._findFosterParentingLocation();rd.beforeElement?this.treeAdapter.insertBefore(rd.parent,qa,rd.beforeElement):this.treeAdapter.appendChild(rd.parent,qa)}_isSpecialElement(qa,rd){const sd=this.treeAdapter.getNamespaceURI(qa);return SPECIAL_ELEMENTS[sd].has(rd)}onCharacter(qa){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){characterInForeignContent(this,qa);return}switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,qa);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,qa);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,qa);break}case InsertionMode.IN_HEAD:{tokenInHead(this,qa);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,qa);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,qa);break}case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:{characterInBody(this,qa);break}case InsertionMode.TEXT:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:{this._insertCharacters(qa);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,qa);break}case InsertionMode.IN_TABLE_TEXT:{characterInTableText(this,qa);break}case InsertionMode.IN_COLUMN_GROUP:{tokenInColumnGroup(this,qa);break}case InsertionMode.AFTER_BODY:{tokenAfterBody(this,qa);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,qa);break}}}onNullCharacter(qa){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nullCharacterInForeignContent(this,qa);return}switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,qa);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,qa);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,qa);break}case InsertionMode.IN_HEAD:{tokenInHead(this,qa);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,qa);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,qa);break}case InsertionMode.TEXT:{this._insertCharacters(qa);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,qa);break}case InsertionMode.IN_COLUMN_GROUP:{tokenInColumnGroup(this,qa);break}case InsertionMode.AFTER_BODY:{tokenAfterBody(this,qa);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,qa);break}}}onComment(qa){if(this.skipNextNewLine=!1,this.currentNotInHTML){appendComment(this,qa);return}switch(this.insertionMode){case InsertionMode.INITIAL:case InsertionMode.BEFORE_HTML:case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_TEMPLATE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:{appendComment(this,qa);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,qa);break}case InsertionMode.AFTER_BODY:{appendCommentToRootHtmlElement(this,qa);break}case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{appendCommentToDocument(this,qa);break}}}onDoctype(qa){switch(this.skipNextNewLine=!1,this.insertionMode){case InsertionMode.INITIAL:{doctypeInInitialMode(this,qa);break}case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:{this._err(qa,ERR.misplacedDoctype);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,qa);break}}}onStartTag(qa){this.skipNextNewLine=!1,this.currentToken=qa,this._processStartTag(qa),qa.selfClosing&&!qa.ackSelfClosing&&this._err(qa,ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(qa){this.shouldProcessStartTagTokenInForeignContent(qa)?startTagInForeignContent(this,qa):this._startTagOutsideForeignContent(qa)}_startTagOutsideForeignContent(qa){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,qa);break}case InsertionMode.BEFORE_HTML:{startTagBeforeHtml(this,qa);break}case InsertionMode.BEFORE_HEAD:{startTagBeforeHead(this,qa);break}case InsertionMode.IN_HEAD:{startTagInHead(this,qa);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{startTagInHeadNoScript(this,qa);break}case InsertionMode.AFTER_HEAD:{startTagAfterHead(this,qa);break}case InsertionMode.IN_BODY:{startTagInBody(this,qa);break}case InsertionMode.IN_TABLE:{startTagInTable(this,qa);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,qa);break}case InsertionMode.IN_CAPTION:{startTagInCaption(this,qa);break}case InsertionMode.IN_COLUMN_GROUP:{startTagInColumnGroup(this,qa);break}case InsertionMode.IN_TABLE_BODY:{startTagInTableBody(this,qa);break}case InsertionMode.IN_ROW:{startTagInRow(this,qa);break}case InsertionMode.IN_CELL:{startTagInCell(this,qa);break}case InsertionMode.IN_SELECT:{startTagInSelect(this,qa);break}case InsertionMode.IN_SELECT_IN_TABLE:{startTagInSelectInTable(this,qa);break}case InsertionMode.IN_TEMPLATE:{startTagInTemplate(this,qa);break}case InsertionMode.AFTER_BODY:{startTagAfterBody(this,qa);break}case InsertionMode.IN_FRAMESET:{startTagInFrameset(this,qa);break}case InsertionMode.AFTER_FRAMESET:{startTagAfterFrameset(this,qa);break}case InsertionMode.AFTER_AFTER_BODY:{startTagAfterAfterBody(this,qa);break}case InsertionMode.AFTER_AFTER_FRAMESET:{startTagAfterAfterFrameset(this,qa);break}}}onEndTag(qa){this.skipNextNewLine=!1,this.currentToken=qa,this.currentNotInHTML?endTagInForeignContent(this,qa):this._endTagOutsideForeignContent(qa)}_endTagOutsideForeignContent(qa){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,qa);break}case InsertionMode.BEFORE_HTML:{endTagBeforeHtml(this,qa);break}case InsertionMode.BEFORE_HEAD:{endTagBeforeHead(this,qa);break}case InsertionMode.IN_HEAD:{endTagInHead(this,qa);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{endTagInHeadNoScript(this,qa);break}case InsertionMode.AFTER_HEAD:{endTagAfterHead(this,qa);break}case InsertionMode.IN_BODY:{endTagInBody(this,qa);break}case InsertionMode.TEXT:{endTagInText(this,qa);break}case InsertionMode.IN_TABLE:{endTagInTable(this,qa);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,qa);break}case InsertionMode.IN_CAPTION:{endTagInCaption(this,qa);break}case InsertionMode.IN_COLUMN_GROUP:{endTagInColumnGroup(this,qa);break}case InsertionMode.IN_TABLE_BODY:{endTagInTableBody(this,qa);break}case InsertionMode.IN_ROW:{endTagInRow(this,qa);break}case InsertionMode.IN_CELL:{endTagInCell(this,qa);break}case InsertionMode.IN_SELECT:{endTagInSelect(this,qa);break}case InsertionMode.IN_SELECT_IN_TABLE:{endTagInSelectInTable(this,qa);break}case InsertionMode.IN_TEMPLATE:{endTagInTemplate(this,qa);break}case InsertionMode.AFTER_BODY:{endTagAfterBody(this,qa);break}case InsertionMode.IN_FRAMESET:{endTagInFrameset(this,qa);break}case InsertionMode.AFTER_FRAMESET:{endTagAfterFrameset(this,qa);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,qa);break}}}onEof(qa){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,qa);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,qa);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,qa);break}case InsertionMode.IN_HEAD:{tokenInHead(this,qa);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,qa);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,qa);break}case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:{eofInBody(this,qa);break}case InsertionMode.TEXT:{eofInText(this,qa);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,qa);break}case InsertionMode.IN_TEMPLATE:{eofInTemplate(this,qa);break}case InsertionMode.AFTER_BODY:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{stopParsing(this,qa);break}}}onWhitespaceCharacter(qa){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,qa.chars.charCodeAt(0)===CODE_POINTS.LINE_FEED)){if(qa.chars.length===1)return;qa.chars=qa.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(qa);return}switch(this.insertionMode){case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.TEXT:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:{this._insertCharacters(qa);break}case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:case InsertionMode.AFTER_BODY:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{whitespaceCharacterInBody(this,qa);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,qa);break}case InsertionMode.IN_TABLE_TEXT:{whitespaceCharacterInTableText(this,qa);break}}}};function aaObtainFormattingElementEntry(Ra,qa){let rd=Ra.activeFormattingElements.getElementEntryInScopeWithTagName(qa.tagName);return rd?Ra.openElements.contains(rd.element)?Ra.openElements.hasInScope(qa.tagID)||(rd=null):(Ra.activeFormattingElements.removeEntry(rd),rd=null):genericEndTagInBody(Ra,qa),rd}function aaObtainFurthestBlock(Ra,qa){let rd=null,sd=Ra.openElements.stackTop;for(;sd>=0;sd--){const pd=Ra.openElements.items[sd];if(pd===qa.element)break;Ra._isSpecialElement(pd,Ra.openElements.tagIDs[sd])&&(rd=pd)}return rd||(Ra.openElements.shortenToLength(sd<0?0:sd),Ra.activeFormattingElements.removeEntry(qa)),rd}function aaInnerLoop(Ra,qa,rd){let sd=qa,pd=Ra.openElements.getCommonAncestor(qa);for(let fd=0,hd=pd;hd!==rd;fd++,hd=pd){pd=Ra.openElements.getCommonAncestor(hd);const md=Ra.activeFormattingElements.getElementEntry(hd),gd=md&&fd>=AA_INNER_LOOP_ITER;!md||gd?(gd&&Ra.activeFormattingElements.removeEntry(md),Ra.openElements.remove(hd)):(hd=aaRecreateElementFromEntry(Ra,md),sd===qa&&(Ra.activeFormattingElements.bookmark=md),Ra.treeAdapter.detachNode(sd),Ra.treeAdapter.appendChild(hd,sd),sd=hd)}return sd}function aaRecreateElementFromEntry(Ra,qa){const rd=Ra.treeAdapter.getNamespaceURI(qa.element),sd=Ra.treeAdapter.createElement(qa.token.tagName,rd,qa.token.attrs);return Ra.openElements.replace(qa.element,sd),qa.element=sd,sd}function aaInsertLastNodeInCommonAncestor(Ra,qa,rd){const sd=Ra.treeAdapter.getTagName(qa),pd=getTagID(sd);if(Ra._isElementCausesFosterParenting(pd))Ra._fosterParentElement(rd);else{const fd=Ra.treeAdapter.getNamespaceURI(qa);pd===TAG_ID.TEMPLATE&&fd===NS.HTML&&(qa=Ra.treeAdapter.getTemplateContent(qa)),Ra.treeAdapter.appendChild(qa,rd)}}function aaReplaceFormattingElement(Ra,qa,rd){const sd=Ra.treeAdapter.getNamespaceURI(rd.element),{token:pd}=rd,fd=Ra.treeAdapter.createElement(pd.tagName,sd,pd.attrs);Ra._adoptNodes(qa,fd),Ra.treeAdapter.appendChild(qa,fd),Ra.activeFormattingElements.insertElementAfterBookmark(fd,pd),Ra.activeFormattingElements.removeEntry(rd),Ra.openElements.remove(rd.element),Ra.openElements.insertAfter(qa,fd,pd.tagID)}function callAdoptionAgency(Ra,qa){for(let rd=0;rd=rd;sd--)Ra._setEndLocation(Ra.openElements.items[sd],qa);if(!Ra.fragmentContext&&Ra.openElements.stackTop>=0){const sd=Ra.openElements.items[0],pd=Ra.treeAdapter.getNodeSourceCodeLocation(sd);if(pd&&!pd.endTag&&(Ra._setEndLocation(sd,qa),Ra.openElements.stackTop>=1)){const fd=Ra.openElements.items[1],hd=Ra.treeAdapter.getNodeSourceCodeLocation(fd);hd&&!hd.endTag&&Ra._setEndLocation(fd,qa)}}}}function doctypeInInitialMode(Ra,qa){Ra._setDocumentType(qa);const rd=qa.forceQuirks?DOCUMENT_MODE.QUIRKS:getDocumentMode(qa);isConforming(qa)||Ra._err(qa,ERR.nonConformingDoctype),Ra.treeAdapter.setDocumentMode(Ra.document,rd),Ra.insertionMode=InsertionMode.BEFORE_HTML}function tokenInInitialMode(Ra,qa){Ra._err(qa,ERR.missingDoctype,!0),Ra.treeAdapter.setDocumentMode(Ra.document,DOCUMENT_MODE.QUIRKS),Ra.insertionMode=InsertionMode.BEFORE_HTML,Ra._processToken(qa)}function startTagBeforeHtml(Ra,qa){qa.tagID===TAG_ID.HTML?(Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.BEFORE_HEAD):tokenBeforeHtml(Ra,qa)}function endTagBeforeHtml(Ra,qa){const rd=qa.tagID;(rd===TAG_ID.HTML||rd===TAG_ID.HEAD||rd===TAG_ID.BODY||rd===TAG_ID.BR)&&tokenBeforeHtml(Ra,qa)}function tokenBeforeHtml(Ra,qa){Ra._insertFakeRootElement(),Ra.insertionMode=InsertionMode.BEFORE_HEAD,Ra._processToken(qa)}function startTagBeforeHead(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.HEAD:{Ra._insertElement(qa,NS.HTML),Ra.headElement=Ra.openElements.current,Ra.insertionMode=InsertionMode.IN_HEAD;break}default:tokenBeforeHead(Ra,qa)}}function endTagBeforeHead(Ra,qa){const rd=qa.tagID;rd===TAG_ID.HEAD||rd===TAG_ID.BODY||rd===TAG_ID.HTML||rd===TAG_ID.BR?tokenBeforeHead(Ra,qa):Ra._err(qa,ERR.endTagWithoutMatchingOpenElement)}function tokenBeforeHead(Ra,qa){Ra._insertFakeElement(TAG_NAMES.HEAD,TAG_ID.HEAD),Ra.headElement=Ra.openElements.current,Ra.insertionMode=InsertionMode.IN_HEAD,Ra._processToken(qa)}function startTagInHead(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:{Ra._appendElement(qa,NS.HTML),qa.ackSelfClosing=!0;break}case TAG_ID.TITLE:{Ra._switchToTextParsing(qa,TokenizerMode.RCDATA);break}case TAG_ID.NOSCRIPT:{Ra.options.scriptingEnabled?Ra._switchToTextParsing(qa,TokenizerMode.RAWTEXT):(Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.IN_HEAD_NO_SCRIPT);break}case TAG_ID.NOFRAMES:case TAG_ID.STYLE:{Ra._switchToTextParsing(qa,TokenizerMode.RAWTEXT);break}case TAG_ID.SCRIPT:{Ra._switchToTextParsing(qa,TokenizerMode.SCRIPT_DATA);break}case TAG_ID.TEMPLATE:{Ra._insertTemplate(qa),Ra.activeFormattingElements.insertMarker(),Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.IN_TEMPLATE,Ra.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);break}case TAG_ID.HEAD:{Ra._err(qa,ERR.misplacedStartTagForHeadElement);break}default:tokenInHead(Ra,qa)}}function endTagInHead(Ra,qa){switch(qa.tagID){case TAG_ID.HEAD:{Ra.openElements.pop(),Ra.insertionMode=InsertionMode.AFTER_HEAD;break}case TAG_ID.BODY:case TAG_ID.BR:case TAG_ID.HTML:{tokenInHead(Ra,qa);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,qa);break}default:Ra._err(qa,ERR.endTagWithoutMatchingOpenElement)}}function templateEndTagInHead(Ra,qa){Ra.openElements.tmplCount>0?(Ra.openElements.generateImpliedEndTagsThoroughly(),Ra.openElements.currentTagId!==TAG_ID.TEMPLATE&&Ra._err(qa,ERR.closingOfElementWithOpenChildElements),Ra.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),Ra.activeFormattingElements.clearToLastMarker(),Ra.tmplInsertionModeStack.shift(),Ra._resetInsertionMode()):Ra._err(qa,ERR.endTagWithoutMatchingOpenElement)}function tokenInHead(Ra,qa){Ra.openElements.pop(),Ra.insertionMode=InsertionMode.AFTER_HEAD,Ra._processToken(qa)}function startTagInHeadNoScript(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.HEAD:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.STYLE:{startTagInHead(Ra,qa);break}case TAG_ID.NOSCRIPT:{Ra._err(qa,ERR.nestedNoscriptInHead);break}default:tokenInHeadNoScript(Ra,qa)}}function endTagInHeadNoScript(Ra,qa){switch(qa.tagID){case TAG_ID.NOSCRIPT:{Ra.openElements.pop(),Ra.insertionMode=InsertionMode.IN_HEAD;break}case TAG_ID.BR:{tokenInHeadNoScript(Ra,qa);break}default:Ra._err(qa,ERR.endTagWithoutMatchingOpenElement)}}function tokenInHeadNoScript(Ra,qa){const rd=qa.type===TokenType.EOF?ERR.openElementsLeftAfterEof:ERR.disallowedContentInNoscriptInHead;Ra._err(qa,rd),Ra.openElements.pop(),Ra.insertionMode=InsertionMode.IN_HEAD,Ra._processToken(qa)}function startTagAfterHead(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.BODY:{Ra._insertElement(qa,NS.HTML),Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.IN_BODY;break}case TAG_ID.FRAMESET:{Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.IN_FRAMESET;break}case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:{Ra._err(qa,ERR.abandonedHeadElementChild),Ra.openElements.push(Ra.headElement,TAG_ID.HEAD),startTagInHead(Ra,qa),Ra.openElements.remove(Ra.headElement);break}case TAG_ID.HEAD:{Ra._err(qa,ERR.misplacedStartTagForHeadElement);break}default:tokenAfterHead(Ra,qa)}}function endTagAfterHead(Ra,qa){switch(qa.tagID){case TAG_ID.BODY:case TAG_ID.HTML:case TAG_ID.BR:{tokenAfterHead(Ra,qa);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,qa);break}default:Ra._err(qa,ERR.endTagWithoutMatchingOpenElement)}}function tokenAfterHead(Ra,qa){Ra._insertFakeElement(TAG_NAMES.BODY,TAG_ID.BODY),Ra.insertionMode=InsertionMode.IN_BODY,modeInBody(Ra,qa)}function modeInBody(Ra,qa){switch(qa.type){case TokenType.CHARACTER:{characterInBody(Ra,qa);break}case TokenType.WHITESPACE_CHARACTER:{whitespaceCharacterInBody(Ra,qa);break}case TokenType.COMMENT:{appendComment(Ra,qa);break}case TokenType.START_TAG:{startTagInBody(Ra,qa);break}case TokenType.END_TAG:{endTagInBody(Ra,qa);break}case TokenType.EOF:{eofInBody(Ra,qa);break}}}function whitespaceCharacterInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._insertCharacters(qa)}function characterInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._insertCharacters(qa),Ra.framesetOk=!1}function htmlStartTagInBody(Ra,qa){Ra.openElements.tmplCount===0&&Ra.treeAdapter.adoptAttributes(Ra.openElements.items[0],qa.attrs)}function bodyStartTagInBody(Ra,qa){const rd=Ra.openElements.tryPeekProperlyNestedBodyElement();rd&&Ra.openElements.tmplCount===0&&(Ra.framesetOk=!1,Ra.treeAdapter.adoptAttributes(rd,qa.attrs))}function framesetStartTagInBody(Ra,qa){const rd=Ra.openElements.tryPeekProperlyNestedBodyElement();Ra.framesetOk&&rd&&(Ra.treeAdapter.detachNode(rd),Ra.openElements.popAllUpToHtmlElement(),Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.IN_FRAMESET)}function addressStartTagInBody(Ra,qa){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(qa,NS.HTML)}function numberedHeaderStartTagInBody(Ra,qa){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),NUMBERED_HEADERS.has(Ra.openElements.currentTagId)&&Ra.openElements.pop(),Ra._insertElement(qa,NS.HTML)}function preStartTagInBody(Ra,qa){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(qa,NS.HTML),Ra.skipNextNewLine=!0,Ra.framesetOk=!1}function formStartTagInBody(Ra,qa){const rd=Ra.openElements.tmplCount>0;(!Ra.formElement||rd)&&(Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(qa,NS.HTML),rd||(Ra.formElement=Ra.openElements.current))}function listItemStartTagInBody(Ra,qa){Ra.framesetOk=!1;const rd=qa.tagID;for(let sd=Ra.openElements.stackTop;sd>=0;sd--){const pd=Ra.openElements.tagIDs[sd];if(rd===TAG_ID.LI&&pd===TAG_ID.LI||(rd===TAG_ID.DD||rd===TAG_ID.DT)&&(pd===TAG_ID.DD||pd===TAG_ID.DT)){Ra.openElements.generateImpliedEndTagsWithExclusion(pd),Ra.openElements.popUntilTagNamePopped(pd);break}if(pd!==TAG_ID.ADDRESS&&pd!==TAG_ID.DIV&&pd!==TAG_ID.P&&Ra._isSpecialElement(Ra.openElements.items[sd],pd))break}Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(qa,NS.HTML)}function plaintextStartTagInBody(Ra,qa){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(qa,NS.HTML),Ra.tokenizer.state=TokenizerMode.PLAINTEXT}function buttonStartTagInBody(Ra,qa){Ra.openElements.hasInScope(TAG_ID.BUTTON)&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilTagNamePopped(TAG_ID.BUTTON)),Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML),Ra.framesetOk=!1}function aStartTagInBody(Ra,qa){const rd=Ra.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);rd&&(callAdoptionAgency(Ra,qa),Ra.openElements.remove(rd.element),Ra.activeFormattingElements.removeEntry(rd)),Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML),Ra.activeFormattingElements.pushElement(Ra.openElements.current,qa)}function bStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML),Ra.activeFormattingElements.pushElement(Ra.openElements.current,qa)}function nobrStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra.openElements.hasInScope(TAG_ID.NOBR)&&(callAdoptionAgency(Ra,qa),Ra._reconstructActiveFormattingElements()),Ra._insertElement(qa,NS.HTML),Ra.activeFormattingElements.pushElement(Ra.openElements.current,qa)}function appletStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML),Ra.activeFormattingElements.insertMarker(),Ra.framesetOk=!1}function tableStartTagInBody(Ra,qa){Ra.treeAdapter.getDocumentMode(Ra.document)!==DOCUMENT_MODE.QUIRKS&&Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(qa,NS.HTML),Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.IN_TABLE}function areaStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._appendElement(qa,NS.HTML),Ra.framesetOk=!1,qa.ackSelfClosing=!0}function isHiddenInput(Ra){const qa=getTokenAttr(Ra,ATTRS.TYPE);return qa!=null&&qa.toLowerCase()===HIDDEN_INPUT_TYPE}function inputStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._appendElement(qa,NS.HTML),isHiddenInput(qa)||(Ra.framesetOk=!1),qa.ackSelfClosing=!0}function paramStartTagInBody(Ra,qa){Ra._appendElement(qa,NS.HTML),qa.ackSelfClosing=!0}function hrStartTagInBody(Ra,qa){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._appendElement(qa,NS.HTML),Ra.framesetOk=!1,qa.ackSelfClosing=!0}function imageStartTagInBody(Ra,qa){qa.tagName=TAG_NAMES.IMG,qa.tagID=TAG_ID.IMG,areaStartTagInBody(Ra,qa)}function textareaStartTagInBody(Ra,qa){Ra._insertElement(qa,NS.HTML),Ra.skipNextNewLine=!0,Ra.tokenizer.state=TokenizerMode.RCDATA,Ra.originalInsertionMode=Ra.insertionMode,Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.TEXT}function xmpStartTagInBody(Ra,qa){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._reconstructActiveFormattingElements(),Ra.framesetOk=!1,Ra._switchToTextParsing(qa,TokenizerMode.RAWTEXT)}function iframeStartTagInBody(Ra,qa){Ra.framesetOk=!1,Ra._switchToTextParsing(qa,TokenizerMode.RAWTEXT)}function rawTextStartTagInBody(Ra,qa){Ra._switchToTextParsing(qa,TokenizerMode.RAWTEXT)}function selectStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML),Ra.framesetOk=!1,Ra.insertionMode=Ra.insertionMode===InsertionMode.IN_TABLE||Ra.insertionMode===InsertionMode.IN_CAPTION||Ra.insertionMode===InsertionMode.IN_TABLE_BODY||Ra.insertionMode===InsertionMode.IN_ROW||Ra.insertionMode===InsertionMode.IN_CELL?InsertionMode.IN_SELECT_IN_TABLE:InsertionMode.IN_SELECT}function optgroupStartTagInBody(Ra,qa){Ra.openElements.currentTagId===TAG_ID.OPTION&&Ra.openElements.pop(),Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML)}function rbStartTagInBody(Ra,qa){Ra.openElements.hasInScope(TAG_ID.RUBY)&&Ra.openElements.generateImpliedEndTags(),Ra._insertElement(qa,NS.HTML)}function rtStartTagInBody(Ra,qa){Ra.openElements.hasInScope(TAG_ID.RUBY)&&Ra.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC),Ra._insertElement(qa,NS.HTML)}function mathStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),adjustTokenMathMLAttrs(qa),adjustTokenXMLAttrs(qa),qa.selfClosing?Ra._appendElement(qa,NS.MATHML):Ra._insertElement(qa,NS.MATHML),qa.ackSelfClosing=!0}function svgStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),adjustTokenSVGAttrs(qa),adjustTokenXMLAttrs(qa),qa.selfClosing?Ra._appendElement(qa,NS.SVG):Ra._insertElement(qa,NS.SVG),qa.ackSelfClosing=!0}function genericStartTagInBody(Ra,qa){Ra._reconstructActiveFormattingElements(),Ra._insertElement(qa,NS.HTML)}function startTagInBody(Ra,qa){switch(qa.tagID){case TAG_ID.I:case TAG_ID.S:case TAG_ID.B:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:{bStartTagInBody(Ra,qa);break}case TAG_ID.A:{aStartTagInBody(Ra,qa);break}case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:{numberedHeaderStartTagInBody(Ra,qa);break}case TAG_ID.P:case TAG_ID.DL:case TAG_ID.OL:case TAG_ID.UL:case TAG_ID.DIV:case TAG_ID.DIR:case TAG_ID.NAV:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.DETAILS:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.SEARCH:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:{addressStartTagInBody(Ra,qa);break}case TAG_ID.LI:case TAG_ID.DD:case TAG_ID.DT:{listItemStartTagInBody(Ra,qa);break}case TAG_ID.BR:case TAG_ID.IMG:case TAG_ID.WBR:case TAG_ID.AREA:case TAG_ID.EMBED:case TAG_ID.KEYGEN:{areaStartTagInBody(Ra,qa);break}case TAG_ID.HR:{hrStartTagInBody(Ra,qa);break}case TAG_ID.RB:case TAG_ID.RTC:{rbStartTagInBody(Ra,qa);break}case TAG_ID.RT:case TAG_ID.RP:{rtStartTagInBody(Ra,qa);break}case TAG_ID.PRE:case TAG_ID.LISTING:{preStartTagInBody(Ra,qa);break}case TAG_ID.XMP:{xmpStartTagInBody(Ra,qa);break}case TAG_ID.SVG:{svgStartTagInBody(Ra,qa);break}case TAG_ID.HTML:{htmlStartTagInBody(Ra,qa);break}case TAG_ID.BASE:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.STYLE:case TAG_ID.TITLE:case TAG_ID.SCRIPT:case TAG_ID.BGSOUND:case TAG_ID.BASEFONT:case TAG_ID.TEMPLATE:{startTagInHead(Ra,qa);break}case TAG_ID.BODY:{bodyStartTagInBody(Ra,qa);break}case TAG_ID.FORM:{formStartTagInBody(Ra,qa);break}case TAG_ID.NOBR:{nobrStartTagInBody(Ra,qa);break}case TAG_ID.MATH:{mathStartTagInBody(Ra,qa);break}case TAG_ID.TABLE:{tableStartTagInBody(Ra,qa);break}case TAG_ID.INPUT:{inputStartTagInBody(Ra,qa);break}case TAG_ID.PARAM:case TAG_ID.TRACK:case TAG_ID.SOURCE:{paramStartTagInBody(Ra,qa);break}case TAG_ID.IMAGE:{imageStartTagInBody(Ra,qa);break}case TAG_ID.BUTTON:{buttonStartTagInBody(Ra,qa);break}case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:{appletStartTagInBody(Ra,qa);break}case TAG_ID.IFRAME:{iframeStartTagInBody(Ra,qa);break}case TAG_ID.SELECT:{selectStartTagInBody(Ra,qa);break}case TAG_ID.OPTION:case TAG_ID.OPTGROUP:{optgroupStartTagInBody(Ra,qa);break}case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:{rawTextStartTagInBody(Ra,qa);break}case TAG_ID.FRAMESET:{framesetStartTagInBody(Ra,qa);break}case TAG_ID.TEXTAREA:{textareaStartTagInBody(Ra,qa);break}case TAG_ID.NOSCRIPT:{Ra.options.scriptingEnabled?rawTextStartTagInBody(Ra,qa):genericStartTagInBody(Ra,qa);break}case TAG_ID.PLAINTEXT:{plaintextStartTagInBody(Ra,qa);break}case TAG_ID.COL:case TAG_ID.TH:case TAG_ID.TD:case TAG_ID.TR:case TAG_ID.HEAD:case TAG_ID.FRAME:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.CAPTION:case TAG_ID.COLGROUP:break;default:genericStartTagInBody(Ra,qa)}}function bodyEndTagInBody(Ra,qa){if(Ra.openElements.hasInScope(TAG_ID.BODY)&&(Ra.insertionMode=InsertionMode.AFTER_BODY,Ra.options.sourceCodeLocationInfo)){const rd=Ra.openElements.tryPeekProperlyNestedBodyElement();rd&&Ra._setEndLocation(rd,qa)}}function htmlEndTagInBody(Ra,qa){Ra.openElements.hasInScope(TAG_ID.BODY)&&(Ra.insertionMode=InsertionMode.AFTER_BODY,endTagAfterBody(Ra,qa))}function addressEndTagInBody(Ra,qa){const rd=qa.tagID;Ra.openElements.hasInScope(rd)&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilTagNamePopped(rd))}function formEndTagInBody(Ra){const qa=Ra.openElements.tmplCount>0,{formElement:rd}=Ra;qa||(Ra.formElement=null),(rd||qa)&&Ra.openElements.hasInScope(TAG_ID.FORM)&&(Ra.openElements.generateImpliedEndTags(),qa?Ra.openElements.popUntilTagNamePopped(TAG_ID.FORM):rd&&Ra.openElements.remove(rd))}function pEndTagInBody(Ra){Ra.openElements.hasInButtonScope(TAG_ID.P)||Ra._insertFakeElement(TAG_NAMES.P,TAG_ID.P),Ra._closePElement()}function liEndTagInBody(Ra){Ra.openElements.hasInListItemScope(TAG_ID.LI)&&(Ra.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI),Ra.openElements.popUntilTagNamePopped(TAG_ID.LI))}function ddEndTagInBody(Ra,qa){const rd=qa.tagID;Ra.openElements.hasInScope(rd)&&(Ra.openElements.generateImpliedEndTagsWithExclusion(rd),Ra.openElements.popUntilTagNamePopped(rd))}function numberedHeaderEndTagInBody(Ra){Ra.openElements.hasNumberedHeaderInScope()&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody(Ra,qa){const rd=qa.tagID;Ra.openElements.hasInScope(rd)&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilTagNamePopped(rd),Ra.activeFormattingElements.clearToLastMarker())}function brEndTagInBody(Ra){Ra._reconstructActiveFormattingElements(),Ra._insertFakeElement(TAG_NAMES.BR,TAG_ID.BR),Ra.openElements.pop(),Ra.framesetOk=!1}function genericEndTagInBody(Ra,qa){const rd=qa.tagName,sd=qa.tagID;for(let pd=Ra.openElements.stackTop;pd>0;pd--){const fd=Ra.openElements.items[pd],hd=Ra.openElements.tagIDs[pd];if(sd===hd&&(sd!==TAG_ID.UNKNOWN||Ra.treeAdapter.getTagName(fd)===rd)){Ra.openElements.generateImpliedEndTagsWithExclusion(sd),Ra.openElements.stackTop>=pd&&Ra.openElements.shortenToLength(pd);break}if(Ra._isSpecialElement(fd,hd))break}}function endTagInBody(Ra,qa){switch(qa.tagID){case TAG_ID.A:case TAG_ID.B:case TAG_ID.I:case TAG_ID.S:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.NOBR:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:{callAdoptionAgency(Ra,qa);break}case TAG_ID.P:{pEndTagInBody(Ra);break}case TAG_ID.DL:case TAG_ID.UL:case TAG_ID.OL:case TAG_ID.DIR:case TAG_ID.DIV:case TAG_ID.NAV:case TAG_ID.PRE:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.BUTTON:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.DETAILS:case TAG_ID.SEARCH:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.LISTING:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:{addressEndTagInBody(Ra,qa);break}case TAG_ID.LI:{liEndTagInBody(Ra);break}case TAG_ID.DD:case TAG_ID.DT:{ddEndTagInBody(Ra,qa);break}case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:{numberedHeaderEndTagInBody(Ra);break}case TAG_ID.BR:{brEndTagInBody(Ra);break}case TAG_ID.BODY:{bodyEndTagInBody(Ra,qa);break}case TAG_ID.HTML:{htmlEndTagInBody(Ra,qa);break}case TAG_ID.FORM:{formEndTagInBody(Ra);break}case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:{appletEndTagInBody(Ra,qa);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,qa);break}default:genericEndTagInBody(Ra,qa)}}function eofInBody(Ra,qa){Ra.tmplInsertionModeStack.length>0?eofInTemplate(Ra,qa):stopParsing(Ra,qa)}function endTagInText(Ra,qa){var rd;qa.tagID===TAG_ID.SCRIPT&&((rd=Ra.scriptHandler)===null||rd===void 0||rd.call(Ra,Ra.openElements.current)),Ra.openElements.pop(),Ra.insertionMode=Ra.originalInsertionMode}function eofInText(Ra,qa){Ra._err(qa,ERR.eofInElementThatCanContainOnlyText),Ra.openElements.pop(),Ra.insertionMode=Ra.originalInsertionMode,Ra.onEof(qa)}function characterInTable(Ra,qa){if(TABLE_STRUCTURE_TAGS.has(Ra.openElements.currentTagId))switch(Ra.pendingCharacterTokens.length=0,Ra.hasNonWhitespacePendingCharacterToken=!1,Ra.originalInsertionMode=Ra.insertionMode,Ra.insertionMode=InsertionMode.IN_TABLE_TEXT,qa.type){case TokenType.CHARACTER:{characterInTableText(Ra,qa);break}case TokenType.WHITESPACE_CHARACTER:{whitespaceCharacterInTableText(Ra,qa);break}}else tokenInTable(Ra,qa)}function captionStartTagInTable(Ra,qa){Ra.openElements.clearBackToTableContext(),Ra.activeFormattingElements.insertMarker(),Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.IN_CAPTION}function colgroupStartTagInTable(Ra,qa){Ra.openElements.clearBackToTableContext(),Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.IN_COLUMN_GROUP}function colStartTagInTable(Ra,qa){Ra.openElements.clearBackToTableContext(),Ra._insertFakeElement(TAG_NAMES.COLGROUP,TAG_ID.COLGROUP),Ra.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(Ra,qa)}function tbodyStartTagInTable(Ra,qa){Ra.openElements.clearBackToTableContext(),Ra._insertElement(qa,NS.HTML),Ra.insertionMode=InsertionMode.IN_TABLE_BODY}function tdStartTagInTable(Ra,qa){Ra.openElements.clearBackToTableContext(),Ra._insertFakeElement(TAG_NAMES.TBODY,TAG_ID.TBODY),Ra.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Ra,qa)}function tableStartTagInTable(Ra,qa){Ra.openElements.hasInTableScope(TAG_ID.TABLE)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.TABLE),Ra._resetInsertionMode(),Ra._processStartTag(qa))}function inputStartTagInTable(Ra,qa){isHiddenInput(qa)?Ra._appendElement(qa,NS.HTML):tokenInTable(Ra,qa),qa.ackSelfClosing=!0}function formStartTagInTable(Ra,qa){!Ra.formElement&&Ra.openElements.tmplCount===0&&(Ra._insertElement(qa,NS.HTML),Ra.formElement=Ra.openElements.current,Ra.openElements.pop())}function startTagInTable(Ra,qa){switch(qa.tagID){case TAG_ID.TD:case TAG_ID.TH:case TAG_ID.TR:{tdStartTagInTable(Ra,qa);break}case TAG_ID.STYLE:case TAG_ID.SCRIPT:case TAG_ID.TEMPLATE:{startTagInHead(Ra,qa);break}case TAG_ID.COL:{colStartTagInTable(Ra,qa);break}case TAG_ID.FORM:{formStartTagInTable(Ra,qa);break}case TAG_ID.TABLE:{tableStartTagInTable(Ra,qa);break}case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{tbodyStartTagInTable(Ra,qa);break}case TAG_ID.INPUT:{inputStartTagInTable(Ra,qa);break}case TAG_ID.CAPTION:{captionStartTagInTable(Ra,qa);break}case TAG_ID.COLGROUP:{colgroupStartTagInTable(Ra,qa);break}default:tokenInTable(Ra,qa)}}function endTagInTable(Ra,qa){switch(qa.tagID){case TAG_ID.TABLE:{Ra.openElements.hasInTableScope(TAG_ID.TABLE)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.TABLE),Ra._resetInsertionMode());break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,qa);break}case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TBODY:case TAG_ID.TD:case TAG_ID.TFOOT:case TAG_ID.TH:case TAG_ID.THEAD:case TAG_ID.TR:break;default:tokenInTable(Ra,qa)}}function tokenInTable(Ra,qa){const rd=Ra.fosterParentingEnabled;Ra.fosterParentingEnabled=!0,modeInBody(Ra,qa),Ra.fosterParentingEnabled=rd}function whitespaceCharacterInTableText(Ra,qa){Ra.pendingCharacterTokens.push(qa)}function characterInTableText(Ra,qa){Ra.pendingCharacterTokens.push(qa),Ra.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText(Ra,qa){let rd=0;if(Ra.hasNonWhitespacePendingCharacterToken)for(;rd0&&Ra.openElements.currentTagId===TAG_ID.OPTION&&Ra.openElements.tagIDs[Ra.openElements.stackTop-1]===TAG_ID.OPTGROUP&&Ra.openElements.pop(),Ra.openElements.currentTagId===TAG_ID.OPTGROUP&&Ra.openElements.pop();break}case TAG_ID.OPTION:{Ra.openElements.currentTagId===TAG_ID.OPTION&&Ra.openElements.pop();break}case TAG_ID.SELECT:{Ra.openElements.hasInSelectScope(TAG_ID.SELECT)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Ra._resetInsertionMode());break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,qa);break}}}function startTagInSelectInTable(Ra,qa){const rd=qa.tagID;rd===TAG_ID.CAPTION||rd===TAG_ID.TABLE||rd===TAG_ID.TBODY||rd===TAG_ID.TFOOT||rd===TAG_ID.THEAD||rd===TAG_ID.TR||rd===TAG_ID.TD||rd===TAG_ID.TH?(Ra.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Ra._resetInsertionMode(),Ra._processStartTag(qa)):startTagInSelect(Ra,qa)}function endTagInSelectInTable(Ra,qa){const rd=qa.tagID;rd===TAG_ID.CAPTION||rd===TAG_ID.TABLE||rd===TAG_ID.TBODY||rd===TAG_ID.TFOOT||rd===TAG_ID.THEAD||rd===TAG_ID.TR||rd===TAG_ID.TD||rd===TAG_ID.TH?Ra.openElements.hasInTableScope(rd)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Ra._resetInsertionMode(),Ra.onEndTag(qa)):endTagInSelect(Ra,qa)}function startTagInTemplate(Ra,qa){switch(qa.tagID){case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:{startTagInHead(Ra,qa);break}case TAG_ID.CAPTION:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE,Ra.insertionMode=InsertionMode.IN_TABLE,startTagInTable(Ra,qa);break}case TAG_ID.COL:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_COLUMN_GROUP,Ra.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(Ra,qa);break}case TAG_ID.TR:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE_BODY,Ra.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Ra,qa);break}case TAG_ID.TD:case TAG_ID.TH:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_ROW,Ra.insertionMode=InsertionMode.IN_ROW,startTagInRow(Ra,qa);break}default:Ra.tmplInsertionModeStack[0]=InsertionMode.IN_BODY,Ra.insertionMode=InsertionMode.IN_BODY,startTagInBody(Ra,qa)}}function endTagInTemplate(Ra,qa){qa.tagID===TAG_ID.TEMPLATE&&templateEndTagInHead(Ra,qa)}function eofInTemplate(Ra,qa){Ra.openElements.tmplCount>0?(Ra.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),Ra.activeFormattingElements.clearToLastMarker(),Ra.tmplInsertionModeStack.shift(),Ra._resetInsertionMode(),Ra.onEof(qa)):stopParsing(Ra,qa)}function startTagAfterBody(Ra,qa){qa.tagID===TAG_ID.HTML?startTagInBody(Ra,qa):tokenAfterBody(Ra,qa)}function endTagAfterBody(Ra,qa){var rd;if(qa.tagID===TAG_ID.HTML){if(Ra.fragmentContext||(Ra.insertionMode=InsertionMode.AFTER_AFTER_BODY),Ra.options.sourceCodeLocationInfo&&Ra.openElements.tagIDs[0]===TAG_ID.HTML){Ra._setEndLocation(Ra.openElements.items[0],qa);const sd=Ra.openElements.items[1];sd&&!(!((rd=Ra.treeAdapter.getNodeSourceCodeLocation(sd))===null||rd===void 0)&&rd.endTag)&&Ra._setEndLocation(sd,qa)}}else tokenAfterBody(Ra,qa)}function tokenAfterBody(Ra,qa){Ra.insertionMode=InsertionMode.IN_BODY,modeInBody(Ra,qa)}function startTagInFrameset(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.FRAMESET:{Ra._insertElement(qa,NS.HTML);break}case TAG_ID.FRAME:{Ra._appendElement(qa,NS.HTML),qa.ackSelfClosing=!0;break}case TAG_ID.NOFRAMES:{startTagInHead(Ra,qa);break}}}function endTagInFrameset(Ra,qa){qa.tagID===TAG_ID.FRAMESET&&!Ra.openElements.isRootHtmlElementCurrent()&&(Ra.openElements.pop(),!Ra.fragmentContext&&Ra.openElements.currentTagId!==TAG_ID.FRAMESET&&(Ra.insertionMode=InsertionMode.AFTER_FRAMESET))}function startTagAfterFrameset(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.NOFRAMES:{startTagInHead(Ra,qa);break}}}function endTagAfterFrameset(Ra,qa){qa.tagID===TAG_ID.HTML&&(Ra.insertionMode=InsertionMode.AFTER_AFTER_FRAMESET)}function startTagAfterAfterBody(Ra,qa){qa.tagID===TAG_ID.HTML?startTagInBody(Ra,qa):tokenAfterAfterBody(Ra,qa)}function tokenAfterAfterBody(Ra,qa){Ra.insertionMode=InsertionMode.IN_BODY,modeInBody(Ra,qa)}function startTagAfterAfterFrameset(Ra,qa){switch(qa.tagID){case TAG_ID.HTML:{startTagInBody(Ra,qa);break}case TAG_ID.NOFRAMES:{startTagInHead(Ra,qa);break}}}function nullCharacterInForeignContent(Ra,qa){qa.chars=REPLACEMENT_CHARACTER,Ra._insertCharacters(qa)}function characterInForeignContent(Ra,qa){Ra._insertCharacters(qa),Ra.framesetOk=!1}function popUntilHtmlOrIntegrationPoint(Ra){for(;Ra.treeAdapter.getNamespaceURI(Ra.openElements.current)!==NS.HTML&&!Ra._isIntegrationPoint(Ra.openElements.currentTagId,Ra.openElements.current);)Ra.openElements.pop()}function startTagInForeignContent(Ra,qa){if(causesExit(qa))popUntilHtmlOrIntegrationPoint(Ra),Ra._startTagOutsideForeignContent(qa);else{const rd=Ra._getAdjustedCurrentElement(),sd=Ra.treeAdapter.getNamespaceURI(rd);sd===NS.MATHML?adjustTokenMathMLAttrs(qa):sd===NS.SVG&&(adjustTokenSVGTagName(qa),adjustTokenSVGAttrs(qa)),adjustTokenXMLAttrs(qa),qa.selfClosing?Ra._appendElement(qa,sd):Ra._insertElement(qa,sd),qa.ackSelfClosing=!0}}function endTagInForeignContent(Ra,qa){if(qa.tagID===TAG_ID.P||qa.tagID===TAG_ID.BR){popUntilHtmlOrIntegrationPoint(Ra),Ra._endTagOutsideForeignContent(qa);return}for(let rd=Ra.openElements.stackTop;rd>0;rd--){const sd=Ra.openElements.items[rd];if(Ra.treeAdapter.getNamespaceURI(sd)===NS.HTML){Ra._endTagOutsideForeignContent(qa);break}const pd=Ra.treeAdapter.getTagName(sd);if(pd.toLowerCase()===qa.tagName){qa.tagName=pd,Ra.openElements.shortenToLength(rd);break}}}const VOID_ELEMENTS=new Set([TAG_NAMES.AREA,TAG_NAMES.BASE,TAG_NAMES.BASEFONT,TAG_NAMES.BGSOUND,TAG_NAMES.BR,TAG_NAMES.COL,TAG_NAMES.EMBED,TAG_NAMES.FRAME,TAG_NAMES.HR,TAG_NAMES.IMG,TAG_NAMES.INPUT,TAG_NAMES.KEYGEN,TAG_NAMES.LINK,TAG_NAMES.META,TAG_NAMES.PARAM,TAG_NAMES.SOURCE,TAG_NAMES.TRACK,TAG_NAMES.WBR]);function isVoidElement(Ra,qa){return qa.treeAdapter.isElementNode(Ra)&&qa.treeAdapter.getNamespaceURI(Ra)===NS.HTML&&VOID_ELEMENTS.has(qa.treeAdapter.getTagName(Ra))}const defaultOpts={treeAdapter:defaultTreeAdapter,scriptingEnabled:!0};function serializeOuter(Ra,qa){const rd={...defaultOpts,...qa};return serializeNode(Ra,rd)}function serializeChildNodes(Ra,qa){let rd="";const sd=qa.treeAdapter.isElementNode(Ra)&&qa.treeAdapter.getTagName(Ra)===TAG_NAMES.TEMPLATE&&qa.treeAdapter.getNamespaceURI(Ra)===NS.HTML?qa.treeAdapter.getTemplateContent(Ra):Ra,pd=qa.treeAdapter.getChildNodes(sd);if(pd)for(const fd of pd)rd+=serializeNode(fd,qa);return rd}function serializeNode(Ra,qa){return qa.treeAdapter.isElementNode(Ra)?serializeElement(Ra,qa):qa.treeAdapter.isTextNode(Ra)?serializeTextNode(Ra,qa):qa.treeAdapter.isCommentNode(Ra)?serializeCommentNode(Ra,qa):qa.treeAdapter.isDocumentTypeNode(Ra)?serializeDocumentTypeNode(Ra,qa):""}function serializeElement(Ra,qa){const rd=qa.treeAdapter.getTagName(Ra);return`<${rd}${serializeAttributes(Ra,qa)}>${isVoidElement(Ra,qa)?"":`${serializeChildNodes(Ra,qa)}`}`}function serializeAttributes(Ra,{treeAdapter:qa}){let rd="";for(const sd of qa.getAttrList(Ra)){if(rd+=" ",sd.namespace)switch(sd.namespace){case NS.XML:{rd+=`xml:${sd.name}`;break}case NS.XMLNS:{sd.name!=="xmlns"&&(rd+="xmlns:"),rd+=sd.name;break}case NS.XLINK:{rd+=`xlink:${sd.name}`;break}default:rd+=`${sd.prefix}:${sd.name}`}else rd+=sd.name;rd+=`="${escapeAttribute(sd.value)}"`}return rd}function serializeTextNode(Ra,qa){const{treeAdapter:rd}=qa,sd=rd.getTextNodeContent(Ra),pd=rd.getParentNode(Ra),fd=pd&&rd.isElementNode(pd)&&rd.getTagName(pd);return fd&&rd.getNamespaceURI(pd)===NS.HTML&&hasUnescapedText(fd,qa.scriptingEnabled)?sd:escapeText(sd)}function serializeCommentNode(Ra,{treeAdapter:qa}){return``}function serializeDocumentTypeNode(Ra,{treeAdapter:qa}){return``}function parse$5(Ra,qa){return Parser$2.parse(Ra,qa)}function parseFragment(Ra,qa,rd){typeof Ra=="string"&&(rd=qa,qa=Ra,Ra=null);const sd=Parser$2.getFragmentParser(Ra,rd);return sd.tokenizer.write(qa,!0),sd.getFragment()}function enquoteDoctypeId(Ra){const qa=Ra.includes('"')?"'":'"';return qa+Ra+qa}function serializeDoctypeContent(Ra,qa,rd){let sd="!DOCTYPE ";return Ra&&(sd+=Ra),qa?sd+=` PUBLIC ${enquoteDoctypeId(qa)}`:rd&&(sd+=" SYSTEM"),rd&&(sd+=` ${enquoteDoctypeId(rd)}`),sd}const adapter={isCommentNode:isComment,isElementNode:isTag,isTextNode:isText,createDocument(){const Ra=new Document([]);return Ra["x-mode"]=DOCUMENT_MODE.NO_QUIRKS,Ra},createDocumentFragment(){return new Document([])},createElement(Ra,qa,rd){const sd=Object.create(null),pd=Object.create(null),fd=Object.create(null);for(let md=0;mdisDirective(hd)&&hd.name==="!doctype");fd?fd.data=pd??null:(fd=new ProcessingInstruction("!doctype",pd),adapter.appendChild(Ra,fd)),fd["x-name"]=qa,fd["x-publicId"]=rd,fd["x-systemId"]=sd},setDocumentMode(Ra,qa){Ra["x-mode"]=qa},getDocumentMode(Ra){return Ra["x-mode"]},detachNode(Ra){if(Ra.parent){const qa=Ra.parent.children.indexOf(Ra),{prev:rd,next:sd}=Ra;Ra.prev=null,Ra.next=null,rd&&(rd.next=sd),sd&&(sd.prev=rd),Ra.parent.children.splice(qa,1),Ra.parent=null}},insertText(Ra,qa){const rd=Ra.children[Ra.children.length-1];rd&&isText(rd)?rd.data+=qa:adapter.appendChild(Ra,adapter.createTextNode(qa))},insertTextBefore(Ra,qa,rd){const sd=Ra.children[Ra.children.indexOf(rd)-1];sd&&isText(sd)?sd.data+=qa:adapter.insertBefore(Ra,adapter.createTextNode(qa),rd)},adoptAttributes(Ra,qa){for(let rd=0;rd=CharCodes.LowerA&&Ra<=CharCodes.LowerZ||Ra>=CharCodes.UpperA&&Ra<=CharCodes.UpperZ}var QuoteType;(function(Ra){Ra[Ra.NoValue=0]="NoValue",Ra[Ra.Unquoted=1]="Unquoted",Ra[Ra.Single=2]="Single",Ra[Ra.Double=3]="Double"})(QuoteType||(QuoteType={}));const Sequences={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Tokenizer{constructor({xmlMode:qa=!1,decodeEntities:rd=!0},sd){this.cbs=sd,this.state=State$4.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=State$4.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=qa,this.decodeEntities=rd,this.entityDecoder=new EntityDecoder(qa?xmlDecodeTree:htmlDecodeTree,(pd,fd)=>this.emitCodePoint(pd,fd))}reset(){this.state=State$4.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=State$4.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(qa){this.offset+=this.buffer.length,this.buffer=qa,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=State$4.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&qa===CharCodes.Amp&&this.startEntity()}stateSpecialStartSequence(qa){const rd=this.sequenceIndex===this.currentSequence.length;if(!(rd?isEndOfTagSection(qa):(qa|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!rd){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=State$4.InTagName,this.stateInTagName(qa)}stateInSpecialTag(qa){if(this.sequenceIndex===this.currentSequence.length){if(qa===CharCodes.Gt||isWhitespace$2(qa)){const rd=this.index-this.currentSequence.length;if(this.sectionStart=0?(this.state=this.baseState,qa===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===State$4.Text||this.state===State$4.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===State$4.InAttributeValueDq||this.state===State$4.InAttributeValueSq||this.state===State$4.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index=qa||(this.state===State$4.InCommentLike?this.currentSequence===Sequences.CdataEnd?this.cbs.oncdata(this.sectionStart,qa,0):this.cbs.oncomment(this.sectionStart,qa,0):this.state===State$4.InTagName||this.state===State$4.BeforeAttributeName||this.state===State$4.BeforeAttributeValue||this.state===State$4.AfterAttributeName||this.state===State$4.InAttributeName||this.state===State$4.InAttributeValueSq||this.state===State$4.InAttributeValueDq||this.state===State$4.InAttributeValueNq||this.state===State$4.InClosingTagName||this.cbs.ontext(this.sectionStart,qa))}emitCodePoint(qa,rd){this.baseState!==State$4.Text&&this.baseState!==State$4.InSpecialTag?(this.sectionStart0&&hd.has(this.stack[0]);){const md=this.stack.shift();(sd=(rd=this.cbs).onclosetag)===null||sd===void 0||sd.call(rd,md,!0)}this.isVoidElement(qa)||(this.stack.unshift(qa),this.htmlMode&&(foreignContextElements.has(qa)?this.foreignContext.unshift(!0):htmlIntegrationElements.has(qa)&&this.foreignContext.unshift(!1))),(fd=(pd=this.cbs).onopentagname)===null||fd===void 0||fd.call(pd,qa),this.cbs.onopentag&&(this.attribs={})}endOpenTag(qa){var rd,sd;this.startIndex=this.openTagStart,this.attribs&&((sd=(rd=this.cbs).onopentag)===null||sd===void 0||sd.call(rd,this.tagname,this.attribs,qa),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(qa){this.endIndex=qa,this.endOpenTag(!1),this.startIndex=qa+1}onclosetag(qa,rd){var sd,pd,fd,hd,md,gd,yd,vd;this.endIndex=rd;let Nd=this.getSlice(qa,rd);if(this.lowerCaseTagNames&&(Nd=Nd.toLowerCase()),this.htmlMode&&(foreignContextElements.has(Nd)||htmlIntegrationElements.has(Nd))&&this.foreignContext.shift(),this.isVoidElement(Nd))this.htmlMode&&Nd==="br"&&((hd=(fd=this.cbs).onopentagname)===null||hd===void 0||hd.call(fd,"br"),(gd=(md=this.cbs).onopentag)===null||gd===void 0||gd.call(md,"br",{},!0),(vd=(yd=this.cbs).onclosetag)===null||vd===void 0||vd.call(yd,"br",!1));else{const Md=this.stack.indexOf(Nd);if(Md!==-1)for(let Ld=0;Ld<=Md;Ld++){const Fd=this.stack.shift();(pd=(sd=this.cbs).onclosetag)===null||pd===void 0||pd.call(sd,Fd,Ld!==Md)}else this.htmlMode&&Nd==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=rd+1}onselfclosingtag(qa){this.endIndex=qa,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=qa+1):this.onopentagend(qa)}closeCurrentTag(qa){var rd,sd;const pd=this.tagname;this.endOpenTag(qa),this.stack[0]===pd&&((sd=(rd=this.cbs).onclosetag)===null||sd===void 0||sd.call(rd,pd,!qa),this.stack.shift())}onattribname(qa,rd){this.startIndex=qa;const sd=this.getSlice(qa,rd);this.attribname=this.lowerCaseAttributeNames?sd.toLowerCase():sd}onattribdata(qa,rd){this.attribvalue+=this.getSlice(qa,rd)}onattribentity(qa){this.attribvalue+=fromCodePoint(qa)}onattribend(qa,rd){var sd,pd;this.endIndex=rd,(pd=(sd=this.cbs).onattribute)===null||pd===void 0||pd.call(sd,this.attribname,this.attribvalue,qa===QuoteType.Double?'"':qa===QuoteType.Single?"'":qa===QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(qa){const rd=qa.search(reNameEnd);let sd=rd<0?qa:qa.substr(0,rd);return this.lowerCaseTagNames&&(sd=sd.toLowerCase()),sd}ondeclaration(qa,rd){this.endIndex=rd;const sd=this.getSlice(qa,rd);if(this.cbs.onprocessinginstruction){const pd=this.getInstructionName(sd);this.cbs.onprocessinginstruction(`!${pd}`,`!${sd}`)}this.startIndex=rd+1}onprocessinginstruction(qa,rd){this.endIndex=rd;const sd=this.getSlice(qa,rd);if(this.cbs.onprocessinginstruction){const pd=this.getInstructionName(sd);this.cbs.onprocessinginstruction(`?${pd}`,`?${sd}`)}this.startIndex=rd+1}oncomment(qa,rd,sd){var pd,fd,hd,md;this.endIndex=rd,(fd=(pd=this.cbs).oncomment)===null||fd===void 0||fd.call(pd,this.getSlice(qa,rd-sd)),(md=(hd=this.cbs).oncommentend)===null||md===void 0||md.call(hd),this.startIndex=rd+1}oncdata(qa,rd,sd){var pd,fd,hd,md,gd,yd,vd,Nd,Md,Ld;this.endIndex=rd;const Fd=this.getSlice(qa,rd-sd);!this.htmlMode||this.options.recognizeCDATA?((fd=(pd=this.cbs).oncdatastart)===null||fd===void 0||fd.call(pd),(md=(hd=this.cbs).ontext)===null||md===void 0||md.call(hd,Fd),(yd=(gd=this.cbs).oncdataend)===null||yd===void 0||yd.call(gd)):((Nd=(vd=this.cbs).oncomment)===null||Nd===void 0||Nd.call(vd,`[CDATA[${Fd}]]`),(Ld=(Md=this.cbs).oncommentend)===null||Ld===void 0||Ld.call(Md)),this.startIndex=rd+1}onend(){var qa,rd;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let sd=0;sd=this.buffers[0].length;)this.shiftBuffer();let sd=this.buffers[0].slice(qa-this.bufferOffset,rd-this.bufferOffset);for(;rd-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),sd+=this.buffers[0].slice(0,rd-this.bufferOffset);return sd}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(qa){var rd,sd;if(this.ended){(sd=(rd=this.cbs).onerror)===null||sd===void 0||sd.call(rd,new Error(".write() after done!"));return}this.buffers.push(qa),this.tokenizer.running&&(this.tokenizer.write(qa),this.writeIndex++)}end(qa){var rd,sd;if(this.ended){(sd=(rd=this.cbs).onerror)===null||sd===void 0||sd.call(rd,new Error(".end() after done!"));return}qa&&this.write(qa),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexqa._useHtmlParser2?parseDocument(Ra,qa):parseWithParse5(Ra,qa,rd,sd)),load$3=getLoad(parse$4,(Ra,qa)=>qa._useHtmlParser2?render$3(Ra,qa):renderWithParse5(Ra)),browser$2=Object.freeze(Object.defineProperty({__proto__:null,contains:contains$1,load:load$3,merge:merge$6},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(browser$2);var utils$4={},lexer={exports:{}},debug={exports:{}};(function(Ra,qa){var rd={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};Ra.exports=sd;function sd(fd){return pd.bind(null,fd)}function pd(fd){var hd=[].slice.call(arguments,1);hd.unshift("["+fd+"]"),rd.stderr.write(hd.join(" ")+` -`)}})(debug);var debugExports=debug.exports;(function(Ra,qa){debugExports("lex"),Ra.exports=rd;function rd(sd){var pd="",fd,hd=0,md=-1,gd=0,yd=1,vd="before-selector",Nd=[vd],Md={},Ld=[],Fd=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function Hd(){return Ef(),sd[md]}function Vd(Pf){return Pf?Nd[Nd.length-1-Pf]:vd}function Gd(Pf){var lh=md+1;return Pf===sd.slice(lh,lh+Pf.length)}function Ud(Pf){var lh=sd.slice(md).indexOf(Pf);return lh>0?lh:!1}function qd(Pf){return Pf===Wd(1)}function Wd(Pf){return sd[md+(Pf||1)]}function Kd(){var Pf=Nd.pop();return vd=Nd[Nd.length-1],Pf}function Xd(Pf){return vd=Pf,Nd.push(vd),Nd.length}function df(Pf){var lh=vd;return Nd[Nd.length-1]=vd=Pf,lh}function Ef(Pf){if((Pf||1)==1)sd[md]==` -`?(yd++,hd=1):hd++,md++;else{var lh=sd.slice(md,md+Pf).split(` -`);lh.length>1&&(yd+=lh.length-1,hd=1),hd+=lh[lh.length-1].length,md=md+Pf}}function pf(){Md.end={line:yd,col:hd},Ld.push(Md),pd="",Md={}}function mf(Pf){Md={type:Pf,start:{line:yd,col:hd}}}for(;fd=Hd();)switch(fd){case" ":switch(Vd()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":pd+=fd;break}break;case` -`:case" ":case"\r":case"\f":switch(Vd()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":pd+=fd;break;case"at-value":fd===` -`&&(Md.value=pd.trim(),pf(),Kd());break}break;case":":switch(Vd()){case"name":Md.name=pd.trim(),pd="",df("before-value");break;case"before-selector":pd+=fd,mf("selector"),Xd("selector");break;case"before-value":df("value"),pd+=fd;break;default:pd+=fd;break}break;case";":switch(Vd()){case"name":case"before-value":case"value":pd.trim().length>0&&(Md.value=pd.trim(),pf()),df("before-name");break;case"value-paren":pd+=fd;break;case"at-value":Md.value=pd.trim(),pf(),Kd();break;case"before-name":break;default:pd+=fd;break}break;case"{":switch(Vd()){case"selector":if(Wd(-1)==="\\"){pd+=fd;break}Md.text=pd.trim(),pf(),df("before-name"),gd=gd+1;break;case"at-group":switch(Md.name=pd.trim(),Md.type){case"font-face":case"viewport":case"page":Xd("before-name");break;default:Xd("before-selector")}pf(),gd=gd+1;break;case"name":case"at-rule":Md.name=pd.trim(),pf(),Xd("before-name"),gd=gd+1;break;case"comment":case"double-string":case"single-string":pd+=fd;break;case"before-value":df("value"),pd+=fd;break}break;case"}":switch(Vd()){case"before-name":case"name":case"before-value":case"value":pd&&(Md.value=pd.trim()),Md.name&&Md.value&&pf(),mf("end"),pf(),Kd(),Vd()==="at-group"&&(mf("at-group-end"),pf(),Kd()),gd>0&&(gd=gd-1);break;case"at-group":case"before-selector":case"selector":if(Wd(-1)==="\\"){pd+=fd;break}gd>0&&Vd(1)==="at-group"&&(mf("at-group-end"),pf()),gd>1&&Kd(),gd>0&&(gd=gd-1);break;case"double-string":case"single-string":case"comment":pd+=fd;break}break;case'"':case"'":switch(Vd()){case"double-string":fd==='"'&&Wd(-1)!=="\\"&&Kd();break;case"single-string":fd==="'"&&Wd(-1)!=="\\"&&Kd();break;case"before-at-value":df("at-value"),Xd(fd==='"'?"double-string":"single-string");break;case"before-value":df("value"),Xd(fd==='"'?"double-string":"single-string");break;case"comment":break;default:Wd(-1)!=="\\"&&Xd(fd==='"'?"double-string":"single-string")}pd+=fd;break;case"/":switch(Vd()){case"comment":case"double-string":case"single-string":pd+=fd;break;case"before-value":case"selector":case"name":case"value":if(qd("*")){var _f=Ud("*/");_f&&Ef(_f+1)}else Vd()=="before-value"&&df("value"),pd+=fd;break;default:qd("*")?(mf("comment"),Xd("comment"),Ef()):pd+=fd;break}break;case"*":switch(Vd()){case"comment":qd("/")?(Md.text=pd,Ef(),pf(),Kd()):pd+=fd;break;case"before-selector":pd+=fd,mf("selector"),Xd("selector");break;case"before-value":df("value"),pd+=fd;break;default:pd+=fd}break;case"@":switch(Vd()){case"comment":case"double-string":case"single-string":pd+=fd;break;case"before-value":df("value"),pd+=fd;break;default:for(var xf=!1,Cf,If,Sf=0,wf=Fd.length;!xf&&Sf+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:(["']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:(["'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(//,"["+escape$5(">+~`!@$%^&={}\\;/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(//g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),Part=function(qa){this.combinator=qa||" ",this.tag="*"};Part.prototype.toString=function(){if(!this.raw){var Ra="",qa,rd;if(Ra+=this.tag||"*",this.id&&(Ra+="#"+this.id),this.classes&&(Ra+="."+this.classList.join(".")),this.attributes)for(qa=0;rd=this.attributes[qa++];)Ra+="["+rd.name+(rd.operator?rd.operator+'"'+rd.value+'"':"")+"]";if(this.pseudos)for(qa=0;rd=this.pseudos[qa++];)Ra+=":"+rd.name,rd.value&&(Ra+="("+rd.value+")");this.raw=Ra}return this.raw};var Expression=function(){this.length=0};Expression.prototype.toString=function(){if(!this.raw){for(var Ra="",qa=0,rd;rd=this[qa++];)qa!==1&&(Ra+=" "),rd.combinator!==" "&&(Ra+=rd.combinator+" "),Ra+=rd;this.raw=Ra}return this.raw};var replacer=function(Ra,qa,rd,sd,pd,fd,hd,md,gd,yd,vd,Nd,Md,Ld,Fd,Hd){var Vd,Gd;if((qa||!this.length)&&(Vd=this[this.length++]=new Expression,qa))return"";if(Vd||(Vd=this[this.length-1]),(rd||sd||!Vd.length)&&(Gd=Vd[Vd.length++]=new Part(rd)),Gd||(Gd=Vd[Vd.length-1]),pd)Gd.tag=unescape$2(pd);else if(fd)Gd.id=unescape$2(fd);else if(hd){var Ud=unescape$2(hd),qd=Gd.classes||(Gd.classes={});if(!qd[Ud]){qd[Ud]=escape$5(hd);var Wd=Gd.classList||(Gd.classList=[]);Wd.push(Ud),Wd.sort()}}else Md?(Hd=Hd||Fd,(Gd.pseudos||(Gd.pseudos=[])).push({type:Nd.length==1?"class":"element",name:unescape$2(Md),escapedName:escape$5(Md),value:Hd?unescape$2(Hd):null,escapedValue:Hd?escape$5(Hd):null})):md&&(vd=vd?escape$5(vd):null,(Gd.attributes||(Gd.attributes=[])).push({operator:gd,name:unescape$2(md),escapedName:escape$5(md),value:vd?unescape$2(vd):null,escapedValue:vd?escape$5(vd):null}));return""},Expressions=function(qa){this.length=0;for(var rd=this,sd=qa,pd;qa;){if(pd=qa.replace(slickRe,function(){return replacer.apply(rd,arguments)}),pd===qa)throw new Error(sd+" is an invalid expression");qa=pd}};Expressions.prototype.toString=function(){if(!this.raw){for(var Ra=[],qa=0,rd;rd=this[qa++];)Ra.push(rd);this.raw=Ra.join(", ")}return this.raw};var cache$2={},parse$3=function(Ra){return Ra==null?null:(Ra=(""+Ra).replace(/^\s+|\s+$/g,""),cache$2[Ra]||(cache$2[Ra]=new Expressions(Ra)))},parser$2=parse$3;(function(Ra,qa){var rd=parser$2;Ra.exports=sd;function sd(fd,hd){this.text=fd,this.spec=void 0,this.styleAttribute=hd||!1}sd.prototype.parsed=function(){return this.tokens||(this.tokens=pd(this.text)),this.tokens},sd.prototype.specificity=function(){var fd=this.styleAttribute;return this.spec||(this.spec=hd(this.text,this.parsed())),this.spec;function hd(md,gd){for(var yd=gd||pd(md),vd=[fd?1:0,0,0,0],Nd=[],Md=0;Md option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},PLACEHOLDER_ELEMENT={};function ensureIsTag(Ra,ed){return Ra===boolbase$1.falseFunc?boolbase$1.falseFunc:ud=>ed.isTag(ud)&&Ra(ud)}function getNextSiblings(Ra,ed){const ud=ed.getSiblings(Ra);if(ud.length<=1)return[];const dd=ud.indexOf(Ra);return dd<0||dd===ud.length-1?[]:ud.slice(dd+1).filter(ed.isTag)}function copyOptions(Ra){return{xmlMode:!!Ra.xmlMode,lowerCaseAttributeNames:!!Ra.lowerCaseAttributeNames,lowerCaseTags:!!Ra.lowerCaseTags,quirksMode:!!Ra.quirksMode,cacheResults:!!Ra.cacheResults,pseudos:Ra.pseudos,adapter:Ra.adapter,equals:Ra.equals}}const is$3=(Ra,ed,ud,dd,hd)=>{const md=hd(ed,copyOptions(ud),dd);return md===boolbase$1.trueFunc?Ra:md===boolbase$1.falseFunc?boolbase$1.falseFunc:gd=>md(gd)&&Ra(gd)},subselects={is:is$3,matches:is$3,where:is$3,not(Ra,ed,ud,dd,hd){const md=hd(ed,copyOptions(ud),dd);return md===boolbase$1.falseFunc?Ra:md===boolbase$1.trueFunc?boolbase$1.falseFunc:gd=>!md(gd)&&Ra(gd)},has(Ra,ed,ud,dd,hd){const{adapter:md}=ud,gd=copyOptions(ud);gd.relativeSelector=!0;const yd=ed.some(wd=>wd.some(isTraversal))?[PLACEHOLDER_ELEMENT]:void 0,vd=hd(ed,gd,yd);if(vd===boolbase$1.falseFunc)return boolbase$1.falseFunc;const Cd=ensureIsTag(vd,md);if(yd&&vd!==boolbase$1.trueFunc){const{shouldTestNextSiblings:wd=!1}=vd;return Nd=>{if(!Ra(Nd))return!1;yd[0]=Nd;const Ld=md.getChildren(Nd),Ud=wd?[...Ld,...getNextSiblings(Nd,md)]:Ld;return md.existsOne(Cd,Ud)}}return wd=>Ra(wd)&&md.existsOne(Cd,md.getChildren(wd))}};function compilePseudoSelector(Ra,ed,ud,dd,hd){var md;const{name:gd,data:yd}=ed;if(Array.isArray(yd)){if(!(gd in subselects))throw new Error(`Unknown pseudo-class :${gd}(${yd})`);return subselects[gd](Ra,yd,ud,dd,hd)}const vd=(md=ud.pseudos)===null||md===void 0?void 0:md[gd],Cd=typeof vd=="string"?vd:aliases[gd];if(typeof Cd=="string"){if(yd!=null)throw new Error(`Pseudo ${gd} doesn't have any arguments`);const wd=parse$8(Cd);return subselects.is(Ra,wd,ud,dd,hd)}if(typeof vd=="function")return verifyPseudoArgs(vd,gd,yd,1),wd=>vd(wd,yd)&&Ra(wd);if(gd in filters)return filters[gd](Ra,yd,ud,dd);if(gd in pseudos){const wd=pseudos[gd];return verifyPseudoArgs(wd,gd,yd,2),Nd=>wd(Nd,ud,yd)&&Ra(Nd)}throw new Error(`Unknown pseudo-class :${gd}`)}function getElementParent(Ra,ed){const ud=ed.getParent(Ra);return ud&&ed.isTag(ud)?ud:null}function compileGeneralSelector(Ra,ed,ud,dd,hd){const{adapter:md,equals:gd}=ud;switch(ed.type){case SelectorType$2.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case SelectorType$2.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case SelectorType$2.Attribute:{if(ed.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!ud.xmlMode||ud.lowerCaseAttributeNames)&&(ed.name=ed.name.toLowerCase()),attributeRules[ed.action](Ra,ed,ud)}case SelectorType$2.Pseudo:return compilePseudoSelector(Ra,ed,ud,dd,hd);case SelectorType$2.Tag:{if(ed.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:yd}=ed;return(!ud.xmlMode||ud.lowerCaseTags)&&(yd=yd.toLowerCase()),function(Cd){return md.getName(Cd)===yd&&Ra(Cd)}}case SelectorType$2.Descendant:{if(ud.cacheResults===!1||typeof WeakSet>"u")return function(Cd){let wd=Cd;for(;wd=getElementParent(wd,md);)if(Ra(wd))return!0;return!1};const yd=new WeakSet;return function(Cd){let wd=Cd;for(;wd=getElementParent(wd,md);)if(!yd.has(wd)){if(md.isTag(wd)&&Ra(wd))return!0;yd.add(wd)}return!1}}case"_flexibleDescendant":return function(vd){let Cd=vd;do if(Ra(Cd))return!0;while(Cd=getElementParent(Cd,md));return!1};case SelectorType$2.Parent:return function(vd){return md.getChildren(vd).some(Cd=>md.isTag(Cd)&&Ra(Cd))};case SelectorType$2.Child:return function(vd){const Cd=md.getParent(vd);return Cd!=null&&md.isTag(Cd)&&Ra(Cd)};case SelectorType$2.Sibling:return function(vd){const Cd=md.getSiblings(vd);for(let wd=0;wded.some(includesScopePseudo)))}const DESCENDANT_TOKEN={type:SelectorType$2.Descendant},FLEXIBLE_DESCENDANT_TOKEN={type:"_flexibleDescendant"},SCOPE_TOKEN={type:SelectorType$2.Pseudo,name:"scope",data:null};function absolutize(Ra,{adapter:ed},ud){const dd=!!(ud!=null&&ud.every(hd=>{const md=ed.isTag(hd)&&ed.getParent(hd);return hd===PLACEHOLDER_ELEMENT||md&&ed.isTag(md)}));for(const hd of Ra){if(!(hd.length>0&&isTraversal(hd[0])&&hd[0].type!==SelectorType$2.Descendant))if(dd&&!hd.some(includesScopePseudo))hd.unshift(DESCENDANT_TOKEN);else continue;hd.unshift(SCOPE_TOKEN)}}function compileToken(Ra,ed,ud){var dd;Ra.forEach(sortByProcedure),ud=(dd=ed.context)!==null&&dd!==void 0?dd:ud;const hd=Array.isArray(ud),md=ud&&(Array.isArray(ud)?ud:[ud]);if(ed.relativeSelector!==!1)absolutize(Ra,ed,md);else if(Ra.some(vd=>vd.length>0&&isTraversal(vd[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let gd=!1;const yd=Ra.map(vd=>{if(vd.length>=2){const[Cd,wd]=vd;Cd.type!==SelectorType$2.Pseudo||Cd.name!=="scope"||(hd&&wd.type===SelectorType$2.Descendant?vd[1]=FLEXIBLE_DESCENDANT_TOKEN:(wd.type===SelectorType$2.Adjacent||wd.type===SelectorType$2.Sibling)&&(gd=!0))}return compileRules(vd,ed,md)}).reduce(reduceRules,boolbase$1.falseFunc);return yd.shouldTestNextSiblings=gd,yd}function compileRules(Ra,ed,ud){var dd;return Ra.reduce((hd,md)=>hd===boolbase$1.falseFunc?boolbase$1.falseFunc:compileGeneralSelector(hd,md,ed,ud,compileToken),(dd=ed.rootFunc)!==null&&dd!==void 0?dd:boolbase$1.trueFunc)}function reduceRules(Ra,ed){return ed===boolbase$1.falseFunc||Ra===boolbase$1.trueFunc?Ra:Ra===boolbase$1.falseFunc||ed===boolbase$1.trueFunc?ed:function(dd){return Ra(dd)||ed(dd)}}const defaultEquals=(Ra,ed)=>Ra===ed,defaultOptions$3={adapter:DomUtils,equals:defaultEquals};function convertOptionFormats(Ra){var ed,ud,dd,hd;const md=Ra??defaultOptions$3;return(ed=md.adapter)!==null&&ed!==void 0||(md.adapter=DomUtils),(ud=md.equals)!==null&&ud!==void 0||(md.equals=(hd=(dd=md.adapter)===null||dd===void 0?void 0:dd.equals)!==null&&hd!==void 0?hd:defaultEquals),md}function wrapCompile(Ra){return function(ud,dd,hd){const md=convertOptionFormats(dd);return Ra(ud,md,hd)}}const _compileToken=wrapCompile(compileToken);function prepareContext(Ra,ed,ud=!1){return ud&&(Ra=appendNextSiblings(Ra,ed)),Array.isArray(Ra)?ed.removeSubsets(Ra):ed.getChildren(Ra)}function appendNextSiblings(Ra,ed){const ud=Array.isArray(Ra)?Ra.slice(0):[Ra],dd=ud.length;for(let hd=0;hded.some(isFilter)):!1}function getLimit(Ra,ed,ud){const dd=ed!=null?parseInt(ed,10):NaN;switch(Ra){case"first":return 1;case"nth":case"eq":return isFinite(dd)?dd>=0?dd+1:1/0:0;case"lt":return isFinite(dd)?dd>=0?Math.min(dd,ud):1/0:0;case"gt":return isFinite(dd)?1/0:0;case"odd":return 2*ud;case"even":return 2*ud-1;case"last":case"not":return 1/0}}function getDocumentRoot(Ra){for(;Ra.parent;)Ra=Ra.parent;return Ra}function groupSelectors(Ra){const ed=[],ud=[];for(const dd of Ra)dd.some(isFilter)?ed.push(dd):ud.push(dd);return[ud,ed]}const UNIVERSAL_SELECTOR={type:SelectorType$2.Universal,namespace:null},SCOPE_PSEUDO={type:SelectorType$2.Pseudo,name:"scope",data:null};function is$2(Ra,ed,ud={}){return some$2([Ra],ed,ud)}function some$2(Ra,ed,ud={}){if(typeof ed=="function")return Ra.some(ed);const[dd,hd]=groupSelectors(parse$8(ed));return dd.length>0&&Ra.some(_compileToken(dd,ud))||hd.some(md=>filterBySelector(md,Ra,ud).length>0)}function filterByPosition(Ra,ed,ud,dd){const hd=typeof ud=="string"?parseInt(ud,10):NaN;switch(Ra){case"first":case"lt":return ed;case"last":return ed.length>0?[ed[ed.length-1]]:ed;case"nth":case"eq":return isFinite(hd)&&Math.abs(hd)gd%2===0);case"odd":return ed.filter((md,gd)=>gd%2===1);case"not":{const md=new Set(filterParsed(ud,ed,dd));return ed.filter(gd=>!md.has(gd))}}}function filter$4(Ra,ed,ud={}){return filterParsed(parse$8(Ra),ed,ud)}function filterParsed(Ra,ed,ud){if(ed.length===0)return[];const[dd,hd]=groupSelectors(Ra);let md;if(dd.length){const gd=filterElements(ed,dd,ud);if(hd.length===0)return gd;gd.length&&(md=new Set(gd))}for(let gd=0;gdisTag(wd)&&!md.has(wd)):ed).length===0)break;const Cd=filterBySelector(yd,ed,ud);if(Cd.length)if(md)Cd.forEach(wd=>md.add(wd));else{if(gd===hd.length-1)return Cd;md=new Set(Cd)}}return typeof md<"u"?md.size===ed.length?ed:ed.filter(gd=>md.has(gd)):[]}function filterBySelector(Ra,ed,ud){var dd;if(Ra.some(isTraversal$1)){const hd=(dd=ud.root)!==null&&dd!==void 0?dd:getDocumentRoot(ed[0]),md={...ud,context:ed,relativeSelector:!1};return Ra.push(SCOPE_PSEUDO),findFilterElements(hd,Ra,md,!0,ed.length)}return findFilterElements(ed,Ra,ud,!1,ed.length)}function select$1(Ra,ed,ud={},dd=1/0){if(typeof Ra=="function")return find$2(ed,Ra);const[hd,md]=groupSelectors(parse$8(Ra)),gd=md.map(yd=>findFilterElements(ed,yd,ud,!0,dd));return hd.length&&gd.push(findElements(ed,hd,ud,dd)),gd.length===0?[]:gd.length===1?gd[0]:uniqueSort(gd.reduce((yd,vd)=>[...yd,...vd]))}function findFilterElements(Ra,ed,ud,dd,hd){const md=ed.findIndex(isFilter),gd=ed.slice(0,md),yd=ed[md],vd=ed.length-1===md?hd:1/0,Cd=getLimit(yd.name,yd.data,vd);if(Cd===0)return[];const Nd=(gd.length===0&&!Array.isArray(Ra)?getChildren(Ra).filter(isTag):gd.length===0?(Array.isArray(Ra)?Ra:[Ra]).filter(isTag):dd||gd.some(isTraversal$1)?findElements(Ra,[gd],ud,Cd):filterElements(Ra,[gd],ud)).slice(0,Cd);let Ld=filterByPosition(yd.name,Nd,yd.data,ud);if(Ld.length===0||ed.length===md+1)return Ld;const Ud=ed.slice(md+1),jd=Ud.some(isTraversal$1);if(jd){if(isTraversal$1(Ud[0])){const{type:Gd}=Ud[0];(Gd===SelectorType$2.Sibling||Gd===SelectorType$2.Adjacent)&&(Ld=prepareContext(Ld,DomUtils,!0)),Ud.unshift(UNIVERSAL_SELECTOR)}ud={...ud,relativeSelector:!1,rootFunc:Gd=>Ld.includes(Gd)}}else ud.rootFunc&&ud.rootFunc!==boolbase.trueFunc&&(ud={...ud,rootFunc:boolbase.trueFunc});return Ud.some(isFilter)?findFilterElements(Ld,Ud,ud,!1,hd):jd?findElements(Ld,[Ud],ud,hd):filterElements(Ld,[Ud],ud)}function findElements(Ra,ed,ud,dd){const hd=_compileToken(ed,ud,Ra);return find$2(Ra,hd,dd)}function find$2(Ra,ed,ud=1/0){const dd=prepareContext(Ra,DomUtils,ed.shouldTestNextSiblings);return find$3(hd=>isTag(hd)&&ed(hd),dd,!0,ud)}function filterElements(Ra,ed,ud){const dd=(Array.isArray(Ra)?Ra:[Ra]).filter(isTag);if(dd.length===0)return dd;const hd=_compileToken(ed,ud);return hd===boolbase.trueFunc?dd:dd.filter(hd)}const reSiblingSelector=/^\s*[+~]/;function find$1(Ra){if(!Ra)return this._make([]);if(typeof Ra!="string"){const ed=isCheerio(Ra)?Ra.toArray():[Ra],ud=this.toArray();return this._make(ed.filter(dd=>ud.some(hd=>contains$1(hd,dd))))}return this._findBySelector(Ra,Number.POSITIVE_INFINITY)}function _findBySelector(Ra,ed){var ud;const dd=this.toArray(),hd=reSiblingSelector.test(Ra)?dd:this.children().toArray(),md={context:dd,root:(ud=this._root)===null||ud===void 0?void 0:ud[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(select$1(Ra,hd,md,ed))}function _getMatcher(Ra){return function(ed,...ud){return function(dd){var hd;let md=Ra(ed,this);return dd&&(md=filterArray$1(md,dd,this.options.xmlMode,(hd=this._root)===null||hd===void 0?void 0:hd[0])),this._make(this.length>1&&md.length>1?ud.reduce((gd,yd)=>yd(gd),md):md)}}}const _matcher=_getMatcher((Ra,ed)=>{let ud=[];for(let dd=0;dd0&&(ud=ud.concat(hd))}return ud}),_singleMatcher=_getMatcher((Ra,ed)=>{const ud=[];for(let dd=0;dd{const gd=[];return domEach(md,yd=>{for(let vd;(vd=hd(yd))&&!(ud!=null&&ud(vd,gd.length));yd=vd)gd.push(vd)}),gd})(Ra,...ed);return function(hd,md){ud=typeof hd=="string"?yd=>is$2(yd,hd,this.options):hd?getFilterFn(hd):null;const gd=dd.call(this,md);return ud=null,gd}}function _removeDuplicates(Ra){return Ra.length>1?Array.from(new Set(Ra)):Ra}const parent$1=_singleMatcher(({parent:Ra})=>Ra&&!isDocument(Ra)?Ra:null,_removeDuplicates),parents=_matcher(Ra=>{const ed=[];for(;Ra.parent&&!isDocument(Ra.parent);)ed.push(Ra.parent),Ra=Ra.parent;return ed},uniqueSort,Ra=>Ra.reverse()),parentsUntil=_matchUntil(({parent:Ra})=>Ra&&!isDocument(Ra)?Ra:null,uniqueSort,Ra=>Ra.reverse());function closest(Ra){var ed;const ud=[];if(!Ra)return this._make(ud);const dd={xmlMode:this.options.xmlMode,root:(ed=this._root)===null||ed===void 0?void 0:ed[0]},hd=typeof Ra=="string"?md=>is$2(md,Ra,dd):getFilterFn(Ra);return domEach(this,md=>{for(md&&!isDocument(md)&&!isTag(md)&&(md=md.parent);md&&isTag(md);){if(hd(md,0)){ud.includes(md)||ud.push(md);break}md=md.parent}}),this._make(ud)}const next$1=_singleMatcher(Ra=>nextElementSibling(Ra)),nextAll=_matcher(Ra=>{const ed=[];for(;Ra.next;)Ra=Ra.next,isTag(Ra)&&ed.push(Ra);return ed},_removeDuplicates),nextUntil=_matchUntil(Ra=>nextElementSibling(Ra),_removeDuplicates),prev$1=_singleMatcher(Ra=>prevElementSibling(Ra)),prevAll=_matcher(Ra=>{const ed=[];for(;Ra.prev;)Ra=Ra.prev,isTag(Ra)&&ed.push(Ra);return ed},_removeDuplicates),prevUntil=_matchUntil(Ra=>prevElementSibling(Ra),_removeDuplicates),siblings=_matcher(Ra=>getSiblings(Ra).filter(ed=>isTag(ed)&&ed!==Ra),uniqueSort),children$2=_matcher(Ra=>getChildren(Ra).filter(isTag),_removeDuplicates);function contents(){const Ra=this.toArray().reduce((ed,ud)=>hasChildren(ud)?ed.concat(ud.children):ed,[]);return this._make(Ra)}function each$1(Ra){let ed=0;const ud=this.length;for(;edRa.call(ed,ud,ed):isCheerio(Ra)?ed=>Array.prototype.includes.call(Ra,ed):function(ed){return Ra===ed}}function filter$3(Ra){var ed;return this._make(filterArray$1(this.toArray(),Ra,this.options.xmlMode,(ed=this._root)===null||ed===void 0?void 0:ed[0]))}function filterArray$1(Ra,ed,ud,dd){return typeof ed=="string"?filter$4(ed,Ra,{xmlMode:ud,root:dd}):Ra.filter(getFilterFn(ed))}function is$1(Ra){const ed=this.toArray();return typeof Ra=="string"?some$2(ed.filter(isTag),Ra,this.options):Ra?ed.some(getFilterFn(Ra)):!1}function not$1(Ra){let ed=this.toArray();if(typeof Ra=="string"){const ud=new Set(filter$4(Ra,ed,this.options));ed=ed.filter(dd=>!ud.has(dd))}else{const ud=getFilterFn(Ra);ed=ed.filter((dd,hd)=>!ud(dd,hd))}return this._make(ed)}function has(Ra){return this.filter(typeof Ra=="string"?`:has(${Ra})`:(ed,ud)=>this._make(ud).find(Ra).length>0)}function first(){return this.length>1?this._make(this[0]):this}function last(){return this.length>0?this._make(this[this.length-1]):this}function eq$1(Ra){var ed;return Ra=+Ra,Ra===0&&this.length<=1?this:(Ra<0&&(Ra=this.length+Ra),this._make((ed=this[Ra])!==null&&ed!==void 0?ed:[]))}function get$3(Ra){return Ra==null?this.toArray():this[Ra<0?this.length+Ra:Ra]}function toArray$5(){return Array.prototype.slice.call(this)}function index$1(Ra){let ed,ud;return Ra==null?(ed=this.parent().children(),ud=this[0]):typeof Ra=="string"?(ed=this._make(Ra),ud=this[0]):(ed=this,ud=isCheerio(Ra)?Ra[0]:Ra),Array.prototype.indexOf.call(ed,ud)}function slice$1(Ra,ed){return this._make(Array.prototype.slice.call(this,Ra,ed))}function end$1(){var Ra;return(Ra=this.prevObject)!==null&&Ra!==void 0?Ra:this._make([])}function add(Ra,ed){const ud=this._make(Ra,ed),dd=uniqueSort([...this.get(),...ud.get()]);return this._make(dd)}function addBack(Ra){return this.prevObject?this.add(Ra?this.prevObject.filter(Ra):this.prevObject):this}const Traversing=Object.freeze(Object.defineProperty({__proto__:null,_findBySelector,add,addBack,children:children$2,closest,contents,each:each$1,end:end$1,eq:eq$1,filter:filter$3,filterArray:filterArray$1,find:find$1,first,get:get$3,has,index:index$1,is:is$1,last,map:map$5,next:next$1,nextAll,nextUntil,not:not$1,parent:parent$1,parents,parentsUntil,prev:prev$1,prevAll,prevUntil,siblings,slice:slice$1,toArray:toArray$5},Symbol.toStringTag,{value:"Module"}));function getParse(Ra){return function(ud,dd,hd,md){if(typeof Buffer$4<"u"&&Buffer$4.isBuffer(ud)&&(ud=ud.toString()),typeof ud=="string")return Ra(ud,dd,hd,md);const gd=ud;if(!Array.isArray(gd)&&isDocument(gd))return gd;const yd=new Document([]);return update(gd,yd),yd}}function update(Ra,ed){const ud=Array.isArray(Ra)?Ra:[Ra];ed?ed.children=ud:ed=null;for(let dd=0;dd{if(!hasChildren(dd))return;const md=typeof ed[0]=="function"?ed[0].call(dd,hd,this._render(dd.children)):ed,gd=this._makeDomArray(md,hd=Ra.length?null:Ra[ed+ud];for(let wd=0;wd-1&&(Ld.children.splice(jd,1),hd===Ld&&ed>jd&&yd[0]--)}Nd.parent=hd,Nd.prev&&(Nd.prev.next=(md=Nd.next)!==null&&md!==void 0?md:null),Nd.next&&(Nd.next.prev=(gd=Nd.prev)!==null&&gd!==void 0?gd:null),Nd.prev=wd===0?vd:dd[wd-1],Nd.next=wd===dd.length-1?Cd:dd[wd+1]}return vd&&(vd.next=dd[0]),Cd&&(Cd.prev=dd[dd.length-1]),Ra.splice(...yd)}function appendTo(Ra){return(isCheerio(Ra)?Ra:this._make(Ra)).append(this),this}function prependTo(Ra){return(isCheerio(Ra)?Ra:this._make(Ra)).prepend(this),this}const append$2=_insert((Ra,ed,ud)=>{uniqueSplice(ed,ed.length,0,Ra,ud)}),prepend=_insert((Ra,ed,ud)=>{uniqueSplice(ed,0,0,Ra,ud)});function _wrap(Ra){return function(ed){const ud=this.length-1,dd=this.parents().last();for(let hd=0;hd{const{parent:dd}=Ra;if(!dd)return;const hd=dd.children,md=hd.indexOf(Ra);update([Ra],ed),uniqueSplice(hd,md,0,ud,dd)}),wrapInner=_wrap((Ra,ed,ud)=>{hasChildren(Ra)&&(update(Ra.children,ed),update(ud,Ra))});function unwrap(Ra){return this.parent(Ra).not("body").each((ed,ud)=>{this._make(ud).replaceWith(ud.children)}),this}function wrapAll(Ra){const ed=this[0];if(ed){const ud=this._make(typeof Ra=="function"?Ra.call(ed,0,ed):Ra).insertBefore(ed);let dd;for(let md=0;md{if(!hasChildren(ud)||!ud.parent)return;const hd=ud.parent.children,md=hd.indexOf(ud);if(md<0)return;const gd=typeof Ra[0]=="function"?Ra[0].call(ud,dd,this._render(ud.children)):Ra,yd=this._makeDomArray(gd,dd{if(!hasChildren(ud)||!ud.parent)return;const hd=ud.parent.children,md=hd.indexOf(ud);if(md<0)return;const gd=typeof Ra[0]=="function"?Ra[0].call(ud,dd,this._render(ud.children)):Ra,yd=this._makeDomArray(gd,dd{const hd=this.clone().toArray(),{parent:md}=dd;if(!md)return;const gd=md.children,yd=gd.indexOf(dd);yd<0||(uniqueSplice(gd,yd,0,hd,md),ud.push(...hd))}),this._make(ud)}function remove$1(Ra){const ed=Ra?this.filter(Ra):this;return domEach(ed,ud=>{removeElement(ud),ud.prev=ud.next=ud.parent=null}),this}function replaceWith(Ra){return domEach(this,(ed,ud)=>{const{parent:dd}=ed;if(!dd)return;const hd=dd.children,md=typeof Ra=="function"?Ra.call(ed,ud,ed):Ra,gd=this._makeDomArray(md);update(gd,null);const yd=hd.indexOf(ed);uniqueSplice(hd,yd,1,gd,dd),gd.includes(ed)||(ed.parent=ed.prev=ed.next=null)})}function empty$1(){return domEach(this,Ra=>{if(hasChildren(Ra)){for(const ed of Ra.children)ed.next=ed.prev=ed.parent=null;Ra.children.length=0}})}function html$4(Ra){if(Ra===void 0){const ed=this[0];return!ed||!hasChildren(ed)?null:this._render(ed.children)}return domEach(this,ed=>{if(!hasChildren(ed))return;for(const dd of ed.children)dd.next=dd.prev=dd.parent=null;const ud=isCheerio(Ra)?Ra.toArray():this._parse(`${Ra}`,this.options,!1,ed).children;update(ud,ed)})}function toString$3(){return this._render(this)}function text$2(Ra){return Ra===void 0?text$3(this):typeof Ra=="function"?domEach(this,(ed,ud)=>this._make(ed).text(Ra.call(ed,ud,text$3([ed])))):domEach(this,ed=>{if(!hasChildren(ed))return;for(const dd of ed.children)dd.next=dd.prev=dd.parent=null;const ud=new Text(`${Ra}`);update(ud,ed)})}function clone$2(){const Ra=Array.prototype.map.call(this.get(),ud=>cloneNode(ud,!0)),ed=new Document(Ra);for(const ud of Ra)ud.parent=ed;return this._make(Ra)}const Manipulation=Object.freeze(Object.defineProperty({__proto__:null,_makeDomArray,after,append:append$2,appendTo,before,clone:clone$2,empty:empty$1,html:html$4,insertAfter,insertBefore,prepend,prependTo,remove:remove$1,replaceWith,text:text$2,toString:toString$3,unwrap,wrap:wrap$1,wrapAll,wrapInner},Symbol.toStringTag,{value:"Module"}));function css$1(Ra,ed){if(Ra!=null&&ed!=null||typeof Ra=="object"&&!Array.isArray(Ra))return domEach(this,(ud,dd)=>{isTag(ud)&&setCss(ud,Ra,ed,dd)});if(this.length!==0)return getCss(this[0],Ra)}function setCss(Ra,ed,ud,dd){if(typeof ed=="string"){const hd=getCss(Ra),md=typeof ud=="function"?ud.call(Ra,dd,hd[ed]):ud;md===""?delete hd[ed]:md!=null&&(hd[ed]=md),Ra.attribs.style=stringify$3(hd)}else if(typeof ed=="object"){const hd=Object.keys(ed);for(let md=0;md`${ed}${ed?" ":""}${ud}: ${Ra[ud]};`,"")}function parse$6(Ra){if(Ra=(Ra||"").trim(),!Ra)return{};const ed={};let ud;for(const dd of Ra.split(";")){const hd=dd.indexOf(":");if(hd<1||hd===dd.length-1){const md=dd.trimEnd();md.length>0&&ud!==void 0&&(ed[ud]+=`;${md}`)}else ud=dd.slice(0,hd).trim(),ed[ud]=dd.slice(hd+1).trim()}return ed}const Css=Object.freeze(Object.defineProperty({__proto__:null,css:css$1},Symbol.toStringTag,{value:"Module"})),submittableSelector="input,select,textarea,keygen",r20=/%20/g,rCRLF=/\r?\n/g;function serialize$1(){return this.serializeArray().map(ud=>`${encodeURIComponent(ud.name)}=${encodeURIComponent(ud.value)}`).join("&").replace(r20,"+")}function serializeArray(){return this.map((Ra,ed)=>{const ud=this._make(ed);return isTag(ed)&&ed.name==="form"?ud.find(submittableSelector).toArray():ud.filter(submittableSelector).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((Ra,ed)=>{var ud;const dd=this._make(ed),hd=dd.attr("name"),md=(ud=dd.val())!==null&&ud!==void 0?ud:"";return Array.isArray(md)?md.map(gd=>({name:hd,value:gd.replace(rCRLF,`\r +`)})):{name:hd,value:md.replace(rCRLF,`\r +`)}}).toArray()}const Forms=Object.freeze(Object.defineProperty({__proto__:null,serialize:serialize$1,serializeArray},Symbol.toStringTag,{value:"Module"}));function getExtractDescr(Ra){var ed;return typeof Ra=="string"?{selector:Ra,value:"textContent"}:{selector:Ra.selector,value:(ed=Ra.value)!==null&&ed!==void 0?ed:"textContent"}}function extract(Ra){const ed={};for(const ud in Ra){const dd=Ra[ud],hd=Array.isArray(dd),{selector:md,value:gd}=getExtractDescr(hd?dd[0]:dd),yd=typeof gd=="function"?gd:typeof gd=="string"?vd=>this._make(vd).prop(gd):vd=>this._make(vd).extract(gd);if(hd)ed[ud]=this._findBySelector(md,Number.POSITIVE_INFINITY).map((vd,Cd)=>yd(Cd,ud,ed)).get();else{const vd=this._findBySelector(md,1);ed[ud]=vd.length>0?yd(vd[0],ud,ed):void 0}}return ed}const Extract=Object.freeze(Object.defineProperty({__proto__:null,extract},Symbol.toStringTag,{value:"Module"}));class Cheerio{constructor(ed,ud,dd){if(this.length=0,this.options=dd,this._root=ud,ed){for(let hd=0;hd=55296&&Ra<=57343}function isSurrogatePair(Ra){return Ra>=56320&&Ra<=57343}function getSurrogatePairCodePoint(Ra,ed){return(Ra-55296)*1024+9216+ed}function isControlCodePoint(Ra){return Ra!==32&&Ra!==10&&Ra!==13&&Ra!==9&&Ra!==12&&Ra>=1&&Ra<=31||Ra>=127&&Ra<=159}function isUndefinedCodePoint(Ra){return Ra>=64976&&Ra<=65007||UNDEFINED_CODE_POINTS.has(Ra)}var ERR;(function(Ra){Ra.controlCharacterInInputStream="control-character-in-input-stream",Ra.noncharacterInInputStream="noncharacter-in-input-stream",Ra.surrogateInInputStream="surrogate-in-input-stream",Ra.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Ra.endTagWithAttributes="end-tag-with-attributes",Ra.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Ra.unexpectedSolidusInTag="unexpected-solidus-in-tag",Ra.unexpectedNullCharacter="unexpected-null-character",Ra.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Ra.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Ra.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Ra.missingEndTagName="missing-end-tag-name",Ra.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Ra.unknownNamedCharacterReference="unknown-named-character-reference",Ra.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Ra.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Ra.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Ra.eofBeforeTagName="eof-before-tag-name",Ra.eofInTag="eof-in-tag",Ra.missingAttributeValue="missing-attribute-value",Ra.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Ra.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Ra.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Ra.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Ra.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Ra.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Ra.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Ra.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Ra.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Ra.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Ra.cdataInHtmlContent="cdata-in-html-content",Ra.incorrectlyOpenedComment="incorrectly-opened-comment",Ra.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Ra.eofInDoctype="eof-in-doctype",Ra.nestedComment="nested-comment",Ra.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Ra.eofInComment="eof-in-comment",Ra.incorrectlyClosedComment="incorrectly-closed-comment",Ra.eofInCdata="eof-in-cdata",Ra.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Ra.nullCharacterReference="null-character-reference",Ra.surrogateCharacterReference="surrogate-character-reference",Ra.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Ra.controlCharacterReference="control-character-reference",Ra.noncharacterCharacterReference="noncharacter-character-reference",Ra.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Ra.missingDoctypeName="missing-doctype-name",Ra.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Ra.duplicateAttribute="duplicate-attribute",Ra.nonConformingDoctype="non-conforming-doctype",Ra.missingDoctype="missing-doctype",Ra.misplacedDoctype="misplaced-doctype",Ra.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Ra.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Ra.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Ra.openElementsLeftAfterEof="open-elements-left-after-eof",Ra.abandonedHeadElementChild="abandoned-head-element-child",Ra.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Ra.nestedNoscriptInHead="nested-noscript-in-head",Ra.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ERR||(ERR={}));const DEFAULT_BUFFER_WATERLINE=65536;class Preprocessor{constructor(ed){this.handler=ed,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(ed,ud){const{line:dd,col:hd,offset:md}=this,gd=hd+ud,yd=md+ud;return{code:ed,startLine:dd,endLine:dd,startCol:gd,endCol:gd,startOffset:yd,endOffset:yd}}_err(ed){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(ed,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(ed){if(this.pos!==this.html.length-1){const ud=this.html.charCodeAt(this.pos+1);if(isSurrogatePair(ud))return this.pos++,this._addGap(),getSurrogatePairCodePoint(ed,ud)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,CODE_POINTS.EOF;return this._err(ERR.surrogateInInputStream),ed}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(ed,ud){this.html.length>0?this.html+=ed:this.html=ed,this.endOfChunkHit=!1,this.lastChunkWritten=ud}insertHtmlAtCurrentPos(ed){this.html=this.html.substring(0,this.pos+1)+ed+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(ed,ud){if(this.pos+ed.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(ud)return this.html.startsWith(ed,this.pos);for(let dd=0;dd=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;const dd=this.html.charCodeAt(ud);return dd===CODE_POINTS.CARRIAGE_RETURN?CODE_POINTS.LINE_FEED:dd}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;let ed=this.html.charCodeAt(this.pos);return ed===CODE_POINTS.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,CODE_POINTS.LINE_FEED):ed===CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,isSurrogate(ed)&&(ed=this._processSurrogate(ed)),this.handler.onParseError===null||ed>31&&ed<127||ed===CODE_POINTS.LINE_FEED||ed===CODE_POINTS.CARRIAGE_RETURN||ed>159&&ed<64976||this._checkForProblematicCharacters(ed),ed)}_checkForProblematicCharacters(ed){isControlCodePoint(ed)?this._err(ERR.controlCharacterInInputStream):isUndefinedCodePoint(ed)&&this._err(ERR.noncharacterInInputStream)}retreat(ed){for(this.pos-=ed;this.pos=0;ud--)if(Ra.attrs[ud].name===ed)return Ra.attrs[ud].value;return null}const htmlDecodeTree=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(Ra=>Ra.charCodeAt(0))),xmlDecodeTree=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(Ra=>Ra.charCodeAt(0)));var _a$2;const decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fromCodePoint=(_a$2=String.fromCodePoint)!==null&&_a$2!==void 0?_a$2:function(Ra){let ed="";return Ra>65535&&(Ra-=65536,ed+=String.fromCharCode(Ra>>>10&1023|55296),Ra=56320|Ra&1023),ed+=String.fromCharCode(Ra),ed};function replaceCodePoint(Ra){var ed;return Ra>=55296&&Ra<=57343||Ra>1114111?65533:(ed=decodeMap.get(Ra))!==null&&ed!==void 0?ed:Ra}var CharCodes$1;(function(Ra){Ra[Ra.NUM=35]="NUM",Ra[Ra.SEMI=59]="SEMI",Ra[Ra.EQUALS=61]="EQUALS",Ra[Ra.ZERO=48]="ZERO",Ra[Ra.NINE=57]="NINE",Ra[Ra.LOWER_A=97]="LOWER_A",Ra[Ra.LOWER_F=102]="LOWER_F",Ra[Ra.LOWER_X=120]="LOWER_X",Ra[Ra.LOWER_Z=122]="LOWER_Z",Ra[Ra.UPPER_A=65]="UPPER_A",Ra[Ra.UPPER_F=70]="UPPER_F",Ra[Ra.UPPER_Z=90]="UPPER_Z"})(CharCodes$1||(CharCodes$1={}));const TO_LOWER_BIT=32;var BinTrieFlags;(function(Ra){Ra[Ra.VALUE_LENGTH=49152]="VALUE_LENGTH",Ra[Ra.BRANCH_LENGTH=16256]="BRANCH_LENGTH",Ra[Ra.JUMP_TABLE=127]="JUMP_TABLE"})(BinTrieFlags||(BinTrieFlags={}));function isNumber$2(Ra){return Ra>=CharCodes$1.ZERO&&Ra<=CharCodes$1.NINE}function isHexadecimalCharacter(Ra){return Ra>=CharCodes$1.UPPER_A&&Ra<=CharCodes$1.UPPER_F||Ra>=CharCodes$1.LOWER_A&&Ra<=CharCodes$1.LOWER_F}function isAsciiAlphaNumeric$1(Ra){return Ra>=CharCodes$1.UPPER_A&&Ra<=CharCodes$1.UPPER_Z||Ra>=CharCodes$1.LOWER_A&&Ra<=CharCodes$1.LOWER_Z||isNumber$2(Ra)}function isEntityInAttributeInvalidEnd(Ra){return Ra===CharCodes$1.EQUALS||isAsciiAlphaNumeric$1(Ra)}var EntityDecoderState;(function(Ra){Ra[Ra.EntityStart=0]="EntityStart",Ra[Ra.NumericStart=1]="NumericStart",Ra[Ra.NumericDecimal=2]="NumericDecimal",Ra[Ra.NumericHex=3]="NumericHex",Ra[Ra.NamedEntity=4]="NamedEntity"})(EntityDecoderState||(EntityDecoderState={}));var DecodingMode;(function(Ra){Ra[Ra.Legacy=0]="Legacy",Ra[Ra.Strict=1]="Strict",Ra[Ra.Attribute=2]="Attribute"})(DecodingMode||(DecodingMode={}));class EntityDecoder{constructor(ed,ud,dd){this.decodeTree=ed,this.emitCodePoint=ud,this.errors=dd,this.state=EntityDecoderState.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=DecodingMode.Strict}startEntity(ed){this.decodeMode=ed,this.state=EntityDecoderState.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(ed,ud){switch(this.state){case EntityDecoderState.EntityStart:return ed.charCodeAt(ud)===CharCodes$1.NUM?(this.state=EntityDecoderState.NumericStart,this.consumed+=1,this.stateNumericStart(ed,ud+1)):(this.state=EntityDecoderState.NamedEntity,this.stateNamedEntity(ed,ud));case EntityDecoderState.NumericStart:return this.stateNumericStart(ed,ud);case EntityDecoderState.NumericDecimal:return this.stateNumericDecimal(ed,ud);case EntityDecoderState.NumericHex:return this.stateNumericHex(ed,ud);case EntityDecoderState.NamedEntity:return this.stateNamedEntity(ed,ud)}}stateNumericStart(ed,ud){return ud>=ed.length?-1:(ed.charCodeAt(ud)|TO_LOWER_BIT)===CharCodes$1.LOWER_X?(this.state=EntityDecoderState.NumericHex,this.consumed+=1,this.stateNumericHex(ed,ud+1)):(this.state=EntityDecoderState.NumericDecimal,this.stateNumericDecimal(ed,ud))}addToNumericResult(ed,ud,dd,hd){if(ud!==dd){const md=dd-ud;this.result=this.result*Math.pow(hd,md)+parseInt(ed.substr(ud,md),hd),this.consumed+=md}}stateNumericHex(ed,ud){const dd=ud;for(;ud>14;for(;ud>14,md!==0){if(gd===CharCodes$1.SEMI)return this.emitNamedEntityData(this.treeIndex,md,this.consumed+this.excess);this.decodeMode!==DecodingMode.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var ed;const{result:ud,decodeTree:dd}=this,hd=(dd[ud]&BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(ud,hd,this.consumed),(ed=this.errors)===null||ed===void 0||ed.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(ed,ud,dd){const{decodeTree:hd}=this;return this.emitCodePoint(ud===1?hd[ed]&~BinTrieFlags.VALUE_LENGTH:hd[ed+1],dd),ud===3&&this.emitCodePoint(hd[ed+2],dd),dd}end(){var ed;switch(this.state){case EntityDecoderState.NamedEntity:return this.result!==0&&(this.decodeMode!==DecodingMode.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case EntityDecoderState.NumericDecimal:return this.emitNumericEntity(0,2);case EntityDecoderState.NumericHex:return this.emitNumericEntity(0,3);case EntityDecoderState.NumericStart:return(ed=this.errors)===null||ed===void 0||ed.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case EntityDecoderState.EntityStart:return 0}}}function getDecoder(Ra){let ed="";const ud=new EntityDecoder(Ra,dd=>ed+=fromCodePoint(dd));return function(hd,md){let gd=0,yd=0;for(;(yd=hd.indexOf("&",yd))>=0;){ed+=hd.slice(gd,yd),ud.startEntity(md);const Cd=ud.write(hd,yd+1);if(Cd<0){gd=yd+ud.end();break}gd=yd+Cd,yd=Cd===0?gd+1:gd}const vd=ed+hd.slice(gd);return ed="",vd}}function determineBranch(Ra,ed,ud,dd){const hd=(ed&BinTrieFlags.BRANCH_LENGTH)>>7,md=ed&BinTrieFlags.JUMP_TABLE;if(hd===0)return md!==0&&dd===md?ud:-1;if(md){const vd=dd-md;return vd<0||vd>=hd?-1:Ra[ud+vd]-1}let gd=ud,yd=gd+hd-1;for(;gd<=yd;){const vd=gd+yd>>>1,Cd=Ra[vd];if(Cddd)yd=vd-1;else return Ra[vd+hd]}return-1}getDecoder(htmlDecodeTree);getDecoder(xmlDecodeTree);var NS;(function(Ra){Ra.HTML="http://www.w3.org/1999/xhtml",Ra.MATHML="http://www.w3.org/1998/Math/MathML",Ra.SVG="http://www.w3.org/2000/svg",Ra.XLINK="http://www.w3.org/1999/xlink",Ra.XML="http://www.w3.org/XML/1998/namespace",Ra.XMLNS="http://www.w3.org/2000/xmlns/"})(NS||(NS={}));var ATTRS;(function(Ra){Ra.TYPE="type",Ra.ACTION="action",Ra.ENCODING="encoding",Ra.PROMPT="prompt",Ra.NAME="name",Ra.COLOR="color",Ra.FACE="face",Ra.SIZE="size"})(ATTRS||(ATTRS={}));var DOCUMENT_MODE;(function(Ra){Ra.NO_QUIRKS="no-quirks",Ra.QUIRKS="quirks",Ra.LIMITED_QUIRKS="limited-quirks"})(DOCUMENT_MODE||(DOCUMENT_MODE={}));var TAG_NAMES;(function(Ra){Ra.A="a",Ra.ADDRESS="address",Ra.ANNOTATION_XML="annotation-xml",Ra.APPLET="applet",Ra.AREA="area",Ra.ARTICLE="article",Ra.ASIDE="aside",Ra.B="b",Ra.BASE="base",Ra.BASEFONT="basefont",Ra.BGSOUND="bgsound",Ra.BIG="big",Ra.BLOCKQUOTE="blockquote",Ra.BODY="body",Ra.BR="br",Ra.BUTTON="button",Ra.CAPTION="caption",Ra.CENTER="center",Ra.CODE="code",Ra.COL="col",Ra.COLGROUP="colgroup",Ra.DD="dd",Ra.DESC="desc",Ra.DETAILS="details",Ra.DIALOG="dialog",Ra.DIR="dir",Ra.DIV="div",Ra.DL="dl",Ra.DT="dt",Ra.EM="em",Ra.EMBED="embed",Ra.FIELDSET="fieldset",Ra.FIGCAPTION="figcaption",Ra.FIGURE="figure",Ra.FONT="font",Ra.FOOTER="footer",Ra.FOREIGN_OBJECT="foreignObject",Ra.FORM="form",Ra.FRAME="frame",Ra.FRAMESET="frameset",Ra.H1="h1",Ra.H2="h2",Ra.H3="h3",Ra.H4="h4",Ra.H5="h5",Ra.H6="h6",Ra.HEAD="head",Ra.HEADER="header",Ra.HGROUP="hgroup",Ra.HR="hr",Ra.HTML="html",Ra.I="i",Ra.IMG="img",Ra.IMAGE="image",Ra.INPUT="input",Ra.IFRAME="iframe",Ra.KEYGEN="keygen",Ra.LABEL="label",Ra.LI="li",Ra.LINK="link",Ra.LISTING="listing",Ra.MAIN="main",Ra.MALIGNMARK="malignmark",Ra.MARQUEE="marquee",Ra.MATH="math",Ra.MENU="menu",Ra.META="meta",Ra.MGLYPH="mglyph",Ra.MI="mi",Ra.MO="mo",Ra.MN="mn",Ra.MS="ms",Ra.MTEXT="mtext",Ra.NAV="nav",Ra.NOBR="nobr",Ra.NOFRAMES="noframes",Ra.NOEMBED="noembed",Ra.NOSCRIPT="noscript",Ra.OBJECT="object",Ra.OL="ol",Ra.OPTGROUP="optgroup",Ra.OPTION="option",Ra.P="p",Ra.PARAM="param",Ra.PLAINTEXT="plaintext",Ra.PRE="pre",Ra.RB="rb",Ra.RP="rp",Ra.RT="rt",Ra.RTC="rtc",Ra.RUBY="ruby",Ra.S="s",Ra.SCRIPT="script",Ra.SEARCH="search",Ra.SECTION="section",Ra.SELECT="select",Ra.SOURCE="source",Ra.SMALL="small",Ra.SPAN="span",Ra.STRIKE="strike",Ra.STRONG="strong",Ra.STYLE="style",Ra.SUB="sub",Ra.SUMMARY="summary",Ra.SUP="sup",Ra.TABLE="table",Ra.TBODY="tbody",Ra.TEMPLATE="template",Ra.TEXTAREA="textarea",Ra.TFOOT="tfoot",Ra.TD="td",Ra.TH="th",Ra.THEAD="thead",Ra.TITLE="title",Ra.TR="tr",Ra.TRACK="track",Ra.TT="tt",Ra.U="u",Ra.UL="ul",Ra.SVG="svg",Ra.VAR="var",Ra.WBR="wbr",Ra.XMP="xmp"})(TAG_NAMES||(TAG_NAMES={}));var TAG_ID;(function(Ra){Ra[Ra.UNKNOWN=0]="UNKNOWN",Ra[Ra.A=1]="A",Ra[Ra.ADDRESS=2]="ADDRESS",Ra[Ra.ANNOTATION_XML=3]="ANNOTATION_XML",Ra[Ra.APPLET=4]="APPLET",Ra[Ra.AREA=5]="AREA",Ra[Ra.ARTICLE=6]="ARTICLE",Ra[Ra.ASIDE=7]="ASIDE",Ra[Ra.B=8]="B",Ra[Ra.BASE=9]="BASE",Ra[Ra.BASEFONT=10]="BASEFONT",Ra[Ra.BGSOUND=11]="BGSOUND",Ra[Ra.BIG=12]="BIG",Ra[Ra.BLOCKQUOTE=13]="BLOCKQUOTE",Ra[Ra.BODY=14]="BODY",Ra[Ra.BR=15]="BR",Ra[Ra.BUTTON=16]="BUTTON",Ra[Ra.CAPTION=17]="CAPTION",Ra[Ra.CENTER=18]="CENTER",Ra[Ra.CODE=19]="CODE",Ra[Ra.COL=20]="COL",Ra[Ra.COLGROUP=21]="COLGROUP",Ra[Ra.DD=22]="DD",Ra[Ra.DESC=23]="DESC",Ra[Ra.DETAILS=24]="DETAILS",Ra[Ra.DIALOG=25]="DIALOG",Ra[Ra.DIR=26]="DIR",Ra[Ra.DIV=27]="DIV",Ra[Ra.DL=28]="DL",Ra[Ra.DT=29]="DT",Ra[Ra.EM=30]="EM",Ra[Ra.EMBED=31]="EMBED",Ra[Ra.FIELDSET=32]="FIELDSET",Ra[Ra.FIGCAPTION=33]="FIGCAPTION",Ra[Ra.FIGURE=34]="FIGURE",Ra[Ra.FONT=35]="FONT",Ra[Ra.FOOTER=36]="FOOTER",Ra[Ra.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",Ra[Ra.FORM=38]="FORM",Ra[Ra.FRAME=39]="FRAME",Ra[Ra.FRAMESET=40]="FRAMESET",Ra[Ra.H1=41]="H1",Ra[Ra.H2=42]="H2",Ra[Ra.H3=43]="H3",Ra[Ra.H4=44]="H4",Ra[Ra.H5=45]="H5",Ra[Ra.H6=46]="H6",Ra[Ra.HEAD=47]="HEAD",Ra[Ra.HEADER=48]="HEADER",Ra[Ra.HGROUP=49]="HGROUP",Ra[Ra.HR=50]="HR",Ra[Ra.HTML=51]="HTML",Ra[Ra.I=52]="I",Ra[Ra.IMG=53]="IMG",Ra[Ra.IMAGE=54]="IMAGE",Ra[Ra.INPUT=55]="INPUT",Ra[Ra.IFRAME=56]="IFRAME",Ra[Ra.KEYGEN=57]="KEYGEN",Ra[Ra.LABEL=58]="LABEL",Ra[Ra.LI=59]="LI",Ra[Ra.LINK=60]="LINK",Ra[Ra.LISTING=61]="LISTING",Ra[Ra.MAIN=62]="MAIN",Ra[Ra.MALIGNMARK=63]="MALIGNMARK",Ra[Ra.MARQUEE=64]="MARQUEE",Ra[Ra.MATH=65]="MATH",Ra[Ra.MENU=66]="MENU",Ra[Ra.META=67]="META",Ra[Ra.MGLYPH=68]="MGLYPH",Ra[Ra.MI=69]="MI",Ra[Ra.MO=70]="MO",Ra[Ra.MN=71]="MN",Ra[Ra.MS=72]="MS",Ra[Ra.MTEXT=73]="MTEXT",Ra[Ra.NAV=74]="NAV",Ra[Ra.NOBR=75]="NOBR",Ra[Ra.NOFRAMES=76]="NOFRAMES",Ra[Ra.NOEMBED=77]="NOEMBED",Ra[Ra.NOSCRIPT=78]="NOSCRIPT",Ra[Ra.OBJECT=79]="OBJECT",Ra[Ra.OL=80]="OL",Ra[Ra.OPTGROUP=81]="OPTGROUP",Ra[Ra.OPTION=82]="OPTION",Ra[Ra.P=83]="P",Ra[Ra.PARAM=84]="PARAM",Ra[Ra.PLAINTEXT=85]="PLAINTEXT",Ra[Ra.PRE=86]="PRE",Ra[Ra.RB=87]="RB",Ra[Ra.RP=88]="RP",Ra[Ra.RT=89]="RT",Ra[Ra.RTC=90]="RTC",Ra[Ra.RUBY=91]="RUBY",Ra[Ra.S=92]="S",Ra[Ra.SCRIPT=93]="SCRIPT",Ra[Ra.SEARCH=94]="SEARCH",Ra[Ra.SECTION=95]="SECTION",Ra[Ra.SELECT=96]="SELECT",Ra[Ra.SOURCE=97]="SOURCE",Ra[Ra.SMALL=98]="SMALL",Ra[Ra.SPAN=99]="SPAN",Ra[Ra.STRIKE=100]="STRIKE",Ra[Ra.STRONG=101]="STRONG",Ra[Ra.STYLE=102]="STYLE",Ra[Ra.SUB=103]="SUB",Ra[Ra.SUMMARY=104]="SUMMARY",Ra[Ra.SUP=105]="SUP",Ra[Ra.TABLE=106]="TABLE",Ra[Ra.TBODY=107]="TBODY",Ra[Ra.TEMPLATE=108]="TEMPLATE",Ra[Ra.TEXTAREA=109]="TEXTAREA",Ra[Ra.TFOOT=110]="TFOOT",Ra[Ra.TD=111]="TD",Ra[Ra.TH=112]="TH",Ra[Ra.THEAD=113]="THEAD",Ra[Ra.TITLE=114]="TITLE",Ra[Ra.TR=115]="TR",Ra[Ra.TRACK=116]="TRACK",Ra[Ra.TT=117]="TT",Ra[Ra.U=118]="U",Ra[Ra.UL=119]="UL",Ra[Ra.SVG=120]="SVG",Ra[Ra.VAR=121]="VAR",Ra[Ra.WBR=122]="WBR",Ra[Ra.XMP=123]="XMP"})(TAG_ID||(TAG_ID={}));const TAG_NAME_TO_ID=new Map([[TAG_NAMES.A,TAG_ID.A],[TAG_NAMES.ADDRESS,TAG_ID.ADDRESS],[TAG_NAMES.ANNOTATION_XML,TAG_ID.ANNOTATION_XML],[TAG_NAMES.APPLET,TAG_ID.APPLET],[TAG_NAMES.AREA,TAG_ID.AREA],[TAG_NAMES.ARTICLE,TAG_ID.ARTICLE],[TAG_NAMES.ASIDE,TAG_ID.ASIDE],[TAG_NAMES.B,TAG_ID.B],[TAG_NAMES.BASE,TAG_ID.BASE],[TAG_NAMES.BASEFONT,TAG_ID.BASEFONT],[TAG_NAMES.BGSOUND,TAG_ID.BGSOUND],[TAG_NAMES.BIG,TAG_ID.BIG],[TAG_NAMES.BLOCKQUOTE,TAG_ID.BLOCKQUOTE],[TAG_NAMES.BODY,TAG_ID.BODY],[TAG_NAMES.BR,TAG_ID.BR],[TAG_NAMES.BUTTON,TAG_ID.BUTTON],[TAG_NAMES.CAPTION,TAG_ID.CAPTION],[TAG_NAMES.CENTER,TAG_ID.CENTER],[TAG_NAMES.CODE,TAG_ID.CODE],[TAG_NAMES.COL,TAG_ID.COL],[TAG_NAMES.COLGROUP,TAG_ID.COLGROUP],[TAG_NAMES.DD,TAG_ID.DD],[TAG_NAMES.DESC,TAG_ID.DESC],[TAG_NAMES.DETAILS,TAG_ID.DETAILS],[TAG_NAMES.DIALOG,TAG_ID.DIALOG],[TAG_NAMES.DIR,TAG_ID.DIR],[TAG_NAMES.DIV,TAG_ID.DIV],[TAG_NAMES.DL,TAG_ID.DL],[TAG_NAMES.DT,TAG_ID.DT],[TAG_NAMES.EM,TAG_ID.EM],[TAG_NAMES.EMBED,TAG_ID.EMBED],[TAG_NAMES.FIELDSET,TAG_ID.FIELDSET],[TAG_NAMES.FIGCAPTION,TAG_ID.FIGCAPTION],[TAG_NAMES.FIGURE,TAG_ID.FIGURE],[TAG_NAMES.FONT,TAG_ID.FONT],[TAG_NAMES.FOOTER,TAG_ID.FOOTER],[TAG_NAMES.FOREIGN_OBJECT,TAG_ID.FOREIGN_OBJECT],[TAG_NAMES.FORM,TAG_ID.FORM],[TAG_NAMES.FRAME,TAG_ID.FRAME],[TAG_NAMES.FRAMESET,TAG_ID.FRAMESET],[TAG_NAMES.H1,TAG_ID.H1],[TAG_NAMES.H2,TAG_ID.H2],[TAG_NAMES.H3,TAG_ID.H3],[TAG_NAMES.H4,TAG_ID.H4],[TAG_NAMES.H5,TAG_ID.H5],[TAG_NAMES.H6,TAG_ID.H6],[TAG_NAMES.HEAD,TAG_ID.HEAD],[TAG_NAMES.HEADER,TAG_ID.HEADER],[TAG_NAMES.HGROUP,TAG_ID.HGROUP],[TAG_NAMES.HR,TAG_ID.HR],[TAG_NAMES.HTML,TAG_ID.HTML],[TAG_NAMES.I,TAG_ID.I],[TAG_NAMES.IMG,TAG_ID.IMG],[TAG_NAMES.IMAGE,TAG_ID.IMAGE],[TAG_NAMES.INPUT,TAG_ID.INPUT],[TAG_NAMES.IFRAME,TAG_ID.IFRAME],[TAG_NAMES.KEYGEN,TAG_ID.KEYGEN],[TAG_NAMES.LABEL,TAG_ID.LABEL],[TAG_NAMES.LI,TAG_ID.LI],[TAG_NAMES.LINK,TAG_ID.LINK],[TAG_NAMES.LISTING,TAG_ID.LISTING],[TAG_NAMES.MAIN,TAG_ID.MAIN],[TAG_NAMES.MALIGNMARK,TAG_ID.MALIGNMARK],[TAG_NAMES.MARQUEE,TAG_ID.MARQUEE],[TAG_NAMES.MATH,TAG_ID.MATH],[TAG_NAMES.MENU,TAG_ID.MENU],[TAG_NAMES.META,TAG_ID.META],[TAG_NAMES.MGLYPH,TAG_ID.MGLYPH],[TAG_NAMES.MI,TAG_ID.MI],[TAG_NAMES.MO,TAG_ID.MO],[TAG_NAMES.MN,TAG_ID.MN],[TAG_NAMES.MS,TAG_ID.MS],[TAG_NAMES.MTEXT,TAG_ID.MTEXT],[TAG_NAMES.NAV,TAG_ID.NAV],[TAG_NAMES.NOBR,TAG_ID.NOBR],[TAG_NAMES.NOFRAMES,TAG_ID.NOFRAMES],[TAG_NAMES.NOEMBED,TAG_ID.NOEMBED],[TAG_NAMES.NOSCRIPT,TAG_ID.NOSCRIPT],[TAG_NAMES.OBJECT,TAG_ID.OBJECT],[TAG_NAMES.OL,TAG_ID.OL],[TAG_NAMES.OPTGROUP,TAG_ID.OPTGROUP],[TAG_NAMES.OPTION,TAG_ID.OPTION],[TAG_NAMES.P,TAG_ID.P],[TAG_NAMES.PARAM,TAG_ID.PARAM],[TAG_NAMES.PLAINTEXT,TAG_ID.PLAINTEXT],[TAG_NAMES.PRE,TAG_ID.PRE],[TAG_NAMES.RB,TAG_ID.RB],[TAG_NAMES.RP,TAG_ID.RP],[TAG_NAMES.RT,TAG_ID.RT],[TAG_NAMES.RTC,TAG_ID.RTC],[TAG_NAMES.RUBY,TAG_ID.RUBY],[TAG_NAMES.S,TAG_ID.S],[TAG_NAMES.SCRIPT,TAG_ID.SCRIPT],[TAG_NAMES.SEARCH,TAG_ID.SEARCH],[TAG_NAMES.SECTION,TAG_ID.SECTION],[TAG_NAMES.SELECT,TAG_ID.SELECT],[TAG_NAMES.SOURCE,TAG_ID.SOURCE],[TAG_NAMES.SMALL,TAG_ID.SMALL],[TAG_NAMES.SPAN,TAG_ID.SPAN],[TAG_NAMES.STRIKE,TAG_ID.STRIKE],[TAG_NAMES.STRONG,TAG_ID.STRONG],[TAG_NAMES.STYLE,TAG_ID.STYLE],[TAG_NAMES.SUB,TAG_ID.SUB],[TAG_NAMES.SUMMARY,TAG_ID.SUMMARY],[TAG_NAMES.SUP,TAG_ID.SUP],[TAG_NAMES.TABLE,TAG_ID.TABLE],[TAG_NAMES.TBODY,TAG_ID.TBODY],[TAG_NAMES.TEMPLATE,TAG_ID.TEMPLATE],[TAG_NAMES.TEXTAREA,TAG_ID.TEXTAREA],[TAG_NAMES.TFOOT,TAG_ID.TFOOT],[TAG_NAMES.TD,TAG_ID.TD],[TAG_NAMES.TH,TAG_ID.TH],[TAG_NAMES.THEAD,TAG_ID.THEAD],[TAG_NAMES.TITLE,TAG_ID.TITLE],[TAG_NAMES.TR,TAG_ID.TR],[TAG_NAMES.TRACK,TAG_ID.TRACK],[TAG_NAMES.TT,TAG_ID.TT],[TAG_NAMES.U,TAG_ID.U],[TAG_NAMES.UL,TAG_ID.UL],[TAG_NAMES.SVG,TAG_ID.SVG],[TAG_NAMES.VAR,TAG_ID.VAR],[TAG_NAMES.WBR,TAG_ID.WBR],[TAG_NAMES.XMP,TAG_ID.XMP]]);function getTagID(Ra){var ed;return(ed=TAG_NAME_TO_ID.get(Ra))!==null&&ed!==void 0?ed:TAG_ID.UNKNOWN}const $$4=TAG_ID,SPECIAL_ELEMENTS={[NS.HTML]:new Set([$$4.ADDRESS,$$4.APPLET,$$4.AREA,$$4.ARTICLE,$$4.ASIDE,$$4.BASE,$$4.BASEFONT,$$4.BGSOUND,$$4.BLOCKQUOTE,$$4.BODY,$$4.BR,$$4.BUTTON,$$4.CAPTION,$$4.CENTER,$$4.COL,$$4.COLGROUP,$$4.DD,$$4.DETAILS,$$4.DIR,$$4.DIV,$$4.DL,$$4.DT,$$4.EMBED,$$4.FIELDSET,$$4.FIGCAPTION,$$4.FIGURE,$$4.FOOTER,$$4.FORM,$$4.FRAME,$$4.FRAMESET,$$4.H1,$$4.H2,$$4.H3,$$4.H4,$$4.H5,$$4.H6,$$4.HEAD,$$4.HEADER,$$4.HGROUP,$$4.HR,$$4.HTML,$$4.IFRAME,$$4.IMG,$$4.INPUT,$$4.LI,$$4.LINK,$$4.LISTING,$$4.MAIN,$$4.MARQUEE,$$4.MENU,$$4.META,$$4.NAV,$$4.NOEMBED,$$4.NOFRAMES,$$4.NOSCRIPT,$$4.OBJECT,$$4.OL,$$4.P,$$4.PARAM,$$4.PLAINTEXT,$$4.PRE,$$4.SCRIPT,$$4.SECTION,$$4.SELECT,$$4.SOURCE,$$4.STYLE,$$4.SUMMARY,$$4.TABLE,$$4.TBODY,$$4.TD,$$4.TEMPLATE,$$4.TEXTAREA,$$4.TFOOT,$$4.TH,$$4.THEAD,$$4.TITLE,$$4.TR,$$4.TRACK,$$4.UL,$$4.WBR,$$4.XMP]),[NS.MATHML]:new Set([$$4.MI,$$4.MO,$$4.MN,$$4.MS,$$4.MTEXT,$$4.ANNOTATION_XML]),[NS.SVG]:new Set([$$4.TITLE,$$4.FOREIGN_OBJECT,$$4.DESC]),[NS.XLINK]:new Set,[NS.XML]:new Set,[NS.XMLNS]:new Set},NUMBERED_HEADERS=new Set([$$4.H1,$$4.H2,$$4.H3,$$4.H4,$$4.H5,$$4.H6]),UNESCAPED_TEXT=new Set([TAG_NAMES.STYLE,TAG_NAMES.SCRIPT,TAG_NAMES.XMP,TAG_NAMES.IFRAME,TAG_NAMES.NOEMBED,TAG_NAMES.NOFRAMES,TAG_NAMES.PLAINTEXT]);function hasUnescapedText(Ra,ed){return UNESCAPED_TEXT.has(Ra)||ed&&Ra===TAG_NAMES.NOSCRIPT}var State$5;(function(Ra){Ra[Ra.DATA=0]="DATA",Ra[Ra.RCDATA=1]="RCDATA",Ra[Ra.RAWTEXT=2]="RAWTEXT",Ra[Ra.SCRIPT_DATA=3]="SCRIPT_DATA",Ra[Ra.PLAINTEXT=4]="PLAINTEXT",Ra[Ra.TAG_OPEN=5]="TAG_OPEN",Ra[Ra.END_TAG_OPEN=6]="END_TAG_OPEN",Ra[Ra.TAG_NAME=7]="TAG_NAME",Ra[Ra.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Ra[Ra.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Ra[Ra.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Ra[Ra.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Ra[Ra.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Ra[Ra.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Ra[Ra.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Ra[Ra.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Ra[Ra.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Ra[Ra.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Ra[Ra.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Ra[Ra.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Ra[Ra.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Ra[Ra.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Ra[Ra.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Ra[Ra.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Ra[Ra.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Ra[Ra.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Ra[Ra.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Ra[Ra.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Ra[Ra.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Ra[Ra.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Ra[Ra.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Ra[Ra.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Ra[Ra.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Ra[Ra.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Ra[Ra.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Ra[Ra.BOGUS_COMMENT=40]="BOGUS_COMMENT",Ra[Ra.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Ra[Ra.COMMENT_START=42]="COMMENT_START",Ra[Ra.COMMENT_START_DASH=43]="COMMENT_START_DASH",Ra[Ra.COMMENT=44]="COMMENT",Ra[Ra.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Ra[Ra.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Ra[Ra.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Ra[Ra.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Ra[Ra.COMMENT_END_DASH=49]="COMMENT_END_DASH",Ra[Ra.COMMENT_END=50]="COMMENT_END",Ra[Ra.COMMENT_END_BANG=51]="COMMENT_END_BANG",Ra[Ra.DOCTYPE=52]="DOCTYPE",Ra[Ra.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Ra[Ra.DOCTYPE_NAME=54]="DOCTYPE_NAME",Ra[Ra.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Ra[Ra.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Ra[Ra.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Ra[Ra.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Ra[Ra.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Ra[Ra.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Ra[Ra.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Ra[Ra.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Ra[Ra.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Ra[Ra.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Ra[Ra.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Ra[Ra.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Ra[Ra.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Ra[Ra.CDATA_SECTION=68]="CDATA_SECTION",Ra[Ra.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Ra[Ra.CDATA_SECTION_END=70]="CDATA_SECTION_END",Ra[Ra.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Ra[Ra.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(State$5||(State$5={}));const TokenizerMode={DATA:State$5.DATA,RCDATA:State$5.RCDATA,RAWTEXT:State$5.RAWTEXT,SCRIPT_DATA:State$5.SCRIPT_DATA,PLAINTEXT:State$5.PLAINTEXT,CDATA_SECTION:State$5.CDATA_SECTION};function isAsciiDigit(Ra){return Ra>=CODE_POINTS.DIGIT_0&&Ra<=CODE_POINTS.DIGIT_9}function isAsciiUpper(Ra){return Ra>=CODE_POINTS.LATIN_CAPITAL_A&&Ra<=CODE_POINTS.LATIN_CAPITAL_Z}function isAsciiLower(Ra){return Ra>=CODE_POINTS.LATIN_SMALL_A&&Ra<=CODE_POINTS.LATIN_SMALL_Z}function isAsciiLetter(Ra){return isAsciiLower(Ra)||isAsciiUpper(Ra)}function isAsciiAlphaNumeric(Ra){return isAsciiLetter(Ra)||isAsciiDigit(Ra)}function toAsciiLower(Ra){return Ra+32}function isWhitespace$3(Ra){return Ra===CODE_POINTS.SPACE||Ra===CODE_POINTS.LINE_FEED||Ra===CODE_POINTS.TABULATION||Ra===CODE_POINTS.FORM_FEED}function isScriptDataDoubleEscapeSequenceEnd(Ra){return isWhitespace$3(Ra)||Ra===CODE_POINTS.SOLIDUS||Ra===CODE_POINTS.GREATER_THAN_SIGN}function getErrorForNumericCharacterReference(Ra){return Ra===CODE_POINTS.NULL?ERR.nullCharacterReference:Ra>1114111?ERR.characterReferenceOutsideUnicodeRange:isSurrogate(Ra)?ERR.surrogateCharacterReference:isUndefinedCodePoint(Ra)?ERR.noncharacterCharacterReference:isControlCodePoint(Ra)||Ra===CODE_POINTS.CARRIAGE_RETURN?ERR.controlCharacterReference:null}let Tokenizer$1=class{constructor(ed,ud){this.options=ed,this.handler=ud,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=State$5.DATA,this.returnState=State$5.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Preprocessor(ud),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new EntityDecoder(htmlDecodeTree,(dd,hd)=>{this.preprocessor.pos=this.entityStartPos+hd-1,this._flushCodePointConsumedAsCharacterReference(dd)},ud.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ERR.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:dd=>{this._err(ERR.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+dd)},validateNumericCharacterReference:dd=>{const hd=getErrorForNumericCharacterReference(dd);hd&&this._err(hd,1)}}:void 0)}_err(ed,ud=0){var dd,hd;(hd=(dd=this.handler).onParseError)===null||hd===void 0||hd.call(dd,this.preprocessor.getError(ed,ud))}getCurrentLocation(ed){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-ed,startOffset:this.preprocessor.offset-ed,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const ed=this._consume();this._ensureHibernation()||this._callState(ed)}this.inLoop=!1}}pause(){this.paused=!0}resume(ed){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||ed==null||ed())}write(ed,ud,dd){this.active=!0,this.preprocessor.write(ed,ud),this._runParsingLoop(),this.paused||dd==null||dd()}insertHtmlAtCurrentPos(ed){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(ed),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(ed){this.consumedAfterSnapshot+=ed;for(let ud=0;ud0&&this._err(ERR.endTagWithAttributes),ed.selfClosing&&this._err(ERR.endTagWithTrailingSolidus),this.handler.onEndTag(ed)),this.preprocessor.dropParsedChunk()}emitCurrentComment(ed){this.prepareToken(ed),this.handler.onComment(ed),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(ed){this.prepareToken(ed),this.handler.onDoctype(ed),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(ed){if(this.currentCharacterToken){switch(ed&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=ed.startLine,this.currentCharacterToken.location.endCol=ed.startCol,this.currentCharacterToken.location.endOffset=ed.startOffset),this.currentCharacterToken.type){case TokenType.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case TokenType.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case TokenType.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const ed=this.getCurrentLocation(0);ed&&(ed.endLine=ed.startLine,ed.endCol=ed.startCol,ed.endOffset=ed.startOffset),this._emitCurrentCharacterToken(ed),this.handler.onEof({type:TokenType.EOF,location:ed}),this.active=!1}_appendCharToCurrentCharacterToken(ed,ud){if(this.currentCharacterToken)if(this.currentCharacterToken.type===ed){this.currentCharacterToken.chars+=ud;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(ed,ud)}_emitCodePoint(ed){const ud=isWhitespace$3(ed)?TokenType.WHITESPACE_CHARACTER:ed===CODE_POINTS.NULL?TokenType.NULL_CHARACTER:TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(ud,String.fromCodePoint(ed))}_emitChars(ed){this._appendCharToCurrentCharacterToken(TokenType.CHARACTER,ed)}_startCharacterReference(){this.returnState=this.state,this.state=State$5.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?DecodingMode.Attribute:DecodingMode.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===State$5.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===State$5.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===State$5.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(ed){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(ed):this._emitCodePoint(ed)}_callState(ed){switch(this.state){case State$5.DATA:{this._stateData(ed);break}case State$5.RCDATA:{this._stateRcdata(ed);break}case State$5.RAWTEXT:{this._stateRawtext(ed);break}case State$5.SCRIPT_DATA:{this._stateScriptData(ed);break}case State$5.PLAINTEXT:{this._statePlaintext(ed);break}case State$5.TAG_OPEN:{this._stateTagOpen(ed);break}case State$5.END_TAG_OPEN:{this._stateEndTagOpen(ed);break}case State$5.TAG_NAME:{this._stateTagName(ed);break}case State$5.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(ed);break}case State$5.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(ed);break}case State$5.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(ed);break}case State$5.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(ed);break}case State$5.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(ed);break}case State$5.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(ed);break}case State$5.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(ed);break}case State$5.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(ed);break}case State$5.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(ed);break}case State$5.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(ed);break}case State$5.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(ed);break}case State$5.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(ed);break}case State$5.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(ed);break}case State$5.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(ed);break}case State$5.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(ed);break}case State$5.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(ed);break}case State$5.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(ed);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(ed);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(ed);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(ed);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(ed);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(ed);break}case State$5.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(ed);break}case State$5.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(ed);break}case State$5.ATTRIBUTE_NAME:{this._stateAttributeName(ed);break}case State$5.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(ed);break}case State$5.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(ed);break}case State$5.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(ed);break}case State$5.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(ed);break}case State$5.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(ed);break}case State$5.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(ed);break}case State$5.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(ed);break}case State$5.BOGUS_COMMENT:{this._stateBogusComment(ed);break}case State$5.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(ed);break}case State$5.COMMENT_START:{this._stateCommentStart(ed);break}case State$5.COMMENT_START_DASH:{this._stateCommentStartDash(ed);break}case State$5.COMMENT:{this._stateComment(ed);break}case State$5.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(ed);break}case State$5.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(ed);break}case State$5.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(ed);break}case State$5.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(ed);break}case State$5.COMMENT_END_DASH:{this._stateCommentEndDash(ed);break}case State$5.COMMENT_END:{this._stateCommentEnd(ed);break}case State$5.COMMENT_END_BANG:{this._stateCommentEndBang(ed);break}case State$5.DOCTYPE:{this._stateDoctype(ed);break}case State$5.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(ed);break}case State$5.DOCTYPE_NAME:{this._stateDoctypeName(ed);break}case State$5.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(ed);break}case State$5.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(ed);break}case State$5.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(ed);break}case State$5.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(ed);break}case State$5.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(ed);break}case State$5.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(ed);break}case State$5.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(ed);break}case State$5.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(ed);break}case State$5.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(ed);break}case State$5.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(ed);break}case State$5.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(ed);break}case State$5.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(ed);break}case State$5.BOGUS_DOCTYPE:{this._stateBogusDoctype(ed);break}case State$5.CDATA_SECTION:{this._stateCdataSection(ed);break}case State$5.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(ed);break}case State$5.CDATA_SECTION_END:{this._stateCdataSectionEnd(ed);break}case State$5.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case State$5.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(ed);break}default:throw new Error("Unknown state")}}_stateData(ed){switch(ed){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.TAG_OPEN;break}case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitCodePoint(ed);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(ed)}}_stateRcdata(ed){switch(ed){case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.RCDATA_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(ed)}}_stateRawtext(ed){switch(ed){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.RAWTEXT_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(ed)}}_stateScriptData(ed){switch(ed){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$5.SCRIPT_DATA_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(ed)}}_statePlaintext(ed){switch(ed){case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(ed)}}_stateTagOpen(ed){if(isAsciiLetter(ed))this._createStartTagToken(),this.state=State$5.TAG_NAME,this._stateTagName(ed);else switch(ed){case CODE_POINTS.EXCLAMATION_MARK:{this.state=State$5.MARKUP_DECLARATION_OPEN;break}case CODE_POINTS.SOLIDUS:{this.state=State$5.END_TAG_OPEN;break}case CODE_POINTS.QUESTION_MARK:{this._err(ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=State$5.BOGUS_COMMENT,this._stateBogusComment(ed);break}case CODE_POINTS.EOF:{this._err(ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=State$5.DATA,this._stateData(ed)}}_stateEndTagOpen(ed){if(isAsciiLetter(ed))this._createEndTagToken(),this.state=State$5.TAG_NAME,this._stateTagName(ed);else switch(ed){case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingEndTagName),this.state=State$5.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofBeforeTagName),this._emitChars("");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$5.SCRIPT_DATA_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$5.SCRIPT_DATA_ESCAPED,this._emitCodePoint(ed)}}_stateScriptDataEscapedLessThanSign(ed){ed===CODE_POINTS.SOLIDUS?this.state=State$5.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:isAsciiLetter(ed)?(this._emitChars("<"),this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(ed)):(this._emitChars("<"),this.state=State$5.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(ed))}_stateScriptDataEscapedEndTagOpen(ed){isAsciiLetter(ed)?(this.state=State$5.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(ed)):(this._emitChars("");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(ed)}}_stateScriptDataDoubleEscapedLessThanSign(ed){ed===CODE_POINTS.SOLIDUS?(this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=State$5.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(ed))}_stateScriptDataDoubleEscapeEnd(ed){if(this.preprocessor.startsWith(SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))){this._emitCodePoint(ed);for(let ud=0;ud0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(ed,!0)}replace(ed,ud){const dd=this._indexOf(ed);this.items[dd]=ud,dd===this.stackTop&&(this.current=ud)}insertAfter(ed,ud,dd){const hd=this._indexOf(ed)+1;this.items.splice(hd,0,ud),this.tagIDs.splice(hd,0,dd),this.stackTop++,hd===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,hd===this.stackTop)}popUntilTagNamePopped(ed){let ud=this.stackTop+1;do ud=this.tagIDs.lastIndexOf(ed,ud-1);while(ud>0&&this.treeAdapter.getNamespaceURI(this.items[ud])!==NS.HTML);this.shortenToLength(ud<0?0:ud)}shortenToLength(ed){for(;this.stackTop>=ed;){const ud=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(ud,this.stackTop=0;dd--)if(ed.has(this.tagIDs[dd])&&this.treeAdapter.getNamespaceURI(this.items[dd])===ud)return dd;return-1}clearBackTo(ed,ud){const dd=this._indexOfTagNames(ed,ud);this.shortenToLength(dd+1)}clearBackToTableContext(){this.clearBackTo(TABLE_CONTEXT,NS.HTML)}clearBackToTableBodyContext(){this.clearBackTo(TABLE_BODY_CONTEXT,NS.HTML)}clearBackToTableRowContext(){this.clearBackTo(TABLE_ROW_CONTEXT,NS.HTML)}remove(ed){const ud=this._indexOf(ed);ud>=0&&(ud===this.stackTop?this.pop():(this.items.splice(ud,1),this.tagIDs.splice(ud,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(ed,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===TAG_ID.BODY?this.items[1]:null}contains(ed){return this._indexOf(ed)>-1}getCommonAncestor(ed){const ud=this._indexOf(ed)-1;return ud>=0?this.items[ud]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===TAG_ID.HTML}hasInDynamicScope(ed,ud){for(let dd=this.stackTop;dd>=0;dd--){const hd=this.tagIDs[dd];switch(this.treeAdapter.getNamespaceURI(this.items[dd])){case NS.HTML:{if(hd===ed)return!0;if(ud.has(hd))return!1;break}case NS.SVG:{if(SCOPING_ELEMENTS_SVG.has(hd))return!1;break}case NS.MATHML:{if(SCOPING_ELEMENTS_MATHML.has(hd))return!1;break}}}return!0}hasInScope(ed){return this.hasInDynamicScope(ed,SCOPING_ELEMENTS_HTML)}hasInListItemScope(ed){return this.hasInDynamicScope(ed,SCOPING_ELEMENTS_HTML_LIST)}hasInButtonScope(ed){return this.hasInDynamicScope(ed,SCOPING_ELEMENTS_HTML_BUTTON)}hasNumberedHeaderInScope(){for(let ed=this.stackTop;ed>=0;ed--){const ud=this.tagIDs[ed];switch(this.treeAdapter.getNamespaceURI(this.items[ed])){case NS.HTML:{if(NUMBERED_HEADERS.has(ud))return!0;if(SCOPING_ELEMENTS_HTML.has(ud))return!1;break}case NS.SVG:{if(SCOPING_ELEMENTS_SVG.has(ud))return!1;break}case NS.MATHML:{if(SCOPING_ELEMENTS_MATHML.has(ud))return!1;break}}}return!0}hasInTableScope(ed){for(let ud=this.stackTop;ud>=0;ud--)if(this.treeAdapter.getNamespaceURI(this.items[ud])===NS.HTML)switch(this.tagIDs[ud]){case ed:return!0;case TAG_ID.TABLE:case TAG_ID.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let ed=this.stackTop;ed>=0;ed--)if(this.treeAdapter.getNamespaceURI(this.items[ed])===NS.HTML)switch(this.tagIDs[ed]){case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:return!0;case TAG_ID.TABLE:case TAG_ID.HTML:return!1}return!0}hasInSelectScope(ed){for(let ud=this.stackTop;ud>=0;ud--)if(this.treeAdapter.getNamespaceURI(this.items[ud])===NS.HTML)switch(this.tagIDs[ud]){case ed:return!0;case TAG_ID.OPTION:case TAG_ID.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(ed){for(;this.currentTagId!==ed&&IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}}const NOAH_ARK_CAPACITY=3;var EntryType;(function(Ra){Ra[Ra.Marker=0]="Marker",Ra[Ra.Element=1]="Element"})(EntryType||(EntryType={}));const MARKER={type:EntryType.Marker};class FormattingElementList{constructor(ed){this.treeAdapter=ed,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(ed,ud){const dd=[],hd=ud.length,md=this.treeAdapter.getTagName(ed),gd=this.treeAdapter.getNamespaceURI(ed);for(let yd=0;yd[gd.name,gd.value]));let md=0;for(let gd=0;gdhd.get(vd.name)===vd.value)&&(md+=1,md>=NOAH_ARK_CAPACITY&&this.entries.splice(yd.idx,1))}}insertMarker(){this.entries.unshift(MARKER)}pushElement(ed,ud){this._ensureNoahArkCondition(ed),this.entries.unshift({type:EntryType.Element,element:ed,token:ud})}insertElementAfterBookmark(ed,ud){const dd=this.entries.indexOf(this.bookmark);this.entries.splice(dd,0,{type:EntryType.Element,element:ed,token:ud})}removeEntry(ed){const ud=this.entries.indexOf(ed);ud>=0&&this.entries.splice(ud,1)}clearToLastMarker(){const ed=this.entries.indexOf(MARKER);ed>=0?this.entries.splice(0,ed+1):this.entries.length=0}getElementEntryInScopeWithTagName(ed){const ud=this.entries.find(dd=>dd.type===EntryType.Marker||this.treeAdapter.getTagName(dd.element)===ed);return ud&&ud.type===EntryType.Element?ud:null}getElementEntry(ed){return this.entries.find(ud=>ud.type===EntryType.Element&&ud.element===ed)}}const defaultTreeAdapter={createDocument(){return{nodeName:"#document",mode:DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(Ra,ed,ud){return{nodeName:Ra,tagName:Ra,attrs:ud,namespaceURI:ed,childNodes:[],parentNode:null}},createCommentNode(Ra){return{nodeName:"#comment",data:Ra,parentNode:null}},createTextNode(Ra){return{nodeName:"#text",value:Ra,parentNode:null}},appendChild(Ra,ed){Ra.childNodes.push(ed),ed.parentNode=Ra},insertBefore(Ra,ed,ud){const dd=Ra.childNodes.indexOf(ud);Ra.childNodes.splice(dd,0,ed),ed.parentNode=Ra},setTemplateContent(Ra,ed){Ra.content=ed},getTemplateContent(Ra){return Ra.content},setDocumentType(Ra,ed,ud,dd){const hd=Ra.childNodes.find(md=>md.nodeName==="#documentType");if(hd)hd.name=ed,hd.publicId=ud,hd.systemId=dd;else{const md={nodeName:"#documentType",name:ed,publicId:ud,systemId:dd,parentNode:null};defaultTreeAdapter.appendChild(Ra,md)}},setDocumentMode(Ra,ed){Ra.mode=ed},getDocumentMode(Ra){return Ra.mode},detachNode(Ra){if(Ra.parentNode){const ed=Ra.parentNode.childNodes.indexOf(Ra);Ra.parentNode.childNodes.splice(ed,1),Ra.parentNode=null}},insertText(Ra,ed){if(Ra.childNodes.length>0){const ud=Ra.childNodes[Ra.childNodes.length-1];if(defaultTreeAdapter.isTextNode(ud)){ud.value+=ed;return}}defaultTreeAdapter.appendChild(Ra,defaultTreeAdapter.createTextNode(ed))},insertTextBefore(Ra,ed,ud){const dd=Ra.childNodes[Ra.childNodes.indexOf(ud)-1];dd&&defaultTreeAdapter.isTextNode(dd)?dd.value+=ed:defaultTreeAdapter.insertBefore(Ra,defaultTreeAdapter.createTextNode(ed),ud)},adoptAttributes(Ra,ed){const ud=new Set(Ra.attrs.map(dd=>dd.name));for(let dd=0;ddRa.startsWith(ud))}function isConforming(Ra){return Ra.name===VALID_DOCTYPE_NAME&&Ra.publicId===null&&(Ra.systemId===null||Ra.systemId===VALID_SYSTEM_ID)}function getDocumentMode(Ra){if(Ra.name!==VALID_DOCTYPE_NAME)return DOCUMENT_MODE.QUIRKS;const{systemId:ed}=Ra;if(ed&&ed.toLowerCase()===QUIRKS_MODE_SYSTEM_ID)return DOCUMENT_MODE.QUIRKS;let{publicId:ud}=Ra;if(ud!==null){if(ud=ud.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS.has(ud))return DOCUMENT_MODE.QUIRKS;let dd=ed===null?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(ud,dd))return DOCUMENT_MODE.QUIRKS;if(dd=ed===null?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(ud,dd))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS}const MIME_TYPES={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},DEFINITION_URL_ATTR="definitionurl",ADJUSTED_DEFINITION_URL_ATTR="definitionURL",SVG_ATTRS_ADJUSTMENT_MAP=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(Ra=>[Ra.toLowerCase(),Ra])),XML_ATTRS_ADJUSTMENT_MAP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:NS.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:NS.XMLNS}]]),SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(Ra=>[Ra.toLowerCase(),Ra])),EXITS_FOREIGN_CONTENT=new Set([TAG_ID.B,TAG_ID.BIG,TAG_ID.BLOCKQUOTE,TAG_ID.BODY,TAG_ID.BR,TAG_ID.CENTER,TAG_ID.CODE,TAG_ID.DD,TAG_ID.DIV,TAG_ID.DL,TAG_ID.DT,TAG_ID.EM,TAG_ID.EMBED,TAG_ID.H1,TAG_ID.H2,TAG_ID.H3,TAG_ID.H4,TAG_ID.H5,TAG_ID.H6,TAG_ID.HEAD,TAG_ID.HR,TAG_ID.I,TAG_ID.IMG,TAG_ID.LI,TAG_ID.LISTING,TAG_ID.MENU,TAG_ID.META,TAG_ID.NOBR,TAG_ID.OL,TAG_ID.P,TAG_ID.PRE,TAG_ID.RUBY,TAG_ID.S,TAG_ID.SMALL,TAG_ID.SPAN,TAG_ID.STRONG,TAG_ID.STRIKE,TAG_ID.SUB,TAG_ID.SUP,TAG_ID.TABLE,TAG_ID.TT,TAG_ID.U,TAG_ID.UL,TAG_ID.VAR]);function causesExit(Ra){const ed=Ra.tagID;return ed===TAG_ID.FONT&&Ra.attrs.some(({name:dd})=>dd===ATTRS.COLOR||dd===ATTRS.SIZE||dd===ATTRS.FACE)||EXITS_FOREIGN_CONTENT.has(ed)}function adjustTokenMathMLAttrs(Ra){for(let ed=0;ed0&&this._setContextModes(ed,ud)}onItemPop(ed,ud){var dd,hd;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(ed,this.currentToken),(hd=(dd=this.treeAdapter).onItemPop)===null||hd===void 0||hd.call(dd,ed,this.openElements.current),ud){let md,gd;this.openElements.stackTop===0&&this.fragmentContext?(md=this.fragmentContext,gd=this.fragmentContextID):{current:md,currentTagId:gd}=this.openElements,this._setContextModes(md,gd)}}_setContextModes(ed,ud){const dd=ed===this.document||this.treeAdapter.getNamespaceURI(ed)===NS.HTML;this.currentNotInHTML=!dd,this.tokenizer.inForeignNode=!dd&&!this._isIntegrationPoint(ud,ed)}_switchToTextParsing(ed,ud){this._insertElement(ed,NS.HTML),this.tokenizer.state=ud,this.originalInsertionMode=this.insertionMode,this.insertionMode=InsertionMode.TEXT}switchToPlaintextParsing(){this.insertionMode=InsertionMode.TEXT,this.originalInsertionMode=InsertionMode.IN_BODY,this.tokenizer.state=TokenizerMode.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let ed=this.fragmentContext;for(;ed;){if(this.treeAdapter.getTagName(ed)===TAG_NAMES.FORM){this.formElement=ed;break}ed=this.treeAdapter.getParentNode(ed)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==NS.HTML))switch(this.fragmentContextID){case TAG_ID.TITLE:case TAG_ID.TEXTAREA:{this.tokenizer.state=TokenizerMode.RCDATA;break}case TAG_ID.STYLE:case TAG_ID.XMP:case TAG_ID.IFRAME:case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:case TAG_ID.NOSCRIPT:{this.tokenizer.state=TokenizerMode.RAWTEXT;break}case TAG_ID.SCRIPT:{this.tokenizer.state=TokenizerMode.SCRIPT_DATA;break}case TAG_ID.PLAINTEXT:{this.tokenizer.state=TokenizerMode.PLAINTEXT;break}}}_setDocumentType(ed){const ud=ed.name||"",dd=ed.publicId||"",hd=ed.systemId||"";if(this.treeAdapter.setDocumentType(this.document,ud,dd,hd),ed.location){const gd=this.treeAdapter.getChildNodes(this.document).find(yd=>this.treeAdapter.isDocumentTypeNode(yd));gd&&this.treeAdapter.setNodeSourceCodeLocation(gd,ed.location)}}_attachElementToTree(ed,ud){if(this.options.sourceCodeLocationInfo){const dd=ud&&{...ud,startTag:ud};this.treeAdapter.setNodeSourceCodeLocation(ed,dd)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(ed);else{const dd=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(dd,ed)}}_appendElement(ed,ud){const dd=this.treeAdapter.createElement(ed.tagName,ud,ed.attrs);this._attachElementToTree(dd,ed.location)}_insertElement(ed,ud){const dd=this.treeAdapter.createElement(ed.tagName,ud,ed.attrs);this._attachElementToTree(dd,ed.location),this.openElements.push(dd,ed.tagID)}_insertFakeElement(ed,ud){const dd=this.treeAdapter.createElement(ed,NS.HTML,[]);this._attachElementToTree(dd,null),this.openElements.push(dd,ud)}_insertTemplate(ed){const ud=this.treeAdapter.createElement(ed.tagName,NS.HTML,ed.attrs),dd=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(ud,dd),this._attachElementToTree(ud,ed.location),this.openElements.push(ud,ed.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(dd,null)}_insertFakeRootElement(){const ed=this.treeAdapter.createElement(TAG_NAMES.HTML,NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(ed,null),this.treeAdapter.appendChild(this.openElements.current,ed),this.openElements.push(ed,TAG_ID.HTML)}_appendCommentNode(ed,ud){const dd=this.treeAdapter.createCommentNode(ed.data);this.treeAdapter.appendChild(ud,dd),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(dd,ed.location)}_insertCharacters(ed){let ud,dd;if(this._shouldFosterParentOnInsertion()?({parent:ud,beforeElement:dd}=this._findFosterParentingLocation(),dd?this.treeAdapter.insertTextBefore(ud,ed.chars,dd):this.treeAdapter.insertText(ud,ed.chars)):(ud=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(ud,ed.chars)),!ed.location)return;const hd=this.treeAdapter.getChildNodes(ud),md=dd?hd.lastIndexOf(dd):hd.length,gd=hd[md-1];if(this.treeAdapter.getNodeSourceCodeLocation(gd)){const{endLine:vd,endCol:Cd,endOffset:wd}=ed.location;this.treeAdapter.updateNodeSourceCodeLocation(gd,{endLine:vd,endCol:Cd,endOffset:wd})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(gd,ed.location)}_adoptNodes(ed,ud){for(let dd=this.treeAdapter.getFirstChild(ed);dd;dd=this.treeAdapter.getFirstChild(ed))this.treeAdapter.detachNode(dd),this.treeAdapter.appendChild(ud,dd)}_setEndLocation(ed,ud){if(this.treeAdapter.getNodeSourceCodeLocation(ed)&&ud.location){const dd=ud.location,hd=this.treeAdapter.getTagName(ed),md=ud.type===TokenType.END_TAG&&hd===ud.tagName?{endTag:{...dd},endLine:dd.endLine,endCol:dd.endCol,endOffset:dd.endOffset}:{endLine:dd.startLine,endCol:dd.startCol,endOffset:dd.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(ed,md)}}shouldProcessStartTagTokenInForeignContent(ed){if(!this.currentNotInHTML)return!1;let ud,dd;return this.openElements.stackTop===0&&this.fragmentContext?(ud=this.fragmentContext,dd=this.fragmentContextID):{current:ud,currentTagId:dd}=this.openElements,ed.tagID===TAG_ID.SVG&&this.treeAdapter.getTagName(ud)===TAG_NAMES.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(ud)===NS.MATHML?!1:this.tokenizer.inForeignNode||(ed.tagID===TAG_ID.MGLYPH||ed.tagID===TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(dd,ud,NS.HTML)}_processToken(ed){switch(ed.type){case TokenType.CHARACTER:{this.onCharacter(ed);break}case TokenType.NULL_CHARACTER:{this.onNullCharacter(ed);break}case TokenType.COMMENT:{this.onComment(ed);break}case TokenType.DOCTYPE:{this.onDoctype(ed);break}case TokenType.START_TAG:{this._processStartTag(ed);break}case TokenType.END_TAG:{this.onEndTag(ed);break}case TokenType.EOF:{this.onEof(ed);break}case TokenType.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(ed);break}}}_isIntegrationPoint(ed,ud,dd){const hd=this.treeAdapter.getNamespaceURI(ud),md=this.treeAdapter.getAttrList(ud);return isIntegrationPoint(ed,hd,md,dd)}_reconstructActiveFormattingElements(){const ed=this.activeFormattingElements.entries.length;if(ed){const ud=this.activeFormattingElements.entries.findIndex(hd=>hd.type===EntryType.Marker||this.openElements.contains(hd.element)),dd=ud<0?ed-1:ud-1;for(let hd=dd;hd>=0;hd--){const md=this.activeFormattingElements.entries[hd];this._insertElement(md.token,this.treeAdapter.getNamespaceURI(md.element)),md.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=InsertionMode.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P),this.openElements.popUntilTagNamePopped(TAG_ID.P)}_resetInsertionMode(){for(let ed=this.openElements.stackTop;ed>=0;ed--)switch(ed===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[ed]){case TAG_ID.TR:{this.insertionMode=InsertionMode.IN_ROW;return}case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:{this.insertionMode=InsertionMode.IN_TABLE_BODY;return}case TAG_ID.CAPTION:{this.insertionMode=InsertionMode.IN_CAPTION;return}case TAG_ID.COLGROUP:{this.insertionMode=InsertionMode.IN_COLUMN_GROUP;return}case TAG_ID.TABLE:{this.insertionMode=InsertionMode.IN_TABLE;return}case TAG_ID.BODY:{this.insertionMode=InsertionMode.IN_BODY;return}case TAG_ID.FRAMESET:{this.insertionMode=InsertionMode.IN_FRAMESET;return}case TAG_ID.SELECT:{this._resetInsertionModeForSelect(ed);return}case TAG_ID.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case TAG_ID.HTML:{this.insertionMode=this.headElement?InsertionMode.AFTER_HEAD:InsertionMode.BEFORE_HEAD;return}case TAG_ID.TD:case TAG_ID.TH:{if(ed>0){this.insertionMode=InsertionMode.IN_CELL;return}break}case TAG_ID.HEAD:{if(ed>0){this.insertionMode=InsertionMode.IN_HEAD;return}break}}this.insertionMode=InsertionMode.IN_BODY}_resetInsertionModeForSelect(ed){if(ed>0)for(let ud=ed-1;ud>0;ud--){const dd=this.openElements.tagIDs[ud];if(dd===TAG_ID.TEMPLATE)break;if(dd===TAG_ID.TABLE){this.insertionMode=InsertionMode.IN_SELECT_IN_TABLE;return}}this.insertionMode=InsertionMode.IN_SELECT}_isElementCausesFosterParenting(ed){return TABLE_STRUCTURE_TAGS.has(ed)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let ed=this.openElements.stackTop;ed>=0;ed--){const ud=this.openElements.items[ed];switch(this.openElements.tagIDs[ed]){case TAG_ID.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(ud)===NS.HTML)return{parent:this.treeAdapter.getTemplateContent(ud),beforeElement:null};break}case TAG_ID.TABLE:{const dd=this.treeAdapter.getParentNode(ud);return dd?{parent:dd,beforeElement:ud}:{parent:this.openElements.items[ed-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(ed){const ud=this._findFosterParentingLocation();ud.beforeElement?this.treeAdapter.insertBefore(ud.parent,ed,ud.beforeElement):this.treeAdapter.appendChild(ud.parent,ed)}_isSpecialElement(ed,ud){const dd=this.treeAdapter.getNamespaceURI(ed);return SPECIAL_ELEMENTS[dd].has(ud)}onCharacter(ed){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){characterInForeignContent(this,ed);return}switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,ed);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,ed);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,ed);break}case InsertionMode.IN_HEAD:{tokenInHead(this,ed);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,ed);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,ed);break}case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:{characterInBody(this,ed);break}case InsertionMode.TEXT:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:{this._insertCharacters(ed);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,ed);break}case InsertionMode.IN_TABLE_TEXT:{characterInTableText(this,ed);break}case InsertionMode.IN_COLUMN_GROUP:{tokenInColumnGroup(this,ed);break}case InsertionMode.AFTER_BODY:{tokenAfterBody(this,ed);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,ed);break}}}onNullCharacter(ed){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nullCharacterInForeignContent(this,ed);return}switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,ed);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,ed);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,ed);break}case InsertionMode.IN_HEAD:{tokenInHead(this,ed);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,ed);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,ed);break}case InsertionMode.TEXT:{this._insertCharacters(ed);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,ed);break}case InsertionMode.IN_COLUMN_GROUP:{tokenInColumnGroup(this,ed);break}case InsertionMode.AFTER_BODY:{tokenAfterBody(this,ed);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,ed);break}}}onComment(ed){if(this.skipNextNewLine=!1,this.currentNotInHTML){appendComment(this,ed);return}switch(this.insertionMode){case InsertionMode.INITIAL:case InsertionMode.BEFORE_HTML:case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_TEMPLATE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:{appendComment(this,ed);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,ed);break}case InsertionMode.AFTER_BODY:{appendCommentToRootHtmlElement(this,ed);break}case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{appendCommentToDocument(this,ed);break}}}onDoctype(ed){switch(this.skipNextNewLine=!1,this.insertionMode){case InsertionMode.INITIAL:{doctypeInInitialMode(this,ed);break}case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:{this._err(ed,ERR.misplacedDoctype);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,ed);break}}}onStartTag(ed){this.skipNextNewLine=!1,this.currentToken=ed,this._processStartTag(ed),ed.selfClosing&&!ed.ackSelfClosing&&this._err(ed,ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(ed){this.shouldProcessStartTagTokenInForeignContent(ed)?startTagInForeignContent(this,ed):this._startTagOutsideForeignContent(ed)}_startTagOutsideForeignContent(ed){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,ed);break}case InsertionMode.BEFORE_HTML:{startTagBeforeHtml(this,ed);break}case InsertionMode.BEFORE_HEAD:{startTagBeforeHead(this,ed);break}case InsertionMode.IN_HEAD:{startTagInHead(this,ed);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{startTagInHeadNoScript(this,ed);break}case InsertionMode.AFTER_HEAD:{startTagAfterHead(this,ed);break}case InsertionMode.IN_BODY:{startTagInBody(this,ed);break}case InsertionMode.IN_TABLE:{startTagInTable(this,ed);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,ed);break}case InsertionMode.IN_CAPTION:{startTagInCaption(this,ed);break}case InsertionMode.IN_COLUMN_GROUP:{startTagInColumnGroup(this,ed);break}case InsertionMode.IN_TABLE_BODY:{startTagInTableBody(this,ed);break}case InsertionMode.IN_ROW:{startTagInRow(this,ed);break}case InsertionMode.IN_CELL:{startTagInCell(this,ed);break}case InsertionMode.IN_SELECT:{startTagInSelect(this,ed);break}case InsertionMode.IN_SELECT_IN_TABLE:{startTagInSelectInTable(this,ed);break}case InsertionMode.IN_TEMPLATE:{startTagInTemplate(this,ed);break}case InsertionMode.AFTER_BODY:{startTagAfterBody(this,ed);break}case InsertionMode.IN_FRAMESET:{startTagInFrameset(this,ed);break}case InsertionMode.AFTER_FRAMESET:{startTagAfterFrameset(this,ed);break}case InsertionMode.AFTER_AFTER_BODY:{startTagAfterAfterBody(this,ed);break}case InsertionMode.AFTER_AFTER_FRAMESET:{startTagAfterAfterFrameset(this,ed);break}}}onEndTag(ed){this.skipNextNewLine=!1,this.currentToken=ed,this.currentNotInHTML?endTagInForeignContent(this,ed):this._endTagOutsideForeignContent(ed)}_endTagOutsideForeignContent(ed){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,ed);break}case InsertionMode.BEFORE_HTML:{endTagBeforeHtml(this,ed);break}case InsertionMode.BEFORE_HEAD:{endTagBeforeHead(this,ed);break}case InsertionMode.IN_HEAD:{endTagInHead(this,ed);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{endTagInHeadNoScript(this,ed);break}case InsertionMode.AFTER_HEAD:{endTagAfterHead(this,ed);break}case InsertionMode.IN_BODY:{endTagInBody(this,ed);break}case InsertionMode.TEXT:{endTagInText(this,ed);break}case InsertionMode.IN_TABLE:{endTagInTable(this,ed);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,ed);break}case InsertionMode.IN_CAPTION:{endTagInCaption(this,ed);break}case InsertionMode.IN_COLUMN_GROUP:{endTagInColumnGroup(this,ed);break}case InsertionMode.IN_TABLE_BODY:{endTagInTableBody(this,ed);break}case InsertionMode.IN_ROW:{endTagInRow(this,ed);break}case InsertionMode.IN_CELL:{endTagInCell(this,ed);break}case InsertionMode.IN_SELECT:{endTagInSelect(this,ed);break}case InsertionMode.IN_SELECT_IN_TABLE:{endTagInSelectInTable(this,ed);break}case InsertionMode.IN_TEMPLATE:{endTagInTemplate(this,ed);break}case InsertionMode.AFTER_BODY:{endTagAfterBody(this,ed);break}case InsertionMode.IN_FRAMESET:{endTagInFrameset(this,ed);break}case InsertionMode.AFTER_FRAMESET:{endTagAfterFrameset(this,ed);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,ed);break}}}onEof(ed){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,ed);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,ed);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,ed);break}case InsertionMode.IN_HEAD:{tokenInHead(this,ed);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,ed);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,ed);break}case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:{eofInBody(this,ed);break}case InsertionMode.TEXT:{eofInText(this,ed);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,ed);break}case InsertionMode.IN_TEMPLATE:{eofInTemplate(this,ed);break}case InsertionMode.AFTER_BODY:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{stopParsing(this,ed);break}}}onWhitespaceCharacter(ed){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,ed.chars.charCodeAt(0)===CODE_POINTS.LINE_FEED)){if(ed.chars.length===1)return;ed.chars=ed.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(ed);return}switch(this.insertionMode){case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.TEXT:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:{this._insertCharacters(ed);break}case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:case InsertionMode.AFTER_BODY:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{whitespaceCharacterInBody(this,ed);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,ed);break}case InsertionMode.IN_TABLE_TEXT:{whitespaceCharacterInTableText(this,ed);break}}}};function aaObtainFormattingElementEntry(Ra,ed){let ud=Ra.activeFormattingElements.getElementEntryInScopeWithTagName(ed.tagName);return ud?Ra.openElements.contains(ud.element)?Ra.openElements.hasInScope(ed.tagID)||(ud=null):(Ra.activeFormattingElements.removeEntry(ud),ud=null):genericEndTagInBody(Ra,ed),ud}function aaObtainFurthestBlock(Ra,ed){let ud=null,dd=Ra.openElements.stackTop;for(;dd>=0;dd--){const hd=Ra.openElements.items[dd];if(hd===ed.element)break;Ra._isSpecialElement(hd,Ra.openElements.tagIDs[dd])&&(ud=hd)}return ud||(Ra.openElements.shortenToLength(dd<0?0:dd),Ra.activeFormattingElements.removeEntry(ed)),ud}function aaInnerLoop(Ra,ed,ud){let dd=ed,hd=Ra.openElements.getCommonAncestor(ed);for(let md=0,gd=hd;gd!==ud;md++,gd=hd){hd=Ra.openElements.getCommonAncestor(gd);const yd=Ra.activeFormattingElements.getElementEntry(gd),vd=yd&&md>=AA_INNER_LOOP_ITER;!yd||vd?(vd&&Ra.activeFormattingElements.removeEntry(yd),Ra.openElements.remove(gd)):(gd=aaRecreateElementFromEntry(Ra,yd),dd===ed&&(Ra.activeFormattingElements.bookmark=yd),Ra.treeAdapter.detachNode(dd),Ra.treeAdapter.appendChild(gd,dd),dd=gd)}return dd}function aaRecreateElementFromEntry(Ra,ed){const ud=Ra.treeAdapter.getNamespaceURI(ed.element),dd=Ra.treeAdapter.createElement(ed.token.tagName,ud,ed.token.attrs);return Ra.openElements.replace(ed.element,dd),ed.element=dd,dd}function aaInsertLastNodeInCommonAncestor(Ra,ed,ud){const dd=Ra.treeAdapter.getTagName(ed),hd=getTagID(dd);if(Ra._isElementCausesFosterParenting(hd))Ra._fosterParentElement(ud);else{const md=Ra.treeAdapter.getNamespaceURI(ed);hd===TAG_ID.TEMPLATE&&md===NS.HTML&&(ed=Ra.treeAdapter.getTemplateContent(ed)),Ra.treeAdapter.appendChild(ed,ud)}}function aaReplaceFormattingElement(Ra,ed,ud){const dd=Ra.treeAdapter.getNamespaceURI(ud.element),{token:hd}=ud,md=Ra.treeAdapter.createElement(hd.tagName,dd,hd.attrs);Ra._adoptNodes(ed,md),Ra.treeAdapter.appendChild(ed,md),Ra.activeFormattingElements.insertElementAfterBookmark(md,hd),Ra.activeFormattingElements.removeEntry(ud),Ra.openElements.remove(ud.element),Ra.openElements.insertAfter(ed,md,hd.tagID)}function callAdoptionAgency(Ra,ed){for(let ud=0;ud=ud;dd--)Ra._setEndLocation(Ra.openElements.items[dd],ed);if(!Ra.fragmentContext&&Ra.openElements.stackTop>=0){const dd=Ra.openElements.items[0],hd=Ra.treeAdapter.getNodeSourceCodeLocation(dd);if(hd&&!hd.endTag&&(Ra._setEndLocation(dd,ed),Ra.openElements.stackTop>=1)){const md=Ra.openElements.items[1],gd=Ra.treeAdapter.getNodeSourceCodeLocation(md);gd&&!gd.endTag&&Ra._setEndLocation(md,ed)}}}}function doctypeInInitialMode(Ra,ed){Ra._setDocumentType(ed);const ud=ed.forceQuirks?DOCUMENT_MODE.QUIRKS:getDocumentMode(ed);isConforming(ed)||Ra._err(ed,ERR.nonConformingDoctype),Ra.treeAdapter.setDocumentMode(Ra.document,ud),Ra.insertionMode=InsertionMode.BEFORE_HTML}function tokenInInitialMode(Ra,ed){Ra._err(ed,ERR.missingDoctype,!0),Ra.treeAdapter.setDocumentMode(Ra.document,DOCUMENT_MODE.QUIRKS),Ra.insertionMode=InsertionMode.BEFORE_HTML,Ra._processToken(ed)}function startTagBeforeHtml(Ra,ed){ed.tagID===TAG_ID.HTML?(Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.BEFORE_HEAD):tokenBeforeHtml(Ra,ed)}function endTagBeforeHtml(Ra,ed){const ud=ed.tagID;(ud===TAG_ID.HTML||ud===TAG_ID.HEAD||ud===TAG_ID.BODY||ud===TAG_ID.BR)&&tokenBeforeHtml(Ra,ed)}function tokenBeforeHtml(Ra,ed){Ra._insertFakeRootElement(),Ra.insertionMode=InsertionMode.BEFORE_HEAD,Ra._processToken(ed)}function startTagBeforeHead(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.HEAD:{Ra._insertElement(ed,NS.HTML),Ra.headElement=Ra.openElements.current,Ra.insertionMode=InsertionMode.IN_HEAD;break}default:tokenBeforeHead(Ra,ed)}}function endTagBeforeHead(Ra,ed){const ud=ed.tagID;ud===TAG_ID.HEAD||ud===TAG_ID.BODY||ud===TAG_ID.HTML||ud===TAG_ID.BR?tokenBeforeHead(Ra,ed):Ra._err(ed,ERR.endTagWithoutMatchingOpenElement)}function tokenBeforeHead(Ra,ed){Ra._insertFakeElement(TAG_NAMES.HEAD,TAG_ID.HEAD),Ra.headElement=Ra.openElements.current,Ra.insertionMode=InsertionMode.IN_HEAD,Ra._processToken(ed)}function startTagInHead(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:{Ra._appendElement(ed,NS.HTML),ed.ackSelfClosing=!0;break}case TAG_ID.TITLE:{Ra._switchToTextParsing(ed,TokenizerMode.RCDATA);break}case TAG_ID.NOSCRIPT:{Ra.options.scriptingEnabled?Ra._switchToTextParsing(ed,TokenizerMode.RAWTEXT):(Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.IN_HEAD_NO_SCRIPT);break}case TAG_ID.NOFRAMES:case TAG_ID.STYLE:{Ra._switchToTextParsing(ed,TokenizerMode.RAWTEXT);break}case TAG_ID.SCRIPT:{Ra._switchToTextParsing(ed,TokenizerMode.SCRIPT_DATA);break}case TAG_ID.TEMPLATE:{Ra._insertTemplate(ed),Ra.activeFormattingElements.insertMarker(),Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.IN_TEMPLATE,Ra.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);break}case TAG_ID.HEAD:{Ra._err(ed,ERR.misplacedStartTagForHeadElement);break}default:tokenInHead(Ra,ed)}}function endTagInHead(Ra,ed){switch(ed.tagID){case TAG_ID.HEAD:{Ra.openElements.pop(),Ra.insertionMode=InsertionMode.AFTER_HEAD;break}case TAG_ID.BODY:case TAG_ID.BR:case TAG_ID.HTML:{tokenInHead(Ra,ed);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,ed);break}default:Ra._err(ed,ERR.endTagWithoutMatchingOpenElement)}}function templateEndTagInHead(Ra,ed){Ra.openElements.tmplCount>0?(Ra.openElements.generateImpliedEndTagsThoroughly(),Ra.openElements.currentTagId!==TAG_ID.TEMPLATE&&Ra._err(ed,ERR.closingOfElementWithOpenChildElements),Ra.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),Ra.activeFormattingElements.clearToLastMarker(),Ra.tmplInsertionModeStack.shift(),Ra._resetInsertionMode()):Ra._err(ed,ERR.endTagWithoutMatchingOpenElement)}function tokenInHead(Ra,ed){Ra.openElements.pop(),Ra.insertionMode=InsertionMode.AFTER_HEAD,Ra._processToken(ed)}function startTagInHeadNoScript(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.HEAD:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.STYLE:{startTagInHead(Ra,ed);break}case TAG_ID.NOSCRIPT:{Ra._err(ed,ERR.nestedNoscriptInHead);break}default:tokenInHeadNoScript(Ra,ed)}}function endTagInHeadNoScript(Ra,ed){switch(ed.tagID){case TAG_ID.NOSCRIPT:{Ra.openElements.pop(),Ra.insertionMode=InsertionMode.IN_HEAD;break}case TAG_ID.BR:{tokenInHeadNoScript(Ra,ed);break}default:Ra._err(ed,ERR.endTagWithoutMatchingOpenElement)}}function tokenInHeadNoScript(Ra,ed){const ud=ed.type===TokenType.EOF?ERR.openElementsLeftAfterEof:ERR.disallowedContentInNoscriptInHead;Ra._err(ed,ud),Ra.openElements.pop(),Ra.insertionMode=InsertionMode.IN_HEAD,Ra._processToken(ed)}function startTagAfterHead(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.BODY:{Ra._insertElement(ed,NS.HTML),Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.IN_BODY;break}case TAG_ID.FRAMESET:{Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.IN_FRAMESET;break}case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:{Ra._err(ed,ERR.abandonedHeadElementChild),Ra.openElements.push(Ra.headElement,TAG_ID.HEAD),startTagInHead(Ra,ed),Ra.openElements.remove(Ra.headElement);break}case TAG_ID.HEAD:{Ra._err(ed,ERR.misplacedStartTagForHeadElement);break}default:tokenAfterHead(Ra,ed)}}function endTagAfterHead(Ra,ed){switch(ed.tagID){case TAG_ID.BODY:case TAG_ID.HTML:case TAG_ID.BR:{tokenAfterHead(Ra,ed);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,ed);break}default:Ra._err(ed,ERR.endTagWithoutMatchingOpenElement)}}function tokenAfterHead(Ra,ed){Ra._insertFakeElement(TAG_NAMES.BODY,TAG_ID.BODY),Ra.insertionMode=InsertionMode.IN_BODY,modeInBody(Ra,ed)}function modeInBody(Ra,ed){switch(ed.type){case TokenType.CHARACTER:{characterInBody(Ra,ed);break}case TokenType.WHITESPACE_CHARACTER:{whitespaceCharacterInBody(Ra,ed);break}case TokenType.COMMENT:{appendComment(Ra,ed);break}case TokenType.START_TAG:{startTagInBody(Ra,ed);break}case TokenType.END_TAG:{endTagInBody(Ra,ed);break}case TokenType.EOF:{eofInBody(Ra,ed);break}}}function whitespaceCharacterInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._insertCharacters(ed)}function characterInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._insertCharacters(ed),Ra.framesetOk=!1}function htmlStartTagInBody(Ra,ed){Ra.openElements.tmplCount===0&&Ra.treeAdapter.adoptAttributes(Ra.openElements.items[0],ed.attrs)}function bodyStartTagInBody(Ra,ed){const ud=Ra.openElements.tryPeekProperlyNestedBodyElement();ud&&Ra.openElements.tmplCount===0&&(Ra.framesetOk=!1,Ra.treeAdapter.adoptAttributes(ud,ed.attrs))}function framesetStartTagInBody(Ra,ed){const ud=Ra.openElements.tryPeekProperlyNestedBodyElement();Ra.framesetOk&&ud&&(Ra.treeAdapter.detachNode(ud),Ra.openElements.popAllUpToHtmlElement(),Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.IN_FRAMESET)}function addressStartTagInBody(Ra,ed){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(ed,NS.HTML)}function numberedHeaderStartTagInBody(Ra,ed){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),NUMBERED_HEADERS.has(Ra.openElements.currentTagId)&&Ra.openElements.pop(),Ra._insertElement(ed,NS.HTML)}function preStartTagInBody(Ra,ed){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(ed,NS.HTML),Ra.skipNextNewLine=!0,Ra.framesetOk=!1}function formStartTagInBody(Ra,ed){const ud=Ra.openElements.tmplCount>0;(!Ra.formElement||ud)&&(Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(ed,NS.HTML),ud||(Ra.formElement=Ra.openElements.current))}function listItemStartTagInBody(Ra,ed){Ra.framesetOk=!1;const ud=ed.tagID;for(let dd=Ra.openElements.stackTop;dd>=0;dd--){const hd=Ra.openElements.tagIDs[dd];if(ud===TAG_ID.LI&&hd===TAG_ID.LI||(ud===TAG_ID.DD||ud===TAG_ID.DT)&&(hd===TAG_ID.DD||hd===TAG_ID.DT)){Ra.openElements.generateImpliedEndTagsWithExclusion(hd),Ra.openElements.popUntilTagNamePopped(hd);break}if(hd!==TAG_ID.ADDRESS&&hd!==TAG_ID.DIV&&hd!==TAG_ID.P&&Ra._isSpecialElement(Ra.openElements.items[dd],hd))break}Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(ed,NS.HTML)}function plaintextStartTagInBody(Ra,ed){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(ed,NS.HTML),Ra.tokenizer.state=TokenizerMode.PLAINTEXT}function buttonStartTagInBody(Ra,ed){Ra.openElements.hasInScope(TAG_ID.BUTTON)&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilTagNamePopped(TAG_ID.BUTTON)),Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML),Ra.framesetOk=!1}function aStartTagInBody(Ra,ed){const ud=Ra.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);ud&&(callAdoptionAgency(Ra,ed),Ra.openElements.remove(ud.element),Ra.activeFormattingElements.removeEntry(ud)),Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML),Ra.activeFormattingElements.pushElement(Ra.openElements.current,ed)}function bStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML),Ra.activeFormattingElements.pushElement(Ra.openElements.current,ed)}function nobrStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra.openElements.hasInScope(TAG_ID.NOBR)&&(callAdoptionAgency(Ra,ed),Ra._reconstructActiveFormattingElements()),Ra._insertElement(ed,NS.HTML),Ra.activeFormattingElements.pushElement(Ra.openElements.current,ed)}function appletStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML),Ra.activeFormattingElements.insertMarker(),Ra.framesetOk=!1}function tableStartTagInBody(Ra,ed){Ra.treeAdapter.getDocumentMode(Ra.document)!==DOCUMENT_MODE.QUIRKS&&Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._insertElement(ed,NS.HTML),Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.IN_TABLE}function areaStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._appendElement(ed,NS.HTML),Ra.framesetOk=!1,ed.ackSelfClosing=!0}function isHiddenInput(Ra){const ed=getTokenAttr(Ra,ATTRS.TYPE);return ed!=null&&ed.toLowerCase()===HIDDEN_INPUT_TYPE}function inputStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._appendElement(ed,NS.HTML),isHiddenInput(ed)||(Ra.framesetOk=!1),ed.ackSelfClosing=!0}function paramStartTagInBody(Ra,ed){Ra._appendElement(ed,NS.HTML),ed.ackSelfClosing=!0}function hrStartTagInBody(Ra,ed){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._appendElement(ed,NS.HTML),Ra.framesetOk=!1,ed.ackSelfClosing=!0}function imageStartTagInBody(Ra,ed){ed.tagName=TAG_NAMES.IMG,ed.tagID=TAG_ID.IMG,areaStartTagInBody(Ra,ed)}function textareaStartTagInBody(Ra,ed){Ra._insertElement(ed,NS.HTML),Ra.skipNextNewLine=!0,Ra.tokenizer.state=TokenizerMode.RCDATA,Ra.originalInsertionMode=Ra.insertionMode,Ra.framesetOk=!1,Ra.insertionMode=InsertionMode.TEXT}function xmpStartTagInBody(Ra,ed){Ra.openElements.hasInButtonScope(TAG_ID.P)&&Ra._closePElement(),Ra._reconstructActiveFormattingElements(),Ra.framesetOk=!1,Ra._switchToTextParsing(ed,TokenizerMode.RAWTEXT)}function iframeStartTagInBody(Ra,ed){Ra.framesetOk=!1,Ra._switchToTextParsing(ed,TokenizerMode.RAWTEXT)}function rawTextStartTagInBody(Ra,ed){Ra._switchToTextParsing(ed,TokenizerMode.RAWTEXT)}function selectStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML),Ra.framesetOk=!1,Ra.insertionMode=Ra.insertionMode===InsertionMode.IN_TABLE||Ra.insertionMode===InsertionMode.IN_CAPTION||Ra.insertionMode===InsertionMode.IN_TABLE_BODY||Ra.insertionMode===InsertionMode.IN_ROW||Ra.insertionMode===InsertionMode.IN_CELL?InsertionMode.IN_SELECT_IN_TABLE:InsertionMode.IN_SELECT}function optgroupStartTagInBody(Ra,ed){Ra.openElements.currentTagId===TAG_ID.OPTION&&Ra.openElements.pop(),Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML)}function rbStartTagInBody(Ra,ed){Ra.openElements.hasInScope(TAG_ID.RUBY)&&Ra.openElements.generateImpliedEndTags(),Ra._insertElement(ed,NS.HTML)}function rtStartTagInBody(Ra,ed){Ra.openElements.hasInScope(TAG_ID.RUBY)&&Ra.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC),Ra._insertElement(ed,NS.HTML)}function mathStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),adjustTokenMathMLAttrs(ed),adjustTokenXMLAttrs(ed),ed.selfClosing?Ra._appendElement(ed,NS.MATHML):Ra._insertElement(ed,NS.MATHML),ed.ackSelfClosing=!0}function svgStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),adjustTokenSVGAttrs(ed),adjustTokenXMLAttrs(ed),ed.selfClosing?Ra._appendElement(ed,NS.SVG):Ra._insertElement(ed,NS.SVG),ed.ackSelfClosing=!0}function genericStartTagInBody(Ra,ed){Ra._reconstructActiveFormattingElements(),Ra._insertElement(ed,NS.HTML)}function startTagInBody(Ra,ed){switch(ed.tagID){case TAG_ID.I:case TAG_ID.S:case TAG_ID.B:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:{bStartTagInBody(Ra,ed);break}case TAG_ID.A:{aStartTagInBody(Ra,ed);break}case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:{numberedHeaderStartTagInBody(Ra,ed);break}case TAG_ID.P:case TAG_ID.DL:case TAG_ID.OL:case TAG_ID.UL:case TAG_ID.DIV:case TAG_ID.DIR:case TAG_ID.NAV:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.DETAILS:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.SEARCH:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:{addressStartTagInBody(Ra,ed);break}case TAG_ID.LI:case TAG_ID.DD:case TAG_ID.DT:{listItemStartTagInBody(Ra,ed);break}case TAG_ID.BR:case TAG_ID.IMG:case TAG_ID.WBR:case TAG_ID.AREA:case TAG_ID.EMBED:case TAG_ID.KEYGEN:{areaStartTagInBody(Ra,ed);break}case TAG_ID.HR:{hrStartTagInBody(Ra,ed);break}case TAG_ID.RB:case TAG_ID.RTC:{rbStartTagInBody(Ra,ed);break}case TAG_ID.RT:case TAG_ID.RP:{rtStartTagInBody(Ra,ed);break}case TAG_ID.PRE:case TAG_ID.LISTING:{preStartTagInBody(Ra,ed);break}case TAG_ID.XMP:{xmpStartTagInBody(Ra,ed);break}case TAG_ID.SVG:{svgStartTagInBody(Ra,ed);break}case TAG_ID.HTML:{htmlStartTagInBody(Ra,ed);break}case TAG_ID.BASE:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.STYLE:case TAG_ID.TITLE:case TAG_ID.SCRIPT:case TAG_ID.BGSOUND:case TAG_ID.BASEFONT:case TAG_ID.TEMPLATE:{startTagInHead(Ra,ed);break}case TAG_ID.BODY:{bodyStartTagInBody(Ra,ed);break}case TAG_ID.FORM:{formStartTagInBody(Ra,ed);break}case TAG_ID.NOBR:{nobrStartTagInBody(Ra,ed);break}case TAG_ID.MATH:{mathStartTagInBody(Ra,ed);break}case TAG_ID.TABLE:{tableStartTagInBody(Ra,ed);break}case TAG_ID.INPUT:{inputStartTagInBody(Ra,ed);break}case TAG_ID.PARAM:case TAG_ID.TRACK:case TAG_ID.SOURCE:{paramStartTagInBody(Ra,ed);break}case TAG_ID.IMAGE:{imageStartTagInBody(Ra,ed);break}case TAG_ID.BUTTON:{buttonStartTagInBody(Ra,ed);break}case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:{appletStartTagInBody(Ra,ed);break}case TAG_ID.IFRAME:{iframeStartTagInBody(Ra,ed);break}case TAG_ID.SELECT:{selectStartTagInBody(Ra,ed);break}case TAG_ID.OPTION:case TAG_ID.OPTGROUP:{optgroupStartTagInBody(Ra,ed);break}case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:{rawTextStartTagInBody(Ra,ed);break}case TAG_ID.FRAMESET:{framesetStartTagInBody(Ra,ed);break}case TAG_ID.TEXTAREA:{textareaStartTagInBody(Ra,ed);break}case TAG_ID.NOSCRIPT:{Ra.options.scriptingEnabled?rawTextStartTagInBody(Ra,ed):genericStartTagInBody(Ra,ed);break}case TAG_ID.PLAINTEXT:{plaintextStartTagInBody(Ra,ed);break}case TAG_ID.COL:case TAG_ID.TH:case TAG_ID.TD:case TAG_ID.TR:case TAG_ID.HEAD:case TAG_ID.FRAME:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.CAPTION:case TAG_ID.COLGROUP:break;default:genericStartTagInBody(Ra,ed)}}function bodyEndTagInBody(Ra,ed){if(Ra.openElements.hasInScope(TAG_ID.BODY)&&(Ra.insertionMode=InsertionMode.AFTER_BODY,Ra.options.sourceCodeLocationInfo)){const ud=Ra.openElements.tryPeekProperlyNestedBodyElement();ud&&Ra._setEndLocation(ud,ed)}}function htmlEndTagInBody(Ra,ed){Ra.openElements.hasInScope(TAG_ID.BODY)&&(Ra.insertionMode=InsertionMode.AFTER_BODY,endTagAfterBody(Ra,ed))}function addressEndTagInBody(Ra,ed){const ud=ed.tagID;Ra.openElements.hasInScope(ud)&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilTagNamePopped(ud))}function formEndTagInBody(Ra){const ed=Ra.openElements.tmplCount>0,{formElement:ud}=Ra;ed||(Ra.formElement=null),(ud||ed)&&Ra.openElements.hasInScope(TAG_ID.FORM)&&(Ra.openElements.generateImpliedEndTags(),ed?Ra.openElements.popUntilTagNamePopped(TAG_ID.FORM):ud&&Ra.openElements.remove(ud))}function pEndTagInBody(Ra){Ra.openElements.hasInButtonScope(TAG_ID.P)||Ra._insertFakeElement(TAG_NAMES.P,TAG_ID.P),Ra._closePElement()}function liEndTagInBody(Ra){Ra.openElements.hasInListItemScope(TAG_ID.LI)&&(Ra.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI),Ra.openElements.popUntilTagNamePopped(TAG_ID.LI))}function ddEndTagInBody(Ra,ed){const ud=ed.tagID;Ra.openElements.hasInScope(ud)&&(Ra.openElements.generateImpliedEndTagsWithExclusion(ud),Ra.openElements.popUntilTagNamePopped(ud))}function numberedHeaderEndTagInBody(Ra){Ra.openElements.hasNumberedHeaderInScope()&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody(Ra,ed){const ud=ed.tagID;Ra.openElements.hasInScope(ud)&&(Ra.openElements.generateImpliedEndTags(),Ra.openElements.popUntilTagNamePopped(ud),Ra.activeFormattingElements.clearToLastMarker())}function brEndTagInBody(Ra){Ra._reconstructActiveFormattingElements(),Ra._insertFakeElement(TAG_NAMES.BR,TAG_ID.BR),Ra.openElements.pop(),Ra.framesetOk=!1}function genericEndTagInBody(Ra,ed){const ud=ed.tagName,dd=ed.tagID;for(let hd=Ra.openElements.stackTop;hd>0;hd--){const md=Ra.openElements.items[hd],gd=Ra.openElements.tagIDs[hd];if(dd===gd&&(dd!==TAG_ID.UNKNOWN||Ra.treeAdapter.getTagName(md)===ud)){Ra.openElements.generateImpliedEndTagsWithExclusion(dd),Ra.openElements.stackTop>=hd&&Ra.openElements.shortenToLength(hd);break}if(Ra._isSpecialElement(md,gd))break}}function endTagInBody(Ra,ed){switch(ed.tagID){case TAG_ID.A:case TAG_ID.B:case TAG_ID.I:case TAG_ID.S:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.NOBR:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:{callAdoptionAgency(Ra,ed);break}case TAG_ID.P:{pEndTagInBody(Ra);break}case TAG_ID.DL:case TAG_ID.UL:case TAG_ID.OL:case TAG_ID.DIR:case TAG_ID.DIV:case TAG_ID.NAV:case TAG_ID.PRE:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.BUTTON:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.DETAILS:case TAG_ID.SEARCH:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.LISTING:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:{addressEndTagInBody(Ra,ed);break}case TAG_ID.LI:{liEndTagInBody(Ra);break}case TAG_ID.DD:case TAG_ID.DT:{ddEndTagInBody(Ra,ed);break}case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:{numberedHeaderEndTagInBody(Ra);break}case TAG_ID.BR:{brEndTagInBody(Ra);break}case TAG_ID.BODY:{bodyEndTagInBody(Ra,ed);break}case TAG_ID.HTML:{htmlEndTagInBody(Ra,ed);break}case TAG_ID.FORM:{formEndTagInBody(Ra);break}case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:{appletEndTagInBody(Ra,ed);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,ed);break}default:genericEndTagInBody(Ra,ed)}}function eofInBody(Ra,ed){Ra.tmplInsertionModeStack.length>0?eofInTemplate(Ra,ed):stopParsing(Ra,ed)}function endTagInText(Ra,ed){var ud;ed.tagID===TAG_ID.SCRIPT&&((ud=Ra.scriptHandler)===null||ud===void 0||ud.call(Ra,Ra.openElements.current)),Ra.openElements.pop(),Ra.insertionMode=Ra.originalInsertionMode}function eofInText(Ra,ed){Ra._err(ed,ERR.eofInElementThatCanContainOnlyText),Ra.openElements.pop(),Ra.insertionMode=Ra.originalInsertionMode,Ra.onEof(ed)}function characterInTable(Ra,ed){if(TABLE_STRUCTURE_TAGS.has(Ra.openElements.currentTagId))switch(Ra.pendingCharacterTokens.length=0,Ra.hasNonWhitespacePendingCharacterToken=!1,Ra.originalInsertionMode=Ra.insertionMode,Ra.insertionMode=InsertionMode.IN_TABLE_TEXT,ed.type){case TokenType.CHARACTER:{characterInTableText(Ra,ed);break}case TokenType.WHITESPACE_CHARACTER:{whitespaceCharacterInTableText(Ra,ed);break}}else tokenInTable(Ra,ed)}function captionStartTagInTable(Ra,ed){Ra.openElements.clearBackToTableContext(),Ra.activeFormattingElements.insertMarker(),Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.IN_CAPTION}function colgroupStartTagInTable(Ra,ed){Ra.openElements.clearBackToTableContext(),Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.IN_COLUMN_GROUP}function colStartTagInTable(Ra,ed){Ra.openElements.clearBackToTableContext(),Ra._insertFakeElement(TAG_NAMES.COLGROUP,TAG_ID.COLGROUP),Ra.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(Ra,ed)}function tbodyStartTagInTable(Ra,ed){Ra.openElements.clearBackToTableContext(),Ra._insertElement(ed,NS.HTML),Ra.insertionMode=InsertionMode.IN_TABLE_BODY}function tdStartTagInTable(Ra,ed){Ra.openElements.clearBackToTableContext(),Ra._insertFakeElement(TAG_NAMES.TBODY,TAG_ID.TBODY),Ra.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Ra,ed)}function tableStartTagInTable(Ra,ed){Ra.openElements.hasInTableScope(TAG_ID.TABLE)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.TABLE),Ra._resetInsertionMode(),Ra._processStartTag(ed))}function inputStartTagInTable(Ra,ed){isHiddenInput(ed)?Ra._appendElement(ed,NS.HTML):tokenInTable(Ra,ed),ed.ackSelfClosing=!0}function formStartTagInTable(Ra,ed){!Ra.formElement&&Ra.openElements.tmplCount===0&&(Ra._insertElement(ed,NS.HTML),Ra.formElement=Ra.openElements.current,Ra.openElements.pop())}function startTagInTable(Ra,ed){switch(ed.tagID){case TAG_ID.TD:case TAG_ID.TH:case TAG_ID.TR:{tdStartTagInTable(Ra,ed);break}case TAG_ID.STYLE:case TAG_ID.SCRIPT:case TAG_ID.TEMPLATE:{startTagInHead(Ra,ed);break}case TAG_ID.COL:{colStartTagInTable(Ra,ed);break}case TAG_ID.FORM:{formStartTagInTable(Ra,ed);break}case TAG_ID.TABLE:{tableStartTagInTable(Ra,ed);break}case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{tbodyStartTagInTable(Ra,ed);break}case TAG_ID.INPUT:{inputStartTagInTable(Ra,ed);break}case TAG_ID.CAPTION:{captionStartTagInTable(Ra,ed);break}case TAG_ID.COLGROUP:{colgroupStartTagInTable(Ra,ed);break}default:tokenInTable(Ra,ed)}}function endTagInTable(Ra,ed){switch(ed.tagID){case TAG_ID.TABLE:{Ra.openElements.hasInTableScope(TAG_ID.TABLE)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.TABLE),Ra._resetInsertionMode());break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,ed);break}case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TBODY:case TAG_ID.TD:case TAG_ID.TFOOT:case TAG_ID.TH:case TAG_ID.THEAD:case TAG_ID.TR:break;default:tokenInTable(Ra,ed)}}function tokenInTable(Ra,ed){const ud=Ra.fosterParentingEnabled;Ra.fosterParentingEnabled=!0,modeInBody(Ra,ed),Ra.fosterParentingEnabled=ud}function whitespaceCharacterInTableText(Ra,ed){Ra.pendingCharacterTokens.push(ed)}function characterInTableText(Ra,ed){Ra.pendingCharacterTokens.push(ed),Ra.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText(Ra,ed){let ud=0;if(Ra.hasNonWhitespacePendingCharacterToken)for(;ud0&&Ra.openElements.currentTagId===TAG_ID.OPTION&&Ra.openElements.tagIDs[Ra.openElements.stackTop-1]===TAG_ID.OPTGROUP&&Ra.openElements.pop(),Ra.openElements.currentTagId===TAG_ID.OPTGROUP&&Ra.openElements.pop();break}case TAG_ID.OPTION:{Ra.openElements.currentTagId===TAG_ID.OPTION&&Ra.openElements.pop();break}case TAG_ID.SELECT:{Ra.openElements.hasInSelectScope(TAG_ID.SELECT)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Ra._resetInsertionMode());break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Ra,ed);break}}}function startTagInSelectInTable(Ra,ed){const ud=ed.tagID;ud===TAG_ID.CAPTION||ud===TAG_ID.TABLE||ud===TAG_ID.TBODY||ud===TAG_ID.TFOOT||ud===TAG_ID.THEAD||ud===TAG_ID.TR||ud===TAG_ID.TD||ud===TAG_ID.TH?(Ra.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Ra._resetInsertionMode(),Ra._processStartTag(ed)):startTagInSelect(Ra,ed)}function endTagInSelectInTable(Ra,ed){const ud=ed.tagID;ud===TAG_ID.CAPTION||ud===TAG_ID.TABLE||ud===TAG_ID.TBODY||ud===TAG_ID.TFOOT||ud===TAG_ID.THEAD||ud===TAG_ID.TR||ud===TAG_ID.TD||ud===TAG_ID.TH?Ra.openElements.hasInTableScope(ud)&&(Ra.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Ra._resetInsertionMode(),Ra.onEndTag(ed)):endTagInSelect(Ra,ed)}function startTagInTemplate(Ra,ed){switch(ed.tagID){case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:{startTagInHead(Ra,ed);break}case TAG_ID.CAPTION:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE,Ra.insertionMode=InsertionMode.IN_TABLE,startTagInTable(Ra,ed);break}case TAG_ID.COL:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_COLUMN_GROUP,Ra.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(Ra,ed);break}case TAG_ID.TR:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE_BODY,Ra.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Ra,ed);break}case TAG_ID.TD:case TAG_ID.TH:{Ra.tmplInsertionModeStack[0]=InsertionMode.IN_ROW,Ra.insertionMode=InsertionMode.IN_ROW,startTagInRow(Ra,ed);break}default:Ra.tmplInsertionModeStack[0]=InsertionMode.IN_BODY,Ra.insertionMode=InsertionMode.IN_BODY,startTagInBody(Ra,ed)}}function endTagInTemplate(Ra,ed){ed.tagID===TAG_ID.TEMPLATE&&templateEndTagInHead(Ra,ed)}function eofInTemplate(Ra,ed){Ra.openElements.tmplCount>0?(Ra.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),Ra.activeFormattingElements.clearToLastMarker(),Ra.tmplInsertionModeStack.shift(),Ra._resetInsertionMode(),Ra.onEof(ed)):stopParsing(Ra,ed)}function startTagAfterBody(Ra,ed){ed.tagID===TAG_ID.HTML?startTagInBody(Ra,ed):tokenAfterBody(Ra,ed)}function endTagAfterBody(Ra,ed){var ud;if(ed.tagID===TAG_ID.HTML){if(Ra.fragmentContext||(Ra.insertionMode=InsertionMode.AFTER_AFTER_BODY),Ra.options.sourceCodeLocationInfo&&Ra.openElements.tagIDs[0]===TAG_ID.HTML){Ra._setEndLocation(Ra.openElements.items[0],ed);const dd=Ra.openElements.items[1];dd&&!(!((ud=Ra.treeAdapter.getNodeSourceCodeLocation(dd))===null||ud===void 0)&&ud.endTag)&&Ra._setEndLocation(dd,ed)}}else tokenAfterBody(Ra,ed)}function tokenAfterBody(Ra,ed){Ra.insertionMode=InsertionMode.IN_BODY,modeInBody(Ra,ed)}function startTagInFrameset(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.FRAMESET:{Ra._insertElement(ed,NS.HTML);break}case TAG_ID.FRAME:{Ra._appendElement(ed,NS.HTML),ed.ackSelfClosing=!0;break}case TAG_ID.NOFRAMES:{startTagInHead(Ra,ed);break}}}function endTagInFrameset(Ra,ed){ed.tagID===TAG_ID.FRAMESET&&!Ra.openElements.isRootHtmlElementCurrent()&&(Ra.openElements.pop(),!Ra.fragmentContext&&Ra.openElements.currentTagId!==TAG_ID.FRAMESET&&(Ra.insertionMode=InsertionMode.AFTER_FRAMESET))}function startTagAfterFrameset(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.NOFRAMES:{startTagInHead(Ra,ed);break}}}function endTagAfterFrameset(Ra,ed){ed.tagID===TAG_ID.HTML&&(Ra.insertionMode=InsertionMode.AFTER_AFTER_FRAMESET)}function startTagAfterAfterBody(Ra,ed){ed.tagID===TAG_ID.HTML?startTagInBody(Ra,ed):tokenAfterAfterBody(Ra,ed)}function tokenAfterAfterBody(Ra,ed){Ra.insertionMode=InsertionMode.IN_BODY,modeInBody(Ra,ed)}function startTagAfterAfterFrameset(Ra,ed){switch(ed.tagID){case TAG_ID.HTML:{startTagInBody(Ra,ed);break}case TAG_ID.NOFRAMES:{startTagInHead(Ra,ed);break}}}function nullCharacterInForeignContent(Ra,ed){ed.chars=REPLACEMENT_CHARACTER,Ra._insertCharacters(ed)}function characterInForeignContent(Ra,ed){Ra._insertCharacters(ed),Ra.framesetOk=!1}function popUntilHtmlOrIntegrationPoint(Ra){for(;Ra.treeAdapter.getNamespaceURI(Ra.openElements.current)!==NS.HTML&&!Ra._isIntegrationPoint(Ra.openElements.currentTagId,Ra.openElements.current);)Ra.openElements.pop()}function startTagInForeignContent(Ra,ed){if(causesExit(ed))popUntilHtmlOrIntegrationPoint(Ra),Ra._startTagOutsideForeignContent(ed);else{const ud=Ra._getAdjustedCurrentElement(),dd=Ra.treeAdapter.getNamespaceURI(ud);dd===NS.MATHML?adjustTokenMathMLAttrs(ed):dd===NS.SVG&&(adjustTokenSVGTagName(ed),adjustTokenSVGAttrs(ed)),adjustTokenXMLAttrs(ed),ed.selfClosing?Ra._appendElement(ed,dd):Ra._insertElement(ed,dd),ed.ackSelfClosing=!0}}function endTagInForeignContent(Ra,ed){if(ed.tagID===TAG_ID.P||ed.tagID===TAG_ID.BR){popUntilHtmlOrIntegrationPoint(Ra),Ra._endTagOutsideForeignContent(ed);return}for(let ud=Ra.openElements.stackTop;ud>0;ud--){const dd=Ra.openElements.items[ud];if(Ra.treeAdapter.getNamespaceURI(dd)===NS.HTML){Ra._endTagOutsideForeignContent(ed);break}const hd=Ra.treeAdapter.getTagName(dd);if(hd.toLowerCase()===ed.tagName){ed.tagName=hd,Ra.openElements.shortenToLength(ud);break}}}function getEscaper(Ra,ed){return function(dd){let hd,md=0,gd="";for(;hd=Ra.exec(dd);)md!==hd.index&&(gd+=dd.substring(md,hd.index)),gd+=ed.get(hd[0].charCodeAt(0)),md=hd.index+1;return gd+dd.substring(md)}}const escapeAttribute=getEscaper(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),escapeText=getEscaper(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),VOID_ELEMENTS=new Set([TAG_NAMES.AREA,TAG_NAMES.BASE,TAG_NAMES.BASEFONT,TAG_NAMES.BGSOUND,TAG_NAMES.BR,TAG_NAMES.COL,TAG_NAMES.EMBED,TAG_NAMES.FRAME,TAG_NAMES.HR,TAG_NAMES.IMG,TAG_NAMES.INPUT,TAG_NAMES.KEYGEN,TAG_NAMES.LINK,TAG_NAMES.META,TAG_NAMES.PARAM,TAG_NAMES.SOURCE,TAG_NAMES.TRACK,TAG_NAMES.WBR]);function isVoidElement(Ra,ed){return ed.treeAdapter.isElementNode(Ra)&&ed.treeAdapter.getNamespaceURI(Ra)===NS.HTML&&VOID_ELEMENTS.has(ed.treeAdapter.getTagName(Ra))}const defaultOpts={treeAdapter:defaultTreeAdapter,scriptingEnabled:!0};function serializeOuter(Ra,ed){const ud={...defaultOpts,...ed};return serializeNode(Ra,ud)}function serializeChildNodes(Ra,ed){let ud="";const dd=ed.treeAdapter.isElementNode(Ra)&&ed.treeAdapter.getTagName(Ra)===TAG_NAMES.TEMPLATE&&ed.treeAdapter.getNamespaceURI(Ra)===NS.HTML?ed.treeAdapter.getTemplateContent(Ra):Ra,hd=ed.treeAdapter.getChildNodes(dd);if(hd)for(const md of hd)ud+=serializeNode(md,ed);return ud}function serializeNode(Ra,ed){return ed.treeAdapter.isElementNode(Ra)?serializeElement(Ra,ed):ed.treeAdapter.isTextNode(Ra)?serializeTextNode(Ra,ed):ed.treeAdapter.isCommentNode(Ra)?serializeCommentNode(Ra,ed):ed.treeAdapter.isDocumentTypeNode(Ra)?serializeDocumentTypeNode(Ra,ed):""}function serializeElement(Ra,ed){const ud=ed.treeAdapter.getTagName(Ra);return`<${ud}${serializeAttributes(Ra,ed)}>${isVoidElement(Ra,ed)?"":`${serializeChildNodes(Ra,ed)}`}`}function serializeAttributes(Ra,{treeAdapter:ed}){let ud="";for(const dd of ed.getAttrList(Ra)){if(ud+=" ",dd.namespace)switch(dd.namespace){case NS.XML:{ud+=`xml:${dd.name}`;break}case NS.XMLNS:{dd.name!=="xmlns"&&(ud+="xmlns:"),ud+=dd.name;break}case NS.XLINK:{ud+=`xlink:${dd.name}`;break}default:ud+=`${dd.prefix}:${dd.name}`}else ud+=dd.name;ud+=`="${escapeAttribute(dd.value)}"`}return ud}function serializeTextNode(Ra,ed){const{treeAdapter:ud}=ed,dd=ud.getTextNodeContent(Ra),hd=ud.getParentNode(Ra),md=hd&&ud.isElementNode(hd)&&ud.getTagName(hd);return md&&ud.getNamespaceURI(hd)===NS.HTML&&hasUnescapedText(md,ed.scriptingEnabled)?dd:escapeText(dd)}function serializeCommentNode(Ra,{treeAdapter:ed}){return``}function serializeDocumentTypeNode(Ra,{treeAdapter:ed}){return``}function parse$5(Ra,ed){return Parser$2.parse(Ra,ed)}function parseFragment(Ra,ed,ud){typeof Ra=="string"&&(ud=ed,ed=Ra,Ra=null);const dd=Parser$2.getFragmentParser(Ra,ud);return dd.tokenizer.write(ed,!0),dd.getFragment()}function enquoteDoctypeId(Ra){const ed=Ra.includes('"')?"'":'"';return ed+Ra+ed}function serializeDoctypeContent(Ra,ed,ud){let dd="!DOCTYPE ";return Ra&&(dd+=Ra),ed?dd+=` PUBLIC ${enquoteDoctypeId(ed)}`:ud&&(dd+=" SYSTEM"),ud&&(dd+=` ${enquoteDoctypeId(ud)}`),dd}const adapter={isCommentNode:isComment$1,isElementNode:isTag,isTextNode:isText,createDocument(){const Ra=new Document([]);return Ra["x-mode"]=DOCUMENT_MODE.NO_QUIRKS,Ra},createDocumentFragment(){return new Document([])},createElement(Ra,ed,ud){const dd=Object.create(null),hd=Object.create(null),md=Object.create(null);for(let yd=0;ydisDirective(gd)&&gd.name==="!doctype");md?md.data=hd??null:(md=new ProcessingInstruction("!doctype",hd),adapter.appendChild(Ra,md)),md["x-name"]=ed,md["x-publicId"]=ud,md["x-systemId"]=dd},setDocumentMode(Ra,ed){Ra["x-mode"]=ed},getDocumentMode(Ra){return Ra["x-mode"]},detachNode(Ra){if(Ra.parent){const ed=Ra.parent.children.indexOf(Ra),{prev:ud,next:dd}=Ra;Ra.prev=null,Ra.next=null,ud&&(ud.next=dd),dd&&(dd.prev=ud),Ra.parent.children.splice(ed,1),Ra.parent=null}},insertText(Ra,ed){const ud=Ra.children[Ra.children.length-1];ud&&isText(ud)?ud.data+=ed:adapter.appendChild(Ra,adapter.createTextNode(ed))},insertTextBefore(Ra,ed,ud){const dd=Ra.children[Ra.children.indexOf(ud)-1];dd&&isText(dd)?dd.data+=ed:adapter.insertBefore(Ra,adapter.createTextNode(ed),ud)},adoptAttributes(Ra,ed){for(let ud=0;ud=CharCodes.LowerA&&Ra<=CharCodes.LowerZ||Ra>=CharCodes.UpperA&&Ra<=CharCodes.UpperZ}var QuoteType;(function(Ra){Ra[Ra.NoValue=0]="NoValue",Ra[Ra.Unquoted=1]="Unquoted",Ra[Ra.Single=2]="Single",Ra[Ra.Double=3]="Double"})(QuoteType||(QuoteType={}));const Sequences={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class Tokenizer{constructor({xmlMode:ed=!1,decodeEntities:ud=!0},dd){this.cbs=dd,this.state=State$4.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=State$4.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=ed,this.decodeEntities=ud,this.entityDecoder=new EntityDecoder(ed?xmlDecodeTree:htmlDecodeTree,(hd,md)=>this.emitCodePoint(hd,md))}reset(){this.state=State$4.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=State$4.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(ed){this.offset+=this.buffer.length,this.buffer=ed,this.parse()}end(){this.running&&this.finish()}pause(){this.running=!1}resume(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=State$4.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&ed===CharCodes.Amp&&this.startEntity()}stateSpecialStartSequence(ed){const ud=this.sequenceIndex===this.currentSequence.length;if(!(ud?isEndOfTagSection(ed):(ed|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!ud){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=State$4.InTagName,this.stateInTagName(ed)}stateInSpecialTag(ed){if(this.sequenceIndex===this.currentSequence.length){if(ed===CharCodes.Gt||isWhitespace$2(ed)){const ud=this.index-this.currentSequence.length;if(this.sectionStart=0?(this.state=this.baseState,ed===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===State$4.Text||this.state===State$4.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===State$4.InAttributeValueDq||this.state===State$4.InAttributeValueSq||this.state===State$4.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index=ed||(this.state===State$4.InCommentLike?this.currentSequence===Sequences.CdataEnd?this.cbs.oncdata(this.sectionStart,ed,0):this.cbs.oncomment(this.sectionStart,ed,0):this.state===State$4.InTagName||this.state===State$4.BeforeAttributeName||this.state===State$4.BeforeAttributeValue||this.state===State$4.AfterAttributeName||this.state===State$4.InAttributeName||this.state===State$4.InAttributeValueSq||this.state===State$4.InAttributeValueDq||this.state===State$4.InAttributeValueNq||this.state===State$4.InClosingTagName||this.cbs.ontext(this.sectionStart,ed))}emitCodePoint(ed,ud){this.baseState!==State$4.Text&&this.baseState!==State$4.InSpecialTag?(this.sectionStart0&&gd.has(this.stack[0]);){const yd=this.stack.shift();(dd=(ud=this.cbs).onclosetag)===null||dd===void 0||dd.call(ud,yd,!0)}this.isVoidElement(ed)||(this.stack.unshift(ed),this.htmlMode&&(foreignContextElements.has(ed)?this.foreignContext.unshift(!0):htmlIntegrationElements.has(ed)&&this.foreignContext.unshift(!1))),(md=(hd=this.cbs).onopentagname)===null||md===void 0||md.call(hd,ed),this.cbs.onopentag&&(this.attribs={})}endOpenTag(ed){var ud,dd;this.startIndex=this.openTagStart,this.attribs&&((dd=(ud=this.cbs).onopentag)===null||dd===void 0||dd.call(ud,this.tagname,this.attribs,ed),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(ed){this.endIndex=ed,this.endOpenTag(!1),this.startIndex=ed+1}onclosetag(ed,ud){var dd,hd,md,gd,yd,vd,Cd,wd;this.endIndex=ud;let Nd=this.getSlice(ed,ud);if(this.lowerCaseTagNames&&(Nd=Nd.toLowerCase()),this.htmlMode&&(foreignContextElements.has(Nd)||htmlIntegrationElements.has(Nd))&&this.foreignContext.shift(),this.isVoidElement(Nd))this.htmlMode&&Nd==="br"&&((gd=(md=this.cbs).onopentagname)===null||gd===void 0||gd.call(md,"br"),(vd=(yd=this.cbs).onopentag)===null||vd===void 0||vd.call(yd,"br",{},!0),(wd=(Cd=this.cbs).onclosetag)===null||wd===void 0||wd.call(Cd,"br",!1));else{const Ld=this.stack.indexOf(Nd);if(Ld!==-1)for(let Ud=0;Ud<=Ld;Ud++){const jd=this.stack.shift();(hd=(dd=this.cbs).onclosetag)===null||hd===void 0||hd.call(dd,jd,Ud!==Ld)}else this.htmlMode&&Nd==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=ud+1}onselfclosingtag(ed){this.endIndex=ed,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=ed+1):this.onopentagend(ed)}closeCurrentTag(ed){var ud,dd;const hd=this.tagname;this.endOpenTag(ed),this.stack[0]===hd&&((dd=(ud=this.cbs).onclosetag)===null||dd===void 0||dd.call(ud,hd,!ed),this.stack.shift())}onattribname(ed,ud){this.startIndex=ed;const dd=this.getSlice(ed,ud);this.attribname=this.lowerCaseAttributeNames?dd.toLowerCase():dd}onattribdata(ed,ud){this.attribvalue+=this.getSlice(ed,ud)}onattribentity(ed){this.attribvalue+=fromCodePoint(ed)}onattribend(ed,ud){var dd,hd;this.endIndex=ud,(hd=(dd=this.cbs).onattribute)===null||hd===void 0||hd.call(dd,this.attribname,this.attribvalue,ed===QuoteType.Double?'"':ed===QuoteType.Single?"'":ed===QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(ed){const ud=ed.search(reNameEnd);let dd=ud<0?ed:ed.substr(0,ud);return this.lowerCaseTagNames&&(dd=dd.toLowerCase()),dd}ondeclaration(ed,ud){this.endIndex=ud;const dd=this.getSlice(ed,ud);if(this.cbs.onprocessinginstruction){const hd=this.getInstructionName(dd);this.cbs.onprocessinginstruction(`!${hd}`,`!${dd}`)}this.startIndex=ud+1}onprocessinginstruction(ed,ud){this.endIndex=ud;const dd=this.getSlice(ed,ud);if(this.cbs.onprocessinginstruction){const hd=this.getInstructionName(dd);this.cbs.onprocessinginstruction(`?${hd}`,`?${dd}`)}this.startIndex=ud+1}oncomment(ed,ud,dd){var hd,md,gd,yd;this.endIndex=ud,(md=(hd=this.cbs).oncomment)===null||md===void 0||md.call(hd,this.getSlice(ed,ud-dd)),(yd=(gd=this.cbs).oncommentend)===null||yd===void 0||yd.call(gd),this.startIndex=ud+1}oncdata(ed,ud,dd){var hd,md,gd,yd,vd,Cd,wd,Nd,Ld,Ud;this.endIndex=ud;const jd=this.getSlice(ed,ud-dd);!this.htmlMode||this.options.recognizeCDATA?((md=(hd=this.cbs).oncdatastart)===null||md===void 0||md.call(hd),(yd=(gd=this.cbs).ontext)===null||yd===void 0||yd.call(gd,jd),(Cd=(vd=this.cbs).oncdataend)===null||Cd===void 0||Cd.call(vd)):((Nd=(wd=this.cbs).oncomment)===null||Nd===void 0||Nd.call(wd,`[CDATA[${jd}]]`),(Ud=(Ld=this.cbs).oncommentend)===null||Ud===void 0||Ud.call(Ld)),this.startIndex=ud+1}onend(){var ed,ud;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let dd=0;dd=this.buffers[0].length;)this.shiftBuffer();let dd=this.buffers[0].slice(ed-this.bufferOffset,ud-this.bufferOffset);for(;ud-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),dd+=this.buffers[0].slice(0,ud-this.bufferOffset);return dd}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(ed){var ud,dd;if(this.ended){(dd=(ud=this.cbs).onerror)===null||dd===void 0||dd.call(ud,new Error(".write() after done!"));return}this.buffers.push(ed),this.tokenizer.running&&(this.tokenizer.write(ed),this.writeIndex++)}end(ed){var ud,dd;if(this.ended){(dd=(ud=this.cbs).onerror)===null||dd===void 0||dd.call(ud,new Error(".end() after done!"));return}ed&&this.write(ed),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexed._useHtmlParser2?parseDocument(Ra,ed):parseWithParse5(Ra,ed,ud,dd)),load$3=getLoad(parse$4,(Ra,ed)=>ed._useHtmlParser2?render$3(Ra,ed):renderWithParse5(Ra)),browser$1=Object.freeze(Object.defineProperty({__proto__:null,contains:contains$1,load:load$3,merge:merge$7},Symbol.toStringTag,{value:"Module"})),require$$0$2=getAugmentedNamespace(browser$1);var utils$4={},lexer={exports:{}},debug={exports:{}};(function(Ra,ed){var ud={stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0}};Ra.exports=dd;function dd(md){return hd.bind(null,md)}function hd(md){var gd=[].slice.call(arguments,1);gd.unshift("["+md+"]"),ud.stderr.write(gd.join(" ")+` +`)}})(debug);var debugExports=debug.exports;(function(Ra,ed){debugExports("lex"),Ra.exports=ud;function ud(dd){var hd="",md,gd=0,yd=-1,vd=0,Cd=1,wd="before-selector",Nd=[wd],Ld={},Ud=[],jd=["media","keyframes",{name:"-webkit-keyframes",type:"keyframes",prefix:"-webkit-"},{name:"-moz-keyframes",type:"keyframes",prefix:"-moz-"},{name:"-ms-keyframes",type:"keyframes",prefix:"-ms-"},{name:"-o-keyframes",type:"keyframes",prefix:"-o-"},"font-face",{name:"import",state:"before-at-value"},{name:"charset",state:"before-at-value"},"supports","viewport",{name:"namespace",state:"before-at-value"},"document",{name:"-moz-document",type:"document",prefix:"-moz-"},"page"];function Gd(){return xf(),dd[yd]}function Yd(Ff){return Ff?Nd[Nd.length-1-Ff]:wd}function zd(Ff){var sh=yd+1;return Ff===dd.slice(sh,sh+Ff.length)}function qd(Ff){var sh=dd.slice(yd).indexOf(Ff);return sh>0?sh:!1}function Wd(Ff){return Ff===Xd(1)}function Xd(Ff){return dd[yd+(Ff||1)]}function Jd(){var Ff=Nd.pop();return wd=Nd[Nd.length-1],Ff}function Zd(Ff){return wd=Ff,Nd.push(wd),Nd.length}function mf(Ff){var sh=wd;return Nd[Nd.length-1]=wd=Ff,sh}function xf(Ff){if((Ff||1)==1)dd[yd]==` +`?(Cd++,gd=1):gd++,yd++;else{var sh=dd.slice(yd,yd+Ff).split(` +`);sh.length>1&&(Cd+=sh.length-1,gd=1),gd+=sh[sh.length-1].length,yd=yd+Ff}}function _f(){Ld.end={line:Cd,col:gd},Ud.push(Ld),hd="",Ld={}}function vf(Ff){Ld={type:Ff,start:{line:Cd,col:gd}}}for(;md=Gd();)switch(md){case" ":switch(Yd()){case"selector":case"value":case"value-paren":case"at-group":case"at-value":case"comment":case"double-string":case"single-string":hd+=md;break}break;case` +`:case" ":case"\r":case"\f":switch(Yd()){case"value":case"value-paren":case"at-group":case"comment":case"single-string":case"double-string":case"selector":hd+=md;break;case"at-value":md===` +`&&(Ld.value=hd.trim(),_f(),Jd());break}break;case":":switch(Yd()){case"name":Ld.name=hd.trim(),hd="",mf("before-value");break;case"before-selector":hd+=md,vf("selector"),Zd("selector");break;case"before-value":mf("value"),hd+=md;break;default:hd+=md;break}break;case";":switch(Yd()){case"name":case"before-value":case"value":hd.trim().length>0&&(Ld.value=hd.trim(),_f()),mf("before-name");break;case"value-paren":hd+=md;break;case"at-value":Ld.value=hd.trim(),_f(),Jd();break;case"before-name":break;default:hd+=md;break}break;case"{":switch(Yd()){case"selector":if(Xd(-1)==="\\"){hd+=md;break}Ld.text=hd.trim(),_f(),mf("before-name"),vd=vd+1;break;case"at-group":switch(Ld.name=hd.trim(),Ld.type){case"font-face":case"viewport":case"page":Zd("before-name");break;default:Zd("before-selector")}_f(),vd=vd+1;break;case"name":case"at-rule":Ld.name=hd.trim(),_f(),Zd("before-name"),vd=vd+1;break;case"comment":case"double-string":case"single-string":hd+=md;break;case"before-value":mf("value"),hd+=md;break}break;case"}":switch(Yd()){case"before-name":case"name":case"before-value":case"value":hd&&(Ld.value=hd.trim()),Ld.name&&Ld.value&&_f(),vf("end"),_f(),Jd(),Yd()==="at-group"&&(vf("at-group-end"),_f(),Jd()),vd>0&&(vd=vd-1);break;case"at-group":case"before-selector":case"selector":if(Xd(-1)==="\\"){hd+=md;break}vd>0&&Yd(1)==="at-group"&&(vf("at-group-end"),_f()),vd>1&&Jd(),vd>0&&(vd=vd-1);break;case"double-string":case"single-string":case"comment":hd+=md;break}break;case'"':case"'":switch(Yd()){case"double-string":md==='"'&&Xd(-1)!=="\\"&&Jd();break;case"single-string":md==="'"&&Xd(-1)!=="\\"&&Jd();break;case"before-at-value":mf("at-value"),Zd(md==='"'?"double-string":"single-string");break;case"before-value":mf("value"),Zd(md==='"'?"double-string":"single-string");break;case"comment":break;default:Xd(-1)!=="\\"&&Zd(md==='"'?"double-string":"single-string")}hd+=md;break;case"/":switch(Yd()){case"comment":case"double-string":case"single-string":hd+=md;break;case"before-value":case"selector":case"name":case"value":if(Wd("*")){var gf=qd("*/");gf&&xf(gf+1)}else Yd()=="before-value"&&mf("value"),hd+=md;break;default:Wd("*")?(vf("comment"),Zd("comment"),xf()):hd+=md;break}break;case"*":switch(Yd()){case"comment":Wd("/")?(Ld.text=hd,xf(),_f(),Jd()):hd+=md;break;case"before-selector":hd+=md,vf("selector"),Zd("selector");break;case"before-value":mf("value"),hd+=md;break;default:hd+=md}break;case"@":switch(Yd()){case"comment":case"double-string":case"single-string":hd+=md;break;case"before-value":mf("value"),hd+=md;break;default:for(var Af=!1,Df,Of,Cf=0,If=jd.length;!Af&&Cf+)\\s*|(\\s+)|(+|\\*)|\\#(+)|\\.(+)|\\[\\s*(+)(?:\\s*([*^$!~|]?=)(?:\\s*(?:(["']?)(.*?)\\9)))?\\s*\\](?!\\])|(:+)(+)(?:\\((?:(?:(["'])([^\\13]*)\\13)|((?:\\([^)]+\\)|[^()]*)+))\\))?)`.replace(//,"["+escape$5(">+~`!@$%^&={}\\;/g,"(?:[\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])").replace(//g,"(?:[:\\w\\u00a1-\\uFFFF-]|\\\\[^\\s0-9a-f])")),Part=function(ed){this.combinator=ed||" ",this.tag="*"};Part.prototype.toString=function(){if(!this.raw){var Ra="",ed,ud;if(Ra+=this.tag||"*",this.id&&(Ra+="#"+this.id),this.classes&&(Ra+="."+this.classList.join(".")),this.attributes)for(ed=0;ud=this.attributes[ed++];)Ra+="["+ud.name+(ud.operator?ud.operator+'"'+ud.value+'"':"")+"]";if(this.pseudos)for(ed=0;ud=this.pseudos[ed++];)Ra+=":"+ud.name,ud.value&&(Ra+="("+ud.value+")");this.raw=Ra}return this.raw};var Expression=function(){this.length=0};Expression.prototype.toString=function(){if(!this.raw){for(var Ra="",ed=0,ud;ud=this[ed++];)ed!==1&&(Ra+=" "),ud.combinator!==" "&&(Ra+=ud.combinator+" "),Ra+=ud;this.raw=Ra}return this.raw};var replacer=function(Ra,ed,ud,dd,hd,md,gd,yd,vd,Cd,wd,Nd,Ld,Ud,jd,Gd){var Yd,zd;if((ed||!this.length)&&(Yd=this[this.length++]=new Expression,ed))return"";if(Yd||(Yd=this[this.length-1]),(ud||dd||!Yd.length)&&(zd=Yd[Yd.length++]=new Part(ud)),zd||(zd=Yd[Yd.length-1]),hd)zd.tag=unescape$2(hd);else if(md)zd.id=unescape$2(md);else if(gd){var qd=unescape$2(gd),Wd=zd.classes||(zd.classes={});if(!Wd[qd]){Wd[qd]=escape$5(gd);var Xd=zd.classList||(zd.classList=[]);Xd.push(qd),Xd.sort()}}else Ld?(Gd=Gd||jd,(zd.pseudos||(zd.pseudos=[])).push({type:Nd.length==1?"class":"element",name:unescape$2(Ld),escapedName:escape$5(Ld),value:Gd?unescape$2(Gd):null,escapedValue:Gd?escape$5(Gd):null})):yd&&(wd=wd?escape$5(wd):null,(zd.attributes||(zd.attributes=[])).push({operator:vd,name:unescape$2(yd),escapedName:escape$5(yd),value:wd?unescape$2(wd):null,escapedValue:wd?escape$5(wd):null}));return""},Expressions=function(ed){this.length=0;for(var ud=this,dd=ed,hd;ed;){if(hd=ed.replace(slickRe,function(){return replacer.apply(ud,arguments)}),hd===ed)throw new Error(dd+" is an invalid expression");ed=hd}};Expressions.prototype.toString=function(){if(!this.raw){for(var Ra=[],ed=0,ud;ud=this[ed++];)Ra.push(ud);this.raw=Ra.join(", ")}return this.raw};var cache$2={},parse$3=function(Ra){return Ra==null?null:(Ra=(""+Ra).replace(/^\s+|\s+$/g,""),cache$2[Ra]||(cache$2[Ra]=new Expressions(Ra)))},parser$2=parse$3;(function(Ra,ed){var ud=parser$2;Ra.exports=dd;function dd(md,gd){this.text=md,this.spec=void 0,this.styleAttribute=gd||!1}dd.prototype.parsed=function(){return this.tokens||(this.tokens=hd(this.text)),this.tokens},dd.prototype.specificity=function(){var md=this.styleAttribute;return this.spec||(this.spec=gd(this.text,this.parsed())),this.spec;function gd(yd,vd){for(var Cd=vd||hd(yd),wd=[md?1:0,0,0,0],Nd=[],Ld=0;Ld=0;vd--)(fd.fontFaces&&gd[vd].type==="font-face"||fd.mediaQueries&&gd[vd].type==="media"||fd.keyFrames&&gd[vd].type==="keyframes"||fd.pseudos&&gd[vd].selectors&&this.matchesPseudo(gd[vd].selectors[0],hd))&&yd.unshift(qa.stringify({stylesheet:{rules:[gd[vd]]}},{comments:!1,indentation:" "})),gd[vd].position.start;return yd.length===0?!1:` -`+yd.join(` + */Ra.extract=function(md){for(var gd=0,yd=[],vd="",Cd=0,wd=md.length;Cd=0;wd--)(md.fontFaces&&vd[wd].type==="font-face"||md.mediaQueries&&vd[wd].type==="media"||md.keyFrames&&vd[wd].type==="keyframes"||md.pseudos&&vd[wd].selectors&&this.matchesPseudo(vd[wd].selectors[0],gd))&&Cd.unshift(ed.stringify({stylesheet:{rules:[vd[wd]]}},{comments:!1,indentation:" "})),vd[wd].position.start;return Cd.length===0?!1:` +`+Cd.join(` `)+` -`},Ra.normalizeLineEndings=function(pd){return pd.replace(/\r\n/g,` +`},Ra.normalizeLineEndings=function(hd){return hd.replace(/\r\n/g,` `).replace(/\n/g,`\r -`)},Ra.matchesPseudo=function(pd,fd){return fd.find(function(hd){return pd.indexOf(hd)>-1})},Ra.compareFunc=function(pd,fd){for(var hd=Math.min(pd.length,fd.length),md=0;mdfd[md]?1:-1;return pd.length-fd.length},Ra.compare=function(pd,fd){return Ra.compareFunc(pd,fd)==1?pd:fd},Ra.getDefaultOptions=function(pd){var fd=Object.assign({extraCss:"",insertPreservedExtraCss:!0,applyStyleTags:!0,removeStyleTags:!0,preserveMediaQueries:!0,preserveFontFaces:!0,preserveKeyFrames:!0,preservePseudos:!0,applyWidthAttributes:!0,applyHeightAttributes:!0,applyAttributesTableElements:!0,resolveCSSVariables:!0,url:""},pd);return fd.webResources=fd.webResources||{},fd}}(utils$4)),utils$4}(function(Ra){var qa=require$$0$2;requireUtils$1();var rd=function(pd,fd,hd){const{xmlMode:md,...gd}=fd;return fd=Object.assign({xml:{decodeEntities:!1,xmlMode:md}},gd),pd=hd(pd),qa.load(pd,fd)},sd=function(){var pd=[],fd=function(md){var gd=Ra.exports.codeBlocks;return Object.keys(gd).forEach(function(yd){var vd=new RegExp(gd[yd].start+"([\\S\\s]*?)"+gd[yd].end,"g");md=md.replace(vd,function(Nd,Md){return pd.push(Nd),"JUICE_CODE_BLOCK_"+(pd.length-1)+"_"})}),md},hd=function(md){for(var gd=0;gd"},HBS:{start:"{{",end:"}}"}}})(cheerio$1);var cheerioExports=cheerio$1.exports,numbers$1={};numbers$1.romanize=function(Ra){if(isNaN(Ra))return NaN;for(var qa=String(+Ra).split(""),rd=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"],sd="",pd=3;pd--;)sd=(rd[+qa.pop()+pd*10]||"")+sd;return Array(+qa.join("")+1).join("M")+sd};numbers$1.alphanumeric=function(Ra){for(var qa="",rd;Ra>0;)rd=(Ra-1)%26,qa=String.fromCharCode(65+rd)+qa,Ra=(Ra-rd)/26|0;return qa||void 0};const uniqueString=Ra=>{let qa="";do qa=(Math.random()+1).toString(36).substring(2);while(Ra.indexOf(qa)!==-1);return qa},replaceVariables=(Ra,qa)=>{let rd=/([a-z\-]+)\s*\(\s*([^\(\)]*?)\s*(?:,\s*([^\(\)]*?)\s*)?\s*\)/i,sd=[],pd,fd=uniqueString(qa);for(;(pd=rd.exec(qa))!==null;){let md=`${sd.length}`;if(pd[1].toLowerCase()=="var"){const yd=findVariableValue(Ra,pd[2]);if(yd){qa=qa.replace(pd[0],yd);continue}if(pd[3]){qa=qa.replace(pd[0],pd[3]);continue}}let gd=`${fd}${md.padStart(5,"-")}`;qa=qa.replace(pd[0],gd),sd.push({placeholder:gd,replace:pd[0]})}for(var hd=sd.length-1;hd>=0;hd--){const md=sd[hd];qa=qa.replace(md.placeholder,md.replace)}return qa},findVariableValue=(Ra,qa)=>{for(;Ra;){if(Ra.styleProps&&qa in Ra.styleProps)return Ra.styleProps[qa].value;var Ra=Ra.pseudoElementParent||Ra.parent}};var variables$1={replaceVariables,findVariableValue},utils$3=requireUtils$1(),numbers=numbers$1,variables=variables$1,inline$2=function(qa){qa.ignoredPseudos=["hover","active","focus","visited","link"],qa.widthElements=["TABLE","TD","TH","IMG"],qa.heightElements=["TABLE","TD","TH","IMG"],qa.tableElements=["TABLE","TH","TR","TD","CAPTION","COLGROUP","COL","THEAD","TBODY","TFOOT"],qa.nonVisualElements=["HEAD","TITLE","BASE","LINK","STYLE","META","SCRIPT","NOSCRIPT"],qa.styleToAttribute={"background-color":"bgcolor","background-image":"background","text-align":"align","vertical-align":"valign"},qa.excludedProperties=[],qa.juiceDocument=yd,qa.inlineDocument=rd;function rd(Md,Ld,Fd){Fd=Fd||{};var Hd=utils$3.parseCSS(Ld),Vd=[],Gd="style",Ud={};if(Fd.styleAttributeName&&(Gd=Fd.styleAttributeName),Hd.forEach(Kd),Vd.forEach(Xd),Fd.inlinePseudoElements&&Vd.forEach(df),Fd.applyWidthAttributes&&Vd.forEach(function(_f){Ef(_f,"width")}),Fd.applyHeightAttributes&&Vd.forEach(function(_f){Ef(_f,"height")}),Fd.applyAttributesTableElements&&Vd.forEach(mf),Fd.insertPreservedExtraCss&&Fd.extraCss){var qd=utils$3.getPreservedText(Fd.extraCss,{mediaQueries:Fd.preserveMediaQueries,fontFaces:Fd.preserveFontFaces,keyFrames:Fd.preserveKeyFrames});if(qd){var Wd=null;Fd.insertPreservedExtraCss!==!0?Wd=Md(Fd.insertPreservedExtraCss):(Wd=Md("head"),Wd.length||(Wd=Md("body")),Wd.length||(Wd=Md.root())),Wd.first().append("")}}function Kd(_f){var xf=_f[0],Cf=_f[1],If=new utils$3.Selector(xf),Sf=If.parsed();if(Sf){for(var wf=hd(Sf),Pf=0;Pf=0)return}}if(wf){var Mh=Sf[Sf.length-1],dh=Mh.pseudos;Mh.pseudos=gd(Mh.pseudos),xf=Sf.toString(),Mh.pseudos=dh}var eh;try{eh=Md(xf)}catch{return}eh.each(function(){var fh=this;if(fh.name&&qa.nonVisualElements.indexOf(fh.name.toUpperCase())>=0)return;if(fh.counterProps||(fh.counterProps=fh.parent&&fh.parent.counterProps?Object.create(fh.parent.counterProps):{}),wf){var Sh="pseudo"+wf,vh=fh[Sh];vh||(vh=fh[Sh]=Md("").get(0),vh.pseudoElementType=wf,vh.pseudoElementParent=fh,vh.counterProps=fh.counterProps,fh[Sh]=vh),fh=vh}if(!fh.styleProps){if(fh.styleProps={},Md(fh).attr(Gd)){var Df="* { "+Md(fh).attr(Gd)+" } ";Nh(utils$3.parseCSS(Df)[0][1],new utils$3.Selector("")}}function Jd(gf){var Af=gf[0],Df=gf[1],Of=new utils$3.Selector(Af),Cf=Of.parsed();if(Cf){for(var If=gd(Cf),Ff=0;Ff=0)return}}if(If){var Mh=Cf[Cf.length-1],lh=Mh.pseudos;Mh.pseudos=vd(Mh.pseudos),Af=Cf.toString(),Mh.pseudos=lh}var rh;try{rh=Ld(Af)}catch{return}rh.each(function(){var mh=this;if(mh.name&&ed.nonVisualElements.indexOf(mh.name.toUpperCase())>=0)return;if(mh.counterProps||(mh.counterProps=mh.parent&&mh.parent.counterProps?Object.create(mh.parent.counterProps):{}),If){var xh="pseudo"+If,Eh=mh[xh];Eh||(Eh=mh[xh]=Ld("").get(0),Eh.pseudoElementType=If,Eh.pseudoElementParent=mh,Eh.counterProps=mh.counterProps,mh[xh]=Eh),mh=Eh}if(!mh.styleProps){if(mh.styleProps={},Ld(mh).attr(zd)){var kf=Ld(mh).attr(zd),Rf=jd.decodeStyleAttributes?decode$1(kf):kf,_h="* { "+Rf+" } ";th(utils$3.parseCSS(_h)[0][1],new utils$3.Selector(" - `}function getStyles(Ra,qa,rd=""){const sd=Ra[qa];return sd?`style="${getStyleString(sd)}${rd}"`:""}function buildFootnoteArray(Ra){return Ra.map(([qa,rd,sd])=>sd===rd?`[${qa}]: ${rd}
`:`[${qa}] ${rd}: ${sd}
`).join(` -`)}function transform$1(Ra,qa,rd){const sd=Ra.split("-");for(const pd of sd){if(pd==="alt"&&qa)return qa;if(pd==="title"&&rd)return rd}return""}const macCodeSvg=` + `}function getStyles(Ra,ed,ud=""){const dd=Ra[ed];return dd?`style="${getStyleString(dd)}${ud}"`:""}function buildFootnoteArray(Ra){return Ra.map(([ed,ud,dd])=>dd===ud?`[${ed}]: ${ud}
`:`[${ed}] ${ud}: ${dd}
`).join(` +`)}function transform$1(Ra,ed,ud){const dd=Ra.split("-");for(const hd of dd){if(hd==="alt"&&ed)return ed;if(hd==="title"&&ud)return ud}return""}const macCodeSvg=` -`.trim();function parseFrontMatterAndContent(Ra){try{const qa=frontMatter(Ra),rd=qa.attributes,sd=qa.body,pd=readingTime(sd);return{yamlData:rd,markdownContent:sd,readingTime:pd}}catch(qa){return console.error("Error parsing front-matter:",qa),{yamlData:{},markdownContent:Ra,readingTime:readingTime(Ra)}}}function initRenderer(Ra){const qa=[];let rd=0,sd=buildTheme(Ra),pd=0,fd=0,hd=!1;function md(Hd,Vd=""){return getStyles(sd,Hd,Vd)}function gd(Hd,Vd,Gd){const Ud=Gd??Hd;return`<${Ud} ${md(Hd)}>${Vd}`}function yd(Hd,Vd){return qa.push([++rd,Hd,Vd]),rd}function vd(Hd){qa.length=0,rd=0,Nd(Hd)}function Nd(Hd){Ra={...Ra,...Hd},sd=buildTheme(Ra),marked$1.use(markedAlert({styles:sd}))}function Md(Hd){return!Ra.countStatus||!Hd.words?"":` -
-

字数 ${Hd==null?void 0:Hd.words},阅读大约需 ${Math.ceil(Hd==null?void 0:Hd.minutes)} 分钟

+`.trim();function parseFrontMatterAndContent(Ra){try{const ed=frontMatter(Ra),ud=ed.attributes,dd=ed.body,hd=readingTime(dd);return{yamlData:ud,markdownContent:dd,readingTime:hd}}catch(ed){return console.error("Error parsing front-matter:",ed),{yamlData:{},markdownContent:Ra,readingTime:readingTime(Ra)}}}function initRenderer(Ra){const ed=[];let ud=0,dd=buildTheme(Ra),hd=0,md=0,gd=!1;function yd(Gd,Yd=""){return getStyles(dd,Gd,Yd)}function vd(Gd,Yd,zd){const qd=zd??Gd;return`<${qd} ${yd(Gd)}>${Yd}`}function Cd(Gd,Yd){return ed.push([++ud,Gd,Yd]),ud}function wd(Gd){ed.length=0,ud=0,Nd(Gd)}function Nd(Gd){Ra={...Ra,...Gd},dd=buildTheme(Ra),marked$1.use(markedAlert({styles:dd}))}function Ld(Gd){return!Ra.countStatus||!Gd.words?"":` +
+

字数 ${Gd==null?void 0:Gd.words},阅读大约需 ${Math.ceil(Gd==null?void 0:Gd.minutes)} 分钟

- `}const Ld=()=>qa.length?gd("h4","引用链接")+gd("footnotes",buildFootnoteArray(qa),"p"):"",Fd={heading({tokens:Hd,depth:Vd}){const Gd=this.parser.parseInline(Hd),Ud=`h${Vd}`;return gd(Ud,Gd)},paragraph({tokens:Hd}){const Vd=this.parser.parseInline(Hd),Gd=Vd.includes("/g,`

`),gd("blockquote",Vd)},code({text:Hd,lang:Vd=""}){if(Vd.startsWith("mermaid"))return clearTimeout(pd),pd=setTimeout(()=>{mermaid_default.run()},0),`

${Hd}
`;const Gd=Vd.split(" ")[0],Ud=HighlightJS.getLanguage(Gd)?Gd:"plaintext";let qd=HighlightJS.highlight(Hd,{language:Ud}).value;qd=qd.replace(/\t/g," "),qd=qd.replace(/\r\n/g,"
").replace(/\n/g,"
").replace(/(>[^<]+)|(^[^<]+)/g,Xd=>Xd.replace(/\s/g," "));const Wd=``,Kd=`${qd}`;return`
${Wd}${Kd}
`},codespan({text:Hd}){const Vd=escapeHtml(Hd);return gd("codespan",Vd,"code")},listitem(Hd){const Vd=hd?`${fd+1}. `:"• ",Gd=Hd.tokens.map(Ud=>this[Ud.type](Ud)).join("");return gd("listitem",`${Vd}${Gd}`,"li")},list({ordered:Hd,items:Vd,start:Gd=1}){const Ud=[];for(let Wd=0;Wd${Gd}${Ud}`},link({href:Hd,title:Vd,text:Gd,tokens:Ud}){const qd=this.parser.parseInline(Ud);if(Hd.startsWith("https://mp.weixin.qq.com"))return`${qd}`;if(Hd===Gd)return qd;if(Ra.citeStatus){const Wd=yd(Vd||Gd,Hd);return`${qd}[${Wd}]`}return gd("link",qd,"span")},strong({tokens:Hd}){return gd("strong",this.parser.parseInline(Hd))},em({tokens:Hd}){return gd("em",this.parser.parseInline(Hd),"span")},table({header:Hd,rows:Vd}){const Gd=Hd.map(qd=>this.tablecell(qd)).join(""),Ud=Vd.map(qd=>{const Wd=qd.map(Kd=>this.tablecell(Kd)).join("");return gd("tr",Wd)}).join("");return` + `}const Ud=()=>ed.length?vd("h4","引用链接")+vd("footnotes",buildFootnoteArray(ed),"p"):"",jd={heading({tokens:Gd,depth:Yd}){const zd=this.parser.parseInline(Gd),qd=`h${Yd}`;return vd(qd,zd)},paragraph({tokens:Gd}){const Yd=this.parser.parseInline(Gd),zd=Yd.includes("/g,`

`),vd("blockquote",Yd)},code({text:Gd,lang:Yd=""}){if(Yd.startsWith("mermaid"))return clearTimeout(hd),hd=setTimeout(()=>{mermaid_default.run()},0),`

${Gd}
`;const zd=Yd.split(" ")[0],qd=HighlightJS.getLanguage(zd)?zd:"plaintext";let Wd=HighlightJS.highlight(Gd,{language:qd}).value;Wd=Wd.replace(/\t/g," "),Wd=Wd.replace(/\r\n/g,"
").replace(/\n/g,"
").replace(/(>[^<]+)|(^[^<]+)/g,Zd=>Zd.replace(/\s/g," "));const Xd=``,Jd=`${Wd}`;return`
${Xd}${Jd}
`},codespan({text:Gd}){const Yd=escapeHtml(Gd);return vd("codespan",Yd,"code")},listitem(Gd){const Yd=gd?`${md+1}. `:"• ",zd=Gd.tokens.map(qd=>this[qd.type](qd)).join("");return vd("listitem",`${Yd}${zd}`,"li")},list({ordered:Gd,items:Yd,start:zd=1}){const qd=[];for(let Xd=0;Xd${zd}${qd}`},link({href:Gd,title:Yd,text:zd,tokens:qd}){const Wd=this.parser.parseInline(qd);if(Gd.startsWith("https://mp.weixin.qq.com"))return`${Wd}`;if(Gd===zd)return Wd;if(Ra.citeStatus){const Xd=Cd(Yd||zd,Gd);return`${Wd}[${Xd}]`}return vd("link",Wd,"span")},strong({tokens:Gd}){return vd("strong",this.parser.parseInline(Gd))},em({tokens:Gd}){return vd("em",this.parser.parseInline(Gd),"span")},table({header:Gd,rows:Yd}){const zd=Gd.map(Wd=>this.tablecell(Wd)).join(""),qd=Yd.map(Wd=>{const Xd=Wd.map(Jd=>this.tablecell(Jd)).join("");return vd("tr",Xd)}).join("");return`
- ${Gd} - ${Ud} + ${zd} + ${qd}
- `},tablecell(Hd){const Vd=this.parser.parseInline(Hd.tokens);return gd("td",Vd)},hr(Hd){return gd("hr","")}};return marked$1.use({renderer:Fd}),{buildAddition,buildFootnotes:Ld,setOptions:Nd,reset:vd,parseFrontMatterAndContent,buildReadingTime:Md,createContainer(Hd){return gd("container",Hd,"section")}}}var codemirror={exports:{}},hasRequiredCodemirror;function requireCodemirror(){return hasRequiredCodemirror||(hasRequiredCodemirror=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd()})(commonjsGlobal,function(){var rd=navigator.userAgent,sd=navigator.platform,pd=/gecko\/\d/i.test(rd),fd=/MSIE \d/.test(rd),hd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rd),md=/Edge\/(\d+)/.exec(rd),gd=fd||hd||md,yd=gd&&(fd?document.documentMode||6:+(md||hd)[1]),vd=!md&&/WebKit\//.test(rd),Nd=vd&&/Qt\/\d+\.\d+/.test(rd),Md=!md&&/Chrome\/(\d+)/.exec(rd),Ld=Md&&+Md[1],Fd=/Opera\//.test(rd),Hd=/Apple Computer/.test(navigator.vendor),Vd=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(rd),Gd=/PhantomJS/.test(rd),Ud=Hd&&(/Mobile\/\w+/.test(rd)||navigator.maxTouchPoints>2),qd=/Android/.test(rd),Wd=Ud||qd||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(rd),Kd=Ud||/Mac/.test(sd),Xd=/\bCrOS\b/.test(rd),df=/win/i.test(sd),Ef=Fd&&rd.match(/Version\/(\d*\.\d*)/);Ef&&(Ef=Number(Ef[1])),Ef&&Ef>=15&&(Fd=!1,vd=!0);var pf=Kd&&(Nd||Fd&&(Ef==null||Ef<12.11)),mf=pd||gd&&yd>=9;function _f(jd){return new RegExp("(^|\\s)"+jd+"(?:$|\\s)\\s*")}var xf=function(jd,Yd){var gf=jd.className,hf=_f(Yd).exec(gf);if(hf){var vf=gf.slice(hf.index+hf[0].length);jd.className=gf.slice(0,hf.index)+(vf?hf[1]+vf:"")}};function Cf(jd){for(var Yd=jd.childNodes.length;Yd>0;--Yd)jd.removeChild(jd.firstChild);return jd}function If(jd,Yd){return Cf(jd).appendChild(Yd)}function Sf(jd,Yd,gf,hf){var vf=document.createElement(jd);if(gf&&(vf.className=gf),hf&&(vf.style.cssText=hf),typeof Yd=="string")vf.appendChild(document.createTextNode(Yd));else if(Yd)for(var $f=0;$f=Yd)return ph+(Yd-$f);ph+=Ah-$f,ph+=gf-ph%gf,$f=Ah+1}}var Nh=function(){this.id=null,this.f=null,this.time=0,this.handler=Df(this.onTimeout,this)};Nh.prototype.onTimeout=function(jd){jd.id=0,jd.time<=+new Date?jd.f():setTimeout(jd.handler,jd.time-+new Date)},Nh.prototype.set=function(jd,Yd){this.f=Yd;var gf=+new Date+jd;(!this.id||gf=Yd)return hf+Math.min(ph,Yd-vf);if(vf+=$f-hf,vf+=gf-vf%gf,hf=$f+1,vf>=Yd)return hf}}var th=[""];function $h(jd){for(;th.length<=jd;)th.push(wh(th)+" ");return th[jd]}function wh(jd){return jd[jd.length-1]}function fm(jd,Yd){for(var gf=[],hf=0;hf"€"&&(jd.toUpperCase()!=jd.toLowerCase()||tg.test(jd))}function Ym(jd,Yd){return Yd?Yd.source.indexOf("\\w")>-1&&Fm(jd)?!0:Yd.test(jd):Fm(jd)}function rg(jd){for(var Yd in jd)if(jd.hasOwnProperty(Yd)&&jd[Yd])return!1;return!0}var Eg=/[\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 Fh(jd){return jd.charCodeAt(0)>=768&&Eg.test(jd)}function kf(jd,Yd,gf){for(;(gf<0?Yd>0:Ydgf?-1:1;;){if(Yd==gf)return Yd;var vf=(Yd+gf)/2,$f=hf<0?Math.ceil(vf):Math.floor(vf);if($f==Yd)return jd($f)?Yd:gf;jd($f)?gf=$f:Yd=$f+hf}}function Dh(jd,Yd,gf,hf){if(!jd)return hf(Yd,gf,"ltr",0);for(var vf=!1,$f=0;$fYd||Yd==gf&&ph.to==Yd)&&(hf(Math.max(ph.from,Yd),Math.min(ph.to,gf),ph.level==1?"rtl":"ltr",$f),vf=!0)}vf||hf(Yd,gf,"ltr")}var Vh=null;function Sm(jd,Yd,gf){var hf;Vh=null;for(var vf=0;vfYd)return vf;$f.to==Yd&&($f.from!=$f.to&&gf=="before"?hf=vf:Vh=vf),$f.from==Yd&&($f.from!=$f.to&&gf!="before"?hf=vf:Vh=vf)}return hf??Vh}var $m=function(){var jd="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",Yd="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function gf(Kh){return Kh<=247?jd.charAt(Kh):1424<=Kh&&Kh<=1524?"R":1536<=Kh&&Kh<=1785?Yd.charAt(Kh-1536):1774<=Kh&&Kh<=2220?"r":8192<=Kh&&Kh<=8203?"w":Kh==8204?"b":"L"}var hf=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,vf=/[stwN]/,$f=/[LRr]/,ph=/[Lb1n]/,Ah=/[1n]/;function Lh(Kh,Om,Hm){this.level=Kh,this.from=Om,this.to=Hm}return function(Kh,Om){var Hm=Om=="ltr"?"L":"R";if(Kh.length==0||Om=="ltr"&&!hf.test(Kh))return!1;for(var Jm=Kh.length,Qm=[],ug=0;ug-1&&(hf[Yd]=vf.slice(0,$f).concat(vf.slice($f+1)))}}}function Og(jd,Yd){var gf=_g(jd,Yd);if(gf.length)for(var hf=Array.prototype.slice.call(arguments,2),vf=0;vf0}function y_(jd){jd.prototype.on=function(Yd,gf){ig(this,Yd,gf)},jd.prototype.off=function(Yd,gf){vg(this,Yd,gf)}}function t_(jd){jd.preventDefault?jd.preventDefault():jd.returnValue=!1}function R_(jd){jd.stopPropagation?jd.stopPropagation():jd.cancelBubble=!0}function v_(jd){return jd.defaultPrevented!=null?jd.defaultPrevented:jd.returnValue==!1}function X_(jd){t_(jd),R_(jd)}function eb(jd){return jd.target||jd.srcElement}function I_(jd){var Yd=jd.which;return Yd==null&&(jd.button&1?Yd=1:jd.button&2?Yd=3:jd.button&4&&(Yd=2)),Kd&&jd.ctrlKey&&Yd==1&&(Yd=3),Yd}var $_=function(){if(gd&&yd<9)return!1;var jd=Sf("div");return"draggable"in jd||"dragDrop"in jd}(),$g;function Lb(jd){if($g==null){var Yd=Sf("span","​");If(jd,Sf("span",[Yd,document.createTextNode("x")])),jd.firstChild.offsetHeight!=0&&($g=Yd.offsetWidth<=1&&Yd.offsetHeight>2&&!(gd&&yd<8))}var gf=$g?Sf("span","​"):Sf("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return gf.setAttribute("cm-text",""),gf}var Kb;function db(jd){if(Kb!=null)return Kb;var Yd=If(jd,document.createTextNode("AخA")),gf=Pf(Yd,0,1).getBoundingClientRect(),hf=Pf(Yd,1,2).getBoundingClientRect();return Cf(jd),!gf||gf.left==gf.right?!1:Kb=hf.right-gf.right<3}var nh=` - -b`.split(/\n/).length!=3?function(jd){for(var Yd=0,gf=[],hf=jd.length;Yd<=hf;){var vf=jd.indexOf(` -`,Yd);vf==-1&&(vf=jd.length);var $f=jd.slice(Yd,jd.charAt(vf-1)=="\r"?vf-1:vf),ph=$f.indexOf("\r");ph!=-1?(gf.push($f.slice(0,ph)),Yd+=ph+1):(gf.push($f),Yd=vf+1)}return gf}:function(jd){return jd.split(/\r\n?|\n/)},gm=window.getSelection?function(jd){try{return jd.selectionStart!=jd.selectionEnd}catch{return!1}}:function(jd){var Yd;try{Yd=jd.ownerDocument.selection.createRange()}catch{}return!Yd||Yd.parentElement()!=jd?!1:Yd.compareEndPoints("StartToEnd",Yd)!=0},im=function(){var jd=Sf("div");return"oncopy"in jd?!0:(jd.setAttribute("oncopy","return;"),typeof jd.oncopy=="function")}(),mm=null;function jm(jd){if(mm!=null)return mm;var Yd=If(jd,Sf("span","x")),gf=Yd.getBoundingClientRect(),hf=Pf(Yd,0,1).getBoundingClientRect();return mm=Math.abs(gf.left-hf.left)>1}var Lm={},zm={};function Vm(jd,Yd){arguments.length>2&&(Yd.dependencies=Array.prototype.slice.call(arguments,2)),Lm[jd]=Yd}function Dm(jd,Yd){zm[jd]=Yd}function og(jd){if(typeof jd=="string"&&zm.hasOwnProperty(jd))jd=zm[jd];else if(jd&&typeof jd.name=="string"&&zm.hasOwnProperty(jd.name)){var Yd=zm[jd.name];typeof Yd=="string"&&(Yd={name:Yd}),jd=Rm(Yd,jd),jd.name=Yd.name}else{if(typeof jd=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(jd))return og("application/xml");if(typeof jd=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(jd))return og("application/json")}return typeof jd=="string"?{name:jd}:jd||{name:"null"}}function pg(jd,Yd){Yd=og(Yd);var gf=Lm[Yd.name];if(!gf)return pg(jd,"text/plain");var hf=gf(jd,Yd);if(qg.hasOwnProperty(Yd.name)){var vf=qg[Yd.name];for(var $f in vf)vf.hasOwnProperty($f)&&(hf.hasOwnProperty($f)&&(hf["_"+$f]=hf[$f]),hf[$f]=vf[$f])}if(hf.name=Yd.name,Yd.helperType&&(hf.helperType=Yd.helperType),Yd.modeProps)for(var ph in Yd.modeProps)hf[ph]=Yd.modeProps[ph];return hf}var qg={};function xg(jd,Yd){var gf=qg.hasOwnProperty(jd)?qg[jd]:qg[jd]={};Af(Yd,gf)}function Yg(jd,Yd){if(Yd===!0)return Yd;if(jd.copyState)return jd.copyState(Yd);var gf={};for(var hf in Yd){var vf=Yd[hf];vf instanceof Array&&(vf=vf.concat([])),gf[hf]=vf}return gf}function w_(jd,Yd){for(var gf;jd.innerMode&&(gf=jd.innerMode(Yd),!(!gf||gf.mode==jd));)Yd=gf.state,jd=gf.mode;return gf||{mode:jd,state:Yd}}function C_(jd,Yd,gf){return jd.startState?jd.startState(Yd,gf):!0}var p_=function(jd,Yd,gf){this.pos=this.start=0,this.string=jd,this.tabSize=Yd||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=gf};p_.prototype.eol=function(){return this.pos>=this.string.length},p_.prototype.sol=function(){return this.pos==this.lineStart},p_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},p_.prototype.next=function(){if(this.posYd},p_.prototype.eatSpace=function(){for(var jd=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>jd},p_.prototype.skipToEnd=function(){this.pos=this.string.length},p_.prototype.skipTo=function(jd){var Yd=this.string.indexOf(jd,this.pos);if(Yd>-1)return this.pos=Yd,!0},p_.prototype.backUp=function(jd){this.pos-=jd},p_.prototype.column=function(){return this.lastColumnPos0?null:($f&&Yd!==!1&&(this.pos+=$f[0].length),$f)}},p_.prototype.current=function(){return this.string.slice(this.start,this.pos)},p_.prototype.hideFirstChars=function(jd,Yd){this.lineStart+=jd;try{return Yd()}finally{this.lineStart-=jd}},p_.prototype.lookAhead=function(jd){var Yd=this.lineOracle;return Yd&&Yd.lookAhead(jd)},p_.prototype.baseToken=function(){var jd=this.lineOracle;return jd&&jd.baseToken(this.pos)};function Mg(jd,Yd){if(Yd-=jd.first,Yd<0||Yd>=jd.size)throw new Error("There is no line "+(Yd+jd.first)+" in the document.");for(var gf=jd;!gf.lines;)for(var hf=0;;++hf){var vf=gf.children[hf],$f=vf.chunkSize();if(Yd<$f){gf=vf;break}Yd-=$f}return gf.lines[Yd]}function q_(jd,Yd,gf){var hf=[],vf=Yd.line;return jd.iter(Yd.line,gf.line+1,function($f){var ph=$f.text;vf==gf.line&&(ph=ph.slice(0,gf.ch)),vf==Yd.line&&(ph=ph.slice(Yd.ch)),hf.push(ph),++vf}),hf}function m_(jd,Yd,gf){var hf=[];return jd.iter(Yd,gf,function(vf){hf.push(vf.text)}),hf}function a_(jd,Yd){var gf=Yd-jd.height;if(gf)for(var hf=jd;hf;hf=hf.parent)hf.height+=gf}function qh(jd){if(jd.parent==null)return null;for(var Yd=jd.parent,gf=dm(Yd.lines,jd),hf=Yd.parent;hf;Yd=hf,hf=hf.parent)for(var vf=0;hf.children[vf]!=Yd;++vf)gf+=hf.children[vf].chunkSize();return gf+Yd.first}function Pm(jd,Yd){var gf=jd.first;e:do{for(var hf=0;hf=jd.first&&Ydgf?sg(gf,Mg(jd,gf).text.length):Ub(Yd,Mg(jd,Yd.line).text.length)}function Ub(jd,Yd){var gf=jd.ch;return gf==null||gf>Yd?sg(jd.line,Yd):gf<0?sg(jd.line,0):jd}function Y_(jd,Yd){for(var gf=[],hf=0;hfthis.maxLookAhead&&(this.maxLookAhead=jd),Yd},pb.prototype.baseToken=function(jd){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=jd;)this.baseTokenPos+=2;var Yd=this.baseTokens[this.baseTokenPos+1];return{type:Yd&&Yd.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-jd}},pb.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},pb.fromSaved=function(jd,Yd,gf){return Yd instanceof Tb?new pb(jd,Yg(jd.mode,Yd.state),gf,Yd.lookAhead):new pb(jd,Yg(jd.mode,Yd),gf)},pb.prototype.save=function(jd){var Yd=jd!==!1?Yg(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Tb(Yd,this.maxLookAhead):Yd};function Sy(jd,Yd,gf,hf){var vf=[jd.state.modeGen],$f={};u0(jd,Yd.text,jd.doc.mode,gf,function(Kh,Om){return vf.push(Kh,Om)},$f,hf);for(var ph=gf.state,Ah=function(Kh){gf.baseTokens=vf;var Om=jd.state.overlays[Kh],Hm=1,Jm=0;gf.state=!0,u0(jd,Yd.text,Om.mode,gf,function(Qm,ug){for(var Tg=Hm;JmQm&&vf.splice(Hm,1,Qm,vf[Hm+1],kg),Hm+=2,Jm=Math.min(Qm,kg)}if(ug)if(Om.opaque)vf.splice(Tg,Hm-Tg,Qm,"overlay "+ug),Hm=Tg+2;else for(;Tgjd.options.maxHighlightLength&&Yg(jd.doc.mode,hf.state),$f=Sy(jd,Yd,hf);vf&&(hf.state=vf),Yd.stateAfter=hf.save(!vf),Yd.styles=$f.styles,$f.classes?Yd.styleClasses=$f.classes:Yd.styleClasses&&(Yd.styleClasses=null),gf===jd.doc.highlightFrontier&&(jd.doc.modeFrontier=Math.max(jd.doc.modeFrontier,++jd.doc.highlightFrontier))}return Yd.styles}function xb(jd,Yd,gf){var hf=jd.doc,vf=jd.display;if(!hf.mode.startState)return new pb(hf,!0,Yd);var $f=L0(jd,Yd,gf),ph=$f>hf.first&&Mg(hf,$f-1).stateAfter,Ah=ph?pb.fromSaved(hf,ph,$f):new pb(hf,C_(hf.mode),$f);return hf.iter($f,Yd,function(Lh){Ty(jd,Lh.text,Ah);var Kh=Ah.line;Lh.stateAfter=Kh==Yd-1||Kh%5==0||Kh>=vf.viewFrom&&KhYd.start)return $f}throw new Error("Mode "+jd.name+" failed to advance stream.")}var r_=function(jd,Yd,gf){this.start=jd.start,this.end=jd.pos,this.string=jd.current(),this.type=Yd||null,this.state=gf};function HE(jd,Yd,gf,hf){var vf=jd.doc,$f=vf.mode,ph;Yd=l_(vf,Yd);var Ah=Mg(vf,Yd.line),Lh=xb(jd,Yd.line,gf),Kh=new p_(Ah.text,jd.options.tabSize,Lh),Om;for(hf&&(Om=[]);(hf||Kh.posjd.options.maxHighlightLength?(Ah=!1,ph&&Ty(jd,Yd,hf,Om.pos),Om.pos=Yd.length,Hm=null):Hm=DE(UE(gf,Om,hf.state,Jm),$f),Jm){var Qm=Jm[0].name;Qm&&(Hm="m-"+(Hm?Qm+" "+Hm:Qm))}if(!Ah||Kh!=Hm){for(;Lhph;--Ah){if(Ah<=$f.first)return $f.first;var Lh=Mg($f,Ah-1),Kh=Lh.stateAfter;if(Kh&&(!gf||Ah+(Kh instanceof Tb?Kh.lookAhead:0)<=$f.modeFrontier))return Ah;var Om=_h(Lh.text,null,jd.options.tabSize);(vf==null||hf>Om)&&(vf=Ah-1,hf=Om)}return vf}function B0(jd,Yd){if(jd.modeFrontier=Math.min(jd.modeFrontier,Yd),!(jd.highlightFrontiergf;hf--){var vf=Mg(jd,hf).stateAfter;if(vf&&(!(vf instanceof Tb)||hf+vf.lookAhead=Yd:$f.to>Yd);(hf||(hf=[])).push(new IE(ph,$f.from,Lh?null:$f.to))}}return hf}function pT(jd,Yd,gf){var hf;if(jd)for(var vf=0;vf=Yd:$f.to>Yd);if(Ah||$f.from==Yd&&ph.type=="bookmark"&&(!gf||$f.marker.insertLeft)){var Lh=$f.from==null||(ph.inclusiveLeft?$f.from<=Yd:$f.from0&&Ah)for(var Qg=0;Qg0)){var Om=[Lh,1],Hm=Fg(Kh.from,Ah.from),Jm=Fg(Kh.to,Ah.to);(Hm<0||!ph.inclusiveLeft&&!Hm)&&Om.push({from:Kh.from,to:Ah.from}),(Jm>0||!ph.inclusiveRight&&!Jm)&&Om.push({from:Ah.to,to:Kh.to}),vf.splice.apply(vf,Om),Lh+=Om.length-3}}return vf}function Pg(jd){var Yd=jd.markedSpans;if(Yd){for(var gf=0;gfYd)&&(!hf||Cv(hf,$f.marker)<0)&&(hf=$f.marker)}return hf}function wv(jd,Yd,gf,hf,vf){var $f=Mg(jd,Yd),ph=fb&&$f.markedSpans;if(ph)for(var Ah=0;Ah=0&&Hm<=0||Om<=0&&Hm>=0)&&(Om<=0&&(Lh.marker.inclusiveRight&&vf.inclusiveLeft?Fg(Kh.to,gf)>=0:Fg(Kh.to,gf)>0)||Om>=0&&(Lh.marker.inclusiveRight&&vf.inclusiveLeft?Fg(Kh.from,hf)<=0:Fg(Kh.from,hf)<0)))return!0}}}function j_(jd){for(var Yd;Yd=ES(jd);)jd=Yd.find(-1,!0).line;return jd}function Nv(jd){for(var Yd;Yd=d0(jd);)jd=Yd.find(1,!0).line;return jd}function RE(jd){for(var Yd,gf;Yd=d0(jd);)jd=Yd.find(1,!0).line,(gf||(gf=[])).push(jd);return gf}function Q_(jd,Yd){var gf=Mg(jd,Yd),hf=j_(gf);return gf==hf?Yd:qh(hf)}function Cy(jd,Yd){if(Yd>jd.lastLine())return Yd;var gf=Mg(jd,Yd),hf;if(!ob(jd,gf))return Yd;for(;hf=d0(gf);)gf=hf.find(1,!0).line;return qh(gf)+1}function ob(jd,Yd){var gf=fb&&Yd.markedSpans;if(gf){for(var hf=void 0,vf=0;vfYd.maxLineLength&&(Yd.maxLineLength=vf,Yd.maxLine=hf)})}var Hy=function(jd,Yd,gf){this.text=jd,H_(this,Yd),this.height=gf?gf(this):1};Hy.prototype.lineNo=function(){return qh(this)},y_(Hy);function SS(jd,Yd,gf,hf){jd.text=Yd,jd.stateAfter&&(jd.stateAfter=null),jd.styles&&(jd.styles=null),jd.order!=null&&(jd.order=null),Pg(jd),H_(jd,gf);var vf=hf?hf(jd):1;vf!=jd.height&&a_(jd,vf)}function zb(jd){jd.parent=null,Pg(jd)}var Pv={},Qb={};function TS(jd,Yd){if(!jd||/^\s*$/.test(jd))return null;var gf=Yd.addModeClass?Qb:Pv;return gf[jd]||(gf[jd]=jd.replace(/\S+/g,"cm-$&"))}function f0(jd,Yd){var gf=wf("span",null,null,vd?"padding-right: .1px":null),hf={pre:wf("pre",[gf],"CodeMirror-line"),content:gf,col:0,pos:0,cm:jd,trailingSpace:!1,splitSpaces:jd.getOption("lineWrapping")};Yd.measure={};for(var vf=0;vf<=(Yd.rest?Yd.rest.length:0);vf++){var $f=vf?Yd.rest[vf-1]:Yd.line,ph=void 0;hf.pos=0,hf.addToken=U0,db(jd.display.measure)&&(ph=Km($f,jd.doc.direction))&&(hf.addToken=K_(hf.addToken,ph)),hf.map=[];var Ah=Yd!=jd.display.externalMeasured&&qh($f);Lv($f,hf,pE(jd,$f,Ah)),$f.styleClasses&&($f.styleClasses.bgClass&&(hf.bgClass=Mh($f.styleClasses.bgClass,hf.bgClass||"")),$f.styleClasses.textClass&&(hf.textClass=Mh($f.styleClasses.textClass,hf.textClass||""))),hf.map.length==0&&hf.map.push(0,0,hf.content.appendChild(Lb(jd.display.measure))),vf==0?(Yd.measure.map=hf.map,Yd.measure.cache={}):((Yd.measure.maps||(Yd.measure.maps=[])).push(hf.map),(Yd.measure.caches||(Yd.measure.caches=[])).push({}))}if(vd){var Lh=hf.content.lastChild;(/\bcm-tab\b/.test(Lh.className)||Lh.querySelector&&Lh.querySelector(".cm-tab"))&&(hf.content.className="cm-tab-wrap-hack")}return Og(jd,"renderLine",jd,Yd.line,hf.pre),hf.pre.className&&(hf.textClass=Mh(hf.pre.className,hf.textClass||"")),hf}function fE(jd){var Yd=Sf("span","•","cm-invalidchar");return Yd.title="\\u"+jd.charCodeAt(0).toString(16),Yd.setAttribute("aria-label",Yd.title),Yd}function U0(jd,Yd,gf,hf,vf,$f,ph){if(Yd){var Ah=jd.splitSpaces?H0(Yd,jd.trailingSpace):Yd,Lh=jd.cm.state.specialChars,Kh=!1,Om;if(!Lh.test(Yd))jd.col+=Yd.length,Om=document.createTextNode(Ah),jd.map.push(jd.pos,jd.pos+Yd.length,Om),gd&&yd<9&&(Kh=!0),jd.pos+=Yd.length;else{Om=document.createDocumentFragment();for(var Hm=0;;){Lh.lastIndex=Hm;var Jm=Lh.exec(Yd),Qm=Jm?Jm.index-Hm:Yd.length-Hm;if(Qm){var ug=document.createTextNode(Ah.slice(Hm,Hm+Qm));gd&&yd<9?Om.appendChild(Sf("span",[ug])):Om.appendChild(ug),jd.map.push(jd.pos,jd.pos+Qm,ug),jd.col+=Qm,jd.pos+=Qm}if(!Jm)break;Hm+=Qm+1;var Tg=void 0;if(Jm[0]==" "){var kg=jd.cm.options.tabSize,Gg=kg-jd.col%kg;Tg=Om.appendChild(Sf("span",$h(Gg),"cm-tab")),Tg.setAttribute("role","presentation"),Tg.setAttribute("cm-text"," "),jd.col+=Gg}else Jm[0]=="\r"||Jm[0]==` -`?(Tg=Om.appendChild(Sf("span",Jm[0]=="\r"?"␍":"␤","cm-invalidchar")),Tg.setAttribute("cm-text",Jm[0]),jd.col+=1):(Tg=jd.cm.options.specialCharPlaceholder(Jm[0]),Tg.setAttribute("cm-text",Jm[0]),gd&&yd<9?Om.appendChild(Sf("span",[Tg])):Om.appendChild(Tg),jd.col+=1);jd.map.push(jd.pos,jd.pos+1,Tg),jd.pos++}}if(jd.trailingSpace=Ah.charCodeAt(Yd.length-1)==32,gf||hf||vf||Kh||$f||ph){var Vg=gf||"";hf&&(Vg+=hf),vf&&(Vg+=vf);var Ug=Sf("span",[Om],Vg,$f);if(ph)for(var Qg in ph)ph.hasOwnProperty(Qg)&&Qg!="style"&&Qg!="class"&&Ug.setAttribute(Qg,ph[Qg]);return jd.content.appendChild(Ug)}jd.content.appendChild(Om)}}function H0(jd,Yd){if(jd.length>1&&!/ /.test(jd))return jd;for(var gf=Yd,hf="",vf=0;vfKh&&Hm.from<=Kh));Jm++);if(Hm.to>=Om)return jd(gf,hf,vf,$f,ph,Ah,Lh);jd(gf,hf.slice(0,Hm.to-Kh),vf,$f,null,Ah,Lh),$f=null,hf=hf.slice(Hm.to-Kh),Kh=Hm.to}}}function Gy(jd,Yd,gf,hf){var vf=!hf&&gf.widgetNode;vf&&jd.map.push(jd.pos,jd.pos+Yd,vf),!hf&&jd.cm.display.input.needsContentAttribute&&(vf||(vf=jd.content.appendChild(document.createElement("span"))),vf.setAttribute("cm-marker",gf.id)),vf&&(jd.cm.display.input.setUneditable(vf),jd.content.appendChild(vf)),jd.pos+=Yd,jd.trailingSpace=!1}function Lv(jd,Yd,gf){var hf=jd.markedSpans,vf=jd.text,$f=0;if(!hf){for(var ph=1;phLh||E_.collapsed&&n_.to==Lh&&n_.from==Lh)){if(n_.to!=null&&n_.to!=Lh&&Qm>n_.to&&(Qm=n_.to,Tg=""),E_.className&&(ug+=" "+E_.className),E_.css&&(Jm=(Jm?Jm+";":"")+E_.css),E_.startStyle&&n_.from==Lh&&(kg+=" "+E_.startStyle),E_.endStyle&&n_.to==Qm&&(Qg||(Qg=[])).push(E_.endStyle,n_.to),E_.title&&((Vg||(Vg={})).title=E_.title),E_.attributes)for(var G_ in E_.attributes)(Vg||(Vg={}))[G_]=E_.attributes[G_];E_.collapsed&&(!Gg||Cv(Gg.marker,E_)<0)&&(Gg=n_)}else n_.from>Lh&&Qm>n_.from&&(Qm=n_.from)}if(Qg)for(var ub=0;ub=Ah)break;for(var rb=Math.min(Ah,Qm);;){if(Om){var hb=Lh+Om.length;if(!Gg){var mb=hb>rb?Om.slice(0,rb-Lh):Om;Yd.addToken(Yd,mb,Hm?Hm+ug:ug,kg,Lh+mb.length==Qm?Tg:"",Jm,Vg)}if(hb>=rb){Om=Om.slice(rb-Lh),Lh=rb;break}Lh=hb,kg=""}Om=vf.slice($f,$f=gf[Kh++]),Hm=TS(gf[Kh++],Yd.cm.options)}}}function xS(jd,Yd,gf){this.line=Yd,this.rest=RE(Yd),this.size=this.rest?qh(wh(this.rest))-gf+1:1,this.node=this.text=null,this.hidden=ob(jd,Yd)}function VE(jd,Yd,gf){for(var hf=[],vf,$f=Yd;$f2&&$f.push((Lh.bottom+Kh.top)/2-gf.top)}}$f.push(gf.bottom-gf.top)}}function ex(jd,Yd,gf){if(jd.line==Yd)return{map:jd.measure.map,cache:jd.measure.cache};if(jd.rest){for(var hf=0;hfgf)return{map:jd.measure.maps[vf],cache:jd.measure.caches[vf],before:!0}}}function o1(jd,Yd){Yd=j_(Yd);var gf=qh(Yd),hf=jd.display.externalMeasured=new xS(jd.doc,Yd,gf);hf.lineN=gf;var vf=hf.built=f0(jd,hf);return hf.text=vf.pre,If(jd.display.lineMeasure,vf.pre),hf}function AS(jd,Yd,gf,hf){return ey(jd,Zb(jd,Yd),gf,hf)}function wS(jd,Yd){if(Yd>=jd.display.viewFrom&&Yd=gf.lineN&&YdYd)&&($f=Lh-Ah,vf=$f-1,Yd>=Lh&&(ph="right")),vf!=null){if(hf=jd[Kh+2],Ah==Lh&&gf==(hf.insertLeft?"left":"right")&&(ph=gf),gf=="left"&&vf==0)for(;Kh&&jd[Kh-2]==jd[Kh-3]&&jd[Kh-1].insertLeft;)hf=jd[(Kh-=3)+2],ph="left";if(gf=="right"&&vf==Lh-Ah)for(;Kh=0&&(gf=jd[vf]).left==gf.right;vf--);return gf}function V0(jd,Yd,gf,hf){var vf=nx(Yd.map,gf,hf),$f=vf.node,ph=vf.start,Ah=vf.end,Lh=vf.collapse,Kh;if($f.nodeType==3){for(var Om=0;Om<4;Om++){for(;ph&&Fh(Yd.line.text.charAt(vf.coverStart+ph));)--ph;for(;vf.coverStart+Ah0&&(Lh=hf="right");var Hm;jd.options.lineWrapping&&(Hm=$f.getClientRects()).length>1?Kh=Hm[hf=="right"?Hm.length-1:0]:Kh=$f.getBoundingClientRect()}if(gd&&yd<9&&!ph&&(!Kh||!Kh.left&&!Kh.right)){var Jm=$f.parentNode.getClientRects()[0];Jm?Kh={left:Jm.left,right:Jm.left+kE(jd.display),top:Jm.top,bottom:Jm.bottom}:Kh=tx}for(var Qm=Kh.top-Yd.rect.top,ug=Kh.bottom-Yd.rect.top,Tg=(Qm+ug)/2,kg=Yd.view.measure.heights,Gg=0;Gg=hf.text.length?(Lh=hf.text.length,Kh="before"):Lh<=0&&(Lh=0,Kh="after"),!Ah)return ph(Kh=="before"?Lh-1:Lh,Kh=="before");function Om(ug,Tg,kg){var Gg=Ah[Tg],Vg=Gg.level==1;return ph(kg?ug-1:ug,Vg!=kg)}var Hm=Sm(Ah,Lh,Kh),Jm=Vh,Qm=Om(Lh,Hm,Kh=="before");return Jm!=null&&(Qm.other=Om(Lh,Jm,Kh!="before")),Qm}function e_(jd,Yd){var gf=0;Yd=l_(jd.doc,Yd),jd.options.lineWrapping||(gf=kE(jd.display)*Yd.ch);var hf=Mg(jd.doc,Yd.line),vf=Ay(hf)+Cb(jd.display);return{left:gf,right:gf,top:vf,bottom:vf+hf.height}}function __(jd,Yd,gf,hf,vf){var $f=sg(jd,Yd,gf);return $f.xRel=vf,hf&&($f.outside=hf),$f}function O_(jd,Yd,gf){var hf=jd.doc;if(gf+=jd.display.viewOffset,gf<0)return __(hf.first,0,null,-1,-1);var vf=Pm(hf,gf),$f=hf.first+hf.size-1;if(vf>$f)return __(hf.first+hf.size-1,Mg(hf,$f).text.length,null,1,1);Yd<0&&(Yd=0);for(var ph=Mg(hf,vf);;){var Ah=u1(jd,ph,vf,Yd,gf),Lh=vS(ph,Ah.ch+(Ah.xRel>0||Ah.outside>0?1:0));if(!Lh)return Ah;var Kh=Lh.find(1);if(Kh.line==vf)return Kh;ph=Mg(hf,vf=Kh.line)}}function yb(jd,Yd,gf,hf){hf-=gT(Yd);var vf=Yd.text.length,$f=Rf(function(ph){return ey(jd,gf,ph-1).bottom<=hf},vf,0);return vf=Rf(function(ph){return ey(jd,gf,ph).top>hf},$f,vf),{begin:$f,end:vf}}function V_(jd,Yd,gf,hf){gf||(gf=Zb(jd,Yd));var vf=OE(jd,Yd,ey(jd,gf,hf),"line").top;return yb(jd,Yd,gf,vf)}function Fv(jd,Yd,gf,hf){return jd.bottom<=gf?!1:jd.top>gf?!0:(hf?jd.left:jd.right)>Yd}function u1(jd,Yd,gf,hf,vf){vf-=Ay(Yd);var $f=Zb(jd,Yd),ph=gT(Yd),Ah=0,Lh=Yd.text.length,Kh=!0,Om=Km(Yd,jd.doc.direction);if(Om){var Hm=(jd.options.lineWrapping?DS:Iy)(jd,Yd,gf,$f,Om,hf,vf);Kh=Hm.level!=1,Ah=Kh?Hm.from:Hm.to-1,Lh=Kh?Hm.to:Hm.from-1}var Jm=null,Qm=null,ug=Rf(function(i_){var n_=ey(jd,$f,i_);return n_.top+=ph,n_.bottom+=ph,Fv(n_,hf,vf,!1)?(n_.top<=vf&&n_.left<=hf&&(Jm=i_,Qm=n_),!0):!1},Ah,Lh),Tg,kg,Gg=!1;if(Qm){var Vg=hf-Qm.left=Qg.bottom?1:0}return ug=kf(Yd.text,ug,1),__(gf,ug,kg,Gg,hf-Tg)}function Iy(jd,Yd,gf,hf,vf,$f,ph){var Ah=Rf(function(Hm){var Jm=vf[Hm],Qm=Jm.level!=1;return Fv(lg(jd,sg(gf,Qm?Jm.to:Jm.from,Qm?"before":"after"),"line",Yd,hf),$f,ph,!0)},0,vf.length-1),Lh=vf[Ah];if(Ah>0){var Kh=Lh.level!=1,Om=lg(jd,sg(gf,Kh?Lh.from:Lh.to,Kh?"after":"before"),"line",Yd,hf);Fv(Om,$f,ph,!0)&&Om.top>ph&&(Lh=vf[Ah-1])}return Lh}function DS(jd,Yd,gf,hf,vf,$f,ph){var Ah=yb(jd,Yd,hf,ph),Lh=Ah.begin,Kh=Ah.end;/\s/.test(Yd.text.charAt(Kh-1))&&Kh--;for(var Om=null,Hm=null,Jm=0;Jm=Kh||Qm.to<=Lh)){var ug=Qm.level!=1,Tg=ey(jd,hf,ug?Math.min(Kh,Qm.to)-1:Math.max(Lh,Qm.from)).right,kg=Tg<$f?$f-Tg+1e9:Tg-$f;(!Om||Hm>kg)&&(Om=Qm,Hm=kg)}}return Om||(Om=vf[vf.length-1]),Om.fromKh&&(Om={from:Om.from,to:Kh,level:Om.level}),Om}var g0;function Vy(jd){if(jd.cachedTextHeight!=null)return jd.cachedTextHeight;if(g0==null){g0=Sf("pre",null,"CodeMirror-line-like");for(var Yd=0;Yd<49;++Yd)g0.appendChild(document.createTextNode("x")),g0.appendChild(Sf("br"));g0.appendChild(document.createTextNode("x"))}If(jd.measure,g0);var gf=g0.offsetHeight/50;return gf>3&&(jd.cachedTextHeight=gf),Cf(jd.measure),gf||1}function kE(jd){if(jd.cachedCharWidth!=null)return jd.cachedCharWidth;var Yd=Sf("span","xxxxxxxxxx"),gf=Sf("pre",[Yd],"CodeMirror-line-like");If(jd.measure,gf);var hf=Yd.getBoundingClientRect(),vf=(hf.right-hf.left)/10;return vf>2&&(jd.cachedCharWidth=vf),vf||10}function z0(jd){for(var Yd=jd.display,gf={},hf={},vf=Yd.gutters.clientLeft,$f=Yd.gutters.firstChild,ph=0;$f;$f=$f.nextSibling,++ph){var Ah=jd.display.gutterSpecs[ph].className;gf[Ah]=$f.offsetLeft+$f.clientLeft+vf,hf[Ah]=$f.clientWidth}return{fixedPos:F_(Yd),gutterTotalWidth:Yd.gutters.offsetWidth,gutterLeft:gf,gutterWidth:hf,wrapperWidth:Yd.wrapper.clientWidth}}function F_(jd){return jd.scroller.getBoundingClientRect().left-jd.sizer.getBoundingClientRect().left}function ox(jd){var Yd=Vy(jd.display),gf=jd.options.lineWrapping,hf=gf&&Math.max(5,jd.display.scroller.clientWidth/kE(jd.display)-3);return function(vf){if(ob(jd.doc,vf))return 0;var $f=0;if(vf.widgets)for(var ph=0;ph0&&(Kh=Mg(jd.doc,Lh.line).text).length==Lh.ch){var Om=_h(Kh,Kh.length,jd.options.tabSize)-Kh.length;Lh=sg(Lh.line,Math.max(0,Math.round(($f-G0(jd.display).left)/kE(jd.display))-Om))}return Lh}function _0(jd,Yd){if(Yd>=jd.display.viewTo||(Yd-=jd.display.viewFrom,Yd<0))return null;for(var gf=jd.display.view,hf=0;hfYd)&&(vf.updateLineNumbers=Yd),jd.curOp.viewChanged=!0,Yd>=vf.viewTo)fb&&Q_(jd.doc,Yd)vf.viewFrom?Wy(jd):(vf.viewFrom+=hf,vf.viewTo+=hf);else if(Yd<=vf.viewFrom&&gf>=vf.viewTo)Wy(jd);else if(Yd<=vf.viewFrom){var $f=eE(jd,gf,gf+hf,1);$f?(vf.view=vf.view.slice($f.index),vf.viewFrom=$f.lineN,vf.viewTo+=hf):Wy(jd)}else if(gf>=vf.viewTo){var ph=eE(jd,Yd,Yd,-1);ph?(vf.view=vf.view.slice(0,ph.index),vf.viewTo=ph.lineN):Wy(jd)}else{var Ah=eE(jd,Yd,Yd,-1),Lh=eE(jd,gf,gf+hf,1);Ah&&Lh?(vf.view=vf.view.slice(0,Ah.index).concat(VE(jd,Ah.lineN,Lh.lineN)).concat(vf.view.slice(Lh.index)),vf.viewTo+=hf):Wy(jd)}var Kh=vf.externalMeasured;Kh&&(gf=vf.lineN&&Yd=hf.viewTo)){var $f=hf.view[_0(jd,Yd)];if($f.node!=null){var ph=$f.changes||($f.changes=[]);dm(ph,gf)==-1&&ph.push(gf)}}}function Wy(jd){jd.display.viewFrom=jd.display.viewTo=jd.doc.first,jd.display.view=[],jd.display.viewOffset=0}function eE(jd,Yd,gf,hf){var vf=_0(jd,Yd),$f,ph=jd.display.view;if(!fb||gf==jd.doc.first+jd.doc.size)return{index:vf,lineN:gf};for(var Ah=jd.display.viewFrom,Lh=0;Lh0){if(vf==ph.length-1)return null;$f=Ah+ph[vf].size-Yd,vf++}else $f=Ah-Yd;Yd+=$f,gf+=$f}for(;Q_(jd.doc,gf)!=gf;){if(vf==(hf<0?0:ph.length-1))return null;gf+=hf*ph[vf-(hf<0?1:0)].size,vf+=hf}return{index:vf,lineN:gf}}function RS(jd,Yd,gf){var hf=jd.display,vf=hf.view;vf.length==0||Yd>=hf.viewTo||gf<=hf.viewFrom?(hf.view=VE(jd,Yd,gf),hf.viewFrom=Yd):(hf.viewFrom>Yd?hf.view=VE(jd,Yd,hf.viewFrom).concat(hf.view):hf.viewFromgf&&(hf.view=hf.view.slice(0,_0(jd,gf)))),hf.viewTo=gf}function yT(jd){for(var Yd=jd.display.view,gf=0,hf=0;hf=jd.display.viewTo||Lh.to().line0?ph:jd.defaultCharWidth())+"px"}if(hf.other){var Ah=gf.appendChild(Sf("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));Ah.style.display="",Ah.style.left=hf.other.left+"px",Ah.style.top=hf.other.top+"px",Ah.style.height=(hf.other.bottom-hf.other.top)*.85+"px"}}function b0(jd,Yd){return jd.top-Yd.top||jd.left-Yd.left}function lx(jd,Yd,gf){var hf=jd.display,vf=jd.doc,$f=document.createDocumentFragment(),ph=G0(jd.display),Ah=ph.left,Lh=Math.max(hf.sizerWidth,m0(jd)-hf.sizer.offsetLeft)-ph.right,Kh=vf.direction=="ltr";function Om(Ug,Qg,i_,n_){Qg<0&&(Qg=0),Qg=Math.round(Qg),n_=Math.round(n_),$f.appendChild(Sf("div",null,"CodeMirror-selected","position: absolute; left: "+Ug+`px; - top: `+Qg+"px; width: "+(i_??Lh-Ug)+`px; - height: `+(n_-Qg)+"px"))}function Hm(Ug,Qg,i_){var n_=Mg(vf,Ug),E_=n_.text.length,G_,ub;function J_(mb,Gb){return fg(jd,sg(Ug,mb),"div",n_,Gb)}function rb(mb,Gb,Pb){var vb=V_(jd,n_,null,mb),gb=Gb=="ltr"==(Pb=="after")?"left":"right",ib=Pb=="after"?vb.begin:vb.end-(/\s/.test(n_.text.charAt(vb.end-1))?2:1);return J_(ib,gb)[gb]}var hb=Km(n_,vf.direction);return Dh(hb,Qg||0,i_??E_,function(mb,Gb,Pb,vb){var gb=Pb=="ltr",ib=J_(mb,gb?"left":"right"),Yb=J_(Gb-1,gb?"right":"left"),yv=Qg==null&&mb==0,a0=i_==null&&Gb==E_,Fb=vb==0,xE=!hb||vb==hb.length-1;if(Yb.top-ib.top<=3){var Ib=(Kh?yv:a0)&&Fb,XT=(Kh?a0:yv)&&xE,CE=Ib?Ah:(gb?ib:Yb).left,s0=XT?Lh:(gb?Yb:ib).right;Om(CE,ib.top,s0-CE,ib.bottom)}else{var o0,qb,Ev,QT;gb?(o0=Kh&&yv&&Fb?Ah:ib.left,qb=Kh?Lh:rb(mb,Pb,"before"),Ev=Kh?Ah:rb(Gb,Pb,"after"),QT=Kh&&a0&&xE?Lh:Yb.right):(o0=Kh?rb(mb,Pb,"before"):Ah,qb=!Kh&&yv&&Fb?Lh:ib.right,Ev=!Kh&&a0&&xE?Ah:Yb.left,QT=Kh?rb(Gb,Pb,"after"):Lh),Om(o0,ib.top,qb-o0,ib.bottom),ib.bottom0?Yd.blinker=setInterval(function(){jd.hasFocus()||Y0(jd),Yd.cursorDiv.style.visibility=(gf=!gf)?"":"hidden"},jd.options.cursorBlinkRate):jd.options.cursorBlinkRate<0&&(Yd.cursorDiv.style.visibility="hidden")}}function YE(jd){jd.hasFocus()||(jd.display.input.focus(),jd.state.focused||vT(jd))}function W0(jd){jd.state.delayingBlurEvent=!0,setTimeout(function(){jd.state.delayingBlurEvent&&(jd.state.delayingBlurEvent=!1,jd.state.focused&&Y0(jd))},100)}function vT(jd,Yd){jd.state.delayingBlurEvent&&!jd.state.draggingText&&(jd.state.delayingBlurEvent=!1),jd.options.readOnly!="nocursor"&&(jd.state.focused||(Og(jd,"focus",jd,Yd),jd.state.focused=!0,Eh(jd.display.wrapper,"CodeMirror-focused"),!jd.curOp&&jd.display.selForContextMenu!=jd.doc.sel&&(jd.display.input.reset(),vd&&setTimeout(function(){return jd.display.input.reset(!0)},20)),jd.display.input.receivedFocus()),y0(jd))}function Y0(jd,Yd){jd.state.delayingBlurEvent||(jd.state.focused&&(Og(jd,"blur",jd,Yd),jd.state.focused=!1,xf(jd.display.wrapper,"CodeMirror-focused")),clearInterval(jd.display.blinker),setTimeout(function(){jd.state.focused||(jd.display.shift=!1)},150))}function kS(jd){for(var Yd=jd.display,gf=Yd.lineDiv.offsetTop,hf=Math.max(0,Yd.scroller.getBoundingClientRect().top),vf=Yd.lineDiv.getBoundingClientRect().top,$f=0,ph=0;ph.005||Qm<-.005)&&(vfjd.display.sizerWidth){var Tg=Math.ceil(Om/kE(jd.display));Tg>jd.display.maxLineLength&&(jd.display.maxLineLength=Tg,jd.display.maxLine=Ah.line,jd.display.maxLineChanged=!0)}}}Math.abs($f)>2&&(Yd.scroller.scrollTop+=$f)}function jv(jd){if(jd.widgets)for(var Yd=0;Yd=ph&&($f=Pm(Yd,Ay(Mg(Yd,Lh))-jd.wrapper.clientHeight),ph=Lh)}return{from:$f,to:Math.max(ph,$f+1)}}function ST(jd,Yd){if(!Wg(jd,"scrollCursorIntoView")){var gf=jd.display,hf=gf.sizer.getBoundingClientRect(),vf=null,$f=gf.wrapper.ownerDocument;if(Yd.top+hf.top<0?vf=!0:Yd.bottom+hf.top>($f.defaultView.innerHeight||$f.documentElement.clientHeight)&&(vf=!1),vf!=null&&!Gd){var ph=Sf("div","​",null,`position: absolute; - top: `+(Yd.top-gf.viewOffset-Cb(jd.display))+`px; - height: `+(Yd.bottom-Yd.top+hE(jd)+gf.barHeight)+`px; - left: `+Yd.left+"px; width: "+Math.max(2,Yd.right-Yd.left)+"px;");jd.display.lineSpace.appendChild(ph),ph.scrollIntoView(vf),jd.display.lineSpace.removeChild(ph)}}}function c1(jd,Yd,gf,hf){hf==null&&(hf=0);var vf;!jd.options.lineWrapping&&Yd==gf&&(gf=Yd.sticky=="before"?sg(Yd.line,Yd.ch+1,"before"):Yd,Yd=Yd.ch?sg(Yd.line,Yd.sticky=="before"?Yd.ch-1:Yd.ch,"after"):Yd);for(var $f=0;$f<5;$f++){var ph=!1,Ah=lg(jd,Yd),Lh=!gf||gf==Yd?Ah:lg(jd,gf);vf={left:Math.min(Ah.left,Lh.left),top:Math.min(Ah.top,Lh.top)-hf,right:Math.max(Ah.left,Lh.left),bottom:Math.max(Ah.bottom,Lh.bottom)+hf};var Kh=TT(jd,vf),Om=jd.doc.scrollTop,Hm=jd.doc.scrollLeft;if(Kh.scrollTop!=null&&(Uv(jd,Kh.scrollTop),Math.abs(jd.doc.scrollTop-Om)>1&&(ph=!0)),Kh.scrollLeft!=null&&(tE(jd,Kh.scrollLeft),Math.abs(jd.doc.scrollLeft-Hm)>1&&(ph=!0)),!ph)break}return vf}function ux(jd,Yd){var gf=TT(jd,Yd);gf.scrollTop!=null&&Uv(jd,gf.scrollTop),gf.scrollLeft!=null&&tE(jd,gf.scrollLeft)}function TT(jd,Yd){var gf=jd.display,hf=Vy(jd.display);Yd.top<0&&(Yd.top=0);var vf=jd.curOp&&jd.curOp.scrollTop!=null?jd.curOp.scrollTop:gf.scroller.scrollTop,$f=hT(jd),ph={};Yd.bottom-Yd.top>$f&&(Yd.bottom=Yd.top+$f);var Ah=jd.doc.height+h0(gf),Lh=Yd.topAh-hf;if(Yd.topvf+$f){var Om=Math.min(Yd.top,(Kh?Ah:Yd.bottom)-$f);Om!=vf&&(ph.scrollTop=Om)}var Hm=jd.options.fixedGutter?0:gf.gutters.offsetWidth,Jm=jd.curOp&&jd.curOp.scrollLeft!=null?jd.curOp.scrollLeft:gf.scroller.scrollLeft-Hm,Qm=m0(jd)-gf.gutters.offsetWidth,ug=Yd.right-Yd.left>Qm;return ug&&(Yd.right=Yd.left+Qm),Yd.left<10?ph.scrollLeft=0:Yd.leftQm+Jm-3&&(ph.scrollLeft=Yd.right+(ug?0:10)-Qm),ph}function xT(jd,Yd){Yd!=null&&(MS(jd),jd.curOp.scrollTop=(jd.curOp.scrollTop==null?jd.doc.scrollTop:jd.curOp.scrollTop)+Yd)}function Z_(jd){MS(jd);var Yd=jd.getCursor();jd.curOp.scrollToPos={from:Yd,to:Yd,margin:jd.options.cursorScrollMargin}}function Eb(jd,Yd,gf){(Yd!=null||gf!=null)&&MS(jd),Yd!=null&&(jd.curOp.scrollLeft=Yd),gf!=null&&(jd.curOp.scrollTop=gf)}function d1(jd,Yd){MS(jd),jd.curOp.scrollToPos=Yd}function MS(jd){var Yd=jd.curOp.scrollToPos;if(Yd){jd.curOp.scrollToPos=null;var gf=e_(jd,Yd.from),hf=e_(jd,Yd.to);CT(jd,gf,hf,Yd.margin)}}function CT(jd,Yd,gf,hf){var vf=TT(jd,{left:Math.min(Yd.left,gf.left),top:Math.min(Yd.top,gf.top)-hf,right:Math.max(Yd.right,gf.right),bottom:Math.max(Yd.bottom,gf.bottom)+hf});Eb(jd,vf.scrollLeft,vf.scrollTop)}function Uv(jd,Yd){Math.abs(jd.doc.scrollTop-Yd)<2||(pd||nE(jd,{top:Yd}),$S(jd,Yd,!0),pd&&nE(jd),qv(jd,100))}function $S(jd,Yd,gf){Yd=Math.max(0,Math.min(jd.display.scroller.scrollHeight-jd.display.scroller.clientHeight,Yd)),!(jd.display.scroller.scrollTop==Yd&&!gf)&&(jd.doc.scrollTop=Yd,jd.display.scrollbars.setScrollTop(Yd),jd.display.scroller.scrollTop!=Yd&&(jd.display.scroller.scrollTop=Yd))}function tE(jd,Yd,gf,hf){Yd=Math.max(0,Math.min(Yd,jd.display.scroller.scrollWidth-jd.display.scroller.clientWidth)),!((gf?Yd==jd.doc.scrollLeft:Math.abs(jd.doc.scrollLeft-Yd)<2)&&!hf)&&(jd.doc.scrollLeft=Yd,hx(jd),jd.display.scroller.scrollLeft!=Yd&&(jd.display.scroller.scrollLeft=Yd),jd.display.scrollbars.setScrollLeft(Yd))}function v0(jd){var Yd=jd.display,gf=Yd.gutters.offsetWidth,hf=Math.round(jd.doc.height+h0(jd.display));return{clientHeight:Yd.scroller.clientHeight,viewHeight:Yd.wrapper.clientHeight,scrollWidth:Yd.scroller.scrollWidth,clientWidth:Yd.scroller.clientWidth,viewWidth:Yd.wrapper.clientWidth,barLeft:jd.options.fixedGutter?gf:0,docHeight:hf,scrollHeight:hf+hE(jd)+Yd.barHeight,nativeBarWidth:Yd.nativeBarWidth,gutterWidth:gf}}var Ry=function(jd,Yd,gf){this.cm=gf;var hf=this.vert=Sf("div",[Sf("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),vf=this.horiz=Sf("div",[Sf("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");hf.tabIndex=vf.tabIndex=-1,jd(hf),jd(vf),ig(hf,"scroll",function(){hf.clientHeight&&Yd(hf.scrollTop,"vertical")}),ig(vf,"scroll",function(){vf.clientWidth&&Yd(vf.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,gd&&yd<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ry.prototype.update=function(jd){var Yd=jd.scrollWidth>jd.clientWidth+1,gf=jd.scrollHeight>jd.clientHeight+1,hf=jd.nativeBarWidth;if(gf){this.vert.style.display="block",this.vert.style.bottom=Yd?hf+"px":"0";var vf=jd.viewHeight-(Yd?hf:0);this.vert.firstChild.style.height=Math.max(0,jd.scrollHeight-jd.clientHeight+vf)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(Yd){this.horiz.style.display="block",this.horiz.style.right=gf?hf+"px":"0",this.horiz.style.left=jd.barLeft+"px";var $f=jd.viewWidth-jd.barLeft-(gf?hf:0);this.horiz.firstChild.style.width=Math.max(0,jd.scrollWidth-jd.clientWidth+$f)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&jd.clientHeight>0&&(hf==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:gf?hf:0,bottom:Yd?hf:0}},Ry.prototype.setScrollLeft=function(jd){this.horiz.scrollLeft!=jd&&(this.horiz.scrollLeft=jd),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ry.prototype.setScrollTop=function(jd){this.vert.scrollTop!=jd&&(this.vert.scrollTop=jd),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ry.prototype.zeroWidthHack=function(){var jd=Kd&&!Vd?"12px":"18px";this.horiz.style.height=this.vert.style.width=jd,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Nh,this.disableVert=new Nh},Ry.prototype.enableZeroWidthBar=function(jd,Yd,gf){jd.style.visibility="";function hf(){var vf=jd.getBoundingClientRect(),$f=gf=="vert"?document.elementFromPoint(vf.right-1,(vf.top+vf.bottom)/2):document.elementFromPoint((vf.right+vf.left)/2,vf.bottom-1);$f!=jd?jd.style.visibility="hidden":Yd.set(1e3,hf)}Yd.set(1e3,hf)},Ry.prototype.clear=function(){var jd=this.horiz.parentNode;jd.removeChild(this.horiz),jd.removeChild(this.vert)};var ME=function(){};ME.prototype.update=function(){return{bottom:0,right:0}},ME.prototype.setScrollLeft=function(){},ME.prototype.setScrollTop=function(){},ME.prototype.clear=function(){};function gE(jd,Yd){Yd||(Yd=v0(jd));var gf=jd.display.barWidth,hf=jd.display.barHeight;Hv(jd,Yd);for(var vf=0;vf<4&&gf!=jd.display.barWidth||hf!=jd.display.barHeight;vf++)gf!=jd.display.barWidth&&jd.options.lineWrapping&&kS(jd),Hv(jd,v0(jd)),gf=jd.display.barWidth,hf=jd.display.barHeight}function Hv(jd,Yd){var gf=jd.display,hf=gf.scrollbars.update(Yd);gf.sizer.style.paddingRight=(gf.barWidth=hf.right)+"px",gf.sizer.style.paddingBottom=(gf.barHeight=hf.bottom)+"px",gf.heightForcer.style.borderBottom=hf.bottom+"px solid transparent",hf.right&&hf.bottom?(gf.scrollbarFiller.style.display="block",gf.scrollbarFiller.style.height=hf.bottom+"px",gf.scrollbarFiller.style.width=hf.right+"px"):gf.scrollbarFiller.style.display="",hf.bottom&&jd.options.coverGutterNextToScrollbar&&jd.options.fixedGutter?(gf.gutterFiller.style.display="block",gf.gutterFiller.style.height=hf.bottom+"px",gf.gutterFiller.style.width=Yd.gutterWidth+"px"):gf.gutterFiller.style.display=""}var S0={native:Ry,null:ME};function dx(jd){jd.display.scrollbars&&(jd.display.scrollbars.clear(),jd.display.scrollbars.addClass&&xf(jd.display.wrapper,jd.display.scrollbars.addClass)),jd.display.scrollbars=new S0[jd.options.scrollbarStyle](function(Yd){jd.display.wrapper.insertBefore(Yd,jd.display.scrollbarFiller),ig(Yd,"mousedown",function(){jd.state.focused&&setTimeout(function(){return jd.display.input.focus()},0)}),Yd.setAttribute("cm-not-content","true")},function(Yd,gf){gf=="horizontal"?tE(jd,Yd):Uv(jd,Yd)},jd),jd.display.scrollbars.addClass&&Eh(jd.display.wrapper,jd.display.scrollbars.addClass)}var p1=0;function T0(jd){jd.curOp={cm:jd,viewChanged:!1,startHeight:jd.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:++p1,markArrays:null},CS(jd.curOp)}function x0(jd){var Yd=jd.curOp;Yd&&Jd(Yd,function(gf){for(var hf=0;hf=gf.viewTo)||gf.maxLineChanged&&Yd.options.lineWrapping,jd.update=jd.mustUpdate&&new yE(Yd,jd.mustUpdate&&{top:jd.scrollTop,ensure:jd.scrollToPos},jd.forceUpdate)}function Gv(jd){jd.updatedDisplay=jd.mustUpdate&&AT(jd.cm,jd.update)}function px(jd){var Yd=jd.cm,gf=Yd.display;jd.updatedDisplay&&kS(Yd),jd.barMeasure=v0(Yd),gf.maxLineChanged&&!Yd.options.lineWrapping&&(jd.adjustWidthTo=AS(Yd,gf.maxLine,gf.maxLine.text.length).left+3,Yd.display.sizerWidth=jd.adjustWidthTo,jd.barMeasure.scrollWidth=Math.max(gf.scroller.clientWidth,gf.sizer.offsetLeft+jd.adjustWidthTo+hE(Yd)+Yd.display.barWidth),jd.maxScrollLeft=Math.max(0,gf.sizer.offsetLeft+jd.adjustWidthTo-m0(Yd))),(jd.updatedDisplay||jd.selectionChanged)&&(jd.preparedSelection=gf.input.prepareSelection())}function _m(jd){var Yd=jd.cm;jd.adjustWidthTo!=null&&(Yd.display.sizer.style.minWidth=jd.adjustWidthTo+"px",jd.maxScrollLeft=jd.display.viewTo)){var gf=+new Date+jd.options.workTime,hf=xb(jd,Yd.highlightFrontier),vf=[];Yd.iter(hf.line,Math.min(Yd.first+Yd.size,jd.display.viewTo+500),function($f){if(hf.line>=jd.display.viewFrom){var ph=$f.styles,Ah=$f.text.length>jd.options.maxHighlightLength?Yg(Yd.mode,hf.state):null,Lh=Sy(jd,$f,hf,!0);Ah&&(hf.state=Ah),$f.styles=Lh.styles;var Kh=$f.styleClasses,Om=Lh.classes;Om?$f.styleClasses=Om:Kh&&($f.styleClasses=null);for(var Hm=!ph||ph.length!=$f.styles.length||Kh!=Om&&(!Kh||!Om||Kh.bgClass!=Om.bgClass||Kh.textClass!=Om.textClass),Jm=0;!Hm&&Jmgf)return qv(jd,jd.options.workDelay),!0}),Yd.highlightFrontier=hf.line,Yd.modeFrontier=Math.max(Yd.modeFrontier,hf.line),vf.length&&Bb(jd,function(){for(var $f=0;$f=gf.viewFrom&&Yd.visible.to<=gf.viewTo&&(gf.updateLineNumbers==null||gf.updateLineNumbers>=gf.viewTo)&&gf.renderedView==gf.view&&yT(jd)==0)return!1;mx(jd)&&(Wy(jd),Yd.dims=z0(jd));var vf=hf.first+hf.size,$f=Math.max(Yd.visible.from-jd.options.viewportMargin,hf.first),ph=Math.min(vf,Yd.visible.to+jd.options.viewportMargin);gf.viewFrom<$f&&$f-gf.viewFrom<20&&($f=Math.max(hf.first,gf.viewFrom)),gf.viewTo>ph&&gf.viewTo-ph<20&&(ph=Math.min(vf,gf.viewTo)),fb&&($f=Q_(jd.doc,$f),ph=Cy(jd.doc,ph));var Ah=$f!=gf.viewFrom||ph!=gf.viewTo||gf.lastWrapHeight!=Yd.wrapperHeight||gf.lastWrapWidth!=Yd.wrapperWidth;RS(jd,$f,ph),gf.viewOffset=Ay(Mg(jd.doc,gf.viewFrom)),jd.display.mover.style.top=gf.viewOffset+"px";var Lh=yT(jd);if(!Ah&&Lh==0&&!Yd.force&&gf.renderedView==gf.view&&(gf.updateLineNumbers==null||gf.updateLineNumbers>=gf.viewTo))return!1;var Kh=g1(jd);return Lh>4&&(gf.lineDiv.style.display="none"),b1(jd,gf.updateLineNumbers,Yd.dims),Lh>4&&(gf.lineDiv.style.display=""),gf.renderedView=gf.view,_1(Kh),Cf(gf.cursorDiv),Cf(gf.selectionDiv),gf.gutters.style.height=gf.sizer.style.minHeight=0,Ah&&(gf.lastWrapHeight=Yd.wrapperHeight,gf.lastWrapWidth=Yd.wrapperWidth,qv(jd,400)),gf.updateLineNumbers=null,!0}function fx(jd,Yd){for(var gf=Yd.viewport,hf=!0;;hf=!1){if(!hf||!jd.options.lineWrapping||Yd.oldDisplayWidth==m0(jd)){if(gf&&gf.top!=null&&(gf={top:Math.min(jd.doc.height+h0(jd.display)-hT(jd),gf.top)}),Yd.visible=E0(jd.display,jd.doc,gf),Yd.visible.from>=jd.display.viewFrom&&Yd.visible.to<=jd.display.viewTo)break}else hf&&(Yd.visible=E0(jd.display,jd.doc,gf));if(!AT(jd,Yd))break;kS(jd);var vf=v0(jd);WE(jd),gE(jd,vf),DT(jd,vf),Yd.force=!1}Yd.signal(jd,"update",jd),(jd.display.viewFrom!=jd.display.reportedViewFrom||jd.display.viewTo!=jd.display.reportedViewTo)&&(Yd.signal(jd,"viewportChange",jd,jd.display.viewFrom,jd.display.viewTo),jd.display.reportedViewFrom=jd.display.viewFrom,jd.display.reportedViewTo=jd.display.viewTo)}function nE(jd,Yd){var gf=new yE(jd,Yd);if(AT(jd,gf)){kS(jd),fx(jd,gf);var hf=v0(jd);WE(jd),gE(jd,hf),DT(jd,hf),gf.finish()}}function b1(jd,Yd,gf){var hf=jd.display,vf=jd.options.lineNumbers,$f=hf.lineDiv,ph=$f.firstChild;function Ah(ug){var Tg=ug.nextSibling;return vd&&Kd&&jd.display.currentWheelTarget==ug?ug.style.display="none":ug.parentNode.removeChild(ug),Tg}for(var Lh=hf.view,Kh=hf.viewFrom,Om=0;Om-1&&(Qm=!1),Bf(jd,Hm,Kh,gf)),Qm&&(Cf(Hm.lineNumber),Hm.lineNumber.appendChild(document.createTextNode(Ig(jd.options,Kh)))),ph=Hm.node.nextSibling}Kh+=Hm.size}for(;ph;)ph=Ah(ph)}function wT(jd){var Yd=jd.gutters.offsetWidth;jd.sizer.style.marginLeft=Yd+"px",Zd(jd,"gutterChanged",jd)}function DT(jd,Yd){jd.display.sizer.style.minHeight=Yd.docHeight+"px",jd.display.heightForcer.style.top=Yd.docHeight+"px",jd.display.gutters.style.height=Yd.docHeight+jd.display.barHeight+hE(jd)+"px"}function hx(jd){var Yd=jd.display,gf=Yd.view;if(!(!Yd.alignWidgets&&(!Yd.gutters.firstChild||!jd.options.fixedGutter))){for(var hf=F_(Yd)-Yd.scroller.scrollLeft+jd.doc.scrollLeft,vf=Yd.gutters.offsetWidth,$f=hf+"px",ph=0;ph=105&&(vf.wrapper.style.clipPath="inset(0px)"),vf.wrapper.setAttribute("translate","no"),gd&&yd<8&&(vf.gutters.style.zIndex=-1,vf.scroller.style.paddingRight=0),!vd&&!(pd&&Wd)&&(vf.scroller.draggable=!0),jd&&(jd.appendChild?jd.appendChild(vf.wrapper):jd(vf.wrapper)),vf.viewFrom=vf.viewTo=Yd.first,vf.reportedViewFrom=vf.reportedViewTo=Yd.first,vf.view=[],vf.renderedView=null,vf.externalMeasured=null,vf.viewOffset=0,vf.lastWrapHeight=vf.lastWrapWidth=0,vf.updateLineNumbers=null,vf.nativeBarWidth=vf.barHeight=vf.barWidth=0,vf.scrollbarsClipped=!1,vf.lineNumWidth=vf.lineNumInnerWidth=vf.lineNumChars=null,vf.alignWidgets=!1,vf.cachedCharWidth=vf.cachedTextHeight=vf.cachedPaddingH=null,vf.maxLine=null,vf.maxLineLength=0,vf.maxLineChanged=!1,vf.wheelDX=vf.wheelDY=vf.wheelStartX=vf.wheelStartY=null,vf.shift=!1,vf.selForContextMenu=null,vf.activeTouch=null,vf.gutterSpecs=rE(hf.gutters,hf.lineNumbers),gx(vf),gf.init(vf)}var LS=0,$E=null;gd?$E=-.53:pd?$E=15:Md?$E=-.7:Hd&&($E=-1/3);function KE(jd){var Yd=jd.wheelDeltaX,gf=jd.wheelDeltaY;return Yd==null&&jd.detail&&jd.axis==jd.HORIZONTAL_AXIS&&(Yd=jd.detail),gf==null&&jd.detail&&jd.axis==jd.VERTICAL_AXIS?gf=jd.detail:gf==null&&(gf=jd.wheelDelta),{x:Yd,y:gf}}function E1(jd){var Yd=KE(jd);return Yd.x*=$E,Yd.y*=$E,Yd}function _x(jd,Yd){Md&&Ld==102&&(jd.display.chromeScrollHack==null?jd.display.sizer.style.pointerEvents="none":clearTimeout(jd.display.chromeScrollHack),jd.display.chromeScrollHack=setTimeout(function(){jd.display.chromeScrollHack=null,jd.display.sizer.style.pointerEvents=""},100));var gf=KE(Yd),hf=gf.x,vf=gf.y,$f=$E;Yd.deltaMode===0&&(hf=Yd.deltaX,vf=Yd.deltaY,$f=1);var ph=jd.display,Ah=ph.scroller,Lh=Ah.scrollWidth>Ah.clientWidth,Kh=Ah.scrollHeight>Ah.clientHeight;if(hf&&Lh||vf&&Kh){if(vf&&Kd&&vd){e:for(var Om=Yd.target,Hm=ph.view;Om!=Ah;Om=Om.parentNode)for(var Jm=0;Jm=0&&Fg(jd,hf.to())<=0)return gf}return-1};var L_=function(jd,Yd){this.anchor=jd,this.head=Yd};L_.prototype.from=function(){return jb(this.anchor,this.head)},L_.prototype.to=function(){return sb(this.anchor,this.head)},L_.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function iE(jd,Yd,gf){var hf=jd&&jd.options.selectionsMayTouch,vf=Yd[gf];Yd.sort(function(Jm,Qm){return Fg(Jm.from(),Qm.from())}),gf=dm(Yd,vf);for(var $f=1;$f0:Lh>=0){var Kh=jb(Ah.from(),ph.from()),Om=sb(Ah.to(),ph.to()),Hm=Ah.empty()?ph.from()==ph.head:Ah.from()==Ah.head;$f<=gf&&--gf,Yd.splice(--$f,2,new L_(Hm?Om:Kh,Hm?Kh:Om))}}return new nb(Yd,gf)}function XE(jd,Yd){return new nb([new L_(jd,Yd||jd)],0)}function QE(jd){return jd.text?sg(jd.from.line+jd.text.length-1,wh(jd.text).length+(jd.text.length==1?jd.from.ch:0)):jd.to}function yx(jd,Yd){if(Fg(jd,Yd.from)<0)return jd;if(Fg(jd,Yd.to)<=0)return QE(Yd);var gf=jd.line+Yd.text.length-(Yd.to.line-Yd.from.line)-1,hf=jd.ch;return jd.line==Yd.to.line&&(hf+=QE(Yd).ch-Yd.to.ch),sg(gf,hf)}function BS(jd,Yd){for(var gf=[],hf=0;hf1&&jd.remove(Ah.line+1,ug-1),jd.insert(Ah.line+1,Gg)}Zd(jd,"change",jd,Yd)}function JE(jd,Yd,gf){function hf(vf,$f,ph){if(vf.linked)for(var Ah=0;Ah1&&!jd.done[jd.done.length-2].ranges)return jd.done.pop(),wh(jd.done)}function OT(jd,Yd,gf,hf){var vf=jd.history;vf.undone.length=0;var $f=+new Date,ph,Ah;if((vf.lastOp==hf||vf.lastOrigin==Yd.origin&&Yd.origin&&(Yd.origin.charAt(0)=="+"&&vf.lastModTime>$f-(jd.cm?jd.cm.options.historyEventDelay:500)||Yd.origin.charAt(0)=="*"))&&(ph=S1(vf,vf.lastOp==hf)))Ah=wh(ph.changes),Fg(Yd.from,Yd.to)==0&&Fg(Yd.from,Ah.to)==0?Ah.to=QE(Yd):ph.changes.push(LE(jd,Yd));else{var Lh=wh(vf.done);for((!Lh||!Lh.ranges)&&sE(jd.sel,vf.done),ph={changes:[LE(jd,Yd)],generation:vf.generation},vf.done.push(ph);vf.done.length>vf.undoDepth;)vf.done.shift(),vf.done[0].ranges||vf.done.shift()}vf.done.push(gf),vf.generation=++vf.maxGeneration,vf.lastModTime=vf.lastSelTime=$f,vf.lastOp=vf.lastSelOp=hf,vf.lastOrigin=vf.lastSelOrigin=Yd.origin,Ah||Og(jd,"historyAdded")}function vx(jd,Yd,gf,hf){var vf=Yd.charAt(0);return vf=="*"||vf=="+"&&gf.ranges.length==hf.ranges.length&&gf.somethingSelected()==hf.somethingSelected()&&new Date-jd.history.lastSelTime<=(jd.cm?jd.cm.options.historyEventDelay:500)}function Wv(jd,Yd,gf,hf){var vf=jd.history,$f=hf&&hf.origin;gf==vf.lastSelOp||$f&&vf.lastSelOrigin==$f&&(vf.lastModTime==vf.lastSelTime&&vf.lastOrigin==$f||vx(jd,$f,wh(vf.done),Yd))?vf.done[vf.done.length-1]=Yd:sE(Yd,vf.done),vf.lastSelTime=+new Date,vf.lastSelOrigin=$f,vf.lastSelOp=gf,hf&&hf.clearRedo!==!1&&ty(vf.undone)}function sE(jd,Yd){var gf=wh(Yd);gf&&gf.ranges&&gf.equals(jd)||Yd.push(jd)}function kT(jd,Yd,gf,hf){var vf=Yd["spans_"+jd.id],$f=0;jd.iter(Math.max(jd.first,gf),Math.min(jd.first+jd.size,hf),function(ph){ph.markedSpans&&((vf||(vf=Yd["spans_"+jd.id]={}))[$f]=ph.markedSpans),++$f})}function T1(jd){if(!jd)return null;for(var Yd,gf=0;gf-1&&(wh(Ah)[Hm]=Kh[Hm],delete Kh[Hm])}}return hf}function wb(jd,Yd,gf,hf){if(hf){var vf=jd.anchor;if(gf){var $f=Fg(Yd,vf)<0;$f!=Fg(gf,vf)<0?(vf=Yd,Yd=gf):$f!=Fg(Yd,gf)<0&&(Yd=gf)}return new L_(vf,Yd)}else return new L_(gf||Yd,Yd)}function Z0(jd,Yd,gf,hf,vf){vf==null&&(vf=jd.cm&&(jd.cm.display.shift||jd.extend)),Mb(jd,new nb([wb(jd.sel.primary(),Yd,gf,vf)],0),hf)}function MT(jd,Yd,gf){for(var hf=[],vf=jd.cm&&(jd.cm.display.shift||jd.extend),$f=0;$f=Yd.ch:Ah.to>Yd.ch))){if(vf&&(Og(Lh,"beforeCursorEnter"),Lh.explicitlyCleared))if($f.markedSpans){--ph;continue}else break;if(!Lh.atomic)continue;if(gf){var Hm=Lh.find(hf<0?1:-1),Jm=void 0;if((hf<0?Om:Kh)&&(Hm=Cx(jd,Hm,-hf,Hm&&Hm.line==Yd.line?$f:null)),Hm&&Hm.line==Yd.line&&(Jm=Fg(Hm,gf))&&(hf<0?Jm<0:Jm>0))return ev(jd,Hm,Yd,hf,vf)}var Qm=Lh.find(hf<0?-1:1);return(hf<0?Kh:Om)&&(Qm=Cx(jd,Qm,hf,Qm.line==Yd.line?$f:null)),Qm?ev(jd,Qm,Yd,hf,vf):null}}return Yd}function tv(jd,Yd,gf,hf,vf){var $f=hf||1,ph=ev(jd,Yd,gf,$f,vf)||!vf&&ev(jd,Yd,gf,$f,!0)||ev(jd,Yd,gf,-$f,vf)||!vf&&ev(jd,Yd,gf,-$f,!0);return ph||(jd.cantEdit=!0,sg(jd.first,0))}function Cx(jd,Yd,gf,hf){return gf<0&&Yd.ch==0?Yd.line>jd.first?l_(jd,sg(Yd.line-1)):null:gf>0&&Yd.ch==(hf||Mg(jd,Yd.line)).text.length?Yd.line=0;--vf)Ax(jd,{from:hf[vf].from,to:hf[vf].to,text:vf?[""]:Yd.text,origin:Yd.origin});else Ax(jd,Yd)}}function Ax(jd,Yd){if(!(Yd.text.length==1&&Yd.text[0]==""&&Fg(Yd.from,Yd.to)==0)){var gf=BS(jd,Yd);OT(jd,Yd,gf,jd.cm?jd.cm.curOp.id:NaN),Yv(jd,Yd,gf,xv(jd,Yd));var hf=[];JE(jd,function(vf,$f){!$f&&dm(hf,vf.history)==-1&&(Ix(vf.history,Yd),hf.push(vf.history)),Yv(vf,Yd,null,xv(vf,Yd))})}}function e0(jd,Yd,gf){var hf=jd.cm&&jd.cm.state.suppressEdits;if(!(hf&&!gf)){for(var vf=jd.history,$f,ph=jd.sel,Ah=Yd=="undo"?vf.done:vf.undone,Lh=Yd=="undo"?vf.undone:vf.done,Kh=0;Kh=0;--Qm){var ug=Jm(Qm);if(ug)return ug.v}}}}function wx(jd,Yd){if(Yd!=0&&(jd.first+=Yd,jd.sel=new nb(fm(jd.sel.ranges,function(vf){return new L_(sg(vf.anchor.line+Yd,vf.anchor.ch),sg(vf.head.line+Yd,vf.head.ch))}),jd.sel.primIndex),jd.cm)){Wb(jd.cm,jd.first,jd.first-Yd,Yd);for(var gf=jd.cm.display,hf=gf.viewFrom;hfjd.lastLine())){if(Yd.from.line$f&&(Yd={from:Yd.from,to:sg($f,Mg(jd,$f).text.length),text:[Yd.text[0]],origin:Yd.origin}),Yd.removed=q_(jd,Yd.from,Yd.to),gf||(gf=BS(jd,Yd)),jd.cm?PT(jd.cm,Yd,hf):Q0(jd,Yd,hf),$b(jd,gf,Xh),jd.cantEdit&&tv(jd,sg(jd.firstLine(),0))&&(jd.cantEdit=!1)}}function PT(jd,Yd,gf){var hf=jd.doc,vf=jd.display,$f=Yd.from,ph=Yd.to,Ah=!1,Lh=$f.line;jd.options.lineWrapping||(Lh=qh(j_(Mg(hf,$f.line))),hf.iter(Lh,ph.line+1,function(Qm){if(Qm==vf.maxLine)return Ah=!0,!0})),hf.sel.contains(Yd.from,Yd.to)>-1&&d_(jd),Q0(hf,Yd,gf,ox(jd)),jd.options.lineWrapping||(hf.iter(Lh,$f.line+Yd.text.length,function(Qm){var ug=qE(Qm);ug>vf.maxLineLength&&(vf.maxLine=Qm,vf.maxLineLength=ug,vf.maxLineChanged=!0,Ah=!1)}),Ah&&(jd.curOp.updateMaxLine=!0)),B0(hf,$f.line),qv(jd,400);var Kh=Yd.text.length-(ph.line-$f.line)-1;Yd.full?Wb(jd):$f.line==ph.line&&Yd.text.length==1&&!X0(jd.doc,Yd)?zE(jd,$f.line,"text"):Wb(jd,$f.line,ph.line+1,Kh);var Om=o_(jd,"changes"),Hm=o_(jd,"change");if(Hm||Om){var Jm={from:$f,to:ph,text:Yd.text,removed:Yd.removed,origin:Yd.origin};Hm&&Zd(jd,"change",jd,Jm),Om&&(jd.curOp.changeObjs||(jd.curOp.changeObjs=[])).push(Jm)}jd.display.selForContextMenu=null}function w0(jd,Yd,gf,hf,vf){var $f;hf||(hf=gf),Fg(hf,gf)<0&&($f=[hf,gf],gf=$f[0],hf=$f[1]),typeof Yd=="string"&&(Yd=jd.splitLines(Yd)),rv(jd,{from:gf,to:hf,text:Yd,origin:vf})}function Dx(jd,Yd,gf,hf){gf1||!(this.children[0]instanceof D0))){var Ah=[];this.collapse(Ah),this.children=[new D0(Ah)],this.children[0].parent=this}},collapse:function(jd){for(var Yd=0;Yd50){for(var ph=vf.lines.length%25+25,Ah=ph;Ah10);jd.parent.maybeSpill()}},iterN:function(jd,Yd,gf){for(var hf=0;hfjd.display.maxLineLength&&(jd.display.maxLine=Kh,jd.display.maxLineLength=Om,jd.display.maxLineChanged=!0)}hf!=null&&jd&&this.collapsed&&Wb(jd,hf,vf+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,jd&&Tx(jd.doc)),jd&&Zd(jd,"markerCleared",jd,this,hf,vf),Yd&&x0(jd),this.parent&&this.parent.clear()}},oE.prototype.find=function(jd,Yd){jd==null&&this.type=="bookmark"&&(jd=1);for(var gf,hf,vf=0;vf0||ph==0&&$f.clearWhenEmpty!==!1)return $f;if($f.replacedWith&&($f.collapsed=!0,$f.widgetNode=wf("span",[$f.replacedWith],"CodeMirror-widget"),hf.handleMouseEvents||$f.widgetNode.setAttribute("cm-ignore-events","true"),hf.insertLeft&&($f.widgetNode.insertLeft=!0)),$f.collapsed){if(wv(jd,Yd.line,Yd,gf,$f)||Yd.line!=gf.line&&wv(jd,gf.line,Yd,gf,$f))throw new Error("Inserting collapsed marker partially overlapping an existing one");Fy()}$f.addToHistory&&OT(jd,{from:Yd,to:gf,origin:"markText"},jd.sel,NaN);var Ah=Yd.line,Lh=jd.cm,Kh;if(jd.iter(Ah,gf.line+1,function(Hm){Lh&&$f.collapsed&&!Lh.options.lineWrapping&&j_(Hm)==Lh.display.maxLine&&(Kh=!0),$f.collapsed&&Ah!=Yd.line&&a_(Hm,0),Sv(Hm,new IE($f,Ah==Yd.line?Yd.ch:null,Ah==gf.line?gf.ch:null),jd.cm&&jd.cm.curOp),++Ah}),$f.collapsed&&jd.iter(Yd.line,gf.line+1,function(Hm){ob(jd,Hm)&&a_(Hm,0)}),$f.clearOnEnter&&ig($f,"beforeCursorEnter",function(){return $f.clear()}),$f.readOnly&&(Xb(),(jd.history.done.length||jd.history.undone.length)&&jd.clearHistory()),$f.collapsed&&($f.id=++BT,$f.atomic=!0),Lh){if(Kh&&(Lh.curOp.updateMaxLine=!0),$f.collapsed)Wb(Lh,Yd.line,gf.line+1);else if($f.className||$f.startStyle||$f.endStyle||$f.css||$f.attributes||$f.title)for(var Om=Yd.line;Om<=gf.line;Om++)zE(Lh,Om,"text");$f.atomic&&Tx(Lh.doc),Zd(Lh,"markerAdded",Lh,$f)}return $f}var ov=function(jd,Yd){this.markers=jd,this.primary=Yd;for(var gf=0;gf=0;Lh--)rv(this,hf[Lh]);Ah?ZE(this,Ah):this.cm&&Z_(this.cm)}),undo:Ab(function(){e0(this,"undo")}),redo:Ab(function(){e0(this,"redo")}),undoSelection:Ab(function(){e0(this,"undo",!0)}),redoSelection:Ab(function(){e0(this,"redo",!0)}),setExtending:function(jd){this.extend=jd},getExtending:function(){return this.extend},historySize:function(){for(var jd=this.history,Yd=0,gf=0,hf=0;hf=jd.ch)&&Yd.push(vf.marker.parent||vf.marker)}return Yd},findMarks:function(jd,Yd,gf){jd=l_(this,jd),Yd=l_(this,Yd);var hf=[],vf=jd.line;return this.iter(jd.line,Yd.line+1,function($f){var ph=$f.markedSpans;if(ph)for(var Ah=0;Ah=Lh.to||Lh.from==null&&vf!=jd.line||Lh.from!=null&&vf==Yd.line&&Lh.from>=Yd.ch)&&(!gf||gf(Lh.marker))&&hf.push(Lh.marker.parent||Lh.marker)}++vf}),hf},getAllMarks:function(){var jd=[];return this.iter(function(Yd){var gf=Yd.markedSpans;if(gf)for(var hf=0;hfjd)return Yd=jd,!0;jd-=$f,++gf}),l_(this,sg(gf,Yd))},indexFromPos:function(jd){jd=l_(this,jd);var Yd=jd.ch;if(jd.lineYd&&(Yd=jd.from),jd.to!=null&&jd.to-1){Yd.state.draggingText(jd),setTimeout(function(){return Yd.display.input.focus()},20);return}try{var Om=jd.dataTransfer.getData("Text");if(Om){var Hm;if(Yd.state.draggingText&&!Yd.state.draggingText.copy&&(Hm=Yd.listSelections()),$b(Yd.doc,XE(gf,gf)),Hm)for(var Jm=0;Jm=0;Ah--)w0(jd.doc,"",hf[Ah].from,hf[Ah].to,"+delete");Z_(jd)})}function VS(jd,Yd,gf){var hf=kf(jd.text,Yd+gf,gf);return hf<0||hf>jd.text.length?null:hf}function eS(jd,Yd,gf){var hf=VS(jd,Yd.ch,gf);return hf==null?null:new sg(Yd.line,hf,gf<0?"after":"before")}function tS(jd,Yd,gf,hf,vf){if(jd){Yd.doc.direction=="rtl"&&(vf=-vf);var $f=Km(gf,Yd.doc.direction);if($f){var ph=vf<0?wh($f):$f[0],Ah=vf<0==(ph.level==1),Lh=Ah?"after":"before",Kh;if(ph.level>0||Yd.doc.direction=="rtl"){var Om=Zb(Yd,gf);Kh=vf<0?gf.text.length-1:0;var Hm=ey(Yd,Om,Kh).top;Kh=Rf(function(Jm){return ey(Yd,Om,Jm).top==Hm},vf<0==(ph.level==1)?ph.from:ph.to-1,Kh),Lh=="before"&&(Kh=VS(gf,Kh,1))}else Kh=vf<0?ph.to:ph.from;return new sg(hf,Kh,Lh)}}return new sg(hf,vf<0?gf.text.length:0,vf<0?"before":"after")}function n0(jd,Yd,gf,hf){var vf=Km(Yd,jd.doc.direction);if(!vf)return eS(Yd,gf,hf);gf.ch>=Yd.text.length?(gf.ch=Yd.text.length,gf.sticky="before"):gf.ch<=0&&(gf.ch=0,gf.sticky="after");var $f=Sm(vf,gf.ch,gf.sticky),ph=vf[$f];if(jd.doc.direction=="ltr"&&ph.level%2==0&&(hf>0?ph.to>gf.ch:ph.from=ph.from&&Jm>=Om.begin)){var Qm=Hm?"before":"after";return new sg(gf.line,Jm,Qm)}}var ug=function(Gg,Vg,Ug){for(var Qg=function(G_,ub){return ub?new sg(gf.line,Ah(G_,1),"before"):new sg(gf.line,G_,"after")};Gg>=0&&Gg0==(i_.level!=1),E_=n_?Ug.begin:Ah(Ug.end,-1);if(i_.from<=E_&&E_0?Om.end:Ah(Om.begin,-1);return kg!=null&&!(hf>0&&kg==Yd.text.length)&&(Tg=ug(hf>0?0:vf.length-1,hf,Kh(kg)),Tg)?Tg:null}var nS={selectAll:nv,singleSelection:function(jd){return jd.setSelection(jd.getCursor("anchor"),jd.getCursor("head"),Xh)},killLine:function(jd){return t0(jd,function(Yd){if(Yd.empty()){var gf=Mg(jd.doc,Yd.head.line).text.length;return Yd.head.ch==gf&&Yd.head.line0)vf=new sg(vf.line,vf.ch+1),jd.replaceRange($f.charAt(vf.ch-1)+$f.charAt(vf.ch-2),sg(vf.line,vf.ch-2),vf,"+transpose");else if(vf.line>jd.doc.first){var ph=Mg(jd.doc,vf.line-1).text;ph&&(vf=new sg(vf.line,1),jd.replaceRange($f.charAt(0)+jd.doc.lineSeparator()+ph.charAt(ph.length-1),sg(vf.line-1,ph.length-1),vf,"+transpose"))}}gf.push(new L_(vf,vf))}jd.setSelections(gf)})},newlineAndIndent:function(jd){return Bb(jd,function(){for(var Yd=jd.listSelections(),gf=Yd.length-1;gf>=0;gf--)jd.replaceRange(jd.doc.lineSeparator(),Yd[gf].anchor,Yd[gf].head,"+input");Yd=jd.listSelections();for(var hf=0;hfjd&&Fg(Yd,this.pos)==0&&gf==this.button};var SE,hv;function Ux(jd,Yd){var gf=+new Date;return hv&&hv.compare(gf,jd,Yd)?(SE=hv=null,"triple"):SE&&SE.compare(gf,jd,Yd)?(hv=new fv(gf,jd,Yd),SE=null,"double"):(SE=new fv(gf,jd,Yd),hv=null,"single")}function Hx(jd){var Yd=this,gf=Yd.display;if(!(Wg(Yd,jd)||gf.activeTouch&&gf.input.supportsTouch())){if(gf.input.ensurePolled(),gf.shift=jd.shiftKey,P_(gf,jd)){vd||(gf.scroller.draggable=!1,setTimeout(function(){return gf.scroller.draggable=!0},100));return}if(!gv(Yd,jd)){var hf=mE(Yd,jd),vf=I_(jd),$f=hf?Ux(hf,vf):"single";vh(Yd).focus(),vf==1&&Yd.state.selectingText&&Yd.state.selectingText(jd),!(hf&&Gx(Yd,vf,hf,$f,jd))&&(vf==1?hf?iS(Yd,hf,$f,jd):eb(jd)==gf.scroller&&t_(jd):vf==2?(hf&&Z0(Yd.doc,hf),setTimeout(function(){return gf.input.focus()},20)):vf==3&&(mf?Yd.display.input.onContextMenu(jd):W0(Yd)))}}}function Gx(jd,Yd,gf,hf,vf){var $f="Click";return hf=="double"?$f="Double"+$f:hf=="triple"&&($f="Triple"+$f),$f=(Yd==1?"Left":Yd==2?"Middle":"Right")+$f,rS(jd,UT($f,vf),vf,function(ph){if(typeof ph=="string"&&(ph=nS[ph]),!ph)return!1;var Ah=!1;try{jd.isReadOnly()&&(jd.state.suppressEdits=!0),Ah=ph(jd,gf)!=oh}finally{jd.state.suppressEdits=!1}return Ah})}function mv(jd,Yd,gf){var hf=jd.getOption("configureMouse"),vf=hf?hf(jd,Yd,gf):{};if(vf.unit==null){var $f=Xd?gf.shiftKey&&gf.metaKey:gf.altKey;vf.unit=$f?"rectangle":Yd=="single"?"char":Yd=="double"?"word":"line"}return(vf.extend==null||jd.doc.extend)&&(vf.extend=jd.doc.extend||gf.shiftKey),vf.addNew==null&&(vf.addNew=Kd?gf.metaKey:gf.ctrlKey),vf.moveOnDrag==null&&(vf.moveOnDrag=!(Kd?gf.altKey:gf.ctrlKey)),vf}function iS(jd,Yd,gf,hf){gd?setTimeout(Df(YE,jd),0):jd.curOp.focus=xh(fh(jd));var vf=mv(jd,gf,hf),$f=jd.doc.sel,ph;jd.options.dragDrop&&$_&&!jd.isReadOnly()&&gf=="single"&&(ph=$f.contains(Yd))>-1&&(Fg((ph=$f.ranges[ph]).from(),Yd)<0||Yd.xRel>0)&&(Fg(ph.to(),Yd)>0||Yd.xRel<0)?O1(jd,hf,Yd,vf):qx(jd,hf,Yd,vf)}function O1(jd,Yd,gf,hf){var vf=jd.display,$f=!1,ph=U_(jd,function(Kh){vd&&(vf.scroller.draggable=!1),jd.state.draggingText=!1,jd.state.delayingBlurEvent&&(jd.hasFocus()?jd.state.delayingBlurEvent=!1:W0(jd)),vg(vf.wrapper.ownerDocument,"mouseup",ph),vg(vf.wrapper.ownerDocument,"mousemove",Ah),vg(vf.scroller,"dragstart",Lh),vg(vf.scroller,"drop",ph),$f||(t_(Kh),hf.addNew||Z0(jd.doc,gf,null,null,hf.extend),vd&&!Hd||gd&&yd==9?setTimeout(function(){vf.wrapper.ownerDocument.body.focus({preventScroll:!0}),vf.input.focus()},20):vf.input.focus())}),Ah=function(Kh){$f=$f||Math.abs(Yd.clientX-Kh.clientX)+Math.abs(Yd.clientY-Kh.clientY)>=10},Lh=function(){return $f=!0};vd&&(vf.scroller.draggable=!0),jd.state.draggingText=ph,ph.copy=!hf.moveOnDrag,ig(vf.wrapper.ownerDocument,"mouseup",ph),ig(vf.wrapper.ownerDocument,"mousemove",Ah),ig(vf.scroller,"dragstart",Lh),ig(vf.scroller,"drop",ph),jd.state.delayingBlurEvent=!0,setTimeout(function(){return vf.input.focus()},20),vf.scroller.dragDrop&&vf.scroller.dragDrop()}function zT(jd,Yd,gf){if(gf=="char")return new L_(Yd,Yd);if(gf=="word")return jd.findWordAt(Yd);if(gf=="line")return new L_(sg(Yd.line,0),l_(jd.doc,sg(Yd.line+1,0)));var hf=gf(jd,Yd);return new L_(hf.from,hf.to)}function qx(jd,Yd,gf,hf){gd&&W0(jd);var vf=jd.display,$f=jd.doc;t_(Yd);var ph,Ah,Lh=$f.sel,Kh=Lh.ranges;if(hf.addNew&&!hf.extend?(Ah=$f.sel.contains(gf),Ah>-1?ph=Kh[Ah]:ph=new L_(gf,gf)):(ph=$f.sel.primary(),Ah=$f.sel.primIndex),hf.unit=="rectangle")hf.addNew||(ph=new L_(gf,gf)),gf=mE(jd,Yd,!0,!0),Ah=-1;else{var Om=zT(jd,gf,hf.unit);hf.extend?ph=wb(ph,Om.anchor,Om.head,hf.extend):ph=Om}hf.addNew?Ah==-1?(Ah=Kh.length,Mb($f,iE(jd,Kh.concat([ph]),Ah),{scroll:!1,origin:"*mouse"})):Kh.length>1&&Kh[Ah].empty()&&hf.unit=="char"&&!hf.extend?(Mb($f,iE(jd,Kh.slice(0,Ah).concat(Kh.slice(Ah+1)),0),{scroll:!1,origin:"*mouse"}),Lh=$f.sel):Oy($f,Ah,ph,Tm):(Ah=0,Mb($f,new nb([ph],0),Tm),Lh=$f.sel);var Hm=gf;function Jm(Ug){if(Fg(Hm,Ug)!=0)if(Hm=Ug,hf.unit=="rectangle"){for(var Qg=[],i_=jd.options.tabSize,n_=_h(Mg($f,gf.line).text,gf.ch,i_),E_=_h(Mg($f,Ug.line).text,Ug.ch,i_),G_=Math.min(n_,E_),ub=Math.max(n_,E_),J_=Math.min(gf.line,Ug.line),rb=Math.min(jd.lastLine(),Math.max(gf.line,Ug.line));J_<=rb;J_++){var hb=Mg($f,J_).text,mb=Zf(hb,G_,i_);G_==ub?Qg.push(new L_(sg(J_,mb),sg(J_,mb))):hb.length>mb&&Qg.push(new L_(sg(J_,mb),sg(J_,Zf(hb,ub,i_))))}Qg.length||Qg.push(new L_(gf,gf)),Mb($f,iE(jd,Lh.ranges.slice(0,Ah).concat(Qg),Ah),{origin:"*mouse",scroll:!1}),jd.scrollIntoView(Ug)}else{var Gb=ph,Pb=zT(jd,Ug,hf.unit),vb=Gb.anchor,gb;Fg(Pb.anchor,vb)>0?(gb=Pb.head,vb=jb(Gb.from(),Pb.anchor)):(gb=Pb.anchor,vb=sb(Gb.to(),Pb.head));var ib=Lh.ranges.slice(0);ib[Ah]=WS(jd,new L_(l_($f,vb),gb)),Mb($f,iE(jd,ib,Ah),Tm)}}var Qm=vf.wrapper.getBoundingClientRect(),ug=0;function Tg(Ug){var Qg=++ug,i_=mE(jd,Ug,!0,hf.unit=="rectangle");if(i_)if(Fg(i_,Hm)!=0){jd.curOp.focus=xh(fh(jd)),Jm(i_);var n_=E0(vf,$f);(i_.line>=n_.to||i_.lineQm.bottom?20:0;E_&&setTimeout(U_(jd,function(){ug==Qg&&(vf.scroller.scrollTop+=E_,Tg(Ug))}),50)}}function kg(Ug){jd.state.selectingText=!1,ug=1/0,Ug&&(t_(Ug),vf.input.focus()),vg(vf.wrapper.ownerDocument,"mousemove",Gg),vg(vf.wrapper.ownerDocument,"mouseup",Vg),$f.history.lastSelOrigin=null}var Gg=U_(jd,function(Ug){Ug.buttons===0||!I_(Ug)?kg(Ug):Tg(Ug)}),Vg=U_(jd,kg);jd.state.selectingText=Vg,ig(vf.wrapper.ownerDocument,"mousemove",Gg),ig(vf.wrapper.ownerDocument,"mouseup",Vg)}function WS(jd,Yd){var gf=Yd.anchor,hf=Yd.head,vf=Mg(jd.doc,gf.line);if(Fg(gf,hf)==0&&gf.sticky==hf.sticky)return Yd;var $f=Km(vf);if(!$f)return Yd;var ph=Sm($f,gf.ch,gf.sticky),Ah=$f[ph];if(Ah.from!=gf.ch&&Ah.to!=gf.ch)return Yd;var Lh=ph+(Ah.from==gf.ch==(Ah.level!=1)?0:1);if(Lh==0||Lh==$f.length)return Yd;var Kh;if(hf.line!=gf.line)Kh=(hf.line-gf.line)*(jd.doc.direction=="ltr"?1:-1)>0;else{var Om=Sm($f,hf.ch,hf.sticky),Hm=Om-ph||(hf.ch-gf.ch)*(Ah.level==1?-1:1);Om==Lh-1||Om==Lh?Kh=Hm<0:Kh=Hm>0}var Jm=$f[Lh+(Kh?-1:0)],Qm=Kh==(Jm.level==1),ug=Qm?Jm.from:Jm.to,Tg=Qm?"after":"before";return gf.ch==ug&&gf.sticky==Tg?Yd:new L_(new sg(gf.line,ug,Tg),hf)}function WT(jd,Yd,gf,hf){var vf,$f;if(Yd.touches)vf=Yd.touches[0].clientX,$f=Yd.touches[0].clientY;else try{vf=Yd.clientX,$f=Yd.clientY}catch{return!1}if(vf>=Math.floor(jd.display.gutters.getBoundingClientRect().right))return!1;hf&&t_(Yd);var ph=jd.display,Ah=ph.lineDiv.getBoundingClientRect();if($f>Ah.bottom||!o_(jd,gf))return v_(Yd);$f-=Ah.top-ph.viewOffset;for(var Lh=0;Lh=vf){var Om=Pm(jd.doc,$f),Hm=jd.display.gutterSpecs[Lh];return Og(jd,gf,jd,Om,Hm.className,Yd),v_(Yd)}}}function gv(jd,Yd){return WT(jd,Yd,"gutterClick",!0)}function YS(jd,Yd){P_(jd.display,Yd)||KS(jd,Yd)||Wg(jd,Yd,"contextmenu")||mf||jd.display.input.onContextMenu(Yd)}function KS(jd,Yd){return o_(jd,"gutterContextMenu")?WT(jd,Yd,"gutterContextMenu",!1):!1}function Vx(jd){jd.display.wrapper.className=jd.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+jd.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bv(jd)}var O0={toString:function(){return"CodeMirror.Init"}},sS={},oS={};function YT(jd){var Yd=jd.optionHandlers;function gf(hf,vf,$f,ph){jd.defaults[hf]=vf,$f&&(Yd[hf]=ph?function(Ah,Lh,Kh){Kh!=O0&&$f(Ah,Lh,Kh)}:$f)}jd.defineOption=gf,jd.Init=O0,gf("value","",function(hf,vf){return hf.setValue(vf)},!0),gf("mode",null,function(hf,vf){hf.doc.modeOption=vf,IT(hf)},!0),gf("indentUnit",2,IT,!0),gf("indentWithTabs",!1),gf("smartIndent",!0),gf("tabSize",4,function(hf){C0(hf),Bv(hf),Wb(hf)},!0),gf("lineSeparator",null,function(hf,vf){if(hf.doc.lineSep=vf,!!vf){var $f=[],ph=hf.doc.first;hf.doc.iter(function(Lh){for(var Kh=0;;){var Om=Lh.text.indexOf(vf,Kh);if(Om==-1)break;Kh=Om+vf.length,$f.push(sg(ph,Om))}ph++});for(var Ah=$f.length-1;Ah>=0;Ah--)w0(hf.doc,vf,$f[Ah],sg($f[Ah].line,$f[Ah].ch+vf.length))}}),gf("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(hf,vf,$f){hf.state.specialChars=new RegExp(vf.source+(vf.test(" ")?"":"| "),"g"),$f!=O0&&hf.refresh()}),gf("specialCharPlaceholder",fE,function(hf){return hf.refresh()},!0),gf("electricChars",!0),gf("inputStyle",Wd?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),gf("spellcheck",!1,function(hf,vf){return hf.getInputField().spellcheck=vf},!0),gf("autocorrect",!1,function(hf,vf){return hf.getInputField().autocorrect=vf},!0),gf("autocapitalize",!1,function(hf,vf){return hf.getInputField().autocapitalize=vf},!0),gf("rtlMoveVisually",!df),gf("wholeLineUpdateBefore",!0),gf("theme","default",function(hf){Vx(hf),Vv(hf)},!0),gf("keyMap","default",function(hf,vf,$f){var ph=Zv(vf),Ah=$f!=O0&&Zv($f);Ah&&Ah.detach&&Ah.detach(hf,ph),ph.attach&&ph.attach(hf,Ah||null)}),gf("extraKeys",null),gf("configureMouse",null),gf("lineWrapping",!1,zx,!0),gf("gutters",[],function(hf,vf){hf.display.gutterSpecs=rE(vf,hf.options.lineNumbers),Vv(hf)},!0),gf("fixedGutter",!0,function(hf,vf){hf.display.gutters.style.left=vf?F_(hf.display)+"px":"0",hf.refresh()},!0),gf("coverGutterNextToScrollbar",!1,function(hf){return gE(hf)},!0),gf("scrollbarStyle","native",function(hf){dx(hf),gE(hf),hf.display.scrollbars.setScrollTop(hf.doc.scrollTop),hf.display.scrollbars.setScrollLeft(hf.doc.scrollLeft)},!0),gf("lineNumbers",!1,function(hf,vf){hf.display.gutterSpecs=rE(hf.options.gutters,vf),Vv(hf)},!0),gf("firstLineNumber",1,Vv,!0),gf("lineNumberFormatter",function(hf){return hf},Vv,!0),gf("showCursorWhenSelecting",!1,WE,!0),gf("resetSelectionOnContextMenu",!0),gf("lineWiseCopyCut",!0),gf("pasteLinesPerSelection",!0),gf("selectionsMayTouch",!1),gf("readOnly",!1,function(hf,vf){vf=="nocursor"&&(Y0(hf),hf.display.input.blur()),hf.display.input.readOnlyChanged(vf)}),gf("screenReaderLabel",null,function(hf,vf){vf=vf===""?null:vf,hf.display.input.screenReaderLabelChanged(vf)}),gf("disableInput",!1,function(hf,vf){vf||hf.display.input.reset()},!0),gf("dragDrop",!0,k1),gf("allowDropFileTypes",null),gf("cursorBlinkRate",530),gf("cursorScrollMargin",0),gf("cursorHeight",1,WE,!0),gf("singleCursorHeightPerLine",!0,WE,!0),gf("workTime",100),gf("workDelay",100),gf("flattenSpans",!0,C0,!0),gf("addModeClass",!1,C0,!0),gf("pollInterval",100),gf("undoDepth",200,function(hf,vf){return hf.doc.history.undoDepth=vf}),gf("historyEventDelay",1250),gf("viewportMargin",10,function(hf){return hf.refresh()},!0),gf("maxHighlightLength",1e4,C0,!0),gf("moveInputWithCursor",!0,function(hf,vf){vf||hf.display.input.resetPosition()}),gf("tabindex",null,function(hf,vf){return hf.display.input.getField().tabIndex=vf||""}),gf("autofocus",null),gf("direction","ltr",function(hf,vf){return hf.doc.setDirection(vf)},!0),gf("phrases",null)}function k1(jd,Yd,gf){var hf=gf&&gf!=O0;if(!Yd!=!hf){var vf=jd.display.dragFunctions,$f=Yd?ig:vg;$f(jd.display.scroller,"dragstart",vf.start),$f(jd.display.scroller,"dragenter",vf.enter),$f(jd.display.scroller,"dragover",vf.over),$f(jd.display.scroller,"dragleave",vf.leave),$f(jd.display.scroller,"drop",vf.drop)}}function zx(jd){jd.options.lineWrapping?(Eh(jd.display.wrapper,"CodeMirror-wrap"),jd.display.sizer.style.minWidth="",jd.display.sizerWidth=null):(xf(jd.display.wrapper,"CodeMirror-wrap"),j0(jd)),IS(jd),Wb(jd),Bv(jd),setTimeout(function(){return gE(jd)},100)}function k_(jd,Yd){var gf=this;if(!(this instanceof k_))return new k_(jd,Yd);this.options=Yd=Yd?Af(Yd):{},Af(sS,Yd,!1);var hf=Yd.value;typeof hf=="string"?hf=new Hb(hf,Yd.mode,null,Yd.lineSeparator,Yd.direction):Yd.mode&&(hf.modeOption=Yd.mode),this.doc=hf;var vf=new k_.inputStyles[Yd.inputStyle](this),$f=this.display=new y1(jd,hf,vf,Yd);$f.wrapper.CodeMirror=this,Vx(this),Yd.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),dx(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 Nh,keySeq:null,specialChars:null},Yd.autofocus&&!Wd&&$f.input.focus(),gd&&yd<11&&setTimeout(function(){return gf.display.input.reset(!0)},20),Wx(this),Lx(),T0(this),this.curOp.forceUpdate=!0,RT(this,hf),Yd.autofocus&&!Wd||this.hasFocus()?setTimeout(function(){gf.hasFocus()&&!gf.state.focused&&vT(gf)},20):Y0(this);for(var ph in oS)oS.hasOwnProperty(ph)&&oS[ph](this,Yd[ph],O0);mx(this),Yd.finishInit&&Yd.finishInit(this);for(var Ah=0;Ah20*20}ig(Yd.scroller,"touchstart",function(Lh){if(!Wg(jd,Lh)&&!$f(Lh)&&!gv(jd,Lh)){Yd.input.ensurePolled(),clearTimeout(gf);var Kh=+new Date;Yd.activeTouch={start:Kh,moved:!1,prev:Kh-hf.end<=300?hf:null},Lh.touches.length==1&&(Yd.activeTouch.left=Lh.touches[0].pageX,Yd.activeTouch.top=Lh.touches[0].pageY)}}),ig(Yd.scroller,"touchmove",function(){Yd.activeTouch&&(Yd.activeTouch.moved=!0)}),ig(Yd.scroller,"touchend",function(Lh){var Kh=Yd.activeTouch;if(Kh&&!P_(Yd,Lh)&&Kh.left!=null&&!Kh.moved&&new Date-Kh.start<300){var Om=jd.coordsChar(Yd.activeTouch,"page"),Hm;!Kh.prev||ph(Kh,Kh.prev)?Hm=new L_(Om,Om):!Kh.prev.prev||ph(Kh,Kh.prev.prev)?Hm=jd.findWordAt(Om):Hm=new L_(sg(Om.line,0),l_(jd.doc,sg(Om.line+1,0))),jd.setSelection(Hm.anchor,Hm.head),jd.focus(),t_(Lh)}vf()}),ig(Yd.scroller,"touchcancel",vf),ig(Yd.scroller,"scroll",function(){Yd.scroller.clientHeight&&(Uv(jd,Yd.scroller.scrollTop),tE(jd,Yd.scroller.scrollLeft,!0),Og(jd,"scroll",jd))}),ig(Yd.scroller,"mousewheel",function(Lh){return _x(jd,Lh)}),ig(Yd.scroller,"DOMMouseScroll",function(Lh){return _x(jd,Lh)}),ig(Yd.wrapper,"scroll",function(){return Yd.wrapper.scrollTop=Yd.wrapper.scrollLeft=0}),Yd.dragFunctions={enter:function(Lh){Wg(jd,Lh)||X_(Lh)},over:function(Lh){Wg(jd,Lh)||(T_(jd,Lh),X_(Lh))},start:function(Lh){return jT(jd,Lh)},drop:U_(jd,C1),leave:function(Lh){Wg(jd,Lh)||$x(jd)}};var Ah=Yd.input.getField();ig(Ah,"keyup",function(Lh){return lE.call(jd,Lh)}),ig(Ah,"keydown",U_(jd,VT)),ig(Ah,"keypress",U_(jd,jx)),ig(Ah,"focus",function(Lh){return vT(jd,Lh)}),ig(Ah,"blur",function(Lh){return Y0(jd,Lh)})}var XS=[];k_.defineInitHook=function(jd){return XS.push(jd)};function lS(jd,Yd,gf,hf){var vf=jd.doc,$f;gf==null&&(gf="add"),gf=="smart"&&(vf.mode.indent?$f=xb(jd,Yd).state:gf="prev");var ph=jd.options.tabSize,Ah=Mg(vf,Yd),Lh=_h(Ah.text,null,ph);Ah.stateAfter&&(Ah.stateAfter=null);var Kh=Ah.text.match(/^\s*/)[0],Om;if(!hf&&!/\S/.test(Ah.text))Om=0,gf="not";else if(gf=="smart"&&(Om=vf.mode.indent($f,Ah.text.slice(Kh.length),Ah.text),Om==oh||Om>150)){if(!hf)return;gf="prev"}gf=="prev"?Yd>vf.first?Om=_h(Mg(vf,Yd-1).text,null,ph):Om=0:gf=="add"?Om=Lh+jd.options.indentUnit:gf=="subtract"?Om=Lh-jd.options.indentUnit:typeof gf=="number"&&(Om=Lh+gf),Om=Math.max(0,Om);var Hm="",Jm=0;if(jd.options.indentWithTabs)for(var Qm=Math.floor(Om/ph);Qm;--Qm)Jm+=ph,Hm+=" ";if(Jmph,Lh=nh(Yd),Kh=null;if(Ah&&hf.ranges.length>1)if(My&&My.text.join(` -`)==Yd){if(hf.ranges.length%My.text.length==0){Kh=[];for(var Om=0;Om=0;Jm--){var Qm=hf.ranges[Jm],ug=Qm.from(),Tg=Qm.to();Qm.empty()&&(gf&&gf>0?ug=sg(ug.line,ug.ch-gf):jd.state.overwrite&&!Ah?Tg=sg(Tg.line,Math.min(Mg($f,Tg.line).text.length,Tg.ch+wh(Lh).length)):Ah&&My&&My.lineWise&&My.text.join(` -`)==Lh.join(` -`)&&(ug=Tg=sg(ug.line,0)));var kg={from:ug,to:Tg,text:Kh?Kh[Jm%Kh.length]:Lh,origin:vf||(Ah?"paste":jd.state.cutIncoming>ph?"cut":"+input")};rv(jd.doc,kg),Zd(jd,"inputRead",jd,kg)}Yd&&!Ah&&JS(jd,Yd),Z_(jd),jd.curOp.updateInput<2&&(jd.curOp.updateInput=Hm),jd.curOp.typing=!0,jd.state.pasteIncoming=jd.state.cutIncoming=-1}function TE(jd,Yd){var gf=jd.clipboardData&&jd.clipboardData.getData("Text");if(gf)return jd.preventDefault(),!Yd.isReadOnly()&&!Yd.options.disableInput&&Yd.hasFocus()&&Bb(Yd,function(){return KT(Yd,gf,0,null,"paste")}),!0}function JS(jd,Yd){if(!(!jd.options.electricChars||!jd.options.smartIndent))for(var gf=jd.doc.sel,hf=gf.ranges.length-1;hf>=0;hf--){var vf=gf.ranges[hf];if(!(vf.head.ch>100||hf&&gf.ranges[hf-1].head.line==vf.head.line)){var $f=jd.getModeAt(vf.head),ph=!1;if($f.electricChars){for(var Ah=0;Ah<$f.electricChars.length;Ah++)if(Yd.indexOf($f.electricChars.charAt(Ah))>-1){ph=lS(jd,vf.head.line,"smart");break}}else $f.electricInput&&$f.electricInput.test(Mg(jd.doc,vf.head.line).text.slice(0,vf.head.ch))&&(ph=lS(jd,vf.head.line,"smart"));ph&&Zd(jd,"electricInput",jd,vf.head.line)}}}function ZS(jd){for(var Yd=[],gf=[],hf=0;hf$f&&(lS(this,Ah.head.line,hf,!0),$f=Ah.head.line,ph==this.doc.sel.primIndex&&Z_(this));else{var Lh=Ah.from(),Kh=Ah.to(),Om=Math.max($f,Lh.line);$f=Math.min(this.lastLine(),Kh.line-(Kh.ch?0:1))+1;for(var Hm=Om;Hm<$f;++Hm)lS(this,Hm,hf);var Jm=this.doc.sel.ranges;Lh.ch==0&&vf.length==Jm.length&&Jm[ph].from().ch>0&&Oy(this.doc,ph,new L_(Lh,Jm[ph].to()),Xh)}}}),getTokenAt:function(hf,vf){return HE(this,hf,vf)},getLineTokens:function(hf,vf){return HE(this,sg(hf),vf,!0)},getTokenTypeAt:function(hf){hf=l_(this.doc,hf);var vf=pE(this,Mg(this.doc,hf.line)),$f=0,ph=(vf.length-1)/2,Ah=hf.ch,Lh;if(Ah==0)Lh=vf[2];else for(;;){var Kh=$f+ph>>1;if((Kh?vf[Kh*2-1]:0)>=Ah)ph=Kh;else if(vf[Kh*2+1]Lh&&(hf=Lh,ph=!0),Ah=Mg(this.doc,hf)}else Ah=hf;return OE(this,Ah,{top:0,left:0},vf||"page",$f||ph).top+(ph?this.doc.height-Ay(Ah):0)},defaultTextHeight:function(){return Vy(this.display)},defaultCharWidth:function(){return kE(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(hf,vf,$f,ph,Ah){var Lh=this.display;hf=lg(this,l_(this.doc,hf));var Kh=hf.bottom,Om=hf.left;if(vf.style.position="absolute",vf.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(vf),Lh.sizer.appendChild(vf),ph=="over")Kh=hf.top;else if(ph=="above"||ph=="near"){var Hm=Math.max(Lh.wrapper.clientHeight,this.doc.height),Jm=Math.max(Lh.sizer.clientWidth,Lh.lineSpace.clientWidth);(ph=="above"||hf.bottom+vf.offsetHeight>Hm)&&hf.top>vf.offsetHeight?Kh=hf.top-vf.offsetHeight:hf.bottom+vf.offsetHeight<=Hm&&(Kh=hf.bottom),Om+vf.offsetWidth>Jm&&(Om=Jm-vf.offsetWidth)}vf.style.top=Kh+"px",vf.style.left=vf.style.right="",Ah=="right"?(Om=Lh.sizer.clientWidth-vf.offsetWidth,vf.style.right="0px"):(Ah=="left"?Om=0:Ah=="middle"&&(Om=(Lh.sizer.clientWidth-vf.offsetWidth)/2),vf.style.left=Om+"px"),$f&&ux(this,{left:Om,top:Kh,right:Om+vf.offsetWidth,bottom:Kh+vf.offsetHeight})},triggerOnKeyDown:c_(VT),triggerOnKeyPress:c_(jx),triggerOnKeyUp:lE,triggerOnMouseDown:c_(Hx),execCommand:function(hf){if(nS.hasOwnProperty(hf))return nS[hf].call(null,this)},triggerElectric:c_(function(hf){JS(this,hf)}),findPosH:function(hf,vf,$f,ph){var Ah=1;vf<0&&(Ah=-1,vf=-vf);for(var Lh=l_(this.doc,hf),Kh=0;Kh0&&Om($f.charAt(ph-1));)--ph;for(;Ah<$f.length&&Om($f.charAt(Ah));)++Ah}return new L_(sg(hf.line,ph),sg(hf.line,Ah))},toggleOverwrite:function(hf){hf!=null&&hf==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Eh(this.display.cursorDiv,"CodeMirror-overwrite"):xf(this.display.cursorDiv,"CodeMirror-overwrite"),Og(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==xh(fh(this))},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:c_(function(hf,vf){Eb(this,hf,vf)}),getScrollInfo:function(){var hf=this.display.scroller;return{left:hf.scrollLeft,top:hf.scrollTop,height:hf.scrollHeight-hE(this)-this.display.barHeight,width:hf.scrollWidth-hE(this)-this.display.barWidth,clientHeight:hT(this),clientWidth:m0(this)}},scrollIntoView:c_(function(hf,vf){hf==null?(hf={from:this.doc.sel.primary().head,to:null},vf==null&&(vf=this.options.cursorScrollMargin)):typeof hf=="number"?hf={from:sg(hf,0),to:null}:hf.from==null&&(hf={from:hf,to:null}),hf.to||(hf.to=hf.from),hf.margin=vf||0,hf.from.line!=null?d1(this,hf):CT(this,hf.from,hf.to,hf.margin)}),setSize:c_(function(hf,vf){var $f=this,ph=function(Lh){return typeof Lh=="number"||/^\d+$/.test(String(Lh))?Lh+"px":Lh};hf!=null&&(this.display.wrapper.style.width=ph(hf)),vf!=null&&(this.display.wrapper.style.height=ph(vf)),this.options.lineWrapping&&rx(this);var Ah=this.display.viewFrom;this.doc.iter(Ah,this.display.viewTo,function(Lh){if(Lh.widgets){for(var Kh=0;Kh.5||this.options.lineWrapping)&&IS(this),Og(this,"refresh",this)}),swapDoc:c_(function(hf){var vf=this.doc;return vf.cm=null,this.state.selectingText&&this.state.selectingText(),RT(this,hf),Bv(this),this.display.input.reset(),Eb(this,hf.scrollLeft,hf.scrollTop),this.curOp.forceScroll=!0,Zd(this,"swapDoc",this,vf),vf}),phrase:function(hf){var vf=this.options.phrases;return vf&&Object.prototype.hasOwnProperty.call(vf,hf)?vf[hf]:hf},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}},y_(jd),jd.registerHelper=function(hf,vf,$f){gf.hasOwnProperty(hf)||(gf[hf]=jd[hf]={_global:[]}),gf[hf][vf]=$f},jd.registerGlobalHelper=function(hf,vf,$f,ph){jd.registerHelper(hf,vf,ph),gf[hf]._global.push({pred:$f,val:ph})}}function u_(jd,Yd,gf,hf,vf){var $f=Yd,ph=gf,Ah=Mg(jd,Yd.line),Lh=vf&&jd.direction=="rtl"?-gf:gf;function Kh(){var Vg=Yd.line+Lh;return Vg=jd.first+jd.size?!1:(Yd=new sg(Vg,Yd.ch,Yd.sticky),Ah=Mg(jd,Vg))}function Om(Vg){var Ug;if(hf=="codepoint"){var Qg=Ah.text.charCodeAt(Yd.ch+(gf>0?0:-1));if(isNaN(Qg))Ug=null;else{var i_=gf>0?Qg>=55296&&Qg<56320:Qg>=56320&&Qg<57343;Ug=new sg(Yd.line,Math.max(0,Math.min(Ah.text.length,Yd.ch+gf*(i_?2:1))),-gf)}}else vf?Ug=n0(jd.cm,Ah,Yd,gf):Ug=eS(Ah,Yd,gf);if(Ug==null)if(!Vg&&Kh())Yd=tS(vf,jd.cm,Ah,Yd.line,Lh);else return!1;else Yd=Ug;return!0}if(hf=="char"||hf=="codepoint")Om();else if(hf=="column")Om(!0);else if(hf=="word"||hf=="group")for(var Hm=null,Jm=hf=="group",Qm=jd.cm&&jd.cm.getHelper(Yd,"wordChars"),ug=!0;!(gf<0&&!Om(!ug));ug=!1){var Tg=Ah.text.charAt(Yd.ch)||` -`,kg=Ym(Tg,Qm)?"w":Jm&&Tg==` -`?"n":!Jm||/\s/.test(Tg)?null:"p";if(Jm&&!ug&&!kg&&(kg="s"),Hm&&Hm!=kg){gf<0&&(gf=1,Om(),Yd.sticky="after");break}if(kg&&(Hm=kg),gf>0&&!Om(!ug))break}var Gg=tv(jd,Yd,$f,ph,!0);return b_($f,Gg)&&(Gg.hitSide=!0),Gg}function dS(jd,Yd,gf,hf){var vf=jd.doc,$f=Yd.left,ph;if(hf=="page"){var Ah=Math.min(jd.display.wrapper.clientHeight,vh(jd).innerHeight||vf(jd).documentElement.clientHeight),Lh=Math.max(Ah-.5*Vy(jd.display),3);ph=(gf>0?Yd.bottom:Yd.top)+gf*Lh}else hf=="line"&&(ph=gf>0?Yd.bottom+3:Yd.top-3);for(var Kh;Kh=O_(jd,$f,ph),!!Kh.outside;){if(gf<0?ph<=0:ph>=vf.height){Kh.hitSide=!0;break}ph+=gf*5}return Kh}var B_=function(jd){this.cm=jd,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Nh,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};B_.prototype.init=function(jd){var Yd=this,gf=this,hf=gf.cm,vf=gf.div=jd.lineDiv;vf.contentEditable=!0,uS(vf,hf.options.spellcheck,hf.options.autocorrect,hf.options.autocapitalize);function $f(Ah){for(var Lh=Ah.target;Lh;Lh=Lh.parentNode){if(Lh==vf)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Lh.className))break}return!1}ig(vf,"paste",function(Ah){!$f(Ah)||Wg(hf,Ah)||TE(Ah,hf)||yd<=11&&setTimeout(U_(hf,function(){return Yd.updateFromDOM()}),20)}),ig(vf,"compositionstart",function(Ah){Yd.composing={data:Ah.data,done:!1}}),ig(vf,"compositionupdate",function(Ah){Yd.composing||(Yd.composing={data:Ah.data,done:!1})}),ig(vf,"compositionend",function(Ah){Yd.composing&&(Ah.data!=Yd.composing.data&&Yd.readFromDOMSoon(),Yd.composing.done=!0)}),ig(vf,"touchstart",function(){return gf.forceCompositionEnd()}),ig(vf,"input",function(){Yd.composing||Yd.readFromDOMSoon()});function ph(Ah){if(!(!$f(Ah)||Wg(hf,Ah))){if(hf.somethingSelected())QS({lineWise:!1,text:hf.getSelections()}),Ah.type=="cut"&&hf.replaceSelection("",null,"cut");else if(hf.options.lineWiseCopyCut){var Lh=ZS(hf);QS({lineWise:!0,text:Lh.text}),Ah.type=="cut"&&hf.operation(function(){hf.setSelections(Lh.ranges,0,Xh),hf.replaceSelection("",null,"cut")})}else return;if(Ah.clipboardData){Ah.clipboardData.clearData();var Kh=My.text.join(` -`);if(Ah.clipboardData.setData("Text",Kh),Ah.clipboardData.getData("Text")==Kh){Ah.preventDefault();return}}var Om=cS(),Hm=Om.firstChild;uS(Hm),hf.display.lineSpace.insertBefore(Om,hf.display.lineSpace.firstChild),Hm.value=My.text.join(` -`);var Jm=xh(Sh(vf));dh(Hm),setTimeout(function(){hf.display.lineSpace.removeChild(Om),Jm.focus(),Jm==vf&&gf.showPrimarySelection()},50)}}ig(vf,"copy",ph),ig(vf,"cut",ph)},B_.prototype.screenReaderLabelChanged=function(jd){jd?this.div.setAttribute("aria-label",jd):this.div.removeAttribute("aria-label")},B_.prototype.prepareSelection=function(){var jd=ET(this.cm,!1);return jd.focus=xh(Sh(this.div))==this.div,jd},B_.prototype.showSelection=function(jd,Yd){!jd||!this.cm.display.view.length||((jd.focus||Yd)&&this.showPrimarySelection(),this.showMultipleSelections(jd))},B_.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},B_.prototype.showPrimarySelection=function(){var jd=this.getSelection(),Yd=this.cm,gf=Yd.doc.sel.primary(),hf=gf.from(),vf=gf.to();if(Yd.display.viewTo==Yd.display.viewFrom||hf.line>=Yd.display.viewTo||vf.line=Yd.display.viewFrom&&r0(Yd,hf)||{node:Ah[0].measure.map[2],offset:0},Kh=vf.linejd.firstLine()&&(hf=sg(hf.line-1,Mg(jd.doc,hf.line-1).length)),vf.ch==Mg(jd.doc,vf.line).text.length&&vf.lineYd.viewTo-1)return!1;var $f,ph,Ah;hf.line==Yd.viewFrom||($f=_0(jd,hf.line))==0?(ph=qh(Yd.view[0].line),Ah=Yd.view[0].node):(ph=qh(Yd.view[$f].line),Ah=Yd.view[$f-1].node.nextSibling);var Lh=_0(jd,vf.line),Kh,Om;if(Lh==Yd.view.length-1?(Kh=Yd.viewTo-1,Om=Yd.lineDiv.lastChild):(Kh=qh(Yd.view[Lh+1].line)-1,Om=Yd.view[Lh+1].node.previousSibling),!Ah)return!1;for(var Hm=jd.doc.splitLines(Yx(jd,Ah,Om,ph,Kh)),Jm=q_(jd.doc,sg(ph,0),sg(Kh,Mg(jd.doc,Kh).text.length));Hm.length>1&&Jm.length>1;)if(wh(Hm)==wh(Jm))Hm.pop(),Jm.pop(),Kh--;else if(Hm[0]==Jm[0])Hm.shift(),Jm.shift(),ph++;else break;for(var Qm=0,ug=0,Tg=Hm[0],kg=Jm[0],Gg=Math.min(Tg.length,kg.length);Qmhf.ch&&Vg.charCodeAt(Vg.length-ug-1)==Ug.charCodeAt(Ug.length-ug-1);)Qm--,ug++;Hm[Hm.length-1]=Vg.slice(0,Vg.length-ug).replace(/^\u200b+/,""),Hm[0]=Hm[0].slice(Qm).replace(/\u200b+$/,"");var i_=sg(ph,Qm),n_=sg(Kh,Jm.length?wh(Jm).length-ug:0);if(Hm.length>1||Hm[0]||Fg(i_,n_))return w0(jd.doc,Hm,i_,n_,"+input"),!0},B_.prototype.ensurePolled=function(){this.forceCompositionEnd()},B_.prototype.reset=function(){this.forceCompositionEnd()},B_.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},B_.prototype.readFromDOMSoon=function(){var jd=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(jd.readDOMTimeout=null,jd.composing)if(jd.composing.done)jd.composing=null;else return;jd.updateFromDOM()},80))},B_.prototype.updateFromDOM=function(){var jd=this;(this.cm.isReadOnly()||!this.pollContent())&&Bb(this.cm,function(){return Wb(jd.cm)})},B_.prototype.setUneditable=function(jd){jd.contentEditable="false"},B_.prototype.onKeyPress=function(jd){jd.charCode==0||this.composing||(jd.preventDefault(),this.cm.isReadOnly()||U_(this.cm,KT)(this.cm,String.fromCharCode(jd.charCode==null?jd.keyCode:jd.charCode),0))},B_.prototype.readOnlyChanged=function(jd){this.div.contentEditable=String(jd!="nocursor")},B_.prototype.onContextMenu=function(){},B_.prototype.resetPosition=function(){},B_.prototype.needsContentAttribute=!0;function r0(jd,Yd){var gf=wS(jd,Yd.line);if(!gf||gf.hidden)return null;var hf=Mg(jd.doc,Yd.line),vf=ex(gf,hf,Yd.line),$f=Km(hf,jd.doc.direction),ph="left";if($f){var Ah=Sm($f,Yd.ch);ph=Ah%2?"right":"left"}var Lh=nx(vf.map,Yd.ch,ph);return Lh.offset=Lh.collapse=="right"?Lh.end:Lh.start,Lh}function M1(jd){for(var Yd=jd;Yd;Yd=Yd.parentNode)if(/CodeMirror-gutter-wrapper/.test(Yd.className))return!0;return!1}function i0(jd,Yd){return Yd&&(jd.bad=!0),jd}function Yx(jd,Yd,gf,hf,vf){var $f="",ph=!1,Ah=jd.doc.lineSeparator(),Lh=!1;function Kh(Qm){return function(ug){return ug.id==Qm}}function Om(){ph&&($f+=Ah,Lh&&($f+=Ah),ph=Lh=!1)}function Hm(Qm){Qm&&(Om(),$f+=Qm)}function Jm(Qm){if(Qm.nodeType==1){var ug=Qm.getAttribute("cm-text");if(ug){Hm(ug);return}var Tg=Qm.getAttribute("cm-marker"),kg;if(Tg){var Gg=jd.findMarks(sg(hf,0),sg(vf+1,0),Kh(+Tg));Gg.length&&(kg=Gg[0].find(0))&&Hm(q_(jd.doc,kg.from,kg.to).join(Ah));return}if(Qm.getAttribute("contenteditable")=="false")return;var Vg=/^(pre|div|p|li|table|br)$/i.test(Qm.nodeName);if(!/^br$/i.test(Qm.nodeName)&&Qm.textContent.length==0)return;Vg&&Om();for(var Ug=0;Ug=9&&Yd.hasSelection&&(Yd.hasSelection=null),gf.poll()}),ig(vf,"paste",function(ph){Wg(hf,ph)||TE(ph,hf)||(hf.state.pasteIncoming=+new Date,gf.fastPoll())});function $f(ph){if(!Wg(hf,ph)){if(hf.somethingSelected())QS({lineWise:!1,text:hf.getSelections()});else if(hf.options.lineWiseCopyCut){var Ah=ZS(hf);QS({lineWise:!0,text:Ah.text}),ph.type=="cut"?hf.setSelections(Ah.ranges,null,Xh):(gf.prevInput="",vf.value=Ah.text.join(` -`),dh(vf))}else return;ph.type=="cut"&&(hf.state.cutIncoming=+new Date)}}ig(vf,"cut",$f),ig(vf,"copy",$f),ig(jd.scroller,"paste",function(ph){if(!(P_(jd,ph)||Wg(hf,ph))){if(!vf.dispatchEvent){hf.state.pasteIncoming=+new Date,gf.focus();return}var Ah=new Event("paste");Ah.clipboardData=ph.clipboardData,vf.dispatchEvent(Ah)}}),ig(jd.lineSpace,"selectstart",function(ph){P_(jd,ph)||t_(ph)}),ig(vf,"compositionstart",function(){var ph=hf.getCursor("from");gf.composing&&gf.composing.range.clear(),gf.composing={start:ph,range:hf.markText(ph,hf.getCursor("to"),{className:"CodeMirror-composing"})}}),ig(vf,"compositionend",function(){gf.composing&&(gf.poll(),gf.composing.range.clear(),gf.composing=null)})},lb.prototype.createField=function(jd){this.wrapper=cS(),this.textarea=this.wrapper.firstChild;var Yd=this.cm.options;uS(this.textarea,Yd.spellcheck,Yd.autocorrect,Yd.autocapitalize)},lb.prototype.screenReaderLabelChanged=function(jd){jd?this.textarea.setAttribute("aria-label",jd):this.textarea.removeAttribute("aria-label")},lb.prototype.prepareSelection=function(){var jd=this.cm,Yd=jd.display,gf=jd.doc,hf=ET(jd);if(jd.options.moveInputWithCursor){var vf=lg(jd,gf.sel.primary().head,"div"),$f=Yd.wrapper.getBoundingClientRect(),ph=Yd.lineDiv.getBoundingClientRect();hf.teTop=Math.max(0,Math.min(Yd.wrapper.clientHeight-10,vf.top+ph.top-$f.top)),hf.teLeft=Math.max(0,Math.min(Yd.wrapper.clientWidth-10,vf.left+ph.left-$f.left))}return hf},lb.prototype.showSelection=function(jd){var Yd=this.cm,gf=Yd.display;If(gf.cursorDiv,jd.cursors),If(gf.selectionDiv,jd.selection),jd.teTop!=null&&(this.wrapper.style.top=jd.teTop+"px",this.wrapper.style.left=jd.teLeft+"px")},lb.prototype.reset=function(jd){if(!(this.contextMenuPending||this.composing&&jd)){var Yd=this.cm;if(this.resetting=!0,Yd.somethingSelected()){this.prevInput="";var gf=Yd.getSelection();this.textarea.value=gf,Yd.state.focused&&dh(this.textarea),gd&&yd>=9&&(this.hasSelection=gf)}else jd||(this.prevInput=this.textarea.value="",gd&&yd>=9&&(this.hasSelection=null));this.resetting=!1}},lb.prototype.getField=function(){return this.textarea},lb.prototype.supportsTouch=function(){return!1},lb.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Wd||xh(Sh(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},lb.prototype.blur=function(){this.textarea.blur()},lb.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},lb.prototype.receivedFocus=function(){this.slowPoll()},lb.prototype.slowPoll=function(){var jd=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){jd.poll(),jd.cm.state.focused&&jd.slowPoll()})},lb.prototype.fastPoll=function(){var jd=!1,Yd=this;Yd.pollingFast=!0;function gf(){var hf=Yd.poll();!hf&&!jd?(jd=!0,Yd.polling.set(60,gf)):(Yd.pollingFast=!1,Yd.slowPoll())}Yd.polling.set(20,gf)},lb.prototype.poll=function(){var jd=this,Yd=this.cm,gf=this.textarea,hf=this.prevInput;if(this.contextMenuPending||this.resetting||!Yd.state.focused||gm(gf)&&!hf&&!this.composing||Yd.isReadOnly()||Yd.options.disableInput||Yd.state.keySeq)return!1;var vf=gf.value;if(vf==hf&&!Yd.somethingSelected())return!1;if(gd&&yd>=9&&this.hasSelection===vf||Kd&&/[\uf700-\uf7ff]/.test(vf))return Yd.display.input.reset(),!1;if(Yd.doc.sel==Yd.display.selForContextMenu){var $f=vf.charCodeAt(0);if($f==8203&&!hf&&(hf="​"),$f==8666)return this.reset(),this.cm.execCommand("undo")}for(var ph=0,Ah=Math.min(hf.length,vf.length);ph1e3||vf.indexOf(` -`)>-1?gf.value=jd.prevInput="":jd.prevInput=vf,jd.composing&&(jd.composing.range.clear(),jd.composing.range=Yd.markText(jd.composing.start,Yd.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},lb.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},lb.prototype.onKeyPress=function(){gd&&yd>=9&&(this.hasSelection=null),this.fastPoll()},lb.prototype.onContextMenu=function(jd){var Yd=this,gf=Yd.cm,hf=gf.display,vf=Yd.textarea;Yd.contextMenuPending&&Yd.contextMenuPending();var $f=mE(gf,jd),ph=hf.scroller.scrollTop;if(!$f||Fd)return;var Ah=gf.options.resetSelectionOnContextMenu;Ah&&gf.doc.sel.contains($f)==-1&&U_(gf,Mb)(gf.doc,XE($f),Xh);var Lh=vf.style.cssText,Kh=Yd.wrapper.style.cssText,Om=Yd.wrapper.offsetParent.getBoundingClientRect();Yd.wrapper.style.cssText="position: static",vf.style.cssText=`position: absolute; width: 30px; height: 30px; - top: `+(jd.clientY-Om.top-5)+"px; left: "+(jd.clientX-Om.left-5)+`px; - z-index: 1000; background: `+(gd?"rgba(255, 255, 255, .05)":"transparent")+`; - outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Hm;vd&&(Hm=vf.ownerDocument.defaultView.scrollY),hf.input.focus(),vd&&vf.ownerDocument.defaultView.scrollTo(null,Hm),hf.input.reset(),gf.somethingSelected()||(vf.value=Yd.prevInput=" "),Yd.contextMenuPending=Qm,hf.selForContextMenu=gf.doc.sel,clearTimeout(hf.detectingSelectAll);function Jm(){if(vf.selectionStart!=null){var Tg=gf.somethingSelected(),kg="​"+(Tg?vf.value:"");vf.value="⇚",vf.value=kg,Yd.prevInput=Tg?"":"​",vf.selectionStart=1,vf.selectionEnd=kg.length,hf.selForContextMenu=gf.doc.sel}}function Qm(){if(Yd.contextMenuPending==Qm&&(Yd.contextMenuPending=!1,Yd.wrapper.style.cssText=Kh,vf.style.cssText=Lh,gd&&yd<9&&hf.scrollbars.setScrollTop(hf.scroller.scrollTop=ph),vf.selectionStart!=null)){(!gd||gd&&yd<9)&&Jm();var Tg=0,kg=function(){hf.selForContextMenu==gf.doc.sel&&vf.selectionStart==0&&vf.selectionEnd>0&&Yd.prevInput=="​"?U_(gf,nv)(gf):Tg++<10?hf.detectingSelectAll=setTimeout(kg,500):(hf.selForContextMenu=null,hf.input.reset())};hf.detectingSelectAll=setTimeout(kg,200)}}if(gd&&yd>=9&&Jm(),mf){X_(jd);var ug=function(){vg(window,"mouseup",ug),setTimeout(Qm,20)};ig(window,"mouseup",ug)}else setTimeout(Qm,50)},lb.prototype.readOnlyChanged=function(jd){jd||this.reset(),this.textarea.disabled=jd=="nocursor",this.textarea.readOnly=!!jd},lb.prototype.setUneditable=function(){},lb.prototype.needsContentAttribute=!1;function Kx(jd,Yd){if(Yd=Yd?Af(Yd):{},Yd.value=jd.value,!Yd.tabindex&&jd.tabIndex&&(Yd.tabindex=jd.tabIndex),!Yd.placeholder&&jd.placeholder&&(Yd.placeholder=jd.placeholder),Yd.autofocus==null){var gf=xh(Sh(jd));Yd.autofocus=gf==jd||jd.getAttribute("autofocus")!=null&&gf==document.body}function hf(){jd.value=Ah.getValue()}var vf;if(jd.form&&(ig(jd.form,"submit",hf),!Yd.leaveSubmitMethodAlone)){var $f=jd.form;vf=$f.submit;try{var ph=$f.submit=function(){hf(),$f.submit=vf,$f.submit(),$f.submit=ph}}catch{}}Yd.finishInit=function(Lh){Lh.save=hf,Lh.getTextArea=function(){return jd},Lh.toTextArea=function(){Lh.toTextArea=isNaN,hf(),jd.parentNode.removeChild(Lh.getWrapperElement()),jd.style.display="",jd.form&&(vg(jd.form,"submit",hf),!Yd.leaveSubmitMethodAlone&&typeof jd.form.submit=="function"&&(jd.form.submit=vf))}},jd.style.display="none";var Ah=k_(function(Lh){return jd.parentNode.insertBefore(Lh,jd.nextSibling)},Yd);return Ah}function P1(jd){jd.off=vg,jd.on=ig,jd.wheelEventPixels=E1,jd.Doc=Hb,jd.splitLines=nh,jd.countColumn=_h,jd.findColumn=Zf,jd.isWordChar=Fm,jd.Pass=oh,jd.signal=Og,jd.Line=Hy,jd.changeEnd=QE,jd.scrollbarModel=S0,jd.Pos=sg,jd.cmpPos=Fg,jd.modes=Lm,jd.mimeModes=zm,jd.resolveMode=og,jd.getMode=pg,jd.modeExtensions=qg,jd.extendMode=xg,jd.copyState=Yg,jd.startState=C_,jd.innerMode=w_,jd.commands=nS,jd.keyMap=vE,jd.keyName=Jv,jd.isModifierKey=qS,jd.lookupKey=iy,jd.normalizeKeyMap=ry,jd.StringStream=p_,jd.SharedTextMarker=ov,jd.TextMarker=oE,jd.LineWidget=N0,jd.e_preventDefault=t_,jd.e_stopPropagation=R_,jd.e_stop=X_,jd.addClass=Eh,jd.contains=lh,jd.rmClass=xf,jd.keyNames=Db}YT(k_),_v(k_);var Xx="iter insert remove copy getEditor constructor".split(" ");for(var eT in Hb.prototype)Hb.prototype.hasOwnProperty(eT)&&dm(Xx,eT)<0&&(k_.prototype[eT]=function(jd){return function(){return jd.apply(this.doc,arguments)}}(Hb.prototype[eT]));return y_(Hb),k_.inputStyles={textarea:lb,contenteditable:B_},k_.defineMode=function(jd){!k_.defaults.mode&&jd!="null"&&(k_.defaults.mode=jd),Vm.apply(this,arguments)},k_.defineMIME=Dm,k_.defineMode("null",function(){return{token:function(jd){return jd.skipToEnd()}}}),k_.defineMIME("text/plain","null"),k_.defineExtension=function(jd,Yd){k_.prototype[jd]=Yd},k_.defineDocExtension=function(jd,Yd){Hb.prototype[jd]=Yd},k_.fromTextArea=Kx,P1(k_),k_.version="5.65.18",k_})}(codemirror)),codemirror.exports}var codemirrorExports=requireCodemirror();const CodeMirror=getDefaultExportFromCjs(codemirrorExports);var qt=Object.defineProperty,Jt=(Ra,qa,rd)=>qa in Ra?qt(Ra,qa,{enumerable:!0,configurable:!0,writable:!0,value:rd}):Ra[qa]=rd,x$1=(Ra,qa,rd)=>Jt(Ra,typeof qa!="symbol"?qa+"":qa,rd);function Zt(Ra){if(typeof document>"u")return;let qa=document.head||document.getElementsByTagName("head")[0],rd=document.createElement("style");rd.type="text/css",qa.appendChild(rd),rd.styleSheet?rd.styleSheet.cssText=Ra:rd.appendChild(document.createTextNode(Ra))}Zt(":where([data-sonner-toaster][dir=ltr]),:where(html[dir=ltr]){--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}:where([data-sonner-toaster][dir=rtl]),:where(html[dir=rtl]){--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted=true]){transform:translateY(-10px)}@media (hover:none) and (pointer:coarse){:where([data-sonner-toaster][data-lifted=true]){transform:none}}:where([data-sonner-toaster][data-x-position=right]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position=left]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position=center]){left:50%;transform:translateX(-50%)}:where([data-sonner-toaster][data-y-position=top]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position=bottom]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled=true]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast][data-y-position=top]){top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position=bottom]){bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise=true]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme=dark]) :where([data-cancel]){background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast]) :where([data-disabled=true]){cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping=true])::before{content:'';position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position=top][data-swiping=true])::before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position=bottom][data-swiping=true])::before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping=false][data-removed=true])::before{content:'';position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast])::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted=true]){--y:translateY(0);opacity:1}:where([data-sonner-toast][data-expanded=false][data-front=false]){--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded=false][data-front=false][data-styled=true])>*{opacity:0}:where([data-sonner-toast][data-visible=false]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted=true][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]){--y:translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]){--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed=true][data-front=false])::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let vt=0,ae$2=class{constructor(){x$1(this,"subscribers"),x$1(this,"toasts"),x$1(this,"subscribe",qa=>(this.subscribers.push(qa),()=>{const rd=this.subscribers.indexOf(qa);this.subscribers.splice(rd,1)})),x$1(this,"publish",qa=>{this.subscribers.forEach(rd=>rd(qa))}),x$1(this,"addToast",qa=>{this.publish(qa),this.toasts=[...this.toasts,qa]}),x$1(this,"create",qa=>{var rd;const{message:sd,...pd}=qa,fd=typeof qa.id=="number"||qa.id&&((rd=qa.id)==null?void 0:rd.length)>0?qa.id:vt++,hd=this.toasts.find(gd=>gd.id===fd),md=qa.dismissible===void 0?!0:qa.dismissible;return hd?this.toasts=this.toasts.map(gd=>gd.id===fd?(this.publish({...gd,...qa,id:fd,title:sd}),{...gd,...qa,id:fd,dismissible:md,title:sd}):gd):this.addToast({title:sd,...pd,dismissible:md,id:fd}),fd}),x$1(this,"dismiss",qa=>(qa||this.toasts.forEach(rd=>{this.subscribers.forEach(sd=>sd({id:rd.id,dismiss:!0}))}),this.subscribers.forEach(rd=>rd({id:qa,dismiss:!0})),qa)),x$1(this,"message",(qa,rd)=>this.create({...rd,message:qa,type:"default"})),x$1(this,"error",(qa,rd)=>this.create({...rd,type:"error",message:qa})),x$1(this,"success",(qa,rd)=>this.create({...rd,type:"success",message:qa})),x$1(this,"info",(qa,rd)=>this.create({...rd,type:"info",message:qa})),x$1(this,"warning",(qa,rd)=>this.create({...rd,type:"warning",message:qa})),x$1(this,"loading",(qa,rd)=>this.create({...rd,type:"loading",message:qa})),x$1(this,"promise",(qa,rd)=>{if(!rd)return;let sd;rd.loading!==void 0&&(sd=this.create({...rd,promise:qa,type:"loading",message:rd.loading,description:typeof rd.description!="function"?rd.description:void 0}));const pd=qa instanceof Promise?qa:qa();let fd=sd!==void 0,hd;const md=pd.then(async yd=>{if(hd=["resolve",yd],se$1(yd)&&!yd.ok){fd=!1;const vd=typeof rd.error=="function"?await rd.error(`HTTP error! status: ${yd.status}`):rd.error,Nd=typeof rd.description=="function"?await rd.description(`HTTP error! status: ${yd.status}`):rd.description;this.create({id:sd,type:"error",message:vd,description:Nd})}else if(rd.success!==void 0){fd=!1;const vd=typeof rd.success=="function"?await rd.success(yd):rd.success,Nd=typeof rd.description=="function"?await rd.description(yd):rd.description;this.create({id:sd,type:"success",message:vd,description:Nd})}}).catch(async yd=>{if(hd=["reject",yd],rd.error!==void 0){fd=!1;const vd=typeof rd.error=="function"?await rd.error(yd):rd.error,Nd=typeof rd.description=="function"?await rd.description(yd):rd.description;this.create({id:sd,type:"error",message:vd,description:Nd})}}).finally(()=>{var yd;fd&&(this.dismiss(sd),sd=void 0),(yd=rd.finally)==null||yd.call(rd)}),gd=()=>new Promise((yd,vd)=>md.then(()=>hd[0]==="reject"?vd(hd[1]):yd(hd[1])).catch(vd));return typeof sd!="string"&&typeof sd!="number"?{unwrap:gd}:Object.assign(sd,{unwrap:gd})}),x$1(this,"custom",(qa,rd)=>{const sd=(rd==null?void 0:rd.id)||vt++;return this.publish({component:qa,id:sd,...rd}),sd}),this.subscribers=[],this.toasts=[]}};const I$2=new ae$2;function oe$1(Ra,qa){const rd=(qa==null?void 0:qa.id)||vt++;return I$2.create({message:Ra,id:rd,type:"default",...qa}),rd}const se$1=Ra=>Ra&&typeof Ra=="object"&&"ok"in Ra&&typeof Ra.ok=="boolean"&&"status"in Ra&&typeof Ra.status=="number",ne$1=oe$1,re$1=()=>I$2.toasts,Ke=Object.assign(ne$1,{success:I$2.success,info:I$2.info,warning:I$2.warning,error:I$2.error,custom:I$2.custom,message:I$2.message,promise:I$2.promise,dismiss:I$2.dismiss,loading:I$2.loading},{getHistory:re$1});function ut(Ra){return Ra.label!==void 0}function ie$1(){const Ra=ref$1(!1);return watchEffect(()=>{const qa=()=>{Ra.value=document.hidden};return document.addEventListener("visibilitychange",qa),()=>window.removeEventListener("visibilitychange",qa)}),{isDocumentHidden:Ra}}const le$1=["aria-live","data-rich-colors","data-styled","data-mounted","data-promise","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-expanded"],de$1=["aria-label","data-disabled"],Wt=4e3,ue$1=20,ce$2=200,fe$1=defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},pauseWhenPageIsHidden:{type:Boolean},cn:{type:Function},defaultRichColors:{type:Boolean}},emits:["update:heights","removeToast"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=ref$1(!1),fd=ref$1(!1),hd=ref$1(!1),md=ref$1(!1),gd=ref$1(!1),yd=ref$1(0),vd=ref$1(0),Nd=ref$1(rd.toast.duration||rd.duration||Wt),Md=ref$1(null),Ld=ref$1(null),Fd=computed(()=>rd.index===0),Hd=computed(()=>rd.index+1<=rd.visibleToasts),Vd=computed(()=>rd.toast.type),Gd=computed(()=>rd.toast.dismissible!==!1),Ud=computed(()=>rd.toast.class||""),qd=computed(()=>rd.descriptionClass||""),Wd=rd.toast.style||{},Kd=computed(()=>rd.heights.findIndex(Sh=>Sh.toastId===rd.toast.id)||0),Xd=computed(()=>rd.toast.closeButton??rd.closeButton);computed(()=>rd.toast.duration||rd.duration||Wt);const df=ref$1(0),Ef=ref$1(0),pf=ref$1(null),mf=computed(()=>rd.position.split("-")),_f=computed(()=>mf.value[0]),xf=computed(()=>mf.value[1]),Cf=computed(()=>typeof rd.toast.title!="string"),If=computed(()=>typeof rd.toast.description!="string"),Sf=computed(()=>rd.heights.reduce((Sh,vh,Df)=>Df>=Kd.value?Sh:Sh+vh.height,0)),wf=ie$1(),Pf=computed(()=>rd.toast.invert||rd.invert),lh=computed(()=>Vd.value==="loading"),xh=computed(()=>Kd.value*rd.gap+Sf.value||0);onMounted(()=>{if(!pd.value)return;const Sh=Ld.value,vh=Sh==null?void 0:Sh.style.height;Sh.style.height="auto";const Df=Sh.getBoundingClientRect().height;Sh.style.height=vh,vd.value=Df;let Af;rd.heights.find(_h=>_h.toastId===rd.toast.id)?Af=rd.heights.map(_h=>_h.toastId===rd.toast.id?{..._h,height:Df}:_h):Af=[{toastId:rd.toast.id,height:Df,position:rd.toast.position},...rd.heights],sd("update:heights",Af)});function Eh(){fd.value=!0,yd.value=xh.value;const Sh=rd.heights.filter(vh=>vh.toastId!==rd.toast.id);sd("update:heights",Sh),setTimeout(()=>{sd("removeToast",rd.toast)},ce$2)}function Mh(){var Sh,vh;if(lh.value||!Gd.value)return{};Eh(),(vh=(Sh=rd.toast).onDismiss)==null||vh.call(Sh,rd.toast)}function dh(Sh){lh.value||!Gd.value||(Md.value=new Date,yd.value=xh.value,Sh.target.setPointerCapture(Sh.pointerId),Sh.target.tagName!=="BUTTON"&&(hd.value=!0,pf.value={x:Sh.clientX,y:Sh.clientY}))}function eh(){var Sh,vh,Df,Af,_h;if(md.value||!Gd)return;pf.value=null;const Nh=Number(((Sh=Ld.value)==null?void 0:Sh.style.getPropertyValue("--swipe-amount").replace("px",""))||0),dm=new Date().getTime()-((vh=Md.value)==null?void 0:vh.getTime()),Jf=Math.abs(Nh)/dm;if(Math.abs(Nh)>=ue$1||Jf>.11){yd.value=xh.value,(Af=(Df=rd.toast).onDismiss)==null||Af.call(Df,rd.toast),Eh(),md.value=!0,gd.value=!1;return}(_h=Ld.value)==null||_h.style.setProperty("--swipe-amount","0px"),hd.value=!1}function fh(Sh){var vh,Df;if(!pf.value||!Gd.value)return;const Af=Sh.clientY-pf.value.y,_h=((vh=window.getSelection())==null?void 0:vh.toString().length)>0,Nh=_f.value==="top"?Math.min(0,Af):Math.max(0,Af);Math.abs(Nh)>0&&(gd.value=!0),!_h&&((Df=Ld.value)==null||Df.style.setProperty("--swipe-amount",`${Nh}px`))}return watchEffect(Sh=>{if(rd.toast.promise&&Vd.value==="loading"||rd.toast.duration===1/0||rd.toast.type==="loading")return;let vh;const Df=()=>{if(Ef.value{Nd.value!==1/0&&(df.value=new Date().getTime(),vh=setTimeout(()=>{var _h,Nh;(Nh=(_h=rd.toast).onAutoClose)==null||Nh.call(_h,rd.toast),Eh()},Nd.value))};rd.expanded||rd.interacting||rd.pauseWhenPageIsHidden&&wf?Df():Af(),Sh(()=>{clearTimeout(vh)})}),watch(()=>rd.toast.delete,()=>{rd.toast.delete&&Eh()},{deep:!0}),onMounted(()=>{if(pd.value=!0,Ld.value){const Sh=Ld.value.getBoundingClientRect().height;vd.value=Sh;const vh=[{toastId:rd.toast.id,height:Sh,position:rd.toast.position},...rd.heights];sd("update:heights",vh)}}),onBeforeUnmount(()=>{if(Ld.value){const Sh=rd.heights.filter(vh=>vh.toastId!==rd.toast.id);sd("update:heights",Sh)}}),(Sh,vh)=>{var Df,Af,_h,Nh,dm,Jf,oh,Xh,Tm,kh,Zf,th,$h,wh,fm,zh,Mm,Rm,tg,Fm,Ym,rg,Eg,Fh,kf,Rf,Dh;return openBlock(),createElementBlock("li",{ref_key:"toastRef",ref:Ld,"aria-live":Sh.toast.important?"assertive":"polite","aria-atomic":"true",role:"status",tabindex:"0","data-sonner-toast":"true",class:normalizeClass(Sh.cn(rd.class,Ud.value,(Df=Sh.classes)==null?void 0:Df.toast,(Af=Sh.toast.classes)==null?void 0:Af.toast,(_h=Sh.classes)==null?void 0:_h[Vd.value],(dm=(Nh=Sh.toast)==null?void 0:Nh.classes)==null?void 0:dm[Vd.value])),"data-rich-colors":Sh.toast.richColors??Sh.defaultRichColors,"data-styled":!(Sh.toast.component||(Jf=Sh.toast)!=null&&Jf.unstyled||Sh.unstyled),"data-mounted":pd.value,"data-promise":!!Sh.toast.promise,"data-removed":fd.value,"data-visible":Hd.value,"data-y-position":_f.value,"data-x-position":xf.value,"data-index":Sh.index,"data-front":Fd.value,"data-swiping":hd.value,"data-dismissible":Gd.value,"data-type":Vd.value,"data-invert":Pf.value,"data-swipe-out":md.value,"data-expanded":!!(Sh.expanded||Sh.expandByDefault&&pd.value),style:normalizeStyle({"--index":Sh.index,"--toasts-before":Sh.index,"--z-index":Sh.toasts.length-Sh.index,"--offset":`${fd.value?yd.value:xh.value}px`,"--initial-height":Sh.expandByDefault?"auto":`${vd.value}px`,...Sh.style,...unref(Wd)}),onPointerdown:dh,onPointerup:eh,onPointermove:fh},[Xd.value&&!Sh.toast.component?(openBlock(),createElementBlock("button",{key:0,"aria-label":Sh.closeButtonAriaLabel||"Close toast","data-disabled":lh.value,"data-close-button":"true",class:normalizeClass(Sh.cn((oh=Sh.classes)==null?void 0:oh.closeButton,(Tm=(Xh=Sh.toast)==null?void 0:Xh.classes)==null?void 0:Tm.closeButton)),onClick:Mh},[(kh=Sh.icons)!=null&&kh.close?(openBlock(),createBlock(resolveDynamicComponent((Zf=Sh.icons)==null?void 0:Zf.close),{key:0})):renderSlot(Sh.$slots,"close-icon",{key:1})],10,de$1)):createCommentVNode("",!0),Sh.toast.component?(openBlock(),createBlock(resolveDynamicComponent(Sh.toast.component),mergeProps({key:1},Sh.toast.componentProps,{onCloseToast:Mh}),null,16)):(openBlock(),createElementBlock(Fragment,{key:2},[Vd.value!=="default"||Sh.toast.icon||Sh.toast.promise?(openBlock(),createElementBlock("div",{key:0,"data-icon":"",class:normalizeClass(Sh.cn((th=Sh.classes)==null?void 0:th.icon,(wh=($h=Sh.toast)==null?void 0:$h.classes)==null?void 0:wh.icon))},[(Sh.toast.promise||Vd.value==="loading")&&!Sh.toast.icon?renderSlot(Sh.$slots,"loading-icon",{key:0}):createCommentVNode("",!0),Sh.toast.icon?(openBlock(),createBlock(resolveDynamicComponent(Sh.toast.icon),{key:1})):(openBlock(),createElementBlock(Fragment,{key:2},[Vd.value==="success"?renderSlot(Sh.$slots,"success-icon",{key:0}):Vd.value==="error"?renderSlot(Sh.$slots,"error-icon",{key:1}):Vd.value==="warning"?renderSlot(Sh.$slots,"warning-icon",{key:2}):Vd.value==="info"?renderSlot(Sh.$slots,"info-icon",{key:3}):createCommentVNode("",!0)],64))],2)):createCommentVNode("",!0),createBaseVNode("div",{"data-content":"",class:normalizeClass(Sh.cn((fm=Sh.classes)==null?void 0:fm.content,(Mm=(zh=Sh.toast)==null?void 0:zh.classes)==null?void 0:Mm.content))},[createBaseVNode("div",{"data-title":"",class:normalizeClass(Sh.cn((Rm=Sh.classes)==null?void 0:Rm.title,(tg=Sh.toast.classes)==null?void 0:tg.title))},[Cf.value?(openBlock(),createBlock(resolveDynamicComponent(Sh.toast.title),normalizeProps(mergeProps({key:0},Sh.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(Sh.toast.title),1)],64))],2),Sh.toast.description?(openBlock(),createElementBlock("div",{key:0,"data-description":"",class:normalizeClass(Sh.cn(Sh.descriptionClass,qd.value,(Fm=Sh.classes)==null?void 0:Fm.description,(Ym=Sh.toast.classes)==null?void 0:Ym.description))},[If.value?(openBlock(),createBlock(resolveDynamicComponent(Sh.toast.description),normalizeProps(mergeProps({key:0},Sh.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(Sh.toast.description),1)],64))],2)):createCommentVNode("",!0)],2),Sh.toast.cancel?(openBlock(),createElementBlock("button",{key:1,style:normalizeStyle(Sh.toast.cancelButtonStyle||Sh.cancelButtonStyle),class:normalizeClass(Sh.cn((rg=Sh.classes)==null?void 0:rg.cancelButton,(Eg=Sh.toast.classes)==null?void 0:Eg.cancelButton)),"data-button":"","data-cancel":"",onClick:vh[0]||(vh[0]=Vh=>{var Sm,$m;unref(ut)(Sh.toast.cancel)&&Gd.value&&(($m=(Sm=Sh.toast.cancel).onClick)==null||$m.call(Sm,Vh),Eh())})},toDisplayString(unref(ut)(Sh.toast.cancel)?(Fh=Sh.toast.cancel)==null?void 0:Fh.label:Sh.toast.cancel),7)):createCommentVNode("",!0),Sh.toast.action?(openBlock(),createElementBlock("button",{key:2,style:normalizeStyle(Sh.toast.actionButtonStyle||Sh.actionButtonStyle),class:normalizeClass(Sh.cn((kf=Sh.classes)==null?void 0:kf.actionButton,(Rf=Sh.toast.classes)==null?void 0:Rf.actionButton)),"data-button":"","data-action":"",onClick:vh[1]||(vh[1]=Vh=>{var Sm,$m;unref(ut)(Sh.toast.action)&&(Vh.defaultPrevented||(($m=(Sm=Sh.toast.action).onClick)==null||$m.call(Sm,Vh),!Vh.defaultPrevented&&Eh()))})},toDisplayString(unref(ut)(Sh.toast.action)?(Dh=Sh.toast.action)==null?void 0:Dh.label:Sh.toast.action),7)):createCommentVNode("",!0)],64))],46,le$1)}}}),at$1=(Ra,qa)=>{const rd=Ra.__vccOpts||Ra;for(const[sd,pd]of qa)rd[sd]=pd;return rd},pe$1={},he$1={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function ge$1(Ra,qa){return openBlock(),createElementBlock("svg",he$1,qa[0]||(qa[0]=[createBaseVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),createBaseVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}const me$1=at$1(pe$1,[["render",ge$1]]),ve$1=["data-visible"],ye$1={class:"sonner-spinner"},be$2=defineComponent({__name:"Loader",props:{visible:{type:Boolean}},setup(Ra){const qa=Array(12).fill(0);return(rd,sd)=>(openBlock(),createElementBlock("div",{class:"sonner-loading-wrapper","data-visible":rd.visible},[createBaseVNode("div",ye$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(qa),pd=>(openBlock(),createElementBlock("div",{key:`spinner-bar-${pd}`,class:"sonner-loading-bar"}))),128))])],8,ve$1))}}),we$1={},ke$1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function xe$1(Ra,qa){return openBlock(),createElementBlock("svg",ke$1,qa[0]||(qa[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}const Te=at$1(we$1,[["render",xe$1]]),Be$1={},Se$1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function Ce$1(Ra,qa){return openBlock(),createElementBlock("svg",Se$1,qa[0]||(qa[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}const $e=at$1(Be$1,[["render",Ce$1]]),Ie$1={},Ee$1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function Pe$1(Ra,qa){return openBlock(),createElementBlock("svg",Ee$1,qa[0]||(qa[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}const De=at$1(Ie$1,[["render",Pe$1]]),He={},ze={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function Me$1(Ra,qa){return openBlock(),createElementBlock("svg",ze,qa[0]||(qa[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}const Oe$1=at$1(He,[["render",Me$1]]),Ae$1=["aria-label"],Le$1=["dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],Ye=3,Ut="32px",Ne$1=356,Re$1=14,Fe$1=typeof window<"u"&&typeof document<"u";function je$1(...Ra){return Ra.filter(Boolean).join(" ")}const Ve=defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:Re$1},visibleToasts:{default:Ye},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{default:()=>({})},offset:{default:Ut},dir:{default:"auto"},icons:{},containerAriaLabel:{default:"Notifications"},pauseWhenPageIsHidden:{type:Boolean,default:!1},cn:{type:Function,default:je$1}},setup(Ra){const qa=Ra;function rd(){if(typeof window>"u"||typeof document>"u")return"ltr";const qd=document.documentElement.getAttribute("dir");return qd==="auto"||!qd?window.getComputedStyle(document.documentElement).direction:qd}const sd=useAttrs(),pd=ref$1([]),fd=computed(()=>(qd,Wd)=>pd.value.filter(Kd=>!Kd.position&&Wd===0||Kd.position===qd)),hd=computed(()=>{const qd=pd.value.filter(Wd=>Wd.position).map(Wd=>Wd.position);return qd.length>0?Array.from(new Set([qa.position].concat(qd))):[qa.position]}),md=ref$1([]),gd=ref$1(!1),yd=ref$1(!1),vd=ref$1(qa.theme!=="system"?qa.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Nd=ref$1(null),Md=ref$1(null),Ld=ref$1(!1),Fd=qa.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function Hd(qd){var Wd;(Wd=pd.value.find(Kd=>Kd.id===qd.id))!=null&&Wd.delete||I$2.dismiss(qd.id),pd.value=pd.value.filter(({id:Kd})=>Kd!==qd.id)}function Vd(qd){var Wd,Kd;Ld.value&&!((Kd=(Wd=qd.currentTarget)==null?void 0:Wd.contains)!=null&&Kd.call(Wd,qd.relatedTarget))&&(Ld.value=!1,Md.value&&(Md.value.focus({preventScroll:!0}),Md.value=null))}function Gd(qd){qd.target instanceof HTMLElement&&qd.target.dataset.dismissible==="false"||Ld.value||(Ld.value=!0,Md.value=qd.relatedTarget)}function Ud(qd){qd.target&&qd.target instanceof HTMLElement&&qd.target.dataset.dismissible==="false"||(yd.value=!0)}return watchEffect(qd=>{const Wd=I$2.subscribe(Kd=>{if(Kd.dismiss){pd.value=pd.value.map(Xd=>Xd.id===Kd.id?{...Xd,delete:!0}:Xd);return}nextTick$1(()=>{const Xd=pd.value.findIndex(df=>df.id===Kd.id);Xd!==-1?pd.value=[...pd.value.slice(0,Xd),{...pd.value[Xd],...Kd},...pd.value.slice(Xd+1)]:pd.value=[Kd,...pd.value]})});qd(Wd)}),watch(()=>qa.theme,qd=>{if(qd!=="system"){vd.value=qd;return}if(qd==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?vd.value="dark":vd.value="light"),typeof window>"u")return;const Wd=window.matchMedia("(prefers-color-scheme: dark)");try{Wd.addEventListener("change",({matches:Kd})=>{Kd?vd.value="dark":vd.value="light"})}catch{Wd.addListener(({matches:Kd})=>{try{Kd?vd.value="dark":vd.value="light"}catch(Xd){console.error(Xd)}})}}),watchEffect(()=>{Nd.value&&Md.value&&(Md.value.focus({preventScroll:!0}),Md.value=null,Ld.value=!1)}),watchEffect(()=>{pd.value.length<=1&&(gd.value=!1)}),watchEffect(qd=>{function Wd(Kd){const Xd=qa.hotkey.every(pf=>Kd[pf]||Kd.code===pf),df=Array.isArray(Nd.value)?Nd.value[0]:Nd.value;Xd&&(gd.value=!0,df==null||df.focus());const Ef=document.activeElement===Nd.value||(df==null?void 0:df.contains(document.activeElement));Kd.code==="Escape"&&Ef&&(gd.value=!1)}Fe$1&&(document.addEventListener("keydown",Wd),qd(()=>{document.removeEventListener("keydown",Wd)}))}),(qd,Wd)=>(openBlock(),createElementBlock("section",{"aria-label":`${qd.containerAriaLabel} ${unref(Fd)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(hd.value,(Kd,Xd)=>{var df;return openBlock(),createElementBlock("ol",mergeProps({key:Kd,ref_for:!0,ref_key:"listRef",ref:Nd,"data-sonner-toaster":"",class:qa.class,dir:qd.dir==="auto"?rd():qd.dir,tabIndex:-1,"data-theme":qd.theme,"data-rich-colors":qd.richColors,"data-y-position":Kd.split("-")[0],"data-x-position":Kd.split("-")[1],"data-lifted":gd.value&&pd.value.length>1&&!qd.expand,style:{"--front-toast-height":`${(df=md.value[0])==null?void 0:df.height}px`,"--offset":typeof qd.offset=="number"?`${qd.offset}px`:qd.offset||Ut,"--width":`${Ne$1}px`,"--gap":`${qd.gap}px`,...qd.style,...unref(sd).style}},qd.$attrs,{onBlur:Vd,onFocus:Gd,onMouseenter:Wd[1]||(Wd[1]=()=>gd.value=!0),onMousemove:Wd[2]||(Wd[2]=()=>gd.value=!0),onMouseleave:Wd[3]||(Wd[3]=()=>{yd.value||(gd.value=!1)}),onPointerdown:Ud,onPointerup:Wd[4]||(Wd[4]=()=>yd.value=!1)}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(fd.value(Kd,Xd),(Ef,pf)=>{var mf,_f,xf,Cf,If,Sf,wf,Pf,lh;return openBlock(),createBlock(fe$1,{key:Ef.id,heights:md.value.filter(xh=>xh.position===Ef.position),icons:qd.icons,index:pf,toast:Ef,defaultRichColors:qd.richColors,duration:((mf=qd.toastOptions)==null?void 0:mf.duration)??qd.duration,class:normalizeClass(((_f=qd.toastOptions)==null?void 0:_f.class)??""),descriptionClass:(xf=qd.toastOptions)==null?void 0:xf.descriptionClass,invert:qd.invert,visibleToasts:qd.visibleToasts,closeButton:((Cf=qd.toastOptions)==null?void 0:Cf.closeButton)??qd.closeButton,interacting:yd.value,position:Kd,style:normalizeStyle((If=qd.toastOptions)==null?void 0:If.style),unstyled:(Sf=qd.toastOptions)==null?void 0:Sf.unstyled,classes:(wf=qd.toastOptions)==null?void 0:wf.classes,cancelButtonStyle:(Pf=qd.toastOptions)==null?void 0:Pf.cancelButtonStyle,actionButtonStyle:(lh=qd.toastOptions)==null?void 0:lh.actionButtonStyle,toasts:pd.value.filter(xh=>xh.position===Ef.position),expandByDefault:qd.expand,gap:qd.gap,expanded:gd.value,pauseWhenPageIsHidden:qd.pauseWhenPageIsHidden,cn:qd.cn,"onUpdate:heights":Wd[0]||(Wd[0]=xh=>{md.value=xh}),onRemoveToast:Hd},{"close-icon":withCtx(()=>[renderSlot(qd.$slots,"close-icon",{},()=>[createVNode(me$1)])]),"loading-icon":withCtx(()=>[renderSlot(qd.$slots,"loading-icon",{},()=>[createVNode(be$2,{visible:Ef.type==="loading"},null,8,["visible"])])]),"success-icon":withCtx(()=>[renderSlot(qd.$slots,"success-icon",{},()=>[createVNode(Te)])]),"error-icon":withCtx(()=>[renderSlot(qd.$slots,"error-icon",{},()=>[createVNode(Oe$1)])]),"warning-icon":withCtx(()=>[renderSlot(qd.$slots,"warning-icon",{},()=>[createVNode(De)])]),"info-icon":withCtx(()=>[renderSlot(qd.$slots,"info-icon",{},()=>[createVNode($e)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","toasts","expandByDefault","gap","expanded","pauseWhenPageIsHidden","cn"])}),128))],16,Le$1)}),128))],8,Ae$1))}}),useStore=defineStore("store",()=>{const Ra=useDark(),qa=useToggle(Ra),rd=useStorage("isMacCodeBlock",!0),sd=useToggle(rd),pd=useStorage("isEditOnLeft",!0),fd=useToggle(pd),hd=useStorage("isCiteStatus",!1),md=useToggle(hd),gd=useStorage("isCountStatus",!1),yd=useToggle(gd),vd=useStorage(addPrefix("use_indent"),!1),Nd=useToggle(vd),Md=ref$1(""),Ld=useStorage(addPrefix("theme"),themeOptions[0].value),Fd=useStorage("fonts",fontFamilyOptions[0].value),Hd=useStorage("size",fontSizeOptions[2].value),Vd=useStorage("color",colorOptions[0].value),Gd=useStorage("codeBlockTheme",codeBlockThemeOptions[23].value),Ud=useStorage("legend",legendOptions[3].value),qd=computed(()=>Number(Hd.value.replace("px",""))),Wd=ref$1(null),Kd=useStorage("__editor_content",DEFAULT_CONTENT),Xd=useStorage(addPrefix("is_open_right_slider"),!1),df=useStorage(addPrefix("is_open_post_slider"),!1),Ef=useStorage(addPrefix("posts"),[{title:"内容1",content:DEFAULT_CONTENT}]),pf=useStorage(addPrefix("current_post_index"),0),mf=Fm=>{pf.value=Ef.value.push({title:Fm,content:`# ${Fm}`})-1},_f=(Fm,Ym)=>{Ef.value[Fm].title=Ym},xf=Fm=>{Ef.value.splice(Fm,1),pf.value=Math.min(Fm,Ef.value.length-1)};watch(pf,()=>{toRaw(Wd.value).setValue(Ef.value[pf.value].content)}),onMounted(()=>{Kd.value!==DEFAULT_CONTENT&&(Ef.value[pf.value].content=Kd.value,Kd.value=DEFAULT_CONTENT)});const Cf=()=>{formatDoc(Wd.value.getValue()).then(Fm=>{Ef.value[pf.value].content=Fm,toRaw(Wd.value).setValue(Fm)})},If=()=>{const Fm=Gd.value,Ym=document.querySelector("#hljs");if(Ym)Ym.setAttribute("href",Fm);else{const rg=document.createElement("link");rg.setAttribute("type","text/css"),rg.setAttribute("rel","stylesheet"),rg.setAttribute("href",Fm),rg.setAttribute("id","hljs"),document.head.appendChild(rg)}},Sf=ref$1(null),wf=Fm=>{Sf.value.setValue(Fm)},Pf=useStorage("__css_content",DEFAULT_CSS_CONTENT),lh=useStorage(addPrefix("css_content_config"),{active:"方案1",tabs:[{title:"方案1",name:"方案1",content:Pf.value||DEFAULT_CSS_CONTENT}]});onMounted(()=>{Pf.value=""});const xh=()=>lh.value.tabs.find(Fm=>Fm.name===lh.value.active),Eh=Fm=>{lh.value.active=Fm;const Ym=lh.value.tabs.find(rg=>rg.name===Fm).content;wf(Ym)},Mh=Fm=>{const Ym=xh();Ym.title=Fm,Ym.name=Fm,lh.value.active=Fm},dh=Fm=>{lh.value.tabs.push({name:Fm,title:Fm,content:DEFAULT_CSS_CONTENT}),lh.value.active=Fm,wf(DEFAULT_CSS_CONTENT)},eh=Fm=>lh.value.tabs.every(({name:Ym})=>Ym!==Fm),fh=initRenderer({theme:customCssWithTemplate(css2json(xh().content),Vd.value,customizeTheme(themeMap[Ld.value],{fontSize:qd.value,color:Vd.value})),fonts:Fd.value,size:Hd.value,isUseIndent:vd.value}),Sh=ref$1(null),vh=()=>{If(),fh.reset({citeStatus:hd.value,legend:Ud.value,isUseIndent:vd.value,countStatus:gd.value});const{markdownContent:Fm,readingTime:Ym}=fh.parseFrontMatterAndContent(Wd.value.getValue());Sh.value=Ym;let rg=marked$1.parse(Fm);rg=purify.sanitize(rg),rg=fh.buildReadingTime(Ym)+rg,rg=rg.replace(/(style=".*?)"/,'$1;margin-top: 0"'),rg+=fh.buildFootnotes(),rg+=fh.buildAddition(),rd.value&&(rg+=` + `},tablecell(Gd){const Yd=this.parser.parseInline(Gd.tokens);return vd("td",Yd)},hr(Gd){return vd("hr","")}};return marked$1.use({renderer:jd}),{buildAddition,buildFootnotes:Ud,setOptions:Nd,reset:wd,parseFrontMatterAndContent,buildReadingTime:Ld,createContainer(Gd){return vd("container",Gd,"section")}}}var codemirror={exports:{}},hasRequiredCodemirror;function requireCodemirror(){return hasRequiredCodemirror||(hasRequiredCodemirror=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd()})(commonjsGlobal,function(){var ud=navigator.userAgent,dd=navigator.platform,hd=/gecko\/\d/i.test(ud),md=/MSIE \d/.test(ud),gd=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ud),yd=/Edge\/(\d+)/.exec(ud),vd=md||gd||yd,Cd=vd&&(md?document.documentMode||6:+(yd||gd)[1]),wd=!yd&&/WebKit\//.test(ud),Nd=wd&&/Qt\/\d+\.\d+/.test(ud),Ld=!yd&&/Chrome\/(\d+)/.exec(ud),Ud=Ld&&+Ld[1],jd=/Opera\//.test(ud),Gd=/Apple Computer/.test(navigator.vendor),Yd=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ud),zd=/PhantomJS/.test(ud),qd=Gd&&(/Mobile\/\w+/.test(ud)||navigator.maxTouchPoints>2),Wd=/Android/.test(ud),Xd=qd||Wd||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ud),Jd=qd||/Mac/.test(dd),Zd=/\bCrOS\b/.test(ud),mf=/win/i.test(dd),xf=jd&&ud.match(/Version\/(\d*\.\d*)/);xf&&(xf=Number(xf[1])),xf&&xf>=15&&(jd=!1,wd=!0);var _f=Jd&&(Nd||jd&&(xf==null||xf<12.11)),vf=hd||vd&&Cd>=9;function gf(Hd){return new RegExp("(^|\\s)"+Hd+"(?:$|\\s)\\s*")}var Af=function(Hd,Qd){var Ef=Hd.className,yf=gf(Qd).exec(Ef);if(yf){var Tf=Ef.slice(yf.index+yf[0].length);Hd.className=Ef.slice(0,yf.index)+(Tf?yf[1]+Tf:"")}};function Df(Hd){for(var Qd=Hd.childNodes.length;Qd>0;--Qd)Hd.removeChild(Hd.firstChild);return Hd}function Of(Hd,Qd){return Df(Hd).appendChild(Qd)}function Cf(Hd,Qd,Ef,yf){var Tf=document.createElement(Hd);if(Ef&&(Tf.className=Ef),yf&&(Tf.style.cssText=yf),typeof Qd=="string")Tf.appendChild(document.createTextNode(Qd));else if(Qd)for(var Bf=0;Bf=Qd)return ph+(Qd-Bf);ph+=Dh-Bf,ph+=Ef-ph%Ef,Bf=Dh+1}}var Ph=function(){this.id=null,this.f=null,this.time=0,this.handler=kf(this.onTimeout,this)};Ph.prototype.onTimeout=function(Hd){Hd.id=0,Hd.time<=+new Date?Hd.f():setTimeout(Hd.handler,Hd.time-+new Date)},Ph.prototype.set=function(Hd,Qd){this.f=Qd;var Ef=+new Date+Hd;(!this.id||Ef=Qd)return yf+Math.min(ph,Qd-Tf);if(Tf+=Bf-yf,Tf+=Ef-Tf%Ef,yf=Bf+1,Tf>=Qd)return yf}}var nh=[""];function Lh(Hd){for(;nh.length<=Hd;)nh.push(Ih(nh)+" ");return nh[Hd]}function Ih(Hd){return Hd[Hd.length-1]}function om(Hd,Qd){for(var Ef=[],yf=0;yf"€"&&(Hd.toUpperCase()!=Hd.toLowerCase()||Zm.test(Hd))}function Wm(Hd,Qd){return Qd?Qd.source.indexOf("\\w")>-1&&Lm(Hd)?!0:Qd.test(Hd):Lm(Hd)}function ig(Hd){for(var Qd in Hd)if(Hd.hasOwnProperty(Qd)&&Hd[Qd])return!1;return!0}var yg=/[\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 jh(Hd){return Hd.charCodeAt(0)>=768&&yg.test(Hd)}function Pf(Hd,Qd,Ef){for(;(Ef<0?Qd>0:QdEf?-1:1;;){if(Qd==Ef)return Qd;var Tf=(Qd+Ef)/2,Bf=yf<0?Math.ceil(Tf):Math.floor(Tf);if(Bf==Qd)return Hd(Bf)?Qd:Ef;Hd(Bf)?Ef=Bf:Qd=Bf+yf}}function Nh(Hd,Qd,Ef,yf){if(!Hd)return yf(Qd,Ef,"ltr",0);for(var Tf=!1,Bf=0;BfQd||Qd==Ef&&ph.to==Qd)&&(yf(Math.max(ph.from,Qd),Math.min(ph.to,Ef),ph.level==1?"rtl":"ltr",Bf),Tf=!0)}Tf||yf(Qd,Ef,"ltr")}var Wh=null;function _m(Hd,Qd,Ef){var yf;Wh=null;for(var Tf=0;TfQd)return Tf;Bf.to==Qd&&(Bf.from!=Bf.to&&Ef=="before"?yf=Tf:Wh=Tf),Bf.from==Qd&&(Bf.from!=Bf.to&&Ef!="before"?yf=Tf:Wh=Tf)}return yf??Wh}var $m=function(){var Hd="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",Qd="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function Ef(Kh){return Kh<=247?Hd.charAt(Kh):1424<=Kh&&Kh<=1524?"R":1536<=Kh&&Kh<=1785?Qd.charAt(Kh-1536):1774<=Kh&&Kh<=2220?"r":8192<=Kh&&Kh<=8203?"w":Kh==8204?"b":"L"}var yf=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,Tf=/[stwN]/,Bf=/[LRr]/,ph=/[Lb1n]/,Dh=/[1n]/;function Fh(Kh,Rm,jm){this.level=Kh,this.from=Rm,this.to=jm}return function(Kh,Rm){var jm=Rm=="ltr"?"L":"R";if(Kh.length==0||Rm=="ltr"&&!yf.test(Kh))return!1;for(var Qm=Kh.length,Xm=[],dg=0;dg-1&&(yf[Qd]=Tf.slice(0,Bf).concat(Tf.slice(Bf+1)))}}}function kg(Hd,Qd){var Ef=mg(Hd,Qd);if(Ef.length)for(var yf=Array.prototype.slice.call(arguments,2),Tf=0;Tf0}function v_(Hd){Hd.prototype.on=function(Qd,Ef){sg(this,Qd,Ef)},Hd.prototype.off=function(Qd,Ef){vg(this,Qd,Ef)}}function r_(Hd){Hd.preventDefault?Hd.preventDefault():Hd.returnValue=!1}function O_(Hd){Hd.stopPropagation?Hd.stopPropagation():Hd.cancelBubble=!0}function S_(Hd){return Hd.defaultPrevented!=null?Hd.defaultPrevented:Hd.returnValue==!1}function Q_(Hd){r_(Hd),O_(Hd)}function t0(Hd){return Hd.target||Hd.srcElement}function R_(Hd){var Qd=Hd.which;return Qd==null&&(Hd.button&1?Qd=1:Hd.button&2?Qd=3:Hd.button&4&&(Qd=2)),Jd&&Hd.ctrlKey&&Qd==1&&(Qd=3),Qd}var P_=function(){if(vd&&Cd<9)return!1;var Hd=Cf("div");return"draggable"in Hd||"dragDrop"in Hd}(),Pg;function $0(Hd){if(Pg==null){var Qd=Cf("span","​");Of(Hd,Cf("span",[Qd,document.createTextNode("x")])),Hd.firstChild.offsetHeight!=0&&(Pg=Qd.offsetWidth<=1&&Qd.offsetHeight>2&&!(vd&&Cd<8))}var Ef=Pg?Cf("span","​"):Cf("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return Ef.setAttribute("cm-text",""),Ef}var z0;function c0(Hd){if(z0!=null)return z0;var Qd=Of(Hd,document.createTextNode("AخA")),Ef=Ff(Qd,0,1).getBoundingClientRect(),yf=Ff(Qd,1,2).getBoundingClientRect();return Df(Hd),!Ef||Ef.left==Ef.right?!1:z0=yf.right-Ef.right<3}var ih=` + +b`.split(/\n/).length!=3?function(Hd){for(var Qd=0,Ef=[],yf=Hd.length;Qd<=yf;){var Tf=Hd.indexOf(` +`,Qd);Tf==-1&&(Tf=Hd.length);var Bf=Hd.slice(Qd,Hd.charAt(Tf-1)=="\r"?Tf-1:Tf),ph=Bf.indexOf("\r");ph!=-1?(Ef.push(Bf.slice(0,ph)),Qd+=ph+1):(Ef.push(Bf),Qd=Tf+1)}return Ef}:function(Hd){return Hd.split(/\r\n?|\n/)},mm=window.getSelection?function(Hd){try{return Hd.selectionStart!=Hd.selectionEnd}catch{return!1}}:function(Hd){var Qd;try{Qd=Hd.ownerDocument.selection.createRange()}catch{}return!Qd||Qd.parentElement()!=Hd?!1:Qd.compareEndPoints("StartToEnd",Qd)!=0},Qh=function(){var Hd=Cf("div");return"oncopy"in Hd?!0:(Hd.setAttribute("oncopy","return;"),typeof Hd.oncopy=="function")}(),hm=null;function Fm(Hd){if(hm!=null)return hm;var Qd=Of(Hd,Cf("span","x")),Ef=Qd.getBoundingClientRect(),yf=Ff(Qd,0,1).getBoundingClientRect();return hm=Math.abs(Ef.left-yf.left)>1}var Pm={},Vm={};function Gm(Hd,Qd){arguments.length>2&&(Qd.dependencies=Array.prototype.slice.call(arguments,2)),Pm[Hd]=Qd}function Tm(Hd,Qd){Vm[Hd]=Qd}function lg(Hd){if(typeof Hd=="string"&&Vm.hasOwnProperty(Hd))Hd=Vm[Hd];else if(Hd&&typeof Hd.name=="string"&&Vm.hasOwnProperty(Hd.name)){var Qd=Vm[Hd.name];typeof Qd=="string"&&(Qd={name:Qd}),Hd=Im(Qd,Hd),Hd.name=Qd.name}else{if(typeof Hd=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(Hd))return lg("application/xml");if(typeof Hd=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(Hd))return lg("application/json")}return typeof Hd=="string"?{name:Hd}:Hd||{name:"null"}}function fg(Hd,Qd){Qd=lg(Qd);var Ef=Pm[Qd.name];if(!Ef)return fg(Hd,"text/plain");var yf=Ef(Hd,Qd);if(zg.hasOwnProperty(Qd.name)){var Tf=zg[Qd.name];for(var Bf in Tf)Tf.hasOwnProperty(Bf)&&(yf.hasOwnProperty(Bf)&&(yf["_"+Bf]=yf[Bf]),yf[Bf]=Tf[Bf])}if(yf.name=Qd.name,Qd.helperType&&(yf.helperType=Qd.helperType),Qd.modeProps)for(var ph in Qd.modeProps)yf[ph]=Qd.modeProps[ph];return yf}var zg={};function Tg(Hd,Qd){var Ef=zg.hasOwnProperty(Hd)?zg[Hd]:zg[Hd]={};Rf(Qd,Ef)}function Xg(Hd,Qd){if(Qd===!0)return Qd;if(Hd.copyState)return Hd.copyState(Qd);var Ef={};for(var yf in Qd){var Tf=Qd[yf];Tf instanceof Array&&(Tf=Tf.concat([])),Ef[yf]=Tf}return Ef}function D_(Hd,Qd){for(var Ef;Hd.innerMode&&(Ef=Hd.innerMode(Qd),!(!Ef||Ef.mode==Hd));)Qd=Ef.state,Hd=Ef.mode;return Ef||{mode:Hd,state:Qd}}function A_(Hd,Qd,Ef){return Hd.startState?Hd.startState(Qd,Ef):!0}var f_=function(Hd,Qd,Ef){this.pos=this.start=0,this.string=Hd,this.tabSize=Qd||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=Ef};f_.prototype.eol=function(){return this.pos>=this.string.length},f_.prototype.sol=function(){return this.pos==this.lineStart},f_.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},f_.prototype.next=function(){if(this.posQd},f_.prototype.eatSpace=function(){for(var Hd=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>Hd},f_.prototype.skipToEnd=function(){this.pos=this.string.length},f_.prototype.skipTo=function(Hd){var Qd=this.string.indexOf(Hd,this.pos);if(Qd>-1)return this.pos=Qd,!0},f_.prototype.backUp=function(Hd){this.pos-=Hd},f_.prototype.column=function(){return this.lastColumnPos0?null:(Bf&&Qd!==!1&&(this.pos+=Bf[0].length),Bf)}},f_.prototype.current=function(){return this.string.slice(this.start,this.pos)},f_.prototype.hideFirstChars=function(Hd,Qd){this.lineStart+=Hd;try{return Qd()}finally{this.lineStart-=Hd}},f_.prototype.lookAhead=function(Hd){var Qd=this.lineOracle;return Qd&&Qd.lookAhead(Hd)},f_.prototype.baseToken=function(){var Hd=this.lineOracle;return Hd&&Hd.baseToken(this.pos)};function Mg(Hd,Qd){if(Qd-=Hd.first,Qd<0||Qd>=Hd.size)throw new Error("There is no line "+(Qd+Hd.first)+" in the document.");for(var Ef=Hd;!Ef.lines;)for(var yf=0;;++yf){var Tf=Ef.children[yf],Bf=Tf.chunkSize();if(Qd=Hd.first&&QdEf?og(Ef,Mg(Hd,Ef).text.length):B0(Qd,Mg(Hd,Qd.line).text.length)}function B0(Hd,Qd){var Ef=Hd.ch;return Ef==null||Ef>Qd?og(Hd.line,Qd):Ef<0?og(Hd.line,0):Hd}function K_(Hd,Qd){for(var Ef=[],yf=0;yfthis.maxLookAhead&&(this.maxLookAhead=Hd),Qd},d0.prototype.baseToken=function(Hd){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=Hd;)this.baseTokenPos+=2;var Qd=this.baseTokens[this.baseTokenPos+1];return{type:Qd&&Qd.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-Hd}},d0.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},d0.fromSaved=function(Hd,Qd,Ef){return Qd instanceof E0?new d0(Hd,Xg(Hd.mode,Qd.state),Ef,Qd.lookAhead):new d0(Hd,Xg(Hd.mode,Qd),Ef)},d0.prototype.save=function(Hd){var Qd=Hd!==!1?Xg(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new E0(Qd,this.maxLookAhead):Qd};function nb(Hd,Qd,Ef,yf){var Tf=[Hd.state.modeGen],Bf={};lv(Hd,Qd.text,Hd.doc.mode,Ef,function(Kh,Rm){return Tf.push(Kh,Rm)},Bf,yf);for(var ph=Ef.state,Dh=function(Kh){Ef.baseTokens=Tf;var Rm=Hd.state.overlays[Kh],jm=1,Qm=0;Ef.state=!0,lv(Hd,Qd.text,Rm.mode,Ef,function(Xm,dg){for(var Sg=jm;QmXm&&Tf.splice(jm,1,Xm,Tf[jm+1],$g),jm+=2,Qm=Math.min(Xm,$g)}if(dg)if(Rm.opaque)Tf.splice(Sg,jm-Sg,Xm,"overlay "+dg),jm=Sg+2;else for(;SgHd.options.maxHighlightLength&&Xg(Hd.doc.mode,yf.state),Bf=nb(Hd,Qd,yf);Tf&&(yf.state=Tf),Qd.stateAfter=yf.save(!Tf),Qd.styles=Bf.styles,Bf.classes?Qd.styleClasses=Bf.classes:Qd.styleClasses&&(Qd.styleClasses=null),Ef===Hd.doc.highlightFrontier&&(Hd.doc.modeFrontier=Math.max(Hd.doc.modeFrontier,++Hd.doc.highlightFrontier))}return Qd.styles}function S0(Hd,Qd,Ef){var yf=Hd.doc,Tf=Hd.display;if(!yf.mode.startState)return new d0(yf,!0,Qd);var Bf=Jv(Hd,Qd,Ef),ph=Bf>yf.first&&Mg(yf,Bf-1).stateAfter,Dh=ph?d0.fromSaved(yf,ph,Bf):new d0(yf,A_(yf.mode),Bf);return yf.iter(Bf,Qd,function(Fh){ib(Hd,Fh.text,Dh);var Kh=Dh.line;Fh.stateAfter=Kh==Qd-1||Kh%5==0||Kh>=Tf.viewFrom&&KhQd.start)return Bf}throw new Error("Mode "+Hd.name+" failed to advance stream.")}var i_=function(Hd,Qd,Ef){this.start=Hd.start,this.end=Hd.pos,this.string=Hd.current(),this.type=Qd||null,this.state=Ef};function Ry(Hd,Qd,Ef,yf){var Tf=Hd.doc,Bf=Tf.mode,ph;Qd=u_(Tf,Qd);var Dh=Mg(Tf,Qd.line),Fh=S0(Hd,Qd.line,Ef),Kh=new f_(Dh.text,Hd.options.tabSize,Fh),Rm;for(yf&&(Rm=[]);(yf||Kh.posHd.options.maxHighlightLength?(Dh=!1,ph&&ib(Hd,Qd,yf,Rm.pos),Rm.pos=Qd.length,jm=null):jm=Kb(Iy(Ef,Rm,yf.state,Qm),Bf),Qm){var Xm=Qm[0].name;Xm&&(jm="m-"+(jm?Xm+" "+jm:Xm))}if(!Dh||Kh!=jm){for(;Fhph;--Dh){if(Dh<=Bf.first)return Bf.first;var Fh=Mg(Bf,Dh-1),Kh=Fh.stateAfter;if(Kh&&(!Ef||Dh+(Kh instanceof E0?Kh.lookAhead:0)<=Bf.modeFrontier))return Dh;var Rm=_h(Fh.text,null,Hd.options.tabSize);(Tf==null||yf>Rm)&&(Tf=Dh-1,yf=Rm)}return Tf}function Zv(Hd,Qd){if(Hd.modeFrontier=Math.min(Hd.modeFrontier,Qd),!(Hd.highlightFrontierEf;yf--){var Tf=Mg(Hd,yf).stateAfter;if(Tf&&(!(Tf instanceof E0)||yf+Tf.lookAhead=Qd:Bf.to>Qd);(yf||(yf=[])).push(new Qb(ph,Bf.from,Fh?null:Bf.to))}}return yf}function pS(Hd,Qd,Ef){var yf;if(Hd)for(var Tf=0;Tf=Qd:Bf.to>Qd);if(Dh||Bf.from==Qd&&ph.type=="bookmark"&&(!Ef||Bf.marker.insertLeft)){var Fh=Bf.from==null||(ph.inclusiveLeft?Bf.from<=Qd:Bf.from0&&Dh)for(var Jg=0;Jg0)){var Rm=[Fh,1],jm=Fg(Kh.from,Dh.from),Qm=Fg(Kh.to,Dh.to);(jm<0||!ph.inclusiveLeft&&!jm)&&Rm.push({from:Kh.from,to:Dh.from}),(Qm>0||!ph.inclusiveRight&&!Qm)&&Rm.push({from:Dh.to,to:Kh.to}),Tf.splice.apply(Tf,Rm),Fh+=Rm.length-3}}return Tf}function Lg(Hd){var Qd=Hd.markedSpans;if(Qd){for(var Ef=0;EfQd)&&(!yf||BE(yf,Bf.marker)<0)&&(yf=Bf.marker)}return yf}function FE(Hd,Qd,Ef,yf,Tf){var Bf=Mg(Hd,Qd),ph=p0&&Bf.markedSpans;if(ph)for(var Dh=0;Dh=0&&jm<=0||Rm<=0&&jm>=0)&&(Rm<=0&&(Fh.marker.inclusiveRight&&Tf.inclusiveLeft?Fg(Kh.to,Ef)>=0:Fg(Kh.to,Ef)>0)||Rm>=0&&(Fh.marker.inclusiveRight&&Tf.inclusiveLeft?Fg(Kh.from,yf)<=0:Fg(Kh.from,yf)<0)))return!0}}}function j_(Hd){for(var Qd;Qd=E1(Hd);)Hd=Qd.find(-1,!0).line;return Hd}function UE(Hd){for(var Qd;Qd=dv(Hd);)Hd=Qd.find(1,!0).line;return Hd}function Jb(Hd){for(var Qd,Ef;Qd=dv(Hd);)Hd=Qd.find(1,!0).line,(Ef||(Ef=[])).push(Hd);return Ef}function J_(Hd,Qd){var Ef=Mg(Hd,Qd),yf=j_(Ef);return Ef==yf?Qd:Hh(yf)}function sb(Hd,Qd){if(Qd>Hd.lastLine())return Qd;var Ef=Mg(Hd,Qd),yf;if(!o0(Hd,Ef))return Qd;for(;yf=dv(Ef);)Ef=yf.find(1,!0).line;return Hh(Ef)+1}function o0(Hd,Qd){var Ef=p0&&Qd.markedSpans;if(Ef){for(var yf=void 0,Tf=0;TfQd.maxLineLength&&(Qd.maxLineLength=Tf,Qd.maxLine=yf)})}var yb=function(Hd,Qd,Ef){this.text=Hd,q_(this,Qd),this.height=Ef?Ef(this):1};yb.prototype.lineNo=function(){return Hh(this)},v_(yb);function x1(Hd,Qd,Ef,yf){Hd.text=Qd,Hd.stateAfter&&(Hd.stateAfter=null),Hd.styles&&(Hd.styles=null),Hd.order!=null&&(Hd.order=null),Lg(Hd),q_(Hd,Ef);var Tf=yf?yf(Hd):1;Tf!=Hd.height&&s_(Hd,Tf)}function q0(Hd){Hd.parent=null,Lg(Hd)}var jE={},Y0={};function T1(Hd,Qd){if(!Hd||/^\s*$/.test(Hd))return null;var Ef=Qd.addModeClass?Y0:jE;return Ef[Hd]||(Ef[Hd]=Hd.replace(/\S+/g,"cm-$&"))}function mv(Hd,Qd){var Ef=If("span",null,null,wd?"padding-right: .1px":null),yf={pre:If("pre",[Ef],"CodeMirror-line"),content:Ef,col:0,pos:0,cm:Hd,trailingSpace:!1,splitSpaces:Hd.getOption("lineWrapping")};Qd.measure={};for(var Tf=0;Tf<=(Qd.rest?Qd.rest.length:0);Tf++){var Bf=Tf?Qd.rest[Tf-1]:Qd.line,ph=void 0;yf.pos=0,yf.addToken=rE,c0(Hd.display.measure)&&(ph=Ym(Bf,Hd.doc.direction))&&(yf.addToken=X_(yf.addToken,ph)),yf.map=[];var Dh=Qd!=Hd.display.externalMeasured&&Hh(Bf);HE(Bf,yf,Pb(Hd,Bf,Dh)),Bf.styleClasses&&(Bf.styleClasses.bgClass&&(yf.bgClass=Mh(Bf.styleClasses.bgClass,yf.bgClass||"")),Bf.styleClasses.textClass&&(yf.textClass=Mh(Bf.styleClasses.textClass,yf.textClass||""))),yf.map.length==0&&yf.map.push(0,0,yf.content.appendChild($0(Hd.display.measure))),Tf==0?(Qd.measure.map=yf.map,Qd.measure.cache={}):((Qd.measure.maps||(Qd.measure.maps=[])).push(yf.map),(Qd.measure.caches||(Qd.measure.caches=[])).push({}))}if(wd){var Fh=yf.content.lastChild;(/\bcm-tab\b/.test(Fh.className)||Fh.querySelector&&Fh.querySelector(".cm-tab"))&&(yf.content.className="cm-tab-wrap-hack")}return kg(Hd,"renderLine",Hd,Qd.line,yf.pre),yf.pre.className&&(yf.textClass=Mh(yf.pre.className,yf.textClass||"")),yf}function Lb(Hd){var Qd=Cf("span","•","cm-invalidchar");return Qd.title="\\u"+Hd.charCodeAt(0).toString(16),Qd.setAttribute("aria-label",Qd.title),Qd}function rE(Hd,Qd,Ef,yf,Tf,Bf,ph){if(Qd){var Dh=Hd.splitSpaces?nE(Qd,Hd.trailingSpace):Qd,Fh=Hd.cm.state.specialChars,Kh=!1,Rm;if(!Fh.test(Qd))Hd.col+=Qd.length,Rm=document.createTextNode(Dh),Hd.map.push(Hd.pos,Hd.pos+Qd.length,Rm),vd&&Cd<9&&(Kh=!0),Hd.pos+=Qd.length;else{Rm=document.createDocumentFragment();for(var jm=0;;){Fh.lastIndex=jm;var Qm=Fh.exec(Qd),Xm=Qm?Qm.index-jm:Qd.length-jm;if(Xm){var dg=document.createTextNode(Dh.slice(jm,jm+Xm));vd&&Cd<9?Rm.appendChild(Cf("span",[dg])):Rm.appendChild(dg),Hd.map.push(Hd.pos,Hd.pos+Xm,dg),Hd.col+=Xm,Hd.pos+=Xm}if(!Qm)break;jm+=Xm+1;var Sg=void 0;if(Qm[0]==" "){var $g=Hd.cm.options.tabSize,Vg=$g-Hd.col%$g;Sg=Rm.appendChild(Cf("span",Lh(Vg),"cm-tab")),Sg.setAttribute("role","presentation"),Sg.setAttribute("cm-text"," "),Hd.col+=Vg}else Qm[0]=="\r"||Qm[0]==` +`?(Sg=Rm.appendChild(Cf("span",Qm[0]=="\r"?"␍":"␤","cm-invalidchar")),Sg.setAttribute("cm-text",Qm[0]),Hd.col+=1):(Sg=Hd.cm.options.specialCharPlaceholder(Qm[0]),Sg.setAttribute("cm-text",Qm[0]),vd&&Cd<9?Rm.appendChild(Cf("span",[Sg])):Rm.appendChild(Sg),Hd.col+=1);Hd.map.push(Hd.pos,Hd.pos+1,Sg),Hd.pos++}}if(Hd.trailingSpace=Dh.charCodeAt(Qd.length-1)==32,Ef||yf||Tf||Kh||Bf||ph){var Yg=Ef||"";yf&&(Yg+=yf),Tf&&(Yg+=Tf);var Gg=Cf("span",[Rm],Yg,Bf);if(ph)for(var Jg in ph)ph.hasOwnProperty(Jg)&&Jg!="style"&&Jg!="class"&&Gg.setAttribute(Jg,ph[Jg]);return Hd.content.appendChild(Gg)}Hd.content.appendChild(Rm)}}function nE(Hd,Qd){if(Hd.length>1&&!/ /.test(Hd))return Hd;for(var Ef=Qd,yf="",Tf=0;TfKh&&jm.from<=Kh));Qm++);if(jm.to>=Rm)return Hd(Ef,yf,Tf,Bf,ph,Dh,Fh);Hd(Ef,yf.slice(0,jm.to-Kh),Tf,Bf,null,Dh,Fh),Bf=null,yf=yf.slice(jm.to-Kh),Kh=jm.to}}}function vb(Hd,Qd,Ef,yf){var Tf=!yf&&Ef.widgetNode;Tf&&Hd.map.push(Hd.pos,Hd.pos+Qd,Tf),!yf&&Hd.cm.display.input.needsContentAttribute&&(Tf||(Tf=Hd.content.appendChild(document.createElement("span"))),Tf.setAttribute("cm-marker",Ef.id)),Tf&&(Hd.cm.display.input.setUneditable(Tf),Hd.content.appendChild(Tf)),Hd.pos+=Qd,Hd.trailingSpace=!1}function HE(Hd,Qd,Ef){var yf=Hd.markedSpans,Tf=Hd.text,Bf=0;if(!yf){for(var ph=1;phFh||E_.collapsed&&n_.to==Fh&&n_.from==Fh)){if(n_.to!=null&&n_.to!=Fh&&Xm>n_.to&&(Xm=n_.to,Sg=""),E_.className&&(dg+=" "+E_.className),E_.css&&(Qm=(Qm?Qm+";":"")+E_.css),E_.startStyle&&n_.from==Fh&&($g+=" "+E_.startStyle),E_.endStyle&&n_.to==Xm&&(Jg||(Jg=[])).push(E_.endStyle,n_.to),E_.title&&((Yg||(Yg={})).title=E_.title),E_.attributes)for(var G_ in E_.attributes)(Yg||(Yg={}))[G_]=E_.attributes[G_];E_.collapsed&&(!Vg||BE(Vg.marker,E_)<0)&&(Vg=n_)}else n_.from>Fh&&Xm>n_.from&&(Xm=n_.from)}if(Jg)for(var u0=0;u0=Dh)break;for(var i0=Math.min(Dh,Xm);;){if(Rm){var f0=Fh+Rm.length;if(!Vg){var h0=f0>i0?Rm.slice(0,i0-Fh):Rm;Qd.addToken(Qd,h0,jm?jm+dg:dg,$g,Fh+h0.length==Xm?Sg:"",Qm,Yg)}if(f0>=i0){Rm=Rm.slice(i0-Fh),Fh=i0;break}Fh=f0,$g=""}Rm=Tf.slice(Bf,Bf=Ef[Kh++]),jm=T1(Ef[Kh++],Qd.cm.options)}}}function C1(Hd,Qd,Ef){this.line=Qd,this.rest=Jb(Qd),this.size=this.rest?Hh(Ih(this.rest))-Ef+1:1,this.node=this.text=null,this.hidden=o0(Hd,Qd)}function My(Hd,Qd,Ef){for(var yf=[],Tf,Bf=Qd;Bf2&&Bf.push((Fh.bottom+Kh.top)/2-Ef.top)}}Bf.push(Ef.bottom-Ef.top)}}function ex(Hd,Qd,Ef){if(Hd.line==Qd)return{map:Hd.measure.map,cache:Hd.measure.cache};if(Hd.rest){for(var yf=0;yfEf)return{map:Hd.measure.maps[Tf],cache:Hd.measure.caches[Tf],before:!0}}}function lT(Hd,Qd){Qd=j_(Qd);var Ef=Hh(Qd),yf=Hd.display.externalMeasured=new C1(Hd.doc,Qd,Ef);yf.lineN=Ef;var Tf=yf.built=mv(Hd,yf);return yf.text=Tf.pre,Of(Hd.display.lineMeasure,Tf.pre),yf}function w1(Hd,Qd,Ef,yf){return Q0(Hd,X0(Hd,Qd),Ef,yf)}function D1(Hd,Qd){if(Qd>=Hd.display.viewFrom&&Qd=Ef.lineN&&QdQd)&&(Bf=Fh-Dh,Tf=Bf-1,Qd>=Fh&&(ph="right")),Tf!=null){if(yf=Hd[Kh+2],Dh==Fh&&Ef==(yf.insertLeft?"left":"right")&&(ph=Ef),Ef=="left"&&Tf==0)for(;Kh&&Hd[Kh-2]==Hd[Kh-3]&&Hd[Kh-1].insertLeft;)yf=Hd[(Kh-=3)+2],ph="left";if(Ef=="right"&&Tf==Fh-Dh)for(;Kh=0&&(Ef=Hd[Tf]).left==Ef.right;Tf--);return Ef}function oE(Hd,Qd,Ef,yf){var Tf=rx(Qd.map,Ef,yf),Bf=Tf.node,ph=Tf.start,Dh=Tf.end,Fh=Tf.collapse,Kh;if(Bf.nodeType==3){for(var Rm=0;Rm<4;Rm++){for(;ph&&jh(Qd.line.text.charAt(Tf.coverStart+ph));)--ph;for(;Tf.coverStart+Dh0&&(Fh=yf="right");var jm;Hd.options.lineWrapping&&(jm=Bf.getClientRects()).length>1?Kh=jm[yf=="right"?jm.length-1:0]:Kh=Bf.getBoundingClientRect()}if(vd&&Cd<9&&!ph&&(!Kh||!Kh.left&&!Kh.right)){var Qm=Bf.parentNode.getClientRects()[0];Qm?Kh={left:Qm.left,right:Qm.left+ny(Hd.display),top:Qm.top,bottom:Qm.bottom}:Kh=tx}for(var Xm=Kh.top-Qd.rect.top,dg=Kh.bottom-Qd.rect.top,Sg=(Xm+dg)/2,$g=Qd.view.measure.heights,Vg=0;Vg<$g.length-1&&!(Sg<$g[Vg]);Vg++);var Yg=Vg?$g[Vg-1]:0,Gg=$g[Vg],Jg={left:(Fh=="right"?Kh.right:Kh.left)-Qd.rect.left,right:(Fh=="left"?Kh.left:Kh.right)-Qd.rect.left,top:Yg,bottom:Gg};return!Kh.left&&!Kh.right&&(Jg.bogus=!0),Hd.options.singleCursorHeightPerLine||(Jg.rtop=Xm,Jg.rbottom=dg),Jg}function Eb(Hd,Qd){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Fm(Hd))return Qd;var Ef=screen.logicalXDPI/screen.deviceXDPI,yf=screen.logicalYDPI/screen.deviceYDPI;return{left:Qd.left*Ef,right:Qd.right*Ef,top:Qd.top*yf,bottom:Qd.bottom*yf}}function mS(Hd){if(Hd.measure&&(Hd.measure.cache={},Hd.measure.heights=null,Hd.rest))for(var Qd=0;Qd=yf.text.length?(Fh=yf.text.length,Kh="before"):Fh<=0&&(Fh=0,Kh="after"),!Dh)return ph(Kh=="before"?Fh-1:Fh,Kh=="before");function Rm(dg,Sg,$g){var Vg=Dh[Sg],Yg=Vg.level==1;return ph($g?dg-1:dg,Yg!=$g)}var jm=_m(Dh,Fh,Kh),Qm=Wh,Xm=Rm(Fh,jm,Kh=="before");return Qm!=null&&(Xm.other=Rm(Fh,Qm,Kh!="before")),Xm}function t_(Hd,Qd){var Ef=0;Qd=u_(Hd.doc,Qd),Hd.options.lineWrapping||(Ef=ny(Hd.display)*Qd.ch);var yf=Mg(Hd.doc,Qd.line),Tf=ob(yf)+x0(Hd.display);return{left:Ef,right:Ef,top:Tf,bottom:Tf+yf.height}}function b_(Hd,Qd,Ef,yf,Tf){var Bf=og(Hd,Qd,Ef);return Bf.xRel=Tf,yf&&(Bf.outside=yf),Bf}function k_(Hd,Qd,Ef){var yf=Hd.doc;if(Ef+=Hd.display.viewOffset,Ef<0)return b_(yf.first,0,null,-1,-1);var Tf=Mm(yf,Ef),Bf=yf.first+yf.size-1;if(Tf>Bf)return b_(yf.first+yf.size-1,Mg(yf,Bf).text.length,null,1,1);Qd<0&&(Qd=0);for(var ph=Mg(yf,Tf);;){var Dh=cT(Hd,ph,Tf,Qd,Ef),Fh=S1(ph,Dh.ch+(Dh.xRel>0||Dh.outside>0?1:0));if(!Fh)return Dh;var Kh=Fh.find(1);if(Kh.line==Tf)return Kh;ph=Mg(yf,Tf=Kh.line)}}function _0(Hd,Qd,Ef,yf){yf-=gS(Qd);var Tf=Qd.text.length,Bf=$f(function(ph){return Q0(Hd,Ef,ph-1).bottom<=yf},Tf,0);return Tf=$f(function(ph){return Q0(Hd,Ef,ph).top>yf},Bf,Tf),{begin:Bf,end:Tf}}function z_(Hd,Qd,Ef,yf){Ef||(Ef=X0(Hd,Qd));var Tf=Zb(Hd,Qd,Q0(Hd,Ef,yf),"line").top;return _0(Hd,Qd,Ef,Tf)}function GE(Hd,Qd,Ef,yf){return Hd.bottom<=Ef?!1:Hd.top>Ef?!0:(yf?Hd.left:Hd.right)>Qd}function cT(Hd,Qd,Ef,yf,Tf){Tf-=ob(Qd);var Bf=X0(Hd,Qd),ph=gS(Qd),Dh=0,Fh=Qd.text.length,Kh=!0,Rm=Ym(Qd,Hd.doc.direction);if(Rm){var jm=(Hd.options.lineWrapping?N1:ub)(Hd,Qd,Ef,Bf,Rm,yf,Tf);Kh=jm.level!=1,Dh=Kh?jm.from:jm.to-1,Fh=Kh?jm.to:jm.from-1}var Qm=null,Xm=null,dg=$f(function(a_){var n_=Q0(Hd,Bf,a_);return n_.top+=ph,n_.bottom+=ph,GE(n_,yf,Tf,!1)?(n_.top<=Tf&&n_.left<=yf&&(Qm=a_,Xm=n_),!0):!1},Dh,Fh),Sg,$g,Vg=!1;if(Xm){var Yg=yf-Xm.left=Jg.bottom?1:0}return dg=Pf(Qd.text,dg,1),b_(Ef,dg,$g,Vg,yf-Sg)}function ub(Hd,Qd,Ef,yf,Tf,Bf,ph){var Dh=$f(function(jm){var Qm=Tf[jm],Xm=Qm.level!=1;return GE(ug(Hd,og(Ef,Xm?Qm.to:Qm.from,Xm?"before":"after"),"line",Qd,yf),Bf,ph,!0)},0,Tf.length-1),Fh=Tf[Dh];if(Dh>0){var Kh=Fh.level!=1,Rm=ug(Hd,og(Ef,Kh?Fh.from:Fh.to,Kh?"after":"before"),"line",Qd,yf);GE(Rm,Bf,ph,!0)&&Rm.top>ph&&(Fh=Tf[Dh-1])}return Fh}function N1(Hd,Qd,Ef,yf,Tf,Bf,ph){var Dh=_0(Hd,Qd,yf,ph),Fh=Dh.begin,Kh=Dh.end;/\s/.test(Qd.text.charAt(Kh-1))&&Kh--;for(var Rm=null,jm=null,Qm=0;Qm=Kh||Xm.to<=Fh)){var dg=Xm.level!=1,Sg=Q0(Hd,yf,dg?Math.min(Kh,Xm.to)-1:Math.max(Fh,Xm.from)).right,$g=Sg$g)&&(Rm=Xm,jm=$g)}}return Rm||(Rm=Tf[Tf.length-1]),Rm.fromKh&&(Rm={from:Rm.from,to:Kh,level:Rm.level}),Rm}var yv;function Sb(Hd){if(Hd.cachedTextHeight!=null)return Hd.cachedTextHeight;if(yv==null){yv=Cf("pre",null,"CodeMirror-line-like");for(var Qd=0;Qd<49;++Qd)yv.appendChild(document.createTextNode("x")),yv.appendChild(Cf("br"));yv.appendChild(document.createTextNode("x"))}Of(Hd.measure,yv);var Ef=yv.offsetHeight/50;return Ef>3&&(Hd.cachedTextHeight=Ef),Df(Hd.measure),Ef||1}function ny(Hd){if(Hd.cachedCharWidth!=null)return Hd.cachedCharWidth;var Qd=Cf("span","xxxxxxxxxx"),Ef=Cf("pre",[Qd],"CodeMirror-line-like");Of(Hd.measure,Ef);var yf=Qd.getBoundingClientRect(),Tf=(yf.right-yf.left)/10;return Tf>2&&(Hd.cachedCharWidth=Tf),Tf||10}function lE(Hd){for(var Qd=Hd.display,Ef={},yf={},Tf=Qd.gutters.clientLeft,Bf=Qd.gutters.firstChild,ph=0;Bf;Bf=Bf.nextSibling,++ph){var Dh=Hd.display.gutterSpecs[ph].className;Ef[Dh]=Bf.offsetLeft+Bf.clientLeft+Tf,yf[Dh]=Bf.clientWidth}return{fixedPos:U_(Qd),gutterTotalWidth:Qd.gutters.offsetWidth,gutterLeft:Ef,gutterWidth:yf,wrapperWidth:Qd.wrapper.clientWidth}}function U_(Hd){return Hd.scroller.getBoundingClientRect().left-Hd.sizer.getBoundingClientRect().left}function ox(Hd){var Qd=Sb(Hd.display),Ef=Hd.options.lineWrapping,yf=Ef&&Math.max(5,Hd.display.scroller.clientWidth/ny(Hd.display)-3);return function(Tf){if(o0(Hd.doc,Tf))return 0;var Bf=0;if(Tf.widgets)for(var ph=0;ph0&&(Kh=Mg(Hd.doc,Fh.line).text).length==Fh.ch){var Rm=_h(Kh,Kh.length,Hd.options.tabSize)-Kh.length;Fh=og(Fh.line,Math.max(0,Math.round((Bf-iE(Hd.display).left)/ny(Hd.display))-Rm))}return Fh}function Ev(Hd,Qd){if(Qd>=Hd.display.viewTo||(Qd-=Hd.display.viewFrom,Qd<0))return null;for(var Ef=Hd.display.view,yf=0;yfQd)&&(Tf.updateLineNumbers=Qd),Hd.curOp.viewChanged=!0,Qd>=Tf.viewTo)p0&&J_(Hd.doc,Qd)Tf.viewFrom?xb(Hd):(Tf.viewFrom+=yf,Tf.viewTo+=yf);else if(Qd<=Tf.viewFrom&&Ef>=Tf.viewTo)xb(Hd);else if(Qd<=Tf.viewFrom){var Bf=Tb(Hd,Ef,Ef+yf,1);Bf?(Tf.view=Tf.view.slice(Bf.index),Tf.viewFrom=Bf.lineN,Tf.viewTo+=yf):xb(Hd)}else if(Ef>=Tf.viewTo){var ph=Tb(Hd,Qd,Qd,-1);ph?(Tf.view=Tf.view.slice(0,ph.index),Tf.viewTo=ph.lineN):xb(Hd)}else{var Dh=Tb(Hd,Qd,Qd,-1),Fh=Tb(Hd,Ef,Ef+yf,1);Dh&&Fh?(Tf.view=Tf.view.slice(0,Dh.index).concat(My(Hd,Dh.lineN,Fh.lineN)).concat(Tf.view.slice(Fh.index)),Tf.viewTo+=yf):xb(Hd)}var Kh=Tf.externalMeasured;Kh&&(Ef=Tf.lineN&&Qd=yf.viewTo)){var Bf=yf.view[Ev(Hd,Qd)];if(Bf.node!=null){var ph=Bf.changes||(Bf.changes=[]);sm(ph,Ef)==-1&&ph.push(Ef)}}}function xb(Hd){Hd.display.viewFrom=Hd.display.viewTo=Hd.doc.first,Hd.display.view=[],Hd.display.viewOffset=0}function Tb(Hd,Qd,Ef,yf){var Tf=Ev(Hd,Qd),Bf,ph=Hd.display.view;if(!p0||Ef==Hd.doc.first+Hd.doc.size)return{index:Tf,lineN:Ef};for(var Dh=Hd.display.viewFrom,Fh=0;Fh0){if(Tf==ph.length-1)return null;Bf=Dh+ph[Tf].size-Qd,Tf++}else Bf=Dh-Qd;Qd+=Bf,Ef+=Bf}for(;J_(Hd.doc,Ef)!=Ef;){if(Tf==(yf<0?0:ph.length-1))return null;Ef+=yf*ph[Tf-(yf<0?1:0)].size,Tf+=yf}return{index:Tf,lineN:Ef}}function R1(Hd,Qd,Ef){var yf=Hd.display,Tf=yf.view;Tf.length==0||Qd>=yf.viewTo||Ef<=yf.viewFrom?(yf.view=My(Hd,Qd,Ef),yf.viewFrom=Qd):(yf.viewFrom>Qd?yf.view=My(Hd,Qd,yf.viewFrom).concat(yf.view):yf.viewFromEf&&(yf.view=yf.view.slice(0,Ev(Hd,Ef)))),yf.viewTo=Ef}function _S(Hd){for(var Qd=Hd.display.view,Ef=0,yf=0;yf=Hd.display.viewTo||Fh.to().line0?ph:Hd.defaultCharWidth())+"px"}if(yf.other){var Dh=Ef.appendChild(Cf("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));Dh.style.display="",Dh.style.left=yf.other.left+"px",Dh.style.top=yf.other.top+"px",Dh.style.height=(yf.other.bottom-yf.other.top)*.85+"px"}}function Sv(Hd,Qd){return Hd.top-Qd.top||Hd.left-Qd.left}function lx(Hd,Qd,Ef){var yf=Hd.display,Tf=Hd.doc,Bf=document.createDocumentFragment(),ph=iE(Hd.display),Dh=ph.left,Fh=Math.max(yf.sizerWidth,_v(Hd)-yf.sizer.offsetLeft)-ph.right,Kh=Tf.direction=="ltr";function Rm(Gg,Jg,a_,n_){Jg<0&&(Jg=0),Jg=Math.round(Jg),n_=Math.round(n_),Bf.appendChild(Cf("div",null,"CodeMirror-selected","position: absolute; left: "+Gg+`px; + top: `+Jg+"px; width: "+(a_??Fh-Gg)+`px; + height: `+(n_-Jg)+"px"))}function jm(Gg,Jg,a_){var n_=Mg(Tf,Gg),E_=n_.text.length,G_,u0;function Z_(h0,U0){return hg(Hd,og(Gg,h0),"div",n_,U0)}function i0(h0,U0,k0){var y0=z_(Hd,n_,null,h0),m0=U0=="ltr"==(k0=="after")?"left":"right",a0=k0=="after"?y0.begin:y0.end-(/\s/.test(n_.text.charAt(y0.end-1))?2:1);return Z_(a0,m0)[m0]}var f0=Ym(n_,Tf.direction);return Nh(f0,Jg||0,a_??E_,function(h0,U0,k0,y0){var m0=k0=="ltr",a0=Z_(h0,m0?"left":"right"),V0=Z_(U0-1,m0?"right":"left"),kE=Jg==null&&h0==0,nv=a_==null&&U0==E_,P0=y0==0,Vb=!f0||y0==f0.length-1;if(V0.top-a0.top<=3){var D0=(Kh?kE:nv)&&P0,XS=(Kh?nv:kE)&&Vb,zb=D0?Dh:(m0?a0:V0).left,iv=XS?Fh:(m0?V0:a0).right;Rm(zb,a0.top,iv-zb,a0.bottom)}else{var sv,j0,$E,QS;m0?(sv=Kh&&kE&&P0?Dh:a0.left,j0=Kh?Fh:i0(h0,k0,"before"),$E=Kh?Dh:i0(U0,k0,"after"),QS=Kh&&nv&&Vb?Fh:V0.right):(sv=Kh?i0(h0,k0,"before"):Dh,j0=!Kh&&kE&&P0?Fh:a0.right,$E=!Kh&&nv&&Vb?Dh:V0.left,QS=Kh?i0(U0,k0,"after"):Fh),Rm(sv,a0.top,j0-sv,a0.bottom),a0.bottom0?Qd.blinker=setInterval(function(){Hd.hasFocus()||cE(Hd),Qd.cursorDiv.style.visibility=(Ef=!Ef)?"":"hidden"},Hd.options.cursorBlinkRate):Hd.options.cursorBlinkRate<0&&(Qd.cursorDiv.style.visibility="hidden")}}function By(Hd){Hd.hasFocus()||(Hd.display.input.focus(),Hd.state.focused||vS(Hd))}function uE(Hd){Hd.state.delayingBlurEvent=!0,setTimeout(function(){Hd.state.delayingBlurEvent&&(Hd.state.delayingBlurEvent=!1,Hd.state.focused&&cE(Hd))},100)}function vS(Hd,Qd){Hd.state.delayingBlurEvent&&!Hd.state.draggingText&&(Hd.state.delayingBlurEvent=!1),Hd.options.readOnly!="nocursor"&&(Hd.state.focused||(kg(Hd,"focus",Hd,Qd),Hd.state.focused=!0,yh(Hd.display.wrapper,"CodeMirror-focused"),!Hd.curOp&&Hd.display.selForContextMenu!=Hd.doc.sel&&(Hd.display.input.reset(),wd&&setTimeout(function(){return Hd.display.input.reset(!0)},20)),Hd.display.input.receivedFocus()),xv(Hd))}function cE(Hd,Qd){Hd.state.delayingBlurEvent||(Hd.state.focused&&(kg(Hd,"blur",Hd,Qd),Hd.state.focused=!1,Af(Hd.display.wrapper,"CodeMirror-focused")),clearInterval(Hd.display.blinker),setTimeout(function(){Hd.state.focused||(Hd.display.shift=!1)},150))}function k1(Hd){for(var Qd=Hd.display,Ef=Qd.lineDiv.offsetTop,yf=Math.max(0,Qd.scroller.getBoundingClientRect().top),Tf=Qd.lineDiv.getBoundingClientRect().top,Bf=0,ph=0;ph.005||Xm<-.005)&&(TfHd.display.sizerWidth){var Sg=Math.ceil(Rm/ny(Hd.display));Sg>Hd.display.maxLineLength&&(Hd.display.maxLineLength=Sg,Hd.display.maxLine=Dh.line,Hd.display.maxLineChanged=!0)}}}Math.abs(Bf)>2&&(Qd.scroller.scrollTop+=Bf)}function VE(Hd){if(Hd.widgets)for(var Qd=0;Qd=ph&&(Bf=Mm(Qd,ob(Mg(Qd,Fh))-Hd.wrapper.clientHeight),ph=Fh)}return{from:Bf,to:Math.max(ph,Bf+1)}}function ES(Hd,Qd){if(!Kg(Hd,"scrollCursorIntoView")){var Ef=Hd.display,yf=Ef.sizer.getBoundingClientRect(),Tf=null,Bf=Ef.wrapper.ownerDocument;if(Qd.top+yf.top<0?Tf=!0:Qd.bottom+yf.top>(Bf.defaultView.innerHeight||Bf.documentElement.clientHeight)&&(Tf=!1),Tf!=null&&!zd){var ph=Cf("div","​",null,`position: absolute; + top: `+(Qd.top-Ef.viewOffset-x0(Hd.display))+`px; + height: `+(Qd.bottom-Qd.top+Bb(Hd)+Ef.barHeight)+`px; + left: `+Qd.left+"px; width: "+Math.max(2,Qd.right-Qd.left)+"px;");Hd.display.lineSpace.appendChild(ph),ph.scrollIntoView(Tf),Hd.display.lineSpace.removeChild(ph)}}}function dT(Hd,Qd,Ef,yf){yf==null&&(yf=0);var Tf;!Hd.options.lineWrapping&&Qd==Ef&&(Ef=Qd.sticky=="before"?og(Qd.line,Qd.ch+1,"before"):Qd,Qd=Qd.ch?og(Qd.line,Qd.sticky=="before"?Qd.ch-1:Qd.ch,"after"):Qd);for(var Bf=0;Bf<5;Bf++){var ph=!1,Dh=ug(Hd,Qd),Fh=!Ef||Ef==Qd?Dh:ug(Hd,Ef);Tf={left:Math.min(Dh.left,Fh.left),top:Math.min(Dh.top,Fh.top)-yf,right:Math.max(Dh.left,Fh.left),bottom:Math.max(Dh.bottom,Fh.bottom)+yf};var Kh=SS(Hd,Tf),Rm=Hd.doc.scrollTop,jm=Hd.doc.scrollLeft;if(Kh.scrollTop!=null&&(zE(Hd,Kh.scrollTop),Math.abs(Hd.doc.scrollTop-Rm)>1&&(ph=!0)),Kh.scrollLeft!=null&&(Cb(Hd,Kh.scrollLeft),Math.abs(Hd.doc.scrollLeft-jm)>1&&(ph=!0)),!ph)break}return Tf}function ux(Hd,Qd){var Ef=SS(Hd,Qd);Ef.scrollTop!=null&&zE(Hd,Ef.scrollTop),Ef.scrollLeft!=null&&Cb(Hd,Ef.scrollLeft)}function SS(Hd,Qd){var Ef=Hd.display,yf=Sb(Hd.display);Qd.top<0&&(Qd.top=0);var Tf=Hd.curOp&&Hd.curOp.scrollTop!=null?Hd.curOp.scrollTop:Ef.scroller.scrollTop,Bf=hS(Hd),ph={};Qd.bottom-Qd.top>Bf&&(Qd.bottom=Qd.top+Bf);var Dh=Hd.doc.height+gv(Ef),Fh=Qd.topDh-yf;if(Qd.topTf+Bf){var Rm=Math.min(Qd.top,(Kh?Dh:Qd.bottom)-Bf);Rm!=Tf&&(ph.scrollTop=Rm)}var jm=Hd.options.fixedGutter?0:Ef.gutters.offsetWidth,Qm=Hd.curOp&&Hd.curOp.scrollLeft!=null?Hd.curOp.scrollLeft:Ef.scroller.scrollLeft-jm,Xm=_v(Hd)-Ef.gutters.offsetWidth,dg=Qd.right-Qd.left>Xm;return dg&&(Qd.right=Qd.left+Xm),Qd.left<10?ph.scrollLeft=0:Qd.leftXm+Qm-3&&(ph.scrollLeft=Qd.right+(dg?0:10)-Xm),ph}function xS(Hd,Qd){Qd!=null&&($1(Hd),Hd.curOp.scrollTop=(Hd.curOp.scrollTop==null?Hd.doc.scrollTop:Hd.curOp.scrollTop)+Qd)}function e0(Hd){$1(Hd);var Qd=Hd.getCursor();Hd.curOp.scrollToPos={from:Qd,to:Qd,margin:Hd.options.cursorScrollMargin}}function b0(Hd,Qd,Ef){(Qd!=null||Ef!=null)&&$1(Hd),Qd!=null&&(Hd.curOp.scrollLeft=Qd),Ef!=null&&(Hd.curOp.scrollTop=Ef)}function pT(Hd,Qd){$1(Hd),Hd.curOp.scrollToPos=Qd}function $1(Hd){var Qd=Hd.curOp.scrollToPos;if(Qd){Hd.curOp.scrollToPos=null;var Ef=t_(Hd,Qd.from),yf=t_(Hd,Qd.to);TS(Hd,Ef,yf,Qd.margin)}}function TS(Hd,Qd,Ef,yf){var Tf=SS(Hd,{left:Math.min(Qd.left,Ef.left),top:Math.min(Qd.top,Ef.top)-yf,right:Math.max(Qd.right,Ef.right),bottom:Math.max(Qd.bottom,Ef.bottom)+yf});b0(Hd,Tf.scrollLeft,Tf.scrollTop)}function zE(Hd,Qd){Math.abs(Hd.doc.scrollTop-Qd)<2||(hd||Ab(Hd,{top:Qd}),M1(Hd,Qd,!0),hd&&Ab(Hd),KE(Hd,100))}function M1(Hd,Qd,Ef){Qd=Math.max(0,Math.min(Hd.display.scroller.scrollHeight-Hd.display.scroller.clientHeight,Qd)),!(Hd.display.scroller.scrollTop==Qd&&!Ef)&&(Hd.doc.scrollTop=Qd,Hd.display.scrollbars.setScrollTop(Qd),Hd.display.scroller.scrollTop!=Qd&&(Hd.display.scroller.scrollTop=Qd))}function Cb(Hd,Qd,Ef,yf){Qd=Math.max(0,Math.min(Qd,Hd.display.scroller.scrollWidth-Hd.display.scroller.clientWidth)),!((Ef?Qd==Hd.doc.scrollLeft:Math.abs(Hd.doc.scrollLeft-Qd)<2)&&!yf)&&(Hd.doc.scrollLeft=Qd,hx(Hd),Hd.display.scroller.scrollLeft!=Qd&&(Hd.display.scroller.scrollLeft=Qd),Hd.display.scrollbars.setScrollLeft(Qd))}function wv(Hd){var Qd=Hd.display,Ef=Qd.gutters.offsetWidth,yf=Math.round(Hd.doc.height+gv(Hd.display));return{clientHeight:Qd.scroller.clientHeight,viewHeight:Qd.wrapper.clientHeight,scrollWidth:Qd.scroller.scrollWidth,clientWidth:Qd.scroller.clientWidth,viewWidth:Qd.wrapper.clientWidth,barLeft:Hd.options.fixedGutter?Ef:0,docHeight:yf,scrollHeight:yf+Bb(Hd)+Qd.barHeight,nativeBarWidth:Qd.nativeBarWidth,gutterWidth:Ef}}var db=function(Hd,Qd,Ef){this.cm=Ef;var yf=this.vert=Cf("div",[Cf("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),Tf=this.horiz=Cf("div",[Cf("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");yf.tabIndex=Tf.tabIndex=-1,Hd(yf),Hd(Tf),sg(yf,"scroll",function(){yf.clientHeight&&Qd(yf.scrollTop,"vertical")}),sg(Tf,"scroll",function(){Tf.clientWidth&&Qd(Tf.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,vd&&Cd<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};db.prototype.update=function(Hd){var Qd=Hd.scrollWidth>Hd.clientWidth+1,Ef=Hd.scrollHeight>Hd.clientHeight+1,yf=Hd.nativeBarWidth;if(Ef){this.vert.style.display="block",this.vert.style.bottom=Qd?yf+"px":"0";var Tf=Hd.viewHeight-(Qd?yf:0);this.vert.firstChild.style.height=Math.max(0,Hd.scrollHeight-Hd.clientHeight+Tf)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(Qd){this.horiz.style.display="block",this.horiz.style.right=Ef?yf+"px":"0",this.horiz.style.left=Hd.barLeft+"px";var Bf=Hd.viewWidth-Hd.barLeft-(Ef?yf:0);this.horiz.firstChild.style.width=Math.max(0,Hd.scrollWidth-Hd.clientWidth+Bf)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&Hd.clientHeight>0&&(yf==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:Ef?yf:0,bottom:Qd?yf:0}},db.prototype.setScrollLeft=function(Hd){this.horiz.scrollLeft!=Hd&&(this.horiz.scrollLeft=Hd),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},db.prototype.setScrollTop=function(Hd){this.vert.scrollTop!=Hd&&(this.vert.scrollTop=Hd),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},db.prototype.zeroWidthHack=function(){var Hd=Jd&&!Yd?"12px":"18px";this.horiz.style.height=this.vert.style.width=Hd,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Ph,this.disableVert=new Ph},db.prototype.enableZeroWidthBar=function(Hd,Qd,Ef){Hd.style.visibility="";function yf(){var Tf=Hd.getBoundingClientRect(),Bf=Ef=="vert"?document.elementFromPoint(Tf.right-1,(Tf.top+Tf.bottom)/2):document.elementFromPoint((Tf.right+Tf.left)/2,Tf.bottom-1);Bf!=Hd?Hd.style.visibility="hidden":Qd.set(1e3,yf)}Qd.set(1e3,yf)},db.prototype.clear=function(){var Hd=this.horiz.parentNode;Hd.removeChild(this.horiz),Hd.removeChild(this.vert)};var oy=function(){};oy.prototype.update=function(){return{bottom:0,right:0}},oy.prototype.setScrollLeft=function(){},oy.prototype.setScrollTop=function(){},oy.prototype.clear=function(){};function Ub(Hd,Qd){Qd||(Qd=wv(Hd));var Ef=Hd.display.barWidth,yf=Hd.display.barHeight;WE(Hd,Qd);for(var Tf=0;Tf<4&&Ef!=Hd.display.barWidth||yf!=Hd.display.barHeight;Tf++)Ef!=Hd.display.barWidth&&Hd.options.lineWrapping&&k1(Hd),WE(Hd,wv(Hd)),Ef=Hd.display.barWidth,yf=Hd.display.barHeight}function WE(Hd,Qd){var Ef=Hd.display,yf=Ef.scrollbars.update(Qd);Ef.sizer.style.paddingRight=(Ef.barWidth=yf.right)+"px",Ef.sizer.style.paddingBottom=(Ef.barHeight=yf.bottom)+"px",Ef.heightForcer.style.borderBottom=yf.bottom+"px solid transparent",yf.right&&yf.bottom?(Ef.scrollbarFiller.style.display="block",Ef.scrollbarFiller.style.height=yf.bottom+"px",Ef.scrollbarFiller.style.width=yf.right+"px"):Ef.scrollbarFiller.style.display="",yf.bottom&&Hd.options.coverGutterNextToScrollbar&&Hd.options.fixedGutter?(Ef.gutterFiller.style.display="block",Ef.gutterFiller.style.height=yf.bottom+"px",Ef.gutterFiller.style.width=Qd.gutterWidth+"px"):Ef.gutterFiller.style.display=""}var Dv={native:db,null:oy};function dx(Hd){Hd.display.scrollbars&&(Hd.display.scrollbars.clear(),Hd.display.scrollbars.addClass&&Af(Hd.display.wrapper,Hd.display.scrollbars.addClass)),Hd.display.scrollbars=new Dv[Hd.options.scrollbarStyle](function(Qd){Hd.display.wrapper.insertBefore(Qd,Hd.display.scrollbarFiller),sg(Qd,"mousedown",function(){Hd.state.focused&&setTimeout(function(){return Hd.display.input.focus()},0)}),Qd.setAttribute("cm-not-content","true")},function(Qd,Ef){Ef=="horizontal"?Cb(Hd,Qd):zE(Hd,Qd)},Hd),Hd.display.scrollbars.addClass&&yh(Hd.display.wrapper,Hd.display.scrollbars.addClass)}var fT=0;function Rv(Hd){Hd.curOp={cm:Hd,viewChanged:!1,startHeight:Hd.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:++fT,markArrays:null},A1(Hd.curOp)}function $v(Hd){var Qd=Hd.curOp;Qd&&pf(Qd,function(Ef){for(var yf=0;yf=Ef.viewTo)||Ef.maxLineChanged&&Qd.options.lineWrapping,Hd.update=Hd.mustUpdate&&new jb(Qd,Hd.mustUpdate&&{top:Hd.scrollTop,ensure:Hd.scrollToPos},Hd.forceUpdate)}function YE(Hd){Hd.updatedDisplay=Hd.mustUpdate&&CS(Hd.cm,Hd.update)}function px(Hd){var Qd=Hd.cm,Ef=Qd.display;Hd.updatedDisplay&&k1(Qd),Hd.barMeasure=wv(Qd),Ef.maxLineChanged&&!Qd.options.lineWrapping&&(Hd.adjustWidthTo=w1(Qd,Ef.maxLine,Ef.maxLine.text.length).left+3,Qd.display.sizerWidth=Hd.adjustWidthTo,Hd.barMeasure.scrollWidth=Math.max(Ef.scroller.clientWidth,Ef.sizer.offsetLeft+Hd.adjustWidthTo+Bb(Qd)+Qd.display.barWidth),Hd.maxScrollLeft=Math.max(0,Ef.sizer.offsetLeft+Hd.adjustWidthTo-_v(Qd))),(Hd.updatedDisplay||Hd.selectionChanged)&&(Hd.preparedSelection=Ef.input.prepareSelection())}function gm(Hd){var Qd=Hd.cm;Hd.adjustWidthTo!=null&&(Qd.display.sizer.style.minWidth=Hd.adjustWidthTo+"px",Hd.maxScrollLeft=Hd.display.viewTo)){var Ef=+new Date+Hd.options.workTime,yf=S0(Hd,Qd.highlightFrontier),Tf=[];Qd.iter(yf.line,Math.min(Qd.first+Qd.size,Hd.display.viewTo+500),function(Bf){if(yf.line>=Hd.display.viewFrom){var ph=Bf.styles,Dh=Bf.text.length>Hd.options.maxHighlightLength?Xg(Qd.mode,yf.state):null,Fh=nb(Hd,Bf,yf,!0);Dh&&(yf.state=Dh),Bf.styles=Fh.styles;var Kh=Bf.styleClasses,Rm=Fh.classes;Rm?Bf.styleClasses=Rm:Kh&&(Bf.styleClasses=null);for(var jm=!ph||ph.length!=Bf.styles.length||Kh!=Rm&&(!Kh||!Rm||Kh.bgClass!=Rm.bgClass||Kh.textClass!=Rm.textClass),Qm=0;!jm&&QmEf)return KE(Hd,Hd.options.workDelay),!0}),Qd.highlightFrontier=yf.line,Qd.modeFrontier=Math.max(Qd.modeFrontier,yf.line),Tf.length&&M0(Hd,function(){for(var Bf=0;Bf=Ef.viewFrom&&Qd.visible.to<=Ef.viewTo&&(Ef.updateLineNumbers==null||Ef.updateLineNumbers>=Ef.viewTo)&&Ef.renderedView==Ef.view&&_S(Hd)==0)return!1;mx(Hd)&&(xb(Hd),Qd.dims=lE(Hd));var Tf=yf.first+yf.size,Bf=Math.max(Qd.visible.from-Hd.options.viewportMargin,yf.first),ph=Math.min(Tf,Qd.visible.to+Hd.options.viewportMargin);Ef.viewFromph&&Ef.viewTo-ph<20&&(ph=Math.min(Tf,Ef.viewTo)),p0&&(Bf=J_(Hd.doc,Bf),ph=sb(Hd.doc,ph));var Dh=Bf!=Ef.viewFrom||ph!=Ef.viewTo||Ef.lastWrapHeight!=Qd.wrapperHeight||Ef.lastWrapWidth!=Qd.wrapperWidth;R1(Hd,Bf,ph),Ef.viewOffset=ob(Mg(Hd.doc,Ef.viewFrom)),Hd.display.mover.style.top=Ef.viewOffset+"px";var Fh=_S(Hd);if(!Dh&&Fh==0&&!Qd.force&&Ef.renderedView==Ef.view&&(Ef.updateLineNumbers==null||Ef.updateLineNumbers>=Ef.viewTo))return!1;var Kh=yT(Hd);return Fh>4&&(Ef.lineDiv.style.display="none"),ET(Hd,Ef.updateLineNumbers,Qd.dims),Fh>4&&(Ef.lineDiv.style.display=""),Ef.renderedView=Ef.view,vT(Kh),Df(Ef.cursorDiv),Df(Ef.selectionDiv),Ef.gutters.style.height=Ef.sizer.style.minHeight=0,Dh&&(Ef.lastWrapHeight=Qd.wrapperHeight,Ef.lastWrapWidth=Qd.wrapperWidth,KE(Hd,400)),Ef.updateLineNumbers=null,!0}function fx(Hd,Qd){for(var Ef=Qd.viewport,yf=!0;;yf=!1){if(!yf||!Hd.options.lineWrapping||Qd.oldDisplayWidth==_v(Hd)){if(Ef&&Ef.top!=null&&(Ef={top:Math.min(Hd.doc.height+gv(Hd.display)-hS(Hd),Ef.top)}),Qd.visible=Cv(Hd.display,Hd.doc,Ef),Qd.visible.from>=Hd.display.viewFrom&&Qd.visible.to<=Hd.display.viewTo)break}else yf&&(Qd.visible=Cv(Hd.display,Hd.doc,Ef));if(!CS(Hd,Qd))break;k1(Hd);var Tf=wv(Hd);Ly(Hd),Ub(Hd,Tf),wS(Hd,Tf),Qd.force=!1}Qd.signal(Hd,"update",Hd),(Hd.display.viewFrom!=Hd.display.reportedViewFrom||Hd.display.viewTo!=Hd.display.reportedViewTo)&&(Qd.signal(Hd,"viewportChange",Hd,Hd.display.viewFrom,Hd.display.viewTo),Hd.display.reportedViewFrom=Hd.display.viewFrom,Hd.display.reportedViewTo=Hd.display.viewTo)}function Ab(Hd,Qd){var Ef=new jb(Hd,Qd);if(CS(Hd,Ef)){k1(Hd),fx(Hd,Ef);var yf=wv(Hd);Ly(Hd),Ub(Hd,yf),wS(Hd,yf),Ef.finish()}}function ET(Hd,Qd,Ef){var yf=Hd.display,Tf=Hd.options.lineNumbers,Bf=yf.lineDiv,ph=Bf.firstChild;function Dh(dg){var Sg=dg.nextSibling;return wd&&Jd&&Hd.display.currentWheelTarget==dg?dg.style.display="none":dg.parentNode.removeChild(dg),Sg}for(var Fh=yf.view,Kh=yf.viewFrom,Rm=0;Rm-1&&(Xm=!1),eh(Hd,jm,Kh,Ef)),Xm&&(Df(jm.lineNumber),jm.lineNumber.appendChild(document.createTextNode(Rg(Hd.options,Kh)))),ph=jm.node.nextSibling}Kh+=jm.size}for(;ph;)ph=Dh(ph)}function AS(Hd){var Qd=Hd.gutters.offsetWidth;Hd.sizer.style.marginLeft=Qd+"px",hf(Hd,"gutterChanged",Hd)}function wS(Hd,Qd){Hd.display.sizer.style.minHeight=Qd.docHeight+"px",Hd.display.heightForcer.style.top=Qd.docHeight+"px",Hd.display.gutters.style.height=Qd.docHeight+Hd.display.barHeight+Bb(Hd)+"px"}function hx(Hd){var Qd=Hd.display,Ef=Qd.view;if(!(!Qd.alignWidgets&&(!Qd.gutters.firstChild||!Hd.options.fixedGutter))){for(var yf=U_(Qd)-Qd.scroller.scrollLeft+Hd.doc.scrollLeft,Tf=Qd.gutters.offsetWidth,Bf=yf+"px",ph=0;ph=105&&(Tf.wrapper.style.clipPath="inset(0px)"),Tf.wrapper.setAttribute("translate","no"),vd&&Cd<8&&(Tf.gutters.style.zIndex=-1,Tf.scroller.style.paddingRight=0),!wd&&!(hd&&Xd)&&(Tf.scroller.draggable=!0),Hd&&(Hd.appendChild?Hd.appendChild(Tf.wrapper):Hd(Tf.wrapper)),Tf.viewFrom=Tf.viewTo=Qd.first,Tf.reportedViewFrom=Tf.reportedViewTo=Qd.first,Tf.view=[],Tf.renderedView=null,Tf.externalMeasured=null,Tf.viewOffset=0,Tf.lastWrapHeight=Tf.lastWrapWidth=0,Tf.updateLineNumbers=null,Tf.nativeBarWidth=Tf.barHeight=Tf.barWidth=0,Tf.scrollbarsClipped=!1,Tf.lineNumWidth=Tf.lineNumInnerWidth=Tf.lineNumChars=null,Tf.alignWidgets=!1,Tf.cachedCharWidth=Tf.cachedTextHeight=Tf.cachedPaddingH=null,Tf.maxLine=null,Tf.maxLineLength=0,Tf.maxLineChanged=!1,Tf.wheelDX=Tf.wheelDY=Tf.wheelStartX=Tf.wheelStartY=null,Tf.shift=!1,Tf.selForContextMenu=null,Tf.activeTouch=null,Tf.gutterSpecs=wb(yf.gutters,yf.lineNumbers),gx(Tf),Ef.init(Tf)}var L1=0,uy=null;vd?uy=-.53:hd?uy=15:Ld?uy=-.7:Gd&&(uy=-1/3);function Fy(Hd){var Qd=Hd.wheelDeltaX,Ef=Hd.wheelDeltaY;return Qd==null&&Hd.detail&&Hd.axis==Hd.HORIZONTAL_AXIS&&(Qd=Hd.detail),Ef==null&&Hd.detail&&Hd.axis==Hd.VERTICAL_AXIS?Ef=Hd.detail:Ef==null&&(Ef=Hd.wheelDelta),{x:Qd,y:Ef}}function xT(Hd){var Qd=Fy(Hd);return Qd.x*=uy,Qd.y*=uy,Qd}function _x(Hd,Qd){Ld&&Ud==102&&(Hd.display.chromeScrollHack==null?Hd.display.sizer.style.pointerEvents="none":clearTimeout(Hd.display.chromeScrollHack),Hd.display.chromeScrollHack=setTimeout(function(){Hd.display.chromeScrollHack=null,Hd.display.sizer.style.pointerEvents=""},100));var Ef=Fy(Qd),yf=Ef.x,Tf=Ef.y,Bf=uy;Qd.deltaMode===0&&(yf=Qd.deltaX,Tf=Qd.deltaY,Bf=1);var ph=Hd.display,Dh=ph.scroller,Fh=Dh.scrollWidth>Dh.clientWidth,Kh=Dh.scrollHeight>Dh.clientHeight;if(yf&&Fh||Tf&&Kh){if(Tf&&Jd&&wd){e:for(var Rm=Qd.target,jm=ph.view;Rm!=Dh;Rm=Rm.parentNode)for(var Qm=0;Qm=0&&Fg(Hd,yf.to())<=0)return Ef}return-1};var B_=function(Hd,Qd){this.anchor=Hd,this.head=Qd};B_.prototype.from=function(){return L0(this.anchor,this.head)},B_.prototype.to=function(){return s0(this.anchor,this.head)},B_.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Db(Hd,Qd,Ef){var yf=Hd&&Hd.options.selectionsMayTouch,Tf=Qd[Ef];Qd.sort(function(Qm,Xm){return Fg(Qm.from(),Xm.from())}),Ef=sm(Qd,Tf);for(var Bf=1;Bf0:Fh>=0){var Kh=L0(Dh.from(),ph.from()),Rm=s0(Dh.to(),ph.to()),jm=Dh.empty()?ph.from()==ph.head:Dh.from()==Dh.head;Bf<=Ef&&--Ef,Qd.splice(--Bf,2,new B_(jm?Rm:Kh,jm?Kh:Rm))}}return new n0(Qd,Ef)}function Uy(Hd,Qd){return new n0([new B_(Hd,Qd||Hd)],0)}function Gy(Hd){return Hd.text?og(Hd.from.line+Hd.text.length-1,Ih(Hd.text).length+(Hd.text.length==1?Hd.from.ch:0)):Hd.to}function yx(Hd,Qd){if(Fg(Hd,Qd.from)<0)return Hd;if(Fg(Hd,Qd.to)<=0)return Gy(Qd);var Ef=Hd.line+Qd.text.length-(Qd.to.line-Qd.from.line)-1,yf=Hd.ch;return Hd.line==Qd.to.line&&(yf+=Gy(Qd).ch-Qd.to.ch),og(Ef,yf)}function B1(Hd,Qd){for(var Ef=[],yf=0;yf1&&Hd.remove(Dh.line+1,dg-1),Hd.insert(Dh.line+1,Vg)}hf(Hd,"change",Hd,Qd)}function Vy(Hd,Qd,Ef){function yf(Tf,Bf,ph){if(Tf.linked)for(var Dh=0;Dh1&&!Hd.done[Hd.done.length-2].ranges)return Hd.done.pop(),Ih(Hd.done)}function OS(Hd,Qd,Ef,yf){var Tf=Hd.history;Tf.undone.length=0;var Bf=+new Date,ph,Dh;if((Tf.lastOp==yf||Tf.lastOrigin==Qd.origin&&Qd.origin&&(Qd.origin.charAt(0)=="+"&&Tf.lastModTime>Bf-(Hd.cm?Hd.cm.options.historyEventDelay:500)||Qd.origin.charAt(0)=="*"))&&(ph=CT(Tf,Tf.lastOp==yf)))Dh=Ih(ph.changes),Fg(Qd.from,Qd.to)==0&&Fg(Qd.from,Dh.to)==0?Dh.to=Gy(Qd):ph.changes.push(Ty(Hd,Qd));else{var Fh=Ih(Tf.done);for((!Fh||!Fh.ranges)&&Nb(Hd.sel,Tf.done),ph={changes:[Ty(Hd,Qd)],generation:Tf.generation},Tf.done.push(ph);Tf.done.length>Tf.undoDepth;)Tf.done.shift(),Tf.done[0].ranges||Tf.done.shift()}Tf.done.push(Ef),Tf.generation=++Tf.maxGeneration,Tf.lastModTime=Tf.lastSelTime=Bf,Tf.lastOp=Tf.lastSelOp=yf,Tf.lastOrigin=Tf.lastSelOrigin=Qd.origin,Dh||kg(Hd,"historyAdded")}function Ex(Hd,Qd,Ef,yf){var Tf=Qd.charAt(0);return Tf=="*"||Tf=="+"&&Ef.ranges.length==yf.ranges.length&&Ef.somethingSelected()==yf.somethingSelected()&&new Date-Hd.history.lastSelTime<=(Hd.cm?Hd.cm.options.historyEventDelay:500)}function QE(Hd,Qd,Ef,yf){var Tf=Hd.history,Bf=yf&&yf.origin;Ef==Tf.lastSelOp||Bf&&Tf.lastSelOrigin==Bf&&(Tf.lastModTime==Tf.lastSelTime&&Tf.lastOrigin==Bf||Ex(Hd,Bf,Ih(Tf.done),Qd))?Tf.done[Tf.done.length-1]=Qd:Nb(Qd,Tf.done),Tf.lastSelTime=+new Date,Tf.lastSelOrigin=Bf,Tf.lastSelOp=Ef,yf&&yf.clearRedo!==!1&&J0(Tf.undone)}function Nb(Hd,Qd){var Ef=Ih(Qd);Ef&&Ef.ranges&&Ef.equals(Hd)||Qd.push(Hd)}function kS(Hd,Qd,Ef,yf){var Tf=Qd["spans_"+Hd.id],Bf=0;Hd.iter(Math.max(Hd.first,Ef),Math.min(Hd.first+Hd.size,yf),function(ph){ph.markedSpans&&((Tf||(Tf=Qd["spans_"+Hd.id]={}))[Bf]=ph.markedSpans),++Bf})}function AT(Hd){if(!Hd)return null;for(var Qd,Ef=0;Ef-1&&(Ih(Dh)[jm]=Kh[jm],delete Kh[jm])}}return yf}function C0(Hd,Qd,Ef,yf){if(yf){var Tf=Hd.anchor;if(Ef){var Bf=Fg(Qd,Tf)<0;Bf!=Fg(Ef,Tf)<0?(Tf=Qd,Qd=Ef):Bf!=Fg(Qd,Ef)<0&&(Qd=Ef)}return new B_(Tf,Qd)}else return new B_(Ef||Qd,Qd)}function mE(Hd,Qd,Ef,yf,Tf){Tf==null&&(Tf=Hd.cm&&(Hd.cm.display.shift||Hd.extend)),R0(Hd,new n0([C0(Hd.sel.primary(),Qd,Ef,Tf)],0),yf)}function $S(Hd,Qd,Ef){for(var yf=[],Tf=Hd.cm&&(Hd.cm.display.shift||Hd.extend),Bf=0;Bf=Qd.ch:Dh.to>Qd.ch))){if(Tf&&(kg(Fh,"beforeCursorEnter"),Fh.explicitlyCleared))if(Bf.markedSpans){--ph;continue}else break;if(!Fh.atomic)continue;if(Ef){var jm=Fh.find(yf<0?1:-1),Qm=void 0;if((yf<0?Rm:Kh)&&(jm=Cx(Hd,jm,-yf,jm&&jm.line==Qd.line?Bf:null)),jm&&jm.line==Qd.line&&(Qm=Fg(jm,Ef))&&(yf<0?Qm<0:Qm>0))return gE(Hd,jm,Qd,yf,Tf)}var Xm=Fh.find(yf<0?-1:1);return(yf<0?Kh:Rm)&&(Xm=Cx(Hd,Xm,yf,Xm.line==Qd.line?Bf:null)),Xm?gE(Hd,Xm,Qd,yf,Tf):null}}return Qd}function yE(Hd,Qd,Ef,yf,Tf){var Bf=yf||1,ph=gE(Hd,Qd,Ef,Bf,Tf)||!Tf&&gE(Hd,Qd,Ef,Bf,!0)||gE(Hd,Qd,Ef,-Bf,Tf)||!Tf&&gE(Hd,Qd,Ef,-Bf,!0);return ph||(Hd.cantEdit=!0,og(Hd.first,0))}function Cx(Hd,Qd,Ef,yf){return Ef<0&&Qd.ch==0?Qd.line>Hd.first?u_(Hd,og(Qd.line-1)):null:Ef>0&&Qd.ch==(yf||Mg(Hd,Qd.line)).text.length?Qd.line=0;--Tf)Ax(Hd,{from:yf[Tf].from,to:yf[Tf].to,text:Tf?[""]:Qd.text,origin:Qd.origin});else Ax(Hd,Qd)}}function Ax(Hd,Qd){if(!(Qd.text.length==1&&Qd.text[0]==""&&Fg(Qd.from,Qd.to)==0)){var Ef=B1(Hd,Qd);OS(Hd,Qd,Ef,Hd.cm?Hd.cm.curOp.id:NaN),JE(Hd,Qd,Ef,LE(Hd,Qd));var yf=[];Vy(Hd,function(Tf,Bf){!Bf&&sm(yf,Tf.history)==-1&&(Ix(Tf.history,Qd),yf.push(Tf.history)),JE(Tf,Qd,null,LE(Tf,Qd))})}}function Xy(Hd,Qd,Ef){var yf=Hd.cm&&Hd.cm.state.suppressEdits;if(!(yf&&!Ef)){for(var Tf=Hd.history,Bf,ph=Hd.sel,Dh=Qd=="undo"?Tf.done:Tf.undone,Fh=Qd=="undo"?Tf.undone:Tf.done,Kh=0;Kh=0;--Xm){var dg=Qm(Xm);if(dg)return dg.v}}}}function wx(Hd,Qd){if(Qd!=0&&(Hd.first+=Qd,Hd.sel=new n0(om(Hd.sel.ranges,function(Tf){return new B_(og(Tf.anchor.line+Qd,Tf.anchor.ch),og(Tf.head.line+Qd,Tf.head.ch))}),Hd.sel.primIndex),Hd.cm)){G0(Hd.cm,Hd.first,Hd.first-Qd,Qd);for(var Ef=Hd.cm.display,yf=Ef.viewFrom;yfHd.lastLine())){if(Qd.from.lineBf&&(Qd={from:Qd.from,to:og(Bf,Mg(Hd,Bf).text.length),text:[Qd.text[0]],origin:Qd.origin}),Qd.removed=V_(Hd,Qd.from,Qd.to),Ef||(Ef=B1(Hd,Qd)),Hd.cm?PS(Hd.cm,Qd,yf):fE(Hd,Qd,yf),O0(Hd,Ef,Zh),Hd.cantEdit&&yE(Hd,og(Hd.firstLine(),0))&&(Hd.cantEdit=!1)}}function PS(Hd,Qd,Ef){var yf=Hd.doc,Tf=Hd.display,Bf=Qd.from,ph=Qd.to,Dh=!1,Fh=Bf.line;Hd.options.lineWrapping||(Fh=Hh(j_(Mg(yf,Bf.line))),yf.iter(Fh,ph.line+1,function(Xm){if(Xm==Tf.maxLine)return Dh=!0,!0})),yf.sel.contains(Qd.from,Qd.to)>-1&&p_(Hd),fE(yf,Qd,Ef,ox(Hd)),Hd.options.lineWrapping||(yf.iter(Fh,Bf.line+Qd.text.length,function(Xm){var dg=$y(Xm);dg>Tf.maxLineLength&&(Tf.maxLine=Xm,Tf.maxLineLength=dg,Tf.maxLineChanged=!0,Dh=!1)}),Dh&&(Hd.curOp.updateMaxLine=!0)),Zv(yf,Bf.line),KE(Hd,400);var Kh=Qd.text.length-(ph.line-Bf.line)-1;Qd.full?G0(Hd):Bf.line==ph.line&&Qd.text.length==1&&!pE(Hd.doc,Qd)?Py(Hd,Bf.line,"text"):G0(Hd,Bf.line,ph.line+1,Kh);var Rm=l_(Hd,"changes"),jm=l_(Hd,"change");if(jm||Rm){var Qm={from:Bf,to:ph,text:Qd.text,removed:Qd.removed,origin:Qd.origin};jm&&hf(Hd,"change",Hd,Qm),Rm&&(Hd.curOp.changeObjs||(Hd.curOp.changeObjs=[])).push(Qm)}Hd.display.selForContextMenu=null}function Bv(Hd,Qd,Ef,yf,Tf){var Bf;yf||(yf=Ef),Fg(yf,Ef)<0&&(Bf=[yf,Ef],Ef=Bf[0],yf=Bf[1]),typeof Qd=="string"&&(Qd=Hd.splitLines(Qd)),SE(Hd,{from:Ef,to:yf,text:Qd,origin:Tf})}function Dx(Hd,Qd,Ef,yf){Ef1||!(this.children[0]instanceof Uv))){var Dh=[];this.collapse(Dh),this.children=[new Uv(Dh)],this.children[0].parent=this}},collapse:function(Hd){for(var Qd=0;Qd50){for(var ph=Tf.lines.length%25+25,Dh=ph;Dh10);Hd.parent.maybeSpill()}},iterN:function(Hd,Qd,Ef){for(var yf=0;yfHd.display.maxLineLength&&(Hd.display.maxLine=Kh,Hd.display.maxLineLength=Rm,Hd.display.maxLineChanged=!0)}yf!=null&&Hd&&this.collapsed&&G0(Hd,yf,Tf+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,Hd&&xx(Hd.doc)),Hd&&hf(Hd,"markerCleared",Hd,this,yf,Tf),Qd&&$v(Hd),this.parent&&this.parent.clear()}},Ib.prototype.find=function(Hd,Qd){Hd==null&&this.type=="bookmark"&&(Hd=1);for(var Ef,yf,Tf=0;Tf0||ph==0&&Bf.clearWhenEmpty!==!1)return Bf;if(Bf.replacedWith&&(Bf.collapsed=!0,Bf.widgetNode=If("span",[Bf.replacedWith],"CodeMirror-widget"),yf.handleMouseEvents||Bf.widgetNode.setAttribute("cm-ignore-events","true"),yf.insertLeft&&(Bf.widgetNode.insertLeft=!0)),Bf.collapsed){if(FE(Hd,Qd.line,Qd,Ef,Bf)||Qd.line!=Ef.line&&FE(Hd,Ef.line,Qd,Ef,Bf))throw new Error("Inserting collapsed marker partially overlapping an existing one");_b()}Bf.addToHistory&&OS(Hd,{from:Qd,to:Ef,origin:"markText"},Hd.sel,NaN);var Dh=Qd.line,Fh=Hd.cm,Kh;if(Hd.iter(Dh,Ef.line+1,function(jm){Fh&&Bf.collapsed&&!Fh.options.lineWrapping&&j_(jm)==Fh.display.maxLine&&(Kh=!0),Bf.collapsed&&Dh!=Qd.line&&s_(jm,0),PE(jm,new Qb(Bf,Dh==Qd.line?Qd.ch:null,Dh==Ef.line?Ef.ch:null),Hd.cm&&Hd.cm.curOp),++Dh}),Bf.collapsed&&Hd.iter(Qd.line,Ef.line+1,function(jm){o0(Hd,jm)&&s_(jm,0)}),Bf.clearOnEnter&&sg(Bf,"beforeCursorEnter",function(){return Bf.clear()}),Bf.readOnly&&(W0(),(Hd.history.done.length||Hd.history.undone.length)&&Hd.clearHistory()),Bf.collapsed&&(Bf.id=++BS,Bf.atomic=!0),Fh){if(Kh&&(Fh.curOp.updateMaxLine=!0),Bf.collapsed)G0(Fh,Qd.line,Ef.line+1);else if(Bf.className||Bf.startStyle||Bf.endStyle||Bf.css||Bf.attributes||Bf.title)for(var Rm=Qd.line;Rm<=Ef.line;Rm++)Py(Fh,Rm,"text");Bf.atomic&&xx(Fh.doc),hf(Fh,"markerAdded",Fh,Bf)}return Bf}var CE=function(Hd,Qd){this.markers=Hd,this.primary=Qd;for(var Ef=0;Ef=0;Fh--)SE(this,yf[Fh]);Dh?zy(this,Dh):this.cm&&e0(this.cm)}),undo:T0(function(){Xy(this,"undo")}),redo:T0(function(){Xy(this,"redo")}),undoSelection:T0(function(){Xy(this,"undo",!0)}),redoSelection:T0(function(){Xy(this,"redo",!0)}),setExtending:function(Hd){this.extend=Hd},getExtending:function(){return this.extend},historySize:function(){for(var Hd=this.history,Qd=0,Ef=0,yf=0;yf=Hd.ch)&&Qd.push(Tf.marker.parent||Tf.marker)}return Qd},findMarks:function(Hd,Qd,Ef){Hd=u_(this,Hd),Qd=u_(this,Qd);var yf=[],Tf=Hd.line;return this.iter(Hd.line,Qd.line+1,function(Bf){var ph=Bf.markedSpans;if(ph)for(var Dh=0;Dh=Fh.to||Fh.from==null&&Tf!=Hd.line||Fh.from!=null&&Tf==Qd.line&&Fh.from>=Qd.ch)&&(!Ef||Ef(Fh.marker))&&yf.push(Fh.marker.parent||Fh.marker)}++Tf}),yf},getAllMarks:function(){var Hd=[];return this.iter(function(Qd){var Ef=Qd.markedSpans;if(Ef)for(var yf=0;yfHd)return Qd=Hd,!0;Hd-=Bf,++Ef}),u_(this,og(Ef,Qd))},indexFromPos:function(Hd){Hd=u_(this,Hd);var Qd=Hd.ch;if(Hd.lineQd&&(Qd=Hd.from),Hd.to!=null&&Hd.to-1){Qd.state.draggingText(Hd),setTimeout(function(){return Qd.display.input.focus()},20);return}try{var Rm=Hd.dataTransfer.getData("Text");if(Rm){var jm;if(Qd.state.draggingText&&!Qd.state.draggingText.copy&&(jm=Qd.listSelections()),O0(Qd.doc,Uy(Ef,Ef)),jm)for(var Qm=0;Qm=0;Dh--)Bv(Hd.doc,"",yf[Dh].from,yf[Dh].to,"+delete");e0(Hd)})}function V1(Hd,Qd,Ef){var yf=Pf(Hd.text,Qd+Ef,Ef);return yf<0||yf>Hd.text.length?null:yf}function n1(Hd,Qd,Ef){var yf=V1(Hd,Qd.ch,Ef);return yf==null?null:new og(Qd.line,yf,Ef<0?"after":"before")}function i1(Hd,Qd,Ef,yf,Tf){if(Hd){Qd.doc.direction=="rtl"&&(Tf=-Tf);var Bf=Ym(Ef,Qd.doc.direction);if(Bf){var ph=Tf<0?Ih(Bf):Bf[0],Dh=Tf<0==(ph.level==1),Fh=Dh?"after":"before",Kh;if(ph.level>0||Qd.doc.direction=="rtl"){var Rm=X0(Qd,Ef);Kh=Tf<0?Ef.text.length-1:0;var jm=Q0(Qd,Rm,Kh).top;Kh=$f(function(Qm){return Q0(Qd,Rm,Qm).top==jm},Tf<0==(ph.level==1)?ph.from:ph.to-1,Kh),Fh=="before"&&(Kh=V1(Ef,Kh,1))}else Kh=Tf<0?ph.to:ph.from;return new og(yf,Kh,Fh)}}return new og(yf,Tf<0?Ef.text.length:0,Tf<0?"before":"after")}function ev(Hd,Qd,Ef,yf){var Tf=Ym(Qd,Hd.doc.direction);if(!Tf)return n1(Qd,Ef,yf);Ef.ch>=Qd.text.length?(Ef.ch=Qd.text.length,Ef.sticky="before"):Ef.ch<=0&&(Ef.ch=0,Ef.sticky="after");var Bf=_m(Tf,Ef.ch,Ef.sticky),ph=Tf[Bf];if(Hd.doc.direction=="ltr"&&ph.level%2==0&&(yf>0?ph.to>Ef.ch:ph.from=ph.from&&Qm>=Rm.begin)){var Xm=jm?"before":"after";return new og(Ef.line,Qm,Xm)}}var dg=function(Vg,Yg,Gg){for(var Jg=function(G_,u0){return u0?new og(Ef.line,Dh(G_,1),"before"):new og(Ef.line,G_,"after")};Vg>=0&&Vg0==(a_.level!=1),E_=n_?Gg.begin:Dh(Gg.end,-1);if(a_.from<=E_&&E_0?Rm.end:Dh(Rm.begin,-1);return $g!=null&&!(yf>0&&$g==Qd.text.length)&&(Sg=dg(yf>0?0:Tf.length-1,yf,Kh($g)),Sg)?Sg:null}var a1={selectAll:vE,singleSelection:function(Hd){return Hd.setSelection(Hd.getCursor("anchor"),Hd.getCursor("head"),Zh)},killLine:function(Hd){return Zy(Hd,function(Qd){if(Qd.empty()){var Ef=Mg(Hd.doc,Qd.head.line).text.length;return Qd.head.ch==Ef&&Qd.head.line0)Tf=new og(Tf.line,Tf.ch+1),Hd.replaceRange(Bf.charAt(Tf.ch-1)+Bf.charAt(Tf.ch-2),og(Tf.line,Tf.ch-2),Tf,"+transpose");else if(Tf.line>Hd.doc.first){var ph=Mg(Hd.doc,Tf.line-1).text;ph&&(Tf=new og(Tf.line,1),Hd.replaceRange(Bf.charAt(0)+Hd.doc.lineSeparator()+ph.charAt(ph.length-1),og(Tf.line-1,ph.length-1),Tf,"+transpose"))}}Ef.push(new B_(Tf,Tf))}Hd.setSelections(Ef)})},newlineAndIndent:function(Hd){return M0(Hd,function(){for(var Qd=Hd.listSelections(),Ef=Qd.length-1;Ef>=0;Ef--)Hd.replaceRange(Hd.doc.lineSeparator(),Qd[Ef].anchor,Qd[Ef].head,"+input");Qd=Hd.listSelections();for(var yf=0;yfHd&&Fg(Qd,this.pos)==0&&Ef==this.button};var qb,NE;function jx(Hd,Qd){var Ef=+new Date;return NE&&NE.compare(Ef,Hd,Qd)?(qb=NE=null,"triple"):qb&&qb.compare(Ef,Hd,Qd)?(NE=new DE(Ef,Hd,Qd),qb=null,"double"):(qb=new DE(Ef,Hd,Qd),NE=null,"single")}function Hx(Hd){var Qd=this,Ef=Qd.display;if(!(Kg(Qd,Hd)||Ef.activeTouch&&Ef.input.supportsTouch())){if(Ef.input.ensurePolled(),Ef.shift=Hd.shiftKey,L_(Ef,Hd)){wd||(Ef.scroller.draggable=!1,setTimeout(function(){return Ef.scroller.draggable=!0},100));return}if(!RE(Qd,Hd)){var yf=Fb(Qd,Hd),Tf=R_(Hd),Bf=yf?jx(yf,Tf):"single";Eh(Qd).focus(),Tf==1&&Qd.state.selectingText&&Qd.state.selectingText(Hd),!(yf&&qx(Qd,Tf,yf,Bf,Hd))&&(Tf==1?yf?o1(Qd,yf,Bf,Hd):t0(Hd)==Ef.scroller&&r_(Hd):Tf==2?(yf&&mE(Qd.doc,yf),setTimeout(function(){return Ef.input.focus()},20)):Tf==3&&(vf?Qd.display.input.onContextMenu(Hd):uE(Qd)))}}}function qx(Hd,Qd,Ef,yf,Tf){var Bf="Click";return yf=="double"?Bf="Double"+Bf:yf=="triple"&&(Bf="Triple"+Bf),Bf=(Qd==1?"Left":Qd==2?"Middle":"Right")+Bf,s1(Hd,jS(Bf,Tf),Tf,function(ph){if(typeof ph=="string"&&(ph=a1[ph]),!ph)return!1;var Dh=!1;try{Hd.isReadOnly()&&(Hd.state.suppressEdits=!0),Dh=ph(Hd,Ef)!=oh}finally{Hd.state.suppressEdits=!1}return Dh})}function IE(Hd,Qd,Ef){var yf=Hd.getOption("configureMouse"),Tf=yf?yf(Hd,Qd,Ef):{};if(Tf.unit==null){var Bf=Zd?Ef.shiftKey&&Ef.metaKey:Ef.altKey;Tf.unit=Bf?"rectangle":Qd=="single"?"char":Qd=="double"?"word":"line"}return(Tf.extend==null||Hd.doc.extend)&&(Tf.extend=Hd.doc.extend||Ef.shiftKey),Tf.addNew==null&&(Tf.addNew=Jd?Ef.metaKey:Ef.ctrlKey),Tf.moveOnDrag==null&&(Tf.moveOnDrag=!(Jd?Ef.altKey:Ef.ctrlKey)),Tf}function o1(Hd,Qd,Ef,yf){vd?setTimeout(kf(By,Hd),0):Hd.curOp.focus=Sh(mh(Hd));var Tf=IE(Hd,Ef,yf),Bf=Hd.doc.sel,ph;Hd.options.dragDrop&&P_&&!Hd.isReadOnly()&&Ef=="single"&&(ph=Bf.contains(Qd))>-1&&(Fg((ph=Bf.ranges[ph]).from(),Qd)<0||Qd.xRel>0)&&(Fg(ph.to(),Qd)>0||Qd.xRel<0)?MT(Hd,yf,Qd,Tf):Gx(Hd,yf,Qd,Tf)}function MT(Hd,Qd,Ef,yf){var Tf=Hd.display,Bf=!1,ph=H_(Hd,function(Kh){wd&&(Tf.scroller.draggable=!1),Hd.state.draggingText=!1,Hd.state.delayingBlurEvent&&(Hd.hasFocus()?Hd.state.delayingBlurEvent=!1:uE(Hd)),vg(Tf.wrapper.ownerDocument,"mouseup",ph),vg(Tf.wrapper.ownerDocument,"mousemove",Dh),vg(Tf.scroller,"dragstart",Fh),vg(Tf.scroller,"drop",ph),Bf||(r_(Kh),yf.addNew||mE(Hd.doc,Ef,null,null,yf.extend),wd&&!Gd||vd&&Cd==9?setTimeout(function(){Tf.wrapper.ownerDocument.body.focus({preventScroll:!0}),Tf.input.focus()},20):Tf.input.focus())}),Dh=function(Kh){Bf=Bf||Math.abs(Qd.clientX-Kh.clientX)+Math.abs(Qd.clientY-Kh.clientY)>=10},Fh=function(){return Bf=!0};wd&&(Tf.scroller.draggable=!0),Hd.state.draggingText=ph,ph.copy=!yf.moveOnDrag,sg(Tf.wrapper.ownerDocument,"mouseup",ph),sg(Tf.wrapper.ownerDocument,"mousemove",Dh),sg(Tf.scroller,"dragstart",Fh),sg(Tf.scroller,"drop",ph),Hd.state.delayingBlurEvent=!0,setTimeout(function(){return Tf.input.focus()},20),Tf.scroller.dragDrop&&Tf.scroller.dragDrop()}function zS(Hd,Qd,Ef){if(Ef=="char")return new B_(Qd,Qd);if(Ef=="word")return Hd.findWordAt(Qd);if(Ef=="line")return new B_(og(Qd.line,0),u_(Hd.doc,og(Qd.line+1,0)));var yf=Ef(Hd,Qd);return new B_(yf.from,yf.to)}function Gx(Hd,Qd,Ef,yf){vd&&uE(Hd);var Tf=Hd.display,Bf=Hd.doc;r_(Qd);var ph,Dh,Fh=Bf.sel,Kh=Fh.ranges;if(yf.addNew&&!yf.extend?(Dh=Bf.sel.contains(Ef),Dh>-1?ph=Kh[Dh]:ph=new B_(Ef,Ef)):(ph=Bf.sel.primary(),Dh=Bf.sel.primIndex),yf.unit=="rectangle")yf.addNew||(ph=new B_(Ef,Ef)),Ef=Fb(Hd,Qd,!0,!0),Dh=-1;else{var Rm=zS(Hd,Ef,yf.unit);yf.extend?ph=C0(ph,Rm.anchor,Rm.head,yf.extend):ph=Rm}yf.addNew?Dh==-1?(Dh=Kh.length,R0(Bf,Db(Hd,Kh.concat([ph]),Dh),{scroll:!1,origin:"*mouse"})):Kh.length>1&&Kh[Dh].empty()&&yf.unit=="char"&&!yf.extend?(R0(Bf,Db(Hd,Kh.slice(0,Dh).concat(Kh.slice(Dh+1)),0),{scroll:!1,origin:"*mouse"}),Fh=Bf.sel):pb(Bf,Dh,ph,Sm):(Dh=0,R0(Bf,new n0([ph],0),Sm),Fh=Bf.sel);var jm=Ef;function Qm(Gg){if(Fg(jm,Gg)!=0)if(jm=Gg,yf.unit=="rectangle"){for(var Jg=[],a_=Hd.options.tabSize,n_=_h(Mg(Bf,Ef.line).text,Ef.ch,a_),E_=_h(Mg(Bf,Gg.line).text,Gg.ch,a_),G_=Math.min(n_,E_),u0=Math.max(n_,E_),Z_=Math.min(Ef.line,Gg.line),i0=Math.min(Hd.lastLine(),Math.max(Ef.line,Gg.line));Z_<=i0;Z_++){var f0=Mg(Bf,Z_).text,h0=Vf(f0,G_,a_);G_==u0?Jg.push(new B_(og(Z_,h0),og(Z_,h0))):f0.length>h0&&Jg.push(new B_(og(Z_,h0),og(Z_,Vf(f0,u0,a_))))}Jg.length||Jg.push(new B_(Ef,Ef)),R0(Bf,Db(Hd,Fh.ranges.slice(0,Dh).concat(Jg),Dh),{origin:"*mouse",scroll:!1}),Hd.scrollIntoView(Gg)}else{var U0=ph,k0=zS(Hd,Gg,yf.unit),y0=U0.anchor,m0;Fg(k0.anchor,y0)>0?(m0=k0.head,y0=L0(U0.from(),k0.anchor)):(m0=k0.anchor,y0=s0(U0.to(),k0.head));var a0=Fh.ranges.slice(0);a0[Dh]=W1(Hd,new B_(u_(Bf,y0),m0)),R0(Bf,Db(Hd,a0,Dh),Sm)}}var Xm=Tf.wrapper.getBoundingClientRect(),dg=0;function Sg(Gg){var Jg=++dg,a_=Fb(Hd,Gg,!0,yf.unit=="rectangle");if(a_)if(Fg(a_,jm)!=0){Hd.curOp.focus=Sh(mh(Hd)),Qm(a_);var n_=Cv(Tf,Bf);(a_.line>=n_.to||a_.lineXm.bottom?20:0;E_&&setTimeout(H_(Hd,function(){dg==Jg&&(Tf.scroller.scrollTop+=E_,Sg(Gg))}),50)}}function $g(Gg){Hd.state.selectingText=!1,dg=1/0,Gg&&(r_(Gg),Tf.input.focus()),vg(Tf.wrapper.ownerDocument,"mousemove",Vg),vg(Tf.wrapper.ownerDocument,"mouseup",Yg),Bf.history.lastSelOrigin=null}var Vg=H_(Hd,function(Gg){Gg.buttons===0||!R_(Gg)?$g(Gg):Sg(Gg)}),Yg=H_(Hd,$g);Hd.state.selectingText=Yg,sg(Tf.wrapper.ownerDocument,"mousemove",Vg),sg(Tf.wrapper.ownerDocument,"mouseup",Yg)}function W1(Hd,Qd){var Ef=Qd.anchor,yf=Qd.head,Tf=Mg(Hd.doc,Ef.line);if(Fg(Ef,yf)==0&&Ef.sticky==yf.sticky)return Qd;var Bf=Ym(Tf);if(!Bf)return Qd;var ph=_m(Bf,Ef.ch,Ef.sticky),Dh=Bf[ph];if(Dh.from!=Ef.ch&&Dh.to!=Ef.ch)return Qd;var Fh=ph+(Dh.from==Ef.ch==(Dh.level!=1)?0:1);if(Fh==0||Fh==Bf.length)return Qd;var Kh;if(yf.line!=Ef.line)Kh=(yf.line-Ef.line)*(Hd.doc.direction=="ltr"?1:-1)>0;else{var Rm=_m(Bf,yf.ch,yf.sticky),jm=Rm-ph||(yf.ch-Ef.ch)*(Dh.level==1?-1:1);Rm==Fh-1||Rm==Fh?Kh=jm<0:Kh=jm>0}var Qm=Bf[Fh+(Kh?-1:0)],Xm=Kh==(Qm.level==1),dg=Xm?Qm.from:Qm.to,Sg=Xm?"after":"before";return Ef.ch==dg&&Ef.sticky==Sg?Qd:new B_(new og(Ef.line,dg,Sg),yf)}function WS(Hd,Qd,Ef,yf){var Tf,Bf;if(Qd.touches)Tf=Qd.touches[0].clientX,Bf=Qd.touches[0].clientY;else try{Tf=Qd.clientX,Bf=Qd.clientY}catch{return!1}if(Tf>=Math.floor(Hd.display.gutters.getBoundingClientRect().right))return!1;yf&&r_(Qd);var ph=Hd.display,Dh=ph.lineDiv.getBoundingClientRect();if(Bf>Dh.bottom||!l_(Hd,Ef))return S_(Qd);Bf-=Dh.top-ph.viewOffset;for(var Fh=0;Fh=Tf){var Rm=Mm(Hd.doc,Bf),jm=Hd.display.gutterSpecs[Fh];return kg(Hd,Ef,Hd,Rm,jm.className,Qd),S_(Qd)}}}function RE(Hd,Qd){return WS(Hd,Qd,"gutterClick",!0)}function Y1(Hd,Qd){L_(Hd.display,Qd)||K1(Hd,Qd)||Kg(Hd,Qd,"contextmenu")||vf||Hd.display.input.onContextMenu(Qd)}function K1(Hd,Qd){return l_(Hd,"gutterContextMenu")?WS(Hd,Qd,"gutterContextMenu",!1):!1}function Vx(Hd){Hd.display.wrapper.className=Hd.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+Hd.options.theme.replace(/(^|\s)\s*/g," cm-s-"),qE(Hd)}var zv={toString:function(){return"CodeMirror.Init"}},l1={},u1={};function YS(Hd){var Qd=Hd.optionHandlers;function Ef(yf,Tf,Bf,ph){Hd.defaults[yf]=Tf,Bf&&(Qd[yf]=ph?function(Dh,Fh,Kh){Kh!=zv&&Bf(Dh,Fh,Kh)}:Bf)}Hd.defineOption=Ef,Hd.Init=zv,Ef("value","",function(yf,Tf){return yf.setValue(Tf)},!0),Ef("mode",null,function(yf,Tf){yf.doc.modeOption=Tf,IS(yf)},!0),Ef("indentUnit",2,IS,!0),Ef("indentWithTabs",!1),Ef("smartIndent",!0),Ef("tabSize",4,function(yf){Pv(yf),qE(yf),G0(yf)},!0),Ef("lineSeparator",null,function(yf,Tf){if(yf.doc.lineSep=Tf,!!Tf){var Bf=[],ph=yf.doc.first;yf.doc.iter(function(Fh){for(var Kh=0;;){var Rm=Fh.text.indexOf(Tf,Kh);if(Rm==-1)break;Kh=Rm+Tf.length,Bf.push(og(ph,Rm))}ph++});for(var Dh=Bf.length-1;Dh>=0;Dh--)Bv(yf.doc,Tf,Bf[Dh],og(Bf[Dh].line,Bf[Dh].ch+Tf.length))}}),Ef("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(yf,Tf,Bf){yf.state.specialChars=new RegExp(Tf.source+(Tf.test(" ")?"":"| "),"g"),Bf!=zv&&yf.refresh()}),Ef("specialCharPlaceholder",Lb,function(yf){return yf.refresh()},!0),Ef("electricChars",!0),Ef("inputStyle",Xd?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),Ef("spellcheck",!1,function(yf,Tf){return yf.getInputField().spellcheck=Tf},!0),Ef("autocorrect",!1,function(yf,Tf){return yf.getInputField().autocorrect=Tf},!0),Ef("autocapitalize",!1,function(yf,Tf){return yf.getInputField().autocapitalize=Tf},!0),Ef("rtlMoveVisually",!mf),Ef("wholeLineUpdateBefore",!0),Ef("theme","default",function(yf){Vx(yf),XE(yf)},!0),Ef("keyMap","default",function(yf,Tf,Bf){var ph=r1(Tf),Dh=Bf!=zv&&r1(Bf);Dh&&Dh.detach&&Dh.detach(yf,ph),ph.attach&&ph.attach(yf,Dh||null)}),Ef("extraKeys",null),Ef("configureMouse",null),Ef("lineWrapping",!1,zx,!0),Ef("gutters",[],function(yf,Tf){yf.display.gutterSpecs=wb(Tf,yf.options.lineNumbers),XE(yf)},!0),Ef("fixedGutter",!0,function(yf,Tf){yf.display.gutters.style.left=Tf?U_(yf.display)+"px":"0",yf.refresh()},!0),Ef("coverGutterNextToScrollbar",!1,function(yf){return Ub(yf)},!0),Ef("scrollbarStyle","native",function(yf){dx(yf),Ub(yf),yf.display.scrollbars.setScrollTop(yf.doc.scrollTop),yf.display.scrollbars.setScrollLeft(yf.doc.scrollLeft)},!0),Ef("lineNumbers",!1,function(yf,Tf){yf.display.gutterSpecs=wb(yf.options.gutters,Tf),XE(yf)},!0),Ef("firstLineNumber",1,XE,!0),Ef("lineNumberFormatter",function(yf){return yf},XE,!0),Ef("showCursorWhenSelecting",!1,Ly,!0),Ef("resetSelectionOnContextMenu",!0),Ef("lineWiseCopyCut",!0),Ef("pasteLinesPerSelection",!0),Ef("selectionsMayTouch",!1),Ef("readOnly",!1,function(yf,Tf){Tf=="nocursor"&&(cE(yf),yf.display.input.blur()),yf.display.input.readOnlyChanged(Tf)}),Ef("screenReaderLabel",null,function(yf,Tf){Tf=Tf===""?null:Tf,yf.display.input.screenReaderLabelChanged(Tf)}),Ef("disableInput",!1,function(yf,Tf){Tf||yf.display.input.reset()},!0),Ef("dragDrop",!0,PT),Ef("allowDropFileTypes",null),Ef("cursorBlinkRate",530),Ef("cursorScrollMargin",0),Ef("cursorHeight",1,Ly,!0),Ef("singleCursorHeightPerLine",!0,Ly,!0),Ef("workTime",100),Ef("workDelay",100),Ef("flattenSpans",!0,Pv,!0),Ef("addModeClass",!1,Pv,!0),Ef("pollInterval",100),Ef("undoDepth",200,function(yf,Tf){return yf.doc.history.undoDepth=Tf}),Ef("historyEventDelay",1250),Ef("viewportMargin",10,function(yf){return yf.refresh()},!0),Ef("maxHighlightLength",1e4,Pv,!0),Ef("moveInputWithCursor",!0,function(yf,Tf){Tf||yf.display.input.resetPosition()}),Ef("tabindex",null,function(yf,Tf){return yf.display.input.getField().tabIndex=Tf||""}),Ef("autofocus",null),Ef("direction","ltr",function(yf,Tf){return yf.doc.setDirection(Tf)},!0),Ef("phrases",null)}function PT(Hd,Qd,Ef){var yf=Ef&&Ef!=zv;if(!Qd!=!yf){var Tf=Hd.display.dragFunctions,Bf=Qd?sg:vg;Bf(Hd.display.scroller,"dragstart",Tf.start),Bf(Hd.display.scroller,"dragenter",Tf.enter),Bf(Hd.display.scroller,"dragover",Tf.over),Bf(Hd.display.scroller,"dragleave",Tf.leave),Bf(Hd.display.scroller,"drop",Tf.drop)}}function zx(Hd){Hd.options.lineWrapping?(yh(Hd.display.wrapper,"CodeMirror-wrap"),Hd.display.sizer.style.minWidth="",Hd.display.sizerWidth=null):(Af(Hd.display.wrapper,"CodeMirror-wrap"),tE(Hd)),I1(Hd),G0(Hd),qE(Hd),setTimeout(function(){return Ub(Hd)},100)}function $_(Hd,Qd){var Ef=this;if(!(this instanceof $_))return new $_(Hd,Qd);this.options=Qd=Qd?Rf(Qd):{},Rf(l1,Qd,!1);var yf=Qd.value;typeof yf=="string"?yf=new F0(yf,Qd.mode,null,Qd.lineSeparator,Qd.direction):Qd.mode&&(yf.modeOption=Qd.mode),this.doc=yf;var Tf=new $_.inputStyles[Qd.inputStyle](this),Bf=this.display=new ST(Hd,yf,Tf,Qd);Bf.wrapper.CodeMirror=this,Vx(this),Qd.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),dx(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 Ph,keySeq:null,specialChars:null},Qd.autofocus&&!Xd&&Bf.input.focus(),vd&&Cd<11&&setTimeout(function(){return Ef.display.input.reset(!0)},20),Wx(this),Lx(),Rv(this),this.curOp.forceUpdate=!0,RS(this,yf),Qd.autofocus&&!Xd||this.hasFocus()?setTimeout(function(){Ef.hasFocus()&&!Ef.state.focused&&vS(Ef)},20):cE(this);for(var ph in u1)u1.hasOwnProperty(ph)&&u1[ph](this,Qd[ph],zv);mx(this),Qd.finishInit&&Qd.finishInit(this);for(var Dh=0;Dh20*20}sg(Qd.scroller,"touchstart",function(Fh){if(!Kg(Hd,Fh)&&!Bf(Fh)&&!RE(Hd,Fh)){Qd.input.ensurePolled(),clearTimeout(Ef);var Kh=+new Date;Qd.activeTouch={start:Kh,moved:!1,prev:Kh-yf.end<=300?yf:null},Fh.touches.length==1&&(Qd.activeTouch.left=Fh.touches[0].pageX,Qd.activeTouch.top=Fh.touches[0].pageY)}}),sg(Qd.scroller,"touchmove",function(){Qd.activeTouch&&(Qd.activeTouch.moved=!0)}),sg(Qd.scroller,"touchend",function(Fh){var Kh=Qd.activeTouch;if(Kh&&!L_(Qd,Fh)&&Kh.left!=null&&!Kh.moved&&new Date-Kh.start<300){var Rm=Hd.coordsChar(Qd.activeTouch,"page"),jm;!Kh.prev||ph(Kh,Kh.prev)?jm=new B_(Rm,Rm):!Kh.prev.prev||ph(Kh,Kh.prev.prev)?jm=Hd.findWordAt(Rm):jm=new B_(og(Rm.line,0),u_(Hd.doc,og(Rm.line+1,0))),Hd.setSelection(jm.anchor,jm.head),Hd.focus(),r_(Fh)}Tf()}),sg(Qd.scroller,"touchcancel",Tf),sg(Qd.scroller,"scroll",function(){Qd.scroller.clientHeight&&(zE(Hd,Qd.scroller.scrollTop),Cb(Hd,Qd.scroller.scrollLeft,!0),kg(Hd,"scroll",Hd))}),sg(Qd.scroller,"mousewheel",function(Fh){return _x(Hd,Fh)}),sg(Qd.scroller,"DOMMouseScroll",function(Fh){return _x(Hd,Fh)}),sg(Qd.wrapper,"scroll",function(){return Qd.wrapper.scrollTop=Qd.wrapper.scrollLeft=0}),Qd.dragFunctions={enter:function(Fh){Kg(Hd,Fh)||Q_(Fh)},over:function(Fh){Kg(Hd,Fh)||(T_(Hd,Fh),Q_(Fh))},start:function(Fh){return US(Hd,Fh)},drop:H_(Hd,DT),leave:function(Fh){Kg(Hd,Fh)||Mx(Hd)}};var Dh=Qd.input.getField();sg(Dh,"keyup",function(Fh){return Rb.call(Hd,Fh)}),sg(Dh,"keydown",H_(Hd,VS)),sg(Dh,"keypress",H_(Hd,Ux)),sg(Dh,"focus",function(Fh){return vS(Hd,Fh)}),sg(Dh,"blur",function(Fh){return cE(Hd,Fh)})}var X1=[];$_.defineInitHook=function(Hd){return X1.push(Hd)};function c1(Hd,Qd,Ef,yf){var Tf=Hd.doc,Bf;Ef==null&&(Ef="add"),Ef=="smart"&&(Tf.mode.indent?Bf=S0(Hd,Qd).state:Ef="prev");var ph=Hd.options.tabSize,Dh=Mg(Tf,Qd),Fh=_h(Dh.text,null,ph);Dh.stateAfter&&(Dh.stateAfter=null);var Kh=Dh.text.match(/^\s*/)[0],Rm;if(!yf&&!/\S/.test(Dh.text))Rm=0,Ef="not";else if(Ef=="smart"&&(Rm=Tf.mode.indent(Bf,Dh.text.slice(Kh.length),Dh.text),Rm==oh||Rm>150)){if(!yf)return;Ef="prev"}Ef=="prev"?Qd>Tf.first?Rm=_h(Mg(Tf,Qd-1).text,null,ph):Rm=0:Ef=="add"?Rm=Fh+Hd.options.indentUnit:Ef=="subtract"?Rm=Fh-Hd.options.indentUnit:typeof Ef=="number"&&(Rm=Fh+Ef),Rm=Math.max(0,Rm);var jm="",Qm=0;if(Hd.options.indentWithTabs)for(var Xm=Math.floor(Rm/ph);Xm;--Xm)Qm+=ph,jm+=" ";if(Qmph,Fh=ih(Qd),Kh=null;if(Dh&&yf.ranges.length>1)if(fb&&fb.text.join(` +`)==Qd){if(yf.ranges.length%fb.text.length==0){Kh=[];for(var Rm=0;Rm=0;Qm--){var Xm=yf.ranges[Qm],dg=Xm.from(),Sg=Xm.to();Xm.empty()&&(Ef&&Ef>0?dg=og(dg.line,dg.ch-Ef):Hd.state.overwrite&&!Dh?Sg=og(Sg.line,Math.min(Mg(Bf,Sg.line).text.length,Sg.ch+Ih(Fh).length)):Dh&&fb&&fb.lineWise&&fb.text.join(` +`)==Fh.join(` +`)&&(dg=Sg=og(dg.line,0)));var $g={from:dg,to:Sg,text:Kh?Kh[Qm%Kh.length]:Fh,origin:Tf||(Dh?"paste":Hd.state.cutIncoming>ph?"cut":"+input")};SE(Hd.doc,$g),hf(Hd,"inputRead",Hd,$g)}Qd&&!Dh&&J1(Hd,Qd),e0(Hd),Hd.curOp.updateInput<2&&(Hd.curOp.updateInput=jm),Hd.curOp.typing=!0,Hd.state.pasteIncoming=Hd.state.cutIncoming=-1}function Gb(Hd,Qd){var Ef=Hd.clipboardData&&Hd.clipboardData.getData("Text");if(Ef)return Hd.preventDefault(),!Qd.isReadOnly()&&!Qd.options.disableInput&&Qd.hasFocus()&&M0(Qd,function(){return KS(Qd,Ef,0,null,"paste")}),!0}function J1(Hd,Qd){if(!(!Hd.options.electricChars||!Hd.options.smartIndent))for(var Ef=Hd.doc.sel,yf=Ef.ranges.length-1;yf>=0;yf--){var Tf=Ef.ranges[yf];if(!(Tf.head.ch>100||yf&&Ef.ranges[yf-1].head.line==Tf.head.line)){var Bf=Hd.getModeAt(Tf.head),ph=!1;if(Bf.electricChars){for(var Dh=0;Dh-1){ph=c1(Hd,Tf.head.line,"smart");break}}else Bf.electricInput&&Bf.electricInput.test(Mg(Hd.doc,Tf.head.line).text.slice(0,Tf.head.ch))&&(ph=c1(Hd,Tf.head.line,"smart"));ph&&hf(Hd,"electricInput",Hd,Tf.head.line)}}}function Z1(Hd){for(var Qd=[],Ef=[],yf=0;yfBf&&(c1(this,Dh.head.line,yf,!0),Bf=Dh.head.line,ph==this.doc.sel.primIndex&&e0(this));else{var Fh=Dh.from(),Kh=Dh.to(),Rm=Math.max(Bf,Fh.line);Bf=Math.min(this.lastLine(),Kh.line-(Kh.ch?0:1))+1;for(var jm=Rm;jm0&&pb(this.doc,ph,new B_(Fh,Qm[ph].to()),Zh)}}}),getTokenAt:function(yf,Tf){return Ry(this,yf,Tf)},getLineTokens:function(yf,Tf){return Ry(this,og(yf),Tf,!0)},getTokenTypeAt:function(yf){yf=u_(this.doc,yf);var Tf=Pb(this,Mg(this.doc,yf.line)),Bf=0,ph=(Tf.length-1)/2,Dh=yf.ch,Fh;if(Dh==0)Fh=Tf[2];else for(;;){var Kh=Bf+ph>>1;if((Kh?Tf[Kh*2-1]:0)>=Dh)ph=Kh;else if(Tf[Kh*2+1]Fh&&(yf=Fh,ph=!0),Dh=Mg(this.doc,yf)}else Dh=yf;return Zb(this,Dh,{top:0,left:0},Tf||"page",Bf||ph).top+(ph?this.doc.height-ob(Dh):0)},defaultTextHeight:function(){return Sb(this.display)},defaultCharWidth:function(){return ny(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(yf,Tf,Bf,ph,Dh){var Fh=this.display;yf=ug(this,u_(this.doc,yf));var Kh=yf.bottom,Rm=yf.left;if(Tf.style.position="absolute",Tf.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(Tf),Fh.sizer.appendChild(Tf),ph=="over")Kh=yf.top;else if(ph=="above"||ph=="near"){var jm=Math.max(Fh.wrapper.clientHeight,this.doc.height),Qm=Math.max(Fh.sizer.clientWidth,Fh.lineSpace.clientWidth);(ph=="above"||yf.bottom+Tf.offsetHeight>jm)&&yf.top>Tf.offsetHeight?Kh=yf.top-Tf.offsetHeight:yf.bottom+Tf.offsetHeight<=jm&&(Kh=yf.bottom),Rm+Tf.offsetWidth>Qm&&(Rm=Qm-Tf.offsetWidth)}Tf.style.top=Kh+"px",Tf.style.left=Tf.style.right="",Dh=="right"?(Rm=Fh.sizer.clientWidth-Tf.offsetWidth,Tf.style.right="0px"):(Dh=="left"?Rm=0:Dh=="middle"&&(Rm=(Fh.sizer.clientWidth-Tf.offsetWidth)/2),Tf.style.left=Rm+"px"),Bf&&ux(this,{left:Rm,top:Kh,right:Rm+Tf.offsetWidth,bottom:Kh+Tf.offsetHeight})},triggerOnKeyDown:d_(VS),triggerOnKeyPress:d_(Ux),triggerOnKeyUp:Rb,triggerOnMouseDown:d_(Hx),execCommand:function(yf){if(a1.hasOwnProperty(yf))return a1[yf].call(null,this)},triggerElectric:d_(function(yf){J1(this,yf)}),findPosH:function(yf,Tf,Bf,ph){var Dh=1;Tf<0&&(Dh=-1,Tf=-Tf);for(var Fh=u_(this.doc,yf),Kh=0;Kh0&&Rm(Bf.charAt(ph-1));)--ph;for(;Dh.5||this.options.lineWrapping)&&I1(this),kg(this,"refresh",this)}),swapDoc:d_(function(yf){var Tf=this.doc;return Tf.cm=null,this.state.selectingText&&this.state.selectingText(),RS(this,yf),qE(this),this.display.input.reset(),b0(this,yf.scrollLeft,yf.scrollTop),this.curOp.forceScroll=!0,hf(this,"swapDoc",this,Tf),Tf}),phrase:function(yf){var Tf=this.options.phrases;return Tf&&Object.prototype.hasOwnProperty.call(Tf,yf)?Tf[yf]:yf},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}},v_(Hd),Hd.registerHelper=function(yf,Tf,Bf){Ef.hasOwnProperty(yf)||(Ef[yf]=Hd[yf]={_global:[]}),Ef[yf][Tf]=Bf},Hd.registerGlobalHelper=function(yf,Tf,Bf,ph){Hd.registerHelper(yf,Tf,ph),Ef[yf]._global.push({pred:Bf,val:ph})}}function c_(Hd,Qd,Ef,yf,Tf){var Bf=Qd,ph=Ef,Dh=Mg(Hd,Qd.line),Fh=Tf&&Hd.direction=="rtl"?-Ef:Ef;function Kh(){var Yg=Qd.line+Fh;return Yg=Hd.first+Hd.size?!1:(Qd=new og(Yg,Qd.ch,Qd.sticky),Dh=Mg(Hd,Yg))}function Rm(Yg){var Gg;if(yf=="codepoint"){var Jg=Dh.text.charCodeAt(Qd.ch+(Ef>0?0:-1));if(isNaN(Jg))Gg=null;else{var a_=Ef>0?Jg>=55296&&Jg<56320:Jg>=56320&&Jg<57343;Gg=new og(Qd.line,Math.max(0,Math.min(Dh.text.length,Qd.ch+Ef*(a_?2:1))),-Ef)}}else Tf?Gg=ev(Hd.cm,Dh,Qd,Ef):Gg=n1(Dh,Qd,Ef);if(Gg==null)if(!Yg&&Kh())Qd=i1(Tf,Hd.cm,Dh,Qd.line,Fh);else return!1;else Qd=Gg;return!0}if(yf=="char"||yf=="codepoint")Rm();else if(yf=="column")Rm(!0);else if(yf=="word"||yf=="group")for(var jm=null,Qm=yf=="group",Xm=Hd.cm&&Hd.cm.getHelper(Qd,"wordChars"),dg=!0;!(Ef<0&&!Rm(!dg));dg=!1){var Sg=Dh.text.charAt(Qd.ch)||` +`,$g=Wm(Sg,Xm)?"w":Qm&&Sg==` +`?"n":!Qm||/\s/.test(Sg)?null:"p";if(Qm&&!dg&&!$g&&($g="s"),jm&&jm!=$g){Ef<0&&(Ef=1,Rm(),Qd.sticky="after");break}if($g&&(jm=$g),Ef>0&&!Rm(!dg))break}var Vg=yE(Hd,Qd,Bf,ph,!0);return y_(Bf,Vg)&&(Vg.hitSide=!0),Vg}function f1(Hd,Qd,Ef,yf){var Tf=Hd.doc,Bf=Qd.left,ph;if(yf=="page"){var Dh=Math.min(Hd.display.wrapper.clientHeight,Eh(Hd).innerHeight||Tf(Hd).documentElement.clientHeight),Fh=Math.max(Dh-.5*Sb(Hd.display),3);ph=(Ef>0?Qd.bottom:Qd.top)+Ef*Fh}else yf=="line"&&(ph=Ef>0?Qd.bottom+3:Qd.top-3);for(var Kh;Kh=k_(Hd,Bf,ph),!!Kh.outside;){if(Ef<0?ph<=0:ph>=Tf.height){Kh.hitSide=!0;break}ph+=Ef*5}return Kh}var F_=function(Hd){this.cm=Hd,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ph,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};F_.prototype.init=function(Hd){var Qd=this,Ef=this,yf=Ef.cm,Tf=Ef.div=Hd.lineDiv;Tf.contentEditable=!0,d1(Tf,yf.options.spellcheck,yf.options.autocorrect,yf.options.autocapitalize);function Bf(Dh){for(var Fh=Dh.target;Fh;Fh=Fh.parentNode){if(Fh==Tf)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Fh.className))break}return!1}sg(Tf,"paste",function(Dh){!Bf(Dh)||Kg(yf,Dh)||Gb(Dh,yf)||Cd<=11&&setTimeout(H_(yf,function(){return Qd.updateFromDOM()}),20)}),sg(Tf,"compositionstart",function(Dh){Qd.composing={data:Dh.data,done:!1}}),sg(Tf,"compositionupdate",function(Dh){Qd.composing||(Qd.composing={data:Dh.data,done:!1})}),sg(Tf,"compositionend",function(Dh){Qd.composing&&(Dh.data!=Qd.composing.data&&Qd.readFromDOMSoon(),Qd.composing.done=!0)}),sg(Tf,"touchstart",function(){return Ef.forceCompositionEnd()}),sg(Tf,"input",function(){Qd.composing||Qd.readFromDOMSoon()});function ph(Dh){if(!(!Bf(Dh)||Kg(yf,Dh))){if(yf.somethingSelected())Q1({lineWise:!1,text:yf.getSelections()}),Dh.type=="cut"&&yf.replaceSelection("",null,"cut");else if(yf.options.lineWiseCopyCut){var Fh=Z1(yf);Q1({lineWise:!0,text:Fh.text}),Dh.type=="cut"&&yf.operation(function(){yf.setSelections(Fh.ranges,0,Zh),yf.replaceSelection("",null,"cut")})}else return;if(Dh.clipboardData){Dh.clipboardData.clearData();var Kh=fb.text.join(` +`);if(Dh.clipboardData.setData("Text",Kh),Dh.clipboardData.getData("Text")==Kh){Dh.preventDefault();return}}var Rm=p1(),jm=Rm.firstChild;d1(jm),yf.display.lineSpace.insertBefore(Rm,yf.display.lineSpace.firstChild),jm.value=fb.text.join(` +`);var Qm=Sh(xh(Tf));lh(jm),setTimeout(function(){yf.display.lineSpace.removeChild(Rm),Qm.focus(),Qm==Tf&&Ef.showPrimarySelection()},50)}}sg(Tf,"copy",ph),sg(Tf,"cut",ph)},F_.prototype.screenReaderLabelChanged=function(Hd){Hd?this.div.setAttribute("aria-label",Hd):this.div.removeAttribute("aria-label")},F_.prototype.prepareSelection=function(){var Hd=yS(this.cm,!1);return Hd.focus=Sh(xh(this.div))==this.div,Hd},F_.prototype.showSelection=function(Hd,Qd){!Hd||!this.cm.display.view.length||((Hd.focus||Qd)&&this.showPrimarySelection(),this.showMultipleSelections(Hd))},F_.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},F_.prototype.showPrimarySelection=function(){var Hd=this.getSelection(),Qd=this.cm,Ef=Qd.doc.sel.primary(),yf=Ef.from(),Tf=Ef.to();if(Qd.display.viewTo==Qd.display.viewFrom||yf.line>=Qd.display.viewTo||Tf.line=Qd.display.viewFrom&&tv(Qd,yf)||{node:Dh[0].measure.map[2],offset:0},Kh=Tf.lineHd.firstLine()&&(yf=og(yf.line-1,Mg(Hd.doc,yf.line-1).length)),Tf.ch==Mg(Hd.doc,Tf.line).text.length&&Tf.lineQd.viewTo-1)return!1;var Bf,ph,Dh;yf.line==Qd.viewFrom||(Bf=Ev(Hd,yf.line))==0?(ph=Hh(Qd.view[0].line),Dh=Qd.view[0].node):(ph=Hh(Qd.view[Bf].line),Dh=Qd.view[Bf-1].node.nextSibling);var Fh=Ev(Hd,Tf.line),Kh,Rm;if(Fh==Qd.view.length-1?(Kh=Qd.viewTo-1,Rm=Qd.lineDiv.lastChild):(Kh=Hh(Qd.view[Fh+1].line)-1,Rm=Qd.view[Fh+1].node.previousSibling),!Dh)return!1;for(var jm=Hd.doc.splitLines(Yx(Hd,Dh,Rm,ph,Kh)),Qm=V_(Hd.doc,og(ph,0),og(Kh,Mg(Hd.doc,Kh).text.length));jm.length>1&&Qm.length>1;)if(Ih(jm)==Ih(Qm))jm.pop(),Qm.pop(),Kh--;else if(jm[0]==Qm[0])jm.shift(),Qm.shift(),ph++;else break;for(var Xm=0,dg=0,Sg=jm[0],$g=Qm[0],Vg=Math.min(Sg.length,$g.length);Xmyf.ch&&Yg.charCodeAt(Yg.length-dg-1)==Gg.charCodeAt(Gg.length-dg-1);)Xm--,dg++;jm[jm.length-1]=Yg.slice(0,Yg.length-dg).replace(/^\u200b+/,""),jm[0]=jm[0].slice(Xm).replace(/\u200b+$/,"");var a_=og(ph,Xm),n_=og(Kh,Qm.length?Ih(Qm).length-dg:0);if(jm.length>1||jm[0]||Fg(a_,n_))return Bv(Hd.doc,jm,a_,n_,"+input"),!0},F_.prototype.ensurePolled=function(){this.forceCompositionEnd()},F_.prototype.reset=function(){this.forceCompositionEnd()},F_.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},F_.prototype.readFromDOMSoon=function(){var Hd=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(Hd.readDOMTimeout=null,Hd.composing)if(Hd.composing.done)Hd.composing=null;else return;Hd.updateFromDOM()},80))},F_.prototype.updateFromDOM=function(){var Hd=this;(this.cm.isReadOnly()||!this.pollContent())&&M0(this.cm,function(){return G0(Hd.cm)})},F_.prototype.setUneditable=function(Hd){Hd.contentEditable="false"},F_.prototype.onKeyPress=function(Hd){Hd.charCode==0||this.composing||(Hd.preventDefault(),this.cm.isReadOnly()||H_(this.cm,KS)(this.cm,String.fromCharCode(Hd.charCode==null?Hd.keyCode:Hd.charCode),0))},F_.prototype.readOnlyChanged=function(Hd){this.div.contentEditable=String(Hd!="nocursor")},F_.prototype.onContextMenu=function(){},F_.prototype.resetPosition=function(){},F_.prototype.needsContentAttribute=!0;function tv(Hd,Qd){var Ef=D1(Hd,Qd.line);if(!Ef||Ef.hidden)return null;var yf=Mg(Hd.doc,Qd.line),Tf=ex(Ef,yf,Qd.line),Bf=Ym(yf,Hd.doc.direction),ph="left";if(Bf){var Dh=_m(Bf,Qd.ch);ph=Dh%2?"right":"left"}var Fh=rx(Tf.map,Qd.ch,ph);return Fh.offset=Fh.collapse=="right"?Fh.end:Fh.start,Fh}function LT(Hd){for(var Qd=Hd;Qd;Qd=Qd.parentNode)if(/CodeMirror-gutter-wrapper/.test(Qd.className))return!0;return!1}function rv(Hd,Qd){return Qd&&(Hd.bad=!0),Hd}function Yx(Hd,Qd,Ef,yf,Tf){var Bf="",ph=!1,Dh=Hd.doc.lineSeparator(),Fh=!1;function Kh(Xm){return function(dg){return dg.id==Xm}}function Rm(){ph&&(Bf+=Dh,Fh&&(Bf+=Dh),ph=Fh=!1)}function jm(Xm){Xm&&(Rm(),Bf+=Xm)}function Qm(Xm){if(Xm.nodeType==1){var dg=Xm.getAttribute("cm-text");if(dg){jm(dg);return}var Sg=Xm.getAttribute("cm-marker"),$g;if(Sg){var Vg=Hd.findMarks(og(yf,0),og(Tf+1,0),Kh(+Sg));Vg.length&&($g=Vg[0].find(0))&&jm(V_(Hd.doc,$g.from,$g.to).join(Dh));return}if(Xm.getAttribute("contenteditable")=="false")return;var Yg=/^(pre|div|p|li|table|br)$/i.test(Xm.nodeName);if(!/^br$/i.test(Xm.nodeName)&&Xm.textContent.length==0)return;Yg&&Rm();for(var Gg=0;Gg=9&&Qd.hasSelection&&(Qd.hasSelection=null),Ef.poll()}),sg(Tf,"paste",function(ph){Kg(yf,ph)||Gb(ph,yf)||(yf.state.pasteIncoming=+new Date,Ef.fastPoll())});function Bf(ph){if(!Kg(yf,ph)){if(yf.somethingSelected())Q1({lineWise:!1,text:yf.getSelections()});else if(yf.options.lineWiseCopyCut){var Dh=Z1(yf);Q1({lineWise:!0,text:Dh.text}),ph.type=="cut"?yf.setSelections(Dh.ranges,null,Zh):(Ef.prevInput="",Tf.value=Dh.text.join(` +`),lh(Tf))}else return;ph.type=="cut"&&(yf.state.cutIncoming=+new Date)}}sg(Tf,"cut",Bf),sg(Tf,"copy",Bf),sg(Hd.scroller,"paste",function(ph){if(!(L_(Hd,ph)||Kg(yf,ph))){if(!Tf.dispatchEvent){yf.state.pasteIncoming=+new Date,Ef.focus();return}var Dh=new Event("paste");Dh.clipboardData=ph.clipboardData,Tf.dispatchEvent(Dh)}}),sg(Hd.lineSpace,"selectstart",function(ph){L_(Hd,ph)||r_(ph)}),sg(Tf,"compositionstart",function(){var ph=yf.getCursor("from");Ef.composing&&Ef.composing.range.clear(),Ef.composing={start:ph,range:yf.markText(ph,yf.getCursor("to"),{className:"CodeMirror-composing"})}}),sg(Tf,"compositionend",function(){Ef.composing&&(Ef.poll(),Ef.composing.range.clear(),Ef.composing=null)})},l0.prototype.createField=function(Hd){this.wrapper=p1(),this.textarea=this.wrapper.firstChild;var Qd=this.cm.options;d1(this.textarea,Qd.spellcheck,Qd.autocorrect,Qd.autocapitalize)},l0.prototype.screenReaderLabelChanged=function(Hd){Hd?this.textarea.setAttribute("aria-label",Hd):this.textarea.removeAttribute("aria-label")},l0.prototype.prepareSelection=function(){var Hd=this.cm,Qd=Hd.display,Ef=Hd.doc,yf=yS(Hd);if(Hd.options.moveInputWithCursor){var Tf=ug(Hd,Ef.sel.primary().head,"div"),Bf=Qd.wrapper.getBoundingClientRect(),ph=Qd.lineDiv.getBoundingClientRect();yf.teTop=Math.max(0,Math.min(Qd.wrapper.clientHeight-10,Tf.top+ph.top-Bf.top)),yf.teLeft=Math.max(0,Math.min(Qd.wrapper.clientWidth-10,Tf.left+ph.left-Bf.left))}return yf},l0.prototype.showSelection=function(Hd){var Qd=this.cm,Ef=Qd.display;Of(Ef.cursorDiv,Hd.cursors),Of(Ef.selectionDiv,Hd.selection),Hd.teTop!=null&&(this.wrapper.style.top=Hd.teTop+"px",this.wrapper.style.left=Hd.teLeft+"px")},l0.prototype.reset=function(Hd){if(!(this.contextMenuPending||this.composing&&Hd)){var Qd=this.cm;if(this.resetting=!0,Qd.somethingSelected()){this.prevInput="";var Ef=Qd.getSelection();this.textarea.value=Ef,Qd.state.focused&&lh(this.textarea),vd&&Cd>=9&&(this.hasSelection=Ef)}else Hd||(this.prevInput=this.textarea.value="",vd&&Cd>=9&&(this.hasSelection=null));this.resetting=!1}},l0.prototype.getField=function(){return this.textarea},l0.prototype.supportsTouch=function(){return!1},l0.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Xd||Sh(xh(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},l0.prototype.blur=function(){this.textarea.blur()},l0.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},l0.prototype.receivedFocus=function(){this.slowPoll()},l0.prototype.slowPoll=function(){var Hd=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){Hd.poll(),Hd.cm.state.focused&&Hd.slowPoll()})},l0.prototype.fastPoll=function(){var Hd=!1,Qd=this;Qd.pollingFast=!0;function Ef(){var yf=Qd.poll();!yf&&!Hd?(Hd=!0,Qd.polling.set(60,Ef)):(Qd.pollingFast=!1,Qd.slowPoll())}Qd.polling.set(20,Ef)},l0.prototype.poll=function(){var Hd=this,Qd=this.cm,Ef=this.textarea,yf=this.prevInput;if(this.contextMenuPending||this.resetting||!Qd.state.focused||mm(Ef)&&!yf&&!this.composing||Qd.isReadOnly()||Qd.options.disableInput||Qd.state.keySeq)return!1;var Tf=Ef.value;if(Tf==yf&&!Qd.somethingSelected())return!1;if(vd&&Cd>=9&&this.hasSelection===Tf||Jd&&/[\uf700-\uf7ff]/.test(Tf))return Qd.display.input.reset(),!1;if(Qd.doc.sel==Qd.display.selForContextMenu){var Bf=Tf.charCodeAt(0);if(Bf==8203&&!yf&&(yf="​"),Bf==8666)return this.reset(),this.cm.execCommand("undo")}for(var ph=0,Dh=Math.min(yf.length,Tf.length);ph1e3||Tf.indexOf(` +`)>-1?Ef.value=Hd.prevInput="":Hd.prevInput=Tf,Hd.composing&&(Hd.composing.range.clear(),Hd.composing.range=Qd.markText(Hd.composing.start,Qd.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},l0.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},l0.prototype.onKeyPress=function(){vd&&Cd>=9&&(this.hasSelection=null),this.fastPoll()},l0.prototype.onContextMenu=function(Hd){var Qd=this,Ef=Qd.cm,yf=Ef.display,Tf=Qd.textarea;Qd.contextMenuPending&&Qd.contextMenuPending();var Bf=Fb(Ef,Hd),ph=yf.scroller.scrollTop;if(!Bf||jd)return;var Dh=Ef.options.resetSelectionOnContextMenu;Dh&&Ef.doc.sel.contains(Bf)==-1&&H_(Ef,R0)(Ef.doc,Uy(Bf),Zh);var Fh=Tf.style.cssText,Kh=Qd.wrapper.style.cssText,Rm=Qd.wrapper.offsetParent.getBoundingClientRect();Qd.wrapper.style.cssText="position: static",Tf.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(Hd.clientY-Rm.top-5)+"px; left: "+(Hd.clientX-Rm.left-5)+`px; + z-index: 1000; background: `+(vd?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var jm;wd&&(jm=Tf.ownerDocument.defaultView.scrollY),yf.input.focus(),wd&&Tf.ownerDocument.defaultView.scrollTo(null,jm),yf.input.reset(),Ef.somethingSelected()||(Tf.value=Qd.prevInput=" "),Qd.contextMenuPending=Xm,yf.selForContextMenu=Ef.doc.sel,clearTimeout(yf.detectingSelectAll);function Qm(){if(Tf.selectionStart!=null){var Sg=Ef.somethingSelected(),$g="​"+(Sg?Tf.value:"");Tf.value="⇚",Tf.value=$g,Qd.prevInput=Sg?"":"​",Tf.selectionStart=1,Tf.selectionEnd=$g.length,yf.selForContextMenu=Ef.doc.sel}}function Xm(){if(Qd.contextMenuPending==Xm&&(Qd.contextMenuPending=!1,Qd.wrapper.style.cssText=Kh,Tf.style.cssText=Fh,vd&&Cd<9&&yf.scrollbars.setScrollTop(yf.scroller.scrollTop=ph),Tf.selectionStart!=null)){(!vd||vd&&Cd<9)&&Qm();var Sg=0,$g=function(){yf.selForContextMenu==Ef.doc.sel&&Tf.selectionStart==0&&Tf.selectionEnd>0&&Qd.prevInput=="​"?H_(Ef,vE)(Ef):Sg++<10?yf.detectingSelectAll=setTimeout($g,500):(yf.selForContextMenu=null,yf.input.reset())};yf.detectingSelectAll=setTimeout($g,200)}}if(vd&&Cd>=9&&Qm(),vf){Q_(Hd);var dg=function(){vg(window,"mouseup",dg),setTimeout(Xm,20)};sg(window,"mouseup",dg)}else setTimeout(Xm,50)},l0.prototype.readOnlyChanged=function(Hd){Hd||this.reset(),this.textarea.disabled=Hd=="nocursor",this.textarea.readOnly=!!Hd},l0.prototype.setUneditable=function(){},l0.prototype.needsContentAttribute=!1;function Kx(Hd,Qd){if(Qd=Qd?Rf(Qd):{},Qd.value=Hd.value,!Qd.tabindex&&Hd.tabIndex&&(Qd.tabindex=Hd.tabIndex),!Qd.placeholder&&Hd.placeholder&&(Qd.placeholder=Hd.placeholder),Qd.autofocus==null){var Ef=Sh(xh(Hd));Qd.autofocus=Ef==Hd||Hd.getAttribute("autofocus")!=null&&Ef==document.body}function yf(){Hd.value=Dh.getValue()}var Tf;if(Hd.form&&(sg(Hd.form,"submit",yf),!Qd.leaveSubmitMethodAlone)){var Bf=Hd.form;Tf=Bf.submit;try{var ph=Bf.submit=function(){yf(),Bf.submit=Tf,Bf.submit(),Bf.submit=ph}}catch{}}Qd.finishInit=function(Fh){Fh.save=yf,Fh.getTextArea=function(){return Hd},Fh.toTextArea=function(){Fh.toTextArea=isNaN,yf(),Hd.parentNode.removeChild(Fh.getWrapperElement()),Hd.style.display="",Hd.form&&(vg(Hd.form,"submit",yf),!Qd.leaveSubmitMethodAlone&&typeof Hd.form.submit=="function"&&(Hd.form.submit=Tf))}},Hd.style.display="none";var Dh=$_(function(Fh){return Hd.parentNode.insertBefore(Fh,Hd.nextSibling)},Qd);return Dh}function FT(Hd){Hd.off=vg,Hd.on=sg,Hd.wheelEventPixels=xT,Hd.Doc=F0,Hd.splitLines=ih,Hd.countColumn=_h,Hd.findColumn=Vf,Hd.isWordChar=Lm,Hd.Pass=oh,Hd.signal=kg,Hd.Line=yb,Hd.changeEnd=Gy,Hd.scrollbarModel=Dv,Hd.Pos=og,Hd.cmpPos=Fg,Hd.modes=Pm,Hd.mimeModes=Vm,Hd.resolveMode=lg,Hd.getMode=fg,Hd.modeExtensions=zg,Hd.extendMode=Tg,Hd.copyState=Xg,Hd.startState=A_,Hd.innerMode=D_,Hd.commands=a1,Hd.keyMap=Hb,Hd.keyName=t1,Hd.isModifierKey=G1,Hd.lookupKey=eb,Hd.normalizeKeyMap=Z0,Hd.StringStream=f_,Hd.SharedTextMarker=CE,Hd.TextMarker=Ib,Hd.LineWidget=Hv,Hd.e_preventDefault=r_,Hd.e_stopPropagation=O_,Hd.e_stop=Q_,Hd.addClass=yh,Hd.contains=sh,Hd.rmClass=Af,Hd.keyNames=A0}YS($_),OE($_);var Xx="iter insert remove copy getEditor constructor".split(" ");for(var eS in F0.prototype)F0.prototype.hasOwnProperty(eS)&&sm(Xx,eS)<0&&($_.prototype[eS]=function(Hd){return function(){return Hd.apply(this.doc,arguments)}}(F0.prototype[eS]));return v_(F0),$_.inputStyles={textarea:l0,contenteditable:F_},$_.defineMode=function(Hd){!$_.defaults.mode&&Hd!="null"&&($_.defaults.mode=Hd),Gm.apply(this,arguments)},$_.defineMIME=Tm,$_.defineMode("null",function(){return{token:function(Hd){return Hd.skipToEnd()}}}),$_.defineMIME("text/plain","null"),$_.defineExtension=function(Hd,Qd){$_.prototype[Hd]=Qd},$_.defineDocExtension=function(Hd,Qd){F0.prototype[Hd]=Qd},$_.fromTextArea=Kx,FT($_),$_.version="5.65.18",$_})}(codemirror)),codemirror.exports}var codemirrorExports=requireCodemirror();const CodeMirror=getDefaultExportFromCjs(codemirrorExports);var qt=Object.defineProperty,Jt=(Ra,ed,ud)=>ed in Ra?qt(Ra,ed,{enumerable:!0,configurable:!0,writable:!0,value:ud}):Ra[ed]=ud,x$1=(Ra,ed,ud)=>Jt(Ra,typeof ed!="symbol"?ed+"":ed,ud);function Zt(Ra){if(typeof document>"u")return;let ed=document.head||document.getElementsByTagName("head")[0],ud=document.createElement("style");ud.type="text/css",ed.appendChild(ud),ud.styleSheet?ud.styleSheet.cssText=Ra:ud.appendChild(document.createTextNode(Ra))}Zt(":where([data-sonner-toaster][dir=ltr]),:where(html[dir=ltr]){--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}:where([data-sonner-toaster][dir=rtl]),:where(html[dir=rtl]){--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted=true]){transform:translateY(-10px)}@media (hover:none) and (pointer:coarse){:where([data-sonner-toaster][data-lifted=true]){transform:none}}:where([data-sonner-toaster][data-x-position=right]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position=left]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position=center]){left:50%;transform:translateX(-50%)}:where([data-sonner-toaster][data-y-position=top]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position=bottom]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled=true]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast][data-y-position=top]){top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position=bottom]){bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise=true]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme=dark]) :where([data-cancel]){background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast]) :where([data-disabled=true]){cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping=true])::before{content:'';position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position=top][data-swiping=true])::before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position=bottom][data-swiping=true])::before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping=false][data-removed=true])::before{content:'';position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast])::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted=true]){--y:translateY(0);opacity:1}:where([data-sonner-toast][data-expanded=false][data-front=false]){--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded=false][data-front=false][data-styled=true])>*{opacity:0}:where([data-sonner-toast][data-visible=false]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted=true][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]){--y:translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]){--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed=true][data-front=false])::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let vt=0,ae$2=class{constructor(){x$1(this,"subscribers"),x$1(this,"toasts"),x$1(this,"subscribe",ed=>(this.subscribers.push(ed),()=>{const ud=this.subscribers.indexOf(ed);this.subscribers.splice(ud,1)})),x$1(this,"publish",ed=>{this.subscribers.forEach(ud=>ud(ed))}),x$1(this,"addToast",ed=>{this.publish(ed),this.toasts=[...this.toasts,ed]}),x$1(this,"create",ed=>{var ud;const{message:dd,...hd}=ed,md=typeof ed.id=="number"||ed.id&&((ud=ed.id)==null?void 0:ud.length)>0?ed.id:vt++,gd=this.toasts.find(vd=>vd.id===md),yd=ed.dismissible===void 0?!0:ed.dismissible;return gd?this.toasts=this.toasts.map(vd=>vd.id===md?(this.publish({...vd,...ed,id:md,title:dd}),{...vd,...ed,id:md,dismissible:yd,title:dd}):vd):this.addToast({title:dd,...hd,dismissible:yd,id:md}),md}),x$1(this,"dismiss",ed=>(ed||this.toasts.forEach(ud=>{this.subscribers.forEach(dd=>dd({id:ud.id,dismiss:!0}))}),this.subscribers.forEach(ud=>ud({id:ed,dismiss:!0})),ed)),x$1(this,"message",(ed,ud)=>this.create({...ud,message:ed,type:"default"})),x$1(this,"error",(ed,ud)=>this.create({...ud,type:"error",message:ed})),x$1(this,"success",(ed,ud)=>this.create({...ud,type:"success",message:ed})),x$1(this,"info",(ed,ud)=>this.create({...ud,type:"info",message:ed})),x$1(this,"warning",(ed,ud)=>this.create({...ud,type:"warning",message:ed})),x$1(this,"loading",(ed,ud)=>this.create({...ud,type:"loading",message:ed})),x$1(this,"promise",(ed,ud)=>{if(!ud)return;let dd;ud.loading!==void 0&&(dd=this.create({...ud,promise:ed,type:"loading",message:ud.loading,description:typeof ud.description!="function"?ud.description:void 0}));const hd=ed instanceof Promise?ed:ed();let md=dd!==void 0,gd;const yd=hd.then(async Cd=>{if(gd=["resolve",Cd],se$1(Cd)&&!Cd.ok){md=!1;const wd=typeof ud.error=="function"?await ud.error(`HTTP error! status: ${Cd.status}`):ud.error,Nd=typeof ud.description=="function"?await ud.description(`HTTP error! status: ${Cd.status}`):ud.description;this.create({id:dd,type:"error",message:wd,description:Nd})}else if(ud.success!==void 0){md=!1;const wd=typeof ud.success=="function"?await ud.success(Cd):ud.success,Nd=typeof ud.description=="function"?await ud.description(Cd):ud.description;this.create({id:dd,type:"success",message:wd,description:Nd})}}).catch(async Cd=>{if(gd=["reject",Cd],ud.error!==void 0){md=!1;const wd=typeof ud.error=="function"?await ud.error(Cd):ud.error,Nd=typeof ud.description=="function"?await ud.description(Cd):ud.description;this.create({id:dd,type:"error",message:wd,description:Nd})}}).finally(()=>{var Cd;md&&(this.dismiss(dd),dd=void 0),(Cd=ud.finally)==null||Cd.call(ud)}),vd=()=>new Promise((Cd,wd)=>yd.then(()=>gd[0]==="reject"?wd(gd[1]):Cd(gd[1])).catch(wd));return typeof dd!="string"&&typeof dd!="number"?{unwrap:vd}:Object.assign(dd,{unwrap:vd})}),x$1(this,"custom",(ed,ud)=>{const dd=(ud==null?void 0:ud.id)||vt++;return this.publish({component:ed,id:dd,...ud}),dd}),this.subscribers=[],this.toasts=[]}};const I$2=new ae$2;function oe$1(Ra,ed){const ud=(ed==null?void 0:ed.id)||vt++;return I$2.create({message:Ra,id:ud,type:"default",...ed}),ud}const se$1=Ra=>Ra&&typeof Ra=="object"&&"ok"in Ra&&typeof Ra.ok=="boolean"&&"status"in Ra&&typeof Ra.status=="number",ne$1=oe$1,re$1=()=>I$2.toasts,Ke=Object.assign(ne$1,{success:I$2.success,info:I$2.info,warning:I$2.warning,error:I$2.error,custom:I$2.custom,message:I$2.message,promise:I$2.promise,dismiss:I$2.dismiss,loading:I$2.loading},{getHistory:re$1});function ut(Ra){return Ra.label!==void 0}function ie$1(){const Ra=ref$1(!1);return watchEffect(()=>{const ed=()=>{Ra.value=document.hidden};return document.addEventListener("visibilitychange",ed),()=>window.removeEventListener("visibilitychange",ed)}),{isDocumentHidden:Ra}}const le$1=["aria-live","data-rich-colors","data-styled","data-mounted","data-promise","data-removed","data-visible","data-y-position","data-x-position","data-index","data-front","data-swiping","data-dismissible","data-type","data-invert","data-swipe-out","data-expanded"],de$1=["aria-label","data-disabled"],Wt=4e3,ue$1=20,ce$2=200,fe$1=defineComponent({__name:"Toast",props:{toast:{},toasts:{},index:{},expanded:{type:Boolean},invert:{type:Boolean},heights:{},gap:{},position:{},visibleToasts:{},expandByDefault:{type:Boolean},closeButton:{type:Boolean},interacting:{type:Boolean},style:{},cancelButtonStyle:{},actionButtonStyle:{},duration:{},class:{},unstyled:{type:Boolean},descriptionClass:{},loadingIcon:{},classes:{},icons:{},closeButtonAriaLabel:{},pauseWhenPageIsHidden:{type:Boolean},cn:{type:Function},defaultRichColors:{type:Boolean}},emits:["update:heights","removeToast"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=ref$1(!1),md=ref$1(!1),gd=ref$1(!1),yd=ref$1(!1),vd=ref$1(!1),Cd=ref$1(0),wd=ref$1(0),Nd=ref$1(ud.toast.duration||ud.duration||Wt),Ld=ref$1(null),Ud=ref$1(null),jd=computed(()=>ud.index===0),Gd=computed(()=>ud.index+1<=ud.visibleToasts),Yd=computed(()=>ud.toast.type),zd=computed(()=>ud.toast.dismissible!==!1),qd=computed(()=>ud.toast.class||""),Wd=computed(()=>ud.descriptionClass||""),Xd=ud.toast.style||{},Jd=computed(()=>ud.heights.findIndex(xh=>xh.toastId===ud.toast.id)||0),Zd=computed(()=>ud.toast.closeButton??ud.closeButton);computed(()=>ud.toast.duration||ud.duration||Wt);const mf=ref$1(0),xf=ref$1(0),_f=ref$1(null),vf=computed(()=>ud.position.split("-")),gf=computed(()=>vf.value[0]),Af=computed(()=>vf.value[1]),Df=computed(()=>typeof ud.toast.title!="string"),Of=computed(()=>typeof ud.toast.description!="string"),Cf=computed(()=>ud.heights.reduce((xh,Eh,kf)=>kf>=Jd.value?xh:xh+Eh.height,0)),If=ie$1(),Ff=computed(()=>ud.toast.invert||ud.invert),sh=computed(()=>Yd.value==="loading"),Sh=computed(()=>Jd.value*ud.gap+Cf.value||0);onMounted(()=>{if(!hd.value)return;const xh=Ud.value,Eh=xh==null?void 0:xh.style.height;xh.style.height="auto";const kf=xh.getBoundingClientRect().height;xh.style.height=Eh,wd.value=kf;let Rf;ud.heights.find(_h=>_h.toastId===ud.toast.id)?Rf=ud.heights.map(_h=>_h.toastId===ud.toast.id?{..._h,height:kf}:_h):Rf=[{toastId:ud.toast.id,height:kf,position:ud.toast.position},...ud.heights],dd("update:heights",Rf)});function yh(){md.value=!0,Cd.value=Sh.value;const xh=ud.heights.filter(Eh=>Eh.toastId!==ud.toast.id);dd("update:heights",xh),setTimeout(()=>{dd("removeToast",ud.toast)},ce$2)}function Mh(){var xh,Eh;if(sh.value||!zd.value)return{};yh(),(Eh=(xh=ud.toast).onDismiss)==null||Eh.call(xh,ud.toast)}function lh(xh){sh.value||!zd.value||(Ld.value=new Date,Cd.value=Sh.value,xh.target.setPointerCapture(xh.pointerId),xh.target.tagName!=="BUTTON"&&(gd.value=!0,_f.value={x:xh.clientX,y:xh.clientY}))}function rh(){var xh,Eh,kf,Rf,_h;if(yd.value||!zd)return;_f.value=null;const Ph=Number(((xh=Ud.value)==null?void 0:xh.style.getPropertyValue("--swipe-amount").replace("px",""))||0),sm=new Date().getTime()-((Eh=Ld.value)==null?void 0:Eh.getTime()),th=Math.abs(Ph)/sm;if(Math.abs(Ph)>=ue$1||th>.11){Cd.value=Sh.value,(Rf=(kf=ud.toast).onDismiss)==null||Rf.call(kf,ud.toast),yh(),yd.value=!0,vd.value=!1;return}(_h=Ud.value)==null||_h.style.setProperty("--swipe-amount","0px"),gd.value=!1}function mh(xh){var Eh,kf;if(!_f.value||!zd.value)return;const Rf=xh.clientY-_f.value.y,_h=((Eh=window.getSelection())==null?void 0:Eh.toString().length)>0,Ph=gf.value==="top"?Math.min(0,Rf):Math.max(0,Rf);Math.abs(Ph)>0&&(vd.value=!0),!_h&&((kf=Ud.value)==null||kf.style.setProperty("--swipe-amount",`${Ph}px`))}return watchEffect(xh=>{if(ud.toast.promise&&Yd.value==="loading"||ud.toast.duration===1/0||ud.toast.type==="loading")return;let Eh;const kf=()=>{if(xf.value{Nd.value!==1/0&&(mf.value=new Date().getTime(),Eh=setTimeout(()=>{var _h,Ph;(Ph=(_h=ud.toast).onAutoClose)==null||Ph.call(_h,ud.toast),yh()},Nd.value))};ud.expanded||ud.interacting||ud.pauseWhenPageIsHidden&&If?kf():Rf(),xh(()=>{clearTimeout(Eh)})}),watch(()=>ud.toast.delete,()=>{ud.toast.delete&&yh()},{deep:!0}),onMounted(()=>{if(hd.value=!0,Ud.value){const xh=Ud.value.getBoundingClientRect().height;wd.value=xh;const Eh=[{toastId:ud.toast.id,height:xh,position:ud.toast.position},...ud.heights];dd("update:heights",Eh)}}),onBeforeUnmount(()=>{if(Ud.value){const xh=ud.heights.filter(Eh=>Eh.toastId!==ud.toast.id);dd("update:heights",xh)}}),(xh,Eh)=>{var kf,Rf,_h,Ph,sm,th,oh,Zh,Sm,$h,Vf,nh,Lh,Ih,om,zh,Om,Im,Zm,Lm,Wm,ig,yg,jh,Pf,$f,Nh;return openBlock(),createElementBlock("li",{ref_key:"toastRef",ref:Ud,"aria-live":xh.toast.important?"assertive":"polite","aria-atomic":"true",role:"status",tabindex:"0","data-sonner-toast":"true",class:normalizeClass(xh.cn(ud.class,qd.value,(kf=xh.classes)==null?void 0:kf.toast,(Rf=xh.toast.classes)==null?void 0:Rf.toast,(_h=xh.classes)==null?void 0:_h[Yd.value],(sm=(Ph=xh.toast)==null?void 0:Ph.classes)==null?void 0:sm[Yd.value])),"data-rich-colors":xh.toast.richColors??xh.defaultRichColors,"data-styled":!(xh.toast.component||(th=xh.toast)!=null&&th.unstyled||xh.unstyled),"data-mounted":hd.value,"data-promise":!!xh.toast.promise,"data-removed":md.value,"data-visible":Gd.value,"data-y-position":gf.value,"data-x-position":Af.value,"data-index":xh.index,"data-front":jd.value,"data-swiping":gd.value,"data-dismissible":zd.value,"data-type":Yd.value,"data-invert":Ff.value,"data-swipe-out":yd.value,"data-expanded":!!(xh.expanded||xh.expandByDefault&&hd.value),style:normalizeStyle({"--index":xh.index,"--toasts-before":xh.index,"--z-index":xh.toasts.length-xh.index,"--offset":`${md.value?Cd.value:Sh.value}px`,"--initial-height":xh.expandByDefault?"auto":`${wd.value}px`,...xh.style,...unref(Xd)}),onPointerdown:lh,onPointerup:rh,onPointermove:mh},[Zd.value&&!xh.toast.component?(openBlock(),createElementBlock("button",{key:0,"aria-label":xh.closeButtonAriaLabel||"Close toast","data-disabled":sh.value,"data-close-button":"true",class:normalizeClass(xh.cn((oh=xh.classes)==null?void 0:oh.closeButton,(Sm=(Zh=xh.toast)==null?void 0:Zh.classes)==null?void 0:Sm.closeButton)),onClick:Mh},[($h=xh.icons)!=null&&$h.close?(openBlock(),createBlock(resolveDynamicComponent((Vf=xh.icons)==null?void 0:Vf.close),{key:0})):renderSlot(xh.$slots,"close-icon",{key:1})],10,de$1)):createCommentVNode("",!0),xh.toast.component?(openBlock(),createBlock(resolveDynamicComponent(xh.toast.component),mergeProps({key:1},xh.toast.componentProps,{onCloseToast:Mh}),null,16)):(openBlock(),createElementBlock(Fragment,{key:2},[Yd.value!=="default"||xh.toast.icon||xh.toast.promise?(openBlock(),createElementBlock("div",{key:0,"data-icon":"",class:normalizeClass(xh.cn((nh=xh.classes)==null?void 0:nh.icon,(Ih=(Lh=xh.toast)==null?void 0:Lh.classes)==null?void 0:Ih.icon))},[(xh.toast.promise||Yd.value==="loading")&&!xh.toast.icon?renderSlot(xh.$slots,"loading-icon",{key:0}):createCommentVNode("",!0),xh.toast.icon?(openBlock(),createBlock(resolveDynamicComponent(xh.toast.icon),{key:1})):(openBlock(),createElementBlock(Fragment,{key:2},[Yd.value==="success"?renderSlot(xh.$slots,"success-icon",{key:0}):Yd.value==="error"?renderSlot(xh.$slots,"error-icon",{key:1}):Yd.value==="warning"?renderSlot(xh.$slots,"warning-icon",{key:2}):Yd.value==="info"?renderSlot(xh.$slots,"info-icon",{key:3}):createCommentVNode("",!0)],64))],2)):createCommentVNode("",!0),createBaseVNode("div",{"data-content":"",class:normalizeClass(xh.cn((om=xh.classes)==null?void 0:om.content,(Om=(zh=xh.toast)==null?void 0:zh.classes)==null?void 0:Om.content))},[createBaseVNode("div",{"data-title":"",class:normalizeClass(xh.cn((Im=xh.classes)==null?void 0:Im.title,(Zm=xh.toast.classes)==null?void 0:Zm.title))},[Df.value?(openBlock(),createBlock(resolveDynamicComponent(xh.toast.title),normalizeProps(mergeProps({key:0},xh.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(xh.toast.title),1)],64))],2),xh.toast.description?(openBlock(),createElementBlock("div",{key:0,"data-description":"",class:normalizeClass(xh.cn(xh.descriptionClass,Wd.value,(Lm=xh.classes)==null?void 0:Lm.description,(Wm=xh.toast.classes)==null?void 0:Wm.description))},[Of.value?(openBlock(),createBlock(resolveDynamicComponent(xh.toast.description),normalizeProps(mergeProps({key:0},xh.toast.componentProps)),null,16)):(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(toDisplayString(xh.toast.description),1)],64))],2)):createCommentVNode("",!0)],2),xh.toast.cancel?(openBlock(),createElementBlock("button",{key:1,style:normalizeStyle(xh.toast.cancelButtonStyle||xh.cancelButtonStyle),class:normalizeClass(xh.cn((ig=xh.classes)==null?void 0:ig.cancelButton,(yg=xh.toast.classes)==null?void 0:yg.cancelButton)),"data-button":"","data-cancel":"",onClick:Eh[0]||(Eh[0]=Wh=>{var _m,$m;unref(ut)(xh.toast.cancel)&&zd.value&&(($m=(_m=xh.toast.cancel).onClick)==null||$m.call(_m,Wh),yh())})},toDisplayString(unref(ut)(xh.toast.cancel)?(jh=xh.toast.cancel)==null?void 0:jh.label:xh.toast.cancel),7)):createCommentVNode("",!0),xh.toast.action?(openBlock(),createElementBlock("button",{key:2,style:normalizeStyle(xh.toast.actionButtonStyle||xh.actionButtonStyle),class:normalizeClass(xh.cn((Pf=xh.classes)==null?void 0:Pf.actionButton,($f=xh.toast.classes)==null?void 0:$f.actionButton)),"data-button":"","data-action":"",onClick:Eh[1]||(Eh[1]=Wh=>{var _m,$m;unref(ut)(xh.toast.action)&&(Wh.defaultPrevented||(($m=(_m=xh.toast.action).onClick)==null||$m.call(_m,Wh),!Wh.defaultPrevented&&yh()))})},toDisplayString(unref(ut)(xh.toast.action)?(Nh=xh.toast.action)==null?void 0:Nh.label:xh.toast.action),7)):createCommentVNode("",!0)],64))],46,le$1)}}}),at$1=(Ra,ed)=>{const ud=Ra.__vccOpts||Ra;for(const[dd,hd]of ed)ud[dd]=hd;return ud},pe$1={},he$1={xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stoke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"};function ge$1(Ra,ed){return openBlock(),createElementBlock("svg",he$1,ed[0]||(ed[0]=[createBaseVNode("line",{x1:"18",y1:"6",x2:"6",y2:"18"},null,-1),createBaseVNode("line",{x1:"6",y1:"6",x2:"18",y2:"18"},null,-1)]))}const me$1=at$1(pe$1,[["render",ge$1]]),ve$1=["data-visible"],ye$1={class:"sonner-spinner"},be$2=defineComponent({__name:"Loader",props:{visible:{type:Boolean}},setup(Ra){const ed=Array(12).fill(0);return(ud,dd)=>(openBlock(),createElementBlock("div",{class:"sonner-loading-wrapper","data-visible":ud.visible},[createBaseVNode("div",ye$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(ed),hd=>(openBlock(),createElementBlock("div",{key:`spinner-bar-${hd}`,class:"sonner-loading-bar"}))),128))])],8,ve$1))}}),we$1={},ke$1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function xe$1(Ra,ed){return openBlock(),createElementBlock("svg",ke$1,ed[0]||(ed[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1)]))}const Te=at$1(we$1,[["render",xe$1]]),Be$1={},Se$1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function Ce$1(Ra,ed){return openBlock(),createElementBlock("svg",Se$1,ed[0]||(ed[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z","clip-rule":"evenodd"},null,-1)]))}const $e=at$1(Be$1,[["render",Ce$1]]),Ie$1={},Ee$1={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"};function Pe$1(Ra,ed){return openBlock(),createElementBlock("svg",Ee$1,ed[0]||(ed[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z","clip-rule":"evenodd"},null,-1)]))}const De=at$1(Ie$1,[["render",Pe$1]]),He={},ze={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"};function Me$1(Ra,ed){return openBlock(),createElementBlock("svg",ze,ed[0]||(ed[0]=[createBaseVNode("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1)]))}const Oe$1=at$1(He,[["render",Me$1]]),Ae$1=["aria-label"],Le$1=["dir","data-theme","data-rich-colors","data-y-position","data-x-position","data-lifted"],Ye=3,Ut="32px",Ne$1=356,Re$1=14,Fe$1=typeof window<"u"&&typeof document<"u";function je$1(...Ra){return Ra.filter(Boolean).join(" ")}const Ve=defineComponent({name:"Toaster",inheritAttrs:!1,__name:"Toaster",props:{invert:{type:Boolean,default:!1},theme:{default:"light"},position:{default:"bottom-right"},hotkey:{default:()=>["altKey","KeyT"]},richColors:{type:Boolean,default:!1},expand:{type:Boolean,default:!1},duration:{},gap:{default:Re$1},visibleToasts:{default:Ye},closeButton:{type:Boolean,default:!1},toastOptions:{default:()=>({})},class:{default:""},style:{default:()=>({})},offset:{default:Ut},dir:{default:"auto"},icons:{},containerAriaLabel:{default:"Notifications"},pauseWhenPageIsHidden:{type:Boolean,default:!1},cn:{type:Function,default:je$1}},setup(Ra){const ed=Ra;function ud(){if(typeof window>"u"||typeof document>"u")return"ltr";const Wd=document.documentElement.getAttribute("dir");return Wd==="auto"||!Wd?window.getComputedStyle(document.documentElement).direction:Wd}const dd=useAttrs(),hd=ref$1([]),md=computed(()=>(Wd,Xd)=>hd.value.filter(Jd=>!Jd.position&&Xd===0||Jd.position===Wd)),gd=computed(()=>{const Wd=hd.value.filter(Xd=>Xd.position).map(Xd=>Xd.position);return Wd.length>0?Array.from(new Set([ed.position].concat(Wd))):[ed.position]}),yd=ref$1([]),vd=ref$1(!1),Cd=ref$1(!1),wd=ref$1(ed.theme!=="system"?ed.theme:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Nd=ref$1(null),Ld=ref$1(null),Ud=ref$1(!1),jd=ed.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,"");function Gd(Wd){var Xd;(Xd=hd.value.find(Jd=>Jd.id===Wd.id))!=null&&Xd.delete||I$2.dismiss(Wd.id),hd.value=hd.value.filter(({id:Jd})=>Jd!==Wd.id)}function Yd(Wd){var Xd,Jd;Ud.value&&!((Jd=(Xd=Wd.currentTarget)==null?void 0:Xd.contains)!=null&&Jd.call(Xd,Wd.relatedTarget))&&(Ud.value=!1,Ld.value&&(Ld.value.focus({preventScroll:!0}),Ld.value=null))}function zd(Wd){Wd.target instanceof HTMLElement&&Wd.target.dataset.dismissible==="false"||Ud.value||(Ud.value=!0,Ld.value=Wd.relatedTarget)}function qd(Wd){Wd.target&&Wd.target instanceof HTMLElement&&Wd.target.dataset.dismissible==="false"||(Cd.value=!0)}return watchEffect(Wd=>{const Xd=I$2.subscribe(Jd=>{if(Jd.dismiss){hd.value=hd.value.map(Zd=>Zd.id===Jd.id?{...Zd,delete:!0}:Zd);return}nextTick$1(()=>{const Zd=hd.value.findIndex(mf=>mf.id===Jd.id);Zd!==-1?hd.value=[...hd.value.slice(0,Zd),{...hd.value[Zd],...Jd},...hd.value.slice(Zd+1)]:hd.value=[Jd,...hd.value]})});Wd(Xd)}),watch(()=>ed.theme,Wd=>{if(Wd!=="system"){wd.value=Wd;return}if(Wd==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?wd.value="dark":wd.value="light"),typeof window>"u")return;const Xd=window.matchMedia("(prefers-color-scheme: dark)");try{Xd.addEventListener("change",({matches:Jd})=>{Jd?wd.value="dark":wd.value="light"})}catch{Xd.addListener(({matches:Jd})=>{try{Jd?wd.value="dark":wd.value="light"}catch(Zd){console.error(Zd)}})}}),watchEffect(()=>{Nd.value&&Ld.value&&(Ld.value.focus({preventScroll:!0}),Ld.value=null,Ud.value=!1)}),watchEffect(()=>{hd.value.length<=1&&(vd.value=!1)}),watchEffect(Wd=>{function Xd(Jd){const Zd=ed.hotkey.every(_f=>Jd[_f]||Jd.code===_f),mf=Array.isArray(Nd.value)?Nd.value[0]:Nd.value;Zd&&(vd.value=!0,mf==null||mf.focus());const xf=document.activeElement===Nd.value||(mf==null?void 0:mf.contains(document.activeElement));Jd.code==="Escape"&&xf&&(vd.value=!1)}Fe$1&&(document.addEventListener("keydown",Xd),Wd(()=>{document.removeEventListener("keydown",Xd)}))}),(Wd,Xd)=>(openBlock(),createElementBlock("section",{"aria-label":`${Wd.containerAriaLabel} ${unref(jd)}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},[(openBlock(!0),createElementBlock(Fragment,null,renderList(gd.value,(Jd,Zd)=>{var mf;return openBlock(),createElementBlock("ol",mergeProps({key:Jd,ref_for:!0,ref_key:"listRef",ref:Nd,"data-sonner-toaster":"",class:ed.class,dir:Wd.dir==="auto"?ud():Wd.dir,tabIndex:-1,"data-theme":Wd.theme,"data-rich-colors":Wd.richColors,"data-y-position":Jd.split("-")[0],"data-x-position":Jd.split("-")[1],"data-lifted":vd.value&&hd.value.length>1&&!Wd.expand,style:{"--front-toast-height":`${(mf=yd.value[0])==null?void 0:mf.height}px`,"--offset":typeof Wd.offset=="number"?`${Wd.offset}px`:Wd.offset||Ut,"--width":`${Ne$1}px`,"--gap":`${Wd.gap}px`,...Wd.style,...unref(dd).style}},Wd.$attrs,{onBlur:Yd,onFocus:zd,onMouseenter:Xd[1]||(Xd[1]=()=>vd.value=!0),onMousemove:Xd[2]||(Xd[2]=()=>vd.value=!0),onMouseleave:Xd[3]||(Xd[3]=()=>{Cd.value||(vd.value=!1)}),onPointerdown:qd,onPointerup:Xd[4]||(Xd[4]=()=>Cd.value=!1)}),[(openBlock(!0),createElementBlock(Fragment,null,renderList(md.value(Jd,Zd),(xf,_f)=>{var vf,gf,Af,Df,Of,Cf,If,Ff,sh;return openBlock(),createBlock(fe$1,{key:xf.id,heights:yd.value.filter(Sh=>Sh.position===xf.position),icons:Wd.icons,index:_f,toast:xf,defaultRichColors:Wd.richColors,duration:((vf=Wd.toastOptions)==null?void 0:vf.duration)??Wd.duration,class:normalizeClass(((gf=Wd.toastOptions)==null?void 0:gf.class)??""),descriptionClass:(Af=Wd.toastOptions)==null?void 0:Af.descriptionClass,invert:Wd.invert,visibleToasts:Wd.visibleToasts,closeButton:((Df=Wd.toastOptions)==null?void 0:Df.closeButton)??Wd.closeButton,interacting:Cd.value,position:Jd,style:normalizeStyle((Of=Wd.toastOptions)==null?void 0:Of.style),unstyled:(Cf=Wd.toastOptions)==null?void 0:Cf.unstyled,classes:(If=Wd.toastOptions)==null?void 0:If.classes,cancelButtonStyle:(Ff=Wd.toastOptions)==null?void 0:Ff.cancelButtonStyle,actionButtonStyle:(sh=Wd.toastOptions)==null?void 0:sh.actionButtonStyle,toasts:hd.value.filter(Sh=>Sh.position===xf.position),expandByDefault:Wd.expand,gap:Wd.gap,expanded:vd.value,pauseWhenPageIsHidden:Wd.pauseWhenPageIsHidden,cn:Wd.cn,"onUpdate:heights":Xd[0]||(Xd[0]=Sh=>{yd.value=Sh}),onRemoveToast:Gd},{"close-icon":withCtx(()=>[renderSlot(Wd.$slots,"close-icon",{},()=>[createVNode(me$1)])]),"loading-icon":withCtx(()=>[renderSlot(Wd.$slots,"loading-icon",{},()=>[createVNode(be$2,{visible:xf.type==="loading"},null,8,["visible"])])]),"success-icon":withCtx(()=>[renderSlot(Wd.$slots,"success-icon",{},()=>[createVNode(Te)])]),"error-icon":withCtx(()=>[renderSlot(Wd.$slots,"error-icon",{},()=>[createVNode(Oe$1)])]),"warning-icon":withCtx(()=>[renderSlot(Wd.$slots,"warning-icon",{},()=>[createVNode(De)])]),"info-icon":withCtx(()=>[renderSlot(Wd.$slots,"info-icon",{},()=>[createVNode($e)])]),_:2},1032,["heights","icons","index","toast","defaultRichColors","duration","class","descriptionClass","invert","visibleToasts","closeButton","interacting","position","style","unstyled","classes","cancelButtonStyle","actionButtonStyle","toasts","expandByDefault","gap","expanded","pauseWhenPageIsHidden","cn"])}),128))],16,Le$1)}),128))],8,Ae$1))}}),useStore=defineStore("store",()=>{const Ra=useDark(),ed=useToggle(Ra),ud=useStorage("isMacCodeBlock",!0),dd=useToggle(ud),hd=useStorage("isEditOnLeft",!0),md=useToggle(hd),gd=useStorage("isCiteStatus",!1),yd=useToggle(gd),vd=useStorage("isCountStatus",!1),Cd=useToggle(vd),wd=useStorage(addPrefix("use_indent"),!1),Nd=useToggle(wd),Ld=ref$1(""),Ud=useStorage(addPrefix("theme"),themeOptions[0].value),jd=useStorage("fonts",fontFamilyOptions[0].value),Gd=useStorage("size",fontSizeOptions[2].value),Yd=useStorage("color",colorOptions[0].value),zd=useStorage("codeBlockTheme",codeBlockThemeOptions[23].value),qd=useStorage("legend",legendOptions[3].value),Wd=computed(()=>Number(Gd.value.replace("px",""))),Xd=ref$1(null),Jd=useStorage("__editor_content",DEFAULT_CONTENT),Zd=useStorage(addPrefix("is_open_right_slider"),!1),mf=useStorage(addPrefix("is_open_post_slider"),!1),xf=useStorage(addPrefix("posts"),[{title:"内容1",content:DEFAULT_CONTENT}]),_f=useStorage(addPrefix("current_post_index"),0),vf=Lm=>{_f.value=xf.value.push({title:Lm,content:`# ${Lm}`})-1},gf=(Lm,Wm)=>{xf.value[Lm].title=Wm},Af=Lm=>{xf.value.splice(Lm,1),_f.value=Math.min(Lm,xf.value.length-1)};watch(_f,()=>{toRaw(Xd.value).setValue(xf.value[_f.value].content)}),onMounted(()=>{Jd.value!==DEFAULT_CONTENT&&(xf.value[_f.value].content=Jd.value,Jd.value=DEFAULT_CONTENT)});const Df=()=>{formatDoc(Xd.value.getValue()).then(Lm=>{xf.value[_f.value].content=Lm,toRaw(Xd.value).setValue(Lm)})},Of=()=>{const Lm=zd.value,Wm=document.querySelector("#hljs");if(Wm)Wm.setAttribute("href",Lm);else{const ig=document.createElement("link");ig.setAttribute("type","text/css"),ig.setAttribute("rel","stylesheet"),ig.setAttribute("href",Lm),ig.setAttribute("id","hljs"),document.head.appendChild(ig)}},Cf=ref$1(null),If=Lm=>{Cf.value.setValue(Lm)},Ff=useStorage("__css_content",DEFAULT_CSS_CONTENT),sh=useStorage(addPrefix("css_content_config"),{active:"方案1",tabs:[{title:"方案1",name:"方案1",content:Ff.value||DEFAULT_CSS_CONTENT}]});onMounted(()=>{Ff.value=""});const Sh=()=>sh.value.tabs.find(Lm=>Lm.name===sh.value.active),yh=Lm=>{sh.value.active=Lm;const Wm=sh.value.tabs.find(ig=>ig.name===Lm).content;If(Wm)},Mh=Lm=>{const Wm=Sh();Wm.title=Lm,Wm.name=Lm,sh.value.active=Lm},lh=Lm=>{sh.value.tabs.push({name:Lm,title:Lm,content:DEFAULT_CSS_CONTENT}),sh.value.active=Lm,If(DEFAULT_CSS_CONTENT)},rh=Lm=>sh.value.tabs.every(({name:Wm})=>Wm!==Lm),mh=initRenderer({theme:customCssWithTemplate(css2json(Sh().content),Yd.value,customizeTheme(themeMap[Ud.value],{fontSize:Wd.value,color:Yd.value})),fonts:jd.value,size:Gd.value,isUseIndent:wd.value}),xh=ref$1(null),Eh=()=>{Of(),mh.reset({citeStatus:gd.value,legend:qd.value,isUseIndent:wd.value,countStatus:vd.value});const{markdownContent:Lm,readingTime:Wm}=mh.parseFrontMatterAndContent(Xd.value.getValue());xh.value=Wm;let ig=marked$1.parse(Lm);ig=purify.sanitize(ig),ig=mh.buildReadingTime(Wm)+ig,ig=ig.replace(/(style=".*?)"/,'$1;margin-top: 0"'),ig+=mh.buildFootnotes(),ig+=mh.buildAddition(),ud.value&&(ig+=` - `),rg+=` + `),ig+=` - `,Md.value=fh.createContainer(rg)},Df=()=>{const Fm=css2json(Sf.value.getValue()),Ym=customCssWithTemplate(Fm,Vd.value,customizeTheme(themeMap[Ld.value],{fontSize:qd.value,color:Vd.value}));fh.setOptions({theme:Ym}),vh()};onMounted(()=>{const Fm=document.querySelector("#cssEditor");Fm.value=xh().content;const Ym=Ra.value?"darcula":"xq-light";Sf.value=markRaw(CodeMirror.fromTextArea(Fm,{mode:"css",theme:Ym,lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,autofocus:!0,extraKeys:{[`${shiftKey}-${altKey}-F`]:function(Eg){formatDoc(Eg.getValue(),"css").then(Fh=>{xh().content=Fh,Eg.setValue(Fh)})}}})),Sf.value.on("keyup",(rg,Eg)=>{(Eg.keyCode>=65&&Eg.keyCode<=90||Eg.keyCode===189)&&rg.showHint(Eg)}),Sf.value.on("update",()=>{Df(),xh().content=Sf.value.getValue()})}),watch(Ra,()=>{var Ym,rg;const Fm=Ra.value?"darcula":"xq-light";(rg=(Ym=toRaw(Sf.value))==null?void 0:Ym.setOption)==null||rg.call(Ym,"theme",Fm)});const Af=()=>{hd.value=!1,rd.value=!0,gd.value=!1,Ld.value=themeOptions[0].value,Fd.value=fontFamilyOptions[0].value,Fd.value=fontFamilyOptions[0].value,Hd.value=fontSizeOptions[2].value,Vd.value=colorOptions[0].value,Gd.value=codeBlockThemeOptions[23].value,Ud.value=legendOptions[3].value,lh.value={active:"方案 1",tabs:[{title:"方案 1",name:"方案 1",content:Pf.value||DEFAULT_CSS_CONTENT}]},Sf.value.setValue(DEFAULT_CSS_CONTENT),Df(),vh(),Ke.success("样式重置成功~")},_h=Fm=>(...Ym)=>{Fm(...Ym),vh()},Nh=(Fm,Ym)=>{const rg=themeMap[Ld.value],Eg=Number(Fm.replace("px",""));return customCssWithTemplate(css2json(xh().content),Ym,customizeTheme(rg,{fontSize:Eg,color:Ym}))},dm=_h(Fm=>{fh.setOptions({theme:customCssWithTemplate(css2json(xh().content),Vd.value,customizeTheme(themeMap[Fm],{fontSize:qd.value}))}),Ld.value=Fm}),Jf=_h(Fm=>{fh.setOptions({fonts:Fm}),Fd.value=Fm}),oh=_h(Fm=>{const Ym=Nh(Fm,Vd.value);fh.setOptions({size:Fm,theme:Ym}),Hd.value=Fm}),Xh=_h(Fm=>{const Ym=Nh(Hd.value,Fm);fh.setOptions({theme:Ym}),Vd.value=Fm}),Tm=_h(Fm=>{Gd.value=Fm}),kh=_h(Fm=>{Ud.value=Fm}),Zf=_h(()=>{sd()}),th=_h(()=>{md()}),$h=_h(()=>{yd()}),wh=_h(()=>{Nd()}),fm=()=>{exportHTML(Vd.value),document.querySelector("#output").innerHTML=Md.value},zh=()=>{downloadMD(Wd.value.getValue())},Mm=()=>{const Fm=document.body,Ym=document.createElement("input");Ym.type="file",Ym.name="filename",Ym.accept=".md",Ym.onchange=()=>{const rg=Ym.files[0];if(!rg)return;const Eg=new FileReader;Eg.readAsText(rg),Eg.onload=Fh=>{Wd.value.setValue(Fh.target.result),Ke.success("文档导入成功")}},Fm.appendChild(Ym),Ym.click(),Fm.removeChild(Ym)},Rm=ref$1(!1);return{isDark:Ra,toggleDark:qa,isEditOnLeft:pd,toggleEditOnLeft:fd,isMacCodeBlock:rd,isCiteStatus:hd,citeStatusChanged:th,isUseIndent:vd,useIndentChanged:wh,isCountStatus:gd,countStatusChanged:$h,output:Md,editor:Wd,cssEditor:Sf,theme:Ld,fontFamily:Fd,fontSize:Hd,primaryColor:Vd,codeBlockTheme:Gd,legend:Ud,readingTime:Sh,editorRefresh:vh,themeChanged:dm,fontChanged:Jf,sizeChanged:oh,colorChanged:Xh,codeBlockThemeChanged:Tm,legendChanged:kh,macCodeBlockChanged:Zf,formatContent:Cf,exportEditorContent2HTML:fm,exportEditorContent2MD:zh,importMarkdownContent:Mm,isOpenConfirmDialog:Rm,resetStyleConfirm:()=>{Rm.value=!0},resetStyle:Af,cssContentConfig:lh,addCssContentTab:dh,validatorTabName:eh,setCssEditorValue:wf,tabChanged:Eh,renameTab:Mh,posts:Ef,currentPostIndex:pf,addPost:mf,renamePost:_f,delPost:xf,isOpenPostSlider:df,isOpenRightSlider:Xd}}),useDisplayStore=defineStore("display",()=>{const Ra=ref$1(!1),qa=useToggle(Ra),rd=ref$1(!1),sd=useToggle(rd),pd=ref$1(!1),fd=useToggle(pd);return{isShowCssEditor:Ra,toggleShowCssEditor:qa,isShowInsertFormDialog:rd,toggleShowInsertFormDialog:sd,isShowUploadImgDialog:pd,toggleShowUploadImgDialog:fd}}),_hoisted_1$e={class:"space-x-2 flex justify-between"},_hoisted_2$9={class:"space-y-2 border-1 rounded p-2"},_sfc_main$15=defineComponent({__name:"InsertFormDialog",setup(Ra){const qa=useStore(),rd=useDisplayStore(),{toggleShowInsertFormDialog:sd}=rd,pd=ref$1(3),fd=ref$1(3),hd=ref$1({});function md(){pd.value=3,fd.value=3,hd.value={}}function gd(){const vd=createTable({rows:pd.value,cols:fd.value,data:hd.value});toRaw(qa.editor).replaceSelection(` -${vd} -`,"end"),md(),sd()}function yd(vd){vd||sd(!1)}return(vd,Nd)=>{const Md=_sfc_main$16,Ld=_sfc_main$17,Fd=_sfc_main$18,Hd=_sfc_main$19,Vd=_sfc_main$1a,Gd=_sfc_main$1b,Ud=_sfc_main$1c,qd=_sfc_main$1d,Wd=_sfc_main$1e,Kd=_sfc_main$1o,Xd=_sfc_main$1f,df=_sfc_main$1g,Ef=_sfc_main$1h;return openBlock(),createBlock(Ef,{open:unref(rd).isShowInsertFormDialog,"onUpdate:open":yd},{default:withCtx(()=>[createVNode(df,null,{default:withCtx(()=>[createVNode(Ld,null,{default:withCtx(()=>[createVNode(Md,null,{default:withCtx(()=>Nd[3]||(Nd[3]=[createTextVNode("插入表格")])),_:1})]),_:1}),createBaseVNode("div",_hoisted_1$e,[createVNode(qd,{modelValue:unref(pd),"onUpdate:modelValue":Nd[0]||(Nd[0]=pf=>isRef(pd)?pd.value=pf:null),min:1,max:100},{default:withCtx(()=>[createVNode(Fd,null,{default:withCtx(()=>Nd[4]||(Nd[4]=[createTextVNode("行数")])),_:1}),createVNode(Ud,null,{default:withCtx(()=>[createVNode(Hd),createVNode(Vd),createVNode(Gd)]),_:1})]),_:1},8,["modelValue"]),createVNode(qd,{modelValue:unref(fd),"onUpdate:modelValue":Nd[1]||(Nd[1]=pf=>isRef(fd)?fd.value=pf:null),min:1,max:100},{default:withCtx(()=>[createVNode(Fd,null,{default:withCtx(()=>Nd[5]||(Nd[5]=[createTextVNode("列数")])),_:1}),createVNode(Ud,null,{default:withCtx(()=>[createVNode(Hd),createVNode(Vd),createVNode(Gd)]),_:1})]),_:1},8,["modelValue"])]),createBaseVNode("div",_hoisted_2$9,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(pd)+1,pf=>(openBlock(),createElementBlock("div",{key:pf,class:normalizeClass([{"head-style":pf===1},"space-x-2 flex"])},[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fd),mf=>(openBlock(),createBlock(Wd,{key:mf,modelValue:unref(hd)[`k_${pf-1}_${mf-1}`],"onUpdate:modelValue":_f=>unref(hd)[`k_${pf-1}_${mf-1}`]=_f,class:normalizeClass({"bg-gray-100 dark:bg-gray-900":pf===1}),placeholder:pf===1?"表头":""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"]))),128))],2))),128))]),createVNode(Xd,null,{default:withCtx(()=>[createVNode(Kd,{variant:"outline",onClick:Nd[2]||(Nd[2]=pf=>unref(sd)(!1))},{default:withCtx(()=>Nd[6]||(Nd[6]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(Kd,{onClick:gd},{default:withCtx(()=>Nd[7]||(Nd[7]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),_sfc_main$14=defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(yg),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_hoisted_1$d={class:"space-y-4"},_hoisted_2$8={class:"h-60 border"},_sfc_main$13=defineComponent({__name:"CustomUploadForm",setup(Ra){const qa=useStore(),rd=useLocalStorage("formCustomConfig",removeLeft(` + `,Ld.value=mh.createContainer(ig)},kf=()=>{const Lm=css2json(Cf.value.getValue()),Wm=customCssWithTemplate(Lm,Yd.value,customizeTheme(themeMap[Ud.value],{fontSize:Wd.value,color:Yd.value}));mh.setOptions({theme:Wm}),Eh()};onMounted(()=>{const Lm=document.querySelector("#cssEditor");Lm.value=Sh().content;const Wm=Ra.value?"darcula":"xq-light";Cf.value=markRaw(CodeMirror.fromTextArea(Lm,{mode:"css",theme:Wm,lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,matchBrackets:!0,autofocus:!0,extraKeys:{[`${shiftKey}-${altKey}-F`]:function(yg){formatDoc(yg.getValue(),"css").then(jh=>{Sh().content=jh,yg.setValue(jh)})}}})),Cf.value.on("keyup",(ig,yg)=>{(yg.keyCode>=65&&yg.keyCode<=90||yg.keyCode===189)&&ig.showHint(yg)}),Cf.value.on("update",()=>{kf(),Sh().content=Cf.value.getValue()})}),watch(Ra,()=>{var Wm,ig;const Lm=Ra.value?"darcula":"xq-light";(ig=(Wm=toRaw(Cf.value))==null?void 0:Wm.setOption)==null||ig.call(Wm,"theme",Lm)});const Rf=()=>{gd.value=!1,ud.value=!0,vd.value=!1,Ud.value=themeOptions[0].value,jd.value=fontFamilyOptions[0].value,jd.value=fontFamilyOptions[0].value,Gd.value=fontSizeOptions[2].value,Yd.value=colorOptions[0].value,zd.value=codeBlockThemeOptions[23].value,qd.value=legendOptions[3].value,sh.value={active:"方案 1",tabs:[{title:"方案 1",name:"方案 1",content:Ff.value||DEFAULT_CSS_CONTENT}]},Cf.value.setValue(DEFAULT_CSS_CONTENT),kf(),Eh(),Ke.success("样式重置成功~")},_h=Lm=>(...Wm)=>{Lm(...Wm),Eh()},Ph=(Lm,Wm)=>{const ig=themeMap[Ud.value],yg=Number(Lm.replace("px",""));return customCssWithTemplate(css2json(Sh().content),Wm,customizeTheme(ig,{fontSize:yg,color:Wm}))},sm=_h(Lm=>{mh.setOptions({theme:customCssWithTemplate(css2json(Sh().content),Yd.value,customizeTheme(themeMap[Lm],{fontSize:Wd.value}))}),Ud.value=Lm}),th=_h(Lm=>{mh.setOptions({fonts:Lm}),jd.value=Lm}),oh=_h(Lm=>{const Wm=Ph(Lm,Yd.value);mh.setOptions({size:Lm,theme:Wm}),Gd.value=Lm}),Zh=_h(Lm=>{const Wm=Ph(Gd.value,Lm);mh.setOptions({theme:Wm}),Yd.value=Lm}),Sm=_h(Lm=>{zd.value=Lm}),$h=_h(Lm=>{qd.value=Lm}),Vf=_h(()=>{dd()}),nh=_h(()=>{yd()}),Lh=_h(()=>{Cd()}),Ih=_h(()=>{Nd()}),om=()=>{exportHTML(Yd.value),document.querySelector("#output").innerHTML=Ld.value},zh=()=>{downloadMD(Xd.value.getValue())},Om=()=>{const Lm=document.body,Wm=document.createElement("input");Wm.type="file",Wm.name="filename",Wm.accept=".md",Wm.onchange=()=>{const ig=Wm.files[0];if(!ig)return;const yg=new FileReader;yg.readAsText(ig),yg.onload=jh=>{Xd.value.setValue(jh.target.result),Ke.success("文档导入成功")}},Lm.appendChild(Wm),Wm.click(),Lm.removeChild(Wm)},Im=ref$1(!1);return{isDark:Ra,toggleDark:ed,isEditOnLeft:hd,toggleEditOnLeft:md,isMacCodeBlock:ud,isCiteStatus:gd,citeStatusChanged:nh,isUseIndent:wd,useIndentChanged:Ih,isCountStatus:vd,countStatusChanged:Lh,output:Ld,editor:Xd,cssEditor:Cf,theme:Ud,fontFamily:jd,fontSize:Gd,primaryColor:Yd,codeBlockTheme:zd,legend:qd,readingTime:xh,editorRefresh:Eh,themeChanged:sm,fontChanged:th,sizeChanged:oh,colorChanged:Zh,codeBlockThemeChanged:Sm,legendChanged:$h,macCodeBlockChanged:Vf,formatContent:Df,exportEditorContent2HTML:om,exportEditorContent2MD:zh,importMarkdownContent:Om,isOpenConfirmDialog:Im,resetStyleConfirm:()=>{Im.value=!0},resetStyle:Rf,cssContentConfig:sh,addCssContentTab:lh,validatorTabName:rh,setCssEditorValue:If,tabChanged:yh,renameTab:Mh,posts:xf,currentPostIndex:_f,addPost:vf,renamePost:gf,delPost:Af,isOpenPostSlider:mf,isOpenRightSlider:Zd}}),useDisplayStore=defineStore("display",()=>{const Ra=ref$1(!1),ed=useToggle(Ra),ud=ref$1(!1),dd=useToggle(ud),hd=ref$1(!1),md=useToggle(hd);return{isShowCssEditor:Ra,toggleShowCssEditor:ed,isShowInsertFormDialog:ud,toggleShowInsertFormDialog:dd,isShowUploadImgDialog:hd,toggleShowUploadImgDialog:md}}),_hoisted_1$e={class:"space-x-2 flex justify-between"},_hoisted_2$9={class:"space-y-2 border-1 rounded p-2"},_sfc_main$15=defineComponent({__name:"InsertFormDialog",setup(Ra){const ed=useStore(),ud=useDisplayStore(),{toggleShowInsertFormDialog:dd}=ud,hd=ref$1(3),md=ref$1(3),gd=ref$1({});function yd(){hd.value=3,md.value=3,gd.value={}}function vd(){const wd=createTable({rows:hd.value,cols:md.value,data:gd.value});toRaw(ed.editor).replaceSelection(` +${wd} +`,"end"),yd(),dd()}function Cd(wd){wd||dd(!1)}return(wd,Nd)=>{const Ld=_sfc_main$16,Ud=_sfc_main$17,jd=_sfc_main$18,Gd=_sfc_main$19,Yd=_sfc_main$1a,zd=_sfc_main$1b,qd=_sfc_main$1c,Wd=_sfc_main$1d,Xd=_sfc_main$1e,Jd=_sfc_main$1o,Zd=_sfc_main$1f,mf=_sfc_main$1g,xf=_sfc_main$1h;return openBlock(),createBlock(xf,{open:unref(ud).isShowInsertFormDialog,"onUpdate:open":Cd},{default:withCtx(()=>[createVNode(mf,null,{default:withCtx(()=>[createVNode(Ud,null,{default:withCtx(()=>[createVNode(Ld,null,{default:withCtx(()=>Nd[3]||(Nd[3]=[createTextVNode("插入表格")])),_:1})]),_:1}),createBaseVNode("div",_hoisted_1$e,[createVNode(Wd,{modelValue:unref(hd),"onUpdate:modelValue":Nd[0]||(Nd[0]=_f=>isRef(hd)?hd.value=_f:null),min:1,max:100},{default:withCtx(()=>[createVNode(jd,null,{default:withCtx(()=>Nd[4]||(Nd[4]=[createTextVNode("行数")])),_:1}),createVNode(qd,null,{default:withCtx(()=>[createVNode(Gd),createVNode(Yd),createVNode(zd)]),_:1})]),_:1},8,["modelValue"]),createVNode(Wd,{modelValue:unref(md),"onUpdate:modelValue":Nd[1]||(Nd[1]=_f=>isRef(md)?md.value=_f:null),min:1,max:100},{default:withCtx(()=>[createVNode(jd,null,{default:withCtx(()=>Nd[5]||(Nd[5]=[createTextVNode("列数")])),_:1}),createVNode(qd,null,{default:withCtx(()=>[createVNode(Gd),createVNode(Yd),createVNode(zd)]),_:1})]),_:1},8,["modelValue"])]),createBaseVNode("div",_hoisted_2$9,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(hd)+1,_f=>(openBlock(),createElementBlock("div",{key:_f,class:normalizeClass([{"head-style":_f===1},"space-x-2 flex"])},[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(md),vf=>(openBlock(),createBlock(Xd,{key:vf,modelValue:unref(gd)[`k_${_f-1}_${vf-1}`],"onUpdate:modelValue":gf=>unref(gd)[`k_${_f-1}_${vf-1}`]=gf,class:normalizeClass({"bg-gray-100 dark:bg-gray-900":_f===1}),placeholder:_f===1?"表头":""},null,8,["modelValue","onUpdate:modelValue","class","placeholder"]))),128))],2))),128))]),createVNode(Zd,null,{default:withCtx(()=>[createVNode(Jd,{variant:"outline",onClick:Nd[2]||(Nd[2]=_f=>unref(dd)(!1))},{default:withCtx(()=>Nd[6]||(Nd[6]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(Jd,{onClick:vd},{default:withCtx(()=>Nd[7]||(Nd[7]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])}}}),_sfc_main$14=defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(Cg),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_hoisted_1$d={class:"space-y-4"},_hoisted_2$8={class:"h-60 border"},_sfc_main$13=defineComponent({__name:"CustomUploadForm",setup(Ra){const ed=useStore(),ud=useLocalStorage("formCustomConfig",removeLeft(` const {file, util, okCb, errCb} = CUSTOM_ARG const param = new FormData() param.append('file', file) @@ -1095,75 +1095,75 @@ ${vd} }).catch(err => { errCb(err) }) -`).trim()),sd=useTemplateRef("formCustomTextarea"),pd=ref$1(null);onMounted(()=>{pd.value=markRaw(CodeMirror.fromTextArea(sd.value,{mode:"javascript",theme:qa.isDark?"darcula":"xq-light",lineNumbers:!0})),nextTick$1(()=>{nextTick$1(()=>{var hd;(hd=pd.value)==null||hd.setValue(rd.value)})})});function fd(){const hd=pd.value.getValue();localStorage.setItem("formCustomConfig",hd),Ke.success("保存成功")}return(hd,md)=>{const gd=_sfc_main$1o;return openBlock(),createElementBlock("div",_hoisted_1$d,[createBaseVNode("div",_hoisted_2$8,[createBaseVNode("textarea",{ref_key:"formCustomTextarea",ref:sd,placeholder:"Your custom code here."},null,512)]),createVNode(gd,{variant:"link",class:"p-0",href:"https://github.com/doocs/md#自定义上传逻辑",target:"_blank"},{default:withCtx(()=>md[0]||(md[0]=[createTextVNode(" 参数详情 ")])),_:1}),createVNode(gd,{class:"block",onClick:fd},{default:withCtx(()=>md[1]||(md[1]=[createTextVNode(" 保存配置 ")])),_:1})])}}}),_sfc_main$12=defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(mg),mergeProps(unref(fd),{class:unref(cn$4)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",rd.class)}),{default:withCtx(()=>[createVNode(unref(hg),{class:normalizeClass(unref(cn$4)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5"))},{default:withCtx(()=>[renderSlot(hd.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),_hoisted_1$c={class:"min-h-[64px]"},_hoisted_2$7={class:"flex flex-1 flex-col justify-between"},_hoisted_3$5={class:"min-h-[40px] flex items-center"},_hoisted_4$5={key:0,class:"min-h-[24px] flex items-center text-[12px] text-red-500"},_hoisted_5$4={key:1,class:"mb-[-24px]"},_sfc_main$11=defineComponent({__name:"FormItem",props:{label:{},required:{type:Boolean},error:{}},setup(Ra){const qa=Ra;return(rd,sd)=>{const pd=_sfc_main$18;return openBlock(),createElementBlock("div",_hoisted_1$c,[createVNode(pd,{class:"mb-[24px] flex items-center"},{default:withCtx(()=>[createBaseVNode("span",{class:normalizeClass(["mr-4 min-h-[40px] min-h-4 w-[150px] flex flex-shrink-0 items-center justify-end font-bold",{required:qa.required}])},toDisplayString(qa.label),3),createBaseVNode("div",_hoisted_2$7,[createBaseVNode("div",_hoisted_3$5,[renderSlot(rd.$slots,"default",{},void 0,!0)]),rd.error?(openBlock(),createElementBlock("p",_hoisted_4$5,toDisplayString(rd.error),1)):createCommentVNode("",!0),rd.error?(openBlock(),createElementBlock("div",_hoisted_5$4)):createCommentVNode("",!0)])]),_:3})])}}}),__unplugin_components_12=_export_sfc(_sfc_main$11,[["__scopeId","data-v-0d03152f"]]),_sfc_main$10=defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(bg$1),mergeProps({class:unref(cn$4)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",qa.class)},rd.value),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$$=defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(Ny),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_hoisted_1$b={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$_=defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(jy),mergeProps(unref(sd),{class:unref(cn$4)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",qa.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$b,[createVNode(unref(Uy),null,{default:withCtx(()=>[createVNode(unref(Check),{class:"h-4 w-4"})]),_:1})]),createVNode(unref(Yy),null,{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),_sfc_main$Z=defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Jy),mergeProps(unref(sd),{class:unref(cn$4)("flex cursor-default items-center justify-center py-1",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default",{},()=>[createVNode(unref(ChevronDown),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$Y=defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Zy),mergeProps(unref(sd),{class:unref(cn$4)("flex cursor-default items-center justify-center py-1",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default",{},()=>[createVNode(unref(ChevronUp),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$X=defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Ly),mergeProps(unref(sd),{class:unref(cn$4)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default"),createVNode(unref(eg),{"as-child":""},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"h-4 w-4 shrink-0 opacity-50"})]),_:1})]),_:3},16,["class"]))}}),_sfc_main$W=defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(Qy),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_sfc_main$V=defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(zy),null,{default:withCtx(()=>[createVNode(unref(Ky),mergeProps({...unref(fd),...hd.$attrs},{class:unref(cn$4)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",hd.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",rd.class)}),{default:withCtx(()=>[createVNode(unref(_sfc_main$Y)),createVNode(unref(Xy),{class:normalizeClass(unref(cn$4)("p-1",hd.position==="popper"&&"h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]"))},{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},8,["class"]),createVNode(unref(_sfc_main$Z))]),_:3},16,["class"])]),_:3}))}}),_sfc_main$U=defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(gg$1),mergeProps(rd.value,{class:unref(cn$4)("inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",qa.class)}),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$a={class:"truncate"},_sfc_main$T=defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Cg),mergeProps(unref(sd),{class:unref(cn$4)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",qa.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$a,[renderSlot(pd.$slots,"default")])]),_:3},16,["class"]))}});/** +`).trim()),dd=useTemplateRef("formCustomTextarea"),hd=ref$1(null);onMounted(()=>{hd.value=markRaw(CodeMirror.fromTextArea(dd.value,{mode:"javascript",theme:ed.isDark?"darcula":"xq-light",lineNumbers:!0})),nextTick$1(()=>{nextTick$1(()=>{var gd;(gd=hd.value)==null||gd.setValue(ud.value)})})});function md(){const gd=hd.value.getValue();localStorage.setItem("formCustomConfig",gd),Ke.success("保存成功")}return(gd,yd)=>{const vd=_sfc_main$1o;return openBlock(),createElementBlock("div",_hoisted_1$d,[createBaseVNode("div",_hoisted_2$8,[createBaseVNode("textarea",{ref_key:"formCustomTextarea",ref:dd,placeholder:"Your custom code here."},null,512)]),createVNode(vd,{variant:"link",class:"p-0",href:"https://github.com/doocs/md#自定义上传逻辑",target:"_blank"},{default:withCtx(()=>yd[0]||(yd[0]=[createTextVNode(" 参数详情 ")])),_:1}),createVNode(vd,{class:"block",onClick:md},{default:withCtx(()=>yd[1]||(yd[1]=[createTextVNode(" 保存配置 ")])),_:1})])}}}),_sfc_main$12=defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(gg$1),mergeProps(unref(md),{class:unref(cn$4)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",ud.class)}),{default:withCtx(()=>[createVNode(unref(bg$1),{class:normalizeClass(unref(cn$4)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5"))},{default:withCtx(()=>[renderSlot(gd.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),_hoisted_1$c={class:"min-h-[64px]"},_hoisted_2$7={class:"flex flex-1 flex-col justify-between"},_hoisted_3$5={class:"min-h-[40px] flex items-center"},_hoisted_4$5={key:0,class:"min-h-[24px] flex items-center text-[12px] text-red-500"},_hoisted_5$4={key:1,class:"mb-[-24px]"},_sfc_main$11=defineComponent({__name:"FormItem",props:{label:{},required:{type:Boolean},error:{}},setup(Ra){const ed=Ra;return(ud,dd)=>{const hd=_sfc_main$18;return openBlock(),createElementBlock("div",_hoisted_1$c,[createVNode(hd,{class:"mb-[24px] flex items-center"},{default:withCtx(()=>[createBaseVNode("span",{class:normalizeClass(["mr-4 min-h-[40px] min-h-4 w-[150px] flex flex-shrink-0 items-center justify-end font-bold",{required:ed.required}])},toDisplayString(ed.label),3),createBaseVNode("div",_hoisted_2$7,[createBaseVNode("div",_hoisted_3$5,[renderSlot(ud.$slots,"default",{},void 0,!0)]),ud.error?(openBlock(),createElementBlock("p",_hoisted_4$5,toDisplayString(ud.error),1)):createCommentVNode("",!0),ud.error?(openBlock(),createElementBlock("div",_hoisted_5$4)):createCommentVNode("",!0)])]),_:3})])}}}),__unplugin_components_12=_export_sfc(_sfc_main$11,[["__scopeId","data-v-0d03152f"]]),_sfc_main$10=defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(_g),mergeProps({class:unref(cn$4)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",ed.class)},ud.value),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$$=defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(Ky),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_hoisted_1$b={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$_=defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(qy),mergeProps(unref(dd),{class:unref(cn$4)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ed.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$b,[createVNode(unref(Yy),null,{default:withCtx(()=>[createVNode(unref(Check),{class:"h-4 w-4"})]),_:1})]),createVNode(unref(Jy),null,{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),_sfc_main$Z=defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(tg),mergeProps(unref(dd),{class:unref(cn$4)("flex cursor-default items-center justify-center py-1",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default",{},()=>[createVNode(unref(ChevronDown),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$Y=defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(eg),mergeProps(unref(dd),{class:unref(cn$4)("flex cursor-default items-center justify-center py-1",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default",{},()=>[createVNode(unref(ChevronUp),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),_sfc_main$X=defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(Hy),mergeProps(unref(dd),{class:unref(cn$4)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default"),createVNode(unref(ng),{"as-child":""},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"h-4 w-4 shrink-0 opacity-50"})]),_:1})]),_:3},16,["class"]))}}),_sfc_main$W=defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(ag$1),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_sfc_main$V=defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(Wy),null,{default:withCtx(()=>[createVNode(unref(jy),mergeProps({...unref(md),...gd.$attrs},{class:unref(cn$4)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",gd.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",ud.class)}),{default:withCtx(()=>[createVNode(unref(_sfc_main$Y)),createVNode(unref(Qy),{class:normalizeClass(unref(cn$4)("p-1",gd.position==="popper"&&"h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]"))},{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},8,["class"]),createVNode(unref(_sfc_main$Z))]),_:3},16,["class"])]),_:3}))}}),_sfc_main$U=defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(wg),mergeProps(ud.value,{class:unref(cn$4)("inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",ed.class)}),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$a={class:"truncate"},_sfc_main$T=defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(xg),mergeProps(unref(dd),{class:unref(cn$4)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",ed.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$a,[renderSlot(hd.$slots,"default")])]),_:3},16,["class"]))}});/** * vee-validate v4.15.0 * (c) 2024 Abdelrahman Awad * @license MIT - */function isCallable(Ra){return typeof Ra=="function"}function isNullOrUndefined(Ra){return Ra==null}const isObject$4=Ra=>Ra!==null&&!!Ra&&typeof Ra=="object"&&!Array.isArray(Ra);function isIndex$1(Ra){return Number(Ra)>=0}function toNumber$3(Ra){const qa=parseFloat(Ra);return isNaN(qa)?Ra:qa}function isObjectLike$1(Ra){return typeof Ra=="object"&&Ra!==null}function getTag$1(Ra){return Ra==null?Ra===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(Ra)}function isPlainObject$2(Ra){if(!isObjectLike$1(Ra)||getTag$1(Ra)!=="[object Object]")return!1;if(Object.getPrototypeOf(Ra)===null)return!0;let qa=Ra;for(;Object.getPrototypeOf(qa)!==null;)qa=Object.getPrototypeOf(qa);return Object.getPrototypeOf(Ra)===qa}function merge$2(Ra,qa){return Object.keys(qa).forEach(rd=>{if(isPlainObject$2(qa[rd])&&isPlainObject$2(Ra[rd])){Ra[rd]||(Ra[rd]={}),merge$2(Ra[rd],qa[rd]);return}Ra[rd]=qa[rd]}),Ra}function normalizeFormPath(Ra){const qa=Ra.split(".");if(!qa.length)return"";let rd=String(qa[0]);for(let sd=1;sdisContainerValue(pd)&&fd in pd?pd[fd]:rd,Ra):rd}function setInPath(Ra,qa,rd){if(isNotNestedPath(qa)){Ra[cleanupNonNestedPath(qa)]=rd;return}const sd=qa.split(/\.|\[(\d+)\]/).filter(Boolean);let pd=Ra;for(let fd=0;fdgetFromPath(Ra,rd.slice(0,hd).join(".")));for(let fd=pd.length-1;fd>=0;fd--)if(isEmptyContainer(pd[fd])){if(fd===0){unset(Ra,rd[0]);continue}unset(pd[fd-1],rd[fd-1])}}function keysOf(Ra){return Object.keys(Ra)}function injectWithSelf(Ra,qa=void 0){const rd=getCurrentInstance();return(rd==null?void 0:rd.provides[Ra])||inject(Ra,qa)}function resolveNextCheckboxValue(Ra,qa,rd){if(Array.isArray(Ra)){const sd=[...Ra],pd=sd.findIndex(fd=>isEqual(fd,qa));return pd>=0?sd.splice(pd,1):sd.push(qa),sd}return isEqual(Ra,qa)?rd:qa}function debounceAsync(Ra,qa=0){let rd=null,sd=[];return function(...pd){return rd&&clearTimeout(rd),rd=setTimeout(()=>{const fd=Ra(...pd);sd.forEach(hd=>hd(fd)),sd=[]},qa),new Promise(fd=>sd.push(fd))}}function applyModelModifiers(Ra,qa){return isObject$4(qa)&&qa.number?toNumber$3(Ra):Ra}function withLatest(Ra,qa){let rd;return async function(...pd){const fd=Ra(...pd);rd=fd;const hd=await fd;return fd!==rd?hd:(rd=void 0,qa(hd,pd))}}function normalizeErrorItem(Ra){return Array.isArray(Ra)?Ra:Ra?[Ra]:[]}function omit(Ra,qa){const rd={};for(const sd in Ra)qa.includes(sd)||(rd[sd]=Ra[sd]);return rd}function debounceNextTick(Ra){let qa=null,rd=[];return function(...sd){const pd=nextTick$1(()=>{if(qa!==pd)return;const fd=Ra(...sd);rd.forEach(hd=>hd(fd)),rd=[],qa=null});return qa=pd,new Promise(fd=>rd.push(fd))}}function normalizeChildren(Ra,qa,rd){return qa.slots.default?typeof Ra=="string"||!Ra?qa.slots.default(rd()):{default:()=>{var sd,pd;return(pd=(sd=qa.slots).default)===null||pd===void 0?void 0:pd.call(sd,rd())}}:qa.slots.default}function getBoundValue(Ra){if(hasValueBinding(Ra))return Ra._value}function hasValueBinding(Ra){return"_value"in Ra}function parseInputValue(Ra){return Ra.type==="number"||Ra.type==="range"?Number.isNaN(Ra.valueAsNumber)?Ra.value:Ra.valueAsNumber:Ra.value}function normalizeEventValue(Ra){if(!isEvent(Ra))return Ra;const qa=Ra.target;if(hasCheckedAttr(qa.type)&&hasValueBinding(qa))return getBoundValue(qa);if(qa.type==="file"&&qa.files){const rd=Array.from(qa.files);return qa.multiple?rd:rd[0]}if(isNativeMultiSelect(qa))return Array.from(qa.options).filter(rd=>rd.selected&&!rd.disabled).map(getBoundValue);if(isNativeSelect(qa)){const rd=Array.from(qa.options).find(sd=>sd.selected);return rd?getBoundValue(rd):qa.value}return parseInputValue(qa)}function normalizeRules(Ra){const qa={};return Object.defineProperty(qa,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Ra?isObject$4(Ra)&&Ra._$$isNormalized?Ra:isObject$4(Ra)?Object.keys(Ra).reduce((rd,sd)=>{const pd=normalizeParams(Ra[sd]);return Ra[sd]!==!1&&(rd[sd]=buildParams(pd)),rd},qa):typeof Ra!="string"?qa:Ra.split("|").reduce((rd,sd)=>{const pd=parseRule(sd);return pd.name&&(rd[pd.name]=buildParams(pd.params)),rd},qa):qa}function normalizeParams(Ra){return Ra===!0?[]:Array.isArray(Ra)||isObject$4(Ra)?Ra:[Ra]}function buildParams(Ra){const qa=rd=>typeof rd=="string"&&rd[0]==="@"?createLocator(rd.slice(1)):rd;return Array.isArray(Ra)?Ra.map(qa):Ra instanceof RegExp?[Ra]:Object.keys(Ra).reduce((rd,sd)=>(rd[sd]=qa(Ra[sd]),rd),{})}const parseRule=Ra=>{let qa=[];const rd=Ra.split(":")[0];return Ra.includes(":")&&(qa=Ra.split(":").slice(1).join(":").split(",")),{name:rd,params:qa}};function createLocator(Ra){const qa=rd=>{var sd;return(sd=getFromPath(rd,Ra))!==null&&sd!==void 0?sd:rd[Ra]};return qa.__locatorRef=Ra,qa}function extractLocators(Ra){return Array.isArray(Ra)?Ra.filter(isLocator):keysOf(Ra).filter(qa=>isLocator(Ra[qa])).map(qa=>Ra[qa])}const DEFAULT_CONFIG={generateMessage:({field:Ra})=>`${Ra} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0};let currentConfig=Object.assign({},DEFAULT_CONFIG);const getConfig$1=()=>currentConfig;async function validate$1(Ra,qa,rd={}){const sd=rd==null?void 0:rd.bails,pd={name:(rd==null?void 0:rd.name)||"{field}",rules:qa,label:rd==null?void 0:rd.label,bails:sd??!0,formData:(rd==null?void 0:rd.values)||{}},fd=await _validate(pd,Ra);return Object.assign(Object.assign({},fd),{valid:!fd.errors.length})}async function _validate(Ra,qa){const rd=Ra.rules;if(isTypedSchema(rd)||isYupValidator(rd))return validateFieldWithTypedSchema(qa,Object.assign(Object.assign({},Ra),{rules:rd}));if(isCallable(rd)||Array.isArray(rd)){const md={field:Ra.label||Ra.name,name:Ra.name,label:Ra.label,form:Ra.formData,value:qa},gd=Array.isArray(rd)?rd:[rd],yd=gd.length,vd=[];for(let Nd=0;Nd{const yd=gd.path||"";return md[yd]||(md[yd]={errors:[],path:yd}),md[yd].errors.push(...gd.errors),md},{});return{errors:Object.values(hd)}}}}}async function validateFieldWithTypedSchema(Ra,qa){const sd=await(isTypedSchema(qa.rules)?qa.rules:yupToTypedSchema(qa.rules)).parse(Ra,{formData:qa.formData}),pd=[];for(const fd of sd.errors)fd.errors.length&&pd.push(...fd.errors);return{value:sd.value,errors:pd}}async function _test(Ra,qa,rd){const sd=resolveRule(rd.name);if(!sd)throw new Error(`No such validator '${rd.name}' exists.`);const pd=fillTargetValues(rd.params,Ra.formData),fd={field:Ra.label||Ra.name,name:Ra.name,label:Ra.label,value:qa,form:Ra.formData,rule:Object.assign(Object.assign({},rd),{params:pd})},hd=await sd(qa,pd,fd);return typeof hd=="string"?{error:hd}:{error:hd?void 0:_generateFieldError(fd)}}function _generateFieldError(Ra){const qa=getConfig$1().generateMessage;return qa?qa(Ra):"Field is invalid"}function fillTargetValues(Ra,qa){const rd=sd=>isLocator(sd)?sd(qa):sd;return Array.isArray(Ra)?Ra.map(rd):Object.keys(Ra).reduce((sd,pd)=>(sd[pd]=rd(Ra[pd]),sd),{})}async function validateTypedSchema(Ra,qa){const sd=await(isTypedSchema(Ra)?Ra:yupToTypedSchema(Ra)).parse(klona(qa),{formData:klona(qa)}),pd={},fd={};for(const hd of sd.errors){const md=hd.errors,gd=(hd.path||"").replace(/\["(\d+)"\]/g,(yd,vd)=>`[${vd}]`);pd[gd]={valid:!md.length,errors:md},md.length&&(fd[gd]=md[0])}return{valid:!sd.errors.length,results:pd,errors:fd,values:sd.value,source:"schema"}}async function validateObjectSchema(Ra,qa,rd){const pd=keysOf(Ra).map(async yd=>{var vd,Nd,Md;const Ld=(vd=rd==null?void 0:rd.names)===null||vd===void 0?void 0:vd[yd],Fd=await validate$1(getFromPath(qa,yd),Ra[yd],{name:(Ld==null?void 0:Ld.name)||yd,label:Ld==null?void 0:Ld.label,values:qa,bails:(Md=(Nd=rd==null?void 0:rd.bailsMap)===null||Nd===void 0?void 0:Nd[yd])!==null&&Md!==void 0?Md:!0});return Object.assign(Object.assign({},Fd),{path:yd})});let fd=!0;const hd=await Promise.all(pd),md={},gd={};for(const yd of hd)md[yd.path]={valid:yd.valid,errors:yd.errors},yd.valid||(fd=!1,gd[yd.path]=yd.errors[0]);return{valid:fd,results:md,errors:gd,source:"schema"}}let ID_COUNTER=0;function useFieldState(Ra,qa){const{value:rd,initialValue:sd,setInitialValue:pd}=_useFieldValue(Ra,qa.modelValue,qa.form);if(!qa.form){let gd=function(Ld){var Fd;"value"in Ld&&(rd.value=Ld.value),"errors"in Ld&&vd(Ld.errors),"touched"in Ld&&(Md.touched=(Fd=Ld.touched)!==null&&Fd!==void 0?Fd:Md.touched),"initialValue"in Ld&&pd(Ld.initialValue)};const{errors:yd,setErrors:vd}=createFieldErrors(),Nd=ID_COUNTER>=Number.MAX_SAFE_INTEGER?0:++ID_COUNTER,Md=createFieldMeta(rd,sd,yd,qa.schema);return{id:Nd,path:Ra,value:rd,initialValue:sd,meta:Md,flags:{pendingUnmount:{[Nd]:!1},pendingReset:!1},errors:yd,setState:gd}}const fd=qa.form.createPathState(Ra,{bails:qa.bails,label:qa.label,type:qa.type,validate:qa.validate,schema:qa.schema}),hd=computed(()=>fd.errors);function md(gd){var yd,vd,Nd;"value"in gd&&(rd.value=gd.value),"errors"in gd&&((yd=qa.form)===null||yd===void 0||yd.setFieldError(unref(Ra),gd.errors)),"touched"in gd&&((vd=qa.form)===null||vd===void 0||vd.setFieldTouched(unref(Ra),(Nd=gd.touched)!==null&&Nd!==void 0?Nd:!1)),"initialValue"in gd&&pd(gd.initialValue)}return{id:Array.isArray(fd.id)?fd.id[fd.id.length-1]:fd.id,path:Ra,value:rd,errors:hd,meta:fd,initialValue:sd,flags:fd.__flags,setState:md}}function _useFieldValue(Ra,qa,rd){const sd=ref$1(unref(qa));function pd(){return rd?getFromPath(rd.initialValues.value,unref(Ra),unref(sd)):unref(sd)}function fd(yd){if(!rd){sd.value=yd;return}rd.setFieldInitialValue(unref(Ra),yd,!0)}const hd=computed(pd);if(!rd)return{value:ref$1(pd()),initialValue:hd,setInitialValue:fd};const md=resolveModelValue(qa,rd,hd,Ra);return rd.stageInitialValue(unref(Ra),md,!0),{value:computed({get(){return getFromPath(rd.values,unref(Ra))},set(yd){rd.setFieldValue(unref(Ra),yd,!1)}}),initialValue:hd,setInitialValue:fd}}function resolveModelValue(Ra,qa,rd,sd){return isRef(Ra)?unref(Ra):Ra!==void 0?Ra:getFromPath(qa.values,unref(sd),unref(rd))}function createFieldMeta(Ra,qa,rd,sd){const pd=computed(()=>{var hd,md,gd;return(gd=(md=(hd=toValue$2(sd))===null||hd===void 0?void 0:hd.describe)===null||md===void 0?void 0:md.call(hd).required)!==null&&gd!==void 0?gd:!1}),fd=reactive({touched:!1,pending:!1,valid:!0,required:pd,validated:!!unref(rd).length,initialValue:computed(()=>unref(qa)),dirty:computed(()=>!isEqual(unref(Ra),unref(qa)))});return watch(rd,hd=>{fd.valid=!hd.length},{immediate:!0,flush:"sync"}),fd}function createFieldErrors(){const Ra=ref$1([]);return{errors:Ra,setErrors:qa=>{Ra.value=normalizeErrorItem(qa)}}}function useField(Ra,qa,rd){return hasCheckedAttr(rd==null?void 0:rd.type)?useFieldWithChecked(Ra,qa,rd):_useField(Ra,qa,rd)}function _useField(Ra,qa,rd){const{initialValue:sd,validateOnMount:pd,bails:fd,type:hd,checkedValue:md,label:gd,validateOnValueUpdate:yd,uncheckedValue:vd,controlled:Nd,keepValueOnUnmount:Md,syncVModel:Ld,form:Fd}=normalizeOptions(rd),Hd=Nd?injectWithSelf(FormContextKey):void 0,Vd=Fd||Hd,Gd=computed(()=>normalizeFormPath(toValue$2(Ra))),Ud=computed(()=>{if(toValue$2(Vd==null?void 0:Vd.schema))return;const Df=unref(qa);return isYupValidator(Df)||isTypedSchema(Df)||isCallable(Df)||Array.isArray(Df)?Df:normalizeRules(Df)}),qd=!isCallable(Ud.value)&&isTypedSchema(toValue$2(qa)),{id:Wd,value:Kd,initialValue:Xd,meta:df,setState:Ef,errors:pf,flags:mf}=useFieldState(Gd,{modelValue:sd,form:Vd,bails:fd,label:gd,type:hd,validate:Ud.value?wf:void 0,schema:qd?qa:void 0}),_f=computed(()=>pf.value[0]);Ld&&useVModel({value:Kd,prop:Ld,handleChange:Pf,shouldValidate:()=>yd&&!mf.pendingReset});const xf=(vh,Df=!1)=>{df.touched=!0,Df&&If()};async function Cf(vh){var Df,Af;if(Vd!=null&&Vd.validateSchema){const{results:_h}=await Vd.validateSchema(vh);return(Df=_h[toValue$2(Gd)])!==null&&Df!==void 0?Df:{valid:!0,errors:[]}}return Ud.value?validate$1(Kd.value,Ud.value,{name:toValue$2(Gd),label:toValue$2(gd),values:(Af=Vd==null?void 0:Vd.values)!==null&&Af!==void 0?Af:{},bails:fd}):{valid:!0,errors:[]}}const If=withLatest(async()=>(df.pending=!0,df.validated=!0,Cf("validated-only")),vh=>(mf.pendingUnmount[fh.id]||(Ef({errors:vh.errors}),df.pending=!1,df.valid=vh.valid),vh)),Sf=withLatest(async()=>Cf("silent"),vh=>(df.valid=vh.valid,vh));function wf(vh){return(vh==null?void 0:vh.mode)==="silent"?Sf():If()}function Pf(vh,Df=!0){const Af=normalizeEventValue(vh);Mh(Af,Df)}onMounted(()=>{if(pd)return If();(!Vd||!Vd.validateSchema)&&Sf()});function lh(vh){df.touched=vh}function xh(vh){var Df;const Af=vh&&"value"in vh?vh.value:Xd.value;Ef({value:klona(Af),initialValue:klona(Af),touched:(Df=vh==null?void 0:vh.touched)!==null&&Df!==void 0?Df:!1,errors:(vh==null?void 0:vh.errors)||[]}),df.pending=!1,df.validated=!1,Sf()}const Eh=getCurrentInstance();function Mh(vh,Df=!0){Kd.value=Eh&&Ld?applyModelModifiers(vh,Eh.props.modelModifiers):vh,(Df?If:Sf)()}function dh(vh){Ef({errors:Array.isArray(vh)?vh:[vh]})}const eh=computed({get(){return Kd.value},set(vh){Mh(vh,yd)}}),fh={id:Wd,name:Gd,label:gd,value:eh,meta:df,errors:pf,errorMessage:_f,type:hd,checkedValue:md,uncheckedValue:vd,bails:fd,keepValueOnUnmount:Md,resetField:xh,handleReset:()=>xh(),validate:wf,handleChange:Pf,handleBlur:xf,setState:Ef,setTouched:lh,setErrors:dh,setValue:Mh};if(provide(FieldContextKey,fh),isRef(qa)&&typeof unref(qa)!="function"&&watch(qa,(vh,Df)=>{isEqual(vh,Df)||(df.validated?If():Sf())},{deep:!0}),!Vd)return fh;const Sh=computed(()=>{const vh=Ud.value;return!vh||isCallable(vh)||isYupValidator(vh)||isTypedSchema(vh)||Array.isArray(vh)?{}:Object.keys(vh).reduce((Df,Af)=>{const _h=extractLocators(vh[Af]).map(Nh=>Nh.__locatorRef).reduce((Nh,dm)=>{const Jf=getFromPath(Vd.values,dm)||Vd.values[dm];return Jf!==void 0&&(Nh[dm]=Jf),Nh},{});return Object.assign(Df,_h),Df},{})});return watch(Sh,(vh,Df)=>{if(!Object.keys(vh).length)return;!isEqual(vh,Df)&&(df.validated?If():Sf())}),onBeforeUnmount(()=>{var vh;const Df=(vh=toValue$2(fh.keepValueOnUnmount))!==null&&vh!==void 0?vh:toValue$2(Vd.keepValuesOnUnmount),Af=toValue$2(Gd);if(Df||!Vd||mf.pendingUnmount[fh.id]){Vd==null||Vd.removePathState(Af,Wd);return}mf.pendingUnmount[fh.id]=!0;const _h=Vd.getPathState(Af);if(Array.isArray(_h==null?void 0:_h.id)&&(_h!=null&&_h.multiple)?_h!=null&&_h.id.includes(fh.id):(_h==null?void 0:_h.id)===fh.id){if(_h!=null&&_h.multiple&&Array.isArray(_h.value)){const dm=_h.value.findIndex(Jf=>isEqual(Jf,toValue$2(fh.checkedValue)));if(dm>-1){const Jf=[..._h.value];Jf.splice(dm,1),Vd.setFieldValue(Af,Jf)}Array.isArray(_h.id)&&_h.id.splice(_h.id.indexOf(fh.id),1)}else Vd.unsetPathValue(toValue$2(Gd));Vd.removePathState(Af,Wd)}}),fh}function normalizeOptions(Ra){const qa=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),rd=!!(Ra!=null&&Ra.syncVModel),sd=typeof(Ra==null?void 0:Ra.syncVModel)=="string"?Ra.syncVModel:(Ra==null?void 0:Ra.modelPropName)||"modelValue",pd=rd&&!("initialValue"in(Ra||{}))?getCurrentModelValue(getCurrentInstance(),sd):Ra==null?void 0:Ra.initialValue;if(!Ra)return Object.assign(Object.assign({},qa()),{initialValue:pd});const fd="valueProp"in Ra?Ra.valueProp:Ra.checkedValue,hd="standalone"in Ra?!Ra.standalone:Ra.controlled,md=(Ra==null?void 0:Ra.modelPropName)||(Ra==null?void 0:Ra.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},qa()),Ra||{}),{initialValue:pd,controlled:hd??!0,checkedValue:fd,syncVModel:md})}function useFieldWithChecked(Ra,qa,rd){const sd=rd!=null&&rd.standalone?void 0:injectWithSelf(FormContextKey),pd=rd==null?void 0:rd.checkedValue,fd=rd==null?void 0:rd.uncheckedValue;function hd(md){const gd=md.handleChange,yd=computed(()=>{const Nd=toValue$2(md.value),Md=toValue$2(pd);return Array.isArray(Nd)?Nd.findIndex(Ld=>isEqual(Ld,Md))>=0:isEqual(Md,Nd)});function vd(Nd,Md=!0){var Ld,Fd;if(yd.value===((Ld=Nd==null?void 0:Nd.target)===null||Ld===void 0?void 0:Ld.checked)){Md&&md.validate();return}const Hd=toValue$2(Ra),Vd=sd==null?void 0:sd.getPathState(Hd),Gd=normalizeEventValue(Nd);let Ud=(Fd=toValue$2(pd))!==null&&Fd!==void 0?Fd:Gd;sd&&(Vd!=null&&Vd.multiple)&&Vd.type==="checkbox"?Ud=resolveNextCheckboxValue(getFromPath(sd.values,Hd)||[],Ud,void 0):(rd==null?void 0:rd.type)==="checkbox"&&(Ud=resolveNextCheckboxValue(toValue$2(md.value),Ud,toValue$2(fd))),gd(Ud,Md)}return Object.assign(Object.assign({},md),{checked:yd,checkedValue:pd,uncheckedValue:fd,handleChange:vd})}return hd(_useField(Ra,qa,rd))}function useVModel({prop:Ra,value:qa,handleChange:rd,shouldValidate:sd}){const pd=getCurrentInstance();if(!pd||!Ra)return;const fd=typeof Ra=="string"?Ra:"modelValue",hd=`update:${fd}`;fd in pd.props&&(watch(qa,md=>{isEqual(md,getCurrentModelValue(pd,fd))||pd.emit(hd,md)}),watch(()=>getCurrentModelValue(pd,fd),md=>{if(md===IS_ABSENT&&qa.value===void 0)return;const gd=md===IS_ABSENT?void 0:md;isEqual(gd,qa.value)||rd(gd,sd())}))}function getCurrentModelValue(Ra,qa){if(Ra)return Ra.props[qa]}const FieldImpl=defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>getConfig$1().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:IS_ABSENT},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(Ra,qa){const rd=toRef$1(Ra,"rules"),sd=toRef$1(Ra,"name"),pd=toRef$1(Ra,"label"),fd=toRef$1(Ra,"uncheckedValue"),hd=toRef$1(Ra,"keepValue"),{errors:md,value:gd,errorMessage:yd,validate:vd,handleChange:Nd,handleBlur:Md,setTouched:Ld,resetField:Fd,handleReset:Hd,meta:Vd,checked:Gd,setErrors:Ud,setValue:qd}=useField(sd,rd,{validateOnMount:Ra.validateOnMount,bails:Ra.bails,standalone:Ra.standalone,type:qa.attrs.type,initialValue:resolveInitialValue(Ra,qa),checkedValue:qa.attrs.value,uncheckedValue:fd,label:pd,validateOnValueUpdate:Ra.validateOnModelUpdate,keepValueOnUnmount:hd,syncVModel:!0}),Wd=function(mf,_f=!0){Nd(mf,_f)},Kd=computed(()=>{const{validateOnInput:pf,validateOnChange:mf,validateOnBlur:_f,validateOnModelUpdate:xf}=resolveValidationTriggers(Ra);function Cf(Pf){Md(Pf,_f),isCallable(qa.attrs.onBlur)&&qa.attrs.onBlur(Pf)}function If(Pf){Wd(Pf,pf),isCallable(qa.attrs.onInput)&&qa.attrs.onInput(Pf)}function Sf(Pf){Wd(Pf,mf),isCallable(qa.attrs.onChange)&&qa.attrs.onChange(Pf)}const wf={name:Ra.name,onBlur:Cf,onInput:If,onChange:Sf};return wf["onUpdate:modelValue"]=Pf=>Wd(Pf,xf),wf}),Xd=computed(()=>{const pf=Object.assign({},Kd.value);hasCheckedAttr(qa.attrs.type)&&Gd&&(pf.checked=Gd.value);const mf=resolveTag(Ra,qa);return shouldHaveValueBinding(mf,qa.attrs)&&(pf.value=gd.value),pf}),df=computed(()=>Object.assign(Object.assign({},Kd.value),{modelValue:gd.value}));function Ef(){return{field:Xd.value,componentField:df.value,value:gd.value,meta:Vd,errors:md.value,errorMessage:yd.value,validate:vd,resetField:Fd,handleChange:Wd,handleInput:pf=>Wd(pf,!1),handleReset:Hd,handleBlur:Kd.value.onBlur,setTouched:Ld,setErrors:Ud,setValue:qd}}return qa.expose({value:gd,meta:Vd,errors:md,errorMessage:yd,setErrors:Ud,setTouched:Ld,setValue:qd,reset:Fd,validate:vd,handleChange:Nd}),()=>{const pf=resolveDynamicComponent(resolveTag(Ra,qa)),mf=normalizeChildren(pf,qa,Ef);return pf?h$2(pf,Object.assign(Object.assign({},qa.attrs),Xd.value),mf):mf}}});function resolveTag(Ra,qa){let rd=Ra.as||"";return!Ra.as&&!qa.slots.default&&(rd="input"),rd}function resolveValidationTriggers(Ra){var qa,rd,sd,pd;const{validateOnInput:fd,validateOnChange:hd,validateOnBlur:md,validateOnModelUpdate:gd}=getConfig$1();return{validateOnInput:(qa=Ra.validateOnInput)!==null&&qa!==void 0?qa:fd,validateOnChange:(rd=Ra.validateOnChange)!==null&&rd!==void 0?rd:hd,validateOnBlur:(sd=Ra.validateOnBlur)!==null&&sd!==void 0?sd:md,validateOnModelUpdate:(pd=Ra.validateOnModelUpdate)!==null&&pd!==void 0?pd:gd}}function resolveInitialValue(Ra,qa){return hasCheckedAttr(qa.attrs.type)?isPropPresent(Ra,"modelValue")?Ra.modelValue:void 0:isPropPresent(Ra,"modelValue")?Ra.modelValue:qa.attrs.value}const Field=FieldImpl;let FORM_COUNTER=0;const PRIVATE_PATH_STATE_KEYS=["bails","fieldsCount","id","multiple","type","validate"];function resolveInitialValues(Ra){const qa=(Ra==null?void 0:Ra.initialValues)||{},rd=Object.assign({},toValue$2(qa)),sd=unref(Ra==null?void 0:Ra.validationSchema);return sd&&isTypedSchema(sd)&&isCallable(sd.cast)?klona(sd.cast(rd)||{}):klona(rd)}function useForm(Ra){var qa;const rd=FORM_COUNTER++,sd=(Ra==null?void 0:Ra.name)||"Form";let pd=0;const fd=ref$1(!1),hd=ref$1(!1),md=ref$1(0),gd=[],yd=reactive(resolveInitialValues(Ra)),vd=ref$1([]),Nd=ref$1({}),Md=ref$1({}),Ld=debounceNextTick(()=>{Md.value=vd.value.reduce((kf,Rf)=>(kf[normalizeFormPath(toValue$2(Rf.path))]=Rf,kf),{})});function Fd(kf,Rf){const Dh=Pf(kf);if(!Dh){typeof kf=="string"&&(Nd.value[normalizeFormPath(kf)]=normalizeErrorItem(Rf));return}if(typeof kf=="string"){const Vh=normalizeFormPath(kf);Nd.value[Vh]&&delete Nd.value[Vh]}Dh.errors=normalizeErrorItem(Rf),Dh.valid=!Dh.errors.length}function Hd(kf){keysOf(kf).forEach(Rf=>{Fd(Rf,kf[Rf])})}Ra!=null&&Ra.initialErrors&&Hd(Ra.initialErrors);const Vd=computed(()=>{const kf=vd.value.reduce((Rf,Dh)=>(Dh.errors.length&&(Rf[toValue$2(Dh.path)]=Dh.errors),Rf),{});return Object.assign(Object.assign({},Nd.value),kf)}),Gd=computed(()=>keysOf(Vd.value).reduce((kf,Rf)=>{const Dh=Vd.value[Rf];return Dh!=null&&Dh.length&&(kf[Rf]=Dh[0]),kf},{})),Ud=computed(()=>vd.value.reduce((kf,Rf)=>(kf[toValue$2(Rf.path)]={name:toValue$2(Rf.path)||"",label:Rf.label||""},kf),{})),qd=computed(()=>vd.value.reduce((kf,Rf)=>{var Dh;return kf[toValue$2(Rf.path)]=(Dh=Rf.bails)!==null&&Dh!==void 0?Dh:!0,kf},{})),Wd=Object.assign({},(Ra==null?void 0:Ra.initialErrors)||{}),Kd=(qa=Ra==null?void 0:Ra.keepValuesOnUnmount)!==null&&qa!==void 0?qa:!1,{initialValues:Xd,originalInitialValues:df,setInitialValues:Ef}=useFormInitialValues(vd,yd,Ra),pf=useFormMeta(vd,yd,df,Gd),mf=computed(()=>vd.value.reduce((kf,Rf)=>{const Dh=getFromPath(yd,toValue$2(Rf.path));return setInPath(kf,toValue$2(Rf.path),Dh),kf},{})),_f=Ra==null?void 0:Ra.validationSchema;function xf(kf,Rf){var Dh,Vh;const Sm=computed(()=>getFromPath(Xd.value,toValue$2(kf))),$m=Md.value[toValue$2(kf)],Km=(Rf==null?void 0:Rf.type)==="checkbox"||(Rf==null?void 0:Rf.type)==="radio";if($m&&Km){$m.multiple=!0;const d_=pd++;return Array.isArray($m.id)?$m.id.push(d_):$m.id=[$m.id,d_],$m.fieldsCount++,$m.__flags.pendingUnmount[d_]=!1,$m}const Ag=computed(()=>getFromPath(yd,toValue$2(kf))),ig=toValue$2(kf),_g=xh.findIndex(d_=>d_===ig);_g!==-1&&xh.splice(_g,1);const vg=computed(()=>{var d_,o_,y_,t_;const R_=toValue$2(_f);if(isTypedSchema(R_))return(o_=(d_=R_.describe)===null||d_===void 0?void 0:d_.call(R_,toValue$2(kf)).required)!==null&&o_!==void 0?o_:!1;const v_=toValue$2(Rf==null?void 0:Rf.schema);return isTypedSchema(v_)&&(t_=(y_=v_.describe)===null||y_===void 0?void 0:y_.call(v_).required)!==null&&t_!==void 0?t_:!1}),Og=pd++,Wg=reactive({id:Og,path:kf,touched:!1,pending:!1,valid:!0,validated:!!(!((Dh=Wd[ig])===null||Dh===void 0)&&Dh.length),required:vg,initialValue:Sm,errors:shallowRef([]),bails:(Vh=Rf==null?void 0:Rf.bails)!==null&&Vh!==void 0?Vh:!1,label:Rf==null?void 0:Rf.label,type:(Rf==null?void 0:Rf.type)||"default",value:Ag,multiple:!1,__flags:{pendingUnmount:{[Og]:!1},pendingReset:!1},fieldsCount:1,validate:Rf==null?void 0:Rf.validate,dirty:computed(()=>!isEqual(unref(Ag),unref(Sm)))});return vd.value.push(Wg),Md.value[ig]=Wg,Ld(),Gd.value[ig]&&!Wd[ig]&&nextTick$1(()=>{wh(ig,{mode:"silent"})}),isRef(kf)&&watch(kf,d_=>{Ld();const o_=klona(Ag.value);Md.value[d_]=Wg,nextTick$1(()=>{setInPath(yd,d_,o_)})}),Wg}const Cf=debounceAsync(Rm,5),If=debounceAsync(Rm,5),Sf=withLatest(async kf=>await(kf==="silent"?Cf():If()),(kf,[Rf])=>{const Dh=keysOf(Df.errorBag.value),Sm=[...new Set([...keysOf(kf.results),...vd.value.map($m=>$m.path),...Dh])].sort().reduce(($m,Km)=>{var Ag;const ig=Km,_g=Pf(ig)||lh(ig),vg=((Ag=kf.results[ig])===null||Ag===void 0?void 0:Ag.errors)||[],Og=toValue$2(_g==null?void 0:_g.path)||ig,Wg=mergeValidationResults({errors:vg,valid:!vg.length},$m.results[Og]);return $m.results[Og]=Wg,Wg.valid||($m.errors[Og]=Wg.errors[0]),_g&&Nd.value[Og]&&delete Nd.value[Og],_g?(_g.valid=Wg.valid,Rf==="silent"||Rf==="validated-only"&&!_g.validated||Fd(_g,Wg.errors),$m):(Fd(Og,vg),$m)},{valid:kf.valid,results:{},errors:{},source:kf.source});return kf.values&&(Sm.values=kf.values,Sm.source=kf.source),keysOf(Sm.results).forEach($m=>{var Km;const Ag=Pf($m);Ag&&Rf!=="silent"&&(Rf==="validated-only"&&!Ag.validated||Fd(Ag,(Km=Sm.results[$m])===null||Km===void 0?void 0:Km.errors))}),Sm});function wf(kf){vd.value.forEach(kf)}function Pf(kf){const Rf=typeof kf=="string"?normalizeFormPath(kf):kf;return typeof Rf=="string"?Md.value[Rf]:Rf}function lh(kf){return vd.value.filter(Dh=>kf.startsWith(toValue$2(Dh.path))).reduce((Dh,Vh)=>Dh?Vh.path.length>Dh.path.length?Vh:Dh:Vh,void 0)}let xh=[],Eh;function Mh(kf){return xh.push(kf),Eh||(Eh=nextTick$1(()=>{[...xh].sort().reverse().forEach(Dh=>{unsetPath(yd,Dh)}),xh=[],Eh=null})),Eh}function dh(kf){return function(Dh,Vh){return function($m){return $m instanceof Event&&($m.preventDefault(),$m.stopPropagation()),wf(Km=>Km.touched=!0),fd.value=!0,md.value++,$h().then(Km=>{const Ag=klona(yd);if(Km.valid&&typeof Dh=="function"){const ig=klona(mf.value);let _g=kf?ig:Ag;return Km.values&&(_g=Km.source==="schema"?Km.values:Object.assign({},_g,Km.values)),Dh(_g,{evt:$m,controlledValues:ig,setErrors:Hd,setFieldError:Fd,setTouched:kh,setFieldTouched:Jf,setValues:Nh,setFieldValue:Af,resetForm:th,resetField:Zf})}!Km.valid&&typeof Vh=="function"&&Vh({values:Ag,evt:$m,errors:Km.errors,results:Km.results})}).then(Km=>(fd.value=!1,Km),Km=>{throw fd.value=!1,Km})}}}const fh=dh(!1);fh.withControlled=dh(!0);function Sh(kf,Rf){const Dh=vd.value.findIndex(Sm=>Sm.path===kf&&(Array.isArray(Sm.id)?Sm.id.includes(Rf):Sm.id===Rf)),Vh=vd.value[Dh];if(!(Dh===-1||!Vh)){if(nextTick$1(()=>{wh(kf,{mode:"silent",warn:!1})}),Vh.multiple&&Vh.fieldsCount&&Vh.fieldsCount--,Array.isArray(Vh.id)){const Sm=Vh.id.indexOf(Rf);Sm>=0&&Vh.id.splice(Sm,1),delete Vh.__flags.pendingUnmount[Rf]}(!Vh.multiple||Vh.fieldsCount<=0)&&(vd.value.splice(Dh,1),fm(kf),Ld(),delete Md.value[kf])}}function vh(kf){keysOf(Md.value).forEach(Rf=>{Rf.startsWith(kf)&&delete Md.value[Rf]}),vd.value=vd.value.filter(Rf=>!Rf.path.startsWith(kf)),nextTick$1(()=>{Ld()})}const Df={name:sd,formId:rd,values:yd,controlledValues:mf,errorBag:Vd,errors:Gd,schema:_f,submitCount:md,meta:pf,isSubmitting:fd,isValidating:hd,fieldArrays:gd,keepValuesOnUnmount:Kd,validateSchema:unref(_f)?Sf:void 0,validate:$h,setFieldError:Fd,validateField:wh,setFieldValue:Af,setValues:Nh,setErrors:Hd,setFieldTouched:Jf,setTouched:kh,resetForm:th,resetField:Zf,handleSubmit:fh,useFieldModel:Ym,defineInputBinds:rg,defineComponentBinds:Eg,defineField:Fm,stageInitialValue:zh,unsetInitialValue:fm,setFieldInitialValue:Mm,createPathState:xf,getPathState:Pf,unsetPathValue:Mh,removePathState:Sh,initialValues:Xd,getAllPathStates:()=>vd.value,destroyPath:vh,isFieldTouched:oh,isFieldDirty:Xh,isFieldValid:Tm};function Af(kf,Rf,Dh=!0){const Vh=klona(Rf),Sm=typeof kf=="string"?kf:kf.path;Pf(Sm)||xf(Sm),setInPath(yd,Sm,Vh),Dh&&wh(Sm)}function _h(kf,Rf=!0){keysOf(yd).forEach(Dh=>{delete yd[Dh]}),keysOf(kf).forEach(Dh=>{Af(Dh,kf[Dh],!1)}),Rf&&$h()}function Nh(kf,Rf=!0){merge$2(yd,kf),gd.forEach(Dh=>Dh&&Dh.reset()),Rf&&$h()}function dm(kf,Rf){const Dh=Pf(toValue$2(kf))||xf(kf);return computed({get(){return Dh.value},set(Vh){var Sm;const $m=toValue$2(kf);Af($m,Vh,(Sm=toValue$2(Rf))!==null&&Sm!==void 0?Sm:!1)}})}function Jf(kf,Rf){const Dh=Pf(kf);Dh&&(Dh.touched=Rf)}function oh(kf){const Rf=Pf(kf);return Rf?Rf.touched:vd.value.filter(Dh=>Dh.path.startsWith(kf)).some(Dh=>Dh.touched)}function Xh(kf){const Rf=Pf(kf);return Rf?Rf.dirty:vd.value.filter(Dh=>Dh.path.startsWith(kf)).some(Dh=>Dh.dirty)}function Tm(kf){const Rf=Pf(kf);return Rf?Rf.valid:vd.value.filter(Dh=>Dh.path.startsWith(kf)).every(Dh=>Dh.valid)}function kh(kf){if(typeof kf=="boolean"){wf(Rf=>{Rf.touched=kf});return}keysOf(kf).forEach(Rf=>{Jf(Rf,!!kf[Rf])})}function Zf(kf,Rf){var Dh;const Vh=Rf&&"value"in Rf?Rf.value:getFromPath(Xd.value,kf),Sm=Pf(kf);Sm&&(Sm.__flags.pendingReset=!0),Mm(kf,klona(Vh),!0),Af(kf,Vh,!1),Jf(kf,(Dh=Rf==null?void 0:Rf.touched)!==null&&Dh!==void 0?Dh:!1),Fd(kf,(Rf==null?void 0:Rf.errors)||[]),nextTick$1(()=>{Sm&&(Sm.__flags.pendingReset=!1)})}function th(kf,Rf){let Dh=klona(kf!=null&&kf.values?kf.values:df.value);Dh=Rf!=null&&Rf.force?Dh:merge$2(df.value,Dh),Dh=isTypedSchema(_f)&&isCallable(_f.cast)?_f.cast(Dh):Dh,Ef(Dh,{force:Rf==null?void 0:Rf.force}),wf(Vh=>{var Sm;Vh.__flags.pendingReset=!0,Vh.validated=!1,Vh.touched=((Sm=kf==null?void 0:kf.touched)===null||Sm===void 0?void 0:Sm[toValue$2(Vh.path)])||!1,Af(toValue$2(Vh.path),getFromPath(Dh,toValue$2(Vh.path)),!1),Fd(toValue$2(Vh.path),void 0)}),Rf!=null&&Rf.force?_h(Dh,!1):Nh(Dh,!1),Hd((kf==null?void 0:kf.errors)||{}),md.value=(kf==null?void 0:kf.submitCount)||0,nextTick$1(()=>{$h({mode:"silent"}),wf(Vh=>{Vh.__flags.pendingReset=!1})})}async function $h(kf){const Rf=(kf==null?void 0:kf.mode)||"force";if(Rf==="force"&&wf(Km=>Km.validated=!0),Df.validateSchema)return Df.validateSchema(Rf);hd.value=!0;const Dh=await Promise.all(vd.value.map(Km=>Km.validate?Km.validate(kf).then(Ag=>({key:toValue$2(Km.path),valid:Ag.valid,errors:Ag.errors,value:Ag.value})):Promise.resolve({key:toValue$2(Km.path),valid:!0,errors:[],value:void 0})));hd.value=!1;const Vh={},Sm={},$m={};for(const Km of Dh)Vh[Km.key]={valid:Km.valid,errors:Km.errors},Km.value&&setInPath($m,Km.key,Km.value),Km.errors.length&&(Sm[Km.key]=Km.errors[0]);return{valid:Dh.every(Km=>Km.valid),results:Vh,errors:Sm,values:$m,source:"fields"}}async function wh(kf,Rf){var Dh;const Vh=Pf(kf);if(Vh&&(Rf==null?void 0:Rf.mode)!=="silent"&&(Vh.validated=!0),_f){const{results:Sm}=await Sf((Rf==null?void 0:Rf.mode)||"validated-only");return Sm[kf]||{errors:[],valid:!0}}return Vh!=null&&Vh.validate?Vh.validate(Rf):(!Vh&&(Dh=Rf==null?void 0:Rf.warn),Promise.resolve({errors:[],valid:!0}))}function fm(kf){unsetPath(Xd.value,kf)}function zh(kf,Rf,Dh=!1){Mm(kf,Rf),setInPath(yd,kf,Rf),Dh&&!(Ra!=null&&Ra.initialValues)&&setInPath(df.value,kf,klona(Rf))}function Mm(kf,Rf,Dh=!1){setInPath(Xd.value,kf,klona(Rf)),Dh&&setInPath(df.value,kf,klona(Rf))}async function Rm(){const kf=unref(_f);if(!kf)return{valid:!0,results:{},errors:{},source:"none"};hd.value=!0;const Rf=isYupValidator(kf)||isTypedSchema(kf)?await validateTypedSchema(kf,yd):await validateObjectSchema(kf,yd,{names:Ud.value,bailsMap:qd.value});return hd.value=!1,Rf}const tg=fh((kf,{evt:Rf})=>{isFormSubmitEvent(Rf)&&Rf.target.submit()});onMounted(()=>{if(Ra!=null&&Ra.initialErrors&&Hd(Ra.initialErrors),Ra!=null&&Ra.initialTouched&&kh(Ra.initialTouched),Ra!=null&&Ra.validateOnMount){$h();return}Df.validateSchema&&Df.validateSchema("silent")}),isRef(_f)&&watch(_f,()=>{var kf;(kf=Df.validateSchema)===null||kf===void 0||kf.call(Df,"validated-only")}),provide(FormContextKey,Df);function Fm(kf,Rf){const Dh=isCallable(Rf)||Rf==null?void 0:Rf.label,Vh=Pf(toValue$2(kf))||xf(kf,{label:Dh}),Sm=()=>isCallable(Rf)?Rf(omit(Vh,PRIVATE_PATH_STATE_KEYS)):Rf||{};function $m(){var vg;Vh.touched=!0,((vg=Sm().validateOnBlur)!==null&&vg!==void 0?vg:getConfig$1().validateOnBlur)&&wh(toValue$2(Vh.path))}function Km(){var vg;((vg=Sm().validateOnInput)!==null&&vg!==void 0?vg:getConfig$1().validateOnInput)&&nextTick$1(()=>{wh(toValue$2(Vh.path))})}function Ag(){var vg;((vg=Sm().validateOnChange)!==null&&vg!==void 0?vg:getConfig$1().validateOnChange)&&nextTick$1(()=>{wh(toValue$2(Vh.path))})}const ig=computed(()=>{const vg={onChange:Ag,onInput:Km,onBlur:$m};return isCallable(Rf)?Object.assign(Object.assign({},vg),Rf(omit(Vh,PRIVATE_PATH_STATE_KEYS)).props||{}):Rf!=null&&Rf.props?Object.assign(Object.assign({},vg),Rf.props(omit(Vh,PRIVATE_PATH_STATE_KEYS))):vg});return[dm(kf,()=>{var vg,Og,Wg;return(Wg=(vg=Sm().validateOnModelUpdate)!==null&&vg!==void 0?vg:(Og=getConfig$1())===null||Og===void 0?void 0:Og.validateOnModelUpdate)!==null&&Wg!==void 0?Wg:!0}),ig]}function Ym(kf){return Array.isArray(kf)?kf.map(Rf=>dm(Rf,!0)):dm(kf)}function rg(kf,Rf){const[Dh,Vh]=Fm(kf,Rf);function Sm(){Vh.value.onBlur()}function $m(Ag){const ig=normalizeEventValue(Ag);Af(toValue$2(kf),ig,!1),Vh.value.onInput()}function Km(Ag){const ig=normalizeEventValue(Ag);Af(toValue$2(kf),ig,!1),Vh.value.onChange()}return computed(()=>Object.assign(Object.assign({},Vh.value),{onBlur:Sm,onInput:$m,onChange:Km,value:Dh.value}))}function Eg(kf,Rf){const[Dh,Vh]=Fm(kf,Rf),Sm=Pf(toValue$2(kf));function $m(Km){Dh.value=Km}return computed(()=>{const Km=isCallable(Rf)?Rf(omit(Sm,PRIVATE_PATH_STATE_KEYS)):Rf||{};return Object.assign({[Km.model||"modelValue"]:Dh.value,[`onUpdate:${Km.model||"modelValue"}`]:$m},Vh.value)})}const Fh=Object.assign(Object.assign({},Df),{values:readonly(yd),handleReset:()=>th(),submitForm:tg});return provide(PublicFormContextKey,Fh),Fh}function useFormMeta(Ra,qa,rd,sd){const pd={touched:"some",pending:"some",valid:"every"},fd=computed(()=>!isEqual(qa,unref(rd)));function hd(){const gd=Ra.value;return keysOf(pd).reduce((yd,vd)=>{const Nd=pd[vd];return yd[vd]=gd[Nd](Md=>Md[vd]),yd},{})}const md=reactive(hd());return watchEffect(()=>{const gd=hd();md.touched=gd.touched,md.valid=gd.valid,md.pending=gd.pending}),computed(()=>Object.assign(Object.assign({initialValues:unref(rd)},md),{valid:md.valid&&!keysOf(sd.value).length,dirty:fd.value}))}function useFormInitialValues(Ra,qa,rd){const sd=resolveInitialValues(rd),pd=ref$1(sd),fd=ref$1(klona(sd));function hd(md,gd){gd!=null&&gd.force?(pd.value=klona(md),fd.value=klona(md)):(pd.value=merge$2(klona(pd.value)||{},klona(md)),fd.value=merge$2(klona(fd.value)||{},klona(md))),gd!=null&&gd.updateFields&&Ra.value.forEach(yd=>{if(yd.touched)return;const Nd=getFromPath(pd.value,toValue$2(yd.path));setInPath(qa,toValue$2(yd.path),klona(Nd))})}return{initialValues:pd,originalInitialValues:fd,setInitialValues:hd}}function mergeValidationResults(Ra,qa){return qa?{valid:Ra.valid&&qa.valid,errors:[...Ra.errors,...qa.errors]}:Ra}const FormImpl=defineComponent({name:"Form",inheritAttrs:!1,props:{as:{type:null,default:"form"},validationSchema:{type:Object,default:void 0},initialValues:{type:Object,default:void 0},initialErrors:{type:Object,default:void 0},initialTouched:{type:Object,default:void 0},validateOnMount:{type:Boolean,default:!1},onSubmit:{type:Function,default:void 0},onInvalidSubmit:{type:Function,default:void 0},keepValues:{type:Boolean,default:!1},name:{type:String,default:"Form"}},setup(Ra,qa){const rd=toRef$1(Ra,"validationSchema"),sd=toRef$1(Ra,"keepValues"),{errors:pd,errorBag:fd,values:hd,meta:md,isSubmitting:gd,isValidating:yd,submitCount:vd,controlledValues:Nd,validate:Md,validateField:Ld,handleReset:Fd,resetForm:Hd,handleSubmit:Vd,setErrors:Gd,setFieldError:Ud,setFieldValue:qd,setValues:Wd,setFieldTouched:Kd,setTouched:Xd,resetField:df}=useForm({validationSchema:rd.value?rd:void 0,initialValues:Ra.initialValues,initialErrors:Ra.initialErrors,initialTouched:Ra.initialTouched,validateOnMount:Ra.validateOnMount,keepValuesOnUnmount:sd,name:Ra.name}),Ef=Vd((wf,{evt:Pf})=>{isFormSubmitEvent(Pf)&&Pf.target.submit()},Ra.onInvalidSubmit),pf=Ra.onSubmit?Vd(Ra.onSubmit,Ra.onInvalidSubmit):Ef;function mf(wf){isEvent(wf)&&wf.preventDefault(),Fd(),typeof qa.attrs.onReset=="function"&&qa.attrs.onReset()}function _f(wf,Pf){return Vd(typeof wf=="function"&&!Pf?wf:Pf,Ra.onInvalidSubmit)(wf)}function xf(){return klona(hd)}function Cf(){return klona(md.value)}function If(){return klona(pd.value)}function Sf(){return{meta:md.value,errors:pd.value,errorBag:fd.value,values:hd,isSubmitting:gd.value,isValidating:yd.value,submitCount:vd.value,controlledValues:Nd.value,validate:Md,validateField:Ld,handleSubmit:_f,handleReset:Fd,submitForm:Ef,setErrors:Gd,setFieldError:Ud,setFieldValue:qd,setValues:Wd,setFieldTouched:Kd,setTouched:Xd,resetForm:Hd,resetField:df,getValues:xf,getMeta:Cf,getErrors:If}}return qa.expose({setFieldError:Ud,setErrors:Gd,setFieldValue:qd,setValues:Wd,setFieldTouched:Kd,setTouched:Xd,resetForm:Hd,validate:Md,validateField:Ld,resetField:df,getValues:xf,getMeta:Cf,getErrors:If,values:hd,meta:md,errors:pd}),function(){const Pf=Ra.as==="form"?Ra.as:Ra.as?resolveDynamicComponent(Ra.as):null,lh=normalizeChildren(Pf,qa,Sf);return Pf?h$2(Pf,Object.assign(Object.assign(Object.assign({},Pf==="form"?{novalidate:!0}:{}),qa.attrs),{onSubmit:pf,onReset:mf}),lh):lh}}}),Form=FormImpl;/** + */function isCallable(Ra){return typeof Ra=="function"}function isNullOrUndefined(Ra){return Ra==null}const isObject$4=Ra=>Ra!==null&&!!Ra&&typeof Ra=="object"&&!Array.isArray(Ra);function isIndex$1(Ra){return Number(Ra)>=0}function toNumber$3(Ra){const ed=parseFloat(Ra);return isNaN(ed)?Ra:ed}function isObjectLike$1(Ra){return typeof Ra=="object"&&Ra!==null}function getTag$1(Ra){return Ra==null?Ra===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(Ra)}function isPlainObject$2(Ra){if(!isObjectLike$1(Ra)||getTag$1(Ra)!=="[object Object]")return!1;if(Object.getPrototypeOf(Ra)===null)return!0;let ed=Ra;for(;Object.getPrototypeOf(ed)!==null;)ed=Object.getPrototypeOf(ed);return Object.getPrototypeOf(Ra)===ed}function merge$3(Ra,ed){return Object.keys(ed).forEach(ud=>{if(isPlainObject$2(ed[ud])&&isPlainObject$2(Ra[ud])){Ra[ud]||(Ra[ud]={}),merge$3(Ra[ud],ed[ud]);return}Ra[ud]=ed[ud]}),Ra}function normalizeFormPath(Ra){const ed=Ra.split(".");if(!ed.length)return"";let ud=String(ed[0]);for(let dd=1;ddisContainerValue(hd)&&md in hd?hd[md]:ud,Ra):ud}function setInPath(Ra,ed,ud){if(isNotNestedPath(ed)){Ra[cleanupNonNestedPath(ed)]=ud;return}const dd=ed.split(/\.|\[(\d+)\]/).filter(Boolean);let hd=Ra;for(let md=0;mdgetFromPath(Ra,ud.slice(0,gd).join(".")));for(let md=hd.length-1;md>=0;md--)if(isEmptyContainer(hd[md])){if(md===0){unset(Ra,ud[0]);continue}unset(hd[md-1],ud[md-1])}}function keysOf(Ra){return Object.keys(Ra)}function injectWithSelf(Ra,ed=void 0){const ud=getCurrentInstance();return(ud==null?void 0:ud.provides[Ra])||inject(Ra,ed)}function resolveNextCheckboxValue(Ra,ed,ud){if(Array.isArray(Ra)){const dd=[...Ra],hd=dd.findIndex(md=>isEqual(md,ed));return hd>=0?dd.splice(hd,1):dd.push(ed),dd}return isEqual(Ra,ed)?ud:ed}function debounceAsync(Ra,ed=0){let ud=null,dd=[];return function(...hd){return ud&&clearTimeout(ud),ud=setTimeout(()=>{const md=Ra(...hd);dd.forEach(gd=>gd(md)),dd=[]},ed),new Promise(md=>dd.push(md))}}function applyModelModifiers(Ra,ed){return isObject$4(ed)&&ed.number?toNumber$3(Ra):Ra}function withLatest(Ra,ed){let ud;return async function(...hd){const md=Ra(...hd);ud=md;const gd=await md;return md!==ud?gd:(ud=void 0,ed(gd,hd))}}function normalizeErrorItem(Ra){return Array.isArray(Ra)?Ra:Ra?[Ra]:[]}function omit(Ra,ed){const ud={};for(const dd in Ra)ed.includes(dd)||(ud[dd]=Ra[dd]);return ud}function debounceNextTick(Ra){let ed=null,ud=[];return function(...dd){const hd=nextTick$1(()=>{if(ed!==hd)return;const md=Ra(...dd);ud.forEach(gd=>gd(md)),ud=[],ed=null});return ed=hd,new Promise(md=>ud.push(md))}}function normalizeChildren(Ra,ed,ud){return ed.slots.default?typeof Ra=="string"||!Ra?ed.slots.default(ud()):{default:()=>{var dd,hd;return(hd=(dd=ed.slots).default)===null||hd===void 0?void 0:hd.call(dd,ud())}}:ed.slots.default}function getBoundValue(Ra){if(hasValueBinding(Ra))return Ra._value}function hasValueBinding(Ra){return"_value"in Ra}function parseInputValue(Ra){return Ra.type==="number"||Ra.type==="range"?Number.isNaN(Ra.valueAsNumber)?Ra.value:Ra.valueAsNumber:Ra.value}function normalizeEventValue(Ra){if(!isEvent(Ra))return Ra;const ed=Ra.target;if(hasCheckedAttr(ed.type)&&hasValueBinding(ed))return getBoundValue(ed);if(ed.type==="file"&&ed.files){const ud=Array.from(ed.files);return ed.multiple?ud:ud[0]}if(isNativeMultiSelect(ed))return Array.from(ed.options).filter(ud=>ud.selected&&!ud.disabled).map(getBoundValue);if(isNativeSelect(ed)){const ud=Array.from(ed.options).find(dd=>dd.selected);return ud?getBoundValue(ud):ed.value}return parseInputValue(ed)}function normalizeRules(Ra){const ed={};return Object.defineProperty(ed,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),Ra?isObject$4(Ra)&&Ra._$$isNormalized?Ra:isObject$4(Ra)?Object.keys(Ra).reduce((ud,dd)=>{const hd=normalizeParams(Ra[dd]);return Ra[dd]!==!1&&(ud[dd]=buildParams(hd)),ud},ed):typeof Ra!="string"?ed:Ra.split("|").reduce((ud,dd)=>{const hd=parseRule(dd);return hd.name&&(ud[hd.name]=buildParams(hd.params)),ud},ed):ed}function normalizeParams(Ra){return Ra===!0?[]:Array.isArray(Ra)||isObject$4(Ra)?Ra:[Ra]}function buildParams(Ra){const ed=ud=>typeof ud=="string"&&ud[0]==="@"?createLocator(ud.slice(1)):ud;return Array.isArray(Ra)?Ra.map(ed):Ra instanceof RegExp?[Ra]:Object.keys(Ra).reduce((ud,dd)=>(ud[dd]=ed(Ra[dd]),ud),{})}const parseRule=Ra=>{let ed=[];const ud=Ra.split(":")[0];return Ra.includes(":")&&(ed=Ra.split(":").slice(1).join(":").split(",")),{name:ud,params:ed}};function createLocator(Ra){const ed=ud=>{var dd;return(dd=getFromPath(ud,Ra))!==null&&dd!==void 0?dd:ud[Ra]};return ed.__locatorRef=Ra,ed}function extractLocators(Ra){return Array.isArray(Ra)?Ra.filter(isLocator):keysOf(Ra).filter(ed=>isLocator(Ra[ed])).map(ed=>Ra[ed])}const DEFAULT_CONFIG={generateMessage:({field:Ra})=>`${Ra} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0};let currentConfig=Object.assign({},DEFAULT_CONFIG);const getConfig$1=()=>currentConfig;async function validate$1(Ra,ed,ud={}){const dd=ud==null?void 0:ud.bails,hd={name:(ud==null?void 0:ud.name)||"{field}",rules:ed,label:ud==null?void 0:ud.label,bails:dd??!0,formData:(ud==null?void 0:ud.values)||{}},md=await _validate(hd,Ra);return Object.assign(Object.assign({},md),{valid:!md.errors.length})}async function _validate(Ra,ed){const ud=Ra.rules;if(isTypedSchema(ud)||isYupValidator(ud))return validateFieldWithTypedSchema(ed,Object.assign(Object.assign({},Ra),{rules:ud}));if(isCallable(ud)||Array.isArray(ud)){const yd={field:Ra.label||Ra.name,name:Ra.name,label:Ra.label,form:Ra.formData,value:ed},vd=Array.isArray(ud)?ud:[ud],Cd=vd.length,wd=[];for(let Nd=0;Nd{const Cd=vd.path||"";return yd[Cd]||(yd[Cd]={errors:[],path:Cd}),yd[Cd].errors.push(...vd.errors),yd},{});return{errors:Object.values(gd)}}}}}async function validateFieldWithTypedSchema(Ra,ed){const dd=await(isTypedSchema(ed.rules)?ed.rules:yupToTypedSchema(ed.rules)).parse(Ra,{formData:ed.formData}),hd=[];for(const md of dd.errors)md.errors.length&&hd.push(...md.errors);return{value:dd.value,errors:hd}}async function _test(Ra,ed,ud){const dd=resolveRule(ud.name);if(!dd)throw new Error(`No such validator '${ud.name}' exists.`);const hd=fillTargetValues(ud.params,Ra.formData),md={field:Ra.label||Ra.name,name:Ra.name,label:Ra.label,value:ed,form:Ra.formData,rule:Object.assign(Object.assign({},ud),{params:hd})},gd=await dd(ed,hd,md);return typeof gd=="string"?{error:gd}:{error:gd?void 0:_generateFieldError(md)}}function _generateFieldError(Ra){const ed=getConfig$1().generateMessage;return ed?ed(Ra):"Field is invalid"}function fillTargetValues(Ra,ed){const ud=dd=>isLocator(dd)?dd(ed):dd;return Array.isArray(Ra)?Ra.map(ud):Object.keys(Ra).reduce((dd,hd)=>(dd[hd]=ud(Ra[hd]),dd),{})}async function validateTypedSchema(Ra,ed){const dd=await(isTypedSchema(Ra)?Ra:yupToTypedSchema(Ra)).parse(klona(ed),{formData:klona(ed)}),hd={},md={};for(const gd of dd.errors){const yd=gd.errors,vd=(gd.path||"").replace(/\["(\d+)"\]/g,(Cd,wd)=>`[${wd}]`);hd[vd]={valid:!yd.length,errors:yd},yd.length&&(md[vd]=yd[0])}return{valid:!dd.errors.length,results:hd,errors:md,values:dd.value,source:"schema"}}async function validateObjectSchema(Ra,ed,ud){const hd=keysOf(Ra).map(async Cd=>{var wd,Nd,Ld;const Ud=(wd=ud==null?void 0:ud.names)===null||wd===void 0?void 0:wd[Cd],jd=await validate$1(getFromPath(ed,Cd),Ra[Cd],{name:(Ud==null?void 0:Ud.name)||Cd,label:Ud==null?void 0:Ud.label,values:ed,bails:(Ld=(Nd=ud==null?void 0:ud.bailsMap)===null||Nd===void 0?void 0:Nd[Cd])!==null&&Ld!==void 0?Ld:!0});return Object.assign(Object.assign({},jd),{path:Cd})});let md=!0;const gd=await Promise.all(hd),yd={},vd={};for(const Cd of gd)yd[Cd.path]={valid:Cd.valid,errors:Cd.errors},Cd.valid||(md=!1,vd[Cd.path]=Cd.errors[0]);return{valid:md,results:yd,errors:vd,source:"schema"}}let ID_COUNTER=0;function useFieldState(Ra,ed){const{value:ud,initialValue:dd,setInitialValue:hd}=_useFieldValue(Ra,ed.modelValue,ed.form);if(!ed.form){let vd=function(Ud){var jd;"value"in Ud&&(ud.value=Ud.value),"errors"in Ud&&wd(Ud.errors),"touched"in Ud&&(Ld.touched=(jd=Ud.touched)!==null&&jd!==void 0?jd:Ld.touched),"initialValue"in Ud&&hd(Ud.initialValue)};const{errors:Cd,setErrors:wd}=createFieldErrors(),Nd=ID_COUNTER>=Number.MAX_SAFE_INTEGER?0:++ID_COUNTER,Ld=createFieldMeta(ud,dd,Cd,ed.schema);return{id:Nd,path:Ra,value:ud,initialValue:dd,meta:Ld,flags:{pendingUnmount:{[Nd]:!1},pendingReset:!1},errors:Cd,setState:vd}}const md=ed.form.createPathState(Ra,{bails:ed.bails,label:ed.label,type:ed.type,validate:ed.validate,schema:ed.schema}),gd=computed(()=>md.errors);function yd(vd){var Cd,wd,Nd;"value"in vd&&(ud.value=vd.value),"errors"in vd&&((Cd=ed.form)===null||Cd===void 0||Cd.setFieldError(unref(Ra),vd.errors)),"touched"in vd&&((wd=ed.form)===null||wd===void 0||wd.setFieldTouched(unref(Ra),(Nd=vd.touched)!==null&&Nd!==void 0?Nd:!1)),"initialValue"in vd&&hd(vd.initialValue)}return{id:Array.isArray(md.id)?md.id[md.id.length-1]:md.id,path:Ra,value:ud,errors:gd,meta:md,initialValue:dd,flags:md.__flags,setState:yd}}function _useFieldValue(Ra,ed,ud){const dd=ref$1(unref(ed));function hd(){return ud?getFromPath(ud.initialValues.value,unref(Ra),unref(dd)):unref(dd)}function md(Cd){if(!ud){dd.value=Cd;return}ud.setFieldInitialValue(unref(Ra),Cd,!0)}const gd=computed(hd);if(!ud)return{value:ref$1(hd()),initialValue:gd,setInitialValue:md};const yd=resolveModelValue(ed,ud,gd,Ra);return ud.stageInitialValue(unref(Ra),yd,!0),{value:computed({get(){return getFromPath(ud.values,unref(Ra))},set(Cd){ud.setFieldValue(unref(Ra),Cd,!1)}}),initialValue:gd,setInitialValue:md}}function resolveModelValue(Ra,ed,ud,dd){return isRef(Ra)?unref(Ra):Ra!==void 0?Ra:getFromPath(ed.values,unref(dd),unref(ud))}function createFieldMeta(Ra,ed,ud,dd){const hd=computed(()=>{var gd,yd,vd;return(vd=(yd=(gd=toValue$2(dd))===null||gd===void 0?void 0:gd.describe)===null||yd===void 0?void 0:yd.call(gd).required)!==null&&vd!==void 0?vd:!1}),md=reactive({touched:!1,pending:!1,valid:!0,required:hd,validated:!!unref(ud).length,initialValue:computed(()=>unref(ed)),dirty:computed(()=>!isEqual(unref(Ra),unref(ed)))});return watch(ud,gd=>{md.valid=!gd.length},{immediate:!0,flush:"sync"}),md}function createFieldErrors(){const Ra=ref$1([]);return{errors:Ra,setErrors:ed=>{Ra.value=normalizeErrorItem(ed)}}}function useField(Ra,ed,ud){return hasCheckedAttr(ud==null?void 0:ud.type)?useFieldWithChecked(Ra,ed,ud):_useField(Ra,ed,ud)}function _useField(Ra,ed,ud){const{initialValue:dd,validateOnMount:hd,bails:md,type:gd,checkedValue:yd,label:vd,validateOnValueUpdate:Cd,uncheckedValue:wd,controlled:Nd,keepValueOnUnmount:Ld,syncVModel:Ud,form:jd}=normalizeOptions(ud),Gd=Nd?injectWithSelf(FormContextKey):void 0,Yd=jd||Gd,zd=computed(()=>normalizeFormPath(toValue$2(Ra))),qd=computed(()=>{if(toValue$2(Yd==null?void 0:Yd.schema))return;const kf=unref(ed);return isYupValidator(kf)||isTypedSchema(kf)||isCallable(kf)||Array.isArray(kf)?kf:normalizeRules(kf)}),Wd=!isCallable(qd.value)&&isTypedSchema(toValue$2(ed)),{id:Xd,value:Jd,initialValue:Zd,meta:mf,setState:xf,errors:_f,flags:vf}=useFieldState(zd,{modelValue:dd,form:Yd,bails:md,label:vd,type:gd,validate:qd.value?If:void 0,schema:Wd?ed:void 0}),gf=computed(()=>_f.value[0]);Ud&&useVModel({value:Jd,prop:Ud,handleChange:Ff,shouldValidate:()=>Cd&&!vf.pendingReset});const Af=(Eh,kf=!1)=>{mf.touched=!0,kf&&Of()};async function Df(Eh){var kf,Rf;if(Yd!=null&&Yd.validateSchema){const{results:_h}=await Yd.validateSchema(Eh);return(kf=_h[toValue$2(zd)])!==null&&kf!==void 0?kf:{valid:!0,errors:[]}}return qd.value?validate$1(Jd.value,qd.value,{name:toValue$2(zd),label:toValue$2(vd),values:(Rf=Yd==null?void 0:Yd.values)!==null&&Rf!==void 0?Rf:{},bails:md}):{valid:!0,errors:[]}}const Of=withLatest(async()=>(mf.pending=!0,mf.validated=!0,Df("validated-only")),Eh=>(vf.pendingUnmount[mh.id]||(xf({errors:Eh.errors}),mf.pending=!1,mf.valid=Eh.valid),Eh)),Cf=withLatest(async()=>Df("silent"),Eh=>(mf.valid=Eh.valid,Eh));function If(Eh){return(Eh==null?void 0:Eh.mode)==="silent"?Cf():Of()}function Ff(Eh,kf=!0){const Rf=normalizeEventValue(Eh);Mh(Rf,kf)}onMounted(()=>{if(hd)return Of();(!Yd||!Yd.validateSchema)&&Cf()});function sh(Eh){mf.touched=Eh}function Sh(Eh){var kf;const Rf=Eh&&"value"in Eh?Eh.value:Zd.value;xf({value:klona(Rf),initialValue:klona(Rf),touched:(kf=Eh==null?void 0:Eh.touched)!==null&&kf!==void 0?kf:!1,errors:(Eh==null?void 0:Eh.errors)||[]}),mf.pending=!1,mf.validated=!1,Cf()}const yh=getCurrentInstance();function Mh(Eh,kf=!0){Jd.value=yh&&Ud?applyModelModifiers(Eh,yh.props.modelModifiers):Eh,(kf?Of:Cf)()}function lh(Eh){xf({errors:Array.isArray(Eh)?Eh:[Eh]})}const rh=computed({get(){return Jd.value},set(Eh){Mh(Eh,Cd)}}),mh={id:Xd,name:zd,label:vd,value:rh,meta:mf,errors:_f,errorMessage:gf,type:gd,checkedValue:yd,uncheckedValue:wd,bails:md,keepValueOnUnmount:Ld,resetField:Sh,handleReset:()=>Sh(),validate:If,handleChange:Ff,handleBlur:Af,setState:xf,setTouched:sh,setErrors:lh,setValue:Mh};if(provide(FieldContextKey,mh),isRef(ed)&&typeof unref(ed)!="function"&&watch(ed,(Eh,kf)=>{isEqual(Eh,kf)||(mf.validated?Of():Cf())},{deep:!0}),!Yd)return mh;const xh=computed(()=>{const Eh=qd.value;return!Eh||isCallable(Eh)||isYupValidator(Eh)||isTypedSchema(Eh)||Array.isArray(Eh)?{}:Object.keys(Eh).reduce((kf,Rf)=>{const _h=extractLocators(Eh[Rf]).map(Ph=>Ph.__locatorRef).reduce((Ph,sm)=>{const th=getFromPath(Yd.values,sm)||Yd.values[sm];return th!==void 0&&(Ph[sm]=th),Ph},{});return Object.assign(kf,_h),kf},{})});return watch(xh,(Eh,kf)=>{if(!Object.keys(Eh).length)return;!isEqual(Eh,kf)&&(mf.validated?Of():Cf())}),onBeforeUnmount(()=>{var Eh;const kf=(Eh=toValue$2(mh.keepValueOnUnmount))!==null&&Eh!==void 0?Eh:toValue$2(Yd.keepValuesOnUnmount),Rf=toValue$2(zd);if(kf||!Yd||vf.pendingUnmount[mh.id]){Yd==null||Yd.removePathState(Rf,Xd);return}vf.pendingUnmount[mh.id]=!0;const _h=Yd.getPathState(Rf);if(Array.isArray(_h==null?void 0:_h.id)&&(_h!=null&&_h.multiple)?_h!=null&&_h.id.includes(mh.id):(_h==null?void 0:_h.id)===mh.id){if(_h!=null&&_h.multiple&&Array.isArray(_h.value)){const sm=_h.value.findIndex(th=>isEqual(th,toValue$2(mh.checkedValue)));if(sm>-1){const th=[..._h.value];th.splice(sm,1),Yd.setFieldValue(Rf,th)}Array.isArray(_h.id)&&_h.id.splice(_h.id.indexOf(mh.id),1)}else Yd.unsetPathValue(toValue$2(zd));Yd.removePathState(Rf,Xd)}}),mh}function normalizeOptions(Ra){const ed=()=>({initialValue:void 0,validateOnMount:!1,bails:!0,label:void 0,validateOnValueUpdate:!0,keepValueOnUnmount:void 0,syncVModel:!1,controlled:!0}),ud=!!(Ra!=null&&Ra.syncVModel),dd=typeof(Ra==null?void 0:Ra.syncVModel)=="string"?Ra.syncVModel:(Ra==null?void 0:Ra.modelPropName)||"modelValue",hd=ud&&!("initialValue"in(Ra||{}))?getCurrentModelValue(getCurrentInstance(),dd):Ra==null?void 0:Ra.initialValue;if(!Ra)return Object.assign(Object.assign({},ed()),{initialValue:hd});const md="valueProp"in Ra?Ra.valueProp:Ra.checkedValue,gd="standalone"in Ra?!Ra.standalone:Ra.controlled,yd=(Ra==null?void 0:Ra.modelPropName)||(Ra==null?void 0:Ra.syncVModel)||!1;return Object.assign(Object.assign(Object.assign({},ed()),Ra||{}),{initialValue:hd,controlled:gd??!0,checkedValue:md,syncVModel:yd})}function useFieldWithChecked(Ra,ed,ud){const dd=ud!=null&&ud.standalone?void 0:injectWithSelf(FormContextKey),hd=ud==null?void 0:ud.checkedValue,md=ud==null?void 0:ud.uncheckedValue;function gd(yd){const vd=yd.handleChange,Cd=computed(()=>{const Nd=toValue$2(yd.value),Ld=toValue$2(hd);return Array.isArray(Nd)?Nd.findIndex(Ud=>isEqual(Ud,Ld))>=0:isEqual(Ld,Nd)});function wd(Nd,Ld=!0){var Ud,jd;if(Cd.value===((Ud=Nd==null?void 0:Nd.target)===null||Ud===void 0?void 0:Ud.checked)){Ld&&yd.validate();return}const Gd=toValue$2(Ra),Yd=dd==null?void 0:dd.getPathState(Gd),zd=normalizeEventValue(Nd);let qd=(jd=toValue$2(hd))!==null&&jd!==void 0?jd:zd;dd&&(Yd!=null&&Yd.multiple)&&Yd.type==="checkbox"?qd=resolveNextCheckboxValue(getFromPath(dd.values,Gd)||[],qd,void 0):(ud==null?void 0:ud.type)==="checkbox"&&(qd=resolveNextCheckboxValue(toValue$2(yd.value),qd,toValue$2(md))),vd(qd,Ld)}return Object.assign(Object.assign({},yd),{checked:Cd,checkedValue:hd,uncheckedValue:md,handleChange:wd})}return gd(_useField(Ra,ed,ud))}function useVModel({prop:Ra,value:ed,handleChange:ud,shouldValidate:dd}){const hd=getCurrentInstance();if(!hd||!Ra)return;const md=typeof Ra=="string"?Ra:"modelValue",gd=`update:${md}`;md in hd.props&&(watch(ed,yd=>{isEqual(yd,getCurrentModelValue(hd,md))||hd.emit(gd,yd)}),watch(()=>getCurrentModelValue(hd,md),yd=>{if(yd===IS_ABSENT&&ed.value===void 0)return;const vd=yd===IS_ABSENT?void 0:yd;isEqual(vd,ed.value)||ud(vd,dd())}))}function getCurrentModelValue(Ra,ed){if(Ra)return Ra.props[ed]}const FieldImpl=defineComponent({name:"Field",inheritAttrs:!1,props:{as:{type:[String,Object],default:void 0},name:{type:String,required:!0},rules:{type:[Object,String,Function],default:void 0},validateOnMount:{type:Boolean,default:!1},validateOnBlur:{type:Boolean,default:void 0},validateOnChange:{type:Boolean,default:void 0},validateOnInput:{type:Boolean,default:void 0},validateOnModelUpdate:{type:Boolean,default:void 0},bails:{type:Boolean,default:()=>getConfig$1().bails},label:{type:String,default:void 0},uncheckedValue:{type:null,default:void 0},modelValue:{type:null,default:IS_ABSENT},modelModifiers:{type:null,default:()=>({})},"onUpdate:modelValue":{type:null,default:void 0},standalone:{type:Boolean,default:!1},keepValue:{type:Boolean,default:void 0}},setup(Ra,ed){const ud=toRef$1(Ra,"rules"),dd=toRef$1(Ra,"name"),hd=toRef$1(Ra,"label"),md=toRef$1(Ra,"uncheckedValue"),gd=toRef$1(Ra,"keepValue"),{errors:yd,value:vd,errorMessage:Cd,validate:wd,handleChange:Nd,handleBlur:Ld,setTouched:Ud,resetField:jd,handleReset:Gd,meta:Yd,checked:zd,setErrors:qd,setValue:Wd}=useField(dd,ud,{validateOnMount:Ra.validateOnMount,bails:Ra.bails,standalone:Ra.standalone,type:ed.attrs.type,initialValue:resolveInitialValue(Ra,ed),checkedValue:ed.attrs.value,uncheckedValue:md,label:hd,validateOnValueUpdate:Ra.validateOnModelUpdate,keepValueOnUnmount:gd,syncVModel:!0}),Xd=function(vf,gf=!0){Nd(vf,gf)},Jd=computed(()=>{const{validateOnInput:_f,validateOnChange:vf,validateOnBlur:gf,validateOnModelUpdate:Af}=resolveValidationTriggers(Ra);function Df(Ff){Ld(Ff,gf),isCallable(ed.attrs.onBlur)&&ed.attrs.onBlur(Ff)}function Of(Ff){Xd(Ff,_f),isCallable(ed.attrs.onInput)&&ed.attrs.onInput(Ff)}function Cf(Ff){Xd(Ff,vf),isCallable(ed.attrs.onChange)&&ed.attrs.onChange(Ff)}const If={name:Ra.name,onBlur:Df,onInput:Of,onChange:Cf};return If["onUpdate:modelValue"]=Ff=>Xd(Ff,Af),If}),Zd=computed(()=>{const _f=Object.assign({},Jd.value);hasCheckedAttr(ed.attrs.type)&&zd&&(_f.checked=zd.value);const vf=resolveTag(Ra,ed);return shouldHaveValueBinding(vf,ed.attrs)&&(_f.value=vd.value),_f}),mf=computed(()=>Object.assign(Object.assign({},Jd.value),{modelValue:vd.value}));function xf(){return{field:Zd.value,componentField:mf.value,value:vd.value,meta:Yd,errors:yd.value,errorMessage:Cd.value,validate:wd,resetField:jd,handleChange:Xd,handleInput:_f=>Xd(_f,!1),handleReset:Gd,handleBlur:Jd.value.onBlur,setTouched:Ud,setErrors:qd,setValue:Wd}}return ed.expose({value:vd,meta:Yd,errors:yd,errorMessage:Cd,setErrors:qd,setTouched:Ud,setValue:Wd,reset:jd,validate:wd,handleChange:Nd}),()=>{const _f=resolveDynamicComponent(resolveTag(Ra,ed)),vf=normalizeChildren(_f,ed,xf);return _f?h$2(_f,Object.assign(Object.assign({},ed.attrs),Zd.value),vf):vf}}});function resolveTag(Ra,ed){let ud=Ra.as||"";return!Ra.as&&!ed.slots.default&&(ud="input"),ud}function resolveValidationTriggers(Ra){var ed,ud,dd,hd;const{validateOnInput:md,validateOnChange:gd,validateOnBlur:yd,validateOnModelUpdate:vd}=getConfig$1();return{validateOnInput:(ed=Ra.validateOnInput)!==null&&ed!==void 0?ed:md,validateOnChange:(ud=Ra.validateOnChange)!==null&&ud!==void 0?ud:gd,validateOnBlur:(dd=Ra.validateOnBlur)!==null&&dd!==void 0?dd:yd,validateOnModelUpdate:(hd=Ra.validateOnModelUpdate)!==null&&hd!==void 0?hd:vd}}function resolveInitialValue(Ra,ed){return hasCheckedAttr(ed.attrs.type)?isPropPresent(Ra,"modelValue")?Ra.modelValue:void 0:isPropPresent(Ra,"modelValue")?Ra.modelValue:ed.attrs.value}const Field=FieldImpl;let FORM_COUNTER=0;const PRIVATE_PATH_STATE_KEYS=["bails","fieldsCount","id","multiple","type","validate"];function resolveInitialValues(Ra){const ed=(Ra==null?void 0:Ra.initialValues)||{},ud=Object.assign({},toValue$2(ed)),dd=unref(Ra==null?void 0:Ra.validationSchema);return dd&&isTypedSchema(dd)&&isCallable(dd.cast)?klona(dd.cast(ud)||{}):klona(ud)}function useForm(Ra){var ed;const ud=FORM_COUNTER++,dd=(Ra==null?void 0:Ra.name)||"Form";let hd=0;const md=ref$1(!1),gd=ref$1(!1),yd=ref$1(0),vd=[],Cd=reactive(resolveInitialValues(Ra)),wd=ref$1([]),Nd=ref$1({}),Ld=ref$1({}),Ud=debounceNextTick(()=>{Ld.value=wd.value.reduce((Pf,$f)=>(Pf[normalizeFormPath(toValue$2($f.path))]=$f,Pf),{})});function jd(Pf,$f){const Nh=Ff(Pf);if(!Nh){typeof Pf=="string"&&(Nd.value[normalizeFormPath(Pf)]=normalizeErrorItem($f));return}if(typeof Pf=="string"){const Wh=normalizeFormPath(Pf);Nd.value[Wh]&&delete Nd.value[Wh]}Nh.errors=normalizeErrorItem($f),Nh.valid=!Nh.errors.length}function Gd(Pf){keysOf(Pf).forEach($f=>{jd($f,Pf[$f])})}Ra!=null&&Ra.initialErrors&&Gd(Ra.initialErrors);const Yd=computed(()=>{const Pf=wd.value.reduce(($f,Nh)=>(Nh.errors.length&&($f[toValue$2(Nh.path)]=Nh.errors),$f),{});return Object.assign(Object.assign({},Nd.value),Pf)}),zd=computed(()=>keysOf(Yd.value).reduce((Pf,$f)=>{const Nh=Yd.value[$f];return Nh!=null&&Nh.length&&(Pf[$f]=Nh[0]),Pf},{})),qd=computed(()=>wd.value.reduce((Pf,$f)=>(Pf[toValue$2($f.path)]={name:toValue$2($f.path)||"",label:$f.label||""},Pf),{})),Wd=computed(()=>wd.value.reduce((Pf,$f)=>{var Nh;return Pf[toValue$2($f.path)]=(Nh=$f.bails)!==null&&Nh!==void 0?Nh:!0,Pf},{})),Xd=Object.assign({},(Ra==null?void 0:Ra.initialErrors)||{}),Jd=(ed=Ra==null?void 0:Ra.keepValuesOnUnmount)!==null&&ed!==void 0?ed:!1,{initialValues:Zd,originalInitialValues:mf,setInitialValues:xf}=useFormInitialValues(wd,Cd,Ra),_f=useFormMeta(wd,Cd,mf,zd),vf=computed(()=>wd.value.reduce((Pf,$f)=>{const Nh=getFromPath(Cd,toValue$2($f.path));return setInPath(Pf,toValue$2($f.path),Nh),Pf},{})),gf=Ra==null?void 0:Ra.validationSchema;function Af(Pf,$f){var Nh,Wh;const _m=computed(()=>getFromPath(Zd.value,toValue$2(Pf))),$m=Ld.value[toValue$2(Pf)],Ym=($f==null?void 0:$f.type)==="checkbox"||($f==null?void 0:$f.type)==="radio";if($m&&Ym){$m.multiple=!0;const p_=hd++;return Array.isArray($m.id)?$m.id.push(p_):$m.id=[$m.id,p_],$m.fieldsCount++,$m.__flags.pendingUnmount[p_]=!1,$m}const Ag=computed(()=>getFromPath(Cd,toValue$2(Pf))),sg=toValue$2(Pf),mg=Sh.findIndex(p_=>p_===sg);mg!==-1&&Sh.splice(mg,1);const vg=computed(()=>{var p_,l_,v_,r_;const O_=toValue$2(gf);if(isTypedSchema(O_))return(l_=(p_=O_.describe)===null||p_===void 0?void 0:p_.call(O_,toValue$2(Pf)).required)!==null&&l_!==void 0?l_:!1;const S_=toValue$2($f==null?void 0:$f.schema);return isTypedSchema(S_)&&(r_=(v_=S_.describe)===null||v_===void 0?void 0:v_.call(S_).required)!==null&&r_!==void 0?r_:!1}),kg=hd++,Kg=reactive({id:kg,path:Pf,touched:!1,pending:!1,valid:!0,validated:!!(!((Nh=Xd[sg])===null||Nh===void 0)&&Nh.length),required:vg,initialValue:_m,errors:shallowRef([]),bails:(Wh=$f==null?void 0:$f.bails)!==null&&Wh!==void 0?Wh:!1,label:$f==null?void 0:$f.label,type:($f==null?void 0:$f.type)||"default",value:Ag,multiple:!1,__flags:{pendingUnmount:{[kg]:!1},pendingReset:!1},fieldsCount:1,validate:$f==null?void 0:$f.validate,dirty:computed(()=>!isEqual(unref(Ag),unref(_m)))});return wd.value.push(Kg),Ld.value[sg]=Kg,Ud(),zd.value[sg]&&!Xd[sg]&&nextTick$1(()=>{Ih(sg,{mode:"silent"})}),isRef(Pf)&&watch(Pf,p_=>{Ud();const l_=klona(Ag.value);Ld.value[p_]=Kg,nextTick$1(()=>{setInPath(Cd,p_,l_)})}),Kg}const Df=debounceAsync(Im,5),Of=debounceAsync(Im,5),Cf=withLatest(async Pf=>await(Pf==="silent"?Df():Of()),(Pf,[$f])=>{const Nh=keysOf(kf.errorBag.value),_m=[...new Set([...keysOf(Pf.results),...wd.value.map($m=>$m.path),...Nh])].sort().reduce(($m,Ym)=>{var Ag;const sg=Ym,mg=Ff(sg)||sh(sg),vg=((Ag=Pf.results[sg])===null||Ag===void 0?void 0:Ag.errors)||[],kg=toValue$2(mg==null?void 0:mg.path)||sg,Kg=mergeValidationResults({errors:vg,valid:!vg.length},$m.results[kg]);return $m.results[kg]=Kg,Kg.valid||($m.errors[kg]=Kg.errors[0]),mg&&Nd.value[kg]&&delete Nd.value[kg],mg?(mg.valid=Kg.valid,$f==="silent"||$f==="validated-only"&&!mg.validated||jd(mg,Kg.errors),$m):(jd(kg,vg),$m)},{valid:Pf.valid,results:{},errors:{},source:Pf.source});return Pf.values&&(_m.values=Pf.values,_m.source=Pf.source),keysOf(_m.results).forEach($m=>{var Ym;const Ag=Ff($m);Ag&&$f!=="silent"&&($f==="validated-only"&&!Ag.validated||jd(Ag,(Ym=_m.results[$m])===null||Ym===void 0?void 0:Ym.errors))}),_m});function If(Pf){wd.value.forEach(Pf)}function Ff(Pf){const $f=typeof Pf=="string"?normalizeFormPath(Pf):Pf;return typeof $f=="string"?Ld.value[$f]:$f}function sh(Pf){return wd.value.filter(Nh=>Pf.startsWith(toValue$2(Nh.path))).reduce((Nh,Wh)=>Nh?Wh.path.length>Nh.path.length?Wh:Nh:Wh,void 0)}let Sh=[],yh;function Mh(Pf){return Sh.push(Pf),yh||(yh=nextTick$1(()=>{[...Sh].sort().reverse().forEach(Nh=>{unsetPath(Cd,Nh)}),Sh=[],yh=null})),yh}function lh(Pf){return function(Nh,Wh){return function($m){return $m instanceof Event&&($m.preventDefault(),$m.stopPropagation()),If(Ym=>Ym.touched=!0),md.value=!0,yd.value++,Lh().then(Ym=>{const Ag=klona(Cd);if(Ym.valid&&typeof Nh=="function"){const sg=klona(vf.value);let mg=Pf?sg:Ag;return Ym.values&&(mg=Ym.source==="schema"?Ym.values:Object.assign({},mg,Ym.values)),Nh(mg,{evt:$m,controlledValues:sg,setErrors:Gd,setFieldError:jd,setTouched:$h,setFieldTouched:th,setValues:Ph,setFieldValue:Rf,resetForm:nh,resetField:Vf})}!Ym.valid&&typeof Wh=="function"&&Wh({values:Ag,evt:$m,errors:Ym.errors,results:Ym.results})}).then(Ym=>(md.value=!1,Ym),Ym=>{throw md.value=!1,Ym})}}}const mh=lh(!1);mh.withControlled=lh(!0);function xh(Pf,$f){const Nh=wd.value.findIndex(_m=>_m.path===Pf&&(Array.isArray(_m.id)?_m.id.includes($f):_m.id===$f)),Wh=wd.value[Nh];if(!(Nh===-1||!Wh)){if(nextTick$1(()=>{Ih(Pf,{mode:"silent",warn:!1})}),Wh.multiple&&Wh.fieldsCount&&Wh.fieldsCount--,Array.isArray(Wh.id)){const _m=Wh.id.indexOf($f);_m>=0&&Wh.id.splice(_m,1),delete Wh.__flags.pendingUnmount[$f]}(!Wh.multiple||Wh.fieldsCount<=0)&&(wd.value.splice(Nh,1),om(Pf),Ud(),delete Ld.value[Pf])}}function Eh(Pf){keysOf(Ld.value).forEach($f=>{$f.startsWith(Pf)&&delete Ld.value[$f]}),wd.value=wd.value.filter($f=>!$f.path.startsWith(Pf)),nextTick$1(()=>{Ud()})}const kf={name:dd,formId:ud,values:Cd,controlledValues:vf,errorBag:Yd,errors:zd,schema:gf,submitCount:yd,meta:_f,isSubmitting:md,isValidating:gd,fieldArrays:vd,keepValuesOnUnmount:Jd,validateSchema:unref(gf)?Cf:void 0,validate:Lh,setFieldError:jd,validateField:Ih,setFieldValue:Rf,setValues:Ph,setErrors:Gd,setFieldTouched:th,setTouched:$h,resetForm:nh,resetField:Vf,handleSubmit:mh,useFieldModel:Wm,defineInputBinds:ig,defineComponentBinds:yg,defineField:Lm,stageInitialValue:zh,unsetInitialValue:om,setFieldInitialValue:Om,createPathState:Af,getPathState:Ff,unsetPathValue:Mh,removePathState:xh,initialValues:Zd,getAllPathStates:()=>wd.value,destroyPath:Eh,isFieldTouched:oh,isFieldDirty:Zh,isFieldValid:Sm};function Rf(Pf,$f,Nh=!0){const Wh=klona($f),_m=typeof Pf=="string"?Pf:Pf.path;Ff(_m)||Af(_m),setInPath(Cd,_m,Wh),Nh&&Ih(_m)}function _h(Pf,$f=!0){keysOf(Cd).forEach(Nh=>{delete Cd[Nh]}),keysOf(Pf).forEach(Nh=>{Rf(Nh,Pf[Nh],!1)}),$f&&Lh()}function Ph(Pf,$f=!0){merge$3(Cd,Pf),vd.forEach(Nh=>Nh&&Nh.reset()),$f&&Lh()}function sm(Pf,$f){const Nh=Ff(toValue$2(Pf))||Af(Pf);return computed({get(){return Nh.value},set(Wh){var _m;const $m=toValue$2(Pf);Rf($m,Wh,(_m=toValue$2($f))!==null&&_m!==void 0?_m:!1)}})}function th(Pf,$f){const Nh=Ff(Pf);Nh&&(Nh.touched=$f)}function oh(Pf){const $f=Ff(Pf);return $f?$f.touched:wd.value.filter(Nh=>Nh.path.startsWith(Pf)).some(Nh=>Nh.touched)}function Zh(Pf){const $f=Ff(Pf);return $f?$f.dirty:wd.value.filter(Nh=>Nh.path.startsWith(Pf)).some(Nh=>Nh.dirty)}function Sm(Pf){const $f=Ff(Pf);return $f?$f.valid:wd.value.filter(Nh=>Nh.path.startsWith(Pf)).every(Nh=>Nh.valid)}function $h(Pf){if(typeof Pf=="boolean"){If($f=>{$f.touched=Pf});return}keysOf(Pf).forEach($f=>{th($f,!!Pf[$f])})}function Vf(Pf,$f){var Nh;const Wh=$f&&"value"in $f?$f.value:getFromPath(Zd.value,Pf),_m=Ff(Pf);_m&&(_m.__flags.pendingReset=!0),Om(Pf,klona(Wh),!0),Rf(Pf,Wh,!1),th(Pf,(Nh=$f==null?void 0:$f.touched)!==null&&Nh!==void 0?Nh:!1),jd(Pf,($f==null?void 0:$f.errors)||[]),nextTick$1(()=>{_m&&(_m.__flags.pendingReset=!1)})}function nh(Pf,$f){let Nh=klona(Pf!=null&&Pf.values?Pf.values:mf.value);Nh=$f!=null&&$f.force?Nh:merge$3(mf.value,Nh),Nh=isTypedSchema(gf)&&isCallable(gf.cast)?gf.cast(Nh):Nh,xf(Nh,{force:$f==null?void 0:$f.force}),If(Wh=>{var _m;Wh.__flags.pendingReset=!0,Wh.validated=!1,Wh.touched=((_m=Pf==null?void 0:Pf.touched)===null||_m===void 0?void 0:_m[toValue$2(Wh.path)])||!1,Rf(toValue$2(Wh.path),getFromPath(Nh,toValue$2(Wh.path)),!1),jd(toValue$2(Wh.path),void 0)}),$f!=null&&$f.force?_h(Nh,!1):Ph(Nh,!1),Gd((Pf==null?void 0:Pf.errors)||{}),yd.value=(Pf==null?void 0:Pf.submitCount)||0,nextTick$1(()=>{Lh({mode:"silent"}),If(Wh=>{Wh.__flags.pendingReset=!1})})}async function Lh(Pf){const $f=(Pf==null?void 0:Pf.mode)||"force";if($f==="force"&&If(Ym=>Ym.validated=!0),kf.validateSchema)return kf.validateSchema($f);gd.value=!0;const Nh=await Promise.all(wd.value.map(Ym=>Ym.validate?Ym.validate(Pf).then(Ag=>({key:toValue$2(Ym.path),valid:Ag.valid,errors:Ag.errors,value:Ag.value})):Promise.resolve({key:toValue$2(Ym.path),valid:!0,errors:[],value:void 0})));gd.value=!1;const Wh={},_m={},$m={};for(const Ym of Nh)Wh[Ym.key]={valid:Ym.valid,errors:Ym.errors},Ym.value&&setInPath($m,Ym.key,Ym.value),Ym.errors.length&&(_m[Ym.key]=Ym.errors[0]);return{valid:Nh.every(Ym=>Ym.valid),results:Wh,errors:_m,values:$m,source:"fields"}}async function Ih(Pf,$f){var Nh;const Wh=Ff(Pf);if(Wh&&($f==null?void 0:$f.mode)!=="silent"&&(Wh.validated=!0),gf){const{results:_m}=await Cf(($f==null?void 0:$f.mode)||"validated-only");return _m[Pf]||{errors:[],valid:!0}}return Wh!=null&&Wh.validate?Wh.validate($f):(!Wh&&(Nh=$f==null?void 0:$f.warn),Promise.resolve({errors:[],valid:!0}))}function om(Pf){unsetPath(Zd.value,Pf)}function zh(Pf,$f,Nh=!1){Om(Pf,$f),setInPath(Cd,Pf,$f),Nh&&!(Ra!=null&&Ra.initialValues)&&setInPath(mf.value,Pf,klona($f))}function Om(Pf,$f,Nh=!1){setInPath(Zd.value,Pf,klona($f)),Nh&&setInPath(mf.value,Pf,klona($f))}async function Im(){const Pf=unref(gf);if(!Pf)return{valid:!0,results:{},errors:{},source:"none"};gd.value=!0;const $f=isYupValidator(Pf)||isTypedSchema(Pf)?await validateTypedSchema(Pf,Cd):await validateObjectSchema(Pf,Cd,{names:qd.value,bailsMap:Wd.value});return gd.value=!1,$f}const Zm=mh((Pf,{evt:$f})=>{isFormSubmitEvent($f)&&$f.target.submit()});onMounted(()=>{if(Ra!=null&&Ra.initialErrors&&Gd(Ra.initialErrors),Ra!=null&&Ra.initialTouched&&$h(Ra.initialTouched),Ra!=null&&Ra.validateOnMount){Lh();return}kf.validateSchema&&kf.validateSchema("silent")}),isRef(gf)&&watch(gf,()=>{var Pf;(Pf=kf.validateSchema)===null||Pf===void 0||Pf.call(kf,"validated-only")}),provide(FormContextKey,kf);function Lm(Pf,$f){const Nh=isCallable($f)||$f==null?void 0:$f.label,Wh=Ff(toValue$2(Pf))||Af(Pf,{label:Nh}),_m=()=>isCallable($f)?$f(omit(Wh,PRIVATE_PATH_STATE_KEYS)):$f||{};function $m(){var vg;Wh.touched=!0,((vg=_m().validateOnBlur)!==null&&vg!==void 0?vg:getConfig$1().validateOnBlur)&&Ih(toValue$2(Wh.path))}function Ym(){var vg;((vg=_m().validateOnInput)!==null&&vg!==void 0?vg:getConfig$1().validateOnInput)&&nextTick$1(()=>{Ih(toValue$2(Wh.path))})}function Ag(){var vg;((vg=_m().validateOnChange)!==null&&vg!==void 0?vg:getConfig$1().validateOnChange)&&nextTick$1(()=>{Ih(toValue$2(Wh.path))})}const sg=computed(()=>{const vg={onChange:Ag,onInput:Ym,onBlur:$m};return isCallable($f)?Object.assign(Object.assign({},vg),$f(omit(Wh,PRIVATE_PATH_STATE_KEYS)).props||{}):$f!=null&&$f.props?Object.assign(Object.assign({},vg),$f.props(omit(Wh,PRIVATE_PATH_STATE_KEYS))):vg});return[sm(Pf,()=>{var vg,kg,Kg;return(Kg=(vg=_m().validateOnModelUpdate)!==null&&vg!==void 0?vg:(kg=getConfig$1())===null||kg===void 0?void 0:kg.validateOnModelUpdate)!==null&&Kg!==void 0?Kg:!0}),sg]}function Wm(Pf){return Array.isArray(Pf)?Pf.map($f=>sm($f,!0)):sm(Pf)}function ig(Pf,$f){const[Nh,Wh]=Lm(Pf,$f);function _m(){Wh.value.onBlur()}function $m(Ag){const sg=normalizeEventValue(Ag);Rf(toValue$2(Pf),sg,!1),Wh.value.onInput()}function Ym(Ag){const sg=normalizeEventValue(Ag);Rf(toValue$2(Pf),sg,!1),Wh.value.onChange()}return computed(()=>Object.assign(Object.assign({},Wh.value),{onBlur:_m,onInput:$m,onChange:Ym,value:Nh.value}))}function yg(Pf,$f){const[Nh,Wh]=Lm(Pf,$f),_m=Ff(toValue$2(Pf));function $m(Ym){Nh.value=Ym}return computed(()=>{const Ym=isCallable($f)?$f(omit(_m,PRIVATE_PATH_STATE_KEYS)):$f||{};return Object.assign({[Ym.model||"modelValue"]:Nh.value,[`onUpdate:${Ym.model||"modelValue"}`]:$m},Wh.value)})}const jh=Object.assign(Object.assign({},kf),{values:readonly(Cd),handleReset:()=>nh(),submitForm:Zm});return provide(PublicFormContextKey,jh),jh}function useFormMeta(Ra,ed,ud,dd){const hd={touched:"some",pending:"some",valid:"every"},md=computed(()=>!isEqual(ed,unref(ud)));function gd(){const vd=Ra.value;return keysOf(hd).reduce((Cd,wd)=>{const Nd=hd[wd];return Cd[wd]=vd[Nd](Ld=>Ld[wd]),Cd},{})}const yd=reactive(gd());return watchEffect(()=>{const vd=gd();yd.touched=vd.touched,yd.valid=vd.valid,yd.pending=vd.pending}),computed(()=>Object.assign(Object.assign({initialValues:unref(ud)},yd),{valid:yd.valid&&!keysOf(dd.value).length,dirty:md.value}))}function useFormInitialValues(Ra,ed,ud){const dd=resolveInitialValues(ud),hd=ref$1(dd),md=ref$1(klona(dd));function gd(yd,vd){vd!=null&&vd.force?(hd.value=klona(yd),md.value=klona(yd)):(hd.value=merge$3(klona(hd.value)||{},klona(yd)),md.value=merge$3(klona(md.value)||{},klona(yd))),vd!=null&&vd.updateFields&&Ra.value.forEach(Cd=>{if(Cd.touched)return;const Nd=getFromPath(hd.value,toValue$2(Cd.path));setInPath(ed,toValue$2(Cd.path),klona(Nd))})}return{initialValues:hd,originalInitialValues:md,setInitialValues:gd}}function mergeValidationResults(Ra,ed){return ed?{valid:Ra.valid&&ed.valid,errors:[...Ra.errors,...ed.errors]}:Ra}const FormImpl=defineComponent({name:"Form",inheritAttrs:!1,props:{as:{type:null,default:"form"},validationSchema:{type:Object,default:void 0},initialValues:{type:Object,default:void 0},initialErrors:{type:Object,default:void 0},initialTouched:{type:Object,default:void 0},validateOnMount:{type:Boolean,default:!1},onSubmit:{type:Function,default:void 0},onInvalidSubmit:{type:Function,default:void 0},keepValues:{type:Boolean,default:!1},name:{type:String,default:"Form"}},setup(Ra,ed){const ud=toRef$1(Ra,"validationSchema"),dd=toRef$1(Ra,"keepValues"),{errors:hd,errorBag:md,values:gd,meta:yd,isSubmitting:vd,isValidating:Cd,submitCount:wd,controlledValues:Nd,validate:Ld,validateField:Ud,handleReset:jd,resetForm:Gd,handleSubmit:Yd,setErrors:zd,setFieldError:qd,setFieldValue:Wd,setValues:Xd,setFieldTouched:Jd,setTouched:Zd,resetField:mf}=useForm({validationSchema:ud.value?ud:void 0,initialValues:Ra.initialValues,initialErrors:Ra.initialErrors,initialTouched:Ra.initialTouched,validateOnMount:Ra.validateOnMount,keepValuesOnUnmount:dd,name:Ra.name}),xf=Yd((If,{evt:Ff})=>{isFormSubmitEvent(Ff)&&Ff.target.submit()},Ra.onInvalidSubmit),_f=Ra.onSubmit?Yd(Ra.onSubmit,Ra.onInvalidSubmit):xf;function vf(If){isEvent(If)&&If.preventDefault(),jd(),typeof ed.attrs.onReset=="function"&&ed.attrs.onReset()}function gf(If,Ff){return Yd(typeof If=="function"&&!Ff?If:Ff,Ra.onInvalidSubmit)(If)}function Af(){return klona(gd)}function Df(){return klona(yd.value)}function Of(){return klona(hd.value)}function Cf(){return{meta:yd.value,errors:hd.value,errorBag:md.value,values:gd,isSubmitting:vd.value,isValidating:Cd.value,submitCount:wd.value,controlledValues:Nd.value,validate:Ld,validateField:Ud,handleSubmit:gf,handleReset:jd,submitForm:xf,setErrors:zd,setFieldError:qd,setFieldValue:Wd,setValues:Xd,setFieldTouched:Jd,setTouched:Zd,resetForm:Gd,resetField:mf,getValues:Af,getMeta:Df,getErrors:Of}}return ed.expose({setFieldError:qd,setErrors:zd,setFieldValue:Wd,setValues:Xd,setFieldTouched:Jd,setTouched:Zd,resetForm:Gd,validate:Ld,validateField:Ud,resetField:mf,getValues:Af,getMeta:Df,getErrors:Of,values:gd,meta:yd,errors:hd}),function(){const Ff=Ra.as==="form"?Ra.as:Ra.as?resolveDynamicComponent(Ra.as):null,sh=normalizeChildren(Ff,ed,Cf);return Ff?h$2(Ff,Object.assign(Object.assign(Object.assign({},Ff==="form"?{novalidate:!0}:{}),ed.attrs),{onSubmit:_f,onReset:vf}),sh):sh}}}),Form=FormImpl;/** * vee-validate v4.15.0 * (c) 2024 Abdelrahman Awad * @license MIT - */const isObject$3=Ra=>Ra!==null&&!!Ra&&typeof Ra=="object"&&!Array.isArray(Ra);function isIndex(Ra){return Number(Ra)>=0}function isObjectLike(Ra){return typeof Ra=="object"&&Ra!==null}function getTag(Ra){return Ra==null?Ra===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(Ra)}function isPlainObject$1(Ra){if(!isObjectLike(Ra)||getTag(Ra)!=="[object Object]")return!1;if(Object.getPrototypeOf(Ra)===null)return!0;let qa=Ra;for(;Object.getPrototypeOf(qa)!==null;)qa=Object.getPrototypeOf(qa);return Object.getPrototypeOf(Ra)===qa}function merge$1(Ra,qa){return Object.keys(qa).forEach(rd=>{if(isPlainObject$1(qa[rd])&&isPlainObject$1(Ra[rd])){Ra[rd]||(Ra[rd]={}),merge$1(Ra[rd],qa[rd]);return}Ra[rd]=qa[rd]}),Ra}function toTypedSchema(Ra,qa={abortEarly:!1}){return{__type:"VVTypedSchema",async parse(sd){var pd;try{return{value:await Ra.validate(sd,Object.assign({},qa)),errors:[]}}catch(fd){const hd=fd;if(hd.name!=="ValidationError")throw fd;if(!(!((pd=hd.inner)===null||pd===void 0)&&pd.length)&&hd.errors.length)return{errors:[{path:hd.path,errors:hd.errors}]};const md=hd.inner.reduce((gd,yd)=>{const vd=yd.path||"";return gd[vd]||(gd[vd]={errors:[],path:vd}),gd[vd].errors.push(...yd.errors),gd},{});return{errors:Object.values(md)}}},cast(sd){try{return Ra.cast(sd)}catch{const fd=Ra.getDefault();return isObject$3(fd)&&isObject$3(sd)?merge$1(fd,sd):sd}},describe(sd){try{if(!sd)return getDescriptionFromYupSpec(Ra.spec);const pd=getSpecForPath(sd,Ra);return pd?getDescriptionFromYupSpec(pd):{required:!1,exists:!1}}catch{return{required:!1,exists:!1}}}}}function getDescriptionFromYupSpec(Ra){return{required:!Ra.optional,exists:!0}}function getSpecForPath(Ra,qa){if(!isObjectSchema(qa))return null;if(isNotNestedPath(Ra)){const pd=qa.fields[cleanupNonNestedPath(Ra)];return(pd==null?void 0:pd.spec)||null}const rd=(Ra||"").split(/\.|\[(\d+)\]/).filter(Boolean);let sd=qa;for(let pd=0;pd=this._maxSize&&this.clear(),Ra in this._values||this._size++,this._values[Ra]=qa};var SPLIT_REGEX=/[^.^\]^[]+|(?=\[\]|\.\.)/g,DIGIT_REGEX=/^\d+$/,LEAD_DIGIT_REGEX=/^\d/,SPEC_CHAR_REGEX=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,CLEAN_QUOTES_REGEX=/^\s*(['"]?)(.*?)(\1)\s*$/,MAX_CACHE_SIZE$1=512,pathCache=new Cache(MAX_CACHE_SIZE$1),setCache=new Cache(MAX_CACHE_SIZE$1),getCache=new Cache(MAX_CACHE_SIZE$1),propertyExpr={Cache,split,normalizePath,setter:function(Ra){var qa=normalizePath(Ra);return setCache.get(Ra)||setCache.set(Ra,function(sd,pd){for(var fd=0,hd=qa.length,md=sd;fdRa.match(reWords)||[],upperFirst=Ra=>Ra[0].toUpperCase()+Ra.slice(1),join=(Ra,qa)=>words(Ra).join(qa).toLowerCase(),camelCase=Ra=>words(Ra).reduce((qa,rd)=>`${qa}${qa?rd[0].toUpperCase()+rd.slice(1).toLowerCase():rd.toLowerCase()}`,""),pascalCase=Ra=>upperFirst(camelCase(Ra)),snakeCase=Ra=>join(Ra,"_"),kebabCase=Ra=>join(Ra,"-"),sentenceCase=Ra=>upperFirst(join(Ra," ")),titleCase=Ra=>words(Ra).map(upperFirst).join(" ");var tinyCase={words,upperFirst,camelCase,pascalCase,snakeCase,kebabCase,sentenceCase,titleCase},toposort$2={exports:{}};toposort$2.exports=function(Ra){return toposort(uniqueNodes(Ra),Ra)};toposort$2.exports.array=toposort;function toposort(Ra,qa){var rd=Ra.length,sd=new Array(rd),pd={},fd=rd,hd=makeOutgoingEdges(qa),md=makeNodesHash(Ra);for(qa.forEach(function(yd){if(!md.has(yd[0])||!md.has(yd[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});fd--;)pd[fd]||gd(Ra[fd],fd,new Set);return sd;function gd(yd,vd,Nd){if(Nd.has(yd)){var Md;try{Md=", node was:"+JSON.stringify(yd)}catch{Md=""}throw new Error("Cyclic dependency"+Md)}if(!md.has(yd))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(yd));if(!pd[vd]){pd[vd]=!0;var Ld=hd.get(yd)||new Set;if(Ld=Array.from(Ld),vd=Ld.length){Nd.add(yd);do{var Fd=Ld[--vd];gd(Fd,md.get(Fd),Nd)}while(vd);Nd.delete(yd)}sd[--rd]=yd}}}function uniqueNodes(Ra){for(var qa=new Set,rd=0,sd=Ra.length;rd"",SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;function printNumber(Ra){return Ra!=+Ra?"NaN":Ra===0&&1/Ra<0?"-0":""+Ra}function printSimpleValue(Ra,qa=!1){if(Ra==null||Ra===!0||Ra===!1)return""+Ra;const rd=typeof Ra;if(rd==="number")return printNumber(Ra);if(rd==="string")return qa?`"${Ra}"`:Ra;if(rd==="function")return"[Function "+(Ra.name||"anonymous")+"]";if(rd==="symbol")return symbolToString.call(Ra).replace(SYMBOL_REGEXP,"Symbol($1)");const sd=toString$2.call(Ra).slice(8,-1);return sd==="Date"?isNaN(Ra.getTime())?""+Ra:Ra.toISOString(Ra):sd==="Error"||Ra instanceof Error?"["+errorToString.call(Ra)+"]":sd==="RegExp"?regExpToString.call(Ra):null}function printValue(Ra,qa){let rd=printSimpleValue(Ra,qa);return rd!==null?rd:JSON.stringify(Ra,function(sd,pd){let fd=printSimpleValue(this[sd],qa);return fd!==null?fd:pd},2)}function toArray$2(Ra){return Ra==null?[]:[].concat(Ra)}let _Symbol$toStringTag,_Symbol$hasInstance,_Symbol$toStringTag2,strReg=/\$\{\s*(\w+)\s*\}/g;_Symbol$toStringTag=Symbol.toStringTag;class ValidationErrorNoStack{constructor(qa,rd,sd,pd){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[_Symbol$toStringTag]="Error",this.name="ValidationError",this.value=rd,this.path=sd,this.type=pd,this.errors=[],this.inner=[],toArray$2(qa).forEach(fd=>{if(ValidationError.isError(fd)){this.errors.push(...fd.errors);const hd=fd.inner.length?fd.inner:[fd];this.inner.push(...hd)}else this.errors.push(fd)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}_Symbol$hasInstance=Symbol.hasInstance;_Symbol$toStringTag2=Symbol.toStringTag;class ValidationError extends Error{static formatError(qa,rd){const sd=rd.label||rd.path||"this";return rd=Object.assign({},rd,{path:sd,originalPath:rd.path}),typeof qa=="string"?qa.replace(strReg,(pd,fd)=>printValue(rd[fd])):typeof qa=="function"?qa(rd):qa}static isError(qa){return qa&&qa.name==="ValidationError"}constructor(qa,rd,sd,pd,fd){const hd=new ValidationErrorNoStack(qa,rd,sd,pd);if(fd)return hd;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[_Symbol$toStringTag2]="Error",this.name=hd.name,this.message=hd.message,this.type=hd.type,this.value=hd.value,this.path=hd.path,this.errors=hd.errors,this.inner=hd.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ValidationError)}static[_Symbol$hasInstance](qa){return ValidationErrorNoStack[Symbol.hasInstance](qa)||super[Symbol.hasInstance](qa)}}let mixed={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:Ra,type:qa,value:rd,originalValue:sd})=>{const pd=sd!=null&&sd!==rd?` (cast from the value \`${printValue(sd,!0)}\`).`:".";return qa!=="mixed"?`${Ra} must be a \`${qa}\` type, but the final value was: \`${printValue(rd,!0)}\``+pd:`${Ra} must match the configured type. The validated value was: \`${printValue(rd,!0)}\``+pd}},string={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},number={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},boolean={isValue:"${path} field must be ${value}"},object={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},array={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},tuple={notType:Ra=>{const{path:qa,value:rd,spec:sd}=Ra,pd=sd.types.length;if(Array.isArray(rd)){if(rd.lengthpd)return`${qa} tuple value has too many items, expected a length of ${pd} but got ${rd.length} for value: \`${printValue(rd,!0)}\``}return ValidationError.formatError(mixed.notType,Ra)}};Object.assign(Object.create(null),{mixed,string,number,date,object,array,boolean,tuple});const isSchema=Ra=>Ra&&Ra.__isYupSchema__;class Condition{static fromOptions(qa,rd){if(!rd.then&&!rd.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:sd,then:pd,otherwise:fd}=rd,hd=typeof sd=="function"?sd:(...md)=>md.every(gd=>gd===sd);return new Condition(qa,(md,gd)=>{var yd;let vd=hd(...md)?pd:fd;return(yd=vd==null?void 0:vd(gd))!=null?yd:gd})}constructor(qa,rd){this.fn=void 0,this.refs=qa,this.refs=qa,this.fn=rd}resolve(qa,rd){let sd=this.refs.map(fd=>fd.getValue(rd==null?void 0:rd.value,rd==null?void 0:rd.parent,rd==null?void 0:rd.context)),pd=this.fn(sd,qa,rd);if(pd===void 0||pd===qa)return qa;if(!isSchema(pd))throw new TypeError("conditions must return a schema object");return pd.resolve(rd)}}const prefixes={context:"$",value:"."};class Reference{constructor(qa,rd={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof qa!="string")throw new TypeError("ref must be a string, got: "+qa);if(this.key=qa.trim(),qa==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===prefixes.context,this.isValue=this.key[0]===prefixes.value,this.isSibling=!this.isContext&&!this.isValue;let sd=this.isContext?prefixes.context:this.isValue?prefixes.value:"";this.path=this.key.slice(sd.length),this.getter=this.path&&propertyExpr.getter(this.path,!0),this.map=rd.map}getValue(qa,rd,sd){let pd=this.isContext?sd:this.isValue?qa:rd;return this.getter&&(pd=this.getter(pd||{})),this.map&&(pd=this.map(pd)),pd}cast(qa,rd){return this.getValue(qa,rd==null?void 0:rd.parent,rd==null?void 0:rd.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(qa){return qa&&qa.__isYupRef}}Reference.prototype.__isYupRef=!0;const isAbsent=Ra=>Ra==null;function createValidation(Ra){function qa({value:rd,path:sd="",options:pd,originalValue:fd,schema:hd},md,gd){const{name:yd,test:vd,params:Nd,message:Md,skipAbsent:Ld}=Ra;let{parent:Fd,context:Hd,abortEarly:Vd=hd.spec.abortEarly,disableStackTrace:Gd=hd.spec.disableStackTrace}=pd;function Ud(_f){return Reference.isRef(_f)?_f.getValue(rd,Fd,Hd):_f}function qd(_f={}){const xf=Object.assign({value:rd,originalValue:fd,label:hd.spec.label,path:_f.path||sd,spec:hd.spec,disableStackTrace:_f.disableStackTrace||Gd},Nd,_f.params);for(const If of Object.keys(xf))xf[If]=Ud(xf[If]);const Cf=new ValidationError(ValidationError.formatError(_f.message||Md,xf),rd,xf.path,_f.type||yd,xf.disableStackTrace);return Cf.params=xf,Cf}const Wd=Vd?md:gd;let Kd={path:sd,parent:Fd,type:yd,from:pd.from,createError:qd,resolve:Ud,options:pd,originalValue:fd,schema:hd};const Xd=_f=>{ValidationError.isError(_f)?Wd(_f):_f?gd(null):Wd(qd())},df=_f=>{ValidationError.isError(_f)?Wd(_f):md(_f)};if(Ld&&isAbsent(rd))return Xd(!0);let pf;try{var mf;if(pf=vd.call(Kd,rd,Kd),typeof((mf=pf)==null?void 0:mf.then)=="function"){if(pd.sync)throw new Error(`Validation test of type: "${Kd.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(pf).then(Xd,df)}}catch(_f){df(_f);return}Xd(pf)}return qa.OPTIONS=Ra,qa}function getIn(Ra,qa,rd,sd=rd){let pd,fd,hd;return qa?(propertyExpr.forEach(qa,(md,gd,yd)=>{let vd=gd?md.slice(1,md.length-1):md;Ra=Ra.resolve({context:sd,parent:pd,value:rd});let Nd=Ra.type==="tuple",Md=yd?parseInt(vd,10):0;if(Ra.innerType||Nd){if(Nd&&!yd)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${hd}" must contain an index to the tuple element, e.g. "${hd}[0]"`);if(rd&&Md>=rd.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${md}, in the path: ${qa}. because there is no value at that index. `);pd=rd,rd=rd&&rd[Md],Ra=Nd?Ra.spec.types[Md]:Ra.innerType}if(!yd){if(!Ra.fields||!Ra.fields[vd])throw new Error(`The schema does not contain the path: ${qa}. (failed at: ${hd} which is a type: "${Ra.type}")`);pd=rd,rd=rd&&rd[vd],Ra=Ra.fields[vd]}fd=vd,hd=gd?"["+md+"]":"."+md}),{schema:Ra,parent:pd,parentPath:fd}):{parent:pd,parentPath:qa,schema:Ra}}class ReferenceSet extends Set{describe(){const qa=[];for(const rd of this.values())qa.push(Reference.isRef(rd)?rd.describe():rd);return qa}resolveAll(qa){let rd=[];for(const sd of this.values())rd.push(qa(sd));return rd}clone(){return new ReferenceSet(this.values())}merge(qa,rd){const sd=this.clone();return qa.forEach(pd=>sd.add(pd)),rd.forEach(pd=>sd.delete(pd)),sd}}function clone(Ra,qa=new Map){if(isSchema(Ra)||!Ra||typeof Ra!="object")return Ra;if(qa.has(Ra))return qa.get(Ra);let rd;if(Ra instanceof Date)rd=new Date(Ra.getTime()),qa.set(Ra,rd);else if(Ra instanceof RegExp)rd=new RegExp(Ra),qa.set(Ra,rd);else if(Array.isArray(Ra)){rd=new Array(Ra.length),qa.set(Ra,rd);for(let sd=0;sd{this.typeError(mixed.notType)}),this.type=qa.type,this._typeCheck=qa.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},qa==null?void 0:qa.spec),this.withMutation(rd=>{rd.nonNullable()})}get _type(){return this.type}clone(qa){if(this._mutate)return qa&&Object.assign(this.spec,qa),this;const rd=Object.create(Object.getPrototypeOf(this));return rd.type=this.type,rd._typeCheck=this._typeCheck,rd._whitelist=this._whitelist.clone(),rd._blacklist=this._blacklist.clone(),rd.internalTests=Object.assign({},this.internalTests),rd.exclusiveTests=Object.assign({},this.exclusiveTests),rd.deps=[...this.deps],rd.conditions=[...this.conditions],rd.tests=[...this.tests],rd.transforms=[...this.transforms],rd.spec=clone(Object.assign({},this.spec,qa)),rd}label(qa){let rd=this.clone();return rd.spec.label=qa,rd}meta(...qa){if(qa.length===0)return this.spec.meta;let rd=this.clone();return rd.spec.meta=Object.assign(rd.spec.meta||{},qa[0]),rd}withMutation(qa){let rd=this._mutate;this._mutate=!0;let sd=qa(this);return this._mutate=rd,sd}concat(qa){if(!qa||qa===this)return this;if(qa.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${qa.type}`);let rd=this,sd=qa.clone();const pd=Object.assign({},rd.spec,sd.spec);return sd.spec=pd,sd.internalTests=Object.assign({},rd.internalTests,sd.internalTests),sd._whitelist=rd._whitelist.merge(qa._whitelist,qa._blacklist),sd._blacklist=rd._blacklist.merge(qa._blacklist,qa._whitelist),sd.tests=rd.tests,sd.exclusiveTests=rd.exclusiveTests,sd.withMutation(fd=>{qa.tests.forEach(hd=>{fd.test(hd.OPTIONS)})}),sd.transforms=[...rd.transforms,...sd.transforms],sd}isType(qa){return qa==null?!!(this.spec.nullable&&qa===null||this.spec.optional&&qa===void 0):this._typeCheck(qa)}resolve(qa){let rd=this;if(rd.conditions.length){let sd=rd.conditions;rd=rd.clone(),rd.conditions=[],rd=sd.reduce((pd,fd)=>fd.resolve(pd,qa),rd),rd=rd.resolve(qa)}return rd}resolveOptions(qa){var rd,sd,pd,fd;return Object.assign({},qa,{from:qa.from||[],strict:(rd=qa.strict)!=null?rd:this.spec.strict,abortEarly:(sd=qa.abortEarly)!=null?sd:this.spec.abortEarly,recursive:(pd=qa.recursive)!=null?pd:this.spec.recursive,disableStackTrace:(fd=qa.disableStackTrace)!=null?fd:this.spec.disableStackTrace})}cast(qa,rd={}){let sd=this.resolve(Object.assign({value:qa},rd)),pd=rd.assert==="ignore-optionality",fd=sd._cast(qa,rd);if(rd.assert!==!1&&!sd.isType(fd)){if(pd&&isAbsent(fd))return fd;let hd=printValue(qa),md=printValue(fd);throw new TypeError(`The value of ${rd.path||"field"} could not be cast to a value that satisfies the schema type: "${sd.type}". - -attempted value: ${hd} -`+(md!==hd?`result of cast: ${md}`:""))}return fd}_cast(qa,rd){let sd=qa===void 0?qa:this.transforms.reduce((pd,fd)=>fd.call(this,pd,qa,this),qa);return sd===void 0&&(sd=this.getDefault(rd)),sd}_validate(qa,rd={},sd,pd){let{path:fd,originalValue:hd=qa,strict:md=this.spec.strict}=rd,gd=qa;md||(gd=this._cast(gd,Object.assign({assert:!1},rd)));let yd=[];for(let vd of Object.values(this.internalTests))vd&&yd.push(vd);this.runTests({path:fd,value:gd,originalValue:hd,options:rd,tests:yd},sd,vd=>{if(vd.length)return pd(vd,gd);this.runTests({path:fd,value:gd,originalValue:hd,options:rd,tests:this.tests},sd,pd)})}runTests(qa,rd,sd){let pd=!1,{tests:fd,value:hd,originalValue:md,path:gd,options:yd}=qa,vd=Hd=>{pd||(pd=!0,rd(Hd,hd))},Nd=Hd=>{pd||(pd=!0,sd(Hd,hd))},Md=fd.length,Ld=[];if(!Md)return Nd([]);let Fd={value:hd,originalValue:md,path:gd,options:yd,schema:this};for(let Hd=0;Hdthis.resolve(vd)._validate(yd,vd,Md,Ld)}validate(qa,rd){var sd;let pd=this.resolve(Object.assign({},rd,{value:qa})),fd=(sd=rd==null?void 0:rd.disableStackTrace)!=null?sd:pd.spec.disableStackTrace;return new Promise((hd,md)=>pd._validate(qa,rd,(gd,yd)=>{ValidationError.isError(gd)&&(gd.value=yd),md(gd)},(gd,yd)=>{gd.length?md(new ValidationError(gd,yd,void 0,void 0,fd)):hd(yd)}))}validateSync(qa,rd){var sd;let pd=this.resolve(Object.assign({},rd,{value:qa})),fd,hd=(sd=rd==null?void 0:rd.disableStackTrace)!=null?sd:pd.spec.disableStackTrace;return pd._validate(qa,Object.assign({},rd,{sync:!0}),(md,gd)=>{throw ValidationError.isError(md)&&(md.value=gd),md},(md,gd)=>{if(md.length)throw new ValidationError(md,qa,void 0,void 0,hd);fd=gd}),fd}isValid(qa,rd){return this.validate(qa,rd).then(()=>!0,sd=>{if(ValidationError.isError(sd))return!1;throw sd})}isValidSync(qa,rd){try{return this.validateSync(qa,rd),!0}catch(sd){if(ValidationError.isError(sd))return!1;throw sd}}_getDefault(qa){let rd=this.spec.default;return rd==null?rd:typeof rd=="function"?rd.call(this,qa):clone(rd)}getDefault(qa){return this.resolve(qa||{})._getDefault(qa)}default(qa){return arguments.length===0?this._getDefault():this.clone({default:qa})}strict(qa=!0){return this.clone({strict:qa})}nullability(qa,rd){const sd=this.clone({nullable:qa});return sd.internalTests.nullable=createValidation({message:rd,name:"nullable",test(pd){return pd===null?this.schema.spec.nullable:!0}}),sd}optionality(qa,rd){const sd=this.clone({optional:qa});return sd.internalTests.optionality=createValidation({message:rd,name:"optionality",test(pd){return pd===void 0?this.schema.spec.optional:!0}}),sd}optional(){return this.optionality(!0)}defined(qa=mixed.defined){return this.optionality(!1,qa)}nullable(){return this.nullability(!0)}nonNullable(qa=mixed.notNull){return this.nullability(!1,qa)}required(qa=mixed.required){return this.clone().withMutation(rd=>rd.nonNullable(qa).defined(qa))}notRequired(){return this.clone().withMutation(qa=>qa.nullable().optional())}transform(qa){let rd=this.clone();return rd.transforms.push(qa),rd}test(...qa){let rd;if(qa.length===1?typeof qa[0]=="function"?rd={test:qa[0]}:rd=qa[0]:qa.length===2?rd={name:qa[0],test:qa[1]}:rd={name:qa[0],message:qa[1],test:qa[2]},rd.message===void 0&&(rd.message=mixed.default),typeof rd.test!="function")throw new TypeError("`test` is a required parameters");let sd=this.clone(),pd=createValidation(rd),fd=rd.exclusive||rd.name&&sd.exclusiveTests[rd.name]===!0;if(rd.exclusive&&!rd.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return rd.name&&(sd.exclusiveTests[rd.name]=!!rd.exclusive),sd.tests=sd.tests.filter(hd=>!(hd.OPTIONS.name===rd.name&&(fd||hd.OPTIONS.test===pd.OPTIONS.test))),sd.tests.push(pd),sd}when(qa,rd){!Array.isArray(qa)&&typeof qa!="string"&&(rd=qa,qa=".");let sd=this.clone(),pd=toArray$2(qa).map(fd=>new Reference(fd));return pd.forEach(fd=>{fd.isSibling&&sd.deps.push(fd.key)}),sd.conditions.push(typeof rd=="function"?new Condition(pd,rd):Condition.fromOptions(pd,rd)),sd}typeError(qa){let rd=this.clone();return rd.internalTests.typeError=createValidation({message:qa,name:"typeError",skipAbsent:!0,test(sd){return this.schema._typeCheck(sd)?!0:this.createError({params:{type:this.schema.type}})}}),rd}oneOf(qa,rd=mixed.oneOf){let sd=this.clone();return qa.forEach(pd=>{sd._whitelist.add(pd),sd._blacklist.delete(pd)}),sd.internalTests.whiteList=createValidation({message:rd,name:"oneOf",skipAbsent:!0,test(pd){let fd=this.schema._whitelist,hd=fd.resolveAll(this.resolve);return hd.includes(pd)?!0:this.createError({params:{values:Array.from(fd).join(", "),resolved:hd}})}}),sd}notOneOf(qa,rd=mixed.notOneOf){let sd=this.clone();return qa.forEach(pd=>{sd._blacklist.add(pd),sd._whitelist.delete(pd)}),sd.internalTests.blacklist=createValidation({message:rd,name:"notOneOf",test(pd){let fd=this.schema._blacklist,hd=fd.resolveAll(this.resolve);return hd.includes(pd)?this.createError({params:{values:Array.from(fd).join(", "),resolved:hd}}):!0}}),sd}strip(qa=!0){let rd=this.clone();return rd.spec.strip=qa,rd}describe(qa){const rd=(qa?this.resolve(qa):this).clone(),{label:sd,meta:pd,optional:fd,nullable:hd}=rd.spec;return{meta:pd,label:sd,optional:fd,nullable:hd,default:rd.getDefault(qa),type:rd.type,oneOf:rd._whitelist.describe(),notOneOf:rd._blacklist.describe(),tests:rd.tests.map(gd=>({name:gd.OPTIONS.name,params:gd.OPTIONS.params})).filter((gd,yd,vd)=>vd.findIndex(Nd=>Nd.name===gd.name)===yd)}}}Schema.prototype.__isYupSchema__=!0;for(const Ra of["validate","validateSync"])Schema.prototype[`${Ra}At`]=function(qa,rd,sd={}){const{parent:pd,parentPath:fd,schema:hd}=getIn(this,qa,rd,sd.context);return hd[Ra](pd&&pd[fd],Object.assign({},sd,{parent:pd,path:qa}))};for(const Ra of["equals","is"])Schema.prototype[Ra]=Schema.prototype.oneOf;for(const Ra of["not","nope"])Schema.prototype[Ra]=Schema.prototype.notOneOf;function create$7(){return new BooleanSchema}class BooleanSchema extends Schema{constructor(){super({type:"boolean",check(qa){return qa instanceof Boolean&&(qa=qa.valueOf()),typeof qa=="boolean"}}),this.withMutation(()=>{this.transform((qa,rd,sd)=>{if(sd.spec.coerce&&!sd.isType(qa)){if(/^(true|1)$/i.test(String(qa)))return!0;if(/^(false|0)$/i.test(String(qa)))return!1}return qa})})}isTrue(qa=boolean.isValue){return this.test({message:qa,name:"is-value",exclusive:!0,params:{value:"true"},test(rd){return isAbsent(rd)||rd===!0}})}isFalse(qa=boolean.isValue){return this.test({message:qa,name:"is-value",exclusive:!0,params:{value:"false"},test(rd){return isAbsent(rd)||rd===!1}})}default(qa){return super.default(qa)}defined(qa){return super.defined(qa)}optional(){return super.optional()}required(qa){return super.required(qa)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(qa){return super.nonNullable(qa)}strip(qa){return super.strip(qa)}}create$7.prototype=BooleanSchema.prototype;const isoReg=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function parseIsoDate(Ra){const qa=parseDateStruct(Ra);if(!qa)return Date.parse?Date.parse(Ra):Number.NaN;if(qa.z===void 0&&qa.plusMinus===void 0)return new Date(qa.year,qa.month,qa.day,qa.hour,qa.minute,qa.second,qa.millisecond).valueOf();let rd=0;return qa.z!=="Z"&&qa.plusMinus!==void 0&&(rd=qa.hourOffset*60+qa.minuteOffset,qa.plusMinus==="+"&&(rd=0-rd)),Date.UTC(qa.year,qa.month,qa.day,qa.hour,qa.minute+rd,qa.second,qa.millisecond)}function parseDateStruct(Ra){var qa,rd;const sd=isoReg.exec(Ra);return sd?{year:toNumber$2(sd[1]),month:toNumber$2(sd[2],1)-1,day:toNumber$2(sd[3],1),hour:toNumber$2(sd[4]),minute:toNumber$2(sd[5]),second:toNumber$2(sd[6]),millisecond:sd[7]?toNumber$2(sd[7].substring(0,3)):0,precision:(qa=(rd=sd[7])==null?void 0:rd.length)!=null?qa:void 0,z:sd[8]||void 0,plusMinus:sd[9]||void 0,hourOffset:toNumber$2(sd[10]),minuteOffset:toNumber$2(sd[11])}:null}function toNumber$2(Ra,qa=0){return Number(Ra)||qa}let rEmail=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rUrl=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,rUUID=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,yearMonthDay="^\\d{4}-\\d{2}-\\d{2}",hourMinuteSecond="\\d{2}:\\d{2}:\\d{2}",zOrOffset="(([+-]\\d{2}(:?\\d{2})?)|Z)",rIsoDateTime=new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\.\\d+)?${zOrOffset}$`),isTrimmed=Ra=>isAbsent(Ra)||Ra===Ra.trim(),objStringTag={}.toString();function create$6(){return new StringSchema}class StringSchema extends Schema{constructor(){super({type:"string",check(qa){return qa instanceof String&&(qa=qa.valueOf()),typeof qa=="string"}}),this.withMutation(()=>{this.transform((qa,rd,sd)=>{if(!sd.spec.coerce||sd.isType(qa)||Array.isArray(qa))return qa;const pd=qa!=null&&qa.toString?qa.toString():qa;return pd===objStringTag?qa:pd})})}required(qa){return super.required(qa).withMutation(rd=>rd.test({message:qa||mixed.required,name:"required",skipAbsent:!0,test:sd=>!!sd.length}))}notRequired(){return super.notRequired().withMutation(qa=>(qa.tests=qa.tests.filter(rd=>rd.OPTIONS.name!=="required"),qa))}length(qa,rd=string.length){return this.test({message:rd,name:"length",exclusive:!0,params:{length:qa},skipAbsent:!0,test(sd){return sd.length===this.resolve(qa)}})}min(qa,rd=string.min){return this.test({message:rd,name:"min",exclusive:!0,params:{min:qa},skipAbsent:!0,test(sd){return sd.length>=this.resolve(qa)}})}max(qa,rd=string.max){return this.test({name:"max",exclusive:!0,message:rd,params:{max:qa},skipAbsent:!0,test(sd){return sd.length<=this.resolve(qa)}})}matches(qa,rd){let sd=!1,pd,fd;return rd&&(typeof rd=="object"?{excludeEmptyString:sd=!1,message:pd,name:fd}=rd:pd=rd),this.test({name:fd||"matches",message:pd||string.matches,params:{regex:qa},skipAbsent:!0,test:hd=>hd===""&&sd||hd.search(qa)!==-1})}email(qa=string.email){return this.matches(rEmail,{name:"email",message:qa,excludeEmptyString:!0})}url(qa=string.url){return this.matches(rUrl,{name:"url",message:qa,excludeEmptyString:!0})}uuid(qa=string.uuid){return this.matches(rUUID,{name:"uuid",message:qa,excludeEmptyString:!1})}datetime(qa){let rd="",sd,pd;return qa&&(typeof qa=="object"?{message:rd="",allowOffset:sd=!1,precision:pd=void 0}=qa:rd=qa),this.matches(rIsoDateTime,{name:"datetime",message:rd||string.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:rd||string.datetime_offset,params:{allowOffset:sd},skipAbsent:!0,test:fd=>{if(!fd||sd)return!0;const hd=parseDateStruct(fd);return hd?!!hd.z:!1}}).test({name:"datetime_precision",message:rd||string.datetime_precision,params:{precision:pd},skipAbsent:!0,test:fd=>{if(!fd||pd==null)return!0;const hd=parseDateStruct(fd);return hd?hd.precision===pd:!1}})}ensure(){return this.default("").transform(qa=>qa===null?"":qa)}trim(qa=string.trim){return this.transform(rd=>rd!=null?rd.trim():rd).test({message:qa,name:"trim",test:isTrimmed})}lowercase(qa=string.lowercase){return this.transform(rd=>isAbsent(rd)?rd:rd.toLowerCase()).test({message:qa,name:"string_case",exclusive:!0,skipAbsent:!0,test:rd=>isAbsent(rd)||rd===rd.toLowerCase()})}uppercase(qa=string.uppercase){return this.transform(rd=>isAbsent(rd)?rd:rd.toUpperCase()).test({message:qa,name:"string_case",exclusive:!0,skipAbsent:!0,test:rd=>isAbsent(rd)||rd===rd.toUpperCase()})}}create$6.prototype=StringSchema.prototype;let invalidDate=new Date(""),isDate$1=Ra=>Object.prototype.toString.call(Ra)==="[object Date]";class DateSchema extends Schema{constructor(){super({type:"date",check(qa){return isDate$1(qa)&&!isNaN(qa.getTime())}}),this.withMutation(()=>{this.transform((qa,rd,sd)=>!sd.spec.coerce||sd.isType(qa)||qa===null?qa:(qa=parseIsoDate(qa),isNaN(qa)?DateSchema.INVALID_DATE:new Date(qa)))})}prepareParam(qa,rd){let sd;if(Reference.isRef(qa))sd=qa;else{let pd=this.cast(qa);if(!this._typeCheck(pd))throw new TypeError(`\`${rd}\` must be a Date or a value that can be \`cast()\` to a Date`);sd=pd}return sd}min(qa,rd=date.min){let sd=this.prepareParam(qa,"min");return this.test({message:rd,name:"min",exclusive:!0,params:{min:qa},skipAbsent:!0,test(pd){return pd>=this.resolve(sd)}})}max(qa,rd=date.max){let sd=this.prepareParam(qa,"max");return this.test({message:rd,name:"max",exclusive:!0,params:{max:qa},skipAbsent:!0,test(pd){return pd<=this.resolve(sd)}})}}DateSchema.INVALID_DATE=invalidDate;DateSchema.prototype;function sortFields(Ra,qa=[]){let rd=[],sd=new Set,pd=new Set(qa.map(([hd,md])=>`${hd}-${md}`));function fd(hd,md){let gd=propertyExpr.split(hd)[0];sd.add(gd),pd.has(`${md}-${gd}`)||rd.push([md,gd])}for(const hd of Object.keys(Ra)){let md=Ra[hd];sd.add(hd),Reference.isRef(md)&&md.isSibling?fd(md.path,hd):isSchema(md)&&"deps"in md&&md.deps.forEach(gd=>fd(gd,hd))}return toposort$1.array(Array.from(sd),rd).reverse()}function findIndex(Ra,qa){let rd=1/0;return Ra.some((sd,pd)=>{var fd;if((fd=qa.path)!=null&&fd.includes(sd))return rd=pd,!0}),rd}function sortByKeyOrder(Ra){return(qa,rd)=>findIndex(Ra,qa)-findIndex(Ra,rd)}const parseJson=(Ra,qa,rd)=>{if(typeof Ra!="string")return Ra;let sd=Ra;try{sd=JSON.parse(Ra)}catch{}return rd.isType(sd)?sd:Ra};function deepPartial(Ra){if("fields"in Ra){const qa={};for(const[rd,sd]of Object.entries(Ra.fields))qa[rd]=deepPartial(sd);return Ra.setFields(qa)}if(Ra.type==="array"){const qa=Ra.optional();return qa.innerType&&(qa.innerType=deepPartial(qa.innerType)),qa}return Ra.type==="tuple"?Ra.optional().clone({types:Ra.spec.types.map(deepPartial)}):"optional"in Ra?Ra.optional():Ra}const deepHas=(Ra,qa)=>{const rd=[...propertyExpr.normalizePath(qa)];if(rd.length===1)return rd[0]in Ra;let sd=rd.pop(),pd=propertyExpr.getter(propertyExpr.join(rd),!0)(Ra);return!!(pd&&sd in pd)};let isObject$2=Ra=>Object.prototype.toString.call(Ra)==="[object Object]";function unknown(Ra,qa){let rd=Object.keys(Ra.fields);return Object.keys(qa).filter(sd=>rd.indexOf(sd)===-1)}const defaultSort=sortByKeyOrder([]);function create$3(Ra){return new ObjectSchema(Ra)}class ObjectSchema extends Schema{constructor(qa){super({type:"object",check(rd){return isObject$2(rd)||typeof rd=="function"}}),this.fields=Object.create(null),this._sortErrors=defaultSort,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{qa&&this.shape(qa)})}_cast(qa,rd={}){var sd;let pd=super._cast(qa,rd);if(pd===void 0)return this.getDefault(rd);if(!this._typeCheck(pd))return pd;let fd=this.fields,hd=(sd=rd.stripUnknown)!=null?sd:this.spec.noUnknown,md=[].concat(this._nodes,Object.keys(pd).filter(Nd=>!this._nodes.includes(Nd))),gd={},yd=Object.assign({},rd,{parent:gd,__validating:rd.__validating||!1}),vd=!1;for(const Nd of md){let Md=fd[Nd],Ld=Nd in pd;if(Md){let Fd,Hd=pd[Nd];yd.path=(rd.path?`${rd.path}.`:"")+Nd,Md=Md.resolve({value:Hd,context:rd.context,parent:gd});let Vd=Md instanceof Schema?Md.spec:void 0,Gd=Vd==null?void 0:Vd.strict;if(Vd!=null&&Vd.strip){vd=vd||Nd in pd;continue}Fd=!rd.__validating||!Gd?Md.cast(pd[Nd],yd):pd[Nd],Fd!==void 0&&(gd[Nd]=Fd)}else Ld&&!hd&&(gd[Nd]=pd[Nd]);(Ld!==Nd in gd||gd[Nd]!==pd[Nd])&&(vd=!0)}return vd?gd:pd}_validate(qa,rd={},sd,pd){let{from:fd=[],originalValue:hd=qa,recursive:md=this.spec.recursive}=rd;rd.from=[{schema:this,value:hd},...fd],rd.__validating=!0,rd.originalValue=hd,super._validate(qa,rd,sd,(gd,yd)=>{if(!md||!isObject$2(yd)){pd(gd,yd);return}hd=hd||yd;let vd=[];for(let Nd of this._nodes){let Md=this.fields[Nd];!Md||Reference.isRef(Md)||vd.push(Md.asNestedTest({options:rd,key:Nd,parent:yd,parentPath:rd.path,originalParent:hd}))}this.runTests({tests:vd,value:yd,originalValue:hd,options:rd},sd,Nd=>{pd(Nd.sort(this._sortErrors).concat(gd),yd)})})}clone(qa){const rd=super.clone(qa);return rd.fields=Object.assign({},this.fields),rd._nodes=this._nodes,rd._excludedEdges=this._excludedEdges,rd._sortErrors=this._sortErrors,rd}concat(qa){let rd=super.concat(qa),sd=rd.fields;for(let[pd,fd]of Object.entries(this.fields)){const hd=sd[pd];sd[pd]=hd===void 0?fd:hd}return rd.withMutation(pd=>pd.setFields(sd,[...this._excludedEdges,...qa._excludedEdges]))}_getDefault(qa){if("default"in this.spec)return super._getDefault(qa);if(!this._nodes.length)return;let rd={};return this._nodes.forEach(sd=>{var pd;const fd=this.fields[sd];let hd=qa;(pd=hd)!=null&&pd.value&&(hd=Object.assign({},hd,{parent:hd.value,value:hd.value[sd]})),rd[sd]=fd&&"getDefault"in fd?fd.getDefault(hd):void 0}),rd}setFields(qa,rd){let sd=this.clone();return sd.fields=qa,sd._nodes=sortFields(qa,rd),sd._sortErrors=sortByKeyOrder(Object.keys(qa)),rd&&(sd._excludedEdges=rd),sd}shape(qa,rd=[]){return this.clone().withMutation(sd=>{let pd=sd._excludedEdges;return rd.length&&(Array.isArray(rd[0])||(rd=[rd]),pd=[...sd._excludedEdges,...rd]),sd.setFields(Object.assign(sd.fields,qa),pd)})}partial(){const qa={};for(const[rd,sd]of Object.entries(this.fields))qa[rd]="optional"in sd&&sd.optional instanceof Function?sd.optional():sd;return this.setFields(qa)}deepPartial(){return deepPartial(this)}pick(qa){const rd={};for(const sd of qa)this.fields[sd]&&(rd[sd]=this.fields[sd]);return this.setFields(rd,this._excludedEdges.filter(([sd,pd])=>qa.includes(sd)&&qa.includes(pd)))}omit(qa){const rd=[];for(const sd of Object.keys(this.fields))qa.includes(sd)||rd.push(sd);return this.pick(rd)}from(qa,rd,sd){let pd=propertyExpr.getter(qa,!0);return this.transform(fd=>{if(!fd)return fd;let hd=fd;return deepHas(fd,qa)&&(hd=Object.assign({},fd),sd||delete hd[qa],hd[rd]=pd(fd)),hd})}json(){return this.transform(parseJson)}exact(qa){return this.test({name:"exact",exclusive:!0,message:qa||object.exact,test(rd){if(rd==null)return!0;const sd=unknown(this.schema,rd);return sd.length===0||this.createError({params:{properties:sd.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(qa=!0,rd=object.noUnknown){typeof qa!="boolean"&&(rd=qa,qa=!0);let sd=this.test({name:"noUnknown",exclusive:!0,message:rd,test(pd){if(pd==null)return!0;const fd=unknown(this.schema,pd);return!qa||fd.length===0||this.createError({params:{unknown:fd.join(", ")}})}});return sd.spec.noUnknown=qa,sd}unknown(qa=!0,rd=object.noUnknown){return this.noUnknown(!qa,rd)}transformKeys(qa){return this.transform(rd=>{if(!rd)return rd;const sd={};for(const pd of Object.keys(rd))sd[qa(pd)]=rd[pd];return sd})}camelCase(){return this.transformKeys(tinyCase.camelCase)}snakeCase(){return this.transformKeys(tinyCase.snakeCase)}constantCase(){return this.transformKeys(qa=>tinyCase.snakeCase(qa).toUpperCase())}describe(qa){const rd=(qa?this.resolve(qa):this).clone(),sd=super.describe(qa);sd.fields={};for(const[fd,hd]of Object.entries(rd.fields)){var pd;let md=qa;(pd=md)!=null&&pd.value&&(md=Object.assign({},md,{parent:md.value,value:md.value[fd]})),sd.fields[fd]=hd.describe(md)}return sd}}create$3.prototype=ObjectSchema.prototype;const _hoisted_1$9={class:"flex flex-col items-start"},_hoisted_2$6={class:"flex flex-col items-start"},_sfc_main$S=defineComponent({__name:"UploadImgDialog",emits:["uploadImage"],setup(Ra,{emit:qa}){const rd=qa,sd=useDisplayStore(),pd=toTypedSchema(create$3({repo:create$6().required("GitHub 仓库不能为空"),branch:create$6().optional(),accessToken:create$6().required("GitHub Token 不能为空")})),fd=ref$1(localStorage.getItem("githubConfig")?JSON.parse(localStorage.getItem("githubConfig")):{repo:"",branch:"",accessToken:""});function hd(xh){localStorage.setItem("githubConfig",JSON.stringify(xh)),fd.value=xh,Ke.success("保存成功")}const md=toTypedSchema(create$3({accessKeyId:create$6().required("AccessKey ID 不能为空"),accessKeySecret:create$6().required("AccessKey Secret 不能为空"),bucket:create$6().required("Bucket 不能为空"),region:create$6().required("Region 不能为空"),useSSL:create$7().required(),cdnHost:create$6().optional(),path:create$6().optional()})),gd=ref$1(localStorage.getItem("aliOSSConfig")?JSON.parse(localStorage.getItem("aliOSSConfig")):{accessKeyId:"",accessKeySecret:"",bucket:"",region:"",useSSL:!0,cdnHost:"",path:""});function yd(xh){localStorage.setItem("aliOSSConfig",JSON.stringify(xh)),gd.value=xh,Ke.success("保存成功")}const vd=toTypedSchema(create$3({secretId:create$6().required("Secret ID 不能为空"),secretKey:create$6().required("Secret Key 不能为空"),bucket:create$6().required("Bucket 不能为空"),region:create$6().required("Region 不能为空"),cdnHost:create$6().optional(),path:create$6().optional()})),Nd=ref$1(localStorage.getItem("txCOSConfig")?JSON.parse(localStorage.getItem("txCOSConfig")):{secretId:"",secretKey:"",bucket:"",region:"",cdnHost:"",path:""});function Md(xh){localStorage.setItem("txCOSConfig",JSON.stringify(xh)),Nd.value=xh,Ke.success("保存成功")}const Ld=toTypedSchema(create$3({accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空"),bucket:create$6().required("Bucket 不能为空"),domain:create$6().required("Bucket 对应域名不能为空"),region:create$6().optional(),path:create$6().optional()})),Fd=ref$1(localStorage.getItem("qiniuConfig")?JSON.parse(localStorage.getItem("qiniuConfig")):{accessKey:"",secretKey:"",bucket:"",domain:"",region:"",path:""});function Hd(xh){localStorage.setItem("qiniuConfig",JSON.stringify(xh)),Fd.value=xh,Ke.success("保存成功")}const Vd=toTypedSchema(create$3({endpoint:create$6().required("Endpoint 不能为空"),port:create$6().optional(),useSSL:create$7().required(),bucket:create$6().required("Bucket 不能为空"),accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空")})),Gd=ref$1(localStorage.getItem("minioConfig")?JSON.parse(localStorage.getItem("minioConfig")):{endpoint:"",port:"",useSSL:!0,bucket:"",accessKey:"",secretKey:""});function Ud(xh){localStorage.setItem("minioConfig",JSON.stringify(xh)),Gd.value=xh,Ke.success("保存成功")}const qd=ref$1(window.location.href.startsWith("http")),Wd=toTypedSchema(create$3({proxyOrigin:qd.value?create$6().required("代理域名不能为空"):create$6().optional(),appID:create$6().required("AppID 不能为空"),appsecret:create$6().required("AppSecret 不能为空")})),Kd=ref$1(localStorage.getItem("mpConfig")?JSON.parse(localStorage.getItem("mpConfig")):{proxyOrigin:"",appID:"",appsecret:""});function Xd(xh){localStorage.setItem("mpConfig",JSON.stringify(xh)),Kd.value=xh,Ke.success("保存成功")}const df=toTypedSchema(create$3({accountId:create$6().required("Account ID 不能为空"),accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空"),bucket:create$6().required("Bucket 不能为空"),domain:create$6().required("Bucket 对应域名不能为空"),path:create$6().optional()})),Ef=ref$1(localStorage.getItem("r2Config")?JSON.parse(localStorage.getItem("r2Config")):{accountId:"",accessKey:"",secretKey:"",bucket:"",domain:"",path:""});function pf(xh){localStorage.setItem("r2Config",JSON.stringify(xh)),Ef.value=xh,Ke.success("保存成功")}const mf=[{value:"default",label:"默认"},{value:"github",label:"GitHub"},{value:"aliOSS",label:"阿里云"},{value:"txCOS",label:"腾讯云"},{value:"qiniu",label:"七牛云"},{value:"minio",label:"MinIO"},{value:"mp",label:"公众号图床"},{value:"r2",label:"Cloudflare R2"},{value:"formCustom",label:"自定义代码"}],_f=ref$1("default"),xf=ref$1("upload");onBeforeMount(()=>{localStorage.getItem("imgHost")&&(_f.value=localStorage.getItem("imgHost"))});function Cf(){localStorage.setItem("imgHost",_f.value),Ke.success("已成功切换图床")}function If(xh){const Eh=checkImage(xh);if(!Eh.ok)return Ke.error(Eh.msg||""),!1;let Mh=localStorage.getItem("imgHost");Mh=Mh||"default",localStorage.setItem("imgHost",Mh);const dh=localStorage.getItem(`${Mh}Config`);return Mh==="default"||dh?!0:(Ke.error(`请先配置 ${Mh} 图床参数`),!1)}const Sf=ref$1(!1),{open:wf,onChange:Pf}=useFileDialog({accept:"image/*"});Pf(xh=>{if(xh==null)return;const Eh=xh[0];If(Eh)&&rd("uploadImage",Eh)});function lh(xh){Sf.value=!1,xh.stopPropagation();const Eh=Array.from(xh.dataTransfer.files)[0];If(Eh)&&rd("uploadImage",Eh)}return(xh,Eh)=>{const Mh=_sfc_main$16,dh=_sfc_main$17,eh=_sfc_main$T,fh=_sfc_main$U,Sh=_sfc_main$W,vh=_sfc_main$X,Df=_sfc_main$_,Af=_sfc_main$V,_h=_sfc_main$$,Nh=_sfc_main$18,dm=_sfc_main$10,Jf=_sfc_main$1e,oh=__unplugin_components_12,Xh=_sfc_main$1o,Tm=_sfc_main$12,kh=_sfc_main$13,Zf=_sfc_main$14,th=_sfc_main$1g,$h=_sfc_main$1h;return openBlock(),createBlock($h,{open:unref(sd).isShowUploadImgDialog,"onUpdate:open":Eh[6]||(Eh[6]=wh=>unref(sd).isShowUploadImgDialog=wh)},{default:withCtx(()=>[createVNode(th,{class:"max-w-max",onPointerDownOutside:Eh[5]||(Eh[5]=wh=>wh.preventDefault())},{default:withCtx(()=>[createVNode(dh,null,{default:withCtx(()=>[createVNode(Mh,null,{default:withCtx(()=>Eh[7]||(Eh[7]=[createTextVNode("本地上传")])),_:1})]),_:1}),createVNode(Zf,{modelValue:unref(xf),"onUpdate:modelValue":Eh[4]||(Eh[4]=wh=>isRef(xf)?xf.value=wh:null),class:"w-max"},{default:withCtx(()=>[createVNode(fh,null,{default:withCtx(()=>[createVNode(eh,{value:"upload"},{default:withCtx(()=>Eh[8]||(Eh[8]=[createTextVNode(" 选择上传 ")])),_:1}),(openBlock(!0),createElementBlock(Fragment,null,renderList(mf.filter(wh=>wh.value!=="default"),wh=>(openBlock(),createBlock(eh,{key:wh.value,value:wh.value},{default:withCtx(()=>[createTextVNode(toDisplayString(wh.label),1)]),_:2},1032,["value"]))),128))]),_:1}),createVNode(dm,{value:"upload"},{default:withCtx(()=>[createVNode(Nh,null,{default:withCtx(()=>[Eh[9]||(Eh[9]=createBaseVNode("span",{class:"my-4 block"}," 图床 ",-1)),createVNode(_h,{modelValue:unref(_f),"onUpdate:modelValue":[Eh[0]||(Eh[0]=wh=>isRef(_f)?_f.value=wh:null),Cf]},{default:withCtx(()=>[createVNode(vh,null,{default:withCtx(()=>[createVNode(Sh,{placeholder:"请选择"})]),_:1}),createVNode(Af,null,{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(mf,wh=>createVNode(Df,{key:wh.value,label:wh.label,value:wh.value},{default:withCtx(()=>[createTextVNode(toDisplayString(wh.label),1)]),_:2},1032,["label","value"])),64))]),_:1})]),_:1},8,["modelValue"])]),_:1}),createBaseVNode("div",{class:normalizeClass(["bg-clip-padding mt-4 h-50 flex flex-col cursor-pointer items-center justify-evenly border-2 rounded border-dashed transition-colors hover:border-gray-700 hover:bg-gray-400/50 dark:hover:border-gray-200 dark:hover:bg-gray-500/50",{"border-gray-700 bg-gray-400/50 dark:border-gray-200 dark:bg-gray-500/50":unref(Sf)}]),onClick:Eh[1]||(Eh[1]=wh=>unref(wf)()),onDrop:withModifiers(lh,["prevent"]),onDragover:Eh[2]||(Eh[2]=withModifiers(wh=>Sf.value=!0,["prevent"])),onDragleave:Eh[3]||(Eh[3]=withModifiers(wh=>Sf.value=!1,["prevent"]))},[createVNode(unref(CloudUpload),{class:"size-20"}),Eh[10]||(Eh[10]=createBaseVNode("p",null,[createTextVNode(" 将图片拖到此处,或 "),createBaseVNode("strong",null,"点击上传")],-1))],34)]),_:1}),createVNode(dm,{value:"github"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(pd),"initial-values":unref(fd),onSubmit:hd},{default:withCtx(()=>[createVNode(unref(Field),{name:"repo"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"GitHub 仓库",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:github.com/yanglbme/resource"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"branch"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"分支",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:release,可不填,默认 master"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessToken"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Token",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,type:"password",placeholder:"如:cc1d0c1426d0fd0902bd2d7184b14da61b8abc46"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token",target:"_blank"},{default:withCtx(()=>Eh[11]||(Eh[11]=[createTextVNode(" 如何获取 GitHub Token? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[12]||(Eh[12]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"aliOSS"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(md),"initial-values":unref(gd),onSubmit:yd},{default:withCtx(()=>[createVNode(unref(Field),{name:"accessKeyId"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"AccessKey ID",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:LTAI4GdoocsmdoxUf13ylbaNHk"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKeySecret"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"AccessKey Secret",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,type:"password",placeholder:"如:cc1d0c142doocs0902bd2d7md4b14da6ylbabc46"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket 所在区域",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:oss-cn-shenzhen"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"useSSL",type:"boolean"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"UseSSL",required:"",error:fm},{default:withCtx(()=>[createVNode(Tm,{checked:wh.value,name:wh.name,"onUpdate:checked":wh.onChange,onBlur:wh.onBlur},null,8,["checked","name","onUpdate:checked","onBlur"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"cdnHost"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"自定义 CDN 域名",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:https://imagecdn.alidaodao.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"存储路径",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://help.aliyun.com/document_detail/31883.html",target:"_blank"},{default:withCtx(()=>Eh[13]||(Eh[13]=[createTextVNode(" 如何使用阿里云 OSS? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[14]||(Eh[14]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"txCOS"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(vd),"initial-values":unref(Nd),onSubmit:Md},{default:withCtx(()=>[createVNode(unref(Field),{name:"secretId"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"SecretId",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:AKIDnQp1w3DOOCSs8F5MDp9tdoocsmdUPonW3"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"SecretKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,type:"password",placeholder:"如:ukLmdtEJ9271f3DOocsMDsCXdS3YlbW0"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:doocs-3212520134"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket 所在区域",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:ap-guangzhou"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"cdnHost"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"自定义 CDN 域名",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:https://imagecdn.alidaodao.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"存储路径",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:img,可不填,默认根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://cloud.tencent.com/document/product/436/38484",target:"_blank"},{default:withCtx(()=>Eh[15]||(Eh[15]=[createTextVNode(" 如何使用腾讯云 COS? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[16]||(Eh[16]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"qiniu"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(Ld),"initial-values":unref(Fd),onSubmit:Hd},{default:withCtx(()=>[createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"AccessKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:6DD3VaLJ_SQgOdoocsyTV_YWaDmdnL2n8EGx7kG"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"SecretKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,type:"password",placeholder:"如:qgZa5qrvDOOcsmdKStD1oCjZ9nB7MDvJUs_34SIm"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:md"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket 对应域名",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:https://images.123ylb.cn"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"存储区域",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:z2,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"存储路径",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://developer.qiniu.com/kodo",target:"_blank"},{default:withCtx(()=>Eh[17]||(Eh[17]=[createTextVNode(" 如何使用七牛云 Kodo? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[18]||(Eh[18]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"minio"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(Vd),"initial-values":unref(Gd),onSubmit:Ud},{default:withCtx(()=>[createVNode(unref(Field),{name:"endpoint"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Endpoint",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:play.min.io"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"port"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Port",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,type:"number",placeholder:"如:9000,可不填,http 默认为 80,https 默认为 443"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"useSSL",type:"boolean"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"UseSSL",required:"",error:fm},{default:withCtx(()=>[createVNode(Tm,{checked:wh.value,name:wh.name,"onUpdate:checked":wh.onChange,onBlur:wh.onBlur},null,8,["checked","name","onUpdate:checked","onBlur"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"AccessKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:zhangsan"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"SecretKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:asdasdasd"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"http://docs.minio.org.cn/docs/master/minio-client-complete-guide",target:"_blank"},{default:withCtx(()=>Eh[19]||(Eh[19]=[createTextVNode(" 如何使用 MinIO? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[20]||(Eh[20]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"mp"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(Wd),"initial-values":unref(Kd),onSubmit:Xd},{default:withCtx(()=>[createVNode(unref(Field),{name:"proxyOrigin"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"代理域名",required:unref(qd),error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:http://proxy.example.com,使用插件时可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["required","error"])]),_:1}),createVNode(unref(Field),{name:"appID"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"appID",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:wx6e1234567890efa3"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"appsecret"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"appsecret",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:d9f1abcdef01234567890abcdef82397"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$9,[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Getting_Started_Guide.html",target:"_blank"},{default:withCtx(()=>Eh[21]||(Eh[21]=[createTextVNode(" 如何开启公众号开发者模式并获取应用账号密钥? ")])),_:1}),createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://mpmd.pages.dev/tutorial/",target:"_blank"},{default:withCtx(()=>Eh[22]||(Eh[22]=[createTextVNode(" 如何在浏览器插件中使用公众号图床? ")])),_:1})])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[23]||(Eh[23]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"r2"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(df),"initial-values":unref(Ef),onSubmit:pf},{default:withCtx(()=>[createVNode(unref(Field),{name:"accountId"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"AccountId",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如: 0030f123e55a57546f4c281c564e560",class:"min-w-[350px]"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"AccessKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如: 358090b3a12824a6b0787gae7ad0fc72"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"SecretKey",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,type:"password",placeholder:"如: c1c4dbcb0b6b785ac6633422a06dff3dac055fe74fe40xj1b5c5fcf1bf128010"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"Bucket",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:md"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"域名",required:"",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:https://oss.example.com"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:wh,errorMessage:fm})=>[createVNode(oh,{label:"存储路径",error:fm},{default:withCtx(()=>[createVNode(Jf,mergeProps(wh,{modelValue:wh.value,"onUpdate:modelValue":zh=>wh.value=zh,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createBaseVNode("div",_hoisted_2$6,[createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://developers.cloudflare.com/r2/api/s3/api/",target:"_blank"},{default:withCtx(()=>Eh[24]||(Eh[24]=[createTextVNode(" 如何使用 S3 API 操作 Cloudflare R2 ")])),_:1}),createVNode(Xh,{variant:"link",class:"p-0",as:"a",href:"https://developers.cloudflare.com/r2/buckets/cors/",target:"_blank"},{default:withCtx(()=>Eh[25]||(Eh[25]=[createTextVNode(" 如何设置跨域(CORS) ")])),_:1})])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Xh,{type:"submit"},{default:withCtx(()=>Eh[26]||(Eh[26]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(dm,{value:"formCustom"},{default:withCtx(()=>[createVNode(kh)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["open"])}}});var top="top",bottom="bottom",right="right",left="left",auto$1="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(Ra,qa){return Ra.concat([qa+"-"+start,qa+"-"+end])},[]),placements=[].concat(basePlacements,[auto$1]).reduce(function(Ra,qa){return Ra.concat([qa,qa+"-"+start,qa+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main$2="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main$2,afterMain,beforeWrite,write,afterWrite];function getNodeName(Ra){return Ra?(Ra.nodeName||"").toLowerCase():null}function getWindow(Ra){if(Ra==null)return window;if(Ra.toString()!=="[object Window]"){var qa=Ra.ownerDocument;return qa&&qa.defaultView||window}return Ra}function isElement$1(Ra){var qa=getWindow(Ra).Element;return Ra instanceof qa||Ra instanceof Element}function isHTMLElement(Ra){var qa=getWindow(Ra).HTMLElement;return Ra instanceof qa||Ra instanceof HTMLElement}function isShadowRoot(Ra){if(typeof ShadowRoot>"u")return!1;var qa=getWindow(Ra).ShadowRoot;return Ra instanceof qa||Ra instanceof ShadowRoot}function applyStyles(Ra){var qa=Ra.state;Object.keys(qa.elements).forEach(function(rd){var sd=qa.styles[rd]||{},pd=qa.attributes[rd]||{},fd=qa.elements[rd];!isHTMLElement(fd)||!getNodeName(fd)||(Object.assign(fd.style,sd),Object.keys(pd).forEach(function(hd){var md=pd[hd];md===!1?fd.removeAttribute(hd):fd.setAttribute(hd,md===!0?"":md)}))})}function effect$2(Ra){var qa=Ra.state,rd={popper:{position:qa.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(qa.elements.popper.style,rd.popper),qa.styles=rd,qa.elements.arrow&&Object.assign(qa.elements.arrow.style,rd.arrow),function(){Object.keys(qa.elements).forEach(function(sd){var pd=qa.elements[sd],fd=qa.attributes[sd]||{},hd=Object.keys(qa.styles.hasOwnProperty(sd)?qa.styles[sd]:rd[sd]),md=hd.reduce(function(gd,yd){return gd[yd]="",gd},{});!isHTMLElement(pd)||!getNodeName(pd)||(Object.assign(pd.style,md),Object.keys(fd).forEach(function(gd){pd.removeAttribute(gd)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(Ra){return Ra.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var Ra=navigator.userAgentData;return Ra!=null&&Ra.brands&&Array.isArray(Ra.brands)?Ra.brands.map(function(qa){return qa.brand+"/"+qa.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(Ra,qa,rd){qa===void 0&&(qa=!1),rd===void 0&&(rd=!1);var sd=Ra.getBoundingClientRect(),pd=1,fd=1;qa&&isHTMLElement(Ra)&&(pd=Ra.offsetWidth>0&&round(sd.width)/Ra.offsetWidth||1,fd=Ra.offsetHeight>0&&round(sd.height)/Ra.offsetHeight||1);var hd=isElement$1(Ra)?getWindow(Ra):window,md=hd.visualViewport,gd=!isLayoutViewport()&&rd,yd=(sd.left+(gd&&md?md.offsetLeft:0))/pd,vd=(sd.top+(gd&&md?md.offsetTop:0))/fd,Nd=sd.width/pd,Md=sd.height/fd;return{width:Nd,height:Md,top:vd,right:yd+Nd,bottom:vd+Md,left:yd,x:yd,y:vd}}function getLayoutRect(Ra){var qa=getBoundingClientRect(Ra),rd=Ra.offsetWidth,sd=Ra.offsetHeight;return Math.abs(qa.width-rd)<=1&&(rd=qa.width),Math.abs(qa.height-sd)<=1&&(sd=qa.height),{x:Ra.offsetLeft,y:Ra.offsetTop,width:rd,height:sd}}function contains(Ra,qa){var rd=qa.getRootNode&&qa.getRootNode();if(Ra.contains(qa))return!0;if(rd&&isShadowRoot(rd)){var sd=qa;do{if(sd&&Ra.isSameNode(sd))return!0;sd=sd.parentNode||sd.host}while(sd)}return!1}function getComputedStyle$1(Ra){return getWindow(Ra).getComputedStyle(Ra)}function isTableElement(Ra){return["table","td","th"].indexOf(getNodeName(Ra))>=0}function getDocumentElement(Ra){return((isElement$1(Ra)?Ra.ownerDocument:Ra.document)||window.document).documentElement}function getParentNode(Ra){return getNodeName(Ra)==="html"?Ra:Ra.assignedSlot||Ra.parentNode||(isShadowRoot(Ra)?Ra.host:null)||getDocumentElement(Ra)}function getTrueOffsetParent(Ra){return!isHTMLElement(Ra)||getComputedStyle$1(Ra).position==="fixed"?null:Ra.offsetParent}function getContainingBlock(Ra){var qa=/firefox/i.test(getUAString()),rd=/Trident/i.test(getUAString());if(rd&&isHTMLElement(Ra)){var sd=getComputedStyle$1(Ra);if(sd.position==="fixed")return null}var pd=getParentNode(Ra);for(isShadowRoot(pd)&&(pd=pd.host);isHTMLElement(pd)&&["html","body"].indexOf(getNodeName(pd))<0;){var fd=getComputedStyle$1(pd);if(fd.transform!=="none"||fd.perspective!=="none"||fd.contain==="paint"||["transform","perspective"].indexOf(fd.willChange)!==-1||qa&&fd.willChange==="filter"||qa&&fd.filter&&fd.filter!=="none")return pd;pd=pd.parentNode}return null}function getOffsetParent(Ra){for(var qa=getWindow(Ra),rd=getTrueOffsetParent(Ra);rd&&isTableElement(rd)&&getComputedStyle$1(rd).position==="static";)rd=getTrueOffsetParent(rd);return rd&&(getNodeName(rd)==="html"||getNodeName(rd)==="body"&&getComputedStyle$1(rd).position==="static")?qa:rd||getContainingBlock(Ra)||qa}function getMainAxisFromPlacement(Ra){return["top","bottom"].indexOf(Ra)>=0?"x":"y"}function within(Ra,qa,rd){return max(Ra,min(qa,rd))}function withinMaxClamp(Ra,qa,rd){var sd=within(Ra,qa,rd);return sd>rd?rd:sd}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(Ra){return Object.assign({},getFreshSideObject(),Ra)}function expandToHashMap(Ra,qa){return qa.reduce(function(rd,sd){return rd[sd]=Ra,rd},{})}var toPaddingObject=function(qa,rd){return qa=typeof qa=="function"?qa(Object.assign({},rd.rects,{placement:rd.placement})):qa,mergePaddingObject(typeof qa!="number"?qa:expandToHashMap(qa,basePlacements))};function arrow(Ra){var qa,rd=Ra.state,sd=Ra.name,pd=Ra.options,fd=rd.elements.arrow,hd=rd.modifiersData.popperOffsets,md=getBasePlacement(rd.placement),gd=getMainAxisFromPlacement(md),yd=[left,right].indexOf(md)>=0,vd=yd?"height":"width";if(!(!fd||!hd)){var Nd=toPaddingObject(pd.padding,rd),Md=getLayoutRect(fd),Ld=gd==="y"?top:left,Fd=gd==="y"?bottom:right,Hd=rd.rects.reference[vd]+rd.rects.reference[gd]-hd[gd]-rd.rects.popper[vd],Vd=hd[gd]-rd.rects.reference[gd],Gd=getOffsetParent(fd),Ud=Gd?gd==="y"?Gd.clientHeight||0:Gd.clientWidth||0:0,qd=Hd/2-Vd/2,Wd=Nd[Ld],Kd=Ud-Md[vd]-Nd[Fd],Xd=Ud/2-Md[vd]/2+qd,df=within(Wd,Xd,Kd),Ef=gd;rd.modifiersData[sd]=(qa={},qa[Ef]=df,qa.centerOffset=df-Xd,qa)}}function effect$1(Ra){var qa=Ra.state,rd=Ra.options,sd=rd.element,pd=sd===void 0?"[data-popper-arrow]":sd;pd!=null&&(typeof pd=="string"&&(pd=qa.elements.popper.querySelector(pd),!pd)||contains(qa.elements.popper,pd)&&(qa.elements.arrow=pd))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(Ra){return Ra.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(Ra,qa){var rd=Ra.x,sd=Ra.y,pd=qa.devicePixelRatio||1;return{x:round(rd*pd)/pd||0,y:round(sd*pd)/pd||0}}function mapToStyles(Ra){var qa,rd=Ra.popper,sd=Ra.popperRect,pd=Ra.placement,fd=Ra.variation,hd=Ra.offsets,md=Ra.position,gd=Ra.gpuAcceleration,yd=Ra.adaptive,vd=Ra.roundOffsets,Nd=Ra.isFixed,Md=hd.x,Ld=Md===void 0?0:Md,Fd=hd.y,Hd=Fd===void 0?0:Fd,Vd=typeof vd=="function"?vd({x:Ld,y:Hd}):{x:Ld,y:Hd};Ld=Vd.x,Hd=Vd.y;var Gd=hd.hasOwnProperty("x"),Ud=hd.hasOwnProperty("y"),qd=left,Wd=top,Kd=window;if(yd){var Xd=getOffsetParent(rd),df="clientHeight",Ef="clientWidth";if(Xd===getWindow(rd)&&(Xd=getDocumentElement(rd),getComputedStyle$1(Xd).position!=="static"&&md==="absolute"&&(df="scrollHeight",Ef="scrollWidth")),Xd=Xd,pd===top||(pd===left||pd===right)&&fd===end){Wd=bottom;var pf=Nd&&Xd===Kd&&Kd.visualViewport?Kd.visualViewport.height:Xd[df];Hd-=pf-sd.height,Hd*=gd?1:-1}if(pd===left||(pd===top||pd===bottom)&&fd===end){qd=right;var mf=Nd&&Xd===Kd&&Kd.visualViewport?Kd.visualViewport.width:Xd[Ef];Ld-=mf-sd.width,Ld*=gd?1:-1}}var _f=Object.assign({position:md},yd&&unsetSides),xf=vd===!0?roundOffsetsByDPR({x:Ld,y:Hd},getWindow(rd)):{x:Ld,y:Hd};if(Ld=xf.x,Hd=xf.y,gd){var Cf;return Object.assign({},_f,(Cf={},Cf[Wd]=Ud?"0":"",Cf[qd]=Gd?"0":"",Cf.transform=(Kd.devicePixelRatio||1)<=1?"translate("+Ld+"px, "+Hd+"px)":"translate3d("+Ld+"px, "+Hd+"px, 0)",Cf))}return Object.assign({},_f,(qa={},qa[Wd]=Ud?Hd+"px":"",qa[qd]=Gd?Ld+"px":"",qa.transform="",qa))}function computeStyles(Ra){var qa=Ra.state,rd=Ra.options,sd=rd.gpuAcceleration,pd=sd===void 0?!0:sd,fd=rd.adaptive,hd=fd===void 0?!0:fd,md=rd.roundOffsets,gd=md===void 0?!0:md,yd={placement:getBasePlacement(qa.placement),variation:getVariation(qa.placement),popper:qa.elements.popper,popperRect:qa.rects.popper,gpuAcceleration:pd,isFixed:qa.options.strategy==="fixed"};qa.modifiersData.popperOffsets!=null&&(qa.styles.popper=Object.assign({},qa.styles.popper,mapToStyles(Object.assign({},yd,{offsets:qa.modifiersData.popperOffsets,position:qa.options.strategy,adaptive:hd,roundOffsets:gd})))),qa.modifiersData.arrow!=null&&(qa.styles.arrow=Object.assign({},qa.styles.arrow,mapToStyles(Object.assign({},yd,{offsets:qa.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:gd})))),qa.attributes.popper=Object.assign({},qa.attributes.popper,{"data-popper-placement":qa.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(Ra){var qa=Ra.state,rd=Ra.instance,sd=Ra.options,pd=sd.scroll,fd=pd===void 0?!0:pd,hd=sd.resize,md=hd===void 0?!0:hd,gd=getWindow(qa.elements.popper),yd=[].concat(qa.scrollParents.reference,qa.scrollParents.popper);return fd&&yd.forEach(function(vd){vd.addEventListener("scroll",rd.update,passive)}),md&&gd.addEventListener("resize",rd.update,passive),function(){fd&&yd.forEach(function(vd){vd.removeEventListener("scroll",rd.update,passive)}),md&&gd.removeEventListener("resize",rd.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(Ra){return Ra.replace(/left|right|bottom|top/g,function(qa){return hash$1[qa]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(Ra){return Ra.replace(/start|end/g,function(qa){return hash[qa]})}function getWindowScroll(Ra){var qa=getWindow(Ra),rd=qa.pageXOffset,sd=qa.pageYOffset;return{scrollLeft:rd,scrollTop:sd}}function getWindowScrollBarX(Ra){return getBoundingClientRect(getDocumentElement(Ra)).left+getWindowScroll(Ra).scrollLeft}function getViewportRect(Ra,qa){var rd=getWindow(Ra),sd=getDocumentElement(Ra),pd=rd.visualViewport,fd=sd.clientWidth,hd=sd.clientHeight,md=0,gd=0;if(pd){fd=pd.width,hd=pd.height;var yd=isLayoutViewport();(yd||!yd&&qa==="fixed")&&(md=pd.offsetLeft,gd=pd.offsetTop)}return{width:fd,height:hd,x:md+getWindowScrollBarX(Ra),y:gd}}function getDocumentRect(Ra){var qa,rd=getDocumentElement(Ra),sd=getWindowScroll(Ra),pd=(qa=Ra.ownerDocument)==null?void 0:qa.body,fd=max(rd.scrollWidth,rd.clientWidth,pd?pd.scrollWidth:0,pd?pd.clientWidth:0),hd=max(rd.scrollHeight,rd.clientHeight,pd?pd.scrollHeight:0,pd?pd.clientHeight:0),md=-sd.scrollLeft+getWindowScrollBarX(Ra),gd=-sd.scrollTop;return getComputedStyle$1(pd||rd).direction==="rtl"&&(md+=max(rd.clientWidth,pd?pd.clientWidth:0)-fd),{width:fd,height:hd,x:md,y:gd}}function isScrollParent(Ra){var qa=getComputedStyle$1(Ra),rd=qa.overflow,sd=qa.overflowX,pd=qa.overflowY;return/auto|scroll|overlay|hidden/.test(rd+pd+sd)}function getScrollParent(Ra){return["html","body","#document"].indexOf(getNodeName(Ra))>=0?Ra.ownerDocument.body:isHTMLElement(Ra)&&isScrollParent(Ra)?Ra:getScrollParent(getParentNode(Ra))}function listScrollParents(Ra,qa){var rd;qa===void 0&&(qa=[]);var sd=getScrollParent(Ra),pd=sd===((rd=Ra.ownerDocument)==null?void 0:rd.body),fd=getWindow(sd),hd=pd?[fd].concat(fd.visualViewport||[],isScrollParent(sd)?sd:[]):sd,md=qa.concat(hd);return pd?md:md.concat(listScrollParents(getParentNode(hd)))}function rectToClientRect(Ra){return Object.assign({},Ra,{left:Ra.x,top:Ra.y,right:Ra.x+Ra.width,bottom:Ra.y+Ra.height})}function getInnerBoundingClientRect(Ra,qa){var rd=getBoundingClientRect(Ra,!1,qa==="fixed");return rd.top=rd.top+Ra.clientTop,rd.left=rd.left+Ra.clientLeft,rd.bottom=rd.top+Ra.clientHeight,rd.right=rd.left+Ra.clientWidth,rd.width=Ra.clientWidth,rd.height=Ra.clientHeight,rd.x=rd.left,rd.y=rd.top,rd}function getClientRectFromMixedType(Ra,qa,rd){return qa===viewport?rectToClientRect(getViewportRect(Ra,rd)):isElement$1(qa)?getInnerBoundingClientRect(qa,rd):rectToClientRect(getDocumentRect(getDocumentElement(Ra)))}function getClippingParents(Ra){var qa=listScrollParents(getParentNode(Ra)),rd=["absolute","fixed"].indexOf(getComputedStyle$1(Ra).position)>=0,sd=rd&&isHTMLElement(Ra)?getOffsetParent(Ra):Ra;return isElement$1(sd)?qa.filter(function(pd){return isElement$1(pd)&&contains(pd,sd)&&getNodeName(pd)!=="body"}):[]}function getClippingRect(Ra,qa,rd,sd){var pd=qa==="clippingParents"?getClippingParents(Ra):[].concat(qa),fd=[].concat(pd,[rd]),hd=fd[0],md=fd.reduce(function(gd,yd){var vd=getClientRectFromMixedType(Ra,yd,sd);return gd.top=max(vd.top,gd.top),gd.right=min(vd.right,gd.right),gd.bottom=min(vd.bottom,gd.bottom),gd.left=max(vd.left,gd.left),gd},getClientRectFromMixedType(Ra,hd,sd));return md.width=md.right-md.left,md.height=md.bottom-md.top,md.x=md.left,md.y=md.top,md}function computeOffsets(Ra){var qa=Ra.reference,rd=Ra.element,sd=Ra.placement,pd=sd?getBasePlacement(sd):null,fd=sd?getVariation(sd):null,hd=qa.x+qa.width/2-rd.width/2,md=qa.y+qa.height/2-rd.height/2,gd;switch(pd){case top:gd={x:hd,y:qa.y-rd.height};break;case bottom:gd={x:hd,y:qa.y+qa.height};break;case right:gd={x:qa.x+qa.width,y:md};break;case left:gd={x:qa.x-rd.width,y:md};break;default:gd={x:qa.x,y:qa.y}}var yd=pd?getMainAxisFromPlacement(pd):null;if(yd!=null){var vd=yd==="y"?"height":"width";switch(fd){case start:gd[yd]=gd[yd]-(qa[vd]/2-rd[vd]/2);break;case end:gd[yd]=gd[yd]+(qa[vd]/2-rd[vd]/2);break}}return gd}function detectOverflow(Ra,qa){qa===void 0&&(qa={});var rd=qa,sd=rd.placement,pd=sd===void 0?Ra.placement:sd,fd=rd.strategy,hd=fd===void 0?Ra.strategy:fd,md=rd.boundary,gd=md===void 0?clippingParents:md,yd=rd.rootBoundary,vd=yd===void 0?viewport:yd,Nd=rd.elementContext,Md=Nd===void 0?popper:Nd,Ld=rd.altBoundary,Fd=Ld===void 0?!1:Ld,Hd=rd.padding,Vd=Hd===void 0?0:Hd,Gd=mergePaddingObject(typeof Vd!="number"?Vd:expandToHashMap(Vd,basePlacements)),Ud=Md===popper?reference:popper,qd=Ra.rects.popper,Wd=Ra.elements[Fd?Ud:Md],Kd=getClippingRect(isElement$1(Wd)?Wd:Wd.contextElement||getDocumentElement(Ra.elements.popper),gd,vd,hd),Xd=getBoundingClientRect(Ra.elements.reference),df=computeOffsets({reference:Xd,element:qd,strategy:"absolute",placement:pd}),Ef=rectToClientRect(Object.assign({},qd,df)),pf=Md===popper?Ef:Xd,mf={top:Kd.top-pf.top+Gd.top,bottom:pf.bottom-Kd.bottom+Gd.bottom,left:Kd.left-pf.left+Gd.left,right:pf.right-Kd.right+Gd.right},_f=Ra.modifiersData.offset;if(Md===popper&&_f){var xf=_f[pd];Object.keys(mf).forEach(function(Cf){var If=[right,bottom].indexOf(Cf)>=0?1:-1,Sf=[top,bottom].indexOf(Cf)>=0?"y":"x";mf[Cf]+=xf[Sf]*If})}return mf}function computeAutoPlacement(Ra,qa){qa===void 0&&(qa={});var rd=qa,sd=rd.placement,pd=rd.boundary,fd=rd.rootBoundary,hd=rd.padding,md=rd.flipVariations,gd=rd.allowedAutoPlacements,yd=gd===void 0?placements:gd,vd=getVariation(sd),Nd=vd?md?variationPlacements:variationPlacements.filter(function(Fd){return getVariation(Fd)===vd}):basePlacements,Md=Nd.filter(function(Fd){return yd.indexOf(Fd)>=0});Md.length===0&&(Md=Nd);var Ld=Md.reduce(function(Fd,Hd){return Fd[Hd]=detectOverflow(Ra,{placement:Hd,boundary:pd,rootBoundary:fd,padding:hd})[getBasePlacement(Hd)],Fd},{});return Object.keys(Ld).sort(function(Fd,Hd){return Ld[Fd]-Ld[Hd]})}function getExpandedFallbackPlacements(Ra){if(getBasePlacement(Ra)===auto$1)return[];var qa=getOppositePlacement(Ra);return[getOppositeVariationPlacement(Ra),qa,getOppositeVariationPlacement(qa)]}function flip(Ra){var qa=Ra.state,rd=Ra.options,sd=Ra.name;if(!qa.modifiersData[sd]._skip){for(var pd=rd.mainAxis,fd=pd===void 0?!0:pd,hd=rd.altAxis,md=hd===void 0?!0:hd,gd=rd.fallbackPlacements,yd=rd.padding,vd=rd.boundary,Nd=rd.rootBoundary,Md=rd.altBoundary,Ld=rd.flipVariations,Fd=Ld===void 0?!0:Ld,Hd=rd.allowedAutoPlacements,Vd=qa.options.placement,Gd=getBasePlacement(Vd),Ud=Gd===Vd,qd=gd||(Ud||!Fd?[getOppositePlacement(Vd)]:getExpandedFallbackPlacements(Vd)),Wd=[Vd].concat(qd).reduce(function(fh,Sh){return fh.concat(getBasePlacement(Sh)===auto$1?computeAutoPlacement(qa,{placement:Sh,boundary:vd,rootBoundary:Nd,padding:yd,flipVariations:Fd,allowedAutoPlacements:Hd}):Sh)},[]),Kd=qa.rects.reference,Xd=qa.rects.popper,df=new Map,Ef=!0,pf=Wd[0],mf=0;mf=0,Sf=If?"width":"height",wf=detectOverflow(qa,{placement:_f,boundary:vd,rootBoundary:Nd,altBoundary:Md,padding:yd}),Pf=If?Cf?right:left:Cf?bottom:top;Kd[Sf]>Xd[Sf]&&(Pf=getOppositePlacement(Pf));var lh=getOppositePlacement(Pf),xh=[];if(fd&&xh.push(wf[xf]<=0),md&&xh.push(wf[Pf]<=0,wf[lh]<=0),xh.every(function(fh){return fh})){pf=_f,Ef=!1;break}df.set(_f,xh)}if(Ef)for(var Eh=Fd?3:1,Mh=function(Sh){var vh=Wd.find(function(Df){var Af=df.get(Df);if(Af)return Af.slice(0,Sh).every(function(_h){return _h})});if(vh)return pf=vh,"break"},dh=Eh;dh>0;dh--){var eh=Mh(dh);if(eh==="break")break}qa.placement!==pf&&(qa.modifiersData[sd]._skip=!0,qa.placement=pf,qa.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(Ra,qa,rd){return rd===void 0&&(rd={x:0,y:0}),{top:Ra.top-qa.height-rd.y,right:Ra.right-qa.width+rd.x,bottom:Ra.bottom-qa.height+rd.y,left:Ra.left-qa.width-rd.x}}function isAnySideFullyClipped(Ra){return[top,right,bottom,left].some(function(qa){return Ra[qa]>=0})}function hide(Ra){var qa=Ra.state,rd=Ra.name,sd=qa.rects.reference,pd=qa.rects.popper,fd=qa.modifiersData.preventOverflow,hd=detectOverflow(qa,{elementContext:"reference"}),md=detectOverflow(qa,{altBoundary:!0}),gd=getSideOffsets(hd,sd),yd=getSideOffsets(md,pd,fd),vd=isAnySideFullyClipped(gd),Nd=isAnySideFullyClipped(yd);qa.modifiersData[rd]={referenceClippingOffsets:gd,popperEscapeOffsets:yd,isReferenceHidden:vd,hasPopperEscaped:Nd},qa.attributes.popper=Object.assign({},qa.attributes.popper,{"data-popper-reference-hidden":vd,"data-popper-escaped":Nd})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(Ra,qa,rd){var sd=getBasePlacement(Ra),pd=[left,top].indexOf(sd)>=0?-1:1,fd=typeof rd=="function"?rd(Object.assign({},qa,{placement:Ra})):rd,hd=fd[0],md=fd[1];return hd=hd||0,md=(md||0)*pd,[left,right].indexOf(sd)>=0?{x:md,y:hd}:{x:hd,y:md}}function offset(Ra){var qa=Ra.state,rd=Ra.options,sd=Ra.name,pd=rd.offset,fd=pd===void 0?[0,0]:pd,hd=placements.reduce(function(vd,Nd){return vd[Nd]=distanceAndSkiddingToXY(Nd,qa.rects,fd),vd},{}),md=hd[qa.placement],gd=md.x,yd=md.y;qa.modifiersData.popperOffsets!=null&&(qa.modifiersData.popperOffsets.x+=gd,qa.modifiersData.popperOffsets.y+=yd),qa.modifiersData[sd]=hd}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(Ra){var qa=Ra.state,rd=Ra.name;qa.modifiersData[rd]=computeOffsets({reference:qa.rects.reference,element:qa.rects.popper,strategy:"absolute",placement:qa.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(Ra){return Ra==="x"?"y":"x"}function preventOverflow(Ra){var qa=Ra.state,rd=Ra.options,sd=Ra.name,pd=rd.mainAxis,fd=pd===void 0?!0:pd,hd=rd.altAxis,md=hd===void 0?!1:hd,gd=rd.boundary,yd=rd.rootBoundary,vd=rd.altBoundary,Nd=rd.padding,Md=rd.tether,Ld=Md===void 0?!0:Md,Fd=rd.tetherOffset,Hd=Fd===void 0?0:Fd,Vd=detectOverflow(qa,{boundary:gd,rootBoundary:yd,padding:Nd,altBoundary:vd}),Gd=getBasePlacement(qa.placement),Ud=getVariation(qa.placement),qd=!Ud,Wd=getMainAxisFromPlacement(Gd),Kd=getAltAxis(Wd),Xd=qa.modifiersData.popperOffsets,df=qa.rects.reference,Ef=qa.rects.popper,pf=typeof Hd=="function"?Hd(Object.assign({},qa.rects,{placement:qa.placement})):Hd,mf=typeof pf=="number"?{mainAxis:pf,altAxis:pf}:Object.assign({mainAxis:0,altAxis:0},pf),_f=qa.modifiersData.offset?qa.modifiersData.offset[qa.placement]:null,xf={x:0,y:0};if(Xd){if(fd){var Cf,If=Wd==="y"?top:left,Sf=Wd==="y"?bottom:right,wf=Wd==="y"?"height":"width",Pf=Xd[Wd],lh=Pf+Vd[If],xh=Pf-Vd[Sf],Eh=Ld?-Ef[wf]/2:0,Mh=Ud===start?df[wf]:Ef[wf],dh=Ud===start?-Ef[wf]:-df[wf],eh=qa.elements.arrow,fh=Ld&&eh?getLayoutRect(eh):{width:0,height:0},Sh=qa.modifiersData["arrow#persistent"]?qa.modifiersData["arrow#persistent"].padding:getFreshSideObject(),vh=Sh[If],Df=Sh[Sf],Af=within(0,df[wf],fh[wf]),_h=qd?df[wf]/2-Eh-Af-vh-mf.mainAxis:Mh-Af-vh-mf.mainAxis,Nh=qd?-df[wf]/2+Eh+Af+Df+mf.mainAxis:dh+Af+Df+mf.mainAxis,dm=qa.elements.arrow&&getOffsetParent(qa.elements.arrow),Jf=dm?Wd==="y"?dm.clientTop||0:dm.clientLeft||0:0,oh=(Cf=_f==null?void 0:_f[Wd])!=null?Cf:0,Xh=Pf+_h-oh-Jf,Tm=Pf+Nh-oh,kh=within(Ld?min(lh,Xh):lh,Pf,Ld?max(xh,Tm):xh);Xd[Wd]=kh,xf[Wd]=kh-Pf}if(md){var Zf,th=Wd==="x"?top:left,$h=Wd==="x"?bottom:right,wh=Xd[Kd],fm=Kd==="y"?"height":"width",zh=wh+Vd[th],Mm=wh-Vd[$h],Rm=[top,left].indexOf(Gd)!==-1,tg=(Zf=_f==null?void 0:_f[Kd])!=null?Zf:0,Fm=Rm?zh:wh-df[fm]-Ef[fm]-tg+mf.altAxis,Ym=Rm?wh+df[fm]+Ef[fm]-tg-mf.altAxis:Mm,rg=Ld&&Rm?withinMaxClamp(Fm,wh,Ym):within(Ld?Fm:zh,wh,Ld?Ym:Mm);Xd[Kd]=rg,xf[Kd]=rg-wh}qa.modifiersData[sd]=xf}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(Ra){return{scrollLeft:Ra.scrollLeft,scrollTop:Ra.scrollTop}}function getNodeScroll(Ra){return Ra===getWindow(Ra)||!isHTMLElement(Ra)?getWindowScroll(Ra):getHTMLElementScroll(Ra)}function isElementScaled(Ra){var qa=Ra.getBoundingClientRect(),rd=round(qa.width)/Ra.offsetWidth||1,sd=round(qa.height)/Ra.offsetHeight||1;return rd!==1||sd!==1}function getCompositeRect(Ra,qa,rd){rd===void 0&&(rd=!1);var sd=isHTMLElement(qa),pd=isHTMLElement(qa)&&isElementScaled(qa),fd=getDocumentElement(qa),hd=getBoundingClientRect(Ra,pd,rd),md={scrollLeft:0,scrollTop:0},gd={x:0,y:0};return(sd||!sd&&!rd)&&((getNodeName(qa)!=="body"||isScrollParent(fd))&&(md=getNodeScroll(qa)),isHTMLElement(qa)?(gd=getBoundingClientRect(qa,!0),gd.x+=qa.clientLeft,gd.y+=qa.clientTop):fd&&(gd.x=getWindowScrollBarX(fd))),{x:hd.left+md.scrollLeft-gd.x,y:hd.top+md.scrollTop-gd.y,width:hd.width,height:hd.height}}function order(Ra){var qa=new Map,rd=new Set,sd=[];Ra.forEach(function(fd){qa.set(fd.name,fd)});function pd(fd){rd.add(fd.name);var hd=[].concat(fd.requires||[],fd.requiresIfExists||[]);hd.forEach(function(md){if(!rd.has(md)){var gd=qa.get(md);gd&&pd(gd)}}),sd.push(fd)}return Ra.forEach(function(fd){rd.has(fd.name)||pd(fd)}),sd}function orderModifiers(Ra){var qa=order(Ra);return modifierPhases.reduce(function(rd,sd){return rd.concat(qa.filter(function(pd){return pd.phase===sd}))},[])}function debounce(Ra){var qa;return function(){return qa||(qa=new Promise(function(rd){Promise.resolve().then(function(){qa=void 0,rd(Ra())})})),qa}}function mergeByName(Ra){var qa=Ra.reduce(function(rd,sd){var pd=rd[sd.name];return rd[sd.name]=pd?Object.assign({},pd,sd,{options:Object.assign({},pd.options,sd.options),data:Object.assign({},pd.data,sd.data)}):sd,rd},{});return Object.keys(qa).map(function(rd){return qa[rd]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var Ra=arguments.length,qa=new Array(Ra),rd=0;rdRa.length)&&(qa=Ra.length);for(var rd=0,sd=Array(qa);rd=0;--dh){var eh=this.tryEntries[dh],fh=eh.completion;if(eh.tryLoc==="root")return Mh("end");if(eh.tryLoc<=this.prev){var Sh=hd.call(eh,"catchLoc"),vh=hd.call(eh,"finallyLoc");if(Sh&&vh){if(this.prev=0;--Mh){var dh=this.tryEntries[Mh];if(dh.tryLoc<=this.prev&&hd.call(dh,"finallyLoc")&&this.prev=0;--Eh){var Mh=this.tryEntries[Eh];if(Mh.finallyLoc===xh)return this.complete(Mh.completion,Mh.afterLoc),wf(Mh),qd}},catch:function(xh){for(var Eh=this.tryEntries.length-1;Eh>=0;--Eh){var Mh=this.tryEntries[Eh];if(Mh.tryLoc===xh){var dh=Mh.completion;if(dh.type==="throw"){var eh=dh.arg;wf(Mh)}return eh}}throw Error("illegal catch attempt")},delegateYield:function(xh,Eh,Mh){return this.delegate={iterator:lh(xh),resultName:Eh,nextLoc:Mh},this.method==="next"&&(this.arg=sd),qd}},pd}Ra.exports=rd,Ra.exports.__esModule=!0,Ra.exports.default=Ra.exports}(M$1);var R$1=M$1.exports(),z$1=R$1;try{regeneratorRuntime=R$1}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=R$1:Function("r","regeneratorRuntime = r")(R$1)}function T$1(Ra,qa){return function(rd){if(Array.isArray(rd))return rd}(Ra)||function(rd,sd){var pd=rd==null?null:typeof Symbol<"u"&&rd[Symbol.iterator]||rd["@@iterator"];if(pd!=null){var fd,hd,md,gd,yd=[],vd=!0,Nd=!1;try{if(md=(pd=pd.call(rd)).next,sd===0){if(Object(pd)!==pd)return;vd=!1}else for(;!(vd=(fd=md.call(pd)).done)&&(yd.push(fd.value),yd.length!==sd);vd=!0);}catch(Md){Nd=!0,hd=Md}finally{try{if(!vd&&pd.return!=null&&(gd=pd.return(),Object(gd)!==gd))return}finally{if(Nd)throw hd}}return yd}}(Ra,qa)||F$1(Ra,qa)||function(){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 D$1(Ra){var qa=function(rd,sd){if(L$1(rd)!="object"||!rd)return rd;var pd=rd[Symbol.toPrimitive];if(pd!==void 0){var fd=pd.call(rd,sd||"default");if(L$1(fd)!="object")return fd;throw new TypeError("@@toPrimitive must return a primitive value.")}return(sd==="string"?String:Number)(rd)}(Ra,"string");return L$1(qa)=="symbol"?qa:qa+""}function H$1(Ra,qa,rd){return(qa=D$1(qa))in Ra?Object.defineProperty(Ra,qa,{value:rd,enumerable:!0,configurable:!0,writable:!0}):Ra[qa]=rd,Ra}var G$1=defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(Ra,qa){var rd=qa.emit,sd=computed(function(){return{width:"".concat(Ra.size,"px"),height:"".concat(Ra.size,"px"),background:"hsl(".concat(Ra.hue,", 100%, 50%)")}});return{saturationStyle:sd,sliderStyle:computed(function(){return{top:"".concat((100-Ra.value)/100*Ra.size-5,"px"),left:"".concat(Ra.saturation*Ra.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(pd){var fd=pd.target.getBoundingClientRect(),hd=fd.left,md=fd.top,gd=function(vd){var Nd,Md;vd instanceof MouseEvent?(Nd=vd.clientX,Md=vd.clientY):vd instanceof TouchEvent&&(Nd=vd.touches[0].clientX,Md=vd.touches[0].clientY);var Ld=Nd-hd,Fd=Md-md;Ld<0&&(Ld=0),Fd<0&&(Fd=0),Ld>Ra.size&&(Ld=Ra.size),Fd>Ra.size&&(Fd=Ra.size);var Hd=Ld/Ra.size*100,Vd=100-Fd/Ra.size*100;rd("change",Hd,Vd)};gd(pd);var yd=function(){document.removeEventListener("mousemove",gd),document.removeEventListener("mouseup",yd),document.removeEventListener("touchmove",gd),document.removeEventListener("touchend",yd)};gd(pd),pd instanceof MouseEvent&&(document.addEventListener("mousemove",gd),document.addEventListener("mouseup",yd)),pd instanceof TouchEvent&&(pd.preventDefault(),document.addEventListener("touchmove",gd,{passive:!1}),document.addEventListener("touchend",yd))}}}});function V$1(Ra,qa){qa===void 0&&(qa={});var rd=qa.insertAt;if(Ra&&typeof document<"u"){var sd=document.head||document.getElementsByTagName("head")[0],pd=document.createElement("style");pd.type="text/css",rd==="top"&&sd.firstChild?sd.insertBefore(pd,sd.firstChild):sd.appendChild(pd),pd.styleSheet?pd.styleSheet.cssText=Ra:pd.appendChild(document.createTextNode(Ra))}}V$1(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),G$1.render=function(Ra,qa,rd,sd,pd,fd){return openBlock(),createElementBlock("div",{class:"saturation",style:normalizeStyle(Ra.saturationStyle),onMousedown:qa[0]||(qa[0]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"])),onTouchstart:qa[1]||(qa[1]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"]))},[qa[2]||(qa[2]=createBaseVNode("div",{class:"saturation-white"},null,-1)),qa[3]||(qa[3]=createBaseVNode("div",{class:"saturation-black"},null,-1)),createBaseVNode("div",{class:"slider",style:normalizeStyle(Ra.sliderStyle)},null,4)],36)},G$1.__scopeId="data-v-24517fec",G$1.__file="src/picker/Saturation.vue";var Y$1=defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(Ra,qa){var rd=qa.emit,sd=computed(function(){return{top:"".concat((1-Ra.hue/360)*Ra.height-2,"px"),height:"".concat(4,"px")}}),pd=ref$1();return onMounted(function(){(function(){if(pd.value){pd.value.width=Ra.width,pd.value.height=Ra.height;var fd=pd.value.getContext("2d");if(fd){var hd=fd.createLinearGradient(0,0,0,Ra.height);hd.addColorStop(0,"#FF0000"),hd.addColorStop(.17,"#FF00FF"),hd.addColorStop(.34,"#0000FF"),hd.addColorStop(.51,"#00FFFF"),hd.addColorStop(.68,"#00FF00"),hd.addColorStop(.17*5,"#FFFF00"),hd.addColorStop(1,"#FF0000"),fd.fillStyle=hd,fd.fillRect(0,0,Ra.width,Ra.height)}}})()}),{canvas:pd,sliderStyle:sd,onSelect:function(fd){var hd=fd.target.getBoundingClientRect().top,md=function(yd){var vd;yd instanceof MouseEvent?vd=yd.clientY:yd instanceof TouchEvent&&(vd=yd.touches[0].clientY);var Nd=vd-hd;Nd<0&&(Nd=0),Nd>Ra.height&&(Nd=Ra.height);var Md=-100*Nd/Ra.height+100;rd("change",360*Md/100)},gd=function(){document.removeEventListener("mousemove",md),document.removeEventListener("mouseup",gd),document.removeEventListener("touchmove",md),document.removeEventListener("touchend",gd)};md(fd),fd instanceof MouseEvent&&(document.addEventListener("mousemove",md),document.addEventListener("mouseup",gd)),fd instanceof TouchEvent&&(fd.preventDefault(),document.addEventListener("touchmove",md,{passive:!1}),document.addEventListener("touchend",gd))}}}}),$={ref:"canvas"};V$1(".hue[data-v-78b9f4f0]{position:relative;touch-action:none}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Y$1.render=function(Ra,qa,rd,sd,pd,fd){return openBlock(),createElementBlock("div",{class:"hue",onMousedown:qa[0]||(qa[0]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"])),onTouchstart:qa[1]||(qa[1]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"]))},[createBaseVNode("canvas",$,null,512),createBaseVNode("div",{class:"slider",style:normalizeStyle(Ra.sliderStyle)},null,4)],32)},Y$1.__scopeId="data-v-78b9f4f0",Y$1.__file="src/picker/Hue.vue";var X$1=defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(Ra,qa){var rd=qa.emit,sd=computed(function(){return{top:"".concat(Ra.alpha*Ra.height-2,"px"),height:"".concat(4,"px")}}),pd=ref$1(),fd=function(){var hd=pd.value.getContext("2d");pd.value.width=Ra.width,pd.value.height=Ra.height;var md=function(yd){var vd=document.createElement("canvas"),Nd=vd.getContext("2d"),Md=2*yd;return vd.width=Md,vd.height=Md,Nd.fillStyle="#ffffff",Nd.fillRect(0,0,Md,Md),Nd.fillStyle="#ccd5db",Nd.fillRect(0,0,yd,yd),Nd.fillRect(yd,yd,yd,yd),vd}(5);hd.fillStyle=hd.createPattern(md,"repeat"),hd.fillRect(0,0,Ra.width,Ra.height);var gd=hd.createLinearGradient(0,0,0,Ra.height);gd.addColorStop(.01,"rgba(255,255,255,0)"),gd.addColorStop(.99,Ra.color),hd.fillStyle=gd,hd.fillRect(0,0,Ra.width,Ra.height)};return watch(function(){return Ra.color},function(){fd()}),onMounted(function(){fd()}),{canvas:pd,sliderStyle:sd,onSelect:function(hd){var md=hd.target.getBoundingClientRect().top,gd=function(vd){var Nd;vd instanceof MouseEvent?Nd=vd.clientY:vd instanceof TouchEvent&&(Nd=vd.touches[0].clientY);var Md=Nd-md;Md<0&&(Md=0),Md>Ra.height&&(Md=Ra.height);var Ld=parseFloat((Md/Ra.height).toFixed(2));rd("change",Ld)},yd=function(){document.removeEventListener("mousemove",gd),document.removeEventListener("mouseup",yd),document.removeEventListener("touchmove",gd),document.removeEventListener("touchend",yd)};gd(hd),hd instanceof MouseEvent&&(document.addEventListener("mousemove",gd),document.addEventListener("mouseup",yd)),hd instanceof TouchEvent&&(hd.preventDefault(),document.addEventListener("touchmove",gd,{passive:!1}),document.addEventListener("touchend",yd))}}}}),J$1={ref:"canvas"};V$1(".alpha[data-v-24dc9656]{position:relative;touch-action:none}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),X$1.render=function(Ra,qa,rd,sd,pd,fd){return openBlock(),createElementBlock("div",{class:"alpha",onMousedown:qa[0]||(qa[0]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"])),onTouchstart:qa[1]||(qa[1]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"]))},[createBaseVNode("canvas",J$1,null,512),createBaseVNode("div",{class:"slider",style:normalizeStyle(Ra.sliderStyle)},null,4)],32)},X$1.__scopeId="data-v-24dc9656",X$1.__file="src/picker/Alpha.vue";var q$1={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},U$1={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},W$1={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function K$1(Ra,qa){var rd=Object.keys(Ra);if(Object.getOwnPropertySymbols){var sd=Object.getOwnPropertySymbols(Ra);qa&&(sd=sd.filter(function(pd){return Object.getOwnPropertyDescriptor(Ra,pd).enumerable})),rd.push.apply(rd,sd)}return rd}function Q$1(Ra){for(var qa=1;qa1}),gd=computed(function(){var vd=Ra.options,Nd=Ra.showAlpha,Md=Ra.value;return Array.isArray(vd)?Nd?vd.map(function(Ld){return q$1[Ld]}).filter(function(Ld){return!Ld.includes(Md)}):vd.map(function(Ld){return U$1[Ld]}).filter(function(Ld){return!Ld.includes(Md)}):[]}),yd=function(vd){var Nd,Md,Ld=vd.target;!((Nd=unref(sd))!==null&&Nd!==void 0&&Nd.isEqualNode(Ld))&&(!((Md=unref(sd))===null||Md===void 0)&&Md.contains(Ld))||(fd.value=!1)};return onMounted(function(){document.addEventListener("mouseup",yd,!1)}),onUnmounted(function(){document.removeEventListener("mouseup",yd,!1)}),{targetRef:sd,selectorRef:pd,selectorStyle:hd,isShowSelector:fd,isNeedSelect:md,formatOptions:gd,onShow:function(){md.value&&(fd.value=!0)},onFormatChange:function(vd){rd("change",W$1[vd])}}}}),re={class:"format"},ne={key:0,class:"arrow"},oe=["onClick"];V$1(".format[data-v-5f6e8f5e]{position:relative}.label[data-v-5f6e8f5e]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;position:relative;width:60px}[pick-colors-theme=dark] .label[data-v-5f6e8f5e]{background:#252930;color:#999}.arrow[data-v-5f6e8f5e]{height:6px;margin-bottom:4px;margin-left:5px;transform:rotate(135deg);width:6px}.arrow[data-v-5f6e8f5e],[pick-colors-theme=dark] .arrow[data-v-5f6e8f5e]{border-right:1px solid #999;border-top:1px solid #999}.selector[data-v-5f6e8f5e]{align-items:center;background:#f7f8f9;border-radius:5px;box-shadow:0 0 16px 0 rgba(0,0,0,.16);cursor:pointer;display:flex;flex-direction:column;font-weight:400;justify-content:center;padding:4px}[pick-colors-theme=dark] .selector[data-v-5f6e8f5e]{background:#252930;color:#999}.selector-item[data-v-5f6e8f5e]{align-items:center;display:flex;height:30px;justify-content:center;width:60px}.selector-item[data-v-5f6e8f5e]:hover{background:#e1f2fe}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]{color:#fff}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]:hover{background:#0087fa}.active-selector-item[data-v-5f6e8f5e]{background:#e1f2fe}[pick-colors-theme=dark] .active-selector-item[data-v-5f6e8f5e]{background:#0087fa}.v-enter-active[data-v-5f6e8f5e],.v-leave-active[data-v-5f6e8f5e]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-5f6e8f5e],.v-leave-to[data-v-5f6e8f5e]{opacity:0;transform:scaleY(0)}"),te.render=function(Ra,qa,rd,sd,pd,fd){return openBlock(),createElementBlock("div",re,[createBaseVNode("div",{class:"label",ref:"targetRef",onClick:qa[0]||(qa[0]=function(){return Ra.onShow&&Ra.onShow.apply(Ra,arguments)})},[createBaseVNode("span",null,toDisplayString(Ra.value),1),Ra.isNeedSelect?(openBlock(),createElementBlock("div",ne)):createCommentVNode("v-if",!0)],512),createVNode(Transition$1,null,{default:withCtx(function(){return[Ra.isShowSelector?(openBlock(),createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:normalizeStyle(Ra.selectorStyle)},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ra.formatOptions,function(hd){return openBlock(),createElementBlock("div",{class:"selector-item",key:hd,onClick:function(md){return Ra.onFormatChange(hd)}},toDisplayString(hd),9,oe)}),128))],4)):createCommentVNode("v-if",!0)]}),_:1})])},te.__scopeId="data-v-5f6e8f5e",te.__file="src/picker/input-value/FormatValue.vue";var ae$1=defineComponent({name:"Input",components:{FormatValue:te},props:{format:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number},showAlpha:{type:Boolean},formatOptions:{type:[Boolean,Array]}},emits:["change","focus","blur","enter","formatChange"],setup:function(Ra,qa){var rd=qa.emit;return{onInput:function(sd){var pd;rd("change",(pd=sd.target)===null||pd===void 0?void 0:pd.value)},valueStyle:computed(function(){return{minWidth:"".concat(Ra.width,"px"),maxWidth:"".concat(Ra.width,"px"),width:"".concat(Ra.width,"px")}}),onFocus:function(){rd("focus")},onBlur:function(){rd("blur")},onEnter:function(){rd("enter")},onFormatChange:function(sd){rd("formatChange",sd)}}}}),ie={class:"input"},ce$1=[".value"];function le(Ra,qa){var rd=Object.keys(Ra);if(Object.getOwnPropertySymbols){var sd=Object.getOwnPropertySymbols(Ra);qa&&(sd=sd.filter(function(pd){return Object.getOwnPropertyDescriptor(Ra,pd).enumerable})),rd.push.apply(rd,sd)}return rd}function ue(Ra){for(var qa=1;qa0?parseFloat(sd.toFixed(2)):sd),qa){case"hsl":var yd=se(fd,hd/100,md/100);return"hsla(".concat(fd.toFixed(0),", ").concat(Math.round(100*yd[1]),"%, ").concat(Math.round(100*yd[2]),"%, ").concat(gd,")");case"hsv":return"hsva(".concat(fd.toFixed(0),", ").concat(Math.round(hd),"%, ").concat(Math.round(md),"%, ").concat(gd,")");case"rgb":var vd=he(fd,hd,md),Nd=vd.r,Md=vd.g,Ld=vd.b;return"rgba(".concat(Nd,", ").concat(Md,", ").concat(Ld,", ").concat(gd,")");default:return"".concat(pe(he(fd,hd,md))).concat(de(255*gd))}else switch(qa){case"hsl":var Fd=se(fd,hd/100,md/100);return"hsl(".concat(fd.toFixed(0),", ").concat(Math.round(100*Fd[1]),"%, ").concat(Math.round(100*Fd[2]),"%)");case"hsv":return"hsv(".concat(fd.toFixed(0),", ").concat(Math.round(hd),"%, ").concat(Math.round(md),"%)");case"rgb":var Hd=he(fd,hd,md),Vd=Hd.r,Gd=Hd.g,Ud=Hd.b;return"rgb(".concat(Vd,", ").concat(Gd,", ").concat(Ud,")");default:return pe(he(fd,hd,md))}},ge=function(Ra){var qa=Ra.r,rd=Ra.g,sd=Ra.b;qa=ve(qa,255),rd=ve(rd,255),sd=ve(sd,255);var pd,fd=Math.max(qa,rd,sd),hd=Math.min(qa,rd,sd),md=fd,gd=fd-hd,yd=fd===0?0:gd/fd;if(fd===hd)pd=0;else{switch(fd){case qa:pd=(rd-sd)/gd+(rd2&&arguments[2]!==void 0)||arguments[2])switch(qa){case"rgb":var rd=we(Ra),sd=rd.r,pd=rd.g,fd=rd.b,hd=rd.a;return ue(ue({},ge({r:sd,g:pd,b:fd})),{},{a:+hd});case"hsv":var md=ke(Ra);return{h:md.h,s:md.s,v:md.v,a:md.a};case"hsl":var gd=Se(Ra),yd=gd.h,vd=gd.s,Nd=gd.l,Md=gd.a;return ue(ue({},ye({h:yd,s:vd,l:Nd})),{},{a:+Md});default:var Ld=be$1(Ra),Fd=Ld.r,Hd=Ld.g,Vd=Ld.b,Gd=Ld.a;return ue(ue({},ge({r:Fd,g:Hd,b:Vd})),{},{a:Gd/255})}else switch(qa){case"rgb":return ue(ue({},ge(we(Ra))),{},{a:1});case"hsv":var Ud=ke(Ra);return{h:Ud.h,s:Ud.s,v:Ud.v,a:1};case"hsl":return ue(ue({},ye(Se(Ra))),{},{a:1});default:return ue(ue({},ge(be$1(Ra))),{},{a:1})}},Oe=function(Ra){return Ra.match(/^#/)?"hex":Ra.match(/^rgb/)?"rgb":Ra.match(/^hsl/)?"hsl":Ra.match(/^hsv/)?"hsv":"hex"},Ee=function(Ra){var qa=Ra.h,rd=Ra.s,sd=Ra.v,pd=Ra.a;return isNaN(qa)&&isNaN(rd)&&isNaN(sd)?null:(isNaN(qa)&&(qa=0),isNaN(rd)&&(rd=0),isNaN(sd)&&(sd=0),isNaN(pd)&&(pd=1),{h:qa,s:rd,v:sd,a:pd})},Ae=defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(Ra){var qa=ref$1(),rd=inject("theme",{theme:"light"}).theme,sd=computed(function(){return parseFloat((Ra.width||Ra.size)+"")}),pd=computed(function(){return parseFloat((Ra.height||Ra.size)+"")}),fd=computed(function(){return{width:"".concat(unref(sd),"px"),height:"".concat(unref(pd),"px"),border:Ra.border?"1px solid ".concat(unref(rd)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(Ra.borderRadius,"px"),boxShadow:Ra.selected?"0 0 3px 2px ".concat(unref(rd)==="dark"?"#2681ff":"#1890ff"):""}}),hd=function(){var md=qa.value.getContext("2d");qa.value.width=unref(sd),qa.value.height=unref(pd);var gd=function(yd){var vd=document.createElement("canvas"),Nd=vd.getContext("2d"),Md=2*yd;return vd.width=Md,vd.height=Md,Nd.fillStyle="#ffffff",Nd.fillRect(0,0,Md,Md),Nd.fillStyle="#ccd5db",Nd.fillRect(0,0,yd,yd),Nd.fillRect(yd,yd,yd,yd),vd}(5);md.fillStyle=md.createPattern(gd,"repeat"),md.fillRect(0,0,unref(sd),unref(pd)),md.fillStyle=Ra.value,md.fillRect(0,0,unref(sd),unref(pd))};return watch(function(){return Ra.value},function(){hd()}),onMounted(function(){hd()}),{canvas:qa,colorItemStyle:fd}}}),Ne=["draggable"];V$1(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Ae.render=function(Ra,qa,rd,sd,pd,fd){return openBlock(),createElementBlock("canvas",{class:"color-item",style:normalizeStyle(Ra.colorItemStyle),ref:"canvas",draggable:Ra.draggable},null,12,Ne)},Ae.__scopeId="data-v-02da71fd",Ae.__file="src/color-item/ColorItem.vue";var Ie=defineComponent({name:"Colors",components:{ColorItem:Ae},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(Ra,qa){var rd=qa.emit;return{onSelectColor:function(sd,pd){rd("change",sd,pd)},useColors:computed(function(){return Ra.colors.map(function(sd){return xe(sd,"hex",!0)})})}}}),Fe={class:"colors"};function _e$1(Ra,qa){var rd=Object.keys(Ra);if(Object.getOwnPropertySymbols){var sd=Object.getOwnPropertySymbols(Ra);qa&&(sd=sd.filter(function(pd){return Object.getOwnPropertyDescriptor(Ra,pd).enumerable})),rd.push.apply(rd,sd)}return rd}function Le(Ra){for(var qa=1;qa0?(openBlock(),createBlock(vd,{key:0,class:"colors",colors:Ra.colors,"selected-index":Ra.selectColorIndex,onChange:Ra.onSelectColor},null,8,["colors","selected-index","onChange"])):createCommentVNode("v-if",!0)])],4)},Pe.__scopeId="data-v-6ceadec6",Pe.__file="src/picker/Picker.vue";var Be=defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(Ra){var qa=inject("theme",{theme:"light"}).theme;return{addColorItemStyle:computed(function(){return{width:"".concat(Ra.size,"px"),height:"".concat(Ra.size,"px"),lineHeight:"".concat(Ra.size,"px"),boxShadow:Ra.selected?"0 0 3px 2px ".concat(unref(qa)==="dark"?"#2681ff":"#1890ff"):""}})}}});V$1(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),Be.render=function(Ra,qa,rd,sd,pd,fd){return openBlock(),createElementBlock("svg",{class:"add-color-item",style:normalizeStyle(Ra.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},qa[0]||(qa[0]=[createBaseVNode("g",{class:"container"},[createBaseVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},Be.__scopeId="data-v-ceb1719c",Be.__file="src/add-color-item/AddColorItem.vue";var Re=defineComponent({name:"ColorPicker",components:{ColorItem:Ae,Picker:Pe,AddColorItem:Be},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean],default:"body"},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}},position:{type:String},placement:{type:String},formatOptions:{type:[Boolean,Array],default:!1}},emits:["change","update:value","update:showPicker","overflowMax","closePicker","formatChange"],setup:function(Ra,qa){var rd=qa.emit,sd=ref$1([]),pd=computed(function(){return unref(sd).map(function(pf){return xe(pf,"hex",Ra.showAlpha)})}),fd=ref$1("hex");watch(function(){return Ra.format},function(){fd.value=Ra.format},{immediate:!0}),watch(function(){return Ra.value},function(){var pf=Ra.value||"",mf=Array.isArray(pf)?pf:[pf];sd.value=mf.map(function(_f){return xe(_f,unref(fd),Ra.showAlpha)})},{immediate:!0});var hd=ref$1(void 0),md=computed(function(){return unref(sd)[unref(hd)]}),gd=ref$1(!1);watch(function(){return Ra.showPicker},function(){gd.value=Ra.showPicker},{immediate:!0});var yd,vd,Nd=ref$1(null),Md=ref$1(null),Ld=ee(Nd,Md,{defaultStyle:{zIndex:Ra.zIndex},strategy:Ra.position,placement:Ra.placement}).style,Fd=function(){unref(Nd)==null&&(Nd.value=unref(Ef)[0]),unref(hd)==null&&(hd.value=0),Ra.showPicker===void 0?gd.value=!0:rd("update:showPicker",!0)},Hd=function(){hd.value=void 0,Ra.showPicker===void 0?gd.value=!1:rd("update:showPicker",!1),rd("closePicker",toRaw(Array.isArray(Ra.value)||Ra.addColor?unref(sd):unref(sd)[0]))},Vd=ref$1(),Gd=function(){var pf=j$1(z$1.mark(function mf(_f){var xf,Cf,If,Sf;return z$1.wrap(function(wf){for(;;)switch(wf.prev=wf.next){case 0:if(Cf=_f.target,(If=(xf=Cf.dataset)===null||xf===void 0?void 0:xf.index)!=null&&If!==""){wf.next=4;break}return wf.abrupt("return");case 4:if(Sf=+If,unref(hd)!==Sf){wf.next=7;break}return wf.abrupt("return");case 7:unref(hd)!=null&&unref(hd)!==Sf?(Hd(),yd&&clearTimeout(yd),yd=setTimeout(function(){Fd(),clearTimeout(yd)},100)):Fd(),hd.value=Sf,Nd.value=Cf;case 10:case"end":return wf.stop()}},mf)}));return function(mf){return pf.apply(this,arguments)}}(),Ud=function(){var pf=j$1(z$1.mark(function mf(_f){var xf,Cf,If,Sf,wf;return z$1.wrap(function(Pf){for(;;)switch(Pf.prev=Pf.next){case 0:if(Sf=_f.target,!(!((xf=unref(Vd))!==null&&xf!==void 0&&xf.isEqualNode(Sf))&&(!((Cf=unref(Vd))===null||Cf===void 0)&&Cf.contains(Sf)))){Pf.next=4;break}return Pf.abrupt("return");case 4:if(wf=(If=unref(Md))===null||If===void 0?void 0:If.$el,!(wf!=null&&wf.contains(Sf))){Pf.next=8;break}return Pf.abrupt("return");case 8:vd&&clearTimeout(vd),vd=setTimeout(function(){unref(gd)&&Hd()},0);case 10:case"end":return Pf.stop()}},mf)}));return function(mf){return pf.apply(this,arguments)}}();watch(gd,function(){unref(gd)&&(Fd(),clearTimeout(vd))});var qd,Wd=ref$1(Ra.max>unref(sd).length),Kd=computed(function(){return typeof Ra.popupContainer=="string"||L$1(Ra.popupContainer)==="object"&&Ra.popupContainer!=null?Ra.popupContainer:"body"}),Xd=computed(function(){return typeof Ra.popupContainer=="boolean"&&Ra.popupContainer===!1}),df=computed(function(){return Ra.theme});watch(function(){return[Ra.theme,unref(Md)]},function(){nextTick$1(function(){var pf,mf;(pf=unref(Vd))===null||pf===void 0||pf.setAttribute("pick-colors-theme",unref(df)),(mf=unref(Md))===null||mf===void 0||(mf=mf.$el)===null||mf===void 0||mf.setAttribute("pick-colors-theme",unref(df))})},{immediate:!0}),provide("theme",{theme:df});var Ef=ref$1([]);return onMounted(function(){document.addEventListener("mouseup",Ud,!1),Ra.showPicker&&Fd()}),onUnmounted(function(){document.removeEventListener("mouseup",Ud,!1),yd&&(clearTimeout(yd),yd=null),vd&&(clearTimeout(vd),vd=null)}),{valueList:sd,colorItemSelected:function(pf){return(Ra.addColor?unref(sd).length>0:unref(sd).length>1)&&unref(hd)===pf},selectedColor:md,selectedIndex:hd,isShowPicker:gd,addColorItemShow:Wd,onPickerChange:function(pf){var mf=unref(hd),_f=unref(sd).slice(),xf=unref(sd).length;if(mf!=null){mf>=0?_f[mf]=pf:(hd.value=xf,_f.push(pf));var Cf="";Cf=Array.isArray(Ra.value)||Ra.addColor?_f:pf,sd.value=Array.isArray(Cf)?Cf:[Cf],rd("update:value",Cf),rd("change",Cf,pf,mf),Ra.addColor&&xf>=Ra.max&&(Wd.value=!1,rd("overflowMax"))}},colorPicker:Vd,onColorClick:Gd,pickerRef:Md,onColorItemDragStart:function(pf){pf.dataTransfer.effectAllowed="move";var mf=pf.target;qd=+mf.dataset.index},onColorItemDragOver:function(pf){},onColorItemDrop:function(pf){var mf=+pf.target.dataset.index,_f=_$1(unref(sd)),xf=_f[qd];_f.splice(qd,1);var Cf=_f.slice(0,mf),If=_f.splice(mf),Sf=Cf.concat([xf]).concat(If);rd("update:value",Sf),rd("change",Sf,Sf[qd],qd)},colorItemsRef:Ef,pickerStyle:Ld,values:pd,teleportDisabled:Xd,toPopupContainer:Kd,formatValue:fd,onFormatChange:function(pf){fd.value=pf,rd("formatChange",pf)}}}});V$1(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),Re.render=function(Ra,qa,rd,sd,pd,fd){var hd=resolveComponent("color-item"),md=resolveComponent("add-color-item"),gd=resolveComponent("picker");return openBlock(),createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:qa[0]||(qa[0]=withModifiers(function(){return Ra.onColorItemDragStart&&Ra.onColorItemDragStart.apply(Ra,arguments)},["stop"])),onDragover:qa[1]||(qa[1]=withModifiers(function(){return Ra.onColorItemDragOver&&Ra.onColorItemDragOver.apply(Ra,arguments)},["prevent","stop"])),onDrop:qa[2]||(qa[2]=withModifiers(function(){return Ra.onColorItemDrop&&Ra.onColorItemDrop.apply(Ra,arguments)},["prevent","stop"])),onClick:qa[3]||(qa[3]=withModifiers(function(){return Ra.onColorClick&&Ra.onColorClick.apply(Ra,arguments)},["stop"]))},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ra.values,function(yd,vd){return openBlock(),createBlock(hd,{class:"color-item",key:vd,ref_for:!0,ref:function(Nd){return Ra.colorItemsRef[vd]=Nd},size:Ra.size,width:Ra.width,height:Ra.height,value:yd,selected:Ra.colorItemSelected(vd),"data-index":vd,draggable:Ra.valueList.length>1,format:Ra.formatValue},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),Ra.addColor&&Ra.addColorItemShow?(openBlock(),createBlock(md,{key:0,class:"add-color-item",ref:"addColorItem",selected:Ra.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):createCommentVNode("v-if",!0),(openBlock(),createBlock(Teleport,{to:Ra.toPopupContainer,disabled:Ra.teleportDisabled},[createVNode(Transition$1,null,{default:withCtx(function(){return[Ra.isShowPicker?(openBlock(),createBlock(gd,{key:0,class:"picker",style:normalizeStyle(Ra.pickerStyle),ref:"pickerRef",value:Ra.selectedColor,format:Ra.formatValue,"show-alpha":Ra.showAlpha,colors:Ra.colors,formatOptions:Ra.formatOptions,onChange:Ra.onPickerChange,onFormatChange:Ra.onFormatChange},null,8,["style","value","format","show-alpha","colors","formatOptions","onChange","onFormatChange"])):createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},Re.__scopeId="data-v-3c43ade8",Re.__file="src/ColorPicker.vue";const _hoisted_1$8={class:"space-y-2"},_hoisted_2$5={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_3$4={class:"space-y-2"},_hoisted_4$4={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_5$3={class:"space-y-2"},_hoisted_6$3={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_7$1={class:"space-y-2"},_hoisted_8$1={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_9={class:"space-y-2"},_hoisted_10={class:"space-y-2"},_hoisted_11={class:"space-y-2"},_hoisted_12={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_13={class:"space-y-2"},_hoisted_14={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_15={class:"space-y-2"},_hoisted_16={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_17={class:"space-y-2"},_hoisted_18={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_19={class:"space-y-2"},_hoisted_20={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_21={class:"space-y-2"},_hoisted_22={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_23={class:"space-y-2"},_hoisted_24={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_25={class:"space-y-2"},_sfc_main$R=defineComponent({__name:"RightSlider",setup(Ra){const qa=useStore(),rd=useDisplayStore(),{isDark:sd,primaryColor:pd}=storeToRefs(qa);function fd(){rd.toggleShowCssEditor(),setTimeout(()=>{qa.cssEditor.refresh()},50)}const hd=ref$1(!1),md=ref$1("");watch(hd,()=>{hd.value&&(md.value="")});const gd=useTemplateRef("pickColorsContainer"),yd=ref$1("rgb"),vd=ref$1(["rgb","hex","hsl","hsv"]);return(Nd,Md)=>{const Ld=_sfc_main$1o,Fd=_sfc_main$W,Hd=_sfc_main$X,Vd=_sfc_main$_,Gd=_sfc_main$V,Ud=_sfc_main$$;return openBlock(),createElementBlock("div",{class:normalizeClass(["overflow-hidden border-l-2 border-gray/20 bg-white transition-width duration-300 dark:bg-[#191c20]",{"w-0 border-l-0":!unref(qa).isOpenRightSlider,"w-100":unref(qa).isOpenRightSlider}]),style:{"z-index":"999"}},[createBaseVNode("div",{class:normalizeClass(["space-y-4 h-full overflow-auto p-4 transition-transform",{"translate-x-0":unref(qa).isOpenRightSlider,"translate-x-full":!unref(qa).isOpenRightSlider}])},[createBaseVNode("div",_hoisted_1$8,[Md[14]||(Md[14]=createBaseVNode("h2",null,"主题",-1)),createBaseVNode("div",_hoisted_2$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(themeOptions),({label:qd,value:Wd})=>(openBlock(),createBlock(Ld,{key:Wd,class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).theme===Wd}]),variant:"outline",onClick:Kd=>unref(qa).themeChanged(Wd)},{default:withCtx(()=>[createTextVNode(toDisplayString(qd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_3$4,[Md[15]||(Md[15]=createBaseVNode("h2",null,"字体",-1)),createBaseVNode("div",_hoisted_4$4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fontFamilyOptions),({label:qd,value:Wd})=>(openBlock(),createBlock(Ld,{key:Wd,variant:"outline",class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).fontFamily===Wd}]),onClick:Kd=>unref(qa).fontChanged(Wd)},{default:withCtx(()=>[createTextVNode(toDisplayString(qd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_5$3,[Md[16]||(Md[16]=createBaseVNode("h2",null,"字号",-1)),createBaseVNode("div",_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fontSizeOptions),({value:qd,desc:Wd})=>(openBlock(),createBlock(Ld,{key:qd,variant:"outline",class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).fontSize===qd}]),onClick:Kd=>unref(qa).sizeChanged(qd)},{default:withCtx(()=>[createTextVNode(toDisplayString(Wd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_7$1,[Md[17]||(Md[17]=createBaseVNode("h2",null,"主题色",-1)),createBaseVNode("div",_hoisted_8$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(colorOptions),({label:qd,value:Wd})=>(openBlock(),createBlock(Ld,{key:Wd,class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).primaryColor===Wd}]),variant:"outline",onClick:Kd=>unref(qa).colorChanged(Wd)},{default:withCtx(()=>[createBaseVNode("span",{class:"mr-2 inline-block h-4 w-4 rounded-full",style:normalizeStyle({background:Wd})},null,4),createTextVNode(" "+toDisplayString(qd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_9,[Md[18]||(Md[18]=createBaseVNode("h2",null,"自定义主题色",-1)),createBaseVNode("div",{ref_key:"pickColorsContainer",ref:gd},[unref(gd)?(openBlock(),createBlock(unref(Re),{key:0,value:unref(pd),"onUpdate:value":Md[0]||(Md[0]=qd=>isRef(pd)?pd.value=qd:null),"show-alpha":"",format:unref(yd),"format-options":unref(vd),theme:unref(qa).isDark?"dark":"light","popup-container":unref(gd),onChange:unref(qa).colorChanged},null,8,["value","format","format-options","theme","popup-container","onChange"])):createCommentVNode("",!0)],512)]),createBaseVNode("div",_hoisted_10,[Md[19]||(Md[19]=createBaseVNode("h2",null,"代码块主题",-1)),createBaseVNode("div",null,[createVNode(Ud,{modelValue:unref(qa).codeBlockTheme,"onUpdate:modelValue":[Md[1]||(Md[1]=qd=>unref(qa).codeBlockTheme=qd),unref(qa).codeBlockThemeChanged]},{default:withCtx(()=>[createVNode(Hd,null,{default:withCtx(()=>[createVNode(Fd,{placeholder:"Select a fruit"})]),_:1}),createVNode(Gd,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(codeBlockThemeOptions),({label:qd,value:Wd})=>(openBlock(),createBlock(Vd,{key:qd,value:Wd},{default:withCtx(()=>[createTextVNode(toDisplayString(qd),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])])]),createBaseVNode("div",_hoisted_11,[Md[20]||(Md[20]=createBaseVNode("h2",null,"图注格式",-1)),createBaseVNode("div",_hoisted_12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(legendOptions),({label:qd,value:Wd})=>(openBlock(),createBlock(Ld,{key:Wd,class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).legend===Wd}]),variant:"outline",onClick:Kd=>unref(qa).legendChanged(Wd)},{default:withCtx(()=>[createTextVNode(toDisplayString(qd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_13,[Md[23]||(Md[23]=createBaseVNode("h2",null,"Mac 代码块",-1)),createBaseVNode("div",_hoisted_14,[createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).isMacCodeBlock}]),variant:"outline",onClick:Md[2]||(Md[2]=qd=>!unref(qa).isMacCodeBlock&&unref(qa).macCodeBlockChanged())},{default:withCtx(()=>Md[21]||(Md[21]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(qa).isMacCodeBlock}]),variant:"outline",onClick:Md[3]||(Md[3]=qd=>unref(qa).isMacCodeBlock&&unref(qa).macCodeBlockChanged())},{default:withCtx(()=>Md[22]||(Md[22]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_15,[Md[26]||(Md[26]=createBaseVNode("h2",null,"微信外链转底部引用",-1)),createBaseVNode("div",_hoisted_16,[createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).isCiteStatus}]),variant:"outline",onClick:Md[4]||(Md[4]=qd=>!unref(qa).isCiteStatus&&unref(qa).citeStatusChanged())},{default:withCtx(()=>Md[24]||(Md[24]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(qa).isCiteStatus}]),variant:"outline",onClick:Md[5]||(Md[5]=qd=>unref(qa).isCiteStatus&&unref(qa).citeStatusChanged())},{default:withCtx(()=>Md[25]||(Md[25]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_17,[Md[29]||(Md[29]=createBaseVNode("h2",null,"段落首行缩进",-1)),createBaseVNode("div",_hoisted_18,[createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).isUseIndent}]),variant:"outline",onClick:Md[6]||(Md[6]=qd=>!unref(qa).isUseIndent&&unref(qa).useIndentChanged())},{default:withCtx(()=>Md[27]||(Md[27]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(qa).isUseIndent}]),variant:"outline",onClick:Md[7]||(Md[7]=qd=>unref(qa).isUseIndent&&unref(qa).useIndentChanged())},{default:withCtx(()=>Md[28]||(Md[28]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_19,[Md[32]||(Md[32]=createBaseVNode("h2",null,"自定义 CSS 面板",-1)),createBaseVNode("div",_hoisted_20,[createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(rd).isShowCssEditor}]),variant:"outline",onClick:Md[8]||(Md[8]=qd=>!unref(rd).isShowCssEditor&&fd())},{default:withCtx(()=>Md[30]||(Md[30]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(rd).isShowCssEditor}]),variant:"outline",onClick:Md[9]||(Md[9]=qd=>unref(rd).isShowCssEditor&&fd())},{default:withCtx(()=>Md[31]||(Md[31]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_21,[Md[35]||(Md[35]=createBaseVNode("h2",null,"编辑区位置",-1)),createBaseVNode("div",_hoisted_22,[createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(qa).isEditOnLeft}]),variant:"outline",onClick:Md[10]||(Md[10]=qd=>!unref(qa).isEditOnLeft&&unref(qa).toggleEditOnLeft())},{default:withCtx(()=>Md[33]||(Md[33]=[createTextVNode(" 左侧 ")])),_:1},8,["class"]),createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(qa).isEditOnLeft}]),variant:"outline",onClick:Md[11]||(Md[11]=qd=>unref(qa).isEditOnLeft&&unref(qa).toggleEditOnLeft())},{default:withCtx(()=>Md[34]||(Md[34]=[createTextVNode(" 右侧 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_23,[Md[36]||(Md[36]=createBaseVNode("h2",null,"模式",-1)),createBaseVNode("div",_hoisted_24,[createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(sd)}]),variant:"outline",onClick:Md[12]||(Md[12]=qd=>unref(qa).toggleDark(!1))},{default:withCtx(()=>[createVNode(unref(Sun),{class:"h-4 w-4"})]),_:1},8,["class"]),createVNode(Ld,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(sd)}]),variant:"outline",onClick:Md[13]||(Md[13]=qd=>unref(qa).toggleDark(!0))},{default:withCtx(()=>[createVNode(unref(Moon),{class:"h-4 w-4"})]),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_25,[Md[38]||(Md[38]=createBaseVNode("h2",null,"样式配置",-1)),createVNode(Ld,{onClick:unref(qa).resetStyleConfirm},{default:withCtx(()=>Md[37]||(Md[37]=[createTextVNode(" 重置 ")])),_:1},8,["onClick"])])],2)],2)}}}),_sfc_main$Q=defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Du$3),mergeProps(unref(sd),{class:unref(cn$4)("text-sm text-muted-foreground",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$7={class:"cssEditor-wrapper h-full flex flex-col border-l-2 border-gray/50"},_sfc_main$P=defineComponent({__name:"CssEditor",setup(Ra){const qa=useStore(),rd=useDisplayStore(),sd=ref$1(!1),pd=ref$1(""),fd=ref$1(["",qa.cssContentConfig.active]);function hd(Gd){pd.value=Gd,sd.value=!0}function md(){if(!pd.value.trim()){Ke.error("新建失败,方案名不可为空");return}if(!qa.validatorTabName(pd.value)){Ke.error("不能与现有方案重名");return}qa.renameTab(pd.value),sd.value=!1,Ke.success("修改成功~")}const gd=ref$1(!1),yd=ref$1("");function vd(){if(!yd.value.trim()){Ke.error("新建失败,方案名不可为空");return}if(!qa.validatorTabName(yd.value)){Ke.error("不能与现有方案重名");return}qa.addCssContentTab(yd.value),gd.value=!1,qa.cssContentConfig.active=yd.value,fd.value=[fd.value[1],yd.value],Ke.success("新建成功~")}const Nd=ref$1(!1),Md=ref$1("");function Ld(Gd){Md.value=Gd,Nd.value=!0}function Fd(){const Gd=qa.cssContentConfig.tabs;if(Gd.length===1){Ke.warning("至少保留一个方案");return}let Ud=qa.cssContentConfig.active;Ud===Md.value&&Gd.forEach((qd,Wd)=>{if(qd.name===Md.value){const Kd=Gd[Wd+1]||Gd[Wd-1];Kd&&(Ud=Kd.name)}}),qa.tabChanged(Ud),qa.cssContentConfig.tabs=Gd.filter(qd=>qd.name!==Md.value),Ke.success("删除成功~")}function Hd(){yd.value=`方案${qa.cssContentConfig.tabs.length+1}`,gd.value=!0}function Vd(Gd){if(Gd==="add"){qa.cssContentConfig.active=fd.value[1],Hd();return}fd.value=[fd.value[1],Gd],qa.tabChanged(Gd)}return(Gd,Ud)=>{const qd=_sfc_main$T,Wd=_sfc_main$U,Kd=_sfc_main$14,Xd=_sfc_main$16,df=_sfc_main$Q,Ef=_sfc_main$17,pf=_sfc_main$1e,mf=_sfc_main$1o,_f=_sfc_main$1f,xf=_sfc_main$1g,Cf=_sfc_main$1h,If=_sfc_main$1j,Sf=_sfc_main$1k,wf=_sfc_main$1l,Pf=_sfc_main$1m,lh=_sfc_main$1n,xh=_sfc_main$1p,Eh=_sfc_main$1q,Mh=_sfc_main$1r;return openBlock(),createBlock(Transition$1,{"enter-active-class":"bounceInRight"},{default:withCtx(()=>[withDirectives(createBaseVNode("div",_hoisted_1$7,[createVNode(Kd,{modelValue:unref(qa).cssContentConfig.active,"onUpdate:modelValue":[Ud[0]||(Ud[0]=dh=>unref(qa).cssContentConfig.active=dh),Vd]},{default:withCtx(()=>[createVNode(Wd,{class:"w-full overflow-x-auto"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(qa).cssContentConfig.tabs,dh=>(openBlock(),createBlock(qd,{key:dh.name,value:dh.name,class:"flex-1"},{default:withCtx(()=>[createTextVNode(toDisplayString(dh.title)+" ",1),withDirectives(createVNode(unref(PenLine),{class:"inline size-4 rounded-full p-0.5 transition-color hover:bg-gray-200 dark:hover:bg-gray-600",onClick:eh=>hd(dh.name)},null,8,["onClick"]),[[vShow,unref(qa).cssContentConfig.active===dh.name]]),withDirectives(createVNode(unref(X$6),{class:"inline size-4 rounded-full p-0.5 transition-color hover:bg-gray-200 dark:hover:bg-gray-600",onClick:withModifiers(eh=>Ld(dh.name),["self"])},null,8,["onClick"]),[[vShow,unref(qa).cssContentConfig.active===dh.name]])]),_:2},1032,["value"]))),128)),createVNode(qd,{value:"add"},{default:withCtx(()=>[createVNode(unref(Plus),{class:"h-5 w-5"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),Ud[21]||(Ud[21]=createBaseVNode("textarea",{id:"cssEditor",type:"textarea",placeholder:"Your custom css here."},null,-1)),createVNode(Cf,{open:unref(gd),"onUpdate:open":Ud[4]||(Ud[4]=dh=>isRef(gd)?gd.value=dh:null)},{default:withCtx(()=>[createVNode(xf,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(Ef,null,{default:withCtx(()=>[createVNode(Xd,null,{default:withCtx(()=>Ud[9]||(Ud[9]=[createTextVNode("新建自定义 CSS")])),_:1}),createVNode(df,null,{default:withCtx(()=>Ud[10]||(Ud[10]=[createTextVNode(" 请输入方案名称 ")])),_:1})]),_:1}),createVNode(pf,{modelValue:unref(yd),"onUpdate:modelValue":Ud[1]||(Ud[1]=dh=>isRef(yd)?yd.value=dh:null)},null,8,["modelValue"]),createVNode(_f,null,{default:withCtx(()=>[createVNode(mf,{variant:"outline",onClick:Ud[2]||(Ud[2]=dh=>gd.value=!1)},{default:withCtx(()=>Ud[11]||(Ud[11]=[createTextVNode(" 取消 ")])),_:1}),createVNode(mf,{onClick:Ud[3]||(Ud[3]=dh=>vd())},{default:withCtx(()=>Ud[12]||(Ud[12]=[createTextVNode(" 保存 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(Cf,{open:unref(sd),"onUpdate:open":Ud[7]||(Ud[7]=dh=>isRef(sd)?sd.value=dh:null)},{default:withCtx(()=>[createVNode(xf,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(Ef,null,{default:withCtx(()=>[createVNode(Xd,null,{default:withCtx(()=>Ud[13]||(Ud[13]=[createTextVNode("编辑方案名称")])),_:1}),createVNode(df,null,{default:withCtx(()=>Ud[14]||(Ud[14]=[createTextVNode(" 请输入新的方案名称 ")])),_:1})]),_:1}),createVNode(pf,{modelValue:unref(pd),"onUpdate:modelValue":Ud[5]||(Ud[5]=dh=>isRef(pd)?pd.value=dh:null)},null,8,["modelValue"]),createVNode(_f,null,{default:withCtx(()=>[createVNode(mf,{variant:"outline",onClick:Ud[6]||(Ud[6]=dh=>sd.value=!1)},{default:withCtx(()=>Ud[15]||(Ud[15]=[createTextVNode(" 取消 ")])),_:1}),createVNode(mf,{onClick:md},{default:withCtx(()=>Ud[16]||(Ud[16]=[createTextVNode(" 保存 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(Mh,{open:unref(Nd),"onUpdate:open":Ud[8]||(Ud[8]=dh=>isRef(Nd)?Nd.value=dh:null)},{default:withCtx(()=>[createVNode(Eh,null,{default:withCtx(()=>[createVNode(wf,null,{default:withCtx(()=>[createVNode(If,null,{default:withCtx(()=>Ud[17]||(Ud[17]=[createTextVNode("提示")])),_:1}),createVNode(Sf,null,{default:withCtx(()=>Ud[18]||(Ud[18]=[createTextVNode(" 此操作将删除该自定义方案,是否继续? ")])),_:1})]),_:1}),createVNode(xh,null,{default:withCtx(()=>[createVNode(Pf,null,{default:withCtx(()=>Ud[19]||(Ud[19]=[createTextVNode("取消")])),_:1}),createVNode(lh,{onClick:Fd},{default:withCtx(()=>Ud[20]||(Ud[20]=[createTextVNode(" 确认 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])],512),[[vShow,unref(rd).isShowCssEditor]])]),_:1})}}}),__unplugin_components_9=_export_sfc(_sfc_main$P,[["__scopeId","data-v-a83b50e8"]]),_sfc_main$O=defineComponent({__name:"BackTop",props:{left:{},top:{},right:{},bottom:{},visibilityHeight:{},target:{},onClick:{type:Function}},setup(Ra){const qa=Ra,rd=ref$1(qa.visibilityHeight??400),sd=ref$1(!1),pd=ref$1(null);function fd(md){var gd,yd;console.log("scrollToTop"),(gd=pd.value)==null||gd.scrollTo({top:0,left:0,behavior:"smooth"}),(yd=qa.onClick)==null||yd.call(qa,md)}const hd=throttle$1(md=>{md instanceof HTMLElement?sd.value=md.scrollTop>rd.value:sd.value=window.scrollY>rd.value},200,{edges:["leading","trailing"]});return onMounted(()=>{qa.target?pd.value=document.getElementById(qa.target):pd.value=window,pd.value.addEventListener("scroll",()=>{hd(pd.value)})}),onUnmounted(()=>{pd.value.removeEventListener("scroll",()=>{hd(pd.value)})}),(md,gd)=>{const yd=_sfc_main$1o;return unref(sd)?(openBlock(),createBlock(yd,{key:0,variant:"outline",size:"icon",class:"fixed z-50 rounded-full",style:normalizeStyle({left:`${md.left}px`,top:`${md.top}px`,right:`${md.right}px`,bottom:`${md.bottom}px`}),onClick:fd},{default:withCtx(()=>[createVNode(unref(ArrowUpFromLine))]),_:1},8,["style"])):createCommentVNode("",!0)}}}),_sfc_main$N=defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(om),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_sfc_main$M=defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(sm),null,{default:withCtx(()=>[createVNode(unref(rm$1),mergeProps(unref(fd),{class:unref(cn$4)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$L=defineComponent({__name:"ContextMenuShortcut",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn$4)("ml-auto text-xs tracking-widest text-muted-foreground",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$K=defineComponent({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(cm$1),mergeProps(rd.value,{class:unref(cn$4)("-mx-1 my-1 h-px bg-border",qa.class)}),null,16,["class"]))}}),_sfc_main$J=defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(um),mergeProps(unref(fd),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hd.inset&&"pl-8",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$I=defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const rd=At$5(Ra);return(sd,pd)=>(openBlock(),createBlock(unref(lm),normalizeProps(guardReactiveProps(unref(rd))),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16))}}),_sfc_main$H=defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(sh),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_sfc_main$G=defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(ih),null,{default:withCtx(()=>[createVNode(unref(uh),mergeProps(unref(fd),{class:unref(cn$4)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$F=defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(ch$1),mergeProps(unref(sd),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",pd.inset&&"pl-8",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$E=defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const rd=At$5(Ra);return(sd,pd)=>(openBlock(),createBlock(unref(rh),mergeProps({class:"outline-none"},unref(rd)),{default:withCtx(()=>[renderSlot(sd.$slots,"default")]),_:3},16))}}),_sfc_main$D=defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(tu$3),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_hoisted_1$6=["onClick"],_hoisted_2$4={class:"line-clamp-1"},_sfc_main$C=defineComponent({__name:"PostSlider",setup(Ra){const qa=useStore(),rd=ref$1(!1),sd=ref$1("");watch(rd,()=>{rd.value&&(sd.value="")});function pd(){if(sd.value===""){Ke.error("内容标题不可为空");return}qa.addPost(sd.value),rd.value=!1,Ke.success("内容新增成功")}const fd=ref$1(-1),hd=ref$1(!1),md=ref$1("");function gd(Ld){fd.value=Ld,md.value=qa.posts[Ld].title,hd.value=!0}function yd(){if(md.value===""){Ke.error("内容标题不可为空");return}qa.renamePost(fd.value,md.value),hd.value=!1,Ke.success("内容重命名成功")}const vd=ref$1(!1);function Nd(Ld){fd.value=Ld,vd.value=!0}function Md(){qa.delPost(fd.value),vd.value=!1,Ke.success("内容删除成功")}return(Ld,Fd)=>{const Hd=_sfc_main$1o,Vd=_sfc_main$D,Gd=_sfc_main$16,Ud=_sfc_main$Q,qd=_sfc_main$17,Wd=_sfc_main$1e,Kd=_sfc_main$1f,Xd=_sfc_main$1g,df=_sfc_main$1h,Ef=_sfc_main$E,pf=_sfc_main$F,mf=_sfc_main$G,_f=_sfc_main$H,xf=_sfc_main$1j,Cf=_sfc_main$1k,If=_sfc_main$1l,Sf=_sfc_main$1m,wf=_sfc_main$1n,Pf=_sfc_main$1p,lh=_sfc_main$1q,xh=_sfc_main$1r;return openBlock(),createElementBlock("div",{class:normalizeClass(["overflow-hidden bg-gray/20 transition-width duration-300 dark:bg-[#191c20]",{"w-0":!unref(qa).isOpenPostSlider,"w-50":unref(qa).isOpenPostSlider}])},[createBaseVNode("nav",{class:normalizeClass(["space-y-1 h-full overflow-auto border-r-2 border-gray/20 p-2 transition-transform",{"translate-x-100":unref(qa).isOpenPostSlider,"-translate-x-full":!unref(qa).isOpenPostSlider}])},[createVNode(df,{open:unref(rd),"onUpdate:open":Fd[2]||(Fd[2]=Eh=>isRef(rd)?rd.value=Eh:null)},{default:withCtx(()=>[createVNode(Vd,{"as-child":""},{default:withCtx(()=>[createVNode(Hd,{variant:"outline",class:"w-full",size:"xs"},{default:withCtx(()=>[createVNode(unref(Plus)),Fd[9]||(Fd[9]=createTextVNode(" 新增内容 "))]),_:1})]),_:1}),createVNode(Xd,null,{default:withCtx(()=>[createVNode(qd,null,{default:withCtx(()=>[createVNode(Gd,null,{default:withCtx(()=>Fd[10]||(Fd[10]=[createTextVNode("新增内容")])),_:1}),createVNode(Ud,null,{default:withCtx(()=>Fd[11]||(Fd[11]=[createTextVNode(" 请输入内容名称 ")])),_:1})]),_:1}),createVNode(Wd,{modelValue:unref(sd),"onUpdate:modelValue":Fd[0]||(Fd[0]=Eh=>isRef(sd)?sd.value=Eh:null)},null,8,["modelValue"]),createVNode(Kd,null,{default:withCtx(()=>[createVNode(Hd,{onClick:Fd[1]||(Fd[1]=Eh=>pd())},{default:withCtx(()=>Fd[12]||(Fd[12]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(qa).posts,(Eh,Mh)=>(openBlock(),createElementBlock("a",{key:Eh.title,href:"#",class:normalizeClass([{"bg-primary text-primary-foreground shadow-lg dark:border-1 border-primary":unref(qa).currentPostIndex===Mh,"dark:bg-gray/30 dark:text-primary-foreground-dark dark:border-primary-dark":unref(qa).currentPostIndex===Mh},"hover:bg-primary/90 hover:text-primary-foreground dark:hover:border-primary-dark h-8 w-full inline-flex items-center justify-start gap-2 whitespace-nowrap rounded px-2 text-sm transition-colors dark:text-white dark:hover:bg-gray/20 dark:hover:text-white"]),onClick:dh=>unref(qa).currentPostIndex=Mh},[createBaseVNode("span",_hoisted_2$4,toDisplayString(Eh.title),1),createVNode(_f,null,{default:withCtx(()=>[createVNode(Ef,{"as-child":""},{default:withCtx(()=>[createVNode(Hd,{size:"xs",variant:"ghost",class:"ml-auto px-1.5"},{default:withCtx(()=>[createVNode(unref(Ellipsis),{class:"size-4"})]),_:1})]),_:1}),createVNode(mf,null,{default:withCtx(()=>[createVNode(pf,{onClick:withModifiers(dh=>gd(Mh),["stop"])},{default:withCtx(()=>[createVNode(unref(PenLine),{class:"mr-2 size-4"}),Fd[13]||(Fd[13]=createTextVNode(" 重命名 "))]),_:2},1032,["onClick"]),unref(qa).posts.length>1?(openBlock(),createBlock(pf,{key:0,onClick:withModifiers(dh=>Nd(Mh),["stop"])},{default:withCtx(()=>[createVNode(unref(Trash),{class:"mr-2 size-4"}),Fd[14]||(Fd[14]=createTextVNode(" 删除 "))]),_:2},1032,["onClick"])):createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)],10,_hoisted_1$6))),128)),createVNode(df,{open:unref(hd),"onUpdate:open":Fd[6]||(Fd[6]=Eh=>isRef(hd)?hd.value=Eh:null)},{default:withCtx(()=>[createVNode(Xd,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(qd,null,{default:withCtx(()=>[createVNode(Gd,null,{default:withCtx(()=>Fd[15]||(Fd[15]=[createTextVNode("编辑内容名称")])),_:1}),createVNode(Ud,null,{default:withCtx(()=>Fd[16]||(Fd[16]=[createTextVNode(" 请输入新的内容名称 ")])),_:1})]),_:1}),createVNode(Wd,{modelValue:unref(md),"onUpdate:modelValue":Fd[3]||(Fd[3]=Eh=>isRef(md)?md.value=Eh:null)},null,8,["modelValue"]),createVNode(Kd,null,{default:withCtx(()=>[createVNode(Hd,{variant:"outline",onClick:Fd[4]||(Fd[4]=Eh=>hd.value=!1)},{default:withCtx(()=>Fd[17]||(Fd[17]=[createTextVNode(" 取消 ")])),_:1}),createVNode(Hd,{onClick:Fd[5]||(Fd[5]=Eh=>yd())},{default:withCtx(()=>Fd[18]||(Fd[18]=[createTextVNode(" 保存 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(xh,{open:unref(vd),"onUpdate:open":Fd[8]||(Fd[8]=Eh=>isRef(vd)?vd.value=Eh:null)},{default:withCtx(()=>[createVNode(lh,null,{default:withCtx(()=>[createVNode(If,null,{default:withCtx(()=>[createVNode(xf,null,{default:withCtx(()=>Fd[19]||(Fd[19]=[createTextVNode("提示")])),_:1}),createVNode(Cf,null,{default:withCtx(()=>Fd[20]||(Fd[20]=[createTextVNode(" 此操作将删除该内容,是否继续? ")])),_:1})]),_:1}),createVNode(Pf,null,{default:withCtx(()=>[createVNode(Sf,null,{default:withCtx(()=>Fd[21]||(Fd[21]=[createTextVNode("取消")])),_:1}),createVNode(wf,{onClick:Fd[7]||(Fd[7]=Eh=>Md())},{default:withCtx(()=>Fd[22]||(Fd[22]=[createTextVNode(" 确认 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])],2)],2)}}}),_hoisted_1$5={class:"mt-4"},_hoisted_2$3={key:0,class:"py-4 text-center"},_hoisted_3$3={key:1,class:"max-h-[400px] flex flex-col overflow-y-auto"},_hoisted_4$3={class:"mb-2 flex items-center gap-2"},_hoisted_5$2=["src"],_hoisted_6$2=["href"],_sfc_main$B=defineComponent({__name:"PostTaskDialog",props:{post:{},open:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed({get:()=>rd.open,set:gd=>sd("update:open",gd)}),fd=ref$1(null),hd=ref$1(!1);async function md(){var gd;if(rd.post)try{(gd=window.$syncer)==null||gd.addTask({post:{title:rd.post.title,content:rd.post.content,markdown:rd.post.markdown,thumb:rd.post.thumb,desc:rd.post.desc},accounts:rd.post.accounts.filter(yd=>yd.checked)},yd=>{fd.value=yd},()=>{hd.value=!1})}catch(yd){console.error("发布失败:",yd)}}return watch(()=>rd.open,gd=>{gd&&md()}),(gd,yd)=>(openBlock(),createBlock(unref(_sfc_main$1h),{open:unref(pd),"onUpdate:open":yd[0]||(yd[0]=vd=>isRef(pd)?pd.value=vd:null)},{default:withCtx(()=>[createVNode(unref(_sfc_main$1g),null,{default:withCtx(()=>{var vd;return[createVNode(unref(_sfc_main$17),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$16),null,{default:withCtx(()=>yd[1]||(yd[1]=[createTextVNode("提交发布任务")])),_:1})]),_:1}),createBaseVNode("div",_hoisted_1$5,[unref(fd)?(openBlock(),createElementBlock("div",_hoisted_3$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList((vd=unref(fd))==null?void 0:vd.accounts,Nd=>(openBlock(),createElementBlock("div",{key:Nd.uid+Nd.displayName,class:"border-b py-4 last:border-b-0"},[createBaseVNode("div",_hoisted_4$3,[Nd.icon?(openBlock(),createElementBlock("img",{key:0,src:Nd.icon,class:"object-cover h-5 w-5",alt:""},null,8,_hoisted_5$2)):createCommentVNode("",!0),createBaseVNode("span",null,toDisplayString(Nd.title)+" - "+toDisplayString(Nd.displayName||Nd.home),1)]),createBaseVNode("div",{class:normalizeClass(["w-full flex-1 gap-2 overflow-auto pl-7 text-sm",{"text-yellow-600":Nd.status==="uploading","text-red-600":Nd.status==="failed","text-green-600":Nd.status==="done"}])},[Nd.status==="uploading"?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(Nd.msg||"发布中"),1)],64)):createCommentVNode("",!0),Nd.status==="failed"?(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(" 同步失败, 错误内容:"+toDisplayString(Nd.error),1)],64)):createCommentVNode("",!0),Nd.status==="done"&&Nd.editResp?(openBlock(),createElementBlock(Fragment,{key:2},[yd[2]||(yd[2]=createTextVNode(" 同步成功 ")),Nd.type!=="wordpress"&&Nd.editResp?(openBlock(),createElementBlock("a",{key:0,href:Nd.editResp.draftLink,class:"ml-2 text-blue-500 hover:underline",referrerPolicy:"no-referrer",target:"_blank"},"查看草稿",8,_hoisted_6$2)):createCommentVNode("",!0)],64)):createCommentVNode("",!0)],2)]))),128))])):(openBlock(),createElementBlock("div",_hoisted_2$3," 等待发布.. "))])]}),_:1})]),_:1},8,["open"]))}}),__unplugin_components_13=_export_sfc(_sfc_main$B,[["__scopeId","data-v-3407b3ac"]]),_sfc_main$A=defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},setup(Ra,{emit:qa}){const rd=Ra,pd=useVModel$1(rd,"modelValue",qa,{passive:!0,defaultValue:rd.defaultValue});return(fd,hd)=>withDirectives((openBlock(),createElementBlock("textarea",{"onUpdate:modelValue":hd[0]||(hd[0]=md=>isRef(pd)?pd.value=md:null),class:normalizeClass(unref(cn$4)("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",rd.class))},null,2)),[[vModelText,unref(pd)]])}}),_sfc_main$z=defineComponent({__name:"AlertDescription",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("text-sm [&_p]:leading-relaxed",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$y=defineComponent({__name:"AlertTitle",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("h5",{class:normalizeClass(unref(cn$4)("mb-1 font-medium leading-none tracking-tight",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),alertVariants=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),_sfc_main$x=defineComponent({__name:"Alert",props:{class:{},variant:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)(unref(alertVariants)({variant:rd.variant}),qa.class)),role:"alert"},[renderSlot(rd.$slots,"default")],2))}}),_hoisted_1$4={class:"w-full flex items-center gap-4"},_hoisted_2$2={class:"w-full flex items-center gap-4"},_hoisted_3$2={class:"w-full flex items-start gap-4"},_hoisted_4$2={class:"w-full flex items-start gap-4"},_hoisted_5$1={class:"flex flex-1 flex-col gap-2"},_hoisted_6$1={class:"flex flex-row items-center gap-4"},_hoisted_7={class:"flex items-center gap-2 text-sm"},_hoisted_8=["src"],_sfc_main$w=defineComponent({__name:"PostInfo",setup(Ra){const qa=useStore(),{output:rd,editor:sd}=storeToRefs(qa),pd=ref$1(!1),fd=ref$1(!1),hd=ref$1([]),md=ref$1(!1),gd=ref$1({title:"",desc:"",thumb:"",content:"",markdown:"",accounts:[]}),yd=computed(()=>fd.value&&gd.value.accounts.some(Hd=>Hd.checked));async function vd(){var Gd,Ud;fd.value&&hd.value.length===0&&await Nd();let Hd={thumb:"",title:"",desc:"",content:"",markdown:"",accounts:[]};const Vd=hd.value.filter(qd=>!["weixin","ipfs"].includes(qd.type));try{Hd={thumb:((Gd=document.querySelector("#output img"))==null?void 0:Gd.src)??"",title:[1,2,3,4,5,6].map(qd=>document.querySelector(`#output h${qd}`)).filter(qd=>qd)[0].textContent??"",desc:document.querySelector("#output p").textContent??"",content:rd.value,markdown:((Ud=sd.value)==null?void 0:Ud.getValue())??"",accounts:Vd}}catch(qd){console.log("error",qd)}finally{gd.value={...Hd}}}async function Nd(){return new Promise(Hd=>{var Vd;(Vd=window.$syncer)==null||Vd.getAccounts(Gd=>{hd.value=Gd.map(Ud=>({...Ud,checked:!0})),Hd()})})}function Md(){gd.value.accounts=gd.value.accounts.filter(Hd=>Hd.checked),md.value=!0,pd.value=!1}function Ld(Hd){Hd||(pd.value=!1)}function Fd(){if(window.$syncer!==void 0){fd.value=!0;return}let Hd=0;const Vd=setInterval(async()=>{if(window.$syncer!==void 0){fd.value=!0,await Nd(),clearInterval(Vd);return}Hd++,Hd>10&&clearInterval(Vd)},500)}return onBeforeMount(()=>{Fd()}),(Hd,Vd)=>{const Gd=_sfc_main$1o,Ud=_sfc_main$D,qd=_sfc_main$16,Wd=_sfc_main$17,Kd=_sfc_main$y,Xd=_sfc_main$z,df=_sfc_main$x,Ef=_sfc_main$18,pf=_sfc_main$1e,mf=_sfc_main$A,_f=_sfc_main$1f,xf=_sfc_main$1g,Cf=_sfc_main$1h,If=__unplugin_components_13;return openBlock(),createElementBlock(Fragment,null,[createVNode(Cf,{open:unref(pd),"onUpdate:open":[Vd[4]||(Vd[4]=Sf=>isRef(pd)?pd.value=Sf:null),Ld]},{default:withCtx(()=>[createVNode(Ud,null,{default:withCtx(()=>[createVNode(Gd,{variant:"outline",onClick:vd},{default:withCtx(()=>Vd[6]||(Vd[6]=[createTextVNode(" 发布 ")])),_:1})]),_:1}),createVNode(xf,null,{default:withCtx(()=>[createVNode(Wd,null,{default:withCtx(()=>[createVNode(qd,null,{default:withCtx(()=>Vd[7]||(Vd[7]=[createTextVNode("发布")])),_:1})]),_:1}),createVNode(df,null,{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(Kd,null,{default:withCtx(()=>Vd[8]||(Vd[8]=[createTextVNode("提示")])),_:1}),createVNode(Xd,null,{default:withCtx(()=>Vd[9]||(Vd[9]=[createTextVNode(" 此功能由第三方浏览器插件支持,本平台不保证安全性及同步准确度。 ")])),_:1})]),_:1}),unref(fd)?createCommentVNode("",!0):(openBlock(),createBlock(df,{key:0},{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(Kd,null,{default:withCtx(()=>Vd[10]||(Vd[10]=[createTextVNode("未检测到插件")])),_:1}),createVNode(Xd,null,{default:withCtx(()=>[Vd[12]||(Vd[12]=createTextVNode(" 请安装 ")),createVNode(unref(O$4),{as:"a",class:"text-blue-500",href:"https://www.wechatsync.com/?utm_source=syncicon#install",target:"_blank"},{default:withCtx(()=>Vd[11]||(Vd[11]=[createTextVNode(" 文章同步助手 ")])),_:1}),Vd[13]||(Vd[13]=createTextVNode(" 插件 "))]),_:1})]),_:1})),createBaseVNode("div",_hoisted_1$4,[createVNode(Ef,{for:"thumb",class:"w-10 text-end"},{default:withCtx(()=>Vd[14]||(Vd[14]=[createTextVNode(" 封面 ")])),_:1}),createVNode(pf,{id:"thumb",modelValue:unref(gd).thumb,"onUpdate:modelValue":Vd[0]||(Vd[0]=Sf=>unref(gd).thumb=Sf),placeholder:"自动提取第一张图"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_2$2,[createVNode(Ef,{for:"title",class:"w-10 text-end"},{default:withCtx(()=>Vd[15]||(Vd[15]=[createTextVNode(" 标题 ")])),_:1}),createVNode(pf,{id:"title",modelValue:unref(gd).title,"onUpdate:modelValue":Vd[1]||(Vd[1]=Sf=>unref(gd).title=Sf),placeholder:"自动提取第一个标题"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_3$2,[createVNode(Ef,{for:"desc",class:"w-10 text-end"},{default:withCtx(()=>Vd[16]||(Vd[16]=[createTextVNode(" 描述 ")])),_:1}),createVNode(mf,{id:"desc",modelValue:unref(gd).desc,"onUpdate:modelValue":Vd[2]||(Vd[2]=Sf=>unref(gd).desc=Sf),placeholder:"自动提取第一个段落"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_4$2,[createVNode(Ef,{class:"w-10 text-end"},{default:withCtx(()=>Vd[17]||(Vd[17]=[createTextVNode(" 账号 ")])),_:1}),createBaseVNode("div",_hoisted_5$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(gd).accounts,Sf=>(openBlock(),createElementBlock("div",{key:Sf.uid+Sf.displayName,class:"flex items-center gap-2"},[createBaseVNode("label",_hoisted_6$1,[createVNode(unref(zv),{checked:Sf.checked,"onUpdate:checked":wf=>Sf.checked=wf,class:"bg-background hover:bg-muted h-[25px] w-[25px] flex appearance-none items-center justify-center border border-gray-200 rounded-[4px] outline-none"},{default:withCtx(()=>[createVNode(unref(Kv),null,{default:withCtx(()=>[Sf.checked?(openBlock(),createBlock(unref(Check),{key:0,class:"h-4 w-4"})):createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["checked","onUpdate:checked"]),createBaseVNode("span",_hoisted_7,[createBaseVNode("img",{src:Sf.icon,alt:"",class:"inline-block h-[20px] w-[20px]"},null,8,_hoisted_8),createTextVNode(" "+toDisplayString(Sf.title)+" - "+toDisplayString(Sf.displayName??Sf.home),1)])])]))),128))])]),createVNode(_f,null,{default:withCtx(()=>[createVNode(Gd,{variant:"outline",onClick:Vd[3]||(Vd[3]=Sf=>pd.value=!1)},{default:withCtx(()=>Vd[18]||(Vd[18]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(Gd,{disabled:!unref(yd),onClick:Md},{default:withCtx(()=>Vd[19]||(Vd[19]=[createTextVNode(" 确 定 ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(If,{open:unref(md),"onUpdate:open":Vd[5]||(Vd[5]=Sf=>isRef(md)?md.value=Sf:null),post:unref(gd)},null,8,["open","post"])],64)}}}),_sfc_main$v=defineComponent({__name:"DropdownMenuRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(yh),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_hoisted_1$3={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$u=defineComponent({__name:"DropdownMenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(gh),mergeProps(unref(fd),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",rd.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$3,[createVNode(unref(mh),null,{default:withCtx(()=>[createVNode(unref(Circle),{class:"h-2 w-2 fill-current"})]),_:1})]),renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$t=defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{},label:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:sd,...pd}=qa;return pd});return(sd,pd)=>(openBlock(),createBlock(unref(Qf),mergeProps(rd.value,{class:unref(cn$4)("shrink-0 bg-border relative",qa.orientation==="vertical"?"w-px h-full":"h-px w-full",qa.class)}),{default:withCtx(()=>[qa.label?(openBlock(),createElementBlock("span",{key:0,class:normalizeClass(unref(cn$4)("text-xs text-muted-foreground bg-background absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex justify-center items-center",qa.orientation==="vertical"?"w-[1px] px-1 py-2":"h-[1px] py-1 px-2"))},toDisplayString(qa.label),3)):createCommentVNode("",!0)]),_:1},16,["class"]))}}),_sfc_main$s=defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(Lg),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_sfc_main$r=defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(zg),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_sfc_main$q=defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(jg),null,{default:withCtx(()=>[createVNode(unref(Hg),mergeProps({...unref(fd),...hd.$attrs},{class:unref(cn$4)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$p=defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(Kg),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_sfc_main$o=defineComponent({__name:"Menubar",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean},class:{}},emits:["update:modelValue"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(Hh),mergeProps(unref(fd),{class:unref(cn$4)("flex h-10 items-center gap-x-1 rounded-md border bg-background p-1",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$n=defineComponent({__name:"AboutDialog",props:{visible:{type:Boolean,default:!1}},emits:["close"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa;function pd(md){md||sd("close")}const fd=[{label:"GitHub 仓库",url:"https://github.com/doocs/md"},{label:"Gitee 仓库",url:"https://gitee.com/doocs/md"},{label:"GitCode 仓库",url:"https://gitcode.com/doocs/md"}];function hd(md){window.open(md,"_blank")}return(md,gd)=>{const yd=_sfc_main$16,vd=_sfc_main$17,Nd=_sfc_main$1o,Md=_sfc_main$1f,Ld=_sfc_main$1g,Fd=_sfc_main$1h;return openBlock(),createBlock(Fd,{open:rd.visible,"onUpdate:open":pd},{default:withCtx(()=>[createVNode(Ld,null,{default:withCtx(()=>[createVNode(vd,null,{default:withCtx(()=>[createVNode(yd,null,{default:withCtx(()=>gd[0]||(gd[0]=[createTextVNode("关于")])),_:1})]),_:1}),gd[1]||(gd[1]=createBaseVNode("div",{class:"text-center"},[createBaseVNode("h3",null,"一款高度简洁的微信 Markdown 编辑器"),createBaseVNode("p",null,"扫码关注公众号 Doocs,原创技术内容第一时间推送!"),createBaseVNode("img",{class:"mx-auto my-5",src:"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png",alt:"Doocs Markdown 编辑器",style:{width:"40%"}})],-1)),createVNode(Md,{class:"sm:justify-evenly"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(fd,Hd=>createVNode(Nd,{key:Hd.url,onClick:Vd=>hd(Hd.url)},{default:withCtx(()=>[createTextVNode(toDisplayString(Hd.label),1)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1})]),_:1},8,["open"])}}}),_sfc_main$m=defineComponent({__name:"MenubarMenu",props:{value:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(Wh),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_sfc_main$l=defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:8},align:{default:"start"},alignOffset:{default:-4},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Uh),null,{default:withCtx(()=>[createVNode(unref(Gh),mergeProps(unref(sd),{class:unref(cn$4)("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_hoisted_1$2={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$k=defineComponent({__name:"MenubarCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select","update:checked"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(Jh),mergeProps(unref(fd),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",rd.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$2,[createVNode(unref(Qh),null,{default:withCtx(()=>[createVNode(unref(Check),{class:"h-4 w-4"})]),_:1})]),renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$j=defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(jh),mergeProps(unref(sd),{class:unref(cn$4)("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$i=defineComponent({__name:"HelpDropdown",setup(Ra){const qa=ref$1(!1);return(rd,sd)=>{const pd=_sfc_main$j,fd=_sfc_main$k,hd=_sfc_main$l,md=_sfc_main$m,gd=_sfc_main$n;return openBlock(),createElementBlock(Fragment,null,[createVNode(md,null,{default:withCtx(()=>[createVNode(pd,null,{default:withCtx(()=>sd[2]||(sd[2]=[createTextVNode(" 帮助 ")])),_:1}),createVNode(hd,{align:"start"},{default:withCtx(()=>[createVNode(fd,{onClick:sd[0]||(sd[0]=yd=>qa.value=!0)},{default:withCtx(()=>sd[3]||(sd[3]=[createBaseVNode("span",null,"关于",-1)])),_:1})]),_:1})]),_:1}),createVNode(gd,{visible:unref(qa),onClose:sd[1]||(sd[1]=yd=>qa.value=!1)},null,8,["visible"])],64)}}}),_sfc_main$h=defineComponent({__name:"HoverCard",props:{defaultOpen:{type:Boolean},open:{type:Boolean},openDelay:{},closeDelay:{}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(Bh),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_sfc_main$g=defineComponent({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Th),null,{default:withCtx(()=>[createVNode(unref(Rh),mergeProps(unref(sd),{class:unref(cn$4)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$f=defineComponent({__name:"HoverCardTrigger",props:{asChild:{type:Boolean},as:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(Ih),normalizeProps(guardReactiveProps(qa)),{default:withCtx(()=>[renderSlot(rd.$slots,"default")]),_:3},16))}}),_sfc_main$e=defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(Zh),mergeProps({class:unref(cn$4)("-mx-1 my-1 h-px bg-muted",qa.class)},unref(sd)),null,16,["class"]))}}),_sfc_main$d=defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:qa}){const pd=xe$5(Ra,qa);return(fd,hd)=>(openBlock(),createBlock(unref(ny),normalizeProps(guardReactiveProps(unref(pd))),{default:withCtx(()=>[renderSlot(fd.$slots,"default")]),_:3},16))}}),_sfc_main$c=defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(Uh),null,{default:withCtx(()=>[createVNode(unref(oy),mergeProps(unref(fd),{class:unref(cn$4)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$b=defineComponent({__name:"DropdownMenuShortcut",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn$4)("ml-auto text-xs tracking-widest opacity-60",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$a=defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(Ra){const qa=Ra,rd=computed(()=>{const{class:pd,...fd}=qa;return fd}),sd=At$5(rd);return(pd,fd)=>(openBlock(),createBlock(unref(ly$1),mergeProps(unref(sd),{class:unref(cn$4)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",pd.inset&&"pl-8",qa.class)}),{default:withCtx(()=>[renderSlot(pd.$slots,"default"),createVNode(unref(ChevronRight),{class:"ml-auto h-4 w-4"})]),_:3},16,["class"]))}}),_sfc_main$9=defineComponent({__name:"StyleOptionMenu",props:{title:{},options:{},current:{},change:{type:Function}},setup(Ra){const qa=Ra;function rd(sd,pd){switch(sd){case"字体":return{fontFamily:pd};case"字号":return{fontSize:pd};case"主题色":return{color:pd};default:return{}}}return(sd,pd)=>{const fd=_sfc_main$a,hd=_sfc_main$b,md=_sfc_main$k,gd=_sfc_main$c,yd=_sfc_main$d;return openBlock(),createBlock(yd,null,{default:withCtx(()=>[createVNode(fd,null,{default:withCtx(()=>[pd[0]||(pd[0]=createBaseVNode("span",{class:"mr-2 h-4 w-4"},null,-1)),createBaseVNode("span",null,toDisplayString(qa.title),1)]),_:1}),createVNode(gd,{class:"max-h-56 overflow-auto"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(sd.options,({label:vd,value:Nd,desc:Md})=>(openBlock(),createBlock(md,{key:Nd,label:vd,"model-value":Nd,class:"w-50",checked:sd.current===Nd,onClick:Ld=>sd.change(Nd)},{default:withCtx(()=>[createTextVNode(toDisplayString(vd)+" ",1),createVNode(hd,{style:normalizeStyle(rd(sd.title,Nd))},{default:withCtx(()=>[createTextVNode(toDisplayString(Md),1)]),_:2},1032,["style"])]),_:2},1032,["label","model-value","checked","onClick"]))),128))]),_:1})]),_:1})}}}),_sfc_main$8=defineComponent({__name:"StyleDropdown",setup(Ra){const qa=useStore(),{toggleShowCssEditor:rd}=useDisplayStore(),{theme:sd,fontFamily:pd,fontSize:fd,primaryColor:hd,codeBlockTheme:md,legend:gd,isMacCodeBlock:yd,cssEditor:vd}=storeToRefs(qa),{resetStyleConfirm:Nd,themeChanged:Md,fontChanged:Ld,sizeChanged:Fd,colorChanged:Hd,codeBlockThemeChanged:Vd,legendChanged:Gd,macCodeBlockChanged:Ud}=qa,qd=ref$1(null);function Wd(){var pf;(pf=qd.value)==null||pf.show()}function Kd(){rd(),setTimeout(()=>{vd.value.refresh()},50)}const Xd=useTemplateRef("pickColorsContainer"),df=ref$1("rgb"),Ef=ref$1(["rgb","hex","hsl","hsv"]);return(pf,mf)=>{const _f=_sfc_main$j,xf=_sfc_main$9,Cf=_sfc_main$e,If=_sfc_main$f,Sf=_sfc_main$g,wf=_sfc_main$h,Pf=_sfc_main$k,lh=_sfc_main$l,xh=_sfc_main$m;return openBlock(),createBlock(xh,null,{default:withCtx(()=>[createVNode(_f,null,{default:withCtx(()=>mf[1]||(mf[1]=[createTextVNode(" 样式 ")])),_:1}),createVNode(lh,{class:"w-56",align:"start"},{default:withCtx(()=>[createVNode(xf,{title:"主题",options:unref(themeOptions),current:unref(sd),change:unref(Md)},null,8,["options","current","change"]),createVNode(Cf),createVNode(xf,{title:"字体",options:unref(fontFamilyOptions),current:unref(pd),change:unref(Ld)},null,8,["options","current","change"]),createVNode(xf,{title:"字号",options:unref(fontSizeOptions),current:unref(fd),change:unref(Fd)},null,8,["options","current","change"]),createVNode(xf,{title:"主题色",options:unref(colorOptions),current:unref(hd),change:unref(Hd)},null,8,["options","current","change"]),createVNode(xf,{title:"代码块主题",options:unref(codeBlockThemeOptions),current:unref(md),change:unref(Vd)},null,8,["options","current","change"]),createVNode(xf,{title:"图注格式",options:unref(legendOptions),current:unref(gd),change:unref(Gd)},null,8,["options","current","change"]),createVNode(Cf),createVNode(Pf,{onClick:withModifiers(Wd,["self","prevent"])},{default:withCtx(()=>[createVNode(wf,{"open-delay":100},{default:withCtx(()=>[createVNode(If,{class:"w-full flex"},{default:withCtx(()=>mf[2]||(mf[2]=[createTextVNode(" 自定义主题色 ")])),_:1}),createVNode(Sf,{side:"right",class:"w-min"},{default:withCtx(()=>[createBaseVNode("div",{ref_key:"pickColorsContainer",ref:Xd},[createVNode(unref(Re),{value:unref(hd),"onUpdate:value":mf[0]||(mf[0]=Eh=>isRef(hd)?hd.value=Eh:null),"show-alpha":"",format:unref(df),"format-options":unref(Ef),theme:unref(qa).isDark?"dark":"light","popup-container":unref(Xd),onChange:unref(qa).colorChanged},null,8,["value","format","format-options","theme","popup-container","onChange"])],512)]),_:1})]),_:1})]),_:1}),createVNode(Pf,{onClick:Kd},{default:withCtx(()=>mf[3]||(mf[3]=[createTextVNode(" 自定义 CSS ")])),_:1}),createVNode(Cf),createVNode(Pf,{checked:unref(yd),onClick:unref(Ud)},{default:withCtx(()=>mf[4]||(mf[4]=[createTextVNode(" Mac 代码块 ")])),_:1},8,["checked","onClick"]),createVNode(Cf),createVNode(Pf,{divided:"",onClick:unref(Nd)},{default:withCtx(()=>mf[5]||(mf[5]=[createTextVNode(" 重置 ")])),_:1},8,["onClick"])]),_:1})]),_:1})}}}),_sfc_main$7=defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(Ra,{emit:qa}){const rd=Ra,sd=qa,pd=computed(()=>{const{class:hd,...md}=rd;return md}),fd=xe$5(pd,sd);return(hd,md)=>(openBlock(),createBlock(unref(Yh),mergeProps(unref(fd),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hd.inset&&"pl-8",rd.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$6=defineComponent({__name:"EditDropdown",setup(Ra){const{toggleShowInsertFormDialog:qa,toggleShowUploadImgDialog:rd}=useDisplayStore();return(sd,pd)=>{const fd=_sfc_main$j,hd=_sfc_main$7,md=_sfc_main$l,gd=_sfc_main$m;return openBlock(),createBlock(gd,null,{default:withCtx(()=>[createVNode(fd,null,{default:withCtx(()=>pd[2]||(pd[2]=[createTextVNode(" 编辑 ")])),_:1}),createVNode(md,{align:"start"},{default:withCtx(()=>[createVNode(hd,{onClick:pd[0]||(pd[0]=yd=>unref(rd)())},{default:withCtx(()=>[createVNode(unref(CloudUpload),{class:"mr-2 h-4 w-4"}),pd[3]||(pd[3]=createTextVNode(" 上传图片 "))]),_:1}),createVNode(hd,{onClick:pd[1]||(pd[1]=yd=>unref(qa)())},{default:withCtx(()=>[createVNode(unref(Table),{class:"mr-2 h-4 w-4"}),pd[4]||(pd[4]=createTextVNode(" 插入表格 "))]),_:1})]),_:1})]),_:1})}}}),_sfc_main$5=defineComponent({__name:"MenubarShortcut",props:{class:{}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn$4)("ml-auto text-xs tracking-widest text-muted-foreground",qa.class))},[renderSlot(rd.$slots,"default")],2))}}),_sfc_main$4=defineComponent({__name:"FileDropdown",setup(Ra){const qa=useStore(),{isDark:rd,isEditOnLeft:sd}=storeToRefs(qa),{exportEditorContent2HTML:pd,exportEditorContent2MD:fd,importMarkdownContent:hd}=qa;return(md,gd)=>{const yd=_sfc_main$j,vd=_sfc_main$7,Nd=_sfc_main$e,Md=_sfc_main$k,Ld=_sfc_main$l,Fd=_sfc_main$m;return openBlock(),createBlock(Fd,null,{default:withCtx(()=>[createVNode(yd,null,{default:withCtx(()=>gd[5]||(gd[5]=[createTextVNode(" 文件 ")])),_:1}),createVNode(Ld,{align:"start"},{default:withCtx(()=>[createVNode(vd,{onClick:gd[0]||(gd[0]=Hd=>unref(hd)())},{default:withCtx(()=>[createVNode(unref(Upload),{class:"mr-2 size-4"}),gd[6]||(gd[6]=createTextVNode(" 导入 .md "))]),_:1}),createVNode(vd,{onClick:gd[1]||(gd[1]=Hd=>unref(fd)())},{default:withCtx(()=>[createVNode(unref(Download),{class:"mr-2 size-4"}),gd[7]||(gd[7]=createTextVNode(" 导出 .md "))]),_:1}),createVNode(vd,{onClick:gd[2]||(gd[2]=Hd=>unref(pd)())},{default:withCtx(()=>[createVNode(unref(FileCode),{class:"mr-2 size-4"}),gd[8]||(gd[8]=createTextVNode(" 导出 .html "))]),_:1}),createVNode(Nd),createVNode(Md,{checked:unref(rd),"onUpdate:checked":gd[3]||(gd[3]=Hd=>isRef(rd)?rd.value=Hd:null)},{default:withCtx(()=>gd[9]||(gd[9]=[createTextVNode(" 深色模式 ")])),_:1},8,["checked"]),createVNode(Nd),createVNode(Md,{checked:unref(sd),"onUpdate:checked":gd[4]||(gd[4]=Hd=>isRef(sd)?sd.value=Hd:null)},{default:withCtx(()=>gd[10]||(gd[10]=[createTextVNode(" 左侧编辑 ")])),_:1},8,["checked"])]),_:1})]),_:1})}}}),_sfc_main$3=defineComponent({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},dir:{},icons:{},containerAriaLabel:{},pauseWhenPageIsHidden:{type:Boolean},cn:{type:Function}},setup(Ra){const qa=Ra;return(rd,sd)=>(openBlock(),createBlock(unref(Ve),mergeProps({class:"toaster group"},qa,{"toast-options":{classes:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}}),null,16))}}),_hoisted_1$1={class:"header-container h-15 flex items-center justify-between px-5 dark:bg-[#191c20]"},_hoisted_2$1={class:"space-x-2 flex"},_hoisted_3$1={class:"space-x-2 flex"},_hoisted_4$1={class:"space-x-1 bg-background text-background-foreground mx-2 flex items-center border rounded-md"},_sfc_main$2=defineComponent({__name:"index",emits:["addFormat","formatContent","startCopy","endCopy"],setup(Ra,{emit:qa}){const rd=qa,sd=[{label:"加粗",kbd:[ctrlSign,"B"],emitArgs:["addFormat",`${ctrlKey}-B`]},{label:"斜体",kbd:[ctrlSign,"I"],emitArgs:["addFormat",`${ctrlKey}-I`]},{label:"删除线",kbd:[ctrlSign,"D"],emitArgs:["addFormat",`${ctrlKey}-D`]},{label:"超链接",kbd:[ctrlSign,"K"],emitArgs:["addFormat",`${ctrlKey}-K`]},{label:"行内代码",kbd:[ctrlSign,"E"],emitArgs:["addFormat",`${ctrlKey}-E`]},{label:"格式化",kbd:[altSign,shiftSign,"F"],emitArgs:["formatContent"]}],pd=useStore(),{isDark:fd,isCiteStatus:hd,isCountStatus:md,output:gd,primaryColor:yd,isOpenPostSlider:vd}=storeToRefs(pd),{toggleDark:Nd,editorRefresh:Md,citeStatusChanged:Ld,countStatusChanged:Fd}=pd,Hd=useStorage(addPrefix("copyMode"),"txt"),Vd=ref$1(""),{copy:Gd}=useClipboard({source:Vd});function Ud(){rd("startCopy"),setTimeout(()=>{const qd=fd.value;qd&&Nd(),nextTick$1(async()=>{processClipboardContent(yd.value);const Wd=document.getElementById("output");Wd.focus(),window.getSelection().removeAllRanges();const Kd=Wd.innerHTML;if(Hd.value==="txt"){const Xd=document.createRange();Xd.setStartBefore(Wd.firstChild),Xd.setEndAfter(Wd.lastChild),window.getSelection().addRange(Xd),document.execCommand("copy"),window.getSelection().removeAllRanges()}Wd.innerHTML=gd.value,qd&&nextTick$1(()=>Nd()),Hd.value==="html"&&await Gd(Kd),Ke.success(Hd.value==="html"?"已复制 HTML 源码,请进行下一步操作。":"已复制渲染后的内容到剪贴板,可直接到公众号后台粘贴。"),Md(),rd("endCopy")})},350)}return(qd,Wd)=>{const Kd=_sfc_main$4,Xd=_sfc_main$j,df=_sfc_main$5,Ef=_sfc_main$k,pf=_sfc_main$e,mf=_sfc_main$l,_f=_sfc_main$m,xf=_sfc_main$6,Cf=_sfc_main$8,If=_sfc_main$i,Sf=_sfc_main$o,wf=_sfc_main$1o,Pf=_sfc_main$p,lh=_sfc_main$q,xh=_sfc_main$r,Eh=_sfc_main$s,Mh=_sfc_main$t,dh=_sfc_main$E,eh=_sfc_main$u,fh=_sfc_main$v,Sh=_sfc_main$G,vh=_sfc_main$H,Df=_sfc_main$w;return openBlock(),createElementBlock("header",_hoisted_1$1,[createBaseVNode("div",_hoisted_2$1,[createVNode(Sf,{class:"menubar"},{default:withCtx(()=>[createVNode(Kd),createVNode(_f,null,{default:withCtx(()=>[createVNode(Xd,null,{default:withCtx(()=>Wd[7]||(Wd[7]=[createTextVNode(" 格式 ")])),_:1}),createVNode(mf,{class:"w-60",align:"start"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(sd,({label:Af,kbd:_h,emitArgs:Nh})=>createVNode(Ef,{key:Af,onClick:dm=>Nh[0]==="addFormat"?qd.$emit(Nh[0],Nh[1]):qd.$emit(Nh[0])},{default:withCtx(()=>[createTextVNode(toDisplayString(Af)+" ",1),createVNode(df,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_h,dm=>(openBlock(),createElementBlock("kbd",{key:dm,class:"mx-1 bg-gray-2 dark:bg-stone-9"},toDisplayString(dm),1))),128))]),_:2},1024)]),_:2},1032,["onClick"])),64)),createVNode(pf),createVNode(Ef,{checked:unref(hd),onClick:Wd[0]||(Wd[0]=Af=>unref(Ld)())},{default:withCtx(()=>Wd[8]||(Wd[8]=[createTextVNode(" 微信外链转底部引用 ")])),_:1},8,["checked"]),createVNode(pf),createVNode(Ef,{checked:unref(md),onClick:Wd[1]||(Wd[1]=Af=>unref(Fd)())},{default:withCtx(()=>Wd[9]||(Wd[9]=[createTextVNode(" 统计字数和阅读时间 ")])),_:1},8,["checked"])]),_:1})]),_:1}),createVNode(xf),createVNode(Cf),createVNode(If)]),_:1})]),createBaseVNode("div",_hoisted_3$1,[createVNode(Eh,{"delay-duration":200},{default:withCtx(()=>[createVNode(xh,null,{default:withCtx(()=>[createVNode(Pf,{"as-child":""},{default:withCtx(()=>[createVNode(wf,{variant:"outline",onClick:Wd[2]||(Wd[2]=Af=>vd.value=!unref(vd))},{default:withCtx(()=>[withDirectives(createVNode(unref(PanelLeftOpen),{class:"size-4"},null,512),[[vShow,!unref(vd)]]),withDirectives(createVNode(unref(PanelLeftClose),{class:"size-4"},null,512),[[vShow,unref(vd)]])]),_:1})]),_:1}),createVNode(lh,{side:"left"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(vd)?"关闭":"内容管理"),1)]),_:1})]),_:1})]),_:1}),createVNode(wf,{variant:"outline",onClick:Wd[3]||(Wd[3]=Af=>unref(Nd)())},{default:withCtx(()=>[withDirectives(createVNode(unref(Moon),{class:"size-4"},null,512),[[vShow,unref(fd)]]),withDirectives(createVNode(unref(Sun),{class:"size-4"},null,512),[[vShow,!unref(fd)]])]),_:1}),createBaseVNode("div",_hoisted_4$1,[createVNode(wf,{variant:"ghost",class:"shadow-none",onClick:Ud},{default:withCtx(()=>Wd[10]||(Wd[10]=[createTextVNode(" 复制 ")])),_:1}),createVNode(Mh,{orientation:"vertical",class:"h-5"}),createVNode(vh,{modelValue:unref(Hd),"onUpdate:modelValue":Wd[5]||(Wd[5]=Af=>isRef(Hd)?Hd.value=Af:null)},{default:withCtx(()=>[createVNode(dh,{"as-child":""},{default:withCtx(()=>[createVNode(wf,{variant:"ghost",class:"px-2 shadow-none"},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"text-secondary-foreground h-4 w-4"})]),_:1})]),_:1}),createVNode(Sh,{align:"end","align-offset":-5,class:"w-[200px]"},{default:withCtx(()=>[createVNode(fh,{modelValue:unref(Hd),"onUpdate:modelValue":Wd[4]||(Wd[4]=Af=>isRef(Hd)?Hd.value=Af:null)},{default:withCtx(()=>[createVNode(eh,{value:"txt"},{default:withCtx(()=>Wd[11]||(Wd[11]=[createTextVNode(" 公众号格式 ")])),_:1}),createVNode(eh,{value:"html"},{default:withCtx(()=>Wd[12]||(Wd[12]=[createTextVNode(" HTML 格式 ")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])]),createVNode(Df),createVNode(wf,{variant:"outline",onClick:Wd[6]||(Wd[6]=Af=>unref(pd).isOpenRightSlider=!unref(pd).isOpenRightSlider)},{default:withCtx(()=>[createVNode(unref(Settings),{class:"size-4"})]),_:1}),createVNode(unref(_sfc_main$3),{"rich-colors":"",position:"top-center"})])])}}}),__unplugin_components_0=_export_sfc(_sfc_main$2,[["__scopeId","data-v-9a6c5c36"]]);function bind(Ra,qa){return function(){return Ra.apply(qa,arguments)}}var define_process_default$7={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(Ra=>qa=>{const rd=toString$1.call(qa);return Ra[rd]||(Ra[rd]=rd.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=Ra=>(Ra=Ra.toLowerCase(),qa=>kindOf(qa)===Ra),typeOfTest=Ra=>qa=>typeof qa===Ra,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(Ra){return Ra!==null&&!isUndefined(Ra)&&Ra.constructor!==null&&!isUndefined(Ra.constructor)&&isFunction$1(Ra.constructor.isBuffer)&&Ra.constructor.isBuffer(Ra)}const isArrayBuffer$2=kindOfTest("ArrayBuffer");function isArrayBufferView(Ra){let qa;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?qa=ArrayBuffer.isView(Ra):qa=Ra&&Ra.buffer&&isArrayBuffer$2(Ra.buffer),qa}const isString$1=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$1=Ra=>Ra!==null&&typeof Ra=="object",isBoolean$1=Ra=>Ra===!0||Ra===!1,isPlainObject=Ra=>{if(kindOf(Ra)!=="object")return!1;const qa=getPrototypeOf(Ra);return(qa===null||qa===Object.prototype||Object.getPrototypeOf(qa)===null)&&!(Symbol.toStringTag in Ra)&&!(Symbol.iterator in Ra)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=Ra=>isObject$1(Ra)&&isFunction$1(Ra.pipe),isFormData=Ra=>{let qa;return Ra&&(typeof FormData=="function"&&Ra instanceof FormData||isFunction$1(Ra.append)&&((qa=kindOf(Ra))==="formdata"||qa==="object"&&isFunction$1(Ra.toString)&&Ra.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream$3,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=Ra=>Ra.trim?Ra.trim():Ra.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(Ra,qa,{allOwnKeys:rd=!1}={}){if(Ra===null||typeof Ra>"u")return;let sd,pd;if(typeof Ra!="object"&&(Ra=[Ra]),isArray(Ra))for(sd=0,pd=Ra.length;sd0;)if(pd=rd[sd],qa===pd.toLowerCase())return pd;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global$1,isContextDefined=Ra=>!isUndefined(Ra)&&Ra!==_global;function merge(){const{caseless:Ra}=isContextDefined(this)&&this||{},qa={},rd=(sd,pd)=>{const fd=Ra&&findKey(qa,pd)||pd;isPlainObject(qa[fd])&&isPlainObject(sd)?qa[fd]=merge(qa[fd],sd):isPlainObject(sd)?qa[fd]=merge({},sd):isArray(sd)?qa[fd]=sd.slice():qa[fd]=sd};for(let sd=0,pd=arguments.length;sd(forEach(qa,(pd,fd)=>{rd&&isFunction$1(pd)?Ra[fd]=bind(pd,rd):Ra[fd]=pd},{allOwnKeys:sd}),Ra),stripBOM=Ra=>(Ra.charCodeAt(0)===65279&&(Ra=Ra.slice(1)),Ra),inherits$1=(Ra,qa,rd,sd)=>{Ra.prototype=Object.create(qa.prototype,sd),Ra.prototype.constructor=Ra,Object.defineProperty(Ra,"super",{value:qa.prototype}),rd&&Object.assign(Ra.prototype,rd)},toFlatObject=(Ra,qa,rd,sd)=>{let pd,fd,hd;const md={};if(qa=qa||{},Ra==null)return qa;do{for(pd=Object.getOwnPropertyNames(Ra),fd=pd.length;fd-- >0;)hd=pd[fd],(!sd||sd(hd,Ra,qa))&&!md[hd]&&(qa[hd]=Ra[hd],md[hd]=!0);Ra=rd!==!1&&getPrototypeOf(Ra)}while(Ra&&(!rd||rd(Ra,qa))&&Ra!==Object.prototype);return qa},endsWith=(Ra,qa,rd)=>{Ra=String(Ra),(rd===void 0||rd>Ra.length)&&(rd=Ra.length),rd-=qa.length;const sd=Ra.indexOf(qa,rd);return sd!==-1&&sd===rd},toArray$1=Ra=>{if(!Ra)return null;if(isArray(Ra))return Ra;let qa=Ra.length;if(!isNumber$1(qa))return null;const rd=new Array(qa);for(;qa-- >0;)rd[qa]=Ra[qa];return rd},isTypedArray=(Ra=>qa=>Ra&&qa instanceof Ra)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(Ra,qa)=>{const sd=(Ra&&Ra[Symbol.iterator]).call(Ra);let pd;for(;(pd=sd.next())&&!pd.done;){const fd=pd.value;qa.call(Ra,fd[0],fd[1])}},matchAll=(Ra,qa)=>{let rd;const sd=[];for(;(rd=Ra.exec(qa))!==null;)sd.push(rd);return sd},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=Ra=>Ra.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(rd,sd,pd){return sd.toUpperCase()+pd}),hasOwnProperty$1=(({hasOwnProperty:Ra})=>(qa,rd)=>Ra.call(qa,rd))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(Ra,qa)=>{const rd=Object.getOwnPropertyDescriptors(Ra),sd={};forEach(rd,(pd,fd)=>{let hd;(hd=qa(pd,fd,Ra))!==!1&&(sd[fd]=hd||pd)}),Object.defineProperties(Ra,sd)},freezeMethods=Ra=>{reduceDescriptors(Ra,(qa,rd)=>{if(isFunction$1(Ra)&&["arguments","caller","callee"].indexOf(rd)!==-1)return!1;const sd=Ra[rd];if(isFunction$1(sd)){if(qa.enumerable=!1,"writable"in qa){qa.writable=!1;return}qa.set||(qa.set=()=>{throw Error("Can not rewrite read-only method '"+rd+"'")})}})},toObjectSet=(Ra,qa)=>{const rd={},sd=pd=>{pd.forEach(fd=>{rd[fd]=!0})};return isArray(Ra)?sd(Ra):sd(String(Ra).split(qa)),rd},noop=()=>{},toFiniteNumber=(Ra,qa)=>Ra!=null&&Number.isFinite(Ra=+Ra)?Ra:qa,ALPHA="abcdefghijklmnopqrstuvwxyz",DIGIT="0123456789",ALPHABET={DIGIT,ALPHA,ALPHA_DIGIT:ALPHA+ALPHA.toUpperCase()+DIGIT},generateString=(Ra=16,qa=ALPHABET.ALPHA_DIGIT)=>{let rd="";const{length:sd}=qa;for(;Ra--;)rd+=qa[Math.random()*sd|0];return rd};function isSpecCompliantForm(Ra){return!!(Ra&&isFunction$1(Ra.append)&&Ra[Symbol.toStringTag]==="FormData"&&Ra[Symbol.iterator])}const toJSONObject=Ra=>{const qa=new Array(10),rd=(sd,pd)=>{if(isObject$1(sd)){if(qa.indexOf(sd)>=0)return;if(!("toJSON"in sd)){qa[pd]=sd;const fd=isArray(sd)?[]:{};return forEach(sd,(hd,md)=>{const gd=rd(hd,pd+1);!isUndefined(gd)&&(fd[md]=gd)}),qa[pd]=void 0,fd}}return sd};return rd(Ra,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=Ra=>Ra&&(isObject$1(Ra)||isFunction$1(Ra))&&isFunction$1(Ra.then)&&isFunction$1(Ra.catch),_setImmediate=((Ra,qa)=>Ra?setImmediate:qa?((rd,sd)=>(_global.addEventListener("message",({source:pd,data:fd})=>{pd===_global&&fd===rd&&sd.length&&sd.shift()()},!1),pd=>{sd.push(pd),_global.postMessage(rd,"*")}))(`axios@${Math.random()}`,[]):rd=>setTimeout(rd))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof define_process_default$7<"u"&&define_process_default$7.nextTick||_setImmediate,utils$2={isArray,isArrayBuffer:isArrayBuffer$2,isBuffer,isFormData,isArrayBufferView,isString:isString$1,isNumber:isNumber$1,isBoolean:isBoolean$1,isObject:isObject$1,isPlainObject,isReadableStream:isReadableStream$3,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits:inherits$1,toFlatObject,kindOf,kindOfTest,endsWith,toArray:toArray$1,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,ALPHABET,generateString,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError(Ra,qa,rd,sd,pd){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=Ra,this.name="AxiosError",qa&&(this.code=qa),rd&&(this.config=rd),sd&&(this.request=sd),pd&&(this.response=pd,this.status=pd.status?pd.status:null)}utils$2.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$2.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(Ra=>{descriptors[Ra]={value:Ra}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(Ra,qa,rd,sd,pd,fd)=>{const hd=Object.create(prototype$1);return utils$2.toFlatObject(Ra,hd,function(gd){return gd!==Error.prototype},md=>md!=="isAxiosError"),AxiosError.call(hd,Ra.message,qa,rd,sd,pd),hd.cause=Ra,hd.name=Ra.name,fd&&Object.assign(hd,fd),hd};const httpAdapter=null;function isVisitable(Ra){return utils$2.isPlainObject(Ra)||utils$2.isArray(Ra)}function removeBrackets(Ra){return utils$2.endsWith(Ra,"[]")?Ra.slice(0,-2):Ra}function renderKey(Ra,qa,rd){return Ra?Ra.concat(qa).map(function(pd,fd){return pd=removeBrackets(pd),!rd&&fd?"["+pd+"]":pd}).join(rd?".":""):qa}function isFlatArray(Ra){return utils$2.isArray(Ra)&&!Ra.some(isVisitable)}const predicates=utils$2.toFlatObject(utils$2,{},null,function(qa){return/^is[A-Z]/.test(qa)});function toFormData(Ra,qa,rd){if(!utils$2.isObject(Ra))throw new TypeError("target must be an object");qa=qa||new FormData,rd=utils$2.toFlatObject(rd,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Hd,Vd){return!utils$2.isUndefined(Vd[Hd])});const sd=rd.metaTokens,pd=rd.visitor||vd,fd=rd.dots,hd=rd.indexes,gd=(rd.Blob||typeof Blob<"u"&&Blob)&&utils$2.isSpecCompliantForm(qa);if(!utils$2.isFunction(pd))throw new TypeError("visitor must be a function");function yd(Fd){if(Fd===null)return"";if(utils$2.isDate(Fd))return Fd.toISOString();if(!gd&&utils$2.isBlob(Fd))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$2.isArrayBuffer(Fd)||utils$2.isTypedArray(Fd)?gd&&typeof Blob=="function"?new Blob([Fd]):Buffer$4.from(Fd):Fd}function vd(Fd,Hd,Vd){let Gd=Fd;if(Fd&&!Vd&&typeof Fd=="object"){if(utils$2.endsWith(Hd,"{}"))Hd=sd?Hd:Hd.slice(0,-2),Fd=JSON.stringify(Fd);else if(utils$2.isArray(Fd)&&isFlatArray(Fd)||(utils$2.isFileList(Fd)||utils$2.endsWith(Hd,"[]"))&&(Gd=utils$2.toArray(Fd)))return Hd=removeBrackets(Hd),Gd.forEach(function(qd,Wd){!(utils$2.isUndefined(qd)||qd===null)&&qa.append(hd===!0?renderKey([Hd],Wd,fd):hd===null?Hd:Hd+"[]",yd(qd))}),!1}return isVisitable(Fd)?!0:(qa.append(renderKey(Vd,Hd,fd),yd(Fd)),!1)}const Nd=[],Md=Object.assign(predicates,{defaultVisitor:vd,convertValue:yd,isVisitable});function Ld(Fd,Hd){if(!utils$2.isUndefined(Fd)){if(Nd.indexOf(Fd)!==-1)throw Error("Circular reference detected in "+Hd.join("."));Nd.push(Fd),utils$2.forEach(Fd,function(Gd,Ud){(!(utils$2.isUndefined(Gd)||Gd===null)&&pd.call(qa,Gd,utils$2.isString(Ud)?Ud.trim():Ud,Hd,Md))===!0&&Ld(Gd,Hd?Hd.concat(Ud):[Ud])}),Nd.pop()}}if(!utils$2.isObject(Ra))throw new TypeError("data must be an object");return Ld(Ra),qa}function encode$2(Ra){const qa={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(Ra).replace(/[!'()~]|%20|%00/g,function(sd){return qa[sd]})}function AxiosURLSearchParams(Ra,qa){this._pairs=[],Ra&&toFormData(Ra,this,qa)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(qa,rd){this._pairs.push([qa,rd])};prototype.toString=function(qa){const rd=qa?function(sd){return qa.call(this,sd,encode$2)}:encode$2;return this._pairs.map(function(pd){return rd(pd[0])+"="+rd(pd[1])},"").join("&")};function encode$1(Ra){return encodeURIComponent(Ra).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(Ra,qa,rd){if(!qa)return Ra;const sd=rd&&rd.encode||encode$1;utils$2.isFunction(rd)&&(rd={serialize:rd});const pd=rd&&rd.serialize;let fd;if(pd?fd=pd(qa,rd):fd=utils$2.isURLSearchParams(qa)?qa.toString():new AxiosURLSearchParams(qa,rd).toString(sd),fd){const hd=Ra.indexOf("#");hd!==-1&&(Ra=Ra.slice(0,hd)),Ra+=(Ra.indexOf("?")===-1?"?":"&")+fd}return Ra}class InterceptorManager{constructor(){this.handlers=[]}use(qa,rd,sd){return this.handlers.push({fulfilled:qa,rejected:rd,synchronous:sd?sd.synchronous:!1,runWhen:sd?sd.runWhen:null}),this.handlers.length-1}eject(qa){this.handlers[qa]&&(this.handlers[qa]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(qa){utils$2.forEach(this.handlers,function(sd){sd!==null&&qa(sd)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils$1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils$1,...platform$1};function toURLEncodedForm(Ra,qa){return toFormData(Ra,new platform.classes.URLSearchParams,Object.assign({visitor:function(rd,sd,pd,fd){return platform.isNode&&utils$2.isBuffer(rd)?(this.append(sd,rd.toString("base64")),!1):fd.defaultVisitor.apply(this,arguments)}},qa))}function parsePropPath(Ra){return utils$2.matchAll(/\w+|\[(\w*)]/g,Ra).map(qa=>qa[0]==="[]"?"":qa[1]||qa[0])}function arrayToObject(Ra){const qa={},rd=Object.keys(Ra);let sd;const pd=rd.length;let fd;for(sd=0;sd=rd.length;return hd=!hd&&utils$2.isArray(pd)?pd.length:hd,gd?(utils$2.hasOwnProp(pd,hd)?pd[hd]=[pd[hd],sd]:pd[hd]=sd,!md):((!pd[hd]||!utils$2.isObject(pd[hd]))&&(pd[hd]=[]),qa(rd,sd,pd[hd],fd)&&utils$2.isArray(pd[hd])&&(pd[hd]=arrayToObject(pd[hd])),!md)}if(utils$2.isFormData(Ra)&&utils$2.isFunction(Ra.entries)){const rd={};return utils$2.forEachEntry(Ra,(sd,pd)=>{qa(parsePropPath(sd),pd,rd,0)}),rd}return null}function stringifySafely(Ra,qa,rd){if(utils$2.isString(Ra))try{return(qa||JSON.parse)(Ra),utils$2.trim(Ra)}catch(sd){if(sd.name!=="SyntaxError")throw sd}return(0,JSON.stringify)(Ra)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(qa,rd){const sd=rd.getContentType()||"",pd=sd.indexOf("application/json")>-1,fd=utils$2.isObject(qa);if(fd&&utils$2.isHTMLForm(qa)&&(qa=new FormData(qa)),utils$2.isFormData(qa))return pd?JSON.stringify(formDataToJSON(qa)):qa;if(utils$2.isArrayBuffer(qa)||utils$2.isBuffer(qa)||utils$2.isStream(qa)||utils$2.isFile(qa)||utils$2.isBlob(qa)||utils$2.isReadableStream(qa))return qa;if(utils$2.isArrayBufferView(qa))return qa.buffer;if(utils$2.isURLSearchParams(qa))return rd.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),qa.toString();let md;if(fd){if(sd.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(qa,this.formSerializer).toString();if((md=utils$2.isFileList(qa))||sd.indexOf("multipart/form-data")>-1){const gd=this.env&&this.env.FormData;return toFormData(md?{"files[]":qa}:qa,gd&&new gd,this.formSerializer)}}return fd||pd?(rd.setContentType("application/json",!1),stringifySafely(qa)):qa}],transformResponse:[function(qa){const rd=this.transitional||defaults$1.transitional,sd=rd&&rd.forcedJSONParsing,pd=this.responseType==="json";if(utils$2.isResponse(qa)||utils$2.isReadableStream(qa))return qa;if(qa&&utils$2.isString(qa)&&(sd&&!this.responseType||pd)){const hd=!(rd&&rd.silentJSONParsing)&&pd;try{return JSON.parse(qa)}catch(md){if(hd)throw md.name==="SyntaxError"?AxiosError.from(md,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):md}}return qa}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(qa){return qa>=200&&qa<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$2.forEach(["delete","get","head","post","put","patch"],Ra=>{defaults$1.headers[Ra]={}});const ignoreDuplicateOf=utils$2.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=Ra=>{const qa={};let rd,sd,pd;return Ra&&Ra.split(` -`).forEach(function(hd){pd=hd.indexOf(":"),rd=hd.substring(0,pd).trim().toLowerCase(),sd=hd.substring(pd+1).trim(),!(!rd||qa[rd]&&ignoreDuplicateOf[rd])&&(rd==="set-cookie"?qa[rd]?qa[rd].push(sd):qa[rd]=[sd]:qa[rd]=qa[rd]?qa[rd]+", "+sd:sd)}),qa},$internals=Symbol("internals");function normalizeHeader(Ra){return Ra&&String(Ra).trim().toLowerCase()}function normalizeValue(Ra){return Ra===!1||Ra==null?Ra:utils$2.isArray(Ra)?Ra.map(normalizeValue):String(Ra)}function parseTokens(Ra){const qa=Object.create(null),rd=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let sd;for(;sd=rd.exec(Ra);)qa[sd[1]]=sd[2];return qa}const isValidHeaderName=Ra=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Ra.trim());function matchHeaderValue(Ra,qa,rd,sd,pd){if(utils$2.isFunction(sd))return sd.call(this,qa,rd);if(pd&&(qa=rd),!!utils$2.isString(qa)){if(utils$2.isString(sd))return qa.indexOf(sd)!==-1;if(utils$2.isRegExp(sd))return sd.test(qa)}}function formatHeader(Ra){return Ra.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(qa,rd,sd)=>rd.toUpperCase()+sd)}function buildAccessors(Ra,qa){const rd=utils$2.toCamelCase(" "+qa);["get","set","has"].forEach(sd=>{Object.defineProperty(Ra,sd+rd,{value:function(pd,fd,hd){return this[sd].call(this,qa,pd,fd,hd)},configurable:!0})})}class AxiosHeaders{constructor(qa){qa&&this.set(qa)}set(qa,rd,sd){const pd=this;function fd(md,gd,yd){const vd=normalizeHeader(gd);if(!vd)throw new Error("header name must be a non-empty string");const Nd=utils$2.findKey(pd,vd);(!Nd||pd[Nd]===void 0||yd===!0||yd===void 0&&pd[Nd]!==!1)&&(pd[Nd||gd]=normalizeValue(md))}const hd=(md,gd)=>utils$2.forEach(md,(yd,vd)=>fd(yd,vd,gd));if(utils$2.isPlainObject(qa)||qa instanceof this.constructor)hd(qa,rd);else if(utils$2.isString(qa)&&(qa=qa.trim())&&!isValidHeaderName(qa))hd(parseHeaders(qa),rd);else if(utils$2.isHeaders(qa))for(const[md,gd]of qa.entries())fd(gd,md,sd);else qa!=null&&fd(rd,qa,sd);return this}get(qa,rd){if(qa=normalizeHeader(qa),qa){const sd=utils$2.findKey(this,qa);if(sd){const pd=this[sd];if(!rd)return pd;if(rd===!0)return parseTokens(pd);if(utils$2.isFunction(rd))return rd.call(this,pd,sd);if(utils$2.isRegExp(rd))return rd.exec(pd);throw new TypeError("parser must be boolean|regexp|function")}}}has(qa,rd){if(qa=normalizeHeader(qa),qa){const sd=utils$2.findKey(this,qa);return!!(sd&&this[sd]!==void 0&&(!rd||matchHeaderValue(this,this[sd],sd,rd)))}return!1}delete(qa,rd){const sd=this;let pd=!1;function fd(hd){if(hd=normalizeHeader(hd),hd){const md=utils$2.findKey(sd,hd);md&&(!rd||matchHeaderValue(sd,sd[md],md,rd))&&(delete sd[md],pd=!0)}}return utils$2.isArray(qa)?qa.forEach(fd):fd(qa),pd}clear(qa){const rd=Object.keys(this);let sd=rd.length,pd=!1;for(;sd--;){const fd=rd[sd];(!qa||matchHeaderValue(this,this[fd],fd,qa,!0))&&(delete this[fd],pd=!0)}return pd}normalize(qa){const rd=this,sd={};return utils$2.forEach(this,(pd,fd)=>{const hd=utils$2.findKey(sd,fd);if(hd){rd[hd]=normalizeValue(pd),delete rd[fd];return}const md=qa?formatHeader(fd):String(fd).trim();md!==fd&&delete rd[fd],rd[md]=normalizeValue(pd),sd[md]=!0}),this}concat(...qa){return this.constructor.concat(this,...qa)}toJSON(qa){const rd=Object.create(null);return utils$2.forEach(this,(sd,pd)=>{sd!=null&&sd!==!1&&(rd[pd]=qa&&utils$2.isArray(sd)?sd.join(", "):sd)}),rd}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([qa,rd])=>qa+": "+rd).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(qa){return qa instanceof this?qa:new this(qa)}static concat(qa,...rd){const sd=new this(qa);return rd.forEach(pd=>sd.set(pd)),sd}static accessor(qa){const sd=(this[$internals]=this[$internals]={accessors:{}}).accessors,pd=this.prototype;function fd(hd){const md=normalizeHeader(hd);sd[md]||(buildAccessors(pd,hd),sd[md]=!0)}return utils$2.isArray(qa)?qa.forEach(fd):fd(qa),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$2.reduceDescriptors(AxiosHeaders.prototype,({value:Ra},qa)=>{let rd=qa[0].toUpperCase()+qa.slice(1);return{get:()=>Ra,set(sd){this[rd]=sd}}});utils$2.freezeMethods(AxiosHeaders);function transformData(Ra,qa){const rd=this||defaults$1,sd=qa||rd,pd=AxiosHeaders.from(sd.headers);let fd=sd.data;return utils$2.forEach(Ra,function(md){fd=md.call(rd,fd,pd.normalize(),qa?qa.status:void 0)}),pd.normalize(),fd}function isCancel(Ra){return!!(Ra&&Ra.__CANCEL__)}function CanceledError(Ra,qa,rd){AxiosError.call(this,Ra??"canceled",AxiosError.ERR_CANCELED,qa,rd),this.name="CanceledError"}utils$2.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(Ra,qa,rd){const sd=rd.config.validateStatus;!rd.status||!sd||sd(rd.status)?Ra(rd):qa(new AxiosError("Request failed with status code "+rd.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(rd.status/100)-4],rd.config,rd.request,rd))}function parseProtocol(Ra){const qa=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Ra);return qa&&qa[1]||""}function speedometer(Ra,qa){Ra=Ra||10;const rd=new Array(Ra),sd=new Array(Ra);let pd=0,fd=0,hd;return qa=qa!==void 0?qa:1e3,function(gd){const yd=Date.now(),vd=sd[fd];hd||(hd=yd),rd[pd]=gd,sd[pd]=yd;let Nd=fd,Md=0;for(;Nd!==pd;)Md+=rd[Nd++],Nd=Nd%Ra;if(pd=(pd+1)%Ra,pd===fd&&(fd=(fd+1)%Ra),yd-hd{rd=vd,pd=null,fd&&(clearTimeout(fd),fd=null),Ra.apply(null,yd)};return[(...yd)=>{const vd=Date.now(),Nd=vd-rd;Nd>=sd?hd(yd,vd):(pd=yd,fd||(fd=setTimeout(()=>{fd=null,hd(pd)},sd-Nd)))},()=>pd&&hd(pd)]}const progressEventReducer=(Ra,qa,rd=3)=>{let sd=0;const pd=speedometer(50,250);return throttle(fd=>{const hd=fd.loaded,md=fd.lengthComputable?fd.total:void 0,gd=hd-sd,yd=pd(gd),vd=hd<=md;sd=hd;const Nd={loaded:hd,total:md,progress:md?hd/md:void 0,bytes:gd,rate:yd||void 0,estimated:yd&&md&&vd?(md-hd)/yd:void 0,event:fd,lengthComputable:md!=null,[qa?"download":"upload"]:!0};Ra(Nd)},rd)},progressEventDecorator=(Ra,qa)=>{const rd=Ra!=null;return[sd=>qa[0]({lengthComputable:rd,total:Ra,loaded:sd}),qa[1]]},asyncDecorator=Ra=>(...qa)=>utils$2.asap(()=>Ra(...qa)),isURLSameOrigin=platform.hasStandardBrowserEnv?((Ra,qa)=>rd=>(rd=new URL(rd,platform.origin),Ra.protocol===rd.protocol&&Ra.host===rd.host&&(qa||Ra.port===rd.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(Ra,qa,rd,sd,pd,fd){const hd=[Ra+"="+encodeURIComponent(qa)];utils$2.isNumber(rd)&&hd.push("expires="+new Date(rd).toGMTString()),utils$2.isString(sd)&&hd.push("path="+sd),utils$2.isString(pd)&&hd.push("domain="+pd),fd===!0&&hd.push("secure"),document.cookie=hd.join("; ")},read(Ra){const qa=document.cookie.match(new RegExp("(^|;\\s*)("+Ra+")=([^;]*)"));return qa?decodeURIComponent(qa[3]):null},remove(Ra){this.write(Ra,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ra){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Ra)}function combineURLs(Ra,qa){return qa?Ra.replace(/\/?\/$/,"")+"/"+qa.replace(/^\/+/,""):Ra}function buildFullPath(Ra,qa){return Ra&&!isAbsoluteURL(qa)?combineURLs(Ra,qa):qa}const headersToObject=Ra=>Ra instanceof AxiosHeaders?{...Ra}:Ra;function mergeConfig(Ra,qa){qa=qa||{};const rd={};function sd(yd,vd,Nd,Md){return utils$2.isPlainObject(yd)&&utils$2.isPlainObject(vd)?utils$2.merge.call({caseless:Md},yd,vd):utils$2.isPlainObject(vd)?utils$2.merge({},vd):utils$2.isArray(vd)?vd.slice():vd}function pd(yd,vd,Nd,Md){if(utils$2.isUndefined(vd)){if(!utils$2.isUndefined(yd))return sd(void 0,yd,Nd,Md)}else return sd(yd,vd,Nd,Md)}function fd(yd,vd){if(!utils$2.isUndefined(vd))return sd(void 0,vd)}function hd(yd,vd){if(utils$2.isUndefined(vd)){if(!utils$2.isUndefined(yd))return sd(void 0,yd)}else return sd(void 0,vd)}function md(yd,vd,Nd){if(Nd in qa)return sd(yd,vd);if(Nd in Ra)return sd(void 0,yd)}const gd={url:fd,method:fd,data:fd,baseURL:hd,transformRequest:hd,transformResponse:hd,paramsSerializer:hd,timeout:hd,timeoutMessage:hd,withCredentials:hd,withXSRFToken:hd,adapter:hd,responseType:hd,xsrfCookieName:hd,xsrfHeaderName:hd,onUploadProgress:hd,onDownloadProgress:hd,decompress:hd,maxContentLength:hd,maxBodyLength:hd,beforeRedirect:hd,transport:hd,httpAgent:hd,httpsAgent:hd,cancelToken:hd,socketPath:hd,responseEncoding:hd,validateStatus:md,headers:(yd,vd,Nd)=>pd(headersToObject(yd),headersToObject(vd),Nd,!0)};return utils$2.forEach(Object.keys(Object.assign({},Ra,qa)),function(vd){const Nd=gd[vd]||pd,Md=Nd(Ra[vd],qa[vd],vd);utils$2.isUndefined(Md)&&Nd!==md||(rd[vd]=Md)}),rd}const resolveConfig=Ra=>{const qa=mergeConfig({},Ra);let{data:rd,withXSRFToken:sd,xsrfHeaderName:pd,xsrfCookieName:fd,headers:hd,auth:md}=qa;qa.headers=hd=AxiosHeaders.from(hd),qa.url=buildURL(buildFullPath(qa.baseURL,qa.url),Ra.params,Ra.paramsSerializer),md&&hd.set("Authorization","Basic "+btoa((md.username||"")+":"+(md.password?unescape(encodeURIComponent(md.password)):"")));let gd;if(utils$2.isFormData(rd)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)hd.setContentType(void 0);else if((gd=hd.getContentType())!==!1){const[yd,...vd]=gd?gd.split(";").map(Nd=>Nd.trim()).filter(Boolean):[];hd.setContentType([yd||"multipart/form-data",...vd].join("; "))}}if(platform.hasStandardBrowserEnv&&(sd&&utils$2.isFunction(sd)&&(sd=sd(qa)),sd||sd!==!1&&isURLSameOrigin(qa.url))){const yd=pd&&fd&&cookies.read(fd);yd&&hd.set(pd,yd)}return qa},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(Ra){return new Promise(function(rd,sd){const pd=resolveConfig(Ra);let fd=pd.data;const hd=AxiosHeaders.from(pd.headers).normalize();let{responseType:md,onUploadProgress:gd,onDownloadProgress:yd}=pd,vd,Nd,Md,Ld,Fd;function Hd(){Ld&&Ld(),Fd&&Fd(),pd.cancelToken&&pd.cancelToken.unsubscribe(vd),pd.signal&&pd.signal.removeEventListener("abort",vd)}let Vd=new XMLHttpRequest;Vd.open(pd.method.toUpperCase(),pd.url,!0),Vd.timeout=pd.timeout;function Gd(){if(!Vd)return;const qd=AxiosHeaders.from("getAllResponseHeaders"in Vd&&Vd.getAllResponseHeaders()),Kd={data:!md||md==="text"||md==="json"?Vd.responseText:Vd.response,status:Vd.status,statusText:Vd.statusText,headers:qd,config:Ra,request:Vd};settle(function(df){rd(df),Hd()},function(df){sd(df),Hd()},Kd),Vd=null}"onloadend"in Vd?Vd.onloadend=Gd:Vd.onreadystatechange=function(){!Vd||Vd.readyState!==4||Vd.status===0&&!(Vd.responseURL&&Vd.responseURL.indexOf("file:")===0)||setTimeout(Gd)},Vd.onabort=function(){Vd&&(sd(new AxiosError("Request aborted",AxiosError.ECONNABORTED,Ra,Vd)),Vd=null)},Vd.onerror=function(){sd(new AxiosError("Network Error",AxiosError.ERR_NETWORK,Ra,Vd)),Vd=null},Vd.ontimeout=function(){let Wd=pd.timeout?"timeout of "+pd.timeout+"ms exceeded":"timeout exceeded";const Kd=pd.transitional||transitionalDefaults;pd.timeoutErrorMessage&&(Wd=pd.timeoutErrorMessage),sd(new AxiosError(Wd,Kd.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,Ra,Vd)),Vd=null},fd===void 0&&hd.setContentType(null),"setRequestHeader"in Vd&&utils$2.forEach(hd.toJSON(),function(Wd,Kd){Vd.setRequestHeader(Kd,Wd)}),utils$2.isUndefined(pd.withCredentials)||(Vd.withCredentials=!!pd.withCredentials),md&&md!=="json"&&(Vd.responseType=pd.responseType),yd&&([Md,Fd]=progressEventReducer(yd,!0),Vd.addEventListener("progress",Md)),gd&&Vd.upload&&([Nd,Ld]=progressEventReducer(gd),Vd.upload.addEventListener("progress",Nd),Vd.upload.addEventListener("loadend",Ld)),(pd.cancelToken||pd.signal)&&(vd=qd=>{Vd&&(sd(!qd||qd.type?new CanceledError(null,Ra,Vd):qd),Vd.abort(),Vd=null)},pd.cancelToken&&pd.cancelToken.subscribe(vd),pd.signal&&(pd.signal.aborted?vd():pd.signal.addEventListener("abort",vd)));const Ud=parseProtocol(pd.url);if(Ud&&platform.protocols.indexOf(Ud)===-1){sd(new AxiosError("Unsupported protocol "+Ud+":",AxiosError.ERR_BAD_REQUEST,Ra));return}Vd.send(fd||null)})},composeSignals=(Ra,qa)=>{const{length:rd}=Ra=Ra?Ra.filter(Boolean):[];if(qa||rd){let sd=new AbortController,pd;const fd=function(yd){if(!pd){pd=!0,md();const vd=yd instanceof Error?yd:this.reason;sd.abort(vd instanceof AxiosError?vd:new CanceledError(vd instanceof Error?vd.message:vd))}};let hd=qa&&setTimeout(()=>{hd=null,fd(new AxiosError(`timeout ${qa} of ms exceeded`,AxiosError.ETIMEDOUT))},qa);const md=()=>{Ra&&(hd&&clearTimeout(hd),hd=null,Ra.forEach(yd=>{yd.unsubscribe?yd.unsubscribe(fd):yd.removeEventListener("abort",fd)}),Ra=null)};Ra.forEach(yd=>yd.addEventListener("abort",fd));const{signal:gd}=sd;return gd.unsubscribe=()=>utils$2.asap(md),gd}},streamChunk=function*(Ra,qa){let rd=Ra.byteLength;if(rd{const pd=readBytes(Ra,qa);let fd=0,hd,md=gd=>{hd||(hd=!0,sd&&sd(gd))};return new ReadableStream({async pull(gd){try{const{done:yd,value:vd}=await pd.next();if(yd){md(),gd.close();return}let Nd=vd.byteLength;if(rd){let Md=fd+=Nd;rd(Md)}gd.enqueue(new Uint8Array(vd))}catch(yd){throw md(yd),yd}},cancel(gd){return md(gd),pd.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(Ra=>qa=>Ra.encode(qa))(new TextEncoder):async Ra=>new Uint8Array(await new Response(Ra).arrayBuffer())),test=(Ra,...qa)=>{try{return!!Ra(...qa)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let Ra=!1;const qa=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return Ra=!0,"half"}}).headers.has("Content-Type");return Ra&&!qa}),DEFAULT_CHUNK_SIZE$1=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$2.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(Ra=>Ra.body)};isFetchSupported&&(Ra=>{["text","arrayBuffer","blob","formData","stream"].forEach(qa=>{!resolvers[qa]&&(resolvers[qa]=utils$2.isFunction(Ra[qa])?rd=>rd[qa]():(rd,sd)=>{throw new AxiosError(`Response type '${qa}' is not supported`,AxiosError.ERR_NOT_SUPPORT,sd)})})})(new Response);const getBodyLength=async Ra=>{if(Ra==null)return 0;if(utils$2.isBlob(Ra))return Ra.size;if(utils$2.isSpecCompliantForm(Ra))return(await new Request(platform.origin,{method:"POST",body:Ra}).arrayBuffer()).byteLength;if(utils$2.isArrayBufferView(Ra)||utils$2.isArrayBuffer(Ra))return Ra.byteLength;if(utils$2.isURLSearchParams(Ra)&&(Ra=Ra+""),utils$2.isString(Ra))return(await encodeText(Ra)).byteLength},resolveBodyLength=async(Ra,qa)=>{const rd=utils$2.toFiniteNumber(Ra.getContentLength());return rd??getBodyLength(qa)},fetchAdapter=isFetchSupported&&(async Ra=>{let{url:qa,method:rd,data:sd,signal:pd,cancelToken:fd,timeout:hd,onDownloadProgress:md,onUploadProgress:gd,responseType:yd,headers:vd,withCredentials:Nd="same-origin",fetchOptions:Md}=resolveConfig(Ra);yd=yd?(yd+"").toLowerCase():"text";let Ld=composeSignals([pd,fd&&fd.toAbortSignal()],hd),Fd;const Hd=Ld&&Ld.unsubscribe&&(()=>{Ld.unsubscribe()});let Vd;try{if(gd&&supportsRequestStream&&rd!=="get"&&rd!=="head"&&(Vd=await resolveBodyLength(vd,sd))!==0){let Kd=new Request(qa,{method:"POST",body:sd,duplex:"half"}),Xd;if(utils$2.isFormData(sd)&&(Xd=Kd.headers.get("content-type"))&&vd.setContentType(Xd),Kd.body){const[df,Ef]=progressEventDecorator(Vd,progressEventReducer(asyncDecorator(gd)));sd=trackStream(Kd.body,DEFAULT_CHUNK_SIZE$1,df,Ef)}}utils$2.isString(Nd)||(Nd=Nd?"include":"omit");const Gd="credentials"in Request.prototype;Fd=new Request(qa,{...Md,signal:Ld,method:rd.toUpperCase(),headers:vd.normalize().toJSON(),body:sd,duplex:"half",credentials:Gd?Nd:void 0});let Ud=await fetch(Fd);const qd=supportsResponseStream&&(yd==="stream"||yd==="response");if(supportsResponseStream&&(md||qd&&Hd)){const Kd={};["status","statusText","headers"].forEach(pf=>{Kd[pf]=Ud[pf]});const Xd=utils$2.toFiniteNumber(Ud.headers.get("content-length")),[df,Ef]=md&&progressEventDecorator(Xd,progressEventReducer(asyncDecorator(md),!0))||[];Ud=new Response(trackStream(Ud.body,DEFAULT_CHUNK_SIZE$1,df,()=>{Ef&&Ef(),Hd&&Hd()}),Kd)}yd=yd||"text";let Wd=await resolvers[utils$2.findKey(resolvers,yd)||"text"](Ud,Ra);return!qd&&Hd&&Hd(),await new Promise((Kd,Xd)=>{settle(Kd,Xd,{data:Wd,headers:AxiosHeaders.from(Ud.headers),status:Ud.status,statusText:Ud.statusText,config:Ra,request:Fd})})}catch(Gd){throw Hd&&Hd(),Gd&&Gd.name==="TypeError"&&/fetch/i.test(Gd.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,Ra,Fd),{cause:Gd.cause||Gd}):AxiosError.from(Gd,Gd&&Gd.code,Ra,Fd)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$2.forEach(knownAdapters,(Ra,qa)=>{if(Ra){try{Object.defineProperty(Ra,"name",{value:qa})}catch{}Object.defineProperty(Ra,"adapterName",{value:qa})}});const renderReason=Ra=>`- ${Ra}`,isResolvedHandle=Ra=>utils$2.isFunction(Ra)||Ra===null||Ra===!1,adapters={getAdapter:Ra=>{Ra=utils$2.isArray(Ra)?Ra:[Ra];const{length:qa}=Ra;let rd,sd;const pd={};for(let fd=0;fd`adapter ${md} `+(gd===!1?"is not supported by the environment":"is not available in the build"));let hd=qa?fd.length>1?`since : -`+fd.map(renderReason).join(` -`):" "+renderReason(fd[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+hd,"ERR_NOT_SUPPORT")}return sd},adapters:knownAdapters};function throwIfCancellationRequested(Ra){if(Ra.cancelToken&&Ra.cancelToken.throwIfRequested(),Ra.signal&&Ra.signal.aborted)throw new CanceledError(null,Ra)}function dispatchRequest(Ra){return throwIfCancellationRequested(Ra),Ra.headers=AxiosHeaders.from(Ra.headers),Ra.data=transformData.call(Ra,Ra.transformRequest),["post","put","patch"].indexOf(Ra.method)!==-1&&Ra.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(Ra.adapter||defaults$1.adapter)(Ra).then(function(sd){return throwIfCancellationRequested(Ra),sd.data=transformData.call(Ra,Ra.transformResponse,sd),sd.headers=AxiosHeaders.from(sd.headers),sd},function(sd){return isCancel(sd)||(throwIfCancellationRequested(Ra),sd&&sd.response&&(sd.response.data=transformData.call(Ra,Ra.transformResponse,sd.response),sd.response.headers=AxiosHeaders.from(sd.response.headers))),Promise.reject(sd)})}const VERSION="1.7.9",validators$1={};["object","boolean","number","function","string","symbol"].forEach((Ra,qa)=>{validators$1[Ra]=function(sd){return typeof sd===Ra||"a"+(qa<1?"n ":" ")+Ra}});const deprecatedWarnings={};validators$1.transitional=function(qa,rd,sd){function pd(fd,hd){return"[Axios v"+VERSION+"] Transitional option '"+fd+"'"+hd+(sd?". "+sd:"")}return(fd,hd,md)=>{if(qa===!1)throw new AxiosError(pd(hd," has been removed"+(rd?" in "+rd:"")),AxiosError.ERR_DEPRECATED);return rd&&!deprecatedWarnings[hd]&&(deprecatedWarnings[hd]=!0,console.warn(pd(hd," has been deprecated since v"+rd+" and will be removed in the near future"))),qa?qa(fd,hd,md):!0}};validators$1.spelling=function(qa){return(rd,sd)=>(console.warn(`${sd} is likely a misspelling of ${qa}`),!0)};function assertOptions(Ra,qa,rd){if(typeof Ra!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const sd=Object.keys(Ra);let pd=sd.length;for(;pd-- >0;){const fd=sd[pd],hd=qa[fd];if(hd){const md=Ra[fd],gd=md===void 0||hd(md,fd,Ra);if(gd!==!0)throw new AxiosError("option "+fd+" must be "+gd,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(rd!==!0)throw new AxiosError("Unknown option "+fd,AxiosError.ERR_BAD_OPTION)}}const validator$3={assertOptions,validators:validators$1},validators=validator$3.validators;class Axios{constructor(qa){this.defaults=qa,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(qa,rd){try{return await this._request(qa,rd)}catch(sd){if(sd instanceof Error){let pd={};Error.captureStackTrace?Error.captureStackTrace(pd):pd=new Error;const fd=pd.stack?pd.stack.replace(/^.+\n/,""):"";try{sd.stack?fd&&!String(sd.stack).endsWith(fd.replace(/^.+\n.+\n/,""))&&(sd.stack+=` -`+fd):sd.stack=fd}catch{}}throw sd}}_request(qa,rd){typeof qa=="string"?(rd=rd||{},rd.url=qa):rd=qa||{},rd=mergeConfig(this.defaults,rd);const{transitional:sd,paramsSerializer:pd,headers:fd}=rd;sd!==void 0&&validator$3.assertOptions(sd,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),pd!=null&&(utils$2.isFunction(pd)?rd.paramsSerializer={serialize:pd}:validator$3.assertOptions(pd,{encode:validators.function,serialize:validators.function},!0)),validator$3.assertOptions(rd,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),rd.method=(rd.method||this.defaults.method||"get").toLowerCase();let hd=fd&&utils$2.merge(fd.common,fd[rd.method]);fd&&utils$2.forEach(["delete","get","head","post","put","patch","common"],Fd=>{delete fd[Fd]}),rd.headers=AxiosHeaders.concat(hd,fd);const md=[];let gd=!0;this.interceptors.request.forEach(function(Hd){typeof Hd.runWhen=="function"&&Hd.runWhen(rd)===!1||(gd=gd&&Hd.synchronous,md.unshift(Hd.fulfilled,Hd.rejected))});const yd=[];this.interceptors.response.forEach(function(Hd){yd.push(Hd.fulfilled,Hd.rejected)});let vd,Nd=0,Md;if(!gd){const Fd=[dispatchRequest.bind(this),void 0];for(Fd.unshift.apply(Fd,md),Fd.push.apply(Fd,yd),Md=Fd.length,vd=Promise.resolve(rd);Nd{if(!sd._listeners)return;let fd=sd._listeners.length;for(;fd-- >0;)sd._listeners[fd](pd);sd._listeners=null}),this.promise.then=pd=>{let fd;const hd=new Promise(md=>{sd.subscribe(md),fd=md}).then(pd);return hd.cancel=function(){sd.unsubscribe(fd)},hd},qa(function(fd,hd,md){sd.reason||(sd.reason=new CanceledError(fd,hd,md),rd(sd.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(qa){if(this.reason){qa(this.reason);return}this._listeners?this._listeners.push(qa):this._listeners=[qa]}unsubscribe(qa){if(!this._listeners)return;const rd=this._listeners.indexOf(qa);rd!==-1&&this._listeners.splice(rd,1)}toAbortSignal(){const qa=new AbortController,rd=sd=>{qa.abort(sd)};return this.subscribe(rd),qa.signal.unsubscribe=()=>this.unsubscribe(rd),qa.signal}static source(){let qa;return{token:new CancelToken(function(pd){qa=pd}),cancel:qa}}}function spread(Ra){return function(rd){return Ra.apply(null,rd)}}function isAxiosError(Ra){return utils$2.isObject(Ra)&&Ra.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode).forEach(([Ra,qa])=>{HttpStatusCode[qa]=Ra});function createInstance(Ra){const qa=new Axios(Ra),rd=bind(Axios.prototype.request,qa);return utils$2.extend(rd,Axios.prototype,qa,{allOwnKeys:!0}),utils$2.extend(rd,qa,null,{allOwnKeys:!0}),rd.create=function(pd){return createInstance(mergeConfig(Ra,pd))},rd}const axios=createInstance(defaults$1);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(qa){return Promise.all(qa)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=Ra=>formDataToJSON(utils$2.isHTMLForm(Ra)?new FormData(Ra):Ra);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;const service=axios.create({baseURL:"",timeout:30*1e3});service.interceptors.request.use(Ra=>(/^(?:post|put|delete)$/i.test(`${Ra.method}`)&&Ra.data&&Ra.data.upload&&(Ra.headers["Content-Type"]="multipart/form-data"),Ra),Ra=>{Promise.reject(Ra)});service.interceptors.response.use(Ra=>Ra.data?Ra.data:Promise.reject(Ra),Ra=>Promise.reject(Ra));function utf16to8(Ra){let qa="";const rd=Ra.length;for(let sd=0;sd=1&&pd<=127?qa+=Ra.charAt(sd):pd>2047?(qa+=String.fromCharCode(224|pd>>12&15),qa+=String.fromCharCode(128|pd>>6&63),qa+=String.fromCharCode(128|pd&63)):(qa+=String.fromCharCode(192|pd>>6&31),qa+=String.fromCharCode(128|pd&63))}return qa}function utf8to16(Ra){let qa="",rd=0;const sd=Ra.length;for(;rd>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:qa+=Ra.charAt(rd-1);break;case 12:case 13:fd=Ra.charCodeAt(rd++),qa+=String.fromCharCode((pd&31)<<6|fd&63);break;case 14:fd=Ra.charCodeAt(rd++),hd=Ra.charCodeAt(rd++),qa+=String.fromCharCode((pd&15)<<12|(fd&63)<<6|hd&63);break}}return qa}const base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",base64DecodeChars=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];function base64encode(Ra){let qa="",rd=0;const sd=Ra.length;for(;rd>2),qa+=base64EncodeChars.charAt((pd&3)<<4),qa+="==";break}const fd=Ra.charCodeAt(rd++);if(rd===sd){qa+=base64EncodeChars.charAt(pd>>2),qa+=base64EncodeChars.charAt((pd&3)<<4|(fd&240)>>4),qa+=base64EncodeChars.charAt((fd&15)<<2),qa+="=";break}const hd=Ra.charCodeAt(rd++);qa+=base64EncodeChars.charAt(pd>>2),qa+=base64EncodeChars.charAt((pd&3)<<4|(fd&240)>>4),qa+=base64EncodeChars.charAt((fd&15)<<2|(hd&192)>>6),qa+=base64EncodeChars.charAt(hd&63)}return qa}function base64decode(Ra){let qa,rd,sd,pd,fd=0;const hd=Ra.length;let md="";for(;fd>4);do{if(sd=Ra.charCodeAt(fd++)&255,sd===61)return md;sd=base64DecodeChars[sd]}while(fd>2);do{if(pd=Ra.charCodeAt(fd++)&255,pd===61)return md;pd=base64DecodeChars[pd]}while(fd{let qa=Ra.httpHandler;return{setHttpHandler(rd){qa=rd},httpHandler(){return qa},updateHttpClientConfig(rd,sd){qa.updateHttpClientConfig(rd,sd)},httpHandlerConfigs(){return qa.httpHandlerConfigs()}}},resolveHttpHandlerRuntimeConfig=Ra=>({httpHandler:Ra.httpHandler()});var HttpAuthLocation;(function(Ra){Ra.HEADER="header",Ra.QUERY="query"})(HttpAuthLocation||(HttpAuthLocation={}));var HttpApiKeyAuthLocation;(function(Ra){Ra.HEADER="header",Ra.QUERY="query"})(HttpApiKeyAuthLocation||(HttpApiKeyAuthLocation={}));var EndpointURLScheme;(function(Ra){Ra.HTTP="http",Ra.HTTPS="https"})(EndpointURLScheme||(EndpointURLScheme={}));var AlgorithmId;(function(Ra){Ra.MD5="md5",Ra.CRC32="crc32",Ra.CRC32C="crc32c",Ra.SHA1="sha1",Ra.SHA256="sha256"})(AlgorithmId||(AlgorithmId={}));var FieldPosition;(function(Ra){Ra[Ra.HEADER=0]="HEADER",Ra[Ra.TRAILER=1]="TRAILER"})(FieldPosition||(FieldPosition={}));const SMITHY_CONTEXT_KEY="__smithy_context";var IniSectionType;(function(Ra){Ra.PROFILE="profile",Ra.SSO_SESSION="sso-session",Ra.SERVICES="services"})(IniSectionType||(IniSectionType={}));var RequestHandlerProtocol;(function(Ra){Ra.HTTP_0_9="http/0.9",Ra.HTTP_1_0="http/1.0",Ra.TDS_8_0="tds/8.0"})(RequestHandlerProtocol||(RequestHandlerProtocol={}));class HttpRequest{constructor(qa){this.method=qa.method||"GET",this.hostname=qa.hostname||"localhost",this.port=qa.port,this.query=qa.query||{},this.headers=qa.headers||{},this.body=qa.body,this.protocol=qa.protocol?qa.protocol.slice(-1)!==":"?`${qa.protocol}:`:qa.protocol:"https:",this.path=qa.path?qa.path.charAt(0)!=="/"?`/${qa.path}`:qa.path:"/",this.username=qa.username,this.password=qa.password,this.fragment=qa.fragment}static clone(qa){const rd=new HttpRequest({...qa,headers:{...qa.headers}});return rd.query&&(rd.query=cloneQuery(rd.query)),rd}static isInstance(qa){if(!qa)return!1;const rd=qa;return"method"in rd&&"protocol"in rd&&"hostname"in rd&&"path"in rd&&typeof rd.query=="object"&&typeof rd.headers=="object"}clone(){return HttpRequest.clone(this)}}function cloneQuery(Ra){return Object.keys(Ra).reduce((qa,rd)=>{const sd=Ra[rd];return{...qa,[rd]:Array.isArray(sd)?[...sd]:sd}},{})}class HttpResponse{constructor(qa){this.statusCode=qa.statusCode,this.reason=qa.reason,this.headers=qa.headers||{},this.body=qa.body}static isInstance(qa){if(!qa)return!1;const rd=qa;return typeof rd.statusCode=="number"&&typeof rd.headers=="object"}}function addExpectContinueMiddleware(Ra){return qa=>async rd=>{var pd,fd;const{request:sd}=rd;return HttpRequest.isInstance(sd)&&sd.body&&Ra.runtime==="node"&&((fd=(pd=Ra.requestHandler)==null?void 0:pd.constructor)==null?void 0:fd.name)!=="FetchHttpHandler"&&(sd.headers={...sd.headers,Expect:"100-continue"}),qa({...rd,request:sd})}}const addExpectContinueMiddlewareOptions={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},getAddExpectContinuePlugin=Ra=>({applyToStack:qa=>{qa.add(addExpectContinueMiddleware(Ra),addExpectContinueMiddlewareOptions)}}),RequestChecksumCalculation={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},DEFAULT_REQUEST_CHECKSUM_CALCULATION=RequestChecksumCalculation.WHEN_SUPPORTED,ResponseChecksumValidation={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},DEFAULT_RESPONSE_CHECKSUM_VALIDATION=RequestChecksumCalculation.WHEN_SUPPORTED;var ChecksumAlgorithm;(function(Ra){Ra.MD5="MD5",Ra.CRC32="CRC32",Ra.CRC32C="CRC32C",Ra.CRC64NVME="CRC64NVME",Ra.SHA1="SHA1",Ra.SHA256="SHA256"})(ChecksumAlgorithm||(ChecksumAlgorithm={}));var ChecksumLocation;(function(Ra){Ra.HEADER="header",Ra.TRAILER="trailer"})(ChecksumLocation||(ChecksumLocation={}));const DEFAULT_CHECKSUM_ALGORITHM=ChecksumAlgorithm.CRC32;var SelectorType$1;(function(Ra){Ra.ENV="env",Ra.CONFIG="shared config entry"})(SelectorType$1||(SelectorType$1={}));function setCredentialFeature(Ra,qa,rd){return Ra.$source||(Ra.$source={}),Ra.$source[qa]=rd,Ra}function setFeature$1(Ra,qa,rd){Ra.__aws_sdk_context?Ra.__aws_sdk_context.features||(Ra.__aws_sdk_context.features={}):Ra.__aws_sdk_context={features:{}},Ra.__aws_sdk_context.features[qa]=rd}const getDateHeader=Ra=>{var qa,rd;return HttpResponse.isInstance(Ra)?((qa=Ra.headers)==null?void 0:qa.date)??((rd=Ra.headers)==null?void 0:rd.Date):void 0},getSkewCorrectedDate=Ra=>new Date(Date.now()+Ra),isClockSkewed=(Ra,qa)=>Math.abs(getSkewCorrectedDate(qa).getTime()-Ra)>=3e5,getUpdatedSystemClockOffset=(Ra,qa)=>{const rd=Date.parse(Ra);return isClockSkewed(rd,qa)?rd-Date.now():qa},throwSigningPropertyError=(Ra,qa)=>{if(!qa)throw new Error(`Property \`${Ra}\` is not resolved for AWS SDK SigV4Auth`);return qa},validateSigningProperties=async Ra=>{var yd,vd,Nd;const qa=throwSigningPropertyError("context",Ra.context),rd=throwSigningPropertyError("config",Ra.config),sd=(Nd=(vd=(yd=qa.endpointV2)==null?void 0:yd.properties)==null?void 0:vd.authSchemes)==null?void 0:Nd[0],fd=await throwSigningPropertyError("signer",rd.signer)(sd),hd=Ra==null?void 0:Ra.signingRegion,md=Ra==null?void 0:Ra.signingRegionSet,gd=Ra==null?void 0:Ra.signingName;return{config:rd,signer:fd,signingRegion:hd,signingRegionSet:md,signingName:gd}};class AwsSdkSigV4Signer{async sign(qa,rd,sd){var Nd;if(!HttpRequest.isInstance(qa))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const pd=await validateSigningProperties(sd),{config:fd,signer:hd}=pd;let{signingRegion:md,signingName:gd}=pd;const yd=sd.context;if(((Nd=yd==null?void 0:yd.authSchemes)==null?void 0:Nd.length)??!1){const[Md,Ld]=yd.authSchemes;(Md==null?void 0:Md.name)==="sigv4a"&&(Ld==null?void 0:Ld.name)==="sigv4"&&(md=(Ld==null?void 0:Ld.signingRegion)??md,gd=(Ld==null?void 0:Ld.signingName)??gd)}return await hd.sign(qa,{signingDate:getSkewCorrectedDate(fd.systemClockOffset),signingRegion:md,signingService:gd})}errorHandler(qa){return rd=>{const sd=rd.ServerTime??getDateHeader(rd.$response);if(sd){const pd=throwSigningPropertyError("config",qa.config),fd=pd.systemClockOffset;pd.systemClockOffset=getUpdatedSystemClockOffset(sd,pd.systemClockOffset),pd.systemClockOffset!==fd&&rd.$metadata&&(rd.$metadata.clockSkewCorrected=!0)}throw rd}}successHandler(qa,rd){const sd=getDateHeader(qa);if(sd){const pd=throwSigningPropertyError("config",rd.config);pd.systemClockOffset=getUpdatedSystemClockOffset(sd,pd.systemClockOffset)}}}class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer{async sign(qa,rd,sd){var Md;if(!HttpRequest.isInstance(qa))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:pd,signer:fd,signingRegion:hd,signingRegionSet:md,signingName:gd}=await validateSigningProperties(sd),vd=(await((Md=pd.sigv4aSigningRegionSet)==null?void 0:Md.call(pd))??md??[hd]).join(",");return await fd.sign(qa,{signingDate:getSkewCorrectedDate(pd.systemClockOffset),signingRegion:vd,signingService:gd})}}const getSmithyContext=Ra=>Ra[SMITHY_CONTEXT_KEY]||(Ra[SMITHY_CONTEXT_KEY]={}),normalizeProvider$1=Ra=>{if(typeof Ra=="function")return Ra;const qa=Promise.resolve(Ra);return()=>qa};function convertHttpAuthSchemesToMap(Ra){const qa=new Map;for(const rd of Ra)qa.set(rd.schemeId,rd);return qa}const httpAuthSchemeMiddleware=(Ra,qa)=>(rd,sd)=>async pd=>{var yd;const fd=Ra.httpAuthSchemeProvider(await qa.httpAuthSchemeParametersProvider(Ra,sd,pd.input)),hd=convertHttpAuthSchemesToMap(Ra.httpAuthSchemes),md=getSmithyContext(sd),gd=[];for(const vd of fd){const Nd=hd.get(vd.schemeId);if(!Nd){gd.push(`HttpAuthScheme \`${vd.schemeId}\` was not enabled for this service.`);continue}const Md=Nd.identityProvider(await qa.identityProviderConfigProvider(Ra));if(!Md){gd.push(`HttpAuthScheme \`${vd.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:Ld={},signingProperties:Fd={}}=((yd=vd.propertiesExtractor)==null?void 0:yd.call(vd,Ra,sd))||{};vd.identityProperties=Object.assign(vd.identityProperties||{},Ld),vd.signingProperties=Object.assign(vd.signingProperties||{},Fd),md.selectedHttpAuthScheme={httpAuthOption:vd,identity:await Md(vd.identityProperties),signer:Nd.signer};break}if(!md.selectedHttpAuthScheme)throw new Error(gd.join(` -`));return rd(pd)},httpAuthSchemeEndpointRuleSetMiddlewareOptions={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},getHttpAuthSchemeEndpointRuleSetPlugin=(Ra,{httpAuthSchemeParametersProvider:qa,identityProviderConfigProvider:rd})=>({applyToStack:sd=>{sd.addRelativeTo(httpAuthSchemeMiddleware(Ra,{httpAuthSchemeParametersProvider:qa,identityProviderConfigProvider:rd}),httpAuthSchemeEndpointRuleSetMiddlewareOptions)}}),deserializerMiddleware=(Ra,qa)=>rd=>async sd=>{const{response:pd}=await rd(sd);try{const fd=await qa(pd,Ra);return{response:pd,output:fd}}catch(fd){if(Object.defineProperty(fd,"$response",{value:pd}),!("$metadata"in fd)){const hd="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";fd.message+=` - `+hd,typeof fd.$responseBodyText<"u"&&fd.$response&&(fd.$response.body=fd.$responseBodyText)}throw fd}},serializerMiddleware=(Ra,qa)=>(rd,sd)=>async pd=>{var md;const fd=(md=sd.endpointV2)!=null&&md.url&&Ra.urlParser?async()=>Ra.urlParser(sd.endpointV2.url):Ra.endpoint;if(!fd)throw new Error("No valid endpoint provider available.");const hd=await qa(pd.input,{...Ra,endpoint:fd});return rd({...pd,request:hd})},deserializerMiddlewareOption={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},serializerMiddlewareOption={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function getSerdePlugin(Ra,qa,rd){return{applyToStack:sd=>{sd.add(deserializerMiddleware(Ra,rd),deserializerMiddlewareOption),sd.add(serializerMiddleware(Ra,qa),serializerMiddlewareOption)}}}serializerMiddlewareOption.name;const defaultErrorHandler$1=Ra=>qa=>{throw qa},defaultSuccessHandler$1=(Ra,qa)=>{},httpSigningMiddleware=Ra=>(qa,rd)=>async sd=>{if(!HttpRequest.isInstance(sd.request))return qa(sd);const fd=getSmithyContext(rd).selectedHttpAuthScheme;if(!fd)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:hd={}},identity:md,signer:gd}=fd,yd=await qa({...sd,request:await gd.sign(sd.request,md,hd)}).catch((gd.errorHandler||defaultErrorHandler$1)(hd));return(gd.successHandler||defaultSuccessHandler$1)(yd.response,hd),yd},httpSigningMiddlewareOptions={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},getHttpSigningPlugin=Ra=>({applyToStack:qa=>{qa.addRelativeTo(httpSigningMiddleware(),httpSigningMiddlewareOptions)}}),normalizeProvider=Ra=>{if(typeof Ra=="function")return Ra;const qa=Promise.resolve(Ra);return()=>qa},alphabetByEncoding={},alphabetByValue=new Array(64);for(let Ra=0,qa=65,rd=90;Ra+qa<=rd;Ra++){const sd=String.fromCharCode(Ra+qa);alphabetByEncoding[sd]=Ra,alphabetByValue[Ra]=sd}for(let Ra=0,qa=97,rd=122;Ra+qa<=rd;Ra++){const sd=String.fromCharCode(Ra+qa),pd=Ra+26;alphabetByEncoding[sd]=pd,alphabetByValue[pd]=sd}for(let Ra=0;Ra<10;Ra++){alphabetByEncoding[Ra.toString(10)]=Ra+52;const qa=Ra.toString(10),rd=Ra+52;alphabetByEncoding[qa]=rd,alphabetByValue[rd]=qa}alphabetByEncoding["+"]=62;alphabetByValue[62]="+";alphabetByEncoding["/"]=63;alphabetByValue[63]="/";const bitsPerLetter=6,bitsPerByte=8,maxLetterValue=63,fromBase64=Ra=>{let qa=Ra.length/4*3;Ra.slice(-2)==="=="?qa-=2:Ra.slice(-1)==="="&&qa--;const rd=new ArrayBuffer(qa),sd=new DataView(rd);for(let pd=0;pd>=bitsPerLetter;const md=pd/4*3;fd>>=hd%bitsPerByte;const gd=Math.floor(hd/bitsPerByte);for(let yd=0;yd>vd)}}return new Uint8Array(rd)},fromUtf8$3=Ra=>new TextEncoder().encode(Ra),toUint8Array=Ra=>typeof Ra=="string"?fromUtf8$3(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra),toUtf8=Ra=>{if(typeof Ra=="string")return Ra;if(typeof Ra!="object"||typeof Ra.byteOffset!="number"||typeof Ra.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(Ra)};function toBase64(Ra){let qa;typeof Ra=="string"?qa=fromUtf8$3(Ra):qa=Ra;const rd=typeof qa=="object"&&typeof qa.length=="number",sd=typeof qa=="object"&&typeof qa.byteOffset=="number"&&typeof qa.byteLength=="number";if(!rd&&!sd)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let pd="";for(let fd=0;fd>vd]}pd+="==".slice(0,4-gd)}return pd}function transformToString(Ra,qa="utf-8"){return qa==="base64"?toBase64(Ra):toUtf8(Ra)}function transformFromString(Ra,qa){return qa==="base64"?Uint8ArrayBlobAdapter.mutate(fromBase64(Ra)):Uint8ArrayBlobAdapter.mutate(fromUtf8$3(Ra))}class Uint8ArrayBlobAdapter extends Uint8Array{static fromString(qa,rd="utf-8"){switch(typeof qa){case"string":return transformFromString(qa,rd);default:throw new Error(`Unsupported conversion from ${typeof qa} to Uint8ArrayBlobAdapter.`)}}static mutate(qa){return Object.setPrototypeOf(qa,Uint8ArrayBlobAdapter.prototype),qa}transformToString(qa="utf-8"){return transformToString(this,qa)}}const getAwsChunkedEncodingStream=(Ra,qa)=>{const{base64Encoder:rd,bodyLengthChecker:sd,checksumAlgorithmFn:pd,checksumLocationName:fd,streamHasher:hd}=qa,md=rd!==void 0&&sd!==void 0&&pd!==void 0&&fd!==void 0&&hd!==void 0,gd=md?hd(pd,Ra):void 0,yd=Ra.getReader();return new ReadableStream({async pull(vd){const{value:Nd,done:Md}=await yd.read();if(Md){if(vd.enqueue(`0\r -`),md){const Ld=rd(await gd);vd.enqueue(`${fd}:${Ld}\r -`),vd.enqueue(`\r -`)}vd.close()}else vd.enqueue(`${(sd(Nd)||0).toString(16)}\r + */const isObject$3=Ra=>Ra!==null&&!!Ra&&typeof Ra=="object"&&!Array.isArray(Ra);function isIndex(Ra){return Number(Ra)>=0}function isObjectLike(Ra){return typeof Ra=="object"&&Ra!==null}function getTag(Ra){return Ra==null?Ra===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(Ra)}function isPlainObject$1(Ra){if(!isObjectLike(Ra)||getTag(Ra)!=="[object Object]")return!1;if(Object.getPrototypeOf(Ra)===null)return!0;let ed=Ra;for(;Object.getPrototypeOf(ed)!==null;)ed=Object.getPrototypeOf(ed);return Object.getPrototypeOf(Ra)===ed}function merge$2(Ra,ed){return Object.keys(ed).forEach(ud=>{if(isPlainObject$1(ed[ud])&&isPlainObject$1(Ra[ud])){Ra[ud]||(Ra[ud]={}),merge$2(Ra[ud],ed[ud]);return}Ra[ud]=ed[ud]}),Ra}function toTypedSchema(Ra,ed={abortEarly:!1}){return{__type:"VVTypedSchema",async parse(dd){var hd;try{return{value:await Ra.validate(dd,Object.assign({},ed)),errors:[]}}catch(md){const gd=md;if(gd.name!=="ValidationError")throw md;if(!(!((hd=gd.inner)===null||hd===void 0)&&hd.length)&&gd.errors.length)return{errors:[{path:gd.path,errors:gd.errors}]};const yd=gd.inner.reduce((vd,Cd)=>{const wd=Cd.path||"";return vd[wd]||(vd[wd]={errors:[],path:wd}),vd[wd].errors.push(...Cd.errors),vd},{});return{errors:Object.values(yd)}}},cast(dd){try{return Ra.cast(dd)}catch{const md=Ra.getDefault();return isObject$3(md)&&isObject$3(dd)?merge$2(md,dd):dd}},describe(dd){try{if(!dd)return getDescriptionFromYupSpec(Ra.spec);const hd=getSpecForPath(dd,Ra);return hd?getDescriptionFromYupSpec(hd):{required:!1,exists:!1}}catch{return{required:!1,exists:!1}}}}}function getDescriptionFromYupSpec(Ra){return{required:!Ra.optional,exists:!0}}function getSpecForPath(Ra,ed){if(!isObjectSchema(ed))return null;if(isNotNestedPath(Ra)){const hd=ed.fields[cleanupNonNestedPath(Ra)];return(hd==null?void 0:hd.spec)||null}const ud=(Ra||"").split(/\.|\[(\d+)\]/).filter(Boolean);let dd=ed;for(let hd=0;hd=this._maxSize&&this.clear(),Ra in this._values||this._size++,this._values[Ra]=ed};var SPLIT_REGEX=/[^.^\]^[]+|(?=\[\]|\.\.)/g,DIGIT_REGEX=/^\d+$/,LEAD_DIGIT_REGEX=/^\d/,SPEC_CHAR_REGEX=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,CLEAN_QUOTES_REGEX=/^\s*(['"]?)(.*?)(\1)\s*$/,MAX_CACHE_SIZE$1=512,pathCache=new Cache(MAX_CACHE_SIZE$1),setCache=new Cache(MAX_CACHE_SIZE$1),getCache=new Cache(MAX_CACHE_SIZE$1),propertyExpr={Cache,split,normalizePath,setter:function(Ra){var ed=normalizePath(Ra);return setCache.get(Ra)||setCache.set(Ra,function(dd,hd){for(var md=0,gd=ed.length,yd=dd;mdRa.match(reWords)||[],upperFirst=Ra=>Ra[0].toUpperCase()+Ra.slice(1),join=(Ra,ed)=>words(Ra).join(ed).toLowerCase(),camelCase=Ra=>words(Ra).reduce((ed,ud)=>`${ed}${ed?ud[0].toUpperCase()+ud.slice(1).toLowerCase():ud.toLowerCase()}`,""),pascalCase=Ra=>upperFirst(camelCase(Ra)),snakeCase=Ra=>join(Ra,"_"),kebabCase=Ra=>join(Ra,"-"),sentenceCase=Ra=>upperFirst(join(Ra," ")),titleCase=Ra=>words(Ra).map(upperFirst).join(" ");var tinyCase={words,upperFirst,camelCase,pascalCase,snakeCase,kebabCase,sentenceCase,titleCase},toposort$2={exports:{}};toposort$2.exports=function(Ra){return toposort(uniqueNodes(Ra),Ra)};toposort$2.exports.array=toposort;function toposort(Ra,ed){var ud=Ra.length,dd=new Array(ud),hd={},md=ud,gd=makeOutgoingEdges(ed),yd=makeNodesHash(Ra);for(ed.forEach(function(Cd){if(!yd.has(Cd[0])||!yd.has(Cd[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});md--;)hd[md]||vd(Ra[md],md,new Set);return dd;function vd(Cd,wd,Nd){if(Nd.has(Cd)){var Ld;try{Ld=", node was:"+JSON.stringify(Cd)}catch{Ld=""}throw new Error("Cyclic dependency"+Ld)}if(!yd.has(Cd))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(Cd));if(!hd[wd]){hd[wd]=!0;var Ud=gd.get(Cd)||new Set;if(Ud=Array.from(Ud),wd=Ud.length){Nd.add(Cd);do{var jd=Ud[--wd];vd(jd,yd.get(jd),Nd)}while(wd);Nd.delete(Cd)}dd[--ud]=Cd}}}function uniqueNodes(Ra){for(var ed=new Set,ud=0,dd=Ra.length;ud"",SYMBOL_REGEXP=/^Symbol\((.*)\)(.*)$/;function printNumber(Ra){return Ra!=+Ra?"NaN":Ra===0&&1/Ra<0?"-0":""+Ra}function printSimpleValue(Ra,ed=!1){if(Ra==null||Ra===!0||Ra===!1)return""+Ra;const ud=typeof Ra;if(ud==="number")return printNumber(Ra);if(ud==="string")return ed?`"${Ra}"`:Ra;if(ud==="function")return"[Function "+(Ra.name||"anonymous")+"]";if(ud==="symbol")return symbolToString.call(Ra).replace(SYMBOL_REGEXP,"Symbol($1)");const dd=toString$2.call(Ra).slice(8,-1);return dd==="Date"?isNaN(Ra.getTime())?""+Ra:Ra.toISOString(Ra):dd==="Error"||Ra instanceof Error?"["+errorToString.call(Ra)+"]":dd==="RegExp"?regExpToString.call(Ra):null}function printValue(Ra,ed){let ud=printSimpleValue(Ra,ed);return ud!==null?ud:JSON.stringify(Ra,function(dd,hd){let md=printSimpleValue(this[dd],ed);return md!==null?md:hd},2)}function toArray$2(Ra){return Ra==null?[]:[].concat(Ra)}let _Symbol$toStringTag,_Symbol$hasInstance,_Symbol$toStringTag2,strReg=/\$\{\s*(\w+)\s*\}/g;_Symbol$toStringTag=Symbol.toStringTag;class ValidationErrorNoStack{constructor(ed,ud,dd,hd){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[_Symbol$toStringTag]="Error",this.name="ValidationError",this.value=ud,this.path=dd,this.type=hd,this.errors=[],this.inner=[],toArray$2(ed).forEach(md=>{if(ValidationError.isError(md)){this.errors.push(...md.errors);const gd=md.inner.length?md.inner:[md];this.inner.push(...gd)}else this.errors.push(md)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}_Symbol$hasInstance=Symbol.hasInstance;_Symbol$toStringTag2=Symbol.toStringTag;class ValidationError extends Error{static formatError(ed,ud){const dd=ud.label||ud.path||"this";return ud=Object.assign({},ud,{path:dd,originalPath:ud.path}),typeof ed=="string"?ed.replace(strReg,(hd,md)=>printValue(ud[md])):typeof ed=="function"?ed(ud):ed}static isError(ed){return ed&&ed.name==="ValidationError"}constructor(ed,ud,dd,hd,md){const gd=new ValidationErrorNoStack(ed,ud,dd,hd);if(md)return gd;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[_Symbol$toStringTag2]="Error",this.name=gd.name,this.message=gd.message,this.type=gd.type,this.value=gd.value,this.path=gd.path,this.errors=gd.errors,this.inner=gd.inner,Error.captureStackTrace&&Error.captureStackTrace(this,ValidationError)}static[_Symbol$hasInstance](ed){return ValidationErrorNoStack[Symbol.hasInstance](ed)||super[Symbol.hasInstance](ed)}}let mixed={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:Ra,type:ed,value:ud,originalValue:dd})=>{const hd=dd!=null&&dd!==ud?` (cast from the value \`${printValue(dd,!0)}\`).`:".";return ed!=="mixed"?`${Ra} must be a \`${ed}\` type, but the final value was: \`${printValue(ud,!0)}\``+hd:`${Ra} must match the configured type. The validated value was: \`${printValue(ud,!0)}\``+hd}},string={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},number={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},boolean={isValue:"${path} field must be ${value}"},object={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},array={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},tuple={notType:Ra=>{const{path:ed,value:ud,spec:dd}=Ra,hd=dd.types.length;if(Array.isArray(ud)){if(ud.lengthhd)return`${ed} tuple value has too many items, expected a length of ${hd} but got ${ud.length} for value: \`${printValue(ud,!0)}\``}return ValidationError.formatError(mixed.notType,Ra)}};Object.assign(Object.create(null),{mixed,string,number,date,object,array,boolean,tuple});const isSchema=Ra=>Ra&&Ra.__isYupSchema__;class Condition{static fromOptions(ed,ud){if(!ud.then&&!ud.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:dd,then:hd,otherwise:md}=ud,gd=typeof dd=="function"?dd:(...yd)=>yd.every(vd=>vd===dd);return new Condition(ed,(yd,vd)=>{var Cd;let wd=gd(...yd)?hd:md;return(Cd=wd==null?void 0:wd(vd))!=null?Cd:vd})}constructor(ed,ud){this.fn=void 0,this.refs=ed,this.refs=ed,this.fn=ud}resolve(ed,ud){let dd=this.refs.map(md=>md.getValue(ud==null?void 0:ud.value,ud==null?void 0:ud.parent,ud==null?void 0:ud.context)),hd=this.fn(dd,ed,ud);if(hd===void 0||hd===ed)return ed;if(!isSchema(hd))throw new TypeError("conditions must return a schema object");return hd.resolve(ud)}}const prefixes={context:"$",value:"."};class Reference{constructor(ed,ud={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof ed!="string")throw new TypeError("ref must be a string, got: "+ed);if(this.key=ed.trim(),ed==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===prefixes.context,this.isValue=this.key[0]===prefixes.value,this.isSibling=!this.isContext&&!this.isValue;let dd=this.isContext?prefixes.context:this.isValue?prefixes.value:"";this.path=this.key.slice(dd.length),this.getter=this.path&&propertyExpr.getter(this.path,!0),this.map=ud.map}getValue(ed,ud,dd){let hd=this.isContext?dd:this.isValue?ed:ud;return this.getter&&(hd=this.getter(hd||{})),this.map&&(hd=this.map(hd)),hd}cast(ed,ud){return this.getValue(ed,ud==null?void 0:ud.parent,ud==null?void 0:ud.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(ed){return ed&&ed.__isYupRef}}Reference.prototype.__isYupRef=!0;const isAbsent=Ra=>Ra==null;function createValidation(Ra){function ed({value:ud,path:dd="",options:hd,originalValue:md,schema:gd},yd,vd){const{name:Cd,test:wd,params:Nd,message:Ld,skipAbsent:Ud}=Ra;let{parent:jd,context:Gd,abortEarly:Yd=gd.spec.abortEarly,disableStackTrace:zd=gd.spec.disableStackTrace}=hd;function qd(gf){return Reference.isRef(gf)?gf.getValue(ud,jd,Gd):gf}function Wd(gf={}){const Af=Object.assign({value:ud,originalValue:md,label:gd.spec.label,path:gf.path||dd,spec:gd.spec,disableStackTrace:gf.disableStackTrace||zd},Nd,gf.params);for(const Of of Object.keys(Af))Af[Of]=qd(Af[Of]);const Df=new ValidationError(ValidationError.formatError(gf.message||Ld,Af),ud,Af.path,gf.type||Cd,Af.disableStackTrace);return Df.params=Af,Df}const Xd=Yd?yd:vd;let Jd={path:dd,parent:jd,type:Cd,from:hd.from,createError:Wd,resolve:qd,options:hd,originalValue:md,schema:gd};const Zd=gf=>{ValidationError.isError(gf)?Xd(gf):gf?vd(null):Xd(Wd())},mf=gf=>{ValidationError.isError(gf)?Xd(gf):yd(gf)};if(Ud&&isAbsent(ud))return Zd(!0);let _f;try{var vf;if(_f=wd.call(Jd,ud,Jd),typeof((vf=_f)==null?void 0:vf.then)=="function"){if(hd.sync)throw new Error(`Validation test of type: "${Jd.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(_f).then(Zd,mf)}}catch(gf){mf(gf);return}Zd(_f)}return ed.OPTIONS=Ra,ed}function getIn(Ra,ed,ud,dd=ud){let hd,md,gd;return ed?(propertyExpr.forEach(ed,(yd,vd,Cd)=>{let wd=vd?yd.slice(1,yd.length-1):yd;Ra=Ra.resolve({context:dd,parent:hd,value:ud});let Nd=Ra.type==="tuple",Ld=Cd?parseInt(wd,10):0;if(Ra.innerType||Nd){if(Nd&&!Cd)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${gd}" must contain an index to the tuple element, e.g. "${gd}[0]"`);if(ud&&Ld>=ud.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${yd}, in the path: ${ed}. because there is no value at that index. `);hd=ud,ud=ud&&ud[Ld],Ra=Nd?Ra.spec.types[Ld]:Ra.innerType}if(!Cd){if(!Ra.fields||!Ra.fields[wd])throw new Error(`The schema does not contain the path: ${ed}. (failed at: ${gd} which is a type: "${Ra.type}")`);hd=ud,ud=ud&&ud[wd],Ra=Ra.fields[wd]}md=wd,gd=vd?"["+yd+"]":"."+yd}),{schema:Ra,parent:hd,parentPath:md}):{parent:hd,parentPath:ed,schema:Ra}}class ReferenceSet extends Set{describe(){const ed=[];for(const ud of this.values())ed.push(Reference.isRef(ud)?ud.describe():ud);return ed}resolveAll(ed){let ud=[];for(const dd of this.values())ud.push(ed(dd));return ud}clone(){return new ReferenceSet(this.values())}merge(ed,ud){const dd=this.clone();return ed.forEach(hd=>dd.add(hd)),ud.forEach(hd=>dd.delete(hd)),dd}}function clone(Ra,ed=new Map){if(isSchema(Ra)||!Ra||typeof Ra!="object")return Ra;if(ed.has(Ra))return ed.get(Ra);let ud;if(Ra instanceof Date)ud=new Date(Ra.getTime()),ed.set(Ra,ud);else if(Ra instanceof RegExp)ud=new RegExp(Ra),ed.set(Ra,ud);else if(Array.isArray(Ra)){ud=new Array(Ra.length),ed.set(Ra,ud);for(let dd=0;dd{this.typeError(mixed.notType)}),this.type=ed.type,this._typeCheck=ed.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},ed==null?void 0:ed.spec),this.withMutation(ud=>{ud.nonNullable()})}get _type(){return this.type}clone(ed){if(this._mutate)return ed&&Object.assign(this.spec,ed),this;const ud=Object.create(Object.getPrototypeOf(this));return ud.type=this.type,ud._typeCheck=this._typeCheck,ud._whitelist=this._whitelist.clone(),ud._blacklist=this._blacklist.clone(),ud.internalTests=Object.assign({},this.internalTests),ud.exclusiveTests=Object.assign({},this.exclusiveTests),ud.deps=[...this.deps],ud.conditions=[...this.conditions],ud.tests=[...this.tests],ud.transforms=[...this.transforms],ud.spec=clone(Object.assign({},this.spec,ed)),ud}label(ed){let ud=this.clone();return ud.spec.label=ed,ud}meta(...ed){if(ed.length===0)return this.spec.meta;let ud=this.clone();return ud.spec.meta=Object.assign(ud.spec.meta||{},ed[0]),ud}withMutation(ed){let ud=this._mutate;this._mutate=!0;let dd=ed(this);return this._mutate=ud,dd}concat(ed){if(!ed||ed===this)return this;if(ed.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${ed.type}`);let ud=this,dd=ed.clone();const hd=Object.assign({},ud.spec,dd.spec);return dd.spec=hd,dd.internalTests=Object.assign({},ud.internalTests,dd.internalTests),dd._whitelist=ud._whitelist.merge(ed._whitelist,ed._blacklist),dd._blacklist=ud._blacklist.merge(ed._blacklist,ed._whitelist),dd.tests=ud.tests,dd.exclusiveTests=ud.exclusiveTests,dd.withMutation(md=>{ed.tests.forEach(gd=>{md.test(gd.OPTIONS)})}),dd.transforms=[...ud.transforms,...dd.transforms],dd}isType(ed){return ed==null?!!(this.spec.nullable&&ed===null||this.spec.optional&&ed===void 0):this._typeCheck(ed)}resolve(ed){let ud=this;if(ud.conditions.length){let dd=ud.conditions;ud=ud.clone(),ud.conditions=[],ud=dd.reduce((hd,md)=>md.resolve(hd,ed),ud),ud=ud.resolve(ed)}return ud}resolveOptions(ed){var ud,dd,hd,md;return Object.assign({},ed,{from:ed.from||[],strict:(ud=ed.strict)!=null?ud:this.spec.strict,abortEarly:(dd=ed.abortEarly)!=null?dd:this.spec.abortEarly,recursive:(hd=ed.recursive)!=null?hd:this.spec.recursive,disableStackTrace:(md=ed.disableStackTrace)!=null?md:this.spec.disableStackTrace})}cast(ed,ud={}){let dd=this.resolve(Object.assign({value:ed},ud)),hd=ud.assert==="ignore-optionality",md=dd._cast(ed,ud);if(ud.assert!==!1&&!dd.isType(md)){if(hd&&isAbsent(md))return md;let gd=printValue(ed),yd=printValue(md);throw new TypeError(`The value of ${ud.path||"field"} could not be cast to a value that satisfies the schema type: "${dd.type}". + +attempted value: ${gd} +`+(yd!==gd?`result of cast: ${yd}`:""))}return md}_cast(ed,ud){let dd=ed===void 0?ed:this.transforms.reduce((hd,md)=>md.call(this,hd,ed,this),ed);return dd===void 0&&(dd=this.getDefault(ud)),dd}_validate(ed,ud={},dd,hd){let{path:md,originalValue:gd=ed,strict:yd=this.spec.strict}=ud,vd=ed;yd||(vd=this._cast(vd,Object.assign({assert:!1},ud)));let Cd=[];for(let wd of Object.values(this.internalTests))wd&&Cd.push(wd);this.runTests({path:md,value:vd,originalValue:gd,options:ud,tests:Cd},dd,wd=>{if(wd.length)return hd(wd,vd);this.runTests({path:md,value:vd,originalValue:gd,options:ud,tests:this.tests},dd,hd)})}runTests(ed,ud,dd){let hd=!1,{tests:md,value:gd,originalValue:yd,path:vd,options:Cd}=ed,wd=Gd=>{hd||(hd=!0,ud(Gd,gd))},Nd=Gd=>{hd||(hd=!0,dd(Gd,gd))},Ld=md.length,Ud=[];if(!Ld)return Nd([]);let jd={value:gd,originalValue:yd,path:vd,options:Cd,schema:this};for(let Gd=0;Gdthis.resolve(wd)._validate(Cd,wd,Ld,Ud)}validate(ed,ud){var dd;let hd=this.resolve(Object.assign({},ud,{value:ed})),md=(dd=ud==null?void 0:ud.disableStackTrace)!=null?dd:hd.spec.disableStackTrace;return new Promise((gd,yd)=>hd._validate(ed,ud,(vd,Cd)=>{ValidationError.isError(vd)&&(vd.value=Cd),yd(vd)},(vd,Cd)=>{vd.length?yd(new ValidationError(vd,Cd,void 0,void 0,md)):gd(Cd)}))}validateSync(ed,ud){var dd;let hd=this.resolve(Object.assign({},ud,{value:ed})),md,gd=(dd=ud==null?void 0:ud.disableStackTrace)!=null?dd:hd.spec.disableStackTrace;return hd._validate(ed,Object.assign({},ud,{sync:!0}),(yd,vd)=>{throw ValidationError.isError(yd)&&(yd.value=vd),yd},(yd,vd)=>{if(yd.length)throw new ValidationError(yd,ed,void 0,void 0,gd);md=vd}),md}isValid(ed,ud){return this.validate(ed,ud).then(()=>!0,dd=>{if(ValidationError.isError(dd))return!1;throw dd})}isValidSync(ed,ud){try{return this.validateSync(ed,ud),!0}catch(dd){if(ValidationError.isError(dd))return!1;throw dd}}_getDefault(ed){let ud=this.spec.default;return ud==null?ud:typeof ud=="function"?ud.call(this,ed):clone(ud)}getDefault(ed){return this.resolve(ed||{})._getDefault(ed)}default(ed){return arguments.length===0?this._getDefault():this.clone({default:ed})}strict(ed=!0){return this.clone({strict:ed})}nullability(ed,ud){const dd=this.clone({nullable:ed});return dd.internalTests.nullable=createValidation({message:ud,name:"nullable",test(hd){return hd===null?this.schema.spec.nullable:!0}}),dd}optionality(ed,ud){const dd=this.clone({optional:ed});return dd.internalTests.optionality=createValidation({message:ud,name:"optionality",test(hd){return hd===void 0?this.schema.spec.optional:!0}}),dd}optional(){return this.optionality(!0)}defined(ed=mixed.defined){return this.optionality(!1,ed)}nullable(){return this.nullability(!0)}nonNullable(ed=mixed.notNull){return this.nullability(!1,ed)}required(ed=mixed.required){return this.clone().withMutation(ud=>ud.nonNullable(ed).defined(ed))}notRequired(){return this.clone().withMutation(ed=>ed.nullable().optional())}transform(ed){let ud=this.clone();return ud.transforms.push(ed),ud}test(...ed){let ud;if(ed.length===1?typeof ed[0]=="function"?ud={test:ed[0]}:ud=ed[0]:ed.length===2?ud={name:ed[0],test:ed[1]}:ud={name:ed[0],message:ed[1],test:ed[2]},ud.message===void 0&&(ud.message=mixed.default),typeof ud.test!="function")throw new TypeError("`test` is a required parameters");let dd=this.clone(),hd=createValidation(ud),md=ud.exclusive||ud.name&&dd.exclusiveTests[ud.name]===!0;if(ud.exclusive&&!ud.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return ud.name&&(dd.exclusiveTests[ud.name]=!!ud.exclusive),dd.tests=dd.tests.filter(gd=>!(gd.OPTIONS.name===ud.name&&(md||gd.OPTIONS.test===hd.OPTIONS.test))),dd.tests.push(hd),dd}when(ed,ud){!Array.isArray(ed)&&typeof ed!="string"&&(ud=ed,ed=".");let dd=this.clone(),hd=toArray$2(ed).map(md=>new Reference(md));return hd.forEach(md=>{md.isSibling&&dd.deps.push(md.key)}),dd.conditions.push(typeof ud=="function"?new Condition(hd,ud):Condition.fromOptions(hd,ud)),dd}typeError(ed){let ud=this.clone();return ud.internalTests.typeError=createValidation({message:ed,name:"typeError",skipAbsent:!0,test(dd){return this.schema._typeCheck(dd)?!0:this.createError({params:{type:this.schema.type}})}}),ud}oneOf(ed,ud=mixed.oneOf){let dd=this.clone();return ed.forEach(hd=>{dd._whitelist.add(hd),dd._blacklist.delete(hd)}),dd.internalTests.whiteList=createValidation({message:ud,name:"oneOf",skipAbsent:!0,test(hd){let md=this.schema._whitelist,gd=md.resolveAll(this.resolve);return gd.includes(hd)?!0:this.createError({params:{values:Array.from(md).join(", "),resolved:gd}})}}),dd}notOneOf(ed,ud=mixed.notOneOf){let dd=this.clone();return ed.forEach(hd=>{dd._blacklist.add(hd),dd._whitelist.delete(hd)}),dd.internalTests.blacklist=createValidation({message:ud,name:"notOneOf",test(hd){let md=this.schema._blacklist,gd=md.resolveAll(this.resolve);return gd.includes(hd)?this.createError({params:{values:Array.from(md).join(", "),resolved:gd}}):!0}}),dd}strip(ed=!0){let ud=this.clone();return ud.spec.strip=ed,ud}describe(ed){const ud=(ed?this.resolve(ed):this).clone(),{label:dd,meta:hd,optional:md,nullable:gd}=ud.spec;return{meta:hd,label:dd,optional:md,nullable:gd,default:ud.getDefault(ed),type:ud.type,oneOf:ud._whitelist.describe(),notOneOf:ud._blacklist.describe(),tests:ud.tests.map(vd=>({name:vd.OPTIONS.name,params:vd.OPTIONS.params})).filter((vd,Cd,wd)=>wd.findIndex(Nd=>Nd.name===vd.name)===Cd)}}}Schema.prototype.__isYupSchema__=!0;for(const Ra of["validate","validateSync"])Schema.prototype[`${Ra}At`]=function(ed,ud,dd={}){const{parent:hd,parentPath:md,schema:gd}=getIn(this,ed,ud,dd.context);return gd[Ra](hd&&hd[md],Object.assign({},dd,{parent:hd,path:ed}))};for(const Ra of["equals","is"])Schema.prototype[Ra]=Schema.prototype.oneOf;for(const Ra of["not","nope"])Schema.prototype[Ra]=Schema.prototype.notOneOf;function create$7(){return new BooleanSchema}class BooleanSchema extends Schema{constructor(){super({type:"boolean",check(ed){return ed instanceof Boolean&&(ed=ed.valueOf()),typeof ed=="boolean"}}),this.withMutation(()=>{this.transform((ed,ud,dd)=>{if(dd.spec.coerce&&!dd.isType(ed)){if(/^(true|1)$/i.test(String(ed)))return!0;if(/^(false|0)$/i.test(String(ed)))return!1}return ed})})}isTrue(ed=boolean.isValue){return this.test({message:ed,name:"is-value",exclusive:!0,params:{value:"true"},test(ud){return isAbsent(ud)||ud===!0}})}isFalse(ed=boolean.isValue){return this.test({message:ed,name:"is-value",exclusive:!0,params:{value:"false"},test(ud){return isAbsent(ud)||ud===!1}})}default(ed){return super.default(ed)}defined(ed){return super.defined(ed)}optional(){return super.optional()}required(ed){return super.required(ed)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(ed){return super.nonNullable(ed)}strip(ed){return super.strip(ed)}}create$7.prototype=BooleanSchema.prototype;const isoReg=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function parseIsoDate(Ra){const ed=parseDateStruct(Ra);if(!ed)return Date.parse?Date.parse(Ra):Number.NaN;if(ed.z===void 0&&ed.plusMinus===void 0)return new Date(ed.year,ed.month,ed.day,ed.hour,ed.minute,ed.second,ed.millisecond).valueOf();let ud=0;return ed.z!=="Z"&&ed.plusMinus!==void 0&&(ud=ed.hourOffset*60+ed.minuteOffset,ed.plusMinus==="+"&&(ud=0-ud)),Date.UTC(ed.year,ed.month,ed.day,ed.hour,ed.minute+ud,ed.second,ed.millisecond)}function parseDateStruct(Ra){var ed,ud;const dd=isoReg.exec(Ra);return dd?{year:toNumber$2(dd[1]),month:toNumber$2(dd[2],1)-1,day:toNumber$2(dd[3],1),hour:toNumber$2(dd[4]),minute:toNumber$2(dd[5]),second:toNumber$2(dd[6]),millisecond:dd[7]?toNumber$2(dd[7].substring(0,3)):0,precision:(ed=(ud=dd[7])==null?void 0:ud.length)!=null?ed:void 0,z:dd[8]||void 0,plusMinus:dd[9]||void 0,hourOffset:toNumber$2(dd[10]),minuteOffset:toNumber$2(dd[11])}:null}function toNumber$2(Ra,ed=0){return Number(Ra)||ed}let rEmail=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rUrl=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,rUUID=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,yearMonthDay="^\\d{4}-\\d{2}-\\d{2}",hourMinuteSecond="\\d{2}:\\d{2}:\\d{2}",zOrOffset="(([+-]\\d{2}(:?\\d{2})?)|Z)",rIsoDateTime=new RegExp(`${yearMonthDay}T${hourMinuteSecond}(\\.\\d+)?${zOrOffset}$`),isTrimmed=Ra=>isAbsent(Ra)||Ra===Ra.trim(),objStringTag={}.toString();function create$6(){return new StringSchema}class StringSchema extends Schema{constructor(){super({type:"string",check(ed){return ed instanceof String&&(ed=ed.valueOf()),typeof ed=="string"}}),this.withMutation(()=>{this.transform((ed,ud,dd)=>{if(!dd.spec.coerce||dd.isType(ed)||Array.isArray(ed))return ed;const hd=ed!=null&&ed.toString?ed.toString():ed;return hd===objStringTag?ed:hd})})}required(ed){return super.required(ed).withMutation(ud=>ud.test({message:ed||mixed.required,name:"required",skipAbsent:!0,test:dd=>!!dd.length}))}notRequired(){return super.notRequired().withMutation(ed=>(ed.tests=ed.tests.filter(ud=>ud.OPTIONS.name!=="required"),ed))}length(ed,ud=string.length){return this.test({message:ud,name:"length",exclusive:!0,params:{length:ed},skipAbsent:!0,test(dd){return dd.length===this.resolve(ed)}})}min(ed,ud=string.min){return this.test({message:ud,name:"min",exclusive:!0,params:{min:ed},skipAbsent:!0,test(dd){return dd.length>=this.resolve(ed)}})}max(ed,ud=string.max){return this.test({name:"max",exclusive:!0,message:ud,params:{max:ed},skipAbsent:!0,test(dd){return dd.length<=this.resolve(ed)}})}matches(ed,ud){let dd=!1,hd,md;return ud&&(typeof ud=="object"?{excludeEmptyString:dd=!1,message:hd,name:md}=ud:hd=ud),this.test({name:md||"matches",message:hd||string.matches,params:{regex:ed},skipAbsent:!0,test:gd=>gd===""&&dd||gd.search(ed)!==-1})}email(ed=string.email){return this.matches(rEmail,{name:"email",message:ed,excludeEmptyString:!0})}url(ed=string.url){return this.matches(rUrl,{name:"url",message:ed,excludeEmptyString:!0})}uuid(ed=string.uuid){return this.matches(rUUID,{name:"uuid",message:ed,excludeEmptyString:!1})}datetime(ed){let ud="",dd,hd;return ed&&(typeof ed=="object"?{message:ud="",allowOffset:dd=!1,precision:hd=void 0}=ed:ud=ed),this.matches(rIsoDateTime,{name:"datetime",message:ud||string.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:ud||string.datetime_offset,params:{allowOffset:dd},skipAbsent:!0,test:md=>{if(!md||dd)return!0;const gd=parseDateStruct(md);return gd?!!gd.z:!1}}).test({name:"datetime_precision",message:ud||string.datetime_precision,params:{precision:hd},skipAbsent:!0,test:md=>{if(!md||hd==null)return!0;const gd=parseDateStruct(md);return gd?gd.precision===hd:!1}})}ensure(){return this.default("").transform(ed=>ed===null?"":ed)}trim(ed=string.trim){return this.transform(ud=>ud!=null?ud.trim():ud).test({message:ed,name:"trim",test:isTrimmed})}lowercase(ed=string.lowercase){return this.transform(ud=>isAbsent(ud)?ud:ud.toLowerCase()).test({message:ed,name:"string_case",exclusive:!0,skipAbsent:!0,test:ud=>isAbsent(ud)||ud===ud.toLowerCase()})}uppercase(ed=string.uppercase){return this.transform(ud=>isAbsent(ud)?ud:ud.toUpperCase()).test({message:ed,name:"string_case",exclusive:!0,skipAbsent:!0,test:ud=>isAbsent(ud)||ud===ud.toUpperCase()})}}create$6.prototype=StringSchema.prototype;let invalidDate=new Date(""),isDate$1=Ra=>Object.prototype.toString.call(Ra)==="[object Date]";class DateSchema extends Schema{constructor(){super({type:"date",check(ed){return isDate$1(ed)&&!isNaN(ed.getTime())}}),this.withMutation(()=>{this.transform((ed,ud,dd)=>!dd.spec.coerce||dd.isType(ed)||ed===null?ed:(ed=parseIsoDate(ed),isNaN(ed)?DateSchema.INVALID_DATE:new Date(ed)))})}prepareParam(ed,ud){let dd;if(Reference.isRef(ed))dd=ed;else{let hd=this.cast(ed);if(!this._typeCheck(hd))throw new TypeError(`\`${ud}\` must be a Date or a value that can be \`cast()\` to a Date`);dd=hd}return dd}min(ed,ud=date.min){let dd=this.prepareParam(ed,"min");return this.test({message:ud,name:"min",exclusive:!0,params:{min:ed},skipAbsent:!0,test(hd){return hd>=this.resolve(dd)}})}max(ed,ud=date.max){let dd=this.prepareParam(ed,"max");return this.test({message:ud,name:"max",exclusive:!0,params:{max:ed},skipAbsent:!0,test(hd){return hd<=this.resolve(dd)}})}}DateSchema.INVALID_DATE=invalidDate;function sortFields(Ra,ed=[]){let ud=[],dd=new Set,hd=new Set(ed.map(([gd,yd])=>`${gd}-${yd}`));function md(gd,yd){let vd=propertyExpr.split(gd)[0];dd.add(vd),hd.has(`${yd}-${vd}`)||ud.push([yd,vd])}for(const gd of Object.keys(Ra)){let yd=Ra[gd];dd.add(gd),Reference.isRef(yd)&&yd.isSibling?md(yd.path,gd):isSchema(yd)&&"deps"in yd&&yd.deps.forEach(vd=>md(vd,gd))}return toposort$1.array(Array.from(dd),ud).reverse()}function findIndex(Ra,ed){let ud=1/0;return Ra.some((dd,hd)=>{var md;if((md=ed.path)!=null&&md.includes(dd))return ud=hd,!0}),ud}function sortByKeyOrder(Ra){return(ed,ud)=>findIndex(Ra,ed)-findIndex(Ra,ud)}const parseJson=(Ra,ed,ud)=>{if(typeof Ra!="string")return Ra;let dd=Ra;try{dd=JSON.parse(Ra)}catch{}return ud.isType(dd)?dd:Ra};function deepPartial(Ra){if("fields"in Ra){const ed={};for(const[ud,dd]of Object.entries(Ra.fields))ed[ud]=deepPartial(dd);return Ra.setFields(ed)}if(Ra.type==="array"){const ed=Ra.optional();return ed.innerType&&(ed.innerType=deepPartial(ed.innerType)),ed}return Ra.type==="tuple"?Ra.optional().clone({types:Ra.spec.types.map(deepPartial)}):"optional"in Ra?Ra.optional():Ra}const deepHas=(Ra,ed)=>{const ud=[...propertyExpr.normalizePath(ed)];if(ud.length===1)return ud[0]in Ra;let dd=ud.pop(),hd=propertyExpr.getter(propertyExpr.join(ud),!0)(Ra);return!!(hd&&dd in hd)};let isObject$2=Ra=>Object.prototype.toString.call(Ra)==="[object Object]";function unknown(Ra,ed){let ud=Object.keys(Ra.fields);return Object.keys(ed).filter(dd=>ud.indexOf(dd)===-1)}const defaultSort=sortByKeyOrder([]);function create$3(Ra){return new ObjectSchema(Ra)}class ObjectSchema extends Schema{constructor(ed){super({type:"object",check(ud){return isObject$2(ud)||typeof ud=="function"}}),this.fields=Object.create(null),this._sortErrors=defaultSort,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{ed&&this.shape(ed)})}_cast(ed,ud={}){var dd;let hd=super._cast(ed,ud);if(hd===void 0)return this.getDefault(ud);if(!this._typeCheck(hd))return hd;let md=this.fields,gd=(dd=ud.stripUnknown)!=null?dd:this.spec.noUnknown,yd=[].concat(this._nodes,Object.keys(hd).filter(Nd=>!this._nodes.includes(Nd))),vd={},Cd=Object.assign({},ud,{parent:vd,__validating:ud.__validating||!1}),wd=!1;for(const Nd of yd){let Ld=md[Nd],Ud=Nd in hd;if(Ld){let jd,Gd=hd[Nd];Cd.path=(ud.path?`${ud.path}.`:"")+Nd,Ld=Ld.resolve({value:Gd,context:ud.context,parent:vd});let Yd=Ld instanceof Schema?Ld.spec:void 0,zd=Yd==null?void 0:Yd.strict;if(Yd!=null&&Yd.strip){wd=wd||Nd in hd;continue}jd=!ud.__validating||!zd?Ld.cast(hd[Nd],Cd):hd[Nd],jd!==void 0&&(vd[Nd]=jd)}else Ud&&!gd&&(vd[Nd]=hd[Nd]);(Ud!==Nd in vd||vd[Nd]!==hd[Nd])&&(wd=!0)}return wd?vd:hd}_validate(ed,ud={},dd,hd){let{from:md=[],originalValue:gd=ed,recursive:yd=this.spec.recursive}=ud;ud.from=[{schema:this,value:gd},...md],ud.__validating=!0,ud.originalValue=gd,super._validate(ed,ud,dd,(vd,Cd)=>{if(!yd||!isObject$2(Cd)){hd(vd,Cd);return}gd=gd||Cd;let wd=[];for(let Nd of this._nodes){let Ld=this.fields[Nd];!Ld||Reference.isRef(Ld)||wd.push(Ld.asNestedTest({options:ud,key:Nd,parent:Cd,parentPath:ud.path,originalParent:gd}))}this.runTests({tests:wd,value:Cd,originalValue:gd,options:ud},dd,Nd=>{hd(Nd.sort(this._sortErrors).concat(vd),Cd)})})}clone(ed){const ud=super.clone(ed);return ud.fields=Object.assign({},this.fields),ud._nodes=this._nodes,ud._excludedEdges=this._excludedEdges,ud._sortErrors=this._sortErrors,ud}concat(ed){let ud=super.concat(ed),dd=ud.fields;for(let[hd,md]of Object.entries(this.fields)){const gd=dd[hd];dd[hd]=gd===void 0?md:gd}return ud.withMutation(hd=>hd.setFields(dd,[...this._excludedEdges,...ed._excludedEdges]))}_getDefault(ed){if("default"in this.spec)return super._getDefault(ed);if(!this._nodes.length)return;let ud={};return this._nodes.forEach(dd=>{var hd;const md=this.fields[dd];let gd=ed;(hd=gd)!=null&&hd.value&&(gd=Object.assign({},gd,{parent:gd.value,value:gd.value[dd]})),ud[dd]=md&&"getDefault"in md?md.getDefault(gd):void 0}),ud}setFields(ed,ud){let dd=this.clone();return dd.fields=ed,dd._nodes=sortFields(ed,ud),dd._sortErrors=sortByKeyOrder(Object.keys(ed)),ud&&(dd._excludedEdges=ud),dd}shape(ed,ud=[]){return this.clone().withMutation(dd=>{let hd=dd._excludedEdges;return ud.length&&(Array.isArray(ud[0])||(ud=[ud]),hd=[...dd._excludedEdges,...ud]),dd.setFields(Object.assign(dd.fields,ed),hd)})}partial(){const ed={};for(const[ud,dd]of Object.entries(this.fields))ed[ud]="optional"in dd&&dd.optional instanceof Function?dd.optional():dd;return this.setFields(ed)}deepPartial(){return deepPartial(this)}pick(ed){const ud={};for(const dd of ed)this.fields[dd]&&(ud[dd]=this.fields[dd]);return this.setFields(ud,this._excludedEdges.filter(([dd,hd])=>ed.includes(dd)&&ed.includes(hd)))}omit(ed){const ud=[];for(const dd of Object.keys(this.fields))ed.includes(dd)||ud.push(dd);return this.pick(ud)}from(ed,ud,dd){let hd=propertyExpr.getter(ed,!0);return this.transform(md=>{if(!md)return md;let gd=md;return deepHas(md,ed)&&(gd=Object.assign({},md),dd||delete gd[ed],gd[ud]=hd(md)),gd})}json(){return this.transform(parseJson)}exact(ed){return this.test({name:"exact",exclusive:!0,message:ed||object.exact,test(ud){if(ud==null)return!0;const dd=unknown(this.schema,ud);return dd.length===0||this.createError({params:{properties:dd.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(ed=!0,ud=object.noUnknown){typeof ed!="boolean"&&(ud=ed,ed=!0);let dd=this.test({name:"noUnknown",exclusive:!0,message:ud,test(hd){if(hd==null)return!0;const md=unknown(this.schema,hd);return!ed||md.length===0||this.createError({params:{unknown:md.join(", ")}})}});return dd.spec.noUnknown=ed,dd}unknown(ed=!0,ud=object.noUnknown){return this.noUnknown(!ed,ud)}transformKeys(ed){return this.transform(ud=>{if(!ud)return ud;const dd={};for(const hd of Object.keys(ud))dd[ed(hd)]=ud[hd];return dd})}camelCase(){return this.transformKeys(tinyCase.camelCase)}snakeCase(){return this.transformKeys(tinyCase.snakeCase)}constantCase(){return this.transformKeys(ed=>tinyCase.snakeCase(ed).toUpperCase())}describe(ed){const ud=(ed?this.resolve(ed):this).clone(),dd=super.describe(ed);dd.fields={};for(const[md,gd]of Object.entries(ud.fields)){var hd;let yd=ed;(hd=yd)!=null&&hd.value&&(yd=Object.assign({},yd,{parent:yd.value,value:yd.value[md]})),dd.fields[md]=gd.describe(yd)}return dd}}create$3.prototype=ObjectSchema.prototype;const _hoisted_1$9={class:"flex flex-col items-start"},_hoisted_2$6={class:"flex flex-col items-start"},_sfc_main$S=defineComponent({__name:"UploadImgDialog",emits:["uploadImage"],setup(Ra,{emit:ed}){const ud=ed,dd=useDisplayStore(),hd=toTypedSchema(create$3({repo:create$6().required("GitHub 仓库不能为空"),branch:create$6().optional(),accessToken:create$6().required("GitHub Token 不能为空")})),md=ref$1(localStorage.getItem("githubConfig")?JSON.parse(localStorage.getItem("githubConfig")):{repo:"",branch:"",accessToken:""});function gd(Sh){localStorage.setItem("githubConfig",JSON.stringify(Sh)),md.value=Sh,Ke.success("保存成功")}const yd=toTypedSchema(create$3({accessKeyId:create$6().required("AccessKey ID 不能为空"),accessKeySecret:create$6().required("AccessKey Secret 不能为空"),bucket:create$6().required("Bucket 不能为空"),region:create$6().required("Region 不能为空"),useSSL:create$7().required(),cdnHost:create$6().optional(),path:create$6().optional()})),vd=ref$1(localStorage.getItem("aliOSSConfig")?JSON.parse(localStorage.getItem("aliOSSConfig")):{accessKeyId:"",accessKeySecret:"",bucket:"",region:"",useSSL:!0,cdnHost:"",path:""});function Cd(Sh){localStorage.setItem("aliOSSConfig",JSON.stringify(Sh)),vd.value=Sh,Ke.success("保存成功")}const wd=toTypedSchema(create$3({secretId:create$6().required("Secret ID 不能为空"),secretKey:create$6().required("Secret Key 不能为空"),bucket:create$6().required("Bucket 不能为空"),region:create$6().required("Region 不能为空"),cdnHost:create$6().optional(),path:create$6().optional()})),Nd=ref$1(localStorage.getItem("txCOSConfig")?JSON.parse(localStorage.getItem("txCOSConfig")):{secretId:"",secretKey:"",bucket:"",region:"",cdnHost:"",path:""});function Ld(Sh){localStorage.setItem("txCOSConfig",JSON.stringify(Sh)),Nd.value=Sh,Ke.success("保存成功")}const Ud=toTypedSchema(create$3({accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空"),bucket:create$6().required("Bucket 不能为空"),domain:create$6().required("Bucket 对应域名不能为空"),region:create$6().optional(),path:create$6().optional()})),jd=ref$1(localStorage.getItem("qiniuConfig")?JSON.parse(localStorage.getItem("qiniuConfig")):{accessKey:"",secretKey:"",bucket:"",domain:"",region:"",path:""});function Gd(Sh){localStorage.setItem("qiniuConfig",JSON.stringify(Sh)),jd.value=Sh,Ke.success("保存成功")}const Yd=toTypedSchema(create$3({endpoint:create$6().required("Endpoint 不能为空"),port:create$6().optional(),useSSL:create$7().required(),bucket:create$6().required("Bucket 不能为空"),accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空")})),zd=ref$1(localStorage.getItem("minioConfig")?JSON.parse(localStorage.getItem("minioConfig")):{endpoint:"",port:"",useSSL:!0,bucket:"",accessKey:"",secretKey:""});function qd(Sh){localStorage.setItem("minioConfig",JSON.stringify(Sh)),zd.value=Sh,Ke.success("保存成功")}const Wd=ref$1(window.location.href.startsWith("http")),Xd=toTypedSchema(create$3({proxyOrigin:Wd.value?create$6().required("代理域名不能为空"):create$6().optional(),appID:create$6().required("AppID 不能为空"),appsecret:create$6().required("AppSecret 不能为空")})),Jd=ref$1(localStorage.getItem("mpConfig")?JSON.parse(localStorage.getItem("mpConfig")):{proxyOrigin:"",appID:"",appsecret:""});function Zd(Sh){localStorage.setItem("mpConfig",JSON.stringify(Sh)),Jd.value=Sh,Ke.success("保存成功")}const mf=toTypedSchema(create$3({accountId:create$6().required("Account ID 不能为空"),accessKey:create$6().required("AccessKey 不能为空"),secretKey:create$6().required("SecretKey 不能为空"),bucket:create$6().required("Bucket 不能为空"),domain:create$6().required("Bucket 对应域名不能为空"),path:create$6().optional()})),xf=ref$1(localStorage.getItem("r2Config")?JSON.parse(localStorage.getItem("r2Config")):{accountId:"",accessKey:"",secretKey:"",bucket:"",domain:"",path:""});function _f(Sh){localStorage.setItem("r2Config",JSON.stringify(Sh)),xf.value=Sh,Ke.success("保存成功")}const vf=[{value:"default",label:"默认"},{value:"github",label:"GitHub"},{value:"aliOSS",label:"阿里云"},{value:"txCOS",label:"腾讯云"},{value:"qiniu",label:"七牛云"},{value:"minio",label:"MinIO"},{value:"mp",label:"公众号图床"},{value:"r2",label:"Cloudflare R2"},{value:"formCustom",label:"自定义代码"}],gf=ref$1("default"),Af=ref$1("upload");onBeforeMount(()=>{localStorage.getItem("imgHost")&&(gf.value=localStorage.getItem("imgHost"))});function Df(){localStorage.setItem("imgHost",gf.value),Ke.success("已成功切换图床")}function Of(Sh){const yh=checkImage(Sh);if(!yh.ok)return Ke.error(yh.msg||""),!1;let Mh=localStorage.getItem("imgHost");Mh=Mh||"default",localStorage.setItem("imgHost",Mh);const lh=localStorage.getItem(`${Mh}Config`);return Mh==="default"||lh?!0:(Ke.error(`请先配置 ${Mh} 图床参数`),!1)}const Cf=ref$1(!1),{open:If,onChange:Ff}=useFileDialog({accept:"image/*"});Ff(Sh=>{if(Sh==null)return;const yh=Sh[0];Of(yh)&&ud("uploadImage",yh)});function sh(Sh){Cf.value=!1,Sh.stopPropagation();const yh=Array.from(Sh.dataTransfer.files)[0];Of(yh)&&ud("uploadImage",yh)}return(Sh,yh)=>{const Mh=_sfc_main$16,lh=_sfc_main$17,rh=_sfc_main$T,mh=_sfc_main$U,xh=_sfc_main$W,Eh=_sfc_main$X,kf=_sfc_main$_,Rf=_sfc_main$V,_h=_sfc_main$$,Ph=_sfc_main$18,sm=_sfc_main$10,th=_sfc_main$1e,oh=__unplugin_components_12,Zh=_sfc_main$1o,Sm=_sfc_main$12,$h=_sfc_main$13,Vf=_sfc_main$14,nh=_sfc_main$1g,Lh=_sfc_main$1h;return openBlock(),createBlock(Lh,{open:unref(dd).isShowUploadImgDialog,"onUpdate:open":yh[6]||(yh[6]=Ih=>unref(dd).isShowUploadImgDialog=Ih)},{default:withCtx(()=>[createVNode(nh,{class:"max-w-max",onPointerDownOutside:yh[5]||(yh[5]=Ih=>Ih.preventDefault())},{default:withCtx(()=>[createVNode(lh,null,{default:withCtx(()=>[createVNode(Mh,null,{default:withCtx(()=>yh[7]||(yh[7]=[createTextVNode("本地上传")])),_:1})]),_:1}),createVNode(Vf,{modelValue:unref(Af),"onUpdate:modelValue":yh[4]||(yh[4]=Ih=>isRef(Af)?Af.value=Ih:null),class:"w-max"},{default:withCtx(()=>[createVNode(mh,null,{default:withCtx(()=>[createVNode(rh,{value:"upload"},{default:withCtx(()=>yh[8]||(yh[8]=[createTextVNode(" 选择上传 ")])),_:1}),(openBlock(!0),createElementBlock(Fragment,null,renderList(vf.filter(Ih=>Ih.value!=="default"),Ih=>(openBlock(),createBlock(rh,{key:Ih.value,value:Ih.value},{default:withCtx(()=>[createTextVNode(toDisplayString(Ih.label),1)]),_:2},1032,["value"]))),128))]),_:1}),createVNode(sm,{value:"upload"},{default:withCtx(()=>[createVNode(Ph,null,{default:withCtx(()=>[yh[9]||(yh[9]=createBaseVNode("span",{class:"my-4 block"}," 图床 ",-1)),createVNode(_h,{modelValue:unref(gf),"onUpdate:modelValue":[yh[0]||(yh[0]=Ih=>isRef(gf)?gf.value=Ih:null),Df]},{default:withCtx(()=>[createVNode(Eh,null,{default:withCtx(()=>[createVNode(xh,{placeholder:"请选择"})]),_:1}),createVNode(Rf,null,{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(vf,Ih=>createVNode(kf,{key:Ih.value,label:Ih.label,value:Ih.value},{default:withCtx(()=>[createTextVNode(toDisplayString(Ih.label),1)]),_:2},1032,["label","value"])),64))]),_:1})]),_:1},8,["modelValue"])]),_:1}),createBaseVNode("div",{class:normalizeClass(["bg-clip-padding mt-4 h-50 flex flex-col cursor-pointer items-center justify-evenly border-2 rounded border-dashed transition-colors hover:border-gray-700 hover:bg-gray-400/50 dark:hover:border-gray-200 dark:hover:bg-gray-500/50",{"border-gray-700 bg-gray-400/50 dark:border-gray-200 dark:bg-gray-500/50":unref(Cf)}]),onClick:yh[1]||(yh[1]=Ih=>unref(If)()),onDrop:withModifiers(sh,["prevent"]),onDragover:yh[2]||(yh[2]=withModifiers(Ih=>Cf.value=!0,["prevent"])),onDragleave:yh[3]||(yh[3]=withModifiers(Ih=>Cf.value=!1,["prevent"]))},[createVNode(unref(CloudUpload),{class:"size-20"}),yh[10]||(yh[10]=createBaseVNode("p",null,[createTextVNode(" 将图片拖到此处,或 "),createBaseVNode("strong",null,"点击上传")],-1))],34)]),_:1}),createVNode(sm,{value:"github"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(hd),"initial-values":unref(md),onSubmit:gd},{default:withCtx(()=>[createVNode(unref(Field),{name:"repo"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"GitHub 仓库",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:github.com/yanglbme/resource"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"branch"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"分支",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:release,可不填,默认 master"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessToken"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Token",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,type:"password",placeholder:"如:cc1d0c1426d0fd0902bd2d7184b14da61b8abc46"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token",target:"_blank"},{default:withCtx(()=>yh[11]||(yh[11]=[createTextVNode(" 如何获取 GitHub Token? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[12]||(yh[12]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"aliOSS"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(yd),"initial-values":unref(vd),onSubmit:Cd},{default:withCtx(()=>[createVNode(unref(Field),{name:"accessKeyId"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"AccessKey ID",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:LTAI4GdoocsmdoxUf13ylbaNHk"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKeySecret"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"AccessKey Secret",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,type:"password",placeholder:"如:cc1d0c142doocs0902bd2d7md4b14da6ylbabc46"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket 所在区域",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:oss-cn-shenzhen"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"useSSL",type:"boolean"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"UseSSL",required:"",error:om},{default:withCtx(()=>[createVNode(Sm,{checked:Ih.value,name:Ih.name,"onUpdate:checked":Ih.onChange,onBlur:Ih.onBlur},null,8,["checked","name","onUpdate:checked","onBlur"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"cdnHost"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"自定义 CDN 域名",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:https://imagecdn.alidaodao.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"存储路径",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://help.aliyun.com/document_detail/31883.html",target:"_blank"},{default:withCtx(()=>yh[13]||(yh[13]=[createTextVNode(" 如何使用阿里云 OSS? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[14]||(yh[14]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"txCOS"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(wd),"initial-values":unref(Nd),onSubmit:Ld},{default:withCtx(()=>[createVNode(unref(Field),{name:"secretId"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"SecretId",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:AKIDnQp1w3DOOCSs8F5MDp9tdoocsmdUPonW3"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"SecretKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,type:"password",placeholder:"如:ukLmdtEJ9271f3DOocsMDsCXdS3YlbW0"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:doocs-3212520134"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket 所在区域",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:ap-guangzhou"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"cdnHost"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"自定义 CDN 域名",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:https://imagecdn.alidaodao.com,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"存储路径",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:img,可不填,默认根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://cloud.tencent.com/document/product/436/38484",target:"_blank"},{default:withCtx(()=>yh[15]||(yh[15]=[createTextVNode(" 如何使用腾讯云 COS? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[16]||(yh[16]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"qiniu"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(Ud),"initial-values":unref(jd),onSubmit:Gd},{default:withCtx(()=>[createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"AccessKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:6DD3VaLJ_SQgOdoocsyTV_YWaDmdnL2n8EGx7kG"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"SecretKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,type:"password",placeholder:"如:qgZa5qrvDOOcsmdKStD1oCjZ9nB7MDvJUs_34SIm"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:md"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket 对应域名",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:https://images.123ylb.cn"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"region"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"存储区域",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:z2,可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"存储路径",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://developer.qiniu.com/kodo",target:"_blank"},{default:withCtx(()=>yh[17]||(yh[17]=[createTextVNode(" 如何使用七牛云 Kodo? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[18]||(yh[18]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"minio"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(Yd),"initial-values":unref(zd),onSubmit:qd},{default:withCtx(()=>[createVNode(unref(Field),{name:"endpoint"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Endpoint",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:play.min.io"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"port"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Port",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,type:"number",placeholder:"如:9000,可不填,http 默认为 80,https 默认为 443"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"useSSL",type:"boolean"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"UseSSL",required:"",error:om},{default:withCtx(()=>[createVNode(Sm,{checked:Ih.value,name:Ih.name,"onUpdate:checked":Ih.onChange,onBlur:Ih.onBlur},null,8,["checked","name","onUpdate:checked","onBlur"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:doocs"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"AccessKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:zhangsan"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"SecretKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:asdasdasd"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"http://docs.minio.org.cn/docs/master/minio-client-complete-guide",target:"_blank"},{default:withCtx(()=>yh[19]||(yh[19]=[createTextVNode(" 如何使用 MinIO? ")])),_:1})]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[20]||(yh[20]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"mp"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(Xd),"initial-values":unref(Jd),onSubmit:Zd},{default:withCtx(()=>[createVNode(unref(Field),{name:"proxyOrigin"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"代理域名",required:unref(Wd),error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:http://proxy.example.com,使用插件时可不填"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["required","error"])]),_:1}),createVNode(unref(Field),{name:"appID"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"appID",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:wx6e1234567890efa3"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"appsecret"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"appsecret",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:d9f1abcdef01234567890abcdef82397"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createBaseVNode("div",_hoisted_1$9,[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://developers.weixin.qq.com/doc/offiaccount/Getting_Started/Getting_Started_Guide.html",target:"_blank"},{default:withCtx(()=>yh[21]||(yh[21]=[createTextVNode(" 如何开启公众号开发者模式并获取应用账号密钥? ")])),_:1}),createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://mpmd.pages.dev/tutorial/",target:"_blank"},{default:withCtx(()=>yh[22]||(yh[22]=[createTextVNode(" 如何在浏览器插件中使用公众号图床? ")])),_:1})])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[23]||(yh[23]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"r2"},{default:withCtx(()=>[createVNode(unref(Form),{"validation-schema":unref(mf),"initial-values":unref(xf),onSubmit:_f},{default:withCtx(()=>[createVNode(unref(Field),{name:"accountId"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"AccountId",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如: 0030f123e55a57546f4c281c564e560",class:"min-w-[350px]"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"accessKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"AccessKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如: 358090b3a12824a6b0787gae7ad0fc72"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"secretKey"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"SecretKey",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,type:"password",placeholder:"如: c1c4dbcb0b6b785ac6633422a06dff3dac055fe74fe40xj1b5c5fcf1bf128010"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"bucket"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"Bucket",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:md"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"domain"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"域名",required:"",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:https://oss.example.com"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(unref(Field),{name:"path"},{default:withCtx(({field:Ih,errorMessage:om})=>[createVNode(oh,{label:"存储路径",error:om},{default:withCtx(()=>[createVNode(th,mergeProps(Ih,{modelValue:Ih.value,"onUpdate:modelValue":zh=>Ih.value=zh,placeholder:"如:img,可不填,默认为根目录"}),null,16,["modelValue","onUpdate:modelValue"])]),_:2},1032,["error"])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createBaseVNode("div",_hoisted_2$6,[createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://developers.cloudflare.com/r2/api/s3/api/",target:"_blank"},{default:withCtx(()=>yh[24]||(yh[24]=[createTextVNode(" 如何使用 S3 API 操作 Cloudflare R2 ")])),_:1}),createVNode(Zh,{variant:"link",class:"p-0",as:"a",href:"https://developers.cloudflare.com/r2/buckets/cors/",target:"_blank"},{default:withCtx(()=>yh[25]||(yh[25]=[createTextVNode(" 如何设置跨域(CORS) ")])),_:1})])]),_:1}),createVNode(oh,null,{default:withCtx(()=>[createVNode(Zh,{type:"submit"},{default:withCtx(()=>yh[26]||(yh[26]=[createTextVNode(" 保存配置 ")])),_:1})]),_:1})]),_:1},8,["validation-schema","initial-values"])]),_:1}),createVNode(sm,{value:"formCustom"},{default:withCtx(()=>[createVNode($h)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["open"])}}});var top="top",bottom="bottom",right="right",left="left",auto$1="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(Ra,ed){return Ra.concat([ed+"-"+start,ed+"-"+end])},[]),placements=[].concat(basePlacements,[auto$1]).reduce(function(Ra,ed){return Ra.concat([ed,ed+"-"+start,ed+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main$1="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main$1,afterMain,beforeWrite,write,afterWrite];function getNodeName(Ra){return Ra?(Ra.nodeName||"").toLowerCase():null}function getWindow(Ra){if(Ra==null)return window;if(Ra.toString()!=="[object Window]"){var ed=Ra.ownerDocument;return ed&&ed.defaultView||window}return Ra}function isElement$1(Ra){var ed=getWindow(Ra).Element;return Ra instanceof ed||Ra instanceof Element}function isHTMLElement(Ra){var ed=getWindow(Ra).HTMLElement;return Ra instanceof ed||Ra instanceof HTMLElement}function isShadowRoot(Ra){if(typeof ShadowRoot>"u")return!1;var ed=getWindow(Ra).ShadowRoot;return Ra instanceof ed||Ra instanceof ShadowRoot}function applyStyles(Ra){var ed=Ra.state;Object.keys(ed.elements).forEach(function(ud){var dd=ed.styles[ud]||{},hd=ed.attributes[ud]||{},md=ed.elements[ud];!isHTMLElement(md)||!getNodeName(md)||(Object.assign(md.style,dd),Object.keys(hd).forEach(function(gd){var yd=hd[gd];yd===!1?md.removeAttribute(gd):md.setAttribute(gd,yd===!0?"":yd)}))})}function effect$2(Ra){var ed=Ra.state,ud={popper:{position:ed.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(ed.elements.popper.style,ud.popper),ed.styles=ud,ed.elements.arrow&&Object.assign(ed.elements.arrow.style,ud.arrow),function(){Object.keys(ed.elements).forEach(function(dd){var hd=ed.elements[dd],md=ed.attributes[dd]||{},gd=Object.keys(ed.styles.hasOwnProperty(dd)?ed.styles[dd]:ud[dd]),yd=gd.reduce(function(vd,Cd){return vd[Cd]="",vd},{});!isHTMLElement(hd)||!getNodeName(hd)||(Object.assign(hd.style,yd),Object.keys(md).forEach(function(vd){hd.removeAttribute(vd)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(Ra){return Ra.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var Ra=navigator.userAgentData;return Ra!=null&&Ra.brands&&Array.isArray(Ra.brands)?Ra.brands.map(function(ed){return ed.brand+"/"+ed.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(Ra,ed,ud){ed===void 0&&(ed=!1),ud===void 0&&(ud=!1);var dd=Ra.getBoundingClientRect(),hd=1,md=1;ed&&isHTMLElement(Ra)&&(hd=Ra.offsetWidth>0&&round(dd.width)/Ra.offsetWidth||1,md=Ra.offsetHeight>0&&round(dd.height)/Ra.offsetHeight||1);var gd=isElement$1(Ra)?getWindow(Ra):window,yd=gd.visualViewport,vd=!isLayoutViewport()&&ud,Cd=(dd.left+(vd&&yd?yd.offsetLeft:0))/hd,wd=(dd.top+(vd&&yd?yd.offsetTop:0))/md,Nd=dd.width/hd,Ld=dd.height/md;return{width:Nd,height:Ld,top:wd,right:Cd+Nd,bottom:wd+Ld,left:Cd,x:Cd,y:wd}}function getLayoutRect(Ra){var ed=getBoundingClientRect(Ra),ud=Ra.offsetWidth,dd=Ra.offsetHeight;return Math.abs(ed.width-ud)<=1&&(ud=ed.width),Math.abs(ed.height-dd)<=1&&(dd=ed.height),{x:Ra.offsetLeft,y:Ra.offsetTop,width:ud,height:dd}}function contains(Ra,ed){var ud=ed.getRootNode&&ed.getRootNode();if(Ra.contains(ed))return!0;if(ud&&isShadowRoot(ud)){var dd=ed;do{if(dd&&Ra.isSameNode(dd))return!0;dd=dd.parentNode||dd.host}while(dd)}return!1}function getComputedStyle$1(Ra){return getWindow(Ra).getComputedStyle(Ra)}function isTableElement(Ra){return["table","td","th"].indexOf(getNodeName(Ra))>=0}function getDocumentElement(Ra){return((isElement$1(Ra)?Ra.ownerDocument:Ra.document)||window.document).documentElement}function getParentNode(Ra){return getNodeName(Ra)==="html"?Ra:Ra.assignedSlot||Ra.parentNode||(isShadowRoot(Ra)?Ra.host:null)||getDocumentElement(Ra)}function getTrueOffsetParent(Ra){return!isHTMLElement(Ra)||getComputedStyle$1(Ra).position==="fixed"?null:Ra.offsetParent}function getContainingBlock(Ra){var ed=/firefox/i.test(getUAString()),ud=/Trident/i.test(getUAString());if(ud&&isHTMLElement(Ra)){var dd=getComputedStyle$1(Ra);if(dd.position==="fixed")return null}var hd=getParentNode(Ra);for(isShadowRoot(hd)&&(hd=hd.host);isHTMLElement(hd)&&["html","body"].indexOf(getNodeName(hd))<0;){var md=getComputedStyle$1(hd);if(md.transform!=="none"||md.perspective!=="none"||md.contain==="paint"||["transform","perspective"].indexOf(md.willChange)!==-1||ed&&md.willChange==="filter"||ed&&md.filter&&md.filter!=="none")return hd;hd=hd.parentNode}return null}function getOffsetParent(Ra){for(var ed=getWindow(Ra),ud=getTrueOffsetParent(Ra);ud&&isTableElement(ud)&&getComputedStyle$1(ud).position==="static";)ud=getTrueOffsetParent(ud);return ud&&(getNodeName(ud)==="html"||getNodeName(ud)==="body"&&getComputedStyle$1(ud).position==="static")?ed:ud||getContainingBlock(Ra)||ed}function getMainAxisFromPlacement(Ra){return["top","bottom"].indexOf(Ra)>=0?"x":"y"}function within(Ra,ed,ud){return max(Ra,min(ed,ud))}function withinMaxClamp(Ra,ed,ud){var dd=within(Ra,ed,ud);return dd>ud?ud:dd}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(Ra){return Object.assign({},getFreshSideObject(),Ra)}function expandToHashMap(Ra,ed){return ed.reduce(function(ud,dd){return ud[dd]=Ra,ud},{})}var toPaddingObject=function(ed,ud){return ed=typeof ed=="function"?ed(Object.assign({},ud.rects,{placement:ud.placement})):ed,mergePaddingObject(typeof ed!="number"?ed:expandToHashMap(ed,basePlacements))};function arrow(Ra){var ed,ud=Ra.state,dd=Ra.name,hd=Ra.options,md=ud.elements.arrow,gd=ud.modifiersData.popperOffsets,yd=getBasePlacement(ud.placement),vd=getMainAxisFromPlacement(yd),Cd=[left,right].indexOf(yd)>=0,wd=Cd?"height":"width";if(!(!md||!gd)){var Nd=toPaddingObject(hd.padding,ud),Ld=getLayoutRect(md),Ud=vd==="y"?top:left,jd=vd==="y"?bottom:right,Gd=ud.rects.reference[wd]+ud.rects.reference[vd]-gd[vd]-ud.rects.popper[wd],Yd=gd[vd]-ud.rects.reference[vd],zd=getOffsetParent(md),qd=zd?vd==="y"?zd.clientHeight||0:zd.clientWidth||0:0,Wd=Gd/2-Yd/2,Xd=Nd[Ud],Jd=qd-Ld[wd]-Nd[jd],Zd=qd/2-Ld[wd]/2+Wd,mf=within(Xd,Zd,Jd),xf=vd;ud.modifiersData[dd]=(ed={},ed[xf]=mf,ed.centerOffset=mf-Zd,ed)}}function effect$1(Ra){var ed=Ra.state,ud=Ra.options,dd=ud.element,hd=dd===void 0?"[data-popper-arrow]":dd;hd!=null&&(typeof hd=="string"&&(hd=ed.elements.popper.querySelector(hd),!hd)||contains(ed.elements.popper,hd)&&(ed.elements.arrow=hd))}const arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(Ra){return Ra.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(Ra,ed){var ud=Ra.x,dd=Ra.y,hd=ed.devicePixelRatio||1;return{x:round(ud*hd)/hd||0,y:round(dd*hd)/hd||0}}function mapToStyles(Ra){var ed,ud=Ra.popper,dd=Ra.popperRect,hd=Ra.placement,md=Ra.variation,gd=Ra.offsets,yd=Ra.position,vd=Ra.gpuAcceleration,Cd=Ra.adaptive,wd=Ra.roundOffsets,Nd=Ra.isFixed,Ld=gd.x,Ud=Ld===void 0?0:Ld,jd=gd.y,Gd=jd===void 0?0:jd,Yd=typeof wd=="function"?wd({x:Ud,y:Gd}):{x:Ud,y:Gd};Ud=Yd.x,Gd=Yd.y;var zd=gd.hasOwnProperty("x"),qd=gd.hasOwnProperty("y"),Wd=left,Xd=top,Jd=window;if(Cd){var Zd=getOffsetParent(ud),mf="clientHeight",xf="clientWidth";if(Zd===getWindow(ud)&&(Zd=getDocumentElement(ud),getComputedStyle$1(Zd).position!=="static"&&yd==="absolute"&&(mf="scrollHeight",xf="scrollWidth")),Zd=Zd,hd===top||(hd===left||hd===right)&&md===end){Xd=bottom;var _f=Nd&&Zd===Jd&&Jd.visualViewport?Jd.visualViewport.height:Zd[mf];Gd-=_f-dd.height,Gd*=vd?1:-1}if(hd===left||(hd===top||hd===bottom)&&md===end){Wd=right;var vf=Nd&&Zd===Jd&&Jd.visualViewport?Jd.visualViewport.width:Zd[xf];Ud-=vf-dd.width,Ud*=vd?1:-1}}var gf=Object.assign({position:yd},Cd&&unsetSides),Af=wd===!0?roundOffsetsByDPR({x:Ud,y:Gd},getWindow(ud)):{x:Ud,y:Gd};if(Ud=Af.x,Gd=Af.y,vd){var Df;return Object.assign({},gf,(Df={},Df[Xd]=qd?"0":"",Df[Wd]=zd?"0":"",Df.transform=(Jd.devicePixelRatio||1)<=1?"translate("+Ud+"px, "+Gd+"px)":"translate3d("+Ud+"px, "+Gd+"px, 0)",Df))}return Object.assign({},gf,(ed={},ed[Xd]=qd?Gd+"px":"",ed[Wd]=zd?Ud+"px":"",ed.transform="",ed))}function computeStyles(Ra){var ed=Ra.state,ud=Ra.options,dd=ud.gpuAcceleration,hd=dd===void 0?!0:dd,md=ud.adaptive,gd=md===void 0?!0:md,yd=ud.roundOffsets,vd=yd===void 0?!0:yd,Cd={placement:getBasePlacement(ed.placement),variation:getVariation(ed.placement),popper:ed.elements.popper,popperRect:ed.rects.popper,gpuAcceleration:hd,isFixed:ed.options.strategy==="fixed"};ed.modifiersData.popperOffsets!=null&&(ed.styles.popper=Object.assign({},ed.styles.popper,mapToStyles(Object.assign({},Cd,{offsets:ed.modifiersData.popperOffsets,position:ed.options.strategy,adaptive:gd,roundOffsets:vd})))),ed.modifiersData.arrow!=null&&(ed.styles.arrow=Object.assign({},ed.styles.arrow,mapToStyles(Object.assign({},Cd,{offsets:ed.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:vd})))),ed.attributes.popper=Object.assign({},ed.attributes.popper,{"data-popper-placement":ed.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(Ra){var ed=Ra.state,ud=Ra.instance,dd=Ra.options,hd=dd.scroll,md=hd===void 0?!0:hd,gd=dd.resize,yd=gd===void 0?!0:gd,vd=getWindow(ed.elements.popper),Cd=[].concat(ed.scrollParents.reference,ed.scrollParents.popper);return md&&Cd.forEach(function(wd){wd.addEventListener("scroll",ud.update,passive)}),yd&&vd.addEventListener("resize",ud.update,passive),function(){md&&Cd.forEach(function(wd){wd.removeEventListener("scroll",ud.update,passive)}),yd&&vd.removeEventListener("resize",ud.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(Ra){return Ra.replace(/left|right|bottom|top/g,function(ed){return hash$1[ed]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(Ra){return Ra.replace(/start|end/g,function(ed){return hash[ed]})}function getWindowScroll(Ra){var ed=getWindow(Ra),ud=ed.pageXOffset,dd=ed.pageYOffset;return{scrollLeft:ud,scrollTop:dd}}function getWindowScrollBarX(Ra){return getBoundingClientRect(getDocumentElement(Ra)).left+getWindowScroll(Ra).scrollLeft}function getViewportRect(Ra,ed){var ud=getWindow(Ra),dd=getDocumentElement(Ra),hd=ud.visualViewport,md=dd.clientWidth,gd=dd.clientHeight,yd=0,vd=0;if(hd){md=hd.width,gd=hd.height;var Cd=isLayoutViewport();(Cd||!Cd&&ed==="fixed")&&(yd=hd.offsetLeft,vd=hd.offsetTop)}return{width:md,height:gd,x:yd+getWindowScrollBarX(Ra),y:vd}}function getDocumentRect(Ra){var ed,ud=getDocumentElement(Ra),dd=getWindowScroll(Ra),hd=(ed=Ra.ownerDocument)==null?void 0:ed.body,md=max(ud.scrollWidth,ud.clientWidth,hd?hd.scrollWidth:0,hd?hd.clientWidth:0),gd=max(ud.scrollHeight,ud.clientHeight,hd?hd.scrollHeight:0,hd?hd.clientHeight:0),yd=-dd.scrollLeft+getWindowScrollBarX(Ra),vd=-dd.scrollTop;return getComputedStyle$1(hd||ud).direction==="rtl"&&(yd+=max(ud.clientWidth,hd?hd.clientWidth:0)-md),{width:md,height:gd,x:yd,y:vd}}function isScrollParent(Ra){var ed=getComputedStyle$1(Ra),ud=ed.overflow,dd=ed.overflowX,hd=ed.overflowY;return/auto|scroll|overlay|hidden/.test(ud+hd+dd)}function getScrollParent(Ra){return["html","body","#document"].indexOf(getNodeName(Ra))>=0?Ra.ownerDocument.body:isHTMLElement(Ra)&&isScrollParent(Ra)?Ra:getScrollParent(getParentNode(Ra))}function listScrollParents(Ra,ed){var ud;ed===void 0&&(ed=[]);var dd=getScrollParent(Ra),hd=dd===((ud=Ra.ownerDocument)==null?void 0:ud.body),md=getWindow(dd),gd=hd?[md].concat(md.visualViewport||[],isScrollParent(dd)?dd:[]):dd,yd=ed.concat(gd);return hd?yd:yd.concat(listScrollParents(getParentNode(gd)))}function rectToClientRect(Ra){return Object.assign({},Ra,{left:Ra.x,top:Ra.y,right:Ra.x+Ra.width,bottom:Ra.y+Ra.height})}function getInnerBoundingClientRect(Ra,ed){var ud=getBoundingClientRect(Ra,!1,ed==="fixed");return ud.top=ud.top+Ra.clientTop,ud.left=ud.left+Ra.clientLeft,ud.bottom=ud.top+Ra.clientHeight,ud.right=ud.left+Ra.clientWidth,ud.width=Ra.clientWidth,ud.height=Ra.clientHeight,ud.x=ud.left,ud.y=ud.top,ud}function getClientRectFromMixedType(Ra,ed,ud){return ed===viewport?rectToClientRect(getViewportRect(Ra,ud)):isElement$1(ed)?getInnerBoundingClientRect(ed,ud):rectToClientRect(getDocumentRect(getDocumentElement(Ra)))}function getClippingParents(Ra){var ed=listScrollParents(getParentNode(Ra)),ud=["absolute","fixed"].indexOf(getComputedStyle$1(Ra).position)>=0,dd=ud&&isHTMLElement(Ra)?getOffsetParent(Ra):Ra;return isElement$1(dd)?ed.filter(function(hd){return isElement$1(hd)&&contains(hd,dd)&&getNodeName(hd)!=="body"}):[]}function getClippingRect(Ra,ed,ud,dd){var hd=ed==="clippingParents"?getClippingParents(Ra):[].concat(ed),md=[].concat(hd,[ud]),gd=md[0],yd=md.reduce(function(vd,Cd){var wd=getClientRectFromMixedType(Ra,Cd,dd);return vd.top=max(wd.top,vd.top),vd.right=min(wd.right,vd.right),vd.bottom=min(wd.bottom,vd.bottom),vd.left=max(wd.left,vd.left),vd},getClientRectFromMixedType(Ra,gd,dd));return yd.width=yd.right-yd.left,yd.height=yd.bottom-yd.top,yd.x=yd.left,yd.y=yd.top,yd}function computeOffsets(Ra){var ed=Ra.reference,ud=Ra.element,dd=Ra.placement,hd=dd?getBasePlacement(dd):null,md=dd?getVariation(dd):null,gd=ed.x+ed.width/2-ud.width/2,yd=ed.y+ed.height/2-ud.height/2,vd;switch(hd){case top:vd={x:gd,y:ed.y-ud.height};break;case bottom:vd={x:gd,y:ed.y+ed.height};break;case right:vd={x:ed.x+ed.width,y:yd};break;case left:vd={x:ed.x-ud.width,y:yd};break;default:vd={x:ed.x,y:ed.y}}var Cd=hd?getMainAxisFromPlacement(hd):null;if(Cd!=null){var wd=Cd==="y"?"height":"width";switch(md){case start:vd[Cd]=vd[Cd]-(ed[wd]/2-ud[wd]/2);break;case end:vd[Cd]=vd[Cd]+(ed[wd]/2-ud[wd]/2);break}}return vd}function detectOverflow(Ra,ed){ed===void 0&&(ed={});var ud=ed,dd=ud.placement,hd=dd===void 0?Ra.placement:dd,md=ud.strategy,gd=md===void 0?Ra.strategy:md,yd=ud.boundary,vd=yd===void 0?clippingParents:yd,Cd=ud.rootBoundary,wd=Cd===void 0?viewport:Cd,Nd=ud.elementContext,Ld=Nd===void 0?popper:Nd,Ud=ud.altBoundary,jd=Ud===void 0?!1:Ud,Gd=ud.padding,Yd=Gd===void 0?0:Gd,zd=mergePaddingObject(typeof Yd!="number"?Yd:expandToHashMap(Yd,basePlacements)),qd=Ld===popper?reference:popper,Wd=Ra.rects.popper,Xd=Ra.elements[jd?qd:Ld],Jd=getClippingRect(isElement$1(Xd)?Xd:Xd.contextElement||getDocumentElement(Ra.elements.popper),vd,wd,gd),Zd=getBoundingClientRect(Ra.elements.reference),mf=computeOffsets({reference:Zd,element:Wd,placement:hd}),xf=rectToClientRect(Object.assign({},Wd,mf)),_f=Ld===popper?xf:Zd,vf={top:Jd.top-_f.top+zd.top,bottom:_f.bottom-Jd.bottom+zd.bottom,left:Jd.left-_f.left+zd.left,right:_f.right-Jd.right+zd.right},gf=Ra.modifiersData.offset;if(Ld===popper&&gf){var Af=gf[hd];Object.keys(vf).forEach(function(Df){var Of=[right,bottom].indexOf(Df)>=0?1:-1,Cf=[top,bottom].indexOf(Df)>=0?"y":"x";vf[Df]+=Af[Cf]*Of})}return vf}function computeAutoPlacement(Ra,ed){ed===void 0&&(ed={});var ud=ed,dd=ud.placement,hd=ud.boundary,md=ud.rootBoundary,gd=ud.padding,yd=ud.flipVariations,vd=ud.allowedAutoPlacements,Cd=vd===void 0?placements:vd,wd=getVariation(dd),Nd=wd?yd?variationPlacements:variationPlacements.filter(function(jd){return getVariation(jd)===wd}):basePlacements,Ld=Nd.filter(function(jd){return Cd.indexOf(jd)>=0});Ld.length===0&&(Ld=Nd);var Ud=Ld.reduce(function(jd,Gd){return jd[Gd]=detectOverflow(Ra,{placement:Gd,boundary:hd,rootBoundary:md,padding:gd})[getBasePlacement(Gd)],jd},{});return Object.keys(Ud).sort(function(jd,Gd){return Ud[jd]-Ud[Gd]})}function getExpandedFallbackPlacements(Ra){if(getBasePlacement(Ra)===auto$1)return[];var ed=getOppositePlacement(Ra);return[getOppositeVariationPlacement(Ra),ed,getOppositeVariationPlacement(ed)]}function flip(Ra){var ed=Ra.state,ud=Ra.options,dd=Ra.name;if(!ed.modifiersData[dd]._skip){for(var hd=ud.mainAxis,md=hd===void 0?!0:hd,gd=ud.altAxis,yd=gd===void 0?!0:gd,vd=ud.fallbackPlacements,Cd=ud.padding,wd=ud.boundary,Nd=ud.rootBoundary,Ld=ud.altBoundary,Ud=ud.flipVariations,jd=Ud===void 0?!0:Ud,Gd=ud.allowedAutoPlacements,Yd=ed.options.placement,zd=getBasePlacement(Yd),qd=zd===Yd,Wd=vd||(qd||!jd?[getOppositePlacement(Yd)]:getExpandedFallbackPlacements(Yd)),Xd=[Yd].concat(Wd).reduce(function(mh,xh){return mh.concat(getBasePlacement(xh)===auto$1?computeAutoPlacement(ed,{placement:xh,boundary:wd,rootBoundary:Nd,padding:Cd,flipVariations:jd,allowedAutoPlacements:Gd}):xh)},[]),Jd=ed.rects.reference,Zd=ed.rects.popper,mf=new Map,xf=!0,_f=Xd[0],vf=0;vf=0,Cf=Of?"width":"height",If=detectOverflow(ed,{placement:gf,boundary:wd,rootBoundary:Nd,altBoundary:Ld,padding:Cd}),Ff=Of?Df?right:left:Df?bottom:top;Jd[Cf]>Zd[Cf]&&(Ff=getOppositePlacement(Ff));var sh=getOppositePlacement(Ff),Sh=[];if(md&&Sh.push(If[Af]<=0),yd&&Sh.push(If[Ff]<=0,If[sh]<=0),Sh.every(function(mh){return mh})){_f=gf,xf=!1;break}mf.set(gf,Sh)}if(xf)for(var yh=jd?3:1,Mh=function(xh){var Eh=Xd.find(function(kf){var Rf=mf.get(kf);if(Rf)return Rf.slice(0,xh).every(function(_h){return _h})});if(Eh)return _f=Eh,"break"},lh=yh;lh>0;lh--){var rh=Mh(lh);if(rh==="break")break}ed.placement!==_f&&(ed.modifiersData[dd]._skip=!0,ed.placement=_f,ed.reset=!0)}}const flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(Ra,ed,ud){return ud===void 0&&(ud={x:0,y:0}),{top:Ra.top-ed.height-ud.y,right:Ra.right-ed.width+ud.x,bottom:Ra.bottom-ed.height+ud.y,left:Ra.left-ed.width-ud.x}}function isAnySideFullyClipped(Ra){return[top,right,bottom,left].some(function(ed){return Ra[ed]>=0})}function hide(Ra){var ed=Ra.state,ud=Ra.name,dd=ed.rects.reference,hd=ed.rects.popper,md=ed.modifiersData.preventOverflow,gd=detectOverflow(ed,{elementContext:"reference"}),yd=detectOverflow(ed,{altBoundary:!0}),vd=getSideOffsets(gd,dd),Cd=getSideOffsets(yd,hd,md),wd=isAnySideFullyClipped(vd),Nd=isAnySideFullyClipped(Cd);ed.modifiersData[ud]={referenceClippingOffsets:vd,popperEscapeOffsets:Cd,isReferenceHidden:wd,hasPopperEscaped:Nd},ed.attributes.popper=Object.assign({},ed.attributes.popper,{"data-popper-reference-hidden":wd,"data-popper-escaped":Nd})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(Ra,ed,ud){var dd=getBasePlacement(Ra),hd=[left,top].indexOf(dd)>=0?-1:1,md=typeof ud=="function"?ud(Object.assign({},ed,{placement:Ra})):ud,gd=md[0],yd=md[1];return gd=gd||0,yd=(yd||0)*hd,[left,right].indexOf(dd)>=0?{x:yd,y:gd}:{x:gd,y:yd}}function offset(Ra){var ed=Ra.state,ud=Ra.options,dd=Ra.name,hd=ud.offset,md=hd===void 0?[0,0]:hd,gd=placements.reduce(function(wd,Nd){return wd[Nd]=distanceAndSkiddingToXY(Nd,ed.rects,md),wd},{}),yd=gd[ed.placement],vd=yd.x,Cd=yd.y;ed.modifiersData.popperOffsets!=null&&(ed.modifiersData.popperOffsets.x+=vd,ed.modifiersData.popperOffsets.y+=Cd),ed.modifiersData[dd]=gd}const offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(Ra){var ed=Ra.state,ud=Ra.name;ed.modifiersData[ud]=computeOffsets({reference:ed.rects.reference,element:ed.rects.popper,placement:ed.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(Ra){return Ra==="x"?"y":"x"}function preventOverflow(Ra){var ed=Ra.state,ud=Ra.options,dd=Ra.name,hd=ud.mainAxis,md=hd===void 0?!0:hd,gd=ud.altAxis,yd=gd===void 0?!1:gd,vd=ud.boundary,Cd=ud.rootBoundary,wd=ud.altBoundary,Nd=ud.padding,Ld=ud.tether,Ud=Ld===void 0?!0:Ld,jd=ud.tetherOffset,Gd=jd===void 0?0:jd,Yd=detectOverflow(ed,{boundary:vd,rootBoundary:Cd,padding:Nd,altBoundary:wd}),zd=getBasePlacement(ed.placement),qd=getVariation(ed.placement),Wd=!qd,Xd=getMainAxisFromPlacement(zd),Jd=getAltAxis(Xd),Zd=ed.modifiersData.popperOffsets,mf=ed.rects.reference,xf=ed.rects.popper,_f=typeof Gd=="function"?Gd(Object.assign({},ed.rects,{placement:ed.placement})):Gd,vf=typeof _f=="number"?{mainAxis:_f,altAxis:_f}:Object.assign({mainAxis:0,altAxis:0},_f),gf=ed.modifiersData.offset?ed.modifiersData.offset[ed.placement]:null,Af={x:0,y:0};if(Zd){if(md){var Df,Of=Xd==="y"?top:left,Cf=Xd==="y"?bottom:right,If=Xd==="y"?"height":"width",Ff=Zd[Xd],sh=Ff+Yd[Of],Sh=Ff-Yd[Cf],yh=Ud?-xf[If]/2:0,Mh=qd===start?mf[If]:xf[If],lh=qd===start?-xf[If]:-mf[If],rh=ed.elements.arrow,mh=Ud&&rh?getLayoutRect(rh):{width:0,height:0},xh=ed.modifiersData["arrow#persistent"]?ed.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Eh=xh[Of],kf=xh[Cf],Rf=within(0,mf[If],mh[If]),_h=Wd?mf[If]/2-yh-Rf-Eh-vf.mainAxis:Mh-Rf-Eh-vf.mainAxis,Ph=Wd?-mf[If]/2+yh+Rf+kf+vf.mainAxis:lh+Rf+kf+vf.mainAxis,sm=ed.elements.arrow&&getOffsetParent(ed.elements.arrow),th=sm?Xd==="y"?sm.clientTop||0:sm.clientLeft||0:0,oh=(Df=gf==null?void 0:gf[Xd])!=null?Df:0,Zh=Ff+_h-oh-th,Sm=Ff+Ph-oh,$h=within(Ud?min(sh,Zh):sh,Ff,Ud?max(Sh,Sm):Sh);Zd[Xd]=$h,Af[Xd]=$h-Ff}if(yd){var Vf,nh=Xd==="x"?top:left,Lh=Xd==="x"?bottom:right,Ih=Zd[Jd],om=Jd==="y"?"height":"width",zh=Ih+Yd[nh],Om=Ih-Yd[Lh],Im=[top,left].indexOf(zd)!==-1,Zm=(Vf=gf==null?void 0:gf[Jd])!=null?Vf:0,Lm=Im?zh:Ih-mf[om]-xf[om]-Zm+vf.altAxis,Wm=Im?Ih+mf[om]+xf[om]-Zm-vf.altAxis:Om,ig=Ud&&Im?withinMaxClamp(Lm,Ih,Wm):within(Ud?Lm:zh,Ih,Ud?Wm:Om);Zd[Jd]=ig,Af[Jd]=ig-Ih}ed.modifiersData[dd]=Af}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(Ra){return{scrollLeft:Ra.scrollLeft,scrollTop:Ra.scrollTop}}function getNodeScroll(Ra){return Ra===getWindow(Ra)||!isHTMLElement(Ra)?getWindowScroll(Ra):getHTMLElementScroll(Ra)}function isElementScaled(Ra){var ed=Ra.getBoundingClientRect(),ud=round(ed.width)/Ra.offsetWidth||1,dd=round(ed.height)/Ra.offsetHeight||1;return ud!==1||dd!==1}function getCompositeRect(Ra,ed,ud){ud===void 0&&(ud=!1);var dd=isHTMLElement(ed),hd=isHTMLElement(ed)&&isElementScaled(ed),md=getDocumentElement(ed),gd=getBoundingClientRect(Ra,hd,ud),yd={scrollLeft:0,scrollTop:0},vd={x:0,y:0};return(dd||!dd&&!ud)&&((getNodeName(ed)!=="body"||isScrollParent(md))&&(yd=getNodeScroll(ed)),isHTMLElement(ed)?(vd=getBoundingClientRect(ed,!0),vd.x+=ed.clientLeft,vd.y+=ed.clientTop):md&&(vd.x=getWindowScrollBarX(md))),{x:gd.left+yd.scrollLeft-vd.x,y:gd.top+yd.scrollTop-vd.y,width:gd.width,height:gd.height}}function order(Ra){var ed=new Map,ud=new Set,dd=[];Ra.forEach(function(md){ed.set(md.name,md)});function hd(md){ud.add(md.name);var gd=[].concat(md.requires||[],md.requiresIfExists||[]);gd.forEach(function(yd){if(!ud.has(yd)){var vd=ed.get(yd);vd&&hd(vd)}}),dd.push(md)}return Ra.forEach(function(md){ud.has(md.name)||hd(md)}),dd}function orderModifiers(Ra){var ed=order(Ra);return modifierPhases.reduce(function(ud,dd){return ud.concat(ed.filter(function(hd){return hd.phase===dd}))},[])}function debounce(Ra){var ed;return function(){return ed||(ed=new Promise(function(ud){Promise.resolve().then(function(){ed=void 0,ud(Ra())})})),ed}}function mergeByName(Ra){var ed=Ra.reduce(function(ud,dd){var hd=ud[dd.name];return ud[dd.name]=hd?Object.assign({},hd,dd,{options:Object.assign({},hd.options,dd.options),data:Object.assign({},hd.data,dd.data)}):dd,ud},{});return Object.keys(ed).map(function(ud){return ed[ud]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var Ra=arguments.length,ed=new Array(Ra),ud=0;udRa.length)&&(ed=Ra.length);for(var ud=0,dd=Array(ed);ud=0;--lh){var rh=this.tryEntries[lh],mh=rh.completion;if(rh.tryLoc==="root")return Mh("end");if(rh.tryLoc<=this.prev){var xh=gd.call(rh,"catchLoc"),Eh=gd.call(rh,"finallyLoc");if(xh&&Eh){if(this.prev=0;--Mh){var lh=this.tryEntries[Mh];if(lh.tryLoc<=this.prev&&gd.call(lh,"finallyLoc")&&this.prev=0;--yh){var Mh=this.tryEntries[yh];if(Mh.finallyLoc===Sh)return this.complete(Mh.completion,Mh.afterLoc),If(Mh),Wd}},catch:function(Sh){for(var yh=this.tryEntries.length-1;yh>=0;--yh){var Mh=this.tryEntries[yh];if(Mh.tryLoc===Sh){var lh=Mh.completion;if(lh.type==="throw"){var rh=lh.arg;If(Mh)}return rh}}throw Error("illegal catch attempt")},delegateYield:function(Sh,yh,Mh){return this.delegate={iterator:sh(Sh),resultName:yh,nextLoc:Mh},this.method==="next"&&(this.arg=dd),Wd}},hd}Ra.exports=ud,Ra.exports.__esModule=!0,Ra.exports.default=Ra.exports}(M$1);var R$1=M$1.exports(),z$1=R$1;try{regeneratorRuntime=R$1}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=R$1:Function("r","regeneratorRuntime = r")(R$1)}function T$1(Ra,ed){return function(ud){if(Array.isArray(ud))return ud}(Ra)||function(ud,dd){var hd=ud==null?null:typeof Symbol<"u"&&ud[Symbol.iterator]||ud["@@iterator"];if(hd!=null){var md,gd,yd,vd,Cd=[],wd=!0,Nd=!1;try{if(yd=(hd=hd.call(ud)).next,dd===0){if(Object(hd)!==hd)return;wd=!1}else for(;!(wd=(md=yd.call(hd)).done)&&(Cd.push(md.value),Cd.length!==dd);wd=!0);}catch(Ld){Nd=!0,gd=Ld}finally{try{if(!wd&&hd.return!=null&&(vd=hd.return(),Object(vd)!==vd))return}finally{if(Nd)throw gd}}return Cd}}(Ra,ed)||F$1(Ra,ed)||function(){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 D$1(Ra){var ed=function(ud,dd){if(L$1(ud)!="object"||!ud)return ud;var hd=ud[Symbol.toPrimitive];if(hd!==void 0){var md=hd.call(ud,dd);if(L$1(md)!="object")return md;throw new TypeError("@@toPrimitive must return a primitive value.")}return(dd==="string"?String:Number)(ud)}(Ra,"string");return L$1(ed)=="symbol"?ed:ed+""}function H$1(Ra,ed,ud){return(ed=D$1(ed))in Ra?Object.defineProperty(Ra,ed,{value:ud,enumerable:!0,configurable:!0,writable:!0}):Ra[ed]=ud,Ra}var G$1=defineComponent({name:"Saturation",props:{size:{type:Number,default:160},hue:{type:Number,default:0},saturation:{type:Number,default:0},value:{type:Number,default:0}},emits:["change"],setup:function(Ra,ed){var ud=ed.emit,dd=computed(function(){return{width:"".concat(Ra.size,"px"),height:"".concat(Ra.size,"px"),background:"hsl(".concat(Ra.hue,", 100%, 50%)")}});return{saturationStyle:dd,sliderStyle:computed(function(){return{top:"".concat((100-Ra.value)/100*Ra.size-5,"px"),left:"".concat(Ra.saturation*Ra.size/100-5,"px"),width:"".concat(10,"px"),height:"".concat(10,"px")}}),onSelect:function(hd){var md=hd.target.getBoundingClientRect(),gd=md.left,yd=md.top,vd=function(wd){var Nd,Ld;wd instanceof MouseEvent?(Nd=wd.clientX,Ld=wd.clientY):wd instanceof TouchEvent&&(Nd=wd.touches[0].clientX,Ld=wd.touches[0].clientY);var Ud=Nd-gd,jd=Ld-yd;Ud<0&&(Ud=0),jd<0&&(jd=0),Ud>Ra.size&&(Ud=Ra.size),jd>Ra.size&&(jd=Ra.size);var Gd=Ud/Ra.size*100,Yd=100-jd/Ra.size*100;ud("change",Gd,Yd)};vd(hd);var Cd=function(){document.removeEventListener("mousemove",vd),document.removeEventListener("mouseup",Cd),document.removeEventListener("touchmove",vd),document.removeEventListener("touchend",Cd)};vd(hd),hd instanceof MouseEvent&&(document.addEventListener("mousemove",vd),document.addEventListener("mouseup",Cd)),hd instanceof TouchEvent&&(hd.preventDefault(),document.addEventListener("touchmove",vd,{passive:!1}),document.addEventListener("touchend",Cd))}}}});function V$1(Ra,ed){ed===void 0&&(ed={});var ud=ed.insertAt;if(Ra&&typeof document<"u"){var dd=document.head||document.getElementsByTagName("head")[0],hd=document.createElement("style");hd.type="text/css",ud==="top"&&dd.firstChild?dd.insertBefore(hd,dd.firstChild):dd.appendChild(hd),hd.styleSheet?hd.styleSheet.cssText=Ra:hd.appendChild(document.createTextNode(Ra))}}V$1(".saturation[data-v-24517fec]{position:relative}.saturation-black[data-v-24517fec],.saturation-white[data-v-24517fec]{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%}.saturation-white[data-v-24517fec]{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.saturation-black[data-v-24517fec]{background:linear-gradient(0deg,#000,transparent)}.slider[data-v-24517fec]{border:1px solid #fff;border-radius:50%;box-shadow:0 0 1px 1px rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;top:0;z-index:1}"),G$1.render=function(Ra,ed,ud,dd,hd,md){return openBlock(),createElementBlock("div",{class:"saturation",style:normalizeStyle(Ra.saturationStyle),onMousedown:ed[0]||(ed[0]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"])),onTouchstart:ed[1]||(ed[1]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"]))},[ed[2]||(ed[2]=createBaseVNode("div",{class:"saturation-white"},null,-1)),ed[3]||(ed[3]=createBaseVNode("div",{class:"saturation-black"},null,-1)),createBaseVNode("div",{class:"slider",style:normalizeStyle(Ra.sliderStyle)},null,4)],36)},G$1.__scopeId="data-v-24517fec",G$1.__file="src/picker/Saturation.vue";var Y$1=defineComponent({name:"Hue",props:{width:{type:Number,default:15},height:{type:Number,default:160},hue:{type:Number,default:0}},emits:["change"],setup:function(Ra,ed){var ud=ed.emit,dd=computed(function(){return{top:"".concat((1-Ra.hue/360)*Ra.height-2,"px"),height:"".concat(4,"px")}}),hd=ref$1();return onMounted(function(){(function(){if(hd.value){hd.value.width=Ra.width,hd.value.height=Ra.height;var md=hd.value.getContext("2d");if(md){var gd=md.createLinearGradient(0,0,0,Ra.height);gd.addColorStop(0,"#FF0000"),gd.addColorStop(.17,"#FF00FF"),gd.addColorStop(.34,"#0000FF"),gd.addColorStop(.51,"#00FFFF"),gd.addColorStop(.68,"#00FF00"),gd.addColorStop(.17*5,"#FFFF00"),gd.addColorStop(1,"#FF0000"),md.fillStyle=gd,md.fillRect(0,0,Ra.width,Ra.height)}}})()}),{canvas:hd,sliderStyle:dd,onSelect:function(md){var gd=md.target.getBoundingClientRect().top,yd=function(Cd){var wd;Cd instanceof MouseEvent?wd=Cd.clientY:Cd instanceof TouchEvent&&(wd=Cd.touches[0].clientY);var Nd=wd-gd;Nd<0&&(Nd=0),Nd>Ra.height&&(Nd=Ra.height);var Ld=-100*Nd/Ra.height+100;ud("change",360*Ld/100)},vd=function(){document.removeEventListener("mousemove",yd),document.removeEventListener("mouseup",vd),document.removeEventListener("touchmove",yd),document.removeEventListener("touchend",vd)};yd(md),md instanceof MouseEvent&&(document.addEventListener("mousemove",yd),document.addEventListener("mouseup",vd)),md instanceof TouchEvent&&(md.preventDefault(),document.addEventListener("touchmove",yd,{passive:!1}),document.addEventListener("touchend",vd))}}}}),$={ref:"canvas"};V$1(".hue[data-v-78b9f4f0]{position:relative;touch-action:none}.slider[data-v-78b9f4f0]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),Y$1.render=function(Ra,ed,ud,dd,hd,md){return openBlock(),createElementBlock("div",{class:"hue",onMousedown:ed[0]||(ed[0]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"])),onTouchstart:ed[1]||(ed[1]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"]))},[createBaseVNode("canvas",$,null,512),createBaseVNode("div",{class:"slider",style:normalizeStyle(Ra.sliderStyle)},null,4)],32)},Y$1.__scopeId="data-v-78b9f4f0",Y$1.__file="src/picker/Hue.vue";var X$1=defineComponent({name:"Alpha",props:{width:{type:Number,default:15},height:{type:Number,default:160},color:{type:String,default:"#000000"},alpha:{type:Number,default:1}},setup:function(Ra,ed){var ud=ed.emit,dd=computed(function(){return{top:"".concat(Ra.alpha*Ra.height-2,"px"),height:"".concat(4,"px")}}),hd=ref$1(),md=function(){var gd=hd.value.getContext("2d");hd.value.width=Ra.width,hd.value.height=Ra.height;var yd=function(Cd){var wd=document.createElement("canvas"),Nd=wd.getContext("2d"),Ld=2*Cd;return wd.width=Ld,wd.height=Ld,Nd.fillStyle="#ffffff",Nd.fillRect(0,0,Ld,Ld),Nd.fillStyle="#ccd5db",Nd.fillRect(0,0,Cd,Cd),Nd.fillRect(Cd,Cd,Cd,Cd),wd}(5);gd.fillStyle=gd.createPattern(yd,"repeat"),gd.fillRect(0,0,Ra.width,Ra.height);var vd=gd.createLinearGradient(0,0,0,Ra.height);vd.addColorStop(.01,"rgba(255,255,255,0)"),vd.addColorStop(.99,Ra.color),gd.fillStyle=vd,gd.fillRect(0,0,Ra.width,Ra.height)};return watch(function(){return Ra.color},function(){md()}),onMounted(function(){md()}),{canvas:hd,sliderStyle:dd,onSelect:function(gd){var yd=gd.target.getBoundingClientRect().top,vd=function(wd){var Nd;wd instanceof MouseEvent?Nd=wd.clientY:wd instanceof TouchEvent&&(Nd=wd.touches[0].clientY);var Ld=Nd-yd;Ld<0&&(Ld=0),Ld>Ra.height&&(Ld=Ra.height);var Ud=parseFloat((Ld/Ra.height).toFixed(2));ud("change",Ud)},Cd=function(){document.removeEventListener("mousemove",vd),document.removeEventListener("mouseup",Cd),document.removeEventListener("touchmove",vd),document.removeEventListener("touchend",Cd)};vd(gd),gd instanceof MouseEvent&&(document.addEventListener("mousemove",vd),document.addEventListener("mouseup",Cd)),gd instanceof TouchEvent&&(gd.preventDefault(),document.addEventListener("touchmove",vd,{passive:!1}),document.addEventListener("touchend",Cd))}}}}),J$1={ref:"canvas"};V$1(".alpha[data-v-24dc9656]{position:relative;touch-action:none}.slider[data-v-24dc9656]{background:#fff;box-shadow:0 0 1px 0 rgba(0,0,0,.3);left:0;pointer-events:none;position:absolute;width:100%;z-index:1}"),X$1.render=function(Ra,ed,ud,dd,hd,md){return openBlock(),createElementBlock("div",{class:"alpha",onMousedown:ed[0]||(ed[0]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"])),onTouchstart:ed[1]||(ed[1]=withModifiers(function(){return Ra.onSelect&&Ra.onSelect.apply(Ra,arguments)},["prevent","stop"]))},[createBaseVNode("canvas",J$1,null,512),createBaseVNode("div",{class:"slider",style:normalizeStyle(Ra.sliderStyle)},null,4)],32)},X$1.__scopeId="data-v-24dc9656",X$1.__file="src/picker/Alpha.vue";var q$1={rgb:"RGBA",hex:"HEX",hsl:"HSLA",hsv:"HSVA"},U$1={rgb:"RGB",hex:"HEX",hsl:"HSL",hsv:"HSV"},W$1={RGB:"rgb",RGBA:"rgb",HEX:"hex",HSL:"hsl",HSLA:"hsl",HSV:"hsv",HSVA:"hsv"};function K$1(Ra,ed){var ud=Object.keys(Ra);if(Object.getOwnPropertySymbols){var dd=Object.getOwnPropertySymbols(Ra);ed&&(dd=dd.filter(function(hd){return Object.getOwnPropertyDescriptor(Ra,hd).enumerable})),ud.push.apply(ud,dd)}return ud}function Q$1(Ra){for(var ed=1;ed1}),vd=computed(function(){var wd=Ra.options,Nd=Ra.showAlpha,Ld=Ra.value;return Array.isArray(wd)?Nd?wd.map(function(Ud){return q$1[Ud]}).filter(function(Ud){return!Ud.includes(Ld)}):wd.map(function(Ud){return U$1[Ud]}).filter(function(Ud){return!Ud.includes(Ld)}):[]}),Cd=function(wd){var Nd,Ld,Ud=wd.target;!((Nd=unref(dd))!==null&&Nd!==void 0&&Nd.isEqualNode(Ud))&&(!((Ld=unref(dd))===null||Ld===void 0)&&Ld.contains(Ud))||(md.value=!1)};return onMounted(function(){document.addEventListener("mouseup",Cd,!1)}),onUnmounted(function(){document.removeEventListener("mouseup",Cd,!1)}),{targetRef:dd,selectorRef:hd,selectorStyle:gd,isShowSelector:md,isNeedSelect:yd,formatOptions:vd,onShow:function(){yd.value&&(md.value=!0)},onFormatChange:function(wd){ud("change",W$1[wd])}}}}),re={class:"format"},ne={key:0,class:"arrow"},oe=["onClick"];V$1(".format[data-v-5f6e8f5e]{position:relative}.label[data-v-5f6e8f5e]{align-items:center;background:#e7e8e9;color:#999;display:flex;float:left;font-weight:500;height:30px;justify-content:center;position:relative;width:60px}[pick-colors-theme=dark] .label[data-v-5f6e8f5e]{background:#252930;color:#999}.arrow[data-v-5f6e8f5e]{height:6px;margin-bottom:4px;margin-left:5px;transform:rotate(135deg);width:6px}.arrow[data-v-5f6e8f5e],[pick-colors-theme=dark] .arrow[data-v-5f6e8f5e]{border-right:1px solid #999;border-top:1px solid #999}.selector[data-v-5f6e8f5e]{align-items:center;background:#f7f8f9;border-radius:5px;box-shadow:0 0 16px 0 rgba(0,0,0,.16);cursor:pointer;display:flex;flex-direction:column;font-weight:400;justify-content:center;padding:4px}[pick-colors-theme=dark] .selector[data-v-5f6e8f5e]{background:#252930;color:#999}.selector-item[data-v-5f6e8f5e]{align-items:center;display:flex;height:30px;justify-content:center;width:60px}.selector-item[data-v-5f6e8f5e]:hover{background:#e1f2fe}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]{color:#fff}[pick-colors-theme=dark] .selector-item[data-v-5f6e8f5e]:hover{background:#0087fa}.active-selector-item[data-v-5f6e8f5e]{background:#e1f2fe}[pick-colors-theme=dark] .active-selector-item[data-v-5f6e8f5e]{background:#0087fa}.v-enter-active[data-v-5f6e8f5e],.v-leave-active[data-v-5f6e8f5e]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-5f6e8f5e],.v-leave-to[data-v-5f6e8f5e]{opacity:0;transform:scaleY(0)}"),te.render=function(Ra,ed,ud,dd,hd,md){return openBlock(),createElementBlock("div",re,[createBaseVNode("div",{class:"label",ref:"targetRef",onClick:ed[0]||(ed[0]=function(){return Ra.onShow&&Ra.onShow.apply(Ra,arguments)})},[createBaseVNode("span",null,toDisplayString(Ra.value),1),Ra.isNeedSelect?(openBlock(),createElementBlock("div",ne)):createCommentVNode("v-if",!0)],512),createVNode(Transition$1,null,{default:withCtx(function(){return[Ra.isShowSelector?(openBlock(),createElementBlock("div",{key:0,class:"selector",ref:"selectorRef",style:normalizeStyle(Ra.selectorStyle)},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ra.formatOptions,function(gd){return openBlock(),createElementBlock("div",{class:"selector-item",key:gd,onClick:function(yd){return Ra.onFormatChange(gd)}},toDisplayString(gd),9,oe)}),128))],4)):createCommentVNode("v-if",!0)]}),_:1})])},te.__scopeId="data-v-5f6e8f5e",te.__file="src/picker/input-value/FormatValue.vue";var ae$1=defineComponent({name:"Input",components:{FormatValue:te},props:{format:{type:String,default:"RGBA"},value:{type:String,default:""},width:{type:Number},showAlpha:{type:Boolean},formatOptions:{type:[Boolean,Array]}},emits:["change","focus","blur","enter","formatChange"],setup:function(Ra,ed){var ud=ed.emit;return{onInput:function(dd){var hd;ud("change",(hd=dd.target)===null||hd===void 0?void 0:hd.value)},valueStyle:computed(function(){return{minWidth:"".concat(Ra.width,"px"),maxWidth:"".concat(Ra.width,"px"),width:"".concat(Ra.width,"px")}}),onFocus:function(){ud("focus")},onBlur:function(){ud("blur")},onEnter:function(){ud("enter")},onFormatChange:function(dd){ud("formatChange",dd)}}}}),ie={class:"input"},ce$1=[".value"];function le(Ra,ed){var ud=Object.keys(Ra);if(Object.getOwnPropertySymbols){var dd=Object.getOwnPropertySymbols(Ra);ed&&(dd=dd.filter(function(hd){return Object.getOwnPropertyDescriptor(Ra,hd).enumerable})),ud.push.apply(ud,dd)}return ud}function ue(Ra){for(var ed=1;ed0?parseFloat(dd.toFixed(2)):dd),ed){case"hsl":var Cd=se(md,gd/100,yd/100);return"hsla(".concat(md.toFixed(0),", ").concat(Math.round(100*Cd[1]),"%, ").concat(Math.round(100*Cd[2]),"%, ").concat(vd,")");case"hsv":return"hsva(".concat(md.toFixed(0),", ").concat(Math.round(gd),"%, ").concat(Math.round(yd),"%, ").concat(vd,")");case"rgb":var wd=he(md,gd,yd),Nd=wd.r,Ld=wd.g,Ud=wd.b;return"rgba(".concat(Nd,", ").concat(Ld,", ").concat(Ud,", ").concat(vd,")");default:return"".concat(pe(he(md,gd,yd))).concat(de(255*vd))}else switch(ed){case"hsl":var jd=se(md,gd/100,yd/100);return"hsl(".concat(md.toFixed(0),", ").concat(Math.round(100*jd[1]),"%, ").concat(Math.round(100*jd[2]),"%)");case"hsv":return"hsv(".concat(md.toFixed(0),", ").concat(Math.round(gd),"%, ").concat(Math.round(yd),"%)");case"rgb":var Gd=he(md,gd,yd),Yd=Gd.r,zd=Gd.g,qd=Gd.b;return"rgb(".concat(Yd,", ").concat(zd,", ").concat(qd,")");default:return pe(he(md,gd,yd))}},ge=function(Ra){var ed=Ra.r,ud=Ra.g,dd=Ra.b;ed=ve(ed,255),ud=ve(ud,255),dd=ve(dd,255);var hd,md=Math.max(ed,ud,dd),gd=Math.min(ed,ud,dd),yd=md,vd=md-gd,Cd=md===0?0:vd/md;if(md===gd)hd=0;else{switch(md){case ed:hd=(ud-dd)/vd+(ud2&&arguments[2]!==void 0)||arguments[2])switch(ed){case"rgb":var ud=we(Ra),dd=ud.r,hd=ud.g,md=ud.b,gd=ud.a;return ue(ue({},ge({r:dd,g:hd,b:md})),{},{a:+gd});case"hsv":var yd=ke(Ra);return{h:yd.h,s:yd.s,v:yd.v,a:yd.a};case"hsl":var vd=Se(Ra),Cd=vd.h,wd=vd.s,Nd=vd.l,Ld=vd.a;return ue(ue({},ye({h:Cd,s:wd,l:Nd})),{},{a:+Ld});default:var Ud=be$1(Ra),jd=Ud.r,Gd=Ud.g,Yd=Ud.b,zd=Ud.a;return ue(ue({},ge({r:jd,g:Gd,b:Yd})),{},{a:zd/255})}else switch(ed){case"rgb":return ue(ue({},ge(we(Ra))),{},{a:1});case"hsv":var qd=ke(Ra);return{h:qd.h,s:qd.s,v:qd.v,a:1};case"hsl":return ue(ue({},ye(Se(Ra))),{},{a:1});default:return ue(ue({},ge(be$1(Ra))),{},{a:1})}},Oe=function(Ra){return Ra.match(/^#/)?"hex":Ra.match(/^rgb/)?"rgb":Ra.match(/^hsl/)?"hsl":Ra.match(/^hsv/)?"hsv":"hex"},Ee=function(Ra){var ed=Ra.h,ud=Ra.s,dd=Ra.v,hd=Ra.a;return isNaN(ed)&&isNaN(ud)&&isNaN(dd)?null:(isNaN(ed)&&(ed=0),isNaN(ud)&&(ud=0),isNaN(dd)&&(dd=0),isNaN(hd)&&(hd=1),{h:ed,s:ud,v:dd,a:hd})},Ae=defineComponent({name:"ColorItem",props:{size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},value:{type:String,default:""},border:{type:Boolean,default:!0},borderRadius:{type:Number,default:5},selected:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1}},emits:["select"],setup:function(Ra){var ed=ref$1(),ud=inject("theme",{theme:"light"}).theme,dd=computed(function(){return parseFloat((Ra.width||Ra.size)+"")}),hd=computed(function(){return parseFloat((Ra.height||Ra.size)+"")}),md=computed(function(){return{width:"".concat(unref(dd),"px"),height:"".concat(unref(hd),"px"),border:Ra.border?"1px solid ".concat(unref(ud)==="dark"?"#434345":"#d9d9d9"):"",borderRadius:"".concat(Ra.borderRadius,"px"),boxShadow:Ra.selected?"0 0 3px 2px ".concat(unref(ud)==="dark"?"#2681ff":"#1890ff"):""}}),gd=function(){var yd=ed.value.getContext("2d");ed.value.width=unref(dd),ed.value.height=unref(hd);var vd=function(Cd){var wd=document.createElement("canvas"),Nd=wd.getContext("2d"),Ld=2*Cd;return wd.width=Ld,wd.height=Ld,Nd.fillStyle="#ffffff",Nd.fillRect(0,0,Ld,Ld),Nd.fillStyle="#ccd5db",Nd.fillRect(0,0,Cd,Cd),Nd.fillRect(Cd,Cd,Cd,Cd),wd}(5);yd.fillStyle=yd.createPattern(vd,"repeat"),yd.fillRect(0,0,unref(dd),unref(hd)),yd.fillStyle=Ra.value,yd.fillRect(0,0,unref(dd),unref(hd))};return watch(function(){return Ra.value},function(){gd()}),onMounted(function(){gd()}),{canvas:ed,colorItemStyle:md}}}),Ne=["draggable"];V$1(".color-item[data-v-02da71fd]{display:inline-block;vertical-align:top}"),Ae.render=function(Ra,ed,ud,dd,hd,md){return openBlock(),createElementBlock("canvas",{class:"color-item",style:normalizeStyle(Ra.colorItemStyle),ref:"canvas",draggable:Ra.draggable},null,12,Ne)},Ae.__scopeId="data-v-02da71fd",Ae.__file="src/color-item/ColorItem.vue";var Ie=defineComponent({name:"Colors",components:{ColorItem:Ae},props:{colors:{type:Array,default:function(){return[]}},selectedIndex:{type:Number,default:-1}},emits:["change"],setup:function(Ra,ed){var ud=ed.emit;return{onSelectColor:function(dd,hd){ud("change",dd,hd)},useColors:computed(function(){return Ra.colors.map(function(dd){return xe(dd,"hex",!0)})})}}}),Fe={class:"colors"};function _e$1(Ra,ed){var ud=Object.keys(Ra);if(Object.getOwnPropertySymbols){var dd=Object.getOwnPropertySymbols(Ra);ed&&(dd=dd.filter(function(hd){return Object.getOwnPropertyDescriptor(Ra,hd).enumerable})),ud.push.apply(ud,dd)}return ud}function Le(Ra){for(var ed=1;ed0?(openBlock(),createBlock(wd,{key:0,class:"colors",colors:Ra.colors,"selected-index":Ra.selectColorIndex,onChange:Ra.onSelectColor},null,8,["colors","selected-index","onChange"])):createCommentVNode("v-if",!0)])],4)},Pe.__scopeId="data-v-6ceadec6",Pe.__file="src/picker/Picker.vue";var Be=defineComponent({name:"AddColorItem",props:{size:{type:Number,default:20},selected:{type:Boolean,default:!1}},setup:function(Ra){var ed=inject("theme",{theme:"light"}).theme;return{addColorItemStyle:computed(function(){return{width:"".concat(Ra.size,"px"),height:"".concat(Ra.size,"px"),lineHeight:"".concat(Ra.size,"px"),boxShadow:Ra.selected?"0 0 3px 2px ".concat(unref(ed)==="dark"?"#2681ff":"#1890ff"):""}})}}});V$1(".add-color-item[data-v-ceb1719c]{background:#fff;border:1px solid #d9d9d9;border-radius:5px;vertical-align:top}.container[data-v-ceb1719c]{pointer-events:none;transform:scale(.9);transform-origin:center}[pick-colors-theme=dark] .add-color-item[data-v-ceb1719c]{background:#141414;border:1px solid #434343}path[data-v-ceb1719c]{fill:#000}[pick-colors-theme=dark] path[data-v-ceb1719c]{fill:#fff}"),Be.render=function(Ra,ed,ud,dd,hd,md){return openBlock(),createElementBlock("svg",{class:"add-color-item",style:normalizeStyle(Ra.addColorItemStyle),viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},ed[0]||(ed[0]=[createBaseVNode("g",{class:"container"},[createBaseVNode("path",{d:"M544 464V160h-80v304H160v80h304v304h80V544h304v-80z"})],-1)]),4)},Be.__scopeId="data-v-ceb1719c",Be.__file="src/add-color-item/AddColorItem.vue";var Re=defineComponent({name:"ColorPicker",components:{ColorItem:Ae,Picker:Pe,AddColorItem:Be},props:{value:{type:[String,Array]},theme:{type:String,default:"light"},size:{type:[Number,String],default:20},width:{type:[Number,String]},height:{type:[Number,String]},format:{type:String},showPicker:{type:Boolean,default:void 0},showAlpha:{type:Boolean,default:!1},addColor:{type:Boolean,default:!1},deleteColor:{type:Boolean,default:!0},max:{type:Number,default:13},popupContainer:{type:[String,Object,Boolean],default:"body"},zIndex:{type:Number,default:1e3},colors:{type:Array,default:function(){return["#ff4500","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","#ff4500","#ff7d4d","#00babd","#1f93ff","#fa64c3"]}},position:{type:String},placement:{type:String},formatOptions:{type:[Boolean,Array],default:!1}},emits:["change","update:value","update:showPicker","overflowMax","closePicker","formatChange"],setup:function(Ra,ed){var ud=ed.emit,dd=ref$1([]),hd=computed(function(){return unref(dd).map(function(_f){return xe(_f,"hex",Ra.showAlpha)})}),md=ref$1("hex");watch(function(){return Ra.format},function(){md.value=Ra.format},{immediate:!0}),watch(function(){return Ra.value},function(){var _f=Ra.value||"",vf=Array.isArray(_f)?_f:[_f];dd.value=vf.map(function(gf){return xe(gf,unref(md),Ra.showAlpha)})},{immediate:!0});var gd=ref$1(void 0),yd=computed(function(){return unref(dd)[unref(gd)]}),vd=ref$1(!1);watch(function(){return Ra.showPicker},function(){vd.value=Ra.showPicker},{immediate:!0});var Cd,wd,Nd=ref$1(null),Ld=ref$1(null),Ud=ee(Nd,Ld,{defaultStyle:{zIndex:Ra.zIndex},strategy:Ra.position,placement:Ra.placement}).style,jd=function(){unref(Nd)==null&&(Nd.value=unref(xf)[0]),unref(gd)==null&&(gd.value=0),Ra.showPicker===void 0?vd.value=!0:ud("update:showPicker",!0)},Gd=function(){gd.value=void 0,Ra.showPicker===void 0?vd.value=!1:ud("update:showPicker",!1),ud("closePicker",toRaw(Array.isArray(Ra.value)||Ra.addColor?unref(dd):unref(dd)[0]))},Yd=ref$1(),zd=function(){var _f=j$1(z$1.mark(function vf(gf){var Af,Df,Of,Cf;return z$1.wrap(function(If){for(;;)switch(If.prev=If.next){case 0:if(Df=gf.target,(Of=(Af=Df.dataset)===null||Af===void 0?void 0:Af.index)!=null&&Of!==""){If.next=4;break}return If.abrupt("return");case 4:if(Cf=+Of,unref(gd)!==Cf){If.next=7;break}return If.abrupt("return");case 7:unref(gd)!=null&&unref(gd)!==Cf?(Gd(),Cd&&clearTimeout(Cd),Cd=setTimeout(function(){jd(),clearTimeout(Cd)},100)):jd(),gd.value=Cf,Nd.value=Df;case 10:case"end":return If.stop()}},vf)}));return function(vf){return _f.apply(this,arguments)}}(),qd=function(){var _f=j$1(z$1.mark(function vf(gf){var Af,Df,Of,Cf,If;return z$1.wrap(function(Ff){for(;;)switch(Ff.prev=Ff.next){case 0:if(Cf=gf.target,!(!((Af=unref(Yd))!==null&&Af!==void 0&&Af.isEqualNode(Cf))&&(!((Df=unref(Yd))===null||Df===void 0)&&Df.contains(Cf)))){Ff.next=4;break}return Ff.abrupt("return");case 4:if(If=(Of=unref(Ld))===null||Of===void 0?void 0:Of.$el,!(If!=null&&If.contains(Cf))){Ff.next=8;break}return Ff.abrupt("return");case 8:wd&&clearTimeout(wd),wd=setTimeout(function(){unref(vd)&&Gd()},0);case 10:case"end":return Ff.stop()}},vf)}));return function(vf){return _f.apply(this,arguments)}}();watch(vd,function(){unref(vd)&&(jd(),clearTimeout(wd))});var Wd,Xd=ref$1(Ra.max>unref(dd).length),Jd=computed(function(){return typeof Ra.popupContainer=="string"||L$1(Ra.popupContainer)==="object"&&Ra.popupContainer!=null?Ra.popupContainer:"body"}),Zd=computed(function(){return typeof Ra.popupContainer=="boolean"&&Ra.popupContainer===!1}),mf=computed(function(){return Ra.theme});watch(function(){return[Ra.theme,unref(Ld)]},function(){nextTick$1(function(){var _f,vf;(_f=unref(Yd))===null||_f===void 0||_f.setAttribute("pick-colors-theme",unref(mf)),(vf=unref(Ld))===null||vf===void 0||(vf=vf.$el)===null||vf===void 0||vf.setAttribute("pick-colors-theme",unref(mf))})},{immediate:!0}),provide("theme",{theme:mf});var xf=ref$1([]);return onMounted(function(){document.addEventListener("mouseup",qd,!1),Ra.showPicker&&jd()}),onUnmounted(function(){document.removeEventListener("mouseup",qd,!1),Cd&&(clearTimeout(Cd),Cd=null),wd&&(clearTimeout(wd),wd=null)}),{valueList:dd,colorItemSelected:function(_f){return(Ra.addColor?unref(dd).length>0:unref(dd).length>1)&&unref(gd)===_f},selectedColor:yd,selectedIndex:gd,isShowPicker:vd,addColorItemShow:Xd,onPickerChange:function(_f){var vf=unref(gd),gf=unref(dd).slice(),Af=unref(dd).length;if(vf!=null){vf>=0?gf[vf]=_f:(gd.value=Af,gf.push(_f));var Df="";Df=Array.isArray(Ra.value)||Ra.addColor?gf:_f,dd.value=Array.isArray(Df)?Df:[Df],ud("update:value",Df),ud("change",Df,_f,vf),Ra.addColor&&Af>=Ra.max&&(Xd.value=!1,ud("overflowMax"))}},colorPicker:Yd,onColorClick:zd,pickerRef:Ld,onColorItemDragStart:function(_f){_f.dataTransfer.effectAllowed="move";var vf=_f.target;Wd=+vf.dataset.index},onColorItemDragOver:function(_f){},onColorItemDrop:function(_f){var vf=+_f.target.dataset.index,gf=_$1(unref(dd)),Af=gf[Wd];gf.splice(Wd,1);var Df=gf.slice(0,vf),Of=gf.splice(vf),Cf=Df.concat([Af]).concat(Of);ud("update:value",Cf),ud("change",Cf,Cf[Wd],Wd)},colorItemsRef:xf,pickerStyle:Ud,values:hd,teleportDisabled:Zd,toPopupContainer:Jd,formatValue:md,onFormatChange:function(_f){md.value=_f,ud("formatChange",_f)}}}});V$1(".color-picker[data-v-3c43ade8]{display:inline-block}.color-item[data-v-3c43ade8]{margin:5px}.add-color-item[data-v-3c43ade8]{display:inline-block;margin:5px}.picker[data-v-3c43ade8]{overflow:hidden}.v-enter-active[data-v-3c43ade8],.v-leave-active[data-v-3c43ade8]{opacity:1;transform:scaleY(1);transform-origin:center top;transition:opacity .2s ease-in-out,transform .2s ease-in-out}.v-enter-from[data-v-3c43ade8],.v-leave-to[data-v-3c43ade8]{opacity:0;transform:scaleY(0)}"),Re.render=function(Ra,ed,ud,dd,hd,md){var gd=resolveComponent("color-item"),yd=resolveComponent("add-color-item"),vd=resolveComponent("picker");return openBlock(),createElementBlock("div",{class:"color-picker",ref:"colorPicker",onDragstart:ed[0]||(ed[0]=withModifiers(function(){return Ra.onColorItemDragStart&&Ra.onColorItemDragStart.apply(Ra,arguments)},["stop"])),onDragover:ed[1]||(ed[1]=withModifiers(function(){return Ra.onColorItemDragOver&&Ra.onColorItemDragOver.apply(Ra,arguments)},["prevent","stop"])),onDrop:ed[2]||(ed[2]=withModifiers(function(){return Ra.onColorItemDrop&&Ra.onColorItemDrop.apply(Ra,arguments)},["prevent","stop"])),onClick:ed[3]||(ed[3]=withModifiers(function(){return Ra.onColorClick&&Ra.onColorClick.apply(Ra,arguments)},["stop"]))},[(openBlock(!0),createElementBlock(Fragment,null,renderList(Ra.values,function(Cd,wd){return openBlock(),createBlock(gd,{class:"color-item",key:wd,ref_for:!0,ref:function(Nd){return Ra.colorItemsRef[wd]=Nd},size:Ra.size,width:Ra.width,height:Ra.height,value:Cd,selected:Ra.colorItemSelected(wd),"data-index":wd,draggable:Ra.valueList.length>1,format:Ra.formatValue},null,8,["size","width","height","value","selected","data-index","draggable","format"])}),128)),Ra.addColor&&Ra.addColorItemShow?(openBlock(),createBlock(yd,{key:0,class:"add-color-item",ref:"addColorItem",selected:Ra.colorItemSelected(-1),"data-index":-1},null,8,["selected"])):createCommentVNode("v-if",!0),(openBlock(),createBlock(Teleport,{to:Ra.toPopupContainer,disabled:Ra.teleportDisabled},[createVNode(Transition$1,null,{default:withCtx(function(){return[Ra.isShowPicker?(openBlock(),createBlock(vd,{key:0,class:"picker",style:normalizeStyle(Ra.pickerStyle),ref:"pickerRef",value:Ra.selectedColor,format:Ra.formatValue,"show-alpha":Ra.showAlpha,colors:Ra.colors,formatOptions:Ra.formatOptions,onChange:Ra.onPickerChange,onFormatChange:Ra.onFormatChange},null,8,["style","value","format","show-alpha","colors","formatOptions","onChange","onFormatChange"])):createCommentVNode("v-if",!0)]}),_:1})],8,["to","disabled"]))],544)},Re.__scopeId="data-v-3c43ade8",Re.__file="src/ColorPicker.vue";const _hoisted_1$8={class:"space-y-2"},_hoisted_2$5={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_3$4={class:"space-y-2"},_hoisted_4$4={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_5$3={class:"space-y-2"},_hoisted_6$3={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_7$1={class:"space-y-2"},_hoisted_8$1={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_9={class:"space-y-2"},_hoisted_10={class:"space-y-2"},_hoisted_11={class:"space-y-2"},_hoisted_12={class:"grid grid-cols-3 justify-items-center gap-2"},_hoisted_13={class:"space-y-2"},_hoisted_14={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_15={class:"space-y-2"},_hoisted_16={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_17={class:"space-y-2"},_hoisted_18={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_19={class:"space-y-2"},_hoisted_20={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_21={class:"space-y-2"},_hoisted_22={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_23={class:"space-y-2"},_hoisted_24={class:"grid grid-cols-5 justify-items-center gap-2"},_hoisted_25={class:"space-y-2"},_sfc_main$R=defineComponent({__name:"RightSlider",setup(Ra){const ed=useStore(),ud=useDisplayStore(),{isDark:dd,primaryColor:hd}=storeToRefs(ed);function md(){ud.toggleShowCssEditor(),setTimeout(()=>{ed.cssEditor.refresh()},50)}const gd=ref$1(!1),yd=ref$1("");watch(gd,()=>{gd.value&&(yd.value="")});const vd=useTemplateRef("pickColorsContainer"),Cd=ref$1("rgb"),wd=ref$1(["rgb","hex","hsl","hsv"]);return(Nd,Ld)=>{const Ud=_sfc_main$1o,jd=_sfc_main$W,Gd=_sfc_main$X,Yd=_sfc_main$_,zd=_sfc_main$V,qd=_sfc_main$$;return openBlock(),createElementBlock("div",{class:normalizeClass(["overflow-hidden border-l-2 border-gray/20 bg-white transition-width duration-300 dark:bg-[#191c20]",{"w-0 border-l-0":!unref(ed).isOpenRightSlider,"w-100":unref(ed).isOpenRightSlider}]),style:{"z-index":"999"}},[createBaseVNode("div",{class:normalizeClass(["space-y-4 h-full overflow-auto p-4 transition-transform",{"translate-x-0":unref(ed).isOpenRightSlider,"translate-x-full":!unref(ed).isOpenRightSlider}])},[createBaseVNode("div",_hoisted_1$8,[Ld[14]||(Ld[14]=createBaseVNode("h2",null,"主题",-1)),createBaseVNode("div",_hoisted_2$5,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(themeOptions),({label:Wd,value:Xd})=>(openBlock(),createBlock(Ud,{key:Xd,class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).theme===Xd}]),variant:"outline",onClick:Jd=>unref(ed).themeChanged(Xd)},{default:withCtx(()=>[createTextVNode(toDisplayString(Wd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_3$4,[Ld[15]||(Ld[15]=createBaseVNode("h2",null,"字体",-1)),createBaseVNode("div",_hoisted_4$4,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fontFamilyOptions),({label:Wd,value:Xd})=>(openBlock(),createBlock(Ud,{key:Xd,variant:"outline",class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).fontFamily===Xd}]),onClick:Jd=>unref(ed).fontChanged(Xd)},{default:withCtx(()=>[createTextVNode(toDisplayString(Wd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_5$3,[Ld[16]||(Ld[16]=createBaseVNode("h2",null,"字号",-1)),createBaseVNode("div",_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(fontSizeOptions),({value:Wd,desc:Xd})=>(openBlock(),createBlock(Ud,{key:Wd,variant:"outline",class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).fontSize===Wd}]),onClick:Jd=>unref(ed).sizeChanged(Wd)},{default:withCtx(()=>[createTextVNode(toDisplayString(Xd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_7$1,[Ld[17]||(Ld[17]=createBaseVNode("h2",null,"主题色",-1)),createBaseVNode("div",_hoisted_8$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(colorOptions),({label:Wd,value:Xd})=>(openBlock(),createBlock(Ud,{key:Xd,class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).primaryColor===Xd}]),variant:"outline",onClick:Jd=>unref(ed).colorChanged(Xd)},{default:withCtx(()=>[createBaseVNode("span",{class:"mr-2 inline-block h-4 w-4 rounded-full",style:normalizeStyle({background:Xd})},null,4),createTextVNode(" "+toDisplayString(Wd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_9,[Ld[18]||(Ld[18]=createBaseVNode("h2",null,"自定义主题色",-1)),createBaseVNode("div",{ref_key:"pickColorsContainer",ref:vd},[unref(vd)?(openBlock(),createBlock(unref(Re),{key:0,value:unref(hd),"onUpdate:value":Ld[0]||(Ld[0]=Wd=>isRef(hd)?hd.value=Wd:null),"show-alpha":"",format:unref(Cd),"format-options":unref(wd),theme:unref(ed).isDark?"dark":"light","popup-container":unref(vd),onChange:unref(ed).colorChanged},null,8,["value","format","format-options","theme","popup-container","onChange"])):createCommentVNode("",!0)],512)]),createBaseVNode("div",_hoisted_10,[Ld[19]||(Ld[19]=createBaseVNode("h2",null,"代码块主题",-1)),createBaseVNode("div",null,[createVNode(qd,{modelValue:unref(ed).codeBlockTheme,"onUpdate:modelValue":[Ld[1]||(Ld[1]=Wd=>unref(ed).codeBlockTheme=Wd),unref(ed).codeBlockThemeChanged]},{default:withCtx(()=>[createVNode(Gd,null,{default:withCtx(()=>[createVNode(jd,{placeholder:"Select a fruit"})]),_:1}),createVNode(zd,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(codeBlockThemeOptions),({label:Wd,value:Xd})=>(openBlock(),createBlock(Yd,{key:Wd,value:Xd},{default:withCtx(()=>[createTextVNode(toDisplayString(Wd),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["modelValue","onUpdate:modelValue"])])]),createBaseVNode("div",_hoisted_11,[Ld[20]||(Ld[20]=createBaseVNode("h2",null,"图注格式",-1)),createBaseVNode("div",_hoisted_12,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(legendOptions),({label:Wd,value:Xd})=>(openBlock(),createBlock(Ud,{key:Xd,class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).legend===Xd}]),variant:"outline",onClick:Jd=>unref(ed).legendChanged(Xd)},{default:withCtx(()=>[createTextVNode(toDisplayString(Wd),1)]),_:2},1032,["class","onClick"]))),128))])]),createBaseVNode("div",_hoisted_13,[Ld[23]||(Ld[23]=createBaseVNode("h2",null,"Mac 代码块",-1)),createBaseVNode("div",_hoisted_14,[createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).isMacCodeBlock}]),variant:"outline",onClick:Ld[2]||(Ld[2]=Wd=>!unref(ed).isMacCodeBlock&&unref(ed).macCodeBlockChanged())},{default:withCtx(()=>Ld[21]||(Ld[21]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(ed).isMacCodeBlock}]),variant:"outline",onClick:Ld[3]||(Ld[3]=Wd=>unref(ed).isMacCodeBlock&&unref(ed).macCodeBlockChanged())},{default:withCtx(()=>Ld[22]||(Ld[22]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_15,[Ld[26]||(Ld[26]=createBaseVNode("h2",null,"微信外链转底部引用",-1)),createBaseVNode("div",_hoisted_16,[createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).isCiteStatus}]),variant:"outline",onClick:Ld[4]||(Ld[4]=Wd=>!unref(ed).isCiteStatus&&unref(ed).citeStatusChanged())},{default:withCtx(()=>Ld[24]||(Ld[24]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(ed).isCiteStatus}]),variant:"outline",onClick:Ld[5]||(Ld[5]=Wd=>unref(ed).isCiteStatus&&unref(ed).citeStatusChanged())},{default:withCtx(()=>Ld[25]||(Ld[25]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_17,[Ld[29]||(Ld[29]=createBaseVNode("h2",null,"段落首行缩进",-1)),createBaseVNode("div",_hoisted_18,[createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).isUseIndent}]),variant:"outline",onClick:Ld[6]||(Ld[6]=Wd=>!unref(ed).isUseIndent&&unref(ed).useIndentChanged())},{default:withCtx(()=>Ld[27]||(Ld[27]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(ed).isUseIndent}]),variant:"outline",onClick:Ld[7]||(Ld[7]=Wd=>unref(ed).isUseIndent&&unref(ed).useIndentChanged())},{default:withCtx(()=>Ld[28]||(Ld[28]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_19,[Ld[32]||(Ld[32]=createBaseVNode("h2",null,"自定义 CSS 面板",-1)),createBaseVNode("div",_hoisted_20,[createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ud).isShowCssEditor}]),variant:"outline",onClick:Ld[8]||(Ld[8]=Wd=>!unref(ud).isShowCssEditor&&md())},{default:withCtx(()=>Ld[30]||(Ld[30]=[createTextVNode(" 开启 ")])),_:1},8,["class"]),createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(ud).isShowCssEditor}]),variant:"outline",onClick:Ld[9]||(Ld[9]=Wd=>unref(ud).isShowCssEditor&&md())},{default:withCtx(()=>Ld[31]||(Ld[31]=[createTextVNode(" 关闭 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_21,[Ld[35]||(Ld[35]=createBaseVNode("h2",null,"编辑区位置",-1)),createBaseVNode("div",_hoisted_22,[createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(ed).isEditOnLeft}]),variant:"outline",onClick:Ld[10]||(Ld[10]=Wd=>!unref(ed).isEditOnLeft&&unref(ed).toggleEditOnLeft())},{default:withCtx(()=>Ld[33]||(Ld[33]=[createTextVNode(" 左侧 ")])),_:1},8,["class"]),createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(ed).isEditOnLeft}]),variant:"outline",onClick:Ld[11]||(Ld[11]=Wd=>unref(ed).isEditOnLeft&&unref(ed).toggleEditOnLeft())},{default:withCtx(()=>Ld[34]||(Ld[34]=[createTextVNode(" 右侧 ")])),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_23,[Ld[36]||(Ld[36]=createBaseVNode("h2",null,"模式",-1)),createBaseVNode("div",_hoisted_24,[createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":!unref(dd)}]),variant:"outline",onClick:Ld[12]||(Ld[12]=Wd=>unref(ed).toggleDark(!1))},{default:withCtx(()=>[createVNode(unref(Sun),{class:"h-4 w-4"})]),_:1},8,["class"]),createVNode(Ud,{class:normalizeClass(["w-full",{"border-black dark:border-white":unref(dd)}]),variant:"outline",onClick:Ld[13]||(Ld[13]=Wd=>unref(ed).toggleDark(!0))},{default:withCtx(()=>[createVNode(unref(Moon),{class:"h-4 w-4"})]),_:1},8,["class"])])]),createBaseVNode("div",_hoisted_25,[Ld[38]||(Ld[38]=createBaseVNode("h2",null,"样式配置",-1)),createVNode(Ud,{onClick:unref(ed).resetStyleConfirm},{default:withCtx(()=>Ld[37]||(Ld[37]=[createTextVNode(" 重置 ")])),_:1},8,["onClick"])])],2)],2)}}}),_sfc_main$Q=defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(Iu$3),mergeProps(unref(dd),{class:unref(cn$4)("text-sm text-muted-foreground",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_hoisted_1$7={class:"cssEditor-wrapper h-full flex flex-col border-l-2 border-gray/50"},_sfc_main$P=defineComponent({__name:"CssEditor",setup(Ra){const ed=useStore(),ud=useDisplayStore(),dd=ref$1(!1),hd=ref$1(""),md=ref$1(["",ed.cssContentConfig.active]);function gd(zd){hd.value=zd,dd.value=!0}function yd(){if(!hd.value.trim()){Ke.error("新建失败,方案名不可为空");return}if(!ed.validatorTabName(hd.value)){Ke.error("不能与现有方案重名");return}ed.renameTab(hd.value),dd.value=!1,Ke.success("修改成功~")}const vd=ref$1(!1),Cd=ref$1("");function wd(){if(!Cd.value.trim()){Ke.error("新建失败,方案名不可为空");return}if(!ed.validatorTabName(Cd.value)){Ke.error("不能与现有方案重名");return}ed.addCssContentTab(Cd.value),vd.value=!1,ed.cssContentConfig.active=Cd.value,md.value=[md.value[1],Cd.value],Ke.success("新建成功~")}const Nd=ref$1(!1),Ld=ref$1("");function Ud(zd){Ld.value=zd,Nd.value=!0}function jd(){const zd=ed.cssContentConfig.tabs;if(zd.length===1){Ke.warning("至少保留一个方案");return}let qd=ed.cssContentConfig.active;qd===Ld.value&&zd.forEach((Wd,Xd)=>{if(Wd.name===Ld.value){const Jd=zd[Xd+1]||zd[Xd-1];Jd&&(qd=Jd.name)}}),ed.tabChanged(qd),ed.cssContentConfig.tabs=zd.filter(Wd=>Wd.name!==Ld.value),Ke.success("删除成功~")}function Gd(){Cd.value=`方案${ed.cssContentConfig.tabs.length+1}`,vd.value=!0}function Yd(zd){if(zd==="add"){ed.cssContentConfig.active=md.value[1],Gd();return}md.value=[md.value[1],zd],ed.tabChanged(zd)}return(zd,qd)=>{const Wd=_sfc_main$T,Xd=_sfc_main$U,Jd=_sfc_main$14,Zd=_sfc_main$16,mf=_sfc_main$Q,xf=_sfc_main$17,_f=_sfc_main$1e,vf=_sfc_main$1o,gf=_sfc_main$1f,Af=_sfc_main$1g,Df=_sfc_main$1h,Of=_sfc_main$1j,Cf=_sfc_main$1k,If=_sfc_main$1l,Ff=_sfc_main$1m,sh=_sfc_main$1n,Sh=_sfc_main$1p,yh=_sfc_main$1q,Mh=_sfc_main$1r;return openBlock(),createBlock(Transition$1,{"enter-active-class":"bounceInRight"},{default:withCtx(()=>[withDirectives(createBaseVNode("div",_hoisted_1$7,[createVNode(Jd,{modelValue:unref(ed).cssContentConfig.active,"onUpdate:modelValue":[qd[0]||(qd[0]=lh=>unref(ed).cssContentConfig.active=lh),Yd]},{default:withCtx(()=>[createVNode(Xd,{class:"w-full overflow-x-auto"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(ed).cssContentConfig.tabs,lh=>(openBlock(),createBlock(Wd,{key:lh.name,value:lh.name,class:"flex-1"},{default:withCtx(()=>[createTextVNode(toDisplayString(lh.title)+" ",1),withDirectives(createVNode(unref(PenLine),{class:"inline size-4 rounded-full p-0.5 transition-color hover:bg-gray-200 dark:hover:bg-gray-600",onClick:rh=>gd(lh.name)},null,8,["onClick"]),[[vShow,unref(ed).cssContentConfig.active===lh.name]]),withDirectives(createVNode(unref(X$6),{class:"inline size-4 rounded-full p-0.5 transition-color hover:bg-gray-200 dark:hover:bg-gray-600",onClick:withModifiers(rh=>Ud(lh.name),["self"])},null,8,["onClick"]),[[vShow,unref(ed).cssContentConfig.active===lh.name]])]),_:2},1032,["value"]))),128)),createVNode(Wd,{value:"add"},{default:withCtx(()=>[createVNode(unref(Plus),{class:"h-5 w-5"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),qd[21]||(qd[21]=createBaseVNode("textarea",{id:"cssEditor",type:"textarea",placeholder:"Your custom css here."},null,-1)),createVNode(Df,{open:unref(vd),"onUpdate:open":qd[4]||(qd[4]=lh=>isRef(vd)?vd.value=lh:null)},{default:withCtx(()=>[createVNode(Af,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(xf,null,{default:withCtx(()=>[createVNode(Zd,null,{default:withCtx(()=>qd[9]||(qd[9]=[createTextVNode("新建自定义 CSS")])),_:1}),createVNode(mf,null,{default:withCtx(()=>qd[10]||(qd[10]=[createTextVNode(" 请输入方案名称 ")])),_:1})]),_:1}),createVNode(_f,{modelValue:unref(Cd),"onUpdate:modelValue":qd[1]||(qd[1]=lh=>isRef(Cd)?Cd.value=lh:null)},null,8,["modelValue"]),createVNode(gf,null,{default:withCtx(()=>[createVNode(vf,{variant:"outline",onClick:qd[2]||(qd[2]=lh=>vd.value=!1)},{default:withCtx(()=>qd[11]||(qd[11]=[createTextVNode(" 取消 ")])),_:1}),createVNode(vf,{onClick:qd[3]||(qd[3]=lh=>wd())},{default:withCtx(()=>qd[12]||(qd[12]=[createTextVNode(" 保存 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(Df,{open:unref(dd),"onUpdate:open":qd[7]||(qd[7]=lh=>isRef(dd)?dd.value=lh:null)},{default:withCtx(()=>[createVNode(Af,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(xf,null,{default:withCtx(()=>[createVNode(Zd,null,{default:withCtx(()=>qd[13]||(qd[13]=[createTextVNode("编辑方案名称")])),_:1}),createVNode(mf,null,{default:withCtx(()=>qd[14]||(qd[14]=[createTextVNode(" 请输入新的方案名称 ")])),_:1})]),_:1}),createVNode(_f,{modelValue:unref(hd),"onUpdate:modelValue":qd[5]||(qd[5]=lh=>isRef(hd)?hd.value=lh:null)},null,8,["modelValue"]),createVNode(gf,null,{default:withCtx(()=>[createVNode(vf,{variant:"outline",onClick:qd[6]||(qd[6]=lh=>dd.value=!1)},{default:withCtx(()=>qd[15]||(qd[15]=[createTextVNode(" 取消 ")])),_:1}),createVNode(vf,{onClick:yd},{default:withCtx(()=>qd[16]||(qd[16]=[createTextVNode(" 保存 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(Mh,{open:unref(Nd),"onUpdate:open":qd[8]||(qd[8]=lh=>isRef(Nd)?Nd.value=lh:null)},{default:withCtx(()=>[createVNode(yh,null,{default:withCtx(()=>[createVNode(If,null,{default:withCtx(()=>[createVNode(Of,null,{default:withCtx(()=>qd[17]||(qd[17]=[createTextVNode("提示")])),_:1}),createVNode(Cf,null,{default:withCtx(()=>qd[18]||(qd[18]=[createTextVNode(" 此操作将删除该自定义方案,是否继续? ")])),_:1})]),_:1}),createVNode(Sh,null,{default:withCtx(()=>[createVNode(Ff,null,{default:withCtx(()=>qd[19]||(qd[19]=[createTextVNode("取消")])),_:1}),createVNode(sh,{onClick:jd},{default:withCtx(()=>qd[20]||(qd[20]=[createTextVNode(" 确认 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])],512),[[vShow,unref(ud).isShowCssEditor]])]),_:1})}}}),__unplugin_components_9=_export_sfc(_sfc_main$P,[["__scopeId","data-v-a83b50e8"]]),_sfc_main$O=defineComponent({__name:"BackTop",props:{left:{},top:{},right:{},bottom:{},visibilityHeight:{},target:{},onClick:{type:Function}},setup(Ra){const ed=Ra,ud=ref$1(ed.visibilityHeight??400),dd=ref$1(!1),hd=ref$1(null);function md(yd){var vd,Cd;console.log("scrollToTop"),(vd=hd.value)==null||vd.scrollTo({top:0,left:0,behavior:"smooth"}),(Cd=ed.onClick)==null||Cd.call(ed,yd)}const gd=throttle$1(yd=>{yd instanceof HTMLElement?dd.value=yd.scrollTop>ud.value:dd.value=window.scrollY>ud.value},200,{edges:["leading","trailing"]});return onMounted(()=>{ed.target?hd.value=document.getElementById(ed.target):hd.value=window,hd.value.addEventListener("scroll",()=>{gd(hd.value)})}),onUnmounted(()=>{hd.value.removeEventListener("scroll",()=>{gd(hd.value)})}),(yd,vd)=>{const Cd=_sfc_main$1o;return unref(dd)?(openBlock(),createBlock(Cd,{key:0,variant:"outline",size:"icon",class:"fixed z-50 rounded-full",style:normalizeStyle({left:`${yd.left}px`,top:`${yd.top}px`,right:`${yd.right}px`,bottom:`${yd.bottom}px`}),onClick:md},{default:withCtx(()=>[createVNode(unref(ArrowUpFromLine))]),_:1},8,["style"])):createCommentVNode("",!0)}}}),_sfc_main$N=defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(rm$1),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_sfc_main$M=defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(um),null,{default:withCtx(()=>[createVNode(unref(dm),mergeProps(unref(md),{class:unref(cn$4)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$L=defineComponent({__name:"ContextMenuShortcut",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn$4)("ml-auto text-xs tracking-widest text-muted-foreground",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$K=defineComponent({__name:"ContextMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(vm$1),mergeProps(ud.value,{class:unref(cn$4)("-mx-1 my-1 h-px bg-border",ed.class)}),null,16,["class"]))}}),_sfc_main$J=defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(fm),mergeProps(unref(md),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",gd.inset&&"pl-8",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$I=defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ud=Ot$3(Ra);return(dd,hd)=>(openBlock(),createBlock(unref(im),normalizeProps(guardReactiveProps(unref(ud))),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16))}}),_sfc_main$H=defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(uh),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_sfc_main$G=defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(ch$1),null,{default:withCtx(()=>[createVNode(unref(fh),mergeProps(unref(md),{class:unref(cn$4)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$F=defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(vh),mergeProps(unref(dd),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",hd.inset&&"pl-8",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$E=defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(Ra){const ud=Ot$3(Ra);return(dd,hd)=>(openBlock(),createBlock(unref(dh),mergeProps({class:"outline-none"},unref(ud)),{default:withCtx(()=>[renderSlot(dd.$slots,"default")]),_:3},16))}}),_sfc_main$D=defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(ou$3),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_hoisted_1$6=["onClick"],_hoisted_2$4={class:"line-clamp-1"},_sfc_main$C=defineComponent({__name:"PostSlider",setup(Ra){const ed=useStore(),ud=ref$1(!1),dd=ref$1("");watch(ud,()=>{ud.value&&(dd.value="")});function hd(){if(dd.value===""){Ke.error("内容标题不可为空");return}ed.addPost(dd.value),ud.value=!1,Ke.success("内容新增成功")}const md=ref$1(-1),gd=ref$1(!1),yd=ref$1("");function vd(Ud){md.value=Ud,yd.value=ed.posts[Ud].title,gd.value=!0}function Cd(){if(yd.value===""){Ke.error("内容标题不可为空");return}ed.renamePost(md.value,yd.value),gd.value=!1,Ke.success("内容重命名成功")}const wd=ref$1(!1);function Nd(Ud){md.value=Ud,wd.value=!0}function Ld(){ed.delPost(md.value),wd.value=!1,Ke.success("内容删除成功")}return(Ud,jd)=>{const Gd=_sfc_main$1o,Yd=_sfc_main$D,zd=_sfc_main$16,qd=_sfc_main$Q,Wd=_sfc_main$17,Xd=_sfc_main$1e,Jd=_sfc_main$1f,Zd=_sfc_main$1g,mf=_sfc_main$1h,xf=_sfc_main$E,_f=_sfc_main$F,vf=_sfc_main$G,gf=_sfc_main$H,Af=_sfc_main$1j,Df=_sfc_main$1k,Of=_sfc_main$1l,Cf=_sfc_main$1m,If=_sfc_main$1n,Ff=_sfc_main$1p,sh=_sfc_main$1q,Sh=_sfc_main$1r;return openBlock(),createElementBlock("div",{class:normalizeClass(["overflow-hidden bg-gray/20 transition-width duration-300 dark:bg-[#191c20]",{"w-0":!unref(ed).isOpenPostSlider,"w-50":unref(ed).isOpenPostSlider}])},[createBaseVNode("nav",{class:normalizeClass(["space-y-1 h-full overflow-auto border-r-2 border-gray/20 p-2 transition-transform",{"translate-x-100":unref(ed).isOpenPostSlider,"-translate-x-full":!unref(ed).isOpenPostSlider}])},[createVNode(mf,{open:unref(ud),"onUpdate:open":jd[2]||(jd[2]=yh=>isRef(ud)?ud.value=yh:null)},{default:withCtx(()=>[createVNode(Yd,{"as-child":""},{default:withCtx(()=>[createVNode(Gd,{variant:"outline",class:"w-full",size:"xs"},{default:withCtx(()=>[createVNode(unref(Plus)),jd[9]||(jd[9]=createTextVNode(" 新增内容 "))]),_:1})]),_:1}),createVNode(Zd,null,{default:withCtx(()=>[createVNode(Wd,null,{default:withCtx(()=>[createVNode(zd,null,{default:withCtx(()=>jd[10]||(jd[10]=[createTextVNode("新增内容")])),_:1}),createVNode(qd,null,{default:withCtx(()=>jd[11]||(jd[11]=[createTextVNode(" 请输入内容名称 ")])),_:1})]),_:1}),createVNode(Xd,{modelValue:unref(dd),"onUpdate:modelValue":jd[0]||(jd[0]=yh=>isRef(dd)?dd.value=yh:null)},null,8,["modelValue"]),createVNode(Jd,null,{default:withCtx(()=>[createVNode(Gd,{onClick:jd[1]||(jd[1]=yh=>hd())},{default:withCtx(()=>jd[12]||(jd[12]=[createTextVNode(" 确 定 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(ed).posts,(yh,Mh)=>(openBlock(),createElementBlock("a",{key:yh.title,href:"#",class:normalizeClass([{"bg-primary text-primary-foreground shadow-lg dark:border-1 border-primary":unref(ed).currentPostIndex===Mh,"dark:bg-gray/30 dark:text-primary-foreground-dark dark:border-primary-dark":unref(ed).currentPostIndex===Mh},"hover:bg-primary/90 hover:text-primary-foreground dark:hover:border-primary-dark h-8 w-full inline-flex items-center justify-start gap-2 whitespace-nowrap rounded px-2 text-sm transition-colors dark:text-white dark:hover:bg-gray/20 dark:hover:text-white"]),onClick:lh=>unref(ed).currentPostIndex=Mh},[createBaseVNode("span",_hoisted_2$4,toDisplayString(yh.title),1),createVNode(gf,null,{default:withCtx(()=>[createVNode(xf,{"as-child":""},{default:withCtx(()=>[createVNode(Gd,{size:"xs",variant:"ghost",class:"ml-auto px-1.5"},{default:withCtx(()=>[createVNode(unref(Ellipsis),{class:"size-4"})]),_:1})]),_:1}),createVNode(vf,null,{default:withCtx(()=>[createVNode(_f,{onClick:withModifiers(lh=>vd(Mh),["stop"])},{default:withCtx(()=>[createVNode(unref(PenLine),{class:"mr-2 size-4"}),jd[13]||(jd[13]=createTextVNode(" 重命名 "))]),_:2},1032,["onClick"]),unref(ed).posts.length>1?(openBlock(),createBlock(_f,{key:0,onClick:withModifiers(lh=>Nd(Mh),["stop"])},{default:withCtx(()=>[createVNode(unref(Trash),{class:"mr-2 size-4"}),jd[14]||(jd[14]=createTextVNode(" 删除 "))]),_:2},1032,["onClick"])):createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)],10,_hoisted_1$6))),128)),createVNode(mf,{open:unref(gd),"onUpdate:open":jd[6]||(jd[6]=yh=>isRef(gd)?gd.value=yh:null)},{default:withCtx(()=>[createVNode(Zd,{class:"sm:max-w-[425px]"},{default:withCtx(()=>[createVNode(Wd,null,{default:withCtx(()=>[createVNode(zd,null,{default:withCtx(()=>jd[15]||(jd[15]=[createTextVNode("编辑内容名称")])),_:1}),createVNode(qd,null,{default:withCtx(()=>jd[16]||(jd[16]=[createTextVNode(" 请输入新的内容名称 ")])),_:1})]),_:1}),createVNode(Xd,{modelValue:unref(yd),"onUpdate:modelValue":jd[3]||(jd[3]=yh=>isRef(yd)?yd.value=yh:null)},null,8,["modelValue"]),createVNode(Jd,null,{default:withCtx(()=>[createVNode(Gd,{variant:"outline",onClick:jd[4]||(jd[4]=yh=>gd.value=!1)},{default:withCtx(()=>jd[17]||(jd[17]=[createTextVNode(" 取消 ")])),_:1}),createVNode(Gd,{onClick:jd[5]||(jd[5]=yh=>Cd())},{default:withCtx(()=>jd[18]||(jd[18]=[createTextVNode(" 保存 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(Sh,{open:unref(wd),"onUpdate:open":jd[8]||(jd[8]=yh=>isRef(wd)?wd.value=yh:null)},{default:withCtx(()=>[createVNode(sh,null,{default:withCtx(()=>[createVNode(Of,null,{default:withCtx(()=>[createVNode(Af,null,{default:withCtx(()=>jd[19]||(jd[19]=[createTextVNode("提示")])),_:1}),createVNode(Df,null,{default:withCtx(()=>jd[20]||(jd[20]=[createTextVNode(" 此操作将删除该内容,是否继续? ")])),_:1})]),_:1}),createVNode(Ff,null,{default:withCtx(()=>[createVNode(Cf,null,{default:withCtx(()=>jd[21]||(jd[21]=[createTextVNode("取消")])),_:1}),createVNode(If,{onClick:jd[7]||(jd[7]=yh=>Ld())},{default:withCtx(()=>jd[22]||(jd[22]=[createTextVNode(" 确认 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])],2)],2)}}}),_hoisted_1$5={class:"mt-4"},_hoisted_2$3={key:0,class:"py-4 text-center"},_hoisted_3$3={key:1,class:"max-h-[400px] flex flex-col overflow-y-auto"},_hoisted_4$3={class:"mb-2 flex items-center gap-2"},_hoisted_5$2=["src"],_hoisted_6$2=["href"],_sfc_main$B=defineComponent({__name:"PostTaskDialog",props:{post:{},open:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed({get:()=>ud.open,set:vd=>dd("update:open",vd)}),md=ref$1(null),gd=ref$1(!1);async function yd(){var vd;if(ud.post)try{(vd=window.$syncer)==null||vd.addTask({post:{title:ud.post.title,content:ud.post.content,markdown:ud.post.markdown,thumb:ud.post.thumb,desc:ud.post.desc},accounts:ud.post.accounts.filter(Cd=>Cd.checked)},Cd=>{md.value=Cd},()=>{gd.value=!1})}catch(Cd){console.error("发布失败:",Cd)}}return watch(()=>ud.open,vd=>{vd&&yd()}),(vd,Cd)=>(openBlock(),createBlock(unref(_sfc_main$1h),{open:unref(hd),"onUpdate:open":Cd[0]||(Cd[0]=wd=>isRef(hd)?hd.value=wd:null)},{default:withCtx(()=>[createVNode(unref(_sfc_main$1g),null,{default:withCtx(()=>{var wd;return[createVNode(unref(_sfc_main$17),null,{default:withCtx(()=>[createVNode(unref(_sfc_main$16),null,{default:withCtx(()=>Cd[1]||(Cd[1]=[createTextVNode("提交发布任务")])),_:1})]),_:1}),createBaseVNode("div",_hoisted_1$5,[unref(md)?(openBlock(),createElementBlock("div",_hoisted_3$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList((wd=unref(md))==null?void 0:wd.accounts,Nd=>(openBlock(),createElementBlock("div",{key:Nd.uid+Nd.displayName,class:"border-b py-4 last:border-b-0"},[createBaseVNode("div",_hoisted_4$3,[Nd.icon?(openBlock(),createElementBlock("img",{key:0,src:Nd.icon,class:"object-cover h-5 w-5",alt:""},null,8,_hoisted_5$2)):createCommentVNode("",!0),createBaseVNode("span",null,toDisplayString(Nd.title)+" - "+toDisplayString(Nd.displayName||Nd.home),1)]),createBaseVNode("div",{class:normalizeClass(["w-full flex-1 gap-2 overflow-auto pl-7 text-sm",{"text-yellow-600":Nd.status==="uploading","text-red-600":Nd.status==="failed","text-green-600":Nd.status==="done"}])},[Nd.status==="uploading"?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(Nd.msg||"发布中"),1)],64)):createCommentVNode("",!0),Nd.status==="failed"?(openBlock(),createElementBlock(Fragment,{key:1},[createTextVNode(" 同步失败, 错误内容:"+toDisplayString(Nd.error),1)],64)):createCommentVNode("",!0),Nd.status==="done"&&Nd.editResp?(openBlock(),createElementBlock(Fragment,{key:2},[Cd[2]||(Cd[2]=createTextVNode(" 同步成功 ")),Nd.type!=="wordpress"&&Nd.editResp?(openBlock(),createElementBlock("a",{key:0,href:Nd.editResp.draftLink,class:"ml-2 text-blue-500 hover:underline",referrerPolicy:"no-referrer",target:"_blank"},"查看草稿",8,_hoisted_6$2)):createCommentVNode("",!0)],64)):createCommentVNode("",!0)],2)]))),128))])):(openBlock(),createElementBlock("div",_hoisted_2$3," 等待发布.. "))])]}),_:1})]),_:1},8,["open"]))}}),__unplugin_components_13=_export_sfc(_sfc_main$B,[["__scopeId","data-v-3407b3ac"]]),_sfc_main$A=defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},setup(Ra,{emit:ed}){const ud=Ra,hd=useVModel$1(ud,"modelValue",ed,{passive:!0,defaultValue:ud.defaultValue});return(md,gd)=>withDirectives((openBlock(),createElementBlock("textarea",{"onUpdate:modelValue":gd[0]||(gd[0]=yd=>isRef(hd)?hd.value=yd:null),class:normalizeClass(unref(cn$4)("flex min-h-20 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",ud.class))},null,2)),[[vModelText,unref(hd)]])}}),_sfc_main$z=defineComponent({__name:"AlertDescription",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)("text-sm [&_p]:leading-relaxed",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$y=defineComponent({__name:"AlertTitle",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("h5",{class:normalizeClass(unref(cn$4)("mb-1 font-medium leading-none tracking-tight",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),alertVariants=cva("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),_sfc_main$x=defineComponent({__name:"Alert",props:{class:{},variant:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("div",{class:normalizeClass(unref(cn$4)(unref(alertVariants)({variant:ud.variant}),ed.class)),role:"alert"},[renderSlot(ud.$slots,"default")],2))}}),_hoisted_1$4={class:"w-full flex items-center gap-4"},_hoisted_2$2={class:"w-full flex items-center gap-4"},_hoisted_3$2={class:"w-full flex items-start gap-4"},_hoisted_4$2={class:"w-full flex items-start gap-4"},_hoisted_5$1={class:"flex flex-1 flex-col gap-2"},_hoisted_6$1={class:"flex flex-row items-center gap-4"},_hoisted_7={class:"flex items-center gap-2 text-sm"},_hoisted_8=["src"],_sfc_main$w=defineComponent({__name:"PostInfo",setup(Ra){const ed=useStore(),{output:ud,editor:dd}=storeToRefs(ed),hd=ref$1(!1),md=ref$1(!1),gd=ref$1([]),yd=ref$1(!1),vd=ref$1({title:"",desc:"",thumb:"",content:"",markdown:"",accounts:[]}),Cd=computed(()=>md.value&&vd.value.accounts.some(Gd=>Gd.checked));async function wd(){var zd,qd;md.value&&gd.value.length===0&&await Nd();let Gd={thumb:"",title:"",desc:"",content:"",markdown:"",accounts:[]};const Yd=gd.value.filter(Wd=>!["weixin","ipfs"].includes(Wd.type));try{Gd={thumb:((zd=document.querySelector("#output img"))==null?void 0:zd.src)??"",title:[1,2,3,4,5,6].map(Wd=>document.querySelector(`#output h${Wd}`)).filter(Wd=>Wd)[0].textContent??"",desc:document.querySelector("#output p").textContent??"",content:ud.value,markdown:((qd=dd.value)==null?void 0:qd.getValue())??"",accounts:Yd}}catch(Wd){console.log("error",Wd)}finally{vd.value={...Gd}}}async function Nd(){return new Promise(Gd=>{var Yd;(Yd=window.$syncer)==null||Yd.getAccounts(zd=>{gd.value=zd.map(qd=>({...qd,checked:!0})),Gd()})})}function Ld(){vd.value.accounts=vd.value.accounts.filter(Gd=>Gd.checked),yd.value=!0,hd.value=!1}function Ud(Gd){Gd||(hd.value=!1)}function jd(){if(window.$syncer!==void 0){md.value=!0;return}let Gd=0;const Yd=setInterval(async()=>{if(window.$syncer!==void 0){md.value=!0,await Nd(),clearInterval(Yd);return}Gd++,Gd>10&&clearInterval(Yd)},500)}return onBeforeMount(()=>{jd()}),(Gd,Yd)=>{const zd=_sfc_main$1o,qd=_sfc_main$D,Wd=_sfc_main$16,Xd=_sfc_main$17,Jd=_sfc_main$y,Zd=_sfc_main$z,mf=_sfc_main$x,xf=_sfc_main$18,_f=_sfc_main$1e,vf=_sfc_main$A,gf=_sfc_main$1f,Af=_sfc_main$1g,Df=_sfc_main$1h,Of=__unplugin_components_13;return openBlock(),createElementBlock(Fragment,null,[createVNode(Df,{open:unref(hd),"onUpdate:open":[Yd[4]||(Yd[4]=Cf=>isRef(hd)?hd.value=Cf:null),Ud]},{default:withCtx(()=>[createVNode(qd,null,{default:withCtx(()=>[createVNode(zd,{variant:"outline",onClick:wd},{default:withCtx(()=>Yd[6]||(Yd[6]=[createTextVNode(" 发布 ")])),_:1})]),_:1}),createVNode(Af,null,{default:withCtx(()=>[createVNode(Xd,null,{default:withCtx(()=>[createVNode(Wd,null,{default:withCtx(()=>Yd[7]||(Yd[7]=[createTextVNode("发布")])),_:1})]),_:1}),createVNode(mf,null,{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(Jd,null,{default:withCtx(()=>Yd[8]||(Yd[8]=[createTextVNode("提示")])),_:1}),createVNode(Zd,null,{default:withCtx(()=>Yd[9]||(Yd[9]=[createTextVNode(" 此功能由第三方浏览器插件支持,本平台不保证安全性及同步准确度。 ")])),_:1})]),_:1}),unref(md)?createCommentVNode("",!0):(openBlock(),createBlock(mf,{key:0},{default:withCtx(()=>[createVNode(unref(Info),{class:"h-4 w-4"}),createVNode(Jd,null,{default:withCtx(()=>Yd[10]||(Yd[10]=[createTextVNode("未检测到插件")])),_:1}),createVNode(Zd,null,{default:withCtx(()=>[Yd[12]||(Yd[12]=createTextVNode(" 请安装 ")),createVNode(unref(O$4),{as:"a",class:"text-blue-500",href:"https://www.wechatsync.com/?utm_source=syncicon#install",target:"_blank"},{default:withCtx(()=>Yd[11]||(Yd[11]=[createTextVNode(" 文章同步助手 ")])),_:1}),Yd[13]||(Yd[13]=createTextVNode(" 插件 "))]),_:1})]),_:1})),createBaseVNode("div",_hoisted_1$4,[createVNode(xf,{for:"thumb",class:"w-10 text-end"},{default:withCtx(()=>Yd[14]||(Yd[14]=[createTextVNode(" 封面 ")])),_:1}),createVNode(_f,{id:"thumb",modelValue:unref(vd).thumb,"onUpdate:modelValue":Yd[0]||(Yd[0]=Cf=>unref(vd).thumb=Cf),placeholder:"自动提取第一张图"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_2$2,[createVNode(xf,{for:"title",class:"w-10 text-end"},{default:withCtx(()=>Yd[15]||(Yd[15]=[createTextVNode(" 标题 ")])),_:1}),createVNode(_f,{id:"title",modelValue:unref(vd).title,"onUpdate:modelValue":Yd[1]||(Yd[1]=Cf=>unref(vd).title=Cf),placeholder:"自动提取第一个标题"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_3$2,[createVNode(xf,{for:"desc",class:"w-10 text-end"},{default:withCtx(()=>Yd[16]||(Yd[16]=[createTextVNode(" 描述 ")])),_:1}),createVNode(vf,{id:"desc",modelValue:unref(vd).desc,"onUpdate:modelValue":Yd[2]||(Yd[2]=Cf=>unref(vd).desc=Cf),placeholder:"自动提取第一个段落"},null,8,["modelValue"])]),createBaseVNode("div",_hoisted_4$2,[createVNode(xf,{class:"w-10 text-end"},{default:withCtx(()=>Yd[17]||(Yd[17]=[createTextVNode(" 账号 ")])),_:1}),createBaseVNode("div",_hoisted_5$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(vd).accounts,Cf=>(openBlock(),createElementBlock("div",{key:Cf.uid+Cf.displayName,class:"flex items-center gap-2"},[createBaseVNode("label",_hoisted_6$1,[createVNode(unref(Wv),{checked:Cf.checked,"onUpdate:checked":If=>Cf.checked=If,class:"bg-background hover:bg-muted h-[25px] w-[25px] flex appearance-none items-center justify-center border border-gray-200 rounded-[4px] outline-none"},{default:withCtx(()=>[createVNode(unref(jv),null,{default:withCtx(()=>[Cf.checked?(openBlock(),createBlock(unref(Check),{key:0,class:"h-4 w-4"})):createCommentVNode("",!0)]),_:2},1024)]),_:2},1032,["checked","onUpdate:checked"]),createBaseVNode("span",_hoisted_7,[createBaseVNode("img",{src:Cf.icon,alt:"",class:"inline-block h-[20px] w-[20px]"},null,8,_hoisted_8),createTextVNode(" "+toDisplayString(Cf.title)+" - "+toDisplayString(Cf.displayName??Cf.home),1)])])]))),128))])]),createVNode(gf,null,{default:withCtx(()=>[createVNode(zd,{variant:"outline",onClick:Yd[3]||(Yd[3]=Cf=>hd.value=!1)},{default:withCtx(()=>Yd[18]||(Yd[18]=[createTextVNode(" 取 消 ")])),_:1}),createVNode(zd,{disabled:!unref(Cd),onClick:Ld},{default:withCtx(()=>Yd[19]||(Yd[19]=[createTextVNode(" 确 定 ")])),_:1},8,["disabled"])]),_:1})]),_:1})]),_:1},8,["open"]),createVNode(Of,{open:unref(yd),"onUpdate:open":Yd[5]||(Yd[5]=Cf=>isRef(yd)?yd.value=Cf:null),post:unref(vd)},null,8,["open","post"])],64)}}}),_sfc_main$v=defineComponent({__name:"DropdownMenuRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(Ch),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_hoisted_1$3={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$u=defineComponent({__name:"DropdownMenuRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(wh),mergeProps(unref(md),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ud.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$3,[createVNode(unref(gh),null,{default:withCtx(()=>[createVNode(unref(Circle),{class:"h-2 w-2 fill-current"})]),_:1})]),renderSlot(gd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$t=defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{},label:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:dd,...hd}=ed;return hd});return(dd,hd)=>(openBlock(),createBlock(unref(ap$3),mergeProps(ud.value,{class:unref(cn$4)("shrink-0 bg-border relative",ed.orientation==="vertical"?"w-px h-full":"h-px w-full",ed.class)}),{default:withCtx(()=>[ed.label?(openBlock(),createElementBlock("span",{key:0,class:normalizeClass(unref(cn$4)("text-xs text-muted-foreground bg-background absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 flex justify-center items-center",ed.orientation==="vertical"?"w-[1px] px-1 py-2":"h-[1px] py-1 px-2"))},toDisplayString(ed.label),3)):createCommentVNode("",!0)]),_:1},16,["class"]))}}),_sfc_main$s=defineComponent({__name:"TooltipProvider",props:{delayDuration:{},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(Hg),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_sfc_main$r=defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(Wg),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_sfc_main$q=defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(qg),null,{default:withCtx(()=>[createVNode(unref(Ug),mergeProps({...unref(md),...gd.$attrs},{class:unref(cn$4)("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$p=defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(jg),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_sfc_main$o=defineComponent({__name:"Menubar",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean},class:{}},emits:["update:modelValue"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(Uh),mergeProps(unref(md),{class:unref(cn$4)("flex h-10 items-center gap-x-1 rounded-md border bg-background p-1",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$n=defineComponent({__name:"AboutDialog",props:{visible:{type:Boolean,default:!1}},emits:["close"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed;function hd(yd){yd||dd("close")}const md=[{label:"GitHub 仓库",url:"https://github.com/doocs/md"},{label:"Gitee 仓库",url:"https://gitee.com/doocs/md"},{label:"GitCode 仓库",url:"https://gitcode.com/doocs/md"}];function gd(yd){window.open(yd,"_blank")}return(yd,vd)=>{const Cd=_sfc_main$16,wd=_sfc_main$17,Nd=_sfc_main$1o,Ld=_sfc_main$1f,Ud=_sfc_main$1g,jd=_sfc_main$1h;return openBlock(),createBlock(jd,{open:ud.visible,"onUpdate:open":hd},{default:withCtx(()=>[createVNode(Ud,null,{default:withCtx(()=>[createVNode(wd,null,{default:withCtx(()=>[createVNode(Cd,null,{default:withCtx(()=>vd[0]||(vd[0]=[createTextVNode("关于")])),_:1})]),_:1}),vd[1]||(vd[1]=createBaseVNode("div",{class:"text-center"},[createBaseVNode("h3",null,"一款高度简洁的微信 Markdown 编辑器"),createBaseVNode("p",null,"扫码关注公众号 Doocs,原创技术内容第一时间推送!"),createBaseVNode("img",{class:"mx-auto my-5",src:"https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png",alt:"Doocs Markdown 编辑器",style:{width:"40%"}})],-1)),createVNode(Ld,{class:"sm:justify-evenly"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(md,Gd=>createVNode(Nd,{key:Gd.url,onClick:Yd=>gd(Gd.url)},{default:withCtx(()=>[createTextVNode(toDisplayString(Gd.label),1)]),_:2},1032,["onClick"])),64))]),_:1})]),_:1})]),_:1},8,["open"])}}}),_sfc_main$m=defineComponent({__name:"MenubarMenu",props:{value:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(Gh),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_sfc_main$l=defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:8},align:{default:"start"},alignOffset:{default:-4},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(Yh),null,{default:withCtx(()=>[createVNode(unref(Xh),mergeProps(unref(dd),{class:unref(cn$4)("z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_hoisted_1$2={class:"absolute left-2 h-3.5 w-3.5 flex items-center justify-center"},_sfc_main$k=defineComponent({__name:"MenubarCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select","update:checked"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(ty),mergeProps(unref(md),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",ud.class)}),{default:withCtx(()=>[createBaseVNode("span",_hoisted_1$2,[createVNode(unref(ay$1),null,{default:withCtx(()=>[createVNode(unref(Check),{class:"h-4 w-4"})]),_:1})]),renderSlot(gd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$j=defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(qh),mergeProps(unref(dd),{class:unref(cn$4)("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none hover:bg-accent focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$i=defineComponent({__name:"HelpDropdown",setup(Ra){const ed=ref$1(!1);return(ud,dd)=>{const hd=_sfc_main$j,md=_sfc_main$k,gd=_sfc_main$l,yd=_sfc_main$m,vd=_sfc_main$n;return openBlock(),createElementBlock(Fragment,null,[createVNode(yd,null,{default:withCtx(()=>[createVNode(hd,null,{default:withCtx(()=>dd[2]||(dd[2]=[createTextVNode(" 帮助 ")])),_:1}),createVNode(gd,{align:"start"},{default:withCtx(()=>[createVNode(md,{onClick:dd[0]||(dd[0]=Cd=>ed.value=!0)},{default:withCtx(()=>dd[3]||(dd[3]=[createBaseVNode("span",null,"关于",-1)])),_:1})]),_:1})]),_:1}),createVNode(vd,{visible:unref(ed),onClose:dd[1]||(dd[1]=Cd=>ed.value=!1)},null,8,["visible"])],64)}}}),_sfc_main$h=defineComponent({__name:"HoverCard",props:{defaultOpen:{type:Boolean},open:{type:Boolean},openDelay:{},closeDelay:{}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(Rh),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_sfc_main$g=defineComponent({__name:"HoverCardContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(Oh),null,{default:withCtx(()=>[createVNode(unref(kh),mergeProps(unref(dd),{class:unref(cn$4)("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$f=defineComponent({__name:"HoverCardTrigger",props:{asChild:{type:Boolean},as:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(Ah),normalizeProps(guardReactiveProps(ed)),{default:withCtx(()=>[renderSlot(ud.$slots,"default")]),_:3},16))}}),_sfc_main$e=defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(ey),mergeProps({class:unref(cn$4)("-mx-1 my-1 h-px bg-muted",ed.class)},unref(dd)),null,16,["class"]))}}),_sfc_main$d=defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean}},emits:["update:open"],setup(Ra,{emit:ed}){const hd=Se$6(Ra,ed);return(md,gd)=>(openBlock(),createBlock(unref(sy),normalizeProps(guardReactiveProps(unref(hd))),{default:withCtx(()=>[renderSlot(md.$slots,"default")]),_:3},16))}}),_sfc_main$c=defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(Yh),null,{default:withCtx(()=>[createVNode(unref(ry),mergeProps(unref(md),{class:unref(cn$4)("z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),_sfc_main$b=defineComponent({__name:"DropdownMenuShortcut",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn$4)("ml-auto text-xs tracking-widest opacity-60",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$a=defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(Ra){const ed=Ra,ud=computed(()=>{const{class:hd,...md}=ed;return md}),dd=Ot$3(ud);return(hd,md)=>(openBlock(),createBlock(unref(iy),mergeProps(unref(dd),{class:unref(cn$4)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",hd.inset&&"pl-8",ed.class)}),{default:withCtx(()=>[renderSlot(hd.$slots,"default"),createVNode(unref(ChevronRight),{class:"ml-auto h-4 w-4"})]),_:3},16,["class"]))}}),_sfc_main$9=defineComponent({__name:"StyleOptionMenu",props:{title:{},options:{},current:{},change:{type:Function}},setup(Ra){const ed=Ra;function ud(dd,hd){switch(dd){case"字体":return{fontFamily:hd};case"字号":return{fontSize:hd};case"主题色":return{color:hd};default:return{}}}return(dd,hd)=>{const md=_sfc_main$a,gd=_sfc_main$b,yd=_sfc_main$k,vd=_sfc_main$c,Cd=_sfc_main$d;return openBlock(),createBlock(Cd,null,{default:withCtx(()=>[createVNode(md,null,{default:withCtx(()=>[hd[0]||(hd[0]=createBaseVNode("span",{class:"mr-2 h-4 w-4"},null,-1)),createBaseVNode("span",null,toDisplayString(ed.title),1)]),_:1}),createVNode(vd,{class:"max-h-56 overflow-auto"},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(dd.options,({label:wd,value:Nd,desc:Ld})=>(openBlock(),createBlock(yd,{key:Nd,label:wd,"model-value":Nd,class:"w-50",checked:dd.current===Nd,onClick:Ud=>dd.change(Nd)},{default:withCtx(()=>[createTextVNode(toDisplayString(wd)+" ",1),createVNode(gd,{style:normalizeStyle(ud(dd.title,Nd))},{default:withCtx(()=>[createTextVNode(toDisplayString(Ld),1)]),_:2},1032,["style"])]),_:2},1032,["label","model-value","checked","onClick"]))),128))]),_:1})]),_:1})}}}),_sfc_main$8=defineComponent({__name:"StyleDropdown",setup(Ra){const ed=useStore(),{toggleShowCssEditor:ud}=useDisplayStore(),{theme:dd,fontFamily:hd,fontSize:md,primaryColor:gd,codeBlockTheme:yd,legend:vd,isMacCodeBlock:Cd,cssEditor:wd}=storeToRefs(ed),{resetStyleConfirm:Nd,themeChanged:Ld,fontChanged:Ud,sizeChanged:jd,colorChanged:Gd,codeBlockThemeChanged:Yd,legendChanged:zd,macCodeBlockChanged:qd}=ed,Wd=ref$1(null);function Xd(){var _f;(_f=Wd.value)==null||_f.show()}function Jd(){ud(),setTimeout(()=>{wd.value.refresh()},50)}const Zd=useTemplateRef("pickColorsContainer"),mf=ref$1("rgb"),xf=ref$1(["rgb","hex","hsl","hsv"]);return(_f,vf)=>{const gf=_sfc_main$j,Af=_sfc_main$9,Df=_sfc_main$e,Of=_sfc_main$f,Cf=_sfc_main$g,If=_sfc_main$h,Ff=_sfc_main$k,sh=_sfc_main$l,Sh=_sfc_main$m;return openBlock(),createBlock(Sh,null,{default:withCtx(()=>[createVNode(gf,null,{default:withCtx(()=>vf[1]||(vf[1]=[createTextVNode(" 样式 ")])),_:1}),createVNode(sh,{class:"w-56",align:"start"},{default:withCtx(()=>[createVNode(Af,{title:"主题",options:unref(themeOptions),current:unref(dd),change:unref(Ld)},null,8,["options","current","change"]),createVNode(Df),createVNode(Af,{title:"字体",options:unref(fontFamilyOptions),current:unref(hd),change:unref(Ud)},null,8,["options","current","change"]),createVNode(Af,{title:"字号",options:unref(fontSizeOptions),current:unref(md),change:unref(jd)},null,8,["options","current","change"]),createVNode(Af,{title:"主题色",options:unref(colorOptions),current:unref(gd),change:unref(Gd)},null,8,["options","current","change"]),createVNode(Af,{title:"代码块主题",options:unref(codeBlockThemeOptions),current:unref(yd),change:unref(Yd)},null,8,["options","current","change"]),createVNode(Af,{title:"图注格式",options:unref(legendOptions),current:unref(vd),change:unref(zd)},null,8,["options","current","change"]),createVNode(Df),createVNode(Ff,{onClick:withModifiers(Xd,["self","prevent"])},{default:withCtx(()=>[createVNode(If,{"open-delay":100},{default:withCtx(()=>[createVNode(Of,{class:"w-full flex"},{default:withCtx(()=>vf[2]||(vf[2]=[createTextVNode(" 自定义主题色 ")])),_:1}),createVNode(Cf,{side:"right",class:"w-min"},{default:withCtx(()=>[createBaseVNode("div",{ref_key:"pickColorsContainer",ref:Zd},[createVNode(unref(Re),{value:unref(gd),"onUpdate:value":vf[0]||(vf[0]=yh=>isRef(gd)?gd.value=yh:null),"show-alpha":"",format:unref(mf),"format-options":unref(xf),theme:unref(ed).isDark?"dark":"light","popup-container":unref(Zd),onChange:unref(ed).colorChanged},null,8,["value","format","format-options","theme","popup-container","onChange"])],512)]),_:1})]),_:1})]),_:1}),createVNode(Ff,{onClick:Jd},{default:withCtx(()=>vf[3]||(vf[3]=[createTextVNode(" 自定义 CSS ")])),_:1}),createVNode(Df),createVNode(Ff,{checked:unref(Cd),onClick:unref(qd)},{default:withCtx(()=>vf[4]||(vf[4]=[createTextVNode(" Mac 代码块 ")])),_:1},8,["checked","onClick"]),createVNode(Df),createVNode(Ff,{divided:"",onClick:unref(Nd)},{default:withCtx(()=>vf[5]||(vf[5]=[createTextVNode(" 重置 ")])),_:1},8,["onClick"])]),_:1})]),_:1})}}}),_sfc_main$7=defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(Ra,{emit:ed}){const ud=Ra,dd=ed,hd=computed(()=>{const{class:gd,...yd}=ud;return yd}),md=Se$6(hd,dd);return(gd,yd)=>(openBlock(),createBlock(unref(Jh),mergeProps(unref(md),{class:unref(cn$4)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",gd.inset&&"pl-8",ud.class)}),{default:withCtx(()=>[renderSlot(gd.$slots,"default")]),_:3},16,["class"]))}}),_sfc_main$6=defineComponent({__name:"EditDropdown",setup(Ra){const{toggleShowInsertFormDialog:ed,toggleShowUploadImgDialog:ud}=useDisplayStore();return(dd,hd)=>{const md=_sfc_main$j,gd=_sfc_main$7,yd=_sfc_main$l,vd=_sfc_main$m;return openBlock(),createBlock(vd,null,{default:withCtx(()=>[createVNode(md,null,{default:withCtx(()=>hd[2]||(hd[2]=[createTextVNode(" 编辑 ")])),_:1}),createVNode(yd,{align:"start"},{default:withCtx(()=>[createVNode(gd,{onClick:hd[0]||(hd[0]=Cd=>unref(ud)())},{default:withCtx(()=>[createVNode(unref(CloudUpload),{class:"mr-2 h-4 w-4"}),hd[3]||(hd[3]=createTextVNode(" 上传图片 "))]),_:1}),createVNode(gd,{onClick:hd[1]||(hd[1]=Cd=>unref(ed)())},{default:withCtx(()=>[createVNode(unref(Table),{class:"mr-2 h-4 w-4"}),hd[4]||(hd[4]=createTextVNode(" 插入表格 "))]),_:1})]),_:1})]),_:1})}}}),_sfc_main$5=defineComponent({__name:"MenubarShortcut",props:{class:{}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createElementBlock("span",{class:normalizeClass(unref(cn$4)("ml-auto text-xs tracking-widest text-muted-foreground",ed.class))},[renderSlot(ud.$slots,"default")],2))}}),_sfc_main$4=defineComponent({__name:"FileDropdown",setup(Ra){const ed=useStore(),{isDark:ud,isEditOnLeft:dd}=storeToRefs(ed),{exportEditorContent2HTML:hd,exportEditorContent2MD:md,importMarkdownContent:gd}=ed;return(yd,vd)=>{const Cd=_sfc_main$j,wd=_sfc_main$7,Nd=_sfc_main$e,Ld=_sfc_main$k,Ud=_sfc_main$l,jd=_sfc_main$m;return openBlock(),createBlock(jd,null,{default:withCtx(()=>[createVNode(Cd,null,{default:withCtx(()=>vd[5]||(vd[5]=[createTextVNode(" 文件 ")])),_:1}),createVNode(Ud,{align:"start"},{default:withCtx(()=>[createVNode(wd,{onClick:vd[0]||(vd[0]=Gd=>unref(gd)())},{default:withCtx(()=>[createVNode(unref(Upload),{class:"mr-2 size-4"}),vd[6]||(vd[6]=createTextVNode(" 导入 .md "))]),_:1}),createVNode(wd,{onClick:vd[1]||(vd[1]=Gd=>unref(md)())},{default:withCtx(()=>[createVNode(unref(Download),{class:"mr-2 size-4"}),vd[7]||(vd[7]=createTextVNode(" 导出 .md "))]),_:1}),createVNode(wd,{onClick:vd[2]||(vd[2]=Gd=>unref(hd)())},{default:withCtx(()=>[createVNode(unref(FileCode),{class:"mr-2 size-4"}),vd[8]||(vd[8]=createTextVNode(" 导出 .html "))]),_:1}),createVNode(Nd),createVNode(Ld,{checked:unref(ud),"onUpdate:checked":vd[3]||(vd[3]=Gd=>isRef(ud)?ud.value=Gd:null)},{default:withCtx(()=>vd[9]||(vd[9]=[createTextVNode(" 深色模式 ")])),_:1},8,["checked"]),createVNode(Nd),createVNode(Ld,{checked:unref(dd),"onUpdate:checked":vd[4]||(vd[4]=Gd=>isRef(dd)?dd.value=Gd:null)},{default:withCtx(()=>vd[10]||(vd[10]=[createTextVNode(" 左侧编辑 ")])),_:1},8,["checked"])]),_:1})]),_:1})}}}),_sfc_main$3=defineComponent({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},dir:{},icons:{},containerAriaLabel:{},pauseWhenPageIsHidden:{type:Boolean},cn:{type:Function}},setup(Ra){const ed=Ra;return(ud,dd)=>(openBlock(),createBlock(unref(Ve),mergeProps({class:"toaster group"},ed,{"toast-options":{classes:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}}),null,16))}}),_hoisted_1$1={class:"header-container h-15 flex items-center justify-between px-5 dark:bg-[#191c20]"},_hoisted_2$1={class:"space-x-2 flex"},_hoisted_3$1={class:"space-x-2 flex"},_hoisted_4$1={class:"space-x-1 bg-background text-background-foreground mx-2 flex items-center border rounded-md"},_sfc_main$2=defineComponent({__name:"index",emits:["addFormat","formatContent","startCopy","endCopy"],setup(Ra,{emit:ed}){const ud=ed,dd=[{label:"加粗",kbd:[ctrlSign,"B"],emitArgs:["addFormat",`${ctrlKey}-B`]},{label:"斜体",kbd:[ctrlSign,"I"],emitArgs:["addFormat",`${ctrlKey}-I`]},{label:"删除线",kbd:[ctrlSign,"D"],emitArgs:["addFormat",`${ctrlKey}-D`]},{label:"超链接",kbd:[ctrlSign,"K"],emitArgs:["addFormat",`${ctrlKey}-K`]},{label:"行内代码",kbd:[ctrlSign,"E"],emitArgs:["addFormat",`${ctrlKey}-E`]},{label:"格式化",kbd:[altSign,shiftSign,"F"],emitArgs:["formatContent"]}],hd=useStore(),{isDark:md,isCiteStatus:gd,isCountStatus:yd,output:vd,primaryColor:Cd,isOpenPostSlider:wd}=storeToRefs(hd),{toggleDark:Nd,editorRefresh:Ld,citeStatusChanged:Ud,countStatusChanged:jd}=hd,Gd=useStorage(addPrefix("copyMode"),"txt"),Yd=ref$1(""),{copy:zd}=useClipboard({source:Yd});function qd(){ud("startCopy"),setTimeout(()=>{const Wd=md.value;Wd&&Nd(),nextTick$1(async()=>{processClipboardContent(Cd.value);const Xd=document.getElementById("output");Xd.focus(),window.getSelection().removeAllRanges();const Jd=Xd.innerHTML;if(Gd.value==="txt"){const Zd=document.createRange();Zd.setStartBefore(Xd.firstChild),Zd.setEndAfter(Xd.lastChild),window.getSelection().addRange(Zd),document.execCommand("copy"),window.getSelection().removeAllRanges()}Xd.innerHTML=vd.value,Wd&&nextTick$1(()=>Nd()),Gd.value==="html"&&await zd(Jd),Ke.success(Gd.value==="html"?"已复制 HTML 源码,请进行下一步操作。":"已复制渲染后的内容到剪贴板,可直接到公众号后台粘贴。"),Ld(),ud("endCopy")})},350)}return(Wd,Xd)=>{const Jd=_sfc_main$4,Zd=_sfc_main$j,mf=_sfc_main$5,xf=_sfc_main$k,_f=_sfc_main$e,vf=_sfc_main$l,gf=_sfc_main$m,Af=_sfc_main$6,Df=_sfc_main$8,Of=_sfc_main$i,Cf=_sfc_main$o,If=_sfc_main$1o,Ff=_sfc_main$p,sh=_sfc_main$q,Sh=_sfc_main$r,yh=_sfc_main$s,Mh=_sfc_main$t,lh=_sfc_main$E,rh=_sfc_main$u,mh=_sfc_main$v,xh=_sfc_main$G,Eh=_sfc_main$H,kf=_sfc_main$w;return openBlock(),createElementBlock("header",_hoisted_1$1,[createBaseVNode("div",_hoisted_2$1,[createVNode(Cf,{class:"menubar"},{default:withCtx(()=>[createVNode(Jd),createVNode(gf,null,{default:withCtx(()=>[createVNode(Zd,null,{default:withCtx(()=>Xd[7]||(Xd[7]=[createTextVNode(" 格式 ")])),_:1}),createVNode(vf,{class:"w-60",align:"start"},{default:withCtx(()=>[(openBlock(),createElementBlock(Fragment,null,renderList(dd,({label:Rf,kbd:_h,emitArgs:Ph})=>createVNode(xf,{key:Rf,onClick:sm=>Ph[0]==="addFormat"?Wd.$emit(Ph[0],Ph[1]):Wd.$emit(Ph[0])},{default:withCtx(()=>[createTextVNode(toDisplayString(Rf)+" ",1),createVNode(mf,null,{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(_h,sm=>(openBlock(),createElementBlock("kbd",{key:sm,class:"mx-1 bg-gray-2 dark:bg-stone-9"},toDisplayString(sm),1))),128))]),_:2},1024)]),_:2},1032,["onClick"])),64)),createVNode(_f),createVNode(xf,{checked:unref(gd),onClick:Xd[0]||(Xd[0]=Rf=>unref(Ud)())},{default:withCtx(()=>Xd[8]||(Xd[8]=[createTextVNode(" 微信外链转底部引用 ")])),_:1},8,["checked"]),createVNode(_f),createVNode(xf,{checked:unref(yd),onClick:Xd[1]||(Xd[1]=Rf=>unref(jd)())},{default:withCtx(()=>Xd[9]||(Xd[9]=[createTextVNode(" 统计字数和阅读时间 ")])),_:1},8,["checked"])]),_:1})]),_:1}),createVNode(Af),createVNode(Df),createVNode(Of)]),_:1})]),createBaseVNode("div",_hoisted_3$1,[createVNode(yh,{"delay-duration":200},{default:withCtx(()=>[createVNode(Sh,null,{default:withCtx(()=>[createVNode(Ff,{"as-child":""},{default:withCtx(()=>[createVNode(If,{variant:"outline",onClick:Xd[2]||(Xd[2]=Rf=>wd.value=!unref(wd))},{default:withCtx(()=>[withDirectives(createVNode(unref(PanelLeftOpen),{class:"size-4"},null,512),[[vShow,!unref(wd)]]),withDirectives(createVNode(unref(PanelLeftClose),{class:"size-4"},null,512),[[vShow,unref(wd)]])]),_:1})]),_:1}),createVNode(sh,{side:"left"},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(wd)?"关闭":"内容管理"),1)]),_:1})]),_:1})]),_:1}),createVNode(If,{variant:"outline",onClick:Xd[3]||(Xd[3]=Rf=>unref(Nd)())},{default:withCtx(()=>[withDirectives(createVNode(unref(Moon),{class:"size-4"},null,512),[[vShow,unref(md)]]),withDirectives(createVNode(unref(Sun),{class:"size-4"},null,512),[[vShow,!unref(md)]])]),_:1}),createBaseVNode("div",_hoisted_4$1,[createVNode(If,{variant:"ghost",class:"shadow-none",onClick:qd},{default:withCtx(()=>Xd[10]||(Xd[10]=[createTextVNode(" 复制 ")])),_:1}),createVNode(Mh,{orientation:"vertical",class:"h-5"}),createVNode(Eh,{modelValue:unref(Gd),"onUpdate:modelValue":Xd[5]||(Xd[5]=Rf=>isRef(Gd)?Gd.value=Rf:null)},{default:withCtx(()=>[createVNode(lh,{"as-child":""},{default:withCtx(()=>[createVNode(If,{variant:"ghost",class:"px-2 shadow-none"},{default:withCtx(()=>[createVNode(unref(ChevronDown),{class:"text-secondary-foreground h-4 w-4"})]),_:1})]),_:1}),createVNode(xh,{align:"end","align-offset":-5,class:"w-[200px]"},{default:withCtx(()=>[createVNode(mh,{modelValue:unref(Gd),"onUpdate:modelValue":Xd[4]||(Xd[4]=Rf=>isRef(Gd)?Gd.value=Rf:null)},{default:withCtx(()=>[createVNode(rh,{value:"txt"},{default:withCtx(()=>Xd[11]||(Xd[11]=[createTextVNode(" 公众号格式 ")])),_:1}),createVNode(rh,{value:"html"},{default:withCtx(()=>Xd[12]||(Xd[12]=[createTextVNode(" HTML 格式 ")])),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])]),createVNode(kf),createVNode(If,{variant:"outline",onClick:Xd[6]||(Xd[6]=Rf=>unref(hd).isOpenRightSlider=!unref(hd).isOpenRightSlider)},{default:withCtx(()=>[createVNode(unref(Settings),{class:"size-4"})]),_:1}),createVNode(unref(_sfc_main$3),{"rich-colors":"",position:"top-center"})])])}}}),__unplugin_components_0=_export_sfc(_sfc_main$2,[["__scopeId","data-v-9a6c5c36"]]);function bind(Ra,ed){return function(){return Ra.apply(ed,arguments)}}var define_process_default$7={};const{toString:toString$1}=Object.prototype,{getPrototypeOf}=Object,kindOf=(Ra=>ed=>{const ud=toString$1.call(ed);return Ra[ud]||(Ra[ud]=ud.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=Ra=>(Ra=Ra.toLowerCase(),ed=>kindOf(ed)===Ra),typeOfTest=Ra=>ed=>typeof ed===Ra,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(Ra){return Ra!==null&&!isUndefined(Ra)&&Ra.constructor!==null&&!isUndefined(Ra.constructor)&&isFunction$1(Ra.constructor.isBuffer)&&Ra.constructor.isBuffer(Ra)}const isArrayBuffer$2=kindOfTest("ArrayBuffer");function isArrayBufferView(Ra){let ed;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ed=ArrayBuffer.isView(Ra):ed=Ra&&Ra.buffer&&isArrayBuffer$2(Ra.buffer),ed}const isString$1=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber$1=typeOfTest("number"),isObject$1=Ra=>Ra!==null&&typeof Ra=="object",isBoolean$1=Ra=>Ra===!0||Ra===!1,isPlainObject=Ra=>{if(kindOf(Ra)!=="object")return!1;const ed=getPrototypeOf(Ra);return(ed===null||ed===Object.prototype||Object.getPrototypeOf(ed)===null)&&!(Symbol.toStringTag in Ra)&&!(Symbol.iterator in Ra)},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=Ra=>isObject$1(Ra)&&isFunction$1(Ra.pipe),isFormData=Ra=>{let ed;return Ra&&(typeof FormData=="function"&&Ra instanceof FormData||isFunction$1(Ra.append)&&((ed=kindOf(Ra))==="formdata"||ed==="object"&&isFunction$1(Ra.toString)&&Ra.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream$3,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=Ra=>Ra.trim?Ra.trim():Ra.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(Ra,ed,{allOwnKeys:ud=!1}={}){if(Ra===null||typeof Ra>"u")return;let dd,hd;if(typeof Ra!="object"&&(Ra=[Ra]),isArray(Ra))for(dd=0,hd=Ra.length;dd0;)if(hd=ud[dd],ed===hd.toLowerCase())return hd;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global$1,isContextDefined=Ra=>!isUndefined(Ra)&&Ra!==_global;function merge$1(){const{caseless:Ra}=isContextDefined(this)&&this||{},ed={},ud=(dd,hd)=>{const md=Ra&&findKey(ed,hd)||hd;isPlainObject(ed[md])&&isPlainObject(dd)?ed[md]=merge$1(ed[md],dd):isPlainObject(dd)?ed[md]=merge$1({},dd):isArray(dd)?ed[md]=dd.slice():ed[md]=dd};for(let dd=0,hd=arguments.length;dd(forEach(ed,(hd,md)=>{ud&&isFunction$1(hd)?Ra[md]=bind(hd,ud):Ra[md]=hd},{allOwnKeys:dd}),Ra),stripBOM=Ra=>(Ra.charCodeAt(0)===65279&&(Ra=Ra.slice(1)),Ra),inherits$1=(Ra,ed,ud,dd)=>{Ra.prototype=Object.create(ed.prototype,dd),Ra.prototype.constructor=Ra,Object.defineProperty(Ra,"super",{value:ed.prototype}),ud&&Object.assign(Ra.prototype,ud)},toFlatObject=(Ra,ed,ud,dd)=>{let hd,md,gd;const yd={};if(ed=ed||{},Ra==null)return ed;do{for(hd=Object.getOwnPropertyNames(Ra),md=hd.length;md-- >0;)gd=hd[md],(!dd||dd(gd,Ra,ed))&&!yd[gd]&&(ed[gd]=Ra[gd],yd[gd]=!0);Ra=ud!==!1&&getPrototypeOf(Ra)}while(Ra&&(!ud||ud(Ra,ed))&&Ra!==Object.prototype);return ed},endsWith=(Ra,ed,ud)=>{Ra=String(Ra),(ud===void 0||ud>Ra.length)&&(ud=Ra.length),ud-=ed.length;const dd=Ra.indexOf(ed,ud);return dd!==-1&&dd===ud},toArray$1=Ra=>{if(!Ra)return null;if(isArray(Ra))return Ra;let ed=Ra.length;if(!isNumber$1(ed))return null;const ud=new Array(ed);for(;ed-- >0;)ud[ed]=Ra[ed];return ud},isTypedArray=(Ra=>ed=>Ra&&ed instanceof Ra)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(Ra,ed)=>{const dd=(Ra&&Ra[Symbol.iterator]).call(Ra);let hd;for(;(hd=dd.next())&&!hd.done;){const md=hd.value;ed.call(Ra,md[0],md[1])}},matchAll=(Ra,ed)=>{let ud;const dd=[];for(;(ud=Ra.exec(ed))!==null;)dd.push(ud);return dd},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=Ra=>Ra.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(ud,dd,hd){return dd.toUpperCase()+hd}),hasOwnProperty$1=(({hasOwnProperty:Ra})=>(ed,ud)=>Ra.call(ed,ud))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(Ra,ed)=>{const ud=Object.getOwnPropertyDescriptors(Ra),dd={};forEach(ud,(hd,md)=>{let gd;(gd=ed(hd,md,Ra))!==!1&&(dd[md]=gd||hd)}),Object.defineProperties(Ra,dd)},freezeMethods=Ra=>{reduceDescriptors(Ra,(ed,ud)=>{if(isFunction$1(Ra)&&["arguments","caller","callee"].indexOf(ud)!==-1)return!1;const dd=Ra[ud];if(isFunction$1(dd)){if(ed.enumerable=!1,"writable"in ed){ed.writable=!1;return}ed.set||(ed.set=()=>{throw Error("Can not rewrite read-only method '"+ud+"'")})}})},toObjectSet=(Ra,ed)=>{const ud={},dd=hd=>{hd.forEach(md=>{ud[md]=!0})};return isArray(Ra)?dd(Ra):dd(String(Ra).split(ed)),ud},noop=()=>{},toFiniteNumber=(Ra,ed)=>Ra!=null&&Number.isFinite(Ra=+Ra)?Ra:ed;function isSpecCompliantForm(Ra){return!!(Ra&&isFunction$1(Ra.append)&&Ra[Symbol.toStringTag]==="FormData"&&Ra[Symbol.iterator])}const toJSONObject=Ra=>{const ed=new Array(10),ud=(dd,hd)=>{if(isObject$1(dd)){if(ed.indexOf(dd)>=0)return;if(!("toJSON"in dd)){ed[hd]=dd;const md=isArray(dd)?[]:{};return forEach(dd,(gd,yd)=>{const vd=ud(gd,hd+1);!isUndefined(vd)&&(md[yd]=vd)}),ed[hd]=void 0,md}}return dd};return ud(Ra,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=Ra=>Ra&&(isObject$1(Ra)||isFunction$1(Ra))&&isFunction$1(Ra.then)&&isFunction$1(Ra.catch),_setImmediate=((Ra,ed)=>Ra?setImmediate:ed?((ud,dd)=>(_global.addEventListener("message",({source:hd,data:md})=>{hd===_global&&md===ud&&dd.length&&dd.shift()()},!1),hd=>{dd.push(hd),_global.postMessage(ud,"*")}))(`axios@${Math.random()}`,[]):ud=>setTimeout(ud))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof define_process_default$7<"u"&&define_process_default$7.nextTick||_setImmediate,utils$2={isArray,isArrayBuffer:isArrayBuffer$2,isBuffer,isFormData,isArrayBufferView,isString:isString$1,isNumber:isNumber$1,isBoolean:isBoolean$1,isObject:isObject$1,isPlainObject,isReadableStream:isReadableStream$3,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge:merge$1,extend,trim,stripBOM,inherits:inherits$1,toFlatObject,kindOf,kindOfTest,endsWith,toArray:toArray$1,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap};function AxiosError$1(Ra,ed,ud,dd,hd){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=Ra,this.name="AxiosError",ed&&(this.code=ed),ud&&(this.config=ud),dd&&(this.request=dd),hd&&(this.response=hd,this.status=hd.status?hd.status:null)}utils$2.inherits(AxiosError$1,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$2.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError$1.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(Ra=>{descriptors[Ra]={value:Ra}});Object.defineProperties(AxiosError$1,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError$1.from=(Ra,ed,ud,dd,hd,md)=>{const gd=Object.create(prototype$1);return utils$2.toFlatObject(Ra,gd,function(vd){return vd!==Error.prototype},yd=>yd!=="isAxiosError"),AxiosError$1.call(gd,Ra.message,ed,ud,dd,hd),gd.cause=Ra,gd.name=Ra.name,md&&Object.assign(gd,md),gd};const httpAdapter=null;function isVisitable(Ra){return utils$2.isPlainObject(Ra)||utils$2.isArray(Ra)}function removeBrackets(Ra){return utils$2.endsWith(Ra,"[]")?Ra.slice(0,-2):Ra}function renderKey(Ra,ed,ud){return Ra?Ra.concat(ed).map(function(hd,md){return hd=removeBrackets(hd),!ud&&md?"["+hd+"]":hd}).join(ud?".":""):ed}function isFlatArray(Ra){return utils$2.isArray(Ra)&&!Ra.some(isVisitable)}const predicates=utils$2.toFlatObject(utils$2,{},null,function(ed){return/^is[A-Z]/.test(ed)});function toFormData$1(Ra,ed,ud){if(!utils$2.isObject(Ra))throw new TypeError("target must be an object");ed=ed||new FormData,ud=utils$2.toFlatObject(ud,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Gd,Yd){return!utils$2.isUndefined(Yd[Gd])});const dd=ud.metaTokens,hd=ud.visitor||wd,md=ud.dots,gd=ud.indexes,vd=(ud.Blob||typeof Blob<"u"&&Blob)&&utils$2.isSpecCompliantForm(ed);if(!utils$2.isFunction(hd))throw new TypeError("visitor must be a function");function Cd(jd){if(jd===null)return"";if(utils$2.isDate(jd))return jd.toISOString();if(!vd&&utils$2.isBlob(jd))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$2.isArrayBuffer(jd)||utils$2.isTypedArray(jd)?vd&&typeof Blob=="function"?new Blob([jd]):Buffer$4.from(jd):jd}function wd(jd,Gd,Yd){let zd=jd;if(jd&&!Yd&&typeof jd=="object"){if(utils$2.endsWith(Gd,"{}"))Gd=dd?Gd:Gd.slice(0,-2),jd=JSON.stringify(jd);else if(utils$2.isArray(jd)&&isFlatArray(jd)||(utils$2.isFileList(jd)||utils$2.endsWith(Gd,"[]"))&&(zd=utils$2.toArray(jd)))return Gd=removeBrackets(Gd),zd.forEach(function(Wd,Xd){!(utils$2.isUndefined(Wd)||Wd===null)&&ed.append(gd===!0?renderKey([Gd],Xd,md):gd===null?Gd:Gd+"[]",Cd(Wd))}),!1}return isVisitable(jd)?!0:(ed.append(renderKey(Yd,Gd,md),Cd(jd)),!1)}const Nd=[],Ld=Object.assign(predicates,{defaultVisitor:wd,convertValue:Cd,isVisitable});function Ud(jd,Gd){if(!utils$2.isUndefined(jd)){if(Nd.indexOf(jd)!==-1)throw Error("Circular reference detected in "+Gd.join("."));Nd.push(jd),utils$2.forEach(jd,function(zd,qd){(!(utils$2.isUndefined(zd)||zd===null)&&hd.call(ed,zd,utils$2.isString(qd)?qd.trim():qd,Gd,Ld))===!0&&Ud(zd,Gd?Gd.concat(qd):[qd])}),Nd.pop()}}if(!utils$2.isObject(Ra))throw new TypeError("data must be an object");return Ud(Ra),ed}function encode$2(Ra){const ed={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(Ra).replace(/[!'()~]|%20|%00/g,function(dd){return ed[dd]})}function AxiosURLSearchParams(Ra,ed){this._pairs=[],Ra&&toFormData$1(Ra,this,ed)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(ed,ud){this._pairs.push([ed,ud])};prototype.toString=function(ed){const ud=ed?function(dd){return ed.call(this,dd,encode$2)}:encode$2;return this._pairs.map(function(hd){return ud(hd[0])+"="+ud(hd[1])},"").join("&")};function encode$1(Ra){return encodeURIComponent(Ra).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(Ra,ed,ud){if(!ed)return Ra;const dd=ud&&ud.encode||encode$1;utils$2.isFunction(ud)&&(ud={serialize:ud});const hd=ud&&ud.serialize;let md;if(hd?md=hd(ed,ud):md=utils$2.isURLSearchParams(ed)?ed.toString():new AxiosURLSearchParams(ed,ud).toString(dd),md){const gd=Ra.indexOf("#");gd!==-1&&(Ra=Ra.slice(0,gd)),Ra+=(Ra.indexOf("?")===-1?"?":"&")+md}return Ra}class InterceptorManager{constructor(){this.handlers=[]}use(ed,ud,dd){return this.handlers.push({fulfilled:ed,rejected:ud,synchronous:dd?dd.synchronous:!1,runWhen:dd?dd.runWhen:null}),this.handlers.length-1}eject(ed){this.handlers[ed]&&(this.handlers[ed]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(ed){utils$2.forEach(this.handlers,function(dd){dd!==null&&ed(dd)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils$1=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils$1,...platform$1};function toURLEncodedForm(Ra,ed){return toFormData$1(Ra,new platform.classes.URLSearchParams,Object.assign({visitor:function(ud,dd,hd,md){return platform.isNode&&utils$2.isBuffer(ud)?(this.append(dd,ud.toString("base64")),!1):md.defaultVisitor.apply(this,arguments)}},ed))}function parsePropPath(Ra){return utils$2.matchAll(/\w+|\[(\w*)]/g,Ra).map(ed=>ed[0]==="[]"?"":ed[1]||ed[0])}function arrayToObject(Ra){const ed={},ud=Object.keys(Ra);let dd;const hd=ud.length;let md;for(dd=0;dd=ud.length;return gd=!gd&&utils$2.isArray(hd)?hd.length:gd,vd?(utils$2.hasOwnProp(hd,gd)?hd[gd]=[hd[gd],dd]:hd[gd]=dd,!yd):((!hd[gd]||!utils$2.isObject(hd[gd]))&&(hd[gd]=[]),ed(ud,dd,hd[gd],md)&&utils$2.isArray(hd[gd])&&(hd[gd]=arrayToObject(hd[gd])),!yd)}if(utils$2.isFormData(Ra)&&utils$2.isFunction(Ra.entries)){const ud={};return utils$2.forEachEntry(Ra,(dd,hd)=>{ed(parsePropPath(dd),hd,ud,0)}),ud}return null}function stringifySafely(Ra,ed,ud){if(utils$2.isString(Ra))try{return(ed||JSON.parse)(Ra),utils$2.trim(Ra)}catch(dd){if(dd.name!=="SyntaxError")throw dd}return(ud||JSON.stringify)(Ra)}const defaults$1={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(ed,ud){const dd=ud.getContentType()||"",hd=dd.indexOf("application/json")>-1,md=utils$2.isObject(ed);if(md&&utils$2.isHTMLForm(ed)&&(ed=new FormData(ed)),utils$2.isFormData(ed))return hd?JSON.stringify(formDataToJSON(ed)):ed;if(utils$2.isArrayBuffer(ed)||utils$2.isBuffer(ed)||utils$2.isStream(ed)||utils$2.isFile(ed)||utils$2.isBlob(ed)||utils$2.isReadableStream(ed))return ed;if(utils$2.isArrayBufferView(ed))return ed.buffer;if(utils$2.isURLSearchParams(ed))return ud.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),ed.toString();let yd;if(md){if(dd.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(ed,this.formSerializer).toString();if((yd=utils$2.isFileList(ed))||dd.indexOf("multipart/form-data")>-1){const vd=this.env&&this.env.FormData;return toFormData$1(yd?{"files[]":ed}:ed,vd&&new vd,this.formSerializer)}}return md||hd?(ud.setContentType("application/json",!1),stringifySafely(ed)):ed}],transformResponse:[function(ed){const ud=this.transitional||defaults$1.transitional,dd=ud&&ud.forcedJSONParsing,hd=this.responseType==="json";if(utils$2.isResponse(ed)||utils$2.isReadableStream(ed))return ed;if(ed&&utils$2.isString(ed)&&(dd&&!this.responseType||hd)){const gd=!(ud&&ud.silentJSONParsing)&&hd;try{return JSON.parse(ed)}catch(yd){if(gd)throw yd.name==="SyntaxError"?AxiosError$1.from(yd,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):yd}}return ed}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(ed){return ed>=200&&ed<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$2.forEach(["delete","get","head","post","put","patch"],Ra=>{defaults$1.headers[Ra]={}});const ignoreDuplicateOf=utils$2.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=Ra=>{const ed={};let ud,dd,hd;return Ra&&Ra.split(` +`).forEach(function(gd){hd=gd.indexOf(":"),ud=gd.substring(0,hd).trim().toLowerCase(),dd=gd.substring(hd+1).trim(),!(!ud||ed[ud]&&ignoreDuplicateOf[ud])&&(ud==="set-cookie"?ed[ud]?ed[ud].push(dd):ed[ud]=[dd]:ed[ud]=ed[ud]?ed[ud]+", "+dd:dd)}),ed},$internals=Symbol("internals");function normalizeHeader(Ra){return Ra&&String(Ra).trim().toLowerCase()}function normalizeValue(Ra){return Ra===!1||Ra==null?Ra:utils$2.isArray(Ra)?Ra.map(normalizeValue):String(Ra)}function parseTokens(Ra){const ed=Object.create(null),ud=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let dd;for(;dd=ud.exec(Ra);)ed[dd[1]]=dd[2];return ed}const isValidHeaderName=Ra=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(Ra.trim());function matchHeaderValue(Ra,ed,ud,dd,hd){if(utils$2.isFunction(dd))return dd.call(this,ed,ud);if(hd&&(ed=ud),!!utils$2.isString(ed)){if(utils$2.isString(dd))return ed.indexOf(dd)!==-1;if(utils$2.isRegExp(dd))return dd.test(ed)}}function formatHeader(Ra){return Ra.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(ed,ud,dd)=>ud.toUpperCase()+dd)}function buildAccessors(Ra,ed){const ud=utils$2.toCamelCase(" "+ed);["get","set","has"].forEach(dd=>{Object.defineProperty(Ra,dd+ud,{value:function(hd,md,gd){return this[dd].call(this,ed,hd,md,gd)},configurable:!0})})}let AxiosHeaders$1=class{constructor(ed){ed&&this.set(ed)}set(ed,ud,dd){const hd=this;function md(yd,vd,Cd){const wd=normalizeHeader(vd);if(!wd)throw new Error("header name must be a non-empty string");const Nd=utils$2.findKey(hd,wd);(!Nd||hd[Nd]===void 0||Cd===!0||Cd===void 0&&hd[Nd]!==!1)&&(hd[Nd||vd]=normalizeValue(yd))}const gd=(yd,vd)=>utils$2.forEach(yd,(Cd,wd)=>md(Cd,wd,vd));if(utils$2.isPlainObject(ed)||ed instanceof this.constructor)gd(ed,ud);else if(utils$2.isString(ed)&&(ed=ed.trim())&&!isValidHeaderName(ed))gd(parseHeaders(ed),ud);else if(utils$2.isHeaders(ed))for(const[yd,vd]of ed.entries())md(vd,yd,dd);else ed!=null&&md(ud,ed,dd);return this}get(ed,ud){if(ed=normalizeHeader(ed),ed){const dd=utils$2.findKey(this,ed);if(dd){const hd=this[dd];if(!ud)return hd;if(ud===!0)return parseTokens(hd);if(utils$2.isFunction(ud))return ud.call(this,hd,dd);if(utils$2.isRegExp(ud))return ud.exec(hd);throw new TypeError("parser must be boolean|regexp|function")}}}has(ed,ud){if(ed=normalizeHeader(ed),ed){const dd=utils$2.findKey(this,ed);return!!(dd&&this[dd]!==void 0&&(!ud||matchHeaderValue(this,this[dd],dd,ud)))}return!1}delete(ed,ud){const dd=this;let hd=!1;function md(gd){if(gd=normalizeHeader(gd),gd){const yd=utils$2.findKey(dd,gd);yd&&(!ud||matchHeaderValue(dd,dd[yd],yd,ud))&&(delete dd[yd],hd=!0)}}return utils$2.isArray(ed)?ed.forEach(md):md(ed),hd}clear(ed){const ud=Object.keys(this);let dd=ud.length,hd=!1;for(;dd--;){const md=ud[dd];(!ed||matchHeaderValue(this,this[md],md,ed,!0))&&(delete this[md],hd=!0)}return hd}normalize(ed){const ud=this,dd={};return utils$2.forEach(this,(hd,md)=>{const gd=utils$2.findKey(dd,md);if(gd){ud[gd]=normalizeValue(hd),delete ud[md];return}const yd=ed?formatHeader(md):String(md).trim();yd!==md&&delete ud[md],ud[yd]=normalizeValue(hd),dd[yd]=!0}),this}concat(...ed){return this.constructor.concat(this,...ed)}toJSON(ed){const ud=Object.create(null);return utils$2.forEach(this,(dd,hd)=>{dd!=null&&dd!==!1&&(ud[hd]=ed&&utils$2.isArray(dd)?dd.join(", "):dd)}),ud}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([ed,ud])=>ed+": "+ud).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(ed){return ed instanceof this?ed:new this(ed)}static concat(ed,...ud){const dd=new this(ed);return ud.forEach(hd=>dd.set(hd)),dd}static accessor(ed){const dd=(this[$internals]=this[$internals]={accessors:{}}).accessors,hd=this.prototype;function md(gd){const yd=normalizeHeader(gd);dd[yd]||(buildAccessors(hd,gd),dd[yd]=!0)}return utils$2.isArray(ed)?ed.forEach(md):md(ed),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$2.reduceDescriptors(AxiosHeaders$1.prototype,({value:Ra},ed)=>{let ud=ed[0].toUpperCase()+ed.slice(1);return{get:()=>Ra,set(dd){this[ud]=dd}}});utils$2.freezeMethods(AxiosHeaders$1);function transformData(Ra,ed){const ud=this||defaults$1,dd=ed||ud,hd=AxiosHeaders$1.from(dd.headers);let md=dd.data;return utils$2.forEach(Ra,function(yd){md=yd.call(ud,md,hd.normalize(),ed?ed.status:void 0)}),hd.normalize(),md}function isCancel$1(Ra){return!!(Ra&&Ra.__CANCEL__)}function CanceledError$1(Ra,ed,ud){AxiosError$1.call(this,Ra??"canceled",AxiosError$1.ERR_CANCELED,ed,ud),this.name="CanceledError"}utils$2.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(Ra,ed,ud){const dd=ud.config.validateStatus;!ud.status||!dd||dd(ud.status)?Ra(ud):ed(new AxiosError$1("Request failed with status code "+ud.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(ud.status/100)-4],ud.config,ud.request,ud))}function parseProtocol(Ra){const ed=/^([-+\w]{1,25})(:?\/\/|:)/.exec(Ra);return ed&&ed[1]||""}function speedometer(Ra,ed){Ra=Ra||10;const ud=new Array(Ra),dd=new Array(Ra);let hd=0,md=0,gd;return ed=ed!==void 0?ed:1e3,function(vd){const Cd=Date.now(),wd=dd[md];gd||(gd=Cd),ud[hd]=vd,dd[hd]=Cd;let Nd=md,Ld=0;for(;Nd!==hd;)Ld+=ud[Nd++],Nd=Nd%Ra;if(hd=(hd+1)%Ra,hd===md&&(md=(md+1)%Ra),Cd-gd{ud=wd,hd=null,md&&(clearTimeout(md),md=null),Ra.apply(null,Cd)};return[(...Cd)=>{const wd=Date.now(),Nd=wd-ud;Nd>=dd?gd(Cd,wd):(hd=Cd,md||(md=setTimeout(()=>{md=null,gd(hd)},dd-Nd)))},()=>hd&&gd(hd)]}const progressEventReducer=(Ra,ed,ud=3)=>{let dd=0;const hd=speedometer(50,250);return throttle(md=>{const gd=md.loaded,yd=md.lengthComputable?md.total:void 0,vd=gd-dd,Cd=hd(vd),wd=gd<=yd;dd=gd;const Nd={loaded:gd,total:yd,progress:yd?gd/yd:void 0,bytes:vd,rate:Cd||void 0,estimated:Cd&&yd&&wd?(yd-gd)/Cd:void 0,event:md,lengthComputable:yd!=null,[ed?"download":"upload"]:!0};Ra(Nd)},ud)},progressEventDecorator=(Ra,ed)=>{const ud=Ra!=null;return[dd=>ed[0]({lengthComputable:ud,total:Ra,loaded:dd}),ed[1]]},asyncDecorator=Ra=>(...ed)=>utils$2.asap(()=>Ra(...ed)),isURLSameOrigin=platform.hasStandardBrowserEnv?((Ra,ed)=>ud=>(ud=new URL(ud,platform.origin),Ra.protocol===ud.protocol&&Ra.host===ud.host&&(ed||Ra.port===ud.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(Ra,ed,ud,dd,hd,md){const gd=[Ra+"="+encodeURIComponent(ed)];utils$2.isNumber(ud)&&gd.push("expires="+new Date(ud).toGMTString()),utils$2.isString(dd)&&gd.push("path="+dd),utils$2.isString(hd)&&gd.push("domain="+hd),md===!0&&gd.push("secure"),document.cookie=gd.join("; ")},read(Ra){const ed=document.cookie.match(new RegExp("(^|;\\s*)("+Ra+")=([^;]*)"));return ed?decodeURIComponent(ed[3]):null},remove(Ra){this.write(Ra,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(Ra){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(Ra)}function combineURLs(Ra,ed){return ed?Ra.replace(/\/?\/$/,"")+"/"+ed.replace(/^\/+/,""):Ra}function buildFullPath(Ra,ed,ud){let dd=!isAbsoluteURL(ed);return Ra&&dd||ud==!1?combineURLs(Ra,ed):ed}const headersToObject=Ra=>Ra instanceof AxiosHeaders$1?{...Ra}:Ra;function mergeConfig$1(Ra,ed){ed=ed||{};const ud={};function dd(Cd,wd,Nd,Ld){return utils$2.isPlainObject(Cd)&&utils$2.isPlainObject(wd)?utils$2.merge.call({caseless:Ld},Cd,wd):utils$2.isPlainObject(wd)?utils$2.merge({},wd):utils$2.isArray(wd)?wd.slice():wd}function hd(Cd,wd,Nd,Ld){if(utils$2.isUndefined(wd)){if(!utils$2.isUndefined(Cd))return dd(void 0,Cd,Nd,Ld)}else return dd(Cd,wd,Nd,Ld)}function md(Cd,wd){if(!utils$2.isUndefined(wd))return dd(void 0,wd)}function gd(Cd,wd){if(utils$2.isUndefined(wd)){if(!utils$2.isUndefined(Cd))return dd(void 0,Cd)}else return dd(void 0,wd)}function yd(Cd,wd,Nd){if(Nd in ed)return dd(Cd,wd);if(Nd in Ra)return dd(void 0,Cd)}const vd={url:md,method:md,data:md,baseURL:gd,transformRequest:gd,transformResponse:gd,paramsSerializer:gd,timeout:gd,timeoutMessage:gd,withCredentials:gd,withXSRFToken:gd,adapter:gd,responseType:gd,xsrfCookieName:gd,xsrfHeaderName:gd,onUploadProgress:gd,onDownloadProgress:gd,decompress:gd,maxContentLength:gd,maxBodyLength:gd,beforeRedirect:gd,transport:gd,httpAgent:gd,httpsAgent:gd,cancelToken:gd,socketPath:gd,responseEncoding:gd,validateStatus:yd,headers:(Cd,wd,Nd)=>hd(headersToObject(Cd),headersToObject(wd),Nd,!0)};return utils$2.forEach(Object.keys(Object.assign({},Ra,ed)),function(wd){const Nd=vd[wd]||hd,Ld=Nd(Ra[wd],ed[wd],wd);utils$2.isUndefined(Ld)&&Nd!==yd||(ud[wd]=Ld)}),ud}const resolveConfig=Ra=>{const ed=mergeConfig$1({},Ra);let{data:ud,withXSRFToken:dd,xsrfHeaderName:hd,xsrfCookieName:md,headers:gd,auth:yd}=ed;ed.headers=gd=AxiosHeaders$1.from(gd),ed.url=buildURL(buildFullPath(ed.baseURL,ed.url),Ra.params,Ra.paramsSerializer),yd&&gd.set("Authorization","Basic "+btoa((yd.username||"")+":"+(yd.password?unescape(encodeURIComponent(yd.password)):"")));let vd;if(utils$2.isFormData(ud)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)gd.setContentType(void 0);else if((vd=gd.getContentType())!==!1){const[Cd,...wd]=vd?vd.split(";").map(Nd=>Nd.trim()).filter(Boolean):[];gd.setContentType([Cd||"multipart/form-data",...wd].join("; "))}}if(platform.hasStandardBrowserEnv&&(dd&&utils$2.isFunction(dd)&&(dd=dd(ed)),dd||dd!==!1&&isURLSameOrigin(ed.url))){const Cd=hd&&md&&cookies.read(md);Cd&&gd.set(hd,Cd)}return ed},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(Ra){return new Promise(function(ud,dd){const hd=resolveConfig(Ra);let md=hd.data;const gd=AxiosHeaders$1.from(hd.headers).normalize();let{responseType:yd,onUploadProgress:vd,onDownloadProgress:Cd}=hd,wd,Nd,Ld,Ud,jd;function Gd(){Ud&&Ud(),jd&&jd(),hd.cancelToken&&hd.cancelToken.unsubscribe(wd),hd.signal&&hd.signal.removeEventListener("abort",wd)}let Yd=new XMLHttpRequest;Yd.open(hd.method.toUpperCase(),hd.url,!0),Yd.timeout=hd.timeout;function zd(){if(!Yd)return;const Wd=AxiosHeaders$1.from("getAllResponseHeaders"in Yd&&Yd.getAllResponseHeaders()),Jd={data:!yd||yd==="text"||yd==="json"?Yd.responseText:Yd.response,status:Yd.status,statusText:Yd.statusText,headers:Wd,config:Ra,request:Yd};settle(function(mf){ud(mf),Gd()},function(mf){dd(mf),Gd()},Jd),Yd=null}"onloadend"in Yd?Yd.onloadend=zd:Yd.onreadystatechange=function(){!Yd||Yd.readyState!==4||Yd.status===0&&!(Yd.responseURL&&Yd.responseURL.indexOf("file:")===0)||setTimeout(zd)},Yd.onabort=function(){Yd&&(dd(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,Ra,Yd)),Yd=null)},Yd.onerror=function(){dd(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,Ra,Yd)),Yd=null},Yd.ontimeout=function(){let Xd=hd.timeout?"timeout of "+hd.timeout+"ms exceeded":"timeout exceeded";const Jd=hd.transitional||transitionalDefaults;hd.timeoutErrorMessage&&(Xd=hd.timeoutErrorMessage),dd(new AxiosError$1(Xd,Jd.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,Ra,Yd)),Yd=null},md===void 0&&gd.setContentType(null),"setRequestHeader"in Yd&&utils$2.forEach(gd.toJSON(),function(Xd,Jd){Yd.setRequestHeader(Jd,Xd)}),utils$2.isUndefined(hd.withCredentials)||(Yd.withCredentials=!!hd.withCredentials),yd&&yd!=="json"&&(Yd.responseType=hd.responseType),Cd&&([Ld,jd]=progressEventReducer(Cd,!0),Yd.addEventListener("progress",Ld)),vd&&Yd.upload&&([Nd,Ud]=progressEventReducer(vd),Yd.upload.addEventListener("progress",Nd),Yd.upload.addEventListener("loadend",Ud)),(hd.cancelToken||hd.signal)&&(wd=Wd=>{Yd&&(dd(!Wd||Wd.type?new CanceledError$1(null,Ra,Yd):Wd),Yd.abort(),Yd=null)},hd.cancelToken&&hd.cancelToken.subscribe(wd),hd.signal&&(hd.signal.aborted?wd():hd.signal.addEventListener("abort",wd)));const qd=parseProtocol(hd.url);if(qd&&platform.protocols.indexOf(qd)===-1){dd(new AxiosError$1("Unsupported protocol "+qd+":",AxiosError$1.ERR_BAD_REQUEST,Ra));return}Yd.send(md||null)})},composeSignals=(Ra,ed)=>{const{length:ud}=Ra=Ra?Ra.filter(Boolean):[];if(ed||ud){let dd=new AbortController,hd;const md=function(Cd){if(!hd){hd=!0,yd();const wd=Cd instanceof Error?Cd:this.reason;dd.abort(wd instanceof AxiosError$1?wd:new CanceledError$1(wd instanceof Error?wd.message:wd))}};let gd=ed&&setTimeout(()=>{gd=null,md(new AxiosError$1(`timeout ${ed} of ms exceeded`,AxiosError$1.ETIMEDOUT))},ed);const yd=()=>{Ra&&(gd&&clearTimeout(gd),gd=null,Ra.forEach(Cd=>{Cd.unsubscribe?Cd.unsubscribe(md):Cd.removeEventListener("abort",md)}),Ra=null)};Ra.forEach(Cd=>Cd.addEventListener("abort",md));const{signal:vd}=dd;return vd.unsubscribe=()=>utils$2.asap(yd),vd}},streamChunk=function*(Ra,ed){let ud=Ra.byteLength;if(ud{const hd=readBytes(Ra,ed);let md=0,gd,yd=vd=>{gd||(gd=!0,dd&&dd(vd))};return new ReadableStream({async pull(vd){try{const{done:Cd,value:wd}=await hd.next();if(Cd){yd(),vd.close();return}let Nd=wd.byteLength;if(ud){let Ld=md+=Nd;ud(Ld)}vd.enqueue(new Uint8Array(wd))}catch(Cd){throw yd(Cd),Cd}},cancel(vd){return yd(vd),hd.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(Ra=>ed=>Ra.encode(ed))(new TextEncoder):async Ra=>new Uint8Array(await new Response(Ra).arrayBuffer())),test=(Ra,...ed)=>{try{return!!Ra(...ed)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let Ra=!1;const ed=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return Ra=!0,"half"}}).headers.has("Content-Type");return Ra&&!ed}),DEFAULT_CHUNK_SIZE$1=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$2.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(Ra=>Ra.body)};isFetchSupported&&(Ra=>{["text","arrayBuffer","blob","formData","stream"].forEach(ed=>{!resolvers[ed]&&(resolvers[ed]=utils$2.isFunction(Ra[ed])?ud=>ud[ed]():(ud,dd)=>{throw new AxiosError$1(`Response type '${ed}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,dd)})})})(new Response);const getBodyLength=async Ra=>{if(Ra==null)return 0;if(utils$2.isBlob(Ra))return Ra.size;if(utils$2.isSpecCompliantForm(Ra))return(await new Request(platform.origin,{method:"POST",body:Ra}).arrayBuffer()).byteLength;if(utils$2.isArrayBufferView(Ra)||utils$2.isArrayBuffer(Ra))return Ra.byteLength;if(utils$2.isURLSearchParams(Ra)&&(Ra=Ra+""),utils$2.isString(Ra))return(await encodeText(Ra)).byteLength},resolveBodyLength=async(Ra,ed)=>{const ud=utils$2.toFiniteNumber(Ra.getContentLength());return ud??getBodyLength(ed)},fetchAdapter=isFetchSupported&&(async Ra=>{let{url:ed,method:ud,data:dd,signal:hd,cancelToken:md,timeout:gd,onDownloadProgress:yd,onUploadProgress:vd,responseType:Cd,headers:wd,withCredentials:Nd="same-origin",fetchOptions:Ld}=resolveConfig(Ra);Cd=Cd?(Cd+"").toLowerCase():"text";let Ud=composeSignals([hd,md&&md.toAbortSignal()],gd),jd;const Gd=Ud&&Ud.unsubscribe&&(()=>{Ud.unsubscribe()});let Yd;try{if(vd&&supportsRequestStream&&ud!=="get"&&ud!=="head"&&(Yd=await resolveBodyLength(wd,dd))!==0){let Jd=new Request(ed,{method:"POST",body:dd,duplex:"half"}),Zd;if(utils$2.isFormData(dd)&&(Zd=Jd.headers.get("content-type"))&&wd.setContentType(Zd),Jd.body){const[mf,xf]=progressEventDecorator(Yd,progressEventReducer(asyncDecorator(vd)));dd=trackStream(Jd.body,DEFAULT_CHUNK_SIZE$1,mf,xf)}}utils$2.isString(Nd)||(Nd=Nd?"include":"omit");const zd="credentials"in Request.prototype;jd=new Request(ed,{...Ld,signal:Ud,method:ud.toUpperCase(),headers:wd.normalize().toJSON(),body:dd,duplex:"half",credentials:zd?Nd:void 0});let qd=await fetch(jd);const Wd=supportsResponseStream&&(Cd==="stream"||Cd==="response");if(supportsResponseStream&&(yd||Wd&&Gd)){const Jd={};["status","statusText","headers"].forEach(_f=>{Jd[_f]=qd[_f]});const Zd=utils$2.toFiniteNumber(qd.headers.get("content-length")),[mf,xf]=yd&&progressEventDecorator(Zd,progressEventReducer(asyncDecorator(yd),!0))||[];qd=new Response(trackStream(qd.body,DEFAULT_CHUNK_SIZE$1,mf,()=>{xf&&xf(),Gd&&Gd()}),Jd)}Cd=Cd||"text";let Xd=await resolvers[utils$2.findKey(resolvers,Cd)||"text"](qd,Ra);return!Wd&&Gd&&Gd(),await new Promise((Jd,Zd)=>{settle(Jd,Zd,{data:Xd,headers:AxiosHeaders$1.from(qd.headers),status:qd.status,statusText:qd.statusText,config:Ra,request:jd})})}catch(zd){throw Gd&&Gd(),zd&&zd.name==="TypeError"&&/fetch/i.test(zd.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,Ra,jd),{cause:zd.cause||zd}):AxiosError$1.from(zd,zd&&zd.code,Ra,jd)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$2.forEach(knownAdapters,(Ra,ed)=>{if(Ra){try{Object.defineProperty(Ra,"name",{value:ed})}catch{}Object.defineProperty(Ra,"adapterName",{value:ed})}});const renderReason=Ra=>`- ${Ra}`,isResolvedHandle=Ra=>utils$2.isFunction(Ra)||Ra===null||Ra===!1,adapters={getAdapter:Ra=>{Ra=utils$2.isArray(Ra)?Ra:[Ra];const{length:ed}=Ra;let ud,dd;const hd={};for(let md=0;md`adapter ${yd} `+(vd===!1?"is not supported by the environment":"is not available in the build"));let gd=ed?md.length>1?`since : +`+md.map(renderReason).join(` +`):" "+renderReason(md[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+gd,"ERR_NOT_SUPPORT")}return dd},adapters:knownAdapters};function throwIfCancellationRequested(Ra){if(Ra.cancelToken&&Ra.cancelToken.throwIfRequested(),Ra.signal&&Ra.signal.aborted)throw new CanceledError$1(null,Ra)}function dispatchRequest(Ra){return throwIfCancellationRequested(Ra),Ra.headers=AxiosHeaders$1.from(Ra.headers),Ra.data=transformData.call(Ra,Ra.transformRequest),["post","put","patch"].indexOf(Ra.method)!==-1&&Ra.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(Ra.adapter||defaults$1.adapter)(Ra).then(function(dd){return throwIfCancellationRequested(Ra),dd.data=transformData.call(Ra,Ra.transformResponse,dd),dd.headers=AxiosHeaders$1.from(dd.headers),dd},function(dd){return isCancel$1(dd)||(throwIfCancellationRequested(Ra),dd&&dd.response&&(dd.response.data=transformData.call(Ra,Ra.transformResponse,dd.response),dd.response.headers=AxiosHeaders$1.from(dd.response.headers))),Promise.reject(dd)})}const VERSION$1="1.8.1",validators$1={};["object","boolean","number","function","string","symbol"].forEach((Ra,ed)=>{validators$1[Ra]=function(dd){return typeof dd===Ra||"a"+(ed<1?"n ":" ")+Ra}});const deprecatedWarnings={};validators$1.transitional=function(ed,ud,dd){function hd(md,gd){return"[Axios v"+VERSION$1+"] Transitional option '"+md+"'"+gd+(dd?". "+dd:"")}return(md,gd,yd)=>{if(ed===!1)throw new AxiosError$1(hd(gd," has been removed"+(ud?" in "+ud:"")),AxiosError$1.ERR_DEPRECATED);return ud&&!deprecatedWarnings[gd]&&(deprecatedWarnings[gd]=!0,console.warn(hd(gd," has been deprecated since v"+ud+" and will be removed in the near future"))),ed?ed(md,gd,yd):!0}};validators$1.spelling=function(ed){return(ud,dd)=>(console.warn(`${dd} is likely a misspelling of ${ed}`),!0)};function assertOptions(Ra,ed,ud){if(typeof Ra!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const dd=Object.keys(Ra);let hd=dd.length;for(;hd-- >0;){const md=dd[hd],gd=ed[md];if(gd){const yd=Ra[md],vd=yd===void 0||gd(yd,md,Ra);if(vd!==!0)throw new AxiosError$1("option "+md+" must be "+vd,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(ud!==!0)throw new AxiosError$1("Unknown option "+md,AxiosError$1.ERR_BAD_OPTION)}}const validator$3={assertOptions,validators:validators$1},validators=validator$3.validators;let Axios$1=class{constructor(ed){this.defaults=ed,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(ed,ud){try{return await this._request(ed,ud)}catch(dd){if(dd instanceof Error){let hd={};Error.captureStackTrace?Error.captureStackTrace(hd):hd=new Error;const md=hd.stack?hd.stack.replace(/^.+\n/,""):"";try{dd.stack?md&&!String(dd.stack).endsWith(md.replace(/^.+\n.+\n/,""))&&(dd.stack+=` +`+md):dd.stack=md}catch{}}throw dd}}_request(ed,ud){typeof ed=="string"?(ud=ud||{},ud.url=ed):ud=ed||{},ud=mergeConfig$1(this.defaults,ud);const{transitional:dd,paramsSerializer:hd,headers:md}=ud;dd!==void 0&&validator$3.assertOptions(dd,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),hd!=null&&(utils$2.isFunction(hd)?ud.paramsSerializer={serialize:hd}:validator$3.assertOptions(hd,{encode:validators.function,serialize:validators.function},!0)),ud.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?ud.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:ud.allowAbsoluteUrls=!0),validator$3.assertOptions(ud,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),ud.method=(ud.method||this.defaults.method||"get").toLowerCase();let gd=md&&utils$2.merge(md.common,md[ud.method]);md&&utils$2.forEach(["delete","get","head","post","put","patch","common"],jd=>{delete md[jd]}),ud.headers=AxiosHeaders$1.concat(gd,md);const yd=[];let vd=!0;this.interceptors.request.forEach(function(Gd){typeof Gd.runWhen=="function"&&Gd.runWhen(ud)===!1||(vd=vd&&Gd.synchronous,yd.unshift(Gd.fulfilled,Gd.rejected))});const Cd=[];this.interceptors.response.forEach(function(Gd){Cd.push(Gd.fulfilled,Gd.rejected)});let wd,Nd=0,Ld;if(!vd){const jd=[dispatchRequest.bind(this),void 0];for(jd.unshift.apply(jd,yd),jd.push.apply(jd,Cd),Ld=jd.length,wd=Promise.resolve(ud);Nd{if(!dd._listeners)return;let md=dd._listeners.length;for(;md-- >0;)dd._listeners[md](hd);dd._listeners=null}),this.promise.then=hd=>{let md;const gd=new Promise(yd=>{dd.subscribe(yd),md=yd}).then(hd);return gd.cancel=function(){dd.unsubscribe(md)},gd},ed(function(md,gd,yd){dd.reason||(dd.reason=new CanceledError$1(md,gd,yd),ud(dd.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(ed){if(this.reason){ed(this.reason);return}this._listeners?this._listeners.push(ed):this._listeners=[ed]}unsubscribe(ed){if(!this._listeners)return;const ud=this._listeners.indexOf(ed);ud!==-1&&this._listeners.splice(ud,1)}toAbortSignal(){const ed=new AbortController,ud=dd=>{ed.abort(dd)};return this.subscribe(ud),ed.signal.unsubscribe=()=>this.unsubscribe(ud),ed.signal}static source(){let ed;return{token:new YC(function(hd){ed=hd}),cancel:ed}}};function spread$1(Ra){return function(ud){return Ra.apply(null,ud)}}function isAxiosError$1(Ra){return utils$2.isObject(Ra)&&Ra.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HttpStatusCode$1).forEach(([Ra,ed])=>{HttpStatusCode$1[ed]=Ra});function createInstance(Ra){const ed=new Axios$1(Ra),ud=bind(Axios$1.prototype.request,ed);return utils$2.extend(ud,Axios$1.prototype,ed,{allOwnKeys:!0}),utils$2.extend(ud,ed,null,{allOwnKeys:!0}),ud.create=function(hd){return createInstance(mergeConfig$1(Ra,hd))},ud}const axios=createInstance(defaults$1);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(ed){return Promise.all(ed)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=Ra=>formDataToJSON(utils$2.isHTMLForm(Ra)?new FormData(Ra):Ra);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios,service=axios.create({baseURL:"",timeout:30*1e3});service.interceptors.request.use(Ra=>(/^(?:post|put|delete)$/i.test(`${Ra.method}`)&&Ra.data&&Ra.data.upload&&(Ra.headers["Content-Type"]="multipart/form-data"),Ra),Ra=>{Promise.reject(Ra)});service.interceptors.response.use(Ra=>Ra.data?Ra.data:Promise.reject(Ra),Ra=>Promise.reject(Ra));function utf16to8(Ra){let ed="";const ud=Ra.length;for(let dd=0;dd=1&&hd<=127?ed+=Ra.charAt(dd):hd>2047?(ed+=String.fromCharCode(224|hd>>12&15),ed+=String.fromCharCode(128|hd>>6&63),ed+=String.fromCharCode(128|hd&63)):(ed+=String.fromCharCode(192|hd>>6&31),ed+=String.fromCharCode(128|hd&63))}return ed}function utf8to16(Ra){let ed="",ud=0;const dd=Ra.length;for(;ud>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:ed+=Ra.charAt(ud-1);break;case 12:case 13:md=Ra.charCodeAt(ud++),ed+=String.fromCharCode((hd&31)<<6|md&63);break;case 14:md=Ra.charCodeAt(ud++),gd=Ra.charCodeAt(ud++),ed+=String.fromCharCode((hd&15)<<12|(md&63)<<6|gd&63);break}}return ed}const base64EncodeChars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",base64DecodeChars=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1];function base64encode(Ra){let ed="",ud=0;const dd=Ra.length;for(;ud>2),ed+=base64EncodeChars.charAt((hd&3)<<4),ed+="==";break}const md=Ra.charCodeAt(ud++);if(ud===dd){ed+=base64EncodeChars.charAt(hd>>2),ed+=base64EncodeChars.charAt((hd&3)<<4|(md&240)>>4),ed+=base64EncodeChars.charAt((md&15)<<2),ed+="=";break}const gd=Ra.charCodeAt(ud++);ed+=base64EncodeChars.charAt(hd>>2),ed+=base64EncodeChars.charAt((hd&3)<<4|(md&240)>>4),ed+=base64EncodeChars.charAt((md&15)<<2|(gd&192)>>6),ed+=base64EncodeChars.charAt(gd&63)}return ed}function base64decode(Ra){let ed,ud,dd,hd,md=0;const gd=Ra.length;let yd="";for(;md>4);do{if(dd=Ra.charCodeAt(md++)&255,dd===61)return yd;dd=base64DecodeChars[dd]}while(md>2);do{if(hd=Ra.charCodeAt(md++)&255,hd===61)return yd;hd=base64DecodeChars[hd]}while(md{let ed=Ra.httpHandler;return{setHttpHandler(ud){ed=ud},httpHandler(){return ed},updateHttpClientConfig(ud,dd){ed.updateHttpClientConfig(ud,dd)},httpHandlerConfigs(){return ed.httpHandlerConfigs()}}},resolveHttpHandlerRuntimeConfig=Ra=>({httpHandler:Ra.httpHandler()});var HttpAuthLocation;(function(Ra){Ra.HEADER="header",Ra.QUERY="query"})(HttpAuthLocation||(HttpAuthLocation={}));var HttpApiKeyAuthLocation;(function(Ra){Ra.HEADER="header",Ra.QUERY="query"})(HttpApiKeyAuthLocation||(HttpApiKeyAuthLocation={}));var EndpointURLScheme;(function(Ra){Ra.HTTP="http",Ra.HTTPS="https"})(EndpointURLScheme||(EndpointURLScheme={}));var AlgorithmId;(function(Ra){Ra.MD5="md5",Ra.CRC32="crc32",Ra.CRC32C="crc32c",Ra.SHA1="sha1",Ra.SHA256="sha256"})(AlgorithmId||(AlgorithmId={}));var FieldPosition;(function(Ra){Ra[Ra.HEADER=0]="HEADER",Ra[Ra.TRAILER=1]="TRAILER"})(FieldPosition||(FieldPosition={}));const SMITHY_CONTEXT_KEY="__smithy_context";var IniSectionType;(function(Ra){Ra.PROFILE="profile",Ra.SSO_SESSION="sso-session",Ra.SERVICES="services"})(IniSectionType||(IniSectionType={}));var RequestHandlerProtocol;(function(Ra){Ra.HTTP_0_9="http/0.9",Ra.HTTP_1_0="http/1.0",Ra.TDS_8_0="tds/8.0"})(RequestHandlerProtocol||(RequestHandlerProtocol={}));class HttpRequest{constructor(ed){this.method=ed.method||"GET",this.hostname=ed.hostname||"localhost",this.port=ed.port,this.query=ed.query||{},this.headers=ed.headers||{},this.body=ed.body,this.protocol=ed.protocol?ed.protocol.slice(-1)!==":"?`${ed.protocol}:`:ed.protocol:"https:",this.path=ed.path?ed.path.charAt(0)!=="/"?`/${ed.path}`:ed.path:"/",this.username=ed.username,this.password=ed.password,this.fragment=ed.fragment}static clone(ed){const ud=new HttpRequest({...ed,headers:{...ed.headers}});return ud.query&&(ud.query=cloneQuery(ud.query)),ud}static isInstance(ed){if(!ed)return!1;const ud=ed;return"method"in ud&&"protocol"in ud&&"hostname"in ud&&"path"in ud&&typeof ud.query=="object"&&typeof ud.headers=="object"}clone(){return HttpRequest.clone(this)}}function cloneQuery(Ra){return Object.keys(Ra).reduce((ed,ud)=>{const dd=Ra[ud];return{...ed,[ud]:Array.isArray(dd)?[...dd]:dd}},{})}class HttpResponse{constructor(ed){this.statusCode=ed.statusCode,this.reason=ed.reason,this.headers=ed.headers||{},this.body=ed.body}static isInstance(ed){if(!ed)return!1;const ud=ed;return typeof ud.statusCode=="number"&&typeof ud.headers=="object"}}function addExpectContinueMiddleware(Ra){return ed=>async ud=>{var hd,md;const{request:dd}=ud;return HttpRequest.isInstance(dd)&&dd.body&&Ra.runtime==="node"&&((md=(hd=Ra.requestHandler)==null?void 0:hd.constructor)==null?void 0:md.name)!=="FetchHttpHandler"&&(dd.headers={...dd.headers,Expect:"100-continue"}),ed({...ud,request:dd})}}const addExpectContinueMiddlewareOptions={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},getAddExpectContinuePlugin=Ra=>({applyToStack:ed=>{ed.add(addExpectContinueMiddleware(Ra),addExpectContinueMiddlewareOptions)}}),RequestChecksumCalculation={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},DEFAULT_REQUEST_CHECKSUM_CALCULATION=RequestChecksumCalculation.WHEN_SUPPORTED,ResponseChecksumValidation={WHEN_SUPPORTED:"WHEN_SUPPORTED",WHEN_REQUIRED:"WHEN_REQUIRED"},DEFAULT_RESPONSE_CHECKSUM_VALIDATION=RequestChecksumCalculation.WHEN_SUPPORTED;var ChecksumAlgorithm;(function(Ra){Ra.MD5="MD5",Ra.CRC32="CRC32",Ra.CRC32C="CRC32C",Ra.CRC64NVME="CRC64NVME",Ra.SHA1="SHA1",Ra.SHA256="SHA256"})(ChecksumAlgorithm||(ChecksumAlgorithm={}));var ChecksumLocation;(function(Ra){Ra.HEADER="header",Ra.TRAILER="trailer"})(ChecksumLocation||(ChecksumLocation={}));const DEFAULT_CHECKSUM_ALGORITHM=ChecksumAlgorithm.CRC32;var SelectorType$1;(function(Ra){Ra.ENV="env",Ra.CONFIG="shared config entry"})(SelectorType$1||(SelectorType$1={}));function setCredentialFeature(Ra,ed,ud){return Ra.$source||(Ra.$source={}),Ra.$source[ed]=ud,Ra}function setFeature$1(Ra,ed,ud){Ra.__aws_sdk_context?Ra.__aws_sdk_context.features||(Ra.__aws_sdk_context.features={}):Ra.__aws_sdk_context={features:{}},Ra.__aws_sdk_context.features[ed]=ud}const getDateHeader=Ra=>{var ed,ud;return HttpResponse.isInstance(Ra)?((ed=Ra.headers)==null?void 0:ed.date)??((ud=Ra.headers)==null?void 0:ud.Date):void 0},getSkewCorrectedDate=Ra=>new Date(Date.now()+Ra),isClockSkewed=(Ra,ed)=>Math.abs(getSkewCorrectedDate(ed).getTime()-Ra)>=3e5,getUpdatedSystemClockOffset=(Ra,ed)=>{const ud=Date.parse(Ra);return isClockSkewed(ud,ed)?ud-Date.now():ed},throwSigningPropertyError=(Ra,ed)=>{if(!ed)throw new Error(`Property \`${Ra}\` is not resolved for AWS SDK SigV4Auth`);return ed},validateSigningProperties=async Ra=>{var Cd,wd,Nd;const ed=throwSigningPropertyError("context",Ra.context),ud=throwSigningPropertyError("config",Ra.config),dd=(Nd=(wd=(Cd=ed.endpointV2)==null?void 0:Cd.properties)==null?void 0:wd.authSchemes)==null?void 0:Nd[0],md=await throwSigningPropertyError("signer",ud.signer)(dd),gd=Ra==null?void 0:Ra.signingRegion,yd=Ra==null?void 0:Ra.signingRegionSet,vd=Ra==null?void 0:Ra.signingName;return{config:ud,signer:md,signingRegion:gd,signingRegionSet:yd,signingName:vd}};class AwsSdkSigV4Signer{async sign(ed,ud,dd){var Nd;if(!HttpRequest.isInstance(ed))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const hd=await validateSigningProperties(dd),{config:md,signer:gd}=hd;let{signingRegion:yd,signingName:vd}=hd;const Cd=dd.context;if(((Nd=Cd==null?void 0:Cd.authSchemes)==null?void 0:Nd.length)??!1){const[Ld,Ud]=Cd.authSchemes;(Ld==null?void 0:Ld.name)==="sigv4a"&&(Ud==null?void 0:Ud.name)==="sigv4"&&(yd=(Ud==null?void 0:Ud.signingRegion)??yd,vd=(Ud==null?void 0:Ud.signingName)??vd)}return await gd.sign(ed,{signingDate:getSkewCorrectedDate(md.systemClockOffset),signingRegion:yd,signingService:vd})}errorHandler(ed){return ud=>{const dd=ud.ServerTime??getDateHeader(ud.$response);if(dd){const hd=throwSigningPropertyError("config",ed.config),md=hd.systemClockOffset;hd.systemClockOffset=getUpdatedSystemClockOffset(dd,hd.systemClockOffset),hd.systemClockOffset!==md&&ud.$metadata&&(ud.$metadata.clockSkewCorrected=!0)}throw ud}}successHandler(ed,ud){const dd=getDateHeader(ed);if(dd){const hd=throwSigningPropertyError("config",ud.config);hd.systemClockOffset=getUpdatedSystemClockOffset(dd,hd.systemClockOffset)}}}class AwsSdkSigV4ASigner extends AwsSdkSigV4Signer{async sign(ed,ud,dd){var Ld;if(!HttpRequest.isInstance(ed))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:hd,signer:md,signingRegion:gd,signingRegionSet:yd,signingName:vd}=await validateSigningProperties(dd),wd=(await((Ld=hd.sigv4aSigningRegionSet)==null?void 0:Ld.call(hd))??yd??[gd]).join(",");return await md.sign(ed,{signingDate:getSkewCorrectedDate(hd.systemClockOffset),signingRegion:wd,signingService:vd})}}const getSmithyContext=Ra=>Ra[SMITHY_CONTEXT_KEY]||(Ra[SMITHY_CONTEXT_KEY]={}),normalizeProvider$1=Ra=>{if(typeof Ra=="function")return Ra;const ed=Promise.resolve(Ra);return()=>ed};function convertHttpAuthSchemesToMap(Ra){const ed=new Map;for(const ud of Ra)ed.set(ud.schemeId,ud);return ed}const httpAuthSchemeMiddleware=(Ra,ed)=>(ud,dd)=>async hd=>{var Cd;const md=Ra.httpAuthSchemeProvider(await ed.httpAuthSchemeParametersProvider(Ra,dd,hd.input)),gd=convertHttpAuthSchemesToMap(Ra.httpAuthSchemes),yd=getSmithyContext(dd),vd=[];for(const wd of md){const Nd=gd.get(wd.schemeId);if(!Nd){vd.push(`HttpAuthScheme \`${wd.schemeId}\` was not enabled for this service.`);continue}const Ld=Nd.identityProvider(await ed.identityProviderConfigProvider(Ra));if(!Ld){vd.push(`HttpAuthScheme \`${wd.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:Ud={},signingProperties:jd={}}=((Cd=wd.propertiesExtractor)==null?void 0:Cd.call(wd,Ra,dd))||{};wd.identityProperties=Object.assign(wd.identityProperties||{},Ud),wd.signingProperties=Object.assign(wd.signingProperties||{},jd),yd.selectedHttpAuthScheme={httpAuthOption:wd,identity:await Ld(wd.identityProperties),signer:Nd.signer};break}if(!yd.selectedHttpAuthScheme)throw new Error(vd.join(` +`));return ud(hd)},httpAuthSchemeEndpointRuleSetMiddlewareOptions={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},getHttpAuthSchemeEndpointRuleSetPlugin=(Ra,{httpAuthSchemeParametersProvider:ed,identityProviderConfigProvider:ud})=>({applyToStack:dd=>{dd.addRelativeTo(httpAuthSchemeMiddleware(Ra,{httpAuthSchemeParametersProvider:ed,identityProviderConfigProvider:ud}),httpAuthSchemeEndpointRuleSetMiddlewareOptions)}}),deserializerMiddleware=(Ra,ed)=>(ud,dd)=>async hd=>{var gd,yd,vd,Cd;const{response:md}=await ud(hd);try{const wd=await ed(md,Ra);return{response:md,output:wd}}catch(wd){if(Object.defineProperty(wd,"$response",{value:md}),!("$metadata"in wd)){const Nd="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{wd.message+=` + `+Nd}catch{!dd.logger||((yd=(gd=dd.logger)==null?void 0:gd.constructor)==null?void 0:yd.name)==="NoOpLogger"?console.warn(Nd):(Cd=(vd=dd.logger)==null?void 0:vd.warn)==null||Cd.call(vd,Nd)}typeof wd.$responseBodyText<"u"&&wd.$response&&(wd.$response.body=wd.$responseBodyText)}throw wd}},serializerMiddleware=(Ra,ed)=>(ud,dd)=>async hd=>{var yd;const md=(yd=dd.endpointV2)!=null&&yd.url&&Ra.urlParser?async()=>Ra.urlParser(dd.endpointV2.url):Ra.endpoint;if(!md)throw new Error("No valid endpoint provider available.");const gd=await ed(hd.input,{...Ra,endpoint:md});return ud({...hd,request:gd})},deserializerMiddlewareOption={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},serializerMiddlewareOption={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function getSerdePlugin(Ra,ed,ud){return{applyToStack:dd=>{dd.add(deserializerMiddleware(Ra,ud),deserializerMiddlewareOption),dd.add(serializerMiddleware(Ra,ed),serializerMiddlewareOption)}}}serializerMiddlewareOption.name;const defaultErrorHandler$1=Ra=>ed=>{throw ed},defaultSuccessHandler$1=(Ra,ed)=>{},httpSigningMiddleware=Ra=>(ed,ud)=>async dd=>{if(!HttpRequest.isInstance(dd.request))return ed(dd);const md=getSmithyContext(ud).selectedHttpAuthScheme;if(!md)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:gd={}},identity:yd,signer:vd}=md,Cd=await ed({...dd,request:await vd.sign(dd.request,yd,gd)}).catch((vd.errorHandler||defaultErrorHandler$1)(gd));return(vd.successHandler||defaultSuccessHandler$1)(Cd.response,gd),Cd},httpSigningMiddlewareOptions={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},getHttpSigningPlugin=Ra=>({applyToStack:ed=>{ed.addRelativeTo(httpSigningMiddleware(),httpSigningMiddlewareOptions)}}),normalizeProvider=Ra=>{if(typeof Ra=="function")return Ra;const ed=Promise.resolve(Ra);return()=>ed},alphabetByEncoding={},alphabetByValue=new Array(64);for(let Ra=0,ed=65,ud=90;Ra+ed<=ud;Ra++){const dd=String.fromCharCode(Ra+ed);alphabetByEncoding[dd]=Ra,alphabetByValue[Ra]=dd}for(let Ra=0,ed=97,ud=122;Ra+ed<=ud;Ra++){const dd=String.fromCharCode(Ra+ed),hd=Ra+26;alphabetByEncoding[dd]=hd,alphabetByValue[hd]=dd}for(let Ra=0;Ra<10;Ra++){alphabetByEncoding[Ra.toString(10)]=Ra+52;const ed=Ra.toString(10),ud=Ra+52;alphabetByEncoding[ed]=ud,alphabetByValue[ud]=ed}alphabetByEncoding["+"]=62;alphabetByValue[62]="+";alphabetByEncoding["/"]=63;alphabetByValue[63]="/";const bitsPerLetter=6,bitsPerByte=8,maxLetterValue=63,fromBase64=Ra=>{let ed=Ra.length/4*3;Ra.slice(-2)==="=="?ed-=2:Ra.slice(-1)==="="&&ed--;const ud=new ArrayBuffer(ed),dd=new DataView(ud);for(let hd=0;hd>=bitsPerLetter;const yd=hd/4*3;md>>=gd%bitsPerByte;const vd=Math.floor(gd/bitsPerByte);for(let Cd=0;Cd>wd)}}return new Uint8Array(ud)},fromUtf8$3=Ra=>new TextEncoder().encode(Ra),toUint8Array=Ra=>typeof Ra=="string"?fromUtf8$3(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra),toUtf8=Ra=>{if(typeof Ra=="string")return Ra;if(typeof Ra!="object"||typeof Ra.byteOffset!="number"||typeof Ra.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(Ra)};function toBase64(Ra){let ed;typeof Ra=="string"?ed=fromUtf8$3(Ra):ed=Ra;const ud=typeof ed=="object"&&typeof ed.length=="number",dd=typeof ed=="object"&&typeof ed.byteOffset=="number"&&typeof ed.byteLength=="number";if(!ud&&!dd)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let hd="";for(let md=0;md>wd]}hd+="==".slice(0,4-vd)}return hd}function transformToString(Ra,ed="utf-8"){return ed==="base64"?toBase64(Ra):toUtf8(Ra)}function transformFromString(Ra,ed){return ed==="base64"?Uint8ArrayBlobAdapter.mutate(fromBase64(Ra)):Uint8ArrayBlobAdapter.mutate(fromUtf8$3(Ra))}class Uint8ArrayBlobAdapter extends Uint8Array{static fromString(ed,ud="utf-8"){switch(typeof ed){case"string":return transformFromString(ed,ud);default:throw new Error(`Unsupported conversion from ${typeof ed} to Uint8ArrayBlobAdapter.`)}}static mutate(ed){return Object.setPrototypeOf(ed,Uint8ArrayBlobAdapter.prototype),ed}transformToString(ed="utf-8"){return transformToString(this,ed)}}const ReadableStreamRef=typeof ReadableStream=="function"?ReadableStream:function(){};class ChecksumStream extends ReadableStreamRef{}const isReadableStream$2=Ra=>{var ed;return typeof ReadableStream=="function"&&(((ed=Ra==null?void 0:Ra.constructor)==null?void 0:ed.name)===ReadableStream.name||Ra instanceof ReadableStream)},createChecksumStream=({expectedChecksum:Ra,checksum:ed,source:ud,checksumSourceLocation:dd,base64Encoder:hd})=>{var vd;if(!isReadableStream$2(ud))throw new Error(`@smithy/util-stream: unsupported source type ${((vd=ud==null?void 0:ud.constructor)==null?void 0:vd.name)??ud} in ChecksumStream.`);const md=hd??toBase64;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const gd=new TransformStream({start(){},async transform(Cd,wd){ed.update(Cd),wd.enqueue(Cd)},async flush(Cd){const wd=await ed.digest(),Nd=md(wd);if(Ra!==Nd){const Ld=new Error(`Checksum mismatch: expected "${Ra}" but received "${Nd}" in response header "${dd}".`);Cd.error(Ld)}else Cd.terminate()}});ud.pipeThrough(gd);const yd=gd.readable;return Object.setPrototypeOf(yd,ChecksumStream.prototype),yd};class ByteArrayCollector{constructor(ed){this.allocByteArray=ed,this.byteLength=0,this.byteArrays=[]}push(ed){this.byteArrays.push(ed),this.byteLength+=ed.byteLength}flush(){if(this.byteArrays.length===1){const dd=this.byteArrays[0];return this.reset(),dd}const ed=this.allocByteArray(this.byteLength);let ud=0;for(let dd=0;ddnew Uint8Array(Cd))];let yd=-1;const vd=async Cd=>{const{value:wd,done:Nd}=await dd.read(),Ld=wd;if(Nd){if(yd!==-1){const Ud=flush(gd,yd);sizeOf(Ud)>0&&Cd.enqueue(Ud)}Cd.close()}else{const Ud=modeOf(Ld);if(yd!==Ud&&(yd>=0&&Cd.enqueue(flush(gd,yd)),yd=Ud),yd===-1){Cd.enqueue(Ld);return}const jd=sizeOf(Ld);md+=jd;const Gd=sizeOf(gd[yd]);if(jd>=ed&&Gd===0)Cd.enqueue(Ld);else{const Yd=merge(gd,yd,Ld);!hd&&md>ed*2&&(hd=!0,ud==null||ud.warn(`@smithy/util-stream - stream chunk size ${jd} is below threshold of ${ed}, automatically buffering.`)),Yd>=ed?Cd.enqueue(flush(gd,yd)):await vd(Cd)}}};return new ReadableStream({pull:vd})}const createBufferedReadable=createBufferedReadableStream;function merge(Ra,ed,ud){switch(ed){case 0:return Ra[0]+=ud,sizeOf(Ra[0]);case 1:case 2:return Ra[ed].push(ud),sizeOf(Ra[ed])}}function flush(Ra,ed){switch(ed){case 0:const ud=Ra[0];return Ra[0]="",ud;case 1:case 2:return Ra[ed].flush()}throw new Error(`@smithy/util-stream - invalid index ${ed} given to flush()`)}function sizeOf(Ra){return(Ra==null?void 0:Ra.byteLength)??(Ra==null?void 0:Ra.length)??0}function modeOf(Ra){return typeof Buffer$4<"u"&&Ra instanceof Buffer$4?2:Ra instanceof Uint8Array?1:typeof Ra=="string"?0:-1}const getAwsChunkedEncodingStream=(Ra,ed)=>{const{base64Encoder:ud,bodyLengthChecker:dd,checksumAlgorithmFn:hd,checksumLocationName:md,streamHasher:gd}=ed,yd=ud!==void 0&&dd!==void 0&&hd!==void 0&&md!==void 0&&gd!==void 0,vd=yd?gd(hd,Ra):void 0,Cd=Ra.getReader();return new ReadableStream({async pull(wd){const{value:Nd,done:Ld}=await Cd.read();if(Ld){if(wd.enqueue(`0\r +`),yd){const Ud=ud(await vd);wd.enqueue(`${md}:${Ud}\r +`),wd.enqueue(`\r +`)}wd.close()}else wd.enqueue(`${(dd(Nd)||0).toString(16)}\r ${Nd}\r -`)}})},escapeUri=Ra=>encodeURIComponent(Ra).replace(/[!'()*]/g,hexEncode),hexEncode=Ra=>`%${Ra.charCodeAt(0).toString(16).toUpperCase()}`;function buildQueryString(Ra){const qa=[];for(let rd of Object.keys(Ra).sort()){const sd=Ra[rd];if(rd=escapeUri(rd),Array.isArray(sd))for(let pd=0,fd=sd.length;pd{Ra&&setTimeout(()=>{const sd=new Error(`Request did not complete within ${Ra} ms`);sd.name="TimeoutError",rd(sd)},Ra)})}const keepAliveSupport={supported:void 0};class FetchHttpHandler{static create(qa){return typeof(qa==null?void 0:qa.handle)=="function"?qa:new FetchHttpHandler(qa)}constructor(qa){typeof qa=="function"?this.configProvider=qa().then(rd=>rd||{}):(this.config=qa??{},this.configProvider=Promise.resolve(this.config)),keepAliveSupport.supported===void 0&&(keepAliveSupport.supported=typeof Request<"u"&&"keepalive"in createRequest("https://[::1]"))}destroy(){}async handle(qa,{abortSignal:rd}={}){var Gd;this.config||(this.config=await this.configProvider);const sd=this.config.requestTimeout,pd=this.config.keepAlive===!0,fd=this.config.credentials;if(rd!=null&&rd.aborted){const Ud=new Error("Request aborted");return Ud.name="AbortError",Promise.reject(Ud)}let hd=qa.path;const md=buildQueryString(qa.query||{});md&&(hd+=`?${md}`),qa.fragment&&(hd+=`#${qa.fragment}`);let gd="";if(qa.username!=null||qa.password!=null){const Ud=qa.username??"",qd=qa.password??"";gd=`${Ud}:${qd}@`}const{port:yd,method:vd}=qa,Nd=`${qa.protocol}//${gd}${qa.hostname}${yd?`:${yd}`:""}${hd}`,Md=vd==="GET"||vd==="HEAD"?void 0:qa.body,Ld={body:Md,headers:new Headers(qa.headers),method:vd,credentials:fd};(Gd=this.config)!=null&&Gd.cache&&(Ld.cache=this.config.cache),Md&&(Ld.duplex="half"),typeof AbortController<"u"&&(Ld.signal=rd),keepAliveSupport.supported&&(Ld.keepalive=pd),typeof this.config.requestInit=="function"&&Object.assign(Ld,this.config.requestInit(qa));let Fd=()=>{};const Hd=createRequest(Nd,Ld),Vd=[fetch(Hd).then(Ud=>{const qd=Ud.headers,Wd={};for(const Xd of qd.entries())Wd[Xd[0]]=Xd[1];return Ud.body!=null?{response:new HttpResponse({headers:Wd,reason:Ud.statusText,statusCode:Ud.status,body:Ud.body})}:Ud.blob().then(Xd=>({response:new HttpResponse({headers:Wd,reason:Ud.statusText,statusCode:Ud.status,body:Xd})}))}),requestTimeout(sd)];return rd&&Vd.push(new Promise((Ud,qd)=>{const Wd=()=>{const Kd=new Error("Request aborted");Kd.name="AbortError",qd(Kd)};if(typeof rd.addEventListener=="function"){const Kd=rd;Kd.addEventListener("abort",Wd,{once:!0}),Fd=()=>Kd.removeEventListener("abort",Wd)}else rd.onabort=Wd})),Promise.race(Vd).finally(Fd)}updateHttpClientConfig(qa,rd){this.config=void 0,this.configProvider=this.configProvider.then(sd=>(sd[qa]=rd,sd))}httpHandlerConfigs(){return this.config??{}}}const streamCollector=async Ra=>{var qa;return typeof Blob=="function"&&Ra instanceof Blob||((qa=Ra.constructor)==null?void 0:qa.name)==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await Ra.arrayBuffer()):collectBlob(Ra):collectStream(Ra)};async function collectBlob(Ra){const qa=await readToBase64(Ra),rd=fromBase64(qa);return new Uint8Array(rd)}async function collectStream(Ra){const qa=[],rd=Ra.getReader();let sd=!1,pd=0;for(;!sd;){const{done:md,value:gd}=await rd.read();gd&&(qa.push(gd),pd+=gd.length),sd=md}const fd=new Uint8Array(pd);let hd=0;for(const md of qa)fd.set(md,hd),hd+=md.length;return fd}function readToBase64(Ra){return new Promise((qa,rd)=>{const sd=new FileReader;sd.onloadend=()=>{if(sd.readyState!==2)return rd(new Error("Reader aborted too early"));const pd=sd.result??"",fd=pd.indexOf(","),hd=fd>-1?fd+1:pd.length;qa(pd.substring(hd))},sd.onabort=()=>rd(new Error("Read aborted")),sd.onerror=()=>rd(sd.error),sd.readAsDataURL(Ra)})}const SHORT_TO_HEX={},HEX_TO_SHORT={};for(let Ra=0;Ra<256;Ra++){let qa=Ra.toString(16).toLowerCase();qa.length===1&&(qa=`0${qa}`),SHORT_TO_HEX[Ra]=qa,HEX_TO_SHORT[qa]=Ra}function fromHex(Ra){if(Ra.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const qa=new Uint8Array(Ra.length/2);for(let rd=0;rd{var qa;return typeof ReadableStream=="function"&&(((qa=Ra==null?void 0:Ra.constructor)==null?void 0:qa.name)===ReadableStream.name||Ra instanceof ReadableStream)},ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED="The stream has already been transformed.",sdkStreamMixin=Ra=>{var pd,fd;if(!isBlobInstance(Ra)&&!isReadableStream$2(Ra)){const hd=((fd=(pd=Ra==null?void 0:Ra.__proto__)==null?void 0:pd.constructor)==null?void 0:fd.name)||Ra;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${hd}`)}let qa=!1;const rd=async()=>{if(qa)throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);return qa=!0,await streamCollector(Ra)},sd=hd=>{if(typeof hd.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. -If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return hd.stream()};return Object.assign(Ra,{transformToByteArray:rd,transformToString:async hd=>{const md=await rd();if(hd==="base64")return toBase64(md);if(hd==="hex")return toHex(md);if(hd===void 0||hd==="utf8"||hd==="utf-8")return toUtf8(md);if(typeof TextDecoder=="function")return new TextDecoder(hd).decode(md);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(qa)throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);if(qa=!0,isBlobInstance(Ra))return sd(Ra);if(isReadableStream$2(Ra))return Ra;throw new Error(`Cannot transform payload to web stream, got ${Ra}`)}})},isBlobInstance=Ra=>typeof Blob=="function"&&Ra instanceof Blob;async function splitStream(Ra){return typeof Ra.stream=="function"&&(Ra=Ra.stream()),Ra.tee()}async function headStream(Ra,qa){let rd=0;const sd=[],pd=Ra.getReader();let fd=!1;for(;!fd;){const{done:gd,value:yd}=await pd.read();if(yd&&(sd.push(yd),rd+=(yd==null?void 0:yd.byteLength)??0),rd>=qa)break;fd=gd}pd.releaseLock();const hd=new Uint8Array(Math.min(qa,rd));let md=0;for(const gd of sd){if(gd.byteLength>hd.byteLength-md){hd.set(gd.subarray(0,hd.byteLength-md),md);break}else hd.set(gd,md);md+=gd.length}return hd}const ReadableStreamRef=typeof ReadableStream=="function"?ReadableStream:function(){};class ChecksumStream extends ReadableStreamRef{}const createChecksumStream=({expectedChecksum:Ra,checksum:qa,source:rd,checksumSourceLocation:sd,base64Encoder:pd})=>{var gd;if(!isReadableStream$2(rd))throw new Error(`@smithy/util-stream: unsupported source type ${((gd=rd==null?void 0:rd.constructor)==null?void 0:gd.name)??rd} in ChecksumStream.`);const fd=pd??toBase64;if(typeof TransformStream!="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");const hd=new TransformStream({start(){},async transform(yd,vd){qa.update(yd),vd.enqueue(yd)},async flush(yd){const vd=await qa.digest(),Nd=fd(vd);if(Ra!==Nd){const Md=new Error(`Checksum mismatch: expected "${Ra}" but received "${Nd}" in response header "${sd}".`);yd.error(Md)}else yd.terminate()}});rd.pipeThrough(hd);const md=hd.readable;return Object.setPrototypeOf(md,ChecksumStream.prototype),md},collectBody$1=async(Ra=new Uint8Array,qa)=>{if(Ra instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(Ra);if(!Ra)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);const rd=qa.streamCollector(Ra);return Uint8ArrayBlobAdapter.mutate(await rd)};function extendedEncodeURIComponent(Ra){return encodeURIComponent(Ra).replace(/[!'()*]/g,function(qa){return"%"+qa.charCodeAt(0).toString(16).toUpperCase()})}const resolvedPath=(Ra,qa,rd,sd,pd,fd)=>{if(qa!=null&&qa[rd]!==void 0){const hd=sd();if(hd.length<=0)throw new Error("Empty value provided for input HTTP label: "+rd+".");Ra=Ra.replace(pd,fd?hd.split("/").map(md=>extendedEncodeURIComponent(md)).join("/"):extendedEncodeURIComponent(hd))}else throw new Error("No value provided for input HTTP label: "+rd+".");return Ra};function requestBuilder(Ra,qa){return new RequestBuilder(Ra,qa)}class RequestBuilder{constructor(qa,rd){this.input=qa,this.context=rd,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:qa,protocol:rd="https",port:sd,path:pd}=await this.context.endpoint();this.path=pd;for(const fd of this.resolvePathStack)fd(this.path);return new HttpRequest({protocol:rd,hostname:this.hostname||qa,port:sd,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(qa){return this.hostname=qa,this}bp(qa){return this.resolvePathStack.push(rd=>{this.path=`${rd!=null&&rd.endsWith("/")?rd.slice(0,-1):rd||""}`+qa}),this}p(qa,rd,sd,pd){return this.resolvePathStack.push(fd=>{this.path=resolvedPath(fd,this.input,qa,rd,sd,pd)}),this}h(qa){return this.headers=qa,this}q(qa){return this.query=qa,this}b(qa){return this.body=qa,this}m(qa){return this.method=qa,this}}function setFeature(Ra,qa,rd){Ra.__smithy_context?Ra.__smithy_context.features||(Ra.__smithy_context.features={}):Ra.__smithy_context={features:{}},Ra.__smithy_context.features[qa]=rd}class DefaultIdentityProviderConfig{constructor(qa){this.authSchemes=new Map;for(const[rd,sd]of Object.entries(qa))sd!==void 0&&this.authSchemes.set(rd,sd)}getIdentityProvider(qa){return this.authSchemes.get(qa)}}const createIsIdentityExpiredFunction=Ra=>qa=>doesIdentityRequireRefresh(qa)&&qa.expiration.getTime()-Date.now()Ra.expiration!==void 0,memoizeIdentityProvider=(Ra,qa,rd)=>{if(Ra===void 0)return;const sd=typeof Ra!="function"?async()=>Promise.resolve(Ra):Ra;let pd,fd,hd,md=!1;const gd=async yd=>{fd||(fd=sd(yd));try{pd=await fd,hd=!0,md=!1}finally{fd=void 0}return pd};return qa===void 0?async yd=>((!hd||yd!=null&&yd.forceRefresh)&&(pd=await gd(yd)),pd):async yd=>((!hd||yd!=null&&yd.forceRefresh)&&(pd=await gd(yd)),md?pd:rd(pd)?(qa(pd)&&await gd(yd),pd):(md=!0,pd))},memoize$1=(Ra,qa,rd)=>{let sd,pd,fd,hd=!1;const md=async()=>{pd||(pd=Ra());try{sd=await pd,fd=!0,hd=!1}finally{pd=void 0}return sd};return async gd=>((!fd||gd!=null&&gd.forceRefresh)&&(sd=await md()),sd)},resolveAwsSdkSigV4AConfig=Ra=>(Ra.sigv4aSigningRegionSet=normalizeProvider(Ra.sigv4aSigningRegionSet),Ra),ALGORITHM_QUERY_PARAM="X-Amz-Algorithm",CREDENTIAL_QUERY_PARAM="X-Amz-Credential",AMZ_DATE_QUERY_PARAM="X-Amz-Date",SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders",EXPIRES_QUERY_PARAM="X-Amz-Expires",SIGNATURE_QUERY_PARAM="X-Amz-Signature",TOKEN_QUERY_PARAM="X-Amz-Security-Token",AUTH_HEADER="authorization",AMZ_DATE_HEADER=AMZ_DATE_QUERY_PARAM.toLowerCase(),DATE_HEADER="date",GENERATED_HEADERS=[AUTH_HEADER,AMZ_DATE_HEADER,DATE_HEADER],SIGNATURE_HEADER=SIGNATURE_QUERY_PARAM.toLowerCase(),SHA256_HEADER="x-amz-content-sha256",TOKEN_HEADER=TOKEN_QUERY_PARAM.toLowerCase(),ALWAYS_UNSIGNABLE_HEADERS={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},PROXY_HEADER_PATTERN=/^proxy-/,SEC_HEADER_PATTERN=/^sec-/,ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256",EVENT_ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256-PAYLOAD",UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD",MAX_CACHE_SIZE=50,KEY_TYPE_IDENTIFIER="aws4_request",MAX_PRESIGNED_TTL=60*60*24*7,signingKeyCache={},cacheQueue=[],createScope=(Ra,qa,rd)=>`${Ra}/${qa}/${rd}/${KEY_TYPE_IDENTIFIER}`,getSigningKey$1=async(Ra,qa,rd,sd,pd)=>{const fd=await hmac$1(Ra,qa.secretAccessKey,qa.accessKeyId),hd=`${rd}:${sd}:${pd}:${toHex(fd)}:${qa.sessionToken}`;if(hd in signingKeyCache)return signingKeyCache[hd];for(cacheQueue.push(hd);cacheQueue.length>MAX_CACHE_SIZE;)delete signingKeyCache[cacheQueue.shift()];let md=`AWS4${qa.secretAccessKey}`;for(const gd of[rd,sd,pd,KEY_TYPE_IDENTIFIER])md=await hmac$1(Ra,md,gd);return signingKeyCache[hd]=md},hmac$1=(Ra,qa,rd)=>{const sd=new Ra(qa);return sd.update(toUint8Array(rd)),sd.digest()},getCanonicalHeaders=({headers:Ra},qa,rd)=>{const sd={};for(const pd of Object.keys(Ra).sort()){if(Ra[pd]==null)continue;const fd=pd.toLowerCase();(fd in ALWAYS_UNSIGNABLE_HEADERS||qa!=null&&qa.has(fd)||PROXY_HEADER_PATTERN.test(fd)||SEC_HEADER_PATTERN.test(fd))&&(!rd||rd&&!rd.has(fd))||(sd[fd]=Ra[pd].trim().replace(/\s+/g," "))}return sd},getCanonicalQuery=({query:Ra={}})=>{const qa=[],rd={};for(const sd of Object.keys(Ra)){if(sd.toLowerCase()===SIGNATURE_HEADER)continue;const pd=escapeUri(sd);qa.push(pd);const fd=Ra[sd];typeof fd=="string"?rd[pd]=`${pd}=${escapeUri(fd)}`:Array.isArray(fd)&&(rd[pd]=fd.slice(0).reduce((hd,md)=>hd.concat([`${pd}=${escapeUri(md)}`]),[]).sort().join("&"))}return qa.sort().map(sd=>rd[sd]).filter(sd=>sd).join("&")},isArrayBuffer$1=Ra=>typeof ArrayBuffer=="function"&&Ra instanceof ArrayBuffer||Object.prototype.toString.call(Ra)==="[object ArrayBuffer]",getPayloadHash=async({headers:Ra,body:qa},rd)=>{for(const sd of Object.keys(Ra))if(sd.toLowerCase()===SHA256_HEADER)return Ra[sd];if(qa==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof qa=="string"||ArrayBuffer.isView(qa)||isArrayBuffer$1(qa)){const sd=new rd;return sd.update(toUint8Array(qa)),toHex(await sd.digest())}return UNSIGNED_PAYLOAD};class HeaderFormatter{format(qa){const rd=[];for(const fd of Object.keys(qa)){const hd=fromUtf8$3(fd);rd.push(Uint8Array.from([hd.byteLength]),hd,this.formatHeaderValue(qa[fd]))}const sd=new Uint8Array(rd.reduce((fd,hd)=>fd+hd.byteLength,0));let pd=0;for(const fd of rd)sd.set(fd,pd),pd+=fd.byteLength;return sd}formatHeaderValue(qa){switch(qa.type){case"boolean":return Uint8Array.from([qa.value?0:1]);case"byte":return Uint8Array.from([2,qa.value]);case"short":const rd=new DataView(new ArrayBuffer(3));return rd.setUint8(0,3),rd.setInt16(1,qa.value,!1),new Uint8Array(rd.buffer);case"integer":const sd=new DataView(new ArrayBuffer(5));return sd.setUint8(0,4),sd.setInt32(1,qa.value,!1),new Uint8Array(sd.buffer);case"long":const pd=new Uint8Array(9);return pd[0]=5,pd.set(qa.value.bytes,1),pd;case"binary":const fd=new DataView(new ArrayBuffer(3+qa.value.byteLength));fd.setUint8(0,6),fd.setUint16(1,qa.value.byteLength,!1);const hd=new Uint8Array(fd.buffer);return hd.set(qa.value,3),hd;case"string":const md=fromUtf8$3(qa.value),gd=new DataView(new ArrayBuffer(3+md.byteLength));gd.setUint8(0,7),gd.setUint16(1,md.byteLength,!1);const yd=new Uint8Array(gd.buffer);return yd.set(md,3),yd;case"timestamp":const vd=new Uint8Array(9);return vd[0]=8,vd.set(Int64$1.fromNumber(qa.value.valueOf()).bytes,1),vd;case"uuid":if(!UUID_PATTERN$1.test(qa.value))throw new Error(`Invalid UUID received: ${qa.value}`);const Nd=new Uint8Array(17);return Nd[0]=9,Nd.set(fromHex(qa.value.replace(/\-/g,"")),1),Nd}}}var HEADER_VALUE_TYPE$1;(function(Ra){Ra[Ra.boolTrue=0]="boolTrue",Ra[Ra.boolFalse=1]="boolFalse",Ra[Ra.byte=2]="byte",Ra[Ra.short=3]="short",Ra[Ra.integer=4]="integer",Ra[Ra.long=5]="long",Ra[Ra.byteArray=6]="byteArray",Ra[Ra.string=7]="string",Ra[Ra.timestamp=8]="timestamp",Ra[Ra.uuid=9]="uuid"})(HEADER_VALUE_TYPE$1||(HEADER_VALUE_TYPE$1={}));const UUID_PATTERN$1=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Int64$1=class VC{constructor(qa){if(this.bytes=qa,qa.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(qa){if(qa>9223372036854776e3||qa<-9223372036854776e3)throw new Error(`${qa} is too large (or, if negative, too small) to represent as an Int64`);const rd=new Uint8Array(8);for(let sd=7,pd=Math.abs(Math.round(qa));sd>-1&&pd>0;sd--,pd/=256)rd[sd]=pd;return qa<0&&negate$1(rd),new VC(rd)}valueOf(){const qa=this.bytes.slice(0),rd=qa[0]&128;return rd&&negate$1(qa),parseInt(toHex(qa),16)*(rd?-1:1)}toString(){return String(this.valueOf())}};function negate$1(Ra){for(let qa=0;qa<8;qa++)Ra[qa]^=255;for(let qa=7;qa>-1&&(Ra[qa]++,Ra[qa]===0);qa--);}const hasHeader$1=(Ra,qa)=>{Ra=Ra.toLowerCase();for(const rd of Object.keys(qa))if(Ra===rd.toLowerCase())return!0;return!1},moveHeadersToQuery=(Ra,qa={})=>{var pd,fd;const{headers:rd,query:sd={}}=HttpRequest.clone(Ra);for(const hd of Object.keys(rd)){const md=hd.toLowerCase();(md.slice(0,6)==="x-amz-"&&!((pd=qa.unhoistableHeaders)!=null&&pd.has(md))||(fd=qa.hoistableHeaders)!=null&&fd.has(md))&&(sd[hd]=rd[hd],delete rd[hd])}return{...Ra,headers:rd,query:sd}},prepareRequest=Ra=>{Ra=HttpRequest.clone(Ra);for(const qa of Object.keys(Ra.headers))GENERATED_HEADERS.indexOf(qa.toLowerCase())>-1&&delete Ra.headers[qa];return Ra},iso8601=Ra=>toDate(Ra).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=Ra=>typeof Ra=="number"?new Date(Ra*1e3):typeof Ra=="string"?Number(Ra)?new Date(Number(Ra)*1e3):new Date(Ra):Ra;class SignatureV4{constructor({applyChecksum:qa,credentials:rd,region:sd,service:pd,sha256:fd,uriEscapePath:hd=!0}){this.headerFormatter=new HeaderFormatter,this.service=pd,this.sha256=fd,this.uriEscapePath=hd,this.applyChecksum=typeof qa=="boolean"?qa:!0,this.regionProvider=normalizeProvider$1(sd),this.credentialProvider=normalizeProvider$1(rd)}async presign(qa,rd={}){const{signingDate:sd=new Date,expiresIn:pd=3600,unsignableHeaders:fd,unhoistableHeaders:hd,signableHeaders:md,hoistableHeaders:gd,signingRegion:yd,signingService:vd}=rd,Nd=await this.credentialProvider();this.validateResolvedCredentials(Nd);const Md=yd??await this.regionProvider(),{longDate:Ld,shortDate:Fd}=formatDate(sd);if(pd>MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Hd=createScope(Fd,Md,vd??this.service),Vd=moveHeadersToQuery(prepareRequest(qa),{unhoistableHeaders:hd,hoistableHeaders:gd});Nd.sessionToken&&(Vd.query[TOKEN_QUERY_PARAM]=Nd.sessionToken),Vd.query[ALGORITHM_QUERY_PARAM]=ALGORITHM_IDENTIFIER,Vd.query[CREDENTIAL_QUERY_PARAM]=`${Nd.accessKeyId}/${Hd}`,Vd.query[AMZ_DATE_QUERY_PARAM]=Ld,Vd.query[EXPIRES_QUERY_PARAM]=pd.toString(10);const Gd=getCanonicalHeaders(Vd,fd,md);return Vd.query[SIGNED_HEADERS_QUERY_PARAM]=getCanonicalHeaderList(Gd),Vd.query[SIGNATURE_QUERY_PARAM]=await this.getSignature(Ld,Hd,this.getSigningKey(Nd,Md,Fd,vd),this.createCanonicalRequest(Vd,Gd,await getPayloadHash(qa,this.sha256))),Vd}async sign(qa,rd){return typeof qa=="string"?this.signString(qa,rd):qa.headers&&qa.payload?this.signEvent(qa,rd):qa.message?this.signMessage(qa,rd):this.signRequest(qa,rd)}async signEvent({headers:qa,payload:rd},{signingDate:sd=new Date,priorSignature:pd,signingRegion:fd,signingService:hd}){const md=fd??await this.regionProvider(),{shortDate:gd,longDate:yd}=formatDate(sd),vd=createScope(gd,md,hd??this.service),Nd=await getPayloadHash({headers:{},body:rd},this.sha256),Md=new this.sha256;Md.update(qa);const Ld=toHex(await Md.digest()),Fd=[EVENT_ALGORITHM_IDENTIFIER,yd,vd,pd,Ld,Nd].join(` -`);return this.signString(Fd,{signingDate:sd,signingRegion:md,signingService:hd})}async signMessage(qa,{signingDate:rd=new Date,signingRegion:sd,signingService:pd}){return this.signEvent({headers:this.headerFormatter.format(qa.message.headers),payload:qa.message.body},{signingDate:rd,signingRegion:sd,signingService:pd,priorSignature:qa.priorSignature}).then(hd=>({message:qa.message,signature:hd}))}async signString(qa,{signingDate:rd=new Date,signingRegion:sd,signingService:pd}={}){const fd=await this.credentialProvider();this.validateResolvedCredentials(fd);const hd=sd??await this.regionProvider(),{shortDate:md}=formatDate(rd),gd=new this.sha256(await this.getSigningKey(fd,hd,md,pd));return gd.update(toUint8Array(qa)),toHex(await gd.digest())}async signRequest(qa,{signingDate:rd=new Date,signableHeaders:sd,unsignableHeaders:pd,signingRegion:fd,signingService:hd}={}){const md=await this.credentialProvider();this.validateResolvedCredentials(md);const gd=fd??await this.regionProvider(),yd=prepareRequest(qa),{longDate:vd,shortDate:Nd}=formatDate(rd),Md=createScope(Nd,gd,hd??this.service);yd.headers[AMZ_DATE_HEADER]=vd,md.sessionToken&&(yd.headers[TOKEN_HEADER]=md.sessionToken);const Ld=await getPayloadHash(yd,this.sha256);!hasHeader$1(SHA256_HEADER,yd.headers)&&this.applyChecksum&&(yd.headers[SHA256_HEADER]=Ld);const Fd=getCanonicalHeaders(yd,pd,sd),Hd=await this.getSignature(vd,Md,this.getSigningKey(md,gd,Nd,hd),this.createCanonicalRequest(yd,Fd,Ld));return yd.headers[AUTH_HEADER]=`${ALGORITHM_IDENTIFIER} Credential=${md.accessKeyId}/${Md}, SignedHeaders=${getCanonicalHeaderList(Fd)}, Signature=${Hd}`,yd}createCanonicalRequest(qa,rd,sd){const pd=Object.keys(rd).sort();return`${qa.method} -${this.getCanonicalPath(qa)} -${getCanonicalQuery(qa)} -${pd.map(fd=>`${fd}:${rd[fd]}`).join(` +`)}})};async function headStream(Ra,ed){let ud=0;const dd=[],hd=Ra.getReader();let md=!1;for(;!md;){const{done:vd,value:Cd}=await hd.read();if(Cd&&(dd.push(Cd),ud+=(Cd==null?void 0:Cd.byteLength)??0),ud>=ed)break;md=vd}hd.releaseLock();const gd=new Uint8Array(Math.min(ed,ud));let yd=0;for(const vd of dd){if(vd.byteLength>gd.byteLength-yd){gd.set(vd.subarray(0,gd.byteLength-yd),yd);break}else gd.set(vd,yd);yd+=vd.length}return gd}const escapeUri=Ra=>encodeURIComponent(Ra).replace(/[!'()*]/g,hexEncode),hexEncode=Ra=>`%${Ra.charCodeAt(0).toString(16).toUpperCase()}`;function buildQueryString(Ra){const ed=[];for(let ud of Object.keys(Ra).sort()){const dd=Ra[ud];if(ud=escapeUri(ud),Array.isArray(dd))for(let hd=0,md=dd.length;hd{Ra&&setTimeout(()=>{const dd=new Error(`Request did not complete within ${Ra} ms`);dd.name="TimeoutError",ud(dd)},Ra)})}const keepAliveSupport={supported:void 0};class FetchHttpHandler{static create(ed){return typeof(ed==null?void 0:ed.handle)=="function"?ed:new FetchHttpHandler(ed)}constructor(ed){typeof ed=="function"?this.configProvider=ed().then(ud=>ud||{}):(this.config=ed??{},this.configProvider=Promise.resolve(this.config)),keepAliveSupport.supported===void 0&&(keepAliveSupport.supported=typeof Request<"u"&&"keepalive"in createRequest("https://[::1]"))}destroy(){}async handle(ed,{abortSignal:ud}={}){var zd;this.config||(this.config=await this.configProvider);const dd=this.config.requestTimeout,hd=this.config.keepAlive===!0,md=this.config.credentials;if(ud!=null&&ud.aborted){const qd=new Error("Request aborted");return qd.name="AbortError",Promise.reject(qd)}let gd=ed.path;const yd=buildQueryString(ed.query||{});yd&&(gd+=`?${yd}`),ed.fragment&&(gd+=`#${ed.fragment}`);let vd="";if(ed.username!=null||ed.password!=null){const qd=ed.username??"",Wd=ed.password??"";vd=`${qd}:${Wd}@`}const{port:Cd,method:wd}=ed,Nd=`${ed.protocol}//${vd}${ed.hostname}${Cd?`:${Cd}`:""}${gd}`,Ld=wd==="GET"||wd==="HEAD"?void 0:ed.body,Ud={body:Ld,headers:new Headers(ed.headers),method:wd,credentials:md};(zd=this.config)!=null&&zd.cache&&(Ud.cache=this.config.cache),Ld&&(Ud.duplex="half"),typeof AbortController<"u"&&(Ud.signal=ud),keepAliveSupport.supported&&(Ud.keepalive=hd),typeof this.config.requestInit=="function"&&Object.assign(Ud,this.config.requestInit(ed));let jd=()=>{};const Gd=createRequest(Nd,Ud),Yd=[fetch(Gd).then(qd=>{const Wd=qd.headers,Xd={};for(const Zd of Wd.entries())Xd[Zd[0]]=Zd[1];return qd.body!=null?{response:new HttpResponse({headers:Xd,reason:qd.statusText,statusCode:qd.status,body:qd.body})}:qd.blob().then(Zd=>({response:new HttpResponse({headers:Xd,reason:qd.statusText,statusCode:qd.status,body:Zd})}))}),requestTimeout(dd)];return ud&&Yd.push(new Promise((qd,Wd)=>{const Xd=()=>{const Jd=new Error("Request aborted");Jd.name="AbortError",Wd(Jd)};if(typeof ud.addEventListener=="function"){const Jd=ud;Jd.addEventListener("abort",Xd,{once:!0}),jd=()=>Jd.removeEventListener("abort",Xd)}else ud.onabort=Xd})),Promise.race(Yd).finally(jd)}updateHttpClientConfig(ed,ud){this.config=void 0,this.configProvider=this.configProvider.then(dd=>(dd[ed]=ud,dd))}httpHandlerConfigs(){return this.config??{}}}const streamCollector=async Ra=>{var ed;return typeof Blob=="function"&&Ra instanceof Blob||((ed=Ra.constructor)==null?void 0:ed.name)==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await Ra.arrayBuffer()):collectBlob(Ra):collectStream(Ra)};async function collectBlob(Ra){const ed=await readToBase64(Ra),ud=fromBase64(ed);return new Uint8Array(ud)}async function collectStream(Ra){const ed=[],ud=Ra.getReader();let dd=!1,hd=0;for(;!dd;){const{done:yd,value:vd}=await ud.read();vd&&(ed.push(vd),hd+=vd.length),dd=yd}const md=new Uint8Array(hd);let gd=0;for(const yd of ed)md.set(yd,gd),gd+=yd.length;return md}function readToBase64(Ra){return new Promise((ed,ud)=>{const dd=new FileReader;dd.onloadend=()=>{if(dd.readyState!==2)return ud(new Error("Reader aborted too early"));const hd=dd.result??"",md=hd.indexOf(","),gd=md>-1?md+1:hd.length;ed(hd.substring(gd))},dd.onabort=()=>ud(new Error("Read aborted")),dd.onerror=()=>ud(dd.error),dd.readAsDataURL(Ra)})}const SHORT_TO_HEX={},HEX_TO_SHORT={};for(let Ra=0;Ra<256;Ra++){let ed=Ra.toString(16).toLowerCase();ed.length===1&&(ed=`0${ed}`),SHORT_TO_HEX[Ra]=ed,HEX_TO_SHORT[ed]=Ra}function fromHex(Ra){if(Ra.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const ed=new Uint8Array(Ra.length/2);for(let ud=0;ud{var hd,md;if(!isBlobInstance(Ra)&&!isReadableStream$2(Ra)){const gd=((md=(hd=Ra==null?void 0:Ra.__proto__)==null?void 0:hd.constructor)==null?void 0:md.name)||Ra;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${gd}`)}let ed=!1;const ud=async()=>{if(ed)throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);return ed=!0,await streamCollector(Ra)},dd=gd=>{if(typeof gd.stream!="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled. +If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return gd.stream()};return Object.assign(Ra,{transformToByteArray:ud,transformToString:async gd=>{const yd=await ud();if(gd==="base64")return toBase64(yd);if(gd==="hex")return toHex(yd);if(gd===void 0||gd==="utf8"||gd==="utf-8")return toUtf8(yd);if(typeof TextDecoder=="function")return new TextDecoder(gd).decode(yd);throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(ed)throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);if(ed=!0,isBlobInstance(Ra))return dd(Ra);if(isReadableStream$2(Ra))return Ra;throw new Error(`Cannot transform payload to web stream, got ${Ra}`)}})},isBlobInstance=Ra=>typeof Blob=="function"&&Ra instanceof Blob;async function splitStream(Ra){return typeof Ra.stream=="function"&&(Ra=Ra.stream()),Ra.tee()}const collectBody$1=async(Ra=new Uint8Array,ed)=>{if(Ra instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(Ra);if(!Ra)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);const ud=ed.streamCollector(Ra);return Uint8ArrayBlobAdapter.mutate(await ud)};function extendedEncodeURIComponent(Ra){return encodeURIComponent(Ra).replace(/[!'()*]/g,function(ed){return"%"+ed.charCodeAt(0).toString(16).toUpperCase()})}const resolvedPath=(Ra,ed,ud,dd,hd,md)=>{if(ed!=null&&ed[ud]!==void 0){const gd=dd();if(gd.length<=0)throw new Error("Empty value provided for input HTTP label: "+ud+".");Ra=Ra.replace(hd,md?gd.split("/").map(yd=>extendedEncodeURIComponent(yd)).join("/"):extendedEncodeURIComponent(gd))}else throw new Error("No value provided for input HTTP label: "+ud+".");return Ra};function requestBuilder(Ra,ed){return new RequestBuilder(Ra,ed)}class RequestBuilder{constructor(ed,ud){this.input=ed,this.context=ud,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:ed,protocol:ud="https",port:dd,path:hd}=await this.context.endpoint();this.path=hd;for(const md of this.resolvePathStack)md(this.path);return new HttpRequest({protocol:ud,hostname:this.hostname||ed,port:dd,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(ed){return this.hostname=ed,this}bp(ed){return this.resolvePathStack.push(ud=>{this.path=`${ud!=null&&ud.endsWith("/")?ud.slice(0,-1):ud||""}`+ed}),this}p(ed,ud,dd,hd){return this.resolvePathStack.push(md=>{this.path=resolvedPath(md,this.input,ed,ud,dd,hd)}),this}h(ed){return this.headers=ed,this}q(ed){return this.query=ed,this}b(ed){return this.body=ed,this}m(ed){return this.method=ed,this}}function setFeature(Ra,ed,ud){Ra.__smithy_context?Ra.__smithy_context.features||(Ra.__smithy_context.features={}):Ra.__smithy_context={features:{}},Ra.__smithy_context.features[ed]=ud}class DefaultIdentityProviderConfig{constructor(ed){this.authSchemes=new Map;for(const[ud,dd]of Object.entries(ed))dd!==void 0&&this.authSchemes.set(ud,dd)}getIdentityProvider(ed){return this.authSchemes.get(ed)}}const createIsIdentityExpiredFunction=Ra=>ed=>doesIdentityRequireRefresh(ed)&&ed.expiration.getTime()-Date.now()Ra.expiration!==void 0,memoizeIdentityProvider=(Ra,ed,ud)=>{if(Ra===void 0)return;const dd=typeof Ra!="function"?async()=>Promise.resolve(Ra):Ra;let hd,md,gd,yd=!1;const vd=async Cd=>{md||(md=dd(Cd));try{hd=await md,gd=!0,yd=!1}finally{md=void 0}return hd};return ed===void 0?async Cd=>((!gd||Cd!=null&&Cd.forceRefresh)&&(hd=await vd(Cd)),hd):async Cd=>((!gd||Cd!=null&&Cd.forceRefresh)&&(hd=await vd(Cd)),yd?hd:ud(hd)?(ed(hd)&&await vd(Cd),hd):(yd=!0,hd))},memoize$1=(Ra,ed,ud)=>{let dd,hd,md,gd=!1;const yd=async()=>{hd||(hd=Ra());try{dd=await hd,md=!0,gd=!1}finally{hd=void 0}return dd};return async vd=>((!md||vd!=null&&vd.forceRefresh)&&(dd=await yd()),dd)},resolveAwsSdkSigV4AConfig=Ra=>(Ra.sigv4aSigningRegionSet=normalizeProvider(Ra.sigv4aSigningRegionSet),Ra),ALGORITHM_QUERY_PARAM="X-Amz-Algorithm",CREDENTIAL_QUERY_PARAM="X-Amz-Credential",AMZ_DATE_QUERY_PARAM="X-Amz-Date",SIGNED_HEADERS_QUERY_PARAM="X-Amz-SignedHeaders",EXPIRES_QUERY_PARAM="X-Amz-Expires",SIGNATURE_QUERY_PARAM="X-Amz-Signature",TOKEN_QUERY_PARAM="X-Amz-Security-Token",AUTH_HEADER="authorization",AMZ_DATE_HEADER=AMZ_DATE_QUERY_PARAM.toLowerCase(),DATE_HEADER="date",GENERATED_HEADERS=[AUTH_HEADER,AMZ_DATE_HEADER,DATE_HEADER],SIGNATURE_HEADER=SIGNATURE_QUERY_PARAM.toLowerCase(),SHA256_HEADER$1="x-amz-content-sha256",TOKEN_HEADER=TOKEN_QUERY_PARAM.toLowerCase(),ALWAYS_UNSIGNABLE_HEADERS={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},PROXY_HEADER_PATTERN=/^proxy-/,SEC_HEADER_PATTERN=/^sec-/,ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256",EVENT_ALGORITHM_IDENTIFIER="AWS4-HMAC-SHA256-PAYLOAD",UNSIGNED_PAYLOAD$1="UNSIGNED-PAYLOAD",MAX_CACHE_SIZE=50,KEY_TYPE_IDENTIFIER="aws4_request",MAX_PRESIGNED_TTL=60*60*24*7,signingKeyCache={},cacheQueue=[],createScope=(Ra,ed,ud)=>`${Ra}/${ed}/${ud}/${KEY_TYPE_IDENTIFIER}`,getSigningKey$1=async(Ra,ed,ud,dd,hd)=>{const md=await hmac$1(Ra,ed.secretAccessKey,ed.accessKeyId),gd=`${ud}:${dd}:${hd}:${toHex(md)}:${ed.sessionToken}`;if(gd in signingKeyCache)return signingKeyCache[gd];for(cacheQueue.push(gd);cacheQueue.length>MAX_CACHE_SIZE;)delete signingKeyCache[cacheQueue.shift()];let yd=`AWS4${ed.secretAccessKey}`;for(const vd of[ud,dd,hd,KEY_TYPE_IDENTIFIER])yd=await hmac$1(Ra,yd,vd);return signingKeyCache[gd]=yd},hmac$1=(Ra,ed,ud)=>{const dd=new Ra(ed);return dd.update(toUint8Array(ud)),dd.digest()},getCanonicalHeaders=({headers:Ra},ed,ud)=>{const dd={};for(const hd of Object.keys(Ra).sort()){if(Ra[hd]==null)continue;const md=hd.toLowerCase();(md in ALWAYS_UNSIGNABLE_HEADERS||ed!=null&&ed.has(md)||PROXY_HEADER_PATTERN.test(md)||SEC_HEADER_PATTERN.test(md))&&(!ud||ud&&!ud.has(md))||(dd[md]=Ra[hd].trim().replace(/\s+/g," "))}return dd},getCanonicalQuery=({query:Ra={}})=>{const ed=[],ud={};for(const dd of Object.keys(Ra)){if(dd.toLowerCase()===SIGNATURE_HEADER)continue;const hd=escapeUri(dd);ed.push(hd);const md=Ra[dd];typeof md=="string"?ud[hd]=`${hd}=${escapeUri(md)}`:Array.isArray(md)&&(ud[hd]=md.slice(0).reduce((gd,yd)=>gd.concat([`${hd}=${escapeUri(yd)}`]),[]).sort().join("&"))}return ed.sort().map(dd=>ud[dd]).filter(dd=>dd).join("&")},isArrayBuffer$1=Ra=>typeof ArrayBuffer=="function"&&Ra instanceof ArrayBuffer||Object.prototype.toString.call(Ra)==="[object ArrayBuffer]",getPayloadHash=async({headers:Ra,body:ed},ud)=>{for(const dd of Object.keys(Ra))if(dd.toLowerCase()===SHA256_HEADER$1)return Ra[dd];if(ed==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof ed=="string"||ArrayBuffer.isView(ed)||isArrayBuffer$1(ed)){const dd=new ud;return dd.update(toUint8Array(ed)),toHex(await dd.digest())}return UNSIGNED_PAYLOAD$1};class HeaderFormatter{format(ed){const ud=[];for(const md of Object.keys(ed)){const gd=fromUtf8$3(md);ud.push(Uint8Array.from([gd.byteLength]),gd,this.formatHeaderValue(ed[md]))}const dd=new Uint8Array(ud.reduce((md,gd)=>md+gd.byteLength,0));let hd=0;for(const md of ud)dd.set(md,hd),hd+=md.byteLength;return dd}formatHeaderValue(ed){switch(ed.type){case"boolean":return Uint8Array.from([ed.value?0:1]);case"byte":return Uint8Array.from([2,ed.value]);case"short":const ud=new DataView(new ArrayBuffer(3));return ud.setUint8(0,3),ud.setInt16(1,ed.value,!1),new Uint8Array(ud.buffer);case"integer":const dd=new DataView(new ArrayBuffer(5));return dd.setUint8(0,4),dd.setInt32(1,ed.value,!1),new Uint8Array(dd.buffer);case"long":const hd=new Uint8Array(9);return hd[0]=5,hd.set(ed.value.bytes,1),hd;case"binary":const md=new DataView(new ArrayBuffer(3+ed.value.byteLength));md.setUint8(0,6),md.setUint16(1,ed.value.byteLength,!1);const gd=new Uint8Array(md.buffer);return gd.set(ed.value,3),gd;case"string":const yd=fromUtf8$3(ed.value),vd=new DataView(new ArrayBuffer(3+yd.byteLength));vd.setUint8(0,7),vd.setUint16(1,yd.byteLength,!1);const Cd=new Uint8Array(vd.buffer);return Cd.set(yd,3),Cd;case"timestamp":const wd=new Uint8Array(9);return wd[0]=8,wd.set(Int64$1.fromNumber(ed.value.valueOf()).bytes,1),wd;case"uuid":if(!UUID_PATTERN$1.test(ed.value))throw new Error(`Invalid UUID received: ${ed.value}`);const Nd=new Uint8Array(17);return Nd[0]=9,Nd.set(fromHex(ed.value.replace(/\-/g,"")),1),Nd}}}var HEADER_VALUE_TYPE$1;(function(Ra){Ra[Ra.boolTrue=0]="boolTrue",Ra[Ra.boolFalse=1]="boolFalse",Ra[Ra.byte=2]="byte",Ra[Ra.short=3]="short",Ra[Ra.integer=4]="integer",Ra[Ra.long=5]="long",Ra[Ra.byteArray=6]="byteArray",Ra[Ra.string=7]="string",Ra[Ra.timestamp=8]="timestamp",Ra[Ra.uuid=9]="uuid"})(HEADER_VALUE_TYPE$1||(HEADER_VALUE_TYPE$1={}));const UUID_PATTERN$1=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;let Int64$1=class KC{constructor(ed){if(this.bytes=ed,ed.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(ed){if(ed>9223372036854776e3||ed<-9223372036854776e3)throw new Error(`${ed} is too large (or, if negative, too small) to represent as an Int64`);const ud=new Uint8Array(8);for(let dd=7,hd=Math.abs(Math.round(ed));dd>-1&&hd>0;dd--,hd/=256)ud[dd]=hd;return ed<0&&negate$1(ud),new KC(ud)}valueOf(){const ed=this.bytes.slice(0),ud=ed[0]&128;return ud&&negate$1(ed),parseInt(toHex(ed),16)*(ud?-1:1)}toString(){return String(this.valueOf())}};function negate$1(Ra){for(let ed=0;ed<8;ed++)Ra[ed]^=255;for(let ed=7;ed>-1&&(Ra[ed]++,Ra[ed]===0);ed--);}const hasHeader$1=(Ra,ed)=>{Ra=Ra.toLowerCase();for(const ud of Object.keys(ed))if(Ra===ud.toLowerCase())return!0;return!1},moveHeadersToQuery=(Ra,ed={})=>{var hd,md;const{headers:ud,query:dd={}}=HttpRequest.clone(Ra);for(const gd of Object.keys(ud)){const yd=gd.toLowerCase();(yd.slice(0,6)==="x-amz-"&&!((hd=ed.unhoistableHeaders)!=null&&hd.has(yd))||(md=ed.hoistableHeaders)!=null&&md.has(yd))&&(dd[gd]=ud[gd],delete ud[gd])}return{...Ra,headers:ud,query:dd}},prepareRequest=Ra=>{Ra=HttpRequest.clone(Ra);for(const ed of Object.keys(Ra.headers))GENERATED_HEADERS.indexOf(ed.toLowerCase())>-1&&delete Ra.headers[ed];return Ra},iso8601=Ra=>toDate(Ra).toISOString().replace(/\.\d{3}Z$/,"Z"),toDate=Ra=>typeof Ra=="number"?new Date(Ra*1e3):typeof Ra=="string"?Number(Ra)?new Date(Number(Ra)*1e3):new Date(Ra):Ra;class SignatureV4{constructor({applyChecksum:ed,credentials:ud,region:dd,service:hd,sha256:md,uriEscapePath:gd=!0}){this.headerFormatter=new HeaderFormatter,this.service=hd,this.sha256=md,this.uriEscapePath=gd,this.applyChecksum=typeof ed=="boolean"?ed:!0,this.regionProvider=normalizeProvider$1(dd),this.credentialProvider=normalizeProvider$1(ud)}async presign(ed,ud={}){const{signingDate:dd=new Date,expiresIn:hd=3600,unsignableHeaders:md,unhoistableHeaders:gd,signableHeaders:yd,hoistableHeaders:vd,signingRegion:Cd,signingService:wd}=ud,Nd=await this.credentialProvider();this.validateResolvedCredentials(Nd);const Ld=Cd??await this.regionProvider(),{longDate:Ud,shortDate:jd}=formatDate(dd);if(hd>MAX_PRESIGNED_TTL)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Gd=createScope(jd,Ld,wd??this.service),Yd=moveHeadersToQuery(prepareRequest(ed),{unhoistableHeaders:gd,hoistableHeaders:vd});Nd.sessionToken&&(Yd.query[TOKEN_QUERY_PARAM]=Nd.sessionToken),Yd.query[ALGORITHM_QUERY_PARAM]=ALGORITHM_IDENTIFIER,Yd.query[CREDENTIAL_QUERY_PARAM]=`${Nd.accessKeyId}/${Gd}`,Yd.query[AMZ_DATE_QUERY_PARAM]=Ud,Yd.query[EXPIRES_QUERY_PARAM]=hd.toString(10);const zd=getCanonicalHeaders(Yd,md,yd);return Yd.query[SIGNED_HEADERS_QUERY_PARAM]=getCanonicalHeaderList(zd),Yd.query[SIGNATURE_QUERY_PARAM]=await this.getSignature(Ud,Gd,this.getSigningKey(Nd,Ld,jd,wd),this.createCanonicalRequest(Yd,zd,await getPayloadHash(ed,this.sha256))),Yd}async sign(ed,ud){return typeof ed=="string"?this.signString(ed,ud):ed.headers&&ed.payload?this.signEvent(ed,ud):ed.message?this.signMessage(ed,ud):this.signRequest(ed,ud)}async signEvent({headers:ed,payload:ud},{signingDate:dd=new Date,priorSignature:hd,signingRegion:md,signingService:gd}){const yd=md??await this.regionProvider(),{shortDate:vd,longDate:Cd}=formatDate(dd),wd=createScope(vd,yd,gd??this.service),Nd=await getPayloadHash({headers:{},body:ud},this.sha256),Ld=new this.sha256;Ld.update(ed);const Ud=toHex(await Ld.digest()),jd=[EVENT_ALGORITHM_IDENTIFIER,Cd,wd,hd,Ud,Nd].join(` +`);return this.signString(jd,{signingDate:dd,signingRegion:yd,signingService:gd})}async signMessage(ed,{signingDate:ud=new Date,signingRegion:dd,signingService:hd}){return this.signEvent({headers:this.headerFormatter.format(ed.message.headers),payload:ed.message.body},{signingDate:ud,signingRegion:dd,signingService:hd,priorSignature:ed.priorSignature}).then(gd=>({message:ed.message,signature:gd}))}async signString(ed,{signingDate:ud=new Date,signingRegion:dd,signingService:hd}={}){const md=await this.credentialProvider();this.validateResolvedCredentials(md);const gd=dd??await this.regionProvider(),{shortDate:yd}=formatDate(ud),vd=new this.sha256(await this.getSigningKey(md,gd,yd,hd));return vd.update(toUint8Array(ed)),toHex(await vd.digest())}async signRequest(ed,{signingDate:ud=new Date,signableHeaders:dd,unsignableHeaders:hd,signingRegion:md,signingService:gd}={}){const yd=await this.credentialProvider();this.validateResolvedCredentials(yd);const vd=md??await this.regionProvider(),Cd=prepareRequest(ed),{longDate:wd,shortDate:Nd}=formatDate(ud),Ld=createScope(Nd,vd,gd??this.service);Cd.headers[AMZ_DATE_HEADER]=wd,yd.sessionToken&&(Cd.headers[TOKEN_HEADER]=yd.sessionToken);const Ud=await getPayloadHash(Cd,this.sha256);!hasHeader$1(SHA256_HEADER$1,Cd.headers)&&this.applyChecksum&&(Cd.headers[SHA256_HEADER$1]=Ud);const jd=getCanonicalHeaders(Cd,hd,dd),Gd=await this.getSignature(wd,Ld,this.getSigningKey(yd,vd,Nd,gd),this.createCanonicalRequest(Cd,jd,Ud));return Cd.headers[AUTH_HEADER]=`${ALGORITHM_IDENTIFIER} Credential=${yd.accessKeyId}/${Ld}, SignedHeaders=${getCanonicalHeaderList(jd)}, Signature=${Gd}`,Cd}createCanonicalRequest(ed,ud,dd){const hd=Object.keys(ud).sort();return`${ed.method} +${this.getCanonicalPath(ed)} +${getCanonicalQuery(ed)} +${hd.map(md=>`${md}:${ud[md]}`).join(` `)} -${pd.join(";")} -${sd}`}async createStringToSign(qa,rd,sd){const pd=new this.sha256;pd.update(toUint8Array(sd));const fd=await pd.digest();return`${ALGORITHM_IDENTIFIER} -${qa} -${rd} -${toHex(fd)}`}getCanonicalPath({path:qa}){if(this.uriEscapePath){const rd=[];for(const fd of qa.split("/"))(fd==null?void 0:fd.length)!==0&&fd!=="."&&(fd===".."?rd.pop():rd.push(fd));const sd=`${qa!=null&&qa.startsWith("/")?"/":""}${rd.join("/")}${rd.length>0&&(qa!=null&&qa.endsWith("/"))?"/":""}`;return escapeUri(sd).replace(/%2F/g,"/")}return qa}async getSignature(qa,rd,sd,pd){const fd=await this.createStringToSign(qa,rd,pd),hd=new this.sha256(await sd);return hd.update(toUint8Array(fd)),toHex(await hd.digest())}getSigningKey(qa,rd,sd,pd){return getSigningKey$1(this.sha256,qa,sd,rd,pd||this.service)}validateResolvedCredentials(qa){if(typeof qa!="object"||typeof qa.accessKeyId!="string"||typeof qa.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const formatDate=Ra=>{const qa=iso8601(Ra).replace(/[\-:]/g,"");return{longDate:qa,shortDate:qa.slice(0,8)}},getCanonicalHeaderList=Ra=>Object.keys(Ra).sort().join(";"),resolveAwsSdkSigV4Config=Ra=>{let qa=!1,rd;Ra.credentials&&(qa=!0,rd=memoizeIdentityProvider(Ra.credentials,isIdentityExpired,doesIdentityRequireRefresh)),rd||(Ra.credentialDefaultProvider?rd=normalizeProvider(Ra.credentialDefaultProvider(Object.assign({},Ra,{parentClientConfig:Ra}))):rd=async()=>{throw new Error("`credentials` is missing")});const sd=async()=>rd({callerClientConfig:Ra}),{signingEscapePath:pd=!0,systemClockOffset:fd=Ra.systemClockOffset||0,sha256:hd}=Ra;let md;return Ra.signer?md=normalizeProvider(Ra.signer):Ra.regionInfoProvider?md=()=>normalizeProvider(Ra.region)().then(async gd=>[await Ra.regionInfoProvider(gd,{useFipsEndpoint:await Ra.useFipsEndpoint(),useDualstackEndpoint:await Ra.useDualstackEndpoint()})||{},gd]).then(([gd,yd])=>{const{signingRegion:vd,signingService:Nd}=gd;Ra.signingRegion=Ra.signingRegion||vd||yd,Ra.signingName=Ra.signingName||Nd||Ra.serviceId;const Md={...Ra,credentials:sd,region:Ra.signingRegion,service:Ra.signingName,sha256:hd,uriEscapePath:pd},Ld=Ra.signerConstructor||SignatureV4;return new Ld(Md)}):md=async gd=>{gd=Object.assign({},{name:"sigv4",signingName:Ra.signingName||Ra.defaultSigningName,signingRegion:await normalizeProvider(Ra.region)(),properties:{}},gd);const yd=gd.signingRegion,vd=gd.signingName;Ra.signingRegion=Ra.signingRegion||yd,Ra.signingName=Ra.signingName||vd||Ra.serviceId;const Nd={...Ra,credentials:sd,region:Ra.signingRegion,service:Ra.signingName,sha256:hd,uriEscapePath:pd},Md=Ra.signerConstructor||SignatureV4;return new Md(Nd)},{...Ra,systemClockOffset:fd,signingEscapePath:pd,credentials:qa?async()=>sd().then(gd=>setCredentialFeature(gd,"CREDENTIALS_CODE","e")):sd,signer:md}},getAllAliases=(Ra,qa)=>{const rd=[];if(Ra&&rd.push(Ra),qa)for(const sd of qa)rd.push(sd);return rd},getMiddlewareNameWithAliases=(Ra,qa)=>`${Ra||"anonymous"}${qa&&qa.length>0?` (a.k.a. ${qa.join(",")})`:""}`,constructStack=()=>{let Ra=[],qa=[],rd=!1;const sd=new Set,pd=Nd=>Nd.sort((Md,Ld)=>stepWeights[Ld.step]-stepWeights[Md.step]||priorityWeights[Ld.priority||"normal"]-priorityWeights[Md.priority||"normal"]),fd=Nd=>{let Md=!1;const Ld=Fd=>{const Hd=getAllAliases(Fd.name,Fd.aliases);if(Hd.includes(Nd)){Md=!0;for(const Vd of Hd)sd.delete(Vd);return!1}return!0};return Ra=Ra.filter(Ld),qa=qa.filter(Ld),Md},hd=Nd=>{let Md=!1;const Ld=Fd=>{if(Fd.middleware===Nd){Md=!0;for(const Hd of getAllAliases(Fd.name,Fd.aliases))sd.delete(Hd);return!1}return!0};return Ra=Ra.filter(Ld),qa=qa.filter(Ld),Md},md=Nd=>{var Md;return Ra.forEach(Ld=>{Nd.add(Ld.middleware,{...Ld})}),qa.forEach(Ld=>{Nd.addRelativeTo(Ld.middleware,{...Ld})}),(Md=Nd.identifyOnResolve)==null||Md.call(Nd,vd.identifyOnResolve()),Nd},gd=Nd=>{const Md=[];return Nd.before.forEach(Ld=>{Ld.before.length===0&&Ld.after.length===0?Md.push(Ld):Md.push(...gd(Ld))}),Md.push(Nd),Nd.after.reverse().forEach(Ld=>{Ld.before.length===0&&Ld.after.length===0?Md.push(Ld):Md.push(...gd(Ld))}),Md},yd=(Nd=!1)=>{const Md=[],Ld=[],Fd={};return Ra.forEach(Vd=>{const Gd={...Vd,before:[],after:[]};for(const Ud of getAllAliases(Gd.name,Gd.aliases))Fd[Ud]=Gd;Md.push(Gd)}),qa.forEach(Vd=>{const Gd={...Vd,before:[],after:[]};for(const Ud of getAllAliases(Gd.name,Gd.aliases))Fd[Ud]=Gd;Ld.push(Gd)}),Ld.forEach(Vd=>{if(Vd.toMiddleware){const Gd=Fd[Vd.toMiddleware];if(Gd===void 0){if(Nd)return;throw new Error(`${Vd.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(Vd.name,Vd.aliases)} middleware ${Vd.relation} ${Vd.toMiddleware}`)}Vd.relation==="after"&&Gd.after.push(Vd),Vd.relation==="before"&&Gd.before.push(Vd)}}),pd(Md).map(gd).reduce((Vd,Gd)=>(Vd.push(...Gd),Vd),[])},vd={add:(Nd,Md={})=>{const{name:Ld,override:Fd,aliases:Hd}=Md,Vd={step:"initialize",priority:"normal",middleware:Nd,...Md},Gd=getAllAliases(Ld,Hd);if(Gd.length>0){if(Gd.some(Ud=>sd.has(Ud))){if(!Fd)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(Ld,Hd)}'`);for(const Ud of Gd){const qd=Ra.findIndex(Kd=>{var Xd;return Kd.name===Ud||((Xd=Kd.aliases)==null?void 0:Xd.some(df=>df===Ud))});if(qd===-1)continue;const Wd=Ra[qd];if(Wd.step!==Vd.step||Vd.priority!==Wd.priority)throw new Error(`"${getMiddlewareNameWithAliases(Wd.name,Wd.aliases)}" middleware with ${Wd.priority} priority in ${Wd.step} step cannot be overridden by "${getMiddlewareNameWithAliases(Ld,Hd)}" middleware with ${Vd.priority} priority in ${Vd.step} step.`);Ra.splice(qd,1)}}for(const Ud of Gd)sd.add(Ud)}Ra.push(Vd)},addRelativeTo:(Nd,Md)=>{const{name:Ld,override:Fd,aliases:Hd}=Md,Vd={middleware:Nd,...Md},Gd=getAllAliases(Ld,Hd);if(Gd.length>0){if(Gd.some(Ud=>sd.has(Ud))){if(!Fd)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(Ld,Hd)}'`);for(const Ud of Gd){const qd=qa.findIndex(Kd=>{var Xd;return Kd.name===Ud||((Xd=Kd.aliases)==null?void 0:Xd.some(df=>df===Ud))});if(qd===-1)continue;const Wd=qa[qd];if(Wd.toMiddleware!==Vd.toMiddleware||Wd.relation!==Vd.relation)throw new Error(`"${getMiddlewareNameWithAliases(Wd.name,Wd.aliases)}" middleware ${Wd.relation} "${Wd.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(Ld,Hd)}" middleware ${Vd.relation} "${Vd.toMiddleware}" middleware.`);qa.splice(qd,1)}}for(const Ud of Gd)sd.add(Ud)}qa.push(Vd)},clone:()=>md(constructStack()),use:Nd=>{Nd.applyToStack(vd)},remove:Nd=>typeof Nd=="string"?fd(Nd):hd(Nd),removeByTag:Nd=>{let Md=!1;const Ld=Fd=>{const{tags:Hd,name:Vd,aliases:Gd}=Fd;if(Hd&&Hd.includes(Nd)){const Ud=getAllAliases(Vd,Gd);for(const qd of Ud)sd.delete(qd);return Md=!0,!1}return!0};return Ra=Ra.filter(Ld),qa=qa.filter(Ld),Md},concat:Nd=>{var Ld;const Md=md(constructStack());return Md.use(Nd),Md.identifyOnResolve(rd||Md.identifyOnResolve()||(((Ld=Nd.identifyOnResolve)==null?void 0:Ld.call(Nd))??!1)),Md},applyToStack:md,identify:()=>yd(!0).map(Nd=>{const Md=Nd.step??Nd.relation+" "+Nd.toMiddleware;return getMiddlewareNameWithAliases(Nd.name,Nd.aliases)+" - "+Md}),identifyOnResolve(Nd){return typeof Nd=="boolean"&&(rd=Nd),rd},resolve:(Nd,Md)=>{for(const Ld of yd().map(Fd=>Fd.middleware).reverse())Nd=Ld(Nd,Md);return rd&&console.log(vd.identify()),Nd}};return vd},stepWeights={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},priorityWeights={high:3,normal:2,low:1};let Client$1=class{constructor(qa){this.config=qa,this.middlewareStack=constructStack()}send(qa,rd,sd){const pd=typeof rd!="function"?rd:void 0,fd=typeof rd=="function"?rd:sd,hd=pd===void 0&&this.config.cacheMiddleware===!0;let md;if(hd){this.handlers||(this.handlers=new WeakMap);const gd=this.handlers;gd.has(qa.constructor)?md=gd.get(qa.constructor):(md=qa.resolveMiddleware(this.middlewareStack,this.config,pd),gd.set(qa.constructor,md))}else delete this.handlers,md=qa.resolveMiddleware(this.middlewareStack,this.config,pd);if(fd)md(qa).then(gd=>fd(null,gd.output),gd=>fd(gd)).catch(()=>{});else return md(qa).then(gd=>gd.output)}destroy(){var qa,rd,sd;(sd=(rd=(qa=this.config)==null?void 0:qa.requestHandler)==null?void 0:rd.destroy)==null||sd.call(rd),delete this.handlers}};class Command{constructor(){this.middlewareStack=constructStack()}static classBuilder(){return new ClassBuilder}resolveMiddlewareWithContext(qa,rd,sd,{middlewareFn:pd,clientName:fd,commandName:hd,inputFilterSensitiveLog:md,outputFilterSensitiveLog:gd,smithyContext:yd,additionalContext:vd,CommandCtor:Nd}){for(const Vd of pd.bind(this)(Nd,qa,rd,sd))this.middlewareStack.use(Vd);const Md=qa.concat(this.middlewareStack),{logger:Ld}=rd,Fd={logger:Ld,clientName:fd,commandName:hd,inputFilterSensitiveLog:md,outputFilterSensitiveLog:gd,[SMITHY_CONTEXT_KEY]:{commandInstance:this,...yd},...vd},{requestHandler:Hd}=rd;return Md.resolve(Vd=>Hd.handle(Vd.request,sd||{}),Fd)}}class ClassBuilder{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=qa=>qa,this._outputFilterSensitiveLog=qa=>qa,this._serializer=null,this._deserializer=null}init(qa){this._init=qa}ep(qa){return this._ep=qa,this}m(qa){return this._middlewareFn=qa,this}s(qa,rd,sd={}){return this._smithyContext={service:qa,operation:rd,...sd},this}c(qa={}){return this._additionalContext=qa,this}n(qa,rd){return this._clientName=qa,this._commandName=rd,this}f(qa=sd=>sd,rd=sd=>sd){return this._inputFilterSensitiveLog=qa,this._outputFilterSensitiveLog=rd,this}ser(qa){return this._serializer=qa,this}de(qa){return this._deserializer=qa,this}build(){const qa=this;let rd;return rd=class extends Command{static getEndpointParameterInstructions(){return qa._ep}constructor(...[sd]){super(),this.serialize=qa._serializer,this.deserialize=qa._deserializer,this.input=sd??{},qa._init(this)}resolveMiddleware(sd,pd,fd){return this.resolveMiddlewareWithContext(sd,pd,fd,{CommandCtor:rd,middlewareFn:qa._middlewareFn,clientName:qa._clientName,commandName:qa._commandName,inputFilterSensitiveLog:qa._inputFilterSensitiveLog,outputFilterSensitiveLog:qa._outputFilterSensitiveLog,smithyContext:qa._smithyContext,additionalContext:qa._additionalContext})}}}}const SENSITIVE_STRING="***SensitiveInformation***",parseBoolean=Ra=>{switch(Ra){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${Ra}"`)}},expectNumber=Ra=>{if(Ra!=null){if(typeof Ra=="string"){const qa=parseFloat(Ra);if(!Number.isNaN(qa))return String(qa)!==String(Ra)&&logger.warn(stackTraceWarning(`Expected number but observed string: ${Ra}`)),qa}if(typeof Ra=="number")return Ra;throw new TypeError(`Expected number, got ${typeof Ra}: ${Ra}`)}},MAX_FLOAT=Math.ceil(2**127*(2-2**-23)),expectFloat32=Ra=>{const qa=expectNumber(Ra);if(qa!==void 0&&!Number.isNaN(qa)&&qa!==1/0&&qa!==-1/0&&Math.abs(qa)>MAX_FLOAT)throw new TypeError(`Expected 32-bit float, got ${Ra}`);return qa},expectLong=Ra=>{if(Ra!=null){if(Number.isInteger(Ra)&&!Number.isNaN(Ra))return Ra;throw new TypeError(`Expected integer, got ${typeof Ra}: ${Ra}`)}},expectShort=Ra=>expectSizedInt(Ra,16),expectByte=Ra=>expectSizedInt(Ra,8),expectSizedInt=(Ra,qa)=>{const rd=expectLong(Ra);if(rd!==void 0&&castInt(rd,qa)!==rd)throw new TypeError(`Expected ${qa}-bit integer, got ${Ra}`);return rd},castInt=(Ra,qa)=>{switch(qa){case 32:return Int32Array.of(Ra)[0];case 16:return Int16Array.of(Ra)[0];case 8:return Int8Array.of(Ra)[0]}},expectNonNull=(Ra,qa)=>{if(Ra==null)throw qa?new TypeError(`Expected a non-null value for ${qa}`):new TypeError("Expected a non-null value");return Ra},expectObject=Ra=>{if(Ra==null)return;if(typeof Ra=="object"&&!Array.isArray(Ra))return Ra;const qa=Array.isArray(Ra)?"array":typeof Ra;throw new TypeError(`Expected object, got ${qa}: ${Ra}`)},expectString=Ra=>{if(Ra!=null){if(typeof Ra=="string")return Ra;if(["boolean","number","bigint"].includes(typeof Ra))return logger.warn(stackTraceWarning(`Expected string, got ${typeof Ra}: ${Ra}`)),String(Ra);throw new TypeError(`Expected string, got ${typeof Ra}: ${Ra}`)}},strictParseFloat32=Ra=>expectFloat32(typeof Ra=="string"?parseNumber(Ra):Ra),NUMBER_REGEX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,parseNumber=Ra=>{const qa=Ra.match(NUMBER_REGEX);if(qa===null||qa[0].length!==Ra.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(Ra)},strictParseLong=Ra=>expectLong(typeof Ra=="string"?parseNumber(Ra):Ra),strictParseShort=Ra=>expectShort(typeof Ra=="string"?parseNumber(Ra):Ra),strictParseByte=Ra=>expectByte(typeof Ra=="string"?parseNumber(Ra):Ra),stackTraceWarning=Ra=>String(new TypeError(Ra).stack||Ra).split(` -`).slice(0,5).filter(qa=>!qa.includes("stackTraceWarning")).join(` -`),logger={warn:console.warn},DAYS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dateToUtcString(Ra){const qa=Ra.getUTCFullYear(),rd=Ra.getUTCMonth(),sd=Ra.getUTCDay(),pd=Ra.getUTCDate(),fd=Ra.getUTCHours(),hd=Ra.getUTCMinutes(),md=Ra.getUTCSeconds(),gd=pd<10?`0${pd}`:`${pd}`,yd=fd<10?`0${fd}`:`${fd}`,vd=hd<10?`0${hd}`:`${hd}`,Nd=md<10?`0${md}`:`${md}`;return`${DAYS[sd]}, ${gd} ${MONTHS[rd]} ${qa} ${yd}:${vd}:${Nd} GMT`}const RFC3339_WITH_OFFSET=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),parseRfc3339DateTimeWithOffset=Ra=>{if(Ra==null)return;if(typeof Ra!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const qa=RFC3339_WITH_OFFSET.exec(Ra);if(!qa)throw new TypeError("Invalid RFC-3339 date-time value");const[rd,sd,pd,fd,hd,md,gd,yd,vd]=qa,Nd=strictParseShort(stripLeadingZeroes(sd)),Md=parseDateValue(pd,"month",1,12),Ld=parseDateValue(fd,"day",1,31),Fd=buildDate(Nd,Md,Ld,{hours:hd,minutes:md,seconds:gd,fractionalMilliseconds:yd});return vd.toUpperCase()!="Z"&&Fd.setTime(Fd.getTime()-parseOffsetToMilliseconds(vd)),Fd},buildDate=(Ra,qa,rd,sd)=>{const pd=qa-1;return validateDayOfMonth(Ra,pd,rd),new Date(Date.UTC(Ra,pd,rd,parseDateValue(sd.hours,"hour",0,23),parseDateValue(sd.minutes,"minute",0,59),parseDateValue(sd.seconds,"seconds",0,60),parseMilliseconds(sd.fractionalMilliseconds)))},DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],validateDayOfMonth=(Ra,qa,rd)=>{let sd=DAYS_IN_MONTH[qa];if(qa===1&&isLeapYear(Ra)&&(sd=29),rd>sd)throw new TypeError(`Invalid day for ${MONTHS[qa]} in ${Ra}: ${rd}`)},isLeapYear=Ra=>Ra%4===0&&(Ra%100!==0||Ra%400===0),parseDateValue=(Ra,qa,rd,sd)=>{const pd=strictParseByte(stripLeadingZeroes(Ra));if(pdsd)throw new TypeError(`${qa} must be between ${rd} and ${sd}, inclusive`);return pd},parseMilliseconds=Ra=>Ra==null?0:strictParseFloat32("0."+Ra)*1e3,parseOffsetToMilliseconds=Ra=>{const qa=Ra[0];let rd=1;if(qa=="+")rd=1;else if(qa=="-")rd=-1;else throw new TypeError(`Offset direction, ${qa}, must be "+" or "-"`);const sd=Number(Ra.substring(1,3)),pd=Number(Ra.substring(4,6));return rd*(sd*60+pd)*60*1e3},stripLeadingZeroes=Ra=>{let qa=0;for(;qa{Object.entries(qa).filter(([,sd])=>sd!==void 0).forEach(([sd,pd])=>{(Ra[sd]==null||Ra[sd]==="")&&(Ra[sd]=pd)});const rd=Ra.message||Ra.Message||"UnknownError";return Ra.message=rd,delete Ra.Message,Ra},throwDefaultError$1=({output:Ra,parsedBody:qa,exceptionCtor:rd,errorCode:sd})=>{const pd=deserializeMetadata$1(Ra),fd=pd.httpStatusCode?pd.httpStatusCode+"":void 0,hd=new rd({name:(qa==null?void 0:qa.code)||(qa==null?void 0:qa.Code)||sd||fd||"UnknownError",$fault:"client",$metadata:pd});throw decorateServiceException(hd,qa)},withBaseException=Ra=>({output:qa,parsedBody:rd,errorCode:sd})=>{throwDefaultError$1({output:qa,parsedBody:rd,exceptionCtor:Ra,errorCode:sd})},deserializeMetadata$1=Ra=>({httpStatusCode:Ra.statusCode,requestId:Ra.headers["x-amzn-requestid"]??Ra.headers["x-amzn-request-id"]??Ra.headers["x-amz-request-id"],extendedRequestId:Ra.headers["x-amz-id-2"],cfId:Ra.headers["x-amz-cf-id"]}),loadConfigsForDefaultMode=Ra=>{switch(Ra){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},getChecksumConfiguration=Ra=>{const qa=[];for(const rd in AlgorithmId){const sd=AlgorithmId[rd];Ra[sd]!==void 0&&qa.push({algorithmId:()=>sd,checksumConstructor:()=>Ra[sd]})}return{_checksumAlgorithms:qa,addChecksumAlgorithm(rd){this._checksumAlgorithms.push(rd)},checksumAlgorithms(){return this._checksumAlgorithms}}},resolveChecksumRuntimeConfig=Ra=>{const qa={};return Ra.checksumAlgorithms().forEach(rd=>{qa[rd.algorithmId()]=rd.checksumConstructor()}),qa},getRetryConfiguration=Ra=>{let qa=Ra.retryStrategy;return{setRetryStrategy(rd){qa=rd},retryStrategy(){return qa}}},resolveRetryRuntimeConfig=Ra=>{const qa={};return qa.retryStrategy=Ra.retryStrategy(),qa},getDefaultExtensionConfiguration=Ra=>({...getChecksumConfiguration(Ra),...getRetryConfiguration(Ra)}),resolveDefaultRuntimeConfig=Ra=>({...resolveChecksumRuntimeConfig(Ra),...resolveRetryRuntimeConfig(Ra)}),getValueFromTextNode=Ra=>{const qa="#text";for(const rd in Ra)Ra.hasOwnProperty(rd)&&Ra[rd][qa]!==void 0?Ra[rd]=Ra[rd][qa]:typeof Ra[rd]=="object"&&Ra[rd]!==null&&(Ra[rd]=getValueFromTextNode(Ra[rd]));return Ra},isSerializableHeaderValue=Ra=>Ra!=null;class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}}function map$2(Ra,qa,rd){let sd,pd,fd;if(typeof qa>"u"&&typeof rd>"u")sd={},fd=Ra;else{if(sd=Ra,typeof qa=="function")return pd=qa,fd=rd,mapWithFilter(sd,pd,fd);fd=qa}for(const hd of Object.keys(fd)){if(!Array.isArray(fd[hd])){sd[hd]=fd[hd];continue}applyInstruction(sd,null,fd,hd)}return sd}const mapWithFilter=(Ra,qa,rd)=>map$2(Ra,Object.entries(rd).reduce((sd,[pd,fd])=>(Array.isArray(fd)?sd[pd]=fd:typeof fd=="function"?sd[pd]=[qa,fd()]:sd[pd]=[qa,fd],sd),{})),applyInstruction=(Ra,qa,rd,sd)=>{let[pd,fd]=rd[sd];if(typeof fd=="function"){let hd;const md=pd===void 0&&(hd=fd())!=null,gd=typeof pd=="function"&&!!pd(void 0)||typeof pd!="function"&&!!pd;md?Ra[sd]=hd:gd&&(Ra[sd]=fd())}else{const hd=pd===void 0&&fd!=null,md=typeof pd=="function"&&!!pd(fd)||typeof pd!="function"&&!!pd;(hd||md)&&(Ra[sd]=fd)}},serializeDateTime=Ra=>Ra.toISOString().replace(".000Z","Z"),collectBodyString=(Ra,qa)=>collectBody$1(Ra,qa).then(rd=>qa.utf8Encoder(rd));var validator$2={},util$4={};(function(Ra){const qa=":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",rd=qa+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",sd="["+qa+"]["+rd+"]*",pd=new RegExp("^"+sd+"$"),fd=function(md,gd){const yd=[];let vd=gd.exec(md);for(;vd;){const Nd=[];Nd.startIndex=gd.lastIndex-vd[0].length;const Md=vd.length;for(let Ld=0;Ld"u")};Ra.isExist=function(md){return typeof md<"u"},Ra.isEmptyObject=function(md){return Object.keys(md).length===0},Ra.merge=function(md,gd,yd){if(gd){const vd=Object.keys(gd),Nd=vd.length;for(let Md=0;Md"&&Ra[fd]!==" "&&Ra[fd]!==" "&&Ra[fd]!==` -`&&Ra[fd]!=="\r";fd++)gd+=Ra[fd];if(gd=gd.trim(),gd[gd.length-1]==="/"&&(gd=gd.substring(0,gd.length-1),fd--),!validateTagName(gd)){let Nd;return gd.trim().length===0?Nd="Invalid space after '<'.":Nd="Tag '"+gd+"' is an invalid name.",getErrorObject("InvalidTag",Nd,getLineNumberForPosition(Ra,fd))}const yd=readAttributeStr(Ra,fd);if(yd===!1)return getErrorObject("InvalidAttr","Attributes for '"+gd+"' have open quote.",getLineNumberForPosition(Ra,fd));let vd=yd.value;if(fd=yd.index,vd[vd.length-1]==="/"){const Nd=fd-vd.length;vd=vd.substring(0,vd.length-1);const Md=validateAttributeString(vd,qa);if(Md===!0)sd=!0;else return getErrorObject(Md.err.code,Md.err.msg,getLineNumberForPosition(Ra,Nd+Md.err.line))}else if(md)if(yd.tagClosed){if(vd.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+gd+"' can't have attributes or invalid starting.",getLineNumberForPosition(Ra,hd));if(rd.length===0)return getErrorObject("InvalidTag","Closing tag '"+gd+"' has not been opened.",getLineNumberForPosition(Ra,hd));{const Nd=rd.pop();if(gd!==Nd.tagName){let Md=getLineNumberForPosition(Ra,Nd.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+Nd.tagName+"' (opened in line "+Md.line+", col "+Md.col+") instead of closing tag '"+gd+"'.",getLineNumberForPosition(Ra,hd))}rd.length==0&&(pd=!0)}}else return getErrorObject("InvalidTag","Closing tag '"+gd+"' doesn't have proper closing.",getLineNumberForPosition(Ra,fd));else{const Nd=validateAttributeString(vd,qa);if(Nd!==!0)return getErrorObject(Nd.err.code,Nd.err.msg,getLineNumberForPosition(Ra,fd-vd.length+Nd.err.line));if(pd===!0)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(Ra,fd));qa.unpairedTags.indexOf(gd)!==-1||rd.push({tagName:gd,tagStartPos:hd}),sd=!0}for(fd++;fd0)return getErrorObject("InvalidXml","Invalid '"+JSON.stringify(rd.map(fd=>fd.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return getErrorObject("InvalidXml","Start tag expected.",1);return!0};function isWhiteSpace(Ra){return Ra===" "||Ra===" "||Ra===` -`||Ra==="\r"}function readPI(Ra,qa){const rd=qa;for(;qa5&&sd==="xml")return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(Ra,qa));if(Ra[qa]=="?"&&Ra[qa+1]==">"){qa++;break}else continue}return qa}function readCommentAndCDATA(Ra,qa){if(Ra.length>qa+5&&Ra[qa+1]==="-"&&Ra[qa+2]==="-"){for(qa+=3;qa"){qa+=2;break}}else if(Ra.length>qa+8&&Ra[qa+1]==="D"&&Ra[qa+2]==="O"&&Ra[qa+3]==="C"&&Ra[qa+4]==="T"&&Ra[qa+5]==="Y"&&Ra[qa+6]==="P"&&Ra[qa+7]==="E"){let rd=1;for(qa+=8;qa"&&(rd--,rd===0))break}else if(Ra.length>qa+9&&Ra[qa+1]==="["&&Ra[qa+2]==="C"&&Ra[qa+3]==="D"&&Ra[qa+4]==="A"&&Ra[qa+5]==="T"&&Ra[qa+6]==="A"&&Ra[qa+7]==="["){for(qa+=8;qa"){qa+=2;break}}return qa}const doubleQuote='"',singleQuote="'";function readAttributeStr(Ra,qa){let rd="",sd="",pd=!1;for(;qa"&&sd===""){pd=!0;break}rd+=Ra[qa]}return sd!==""?!1:{value:rd,index:qa,tagClosed:pd}}const validAttrStrRegxp=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function validateAttributeString(Ra,qa){const rd=util$3.getAllMatches(Ra,validAttrStrRegxp),sd={};for(let pd=0;pd!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(Ra,qa,rd){return Ra}},buildOptions$1=function(Ra){return Object.assign({},defaultOptions$1,Ra)};OptionsBuilder.buildOptions=buildOptions$1;OptionsBuilder.defaultOptions=defaultOptions$1;class XmlNode{constructor(qa){this.tagname=qa,this.child=[],this[":@"]={}}add(qa,rd){qa==="__proto__"&&(qa="#__proto__"),this.child.push({[qa]:rd})}addChild(qa){qa.tagname==="__proto__"&&(qa.tagname="#__proto__"),qa[":@"]&&Object.keys(qa[":@"]).length>0?this.child.push({[qa.tagname]:qa.child,":@":qa[":@"]}):this.child.push({[qa.tagname]:qa.child})}}var xmlNode$1=XmlNode;const util$2=util$4;function readDocType$1(Ra,qa){const rd={};if(Ra[qa+3]==="O"&&Ra[qa+4]==="C"&&Ra[qa+5]==="T"&&Ra[qa+6]==="Y"&&Ra[qa+7]==="P"&&Ra[qa+8]==="E"){qa=qa+9;let sd=1,pd=!1,fd=!1,hd="";for(;qa"){if(fd?Ra[qa-1]==="-"&&Ra[qa-2]==="-"&&(fd=!1,sd--):sd--,sd===0)break}else Ra[qa]==="["?pd=!0:hd+=Ra[qa];if(sd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:rd,i:qa}}function readEntityExp(Ra,qa){let rd="";for(;qa0&&pd&&rd[2]!==".")return Ra;if(!qa.leadingZeros&&fd.length>0&&!pd&&rd[1]!==".")return Ra;{const gd=Number(rd),yd=""+gd;return yd.search(/[eE]/)!==-1||md?qa.eNotation?gd:Ra:rd.indexOf(".")!==-1?yd==="0"&&hd===""||yd===hd||pd&&yd==="-"+hd?gd:Ra:fd?hd===yd||pd+hd===yd?gd:Ra:rd===yd||rd===pd+yd?gd:Ra}}else return Ra}}function trimZeros(Ra){return Ra&&Ra.indexOf(".")!==-1&&(Ra=Ra.replace(/0+$/,""),Ra==="."?Ra="0":Ra[0]==="."?Ra="0"+Ra:Ra[Ra.length-1]==="."&&(Ra=Ra.substr(0,Ra.length-1))),Ra}var strnum=toNumber$1;const util$1=util$4,xmlNode=xmlNode$1,readDocType=DocTypeReader,toNumber=strnum;let OrderedObjParser$1=class{constructor(qa){this.options=qa,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(rd,sd)=>String.fromCharCode(Number.parseInt(sd,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(rd,sd)=>String.fromCharCode(Number.parseInt(sd,16))}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml$1,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild}};function addExternalEntities(Ra){const qa=Object.keys(Ra);for(let rd=0;rd0)){hd||(Ra=this.replaceEntitiesValue(Ra));const md=this.options.tagValueProcessor(qa,Ra,rd,pd,fd);return md==null?Ra:typeof md!=typeof Ra||md!==Ra?md:this.options.trimValues?parseValue(Ra,this.options.parseTagValue,this.options.numberParseOptions):Ra.trim()===Ra?parseValue(Ra,this.options.parseTagValue,this.options.numberParseOptions):Ra}}function resolveNameSpace(Ra){if(this.options.removeNSPrefix){const qa=Ra.split(":"),rd=Ra.charAt(0)==="/"?"/":"";if(qa[0]==="xmlns")return"";qa.length===2&&(Ra=rd+qa[1])}return Ra}const attrsRegx=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function buildAttributesMap(Ra,qa,rd){if(!this.options.ignoreAttributes&&typeof Ra=="string"){const sd=util$1.getAllMatches(Ra,attrsRegx),pd=sd.length,fd={};for(let hd=0;hd",fd,"Closing Tag is not closed.");let gd=Ra.substring(fd+2,md).trim();if(this.options.removeNSPrefix){const Nd=gd.indexOf(":");Nd!==-1&&(gd=gd.substr(Nd+1))}this.options.transformTagName&&(gd=this.options.transformTagName(gd)),rd&&(sd=this.saveTextToParentTag(sd,rd,pd));const yd=pd.substring(pd.lastIndexOf(".")+1);if(gd&&this.options.unpairedTags.indexOf(gd)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let vd=0;yd&&this.options.unpairedTags.indexOf(yd)!==-1?(vd=pd.lastIndexOf(".",pd.lastIndexOf(".")-1),this.tagsNodeStack.pop()):vd=pd.lastIndexOf("."),pd=pd.substring(0,vd),rd=this.tagsNodeStack.pop(),sd="",fd=md}else if(Ra[fd+1]==="?"){let md=readTagExp(Ra,fd,!1,"?>");if(!md)throw new Error("Pi Tag is not closed.");if(sd=this.saveTextToParentTag(sd,rd,pd),!(this.options.ignoreDeclaration&&md.tagName==="?xml"||this.options.ignorePiTags)){const gd=new xmlNode(md.tagName);gd.add(this.options.textNodeName,""),md.tagName!==md.tagExp&&md.attrExpPresent&&(gd[":@"]=this.buildAttributesMap(md.tagExp,pd,md.tagName)),this.addChild(rd,gd,pd)}fd=md.closeIndex+1}else if(Ra.substr(fd+1,3)==="!--"){const md=findClosingIndex(Ra,"-->",fd+4,"Comment is not closed.");if(this.options.commentPropName){const gd=Ra.substring(fd+4,md-2);sd=this.saveTextToParentTag(sd,rd,pd),rd.add(this.options.commentPropName,[{[this.options.textNodeName]:gd}])}fd=md}else if(Ra.substr(fd+1,2)==="!D"){const md=readDocType(Ra,fd);this.docTypeEntities=md.entities,fd=md.i}else if(Ra.substr(fd+1,2)==="!["){const md=findClosingIndex(Ra,"]]>",fd,"CDATA is not closed.")-2,gd=Ra.substring(fd+9,md);sd=this.saveTextToParentTag(sd,rd,pd);let yd=this.parseTextData(gd,rd.tagname,pd,!0,!1,!0,!0);yd==null&&(yd=""),this.options.cdataPropName?rd.add(this.options.cdataPropName,[{[this.options.textNodeName]:gd}]):rd.add(this.options.textNodeName,yd),fd=md+2}else{let md=readTagExp(Ra,fd,this.options.removeNSPrefix),gd=md.tagName;const yd=md.rawTagName;let vd=md.tagExp,Nd=md.attrExpPresent,Md=md.closeIndex;this.options.transformTagName&&(gd=this.options.transformTagName(gd)),rd&&sd&&rd.tagname!=="!xml"&&(sd=this.saveTextToParentTag(sd,rd,pd,!1));const Ld=rd;if(Ld&&this.options.unpairedTags.indexOf(Ld.tagname)!==-1&&(rd=this.tagsNodeStack.pop(),pd=pd.substring(0,pd.lastIndexOf("."))),gd!==qa.tagname&&(pd+=pd?"."+gd:gd),this.isItStopNode(this.options.stopNodes,pd,gd)){let Fd="";if(vd.length>0&&vd.lastIndexOf("/")===vd.length-1)gd[gd.length-1]==="/"?(gd=gd.substr(0,gd.length-1),pd=pd.substr(0,pd.length-1),vd=gd):vd=vd.substr(0,vd.length-1),fd=md.closeIndex;else if(this.options.unpairedTags.indexOf(gd)!==-1)fd=md.closeIndex;else{const Vd=this.readStopNodeData(Ra,yd,Md+1);if(!Vd)throw new Error(`Unexpected end of ${yd}`);fd=Vd.i,Fd=Vd.tagContent}const Hd=new xmlNode(gd);gd!==vd&&Nd&&(Hd[":@"]=this.buildAttributesMap(vd,pd,gd)),Fd&&(Fd=this.parseTextData(Fd,gd,pd,!0,Nd,!0,!0)),pd=pd.substr(0,pd.lastIndexOf(".")),Hd.add(this.options.textNodeName,Fd),this.addChild(rd,Hd,pd)}else{if(vd.length>0&&vd.lastIndexOf("/")===vd.length-1){gd[gd.length-1]==="/"?(gd=gd.substr(0,gd.length-1),pd=pd.substr(0,pd.length-1),vd=gd):vd=vd.substr(0,vd.length-1),this.options.transformTagName&&(gd=this.options.transformTagName(gd));const Fd=new xmlNode(gd);gd!==vd&&Nd&&(Fd[":@"]=this.buildAttributesMap(vd,pd,gd)),this.addChild(rd,Fd,pd),pd=pd.substr(0,pd.lastIndexOf("."))}else{const Fd=new xmlNode(gd);this.tagsNodeStack.push(rd),gd!==vd&&Nd&&(Fd[":@"]=this.buildAttributesMap(vd,pd,gd)),this.addChild(rd,Fd,pd),rd=Fd}sd="",fd=Md}}else sd+=Ra[fd];return qa.child};function addChild(Ra,qa,rd){const sd=this.options.updateTag(qa.tagname,rd,qa[":@"]);sd===!1||(typeof sd=="string"&&(qa.tagname=sd),Ra.addChild(qa))}const replaceEntitiesValue$1=function(Ra){if(this.options.processEntities){for(let qa in this.docTypeEntities){const rd=this.docTypeEntities[qa];Ra=Ra.replace(rd.regx,rd.val)}for(let qa in this.lastEntities){const rd=this.lastEntities[qa];Ra=Ra.replace(rd.regex,rd.val)}if(this.options.htmlEntities)for(let qa in this.htmlEntities){const rd=this.htmlEntities[qa];Ra=Ra.replace(rd.regex,rd.val)}Ra=Ra.replace(this.ampEntity.regex,this.ampEntity.val)}return Ra};function saveTextToParentTag(Ra,qa,rd,sd){return Ra&&(sd===void 0&&(sd=Object.keys(qa.child).length===0),Ra=this.parseTextData(Ra,qa.tagname,rd,!1,qa[":@"]?Object.keys(qa[":@"]).length!==0:!1,sd),Ra!==void 0&&Ra!==""&&qa.add(this.options.textNodeName,Ra),Ra=""),Ra}function isItStopNode(Ra,qa,rd){const sd="*."+rd;for(const pd in Ra){const fd=Ra[pd];if(sd===fd||qa===fd)return!0}return!1}function tagExpWithClosingIndex(Ra,qa,rd=">"){let sd,pd="";for(let fd=qa;fd",rd,`${qa} is not closed`);if(Ra.substring(rd+2,fd).trim()===qa&&(pd--,pd===0))return{tagContent:Ra.substring(sd,rd),i:fd};rd=fd}else if(Ra[rd+1]==="?")rd=findClosingIndex(Ra,"?>",rd+1,"StopNode is not closed.");else if(Ra.substr(rd+1,3)==="!--")rd=findClosingIndex(Ra,"-->",rd+3,"StopNode is not closed.");else if(Ra.substr(rd+1,2)==="![")rd=findClosingIndex(Ra,"]]>",rd,"StopNode is not closed.")-2;else{const fd=readTagExp(Ra,rd,">");fd&&((fd&&fd.tagName)===qa&&fd.tagExp[fd.tagExp.length-1]!=="/"&&pd++,rd=fd.closeIndex)}}function parseValue(Ra,qa,rd){if(qa&&typeof Ra=="string"){const sd=Ra.trim();return sd==="true"?!0:sd==="false"?!1:toNumber(Ra,rd)}else return util$1.isExist(Ra)?Ra:""}var OrderedObjParser_1=OrderedObjParser$1,node2json={};function prettify$1(Ra,qa){return compress(Ra,qa)}function compress(Ra,qa,rd){let sd;const pd={};for(let fd=0;fd0&&(pd[qa.textNodeName]=sd):sd!==void 0&&(pd[qa.textNodeName]=sd),pd}function propName$1(Ra){const qa=Object.keys(Ra);for(let rd=0;rd0&&(rd=EOL),arrToStr(Ra,qa,"",rd)}function arrToStr(Ra,qa,rd,sd){let pd="",fd=!1;for(let hd=0;hd`,fd=!1;continue}else if(gd===qa.commentPropName){pd+=sd+``,fd=!0;continue}else if(gd[0]==="?"){const Fd=attr_to_str(md[":@"],qa),Hd=gd==="?xml"?"":sd;let Vd=md[gd][0][qa.textNodeName];Vd=Vd.length!==0?" "+Vd:"",pd+=Hd+`<${gd}${Vd}${Fd}?>`,fd=!0;continue}let vd=sd;vd!==""&&(vd+=qa.indentBy);const Nd=attr_to_str(md[":@"],qa),Md=sd+`<${gd}${Nd}`,Ld=arrToStr(md[gd],qa,yd,vd);qa.unpairedTags.indexOf(gd)!==-1?qa.suppressUnpairedNode?pd+=Md+">":pd+=Md+"/>":(!Ld||Ld.length===0)&&qa.suppressEmptyNode?pd+=Md+"/>":Ld&&Ld.endsWith(">")?pd+=Md+`>${Ld}${sd}`:(pd+=Md+">",Ld&&sd!==""&&(Ld.includes("/>")||Ld.includes("`),fd=!0}return pd}function propName(Ra){const qa=Object.keys(Ra);for(let rd=0;rd0&&qa.processEntities)for(let rd=0;rd","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(Ra){this.options=Object.assign({},defaultOptions,Ra),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=`> +${hd.join(";")} +${dd}`}async createStringToSign(ed,ud,dd){const hd=new this.sha256;hd.update(toUint8Array(dd));const md=await hd.digest();return`${ALGORITHM_IDENTIFIER} +${ed} +${ud} +${toHex(md)}`}getCanonicalPath({path:ed}){if(this.uriEscapePath){const ud=[];for(const md of ed.split("/"))(md==null?void 0:md.length)!==0&&md!=="."&&(md===".."?ud.pop():ud.push(md));const dd=`${ed!=null&&ed.startsWith("/")?"/":""}${ud.join("/")}${ud.length>0&&(ed!=null&&ed.endsWith("/"))?"/":""}`;return escapeUri(dd).replace(/%2F/g,"/")}return ed}async getSignature(ed,ud,dd,hd){const md=await this.createStringToSign(ed,ud,hd),gd=new this.sha256(await dd);return gd.update(toUint8Array(md)),toHex(await gd.digest())}getSigningKey(ed,ud,dd,hd){return getSigningKey$1(this.sha256,ed,dd,ud,hd||this.service)}validateResolvedCredentials(ed){if(typeof ed!="object"||typeof ed.accessKeyId!="string"||typeof ed.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}}const formatDate=Ra=>{const ed=iso8601(Ra).replace(/[\-:]/g,"");return{longDate:ed,shortDate:ed.slice(0,8)}},getCanonicalHeaderList=Ra=>Object.keys(Ra).sort().join(";"),resolveAwsSdkSigV4Config=Ra=>{let ed=!1,ud;Ra.credentials&&(ed=!0,ud=memoizeIdentityProvider(Ra.credentials,isIdentityExpired,doesIdentityRequireRefresh)),ud||(Ra.credentialDefaultProvider?ud=normalizeProvider(Ra.credentialDefaultProvider(Object.assign({},Ra,{parentClientConfig:Ra}))):ud=async()=>{throw new Error("`credentials` is missing")});const dd=async()=>ud({callerClientConfig:Ra}),{signingEscapePath:hd=!0,systemClockOffset:md=Ra.systemClockOffset||0,sha256:gd}=Ra;let yd;return Ra.signer?yd=normalizeProvider(Ra.signer):Ra.regionInfoProvider?yd=()=>normalizeProvider(Ra.region)().then(async vd=>[await Ra.regionInfoProvider(vd,{useFipsEndpoint:await Ra.useFipsEndpoint(),useDualstackEndpoint:await Ra.useDualstackEndpoint()})||{},vd]).then(([vd,Cd])=>{const{signingRegion:wd,signingService:Nd}=vd;Ra.signingRegion=Ra.signingRegion||wd||Cd,Ra.signingName=Ra.signingName||Nd||Ra.serviceId;const Ld={...Ra,credentials:dd,region:Ra.signingRegion,service:Ra.signingName,sha256:gd,uriEscapePath:hd},Ud=Ra.signerConstructor||SignatureV4;return new Ud(Ld)}):yd=async vd=>{vd=Object.assign({},{name:"sigv4",signingName:Ra.signingName||Ra.defaultSigningName,signingRegion:await normalizeProvider(Ra.region)(),properties:{}},vd);const Cd=vd.signingRegion,wd=vd.signingName;Ra.signingRegion=Ra.signingRegion||Cd,Ra.signingName=Ra.signingName||wd||Ra.serviceId;const Nd={...Ra,credentials:dd,region:Ra.signingRegion,service:Ra.signingName,sha256:gd,uriEscapePath:hd},Ld=Ra.signerConstructor||SignatureV4;return new Ld(Nd)},{...Ra,systemClockOffset:md,signingEscapePath:hd,credentials:ed?async()=>dd().then(vd=>setCredentialFeature(vd,"CREDENTIALS_CODE","e")):dd,signer:yd}},getAllAliases=(Ra,ed)=>{const ud=[];if(Ra&&ud.push(Ra),ed)for(const dd of ed)ud.push(dd);return ud},getMiddlewareNameWithAliases=(Ra,ed)=>`${Ra||"anonymous"}${ed&&ed.length>0?` (a.k.a. ${ed.join(",")})`:""}`,constructStack=()=>{let Ra=[],ed=[],ud=!1;const dd=new Set,hd=Nd=>Nd.sort((Ld,Ud)=>stepWeights[Ud.step]-stepWeights[Ld.step]||priorityWeights[Ud.priority||"normal"]-priorityWeights[Ld.priority||"normal"]),md=Nd=>{let Ld=!1;const Ud=jd=>{const Gd=getAllAliases(jd.name,jd.aliases);if(Gd.includes(Nd)){Ld=!0;for(const Yd of Gd)dd.delete(Yd);return!1}return!0};return Ra=Ra.filter(Ud),ed=ed.filter(Ud),Ld},gd=Nd=>{let Ld=!1;const Ud=jd=>{if(jd.middleware===Nd){Ld=!0;for(const Gd of getAllAliases(jd.name,jd.aliases))dd.delete(Gd);return!1}return!0};return Ra=Ra.filter(Ud),ed=ed.filter(Ud),Ld},yd=Nd=>{var Ld;return Ra.forEach(Ud=>{Nd.add(Ud.middleware,{...Ud})}),ed.forEach(Ud=>{Nd.addRelativeTo(Ud.middleware,{...Ud})}),(Ld=Nd.identifyOnResolve)==null||Ld.call(Nd,wd.identifyOnResolve()),Nd},vd=Nd=>{const Ld=[];return Nd.before.forEach(Ud=>{Ud.before.length===0&&Ud.after.length===0?Ld.push(Ud):Ld.push(...vd(Ud))}),Ld.push(Nd),Nd.after.reverse().forEach(Ud=>{Ud.before.length===0&&Ud.after.length===0?Ld.push(Ud):Ld.push(...vd(Ud))}),Ld},Cd=(Nd=!1)=>{const Ld=[],Ud=[],jd={};return Ra.forEach(Yd=>{const zd={...Yd,before:[],after:[]};for(const qd of getAllAliases(zd.name,zd.aliases))jd[qd]=zd;Ld.push(zd)}),ed.forEach(Yd=>{const zd={...Yd,before:[],after:[]};for(const qd of getAllAliases(zd.name,zd.aliases))jd[qd]=zd;Ud.push(zd)}),Ud.forEach(Yd=>{if(Yd.toMiddleware){const zd=jd[Yd.toMiddleware];if(zd===void 0){if(Nd)return;throw new Error(`${Yd.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(Yd.name,Yd.aliases)} middleware ${Yd.relation} ${Yd.toMiddleware}`)}Yd.relation==="after"&&zd.after.push(Yd),Yd.relation==="before"&&zd.before.push(Yd)}}),hd(Ld).map(vd).reduce((Yd,zd)=>(Yd.push(...zd),Yd),[])},wd={add:(Nd,Ld={})=>{const{name:Ud,override:jd,aliases:Gd}=Ld,Yd={step:"initialize",priority:"normal",middleware:Nd,...Ld},zd=getAllAliases(Ud,Gd);if(zd.length>0){if(zd.some(qd=>dd.has(qd))){if(!jd)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(Ud,Gd)}'`);for(const qd of zd){const Wd=Ra.findIndex(Jd=>{var Zd;return Jd.name===qd||((Zd=Jd.aliases)==null?void 0:Zd.some(mf=>mf===qd))});if(Wd===-1)continue;const Xd=Ra[Wd];if(Xd.step!==Yd.step||Yd.priority!==Xd.priority)throw new Error(`"${getMiddlewareNameWithAliases(Xd.name,Xd.aliases)}" middleware with ${Xd.priority} priority in ${Xd.step} step cannot be overridden by "${getMiddlewareNameWithAliases(Ud,Gd)}" middleware with ${Yd.priority} priority in ${Yd.step} step.`);Ra.splice(Wd,1)}}for(const qd of zd)dd.add(qd)}Ra.push(Yd)},addRelativeTo:(Nd,Ld)=>{const{name:Ud,override:jd,aliases:Gd}=Ld,Yd={middleware:Nd,...Ld},zd=getAllAliases(Ud,Gd);if(zd.length>0){if(zd.some(qd=>dd.has(qd))){if(!jd)throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(Ud,Gd)}'`);for(const qd of zd){const Wd=ed.findIndex(Jd=>{var Zd;return Jd.name===qd||((Zd=Jd.aliases)==null?void 0:Zd.some(mf=>mf===qd))});if(Wd===-1)continue;const Xd=ed[Wd];if(Xd.toMiddleware!==Yd.toMiddleware||Xd.relation!==Yd.relation)throw new Error(`"${getMiddlewareNameWithAliases(Xd.name,Xd.aliases)}" middleware ${Xd.relation} "${Xd.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(Ud,Gd)}" middleware ${Yd.relation} "${Yd.toMiddleware}" middleware.`);ed.splice(Wd,1)}}for(const qd of zd)dd.add(qd)}ed.push(Yd)},clone:()=>yd(constructStack()),use:Nd=>{Nd.applyToStack(wd)},remove:Nd=>typeof Nd=="string"?md(Nd):gd(Nd),removeByTag:Nd=>{let Ld=!1;const Ud=jd=>{const{tags:Gd,name:Yd,aliases:zd}=jd;if(Gd&&Gd.includes(Nd)){const qd=getAllAliases(Yd,zd);for(const Wd of qd)dd.delete(Wd);return Ld=!0,!1}return!0};return Ra=Ra.filter(Ud),ed=ed.filter(Ud),Ld},concat:Nd=>{var Ud;const Ld=yd(constructStack());return Ld.use(Nd),Ld.identifyOnResolve(ud||Ld.identifyOnResolve()||(((Ud=Nd.identifyOnResolve)==null?void 0:Ud.call(Nd))??!1)),Ld},applyToStack:yd,identify:()=>Cd(!0).map(Nd=>{const Ld=Nd.step??Nd.relation+" "+Nd.toMiddleware;return getMiddlewareNameWithAliases(Nd.name,Nd.aliases)+" - "+Ld}),identifyOnResolve(Nd){return typeof Nd=="boolean"&&(ud=Nd),ud},resolve:(Nd,Ld)=>{for(const Ud of Cd().map(jd=>jd.middleware).reverse())Nd=Ud(Nd,Ld);return ud&&console.log(wd.identify()),Nd}};return wd},stepWeights={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},priorityWeights={high:3,normal:2,low:1};let Client$1=class{constructor(ed){this.config=ed,this.middlewareStack=constructStack()}send(ed,ud,dd){const hd=typeof ud!="function"?ud:void 0,md=typeof ud=="function"?ud:dd,gd=hd===void 0&&this.config.cacheMiddleware===!0;let yd;if(gd){this.handlers||(this.handlers=new WeakMap);const vd=this.handlers;vd.has(ed.constructor)?yd=vd.get(ed.constructor):(yd=ed.resolveMiddleware(this.middlewareStack,this.config,hd),vd.set(ed.constructor,yd))}else delete this.handlers,yd=ed.resolveMiddleware(this.middlewareStack,this.config,hd);if(md)yd(ed).then(vd=>md(null,vd.output),vd=>md(vd)).catch(()=>{});else return yd(ed).then(vd=>vd.output)}destroy(){var ed,ud,dd;(dd=(ud=(ed=this.config)==null?void 0:ed.requestHandler)==null?void 0:ud.destroy)==null||dd.call(ud),delete this.handlers}};class Command{constructor(){this.middlewareStack=constructStack()}static classBuilder(){return new ClassBuilder}resolveMiddlewareWithContext(ed,ud,dd,{middlewareFn:hd,clientName:md,commandName:gd,inputFilterSensitiveLog:yd,outputFilterSensitiveLog:vd,smithyContext:Cd,additionalContext:wd,CommandCtor:Nd}){for(const Yd of hd.bind(this)(Nd,ed,ud,dd))this.middlewareStack.use(Yd);const Ld=ed.concat(this.middlewareStack),{logger:Ud}=ud,jd={logger:Ud,clientName:md,commandName:gd,inputFilterSensitiveLog:yd,outputFilterSensitiveLog:vd,[SMITHY_CONTEXT_KEY]:{commandInstance:this,...Cd},...wd},{requestHandler:Gd}=ud;return Ld.resolve(Yd=>Gd.handle(Yd.request,dd||{}),jd)}}class ClassBuilder{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=ed=>ed,this._outputFilterSensitiveLog=ed=>ed,this._serializer=null,this._deserializer=null}init(ed){this._init=ed}ep(ed){return this._ep=ed,this}m(ed){return this._middlewareFn=ed,this}s(ed,ud,dd={}){return this._smithyContext={service:ed,operation:ud,...dd},this}c(ed={}){return this._additionalContext=ed,this}n(ed,ud){return this._clientName=ed,this._commandName=ud,this}f(ed=dd=>dd,ud=dd=>dd){return this._inputFilterSensitiveLog=ed,this._outputFilterSensitiveLog=ud,this}ser(ed){return this._serializer=ed,this}de(ed){return this._deserializer=ed,this}build(){const ed=this;let ud;return ud=class extends Command{static getEndpointParameterInstructions(){return ed._ep}constructor(...[dd]){super(),this.serialize=ed._serializer,this.deserialize=ed._deserializer,this.input=dd??{},ed._init(this)}resolveMiddleware(dd,hd,md){return this.resolveMiddlewareWithContext(dd,hd,md,{CommandCtor:ud,middlewareFn:ed._middlewareFn,clientName:ed._clientName,commandName:ed._commandName,inputFilterSensitiveLog:ed._inputFilterSensitiveLog,outputFilterSensitiveLog:ed._outputFilterSensitiveLog,smithyContext:ed._smithyContext,additionalContext:ed._additionalContext})}}}}const SENSITIVE_STRING="***SensitiveInformation***",parseBoolean=Ra=>{switch(Ra){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${Ra}"`)}},expectNumber=Ra=>{if(Ra!=null){if(typeof Ra=="string"){const ed=parseFloat(Ra);if(!Number.isNaN(ed))return String(ed)!==String(Ra)&&logger.warn(stackTraceWarning(`Expected number but observed string: ${Ra}`)),ed}if(typeof Ra=="number")return Ra;throw new TypeError(`Expected number, got ${typeof Ra}: ${Ra}`)}},MAX_FLOAT=Math.ceil(2**127*(2-2**-23)),expectFloat32=Ra=>{const ed=expectNumber(Ra);if(ed!==void 0&&!Number.isNaN(ed)&&ed!==1/0&&ed!==-1/0&&Math.abs(ed)>MAX_FLOAT)throw new TypeError(`Expected 32-bit float, got ${Ra}`);return ed},expectLong=Ra=>{if(Ra!=null){if(Number.isInteger(Ra)&&!Number.isNaN(Ra))return Ra;throw new TypeError(`Expected integer, got ${typeof Ra}: ${Ra}`)}},expectShort=Ra=>expectSizedInt(Ra,16),expectByte=Ra=>expectSizedInt(Ra,8),expectSizedInt=(Ra,ed)=>{const ud=expectLong(Ra);if(ud!==void 0&&castInt(ud,ed)!==ud)throw new TypeError(`Expected ${ed}-bit integer, got ${Ra}`);return ud},castInt=(Ra,ed)=>{switch(ed){case 32:return Int32Array.of(Ra)[0];case 16:return Int16Array.of(Ra)[0];case 8:return Int8Array.of(Ra)[0]}},expectNonNull=(Ra,ed)=>{if(Ra==null)throw ed?new TypeError(`Expected a non-null value for ${ed}`):new TypeError("Expected a non-null value");return Ra},expectObject=Ra=>{if(Ra==null)return;if(typeof Ra=="object"&&!Array.isArray(Ra))return Ra;const ed=Array.isArray(Ra)?"array":typeof Ra;throw new TypeError(`Expected object, got ${ed}: ${Ra}`)},expectString=Ra=>{if(Ra!=null){if(typeof Ra=="string")return Ra;if(["boolean","number","bigint"].includes(typeof Ra))return logger.warn(stackTraceWarning(`Expected string, got ${typeof Ra}: ${Ra}`)),String(Ra);throw new TypeError(`Expected string, got ${typeof Ra}: ${Ra}`)}},strictParseFloat32=Ra=>expectFloat32(typeof Ra=="string"?parseNumber(Ra):Ra),NUMBER_REGEX=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,parseNumber=Ra=>{const ed=Ra.match(NUMBER_REGEX);if(ed===null||ed[0].length!==Ra.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(Ra)},strictParseLong=Ra=>expectLong(typeof Ra=="string"?parseNumber(Ra):Ra),strictParseShort=Ra=>expectShort(typeof Ra=="string"?parseNumber(Ra):Ra),strictParseByte=Ra=>expectByte(typeof Ra=="string"?parseNumber(Ra):Ra),stackTraceWarning=Ra=>String(new TypeError(Ra).stack||Ra).split(` +`).slice(0,5).filter(ed=>!ed.includes("stackTraceWarning")).join(` +`),logger={warn:console.warn},DAYS=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function dateToUtcString(Ra){const ed=Ra.getUTCFullYear(),ud=Ra.getUTCMonth(),dd=Ra.getUTCDay(),hd=Ra.getUTCDate(),md=Ra.getUTCHours(),gd=Ra.getUTCMinutes(),yd=Ra.getUTCSeconds(),vd=hd<10?`0${hd}`:`${hd}`,Cd=md<10?`0${md}`:`${md}`,wd=gd<10?`0${gd}`:`${gd}`,Nd=yd<10?`0${yd}`:`${yd}`;return`${DAYS[dd]}, ${vd} ${MONTHS[ud]} ${ed} ${Cd}:${wd}:${Nd} GMT`}const RFC3339_WITH_OFFSET=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),parseRfc3339DateTimeWithOffset=Ra=>{if(Ra==null)return;if(typeof Ra!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const ed=RFC3339_WITH_OFFSET.exec(Ra);if(!ed)throw new TypeError("Invalid RFC-3339 date-time value");const[ud,dd,hd,md,gd,yd,vd,Cd,wd]=ed,Nd=strictParseShort(stripLeadingZeroes(dd)),Ld=parseDateValue(hd,"month",1,12),Ud=parseDateValue(md,"day",1,31),jd=buildDate(Nd,Ld,Ud,{hours:gd,minutes:yd,seconds:vd,fractionalMilliseconds:Cd});return wd.toUpperCase()!="Z"&&jd.setTime(jd.getTime()-parseOffsetToMilliseconds(wd)),jd},buildDate=(Ra,ed,ud,dd)=>{const hd=ed-1;return validateDayOfMonth(Ra,hd,ud),new Date(Date.UTC(Ra,hd,ud,parseDateValue(dd.hours,"hour",0,23),parseDateValue(dd.minutes,"minute",0,59),parseDateValue(dd.seconds,"seconds",0,60),parseMilliseconds(dd.fractionalMilliseconds)))},DAYS_IN_MONTH=[31,28,31,30,31,30,31,31,30,31,30,31],validateDayOfMonth=(Ra,ed,ud)=>{let dd=DAYS_IN_MONTH[ed];if(ed===1&&isLeapYear(Ra)&&(dd=29),ud>dd)throw new TypeError(`Invalid day for ${MONTHS[ed]} in ${Ra}: ${ud}`)},isLeapYear=Ra=>Ra%4===0&&(Ra%100!==0||Ra%400===0),parseDateValue=(Ra,ed,ud,dd)=>{const hd=strictParseByte(stripLeadingZeroes(Ra));if(hddd)throw new TypeError(`${ed} must be between ${ud} and ${dd}, inclusive`);return hd},parseMilliseconds=Ra=>Ra==null?0:strictParseFloat32("0."+Ra)*1e3,parseOffsetToMilliseconds=Ra=>{const ed=Ra[0];let ud=1;if(ed=="+")ud=1;else if(ed=="-")ud=-1;else throw new TypeError(`Offset direction, ${ed}, must be "+" or "-"`);const dd=Number(Ra.substring(1,3)),hd=Number(Ra.substring(4,6));return ud*(dd*60+hd)*60*1e3},stripLeadingZeroes=Ra=>{let ed=0;for(;ed{Object.entries(ed).filter(([,dd])=>dd!==void 0).forEach(([dd,hd])=>{(Ra[dd]==null||Ra[dd]==="")&&(Ra[dd]=hd)});const ud=Ra.message||Ra.Message||"UnknownError";return Ra.message=ud,delete Ra.Message,Ra},throwDefaultError$1=({output:Ra,parsedBody:ed,exceptionCtor:ud,errorCode:dd})=>{const hd=deserializeMetadata$1(Ra),md=hd.httpStatusCode?hd.httpStatusCode+"":void 0,gd=new ud({name:(ed==null?void 0:ed.code)||(ed==null?void 0:ed.Code)||dd||md||"UnknownError",$fault:"client",$metadata:hd});throw decorateServiceException(gd,ed)},withBaseException=Ra=>({output:ed,parsedBody:ud,errorCode:dd})=>{throwDefaultError$1({output:ed,parsedBody:ud,exceptionCtor:Ra,errorCode:dd})},deserializeMetadata$1=Ra=>({httpStatusCode:Ra.statusCode,requestId:Ra.headers["x-amzn-requestid"]??Ra.headers["x-amzn-request-id"]??Ra.headers["x-amz-request-id"],extendedRequestId:Ra.headers["x-amz-id-2"],cfId:Ra.headers["x-amz-cf-id"]}),loadConfigsForDefaultMode=Ra=>{switch(Ra){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},getChecksumConfiguration=Ra=>{const ed=[];for(const ud in AlgorithmId){const dd=AlgorithmId[ud];Ra[dd]!==void 0&&ed.push({algorithmId:()=>dd,checksumConstructor:()=>Ra[dd]})}return{_checksumAlgorithms:ed,addChecksumAlgorithm(ud){this._checksumAlgorithms.push(ud)},checksumAlgorithms(){return this._checksumAlgorithms}}},resolveChecksumRuntimeConfig=Ra=>{const ed={};return Ra.checksumAlgorithms().forEach(ud=>{ed[ud.algorithmId()]=ud.checksumConstructor()}),ed},getRetryConfiguration=Ra=>{let ed=Ra.retryStrategy;return{setRetryStrategy(ud){ed=ud},retryStrategy(){return ed}}},resolveRetryRuntimeConfig=Ra=>{const ed={};return ed.retryStrategy=Ra.retryStrategy(),ed},getDefaultExtensionConfiguration=Ra=>({...getChecksumConfiguration(Ra),...getRetryConfiguration(Ra)}),resolveDefaultRuntimeConfig=Ra=>({...resolveChecksumRuntimeConfig(Ra),...resolveRetryRuntimeConfig(Ra)}),getValueFromTextNode=Ra=>{const ed="#text";for(const ud in Ra)Ra.hasOwnProperty(ud)&&Ra[ud][ed]!==void 0?Ra[ud]=Ra[ud][ed]:typeof Ra[ud]=="object"&&Ra[ud]!==null&&(Ra[ud]=getValueFromTextNode(Ra[ud]));return Ra},isSerializableHeaderValue=Ra=>Ra!=null;class NoOpLogger{trace(){}debug(){}info(){}warn(){}error(){}}function map$2(Ra,ed,ud){let dd,hd,md;if(typeof ed>"u"&&typeof ud>"u")dd={},md=Ra;else{if(dd=Ra,typeof ed=="function")return hd=ed,md=ud,mapWithFilter(dd,hd,md);md=ed}for(const gd of Object.keys(md)){if(!Array.isArray(md[gd])){dd[gd]=md[gd];continue}applyInstruction(dd,null,md,gd)}return dd}const mapWithFilter=(Ra,ed,ud)=>map$2(Ra,Object.entries(ud).reduce((dd,[hd,md])=>(Array.isArray(md)?dd[hd]=md:typeof md=="function"?dd[hd]=[ed,md()]:dd[hd]=[ed,md],dd),{})),applyInstruction=(Ra,ed,ud,dd)=>{let[hd,md]=ud[dd];if(typeof md=="function"){let gd;const yd=hd===void 0&&(gd=md())!=null,vd=typeof hd=="function"&&!!hd(void 0)||typeof hd!="function"&&!!hd;yd?Ra[dd]=gd:vd&&(Ra[dd]=md())}else{const gd=hd===void 0&&md!=null,yd=typeof hd=="function"&&!!hd(md)||typeof hd!="function"&&!!hd;(gd||yd)&&(Ra[dd]=md)}},serializeDateTime=Ra=>Ra.toISOString().replace(".000Z","Z"),collectBodyString=(Ra,ed)=>collectBody$1(Ra,ed).then(ud=>ed.utf8Encoder(ud));var validator$2={},util$4={};(function(Ra){const ed=":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",ud=ed+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",dd="["+ed+"]["+ud+"]*",hd=new RegExp("^"+dd+"$"),md=function(yd,vd){const Cd=[];let wd=vd.exec(yd);for(;wd;){const Nd=[];Nd.startIndex=vd.lastIndex-wd[0].length;const Ld=wd.length;for(let Ud=0;Ud"u")};Ra.isExist=function(yd){return typeof yd<"u"},Ra.isEmptyObject=function(yd){return Object.keys(yd).length===0},Ra.merge=function(yd,vd,Cd){if(vd){const wd=Object.keys(vd),Nd=wd.length;for(let Ld=0;Ld"&&Ra[md]!==" "&&Ra[md]!==" "&&Ra[md]!==` +`&&Ra[md]!=="\r";md++)vd+=Ra[md];if(vd=vd.trim(),vd[vd.length-1]==="/"&&(vd=vd.substring(0,vd.length-1),md--),!validateTagName(vd)){let Nd;return vd.trim().length===0?Nd="Invalid space after '<'.":Nd="Tag '"+vd+"' is an invalid name.",getErrorObject("InvalidTag",Nd,getLineNumberForPosition(Ra,md))}const Cd=readAttributeStr(Ra,md);if(Cd===!1)return getErrorObject("InvalidAttr","Attributes for '"+vd+"' have open quote.",getLineNumberForPosition(Ra,md));let wd=Cd.value;if(md=Cd.index,wd[wd.length-1]==="/"){const Nd=md-wd.length;wd=wd.substring(0,wd.length-1);const Ld=validateAttributeString(wd,ed);if(Ld===!0)dd=!0;else return getErrorObject(Ld.err.code,Ld.err.msg,getLineNumberForPosition(Ra,Nd+Ld.err.line))}else if(yd)if(Cd.tagClosed){if(wd.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+vd+"' can't have attributes or invalid starting.",getLineNumberForPosition(Ra,gd));if(ud.length===0)return getErrorObject("InvalidTag","Closing tag '"+vd+"' has not been opened.",getLineNumberForPosition(Ra,gd));{const Nd=ud.pop();if(vd!==Nd.tagName){let Ld=getLineNumberForPosition(Ra,Nd.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+Nd.tagName+"' (opened in line "+Ld.line+", col "+Ld.col+") instead of closing tag '"+vd+"'.",getLineNumberForPosition(Ra,gd))}ud.length==0&&(hd=!0)}}else return getErrorObject("InvalidTag","Closing tag '"+vd+"' doesn't have proper closing.",getLineNumberForPosition(Ra,md));else{const Nd=validateAttributeString(wd,ed);if(Nd!==!0)return getErrorObject(Nd.err.code,Nd.err.msg,getLineNumberForPosition(Ra,md-wd.length+Nd.err.line));if(hd===!0)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(Ra,md));ed.unpairedTags.indexOf(vd)!==-1||ud.push({tagName:vd,tagStartPos:gd}),dd=!0}for(md++;md0)return getErrorObject("InvalidXml","Invalid '"+JSON.stringify(ud.map(md=>md.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return getErrorObject("InvalidXml","Start tag expected.",1);return!0};function isWhiteSpace(Ra){return Ra===" "||Ra===" "||Ra===` +`||Ra==="\r"}function readPI(Ra,ed){const ud=ed;for(;ed5&&dd==="xml")return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(Ra,ed));if(Ra[ed]=="?"&&Ra[ed+1]==">"){ed++;break}else continue}return ed}function readCommentAndCDATA(Ra,ed){if(Ra.length>ed+5&&Ra[ed+1]==="-"&&Ra[ed+2]==="-"){for(ed+=3;ed"){ed+=2;break}}else if(Ra.length>ed+8&&Ra[ed+1]==="D"&&Ra[ed+2]==="O"&&Ra[ed+3]==="C"&&Ra[ed+4]==="T"&&Ra[ed+5]==="Y"&&Ra[ed+6]==="P"&&Ra[ed+7]==="E"){let ud=1;for(ed+=8;ed"&&(ud--,ud===0))break}else if(Ra.length>ed+9&&Ra[ed+1]==="["&&Ra[ed+2]==="C"&&Ra[ed+3]==="D"&&Ra[ed+4]==="A"&&Ra[ed+5]==="T"&&Ra[ed+6]==="A"&&Ra[ed+7]==="["){for(ed+=8;ed"){ed+=2;break}}return ed}const doubleQuote='"',singleQuote="'";function readAttributeStr(Ra,ed){let ud="",dd="",hd=!1;for(;ed"&&dd===""){hd=!0;break}ud+=Ra[ed]}return dd!==""?!1:{value:ud,index:ed,tagClosed:hd}}const validAttrStrRegxp=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function validateAttributeString(Ra,ed){const ud=util$3.getAllMatches(Ra,validAttrStrRegxp),dd={};for(let hd=0;hd!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(Ra,ed,ud){return Ra}},buildOptions$1=function(Ra){return Object.assign({},defaultOptions$1,Ra)};OptionsBuilder.buildOptions=buildOptions$1;OptionsBuilder.defaultOptions=defaultOptions$1;class XmlNode{constructor(ed){this.tagname=ed,this.child=[],this[":@"]={}}add(ed,ud){ed==="__proto__"&&(ed="#__proto__"),this.child.push({[ed]:ud})}addChild(ed){ed.tagname==="__proto__"&&(ed.tagname="#__proto__"),ed[":@"]&&Object.keys(ed[":@"]).length>0?this.child.push({[ed.tagname]:ed.child,":@":ed[":@"]}):this.child.push({[ed.tagname]:ed.child})}}var xmlNode$1=XmlNode;const util$2=util$4;function readDocType$1(Ra,ed){const ud={};if(Ra[ed+3]==="O"&&Ra[ed+4]==="C"&&Ra[ed+5]==="T"&&Ra[ed+6]==="Y"&&Ra[ed+7]==="P"&&Ra[ed+8]==="E"){ed=ed+9;let dd=1,hd=!1,md=!1,gd="";for(;ed"){if(md?Ra[ed-1]==="-"&&Ra[ed-2]==="-"&&(md=!1,dd--):dd--,dd===0)break}else Ra[ed]==="["?hd=!0:gd+=Ra[ed];if(dd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:ud,i:ed}}function readEntityExp(Ra,ed){let ud="";for(;ed0&&hd&&ud[2]!==".")return Ra;if(!ed.leadingZeros&&md.length>0&&!hd&&ud[1]!==".")return Ra;if(ed.leadingZeros&&md===Ra)return 0;{const yd=Number(ud),vd=""+yd;return vd.search(/[eE]/)!==-1?ed.eNotation?yd:Ra:ud.indexOf(".")!==-1?vd==="0"&&gd===""||vd===gd||hd&&vd==="-"+gd?yd:Ra:md?gd===vd||hd+gd===vd?yd:Ra:ud===vd||ud===hd+vd?yd:Ra}}else return Ra}}function trimZeros(Ra){return Ra&&Ra.indexOf(".")!==-1&&(Ra=Ra.replace(/0+$/,""),Ra==="."?Ra="0":Ra[0]==="."?Ra="0"+Ra:Ra[Ra.length-1]==="."&&(Ra=Ra.substr(0,Ra.length-1))),Ra}function parse_int(Ra,ed){if(parseInt)return parseInt(Ra,ed);if(Number.parseInt)return Number.parseInt(Ra,ed);if(window&&window.parseInt)return window.parseInt(Ra,ed);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}var strnum=toNumber$1;const util$1=util$4,xmlNode=xmlNode$1,readDocType=DocTypeReader,toNumber=strnum;let OrderedObjParser$1=class{constructor(ed){this.options=ed,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(ud,dd)=>String.fromCharCode(Number.parseInt(dd,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(ud,dd)=>String.fromCharCode(Number.parseInt(dd,16))}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml$1,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild}};function addExternalEntities(Ra){const ed=Object.keys(Ra);for(let ud=0;ud0)){gd||(Ra=this.replaceEntitiesValue(Ra));const yd=this.options.tagValueProcessor(ed,Ra,ud,hd,md);return yd==null?Ra:typeof yd!=typeof Ra||yd!==Ra?yd:this.options.trimValues?parseValue(Ra,this.options.parseTagValue,this.options.numberParseOptions):Ra.trim()===Ra?parseValue(Ra,this.options.parseTagValue,this.options.numberParseOptions):Ra}}function resolveNameSpace(Ra){if(this.options.removeNSPrefix){const ed=Ra.split(":"),ud=Ra.charAt(0)==="/"?"/":"";if(ed[0]==="xmlns")return"";ed.length===2&&(Ra=ud+ed[1])}return Ra}const attrsRegx=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function buildAttributesMap(Ra,ed,ud){if(!this.options.ignoreAttributes&&typeof Ra=="string"){const dd=util$1.getAllMatches(Ra,attrsRegx),hd=dd.length,md={};for(let gd=0;gd",md,"Closing Tag is not closed.");let vd=Ra.substring(md+2,yd).trim();if(this.options.removeNSPrefix){const Nd=vd.indexOf(":");Nd!==-1&&(vd=vd.substr(Nd+1))}this.options.transformTagName&&(vd=this.options.transformTagName(vd)),ud&&(dd=this.saveTextToParentTag(dd,ud,hd));const Cd=hd.substring(hd.lastIndexOf(".")+1);if(vd&&this.options.unpairedTags.indexOf(vd)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let wd=0;Cd&&this.options.unpairedTags.indexOf(Cd)!==-1?(wd=hd.lastIndexOf(".",hd.lastIndexOf(".")-1),this.tagsNodeStack.pop()):wd=hd.lastIndexOf("."),hd=hd.substring(0,wd),ud=this.tagsNodeStack.pop(),dd="",md=yd}else if(Ra[md+1]==="?"){let yd=readTagExp(Ra,md,!1,"?>");if(!yd)throw new Error("Pi Tag is not closed.");if(dd=this.saveTextToParentTag(dd,ud,hd),!(this.options.ignoreDeclaration&&yd.tagName==="?xml"||this.options.ignorePiTags)){const vd=new xmlNode(yd.tagName);vd.add(this.options.textNodeName,""),yd.tagName!==yd.tagExp&&yd.attrExpPresent&&(vd[":@"]=this.buildAttributesMap(yd.tagExp,hd,yd.tagName)),this.addChild(ud,vd,hd)}md=yd.closeIndex+1}else if(Ra.substr(md+1,3)==="!--"){const yd=findClosingIndex(Ra,"-->",md+4,"Comment is not closed.");if(this.options.commentPropName){const vd=Ra.substring(md+4,yd-2);dd=this.saveTextToParentTag(dd,ud,hd),ud.add(this.options.commentPropName,[{[this.options.textNodeName]:vd}])}md=yd}else if(Ra.substr(md+1,2)==="!D"){const yd=readDocType(Ra,md);this.docTypeEntities=yd.entities,md=yd.i}else if(Ra.substr(md+1,2)==="!["){const yd=findClosingIndex(Ra,"]]>",md,"CDATA is not closed.")-2,vd=Ra.substring(md+9,yd);dd=this.saveTextToParentTag(dd,ud,hd);let Cd=this.parseTextData(vd,ud.tagname,hd,!0,!1,!0,!0);Cd==null&&(Cd=""),this.options.cdataPropName?ud.add(this.options.cdataPropName,[{[this.options.textNodeName]:vd}]):ud.add(this.options.textNodeName,Cd),md=yd+2}else{let yd=readTagExp(Ra,md,this.options.removeNSPrefix),vd=yd.tagName;const Cd=yd.rawTagName;let wd=yd.tagExp,Nd=yd.attrExpPresent,Ld=yd.closeIndex;this.options.transformTagName&&(vd=this.options.transformTagName(vd)),ud&&dd&&ud.tagname!=="!xml"&&(dd=this.saveTextToParentTag(dd,ud,hd,!1));const Ud=ud;if(Ud&&this.options.unpairedTags.indexOf(Ud.tagname)!==-1&&(ud=this.tagsNodeStack.pop(),hd=hd.substring(0,hd.lastIndexOf("."))),vd!==ed.tagname&&(hd+=hd?"."+vd:vd),this.isItStopNode(this.options.stopNodes,hd,vd)){let jd="";if(wd.length>0&&wd.lastIndexOf("/")===wd.length-1)vd[vd.length-1]==="/"?(vd=vd.substr(0,vd.length-1),hd=hd.substr(0,hd.length-1),wd=vd):wd=wd.substr(0,wd.length-1),md=yd.closeIndex;else if(this.options.unpairedTags.indexOf(vd)!==-1)md=yd.closeIndex;else{const Yd=this.readStopNodeData(Ra,Cd,Ld+1);if(!Yd)throw new Error(`Unexpected end of ${Cd}`);md=Yd.i,jd=Yd.tagContent}const Gd=new xmlNode(vd);vd!==wd&&Nd&&(Gd[":@"]=this.buildAttributesMap(wd,hd,vd)),jd&&(jd=this.parseTextData(jd,vd,hd,!0,Nd,!0,!0)),hd=hd.substr(0,hd.lastIndexOf(".")),Gd.add(this.options.textNodeName,jd),this.addChild(ud,Gd,hd)}else{if(wd.length>0&&wd.lastIndexOf("/")===wd.length-1){vd[vd.length-1]==="/"?(vd=vd.substr(0,vd.length-1),hd=hd.substr(0,hd.length-1),wd=vd):wd=wd.substr(0,wd.length-1),this.options.transformTagName&&(vd=this.options.transformTagName(vd));const jd=new xmlNode(vd);vd!==wd&&Nd&&(jd[":@"]=this.buildAttributesMap(wd,hd,vd)),this.addChild(ud,jd,hd),hd=hd.substr(0,hd.lastIndexOf("."))}else{const jd=new xmlNode(vd);this.tagsNodeStack.push(ud),vd!==wd&&Nd&&(jd[":@"]=this.buildAttributesMap(wd,hd,vd)),this.addChild(ud,jd,hd),ud=jd}dd="",md=Ld}}else dd+=Ra[md];return ed.child};function addChild(Ra,ed,ud){const dd=this.options.updateTag(ed.tagname,ud,ed[":@"]);dd===!1||(typeof dd=="string"&&(ed.tagname=dd),Ra.addChild(ed))}const replaceEntitiesValue$1=function(Ra){if(this.options.processEntities){for(let ed in this.docTypeEntities){const ud=this.docTypeEntities[ed];Ra=Ra.replace(ud.regx,ud.val)}for(let ed in this.lastEntities){const ud=this.lastEntities[ed];Ra=Ra.replace(ud.regex,ud.val)}if(this.options.htmlEntities)for(let ed in this.htmlEntities){const ud=this.htmlEntities[ed];Ra=Ra.replace(ud.regex,ud.val)}Ra=Ra.replace(this.ampEntity.regex,this.ampEntity.val)}return Ra};function saveTextToParentTag(Ra,ed,ud,dd){return Ra&&(dd===void 0&&(dd=Object.keys(ed.child).length===0),Ra=this.parseTextData(Ra,ed.tagname,ud,!1,ed[":@"]?Object.keys(ed[":@"]).length!==0:!1,dd),Ra!==void 0&&Ra!==""&&ed.add(this.options.textNodeName,Ra),Ra=""),Ra}function isItStopNode(Ra,ed,ud){const dd="*."+ud;for(const hd in Ra){const md=Ra[hd];if(dd===md||ed===md)return!0}return!1}function tagExpWithClosingIndex(Ra,ed,ud=">"){let dd,hd="";for(let md=ed;md",ud,`${ed} is not closed`);if(Ra.substring(ud+2,md).trim()===ed&&(hd--,hd===0))return{tagContent:Ra.substring(dd,ud),i:md};ud=md}else if(Ra[ud+1]==="?")ud=findClosingIndex(Ra,"?>",ud+1,"StopNode is not closed.");else if(Ra.substr(ud+1,3)==="!--")ud=findClosingIndex(Ra,"-->",ud+3,"StopNode is not closed.");else if(Ra.substr(ud+1,2)==="![")ud=findClosingIndex(Ra,"]]>",ud,"StopNode is not closed.")-2;else{const md=readTagExp(Ra,ud,">");md&&((md&&md.tagName)===ed&&md.tagExp[md.tagExp.length-1]!=="/"&&hd++,ud=md.closeIndex)}}function parseValue(Ra,ed,ud){if(ed&&typeof Ra=="string"){const dd=Ra.trim();return dd==="true"?!0:dd==="false"?!1:toNumber(Ra,ud)}else return util$1.isExist(Ra)?Ra:""}var OrderedObjParser_1=OrderedObjParser$1,node2json={};function prettify$1(Ra,ed){return compress(Ra,ed)}function compress(Ra,ed,ud){let dd;const hd={};for(let md=0;md0&&(hd[ed.textNodeName]=dd):dd!==void 0&&(hd[ed.textNodeName]=dd),hd}function propName$1(Ra){const ed=Object.keys(Ra);for(let ud=0;ud0&&(ud=EOL),arrToStr(Ra,ed,"",ud)}function arrToStr(Ra,ed,ud,dd){let hd="",md=!1;for(let gd=0;gd`,md=!1;continue}else if(vd===ed.commentPropName){hd+=dd+``,md=!0;continue}else if(vd[0]==="?"){const jd=attr_to_str(yd[":@"],ed),Gd=vd==="?xml"?"":dd;let Yd=yd[vd][0][ed.textNodeName];Yd=Yd.length!==0?" "+Yd:"",hd+=Gd+`<${vd}${Yd}${jd}?>`,md=!0;continue}let wd=dd;wd!==""&&(wd+=ed.indentBy);const Nd=attr_to_str(yd[":@"],ed),Ld=dd+`<${vd}${Nd}`,Ud=arrToStr(yd[vd],ed,Cd,wd);ed.unpairedTags.indexOf(vd)!==-1?ed.suppressUnpairedNode?hd+=Ld+">":hd+=Ld+"/>":(!Ud||Ud.length===0)&&ed.suppressEmptyNode?hd+=Ld+"/>":Ud&&Ud.endsWith(">")?hd+=Ld+`>${Ud}${dd}`:(hd+=Ld+">",Ud&&dd!==""&&(Ud.includes("/>")||Ud.includes("`),md=!0}return hd}function propName(Ra){const ed=Object.keys(Ra);for(let ud=0;ud0&&ed.processEntities)for(let ud=0;ud","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(Ra){this.options=Object.assign({},defaultOptions,Ra),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=`> `,this.newLine=` -`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Builder.prototype.build=function(Ra){return this.options.preserveOrder?buildFromOrderedJs(Ra,this.options):(Array.isArray(Ra)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Ra={[this.options.arrayNodeName]:Ra}),this.j2x(Ra,0).val)};Builder.prototype.j2x=function(Ra,qa){let rd="",sd="";for(let pd in Ra)if(Object.prototype.hasOwnProperty.call(Ra,pd))if(typeof Ra[pd]>"u")this.isAttribute(pd)&&(sd+="");else if(Ra[pd]===null)this.isAttribute(pd)?sd+="":pd[0]==="?"?sd+=this.indentate(qa)+"<"+pd+"?"+this.tagEndChar:sd+=this.indentate(qa)+"<"+pd+"/"+this.tagEndChar;else if(Ra[pd]instanceof Date)sd+=this.buildTextValNode(Ra[pd],pd,"",qa);else if(typeof Ra[pd]!="object"){const fd=this.isAttribute(pd);if(fd)rd+=this.buildAttrPairStr(fd,""+Ra[pd]);else if(pd===this.options.textNodeName){let hd=this.options.tagValueProcessor(pd,""+Ra[pd]);sd+=this.replaceEntitiesValue(hd)}else sd+=this.buildTextValNode(Ra[pd],pd,"",qa)}else if(Array.isArray(Ra[pd])){const fd=Ra[pd].length;let hd="",md="";for(let gd=0;gd"u"))if(yd===null)pd[0]==="?"?sd+=this.indentate(qa)+"<"+pd+"?"+this.tagEndChar:sd+=this.indentate(qa)+"<"+pd+"/"+this.tagEndChar;else if(typeof yd=="object")if(this.options.oneListGroup){const vd=this.j2x(yd,qa+1);hd+=vd.val,this.options.attributesGroupName&&yd.hasOwnProperty(this.options.attributesGroupName)&&(md+=vd.attrStr)}else hd+=this.processTextOrObjNode(yd,pd,qa);else if(this.options.oneListGroup){let vd=this.options.tagValueProcessor(pd,yd);vd=this.replaceEntitiesValue(vd),hd+=vd}else hd+=this.buildTextValNode(yd,pd,"",qa)}this.options.oneListGroup&&(hd=this.buildObjectNode(hd,pd,md,qa)),sd+=hd}else if(this.options.attributesGroupName&&pd===this.options.attributesGroupName){const fd=Object.keys(Ra[pd]),hd=fd.length;for(let md=0;md"+Ra+pd:this.options.commentPropName!==!1&&qa===this.options.commentPropName&&fd.length===0?this.indentate(sd)+``+this.newLine:this.indentate(sd)+"<"+qa+rd+fd+this.tagEndChar+Ra+this.indentate(sd)+pd}};Builder.prototype.closeTag=function(Ra){let qa="";return this.options.unpairedTags.indexOf(Ra)!==-1?this.options.suppressUnpairedNode||(qa="/"):this.options.suppressEmptyNode?qa="/":qa=`>`+this.newLine;if(this.options.commentPropName!==!1&&qa===this.options.commentPropName)return this.indentate(sd)+``+this.newLine;if(qa[0]==="?")return this.indentate(sd)+"<"+qa+rd+"?"+this.tagEndChar;{let pd=this.options.tagValueProcessor(qa,Ra);return pd=this.replaceEntitiesValue(pd),pd===""?this.indentate(sd)+"<"+qa+rd+this.closeTag(qa)+this.tagEndChar:this.indentate(sd)+"<"+qa+rd+">"+pd+"0&&this.options.processEntities)for(let qa=0;qacollectBodyString(Ra,qa).then(rd=>{if(rd.length){const sd=new fxp$2.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(gd,yd)=>yd.trim()===""&&yd.includes(` -`)?"":void 0});sd.addEntity("#xD","\r"),sd.addEntity("#10",` -`);let pd;try{pd=sd.parse(rd,!0)}catch(gd){throw gd&&typeof gd=="object"&&Object.defineProperty(gd,"$responseBodyText",{value:rd}),gd}const fd="#text",hd=Object.keys(pd)[0],md=pd[hd];return md[fd]&&(md[hd]=md[fd],delete md[fd]),getValueFromTextNode(md)}return{}}),parseXmlErrorBody=async(Ra,qa)=>{const rd=await parseXmlBody(Ra,qa);return rd.Error&&(rd.Error.message=rd.Error.message??rd.Error.Message),rd},loadRestXmlErrorCode=(Ra,qa)=>{var rd;if(((rd=qa==null?void 0:qa.Error)==null?void 0:rd.Code)!==void 0)return qa.Error.Code;if((qa==null?void 0:qa.Code)!==void 0)return qa.Code;if(Ra.statusCode==404)return"NotFound"},CLIENT_SUPPORTED_ALGORITHMS=[ChecksumAlgorithm.CRC32,ChecksumAlgorithm.CRC32C,ChecksumAlgorithm.CRC64NVME,ChecksumAlgorithm.SHA1,ChecksumAlgorithm.SHA256],PRIORITY_ORDER_ALGORITHMS=[ChecksumAlgorithm.SHA256,ChecksumAlgorithm.SHA1,ChecksumAlgorithm.CRC32,ChecksumAlgorithm.CRC32C,ChecksumAlgorithm.CRC64NVME],getChecksumAlgorithmForRequest=(Ra,{requestChecksumRequired:qa,requestAlgorithmMember:rd,requestChecksumCalculation:sd})=>{if(!rd)return sd===RequestChecksumCalculation.WHEN_SUPPORTED||qa?DEFAULT_CHECKSUM_ALGORITHM:void 0;if(!Ra[rd])return;const pd=Ra[rd];if(!CLIENT_SUPPORTED_ALGORITHMS.includes(pd))throw new Error(`The checksum algorithm "${pd}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}.`);return pd},getChecksumLocationName=Ra=>Ra===ChecksumAlgorithm.MD5?"content-md5":`x-amz-checksum-${Ra.toLowerCase()}`,hasHeader=(Ra,qa)=>{const rd=Ra.toLowerCase();for(const sd of Object.keys(qa))if(rd===sd.toLowerCase())return!0;return!1},hasHeaderWithPrefix=(Ra,qa)=>{const rd=Ra.toLowerCase();for(const sd of Object.keys(qa))if(sd.toLowerCase().startsWith(rd))return!0;return!1},isStreaming=Ra=>Ra!==void 0&&typeof Ra!="string"&&!ArrayBuffer.isView(Ra)&&!isArrayBuffer$1(Ra);function __awaiter$8(Ra,qa,rd,sd){function pd(fd){return fd instanceof rd?fd:new rd(function(hd){hd(fd)})}return new(rd||(rd=Promise))(function(fd,hd){function md(vd){try{yd(sd.next(vd))}catch(Nd){hd(Nd)}}function gd(vd){try{yd(sd.throw(vd))}catch(Nd){hd(Nd)}}function yd(vd){vd.done?fd(vd.value):pd(vd.value).then(md,gd)}yd((sd=sd.apply(Ra,qa||[])).next())})}function __generator$8(Ra,qa){var rd={label:0,sent:function(){if(fd[0]&1)throw fd[1];return fd[1]},trys:[],ops:[]},sd,pd,fd,hd=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return hd.next=md(0),hd.throw=md(1),hd.return=md(2),typeof Symbol=="function"&&(hd[Symbol.iterator]=function(){return this}),hd;function md(yd){return function(vd){return gd([yd,vd])}}function gd(yd){if(sd)throw new TypeError("Generator is already executing.");for(;hd&&(hd=0,yd[0]&&(rd=0)),rd;)try{if(sd=1,pd&&(fd=yd[0]&2?pd.return:yd[0]?pd.throw||((fd=pd.return)&&fd.call(pd),0):pd.next)&&!(fd=fd.call(pd,yd[1])).done)return fd;switch(pd=0,fd&&(yd=[yd[0]&2,fd.value]),yd[0]){case 0:case 1:fd=yd;break;case 4:return rd.label++,{value:yd[1],done:!1};case 5:rd.label++,pd=yd[1],yd=[0];continue;case 7:yd=rd.ops.pop(),rd.trys.pop();continue;default:if(fd=rd.trys,!(fd=fd.length>0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]=Ra.length&&(Ra=void 0),{value:Ra&&Ra[sd++],done:!Ra}}};throw new TypeError(qa?"Object is not iterable.":"Symbol.iterator is not defined.")}typeof SuppressedError=="function"&&SuppressedError;const fromUtf8$2=Ra=>new TextEncoder().encode(Ra);var fromUtf8$1=typeof Buffer$4<"u"&&Buffer$4.from?function(Ra){return Buffer$4.from(Ra,"utf8")}:fromUtf8$2;function convertToBuffer$2(Ra){return Ra instanceof Uint8Array?Ra:typeof Ra=="string"?fromUtf8$1(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra)}function isEmptyData$2(Ra){return typeof Ra=="string"?Ra.length===0:Ra.byteLength===0}function numToUint8(Ra){return new Uint8Array([(Ra&4278190080)>>24,(Ra&16711680)>>16,(Ra&65280)>>8,Ra&255])}function uint32ArrayFrom(Ra){if(!Uint32Array.from){for(var qa=new Uint32Array(Ra.length),rd=0;rd>>8^lookupTable$1[(this.checksum^hd)&255]}}catch(md){rd={error:md}}finally{try{fd&&!fd.done&&(sd=pd.return)&&sd.call(pd)}finally{if(rd)throw rd.error}}return this},Ra.prototype.digest=function(){return(this.checksum^4294967295)>>>0},Ra}(),a_lookupTable=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],lookupTable$1=uint32ArrayFrom(a_lookupTable),AwsCrc32=function(){function Ra(){this.crc32=new Crc32}return Ra.prototype.update=function(qa){isEmptyData$2(qa)||this.crc32.update(convertToBuffer$2(qa))},Ra.prototype.digest=function(){return __awaiter$8(this,void 0,void 0,function(){return __generator$8(this,function(qa){return[2,numToUint8(this.crc32.digest())]})})},Ra.prototype.reset=function(){this.crc32=new Crc32},Ra}(),Crc32=function(){function Ra(){this.checksum=4294967295}return Ra.prototype.update=function(qa){var rd,sd;try{for(var pd=__values(qa),fd=pd.next();!fd.done;fd=pd.next()){var hd=fd.value;this.checksum=this.checksum>>>8^lookupTable[(this.checksum^hd)&255]}}catch(md){rd={error:md}}finally{try{fd&&!fd.done&&(sd=pd.return)&&sd.call(pd)}finally{if(rd)throw rd.error}}return this},Ra.prototype.digest=function(){return(this.checksum^4294967295)>>>0},Ra}(),a_lookUpTable=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],lookupTable=uint32ArrayFrom(a_lookUpTable);const getCrc32ChecksumAlgorithmFunction=()=>AwsCrc32,selectChecksumAlgorithmFunction=(Ra,qa)=>{switch(Ra){case ChecksumAlgorithm.MD5:return qa.md5;case ChecksumAlgorithm.CRC32:return getCrc32ChecksumAlgorithmFunction();case ChecksumAlgorithm.CRC32C:return AwsCrc32c;case ChecksumAlgorithm.CRC64NVME:throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly. +`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}Builder.prototype.build=function(Ra){return this.options.preserveOrder?buildFromOrderedJs(Ra,this.options):(Array.isArray(Ra)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Ra={[this.options.arrayNodeName]:Ra}),this.j2x(Ra,0).val)};Builder.prototype.j2x=function(Ra,ed){let ud="",dd="";for(let hd in Ra)if(Object.prototype.hasOwnProperty.call(Ra,hd))if(typeof Ra[hd]>"u")this.isAttribute(hd)&&(dd+="");else if(Ra[hd]===null)this.isAttribute(hd)?dd+="":hd[0]==="?"?dd+=this.indentate(ed)+"<"+hd+"?"+this.tagEndChar:dd+=this.indentate(ed)+"<"+hd+"/"+this.tagEndChar;else if(Ra[hd]instanceof Date)dd+=this.buildTextValNode(Ra[hd],hd,"",ed);else if(typeof Ra[hd]!="object"){const md=this.isAttribute(hd);if(md)ud+=this.buildAttrPairStr(md,""+Ra[hd]);else if(hd===this.options.textNodeName){let gd=this.options.tagValueProcessor(hd,""+Ra[hd]);dd+=this.replaceEntitiesValue(gd)}else dd+=this.buildTextValNode(Ra[hd],hd,"",ed)}else if(Array.isArray(Ra[hd])){const md=Ra[hd].length;let gd="",yd="";for(let vd=0;vd"u"))if(Cd===null)hd[0]==="?"?dd+=this.indentate(ed)+"<"+hd+"?"+this.tagEndChar:dd+=this.indentate(ed)+"<"+hd+"/"+this.tagEndChar;else if(typeof Cd=="object")if(this.options.oneListGroup){const wd=this.j2x(Cd,ed+1);gd+=wd.val,this.options.attributesGroupName&&Cd.hasOwnProperty(this.options.attributesGroupName)&&(yd+=wd.attrStr)}else gd+=this.processTextOrObjNode(Cd,hd,ed);else if(this.options.oneListGroup){let wd=this.options.tagValueProcessor(hd,Cd);wd=this.replaceEntitiesValue(wd),gd+=wd}else gd+=this.buildTextValNode(Cd,hd,"",ed)}this.options.oneListGroup&&(gd=this.buildObjectNode(gd,hd,yd,ed)),dd+=gd}else if(this.options.attributesGroupName&&hd===this.options.attributesGroupName){const md=Object.keys(Ra[hd]),gd=md.length;for(let yd=0;yd"+Ra+hd:this.options.commentPropName!==!1&&ed===this.options.commentPropName&&md.length===0?this.indentate(dd)+``+this.newLine:this.indentate(dd)+"<"+ed+ud+md+this.tagEndChar+Ra+this.indentate(dd)+hd}};Builder.prototype.closeTag=function(Ra){let ed="";return this.options.unpairedTags.indexOf(Ra)!==-1?this.options.suppressUnpairedNode||(ed="/"):this.options.suppressEmptyNode?ed="/":ed=`>`+this.newLine;if(this.options.commentPropName!==!1&&ed===this.options.commentPropName)return this.indentate(dd)+``+this.newLine;if(ed[0]==="?")return this.indentate(dd)+"<"+ed+ud+"?"+this.tagEndChar;{let hd=this.options.tagValueProcessor(ed,Ra);return hd=this.replaceEntitiesValue(hd),hd===""?this.indentate(dd)+"<"+ed+ud+this.closeTag(ed)+this.tagEndChar:this.indentate(dd)+"<"+ed+ud+">"+hd+"0&&this.options.processEntities)for(let ed=0;edcollectBodyString(Ra,ed).then(ud=>{if(ud.length){const dd=new fxp$2.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(vd,Cd)=>Cd.trim()===""&&Cd.includes(` +`)?"":void 0});dd.addEntity("#xD","\r"),dd.addEntity("#10",` +`);let hd;try{hd=dd.parse(ud,!0)}catch(vd){throw vd&&typeof vd=="object"&&Object.defineProperty(vd,"$responseBodyText",{value:ud}),vd}const md="#text",gd=Object.keys(hd)[0],yd=hd[gd];return yd[md]&&(yd[gd]=yd[md],delete yd[md]),getValueFromTextNode(yd)}return{}}),parseXmlErrorBody=async(Ra,ed)=>{const ud=await parseXmlBody(Ra,ed);return ud.Error&&(ud.Error.message=ud.Error.message??ud.Error.Message),ud},loadRestXmlErrorCode=(Ra,ed)=>{var ud;if(((ud=ed==null?void 0:ed.Error)==null?void 0:ud.Code)!==void 0)return ed.Error.Code;if((ed==null?void 0:ed.Code)!==void 0)return ed.Code;if(Ra.statusCode==404)return"NotFound"},CLIENT_SUPPORTED_ALGORITHMS=[ChecksumAlgorithm.CRC32,ChecksumAlgorithm.CRC32C,ChecksumAlgorithm.CRC64NVME,ChecksumAlgorithm.SHA1,ChecksumAlgorithm.SHA256],PRIORITY_ORDER_ALGORITHMS=[ChecksumAlgorithm.SHA256,ChecksumAlgorithm.SHA1,ChecksumAlgorithm.CRC32,ChecksumAlgorithm.CRC32C,ChecksumAlgorithm.CRC64NVME],getChecksumAlgorithmForRequest=(Ra,{requestChecksumRequired:ed,requestAlgorithmMember:ud,requestChecksumCalculation:dd})=>{if(!ud)return dd===RequestChecksumCalculation.WHEN_SUPPORTED||ed?DEFAULT_CHECKSUM_ALGORITHM:void 0;if(!Ra[ud])return;const hd=Ra[ud];if(!CLIENT_SUPPORTED_ALGORITHMS.includes(hd))throw new Error(`The checksum algorithm "${hd}" is not supported by the client. Select one of ${CLIENT_SUPPORTED_ALGORITHMS}.`);return hd},getChecksumLocationName=Ra=>Ra===ChecksumAlgorithm.MD5?"content-md5":`x-amz-checksum-${Ra.toLowerCase()}`,hasHeader=(Ra,ed)=>{const ud=Ra.toLowerCase();for(const dd of Object.keys(ed))if(ud===dd.toLowerCase())return!0;return!1},hasHeaderWithPrefix=(Ra,ed)=>{const ud=Ra.toLowerCase();for(const dd of Object.keys(ed))if(dd.toLowerCase().startsWith(ud))return!0;return!1},isStreaming=Ra=>Ra!==void 0&&typeof Ra!="string"&&!ArrayBuffer.isView(Ra)&&!isArrayBuffer$1(Ra);function __awaiter$8(Ra,ed,ud,dd){function hd(md){return md instanceof ud?md:new ud(function(gd){gd(md)})}return new(ud||(ud=Promise))(function(md,gd){function yd(wd){try{Cd(dd.next(wd))}catch(Nd){gd(Nd)}}function vd(wd){try{Cd(dd.throw(wd))}catch(Nd){gd(Nd)}}function Cd(wd){wd.done?md(wd.value):hd(wd.value).then(yd,vd)}Cd((dd=dd.apply(Ra,ed||[])).next())})}function __generator$8(Ra,ed){var ud={label:0,sent:function(){if(md[0]&1)throw md[1];return md[1]},trys:[],ops:[]},dd,hd,md,gd=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return gd.next=yd(0),gd.throw=yd(1),gd.return=yd(2),typeof Symbol=="function"&&(gd[Symbol.iterator]=function(){return this}),gd;function yd(Cd){return function(wd){return vd([Cd,wd])}}function vd(Cd){if(dd)throw new TypeError("Generator is already executing.");for(;gd&&(gd=0,Cd[0]&&(ud=0)),ud;)try{if(dd=1,hd&&(md=Cd[0]&2?hd.return:Cd[0]?hd.throw||((md=hd.return)&&md.call(hd),0):hd.next)&&!(md=md.call(hd,Cd[1])).done)return md;switch(hd=0,md&&(Cd=[Cd[0]&2,md.value]),Cd[0]){case 0:case 1:md=Cd;break;case 4:return ud.label++,{value:Cd[1],done:!1};case 5:ud.label++,hd=Cd[1],Cd=[0];continue;case 7:Cd=ud.ops.pop(),ud.trys.pop();continue;default:if(md=ud.trys,!(md=md.length>0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]=Ra.length&&(Ra=void 0),{value:Ra&&Ra[dd++],done:!Ra}}};throw new TypeError(ed?"Object is not iterable.":"Symbol.iterator is not defined.")}typeof SuppressedError=="function"&&SuppressedError;const fromUtf8$2=Ra=>new TextEncoder().encode(Ra);var fromUtf8$1=typeof Buffer$4<"u"&&Buffer$4.from?function(Ra){return Buffer$4.from(Ra,"utf8")}:fromUtf8$2;function convertToBuffer$2(Ra){return Ra instanceof Uint8Array?Ra:typeof Ra=="string"?fromUtf8$1(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra)}function isEmptyData$2(Ra){return typeof Ra=="string"?Ra.length===0:Ra.byteLength===0}function numToUint8(Ra){return new Uint8Array([(Ra&4278190080)>>24,(Ra&16711680)>>16,(Ra&65280)>>8,Ra&255])}function uint32ArrayFrom(Ra){if(!Uint32Array.from){for(var ed=new Uint32Array(Ra.length),ud=0;ud>>8^lookupTable$1[(this.checksum^gd)&255]}}catch(yd){ud={error:yd}}finally{try{md&&!md.done&&(dd=hd.return)&&dd.call(hd)}finally{if(ud)throw ud.error}}return this},Ra.prototype.digest=function(){return(this.checksum^4294967295)>>>0},Ra}(),a_lookupTable=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],lookupTable$1=uint32ArrayFrom(a_lookupTable),AwsCrc32=function(){function Ra(){this.crc32=new Crc32}return Ra.prototype.update=function(ed){isEmptyData$2(ed)||this.crc32.update(convertToBuffer$2(ed))},Ra.prototype.digest=function(){return __awaiter$8(this,void 0,void 0,function(){return __generator$8(this,function(ed){return[2,numToUint8(this.crc32.digest())]})})},Ra.prototype.reset=function(){this.crc32=new Crc32},Ra}(),Crc32=function(){function Ra(){this.checksum=4294967295}return Ra.prototype.update=function(ed){var ud,dd;try{for(var hd=__values(ed),md=hd.next();!md.done;md=hd.next()){var gd=md.value;this.checksum=this.checksum>>>8^lookupTable[(this.checksum^gd)&255]}}catch(yd){ud={error:yd}}finally{try{md&&!md.done&&(dd=hd.return)&&dd.call(hd)}finally{if(ud)throw ud.error}}return this},Ra.prototype.digest=function(){return(this.checksum^4294967295)>>>0},Ra}(),a_lookUpTable=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],lookupTable=uint32ArrayFrom(a_lookUpTable);const getCrc32ChecksumAlgorithmFunction=()=>AwsCrc32,selectChecksumAlgorithmFunction=(Ra,ed)=>{switch(Ra){case ChecksumAlgorithm.MD5:return ed.md5;case ChecksumAlgorithm.CRC32:return getCrc32ChecksumAlgorithmFunction();case ChecksumAlgorithm.CRC32C:return AwsCrc32c;case ChecksumAlgorithm.CRC64NVME:throw new Error(`Please check whether you have installed the "@aws-sdk/crc64-nvme-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/crc64-nvme-crt");] or an ESM equivalent such as [import "@aws-sdk/crc64-nvme-crt";]. -For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);case ChecksumAlgorithm.SHA1:return qa.sha1;case ChecksumAlgorithm.SHA256:return qa.sha256;default:throw new Error(`Unsupported checksum algorithm: ${Ra}`)}},stringHasher=(Ra,qa)=>{const rd=new Ra;return rd.update(toUint8Array(qa||"")),rd.digest()},flexibleChecksumsMiddlewareOptions={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},flexibleChecksumsMiddleware=(Ra,qa)=>(rd,sd)=>async pd=>{if(!HttpRequest.isInstance(pd.request)||hasHeaderWithPrefix("x-amz-checksum-",pd.request.headers))return rd(pd);const{request:fd,input:hd}=pd,{body:md,headers:gd}=fd,{base64Encoder:yd,streamHasher:vd}=Ra,{requestChecksumRequired:Nd,requestAlgorithmMember:Md}=qa,Ld=await Ra.requestChecksumCalculation(),Fd=Md==null?void 0:Md.name,Hd=Md==null?void 0:Md.httpHeader;Fd&&!hd[Fd]&&(Ld===RequestChecksumCalculation.WHEN_SUPPORTED||Nd)&&(hd[Fd]=DEFAULT_CHECKSUM_ALGORITHM,Hd&&(gd[Hd]=DEFAULT_CHECKSUM_ALGORITHM));const Vd=getChecksumAlgorithmForRequest(hd,{requestChecksumRequired:Nd,requestAlgorithmMember:Md==null?void 0:Md.name,requestChecksumCalculation:Ld});let Gd=md,Ud=gd;if(Vd){switch(Vd){case ChecksumAlgorithm.CRC32:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case ChecksumAlgorithm.CRC32C:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case ChecksumAlgorithm.CRC64NVME:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case ChecksumAlgorithm.SHA1:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case ChecksumAlgorithm.SHA256:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const Wd=getChecksumLocationName(Vd),Kd=selectChecksumAlgorithmFunction(Vd,Ra);if(isStreaming(md)){const{getAwsChunkedEncodingStream:Xd,bodyLengthChecker:df}=Ra;Gd=Xd(md,{base64Encoder:yd,bodyLengthChecker:df,checksumLocationName:Wd,checksumAlgorithmFn:Kd,streamHasher:vd}),Ud={...gd,"content-encoding":gd["content-encoding"]?`${gd["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":gd["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":Wd},delete Ud["content-length"]}else if(!hasHeader(Wd,gd)){const Xd=await stringHasher(Kd,md);Ud={...gd,[Wd]:yd(Xd)}}}return await rd({...pd,request:{...fd,headers:Ud,body:Gd}})},flexibleChecksumsInputMiddlewareOptions={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},flexibleChecksumsInputMiddleware=(Ra,qa)=>(rd,sd)=>async pd=>{const fd=pd.input,{requestValidationModeMember:hd}=qa,md=await Ra.requestChecksumCalculation(),gd=await Ra.responseChecksumValidation();switch(md){case RequestChecksumCalculation.WHEN_REQUIRED:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case RequestChecksumCalculation.WHEN_SUPPORTED:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(gd){case ResponseChecksumValidation.WHEN_REQUIRED:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case ResponseChecksumValidation.WHEN_SUPPORTED:setFeature$1(sd,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return hd&&!fd[hd]&&gd===ResponseChecksumValidation.WHEN_SUPPORTED&&(fd[hd]="ENABLED"),rd(pd)},getChecksumAlgorithmListForResponse=(Ra=[])=>{const qa=[];for(const rd of PRIORITY_ORDER_ALGORITHMS)!Ra.includes(rd)||!CLIENT_SUPPORTED_ALGORITHMS.includes(rd)||qa.push(rd);return qa},isChecksumWithPartNumber=Ra=>{const qa=Ra.lastIndexOf("-");if(qa!==-1){const rd=Ra.slice(qa+1);if(!rd.startsWith("0")){const sd=parseInt(rd,10);if(!isNaN(sd)&&sd>=1&&sd<=1e4)return!0}}return!1};function createReadStreamOnBuffer(Ra){return new Blob([Ra]).stream()}const getChecksum=async(Ra,{checksumAlgorithmFn:qa,base64Encoder:rd})=>rd(await stringHasher(qa,Ra)),validateChecksumFromResponse=async(Ra,{config:qa,responseAlgorithms:rd,logger:sd})=>{const pd=getChecksumAlgorithmListForResponse(rd),{body:fd,headers:hd}=Ra;for(const md of pd){const gd=getChecksumLocationName(md),yd=hd[gd];if(yd){let vd;try{vd=selectChecksumAlgorithmFunction(md,qa)}catch(Ld){if(md===ChecksumAlgorithm.CRC64NVME){sd==null||sd.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${Ld.message}`);continue}throw Ld}const{base64Encoder:Nd}=qa;if(isStreaming(fd)){Ra.body=createChecksumStream({expectedChecksum:yd,checksumSourceLocation:gd,checksum:new vd,source:fd,base64Encoder:Nd});return}const Md=await getChecksum(fd,{checksumAlgorithmFn:vd,base64Encoder:Nd});if(Md===yd)break;throw new Error(`Checksum mismatch: expected "${Md}" but received "${yd}" in response header "${gd}".`)}}},flexibleChecksumsResponseMiddlewareOptions={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},flexibleChecksumsResponseMiddleware=(Ra,qa)=>(rd,sd)=>async pd=>{if(!HttpRequest.isInstance(pd.request))return rd(pd);const fd=pd.input,hd=await rd(pd),md=hd.response;let gd;const{requestValidationModeMember:yd,responseAlgorithms:vd}=qa;if(yd&&fd[yd]==="ENABLED"){const{clientName:Nd,commandName:Md}=sd;if(Nd==="S3Client"&&Md==="GetObjectCommand"&&getChecksumAlgorithmListForResponse(vd).every(Hd=>{const Vd=getChecksumLocationName(Hd),Gd=md.headers[Vd];return!Gd||isChecksumWithPartNumber(Gd)}))return hd;const Fd=isStreaming(md.body);Fd&&(gd=await Ra.streamCollector(md.body),md.body=createReadStreamOnBuffer(gd)),await validateChecksumFromResponse(hd.response,{config:Ra,responseAlgorithms:vd,logger:sd.logger}),Fd&&gd&&(md.body=createReadStreamOnBuffer(gd))}return hd},getFlexibleChecksumsPlugin=(Ra,qa)=>({applyToStack:rd=>{rd.add(flexibleChecksumsMiddleware(Ra,qa),flexibleChecksumsMiddlewareOptions),rd.addRelativeTo(flexibleChecksumsInputMiddleware(Ra,qa),flexibleChecksumsInputMiddlewareOptions),rd.addRelativeTo(flexibleChecksumsResponseMiddleware(Ra,qa),flexibleChecksumsResponseMiddlewareOptions)}}),resolveFlexibleChecksumsConfig=Ra=>({...Ra,requestChecksumCalculation:normalizeProvider$1(Ra.requestChecksumCalculation??DEFAULT_REQUEST_CHECKSUM_CALCULATION),responseChecksumValidation:normalizeProvider$1(Ra.responseChecksumValidation??DEFAULT_RESPONSE_CHECKSUM_VALIDATION)});function resolveHostHeaderConfig(Ra){return Ra}const hostHeaderMiddleware=Ra=>qa=>async rd=>{if(!HttpRequest.isInstance(rd.request))return qa(rd);const{request:sd}=rd,{handlerProtocol:pd=""}=Ra.requestHandler.metadata||{};if(pd.indexOf("h2")>=0&&!sd.headers[":authority"])delete sd.headers.host,sd.headers[":authority"]=sd.hostname+(sd.port?":"+sd.port:"");else if(!sd.headers.host){let fd=sd.hostname;sd.port!=null&&(fd+=`:${sd.port}`),sd.headers.host=fd}return qa(rd)},hostHeaderMiddlewareOptions={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=Ra=>({applyToStack:qa=>{qa.add(hostHeaderMiddleware(Ra),hostHeaderMiddlewareOptions)}}),loggerMiddleware=()=>(Ra,qa)=>async rd=>{var sd,pd;try{const fd=await Ra(rd),{clientName:hd,commandName:md,logger:gd,dynamoDbDocumentClientOptions:yd={}}=qa,{overrideInputFilterSensitiveLog:vd,overrideOutputFilterSensitiveLog:Nd}=yd,Md=vd??qa.inputFilterSensitiveLog,Ld=Nd??qa.outputFilterSensitiveLog,{$metadata:Fd,...Hd}=fd.output;return(sd=gd==null?void 0:gd.info)==null||sd.call(gd,{clientName:hd,commandName:md,input:Md(rd.input),output:Ld(Hd),metadata:Fd}),fd}catch(fd){const{clientName:hd,commandName:md,logger:gd,dynamoDbDocumentClientOptions:yd={}}=qa,{overrideInputFilterSensitiveLog:vd}=yd,Nd=vd??qa.inputFilterSensitiveLog;throw(pd=gd==null?void 0:gd.error)==null||pd.call(gd,{clientName:hd,commandName:md,input:Nd(rd.input),error:fd,metadata:fd.$metadata}),fd}},loggerMiddlewareOptions={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=Ra=>({applyToStack:qa=>{qa.add(loggerMiddleware(),loggerMiddlewareOptions)}});var define_process_env_default={};const TRACE_ID_HEADER_NAME="X-Amzn-Trace-Id",ENV_LAMBDA_FUNCTION_NAME="AWS_LAMBDA_FUNCTION_NAME",ENV_TRACE_ID="_X_AMZN_TRACE_ID",recursionDetectionMiddleware=Ra=>qa=>async rd=>{const{request:sd}=rd;if(!HttpRequest.isInstance(sd)||Ra.runtime!=="node"||sd.headers.hasOwnProperty(TRACE_ID_HEADER_NAME))return qa(rd);const pd=define_process_env_default[ENV_LAMBDA_FUNCTION_NAME],fd=define_process_env_default[ENV_TRACE_ID],hd=md=>typeof md=="string"&&md.length>0;return hd(pd)&&hd(fd)&&(sd.headers[TRACE_ID_HEADER_NAME]=fd),qa({...rd,request:sd})},addRecursionDetectionMiddlewareOptions={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},getRecursionDetectionPlugin=Ra=>({applyToStack:qa=>{qa.add(recursionDetectionMiddleware(Ra),addRecursionDetectionMiddlewareOptions)}}),CONTENT_LENGTH_HEADER$1="content-length";function checkContentLengthHeader(){return(Ra,qa)=>async rd=>{var pd;const{request:sd}=rd;if(HttpRequest.isInstance(sd)&&!(CONTENT_LENGTH_HEADER$1 in sd.headers)){const fd="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof((pd=qa==null?void 0:qa.logger)==null?void 0:pd.warn)=="function"&&!(qa.logger instanceof NoOpLogger)?qa.logger.warn(fd):console.warn(fd)}return Ra({...rd})}}const checkContentLengthHeaderMiddlewareOptions={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},getCheckContentLengthHeaderPlugin=Ra=>({applyToStack:qa=>{qa.add(checkContentLengthHeader(),checkContentLengthHeaderMiddlewareOptions)}}),regionRedirectEndpointMiddleware=Ra=>(qa,rd)=>async sd=>{const pd=await Ra.region(),fd=Ra.region;let hd=()=>{};rd.__s3RegionRedirect&&(Object.defineProperty(Ra,"region",{writable:!1,value:async()=>rd.__s3RegionRedirect}),hd=()=>Object.defineProperty(Ra,"region",{writable:!0,value:fd}));try{const md=await qa(sd);if(rd.__s3RegionRedirect){hd();const gd=await Ra.region();if(pd!==gd)throw new Error("Region was not restored following S3 region redirect.")}return md}catch(md){throw hd(),md}},regionRedirectEndpointMiddlewareOptions={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function regionRedirectMiddleware(Ra){return(qa,rd)=>async sd=>{var pd,fd,hd;try{return await qa(sd)}catch(md){if(Ra.followRegionRedirects&&(((pd=md==null?void 0:md.$metadata)==null?void 0:pd.httpStatusCode)===301||((fd=md==null?void 0:md.$metadata)==null?void 0:fd.httpStatusCode)===400&&(md==null?void 0:md.name)==="IllegalLocationConstraintException")){try{const gd=md.$response.headers["x-amz-bucket-region"];(hd=rd.logger)==null||hd.debug(`Redirecting from ${await Ra.region()} to ${gd}`),rd.__s3RegionRedirect=gd}catch(gd){throw new Error("Region redirect failed: "+gd)}return qa(sd)}throw md}}}const regionRedirectMiddlewareOptions={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},getRegionRedirectMiddlewarePlugin=Ra=>({applyToStack:qa=>{qa.add(regionRedirectMiddleware(Ra),regionRedirectMiddlewareOptions),qa.addRelativeTo(regionRedirectEndpointMiddleware(Ra),regionRedirectEndpointMiddlewareOptions)}}),a1=class a1{constructor(qa={}){Ng(this,"data");Ng(this,"lastPurgeTime",Date.now());this.data=qa}get(qa){const rd=this.data[qa];if(rd)return rd}set(qa,rd){return this.data[qa]=rd,rd}delete(qa){delete this.data[qa]}async purgeExpired(){const qa=Date.now();if(!(this.lastPurgeTime+a1.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>qa))for(const rd in this.data){const sd=this.data[rd];if(!sd.isRefreshing){const pd=await sd.identity;pd.expiration&&pd.expiration.getTime(){var yd,vd;return(((yd=hd.expiration)==null?void 0:yd.getTime())??0){pd.set(sd,new S3ExpressIdentityCacheEntry(Promise.resolve(Nd)))})),hd)}):pd.set(sd,new S3ExpressIdentityCacheEntry(this.getIdentity(sd))).identity}async getIdentity(qa){var pd,fd;await this.cache.purgeExpired().catch(hd=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: -`+hd)});const rd=await this.createSessionFn(qa);if(!((pd=rd.Credentials)!=null&&pd.AccessKeyId)||!((fd=rd.Credentials)!=null&&fd.SecretAccessKey))throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:rd.Credentials.AccessKeyId,secretAccessKey:rd.Credentials.SecretAccessKey,sessionToken:rd.Credentials.SessionToken,expiration:rd.Credentials.Expiration?new Date(rd.Credentials.Expiration):void 0}}};Ng(s1,"REFRESH_WINDOW_MS",6e4);let S3ExpressIdentityProviderImpl=s1;var SelectorType;(function(Ra){Ra.ENV="env",Ra.CONFIG="shared config entry"})(SelectorType||(SelectorType={}));const S3_EXPRESS_BUCKET_TYPE="Directory",S3_EXPRESS_BACKEND="S3Express",S3_EXPRESS_AUTH_SCHEME="sigv4-s3express",SESSION_TOKEN_QUERY_PARAM="X-Amz-S3session-Token",SESSION_TOKEN_HEADER=SESSION_TOKEN_QUERY_PARAM.toLowerCase();class SignatureV4S3Express extends SignatureV4{async signWithCredentials(qa,rd,sd){const pd=getCredentialsWithoutSessionToken(rd);qa.headers[SESSION_TOKEN_HEADER]=rd.sessionToken;const fd=this;return setSingleOverride(fd,pd),fd.signRequest(qa,sd??{})}async presignWithCredentials(qa,rd,sd){const pd=getCredentialsWithoutSessionToken(rd);return delete qa.headers[SESSION_TOKEN_HEADER],qa.headers[SESSION_TOKEN_QUERY_PARAM]=rd.sessionToken,qa.query=qa.query??{},qa.query[SESSION_TOKEN_QUERY_PARAM]=rd.sessionToken,setSingleOverride(this,pd),this.presign(qa,sd)}}function getCredentialsWithoutSessionToken(Ra){return{accessKeyId:Ra.accessKeyId,secretAccessKey:Ra.secretAccessKey,expiration:Ra.expiration}}function setSingleOverride(Ra,qa){const rd=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),sd=Ra.credentialProvider,pd=()=>(clearTimeout(rd),Ra.credentialProvider=sd,Promise.resolve(qa));Ra.credentialProvider=pd}const s3ExpressMiddleware=Ra=>(qa,rd)=>async sd=>{var pd,fd,hd,md,gd;if(rd.endpointV2){const yd=rd.endpointV2,vd=((hd=(fd=(pd=yd.properties)==null?void 0:pd.authSchemes)==null?void 0:fd[0])==null?void 0:hd.name)===S3_EXPRESS_AUTH_SCHEME;if((((md=yd.properties)==null?void 0:md.backend)===S3_EXPRESS_BACKEND||((gd=yd.properties)==null?void 0:gd.bucketType)===S3_EXPRESS_BUCKET_TYPE)&&(setFeature$1(rd,"S3_EXPRESS_BUCKET","J"),rd.isS3ExpressBucket=!0),vd){const Md=sd.input.Bucket;if(Md){const Ld=await Ra.s3ExpressIdentityProvider.getS3ExpressIdentity(await Ra.credentials(),{Bucket:Md});rd.s3ExpressIdentity=Ld,HttpRequest.isInstance(sd.request)&&Ld.sessionToken&&(sd.request.headers[SESSION_TOKEN_HEADER]=Ld.sessionToken)}}}return qa(sd)},s3ExpressMiddlewareOptions={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},getS3ExpressPlugin=Ra=>({applyToStack:qa=>{qa.add(s3ExpressMiddleware(Ra),s3ExpressMiddlewareOptions)}}),signS3Express=async(Ra,qa,rd,sd)=>{const pd=await sd.signWithCredentials(rd,Ra,{});if(pd.headers["X-Amz-Security-Token"]||pd.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return pd},defaultErrorHandler=Ra=>qa=>{throw qa},defaultSuccessHandler=(Ra,qa)=>{},s3ExpressHttpSigningMiddleware=Ra=>(qa,rd)=>async sd=>{if(!HttpRequest.isInstance(sd.request))return qa(sd);const fd=getSmithyContext(rd).selectedHttpAuthScheme;if(!fd)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:hd={}},identity:md,signer:gd}=fd;let yd;rd.s3ExpressIdentity?yd=await signS3Express(rd.s3ExpressIdentity,hd,sd.request,await Ra.signer()):yd=await gd.sign(sd.request,md,hd);const vd=await qa({...sd,request:yd}).catch((gd.errorHandler||defaultErrorHandler)(hd));return(gd.successHandler||defaultSuccessHandler)(vd.response,hd),vd},getS3ExpressHttpSigningPlugin=Ra=>({applyToStack:qa=>{qa.addRelativeTo(s3ExpressHttpSigningMiddleware(Ra),httpSigningMiddlewareOptions)}}),resolveS3Config=(Ra,{session:qa})=>{const[rd,sd]=qa;return{...Ra,forcePathStyle:Ra.forcePathStyle??!1,useAccelerateEndpoint:Ra.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:Ra.disableMultiregionAccessPoints??!1,followRegionRedirects:Ra.followRegionRedirects??!1,s3ExpressIdentityProvider:Ra.s3ExpressIdentityProvider??new S3ExpressIdentityProviderImpl(async pd=>rd().send(new sd({Bucket:pd,SessionMode:"ReadWrite"}))),bucketEndpoint:Ra.bucketEndpoint??!1}},THROW_IF_EMPTY_BODY={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},MAX_BYTES_TO_INSPECT=3e3,throw200ExceptionsMiddleware=Ra=>(qa,rd)=>async sd=>{const pd=await qa(sd),{response:fd}=pd;if(!HttpResponse.isInstance(fd))return pd;const{statusCode:hd,body:md}=fd;if(hd<200||hd>=300||!(typeof(md==null?void 0:md.stream)=="function"||typeof(md==null?void 0:md.pipe)=="function"||typeof(md==null?void 0:md.tee)=="function"))return pd;let yd=md,vd=md;md&&typeof md=="object"&&!(md instanceof Uint8Array)&&([yd,vd]=await splitStream(md)),fd.body=vd;const Nd=await collectBody(yd,{streamCollector:async Ld=>headStream(Ld,MAX_BYTES_TO_INSPECT)});typeof(yd==null?void 0:yd.destroy)=="function"&&yd.destroy();const Md=Ra.utf8Encoder(Nd.subarray(Nd.length-16));if(Nd.length===0&&THROW_IF_EMPTY_BODY[rd.commandName]){const Ld=new Error("S3 aborted request");throw Ld.name="InternalError",Ld}return Md&&Md.endsWith("")&&(fd.statusCode=400),pd},collectBody=(Ra=new Uint8Array,qa)=>Ra instanceof Uint8Array?Promise.resolve(Ra):qa.streamCollector(Ra)||Promise.resolve(new Uint8Array),throw200ExceptionsMiddlewareOptions={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},getThrow200ExceptionsPlugin=Ra=>({applyToStack:qa=>{qa.addRelativeTo(throw200ExceptionsMiddleware(Ra),throw200ExceptionsMiddlewareOptions)}}),validate=Ra=>typeof Ra=="string"&&Ra.indexOf("arn:")===0&&Ra.split(":").length>=6;function bucketEndpointMiddleware(Ra){return(qa,rd)=>async sd=>{var pd,fd,hd,md;if(Ra.bucketEndpoint){const gd=rd.endpointV2;if(gd){const yd=sd.input.Bucket;if(typeof yd=="string")try{const vd=new URL(yd);rd.endpointV2={...gd,url:vd}}catch(vd){const Nd=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${yd} could not be parsed as URL.`;throw((fd=(pd=rd.logger)==null?void 0:pd.constructor)==null?void 0:fd.name)==="NoOpLogger"?console.warn(Nd):(md=(hd=rd.logger)==null?void 0:hd.warn)==null||md.call(hd,Nd),vd}}}return qa(sd)}}const bucketEndpointMiddlewareOptions={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function validateBucketNameMiddleware({bucketEndpoint:Ra}){return qa=>async rd=>{const{input:{Bucket:sd}}=rd;if(!Ra&&typeof sd=="string"&&!validate(sd)&&sd.indexOf("/")>=0){const pd=new Error(`Bucket name shouldn't contain '/', received '${sd}'`);throw pd.name="InvalidBucketName",pd}return qa({...rd})}}const validateBucketNameMiddlewareOptions={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},getValidateBucketNamePlugin=Ra=>({applyToStack:qa=>{qa.add(validateBucketNameMiddleware(Ra),validateBucketNameMiddlewareOptions),qa.addRelativeTo(bucketEndpointMiddleware(Ra),bucketEndpointMiddlewareOptions)}}),DEFAULT_UA_APP_ID=void 0;function isValidUserAgentAppId(Ra){return Ra===void 0?!0:typeof Ra=="string"&&Ra.length<=50}function resolveUserAgentConfig(Ra){const qa=normalizeProvider(Ra.userAgentAppId??DEFAULT_UA_APP_ID);return{...Ra,customUserAgent:typeof Ra.customUserAgent=="string"?[[Ra.customUserAgent]]:Ra.customUserAgent,userAgentAppId:async()=>{var sd,pd;const rd=await qa();if(!isValidUserAgentAppId(rd)){const fd=((pd=(sd=Ra.logger)==null?void 0:sd.constructor)==null?void 0:pd.name)==="NoOpLogger"||!Ra.logger?console:Ra.logger;typeof rd!="string"?fd==null||fd.warn("userAgentAppId must be a string or undefined."):rd.length>50&&(fd==null||fd.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return rd}}}class EndpointCache{constructor({size:qa,params:rd}){this.data=new Map,this.parameters=[],this.capacity=qa??50,rd&&(this.parameters=rd)}get(qa,rd){const sd=this.hash(qa);if(sd===!1)return rd();if(!this.data.has(sd)){if(this.data.size>this.capacity+10){const pd=this.data.keys();let fd=0;for(;;){const{value:hd,done:md}=pd.next();if(this.data.delete(hd),md||++fd>10)break}}this.data.set(sd,rd())}return this.data.get(sd)}size(){return this.data.size}hash(qa){let rd="";const{parameters:sd}=this;if(sd.length===0)return!1;for(const pd of sd){const fd=String(qa[pd]??"");if(fd.includes("|;"))return!1;rd+=fd+"|;"}return rd}}const IP_V4_REGEX=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),isIpAddress=Ra=>IP_V4_REGEX.test(Ra)||Ra.startsWith("[")&&Ra.endsWith("]"),VALID_HOST_LABEL_REGEX=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),isValidHostLabel=(Ra,qa=!1)=>{if(!qa)return VALID_HOST_LABEL_REGEX.test(Ra);const rd=Ra.split(".");for(const sd of rd)if(!isValidHostLabel(sd))return!1;return!0},customEndpointFunctions={},debugId="endpoints";function toDebugString(Ra){return typeof Ra!="object"||Ra==null?Ra:"ref"in Ra?`$${toDebugString(Ra.ref)}`:"fn"in Ra?`${Ra.fn}(${(Ra.argv||[]).map(toDebugString).join(", ")})`:JSON.stringify(Ra,null,2)}class EndpointError extends Error{constructor(qa){super(qa),this.name="EndpointError"}}const booleanEquals=(Ra,qa)=>Ra===qa,getAttrPathList=Ra=>{const qa=Ra.split("."),rd=[];for(const sd of qa){const pd=sd.indexOf("[");if(pd!==-1){if(sd.indexOf("]")!==sd.length-1)throw new EndpointError(`Path: '${Ra}' does not end with ']'`);const fd=sd.slice(pd+1,-1);if(Number.isNaN(parseInt(fd)))throw new EndpointError(`Invalid array index: '${fd}' in path: '${Ra}'`);pd!==0&&rd.push(sd.slice(0,pd)),rd.push(fd)}else rd.push(sd)}return rd},getAttr=(Ra,qa)=>getAttrPathList(qa).reduce((rd,sd)=>{if(typeof rd!="object")throw new EndpointError(`Index '${sd}' in '${qa}' not found in '${JSON.stringify(Ra)}'`);return Array.isArray(rd)?rd[parseInt(sd)]:rd[sd]},Ra),isSet=Ra=>Ra!=null,not=Ra=>!Ra,DEFAULT_PORTS={[EndpointURLScheme.HTTP]:80,[EndpointURLScheme.HTTPS]:443},parseURL=Ra=>{const qa=(()=>{try{if(Ra instanceof URL)return Ra;if(typeof Ra=="object"&&"hostname"in Ra){const{hostname:Md,port:Ld,protocol:Fd="",path:Hd="",query:Vd={}}=Ra,Gd=new URL(`${Fd}//${Md}${Ld?`:${Ld}`:""}${Hd}`);return Gd.search=Object.entries(Vd).map(([Ud,qd])=>`${Ud}=${qd}`).join("&"),Gd}return new URL(Ra)}catch{return null}})();if(!qa)return console.error(`Unable to parse ${JSON.stringify(Ra)} as a whatwg URL.`),null;const rd=qa.href,{host:sd,hostname:pd,pathname:fd,protocol:hd,search:md}=qa;if(md)return null;const gd=hd.slice(0,-1);if(!Object.values(EndpointURLScheme).includes(gd))return null;const yd=isIpAddress(pd),vd=rd.includes(`${sd}:${DEFAULT_PORTS[gd]}`)||typeof Ra=="string"&&Ra.includes(`${sd}:${DEFAULT_PORTS[gd]}`),Nd=`${sd}${vd?`:${DEFAULT_PORTS[gd]}`:""}`;return{scheme:gd,authority:Nd,path:fd,normalizedPath:fd.endsWith("/")?fd:`${fd}/`,isIp:yd}},stringEquals=(Ra,qa)=>Ra===qa,substring=(Ra,qa,rd,sd)=>qa>=rd||Ra.lengthencodeURIComponent(Ra).replace(/[!*'()]/g,qa=>`%${qa.charCodeAt(0).toString(16).toUpperCase()}`),endpointFunctions={booleanEquals,getAttr,isSet,isValidHostLabel,not,parseURL,stringEquals,substring,uriEncode},evaluateTemplate=(Ra,qa)=>{const rd=[],sd={...qa.endpointParams,...qa.referenceRecord};let pd=0;for(;pd({...qa.endpointParams,...qa.referenceRecord})[Ra],evaluateExpression=(Ra,qa,rd)=>{if(typeof Ra=="string")return evaluateTemplate(Ra,rd);if(Ra.fn)return callFunction(Ra,rd);if(Ra.ref)return getReferenceValue(Ra,rd);throw new EndpointError(`'${qa}': ${String(Ra)} is not a string, function or reference.`)},callFunction=({fn:Ra,argv:qa},rd)=>{const sd=qa.map(fd=>["boolean","number"].includes(typeof fd)?fd:evaluateExpression(fd,"arg",rd)),pd=Ra.split(".");return pd[0]in customEndpointFunctions&&pd[1]!=null?customEndpointFunctions[pd[0]][pd[1]](...sd):endpointFunctions[Ra](...sd)},evaluateCondition=({assign:Ra,...qa},rd)=>{var pd,fd;if(Ra&&Ra in rd.referenceRecord)throw new EndpointError(`'${Ra}' is already defined in Reference Record.`);const sd=callFunction(qa,rd);return(fd=(pd=rd.logger)==null?void 0:pd.debug)==null||fd.call(pd,`${debugId} evaluateCondition: ${toDebugString(qa)} = ${toDebugString(sd)}`),{result:sd===""?!0:!!sd,...Ra!=null&&{toAssign:{name:Ra,value:sd}}}},evaluateConditions=(Ra=[],qa)=>{var sd,pd;const rd={};for(const fd of Ra){const{result:hd,toAssign:md}=evaluateCondition(fd,{...qa,referenceRecord:{...qa.referenceRecord,...rd}});if(!hd)return{result:hd};md&&(rd[md.name]=md.value,(pd=(sd=qa.logger)==null?void 0:sd.debug)==null||pd.call(sd,`${debugId} assign: ${md.name} := ${toDebugString(md.value)}`))}return{result:!0,referenceRecord:rd}},getEndpointHeaders=(Ra,qa)=>Object.entries(Ra).reduce((rd,[sd,pd])=>({...rd,[sd]:pd.map(fd=>{const hd=evaluateExpression(fd,"Header value entry",qa);if(typeof hd!="string")throw new EndpointError(`Header '${sd}' value '${hd}' is not a string`);return hd})}),{}),getEndpointProperty=(Ra,qa)=>{if(Array.isArray(Ra))return Ra.map(rd=>getEndpointProperty(rd,qa));switch(typeof Ra){case"string":return evaluateTemplate(Ra,qa);case"object":if(Ra===null)throw new EndpointError(`Unexpected endpoint property: ${Ra}`);return getEndpointProperties(Ra,qa);case"boolean":return Ra;default:throw new EndpointError(`Unexpected endpoint property type: ${typeof Ra}`)}},getEndpointProperties=(Ra,qa)=>Object.entries(Ra).reduce((rd,[sd,pd])=>({...rd,[sd]:getEndpointProperty(pd,qa)}),{}),getEndpointUrl=(Ra,qa)=>{const rd=evaluateExpression(Ra,"Endpoint URL",qa);if(typeof rd=="string")try{return new URL(rd)}catch(sd){throw console.error(`Failed to construct URL with ${rd}`,sd),sd}throw new EndpointError(`Endpoint URL must be a string, got ${typeof rd}`)},evaluateEndpointRule=(Ra,qa)=>{var vd,Nd;const{conditions:rd,endpoint:sd}=Ra,{result:pd,referenceRecord:fd}=evaluateConditions(rd,qa);if(!pd)return;const hd={...qa,referenceRecord:{...qa.referenceRecord,...fd}},{url:md,properties:gd,headers:yd}=sd;return(Nd=(vd=qa.logger)==null?void 0:vd.debug)==null||Nd.call(vd,`${debugId} Resolving endpoint from template: ${toDebugString(sd)}`),{...yd!=null&&{headers:getEndpointHeaders(yd,hd)},...gd!=null&&{properties:getEndpointProperties(gd,hd)},url:getEndpointUrl(md,hd)}},evaluateErrorRule=(Ra,qa)=>{const{conditions:rd,error:sd}=Ra,{result:pd,referenceRecord:fd}=evaluateConditions(rd,qa);if(pd)throw new EndpointError(evaluateExpression(sd,"Error",{...qa,referenceRecord:{...qa.referenceRecord,...fd}}))},evaluateTreeRule=(Ra,qa)=>{const{conditions:rd,rules:sd}=Ra,{result:pd,referenceRecord:fd}=evaluateConditions(rd,qa);if(pd)return evaluateRules(sd,{...qa,referenceRecord:{...qa.referenceRecord,...fd}})},evaluateRules=(Ra,qa)=>{for(const rd of Ra)if(rd.type==="endpoint"){const sd=evaluateEndpointRule(rd,qa);if(sd)return sd}else if(rd.type==="error")evaluateErrorRule(rd,qa);else if(rd.type==="tree"){const sd=evaluateTreeRule(rd,qa);if(sd)return sd}else throw new EndpointError(`Unknown endpoint rule: ${rd}`);throw new EndpointError("Rules evaluation failed")},resolveEndpoint=(Ra,qa)=>{var yd,vd,Nd,Md;const{endpointParams:rd,logger:sd}=qa,{parameters:pd,rules:fd}=Ra;(vd=(yd=qa.logger)==null?void 0:yd.debug)==null||vd.call(yd,`${debugId} Initial EndpointParams: ${toDebugString(rd)}`);const hd=Object.entries(pd).filter(([,Ld])=>Ld.default!=null).map(([Ld,Fd])=>[Ld,Fd.default]);if(hd.length>0)for(const[Ld,Fd]of hd)rd[Ld]=rd[Ld]??Fd;const md=Object.entries(pd).filter(([,Ld])=>Ld.required).map(([Ld])=>Ld);for(const Ld of md)if(rd[Ld]==null)throw new EndpointError(`Missing required parameter: '${Ld}'`);const gd=evaluateRules(fd,{endpointParams:rd,logger:sd,referenceRecord:{}});return(Md=(Nd=qa.logger)==null?void 0:Nd.debug)==null||Md.call(Nd,`${debugId} Resolved endpoint: ${toDebugString(gd)}`),gd},isVirtualHostableS3Bucket=(Ra,qa=!1)=>{if(qa){for(const rd of Ra.split("."))if(!isVirtualHostableS3Bucket(rd))return!1;return!0}return!(!isValidHostLabel(Ra)||Ra.length<3||Ra.length>63||Ra!==Ra.toLowerCase()||isIpAddress(Ra))},ARN_DELIMITER=":",RESOURCE_DELIMITER="/",parseArn=Ra=>{const qa=Ra.split(ARN_DELIMITER);if(qa.length<6)return null;const[rd,sd,pd,fd,hd,...md]=qa;if(rd!=="arn"||sd===""||pd===""||md.join(ARN_DELIMITER)==="")return null;const gd=md.map(yd=>yd.split(RESOURCE_DELIMITER)).flat();return{partition:sd,service:pd,region:fd,accountId:hd,resourceId:gd}},partitions=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version$1="1.1",partitionsInfo={partitions,version:version$1};let selectedPartitionsInfo=partitionsInfo;const partition=Ra=>{const{partitions:qa}=selectedPartitionsInfo;for(const sd of qa){const{regions:pd,outputs:fd}=sd;for(const[hd,md]of Object.entries(pd))if(hd===Ra)return{...fd,...md}}for(const sd of qa){const{regionRegex:pd,outputs:fd}=sd;if(new RegExp(pd).test(Ra))return{...fd}}const rd=qa.find(sd=>sd.id==="aws");if(!rd)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...rd.outputs}},awsEndpointFunctions={isVirtualHostableS3Bucket,parseArn,partition};customEndpointFunctions.aws=awsEndpointFunctions;const ACCOUNT_ID_ENDPOINT_REGEX=/\d{12}\.ddb/;async function checkFeatures(Ra,qa,rd){var fd,hd,md,gd,yd,vd,Nd;const sd=rd.request;if(((fd=sd==null?void 0:sd.headers)==null?void 0:fd["smithy-protocol"])==="rpc-v2-cbor"&&setFeature$1(Ra,"PROTOCOL_RPC_V2_CBOR","M"),typeof qa.retryStrategy=="function"){const Md=await qa.retryStrategy();typeof Md.acquireInitialRetryToken=="function"?(md=(hd=Md.constructor)==null?void 0:hd.name)!=null&&md.includes("Adaptive")?setFeature$1(Ra,"RETRY_MODE_ADAPTIVE","F"):setFeature$1(Ra,"RETRY_MODE_STANDARD","E"):setFeature$1(Ra,"RETRY_MODE_LEGACY","D")}if(typeof qa.accountIdEndpointMode=="function"){const Md=Ra.endpointV2;switch(String((gd=Md==null?void 0:Md.url)==null?void 0:gd.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)&&setFeature$1(Ra,"ACCOUNT_ID_ENDPOINT","O"),await((yd=qa.accountIdEndpointMode)==null?void 0:yd.call(qa))){case"disabled":setFeature$1(Ra,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":setFeature$1(Ra,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":setFeature$1(Ra,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const pd=(Nd=(vd=Ra.__smithy_context)==null?void 0:vd.selectedHttpAuthScheme)==null?void 0:Nd.identity;if(pd!=null&&pd.$source){const Md=pd;Md.accountId&&setFeature$1(Ra,"RESOLVED_ACCOUNT_ID","T");for(const[Ld,Fd]of Object.entries(Md.$source??{}))setFeature$1(Ra,Ld,Fd)}}const USER_AGENT="user-agent",X_AMZ_USER_AGENT="x-amz-user-agent",SPACE=" ",UA_NAME_SEPARATOR="/",UA_NAME_ESCAPE_REGEX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,UA_VALUE_ESCAPE_REGEX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,UA_ESCAPE_CHAR="-",BYTE_LIMIT=1024;function encodeFeatures(Ra){let qa="";for(const rd in Ra){const sd=Ra[rd];if(qa.length+sd.length+1<=BYTE_LIMIT){qa.length?qa+=","+sd:qa+=sd;continue}break}return qa}const userAgentMiddleware=Ra=>(qa,rd)=>async sd=>{var Ld,Fd,Hd,Vd;const{request:pd}=sd;if(!HttpRequest.isInstance(pd))return qa(sd);const{headers:fd}=pd,hd=((Ld=rd==null?void 0:rd.userAgent)==null?void 0:Ld.map(escapeUserAgent))||[],md=(await Ra.defaultUserAgentProvider()).map(escapeUserAgent);await checkFeatures(rd,Ra,sd);const gd=rd;md.push(`m/${encodeFeatures(Object.assign({},(Fd=rd.__smithy_context)==null?void 0:Fd.features,(Hd=gd.__aws_sdk_context)==null?void 0:Hd.features))}`);const yd=((Vd=Ra==null?void 0:Ra.customUserAgent)==null?void 0:Vd.map(escapeUserAgent))||[],vd=await Ra.userAgentAppId();vd&&md.push(escapeUserAgent([`app/${vd}`]));const Nd=[].concat([...md,...hd,...yd]).join(SPACE),Md=[...md.filter(Gd=>Gd.startsWith("aws-sdk-")),...yd].join(SPACE);return Ra.runtime!=="browser"?(Md&&(fd[X_AMZ_USER_AGENT]=fd[X_AMZ_USER_AGENT]?`${fd[USER_AGENT]} ${Md}`:Md),fd[USER_AGENT]=Nd):fd[X_AMZ_USER_AGENT]=Nd,qa({...sd,request:pd})},escapeUserAgent=Ra=>{var hd;const qa=Ra[0].split(UA_NAME_SEPARATOR).map(md=>md.replace(UA_NAME_ESCAPE_REGEX,UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR),rd=(hd=Ra[1])==null?void 0:hd.replace(UA_VALUE_ESCAPE_REGEX,UA_ESCAPE_CHAR),sd=qa.indexOf(UA_NAME_SEPARATOR),pd=qa.substring(0,sd);let fd=qa.substring(sd+1);return pd==="api"&&(fd=fd.toLowerCase()),[pd,fd,rd].filter(md=>md&&md.length>0).reduce((md,gd,yd)=>{switch(yd){case 0:return gd;case 1:return`${md}/${gd}`;default:return`${md}#${gd}`}},"")},getUserAgentMiddlewareOptions={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=Ra=>({applyToStack:qa=>{qa.add(userAgentMiddleware(Ra),getUserAgentMiddlewareOptions)}}),DEFAULT_USE_DUALSTACK_ENDPOINT=!1,DEFAULT_USE_FIPS_ENDPOINT=!1,isFipsRegion=Ra=>typeof Ra=="string"&&(Ra.startsWith("fips-")||Ra.endsWith("-fips")),getRealRegion=Ra=>isFipsRegion(Ra)?["fips-aws-global","aws-fips"].includes(Ra)?"us-east-1":Ra.replace(/fips-(dkr-|prod-)?|-fips/,""):Ra,resolveRegionConfig=Ra=>{const{region:qa,useFipsEndpoint:rd}=Ra;if(!qa)throw new Error("Region is missing");return{...Ra,region:async()=>{if(typeof qa=="string")return getRealRegion(qa);const sd=await qa();return getRealRegion(sd)},useFipsEndpoint:async()=>{const sd=typeof qa=="string"?qa:await qa();return isFipsRegion(sd)?!0:typeof rd!="function"?Promise.resolve(!!rd):rd()}}},resolveEventStreamSerdeConfig=Ra=>({...Ra,eventStreamMarshaller:Ra.eventStreamSerdeProvider(Ra)}),CONTENT_LENGTH_HEADER="content-length";function contentLengthMiddleware(Ra){return qa=>async rd=>{const sd=rd.request;if(HttpRequest.isInstance(sd)){const{body:pd,headers:fd}=sd;if(pd&&Object.keys(fd).map(hd=>hd.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER)===-1)try{const hd=Ra(pd);sd.headers={...sd.headers,[CONTENT_LENGTH_HEADER]:String(hd)}}catch{}}return qa({...rd,request:sd})}}const contentLengthMiddlewareOptions={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},getContentLengthPlugin=Ra=>({applyToStack:qa=>{qa.add(contentLengthMiddleware(Ra.bodyLengthChecker),contentLengthMiddlewareOptions)}}),resolveParamsForS3=async Ra=>{const qa=(Ra==null?void 0:Ra.Bucket)||"";if(typeof Ra.Bucket=="string"&&(Ra.Bucket=qa.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),isArnBucketName(qa)){if(Ra.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!isDnsCompatibleBucketName(qa)||qa.indexOf(".")!==-1&&!String(Ra.Endpoint).startsWith("http:")||qa.toLowerCase()!==qa||qa.length<3)&&(Ra.ForcePathStyle=!0);return Ra.DisableMultiRegionAccessPoints&&(Ra.disableMultiRegionAccessPoints=!0,Ra.DisableMRAP=!0),Ra},DOMAIN_PATTERN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,IP_ADDRESS_PATTERN=/(\d+\.){3}\d+/,DOTS_PATTERN=/\.\./,isDnsCompatibleBucketName=Ra=>DOMAIN_PATTERN.test(Ra)&&!IP_ADDRESS_PATTERN.test(Ra)&&!DOTS_PATTERN.test(Ra),isArnBucketName=Ra=>{const[qa,rd,sd,,,pd]=Ra.split(":"),fd=qa==="arn"&&Ra.split(":").length>=6,hd=!!(fd&&rd&&sd&&pd);if(fd&&!hd)throw new Error(`Invalid ARN: ${Ra} was an invalid ARN.`);return hd},createConfigValueProvider=(Ra,qa,rd)=>{const sd=async()=>{const pd=rd[Ra]??rd[qa];return typeof pd=="function"?pd():pd};return Ra==="credentialScope"||qa==="CredentialScope"?async()=>{const pd=typeof rd.credentials=="function"?await rd.credentials():rd.credentials;return(pd==null?void 0:pd.credentialScope)??(pd==null?void 0:pd.CredentialScope)}:Ra==="accountId"||qa==="AccountId"?async()=>{const pd=typeof rd.credentials=="function"?await rd.credentials():rd.credentials;return(pd==null?void 0:pd.accountId)??(pd==null?void 0:pd.AccountId)}:Ra==="endpoint"||qa==="endpoint"?async()=>{const pd=await sd();if(pd&&typeof pd=="object"){if("url"in pd)return pd.url.href;if("hostname"in pd){const{protocol:fd,hostname:hd,port:md,path:gd}=pd;return`${fd}//${hd}${md?":"+md:""}${gd}`}}return pd}:sd},getEndpointFromConfig=async Ra=>{};function parseQueryString(Ra){const qa={};if(Ra=Ra.replace(/^\?/,""),Ra)for(const rd of Ra.split("&")){let[sd,pd=null]=rd.split("=");sd=decodeURIComponent(sd),pd&&(pd=decodeURIComponent(pd)),sd in qa?Array.isArray(qa[sd])?qa[sd].push(pd):qa[sd]=[qa[sd],pd]:qa[sd]=pd}return qa}const parseUrl=Ra=>{if(typeof Ra=="string")return parseUrl(new URL(Ra));const{hostname:qa,pathname:rd,port:sd,protocol:pd,search:fd}=Ra;let hd;return fd&&(hd=parseQueryString(fd)),{hostname:qa,port:sd?parseInt(sd):void 0,protocol:pd,path:rd,query:hd}},toEndpointV1=Ra=>typeof Ra=="object"?"url"in Ra?parseUrl(Ra.url):Ra:parseUrl(Ra),getEndpointFromInstructions=async(Ra,qa,rd,sd)=>{if(!rd.endpoint){let hd;rd.serviceConfiguredEndpoint?hd=await rd.serviceConfiguredEndpoint():hd=await getEndpointFromConfig(rd.serviceId),hd&&(rd.endpoint=()=>Promise.resolve(toEndpointV1(hd)))}const pd=await resolveParams(Ra,qa,rd);if(typeof rd.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return rd.endpointProvider(pd,sd)},resolveParams=async(Ra,qa,rd)=>{var fd;const sd={},pd=((fd=qa==null?void 0:qa.getEndpointParameterInstructions)==null?void 0:fd.call(qa))||{};for(const[hd,md]of Object.entries(pd))switch(md.type){case"staticContextParams":sd[hd]=md.value;break;case"contextParams":sd[hd]=Ra[md.name];break;case"clientContextParams":case"builtInParams":sd[hd]=await createConfigValueProvider(md.name,hd,rd)();break;case"operationContextParams":sd[hd]=md.get(Ra);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(md))}return Object.keys(pd).length===0&&Object.assign(sd,rd),String(rd.serviceId).toLowerCase()==="s3"&&await resolveParamsForS3(sd),sd},endpointMiddleware=({config:Ra,instructions:qa})=>(rd,sd)=>async pd=>{var md,gd,yd;Ra.endpoint&&setFeature(sd,"ENDPOINT_OVERRIDE","N");const fd=await getEndpointFromInstructions(pd.input,{getEndpointParameterInstructions(){return qa}},{...Ra},sd);sd.endpointV2=fd,sd.authSchemes=(md=fd.properties)==null?void 0:md.authSchemes;const hd=(gd=sd.authSchemes)==null?void 0:gd[0];if(hd){sd.signing_region=hd.signingRegion,sd.signing_service=hd.signingName;const vd=getSmithyContext(sd),Nd=(yd=vd==null?void 0:vd.selectedHttpAuthScheme)==null?void 0:yd.httpAuthOption;Nd&&(Nd.signingProperties=Object.assign(Nd.signingProperties||{},{signing_region:hd.signingRegion,signingRegion:hd.signingRegion,signing_service:hd.signingName,signingName:hd.signingName,signingRegionSet:hd.signingRegionSet},hd.properties))}return rd({...pd})},endpointMiddlewareOptions={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:serializerMiddlewareOption.name},getEndpointPlugin=(Ra,qa)=>({applyToStack:rd=>{rd.addRelativeTo(endpointMiddleware({config:Ra,instructions:qa}),endpointMiddlewareOptions)}}),resolveEndpointConfig=Ra=>{const qa=Ra.tls??!0,{endpoint:rd}=Ra,sd=rd!=null?async()=>toEndpointV1(await normalizeProvider$1(rd)()):void 0,fd={...Ra,endpoint:sd,tls:qa,isCustomEndpoint:!!rd,useDualstackEndpoint:normalizeProvider$1(Ra.useDualstackEndpoint??!1),useFipsEndpoint:normalizeProvider$1(Ra.useFipsEndpoint??!1)};let hd;return fd.serviceConfiguredEndpoint=async()=>(Ra.serviceId&&!hd&&(hd=getEndpointFromConfig(Ra.serviceId)),hd),fd};var RETRY_MODES;(function(Ra){Ra.STANDARD="standard",Ra.ADAPTIVE="adaptive"})(RETRY_MODES||(RETRY_MODES={}));const DEFAULT_MAX_ATTEMPTS=3,DEFAULT_RETRY_MODE=RETRY_MODES.STANDARD,THROTTLING_ERROR_CODES=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],TRANSIENT_ERROR_CODES=["TimeoutError","RequestTimeout","RequestTimeoutException"],TRANSIENT_ERROR_STATUS_CODES=[500,502,503,504],NODEJS_TIMEOUT_ERROR_CODES=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],isClockSkewCorrectedError=Ra=>{var qa;return(qa=Ra.$metadata)==null?void 0:qa.clockSkewCorrected},isThrottlingError=Ra=>{var qa,rd;return((qa=Ra.$metadata)==null?void 0:qa.httpStatusCode)===429||THROTTLING_ERROR_CODES.includes(Ra.name)||((rd=Ra.$retryable)==null?void 0:rd.throttling)==!0},isTransientError=(Ra,qa=0)=>{var rd;return isClockSkewCorrectedError(Ra)||TRANSIENT_ERROR_CODES.includes(Ra.name)||NODEJS_TIMEOUT_ERROR_CODES.includes((Ra==null?void 0:Ra.code)||"")||TRANSIENT_ERROR_STATUS_CODES.includes(((rd=Ra.$metadata)==null?void 0:rd.httpStatusCode)||0)||Ra.cause!==void 0&&qa<=10&&isTransientError(Ra.cause,qa+1)},isServerError=Ra=>{var qa;if(((qa=Ra.$metadata)==null?void 0:qa.httpStatusCode)!==void 0){const rd=Ra.$metadata.httpStatusCode;return 500<=rd&&rd<=599&&!isTransientError(Ra)}return!1};class DefaultRateLimiter{constructor(qa){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(qa==null?void 0:qa.beta)??.7,this.minCapacity=(qa==null?void 0:qa.minCapacity)??1,this.minFillRate=(qa==null?void 0:qa.minFillRate)??.5,this.scaleConstant=(qa==null?void 0:qa.scaleConstant)??.4,this.smooth=(qa==null?void 0:qa.smooth)??.8;const rd=this.getCurrentTimeInSeconds();this.lastThrottleTime=rd,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(qa){if(this.enabled){if(this.refillTokenBucket(),qa>this.currentCapacity){const rd=(qa-this.currentCapacity)/this.fillRate*1e3;await new Promise(sd=>DefaultRateLimiter.setTimeoutFn(sd,rd))}this.currentCapacity=this.currentCapacity-qa}}refillTokenBucket(){const qa=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=qa;return}const rd=(qa-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+rd),this.lastTimestamp=qa}updateClientSendingRate(qa){let rd;if(this.updateMeasuredRate(),isThrottlingError(qa)){const pd=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=pd,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),rd=this.cubicThrottle(pd),this.enableTokenBucket()}else this.calculateTimeWindow(),rd=this.cubicSuccess(this.getCurrentTimeInSeconds());const sd=Math.min(rd,2*this.measuredTxRate);this.updateTokenBucketRate(sd)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(qa){return this.getPrecise(qa*this.beta)}cubicSuccess(qa){return this.getPrecise(this.scaleConstant*Math.pow(qa-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(qa){this.refillTokenBucket(),this.fillRate=Math.max(qa,this.minFillRate),this.maxCapacity=Math.max(qa,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const qa=this.getCurrentTimeInSeconds(),rd=Math.floor(qa*2)/2;if(this.requestCount++,rd>this.lastTxRateBucket){const sd=this.requestCount/(rd-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(sd*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=rd}}getPrecise(qa){return parseFloat(qa.toFixed(8))}}DefaultRateLimiter.setTimeoutFn=setTimeout;const DEFAULT_RETRY_DELAY_BASE=100,MAXIMUM_RETRY_DELAY=20*1e3,THROTTLING_RETRY_DELAY_BASE=500,INITIAL_RETRY_TOKENS=500,RETRY_COST=5,TIMEOUT_RETRY_COST=10,NO_RETRY_INCREMENT=1,INVOCATION_ID_HEADER="amz-sdk-invocation-id",REQUEST_HEADER="amz-sdk-request",getDefaultRetryBackoffStrategy=()=>{let Ra=DEFAULT_RETRY_DELAY_BASE;return{computeNextBackoffDelay:sd=>Math.floor(Math.min(MAXIMUM_RETRY_DELAY,Math.random()*2**sd*Ra)),setDelayBase:sd=>{Ra=sd}}},createDefaultRetryToken=({retryDelay:Ra,retryCount:qa,retryCost:rd})=>({getRetryCount:()=>qa,getRetryDelay:()=>Math.min(MAXIMUM_RETRY_DELAY,Ra),getRetryCost:()=>rd});class StandardRetryStrategy{constructor(qa){this.maxAttempts=qa,this.mode=RETRY_MODES.STANDARD,this.capacity=INITIAL_RETRY_TOKENS,this.retryBackoffStrategy=getDefaultRetryBackoffStrategy(),this.maxAttemptsProvider=typeof qa=="function"?qa:async()=>qa}async acquireInitialRetryToken(qa){return createDefaultRetryToken({retryDelay:DEFAULT_RETRY_DELAY_BASE,retryCount:0})}async refreshRetryTokenForRetry(qa,rd){const sd=await this.getMaxAttempts();if(this.shouldRetry(qa,rd,sd)){const pd=rd.errorType;this.retryBackoffStrategy.setDelayBase(pd==="THROTTLING"?THROTTLING_RETRY_DELAY_BASE:DEFAULT_RETRY_DELAY_BASE);const fd=this.retryBackoffStrategy.computeNextBackoffDelay(qa.getRetryCount()),hd=rd.retryAfterHint?Math.max(rd.retryAfterHint.getTime()-Date.now()||0,fd):fd,md=this.getCapacityCost(pd);return this.capacity-=md,createDefaultRetryToken({retryDelay:hd,retryCount:qa.getRetryCount()+1,retryCost:md})}throw new Error("No retry token available")}recordSuccess(qa){this.capacity=Math.max(INITIAL_RETRY_TOKENS,this.capacity+(qa.getRetryCost()??NO_RETRY_INCREMENT))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`),DEFAULT_MAX_ATTEMPTS}}shouldRetry(qa,rd,sd){return qa.getRetryCount()+1=this.getCapacityCost(rd.errorType)&&this.isRetryableError(rd.errorType)}getCapacityCost(qa){return qa==="TRANSIENT"?TIMEOUT_RETRY_COST:RETRY_COST}isRetryableError(qa){return qa==="THROTTLING"||qa==="TRANSIENT"}}class AdaptiveRetryStrategy{constructor(qa,rd){this.maxAttemptsProvider=qa,this.mode=RETRY_MODES.ADAPTIVE;const{rateLimiter:sd}=rd??{};this.rateLimiter=sd??new DefaultRateLimiter,this.standardRetryStrategy=new StandardRetryStrategy(qa)}async acquireInitialRetryToken(qa){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(qa)}async refreshRetryTokenForRetry(qa,rd){return this.rateLimiter.updateClientSendingRate(rd),this.standardRetryStrategy.refreshRetryTokenForRetry(qa,rd)}recordSuccess(qa){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(qa)}}let getRandomValues$1;const rnds8$1=new Uint8Array(16);function rng$1(){if(!getRandomValues$1&&(getRandomValues$1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues$1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues$1(rnds8$1)}const byteToHex$1=[];for(let Ra=0;Ra<256;++Ra)byteToHex$1.push((Ra+256).toString(16).slice(1));function unsafeStringify$1(Ra,qa=0){return byteToHex$1[Ra[qa+0]]+byteToHex$1[Ra[qa+1]]+byteToHex$1[Ra[qa+2]]+byteToHex$1[Ra[qa+3]]+"-"+byteToHex$1[Ra[qa+4]]+byteToHex$1[Ra[qa+5]]+"-"+byteToHex$1[Ra[qa+6]]+byteToHex$1[Ra[qa+7]]+"-"+byteToHex$1[Ra[qa+8]]+byteToHex$1[Ra[qa+9]]+"-"+byteToHex$1[Ra[qa+10]]+byteToHex$1[Ra[qa+11]]+byteToHex$1[Ra[qa+12]]+byteToHex$1[Ra[qa+13]]+byteToHex$1[Ra[qa+14]]+byteToHex$1[Ra[qa+15]]}const randomUUID$1=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native$1={randomUUID:randomUUID$1};function v4$1(Ra,qa,rd){if(native$1.randomUUID&&!Ra)return native$1.randomUUID();Ra=Ra||{};const sd=Ra.random||(Ra.rng||rng$1)();return sd[6]=sd[6]&15|64,sd[8]=sd[8]&63|128,unsafeStringify$1(sd)}const asSdkError=Ra=>Ra instanceof Error?Ra:Ra instanceof Object?Object.assign(new Error,Ra):typeof Ra=="string"?new Error(Ra):new Error(`AWS SDK error wrapper for ${Ra}`),resolveRetryConfig=Ra=>{const{retryStrategy:qa}=Ra,rd=normalizeProvider$1(Ra.maxAttempts??DEFAULT_MAX_ATTEMPTS);return{...Ra,maxAttempts:rd,retryStrategy:async()=>qa||(await normalizeProvider$1(Ra.retryMode)()===RETRY_MODES.ADAPTIVE?new AdaptiveRetryStrategy(rd):new StandardRetryStrategy(rd))}},isStreamingPayload=Ra=>(Ra==null?void 0:Ra.body)instanceof ReadableStream,retryMiddleware=Ra=>(qa,rd)=>async sd=>{var hd;let pd=await Ra.retryStrategy();const fd=await Ra.maxAttempts();if(isRetryStrategyV2(pd)){pd=pd;let md=await pd.acquireInitialRetryToken(rd.partition_id),gd=new Error,yd=0,vd=0;const{request:Nd}=sd,Md=HttpRequest.isInstance(Nd);for(Md&&(Nd.headers[INVOCATION_ID_HEADER]=v4$1());;)try{Md&&(Nd.headers[REQUEST_HEADER]=`attempt=${yd+1}; max=${fd}`);const{response:Ld,output:Fd}=await qa(sd);return pd.recordSuccess(md),Fd.$metadata.attempts=yd+1,Fd.$metadata.totalRetryDelay=vd,{response:Ld,output:Fd}}catch(Ld){const Fd=getRetryErrorInfo(Ld);if(gd=asSdkError(Ld),Md&&isStreamingPayload(Nd))throw(hd=rd.logger instanceof NoOpLogger?console:rd.logger)==null||hd.warn("An error was encountered in a non-retryable streaming request."),gd;try{md=await pd.refreshRetryTokenForRetry(md,Fd)}catch{throw gd.$metadata||(gd.$metadata={}),gd.$metadata.attempts=yd+1,gd.$metadata.totalRetryDelay=vd,gd}yd=md.getRetryCount();const Hd=md.getRetryDelay();vd+=Hd,await new Promise(Vd=>setTimeout(Vd,Hd))}}else return pd=pd,pd!=null&&pd.mode&&(rd.userAgent=[...rd.userAgent||[],["cfg/retry-mode",pd.mode]]),pd.retry(qa,sd)},isRetryStrategyV2=Ra=>typeof Ra.acquireInitialRetryToken<"u"&&typeof Ra.refreshRetryTokenForRetry<"u"&&typeof Ra.recordSuccess<"u",getRetryErrorInfo=Ra=>{const qa={error:Ra,errorType:getRetryErrorType(Ra)},rd=getRetryAfterHint(Ra.$response);return rd&&(qa.retryAfterHint=rd),qa},getRetryErrorType=Ra=>isThrottlingError(Ra)?"THROTTLING":isTransientError(Ra)?"TRANSIENT":isServerError(Ra)?"SERVER_ERROR":"CLIENT_ERROR",retryMiddlewareOptions={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},getRetryPlugin=Ra=>({applyToStack:qa=>{qa.add(retryMiddleware(Ra),retryMiddlewareOptions)}}),getRetryAfterHint=Ra=>{if(!HttpResponse.isInstance(Ra))return;const qa=Object.keys(Ra.headers).find(fd=>fd.toLowerCase()==="retry-after");if(!qa)return;const rd=Ra.headers[qa],sd=Number(rd);return Number.isNaN(sd)?new Date(rd):new Date(sd*1e3)},signatureV4CrtContainer={CrtSignerV4:null};class SignatureV4MultiRegion{constructor(qa){Ng(this,"sigv4aSigner");Ng(this,"sigv4Signer");Ng(this,"signerOptions");this.sigv4Signer=new SignatureV4S3Express(qa),this.signerOptions=qa}async sign(qa,rd={}){if(rd.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(qa,rd)}return this.sigv4Signer.sign(qa,rd)}async signWithCredentials(qa,rd,sd={}){if(sd.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(qa,rd,sd)}return this.sigv4Signer.signWithCredentials(qa,rd,sd)}async presign(qa,rd={}){if(rd.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(qa,rd)}return this.sigv4Signer.presign(qa,rd)}async presignWithCredentials(qa,rd,sd={}){if(sd.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(qa,rd,sd)}getSigv4aSigner(){if(!this.sigv4aSigner){let qa=null;try{if(qa=signatureV4CrtContainer.CrtSignerV4,typeof qa!="function")throw new Error}catch(rd){throw rd.message=`${rd.message} +For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`);case ChecksumAlgorithm.SHA1:return ed.sha1;case ChecksumAlgorithm.SHA256:return ed.sha256;default:throw new Error(`Unsupported checksum algorithm: ${Ra}`)}},stringHasher=(Ra,ed)=>{const ud=new Ra;return ud.update(toUint8Array(ed||"")),ud.digest()},flexibleChecksumsMiddlewareOptions={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},flexibleChecksumsMiddleware=(Ra,ed)=>(ud,dd)=>async hd=>{if(!HttpRequest.isInstance(hd.request)||hasHeaderWithPrefix("x-amz-checksum-",hd.request.headers))return ud(hd);const{request:md,input:gd}=hd,{body:yd,headers:vd}=md,{base64Encoder:Cd,streamHasher:wd}=Ra,{requestChecksumRequired:Nd,requestAlgorithmMember:Ld}=ed,Ud=await Ra.requestChecksumCalculation(),jd=Ld==null?void 0:Ld.name,Gd=Ld==null?void 0:Ld.httpHeader;jd&&!gd[jd]&&(Ud===RequestChecksumCalculation.WHEN_SUPPORTED||Nd)&&(gd[jd]=DEFAULT_CHECKSUM_ALGORITHM,Gd&&(vd[Gd]=DEFAULT_CHECKSUM_ALGORITHM));const Yd=getChecksumAlgorithmForRequest(gd,{requestChecksumRequired:Nd,requestAlgorithmMember:Ld==null?void 0:Ld.name,requestChecksumCalculation:Ud});let zd=yd,qd=vd;if(Yd){switch(Yd){case ChecksumAlgorithm.CRC32:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_CRC32","U");break;case ChecksumAlgorithm.CRC32C:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_CRC32C","V");break;case ChecksumAlgorithm.CRC64NVME:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_CRC64","W");break;case ChecksumAlgorithm.SHA1:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_SHA1","X");break;case ChecksumAlgorithm.SHA256:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_SHA256","Y");break}const Xd=getChecksumLocationName(Yd),Jd=selectChecksumAlgorithmFunction(Yd,Ra);if(isStreaming(yd)){const{getAwsChunkedEncodingStream:Zd,bodyLengthChecker:mf}=Ra;zd=Zd(typeof Ra.requestStreamBufferSize=="number"&&Ra.requestStreamBufferSize>=8*1024?createBufferedReadable(yd,Ra.requestStreamBufferSize,dd.logger):yd,{base64Encoder:Cd,bodyLengthChecker:mf,checksumLocationName:Xd,checksumAlgorithmFn:Jd,streamHasher:wd}),qd={...vd,"content-encoding":vd["content-encoding"]?`${vd["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":vd["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":Xd},delete qd["content-length"]}else if(!hasHeader(Xd,vd)){const Zd=await stringHasher(Jd,yd);qd={...vd,[Xd]:Cd(Zd)}}}return await ud({...hd,request:{...md,headers:qd,body:zd}})},flexibleChecksumsInputMiddlewareOptions={name:"flexibleChecksumsInputMiddleware",toMiddleware:"serializerMiddleware",relation:"before",tags:["BODY_CHECKSUM"],override:!0},flexibleChecksumsInputMiddleware=(Ra,ed)=>(ud,dd)=>async hd=>{const md=hd.input,{requestValidationModeMember:gd}=ed,yd=await Ra.requestChecksumCalculation(),vd=await Ra.responseChecksumValidation();switch(yd){case RequestChecksumCalculation.WHEN_REQUIRED:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_WHEN_REQUIRED","a");break;case RequestChecksumCalculation.WHEN_SUPPORTED:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_REQ_WHEN_SUPPORTED","Z");break}switch(vd){case ResponseChecksumValidation.WHEN_REQUIRED:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_RES_WHEN_REQUIRED","c");break;case ResponseChecksumValidation.WHEN_SUPPORTED:setFeature$1(dd,"FLEXIBLE_CHECKSUMS_RES_WHEN_SUPPORTED","b");break}return gd&&!md[gd]&&vd===ResponseChecksumValidation.WHEN_SUPPORTED&&(md[gd]="ENABLED"),ud(hd)},getChecksumAlgorithmListForResponse=(Ra=[])=>{const ed=[];for(const ud of PRIORITY_ORDER_ALGORITHMS)!Ra.includes(ud)||!CLIENT_SUPPORTED_ALGORITHMS.includes(ud)||ed.push(ud);return ed},isChecksumWithPartNumber=Ra=>{const ed=Ra.lastIndexOf("-");if(ed!==-1){const ud=Ra.slice(ed+1);if(!ud.startsWith("0")){const dd=parseInt(ud,10);if(!isNaN(dd)&&dd>=1&&dd<=1e4)return!0}}return!1},getChecksum=async(Ra,{checksumAlgorithmFn:ed,base64Encoder:ud})=>ud(await stringHasher(ed,Ra)),validateChecksumFromResponse=async(Ra,{config:ed,responseAlgorithms:ud,logger:dd})=>{const hd=getChecksumAlgorithmListForResponse(ud),{body:md,headers:gd}=Ra;for(const yd of hd){const vd=getChecksumLocationName(yd),Cd=gd[vd];if(Cd){let wd;try{wd=selectChecksumAlgorithmFunction(yd,ed)}catch(Ud){if(yd===ChecksumAlgorithm.CRC64NVME){dd==null||dd.warn(`Skipping ${ChecksumAlgorithm.CRC64NVME} checksum validation: ${Ud.message}`);continue}throw Ud}const{base64Encoder:Nd}=ed;if(isStreaming(md)){Ra.body=createChecksumStream({expectedChecksum:Cd,checksumSourceLocation:vd,checksum:new wd,source:md,base64Encoder:Nd});return}const Ld=await getChecksum(md,{checksumAlgorithmFn:wd,base64Encoder:Nd});if(Ld===Cd)break;throw new Error(`Checksum mismatch: expected "${Ld}" but received "${Cd}" in response header "${vd}".`)}}},flexibleChecksumsResponseMiddlewareOptions={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},flexibleChecksumsResponseMiddleware=(Ra,ed)=>(ud,dd)=>async hd=>{if(!HttpRequest.isInstance(hd.request))return ud(hd);const md=hd.input,gd=await ud(hd),yd=gd.response,{requestValidationModeMember:vd,responseAlgorithms:Cd}=ed;if(vd&&md[vd]==="ENABLED"){const{clientName:wd,commandName:Nd}=dd;if(wd==="S3Client"&&Nd==="GetObjectCommand"&&getChecksumAlgorithmListForResponse(Cd).every(Ud=>{const jd=getChecksumLocationName(Ud),Gd=yd.headers[jd];return!Gd||isChecksumWithPartNumber(Gd)}))return gd;await validateChecksumFromResponse(yd,{config:Ra,responseAlgorithms:Cd,logger:dd.logger})}return gd},getFlexibleChecksumsPlugin=(Ra,ed)=>({applyToStack:ud=>{ud.add(flexibleChecksumsMiddleware(Ra,ed),flexibleChecksumsMiddlewareOptions),ud.addRelativeTo(flexibleChecksumsInputMiddleware(Ra,ed),flexibleChecksumsInputMiddlewareOptions),ud.addRelativeTo(flexibleChecksumsResponseMiddleware(Ra,ed),flexibleChecksumsResponseMiddlewareOptions)}}),resolveFlexibleChecksumsConfig=Ra=>({...Ra,requestChecksumCalculation:normalizeProvider$1(Ra.requestChecksumCalculation??DEFAULT_REQUEST_CHECKSUM_CALCULATION),responseChecksumValidation:normalizeProvider$1(Ra.responseChecksumValidation??DEFAULT_RESPONSE_CHECKSUM_VALIDATION),requestStreamBufferSize:Number(Ra.requestStreamBufferSize??0)});function resolveHostHeaderConfig(Ra){return Ra}const hostHeaderMiddleware=Ra=>ed=>async ud=>{if(!HttpRequest.isInstance(ud.request))return ed(ud);const{request:dd}=ud,{handlerProtocol:hd=""}=Ra.requestHandler.metadata||{};if(hd.indexOf("h2")>=0&&!dd.headers[":authority"])delete dd.headers.host,dd.headers[":authority"]=dd.hostname+(dd.port?":"+dd.port:"");else if(!dd.headers.host){let md=dd.hostname;dd.port!=null&&(md+=`:${dd.port}`),dd.headers.host=md}return ed(ud)},hostHeaderMiddlewareOptions={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},getHostHeaderPlugin=Ra=>({applyToStack:ed=>{ed.add(hostHeaderMiddleware(Ra),hostHeaderMiddlewareOptions)}}),loggerMiddleware=()=>(Ra,ed)=>async ud=>{var dd,hd;try{const md=await Ra(ud),{clientName:gd,commandName:yd,logger:vd,dynamoDbDocumentClientOptions:Cd={}}=ed,{overrideInputFilterSensitiveLog:wd,overrideOutputFilterSensitiveLog:Nd}=Cd,Ld=wd??ed.inputFilterSensitiveLog,Ud=Nd??ed.outputFilterSensitiveLog,{$metadata:jd,...Gd}=md.output;return(dd=vd==null?void 0:vd.info)==null||dd.call(vd,{clientName:gd,commandName:yd,input:Ld(ud.input),output:Ud(Gd),metadata:jd}),md}catch(md){const{clientName:gd,commandName:yd,logger:vd,dynamoDbDocumentClientOptions:Cd={}}=ed,{overrideInputFilterSensitiveLog:wd}=Cd,Nd=wd??ed.inputFilterSensitiveLog;throw(hd=vd==null?void 0:vd.error)==null||hd.call(vd,{clientName:gd,commandName:yd,input:Nd(ud.input),error:md,metadata:md.$metadata}),md}},loggerMiddlewareOptions={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},getLoggerPlugin=Ra=>({applyToStack:ed=>{ed.add(loggerMiddleware(),loggerMiddlewareOptions)}});var define_process_env_default={};const TRACE_ID_HEADER_NAME="X-Amzn-Trace-Id",ENV_LAMBDA_FUNCTION_NAME="AWS_LAMBDA_FUNCTION_NAME",ENV_TRACE_ID="_X_AMZN_TRACE_ID",recursionDetectionMiddleware=Ra=>ed=>async ud=>{const{request:dd}=ud;if(!HttpRequest.isInstance(dd)||Ra.runtime!=="node"||dd.headers.hasOwnProperty(TRACE_ID_HEADER_NAME))return ed(ud);const hd=define_process_env_default[ENV_LAMBDA_FUNCTION_NAME],md=define_process_env_default[ENV_TRACE_ID],gd=yd=>typeof yd=="string"&&yd.length>0;return gd(hd)&&gd(md)&&(dd.headers[TRACE_ID_HEADER_NAME]=md),ed({...ud,request:dd})},addRecursionDetectionMiddlewareOptions={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},getRecursionDetectionPlugin=Ra=>({applyToStack:ed=>{ed.add(recursionDetectionMiddleware(Ra),addRecursionDetectionMiddlewareOptions)}}),CONTENT_LENGTH_HEADER$1="content-length",DECODED_CONTENT_LENGTH_HEADER="x-amz-decoded-content-length";function checkContentLengthHeader(){return(Ra,ed)=>async ud=>{var hd;const{request:dd}=ud;if(HttpRequest.isInstance(dd)&&!(CONTENT_LENGTH_HEADER$1 in dd.headers)&&!(DECODED_CONTENT_LENGTH_HEADER in dd.headers)){const md="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";typeof((hd=ed==null?void 0:ed.logger)==null?void 0:hd.warn)=="function"&&!(ed.logger instanceof NoOpLogger)?ed.logger.warn(md):console.warn(md)}return Ra({...ud})}}const checkContentLengthHeaderMiddlewareOptions={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},getCheckContentLengthHeaderPlugin=Ra=>({applyToStack:ed=>{ed.add(checkContentLengthHeader(),checkContentLengthHeaderMiddlewareOptions)}}),regionRedirectEndpointMiddleware=Ra=>(ed,ud)=>async dd=>{const hd=await Ra.region(),md=Ra.region;let gd=()=>{};ud.__s3RegionRedirect&&(Object.defineProperty(Ra,"region",{writable:!1,value:async()=>ud.__s3RegionRedirect}),gd=()=>Object.defineProperty(Ra,"region",{writable:!0,value:md}));try{const yd=await ed(dd);if(ud.__s3RegionRedirect){gd();const vd=await Ra.region();if(hd!==vd)throw new Error("Region was not restored following S3 region redirect.")}return yd}catch(yd){throw gd(),yd}},regionRedirectEndpointMiddlewareOptions={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function regionRedirectMiddleware(Ra){return(ed,ud)=>async dd=>{var hd,md,gd;try{return await ed(dd)}catch(yd){if(Ra.followRegionRedirects&&(((hd=yd==null?void 0:yd.$metadata)==null?void 0:hd.httpStatusCode)===301||((md=yd==null?void 0:yd.$metadata)==null?void 0:md.httpStatusCode)===400&&(yd==null?void 0:yd.name)==="IllegalLocationConstraintException")){try{const vd=yd.$response.headers["x-amz-bucket-region"];(gd=ud.logger)==null||gd.debug(`Redirecting from ${await Ra.region()} to ${vd}`),ud.__s3RegionRedirect=vd}catch(vd){throw new Error("Region redirect failed: "+vd)}return ed(dd)}throw yd}}}const regionRedirectMiddlewareOptions={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},getRegionRedirectMiddlewarePlugin=Ra=>({applyToStack:ed=>{ed.add(regionRedirectMiddleware(Ra),regionRedirectMiddlewareOptions),ed.addRelativeTo(regionRedirectEndpointMiddleware(Ra),regionRedirectEndpointMiddlewareOptions)}}),sT=class sT{constructor(ed={}){Ig(this,"data");Ig(this,"lastPurgeTime",Date.now());this.data=ed}get(ed){const ud=this.data[ed];if(ud)return ud}set(ed,ud){return this.data[ed]=ud,ud}delete(ed){delete this.data[ed]}async purgeExpired(){const ed=Date.now();if(!(this.lastPurgeTime+sT.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>ed))for(const ud in this.data){const dd=this.data[ud];if(!dd.isRefreshing){const hd=await dd.identity;hd.expiration&&hd.expiration.getTime(){var Cd,wd;return(((Cd=gd.expiration)==null?void 0:Cd.getTime())??0){hd.set(dd,new S3ExpressIdentityCacheEntry(Promise.resolve(Nd)))})),gd)}):hd.set(dd,new S3ExpressIdentityCacheEntry(this.getIdentity(dd))).identity}async getIdentity(ed){var hd,md;await this.cache.purgeExpired().catch(gd=>{console.warn(`Error while clearing expired entries in S3ExpressIdentityCache: +`+gd)});const ud=await this.createSessionFn(ed);if(!((hd=ud.Credentials)!=null&&hd.AccessKeyId)||!((md=ud.Credentials)!=null&&md.SecretAccessKey))throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:ud.Credentials.AccessKeyId,secretAccessKey:ud.Credentials.SecretAccessKey,sessionToken:ud.Credentials.SessionToken,expiration:ud.Credentials.Expiration?new Date(ud.Credentials.Expiration):void 0}}};Ig(oT,"REFRESH_WINDOW_MS",6e4);let S3ExpressIdentityProviderImpl=oT;var SelectorType;(function(Ra){Ra.ENV="env",Ra.CONFIG="shared config entry"})(SelectorType||(SelectorType={}));const S3_EXPRESS_BUCKET_TYPE="Directory",S3_EXPRESS_BACKEND="S3Express",S3_EXPRESS_AUTH_SCHEME="sigv4-s3express",SESSION_TOKEN_QUERY_PARAM="X-Amz-S3session-Token",SESSION_TOKEN_HEADER=SESSION_TOKEN_QUERY_PARAM.toLowerCase();class SignatureV4S3Express extends SignatureV4{async signWithCredentials(ed,ud,dd){const hd=getCredentialsWithoutSessionToken(ud);ed.headers[SESSION_TOKEN_HEADER]=ud.sessionToken;const md=this;return setSingleOverride(md,hd),md.signRequest(ed,dd??{})}async presignWithCredentials(ed,ud,dd){const hd=getCredentialsWithoutSessionToken(ud);return delete ed.headers[SESSION_TOKEN_HEADER],ed.headers[SESSION_TOKEN_QUERY_PARAM]=ud.sessionToken,ed.query=ed.query??{},ed.query[SESSION_TOKEN_QUERY_PARAM]=ud.sessionToken,setSingleOverride(this,hd),this.presign(ed,dd)}}function getCredentialsWithoutSessionToken(Ra){return{accessKeyId:Ra.accessKeyId,secretAccessKey:Ra.secretAccessKey,expiration:Ra.expiration}}function setSingleOverride(Ra,ed){const ud=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),dd=Ra.credentialProvider,hd=()=>(clearTimeout(ud),Ra.credentialProvider=dd,Promise.resolve(ed));Ra.credentialProvider=hd}const s3ExpressMiddleware=Ra=>(ed,ud)=>async dd=>{var hd,md,gd,yd,vd;if(ud.endpointV2){const Cd=ud.endpointV2,wd=((gd=(md=(hd=Cd.properties)==null?void 0:hd.authSchemes)==null?void 0:md[0])==null?void 0:gd.name)===S3_EXPRESS_AUTH_SCHEME;if((((yd=Cd.properties)==null?void 0:yd.backend)===S3_EXPRESS_BACKEND||((vd=Cd.properties)==null?void 0:vd.bucketType)===S3_EXPRESS_BUCKET_TYPE)&&(setFeature$1(ud,"S3_EXPRESS_BUCKET","J"),ud.isS3ExpressBucket=!0),wd){const Ld=dd.input.Bucket;if(Ld){const Ud=await Ra.s3ExpressIdentityProvider.getS3ExpressIdentity(await Ra.credentials(),{Bucket:Ld});ud.s3ExpressIdentity=Ud,HttpRequest.isInstance(dd.request)&&Ud.sessionToken&&(dd.request.headers[SESSION_TOKEN_HEADER]=Ud.sessionToken)}}}return ed(dd)},s3ExpressMiddlewareOptions={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},getS3ExpressPlugin=Ra=>({applyToStack:ed=>{ed.add(s3ExpressMiddleware(Ra),s3ExpressMiddlewareOptions)}}),signS3Express=async(Ra,ed,ud,dd)=>{const hd=await dd.signWithCredentials(ud,Ra,{});if(hd.headers["X-Amz-Security-Token"]||hd.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return hd},defaultErrorHandler=Ra=>ed=>{throw ed},defaultSuccessHandler=(Ra,ed)=>{},s3ExpressHttpSigningMiddleware=Ra=>(ed,ud)=>async dd=>{if(!HttpRequest.isInstance(dd.request))return ed(dd);const md=getSmithyContext(ud).selectedHttpAuthScheme;if(!md)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:gd={}},identity:yd,signer:vd}=md;let Cd;ud.s3ExpressIdentity?Cd=await signS3Express(ud.s3ExpressIdentity,gd,dd.request,await Ra.signer()):Cd=await vd.sign(dd.request,yd,gd);const wd=await ed({...dd,request:Cd}).catch((vd.errorHandler||defaultErrorHandler)(gd));return(vd.successHandler||defaultSuccessHandler)(wd.response,gd),wd},getS3ExpressHttpSigningPlugin=Ra=>({applyToStack:ed=>{ed.addRelativeTo(s3ExpressHttpSigningMiddleware(Ra),httpSigningMiddlewareOptions)}}),resolveS3Config=(Ra,{session:ed})=>{const[ud,dd]=ed;return{...Ra,forcePathStyle:Ra.forcePathStyle??!1,useAccelerateEndpoint:Ra.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:Ra.disableMultiregionAccessPoints??!1,followRegionRedirects:Ra.followRegionRedirects??!1,s3ExpressIdentityProvider:Ra.s3ExpressIdentityProvider??new S3ExpressIdentityProviderImpl(async hd=>ud().send(new dd({Bucket:hd}))),bucketEndpoint:Ra.bucketEndpoint??!1}},THROW_IF_EMPTY_BODY={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},MAX_BYTES_TO_INSPECT=3e3,throw200ExceptionsMiddleware=Ra=>(ed,ud)=>async dd=>{const hd=await ed(dd),{response:md}=hd;if(!HttpResponse.isInstance(md))return hd;const{statusCode:gd,body:yd}=md;if(gd<200||gd>=300||!(typeof(yd==null?void 0:yd.stream)=="function"||typeof(yd==null?void 0:yd.pipe)=="function"||typeof(yd==null?void 0:yd.tee)=="function"))return hd;let Cd=yd,wd=yd;yd&&typeof yd=="object"&&!(yd instanceof Uint8Array)&&([Cd,wd]=await splitStream(yd)),md.body=wd;const Nd=await collectBody(Cd,{streamCollector:async Ud=>headStream(Ud,MAX_BYTES_TO_INSPECT)});typeof(Cd==null?void 0:Cd.destroy)=="function"&&Cd.destroy();const Ld=Ra.utf8Encoder(Nd.subarray(Nd.length-16));if(Nd.length===0&&THROW_IF_EMPTY_BODY[ud.commandName]){const Ud=new Error("S3 aborted request");throw Ud.name="InternalError",Ud}return Ld&&Ld.endsWith("")&&(md.statusCode=400),hd},collectBody=(Ra=new Uint8Array,ed)=>Ra instanceof Uint8Array?Promise.resolve(Ra):ed.streamCollector(Ra)||Promise.resolve(new Uint8Array),throw200ExceptionsMiddlewareOptions={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},getThrow200ExceptionsPlugin=Ra=>({applyToStack:ed=>{ed.addRelativeTo(throw200ExceptionsMiddleware(Ra),throw200ExceptionsMiddlewareOptions)}}),validate=Ra=>typeof Ra=="string"&&Ra.indexOf("arn:")===0&&Ra.split(":").length>=6;function bucketEndpointMiddleware(Ra){return(ed,ud)=>async dd=>{var hd,md,gd,yd;if(Ra.bucketEndpoint){const vd=ud.endpointV2;if(vd){const Cd=dd.input.Bucket;if(typeof Cd=="string")try{const wd=new URL(Cd);ud.endpointV2={...vd,url:wd}}catch(wd){const Nd=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${Cd} could not be parsed as URL.`;throw((md=(hd=ud.logger)==null?void 0:hd.constructor)==null?void 0:md.name)==="NoOpLogger"?console.warn(Nd):(yd=(gd=ud.logger)==null?void 0:gd.warn)==null||yd.call(gd,Nd),wd}}}return ed(dd)}}const bucketEndpointMiddlewareOptions={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function validateBucketNameMiddleware({bucketEndpoint:Ra}){return ed=>async ud=>{const{input:{Bucket:dd}}=ud;if(!Ra&&typeof dd=="string"&&!validate(dd)&&dd.indexOf("/")>=0){const hd=new Error(`Bucket name shouldn't contain '/', received '${dd}'`);throw hd.name="InvalidBucketName",hd}return ed({...ud})}}const validateBucketNameMiddlewareOptions={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},getValidateBucketNamePlugin=Ra=>({applyToStack:ed=>{ed.add(validateBucketNameMiddleware(Ra),validateBucketNameMiddlewareOptions),ed.addRelativeTo(bucketEndpointMiddleware(Ra),bucketEndpointMiddlewareOptions)}}),DEFAULT_UA_APP_ID=void 0;function isValidUserAgentAppId(Ra){return Ra===void 0?!0:typeof Ra=="string"&&Ra.length<=50}function resolveUserAgentConfig(Ra){const ed=normalizeProvider(Ra.userAgentAppId??DEFAULT_UA_APP_ID);return{...Ra,customUserAgent:typeof Ra.customUserAgent=="string"?[[Ra.customUserAgent]]:Ra.customUserAgent,userAgentAppId:async()=>{var dd,hd;const ud=await ed();if(!isValidUserAgentAppId(ud)){const md=((hd=(dd=Ra.logger)==null?void 0:dd.constructor)==null?void 0:hd.name)==="NoOpLogger"||!Ra.logger?console:Ra.logger;typeof ud!="string"?md==null||md.warn("userAgentAppId must be a string or undefined."):ud.length>50&&(md==null||md.warn("The provided userAgentAppId exceeds the maximum length of 50 characters."))}return ud}}}class EndpointCache{constructor({size:ed,params:ud}){this.data=new Map,this.parameters=[],this.capacity=ed??50,ud&&(this.parameters=ud)}get(ed,ud){const dd=this.hash(ed);if(dd===!1)return ud();if(!this.data.has(dd)){if(this.data.size>this.capacity+10){const hd=this.data.keys();let md=0;for(;;){const{value:gd,done:yd}=hd.next();if(this.data.delete(gd),yd||++md>10)break}}this.data.set(dd,ud())}return this.data.get(dd)}size(){return this.data.size}hash(ed){let ud="";const{parameters:dd}=this;if(dd.length===0)return!1;for(const hd of dd){const md=String(ed[hd]??"");if(md.includes("|;"))return!1;ud+=md+"|;"}return ud}}const IP_V4_REGEX=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),isIpAddress=Ra=>IP_V4_REGEX.test(Ra)||Ra.startsWith("[")&&Ra.endsWith("]"),VALID_HOST_LABEL_REGEX=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),isValidHostLabel=(Ra,ed=!1)=>{if(!ed)return VALID_HOST_LABEL_REGEX.test(Ra);const ud=Ra.split(".");for(const dd of ud)if(!isValidHostLabel(dd))return!1;return!0},customEndpointFunctions={},debugId="endpoints";function toDebugString(Ra){return typeof Ra!="object"||Ra==null?Ra:"ref"in Ra?`$${toDebugString(Ra.ref)}`:"fn"in Ra?`${Ra.fn}(${(Ra.argv||[]).map(toDebugString).join(", ")})`:JSON.stringify(Ra,null,2)}class EndpointError extends Error{constructor(ed){super(ed),this.name="EndpointError"}}const booleanEquals=(Ra,ed)=>Ra===ed,getAttrPathList=Ra=>{const ed=Ra.split("."),ud=[];for(const dd of ed){const hd=dd.indexOf("[");if(hd!==-1){if(dd.indexOf("]")!==dd.length-1)throw new EndpointError(`Path: '${Ra}' does not end with ']'`);const md=dd.slice(hd+1,-1);if(Number.isNaN(parseInt(md)))throw new EndpointError(`Invalid array index: '${md}' in path: '${Ra}'`);hd!==0&&ud.push(dd.slice(0,hd)),ud.push(md)}else ud.push(dd)}return ud},getAttr=(Ra,ed)=>getAttrPathList(ed).reduce((ud,dd)=>{if(typeof ud!="object")throw new EndpointError(`Index '${dd}' in '${ed}' not found in '${JSON.stringify(Ra)}'`);return Array.isArray(ud)?ud[parseInt(dd)]:ud[dd]},Ra),isSet=Ra=>Ra!=null,not=Ra=>!Ra,DEFAULT_PORTS={[EndpointURLScheme.HTTP]:80,[EndpointURLScheme.HTTPS]:443},parseURL=Ra=>{const ed=(()=>{try{if(Ra instanceof URL)return Ra;if(typeof Ra=="object"&&"hostname"in Ra){const{hostname:Ld,port:Ud,protocol:jd="",path:Gd="",query:Yd={}}=Ra,zd=new URL(`${jd}//${Ld}${Ud?`:${Ud}`:""}${Gd}`);return zd.search=Object.entries(Yd).map(([qd,Wd])=>`${qd}=${Wd}`).join("&"),zd}return new URL(Ra)}catch{return null}})();if(!ed)return console.error(`Unable to parse ${JSON.stringify(Ra)} as a whatwg URL.`),null;const ud=ed.href,{host:dd,hostname:hd,pathname:md,protocol:gd,search:yd}=ed;if(yd)return null;const vd=gd.slice(0,-1);if(!Object.values(EndpointURLScheme).includes(vd))return null;const Cd=isIpAddress(hd),wd=ud.includes(`${dd}:${DEFAULT_PORTS[vd]}`)||typeof Ra=="string"&&Ra.includes(`${dd}:${DEFAULT_PORTS[vd]}`),Nd=`${dd}${wd?`:${DEFAULT_PORTS[vd]}`:""}`;return{scheme:vd,authority:Nd,path:md,normalizedPath:md.endsWith("/")?md:`${md}/`,isIp:Cd}},stringEquals=(Ra,ed)=>Ra===ed,substring=(Ra,ed,ud,dd)=>ed>=ud||Ra.lengthencodeURIComponent(Ra).replace(/[!*'()]/g,ed=>`%${ed.charCodeAt(0).toString(16).toUpperCase()}`),endpointFunctions={booleanEquals,getAttr,isSet,isValidHostLabel,not,parseURL,stringEquals,substring,uriEncode},evaluateTemplate=(Ra,ed)=>{const ud=[],dd={...ed.endpointParams,...ed.referenceRecord};let hd=0;for(;hd({...ed.endpointParams,...ed.referenceRecord})[Ra],evaluateExpression=(Ra,ed,ud)=>{if(typeof Ra=="string")return evaluateTemplate(Ra,ud);if(Ra.fn)return callFunction(Ra,ud);if(Ra.ref)return getReferenceValue(Ra,ud);throw new EndpointError(`'${ed}': ${String(Ra)} is not a string, function or reference.`)},callFunction=({fn:Ra,argv:ed},ud)=>{const dd=ed.map(md=>["boolean","number"].includes(typeof md)?md:evaluateExpression(md,"arg",ud)),hd=Ra.split(".");return hd[0]in customEndpointFunctions&&hd[1]!=null?customEndpointFunctions[hd[0]][hd[1]](...dd):endpointFunctions[Ra](...dd)},evaluateCondition=({assign:Ra,...ed},ud)=>{var hd,md;if(Ra&&Ra in ud.referenceRecord)throw new EndpointError(`'${Ra}' is already defined in Reference Record.`);const dd=callFunction(ed,ud);return(md=(hd=ud.logger)==null?void 0:hd.debug)==null||md.call(hd,`${debugId} evaluateCondition: ${toDebugString(ed)} = ${toDebugString(dd)}`),{result:dd===""?!0:!!dd,...Ra!=null&&{toAssign:{name:Ra,value:dd}}}},evaluateConditions=(Ra=[],ed)=>{var dd,hd;const ud={};for(const md of Ra){const{result:gd,toAssign:yd}=evaluateCondition(md,{...ed,referenceRecord:{...ed.referenceRecord,...ud}});if(!gd)return{result:gd};yd&&(ud[yd.name]=yd.value,(hd=(dd=ed.logger)==null?void 0:dd.debug)==null||hd.call(dd,`${debugId} assign: ${yd.name} := ${toDebugString(yd.value)}`))}return{result:!0,referenceRecord:ud}},getEndpointHeaders=(Ra,ed)=>Object.entries(Ra).reduce((ud,[dd,hd])=>({...ud,[dd]:hd.map(md=>{const gd=evaluateExpression(md,"Header value entry",ed);if(typeof gd!="string")throw new EndpointError(`Header '${dd}' value '${gd}' is not a string`);return gd})}),{}),getEndpointProperty=(Ra,ed)=>{if(Array.isArray(Ra))return Ra.map(ud=>getEndpointProperty(ud,ed));switch(typeof Ra){case"string":return evaluateTemplate(Ra,ed);case"object":if(Ra===null)throw new EndpointError(`Unexpected endpoint property: ${Ra}`);return getEndpointProperties(Ra,ed);case"boolean":return Ra;default:throw new EndpointError(`Unexpected endpoint property type: ${typeof Ra}`)}},getEndpointProperties=(Ra,ed)=>Object.entries(Ra).reduce((ud,[dd,hd])=>({...ud,[dd]:getEndpointProperty(hd,ed)}),{}),getEndpointUrl=(Ra,ed)=>{const ud=evaluateExpression(Ra,"Endpoint URL",ed);if(typeof ud=="string")try{return new URL(ud)}catch(dd){throw console.error(`Failed to construct URL with ${ud}`,dd),dd}throw new EndpointError(`Endpoint URL must be a string, got ${typeof ud}`)},evaluateEndpointRule=(Ra,ed)=>{var wd,Nd;const{conditions:ud,endpoint:dd}=Ra,{result:hd,referenceRecord:md}=evaluateConditions(ud,ed);if(!hd)return;const gd={...ed,referenceRecord:{...ed.referenceRecord,...md}},{url:yd,properties:vd,headers:Cd}=dd;return(Nd=(wd=ed.logger)==null?void 0:wd.debug)==null||Nd.call(wd,`${debugId} Resolving endpoint from template: ${toDebugString(dd)}`),{...Cd!=null&&{headers:getEndpointHeaders(Cd,gd)},...vd!=null&&{properties:getEndpointProperties(vd,gd)},url:getEndpointUrl(yd,gd)}},evaluateErrorRule=(Ra,ed)=>{const{conditions:ud,error:dd}=Ra,{result:hd,referenceRecord:md}=evaluateConditions(ud,ed);if(hd)throw new EndpointError(evaluateExpression(dd,"Error",{...ed,referenceRecord:{...ed.referenceRecord,...md}}))},evaluateTreeRule=(Ra,ed)=>{const{conditions:ud,rules:dd}=Ra,{result:hd,referenceRecord:md}=evaluateConditions(ud,ed);if(hd)return evaluateRules(dd,{...ed,referenceRecord:{...ed.referenceRecord,...md}})},evaluateRules=(Ra,ed)=>{for(const ud of Ra)if(ud.type==="endpoint"){const dd=evaluateEndpointRule(ud,ed);if(dd)return dd}else if(ud.type==="error")evaluateErrorRule(ud,ed);else if(ud.type==="tree"){const dd=evaluateTreeRule(ud,ed);if(dd)return dd}else throw new EndpointError(`Unknown endpoint rule: ${ud}`);throw new EndpointError("Rules evaluation failed")},resolveEndpoint=(Ra,ed)=>{var Cd,wd,Nd,Ld;const{endpointParams:ud,logger:dd}=ed,{parameters:hd,rules:md}=Ra;(wd=(Cd=ed.logger)==null?void 0:Cd.debug)==null||wd.call(Cd,`${debugId} Initial EndpointParams: ${toDebugString(ud)}`);const gd=Object.entries(hd).filter(([,Ud])=>Ud.default!=null).map(([Ud,jd])=>[Ud,jd.default]);if(gd.length>0)for(const[Ud,jd]of gd)ud[Ud]=ud[Ud]??jd;const yd=Object.entries(hd).filter(([,Ud])=>Ud.required).map(([Ud])=>Ud);for(const Ud of yd)if(ud[Ud]==null)throw new EndpointError(`Missing required parameter: '${Ud}'`);const vd=evaluateRules(md,{endpointParams:ud,logger:dd,referenceRecord:{}});return(Ld=(Nd=ed.logger)==null?void 0:Nd.debug)==null||Ld.call(Nd,`${debugId} Resolved endpoint: ${toDebugString(vd)}`),vd},isVirtualHostableS3Bucket=(Ra,ed=!1)=>{if(ed){for(const ud of Ra.split("."))if(!isVirtualHostableS3Bucket(ud))return!1;return!0}return!(!isValidHostLabel(Ra)||Ra.length<3||Ra.length>63||Ra!==Ra.toLowerCase()||isIpAddress(Ra))},ARN_DELIMITER=":",RESOURCE_DELIMITER="/",parseArn=Ra=>{const ed=Ra.split(ARN_DELIMITER);if(ed.length<6)return null;const[ud,dd,hd,md,gd,...yd]=ed;if(ud!=="arn"||dd===""||hd===""||yd.join(ARN_DELIMITER)==="")return null;const vd=yd.map(Cd=>Cd.split(RESOURCE_DELIMITER)).flat();return{partition:dd,service:hd,region:md,accountId:gd,resourceId:vd}},partitions=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"AWS ISOF global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}}],partitionsInfo={partitions};let selectedPartitionsInfo=partitionsInfo;const partition=Ra=>{const{partitions:ed}=selectedPartitionsInfo;for(const dd of ed){const{regions:hd,outputs:md}=dd;for(const[gd,yd]of Object.entries(hd))if(gd===Ra)return{...md,...yd}}for(const dd of ed){const{regionRegex:hd,outputs:md}=dd;if(new RegExp(hd).test(Ra))return{...md}}const ud=ed.find(dd=>dd.id==="aws");if(!ud)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...ud.outputs}},awsEndpointFunctions={isVirtualHostableS3Bucket,parseArn,partition};customEndpointFunctions.aws=awsEndpointFunctions;const ACCOUNT_ID_ENDPOINT_REGEX=/\d{12}\.ddb/;async function checkFeatures(Ra,ed,ud){var md,gd,yd,vd,Cd,wd,Nd;const dd=ud.request;if(((md=dd==null?void 0:dd.headers)==null?void 0:md["smithy-protocol"])==="rpc-v2-cbor"&&setFeature$1(Ra,"PROTOCOL_RPC_V2_CBOR","M"),typeof ed.retryStrategy=="function"){const Ld=await ed.retryStrategy();typeof Ld.acquireInitialRetryToken=="function"?(yd=(gd=Ld.constructor)==null?void 0:gd.name)!=null&&yd.includes("Adaptive")?setFeature$1(Ra,"RETRY_MODE_ADAPTIVE","F"):setFeature$1(Ra,"RETRY_MODE_STANDARD","E"):setFeature$1(Ra,"RETRY_MODE_LEGACY","D")}if(typeof ed.accountIdEndpointMode=="function"){const Ld=Ra.endpointV2;switch(String((vd=Ld==null?void 0:Ld.url)==null?void 0:vd.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)&&setFeature$1(Ra,"ACCOUNT_ID_ENDPOINT","O"),await((Cd=ed.accountIdEndpointMode)==null?void 0:Cd.call(ed))){case"disabled":setFeature$1(Ra,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":setFeature$1(Ra,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":setFeature$1(Ra,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const hd=(Nd=(wd=Ra.__smithy_context)==null?void 0:wd.selectedHttpAuthScheme)==null?void 0:Nd.identity;if(hd!=null&&hd.$source){const Ld=hd;Ld.accountId&&setFeature$1(Ra,"RESOLVED_ACCOUNT_ID","T");for(const[Ud,jd]of Object.entries(Ld.$source??{}))setFeature$1(Ra,Ud,jd)}}const USER_AGENT="user-agent",X_AMZ_USER_AGENT="x-amz-user-agent",SPACE=" ",UA_NAME_SEPARATOR="/",UA_NAME_ESCAPE_REGEX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,UA_VALUE_ESCAPE_REGEX=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,UA_ESCAPE_CHAR="-",BYTE_LIMIT=1024;function encodeFeatures(Ra){let ed="";for(const ud in Ra){const dd=Ra[ud];if(ed.length+dd.length+1<=BYTE_LIMIT){ed.length?ed+=","+dd:ed+=dd;continue}break}return ed}const userAgentMiddleware=Ra=>(ed,ud)=>async dd=>{var Ud,jd,Gd,Yd;const{request:hd}=dd;if(!HttpRequest.isInstance(hd))return ed(dd);const{headers:md}=hd,gd=((Ud=ud==null?void 0:ud.userAgent)==null?void 0:Ud.map(escapeUserAgent))||[],yd=(await Ra.defaultUserAgentProvider()).map(escapeUserAgent);await checkFeatures(ud,Ra,dd);const vd=ud;yd.push(`m/${encodeFeatures(Object.assign({},(jd=ud.__smithy_context)==null?void 0:jd.features,(Gd=vd.__aws_sdk_context)==null?void 0:Gd.features))}`);const Cd=((Yd=Ra==null?void 0:Ra.customUserAgent)==null?void 0:Yd.map(escapeUserAgent))||[],wd=await Ra.userAgentAppId();wd&&yd.push(escapeUserAgent([`app/${wd}`]));const Nd=[].concat([...yd,...gd,...Cd]).join(SPACE),Ld=[...yd.filter(zd=>zd.startsWith("aws-sdk-")),...Cd].join(SPACE);return Ra.runtime!=="browser"?(Ld&&(md[X_AMZ_USER_AGENT]=md[X_AMZ_USER_AGENT]?`${md[USER_AGENT]} ${Ld}`:Ld),md[USER_AGENT]=Nd):md[X_AMZ_USER_AGENT]=Nd,ed({...dd,request:hd})},escapeUserAgent=Ra=>{var gd;const ed=Ra[0].split(UA_NAME_SEPARATOR).map(yd=>yd.replace(UA_NAME_ESCAPE_REGEX,UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR),ud=(gd=Ra[1])==null?void 0:gd.replace(UA_VALUE_ESCAPE_REGEX,UA_ESCAPE_CHAR),dd=ed.indexOf(UA_NAME_SEPARATOR),hd=ed.substring(0,dd);let md=ed.substring(dd+1);return hd==="api"&&(md=md.toLowerCase()),[hd,md,ud].filter(yd=>yd&&yd.length>0).reduce((yd,vd,Cd)=>{switch(Cd){case 0:return vd;case 1:return`${yd}/${vd}`;default:return`${yd}#${vd}`}},"")},getUserAgentMiddlewareOptions={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},getUserAgentPlugin=Ra=>({applyToStack:ed=>{ed.add(userAgentMiddleware(Ra),getUserAgentMiddlewareOptions)}}),DEFAULT_USE_DUALSTACK_ENDPOINT=!1,DEFAULT_USE_FIPS_ENDPOINT=!1,isFipsRegion=Ra=>typeof Ra=="string"&&(Ra.startsWith("fips-")||Ra.endsWith("-fips")),getRealRegion=Ra=>isFipsRegion(Ra)?["fips-aws-global","aws-fips"].includes(Ra)?"us-east-1":Ra.replace(/fips-(dkr-|prod-)?|-fips/,""):Ra,resolveRegionConfig=Ra=>{const{region:ed,useFipsEndpoint:ud}=Ra;if(!ed)throw new Error("Region is missing");return{...Ra,region:async()=>{if(typeof ed=="string")return getRealRegion(ed);const dd=await ed();return getRealRegion(dd)},useFipsEndpoint:async()=>{const dd=typeof ed=="string"?ed:await ed();return isFipsRegion(dd)?!0:typeof ud!="function"?Promise.resolve(!!ud):ud()}}},resolveEventStreamSerdeConfig=Ra=>({...Ra,eventStreamMarshaller:Ra.eventStreamSerdeProvider(Ra)}),CONTENT_LENGTH_HEADER="content-length";function contentLengthMiddleware(Ra){return ed=>async ud=>{const dd=ud.request;if(HttpRequest.isInstance(dd)){const{body:hd,headers:md}=dd;if(hd&&Object.keys(md).map(gd=>gd.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER)===-1)try{const gd=Ra(hd);dd.headers={...dd.headers,[CONTENT_LENGTH_HEADER]:String(gd)}}catch{}}return ed({...ud,request:dd})}}const contentLengthMiddlewareOptions={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},getContentLengthPlugin=Ra=>({applyToStack:ed=>{ed.add(contentLengthMiddleware(Ra.bodyLengthChecker),contentLengthMiddlewareOptions)}}),resolveParamsForS3=async Ra=>{const ed=(Ra==null?void 0:Ra.Bucket)||"";if(typeof Ra.Bucket=="string"&&(Ra.Bucket=ed.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),isArnBucketName(ed)){if(Ra.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!isDnsCompatibleBucketName(ed)||ed.indexOf(".")!==-1&&!String(Ra.Endpoint).startsWith("http:")||ed.toLowerCase()!==ed||ed.length<3)&&(Ra.ForcePathStyle=!0);return Ra.DisableMultiRegionAccessPoints&&(Ra.disableMultiRegionAccessPoints=!0,Ra.DisableMRAP=!0),Ra},DOMAIN_PATTERN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,IP_ADDRESS_PATTERN=/(\d+\.){3}\d+/,DOTS_PATTERN=/\.\./,isDnsCompatibleBucketName=Ra=>DOMAIN_PATTERN.test(Ra)&&!IP_ADDRESS_PATTERN.test(Ra)&&!DOTS_PATTERN.test(Ra),isArnBucketName=Ra=>{const[ed,ud,dd,,,hd]=Ra.split(":"),md=ed==="arn"&&Ra.split(":").length>=6,gd=!!(md&&ud&&dd&&hd);if(md&&!gd)throw new Error(`Invalid ARN: ${Ra} was an invalid ARN.`);return gd},createConfigValueProvider=(Ra,ed,ud)=>{const dd=async()=>{const hd=ud[Ra]??ud[ed];return typeof hd=="function"?hd():hd};return Ra==="credentialScope"||ed==="CredentialScope"?async()=>{const hd=typeof ud.credentials=="function"?await ud.credentials():ud.credentials;return(hd==null?void 0:hd.credentialScope)??(hd==null?void 0:hd.CredentialScope)}:Ra==="accountId"||ed==="AccountId"?async()=>{const hd=typeof ud.credentials=="function"?await ud.credentials():ud.credentials;return(hd==null?void 0:hd.accountId)??(hd==null?void 0:hd.AccountId)}:Ra==="endpoint"||ed==="endpoint"?async()=>{const hd=await dd();if(hd&&typeof hd=="object"){if("url"in hd)return hd.url.href;if("hostname"in hd){const{protocol:md,hostname:gd,port:yd,path:vd}=hd;return`${md}//${gd}${yd?":"+yd:""}${vd}`}}return hd}:dd},getEndpointFromConfig=async Ra=>{};function parseQueryString(Ra){const ed={};if(Ra=Ra.replace(/^\?/,""),Ra)for(const ud of Ra.split("&")){let[dd,hd=null]=ud.split("=");dd=decodeURIComponent(dd),hd&&(hd=decodeURIComponent(hd)),dd in ed?Array.isArray(ed[dd])?ed[dd].push(hd):ed[dd]=[ed[dd],hd]:ed[dd]=hd}return ed}const parseUrl=Ra=>{if(typeof Ra=="string")return parseUrl(new URL(Ra));const{hostname:ed,pathname:ud,port:dd,protocol:hd,search:md}=Ra;let gd;return md&&(gd=parseQueryString(md)),{hostname:ed,port:dd?parseInt(dd):void 0,protocol:hd,path:ud,query:gd}},toEndpointV1=Ra=>typeof Ra=="object"?"url"in Ra?parseUrl(Ra.url):Ra:parseUrl(Ra),getEndpointFromInstructions=async(Ra,ed,ud,dd)=>{if(!ud.endpoint){let gd;ud.serviceConfiguredEndpoint?gd=await ud.serviceConfiguredEndpoint():gd=await getEndpointFromConfig(ud.serviceId),gd&&(ud.endpoint=()=>Promise.resolve(toEndpointV1(gd)))}const hd=await resolveParams(Ra,ed,ud);if(typeof ud.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");return ud.endpointProvider(hd,dd)},resolveParams=async(Ra,ed,ud)=>{var md;const dd={},hd=((md=ed==null?void 0:ed.getEndpointParameterInstructions)==null?void 0:md.call(ed))||{};for(const[gd,yd]of Object.entries(hd))switch(yd.type){case"staticContextParams":dd[gd]=yd.value;break;case"contextParams":dd[gd]=Ra[yd.name];break;case"clientContextParams":case"builtInParams":dd[gd]=await createConfigValueProvider(yd.name,gd,ud)();break;case"operationContextParams":dd[gd]=yd.get(Ra);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(yd))}return Object.keys(hd).length===0&&Object.assign(dd,ud),String(ud.serviceId).toLowerCase()==="s3"&&await resolveParamsForS3(dd),dd},endpointMiddleware=({config:Ra,instructions:ed})=>(ud,dd)=>async hd=>{var yd,vd,Cd;Ra.endpoint&&setFeature(dd,"ENDPOINT_OVERRIDE","N");const md=await getEndpointFromInstructions(hd.input,{getEndpointParameterInstructions(){return ed}},{...Ra},dd);dd.endpointV2=md,dd.authSchemes=(yd=md.properties)==null?void 0:yd.authSchemes;const gd=(vd=dd.authSchemes)==null?void 0:vd[0];if(gd){dd.signing_region=gd.signingRegion,dd.signing_service=gd.signingName;const wd=getSmithyContext(dd),Nd=(Cd=wd==null?void 0:wd.selectedHttpAuthScheme)==null?void 0:Cd.httpAuthOption;Nd&&(Nd.signingProperties=Object.assign(Nd.signingProperties||{},{signing_region:gd.signingRegion,signingRegion:gd.signingRegion,signing_service:gd.signingName,signingName:gd.signingName,signingRegionSet:gd.signingRegionSet},gd.properties))}return ud({...hd})},endpointMiddlewareOptions={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:serializerMiddlewareOption.name},getEndpointPlugin=(Ra,ed)=>({applyToStack:ud=>{ud.addRelativeTo(endpointMiddleware({config:Ra,instructions:ed}),endpointMiddlewareOptions)}}),resolveEndpointConfig=Ra=>{const ed=Ra.tls??!0,{endpoint:ud}=Ra,dd=ud!=null?async()=>toEndpointV1(await normalizeProvider$1(ud)()):void 0,md={...Ra,endpoint:dd,tls:ed,isCustomEndpoint:!!ud,useDualstackEndpoint:normalizeProvider$1(Ra.useDualstackEndpoint??!1),useFipsEndpoint:normalizeProvider$1(Ra.useFipsEndpoint??!1)};let gd;return md.serviceConfiguredEndpoint=async()=>(Ra.serviceId&&!gd&&(gd=getEndpointFromConfig(Ra.serviceId)),gd),md};var RETRY_MODES;(function(Ra){Ra.STANDARD="standard",Ra.ADAPTIVE="adaptive"})(RETRY_MODES||(RETRY_MODES={}));const DEFAULT_MAX_ATTEMPTS=3,DEFAULT_RETRY_MODE=RETRY_MODES.STANDARD,THROTTLING_ERROR_CODES=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],TRANSIENT_ERROR_CODES=["TimeoutError","RequestTimeout","RequestTimeoutException"],TRANSIENT_ERROR_STATUS_CODES=[500,502,503,504],NODEJS_TIMEOUT_ERROR_CODES=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],isClockSkewCorrectedError=Ra=>{var ed;return(ed=Ra.$metadata)==null?void 0:ed.clockSkewCorrected},isThrottlingError=Ra=>{var ed,ud;return((ed=Ra.$metadata)==null?void 0:ed.httpStatusCode)===429||THROTTLING_ERROR_CODES.includes(Ra.name)||((ud=Ra.$retryable)==null?void 0:ud.throttling)==!0},isTransientError=(Ra,ed=0)=>{var ud;return isClockSkewCorrectedError(Ra)||TRANSIENT_ERROR_CODES.includes(Ra.name)||NODEJS_TIMEOUT_ERROR_CODES.includes((Ra==null?void 0:Ra.code)||"")||TRANSIENT_ERROR_STATUS_CODES.includes(((ud=Ra.$metadata)==null?void 0:ud.httpStatusCode)||0)||Ra.cause!==void 0&&ed<=10&&isTransientError(Ra.cause,ed+1)},isServerError=Ra=>{var ed;if(((ed=Ra.$metadata)==null?void 0:ed.httpStatusCode)!==void 0){const ud=Ra.$metadata.httpStatusCode;return 500<=ud&&ud<=599&&!isTransientError(Ra)}return!1};class DefaultRateLimiter{constructor(ed){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(ed==null?void 0:ed.beta)??.7,this.minCapacity=(ed==null?void 0:ed.minCapacity)??1,this.minFillRate=(ed==null?void 0:ed.minFillRate)??.5,this.scaleConstant=(ed==null?void 0:ed.scaleConstant)??.4,this.smooth=(ed==null?void 0:ed.smooth)??.8;const ud=this.getCurrentTimeInSeconds();this.lastThrottleTime=ud,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(ed){if(this.enabled){if(this.refillTokenBucket(),ed>this.currentCapacity){const ud=(ed-this.currentCapacity)/this.fillRate*1e3;await new Promise(dd=>DefaultRateLimiter.setTimeoutFn(dd,ud))}this.currentCapacity=this.currentCapacity-ed}}refillTokenBucket(){const ed=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=ed;return}const ud=(ed-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+ud),this.lastTimestamp=ed}updateClientSendingRate(ed){let ud;if(this.updateMeasuredRate(),isThrottlingError(ed)){const hd=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=hd,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),ud=this.cubicThrottle(hd),this.enableTokenBucket()}else this.calculateTimeWindow(),ud=this.cubicSuccess(this.getCurrentTimeInSeconds());const dd=Math.min(ud,2*this.measuredTxRate);this.updateTokenBucketRate(dd)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(ed){return this.getPrecise(ed*this.beta)}cubicSuccess(ed){return this.getPrecise(this.scaleConstant*Math.pow(ed-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(ed){this.refillTokenBucket(),this.fillRate=Math.max(ed,this.minFillRate),this.maxCapacity=Math.max(ed,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const ed=this.getCurrentTimeInSeconds(),ud=Math.floor(ed*2)/2;if(this.requestCount++,ud>this.lastTxRateBucket){const dd=this.requestCount/(ud-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(dd*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=ud}}getPrecise(ed){return parseFloat(ed.toFixed(8))}}DefaultRateLimiter.setTimeoutFn=setTimeout;const DEFAULT_RETRY_DELAY_BASE=100,MAXIMUM_RETRY_DELAY=20*1e3,THROTTLING_RETRY_DELAY_BASE=500,INITIAL_RETRY_TOKENS=500,RETRY_COST=5,TIMEOUT_RETRY_COST=10,NO_RETRY_INCREMENT=1,INVOCATION_ID_HEADER="amz-sdk-invocation-id",REQUEST_HEADER="amz-sdk-request",getDefaultRetryBackoffStrategy=()=>{let Ra=DEFAULT_RETRY_DELAY_BASE;return{computeNextBackoffDelay:dd=>Math.floor(Math.min(MAXIMUM_RETRY_DELAY,Math.random()*2**dd*Ra)),setDelayBase:dd=>{Ra=dd}}},createDefaultRetryToken=({retryDelay:Ra,retryCount:ed,retryCost:ud})=>({getRetryCount:()=>ed,getRetryDelay:()=>Math.min(MAXIMUM_RETRY_DELAY,Ra),getRetryCost:()=>ud});class StandardRetryStrategy{constructor(ed){this.maxAttempts=ed,this.mode=RETRY_MODES.STANDARD,this.capacity=INITIAL_RETRY_TOKENS,this.retryBackoffStrategy=getDefaultRetryBackoffStrategy(),this.maxAttemptsProvider=typeof ed=="function"?ed:async()=>ed}async acquireInitialRetryToken(ed){return createDefaultRetryToken({retryDelay:DEFAULT_RETRY_DELAY_BASE,retryCount:0})}async refreshRetryTokenForRetry(ed,ud){const dd=await this.getMaxAttempts();if(this.shouldRetry(ed,ud,dd)){const hd=ud.errorType;this.retryBackoffStrategy.setDelayBase(hd==="THROTTLING"?THROTTLING_RETRY_DELAY_BASE:DEFAULT_RETRY_DELAY_BASE);const md=this.retryBackoffStrategy.computeNextBackoffDelay(ed.getRetryCount()),gd=ud.retryAfterHint?Math.max(ud.retryAfterHint.getTime()-Date.now()||0,md):md,yd=this.getCapacityCost(hd);return this.capacity-=yd,createDefaultRetryToken({retryDelay:gd,retryCount:ed.getRetryCount()+1,retryCost:yd})}throw new Error("No retry token available")}recordSuccess(ed){this.capacity=Math.max(INITIAL_RETRY_TOKENS,this.capacity+(ed.getRetryCost()??NO_RETRY_INCREMENT))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`),DEFAULT_MAX_ATTEMPTS}}shouldRetry(ed,ud,dd){return ed.getRetryCount()+1=this.getCapacityCost(ud.errorType)&&this.isRetryableError(ud.errorType)}getCapacityCost(ed){return ed==="TRANSIENT"?TIMEOUT_RETRY_COST:RETRY_COST}isRetryableError(ed){return ed==="THROTTLING"||ed==="TRANSIENT"}}class AdaptiveRetryStrategy{constructor(ed,ud){this.maxAttemptsProvider=ed,this.mode=RETRY_MODES.ADAPTIVE;const{rateLimiter:dd}=ud??{};this.rateLimiter=dd??new DefaultRateLimiter,this.standardRetryStrategy=new StandardRetryStrategy(ed)}async acquireInitialRetryToken(ed){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(ed)}async refreshRetryTokenForRetry(ed,ud){return this.rateLimiter.updateClientSendingRate(ud),this.standardRetryStrategy.refreshRetryTokenForRetry(ed,ud)}recordSuccess(ed){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(ed)}}let getRandomValues$1;const rnds8$1=new Uint8Array(16);function rng$1(){if(!getRandomValues$1&&(getRandomValues$1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!getRandomValues$1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return getRandomValues$1(rnds8$1)}const byteToHex$1=[];for(let Ra=0;Ra<256;++Ra)byteToHex$1.push((Ra+256).toString(16).slice(1));function unsafeStringify$1(Ra,ed=0){return byteToHex$1[Ra[ed+0]]+byteToHex$1[Ra[ed+1]]+byteToHex$1[Ra[ed+2]]+byteToHex$1[Ra[ed+3]]+"-"+byteToHex$1[Ra[ed+4]]+byteToHex$1[Ra[ed+5]]+"-"+byteToHex$1[Ra[ed+6]]+byteToHex$1[Ra[ed+7]]+"-"+byteToHex$1[Ra[ed+8]]+byteToHex$1[Ra[ed+9]]+"-"+byteToHex$1[Ra[ed+10]]+byteToHex$1[Ra[ed+11]]+byteToHex$1[Ra[ed+12]]+byteToHex$1[Ra[ed+13]]+byteToHex$1[Ra[ed+14]]+byteToHex$1[Ra[ed+15]]}const randomUUID$1=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native$1={randomUUID:randomUUID$1};function v4$1(Ra,ed,ud){if(native$1.randomUUID&&!Ra)return native$1.randomUUID();Ra=Ra||{};const dd=Ra.random||(Ra.rng||rng$1)();return dd[6]=dd[6]&15|64,dd[8]=dd[8]&63|128,unsafeStringify$1(dd)}const asSdkError=Ra=>Ra instanceof Error?Ra:Ra instanceof Object?Object.assign(new Error,Ra):typeof Ra=="string"?new Error(Ra):new Error(`AWS SDK error wrapper for ${Ra}`),resolveRetryConfig=Ra=>{const{retryStrategy:ed}=Ra,ud=normalizeProvider$1(Ra.maxAttempts??DEFAULT_MAX_ATTEMPTS);return{...Ra,maxAttempts:ud,retryStrategy:async()=>ed||(await normalizeProvider$1(Ra.retryMode)()===RETRY_MODES.ADAPTIVE?new AdaptiveRetryStrategy(ud):new StandardRetryStrategy(ud))}},isStreamingPayload=Ra=>(Ra==null?void 0:Ra.body)instanceof ReadableStream,retryMiddleware=Ra=>(ed,ud)=>async dd=>{var gd;let hd=await Ra.retryStrategy();const md=await Ra.maxAttempts();if(isRetryStrategyV2(hd)){hd=hd;let yd=await hd.acquireInitialRetryToken(ud.partition_id),vd=new Error,Cd=0,wd=0;const{request:Nd}=dd,Ld=HttpRequest.isInstance(Nd);for(Ld&&(Nd.headers[INVOCATION_ID_HEADER]=v4$1());;)try{Ld&&(Nd.headers[REQUEST_HEADER]=`attempt=${Cd+1}; max=${md}`);const{response:Ud,output:jd}=await ed(dd);return hd.recordSuccess(yd),jd.$metadata.attempts=Cd+1,jd.$metadata.totalRetryDelay=wd,{response:Ud,output:jd}}catch(Ud){const jd=getRetryErrorInfo(Ud);if(vd=asSdkError(Ud),Ld&&isStreamingPayload(Nd))throw(gd=ud.logger instanceof NoOpLogger?console:ud.logger)==null||gd.warn("An error was encountered in a non-retryable streaming request."),vd;try{yd=await hd.refreshRetryTokenForRetry(yd,jd)}catch{throw vd.$metadata||(vd.$metadata={}),vd.$metadata.attempts=Cd+1,vd.$metadata.totalRetryDelay=wd,vd}Cd=yd.getRetryCount();const Gd=yd.getRetryDelay();wd+=Gd,await new Promise(Yd=>setTimeout(Yd,Gd))}}else return hd=hd,hd!=null&&hd.mode&&(ud.userAgent=[...ud.userAgent||[],["cfg/retry-mode",hd.mode]]),hd.retry(ed,dd)},isRetryStrategyV2=Ra=>typeof Ra.acquireInitialRetryToken<"u"&&typeof Ra.refreshRetryTokenForRetry<"u"&&typeof Ra.recordSuccess<"u",getRetryErrorInfo=Ra=>{const ed={error:Ra,errorType:getRetryErrorType(Ra)},ud=getRetryAfterHint(Ra.$response);return ud&&(ed.retryAfterHint=ud),ed},getRetryErrorType=Ra=>isThrottlingError(Ra)?"THROTTLING":isTransientError(Ra)?"TRANSIENT":isServerError(Ra)?"SERVER_ERROR":"CLIENT_ERROR",retryMiddlewareOptions={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},getRetryPlugin=Ra=>({applyToStack:ed=>{ed.add(retryMiddleware(Ra),retryMiddlewareOptions)}}),getRetryAfterHint=Ra=>{if(!HttpResponse.isInstance(Ra))return;const ed=Object.keys(Ra.headers).find(md=>md.toLowerCase()==="retry-after");if(!ed)return;const ud=Ra.headers[ed],dd=Number(ud);return Number.isNaN(dd)?new Date(ud):new Date(dd*1e3)},signatureV4CrtContainer={CrtSignerV4:null};class SignatureV4MultiRegion{constructor(ed){Ig(this,"sigv4aSigner");Ig(this,"sigv4Signer");Ig(this,"signerOptions");this.sigv4Signer=new SignatureV4S3Express(ed),this.signerOptions=ed}async sign(ed,ud={}){if(ud.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(ed,ud)}return this.sigv4Signer.sign(ed,ud)}async signWithCredentials(ed,ud,dd={}){if(dd.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(ed,ud,dd)}return this.sigv4Signer.signWithCredentials(ed,ud,dd)}async presign(ed,ud={}){if(ud.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(ed,ud)}return this.sigv4Signer.presign(ed,ud)}async presignWithCredentials(ed,ud,dd={}){if(dd.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(ed,ud,dd)}getSigv4aSigner(){if(!this.sigv4aSigner){let ed=null;try{if(ed=signatureV4CrtContainer.CrtSignerV4,typeof ed!="function")throw new Error}catch(ud){throw ud.message=`${ud.message} Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. -For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,rd}this.sigv4aSigner=new qa({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}const ci="required",cj="type",ck="conditions",cl="fn",cm="argv",cn="ref",co="assign",cp="url",cq="properties",cr="backend",cs="authSchemes",ct="disableDoubleEncoding",cu="signingName",cv="signingRegion",cw="headers",cx="signingRegionSet",a=6,b=!1,c=!0,d="isSet",e="booleanEquals",f="error",g="aws.partition",h="stringEquals",i="getAttr",j="name",k="substring",l="bucketSuffix",m="parseURL",n="{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",o="endpoint",p="tree",q="aws.isVirtualHostableS3Bucket",r="{url#scheme}://{Bucket}.{url#authority}{url#path}",s="not",t="{url#scheme}://{url#authority}{url#path}",u="hardwareType",v="regionPrefix",w="bucketAliasSuffix",x="outpostId",y="isValidHostLabel",z="sigv4a",A="s3-outposts",B="s3",C="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",D="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",E="https://{Bucket}.s3.{partitionResult#dnsSuffix}",F="aws.parseArn",G="bucketArn",H="arnType",I="",J="s3-object-lambda",K="accesspoint",L="accessPointName",M="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",N="mrapPartition",O="outpostType",P="arnPrefix",Q="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",R="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",S="https://s3.{partitionResult#dnsSuffix}",T={[ci]:!1,[cj]:"String"},U={[ci]:!0,default:!1,[cj]:"Boolean"},V={[ci]:!1,[cj]:"Boolean"},W={[cl]:e,[cm]:[{[cn]:"Accelerate"},!0]},X={[cl]:e,[cm]:[{[cn]:"UseFIPS"},!0]},Y={[cl]:e,[cm]:[{[cn]:"UseDualStack"},!0]},Z={[cl]:d,[cm]:[{[cn]:"Endpoint"}]},aa={[cl]:g,[cm]:[{[cn]:"Region"}],[co]:"partitionResult"},ab={[cl]:h,[cm]:[{[cl]:i,[cm]:[{[cn]:"partitionResult"},j]},"aws-cn"]},ac={[cl]:d,[cm]:[{[cn]:"Bucket"}]},ad={[cn]:"Bucket"},ae={[cl]:m,[cm]:[{[cn]:"Endpoint"}],[co]:"url"},af={[cl]:e,[cm]:[{[cl]:i,[cm]:[{[cn]:"url"},"isIp"]},!0]},ag={[cn]:"url"},ah={[cl]:"uriEncode",[cm]:[ad],[co]:"uri_encoded_bucket"},ai={[cr]:"S3Express",[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:"s3express",[cv]:"{Region}"}]},aj={},ak={[cl]:q,[cm]:[ad,!1]},al={[f]:"S3Express bucket name is not a valid virtual hostable name.",[cj]:f},am={[cr]:"S3Express",[cs]:[{[ct]:!0,[j]:"sigv4-s3express",[cu]:"s3express",[cv]:"{Region}"}]},an={[cl]:d,[cm]:[{[cn]:"UseS3ExpressControlEndpoint"}]},ao={[cl]:e,[cm]:[{[cn]:"UseS3ExpressControlEndpoint"},!0]},ap={[cl]:s,[cm]:[Z]},aq={[f]:"Unrecognized S3Express bucket name format.",[cj]:f},ar={[cl]:s,[cm]:[ac]},as={[cn]:u},at={[ck]:[ap],[f]:"Expected a endpoint to be specified but no endpoint was found",[cj]:f},au={[cs]:[{[ct]:!0,[j]:z,[cu]:A,[cx]:["*"]},{[ct]:!0,[j]:"sigv4",[cu]:A,[cv]:"{Region}"}]},av={[cl]:e,[cm]:[{[cn]:"ForcePathStyle"},!1]},aw={[cn]:"ForcePathStyle"},ax={[cl]:e,[cm]:[{[cn]:"Accelerate"},!1]},ay={[cl]:h,[cm]:[{[cn]:"Region"},"aws-global"]},az={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"us-east-1"}]},aA={[cl]:s,[cm]:[ay]},aB={[cl]:e,[cm]:[{[cn]:"UseGlobalEndpoint"},!0]},aC={[cp]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:{[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"{Region}"}]},[cw]:{}},aD={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"{Region}"}]},aE={[cl]:e,[cm]:[{[cn]:"UseGlobalEndpoint"},!1]},aF={[cl]:e,[cm]:[{[cn]:"UseDualStack"},!1]},aG={[cp]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aH={[cl]:e,[cm]:[{[cn]:"UseFIPS"},!1]},aI={[cp]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aJ={[cp]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aK={[cl]:e,[cm]:[{[cl]:i,[cm]:[ag,"isIp"]},!1]},aL={[cp]:C,[cq]:aD,[cw]:{}},aM={[cp]:r,[cq]:aD,[cw]:{}},aN={[o]:aM,[cj]:o},aO={[cp]:D,[cq]:aD,[cw]:{}},aP={[cp]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aQ={[f]:"Invalid region: region was not a valid DNS name.",[cj]:f},aR={[cn]:G},aS={[cn]:H},aT={[cl]:i,[cm]:[aR,"service"]},aU={[cn]:L},aV={[ck]:[Y],[f]:"S3 Object Lambda does not support Dual-stack",[cj]:f},aW={[ck]:[W],[f]:"S3 Object Lambda does not support S3 Accelerate",[cj]:f},aX={[ck]:[{[cl]:d,[cm]:[{[cn]:"DisableAccessPoints"}]},{[cl]:e,[cm]:[{[cn]:"DisableAccessPoints"},!0]}],[f]:"Access points are not supported for this operation",[cj]:f},aY={[ck]:[{[cl]:d,[cm]:[{[cn]:"UseArnRegion"}]},{[cl]:e,[cm]:[{[cn]:"UseArnRegion"},!1]},{[cl]:s,[cm]:[{[cl]:h,[cm]:[{[cl]:i,[cm]:[aR,"region"]},"{Region}"]}]}],[f]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[cj]:f},aZ={[cl]:i,[cm]:[{[cn]:"bucketPartition"},j]},ba={[cl]:i,[cm]:[aR,"accountId"]},bb={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:J,[cv]:"{bucketArn#region}"}]},bc={[f]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[cj]:f},bd={[f]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[cj]:f},be={[f]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[cj]:f},bf={[f]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[cj]:f},bg={[f]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[cj]:f},bh={[f]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[cj]:f},bi={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"{bucketArn#region}"}]},bj={[cs]:[{[ct]:!0,[j]:z,[cu]:A,[cx]:["*"]},{[ct]:!0,[j]:"sigv4",[cu]:A,[cv]:"{bucketArn#region}"}]},bk={[cl]:F,[cm]:[ad]},bl={[cp]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bm={[cp]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bn={[cp]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bo={[cp]:Q,[cq]:aD,[cw]:{}},bp={[cp]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bq={[cn]:"UseObjectLambdaEndpoint"},br={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:J,[cv]:"{Region}"}]},bs={[cp]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bt={[cp]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bu={[cp]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bv={[cp]:t,[cq]:aD,[cw]:{}},bw={[cp]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bx=[{[cn]:"Region"}],by=[{[cn]:"Endpoint"}],bz=[ad],bA=[Y],bB=[W],bC=[Z,ae],bD=[{[cl]:d,[cm]:[{[cn]:"DisableS3ExpressSessionAuth"}]},{[cl]:e,[cm]:[{[cn]:"DisableS3ExpressSessionAuth"},!0]}],bE=[af],bF=[ah],bG=[ak],bH=[X],bI=[{[cl]:k,[cm]:[ad,6,14,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,14,16,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bJ=[{[ck]:[X],[o]:{[cp]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:ai,[cw]:{}},[cj]:o},{[o]:{[cp]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:ai,[cw]:{}},[cj]:o}],bK=[{[cl]:k,[cm]:[ad,6,15,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,15,17,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bL=[{[cl]:k,[cm]:[ad,6,19,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,19,21,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bM=[{[cl]:k,[cm]:[ad,6,20,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,20,22,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bN=[{[cl]:k,[cm]:[ad,6,26,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,26,28,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bO=[{[ck]:[X],[o]:{[cp]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:am,[cw]:{}},[cj]:o},{[o]:{[cp]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:am,[cw]:{}},[cj]:o}],bP=[ac],bQ=[{[cl]:y,[cm]:[{[cn]:x},!1]}],bR=[{[cl]:h,[cm]:[{[cn]:v},"beta"]}],bS=["*"],bT=[aa],bU=[{[cl]:y,[cm]:[{[cn]:"Region"},!1]}],bV=[{[cl]:h,[cm]:[{[cn]:"Region"},"us-east-1"]}],bW=[{[cl]:h,[cm]:[aS,K]}],bX=[{[cl]:i,[cm]:[aR,"resourceId[1]"],[co]:L},{[cl]:s,[cm]:[{[cl]:h,[cm]:[aU,I]}]}],bY=[aR,"resourceId[1]"],bZ=[{[cl]:s,[cm]:[{[cl]:h,[cm]:[{[cl]:i,[cm]:[aR,"region"]},I]}]}],ca=[{[cl]:s,[cm]:[{[cl]:d,[cm]:[{[cl]:i,[cm]:[aR,"resourceId[2]"]}]}]}],cb=[aR,"resourceId[2]"],cc=[{[cl]:g,[cm]:[{[cl]:i,[cm]:[aR,"region"]}],[co]:"bucketPartition"}],cd=[{[cl]:h,[cm]:[aZ,{[cl]:i,[cm]:[{[cn]:"partitionResult"},j]}]}],ce=[{[cl]:y,[cm]:[{[cl]:i,[cm]:[aR,"region"]},!0]}],cf=[{[cl]:y,[cm]:[ba,!1]}],cg=[{[cl]:y,[cm]:[aU,!1]}],ch=[{[cl]:y,[cm]:[{[cn]:"Region"},!0]}],_data={version:"1.0",parameters:{Bucket:T,Region:T,UseFIPS:U,UseDualStack:U,Endpoint:T,ForcePathStyle:U,Accelerate:U,UseGlobalEndpoint:U,UseObjectLambdaEndpoint:V,Key:T,Prefix:T,CopySource:T,DisableAccessPoints:V,DisableMultiRegionAccessPoints:U,UseArnRegion:V,UseS3ExpressControlEndpoint:V,DisableS3ExpressSessionAuth:V},rules:[{[ck]:[{[cl]:d,[cm]:bx}],rules:[{[ck]:[W,X],error:"Accelerate cannot be used with FIPS",[cj]:f},{[ck]:[Y,Z],error:"Cannot set dual-stack in combination with a custom endpoint.",[cj]:f},{[ck]:[Z,X],error:"A custom endpoint cannot be combined with FIPS",[cj]:f},{[ck]:[Z,W],error:"A custom endpoint cannot be combined with S3 Accelerate",[cj]:f},{[ck]:[X,aa,ab],error:"Partition does not support FIPS",[cj]:f},{[ck]:[ac,{[cl]:k,[cm]:[ad,0,a,c],[co]:l},{[cl]:h,[cm]:[{[cn]:l},"--x-s3"]}],rules:[{[ck]:bA,error:"S3Express does not support Dual-stack.",[cj]:f},{[ck]:bB,error:"S3Express does not support S3 Accelerate.",[cj]:f},{[ck]:bC,rules:[{[ck]:bD,rules:[{[ck]:bE,rules:[{[ck]:bF,rules:[{endpoint:{[cp]:n,[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p}],[cj]:p},{[ck]:bG,rules:[{endpoint:{[cp]:r,[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p},al],[cj]:p},{[ck]:bE,rules:[{[ck]:bF,rules:[{endpoint:{[cp]:n,[cq]:am,[cw]:aj},[cj]:o}],[cj]:p}],[cj]:p},{[ck]:bG,rules:[{endpoint:{[cp]:r,[cq]:am,[cw]:aj},[cj]:o}],[cj]:p},al],[cj]:p},{[ck]:[an,ao],rules:[{[ck]:[ah,ap],rules:[{[ck]:bH,endpoint:{[cp]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",[cq]:ai,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p}],[cj]:p},{[ck]:bG,rules:[{[ck]:bD,rules:[{[ck]:bI,rules:bJ,[cj]:p},{[ck]:bK,rules:bJ,[cj]:p},{[ck]:bL,rules:bJ,[cj]:p},{[ck]:bM,rules:bJ,[cj]:p},{[ck]:bN,rules:bJ,[cj]:p},aq],[cj]:p},{[ck]:bI,rules:bO,[cj]:p},{[ck]:bK,rules:bO,[cj]:p},{[ck]:bL,rules:bO,[cj]:p},{[ck]:bM,rules:bO,[cj]:p},{[ck]:bN,rules:bO,[cj]:p},aq],[cj]:p},al],[cj]:p},{[ck]:[ar,an,ao],rules:[{[ck]:bC,endpoint:{[cp]:t,[cq]:ai,[cw]:aj},[cj]:o},{[ck]:bH,endpoint:{[cp]:"https://s3express-control-fips.{Region}.amazonaws.com",[cq]:ai,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://s3express-control.{Region}.amazonaws.com",[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p},{[ck]:[ac,{[cl]:k,[cm]:[ad,49,50,c],[co]:u},{[cl]:k,[cm]:[ad,8,12,c],[co]:v},{[cl]:k,[cm]:[ad,0,7,c],[co]:w},{[cl]:k,[cm]:[ad,32,49,c],[co]:x},{[cl]:g,[cm]:bx,[co]:"regionPartition"},{[cl]:h,[cm]:[{[cn]:w},"--op-s3"]}],rules:[{[ck]:bQ,rules:[{[ck]:[{[cl]:h,[cm]:[as,"e"]}],rules:[{[ck]:bR,rules:[at,{[ck]:bC,endpoint:{[cp]:"https://{Bucket}.ec2.{url#authority}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{endpoint:{[cp]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{[ck]:[{[cl]:h,[cm]:[as,"o"]}],rules:[{[ck]:bR,rules:[at,{[ck]:bC,endpoint:{[cp]:"https://{Bucket}.op-{outpostId}.{url#authority}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{endpoint:{[cp]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[cj]:f}],[cj]:p},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[cj]:f}],[cj]:p},{[ck]:bP,rules:[{[ck]:[Z,{[cl]:s,[cm]:[{[cl]:d,[cm]:[{[cl]:m,[cm]:by}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[cj]:f},{[ck]:[av,ak],rules:[{[ck]:bT,rules:[{[ck]:bU,rules:[{[ck]:[W,ab],error:"S3 Accelerate cannot be used in this region",[cj]:f},{[ck]:[Y,X,ax,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,X,ax,ap,aA,aB],rules:[{endpoint:aC,[cj]:o}],[cj]:p},{[ck]:[Y,X,ax,ap,aA,aE],endpoint:aC,[cj]:o},{[ck]:[aF,X,ax,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,X,ax,ap,aA,aB],rules:[{endpoint:aG,[cj]:o}],[cj]:p},{[ck]:[aF,X,ax,ap,aA,aE],endpoint:aG,[cj]:o},{[ck]:[Y,aH,W,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,aH,W,ap,aA,aB],rules:[{endpoint:aI,[cj]:o}],[cj]:p},{[ck]:[Y,aH,W,ap,aA,aE],endpoint:aI,[cj]:o},{[ck]:[Y,aH,ax,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,aH,ax,ap,aA,aB],rules:[{endpoint:aJ,[cj]:o}],[cj]:p},{[ck]:[Y,aH,ax,ap,aA,aE],endpoint:aJ,[cj]:o},{[ck]:[aF,aH,ax,Z,ae,af,ay],endpoint:{[cp]:C,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,ax,Z,ae,aK,ay],endpoint:{[cp]:r,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,ax,Z,ae,af,aA,aB],rules:[{[ck]:bV,endpoint:aL,[cj]:o},{endpoint:aL,[cj]:o}],[cj]:p},{[ck]:[aF,aH,ax,Z,ae,aK,aA,aB],rules:[{[ck]:bV,endpoint:aM,[cj]:o},aN],[cj]:p},{[ck]:[aF,aH,ax,Z,ae,af,aA,aE],endpoint:aL,[cj]:o},{[ck]:[aF,aH,ax,Z,ae,aK,aA,aE],endpoint:aM,[cj]:o},{[ck]:[aF,aH,W,ap,ay],endpoint:{[cp]:D,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,W,ap,aA,aB],rules:[{[ck]:bV,endpoint:aO,[cj]:o},{endpoint:aO,[cj]:o}],[cj]:p},{[ck]:[aF,aH,W,ap,aA,aE],endpoint:aO,[cj]:o},{[ck]:[aF,aH,ax,ap,ay],endpoint:{[cp]:E,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,ax,ap,aA,aB],rules:[{[ck]:bV,endpoint:{[cp]:E,[cq]:aD,[cw]:aj},[cj]:o},{endpoint:aP,[cj]:o}],[cj]:p},{[ck]:[aF,aH,ax,ap,aA,aE],endpoint:aP,[cj]:o}],[cj]:p},aQ],[cj]:p}],[cj]:p},{[ck]:[Z,ae,{[cl]:h,[cm]:[{[cl]:i,[cm]:[ag,"scheme"]},"http"]},{[cl]:q,[cm]:[ad,c]},av,aH,aF,ax],rules:[{[ck]:bT,rules:[{[ck]:bU,rules:[aN],[cj]:p},aQ],[cj]:p}],[cj]:p},{[ck]:[av,{[cl]:F,[cm]:bz,[co]:G}],rules:[{[ck]:[{[cl]:i,[cm]:[aR,"resourceId[0]"],[co]:H},{[cl]:s,[cm]:[{[cl]:h,[cm]:[aS,I]}]}],rules:[{[ck]:[{[cl]:h,[cm]:[aT,J]}],rules:[{[ck]:bW,rules:[{[ck]:bX,rules:[aV,aW,{[ck]:bZ,rules:[aX,{[ck]:ca,rules:[aY,{[ck]:cc,rules:[{[ck]:bT,rules:[{[ck]:cd,rules:[{[ck]:ce,rules:[{[ck]:[{[cl]:h,[cm]:[ba,I]}],error:"Invalid ARN: Missing account id",[cj]:f},{[ck]:cf,rules:[{[ck]:cg,rules:[{[ck]:bC,endpoint:{[cp]:M,[cq]:bb,[cw]:aj},[cj]:o},{[ck]:bH,endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bb,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bb,[cw]:aj},[cj]:o}],[cj]:p},bc],[cj]:p},bd],[cj]:p},be],[cj]:p},bf],[cj]:p}],[cj]:p}],[cj]:p},bg],[cj]:p},{error:"Invalid ARN: bucket ARN is missing a region",[cj]:f}],[cj]:p},bh],[cj]:p},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[cj]:f}],[cj]:p},{[ck]:bW,rules:[{[ck]:bX,rules:[{[ck]:bZ,rules:[{[ck]:bW,rules:[{[ck]:bZ,rules:[aX,{[ck]:ca,rules:[aY,{[ck]:cc,rules:[{[ck]:bT,rules:[{[ck]:[{[cl]:h,[cm]:[aZ,"{partitionResult#name}"]}],rules:[{[ck]:ce,rules:[{[ck]:[{[cl]:h,[cm]:[aT,B]}],rules:[{[ck]:cf,rules:[{[ck]:cg,rules:[{[ck]:bB,error:"Access Points do not support S3 Accelerate",[cj]:f},{[ck]:[X,Y],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[X,aF],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[aH,Y],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[aH,aF,Z,ae],endpoint:{[cp]:M,[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[aH,aF],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o}],[cj]:p},bc],[cj]:p},bd],[cj]:p},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[cj]:f}],[cj]:p},be],[cj]:p},bf],[cj]:p}],[cj]:p}],[cj]:p},bg],[cj]:p}],[cj]:p}],[cj]:p},{[ck]:[{[cl]:y,[cm]:[aU,c]}],rules:[{[ck]:bA,error:"S3 MRAP does not support dual-stack",[cj]:f},{[ck]:bH,error:"S3 MRAP does not support FIPS",[cj]:f},{[ck]:bB,error:"S3 MRAP does not support S3 Accelerate",[cj]:f},{[ck]:[{[cl]:e,[cm]:[{[cn]:"DisableMultiRegionAccessPoints"},c]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[cj]:f},{[ck]:[{[cl]:g,[cm]:bx,[co]:N}],rules:[{[ck]:[{[cl]:h,[cm]:[{[cl]:i,[cm]:[{[cn]:N},j]},{[cl]:i,[cm]:[aR,"partition"]}]}],rules:[{endpoint:{[cp]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[cq]:{[cs]:[{[ct]:c,name:z,[cu]:B,[cx]:bS}]},[cw]:aj},[cj]:o}],[cj]:p},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[cj]:f}],[cj]:p}],[cj]:p},{error:"Invalid Access Point Name",[cj]:f}],[cj]:p},bh],[cj]:p},{[ck]:[{[cl]:h,[cm]:[aT,A]}],rules:[{[ck]:bA,error:"S3 Outposts does not support Dual-stack",[cj]:f},{[ck]:bH,error:"S3 Outposts does not support FIPS",[cj]:f},{[ck]:bB,error:"S3 Outposts does not support S3 Accelerate",[cj]:f},{[ck]:[{[cl]:d,[cm]:[{[cl]:i,[cm]:[aR,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[cj]:f},{[ck]:[{[cl]:i,[cm]:bY,[co]:x}],rules:[{[ck]:bQ,rules:[aY,{[ck]:cc,rules:[{[ck]:bT,rules:[{[ck]:cd,rules:[{[ck]:ce,rules:[{[ck]:cf,rules:[{[ck]:[{[cl]:i,[cm]:cb,[co]:O}],rules:[{[ck]:[{[cl]:i,[cm]:[aR,"resourceId[3]"],[co]:L}],rules:[{[ck]:[{[cl]:h,[cm]:[{[cn]:O},K]}],rules:[{[ck]:bC,endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[cq]:bj,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bj,[cw]:aj},[cj]:o}],[cj]:p},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[cj]:f}],[cj]:p},{error:"Invalid ARN: expected an access point name",[cj]:f}],[cj]:p},{error:"Invalid ARN: Expected a 4-component resource",[cj]:f}],[cj]:p},bd],[cj]:p},be],[cj]:p},bf],[cj]:p}],[cj]:p}],[cj]:p},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[cj]:f}],[cj]:p},{error:"Invalid ARN: The Outpost Id was not set",[cj]:f}],[cj]:p},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[cj]:f}],[cj]:p},{error:"Invalid ARN: No ARN type specified",[cj]:f}],[cj]:p},{[ck]:[{[cl]:k,[cm]:[ad,0,4,b],[co]:P},{[cl]:h,[cm]:[{[cn]:P},"arn:"]},{[cl]:s,[cm]:[{[cl]:d,[cm]:[bk]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[cj]:f},{[ck]:[{[cl]:e,[cm]:[aw,c]},bk],error:"Path-style addressing cannot be used with ARN buckets",[cj]:f},{[ck]:bF,rules:[{[ck]:bT,rules:[{[ck]:[ax],rules:[{[ck]:[Y,ap,X,ay],endpoint:{[cp]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,ap,X,aA,aB],rules:[{endpoint:bl,[cj]:o}],[cj]:p},{[ck]:[Y,ap,X,aA,aE],endpoint:bl,[cj]:o},{[ck]:[aF,ap,X,ay],endpoint:{[cp]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,ap,X,aA,aB],rules:[{endpoint:bm,[cj]:o}],[cj]:p},{[ck]:[aF,ap,X,aA,aE],endpoint:bm,[cj]:o},{[ck]:[Y,ap,aH,ay],endpoint:{[cp]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,ap,aH,aA,aB],rules:[{endpoint:bn,[cj]:o}],[cj]:p},{[ck]:[Y,ap,aH,aA,aE],endpoint:bn,[cj]:o},{[ck]:[aF,Z,ae,aH,ay],endpoint:{[cp]:Q,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,Z,ae,aH,aA,aB],rules:[{[ck]:bV,endpoint:bo,[cj]:o},{endpoint:bo,[cj]:o}],[cj]:p},{[ck]:[aF,Z,ae,aH,aA,aE],endpoint:bo,[cj]:o},{[ck]:[aF,ap,aH,ay],endpoint:{[cp]:R,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,ap,aH,aA,aB],rules:[{[ck]:bV,endpoint:{[cp]:R,[cq]:aD,[cw]:aj},[cj]:o},{endpoint:bp,[cj]:o}],[cj]:p},{[ck]:[aF,ap,aH,aA,aE],endpoint:bp,[cj]:o}],[cj]:p},{error:"Path-style addressing cannot be used with S3 Accelerate",[cj]:f}],[cj]:p}],[cj]:p}],[cj]:p},{[ck]:[{[cl]:d,[cm]:[bq]},{[cl]:e,[cm]:[bq,c]}],rules:[{[ck]:bT,rules:[{[ck]:ch,rules:[aV,aW,{[ck]:bC,endpoint:{[cp]:t,[cq]:br,[cw]:aj},[cj]:o},{[ck]:bH,endpoint:{[cp]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[cq]:br,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[cq]:br,[cw]:aj},[cj]:o}],[cj]:p},aQ],[cj]:p}],[cj]:p},{[ck]:[ar],rules:[{[ck]:bT,rules:[{[ck]:ch,rules:[{[ck]:[X,Y,ap,ay],endpoint:{[cp]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[X,Y,ap,aA,aB],rules:[{endpoint:bs,[cj]:o}],[cj]:p},{[ck]:[X,Y,ap,aA,aE],endpoint:bs,[cj]:o},{[ck]:[X,aF,ap,ay],endpoint:{[cp]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[X,aF,ap,aA,aB],rules:[{endpoint:bt,[cj]:o}],[cj]:p},{[ck]:[X,aF,ap,aA,aE],endpoint:bt,[cj]:o},{[ck]:[aH,Y,ap,ay],endpoint:{[cp]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aH,Y,ap,aA,aB],rules:[{endpoint:bu,[cj]:o}],[cj]:p},{[ck]:[aH,Y,ap,aA,aE],endpoint:bu,[cj]:o},{[ck]:[aH,aF,Z,ae,ay],endpoint:{[cp]:t,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aH,aF,Z,ae,aA,aB],rules:[{[ck]:bV,endpoint:bv,[cj]:o},{endpoint:bv,[cj]:o}],[cj]:p},{[ck]:[aH,aF,Z,ae,aA,aE],endpoint:bv,[cj]:o},{[ck]:[aH,aF,ap,ay],endpoint:{[cp]:S,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aH,aF,ap,aA,aB],rules:[{[ck]:bV,endpoint:{[cp]:S,[cq]:aD,[cw]:aj},[cj]:o},{endpoint:bw,[cj]:o}],[cj]:p},{[ck]:[aH,aF,ap,aA,aE],endpoint:bw,[cj]:o}],[cj]:p},aQ],[cj]:p}],[cj]:p}],[cj]:p},{error:"A region must be set when sending requests to S3.",[cj]:f}]},ruleSet=_data,cache=new EndpointCache({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),defaultEndpointResolver=(Ra,qa={})=>cache.get(Ra,()=>resolveEndpoint(ruleSet,{endpointParams:Ra,logger:qa.logger}));customEndpointFunctions.aws=awsEndpointFunctions;const createEndpointRuleSetHttpAuthSchemeParametersProvider=Ra=>async(qa,rd,sd)=>{var md,gd,yd;if(!sd)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const pd=await Ra(qa,rd,sd),fd=(yd=(gd=(md=getSmithyContext(rd))==null?void 0:md.commandInstance)==null?void 0:gd.constructor)==null?void 0:yd.getEndpointParameterInstructions;if(!fd)throw new Error(`getEndpointParameterInstructions() is not defined on \`${rd.commandName}\``);const hd=await resolveParams(sd,{getEndpointParameterInstructions:fd},qa);return Object.assign(pd,hd)},_defaultS3HttpAuthSchemeParametersProvider=async(Ra,qa,rd)=>({operation:getSmithyContext(qa).operation,region:await normalizeProvider$1(Ra.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),defaultS3HttpAuthSchemeParametersProvider=createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);function createAwsAuthSigv4HttpAuthOption(Ra){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:Ra.region},propertiesExtractor:(qa,rd)=>({signingProperties:{config:qa,context:rd}})}}function createAwsAuthSigv4aHttpAuthOption(Ra){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:Ra.region},propertiesExtractor:(qa,rd)=>({signingProperties:{config:qa,context:rd}})}}const createEndpointRuleSetHttpAuthSchemeProvider=(Ra,qa,rd)=>pd=>{var gd;const hd=(gd=Ra(pd).properties)==null?void 0:gd.authSchemes;if(!hd)return qa(pd);const md=[];for(const yd of hd){const{name:vd,properties:Nd={},...Md}=yd,Ld=vd.toLowerCase();vd!==Ld&&console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${vd}\` to \`${Ld}\``);let Fd;if(Ld==="sigv4a"){if(Fd="aws.auth#sigv4a",hd.find(Ud=>{const qd=Ud.name.toLowerCase();return qd!=="sigv4a"&&qd.startsWith("sigv4")}))continue}else if(Ld.startsWith("sigv4"))Fd="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${Ld}\``);const Hd=rd[Fd];if(!Hd)throw new Error(`Could not find HttpAuthOption create function for \`${Fd}\``);const Vd=Hd(pd);Vd.schemeId=Fd,Vd.signingProperties={...Vd.signingProperties||{},...Md,...Nd},md.push(Vd)}return md},_defaultS3HttpAuthSchemeProvider=Ra=>{const qa=[];switch(Ra.operation){default:qa.push(createAwsAuthSigv4HttpAuthOption(Ra)),qa.push(createAwsAuthSigv4aHttpAuthOption(Ra))}return qa},defaultS3HttpAuthSchemeProvider=createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver,_defaultS3HttpAuthSchemeProvider,{"aws.auth#sigv4":createAwsAuthSigv4HttpAuthOption,"aws.auth#sigv4a":createAwsAuthSigv4aHttpAuthOption}),resolveHttpAuthSchemeConfig=Ra=>{const qa=resolveAwsSdkSigV4Config(Ra);return{...resolveAwsSdkSigV4AConfig(qa)}},resolveClientEndpointParameters=Ra=>({...Ra,useFipsEndpoint:Ra.useFipsEndpoint??!1,useDualstackEndpoint:Ra.useDualstackEndpoint??!1,forcePathStyle:Ra.forcePathStyle??!1,useAccelerateEndpoint:Ra.useAccelerateEndpoint??!1,useGlobalEndpoint:Ra.useGlobalEndpoint??!1,disableMultiregionAccessPoints:Ra.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}),commonParams={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class S3ServiceException extends ServiceException{constructor(qa){super(qa),Object.setPrototypeOf(this,S3ServiceException.prototype)}}class NoSuchUpload extends S3ServiceException{constructor(rd){super({name:"NoSuchUpload",$fault:"client",...rd});Ng(this,"name","NoSuchUpload");Ng(this,"$fault","client");Object.setPrototypeOf(this,NoSuchUpload.prototype)}}class ObjectNotInActiveTierError extends S3ServiceException{constructor(rd){super({name:"ObjectNotInActiveTierError",$fault:"client",...rd});Ng(this,"name","ObjectNotInActiveTierError");Ng(this,"$fault","client");Object.setPrototypeOf(this,ObjectNotInActiveTierError.prototype)}}class BucketAlreadyExists extends S3ServiceException{constructor(rd){super({name:"BucketAlreadyExists",$fault:"client",...rd});Ng(this,"name","BucketAlreadyExists");Ng(this,"$fault","client");Object.setPrototypeOf(this,BucketAlreadyExists.prototype)}}class BucketAlreadyOwnedByYou extends S3ServiceException{constructor(rd){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...rd});Ng(this,"name","BucketAlreadyOwnedByYou");Ng(this,"$fault","client");Object.setPrototypeOf(this,BucketAlreadyOwnedByYou.prototype)}}class NoSuchBucket extends S3ServiceException{constructor(rd){super({name:"NoSuchBucket",$fault:"client",...rd});Ng(this,"name","NoSuchBucket");Ng(this,"$fault","client");Object.setPrototypeOf(this,NoSuchBucket.prototype)}}var AnalyticsFilter;(function(Ra){Ra.visit=(qa,rd)=>qa.Prefix!==void 0?rd.Prefix(qa.Prefix):qa.Tag!==void 0?rd.Tag(qa.Tag):qa.And!==void 0?rd.And(qa.And):rd._(qa.$unknown[0],qa.$unknown[1])})(AnalyticsFilter||(AnalyticsFilter={}));var MetricsFilter;(function(Ra){Ra.visit=(qa,rd)=>qa.Prefix!==void 0?rd.Prefix(qa.Prefix):qa.Tag!==void 0?rd.Tag(qa.Tag):qa.AccessPointArn!==void 0?rd.AccessPointArn(qa.AccessPointArn):qa.And!==void 0?rd.And(qa.And):rd._(qa.$unknown[0],qa.$unknown[1])})(MetricsFilter||(MetricsFilter={}));class InvalidObjectState extends S3ServiceException{constructor(rd){super({name:"InvalidObjectState",$fault:"client",...rd});Ng(this,"name","InvalidObjectState");Ng(this,"$fault","client");Ng(this,"StorageClass");Ng(this,"AccessTier");Object.setPrototypeOf(this,InvalidObjectState.prototype),this.StorageClass=rd.StorageClass,this.AccessTier=rd.AccessTier}}class NoSuchKey extends S3ServiceException{constructor(rd){super({name:"NoSuchKey",$fault:"client",...rd});Ng(this,"name","NoSuchKey");Ng(this,"$fault","client");Object.setPrototypeOf(this,NoSuchKey.prototype)}}class NotFound extends S3ServiceException{constructor(rd){super({name:"NotFound",$fault:"client",...rd});Ng(this,"name","NotFound");Ng(this,"$fault","client");Object.setPrototypeOf(this,NotFound.prototype)}}const SessionCredentialsFilterSensitiveLog=Ra=>({...Ra,...Ra.SecretAccessKey&&{SecretAccessKey:SENSITIVE_STRING},...Ra.SessionToken&&{SessionToken:SENSITIVE_STRING}}),CreateSessionOutputFilterSensitiveLog=Ra=>({...Ra,...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING},...Ra.Credentials&&{Credentials:SessionCredentialsFilterSensitiveLog(Ra.Credentials)}}),CreateSessionRequestFilterSensitiveLog=Ra=>({...Ra,...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING}});class EncryptionTypeMismatch extends S3ServiceException{constructor(rd){super({name:"EncryptionTypeMismatch",$fault:"client",...rd});Ng(this,"name","EncryptionTypeMismatch");Ng(this,"$fault","client");Object.setPrototypeOf(this,EncryptionTypeMismatch.prototype)}}class InvalidRequest extends S3ServiceException{constructor(rd){super({name:"InvalidRequest",$fault:"client",...rd});Ng(this,"name","InvalidRequest");Ng(this,"$fault","client");Object.setPrototypeOf(this,InvalidRequest.prototype)}}class InvalidWriteOffset extends S3ServiceException{constructor(rd){super({name:"InvalidWriteOffset",$fault:"client",...rd});Ng(this,"name","InvalidWriteOffset");Ng(this,"$fault","client");Object.setPrototypeOf(this,InvalidWriteOffset.prototype)}}class TooManyParts extends S3ServiceException{constructor(rd){super({name:"TooManyParts",$fault:"client",...rd});Ng(this,"name","TooManyParts");Ng(this,"$fault","client");Object.setPrototypeOf(this,TooManyParts.prototype)}}class ObjectAlreadyInActiveTierError extends S3ServiceException{constructor(rd){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...rd});Ng(this,"name","ObjectAlreadyInActiveTierError");Ng(this,"$fault","client");Object.setPrototypeOf(this,ObjectAlreadyInActiveTierError.prototype)}}var SelectObjectContentEventStream;(function(Ra){Ra.visit=(qa,rd)=>qa.Records!==void 0?rd.Records(qa.Records):qa.Stats!==void 0?rd.Stats(qa.Stats):qa.Progress!==void 0?rd.Progress(qa.Progress):qa.Cont!==void 0?rd.Cont(qa.Cont):qa.End!==void 0?rd.End(qa.End):rd._(qa.$unknown[0],qa.$unknown[1])})(SelectObjectContentEventStream||(SelectObjectContentEventStream={}));const PutObjectOutputFilterSensitiveLog=Ra=>({...Ra,...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING}}),PutObjectRequestFilterSensitiveLog=Ra=>({...Ra,...Ra.SSECustomerKey&&{SSECustomerKey:SENSITIVE_STRING},...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING}}),se_CreateSessionCommand=async(Ra,qa)=>{const rd=requestBuilder(Ra,qa),sd=map$2({},isSerializableHeaderValue,{[_xacsm]:Ra[_SM],[_xasse]:Ra[_SSE],[_xasseakki]:Ra[_SSEKMSKI],[_xassec]:Ra[_SSEKMSEC],[_xassebke]:[()=>isSerializableHeaderValue(Ra[_BKE]),()=>Ra[_BKE].toString()]});rd.bp("/"),rd.p("Bucket",()=>Ra.Bucket,"{Bucket}",!1);const pd=map$2({[_s]:[,""]});return rd.m("GET").h(sd).q(pd).b(void 0),rd.build()},se_PutObjectCommand=async(Ra,qa)=>{const rd=requestBuilder(Ra,qa),sd=map$2({},isSerializableHeaderValue,{[_ct]:Ra[_CTo]||"application/octet-stream",[_xaa]:Ra[_ACL],[_cc]:Ra[_CC],[_cd]:Ra[_CD],[_ce]:Ra[_CE],[_cl]:Ra[_CL],[_cl_]:[()=>isSerializableHeaderValue(Ra[_CLo]),()=>Ra[_CLo].toString()],[_cm]:Ra[_CMD],[_xasca]:Ra[_CA],[_xacc]:Ra[_CCRC],[_xacc_]:Ra[_CCRCC],[_xacc__]:Ra[_CCRCNVME],[_xacs]:Ra[_CSHA],[_xacs_]:Ra[_CSHAh],[_e]:[()=>isSerializableHeaderValue(Ra[_E]),()=>dateToUtcString(Ra[_E]).toString()],[_im]:Ra[_IM],[_inm]:Ra[_INM],[_xagfc]:Ra[_GFC],[_xagr]:Ra[_GR],[_xagra]:Ra[_GRACP],[_xagwa]:Ra[_GWACP],[_xawob]:[()=>isSerializableHeaderValue(Ra[_WOB]),()=>Ra[_WOB].toString()],[_xasse]:Ra[_SSE],[_xasc]:Ra[_SC],[_xawrl]:Ra[_WRL],[_xasseca]:Ra[_SSECA],[_xasseck]:Ra[_SSECK],[_xasseckm]:Ra[_SSECKMD],[_xasseakki]:Ra[_SSEKMSKI],[_xassec]:Ra[_SSEKMSEC],[_xassebke]:[()=>isSerializableHeaderValue(Ra[_BKE]),()=>Ra[_BKE].toString()],[_xarp]:Ra[_RP],[_xat]:Ra[_T],[_xaolm]:Ra[_OLM],[_xaolrud]:[()=>isSerializableHeaderValue(Ra[_OLRUD]),()=>serializeDateTime(Ra[_OLRUD]).toString()],[_xaollh]:Ra[_OLLHS],[_xaebo]:Ra[_EBO],...Ra.Metadata!==void 0&&Object.keys(Ra.Metadata).reduce((md,gd)=>(md[`x-amz-meta-${gd.toLowerCase()}`]=Ra.Metadata[gd],md),{})});rd.bp("/{Key+}"),rd.p("Bucket",()=>Ra.Bucket,"{Bucket}",!1),rd.p("Key",()=>Ra.Key,"{Key+}",!0);const pd=map$2({[_xi]:[,"PutObject"]});let fd,hd;return Ra.Body!==void 0&&(hd=Ra.Body,fd=hd),rd.m("PUT").h(sd).q(pd).b(fd),rd.build()},de_CreateSessionCommand=async(Ra,qa)=>{if(Ra.statusCode!==200&&Ra.statusCode>=300)return de_CommandError(Ra,qa);const rd=map$2({$metadata:deserializeMetadata(Ra),[_SSE]:[,Ra.headers[_xasse]],[_SSEKMSKI]:[,Ra.headers[_xasseakki]],[_SSEKMSEC]:[,Ra.headers[_xassec]],[_BKE]:[()=>Ra.headers[_xassebke]!==void 0,()=>parseBoolean(Ra.headers[_xassebke])]}),sd=expectNonNull(expectObject(await parseXmlBody(Ra.body,qa)),"body");return sd[_C]!=null&&(rd[_C]=de_SessionCredentials(sd[_C])),rd},de_PutObjectCommand=async(Ra,qa)=>{if(Ra.statusCode!==200&&Ra.statusCode>=300)return de_CommandError(Ra,qa);const rd=map$2({$metadata:deserializeMetadata(Ra),[_Exp]:[,Ra.headers[_xae]],[_ETa]:[,Ra.headers[_eta]],[_CCRC]:[,Ra.headers[_xacc]],[_CCRCC]:[,Ra.headers[_xacc_]],[_CCRCNVME]:[,Ra.headers[_xacc__]],[_CSHA]:[,Ra.headers[_xacs]],[_CSHAh]:[,Ra.headers[_xacs_]],[_CT]:[,Ra.headers[_xact]],[_SSE]:[,Ra.headers[_xasse]],[_VI]:[,Ra.headers[_xavi]],[_SSECA]:[,Ra.headers[_xasseca]],[_SSECKMD]:[,Ra.headers[_xasseckm]],[_SSEKMSKI]:[,Ra.headers[_xasseakki]],[_SSEKMSEC]:[,Ra.headers[_xassec]],[_BKE]:[()=>Ra.headers[_xassebke]!==void 0,()=>parseBoolean(Ra.headers[_xassebke])],[_Si]:[()=>Ra.headers[_xaos]!==void 0,()=>strictParseLong(Ra.headers[_xaos])],[_RC]:[,Ra.headers[_xarc]]});return await collectBody$1(Ra.body,qa),rd},de_CommandError=async(Ra,qa)=>{const rd={...Ra,body:await parseXmlErrorBody(Ra.body,qa)},sd=loadRestXmlErrorCode(Ra,rd.body);switch(sd){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await de_NoSuchUploadRes(rd);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await de_ObjectNotInActiveTierErrorRes(rd);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await de_BucketAlreadyExistsRes(rd);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await de_BucketAlreadyOwnedByYouRes(rd);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await de_NoSuchBucketRes(rd);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await de_InvalidObjectStateRes(rd);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await de_NoSuchKeyRes(rd);case"NotFound":case"com.amazonaws.s3#NotFound":throw await de_NotFoundRes(rd);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await de_EncryptionTypeMismatchRes(rd);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await de_InvalidRequestRes(rd);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await de_InvalidWriteOffsetRes(rd);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await de_TooManyPartsRes(rd);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await de_ObjectAlreadyInActiveTierErrorRes(rd);default:const pd=rd.body;return throwDefaultError({output:Ra,parsedBody:pd,errorCode:sd})}},throwDefaultError=withBaseException(S3ServiceException),de_BucketAlreadyExistsRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new BucketAlreadyExists({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_BucketAlreadyOwnedByYouRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new BucketAlreadyOwnedByYou({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_EncryptionTypeMismatchRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new EncryptionTypeMismatch({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_InvalidObjectStateRes=async(Ra,qa)=>{const rd=map$2({}),sd=Ra.body;sd[_AT]!=null&&(rd[_AT]=expectString(sd[_AT])),sd[_SC]!=null&&(rd[_SC]=expectString(sd[_SC]));const pd=new InvalidObjectState({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(pd,Ra.body)},de_InvalidRequestRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new InvalidRequest({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_InvalidWriteOffsetRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new InvalidWriteOffset({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_NoSuchBucketRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new NoSuchBucket({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_NoSuchKeyRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new NoSuchKey({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_NoSuchUploadRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new NoSuchUpload({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_NotFoundRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new NotFound({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_ObjectAlreadyInActiveTierErrorRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new ObjectAlreadyInActiveTierError({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_ObjectNotInActiveTierErrorRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new ObjectNotInActiveTierError({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_TooManyPartsRes=async(Ra,qa)=>{const rd=map$2({});Ra.body;const sd=new TooManyParts({$metadata:deserializeMetadata(Ra),...rd});return decorateServiceException(sd,Ra.body)},de_SessionCredentials=(Ra,qa)=>{const rd={};return Ra[_AKI]!=null&&(rd[_AKI]=expectString(Ra[_AKI])),Ra[_SAK]!=null&&(rd[_SAK]=expectString(Ra[_SAK])),Ra[_ST]!=null&&(rd[_ST]=expectString(Ra[_ST])),Ra[_Exp]!=null&&(rd[_Exp]=expectNonNull(parseRfc3339DateTimeWithOffset(Ra[_Exp]))),rd},deserializeMetadata=Ra=>({httpStatusCode:Ra.statusCode,requestId:Ra.headers["x-amzn-requestid"]??Ra.headers["x-amzn-request-id"]??Ra.headers["x-amz-request-id"],extendedRequestId:Ra.headers["x-amz-id-2"],cfId:Ra.headers["x-amz-cf-id"]}),_ACL="ACL",_AKI="AccessKeyId",_AT="AccessTier",_BKE="BucketKeyEnabled",_C="Credentials",_CA="ChecksumAlgorithm",_CC="CacheControl",_CCRC="ChecksumCRC32",_CCRCC="ChecksumCRC32C",_CCRCNVME="ChecksumCRC64NVME",_CD="ContentDisposition",_CE="ContentEncoding",_CL="ContentLanguage",_CLo="ContentLength",_CMD="ContentMD5",_CSHA="ChecksumSHA1",_CSHAh="ChecksumSHA256",_CT="ChecksumType",_CTo="ContentType",_E="Expires",_EBO="ExpectedBucketOwner",_ETa="ETag",_Exp="Expiration",_GFC="GrantFullControl",_GR="GrantRead",_GRACP="GrantReadACP",_GWACP="GrantWriteACP",_IM="IfMatch",_INM="IfNoneMatch",_OLLHS="ObjectLockLegalHoldStatus",_OLM="ObjectLockMode",_OLRUD="ObjectLockRetainUntilDate",_RC="RequestCharged",_RP="RequestPayer",_SAK="SecretAccessKey",_SC="StorageClass",_SM="SessionMode",_SSE="ServerSideEncryption",_SSECA="SSECustomerAlgorithm",_SSECK="SSECustomerKey",_SSECKMD="SSECustomerKeyMD5",_SSEKMSEC="SSEKMSEncryptionContext",_SSEKMSKI="SSEKMSKeyId",_ST="SessionToken",_Si="Size",_T="Tagging",_VI="VersionId",_WOB="WriteOffsetBytes",_WRL="WebsiteRedirectLocation",_cc="cache-control",_cd="content-disposition",_ce="content-encoding",_cl="content-language",_cl_="content-length",_cm="content-md5",_ct="content-type",_e="expires",_eta="etag",_im="if-match",_inm="if-none-match",_s="session",_xaa="x-amz-acl",_xacc="x-amz-checksum-crc32",_xacc_="x-amz-checksum-crc32c",_xacc__="x-amz-checksum-crc64nvme",_xacs="x-amz-checksum-sha1",_xacs_="x-amz-checksum-sha256",_xacsm="x-amz-create-session-mode",_xact="x-amz-checksum-type",_xae="x-amz-expiration",_xaebo="x-amz-expected-bucket-owner",_xagfc="x-amz-grant-full-control",_xagr="x-amz-grant-read",_xagra="x-amz-grant-read-acp",_xagwa="x-amz-grant-write-acp",_xaollh="x-amz-object-lock-legal-hold",_xaolm="x-amz-object-lock-mode",_xaolrud="x-amz-object-lock-retain-until-date",_xaos="x-amz-object-size",_xarc="x-amz-request-charged",_xarp="x-amz-request-payer",_xasc="x-amz-storage-class",_xasca="x-amz-sdk-checksum-algorithm",_xasse="x-amz-server-side-encryption",_xasseakki="x-amz-server-side-encryption-aws-kms-key-id",_xassebke="x-amz-server-side-encryption-bucket-key-enabled",_xassec="x-amz-server-side-encryption-context",_xasseca="x-amz-server-side-encryption-customer-algorithm",_xasseck="x-amz-server-side-encryption-customer-key",_xasseckm="x-amz-server-side-encryption-customer-key-md5",_xat="x-amz-tagging",_xavi="x-amz-version-id",_xawob="x-amz-write-offset-bytes",_xawrl="x-amz-website-redirect-location",_xi="x-id";class CreateSessionCommand extends Command.classBuilder().ep({...commonParams,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(qa,rd,sd,pd){return[getSerdePlugin(sd,this.serialize,this.deserialize),getEndpointPlugin(sd,qa.getEndpointParameterInstructions()),getThrow200ExceptionsPlugin(sd)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(CreateSessionRequestFilterSensitiveLog,CreateSessionOutputFilterSensitiveLog).ser(se_CreateSessionCommand).de(de_CreateSessionCommand).build(){}const name="@aws-sdk/client-s3",description="AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version="3.733.0",scripts={build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn g:vitest run","test:browser":"node ./test/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts","test:browser:watch":"node ./test/browser-build/esbuild && yarn g:vitest watch -c vitest.config.browser.ts","test:e2e":"yarn g:vitest run -c vitest.config.e2e.ts && yarn test:browser","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.ts","test:watch":"yarn g:vitest watch"},main$1="./dist-cjs/index.js",types="./dist-types/index.d.ts",module$1="./dist-es/index.js",sideEffects=!1,dependencies={"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.731.0","@aws-sdk/credential-provider-node":"3.731.1","@aws-sdk/middleware-bucket-endpoint":"3.731.0","@aws-sdk/middleware-expect-continue":"3.731.0","@aws-sdk/middleware-flexible-checksums":"3.732.0","@aws-sdk/middleware-host-header":"3.731.0","@aws-sdk/middleware-location-constraint":"3.731.0","@aws-sdk/middleware-logger":"3.731.0","@aws-sdk/middleware-recursion-detection":"3.731.0","@aws-sdk/middleware-sdk-s3":"3.733.0","@aws-sdk/middleware-ssec":"3.731.0","@aws-sdk/middleware-user-agent":"3.731.0","@aws-sdk/region-config-resolver":"3.731.0","@aws-sdk/signature-v4-multi-region":"3.733.0","@aws-sdk/types":"3.731.0","@aws-sdk/util-endpoints":"3.731.0","@aws-sdk/util-user-agent-browser":"3.731.0","@aws-sdk/util-user-agent-node":"3.731.0","@aws-sdk/xml-builder":"3.723.0","@smithy/config-resolver":"^4.0.0","@smithy/core":"^3.0.0","@smithy/eventstream-serde-browser":"^4.0.0","@smithy/eventstream-serde-config-resolver":"^4.0.0","@smithy/eventstream-serde-node":"^4.0.0","@smithy/fetch-http-handler":"^5.0.0","@smithy/hash-blob-browser":"^4.0.0","@smithy/hash-node":"^4.0.0","@smithy/hash-stream-node":"^4.0.0","@smithy/invalid-dependency":"^4.0.0","@smithy/md5-js":"^4.0.0","@smithy/middleware-content-length":"^4.0.0","@smithy/middleware-endpoint":"^4.0.0","@smithy/middleware-retry":"^4.0.0","@smithy/middleware-serde":"^4.0.0","@smithy/middleware-stack":"^4.0.0","@smithy/node-config-provider":"^4.0.0","@smithy/node-http-handler":"^4.0.0","@smithy/protocol-http":"^5.0.0","@smithy/smithy-client":"^4.0.0","@smithy/types":"^4.0.0","@smithy/url-parser":"^4.0.0","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.0","@smithy/util-defaults-mode-node":"^4.0.0","@smithy/util-endpoints":"^3.0.0","@smithy/util-middleware":"^4.0.0","@smithy/util-retry":"^4.0.0","@smithy/util-stream":"^4.0.0","@smithy/util-utf8":"^4.0.0","@smithy/util-waiter":"^4.0.0",tslib:"^2.6.2"},devDependencies={"@aws-sdk/signature-v4-crt":"3.733.0","@tsconfig/node18":"18.2.4","@types/node":"^18.19.69",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~5.2.2"},engines={node:">=18.0.0"},typesVersions={"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files=["dist-*/**"],author={name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license="Apache-2.0",browser={"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},homepage="https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository={type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"},packageInfo={name,description,version,scripts,main:main$1,types,module:module$1,sideEffects,dependencies,devDependencies,engines,typesVersions,files,author,license,browser,"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage,repository},fromUtf8=Ra=>new TextEncoder().encode(Ra);function isEmptyData$1(Ra){return typeof Ra=="string"?Ra.length===0:Ra.byteLength===0}var SHA_1_HASH={name:"SHA-1"},SHA_1_HMAC_ALGO={name:"HMAC",hash:SHA_1_HASH},EMPTY_DATA_SHA_1=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const fallbackWindow={};function locateWindow(){return typeof window<"u"?window:typeof self<"u"?self:fallbackWindow}var Sha1$1=function(){function Ra(qa){this.toHash=new Uint8Array(0),qa!==void 0&&(this.key=new Promise(function(rd,sd){locateWindow().crypto.subtle.importKey("raw",convertToBuffer$1(qa),SHA_1_HMAC_ALGO,!1,["sign"]).then(rd,sd)}),this.key.catch(function(){}))}return Ra.prototype.update=function(qa){if(!isEmptyData$1(qa)){var rd=convertToBuffer$1(qa),sd=new Uint8Array(this.toHash.byteLength+rd.byteLength);sd.set(this.toHash,0),sd.set(rd,this.toHash.byteLength),this.toHash=sd}},Ra.prototype.digest=function(){var qa=this;return this.key?this.key.then(function(rd){return locateWindow().crypto.subtle.sign(SHA_1_HMAC_ALGO,rd,qa.toHash).then(function(sd){return new Uint8Array(sd)})}):isEmptyData$1(this.toHash)?Promise.resolve(EMPTY_DATA_SHA_1):Promise.resolve().then(function(){return locateWindow().crypto.subtle.digest(SHA_1_HASH,qa.toHash)}).then(function(rd){return Promise.resolve(new Uint8Array(rd))})},Ra.prototype.reset=function(){this.toHash=new Uint8Array(0)},Ra}();function convertToBuffer$1(Ra){return typeof Ra=="string"?fromUtf8(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra)}var subtleCryptoMethods=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsWebCrypto(Ra){if(supportsSecureRandom(Ra)&&typeof Ra.crypto.subtle=="object"){var qa=Ra.crypto.subtle;return supportsSubtleCrypto(qa)}return!1}function supportsSecureRandom(Ra){if(typeof Ra=="object"&&typeof Ra.crypto=="object"){var qa=Ra.crypto.getRandomValues;return typeof qa=="function"}return!1}function supportsSubtleCrypto(Ra){return Ra&&subtleCryptoMethods.every(function(qa){return typeof Ra[qa]=="function"})}var Sha1=function(){function Ra(qa){if(supportsWebCrypto(locateWindow()))this.hash=new Sha1$1(qa);else throw new Error("SHA1 not supported")}return Ra.prototype.update=function(qa,rd){this.hash.update(convertToBuffer$2(qa))},Ra.prototype.digest=function(){return this.hash.digest()},Ra.prototype.reset=function(){this.hash.reset()},Ra}(),SHA_256_HASH={name:"SHA-256"},SHA_256_HMAC_ALGO={name:"HMAC",hash:SHA_256_HASH},EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),Sha256$2=function(){function Ra(qa){this.toHash=new Uint8Array(0),this.secret=qa,this.reset()}return Ra.prototype.update=function(qa){if(!isEmptyData$2(qa)){var rd=convertToBuffer$2(qa),sd=new Uint8Array(this.toHash.byteLength+rd.byteLength);sd.set(this.toHash,0),sd.set(rd,this.toHash.byteLength),this.toHash=sd}},Ra.prototype.digest=function(){var qa=this;return this.key?this.key.then(function(rd){return locateWindow().crypto.subtle.sign(SHA_256_HMAC_ALGO,rd,qa.toHash).then(function(sd){return new Uint8Array(sd)})}):isEmptyData$2(this.toHash)?Promise.resolve(EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return locateWindow().crypto.subtle.digest(SHA_256_HASH,qa.toHash)}).then(function(rd){return Promise.resolve(new Uint8Array(rd))})},Ra.prototype.reset=function(){var qa=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(rd,sd){locateWindow().crypto.subtle.importKey("raw",convertToBuffer$2(qa.secret),SHA_256_HMAC_ALGO,!1,["sign"]).then(rd,sd)}),this.key.catch(function(){}))},Ra}(),BLOCK_SIZE$1=64,DIGEST_LENGTH$1=32,KEY=new Uint32Array([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]),INIT$1=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],MAX_HASHABLE_LENGTH=Math.pow(2,53)-1,RawSha256=function(){function Ra(){this.state=Int32Array.from(INIT$1),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return Ra.prototype.update=function(qa){if(this.finished)throw new Error("Attempted to update an already finished hash.");var rd=0,sd=qa.byteLength;if(this.bytesHashed+=sd,this.bytesHashed*8>MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;sd>0;)this.buffer[this.bufferLength++]=qa[rd++],sd--,this.bufferLength===BLOCK_SIZE$1&&(this.hashBuffer(),this.bufferLength=0)},Ra.prototype.digest=function(){if(!this.finished){var qa=this.bytesHashed*8,rd=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),sd=this.bufferLength;if(rd.setUint8(this.bufferLength++,128),sd%BLOCK_SIZE$1>=BLOCK_SIZE$1-8){for(var pd=this.bufferLength;pd>>24&255,fd[pd*4+1]=this.state[pd]>>>16&255,fd[pd*4+2]=this.state[pd]>>>8&255,fd[pd*4+3]=this.state[pd]>>>0&255;return fd},Ra.prototype.hashBuffer=function(){for(var qa=this,rd=qa.buffer,sd=qa.state,pd=sd[0],fd=sd[1],hd=sd[2],md=sd[3],gd=sd[4],yd=sd[5],vd=sd[6],Nd=sd[7],Md=0;Md>>17|Ld<<15)^(Ld>>>19|Ld<<13)^Ld>>>10;Ld=this.temp[Md-15];var Hd=(Ld>>>7|Ld<<25)^(Ld>>>18|Ld<<14)^Ld>>>3;this.temp[Md]=(Fd+this.temp[Md-7]|0)+(Hd+this.temp[Md-16]|0)}var Vd=(((gd>>>6|gd<<26)^(gd>>>11|gd<<21)^(gd>>>25|gd<<7))+(gd&yd^~gd&vd)|0)+(Nd+(KEY[Md]+this.temp[Md]|0)|0)|0,Gd=((pd>>>2|pd<<30)^(pd>>>13|pd<<19)^(pd>>>22|pd<<10))+(pd&fd^pd&hd^fd&hd)|0;Nd=vd,vd=yd,yd=gd,gd=md+Vd|0,md=hd,hd=fd,fd=pd,pd=Vd+Gd|0}sd[0]+=pd,sd[1]+=fd,sd[2]+=hd,sd[3]+=md,sd[4]+=gd,sd[5]+=yd,sd[6]+=vd,sd[7]+=Nd},Ra}(),Sha256$1=function(){function Ra(qa){this.secret=qa,this.hash=new RawSha256,this.reset()}return Ra.prototype.update=function(qa){if(!(isEmptyData$2(qa)||this.error))try{this.hash.update(convertToBuffer$2(qa))}catch(rd){this.error=rd}},Ra.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Ra.prototype.digest=function(){return __awaiter$8(this,void 0,void 0,function(){return __generator$8(this,function(qa){return[2,this.digestSync()]})})},Ra.prototype.reset=function(){if(this.hash=new RawSha256,this.secret){this.outer=new RawSha256;var qa=bufferFromSecret(this.secret),rd=new Uint8Array(BLOCK_SIZE$1);rd.set(qa);for(var sd=0;sdBLOCK_SIZE$1){var rd=new RawSha256;rd.update(qa),qa=rd.digest()}var sd=new Uint8Array(BLOCK_SIZE$1);return sd.set(qa),sd}var Sha256=function(){function Ra(qa){supportsWebCrypto(locateWindow())?this.hash=new Sha256$2(qa):this.hash=new Sha256$1(qa)}return Ra.prototype.update=function(qa,rd){this.hash.update(convertToBuffer$2(qa))},Ra.prototype.digest=function(){return this.hash.digest()},Ra.prototype.reset=function(){this.hash.reset()},Ra}();const BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class Utils{static getFirstMatch(qa,rd){const sd=rd.match(qa);return sd&&sd.length>0&&sd[1]||""}static getSecondMatch(qa,rd){const sd=rd.match(qa);return sd&&sd.length>1&&sd[2]||""}static matchAndReturnConst(qa,rd,sd){if(qa.test(rd))return sd}static getWindowsVersionName(qa){switch(qa){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}}static getMacOSVersionName(qa){const rd=qa.split(".").splice(0,2).map(sd=>parseInt(sd,10)||0);if(rd.push(0),rd[0]===10)switch(rd[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(qa){const rd=qa.split(".").splice(0,2).map(sd=>parseInt(sd,10)||0);if(rd.push(0),!(rd[0]===1&&rd[1]<5)){if(rd[0]===1&&rd[1]<6)return"Cupcake";if(rd[0]===1&&rd[1]>=6)return"Donut";if(rd[0]===2&&rd[1]<2)return"Eclair";if(rd[0]===2&&rd[1]===2)return"Froyo";if(rd[0]===2&&rd[1]>2)return"Gingerbread";if(rd[0]===3)return"Honeycomb";if(rd[0]===4&&rd[1]<1)return"Ice Cream Sandwich";if(rd[0]===4&&rd[1]<4)return"Jelly Bean";if(rd[0]===4&&rd[1]>=4)return"KitKat";if(rd[0]===5)return"Lollipop";if(rd[0]===6)return"Marshmallow";if(rd[0]===7)return"Nougat";if(rd[0]===8)return"Oreo";if(rd[0]===9)return"Pie"}}static getVersionPrecision(qa){return qa.split(".").length}static compareVersions(qa,rd,sd=!1){const pd=Utils.getVersionPrecision(qa),fd=Utils.getVersionPrecision(rd);let hd=Math.max(pd,fd),md=0;const gd=Utils.map([qa,rd],yd=>{const vd=hd-Utils.getVersionPrecision(yd),Nd=yd+new Array(vd+1).join(".0");return Utils.map(Nd.split("."),Md=>new Array(20-Md.length).join("0")+Md).reverse()});for(sd&&(md=hd-Math.min(pd,fd)),hd-=1;hd>=md;){if(gd[0][hd]>gd[1][hd])return 1;if(gd[0][hd]===gd[1][hd]){if(hd===md)return 0;hd-=1}else if(gd[0][hd]{sd[gd]=hd[gd]})}return qa}static getBrowserAlias(qa){return BROWSER_ALIASES_MAP[qa]}static getBrowserTypeByAlias(qa){return BROWSER_MAP[qa]||""}}const commonVersionIdentifier=/version\/(\d+(\.?_?\d+)+)/i,browsersList=[{test:[/googlebot/i],describe(Ra){const qa={name:"Googlebot"},rd=Utils.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/opera/i],describe(Ra){const qa={name:"Opera"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/opr\/|opios/i],describe(Ra){const qa={name:"Opera"},rd=Utils.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/SamsungBrowser/i],describe(Ra){const qa={name:"Samsung Internet for Android"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/Whale/i],describe(Ra){const qa={name:"NAVER Whale Browser"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/MZBrowser/i],describe(Ra){const qa={name:"MZ Browser"},rd=Utils.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/focus/i],describe(Ra){const qa={name:"Focus"},rd=Utils.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/swing/i],describe(Ra){const qa={name:"Swing"},rd=Utils.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/coast/i],describe(Ra){const qa={name:"Opera Coast"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(Ra){const qa={name:"Opera Touch"},rd=Utils.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/yabrowser/i],describe(Ra){const qa={name:"Yandex Browser"},rd=Utils.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/ucbrowser/i],describe(Ra){const qa={name:"UC Browser"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/Maxthon|mxios/i],describe(Ra){const qa={name:"Maxthon"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/epiphany/i],describe(Ra){const qa={name:"Epiphany"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/puffin/i],describe(Ra){const qa={name:"Puffin"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/sleipnir/i],describe(Ra){const qa={name:"Sleipnir"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/k-meleon/i],describe(Ra){const qa={name:"K-Meleon"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/micromessenger/i],describe(Ra){const qa={name:"WeChat"},rd=Utils.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/qqbrowser/i],describe(Ra){const qa={name:/qqbrowserlite/i.test(Ra)?"QQ Browser Lite":"QQ Browser"},rd=Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/msie|trident/i],describe(Ra){const qa={name:"Internet Explorer"},rd=Utils.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/\sedg\//i],describe(Ra){const qa={name:"Microsoft Edge"},rd=Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/edg([ea]|ios)/i],describe(Ra){const qa={name:"Microsoft Edge"},rd=Utils.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/vivaldi/i],describe(Ra){const qa={name:"Vivaldi"},rd=Utils.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/seamonkey/i],describe(Ra){const qa={name:"SeaMonkey"},rd=Utils.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/sailfish/i],describe(Ra){const qa={name:"Sailfish"},rd=Utils.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/silk/i],describe(Ra){const qa={name:"Amazon Silk"},rd=Utils.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/phantom/i],describe(Ra){const qa={name:"PhantomJS"},rd=Utils.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/slimerjs/i],describe(Ra){const qa={name:"SlimerJS"},rd=Utils.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(Ra){const qa={name:"BlackBerry"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/(web|hpw)[o0]s/i],describe(Ra){const qa={name:"WebOS Browser"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/bada/i],describe(Ra){const qa={name:"Bada"},rd=Utils.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/tizen/i],describe(Ra){const qa={name:"Tizen"},rd=Utils.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/qupzilla/i],describe(Ra){const qa={name:"QupZilla"},rd=Utils.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/firefox|iceweasel|fxios/i],describe(Ra){const qa={name:"Firefox"},rd=Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/electron/i],describe(Ra){const qa={name:"Electron"},rd=Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/MiuiBrowser/i],describe(Ra){const qa={name:"Miui"},rd=Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/chromium/i],describe(Ra){const qa={name:"Chromium"},rd=Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/chrome|crios|crmo/i],describe(Ra){const qa={name:"Chrome"},rd=Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/GSA/i],describe(Ra){const qa={name:"Google Search"},rd=Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test(Ra){const qa=!Ra.test(/like android/i),rd=Ra.test(/android/i);return qa&&rd},describe(Ra){const qa={name:"Android Browser"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/playstation 4/i],describe(Ra){const qa={name:"PlayStation 4"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/safari|applewebkit/i],describe(Ra){const qa={name:"Safari"},rd=Utils.getFirstMatch(commonVersionIdentifier,Ra);return rd&&(qa.version=rd),qa}},{test:[/.*/i],describe(Ra){const qa=/^(.*)\/(.*) /,rd=/^(.*)\/(.*)[ \t]\((.*)/,pd=Ra.search("\\(")!==-1?rd:qa;return{name:Utils.getFirstMatch(pd,Ra),version:Utils.getSecondMatch(pd,Ra)}}}],osParsersList=[{test:[/Roku\/DVP/],describe(Ra){const qa=Utils.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,Ra);return{name:OS_MAP.Roku,version:qa}}},{test:[/windows phone/i],describe(Ra){const qa=Utils.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.WindowsPhone,version:qa}}},{test:[/windows /i],describe(Ra){const qa=Utils.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,Ra),rd=Utils.getWindowsVersionName(qa);return{name:OS_MAP.Windows,version:qa,versionName:rd}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(Ra){const qa={name:OS_MAP.iOS},rd=Utils.getSecondMatch(/(Version\/)(\d[\d.]+)/,Ra);return rd&&(qa.version=rd),qa}},{test:[/macintosh/i],describe(Ra){const qa=Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,Ra).replace(/[_\s]/g,"."),rd=Utils.getMacOSVersionName(qa),sd={name:OS_MAP.MacOS,version:qa};return rd&&(sd.versionName=rd),sd}},{test:[/(ipod|iphone|ipad)/i],describe(Ra){const qa=Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,Ra).replace(/[_\s]/g,".");return{name:OS_MAP.iOS,version:qa}}},{test(Ra){const qa=!Ra.test(/like android/i),rd=Ra.test(/android/i);return qa&&rd},describe(Ra){const qa=Utils.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,Ra),rd=Utils.getAndroidVersionName(qa),sd={name:OS_MAP.Android,version:qa};return rd&&(sd.versionName=rd),sd}},{test:[/(web|hpw)[o0]s/i],describe(Ra){const qa=Utils.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,Ra),rd={name:OS_MAP.WebOS};return qa&&qa.length&&(rd.version=qa),rd}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(Ra){const qa=Utils.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,Ra)||Utils.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,Ra)||Utils.getFirstMatch(/\bbb(\d+)/i,Ra);return{name:OS_MAP.BlackBerry,version:qa}}},{test:[/bada/i],describe(Ra){const qa=Utils.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.Bada,version:qa}}},{test:[/tizen/i],describe(Ra){const qa=Utils.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.Tizen,version:qa}}},{test:[/linux/i],describe(){return{name:OS_MAP.Linux}}},{test:[/CrOS/],describe(){return{name:OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe(Ra){const qa=Utils.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.PlayStation4,version:qa}}}],platformParsersList=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(Ra){const qa=Utils.getFirstMatch(/(can-l01)/i,Ra)&&"Nova",rd={type:PLATFORMS_MAP.mobile,vendor:"Huawei"};return qa&&(rd.model=qa),rd}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:PLATFORMS_MAP.tablet}}},{test(Ra){const qa=Ra.test(/ipod|iphone/i),rd=Ra.test(/like (ipod|iphone)/i);return qa&&!rd},describe(Ra){const qa=Utils.getFirstMatch(/(ipod|iphone)/i,Ra);return{type:PLATFORMS_MAP.mobile,vendor:"Apple",model:qa}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:PLATFORMS_MAP.mobile}}},{test(Ra){return Ra.getBrowserName(!0)==="blackberry"},describe(){return{type:PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test(Ra){return Ra.getBrowserName(!0)==="bada"},describe(){return{type:PLATFORMS_MAP.mobile}}},{test(Ra){return Ra.getBrowserName()==="windows phone"},describe(){return{type:PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test(Ra){const qa=Number(String(Ra.getOSVersion()).split(".")[0]);return Ra.getOSName(!0)==="android"&&qa>=3},describe(){return{type:PLATFORMS_MAP.tablet}}},{test(Ra){return Ra.getOSName(!0)==="android"},describe(){return{type:PLATFORMS_MAP.mobile}}},{test(Ra){return Ra.getOSName(!0)==="macos"},describe(){return{type:PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test(Ra){return Ra.getOSName(!0)==="windows"},describe(){return{type:PLATFORMS_MAP.desktop}}},{test(Ra){return Ra.getOSName(!0)==="linux"},describe(){return{type:PLATFORMS_MAP.desktop}}},{test(Ra){return Ra.getOSName(!0)==="playstation 4"},describe(){return{type:PLATFORMS_MAP.tv}}},{test(Ra){return Ra.getOSName(!0)==="roku"},describe(){return{type:PLATFORMS_MAP.tv}}}],enginesParsersList=[{test(Ra){return Ra.getBrowserName(!0)==="microsoft edge"},describe(Ra){if(/\sedg\//i.test(Ra))return{name:ENGINE_MAP.Blink};const rd=Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,Ra);return{name:ENGINE_MAP.EdgeHTML,version:rd}}},{test:[/trident/i],describe(Ra){const qa={name:ENGINE_MAP.Trident},rd=Utils.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test(Ra){return Ra.test(/presto/i)},describe(Ra){const qa={name:ENGINE_MAP.Presto},rd=Utils.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test(Ra){const qa=Ra.test(/gecko/i),rd=Ra.test(/like gecko/i);return qa&&!rd},describe(Ra){const qa={name:ENGINE_MAP.Gecko},rd=Utils.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe(Ra){const qa={name:ENGINE_MAP.WebKit},rd=Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,Ra);return rd&&(qa.version=rd),qa}}];class Parser{constructor(qa,rd=!1){if(qa==null||qa==="")throw new Error("UserAgent parameter can't be empty");this._ua=qa,this.parsedResult={},rd!==!0&&this.parse()}getUA(){return this._ua}test(qa){return qa.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const qa=Utils.find(browsersList,rd=>{if(typeof rd.test=="function")return rd.test(this);if(rd.test instanceof Array)return rd.test.some(sd=>this.test(sd));throw new Error("Browser's test function is not valid")});return qa&&(this.parsedResult.browser=qa.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(qa){return qa?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const qa=Utils.find(osParsersList,rd=>{if(typeof rd.test=="function")return rd.test(this);if(rd.test instanceof Array)return rd.test.some(sd=>this.test(sd));throw new Error("Browser's test function is not valid")});return qa&&(this.parsedResult.os=qa.describe(this.getUA())),this.parsedResult.os}getOSName(qa){const{name:rd}=this.getOS();return qa?String(rd).toLowerCase()||"":rd||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(qa=!1){const{type:rd}=this.getPlatform();return qa?String(rd).toLowerCase()||"":rd||""}parsePlatform(){this.parsedResult.platform={};const qa=Utils.find(platformParsersList,rd=>{if(typeof rd.test=="function")return rd.test(this);if(rd.test instanceof Array)return rd.test.some(sd=>this.test(sd));throw new Error("Browser's test function is not valid")});return qa&&(this.parsedResult.platform=qa.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(qa){return qa?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const qa=Utils.find(enginesParsersList,rd=>{if(typeof rd.test=="function")return rd.test(this);if(rd.test instanceof Array)return rd.test.some(sd=>this.test(sd));throw new Error("Browser's test function is not valid")});return qa&&(this.parsedResult.engine=qa.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Utils.assign({},this.parsedResult)}satisfies(qa){const rd={};let sd=0;const pd={};let fd=0;if(Object.keys(qa).forEach(md=>{const gd=qa[md];typeof gd=="string"?(pd[md]=gd,fd+=1):typeof gd=="object"&&(rd[md]=gd,sd+=1)}),sd>0){const md=Object.keys(rd),gd=Utils.find(md,vd=>this.isOS(vd));if(gd){const vd=this.satisfies(rd[gd]);if(vd!==void 0)return vd}const yd=Utils.find(md,vd=>this.isPlatform(vd));if(yd){const vd=this.satisfies(rd[yd]);if(vd!==void 0)return vd}}if(fd>0){const md=Object.keys(pd),gd=Utils.find(md,yd=>this.isBrowser(yd,!0));if(gd!==void 0)return this.compareVersion(pd[gd])}}isBrowser(qa,rd=!1){const sd=this.getBrowserName().toLowerCase();let pd=qa.toLowerCase();const fd=Utils.getBrowserTypeByAlias(pd);return rd&&fd&&(pd=fd.toLowerCase()),pd===sd}compareVersion(qa){let rd=[0],sd=qa,pd=!1;const fd=this.getBrowserVersion();if(typeof fd=="string")return qa[0]===">"||qa[0]==="<"?(sd=qa.substr(1),qa[1]==="="?(pd=!0,sd=qa.substr(2)):rd=[],qa[0]===">"?rd.push(1):rd.push(-1)):qa[0]==="="?sd=qa.substr(1):qa[0]==="~"&&(pd=!0,sd=qa.substr(1)),rd.indexOf(Utils.compareVersions(fd,sd,pd))>-1}isOS(qa){return this.getOSName(!0)===String(qa).toLowerCase()}isPlatform(qa){return this.getPlatformType(!0)===String(qa).toLowerCase()}isEngine(qa){return this.getEngineName(!0)===String(qa).toLowerCase()}is(qa,rd=!1){return this.isBrowser(qa,rd)||this.isOS(qa)||this.isPlatform(qa)}some(qa=[]){return qa.some(rd=>this.is(rd))}}/*! +For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,ud}this.sigv4aSigner=new ed({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}const ci="required",cj="type",ck="conditions",cl="fn",cm="argv",cn="ref",co="assign",cp="url",cq="properties",cr="backend",cs="authSchemes",ct="disableDoubleEncoding",cu="signingName",cv="signingRegion",cw="headers",cx="signingRegionSet",a=6,b=!1,c=!0,d="isSet",e="booleanEquals",f="error",g="aws.partition",h="stringEquals",i="getAttr",j="name",k="substring",l="bucketSuffix",m="parseURL",n="{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",o="endpoint",p="tree",q="aws.isVirtualHostableS3Bucket",r="{url#scheme}://{Bucket}.{url#authority}{url#path}",s="not",t="{url#scheme}://{url#authority}{url#path}",u="hardwareType",v="regionPrefix",w="bucketAliasSuffix",x="outpostId",y="isValidHostLabel",z="sigv4a",A="s3-outposts",B="s3",C="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",D="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",E="https://{Bucket}.s3.{partitionResult#dnsSuffix}",F="aws.parseArn",G="bucketArn",H="arnType",I="",J="s3-object-lambda",K="accesspoint",L="accessPointName",M="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",N="mrapPartition",O="outpostType",P="arnPrefix",Q="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",R="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",S="https://s3.{partitionResult#dnsSuffix}",T={[ci]:!1,[cj]:"String"},U={[ci]:!0,default:!1,[cj]:"Boolean"},V={[ci]:!1,[cj]:"Boolean"},W={[cl]:e,[cm]:[{[cn]:"Accelerate"},!0]},X={[cl]:e,[cm]:[{[cn]:"UseFIPS"},!0]},Y={[cl]:e,[cm]:[{[cn]:"UseDualStack"},!0]},Z={[cl]:d,[cm]:[{[cn]:"Endpoint"}]},aa={[cl]:g,[cm]:[{[cn]:"Region"}],[co]:"partitionResult"},ab={[cl]:h,[cm]:[{[cl]:i,[cm]:[{[cn]:"partitionResult"},j]},"aws-cn"]},ac={[cl]:d,[cm]:[{[cn]:"Bucket"}]},ad={[cn]:"Bucket"},ae={[cl]:m,[cm]:[{[cn]:"Endpoint"}],[co]:"url"},af={[cl]:e,[cm]:[{[cl]:i,[cm]:[{[cn]:"url"},"isIp"]},!0]},ag={[cn]:"url"},ah={[cl]:"uriEncode",[cm]:[ad],[co]:"uri_encoded_bucket"},ai={[cr]:"S3Express",[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:"s3express",[cv]:"{Region}"}]},aj={},ak={[cl]:q,[cm]:[ad,!1]},al={[f]:"S3Express bucket name is not a valid virtual hostable name.",[cj]:f},am={[cr]:"S3Express",[cs]:[{[ct]:!0,[j]:"sigv4-s3express",[cu]:"s3express",[cv]:"{Region}"}]},an={[cl]:d,[cm]:[{[cn]:"UseS3ExpressControlEndpoint"}]},ao={[cl]:e,[cm]:[{[cn]:"UseS3ExpressControlEndpoint"},!0]},ap={[cl]:s,[cm]:[Z]},aq={[f]:"Unrecognized S3Express bucket name format.",[cj]:f},ar={[cl]:s,[cm]:[ac]},as={[cn]:u},at={[ck]:[ap],[f]:"Expected a endpoint to be specified but no endpoint was found",[cj]:f},au={[cs]:[{[ct]:!0,[j]:z,[cu]:A,[cx]:["*"]},{[ct]:!0,[j]:"sigv4",[cu]:A,[cv]:"{Region}"}]},av={[cl]:e,[cm]:[{[cn]:"ForcePathStyle"},!1]},aw={[cn]:"ForcePathStyle"},ax={[cl]:e,[cm]:[{[cn]:"Accelerate"},!1]},ay={[cl]:h,[cm]:[{[cn]:"Region"},"aws-global"]},az={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"us-east-1"}]},aA={[cl]:s,[cm]:[ay]},aB={[cl]:e,[cm]:[{[cn]:"UseGlobalEndpoint"},!0]},aC={[cp]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:{[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"{Region}"}]},[cw]:{}},aD={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"{Region}"}]},aE={[cl]:e,[cm]:[{[cn]:"UseGlobalEndpoint"},!1]},aF={[cl]:e,[cm]:[{[cn]:"UseDualStack"},!1]},aG={[cp]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aH={[cl]:e,[cm]:[{[cn]:"UseFIPS"},!1]},aI={[cp]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aJ={[cp]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aK={[cl]:e,[cm]:[{[cl]:i,[cm]:[ag,"isIp"]},!1]},aL={[cp]:C,[cq]:aD,[cw]:{}},aM={[cp]:r,[cq]:aD,[cw]:{}},aN={[o]:aM,[cj]:o},aO={[cp]:D,[cq]:aD,[cw]:{}},aP={[cp]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},aQ={[f]:"Invalid region: region was not a valid DNS name.",[cj]:f},aR={[cn]:G},aS={[cn]:H},aT={[cl]:i,[cm]:[aR,"service"]},aU={[cn]:L},aV={[ck]:[Y],[f]:"S3 Object Lambda does not support Dual-stack",[cj]:f},aW={[ck]:[W],[f]:"S3 Object Lambda does not support S3 Accelerate",[cj]:f},aX={[ck]:[{[cl]:d,[cm]:[{[cn]:"DisableAccessPoints"}]},{[cl]:e,[cm]:[{[cn]:"DisableAccessPoints"},!0]}],[f]:"Access points are not supported for this operation",[cj]:f},aY={[ck]:[{[cl]:d,[cm]:[{[cn]:"UseArnRegion"}]},{[cl]:e,[cm]:[{[cn]:"UseArnRegion"},!1]},{[cl]:s,[cm]:[{[cl]:h,[cm]:[{[cl]:i,[cm]:[aR,"region"]},"{Region}"]}]}],[f]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[cj]:f},aZ={[cl]:i,[cm]:[{[cn]:"bucketPartition"},j]},ba={[cl]:i,[cm]:[aR,"accountId"]},bb={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:J,[cv]:"{bucketArn#region}"}]},bc={[f]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[cj]:f},bd={[f]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[cj]:f},be={[f]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[cj]:f},bf={[f]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[cj]:f},bg={[f]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[cj]:f},bh={[f]:"Invalid ARN: Expected a resource of the format `accesspoint:` but no name was provided",[cj]:f},bi={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:B,[cv]:"{bucketArn#region}"}]},bj={[cs]:[{[ct]:!0,[j]:z,[cu]:A,[cx]:["*"]},{[ct]:!0,[j]:"sigv4",[cu]:A,[cv]:"{bucketArn#region}"}]},bk={[cl]:F,[cm]:[ad]},bl={[cp]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bm={[cp]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bn={[cp]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bo={[cp]:Q,[cq]:aD,[cw]:{}},bp={[cp]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:aD,[cw]:{}},bq={[cn]:"UseObjectLambdaEndpoint"},br={[cs]:[{[ct]:!0,[j]:"sigv4",[cu]:J,[cv]:"{Region}"}]},bs={[cp]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bt={[cp]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bu={[cp]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bv={[cp]:t,[cq]:aD,[cw]:{}},bw={[cp]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[cq]:aD,[cw]:{}},bx=[{[cn]:"Region"}],by=[{[cn]:"Endpoint"}],bz=[ad],bA=[Y],bB=[W],bC=[Z,ae],bD=[{[cl]:d,[cm]:[{[cn]:"DisableS3ExpressSessionAuth"}]},{[cl]:e,[cm]:[{[cn]:"DisableS3ExpressSessionAuth"},!0]}],bE=[af],bF=[ah],bG=[ak],bH=[X],bI=[{[cl]:k,[cm]:[ad,6,14,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,14,16,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bJ=[{[ck]:[X],[o]:{[cp]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:ai,[cw]:{}},[cj]:o},{[o]:{[cp]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:ai,[cw]:{}},[cj]:o}],bK=[{[cl]:k,[cm]:[ad,6,15,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,15,17,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bL=[{[cl]:k,[cm]:[ad,6,19,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,19,21,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bM=[{[cl]:k,[cm]:[ad,6,20,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,20,22,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bN=[{[cl]:k,[cm]:[ad,6,26,!0],[co]:"s3expressAvailabilityZoneId"},{[cl]:k,[cm]:[ad,26,28,!0],[co]:"s3expressAvailabilityZoneDelim"},{[cl]:h,[cm]:[{[cn]:"s3expressAvailabilityZoneDelim"},"--"]}],bO=[{[ck]:[X],[o]:{[cp]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:am,[cw]:{}},[cj]:o},{[o]:{[cp]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[cq]:am,[cw]:{}},[cj]:o}],bP=[ac],bQ=[{[cl]:y,[cm]:[{[cn]:x},!1]}],bR=[{[cl]:h,[cm]:[{[cn]:v},"beta"]}],bS=["*"],bT=[aa],bU=[{[cl]:y,[cm]:[{[cn]:"Region"},!1]}],bV=[{[cl]:h,[cm]:[{[cn]:"Region"},"us-east-1"]}],bW=[{[cl]:h,[cm]:[aS,K]}],bX=[{[cl]:i,[cm]:[aR,"resourceId[1]"],[co]:L},{[cl]:s,[cm]:[{[cl]:h,[cm]:[aU,I]}]}],bY=[aR,"resourceId[1]"],bZ=[{[cl]:s,[cm]:[{[cl]:h,[cm]:[{[cl]:i,[cm]:[aR,"region"]},I]}]}],ca=[{[cl]:s,[cm]:[{[cl]:d,[cm]:[{[cl]:i,[cm]:[aR,"resourceId[2]"]}]}]}],cb=[aR,"resourceId[2]"],cc=[{[cl]:g,[cm]:[{[cl]:i,[cm]:[aR,"region"]}],[co]:"bucketPartition"}],cd=[{[cl]:h,[cm]:[aZ,{[cl]:i,[cm]:[{[cn]:"partitionResult"},j]}]}],ce=[{[cl]:y,[cm]:[{[cl]:i,[cm]:[aR,"region"]},!0]}],cf=[{[cl]:y,[cm]:[ba,!1]}],cg=[{[cl]:y,[cm]:[aU,!1]}],ch=[{[cl]:y,[cm]:[{[cn]:"Region"},!0]}],_data={parameters:{Bucket:T,Region:T,UseFIPS:U,UseDualStack:U,Endpoint:T,ForcePathStyle:U,Accelerate:U,UseGlobalEndpoint:U,UseObjectLambdaEndpoint:V,Key:T,Prefix:T,CopySource:T,DisableAccessPoints:V,DisableMultiRegionAccessPoints:U,UseArnRegion:V,UseS3ExpressControlEndpoint:V,DisableS3ExpressSessionAuth:V},rules:[{[ck]:[{[cl]:d,[cm]:bx}],rules:[{[ck]:[W,X],error:"Accelerate cannot be used with FIPS",[cj]:f},{[ck]:[Y,Z],error:"Cannot set dual-stack in combination with a custom endpoint.",[cj]:f},{[ck]:[Z,X],error:"A custom endpoint cannot be combined with FIPS",[cj]:f},{[ck]:[Z,W],error:"A custom endpoint cannot be combined with S3 Accelerate",[cj]:f},{[ck]:[X,aa,ab],error:"Partition does not support FIPS",[cj]:f},{[ck]:[ac,{[cl]:k,[cm]:[ad,0,a,c],[co]:l},{[cl]:h,[cm]:[{[cn]:l},"--x-s3"]}],rules:[{[ck]:bA,error:"S3Express does not support Dual-stack.",[cj]:f},{[ck]:bB,error:"S3Express does not support S3 Accelerate.",[cj]:f},{[ck]:bC,rules:[{[ck]:bD,rules:[{[ck]:bE,rules:[{[ck]:bF,rules:[{endpoint:{[cp]:n,[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p}],[cj]:p},{[ck]:bG,rules:[{endpoint:{[cp]:r,[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p},al],[cj]:p},{[ck]:bE,rules:[{[ck]:bF,rules:[{endpoint:{[cp]:n,[cq]:am,[cw]:aj},[cj]:o}],[cj]:p}],[cj]:p},{[ck]:bG,rules:[{endpoint:{[cp]:r,[cq]:am,[cw]:aj},[cj]:o}],[cj]:p},al],[cj]:p},{[ck]:[an,ao],rules:[{[ck]:[ah,ap],rules:[{[ck]:bH,endpoint:{[cp]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",[cq]:ai,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p}],[cj]:p},{[ck]:bG,rules:[{[ck]:bD,rules:[{[ck]:bI,rules:bJ,[cj]:p},{[ck]:bK,rules:bJ,[cj]:p},{[ck]:bL,rules:bJ,[cj]:p},{[ck]:bM,rules:bJ,[cj]:p},{[ck]:bN,rules:bJ,[cj]:p},aq],[cj]:p},{[ck]:bI,rules:bO,[cj]:p},{[ck]:bK,rules:bO,[cj]:p},{[ck]:bL,rules:bO,[cj]:p},{[ck]:bM,rules:bO,[cj]:p},{[ck]:bN,rules:bO,[cj]:p},aq],[cj]:p},al],[cj]:p},{[ck]:[ar,an,ao],rules:[{[ck]:bC,endpoint:{[cp]:t,[cq]:ai,[cw]:aj},[cj]:o},{[ck]:bH,endpoint:{[cp]:"https://s3express-control-fips.{Region}.amazonaws.com",[cq]:ai,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://s3express-control.{Region}.amazonaws.com",[cq]:ai,[cw]:aj},[cj]:o}],[cj]:p},{[ck]:[ac,{[cl]:k,[cm]:[ad,49,50,c],[co]:u},{[cl]:k,[cm]:[ad,8,12,c],[co]:v},{[cl]:k,[cm]:[ad,0,7,c],[co]:w},{[cl]:k,[cm]:[ad,32,49,c],[co]:x},{[cl]:g,[cm]:bx,[co]:"regionPartition"},{[cl]:h,[cm]:[{[cn]:w},"--op-s3"]}],rules:[{[ck]:bQ,rules:[{[ck]:[{[cl]:h,[cm]:[as,"e"]}],rules:[{[ck]:bR,rules:[at,{[ck]:bC,endpoint:{[cp]:"https://{Bucket}.ec2.{url#authority}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{endpoint:{[cp]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{[ck]:[{[cl]:h,[cm]:[as,"o"]}],rules:[{[ck]:bR,rules:[at,{[ck]:bC,endpoint:{[cp]:"https://{Bucket}.op-{outpostId}.{url#authority}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{endpoint:{[cp]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[cq]:au,[cw]:aj},[cj]:o}],[cj]:p},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[cj]:f}],[cj]:p},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[cj]:f}],[cj]:p},{[ck]:bP,rules:[{[ck]:[Z,{[cl]:s,[cm]:[{[cl]:d,[cm]:[{[cl]:m,[cm]:by}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[cj]:f},{[ck]:[av,ak],rules:[{[ck]:bT,rules:[{[ck]:bU,rules:[{[ck]:[W,ab],error:"S3 Accelerate cannot be used in this region",[cj]:f},{[ck]:[Y,X,ax,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,X,ax,ap,aA,aB],rules:[{endpoint:aC,[cj]:o}],[cj]:p},{[ck]:[Y,X,ax,ap,aA,aE],endpoint:aC,[cj]:o},{[ck]:[aF,X,ax,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,X,ax,ap,aA,aB],rules:[{endpoint:aG,[cj]:o}],[cj]:p},{[ck]:[aF,X,ax,ap,aA,aE],endpoint:aG,[cj]:o},{[ck]:[Y,aH,W,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,aH,W,ap,aA,aB],rules:[{endpoint:aI,[cj]:o}],[cj]:p},{[ck]:[Y,aH,W,ap,aA,aE],endpoint:aI,[cj]:o},{[ck]:[Y,aH,ax,ap,ay],endpoint:{[cp]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,aH,ax,ap,aA,aB],rules:[{endpoint:aJ,[cj]:o}],[cj]:p},{[ck]:[Y,aH,ax,ap,aA,aE],endpoint:aJ,[cj]:o},{[ck]:[aF,aH,ax,Z,ae,af,ay],endpoint:{[cp]:C,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,ax,Z,ae,aK,ay],endpoint:{[cp]:r,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,ax,Z,ae,af,aA,aB],rules:[{[ck]:bV,endpoint:aL,[cj]:o},{endpoint:aL,[cj]:o}],[cj]:p},{[ck]:[aF,aH,ax,Z,ae,aK,aA,aB],rules:[{[ck]:bV,endpoint:aM,[cj]:o},aN],[cj]:p},{[ck]:[aF,aH,ax,Z,ae,af,aA,aE],endpoint:aL,[cj]:o},{[ck]:[aF,aH,ax,Z,ae,aK,aA,aE],endpoint:aM,[cj]:o},{[ck]:[aF,aH,W,ap,ay],endpoint:{[cp]:D,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,W,ap,aA,aB],rules:[{[ck]:bV,endpoint:aO,[cj]:o},{endpoint:aO,[cj]:o}],[cj]:p},{[ck]:[aF,aH,W,ap,aA,aE],endpoint:aO,[cj]:o},{[ck]:[aF,aH,ax,ap,ay],endpoint:{[cp]:E,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,aH,ax,ap,aA,aB],rules:[{[ck]:bV,endpoint:{[cp]:E,[cq]:aD,[cw]:aj},[cj]:o},{endpoint:aP,[cj]:o}],[cj]:p},{[ck]:[aF,aH,ax,ap,aA,aE],endpoint:aP,[cj]:o}],[cj]:p},aQ],[cj]:p}],[cj]:p},{[ck]:[Z,ae,{[cl]:h,[cm]:[{[cl]:i,[cm]:[ag,"scheme"]},"http"]},{[cl]:q,[cm]:[ad,c]},av,aH,aF,ax],rules:[{[ck]:bT,rules:[{[ck]:bU,rules:[aN],[cj]:p},aQ],[cj]:p}],[cj]:p},{[ck]:[av,{[cl]:F,[cm]:bz,[co]:G}],rules:[{[ck]:[{[cl]:i,[cm]:[aR,"resourceId[0]"],[co]:H},{[cl]:s,[cm]:[{[cl]:h,[cm]:[aS,I]}]}],rules:[{[ck]:[{[cl]:h,[cm]:[aT,J]}],rules:[{[ck]:bW,rules:[{[ck]:bX,rules:[aV,aW,{[ck]:bZ,rules:[aX,{[ck]:ca,rules:[aY,{[ck]:cc,rules:[{[ck]:bT,rules:[{[ck]:cd,rules:[{[ck]:ce,rules:[{[ck]:[{[cl]:h,[cm]:[ba,I]}],error:"Invalid ARN: Missing account id",[cj]:f},{[ck]:cf,rules:[{[ck]:cg,rules:[{[ck]:bC,endpoint:{[cp]:M,[cq]:bb,[cw]:aj},[cj]:o},{[ck]:bH,endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bb,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bb,[cw]:aj},[cj]:o}],[cj]:p},bc],[cj]:p},bd],[cj]:p},be],[cj]:p},bf],[cj]:p}],[cj]:p}],[cj]:p},bg],[cj]:p},{error:"Invalid ARN: bucket ARN is missing a region",[cj]:f}],[cj]:p},bh],[cj]:p},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[cj]:f}],[cj]:p},{[ck]:bW,rules:[{[ck]:bX,rules:[{[ck]:bZ,rules:[{[ck]:bW,rules:[{[ck]:bZ,rules:[aX,{[ck]:ca,rules:[aY,{[ck]:cc,rules:[{[ck]:bT,rules:[{[ck]:[{[cl]:h,[cm]:[aZ,"{partitionResult#name}"]}],rules:[{[ck]:ce,rules:[{[ck]:[{[cl]:h,[cm]:[aT,B]}],rules:[{[ck]:cf,rules:[{[ck]:cg,rules:[{[ck]:bB,error:"Access Points do not support S3 Accelerate",[cj]:f},{[ck]:[X,Y],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[X,aF],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[aH,Y],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[aH,aF,Z,ae],endpoint:{[cp]:M,[cq]:bi,[cw]:aj},[cj]:o},{[ck]:[aH,aF],endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bi,[cw]:aj},[cj]:o}],[cj]:p},bc],[cj]:p},bd],[cj]:p},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[cj]:f}],[cj]:p},be],[cj]:p},bf],[cj]:p}],[cj]:p}],[cj]:p},bg],[cj]:p}],[cj]:p}],[cj]:p},{[ck]:[{[cl]:y,[cm]:[aU,c]}],rules:[{[ck]:bA,error:"S3 MRAP does not support dual-stack",[cj]:f},{[ck]:bH,error:"S3 MRAP does not support FIPS",[cj]:f},{[ck]:bB,error:"S3 MRAP does not support S3 Accelerate",[cj]:f},{[ck]:[{[cl]:e,[cm]:[{[cn]:"DisableMultiRegionAccessPoints"},c]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[cj]:f},{[ck]:[{[cl]:g,[cm]:bx,[co]:N}],rules:[{[ck]:[{[cl]:h,[cm]:[{[cl]:i,[cm]:[{[cn]:N},j]},{[cl]:i,[cm]:[aR,"partition"]}]}],rules:[{endpoint:{[cp]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[cq]:{[cs]:[{[ct]:c,name:z,[cu]:B,[cx]:bS}]},[cw]:aj},[cj]:o}],[cj]:p},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[cj]:f}],[cj]:p}],[cj]:p},{error:"Invalid Access Point Name",[cj]:f}],[cj]:p},bh],[cj]:p},{[ck]:[{[cl]:h,[cm]:[aT,A]}],rules:[{[ck]:bA,error:"S3 Outposts does not support Dual-stack",[cj]:f},{[ck]:bH,error:"S3 Outposts does not support FIPS",[cj]:f},{[ck]:bB,error:"S3 Outposts does not support S3 Accelerate",[cj]:f},{[ck]:[{[cl]:d,[cm]:[{[cl]:i,[cm]:[aR,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[cj]:f},{[ck]:[{[cl]:i,[cm]:bY,[co]:x}],rules:[{[ck]:bQ,rules:[aY,{[ck]:cc,rules:[{[ck]:bT,rules:[{[ck]:cd,rules:[{[ck]:ce,rules:[{[ck]:cf,rules:[{[ck]:[{[cl]:i,[cm]:cb,[co]:O}],rules:[{[ck]:[{[cl]:i,[cm]:[aR,"resourceId[3]"],[co]:L}],rules:[{[ck]:[{[cl]:h,[cm]:[{[cn]:O},K]}],rules:[{[ck]:bC,endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[cq]:bj,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[cq]:bj,[cw]:aj},[cj]:o}],[cj]:p},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[cj]:f}],[cj]:p},{error:"Invalid ARN: expected an access point name",[cj]:f}],[cj]:p},{error:"Invalid ARN: Expected a 4-component resource",[cj]:f}],[cj]:p},bd],[cj]:p},be],[cj]:p},bf],[cj]:p}],[cj]:p}],[cj]:p},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[cj]:f}],[cj]:p},{error:"Invalid ARN: The Outpost Id was not set",[cj]:f}],[cj]:p},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[cj]:f}],[cj]:p},{error:"Invalid ARN: No ARN type specified",[cj]:f}],[cj]:p},{[ck]:[{[cl]:k,[cm]:[ad,0,4,b],[co]:P},{[cl]:h,[cm]:[{[cn]:P},"arn:"]},{[cl]:s,[cm]:[{[cl]:d,[cm]:[bk]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[cj]:f},{[ck]:[{[cl]:e,[cm]:[aw,c]},bk],error:"Path-style addressing cannot be used with ARN buckets",[cj]:f},{[ck]:bF,rules:[{[ck]:bT,rules:[{[ck]:[ax],rules:[{[ck]:[Y,ap,X,ay],endpoint:{[cp]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,ap,X,aA,aB],rules:[{endpoint:bl,[cj]:o}],[cj]:p},{[ck]:[Y,ap,X,aA,aE],endpoint:bl,[cj]:o},{[ck]:[aF,ap,X,ay],endpoint:{[cp]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,ap,X,aA,aB],rules:[{endpoint:bm,[cj]:o}],[cj]:p},{[ck]:[aF,ap,X,aA,aE],endpoint:bm,[cj]:o},{[ck]:[Y,ap,aH,ay],endpoint:{[cp]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[Y,ap,aH,aA,aB],rules:[{endpoint:bn,[cj]:o}],[cj]:p},{[ck]:[Y,ap,aH,aA,aE],endpoint:bn,[cj]:o},{[ck]:[aF,Z,ae,aH,ay],endpoint:{[cp]:Q,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,Z,ae,aH,aA,aB],rules:[{[ck]:bV,endpoint:bo,[cj]:o},{endpoint:bo,[cj]:o}],[cj]:p},{[ck]:[aF,Z,ae,aH,aA,aE],endpoint:bo,[cj]:o},{[ck]:[aF,ap,aH,ay],endpoint:{[cp]:R,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aF,ap,aH,aA,aB],rules:[{[ck]:bV,endpoint:{[cp]:R,[cq]:aD,[cw]:aj},[cj]:o},{endpoint:bp,[cj]:o}],[cj]:p},{[ck]:[aF,ap,aH,aA,aE],endpoint:bp,[cj]:o}],[cj]:p},{error:"Path-style addressing cannot be used with S3 Accelerate",[cj]:f}],[cj]:p}],[cj]:p}],[cj]:p},{[ck]:[{[cl]:d,[cm]:[bq]},{[cl]:e,[cm]:[bq,c]}],rules:[{[ck]:bT,rules:[{[ck]:ch,rules:[aV,aW,{[ck]:bC,endpoint:{[cp]:t,[cq]:br,[cw]:aj},[cj]:o},{[ck]:bH,endpoint:{[cp]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[cq]:br,[cw]:aj},[cj]:o},{endpoint:{[cp]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[cq]:br,[cw]:aj},[cj]:o}],[cj]:p},aQ],[cj]:p}],[cj]:p},{[ck]:[ar],rules:[{[ck]:bT,rules:[{[ck]:ch,rules:[{[ck]:[X,Y,ap,ay],endpoint:{[cp]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[X,Y,ap,aA,aB],rules:[{endpoint:bs,[cj]:o}],[cj]:p},{[ck]:[X,Y,ap,aA,aE],endpoint:bs,[cj]:o},{[ck]:[X,aF,ap,ay],endpoint:{[cp]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[X,aF,ap,aA,aB],rules:[{endpoint:bt,[cj]:o}],[cj]:p},{[ck]:[X,aF,ap,aA,aE],endpoint:bt,[cj]:o},{[ck]:[aH,Y,ap,ay],endpoint:{[cp]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aH,Y,ap,aA,aB],rules:[{endpoint:bu,[cj]:o}],[cj]:p},{[ck]:[aH,Y,ap,aA,aE],endpoint:bu,[cj]:o},{[ck]:[aH,aF,Z,ae,ay],endpoint:{[cp]:t,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aH,aF,Z,ae,aA,aB],rules:[{[ck]:bV,endpoint:bv,[cj]:o},{endpoint:bv,[cj]:o}],[cj]:p},{[ck]:[aH,aF,Z,ae,aA,aE],endpoint:bv,[cj]:o},{[ck]:[aH,aF,ap,ay],endpoint:{[cp]:S,[cq]:az,[cw]:aj},[cj]:o},{[ck]:[aH,aF,ap,aA,aB],rules:[{[ck]:bV,endpoint:{[cp]:S,[cq]:aD,[cw]:aj},[cj]:o},{endpoint:bw,[cj]:o}],[cj]:p},{[ck]:[aH,aF,ap,aA,aE],endpoint:bw,[cj]:o}],[cj]:p},aQ],[cj]:p}],[cj]:p}],[cj]:p},{error:"A region must be set when sending requests to S3.",[cj]:f}]},ruleSet=_data,cache=new EndpointCache({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),defaultEndpointResolver=(Ra,ed={})=>cache.get(Ra,()=>resolveEndpoint(ruleSet,{endpointParams:Ra,logger:ed.logger}));customEndpointFunctions.aws=awsEndpointFunctions;const createEndpointRuleSetHttpAuthSchemeParametersProvider=Ra=>async(ed,ud,dd)=>{var yd,vd,Cd;if(!dd)throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");const hd=await Ra(ed,ud,dd),md=(Cd=(vd=(yd=getSmithyContext(ud))==null?void 0:yd.commandInstance)==null?void 0:vd.constructor)==null?void 0:Cd.getEndpointParameterInstructions;if(!md)throw new Error(`getEndpointParameterInstructions() is not defined on \`${ud.commandName}\``);const gd=await resolveParams(dd,{getEndpointParameterInstructions:md},ed);return Object.assign(hd,gd)},_defaultS3HttpAuthSchemeParametersProvider=async(Ra,ed,ud)=>({operation:getSmithyContext(ed).operation,region:await normalizeProvider$1(Ra.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),defaultS3HttpAuthSchemeParametersProvider=createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultS3HttpAuthSchemeParametersProvider);function createAwsAuthSigv4HttpAuthOption(Ra){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:Ra.region},propertiesExtractor:(ed,ud)=>({signingProperties:{config:ed,context:ud}})}}function createAwsAuthSigv4aHttpAuthOption(Ra){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:Ra.region},propertiesExtractor:(ed,ud)=>({signingProperties:{config:ed,context:ud}})}}const createEndpointRuleSetHttpAuthSchemeProvider=(Ra,ed,ud)=>hd=>{var vd;const gd=(vd=Ra(hd).properties)==null?void 0:vd.authSchemes;if(!gd)return ed(hd);const yd=[];for(const Cd of gd){const{name:wd,properties:Nd={},...Ld}=Cd,Ud=wd.toLowerCase();wd!==Ud&&console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${wd}\` to \`${Ud}\``);let jd;if(Ud==="sigv4a"){if(jd="aws.auth#sigv4a",gd.find(qd=>{const Wd=qd.name.toLowerCase();return Wd!=="sigv4a"&&Wd.startsWith("sigv4")}))continue}else if(Ud.startsWith("sigv4"))jd="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${Ud}\``);const Gd=ud[jd];if(!Gd)throw new Error(`Could not find HttpAuthOption create function for \`${jd}\``);const Yd=Gd(hd);Yd.schemeId=jd,Yd.signingProperties={...Yd.signingProperties||{},...Ld,...Nd},yd.push(Yd)}return yd},_defaultS3HttpAuthSchemeProvider=Ra=>{const ed=[];switch(Ra.operation){default:ed.push(createAwsAuthSigv4HttpAuthOption(Ra)),ed.push(createAwsAuthSigv4aHttpAuthOption(Ra))}return ed},defaultS3HttpAuthSchemeProvider=createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver,_defaultS3HttpAuthSchemeProvider,{"aws.auth#sigv4":createAwsAuthSigv4HttpAuthOption,"aws.auth#sigv4a":createAwsAuthSigv4aHttpAuthOption}),resolveHttpAuthSchemeConfig=Ra=>{const ed=resolveAwsSdkSigV4Config(Ra);return{...resolveAwsSdkSigV4AConfig(ed)}},resolveClientEndpointParameters=Ra=>({...Ra,useFipsEndpoint:Ra.useFipsEndpoint??!1,useDualstackEndpoint:Ra.useDualstackEndpoint??!1,forcePathStyle:Ra.forcePathStyle??!1,useAccelerateEndpoint:Ra.useAccelerateEndpoint??!1,useGlobalEndpoint:Ra.useGlobalEndpoint??!1,disableMultiregionAccessPoints:Ra.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}),commonParams={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class S3ServiceException extends ServiceException{constructor(ed){super(ed),Object.setPrototypeOf(this,S3ServiceException.prototype)}}class NoSuchUpload extends S3ServiceException{constructor(ud){super({name:"NoSuchUpload",$fault:"client",...ud});Ig(this,"name","NoSuchUpload");Ig(this,"$fault","client");Object.setPrototypeOf(this,NoSuchUpload.prototype)}}class ObjectNotInActiveTierError extends S3ServiceException{constructor(ud){super({name:"ObjectNotInActiveTierError",$fault:"client",...ud});Ig(this,"name","ObjectNotInActiveTierError");Ig(this,"$fault","client");Object.setPrototypeOf(this,ObjectNotInActiveTierError.prototype)}}class BucketAlreadyExists extends S3ServiceException{constructor(ud){super({name:"BucketAlreadyExists",$fault:"client",...ud});Ig(this,"name","BucketAlreadyExists");Ig(this,"$fault","client");Object.setPrototypeOf(this,BucketAlreadyExists.prototype)}}class BucketAlreadyOwnedByYou extends S3ServiceException{constructor(ud){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...ud});Ig(this,"name","BucketAlreadyOwnedByYou");Ig(this,"$fault","client");Object.setPrototypeOf(this,BucketAlreadyOwnedByYou.prototype)}}class NoSuchBucket extends S3ServiceException{constructor(ud){super({name:"NoSuchBucket",$fault:"client",...ud});Ig(this,"name","NoSuchBucket");Ig(this,"$fault","client");Object.setPrototypeOf(this,NoSuchBucket.prototype)}}var AnalyticsFilter;(function(Ra){Ra.visit=(ed,ud)=>ed.Prefix!==void 0?ud.Prefix(ed.Prefix):ed.Tag!==void 0?ud.Tag(ed.Tag):ed.And!==void 0?ud.And(ed.And):ud._(ed.$unknown[0],ed.$unknown[1])})(AnalyticsFilter||(AnalyticsFilter={}));var MetricsFilter;(function(Ra){Ra.visit=(ed,ud)=>ed.Prefix!==void 0?ud.Prefix(ed.Prefix):ed.Tag!==void 0?ud.Tag(ed.Tag):ed.AccessPointArn!==void 0?ud.AccessPointArn(ed.AccessPointArn):ed.And!==void 0?ud.And(ed.And):ud._(ed.$unknown[0],ed.$unknown[1])})(MetricsFilter||(MetricsFilter={}));class InvalidObjectState extends S3ServiceException{constructor(ud){super({name:"InvalidObjectState",$fault:"client",...ud});Ig(this,"name","InvalidObjectState");Ig(this,"$fault","client");Ig(this,"StorageClass");Ig(this,"AccessTier");Object.setPrototypeOf(this,InvalidObjectState.prototype),this.StorageClass=ud.StorageClass,this.AccessTier=ud.AccessTier}}class NoSuchKey extends S3ServiceException{constructor(ud){super({name:"NoSuchKey",$fault:"client",...ud});Ig(this,"name","NoSuchKey");Ig(this,"$fault","client");Object.setPrototypeOf(this,NoSuchKey.prototype)}}class NotFound extends S3ServiceException{constructor(ud){super({name:"NotFound",$fault:"client",...ud});Ig(this,"name","NotFound");Ig(this,"$fault","client");Object.setPrototypeOf(this,NotFound.prototype)}}const SessionCredentialsFilterSensitiveLog=Ra=>({...Ra,...Ra.SecretAccessKey&&{SecretAccessKey:SENSITIVE_STRING},...Ra.SessionToken&&{SessionToken:SENSITIVE_STRING}}),CreateSessionOutputFilterSensitiveLog=Ra=>({...Ra,...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING},...Ra.Credentials&&{Credentials:SessionCredentialsFilterSensitiveLog(Ra.Credentials)}}),CreateSessionRequestFilterSensitiveLog=Ra=>({...Ra,...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING}});class EncryptionTypeMismatch extends S3ServiceException{constructor(ud){super({name:"EncryptionTypeMismatch",$fault:"client",...ud});Ig(this,"name","EncryptionTypeMismatch");Ig(this,"$fault","client");Object.setPrototypeOf(this,EncryptionTypeMismatch.prototype)}}class InvalidRequest extends S3ServiceException{constructor(ud){super({name:"InvalidRequest",$fault:"client",...ud});Ig(this,"name","InvalidRequest");Ig(this,"$fault","client");Object.setPrototypeOf(this,InvalidRequest.prototype)}}class InvalidWriteOffset extends S3ServiceException{constructor(ud){super({name:"InvalidWriteOffset",$fault:"client",...ud});Ig(this,"name","InvalidWriteOffset");Ig(this,"$fault","client");Object.setPrototypeOf(this,InvalidWriteOffset.prototype)}}class TooManyParts extends S3ServiceException{constructor(ud){super({name:"TooManyParts",$fault:"client",...ud});Ig(this,"name","TooManyParts");Ig(this,"$fault","client");Object.setPrototypeOf(this,TooManyParts.prototype)}}class ObjectAlreadyInActiveTierError extends S3ServiceException{constructor(ud){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...ud});Ig(this,"name","ObjectAlreadyInActiveTierError");Ig(this,"$fault","client");Object.setPrototypeOf(this,ObjectAlreadyInActiveTierError.prototype)}}var SelectObjectContentEventStream;(function(Ra){Ra.visit=(ed,ud)=>ed.Records!==void 0?ud.Records(ed.Records):ed.Stats!==void 0?ud.Stats(ed.Stats):ed.Progress!==void 0?ud.Progress(ed.Progress):ed.Cont!==void 0?ud.Cont(ed.Cont):ed.End!==void 0?ud.End(ed.End):ud._(ed.$unknown[0],ed.$unknown[1])})(SelectObjectContentEventStream||(SelectObjectContentEventStream={}));const PutObjectOutputFilterSensitiveLog=Ra=>({...Ra,...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING}}),PutObjectRequestFilterSensitiveLog=Ra=>({...Ra,...Ra.SSECustomerKey&&{SSECustomerKey:SENSITIVE_STRING},...Ra.SSEKMSKeyId&&{SSEKMSKeyId:SENSITIVE_STRING},...Ra.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:SENSITIVE_STRING}}),se_CreateSessionCommand=async(Ra,ed)=>{const ud=requestBuilder(Ra,ed),dd=map$2({},isSerializableHeaderValue,{[_xacsm]:Ra[_SM],[_xasse]:Ra[_SSE],[_xasseakki]:Ra[_SSEKMSKI],[_xassec]:Ra[_SSEKMSEC],[_xassebke]:[()=>isSerializableHeaderValue(Ra[_BKE]),()=>Ra[_BKE].toString()]});ud.bp("/"),ud.p("Bucket",()=>Ra.Bucket,"{Bucket}",!1);const hd=map$2({[_s]:[,""]});return ud.m("GET").h(dd).q(hd).b(void 0),ud.build()},se_PutObjectCommand=async(Ra,ed)=>{const ud=requestBuilder(Ra,ed),dd=map$2({},isSerializableHeaderValue,{[_ct]:Ra[_CTo]||"application/octet-stream",[_xaa]:Ra[_ACL],[_cc]:Ra[_CC],[_cd]:Ra[_CD],[_ce]:Ra[_CE],[_cl]:Ra[_CL],[_cl_]:[()=>isSerializableHeaderValue(Ra[_CLo]),()=>Ra[_CLo].toString()],[_cm]:Ra[_CMD],[_xasca]:Ra[_CA],[_xacc]:Ra[_CCRC],[_xacc_]:Ra[_CCRCC],[_xacc__]:Ra[_CCRCNVME],[_xacs]:Ra[_CSHA],[_xacs_]:Ra[_CSHAh],[_e]:[()=>isSerializableHeaderValue(Ra[_E]),()=>dateToUtcString(Ra[_E]).toString()],[_im]:Ra[_IM],[_inm]:Ra[_INM],[_xagfc]:Ra[_GFC],[_xagr]:Ra[_GR],[_xagra]:Ra[_GRACP],[_xagwa]:Ra[_GWACP],[_xawob]:[()=>isSerializableHeaderValue(Ra[_WOB]),()=>Ra[_WOB].toString()],[_xasse]:Ra[_SSE],[_xasc]:Ra[_SC],[_xawrl]:Ra[_WRL],[_xasseca]:Ra[_SSECA],[_xasseck]:Ra[_SSECK],[_xasseckm]:Ra[_SSECKMD],[_xasseakki]:Ra[_SSEKMSKI],[_xassec]:Ra[_SSEKMSEC],[_xassebke]:[()=>isSerializableHeaderValue(Ra[_BKE]),()=>Ra[_BKE].toString()],[_xarp]:Ra[_RP],[_xat]:Ra[_T],[_xaolm]:Ra[_OLM],[_xaolrud]:[()=>isSerializableHeaderValue(Ra[_OLRUD]),()=>serializeDateTime(Ra[_OLRUD]).toString()],[_xaollh]:Ra[_OLLHS],[_xaebo]:Ra[_EBO],...Ra.Metadata!==void 0&&Object.keys(Ra.Metadata).reduce((yd,vd)=>(yd[`x-amz-meta-${vd.toLowerCase()}`]=Ra.Metadata[vd],yd),{})});ud.bp("/{Key+}"),ud.p("Bucket",()=>Ra.Bucket,"{Bucket}",!1),ud.p("Key",()=>Ra.Key,"{Key+}",!0);const hd=map$2({[_xi]:[,"PutObject"]});let md,gd;return Ra.Body!==void 0&&(gd=Ra.Body,md=gd),ud.m("PUT").h(dd).q(hd).b(md),ud.build()},de_CreateSessionCommand=async(Ra,ed)=>{if(Ra.statusCode!==200&&Ra.statusCode>=300)return de_CommandError(Ra,ed);const ud=map$2({$metadata:deserializeMetadata(Ra),[_SSE]:[,Ra.headers[_xasse]],[_SSEKMSKI]:[,Ra.headers[_xasseakki]],[_SSEKMSEC]:[,Ra.headers[_xassec]],[_BKE]:[()=>Ra.headers[_xassebke]!==void 0,()=>parseBoolean(Ra.headers[_xassebke])]}),dd=expectNonNull(expectObject(await parseXmlBody(Ra.body,ed)),"body");return dd[_C]!=null&&(ud[_C]=de_SessionCredentials(dd[_C])),ud},de_PutObjectCommand=async(Ra,ed)=>{if(Ra.statusCode!==200&&Ra.statusCode>=300)return de_CommandError(Ra,ed);const ud=map$2({$metadata:deserializeMetadata(Ra),[_Exp]:[,Ra.headers[_xae]],[_ETa]:[,Ra.headers[_eta]],[_CCRC]:[,Ra.headers[_xacc]],[_CCRCC]:[,Ra.headers[_xacc_]],[_CCRCNVME]:[,Ra.headers[_xacc__]],[_CSHA]:[,Ra.headers[_xacs]],[_CSHAh]:[,Ra.headers[_xacs_]],[_CT]:[,Ra.headers[_xact]],[_SSE]:[,Ra.headers[_xasse]],[_VI]:[,Ra.headers[_xavi]],[_SSECA]:[,Ra.headers[_xasseca]],[_SSECKMD]:[,Ra.headers[_xasseckm]],[_SSEKMSKI]:[,Ra.headers[_xasseakki]],[_SSEKMSEC]:[,Ra.headers[_xassec]],[_BKE]:[()=>Ra.headers[_xassebke]!==void 0,()=>parseBoolean(Ra.headers[_xassebke])],[_Si]:[()=>Ra.headers[_xaos]!==void 0,()=>strictParseLong(Ra.headers[_xaos])],[_RC]:[,Ra.headers[_xarc]]});return await collectBody$1(Ra.body,ed),ud},de_CommandError=async(Ra,ed)=>{const ud={...Ra,body:await parseXmlErrorBody(Ra.body,ed)},dd=loadRestXmlErrorCode(Ra,ud.body);switch(dd){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await de_NoSuchUploadRes(ud);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await de_ObjectNotInActiveTierErrorRes(ud);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await de_BucketAlreadyExistsRes(ud);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await de_BucketAlreadyOwnedByYouRes(ud);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await de_NoSuchBucketRes(ud);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await de_InvalidObjectStateRes(ud);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await de_NoSuchKeyRes(ud);case"NotFound":case"com.amazonaws.s3#NotFound":throw await de_NotFoundRes(ud);case"EncryptionTypeMismatch":case"com.amazonaws.s3#EncryptionTypeMismatch":throw await de_EncryptionTypeMismatchRes(ud);case"InvalidRequest":case"com.amazonaws.s3#InvalidRequest":throw await de_InvalidRequestRes(ud);case"InvalidWriteOffset":case"com.amazonaws.s3#InvalidWriteOffset":throw await de_InvalidWriteOffsetRes(ud);case"TooManyParts":case"com.amazonaws.s3#TooManyParts":throw await de_TooManyPartsRes(ud);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await de_ObjectAlreadyInActiveTierErrorRes(ud);default:const hd=ud.body;return throwDefaultError({output:Ra,parsedBody:hd,errorCode:dd})}},throwDefaultError=withBaseException(S3ServiceException),de_BucketAlreadyExistsRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new BucketAlreadyExists({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_BucketAlreadyOwnedByYouRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new BucketAlreadyOwnedByYou({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_EncryptionTypeMismatchRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new EncryptionTypeMismatch({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_InvalidObjectStateRes=async(Ra,ed)=>{const ud=map$2({}),dd=Ra.body;dd[_AT]!=null&&(ud[_AT]=expectString(dd[_AT])),dd[_SC]!=null&&(ud[_SC]=expectString(dd[_SC]));const hd=new InvalidObjectState({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(hd,Ra.body)},de_InvalidRequestRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new InvalidRequest({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_InvalidWriteOffsetRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new InvalidWriteOffset({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_NoSuchBucketRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new NoSuchBucket({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_NoSuchKeyRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new NoSuchKey({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_NoSuchUploadRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new NoSuchUpload({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_NotFoundRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new NotFound({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_ObjectAlreadyInActiveTierErrorRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new ObjectAlreadyInActiveTierError({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_ObjectNotInActiveTierErrorRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new ObjectNotInActiveTierError({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_TooManyPartsRes=async(Ra,ed)=>{const ud=map$2({});Ra.body;const dd=new TooManyParts({$metadata:deserializeMetadata(Ra),...ud});return decorateServiceException(dd,Ra.body)},de_SessionCredentials=(Ra,ed)=>{const ud={};return Ra[_AKI]!=null&&(ud[_AKI]=expectString(Ra[_AKI])),Ra[_SAK]!=null&&(ud[_SAK]=expectString(Ra[_SAK])),Ra[_ST]!=null&&(ud[_ST]=expectString(Ra[_ST])),Ra[_Exp]!=null&&(ud[_Exp]=expectNonNull(parseRfc3339DateTimeWithOffset(Ra[_Exp]))),ud},deserializeMetadata=Ra=>({httpStatusCode:Ra.statusCode,requestId:Ra.headers["x-amzn-requestid"]??Ra.headers["x-amzn-request-id"]??Ra.headers["x-amz-request-id"],extendedRequestId:Ra.headers["x-amz-id-2"],cfId:Ra.headers["x-amz-cf-id"]}),_ACL="ACL",_AKI="AccessKeyId",_AT="AccessTier",_BKE="BucketKeyEnabled",_C="Credentials",_CA="ChecksumAlgorithm",_CC="CacheControl",_CCRC="ChecksumCRC32",_CCRCC="ChecksumCRC32C",_CCRCNVME="ChecksumCRC64NVME",_CD="ContentDisposition",_CE="ContentEncoding",_CL="ContentLanguage",_CLo="ContentLength",_CMD="ContentMD5",_CSHA="ChecksumSHA1",_CSHAh="ChecksumSHA256",_CT="ChecksumType",_CTo="ContentType",_E="Expires",_EBO="ExpectedBucketOwner",_ETa="ETag",_Exp="Expiration",_GFC="GrantFullControl",_GR="GrantRead",_GRACP="GrantReadACP",_GWACP="GrantWriteACP",_IM="IfMatch",_INM="IfNoneMatch",_OLLHS="ObjectLockLegalHoldStatus",_OLM="ObjectLockMode",_OLRUD="ObjectLockRetainUntilDate",_RC="RequestCharged",_RP="RequestPayer",_SAK="SecretAccessKey",_SC="StorageClass",_SM="SessionMode",_SSE="ServerSideEncryption",_SSECA="SSECustomerAlgorithm",_SSECK="SSECustomerKey",_SSECKMD="SSECustomerKeyMD5",_SSEKMSEC="SSEKMSEncryptionContext",_SSEKMSKI="SSEKMSKeyId",_ST="SessionToken",_Si="Size",_T="Tagging",_VI="VersionId",_WOB="WriteOffsetBytes",_WRL="WebsiteRedirectLocation",_cc="cache-control",_cd="content-disposition",_ce="content-encoding",_cl="content-language",_cl_="content-length",_cm="content-md5",_ct="content-type",_e="expires",_eta="etag",_im="if-match",_inm="if-none-match",_s="session",_xaa="x-amz-acl",_xacc="x-amz-checksum-crc32",_xacc_="x-amz-checksum-crc32c",_xacc__="x-amz-checksum-crc64nvme",_xacs="x-amz-checksum-sha1",_xacs_="x-amz-checksum-sha256",_xacsm="x-amz-create-session-mode",_xact="x-amz-checksum-type",_xae="x-amz-expiration",_xaebo="x-amz-expected-bucket-owner",_xagfc="x-amz-grant-full-control",_xagr="x-amz-grant-read",_xagra="x-amz-grant-read-acp",_xagwa="x-amz-grant-write-acp",_xaollh="x-amz-object-lock-legal-hold",_xaolm="x-amz-object-lock-mode",_xaolrud="x-amz-object-lock-retain-until-date",_xaos="x-amz-object-size",_xarc="x-amz-request-charged",_xarp="x-amz-request-payer",_xasc="x-amz-storage-class",_xasca="x-amz-sdk-checksum-algorithm",_xasse="x-amz-server-side-encryption",_xasseakki="x-amz-server-side-encryption-aws-kms-key-id",_xassebke="x-amz-server-side-encryption-bucket-key-enabled",_xassec="x-amz-server-side-encryption-context",_xasseca="x-amz-server-side-encryption-customer-algorithm",_xasseck="x-amz-server-side-encryption-customer-key",_xasseckm="x-amz-server-side-encryption-customer-key-md5",_xat="x-amz-tagging",_xavi="x-amz-version-id",_xawob="x-amz-write-offset-bytes",_xawrl="x-amz-website-redirect-location",_xi="x-id";class CreateSessionCommand extends Command.classBuilder().ep({...commonParams,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(ed,ud,dd,hd){return[getSerdePlugin(dd,this.serialize,this.deserialize),getEndpointPlugin(dd,ed.getEndpointParameterInstructions()),getThrow200ExceptionsPlugin(dd)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(CreateSessionRequestFilterSensitiveLog,CreateSessionOutputFilterSensitiveLog).ser(se_CreateSessionCommand).de(de_CreateSessionCommand).build(){}const version="3.758.0",packageInfo={version},fromUtf8=Ra=>new TextEncoder().encode(Ra);function isEmptyData$1(Ra){return typeof Ra=="string"?Ra.length===0:Ra.byteLength===0}var SHA_1_HASH={name:"SHA-1"},SHA_1_HMAC_ALGO={name:"HMAC",hash:SHA_1_HASH},EMPTY_DATA_SHA_1=new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]);const fallbackWindow={};function locateWindow(){return typeof window<"u"?window:typeof self<"u"?self:fallbackWindow}var Sha1$1=function(){function Ra(ed){this.toHash=new Uint8Array(0),ed!==void 0&&(this.key=new Promise(function(ud,dd){locateWindow().crypto.subtle.importKey("raw",convertToBuffer$1(ed),SHA_1_HMAC_ALGO,!1,["sign"]).then(ud,dd)}),this.key.catch(function(){}))}return Ra.prototype.update=function(ed){if(!isEmptyData$1(ed)){var ud=convertToBuffer$1(ed),dd=new Uint8Array(this.toHash.byteLength+ud.byteLength);dd.set(this.toHash,0),dd.set(ud,this.toHash.byteLength),this.toHash=dd}},Ra.prototype.digest=function(){var ed=this;return this.key?this.key.then(function(ud){return locateWindow().crypto.subtle.sign(SHA_1_HMAC_ALGO,ud,ed.toHash).then(function(dd){return new Uint8Array(dd)})}):isEmptyData$1(this.toHash)?Promise.resolve(EMPTY_DATA_SHA_1):Promise.resolve().then(function(){return locateWindow().crypto.subtle.digest(SHA_1_HASH,ed.toHash)}).then(function(ud){return Promise.resolve(new Uint8Array(ud))})},Ra.prototype.reset=function(){this.toHash=new Uint8Array(0)},Ra}();function convertToBuffer$1(Ra){return typeof Ra=="string"?fromUtf8(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra)}var subtleCryptoMethods=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function supportsWebCrypto(Ra){if(supportsSecureRandom(Ra)&&typeof Ra.crypto.subtle=="object"){var ed=Ra.crypto.subtle;return supportsSubtleCrypto(ed)}return!1}function supportsSecureRandom(Ra){if(typeof Ra=="object"&&typeof Ra.crypto=="object"){var ed=Ra.crypto.getRandomValues;return typeof ed=="function"}return!1}function supportsSubtleCrypto(Ra){return Ra&&subtleCryptoMethods.every(function(ed){return typeof Ra[ed]=="function"})}var Sha1=function(){function Ra(ed){if(supportsWebCrypto(locateWindow()))this.hash=new Sha1$1(ed);else throw new Error("SHA1 not supported")}return Ra.prototype.update=function(ed,ud){this.hash.update(convertToBuffer$2(ed))},Ra.prototype.digest=function(){return this.hash.digest()},Ra.prototype.reset=function(){this.hash.reset()},Ra}(),SHA_256_HASH={name:"SHA-256"},SHA_256_HMAC_ALGO={name:"HMAC",hash:SHA_256_HASH},EMPTY_DATA_SHA_256=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]),Sha256$2=function(){function Ra(ed){this.toHash=new Uint8Array(0),this.secret=ed,this.reset()}return Ra.prototype.update=function(ed){if(!isEmptyData$2(ed)){var ud=convertToBuffer$2(ed),dd=new Uint8Array(this.toHash.byteLength+ud.byteLength);dd.set(this.toHash,0),dd.set(ud,this.toHash.byteLength),this.toHash=dd}},Ra.prototype.digest=function(){var ed=this;return this.key?this.key.then(function(ud){return locateWindow().crypto.subtle.sign(SHA_256_HMAC_ALGO,ud,ed.toHash).then(function(dd){return new Uint8Array(dd)})}):isEmptyData$2(this.toHash)?Promise.resolve(EMPTY_DATA_SHA_256):Promise.resolve().then(function(){return locateWindow().crypto.subtle.digest(SHA_256_HASH,ed.toHash)}).then(function(ud){return Promise.resolve(new Uint8Array(ud))})},Ra.prototype.reset=function(){var ed=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(ud,dd){locateWindow().crypto.subtle.importKey("raw",convertToBuffer$2(ed.secret),SHA_256_HMAC_ALGO,!1,["sign"]).then(ud,dd)}),this.key.catch(function(){}))},Ra}(),BLOCK_SIZE$1=64,DIGEST_LENGTH$1=32,KEY=new Uint32Array([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]),INIT$1=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],MAX_HASHABLE_LENGTH=Math.pow(2,53)-1,RawSha256=function(){function Ra(){this.state=Int32Array.from(INIT$1),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return Ra.prototype.update=function(ed){if(this.finished)throw new Error("Attempted to update an already finished hash.");var ud=0,dd=ed.byteLength;if(this.bytesHashed+=dd,this.bytesHashed*8>MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;dd>0;)this.buffer[this.bufferLength++]=ed[ud++],dd--,this.bufferLength===BLOCK_SIZE$1&&(this.hashBuffer(),this.bufferLength=0)},Ra.prototype.digest=function(){if(!this.finished){var ed=this.bytesHashed*8,ud=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),dd=this.bufferLength;if(ud.setUint8(this.bufferLength++,128),dd%BLOCK_SIZE$1>=BLOCK_SIZE$1-8){for(var hd=this.bufferLength;hd>>24&255,md[hd*4+1]=this.state[hd]>>>16&255,md[hd*4+2]=this.state[hd]>>>8&255,md[hd*4+3]=this.state[hd]>>>0&255;return md},Ra.prototype.hashBuffer=function(){for(var ed=this,ud=ed.buffer,dd=ed.state,hd=dd[0],md=dd[1],gd=dd[2],yd=dd[3],vd=dd[4],Cd=dd[5],wd=dd[6],Nd=dd[7],Ld=0;Ld>>17|Ud<<15)^(Ud>>>19|Ud<<13)^Ud>>>10;Ud=this.temp[Ld-15];var Gd=(Ud>>>7|Ud<<25)^(Ud>>>18|Ud<<14)^Ud>>>3;this.temp[Ld]=(jd+this.temp[Ld-7]|0)+(Gd+this.temp[Ld-16]|0)}var Yd=(((vd>>>6|vd<<26)^(vd>>>11|vd<<21)^(vd>>>25|vd<<7))+(vd&Cd^~vd&wd)|0)+(Nd+(KEY[Ld]+this.temp[Ld]|0)|0)|0,zd=((hd>>>2|hd<<30)^(hd>>>13|hd<<19)^(hd>>>22|hd<<10))+(hd&md^hd&gd^md&gd)|0;Nd=wd,wd=Cd,Cd=vd,vd=yd+Yd|0,yd=gd,gd=md,md=hd,hd=Yd+zd|0}dd[0]+=hd,dd[1]+=md,dd[2]+=gd,dd[3]+=yd,dd[4]+=vd,dd[5]+=Cd,dd[6]+=wd,dd[7]+=Nd},Ra}(),Sha256$1=function(){function Ra(ed){this.secret=ed,this.hash=new RawSha256,this.reset()}return Ra.prototype.update=function(ed){if(!(isEmptyData$2(ed)||this.error))try{this.hash.update(convertToBuffer$2(ed))}catch(ud){this.error=ud}},Ra.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},Ra.prototype.digest=function(){return __awaiter$8(this,void 0,void 0,function(){return __generator$8(this,function(ed){return[2,this.digestSync()]})})},Ra.prototype.reset=function(){if(this.hash=new RawSha256,this.secret){this.outer=new RawSha256;var ed=bufferFromSecret(this.secret),ud=new Uint8Array(BLOCK_SIZE$1);ud.set(ed);for(var dd=0;ddBLOCK_SIZE$1){var ud=new RawSha256;ud.update(ed),ed=ud.digest()}var dd=new Uint8Array(BLOCK_SIZE$1);return dd.set(ed),dd}var Sha256=function(){function Ra(ed){supportsWebCrypto(locateWindow())?this.hash=new Sha256$2(ed):this.hash=new Sha256$1(ed)}return Ra.prototype.update=function(ed,ud){this.hash.update(convertToBuffer$2(ed))},Ra.prototype.digest=function(){return this.hash.digest()},Ra.prototype.reset=function(){this.hash.reset()},Ra}();const BROWSER_ALIASES_MAP={"Amazon Silk":"amazon_silk","Android Browser":"android",Bada:"bada",BlackBerry:"blackberry",Chrome:"chrome",Chromium:"chromium",Electron:"electron",Epiphany:"epiphany",Firefox:"firefox",Focus:"focus",Generic:"generic","Google Search":"google_search",Googlebot:"googlebot","Internet Explorer":"ie","K-Meleon":"k_meleon",Maxthon:"maxthon","Microsoft Edge":"edge","MZ Browser":"mz","NAVER Whale Browser":"naver",Opera:"opera","Opera Coast":"opera_coast",PhantomJS:"phantomjs",Puffin:"puffin",QupZilla:"qupzilla",QQ:"qq",QQLite:"qqlite",Safari:"safari",Sailfish:"sailfish","Samsung Internet for Android":"samsung_internet",SeaMonkey:"seamonkey",Sleipnir:"sleipnir",Swing:"swing",Tizen:"tizen","UC Browser":"uc",Vivaldi:"vivaldi","WebOS Browser":"webos",WeChat:"wechat","Yandex Browser":"yandex",Roku:"roku"},BROWSER_MAP={amazon_silk:"Amazon Silk",android:"Android Browser",bada:"Bada",blackberry:"BlackBerry",chrome:"Chrome",chromium:"Chromium",electron:"Electron",epiphany:"Epiphany",firefox:"Firefox",focus:"Focus",generic:"Generic",googlebot:"Googlebot",google_search:"Google Search",ie:"Internet Explorer",k_meleon:"K-Meleon",maxthon:"Maxthon",edge:"Microsoft Edge",mz:"MZ Browser",naver:"NAVER Whale Browser",opera:"Opera",opera_coast:"Opera Coast",phantomjs:"PhantomJS",puffin:"Puffin",qupzilla:"QupZilla",qq:"QQ Browser",qqlite:"QQ Browser Lite",safari:"Safari",sailfish:"Sailfish",samsung_internet:"Samsung Internet for Android",seamonkey:"SeaMonkey",sleipnir:"Sleipnir",swing:"Swing",tizen:"Tizen",uc:"UC Browser",vivaldi:"Vivaldi",webos:"WebOS Browser",wechat:"WeChat",yandex:"Yandex Browser"},PLATFORMS_MAP={tablet:"tablet",mobile:"mobile",desktop:"desktop",tv:"tv"},OS_MAP={WindowsPhone:"Windows Phone",Windows:"Windows",MacOS:"macOS",iOS:"iOS",Android:"Android",WebOS:"WebOS",BlackBerry:"BlackBerry",Bada:"Bada",Tizen:"Tizen",Linux:"Linux",ChromeOS:"Chrome OS",PlayStation4:"PlayStation 4",Roku:"Roku"},ENGINE_MAP={EdgeHTML:"EdgeHTML",Blink:"Blink",Trident:"Trident",Presto:"Presto",Gecko:"Gecko",WebKit:"WebKit"};class Utils{static getFirstMatch(ed,ud){const dd=ud.match(ed);return dd&&dd.length>0&&dd[1]||""}static getSecondMatch(ed,ud){const dd=ud.match(ed);return dd&&dd.length>1&&dd[2]||""}static matchAndReturnConst(ed,ud,dd){if(ed.test(ud))return dd}static getWindowsVersionName(ed){switch(ed){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}}static getMacOSVersionName(ed){const ud=ed.split(".").splice(0,2).map(dd=>parseInt(dd,10)||0);if(ud.push(0),ud[0]===10)switch(ud[1]){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}}static getAndroidVersionName(ed){const ud=ed.split(".").splice(0,2).map(dd=>parseInt(dd,10)||0);if(ud.push(0),!(ud[0]===1&&ud[1]<5)){if(ud[0]===1&&ud[1]<6)return"Cupcake";if(ud[0]===1&&ud[1]>=6)return"Donut";if(ud[0]===2&&ud[1]<2)return"Eclair";if(ud[0]===2&&ud[1]===2)return"Froyo";if(ud[0]===2&&ud[1]>2)return"Gingerbread";if(ud[0]===3)return"Honeycomb";if(ud[0]===4&&ud[1]<1)return"Ice Cream Sandwich";if(ud[0]===4&&ud[1]<4)return"Jelly Bean";if(ud[0]===4&&ud[1]>=4)return"KitKat";if(ud[0]===5)return"Lollipop";if(ud[0]===6)return"Marshmallow";if(ud[0]===7)return"Nougat";if(ud[0]===8)return"Oreo";if(ud[0]===9)return"Pie"}}static getVersionPrecision(ed){return ed.split(".").length}static compareVersions(ed,ud,dd=!1){const hd=Utils.getVersionPrecision(ed),md=Utils.getVersionPrecision(ud);let gd=Math.max(hd,md),yd=0;const vd=Utils.map([ed,ud],Cd=>{const wd=gd-Utils.getVersionPrecision(Cd),Nd=Cd+new Array(wd+1).join(".0");return Utils.map(Nd.split("."),Ld=>new Array(20-Ld.length).join("0")+Ld).reverse()});for(dd&&(yd=gd-Math.min(hd,md)),gd-=1;gd>=yd;){if(vd[0][gd]>vd[1][gd])return 1;if(vd[0][gd]===vd[1][gd]){if(gd===yd)return 0;gd-=1}else if(vd[0][gd]{dd[vd]=gd[vd]})}return ed}static getBrowserAlias(ed){return BROWSER_ALIASES_MAP[ed]}static getBrowserTypeByAlias(ed){return BROWSER_MAP[ed]||""}}const commonVersionIdentifier=/version\/(\d+(\.?_?\d+)+)/i,browsersList=[{test:[/googlebot/i],describe(Ra){const ed={name:"Googlebot"},ud=Utils.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/opera/i],describe(Ra){const ed={name:"Opera"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/opr\/|opios/i],describe(Ra){const ed={name:"Opera"},ud=Utils.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/SamsungBrowser/i],describe(Ra){const ed={name:"Samsung Internet for Android"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/Whale/i],describe(Ra){const ed={name:"NAVER Whale Browser"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/MZBrowser/i],describe(Ra){const ed={name:"MZ Browser"},ud=Utils.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/focus/i],describe(Ra){const ed={name:"Focus"},ud=Utils.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/swing/i],describe(Ra){const ed={name:"Swing"},ud=Utils.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/coast/i],describe(Ra){const ed={name:"Opera Coast"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe(Ra){const ed={name:"Opera Touch"},ud=Utils.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/yabrowser/i],describe(Ra){const ed={name:"Yandex Browser"},ud=Utils.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/ucbrowser/i],describe(Ra){const ed={name:"UC Browser"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/Maxthon|mxios/i],describe(Ra){const ed={name:"Maxthon"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/epiphany/i],describe(Ra){const ed={name:"Epiphany"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/puffin/i],describe(Ra){const ed={name:"Puffin"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/sleipnir/i],describe(Ra){const ed={name:"Sleipnir"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/k-meleon/i],describe(Ra){const ed={name:"K-Meleon"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/micromessenger/i],describe(Ra){const ed={name:"WeChat"},ud=Utils.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/qqbrowser/i],describe(Ra){const ed={name:/qqbrowserlite/i.test(Ra)?"QQ Browser Lite":"QQ Browser"},ud=Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/msie|trident/i],describe(Ra){const ed={name:"Internet Explorer"},ud=Utils.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/\sedg\//i],describe(Ra){const ed={name:"Microsoft Edge"},ud=Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/edg([ea]|ios)/i],describe(Ra){const ed={name:"Microsoft Edge"},ud=Utils.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/vivaldi/i],describe(Ra){const ed={name:"Vivaldi"},ud=Utils.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/seamonkey/i],describe(Ra){const ed={name:"SeaMonkey"},ud=Utils.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/sailfish/i],describe(Ra){const ed={name:"Sailfish"},ud=Utils.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/silk/i],describe(Ra){const ed={name:"Amazon Silk"},ud=Utils.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/phantom/i],describe(Ra){const ed={name:"PhantomJS"},ud=Utils.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/slimerjs/i],describe(Ra){const ed={name:"SlimerJS"},ud=Utils.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(Ra){const ed={name:"BlackBerry"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/(web|hpw)[o0]s/i],describe(Ra){const ed={name:"WebOS Browser"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra)||Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/bada/i],describe(Ra){const ed={name:"Bada"},ud=Utils.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/tizen/i],describe(Ra){const ed={name:"Tizen"},ud=Utils.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/qupzilla/i],describe(Ra){const ed={name:"QupZilla"},ud=Utils.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/firefox|iceweasel|fxios/i],describe(Ra){const ed={name:"Firefox"},ud=Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/electron/i],describe(Ra){const ed={name:"Electron"},ud=Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/MiuiBrowser/i],describe(Ra){const ed={name:"Miui"},ud=Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/chromium/i],describe(Ra){const ed={name:"Chromium"},ud=Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,Ra)||Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/chrome|crios|crmo/i],describe(Ra){const ed={name:"Chrome"},ud=Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/GSA/i],describe(Ra){const ed={name:"Google Search"},ud=Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test(Ra){const ed=!Ra.test(/like android/i),ud=Ra.test(/android/i);return ed&&ud},describe(Ra){const ed={name:"Android Browser"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/playstation 4/i],describe(Ra){const ed={name:"PlayStation 4"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/safari|applewebkit/i],describe(Ra){const ed={name:"Safari"},ud=Utils.getFirstMatch(commonVersionIdentifier,Ra);return ud&&(ed.version=ud),ed}},{test:[/.*/i],describe(Ra){const ed=/^(.*)\/(.*) /,ud=/^(.*)\/(.*)[ \t]\((.*)/,hd=Ra.search("\\(")!==-1?ud:ed;return{name:Utils.getFirstMatch(hd,Ra),version:Utils.getSecondMatch(hd,Ra)}}}],osParsersList=[{test:[/Roku\/DVP/],describe(Ra){const ed=Utils.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,Ra);return{name:OS_MAP.Roku,version:ed}}},{test:[/windows phone/i],describe(Ra){const ed=Utils.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.WindowsPhone,version:ed}}},{test:[/windows /i],describe(Ra){const ed=Utils.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,Ra),ud=Utils.getWindowsVersionName(ed);return{name:OS_MAP.Windows,version:ed,versionName:ud}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(Ra){const ed={name:OS_MAP.iOS},ud=Utils.getSecondMatch(/(Version\/)(\d[\d.]+)/,Ra);return ud&&(ed.version=ud),ed}},{test:[/macintosh/i],describe(Ra){const ed=Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,Ra).replace(/[_\s]/g,"."),ud=Utils.getMacOSVersionName(ed),dd={name:OS_MAP.MacOS,version:ed};return ud&&(dd.versionName=ud),dd}},{test:[/(ipod|iphone|ipad)/i],describe(Ra){const ed=Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,Ra).replace(/[_\s]/g,".");return{name:OS_MAP.iOS,version:ed}}},{test(Ra){const ed=!Ra.test(/like android/i),ud=Ra.test(/android/i);return ed&&ud},describe(Ra){const ed=Utils.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,Ra),ud=Utils.getAndroidVersionName(ed),dd={name:OS_MAP.Android,version:ed};return ud&&(dd.versionName=ud),dd}},{test:[/(web|hpw)[o0]s/i],describe(Ra){const ed=Utils.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,Ra),ud={name:OS_MAP.WebOS};return ed&&ed.length&&(ud.version=ed),ud}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe(Ra){const ed=Utils.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,Ra)||Utils.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,Ra)||Utils.getFirstMatch(/\bbb(\d+)/i,Ra);return{name:OS_MAP.BlackBerry,version:ed}}},{test:[/bada/i],describe(Ra){const ed=Utils.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.Bada,version:ed}}},{test:[/tizen/i],describe(Ra){const ed=Utils.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.Tizen,version:ed}}},{test:[/linux/i],describe(){return{name:OS_MAP.Linux}}},{test:[/CrOS/],describe(){return{name:OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe(Ra){const ed=Utils.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,Ra);return{name:OS_MAP.PlayStation4,version:ed}}}],platformParsersList=[{test:[/googlebot/i],describe(){return{type:"bot",vendor:"Google"}}},{test:[/huawei/i],describe(Ra){const ed=Utils.getFirstMatch(/(can-l01)/i,Ra)&&"Nova",ud={type:PLATFORMS_MAP.mobile,vendor:"Huawei"};return ed&&(ud.model=ed),ud}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe(){return{type:PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe(){return{type:PLATFORMS_MAP.tablet}}},{test(Ra){const ed=Ra.test(/ipod|iphone/i),ud=Ra.test(/like (ipod|iphone)/i);return ed&&!ud},describe(Ra){const ed=Utils.getFirstMatch(/(ipod|iphone)/i,Ra);return{type:PLATFORMS_MAP.mobile,vendor:"Apple",model:ed}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe(){return{type:PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/[^-]mobi/i],describe(){return{type:PLATFORMS_MAP.mobile}}},{test(Ra){return Ra.getBrowserName(!0)==="blackberry"},describe(){return{type:PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test(Ra){return Ra.getBrowserName(!0)==="bada"},describe(){return{type:PLATFORMS_MAP.mobile}}},{test(Ra){return Ra.getBrowserName()==="windows phone"},describe(){return{type:PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test(Ra){const ed=Number(String(Ra.getOSVersion()).split(".")[0]);return Ra.getOSName(!0)==="android"&&ed>=3},describe(){return{type:PLATFORMS_MAP.tablet}}},{test(Ra){return Ra.getOSName(!0)==="android"},describe(){return{type:PLATFORMS_MAP.mobile}}},{test(Ra){return Ra.getOSName(!0)==="macos"},describe(){return{type:PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test(Ra){return Ra.getOSName(!0)==="windows"},describe(){return{type:PLATFORMS_MAP.desktop}}},{test(Ra){return Ra.getOSName(!0)==="linux"},describe(){return{type:PLATFORMS_MAP.desktop}}},{test(Ra){return Ra.getOSName(!0)==="playstation 4"},describe(){return{type:PLATFORMS_MAP.tv}}},{test(Ra){return Ra.getOSName(!0)==="roku"},describe(){return{type:PLATFORMS_MAP.tv}}}],enginesParsersList=[{test(Ra){return Ra.getBrowserName(!0)==="microsoft edge"},describe(Ra){if(/\sedg\//i.test(Ra))return{name:ENGINE_MAP.Blink};const ud=Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,Ra);return{name:ENGINE_MAP.EdgeHTML,version:ud}}},{test:[/trident/i],describe(Ra){const ed={name:ENGINE_MAP.Trident},ud=Utils.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test(Ra){return Ra.test(/presto/i)},describe(Ra){const ed={name:ENGINE_MAP.Presto},ud=Utils.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test(Ra){const ed=Ra.test(/gecko/i),ud=Ra.test(/like gecko/i);return ed&&!ud},describe(Ra){const ed={name:ENGINE_MAP.Gecko},ud=Utils.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}},{test:[/(apple)?webkit\/537\.36/i],describe(){return{name:ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe(Ra){const ed={name:ENGINE_MAP.WebKit},ud=Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,Ra);return ud&&(ed.version=ud),ed}}];class Parser{constructor(ed,ud=!1){if(ed==null||ed==="")throw new Error("UserAgent parameter can't be empty");this._ua=ed,this.parsedResult={},ud!==!0&&this.parse()}getUA(){return this._ua}test(ed){return ed.test(this._ua)}parseBrowser(){this.parsedResult.browser={};const ed=Utils.find(browsersList,ud=>{if(typeof ud.test=="function")return ud.test(this);if(ud.test instanceof Array)return ud.test.some(dd=>this.test(dd));throw new Error("Browser's test function is not valid")});return ed&&(this.parsedResult.browser=ed.describe(this.getUA())),this.parsedResult.browser}getBrowser(){return this.parsedResult.browser?this.parsedResult.browser:this.parseBrowser()}getBrowserName(ed){return ed?String(this.getBrowser().name).toLowerCase()||"":this.getBrowser().name||""}getBrowserVersion(){return this.getBrowser().version}getOS(){return this.parsedResult.os?this.parsedResult.os:this.parseOS()}parseOS(){this.parsedResult.os={};const ed=Utils.find(osParsersList,ud=>{if(typeof ud.test=="function")return ud.test(this);if(ud.test instanceof Array)return ud.test.some(dd=>this.test(dd));throw new Error("Browser's test function is not valid")});return ed&&(this.parsedResult.os=ed.describe(this.getUA())),this.parsedResult.os}getOSName(ed){const{name:ud}=this.getOS();return ed?String(ud).toLowerCase()||"":ud||""}getOSVersion(){return this.getOS().version}getPlatform(){return this.parsedResult.platform?this.parsedResult.platform:this.parsePlatform()}getPlatformType(ed=!1){const{type:ud}=this.getPlatform();return ed?String(ud).toLowerCase()||"":ud||""}parsePlatform(){this.parsedResult.platform={};const ed=Utils.find(platformParsersList,ud=>{if(typeof ud.test=="function")return ud.test(this);if(ud.test instanceof Array)return ud.test.some(dd=>this.test(dd));throw new Error("Browser's test function is not valid")});return ed&&(this.parsedResult.platform=ed.describe(this.getUA())),this.parsedResult.platform}getEngine(){return this.parsedResult.engine?this.parsedResult.engine:this.parseEngine()}getEngineName(ed){return ed?String(this.getEngine().name).toLowerCase()||"":this.getEngine().name||""}parseEngine(){this.parsedResult.engine={};const ed=Utils.find(enginesParsersList,ud=>{if(typeof ud.test=="function")return ud.test(this);if(ud.test instanceof Array)return ud.test.some(dd=>this.test(dd));throw new Error("Browser's test function is not valid")});return ed&&(this.parsedResult.engine=ed.describe(this.getUA())),this.parsedResult.engine}parse(){return this.parseBrowser(),this.parseOS(),this.parsePlatform(),this.parseEngine(),this}getResult(){return Utils.assign({},this.parsedResult)}satisfies(ed){const ud={};let dd=0;const hd={};let md=0;if(Object.keys(ed).forEach(yd=>{const vd=ed[yd];typeof vd=="string"?(hd[yd]=vd,md+=1):typeof vd=="object"&&(ud[yd]=vd,dd+=1)}),dd>0){const yd=Object.keys(ud),vd=Utils.find(yd,wd=>this.isOS(wd));if(vd){const wd=this.satisfies(ud[vd]);if(wd!==void 0)return wd}const Cd=Utils.find(yd,wd=>this.isPlatform(wd));if(Cd){const wd=this.satisfies(ud[Cd]);if(wd!==void 0)return wd}}if(md>0){const yd=Object.keys(hd),vd=Utils.find(yd,Cd=>this.isBrowser(Cd,!0));if(vd!==void 0)return this.compareVersion(hd[vd])}}isBrowser(ed,ud=!1){const dd=this.getBrowserName().toLowerCase();let hd=ed.toLowerCase();const md=Utils.getBrowserTypeByAlias(hd);return ud&&md&&(hd=md.toLowerCase()),hd===dd}compareVersion(ed){let ud=[0],dd=ed,hd=!1;const md=this.getBrowserVersion();if(typeof md=="string")return ed[0]===">"||ed[0]==="<"?(dd=ed.substr(1),ed[1]==="="?(hd=!0,dd=ed.substr(2)):ud=[],ed[0]===">"?ud.push(1):ud.push(-1)):ed[0]==="="?dd=ed.substr(1):ed[0]==="~"&&(hd=!0,dd=ed.substr(1)),ud.indexOf(Utils.compareVersions(md,dd,hd))>-1}isOS(ed){return this.getOSName(!0)===String(ed).toLowerCase()}isPlatform(ed){return this.getPlatformType(!0)===String(ed).toLowerCase()}isEngine(ed){return this.getEngineName(!0)===String(ed).toLowerCase()}is(ed,ud=!1){return this.isBrowser(ed,ud)||this.isOS(ed)||this.isPlatform(ed)}some(ed=[]){return ed.some(ud=>this.is(ud))}}/*! * Bowser - a browser detector * https://github.com/lancedikson/bowser * MIT License | (c) Dustin Diaz 2012-2015 * MIT License | (c) Denis Demchenko 2015-2019 - */class Bowser{static getParser(qa,rd=!1){if(typeof qa!="string")throw new Error("UserAgent should be a string");return new Parser(qa,rd)}static parse(qa){return new Parser(qa).getResult()}static get BROWSER_MAP(){return BROWSER_MAP}static get ENGINE_MAP(){return ENGINE_MAP}static get OS_MAP(){return OS_MAP}static get PLATFORMS_MAP(){return PLATFORMS_MAP}}const createDefaultUserAgentProvider=({serviceId:Ra,clientVersion:qa})=>async rd=>{var hd,md,gd,yd,vd,Nd;const sd=typeof window<"u"&&((hd=window==null?void 0:window.navigator)!=null&&hd.userAgent)?Bowser.parse(window.navigator.userAgent):void 0,pd=[["aws-sdk-js",qa],["ua","2.1"],[`os/${((md=sd==null?void 0:sd.os)==null?void 0:md.name)||"other"}`,(gd=sd==null?void 0:sd.os)==null?void 0:gd.version],["lang/js"],["md/browser",`${((yd=sd==null?void 0:sd.browser)==null?void 0:yd.name)??"unknown"}_${((vd=sd==null?void 0:sd.browser)==null?void 0:vd.version)??"unknown"}`]];Ra&&pd.push([`api/${Ra}`,qa]);const fd=await((Nd=rd==null?void 0:rd.userAgentAppId)==null?void 0:Nd.call(rd));return fd&&pd.push([`app/${fd}`]),pd};class Int64{constructor(qa){if(this.bytes=qa,qa.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(qa){if(qa>9223372036854776e3||qa<-9223372036854776e3)throw new Error(`${qa} is too large (or, if negative, too small) to represent as an Int64`);const rd=new Uint8Array(8);for(let sd=7,pd=Math.abs(Math.round(qa));sd>-1&&pd>0;sd--,pd/=256)rd[sd]=pd;return qa<0&&negate(rd),new Int64(rd)}valueOf(){const qa=this.bytes.slice(0),rd=qa[0]&128;return rd&&negate(qa),parseInt(toHex(qa),16)*(rd?-1:1)}toString(){return String(this.valueOf())}}function negate(Ra){for(let qa=0;qa<8;qa++)Ra[qa]^=255;for(let qa=7;qa>-1&&(Ra[qa]++,Ra[qa]===0);qa--);}class HeaderMarshaller{constructor(qa,rd){this.toUtf8=qa,this.fromUtf8=rd}format(qa){const rd=[];for(const fd of Object.keys(qa)){const hd=this.fromUtf8(fd);rd.push(Uint8Array.from([hd.byteLength]),hd,this.formatHeaderValue(qa[fd]))}const sd=new Uint8Array(rd.reduce((fd,hd)=>fd+hd.byteLength,0));let pd=0;for(const fd of rd)sd.set(fd,pd),pd+=fd.byteLength;return sd}formatHeaderValue(qa){switch(qa.type){case"boolean":return Uint8Array.from([qa.value?0:1]);case"byte":return Uint8Array.from([2,qa.value]);case"short":const rd=new DataView(new ArrayBuffer(3));return rd.setUint8(0,3),rd.setInt16(1,qa.value,!1),new Uint8Array(rd.buffer);case"integer":const sd=new DataView(new ArrayBuffer(5));return sd.setUint8(0,4),sd.setInt32(1,qa.value,!1),new Uint8Array(sd.buffer);case"long":const pd=new Uint8Array(9);return pd[0]=5,pd.set(qa.value.bytes,1),pd;case"binary":const fd=new DataView(new ArrayBuffer(3+qa.value.byteLength));fd.setUint8(0,6),fd.setUint16(1,qa.value.byteLength,!1);const hd=new Uint8Array(fd.buffer);return hd.set(qa.value,3),hd;case"string":const md=this.fromUtf8(qa.value),gd=new DataView(new ArrayBuffer(3+md.byteLength));gd.setUint8(0,7),gd.setUint16(1,md.byteLength,!1);const yd=new Uint8Array(gd.buffer);return yd.set(md,3),yd;case"timestamp":const vd=new Uint8Array(9);return vd[0]=8,vd.set(Int64.fromNumber(qa.value.valueOf()).bytes,1),vd;case"uuid":if(!UUID_PATTERN.test(qa.value))throw new Error(`Invalid UUID received: ${qa.value}`);const Nd=new Uint8Array(17);return Nd[0]=9,Nd.set(fromHex(qa.value.replace(/\-/g,"")),1),Nd}}parse(qa){const rd={};let sd=0;for(;sd{if(typeof md!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+md);qa=md,rd=4,sd=new Uint8Array(md),new DataView(sd.buffer).setUint32(0,md,!1)},hd=async function*(){const md=Ra[Symbol.asyncIterator]();for(;;){const{value:gd,done:yd}=await md.next();if(yd){if(qa)if(qa===rd)yield sd;else throw new Error("Truncated event message received.");else return;return}const vd=gd.length;let Nd=0;for(;Nd({[Symbol.asyncIterator]:async function*(){const qa=Ra.getReader();try{for(;;){const{done:rd,value:sd}=await qa.read();if(rd)return;yield sd}}finally{qa.releaseLock()}}}),iterableToReadableStream=Ra=>{const qa=Ra[Symbol.asyncIterator]();return new ReadableStream({async pull(rd){const{done:sd,value:pd}=await qa.next();if(sd)return rd.close();rd.enqueue(pd)}})};class EventStreamMarshaller{constructor({utf8Encoder:qa,utf8Decoder:rd}){this.universalMarshaller=new EventStreamMarshaller$1({utf8Decoder:rd,utf8Encoder:qa})}deserialize(qa,rd){const sd=isReadableStream$1(qa)?readableStreamtoIterable(qa):qa;return this.universalMarshaller.deserialize(sd,rd)}serialize(qa,rd){const sd=this.universalMarshaller.serialize(qa,rd);return typeof ReadableStream=="function"?iterableToReadableStream(sd):sd}}const isReadableStream$1=Ra=>typeof ReadableStream=="function"&&Ra instanceof ReadableStream,eventStreamSerdeProvider=Ra=>new EventStreamMarshaller(Ra);async function blobReader(Ra,qa,rd=1024*1024){const sd=Ra.size;let pd=0;for(;pd{sd.update(pd)}),sd.digest()},invalidProvider=Ra=>()=>Promise.reject(Ra),BLOCK_SIZE=64,DIGEST_LENGTH=16,INIT=[1732584193,4023233417,2562383102,271733878];class Md5{constructor(){this.reset()}update(qa){if(isEmptyData(qa))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const rd=convertToBuffer(qa);let sd=0,{byteLength:pd}=rd;for(this.bytesHashed+=pd;pd>0;)this.buffer.setUint8(this.bufferLength++,rd[sd++]),pd--,this.bufferLength===BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:rd,bufferLength:sd,bytesHashed:pd}=this,fd=pd*8;if(rd.setUint8(this.bufferLength++,128),sd%BLOCK_SIZE>=BLOCK_SIZE-8){for(let hd=this.bufferLength;hd>>0,!0),rd.setUint32(BLOCK_SIZE-4,Math.floor(fd/4294967296),!0),this.hashBuffer(),this.finished=!0}const qa=new DataView(new ArrayBuffer(DIGEST_LENGTH));for(let rd=0;rd<4;rd++)qa.setUint32(rd*4,this.state[rd],!0);return new Uint8Array(qa.buffer,qa.byteOffset,qa.byteLength)}hashBuffer(){const{buffer:qa,state:rd}=this;let sd=rd[0],pd=rd[1],fd=rd[2],hd=rd[3];sd=ff(sd,pd,fd,hd,qa.getUint32(0,!0),7,3614090360),hd=ff(hd,sd,pd,fd,qa.getUint32(4,!0),12,3905402710),fd=ff(fd,hd,sd,pd,qa.getUint32(8,!0),17,606105819),pd=ff(pd,fd,hd,sd,qa.getUint32(12,!0),22,3250441966),sd=ff(sd,pd,fd,hd,qa.getUint32(16,!0),7,4118548399),hd=ff(hd,sd,pd,fd,qa.getUint32(20,!0),12,1200080426),fd=ff(fd,hd,sd,pd,qa.getUint32(24,!0),17,2821735955),pd=ff(pd,fd,hd,sd,qa.getUint32(28,!0),22,4249261313),sd=ff(sd,pd,fd,hd,qa.getUint32(32,!0),7,1770035416),hd=ff(hd,sd,pd,fd,qa.getUint32(36,!0),12,2336552879),fd=ff(fd,hd,sd,pd,qa.getUint32(40,!0),17,4294925233),pd=ff(pd,fd,hd,sd,qa.getUint32(44,!0),22,2304563134),sd=ff(sd,pd,fd,hd,qa.getUint32(48,!0),7,1804603682),hd=ff(hd,sd,pd,fd,qa.getUint32(52,!0),12,4254626195),fd=ff(fd,hd,sd,pd,qa.getUint32(56,!0),17,2792965006),pd=ff(pd,fd,hd,sd,qa.getUint32(60,!0),22,1236535329),sd=gg(sd,pd,fd,hd,qa.getUint32(4,!0),5,4129170786),hd=gg(hd,sd,pd,fd,qa.getUint32(24,!0),9,3225465664),fd=gg(fd,hd,sd,pd,qa.getUint32(44,!0),14,643717713),pd=gg(pd,fd,hd,sd,qa.getUint32(0,!0),20,3921069994),sd=gg(sd,pd,fd,hd,qa.getUint32(20,!0),5,3593408605),hd=gg(hd,sd,pd,fd,qa.getUint32(40,!0),9,38016083),fd=gg(fd,hd,sd,pd,qa.getUint32(60,!0),14,3634488961),pd=gg(pd,fd,hd,sd,qa.getUint32(16,!0),20,3889429448),sd=gg(sd,pd,fd,hd,qa.getUint32(36,!0),5,568446438),hd=gg(hd,sd,pd,fd,qa.getUint32(56,!0),9,3275163606),fd=gg(fd,hd,sd,pd,qa.getUint32(12,!0),14,4107603335),pd=gg(pd,fd,hd,sd,qa.getUint32(32,!0),20,1163531501),sd=gg(sd,pd,fd,hd,qa.getUint32(52,!0),5,2850285829),hd=gg(hd,sd,pd,fd,qa.getUint32(8,!0),9,4243563512),fd=gg(fd,hd,sd,pd,qa.getUint32(28,!0),14,1735328473),pd=gg(pd,fd,hd,sd,qa.getUint32(48,!0),20,2368359562),sd=hh(sd,pd,fd,hd,qa.getUint32(20,!0),4,4294588738),hd=hh(hd,sd,pd,fd,qa.getUint32(32,!0),11,2272392833),fd=hh(fd,hd,sd,pd,qa.getUint32(44,!0),16,1839030562),pd=hh(pd,fd,hd,sd,qa.getUint32(56,!0),23,4259657740),sd=hh(sd,pd,fd,hd,qa.getUint32(4,!0),4,2763975236),hd=hh(hd,sd,pd,fd,qa.getUint32(16,!0),11,1272893353),fd=hh(fd,hd,sd,pd,qa.getUint32(28,!0),16,4139469664),pd=hh(pd,fd,hd,sd,qa.getUint32(40,!0),23,3200236656),sd=hh(sd,pd,fd,hd,qa.getUint32(52,!0),4,681279174),hd=hh(hd,sd,pd,fd,qa.getUint32(0,!0),11,3936430074),fd=hh(fd,hd,sd,pd,qa.getUint32(12,!0),16,3572445317),pd=hh(pd,fd,hd,sd,qa.getUint32(24,!0),23,76029189),sd=hh(sd,pd,fd,hd,qa.getUint32(36,!0),4,3654602809),hd=hh(hd,sd,pd,fd,qa.getUint32(48,!0),11,3873151461),fd=hh(fd,hd,sd,pd,qa.getUint32(60,!0),16,530742520),pd=hh(pd,fd,hd,sd,qa.getUint32(8,!0),23,3299628645),sd=ii(sd,pd,fd,hd,qa.getUint32(0,!0),6,4096336452),hd=ii(hd,sd,pd,fd,qa.getUint32(28,!0),10,1126891415),fd=ii(fd,hd,sd,pd,qa.getUint32(56,!0),15,2878612391),pd=ii(pd,fd,hd,sd,qa.getUint32(20,!0),21,4237533241),sd=ii(sd,pd,fd,hd,qa.getUint32(48,!0),6,1700485571),hd=ii(hd,sd,pd,fd,qa.getUint32(12,!0),10,2399980690),fd=ii(fd,hd,sd,pd,qa.getUint32(40,!0),15,4293915773),pd=ii(pd,fd,hd,sd,qa.getUint32(4,!0),21,2240044497),sd=ii(sd,pd,fd,hd,qa.getUint32(32,!0),6,1873313359),hd=ii(hd,sd,pd,fd,qa.getUint32(60,!0),10,4264355552),fd=ii(fd,hd,sd,pd,qa.getUint32(24,!0),15,2734768916),pd=ii(pd,fd,hd,sd,qa.getUint32(52,!0),21,1309151649),sd=ii(sd,pd,fd,hd,qa.getUint32(16,!0),6,4149444226),hd=ii(hd,sd,pd,fd,qa.getUint32(44,!0),10,3174756917),fd=ii(fd,hd,sd,pd,qa.getUint32(8,!0),15,718787259),pd=ii(pd,fd,hd,sd,qa.getUint32(36,!0),21,3951481745),rd[0]=sd+rd[0]&4294967295,rd[1]=pd+rd[1]&4294967295,rd[2]=fd+rd[2]&4294967295,rd[3]=hd+rd[3]&4294967295}reset(){this.state=Uint32Array.from(INIT),this.buffer=new DataView(new ArrayBuffer(BLOCK_SIZE)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function cmn(Ra,qa,rd,sd,pd,fd){return qa=(qa+Ra&4294967295)+(sd+fd&4294967295)&4294967295,(qa<>>32-pd)+rd&4294967295}function ff(Ra,qa,rd,sd,pd,fd,hd){return cmn(qa&rd|~qa&sd,Ra,qa,pd,fd,hd)}function gg(Ra,qa,rd,sd,pd,fd,hd){return cmn(qa&sd|rd&~sd,Ra,qa,pd,fd,hd)}function hh(Ra,qa,rd,sd,pd,fd,hd){return cmn(qa^rd^sd,Ra,qa,pd,fd,hd)}function ii(Ra,qa,rd,sd,pd,fd,hd){return cmn(rd^(qa|~sd),Ra,qa,pd,fd,hd)}function isEmptyData(Ra){return typeof Ra=="string"?Ra.length===0:Ra.byteLength===0}function convertToBuffer(Ra){return typeof Ra=="string"?fromUtf8$3(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra)}const TEXT_ENCODER=typeof TextEncoder=="function"?new TextEncoder:null,calculateBodyLength=Ra=>{if(typeof Ra=="string"){if(TEXT_ENCODER)return TEXT_ENCODER.encode(Ra).byteLength;let qa=Ra.length;for(let rd=qa-1;rd>=0;rd--){const sd=Ra.charCodeAt(rd);sd>127&&sd<=2047?qa++:sd>2047&&sd<=65535&&(qa+=2),sd>=56320&&sd<=57343&&rd--}return qa}else{if(typeof Ra.byteLength=="number")return Ra.byteLength;if(typeof Ra.size=="number")return Ra.size}throw new Error(`Body Length computation failed for ${Ra}`)},getRuntimeConfig$1=Ra=>({apiVersion:"2006-03-01",base64Decoder:(Ra==null?void 0:Ra.base64Decoder)??fromBase64,base64Encoder:(Ra==null?void 0:Ra.base64Encoder)??toBase64,disableHostPrefix:(Ra==null?void 0:Ra.disableHostPrefix)??!1,endpointProvider:(Ra==null?void 0:Ra.endpointProvider)??defaultEndpointResolver,extensions:(Ra==null?void 0:Ra.extensions)??[],getAwsChunkedEncodingStream:(Ra==null?void 0:Ra.getAwsChunkedEncodingStream)??getAwsChunkedEncodingStream,httpAuthSchemeProvider:(Ra==null?void 0:Ra.httpAuthSchemeProvider)??defaultS3HttpAuthSchemeProvider,httpAuthSchemes:(Ra==null?void 0:Ra.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:qa=>qa.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:qa=>qa.getIdentityProvider("aws.auth#sigv4a"),signer:new AwsSdkSigV4ASigner}],logger:(Ra==null?void 0:Ra.logger)??new NoOpLogger,sdkStreamMixin:(Ra==null?void 0:Ra.sdkStreamMixin)??sdkStreamMixin,serviceId:(Ra==null?void 0:Ra.serviceId)??"S3",signerConstructor:(Ra==null?void 0:Ra.signerConstructor)??SignatureV4MultiRegion,signingEscapePath:(Ra==null?void 0:Ra.signingEscapePath)??!1,urlParser:(Ra==null?void 0:Ra.urlParser)??parseUrl,useArnRegion:(Ra==null?void 0:Ra.useArnRegion)??!1,utf8Decoder:(Ra==null?void 0:Ra.utf8Decoder)??fromUtf8$3,utf8Encoder:(Ra==null?void 0:Ra.utf8Encoder)??toUtf8}),DEFAULTS_MODE_OPTIONS=["in-region","cross-region","mobile","standard","legacy"],resolveDefaultsModeConfig=({defaultsMode:Ra}={})=>memoize$1(async()=>{const qa=typeof Ra=="function"?await Ra():Ra;switch(qa==null?void 0:qa.toLowerCase()){case"auto":return Promise.resolve(isMobileBrowser()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(qa==null?void 0:qa.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${qa}`)}}),isMobileBrowser=()=>{var rd,sd;const Ra=typeof window<"u"&&((rd=window==null?void 0:window.navigator)!=null&&rd.userAgent)?Bowser.parse(window.navigator.userAgent):void 0,qa=(sd=Ra==null?void 0:Ra.platform)==null?void 0:sd.type;return qa==="tablet"||qa==="mobile"},getRuntimeConfig=Ra=>{const qa=resolveDefaultsModeConfig(Ra),rd=()=>qa().then(loadConfigsForDefaultMode),sd=getRuntimeConfig$1(Ra);return{...sd,...Ra,runtime:"browser",defaultsMode:qa,bodyLengthChecker:(Ra==null?void 0:Ra.bodyLengthChecker)??calculateBodyLength,credentialDefaultProvider:(Ra==null?void 0:Ra.credentialDefaultProvider)??(pd=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(Ra==null?void 0:Ra.defaultUserAgentProvider)??createDefaultUserAgentProvider({serviceId:sd.serviceId,clientVersion:packageInfo.version}),eventStreamSerdeProvider:(Ra==null?void 0:Ra.eventStreamSerdeProvider)??eventStreamSerdeProvider,maxAttempts:(Ra==null?void 0:Ra.maxAttempts)??DEFAULT_MAX_ATTEMPTS,md5:(Ra==null?void 0:Ra.md5)??Md5,region:(Ra==null?void 0:Ra.region)??invalidProvider("Region is missing"),requestHandler:FetchHttpHandler.create((Ra==null?void 0:Ra.requestHandler)??rd),retryMode:(Ra==null?void 0:Ra.retryMode)??(async()=>(await rd()).retryMode||DEFAULT_RETRY_MODE),sha1:(Ra==null?void 0:Ra.sha1)??Sha1,sha256:(Ra==null?void 0:Ra.sha256)??Sha256,streamCollector:(Ra==null?void 0:Ra.streamCollector)??streamCollector,streamHasher:(Ra==null?void 0:Ra.streamHasher)??blobHasher,useDualstackEndpoint:(Ra==null?void 0:Ra.useDualstackEndpoint)??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:(Ra==null?void 0:Ra.useFipsEndpoint)??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getAwsRegionExtensionConfiguration=Ra=>{let qa=async()=>{if(Ra.region===void 0)throw new Error("Region is missing from runtimeConfig");const rd=Ra.region;return typeof rd=="string"?rd:rd()};return{setRegion(rd){qa=rd},region(){return qa}}},resolveAwsRegionExtensionConfiguration=Ra=>({region:Ra.region()}),getHttpAuthExtensionConfiguration=Ra=>{const qa=Ra.httpAuthSchemes;let rd=Ra.httpAuthSchemeProvider,sd=Ra.credentials;return{setHttpAuthScheme(pd){const fd=qa.findIndex(hd=>hd.schemeId===pd.schemeId);fd===-1?qa.push(pd):qa.splice(fd,1,pd)},httpAuthSchemes(){return qa},setHttpAuthSchemeProvider(pd){rd=pd},httpAuthSchemeProvider(){return rd},setCredentials(pd){sd=pd},credentials(){return sd}}},resolveHttpAuthRuntimeConfig=Ra=>({httpAuthSchemes:Ra.httpAuthSchemes(),httpAuthSchemeProvider:Ra.httpAuthSchemeProvider(),credentials:Ra.credentials()}),asPartial=Ra=>Ra,resolveRuntimeExtensions=(Ra,qa)=>{const rd={...asPartial(getAwsRegionExtensionConfiguration(Ra)),...asPartial(getDefaultExtensionConfiguration(Ra)),...asPartial(getHttpHandlerExtensionConfiguration(Ra)),...asPartial(getHttpAuthExtensionConfiguration(Ra))};return qa.forEach(sd=>sd.configure(rd)),{...Ra,...resolveAwsRegionExtensionConfiguration(rd),...resolveDefaultRuntimeConfig(rd),...resolveHttpHandlerRuntimeConfig(rd),...resolveHttpAuthRuntimeConfig(rd)}};class S3Client extends Client$1{constructor(...[rd]){const sd=getRuntimeConfig(rd||{}),pd=resolveClientEndpointParameters(sd),fd=resolveUserAgentConfig(pd),hd=resolveFlexibleChecksumsConfig(fd),md=resolveRetryConfig(hd),gd=resolveRegionConfig(md),yd=gd,vd=resolveEndpointConfig(yd),Nd=resolveEventStreamSerdeConfig(vd),Md=resolveHttpAuthSchemeConfig(Nd),Ld=resolveS3Config(Md,{session:[()=>this,CreateSessionCommand]}),Fd=resolveRuntimeExtensions(Ld,(rd==null?void 0:rd.extensions)||[]);super(Fd);Ng(this,"config");this.config=Fd,this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultS3HttpAuthSchemeParametersProvider,identityProviderConfigProvider:async Hd=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":Hd.credentials,"aws.auth#sigv4a":Hd.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config)),this.middlewareStack.use(getValidateBucketNamePlugin(this.config)),this.middlewareStack.use(getAddExpectContinuePlugin(this.config)),this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config)),this.middlewareStack.use(getS3ExpressPlugin(this.config)),this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config))}destroy(){super.destroy()}}function ssecMiddleware(Ra){return qa=>async rd=>{const sd={...rd.input},pd=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const fd of pd){const hd=sd[fd.target];if(hd){let md;typeof hd=="string"?isValidBase64EncodedSSECustomerKey(hd,Ra)?md=Ra.base64Decoder(hd):(md=Ra.utf8Decoder(hd),sd[fd.target]=Ra.base64Encoder(md)):(md=ArrayBuffer.isView(hd)?new Uint8Array(hd.buffer,hd.byteOffset,hd.byteLength):new Uint8Array(hd),sd[fd.target]=Ra.base64Encoder(md));const gd=new Ra.md5;gd.update(md),sd[fd.hash]=Ra.base64Encoder(await gd.digest())}}return qa({...rd,input:sd})}}const ssecMiddlewareOptions={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},getSsecPlugin=Ra=>({applyToStack:qa=>{qa.add(ssecMiddleware(Ra),ssecMiddlewareOptions)}});function isValidBase64EncodedSSECustomerKey(Ra,qa){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(Ra))return!1;try{return qa.base64Decoder(Ra).length===32}catch{return!1}}class PutObjectCommand extends Command.classBuilder().ep({...commonParams,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(qa,rd,sd,pd){return[getSerdePlugin(sd,this.serialize,this.deserialize),getEndpointPlugin(sd,qa.getEndpointParameterInstructions()),getFlexibleChecksumsPlugin(sd,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),getCheckContentLengthHeaderPlugin(),getThrow200ExceptionsPlugin(sd),getSsecPlugin(sd)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(PutObjectRequestFilterSensitiveLog,PutObjectOutputFilterSensitiveLog).ser(se_PutObjectCommand).de(de_PutObjectCommand).build(){}var toString=Object.prototype.toString,isModern=typeof Buffer$4<"u"&&typeof Buffer$4.alloc=="function"&&typeof Buffer$4.allocUnsafe=="function"&&typeof Buffer$4.from=="function";function isArrayBuffer(Ra){return toString.call(Ra).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(Ra,qa,rd){qa>>>=0;var sd=Ra.byteLength-qa;if(sd<0)throw new RangeError("'offset' is out of bounds");if(rd===void 0)rd=sd;else if(rd>>>=0,rd>sd)throw new RangeError("'length' is out of bounds");return isModern?Buffer$4.from(Ra.slice(qa,qa+rd)):new Buffer$4(new Uint8Array(Ra.slice(qa,qa+rd)))}function fromString(Ra,qa){if((typeof qa!="string"||qa==="")&&(qa="utf8"),!Buffer$4.isEncoding(qa))throw new TypeError('"encoding" must be a valid string encoding');return isModern?Buffer$4.from(Ra,qa):new Buffer$4(Ra,qa)}function bufferFrom(Ra,qa,rd){if(typeof Ra=="number")throw new TypeError('"value" argument must not be a number');return isArrayBuffer(Ra)?fromArrayBuffer(Ra,qa,rd):typeof Ra=="string"?fromString(Ra,qa):isModern?Buffer$4.from(Ra):new Buffer$4(Ra)}var bufferFrom_1=bufferFrom;const Buffer$1=getDefaultExportFromCjs(bufferFrom_1);var cosJsSdkV5={exports:{}};(function(Ra,qa){(function(sd,pd){Ra.exports=pd()})(commonjsGlobal,function(){return function(rd){var sd={};function pd(fd){if(sd[fd])return sd[fd].exports;var hd=sd[fd]={i:fd,l:!1,exports:{}};return rd[fd].call(hd.exports,hd,hd.exports,pd),hd.l=!0,hd.exports}return pd.m=rd,pd.c=sd,pd.d=function(fd,hd,md){pd.o(fd,hd)||Object.defineProperty(fd,hd,{enumerable:!0,get:md})},pd.r=function(fd){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(fd,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(fd,"__esModule",{value:!0})},pd.t=function(fd,hd){if(hd&1&&(fd=pd(fd)),hd&8||hd&4&&typeof fd=="object"&&fd&&fd.__esModule)return fd;var md=Object.create(null);if(pd.r(md),Object.defineProperty(md,"default",{enumerable:!0,value:fd}),hd&2&&typeof fd!="string")for(var gd in fd)pd.d(md,gd,(function(yd){return fd[yd]}).bind(null,gd));return md},pd.n=function(fd){var hd=fd&&fd.__esModule?function(){return fd.default}:function(){return fd};return pd.d(hd,"a",hd),hd},pd.o=function(fd,hd){return Object.prototype.hasOwnProperty.call(fd,hd)},pd.p="/dist/",pd(pd.s="./index.js")}({"./index.js":function(rd,sd,pd){var fd=pd("./src/cos.js");rd.exports=fd},"./lib/base64.js":function(rd,sd){var pd=function(fd){fd=fd||{};var hd=fd.Base64,md="2.1.9",gd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yd=function(xf){for(var Cf={},If=0,Sf=xf.length;If>>6)+vd(128|If&63):vd(224|If>>>12&15)+vd(128|If>>>6&63)+vd(128|If&63)}else{var If=65536+(Cf.charCodeAt(0)-55296)*1024+(Cf.charCodeAt(1)-56320);return vd(240|If>>>18&7)+vd(128|If>>>12&63)+vd(128|If>>>6&63)+vd(128|If&63)}},Md=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ld=function(Cf){return Cf.replace(Md,Nd)},Fd=function(Cf){var If=[0,2,1][Cf.length%3],Sf=Cf.charCodeAt(0)<<16|(Cf.length>1?Cf.charCodeAt(1):0)<<8|(Cf.length>2?Cf.charCodeAt(2):0),wf=[gd.charAt(Sf>>>18),gd.charAt(Sf>>>12&63),If>=2?"=":gd.charAt(Sf>>>6&63),If>=1?"=":gd.charAt(Sf&63)];return wf.join("")},Hd=fd.btoa?function(xf){return fd.btoa(xf)}:function(xf){return xf.replace(/[\s\S]{1,3}/g,Fd)},Vd=function(xf){return Hd(Ld(xf))},Gd=function(Cf,If){return If?Vd(String(Cf)).replace(/[+\/]/g,function(Sf){return Sf=="+"?"-":"_"}).replace(/=/g,""):Vd(String(Cf))},Ud=function(Cf){return Gd(Cf,!0)},qd=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),Wd=function(Cf){switch(Cf.length){case 4:var If=(7&Cf.charCodeAt(0))<<18|(63&Cf.charCodeAt(1))<<12|(63&Cf.charCodeAt(2))<<6|63&Cf.charCodeAt(3),Sf=If-65536;return vd((Sf>>>10)+55296)+vd((Sf&1023)+56320);case 3:return vd((15&Cf.charCodeAt(0))<<12|(63&Cf.charCodeAt(1))<<6|63&Cf.charCodeAt(2));default:return vd((31&Cf.charCodeAt(0))<<6|63&Cf.charCodeAt(1))}},Kd=function(Cf){return Cf.replace(qd,Wd)},Xd=function(Cf){var If=Cf.length,Sf=If%4,wf=(If>0?yd[Cf.charAt(0)]<<18:0)|(If>1?yd[Cf.charAt(1)]<<12:0)|(If>2?yd[Cf.charAt(2)]<<6:0)|(If>3?yd[Cf.charAt(3)]:0),Pf=[vd(wf>>>16),vd(wf>>>8&255),vd(wf&255)];return Pf.length-=[0,0,2,1][Sf],Pf.join("")},df=fd.atob?function(xf){return fd.atob(xf)}:function(xf){return xf.replace(/[\s\S]{1,4}/g,Xd)},Ef=function(xf){return Kd(df(xf))},pf=function(Cf){return Ef(String(Cf).replace(/[-_]/g,function(If){return If=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},mf=function(){var Cf=fd.Base64;return fd.Base64=hd,Cf},_f={VERSION:md,atob:df,btoa:Hd,fromBase64:pf,toBase64:Gd,utob:Ld,encode:Gd,encodeURI:Ud,btou:Kd,decode:pf,noConflict:mf};return _f}();rd.exports=pd},"./lib/crypto.js":function(rd,sd,pd){(function(fd){var hd=pd("./node_modules/@babel/runtime/helpers/typeof.js"),md=md||function(gd,yd){var vd={},Nd=vd.lib={},Md=function(){},Ld=Nd.Base={extend:function(Xd){Md.prototype=this;var df=new Md;return Xd&&df.mixIn(Xd),df.hasOwnProperty("init")||(df.init=function(){df.$super.init.apply(this,arguments)}),df.init.prototype=df,df.$super=this,df},create:function(){var Xd=this.extend();return Xd.init.apply(Xd,arguments),Xd},init:function(){},mixIn:function(Xd){for(var df in Xd)Xd.hasOwnProperty(df)&&(this[df]=Xd[df]);Xd.hasOwnProperty("toString")&&(this.toString=Xd.toString)},clone:function(){return this.init.prototype.extend(this)}},Fd=Nd.WordArray=Ld.extend({init:function(Xd,df){Xd=this.words=Xd||[],this.sigBytes=df!=yd?df:4*Xd.length},toString:function(Xd){return(Xd||Vd).stringify(this)},concat:function(Xd){var df=this.words,Ef=Xd.words,pf=this.sigBytes;if(Xd=Xd.sigBytes,this.clamp(),pf%4)for(var mf=0;mf>>2]|=(Ef[mf>>>2]>>>24-8*(mf%4)&255)<<24-8*((pf+mf)%4);else if(65535>>2]=Ef[mf>>>2];else df.push.apply(df,Ef);return this.sigBytes+=Xd,this},clamp:function(){var Xd=this.words,df=this.sigBytes;Xd[df>>>2]&=4294967295<<32-8*(df%4),Xd.length=gd.ceil(df/4)},clone:function(){var Xd=Ld.clone.call(this);return Xd.words=this.words.slice(0),Xd},random:function(Xd){for(var df=[],Ef=0;Ef>>2]>>>24-8*(pf%4)&255;Ef.push((mf>>>4).toString(16)),Ef.push((mf&15).toString(16))}return Ef.join("")},parse:function(Xd){for(var df=Xd.length,Ef=[],pf=0;pf>>3]|=parseInt(Xd.substr(pf,2),16)<<24-4*(pf%8);return new Fd.init(Ef,df/2)}},Gd=Hd.Latin1={stringify:function(Xd){var df=Xd.words;Xd=Xd.sigBytes;for(var Ef=[],pf=0;pf>>2]>>>24-8*(pf%4)&255));return Ef.join("")},parse:function(Xd){for(var df=Xd.length,Ef=[],pf=0;pf>>2]|=(Xd.charCodeAt(pf)&255)<<24-8*(pf%4);return new Fd.init(Ef,df)}},Ud=Hd.Utf8={stringify:function(Xd){try{return decodeURIComponent(escape(Gd.stringify(Xd)))}catch{throw Error("Malformed UTF-8 data")}},parse:function(Xd){return Gd.parse(unescape(encodeURIComponent(Xd)))}},qd=Nd.BufferedBlockAlgorithm=Ld.extend({reset:function(){this._data=new Fd.init,this._nDataBytes=0},_append:function(Xd){typeof Xd=="string"&&(Xd=Ud.parse(Xd)),this._data.concat(Xd),this._nDataBytes+=Xd.sigBytes},_process:function(Xd){var df=this._data,Ef=df.words,pf=df.sigBytes,mf=this.blockSize,_f=pf/(4*mf),_f=Xd?gd.ceil(_f):gd.max((_f|0)-this._minBufferSize,0);if(Xd=_f*mf,pf=gd.min(4*Xd,pf),Xd){for(var xf=0;xfXd;Xd++){if(16>Xd)Nd[Xd]=Fd[Hd+Xd]|0;else{var df=Nd[Xd-3]^Nd[Xd-8]^Nd[Xd-14]^Nd[Xd-16];Nd[Xd]=df<<1|df>>>31}df=(Gd<<5|Gd>>>27)+Kd+Nd[Xd],df=20>Xd?df+((Ud&qd|~Ud&Wd)+1518500249):40>Xd?df+((Ud^qd^Wd)+1859775393):60>Xd?df+((Ud&qd|Ud&Wd|qd&Wd)-1894007588):df+((Ud^qd^Wd)-899497514),Kd=Wd,Wd=qd,qd=Ud<<30|Ud>>>2,Ud=Gd,Gd=df}Vd[0]=Vd[0]+Gd|0,Vd[1]=Vd[1]+Ud|0,Vd[2]=Vd[2]+qd|0,Vd[3]=Vd[3]+Wd|0,Vd[4]=Vd[4]+Kd|0},_doFinalize:function(){var Fd=this._data,Hd=Fd.words,Vd=8*this._nDataBytes,Gd=8*Fd.sigBytes;return Hd[Gd>>>5]|=128<<24-Gd%32,Hd[(Gd+64>>>9<<4)+14]=Math.floor(Vd/4294967296),Hd[(Gd+64>>>9<<4)+15]=Vd,Fd.sigBytes=4*Hd.length,this._process(),this._hash},clone:function(){var Fd=vd.clone.call(this);return Fd._hash=this._hash.clone(),Fd}});gd.SHA1=vd._createHelper(Md),gd.HmacSHA1=vd._createHmacHelper(Md)})(),function(){var gd=md,yd=gd.enc.Utf8;gd.algo.HMAC=gd.lib.Base.extend({init:function(Nd,Md){Nd=this._hasher=new Nd.init,typeof Md=="string"&&(Md=yd.parse(Md));var Ld=Nd.blockSize,Fd=4*Ld;Md.sigBytes>Fd&&(Md=Nd.finalize(Md)),Md.clamp();for(var Hd=this._oKey=Md.clone(),Vd=this._iKey=Md.clone(),Gd=Hd.words,Ud=Vd.words,qd=0;qd>>2]>>>24-Ud%4*8&255,Wd=Fd[Ud+1>>>2]>>>24-(Ud+1)%4*8&255,Kd=Fd[Ud+2>>>2]>>>24-(Ud+2)%4*8&255,Xd=qd<<16|Wd<<8|Kd,df=0;df<4&&Ud+df*.75>>6*(3-df)&63));var Ef=Vd.charAt(64);if(Ef)for(;Gd.length%4;)Gd.push(Ef);return Gd.join("")},parse:function(Ld){var Fd=Ld.length,Hd=this._map,Vd=Hd.charAt(64);if(Vd){var Gd=Ld.indexOf(Vd);Gd!=-1&&(Fd=Gd)}for(var Ud=[],qd=0,Wd=0;Wd>>6-Wd%4*2;Ud[qd>>>2]|=(Kd|Xd)<<24-qd%4*8,qd++}return vd.create(Ud,qd)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),hd(fd)==="object"?fd.exports=md:window.CryptoJS=md}).call(this,pd("./node_modules/webpack/buildin/module.js")(rd))},"./lib/md5.js":function(rd,sd,pd){(function(fd){var hd,md=pd("./node_modules/@babel/runtime/helpers/typeof.js");(function(){var gd=(typeof window>"u"?"undefined":md(window))==="object",yd=gd?window:{};yd.JS_MD5_NO_WINDOW&&(gd=!1);var vd=!gd&&(typeof self>"u"?"undefined":md(self))==="object";vd&&(yd=self);var Nd=!yd.JS_MD5_NO_COMMON_JS&&md(fd)==="object"&&fd.exports,Md=pd("./node_modules/webpack/buildin/amd-options.js"),Ld=!yd.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",Fd="0123456789abcdef".split(""),Hd=[128,32768,8388608,-2147483648],Vd=[0,8,16,24],Gd=["hex","array","digest","buffer","arrayBuffer","base64"],Ud="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),qd=[],Wd;if(Ld){var Kd=new ArrayBuffer(68);Wd=new Uint8Array(Kd),qd=new Uint32Array(Kd)}(yd.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(mf){return Object.prototype.toString.call(mf)==="[object Array]"}),Ld&&(yd.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(mf){return md(mf)==="object"&&mf.buffer&&mf.buffer.constructor===ArrayBuffer});var Xd=function(_f){return function(xf,Cf){return new Ef(!0).update(xf,Cf)[_f]()}},df=function(){var _f=Xd("hex");_f.getCtx=_f.create=function(){return new Ef},_f.update=function(If){return _f.create().update(If)};for(var xf=0;xf>6,Pf[If++]=128|xf&63):xf<55296||xf>=57344?(Pf[If++]=224|xf>>12,Pf[If++]=128|xf>>6&63,Pf[If++]=128|xf&63):(xf=65536+((xf&1023)<<10|mf.charCodeAt(++Cf)&1023),Pf[If++]=240|xf>>18,Pf[If++]=128|xf>>12&63,Pf[If++]=128|xf>>6&63,Pf[If++]=128|xf&63);else for(If=this.start;Cf>2]|=xf<>2]|=(192|xf>>6)<>2]|=(128|xf&63)<=57344?(wf[If>>2]|=(224|xf>>12)<>2]|=(128|xf>>6&63)<>2]|=(128|xf&63)<>2]|=(240|xf>>18)<>2]|=(128|xf>>12&63)<>2]|=(128|xf>>6&63)<>2]|=(128|xf&63)<=64?(this.start=If-64,this.hash(),this.hashed=!0):this.start=If}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Ef.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var mf=this.blocks,_f=this.lastByteIndex;mf[_f>>2]|=Hd[_f&3],_f>=56&&(this.hashed||this.hash(),mf[0]=mf[16],mf[16]=mf[1]=mf[2]=mf[3]=mf[4]=mf[5]=mf[6]=mf[7]=mf[8]=mf[9]=mf[10]=mf[11]=mf[12]=mf[13]=mf[14]=mf[15]=0),mf[14]=this.bytes<<3,mf[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Ef.prototype.hash=function(){var mf,_f,xf,Cf,If,Sf,wf=this.blocks;this.first?(mf=wf[0]-680876937,mf=(mf<<7|mf>>>25)-271733879<<0,Cf=(-1732584194^mf&2004318071)+wf[1]-117830708,Cf=(Cf<<12|Cf>>>20)+mf<<0,xf=(-271733879^Cf&(mf^-271733879))+wf[2]-1126478375,xf=(xf<<17|xf>>>15)+Cf<<0,_f=(mf^xf&(Cf^mf))+wf[3]-1316259209,_f=(_f<<22|_f>>>10)+xf<<0):(mf=this.h0,_f=this.h1,xf=this.h2,Cf=this.h3,mf+=(Cf^_f&(xf^Cf))+wf[0]-680876936,mf=(mf<<7|mf>>>25)+_f<<0,Cf+=(xf^mf&(_f^xf))+wf[1]-389564586,Cf=(Cf<<12|Cf>>>20)+mf<<0,xf+=(_f^Cf&(mf^_f))+wf[2]+606105819,xf=(xf<<17|xf>>>15)+Cf<<0,_f+=(mf^xf&(Cf^mf))+wf[3]-1044525330,_f=(_f<<22|_f>>>10)+xf<<0),mf+=(Cf^_f&(xf^Cf))+wf[4]-176418897,mf=(mf<<7|mf>>>25)+_f<<0,Cf+=(xf^mf&(_f^xf))+wf[5]+1200080426,Cf=(Cf<<12|Cf>>>20)+mf<<0,xf+=(_f^Cf&(mf^_f))+wf[6]-1473231341,xf=(xf<<17|xf>>>15)+Cf<<0,_f+=(mf^xf&(Cf^mf))+wf[7]-45705983,_f=(_f<<22|_f>>>10)+xf<<0,mf+=(Cf^_f&(xf^Cf))+wf[8]+1770035416,mf=(mf<<7|mf>>>25)+_f<<0,Cf+=(xf^mf&(_f^xf))+wf[9]-1958414417,Cf=(Cf<<12|Cf>>>20)+mf<<0,xf+=(_f^Cf&(mf^_f))+wf[10]-42063,xf=(xf<<17|xf>>>15)+Cf<<0,_f+=(mf^xf&(Cf^mf))+wf[11]-1990404162,_f=(_f<<22|_f>>>10)+xf<<0,mf+=(Cf^_f&(xf^Cf))+wf[12]+1804603682,mf=(mf<<7|mf>>>25)+_f<<0,Cf+=(xf^mf&(_f^xf))+wf[13]-40341101,Cf=(Cf<<12|Cf>>>20)+mf<<0,xf+=(_f^Cf&(mf^_f))+wf[14]-1502002290,xf=(xf<<17|xf>>>15)+Cf<<0,_f+=(mf^xf&(Cf^mf))+wf[15]+1236535329,_f=(_f<<22|_f>>>10)+xf<<0,mf+=(xf^Cf&(_f^xf))+wf[1]-165796510,mf=(mf<<5|mf>>>27)+_f<<0,Cf+=(_f^xf&(mf^_f))+wf[6]-1069501632,Cf=(Cf<<9|Cf>>>23)+mf<<0,xf+=(mf^_f&(Cf^mf))+wf[11]+643717713,xf=(xf<<14|xf>>>18)+Cf<<0,_f+=(Cf^mf&(xf^Cf))+wf[0]-373897302,_f=(_f<<20|_f>>>12)+xf<<0,mf+=(xf^Cf&(_f^xf))+wf[5]-701558691,mf=(mf<<5|mf>>>27)+_f<<0,Cf+=(_f^xf&(mf^_f))+wf[10]+38016083,Cf=(Cf<<9|Cf>>>23)+mf<<0,xf+=(mf^_f&(Cf^mf))+wf[15]-660478335,xf=(xf<<14|xf>>>18)+Cf<<0,_f+=(Cf^mf&(xf^Cf))+wf[4]-405537848,_f=(_f<<20|_f>>>12)+xf<<0,mf+=(xf^Cf&(_f^xf))+wf[9]+568446438,mf=(mf<<5|mf>>>27)+_f<<0,Cf+=(_f^xf&(mf^_f))+wf[14]-1019803690,Cf=(Cf<<9|Cf>>>23)+mf<<0,xf+=(mf^_f&(Cf^mf))+wf[3]-187363961,xf=(xf<<14|xf>>>18)+Cf<<0,_f+=(Cf^mf&(xf^Cf))+wf[8]+1163531501,_f=(_f<<20|_f>>>12)+xf<<0,mf+=(xf^Cf&(_f^xf))+wf[13]-1444681467,mf=(mf<<5|mf>>>27)+_f<<0,Cf+=(_f^xf&(mf^_f))+wf[2]-51403784,Cf=(Cf<<9|Cf>>>23)+mf<<0,xf+=(mf^_f&(Cf^mf))+wf[7]+1735328473,xf=(xf<<14|xf>>>18)+Cf<<0,_f+=(Cf^mf&(xf^Cf))+wf[12]-1926607734,_f=(_f<<20|_f>>>12)+xf<<0,If=_f^xf,mf+=(If^Cf)+wf[5]-378558,mf=(mf<<4|mf>>>28)+_f<<0,Cf+=(If^mf)+wf[8]-2022574463,Cf=(Cf<<11|Cf>>>21)+mf<<0,Sf=Cf^mf,xf+=(Sf^_f)+wf[11]+1839030562,xf=(xf<<16|xf>>>16)+Cf<<0,_f+=(Sf^xf)+wf[14]-35309556,_f=(_f<<23|_f>>>9)+xf<<0,If=_f^xf,mf+=(If^Cf)+wf[1]-1530992060,mf=(mf<<4|mf>>>28)+_f<<0,Cf+=(If^mf)+wf[4]+1272893353,Cf=(Cf<<11|Cf>>>21)+mf<<0,Sf=Cf^mf,xf+=(Sf^_f)+wf[7]-155497632,xf=(xf<<16|xf>>>16)+Cf<<0,_f+=(Sf^xf)+wf[10]-1094730640,_f=(_f<<23|_f>>>9)+xf<<0,If=_f^xf,mf+=(If^Cf)+wf[13]+681279174,mf=(mf<<4|mf>>>28)+_f<<0,Cf+=(If^mf)+wf[0]-358537222,Cf=(Cf<<11|Cf>>>21)+mf<<0,Sf=Cf^mf,xf+=(Sf^_f)+wf[3]-722521979,xf=(xf<<16|xf>>>16)+Cf<<0,_f+=(Sf^xf)+wf[6]+76029189,_f=(_f<<23|_f>>>9)+xf<<0,If=_f^xf,mf+=(If^Cf)+wf[9]-640364487,mf=(mf<<4|mf>>>28)+_f<<0,Cf+=(If^mf)+wf[12]-421815835,Cf=(Cf<<11|Cf>>>21)+mf<<0,Sf=Cf^mf,xf+=(Sf^_f)+wf[15]+530742520,xf=(xf<<16|xf>>>16)+Cf<<0,_f+=(Sf^xf)+wf[2]-995338651,_f=(_f<<23|_f>>>9)+xf<<0,mf+=(xf^(_f|~Cf))+wf[0]-198630844,mf=(mf<<6|mf>>>26)+_f<<0,Cf+=(_f^(mf|~xf))+wf[7]+1126891415,Cf=(Cf<<10|Cf>>>22)+mf<<0,xf+=(mf^(Cf|~_f))+wf[14]-1416354905,xf=(xf<<15|xf>>>17)+Cf<<0,_f+=(Cf^(xf|~mf))+wf[5]-57434055,_f=(_f<<21|_f>>>11)+xf<<0,mf+=(xf^(_f|~Cf))+wf[12]+1700485571,mf=(mf<<6|mf>>>26)+_f<<0,Cf+=(_f^(mf|~xf))+wf[3]-1894986606,Cf=(Cf<<10|Cf>>>22)+mf<<0,xf+=(mf^(Cf|~_f))+wf[10]-1051523,xf=(xf<<15|xf>>>17)+Cf<<0,_f+=(Cf^(xf|~mf))+wf[1]-2054922799,_f=(_f<<21|_f>>>11)+xf<<0,mf+=(xf^(_f|~Cf))+wf[8]+1873313359,mf=(mf<<6|mf>>>26)+_f<<0,Cf+=(_f^(mf|~xf))+wf[15]-30611744,Cf=(Cf<<10|Cf>>>22)+mf<<0,xf+=(mf^(Cf|~_f))+wf[6]-1560198380,xf=(xf<<15|xf>>>17)+Cf<<0,_f+=(Cf^(xf|~mf))+wf[13]+1309151649,_f=(_f<<21|_f>>>11)+xf<<0,mf+=(xf^(_f|~Cf))+wf[4]-145523070,mf=(mf<<6|mf>>>26)+_f<<0,Cf+=(_f^(mf|~xf))+wf[11]-1120210379,Cf=(Cf<<10|Cf>>>22)+mf<<0,xf+=(mf^(Cf|~_f))+wf[2]+718787259,xf=(xf<<15|xf>>>17)+Cf<<0,_f+=(Cf^(xf|~mf))+wf[9]-343485551,_f=(_f<<21|_f>>>11)+xf<<0,this.first?(this.h0=mf+1732584193<<0,this.h1=_f-271733879<<0,this.h2=xf-1732584194<<0,this.h3=Cf+271733878<<0,this.first=!1):(this.h0=this.h0+mf<<0,this.h1=this.h1+_f<<0,this.h2=this.h2+xf<<0,this.h3=this.h3+Cf<<0)},Ef.prototype.hex=function(){this.finalize();var mf=this.h0,_f=this.h1,xf=this.h2,Cf=this.h3;return Fd[mf>>4&15]+Fd[mf&15]+Fd[mf>>12&15]+Fd[mf>>8&15]+Fd[mf>>20&15]+Fd[mf>>16&15]+Fd[mf>>28&15]+Fd[mf>>24&15]+Fd[_f>>4&15]+Fd[_f&15]+Fd[_f>>12&15]+Fd[_f>>8&15]+Fd[_f>>20&15]+Fd[_f>>16&15]+Fd[_f>>28&15]+Fd[_f>>24&15]+Fd[xf>>4&15]+Fd[xf&15]+Fd[xf>>12&15]+Fd[xf>>8&15]+Fd[xf>>20&15]+Fd[xf>>16&15]+Fd[xf>>28&15]+Fd[xf>>24&15]+Fd[Cf>>4&15]+Fd[Cf&15]+Fd[Cf>>12&15]+Fd[Cf>>8&15]+Fd[Cf>>20&15]+Fd[Cf>>16&15]+Fd[Cf>>28&15]+Fd[Cf>>24&15]},Ef.prototype.toString=Ef.prototype.hex,Ef.prototype.digest=function(mf){if(mf==="hex")return this.hex();this.finalize();var _f=this.h0,xf=this.h1,Cf=this.h2,If=this.h3,Sf=[_f&255,_f>>8&255,_f>>16&255,_f>>24&255,xf&255,xf>>8&255,xf>>16&255,xf>>24&255,Cf&255,Cf>>8&255,Cf>>16&255,Cf>>24&255,If&255,If>>8&255,If>>16&255,If>>24&255];return Sf},Ef.prototype.array=Ef.prototype.digest,Ef.prototype.arrayBuffer=function(){this.finalize();var mf=new ArrayBuffer(16),_f=new Uint32Array(mf);return _f[0]=this.h0,_f[1]=this.h1,_f[2]=this.h2,_f[3]=this.h3,mf},Ef.prototype.buffer=Ef.prototype.arrayBuffer,Ef.prototype.base64=function(){for(var mf,_f,xf,Cf="",If=this.array(),Sf=0;Sf<15;)mf=If[Sf++],_f=If[Sf++],xf=If[Sf++],Cf+=Ud[mf>>>2]+Ud[(mf<<4|_f>>>4)&63]+Ud[(_f<<2|xf>>>6)&63]+Ud[xf&63];return mf=If[Sf],Cf+=Ud[mf>>>2]+Ud[mf<<4&63]+"==",Cf};var pf=df();Nd?fd.exports=pf:(yd.md5=pf,Md&&(hd=(function(){return pf}).call(pf,pd,pf,fd),hd!==void 0&&(fd.exports=hd)))})()}).call(this,pd("./node_modules/webpack/buildin/module.js")(rd))},"./lib/request.js":function(rd,sd,pd){var fd=pd("./node_modules/@babel/runtime/helpers/typeof.js"),hd=function(Md){switch(fd(Md)){case"string":return Md;case"boolean":return Md?"true":"false";case"number":return isFinite(Md)?Md:"";default:return""}},md=function(Md,Ld,Fd,Hd){return Ld=Ld||"&",Fd=Fd||"=",Md===null&&(Md=void 0),fd(Md)==="object"?Object.keys(Md).map(function(Vd){var Gd=encodeURIComponent(hd(Vd))+Fd;return Array.isArray(Md[Vd])?Md[Vd].map(function(Ud){return Gd+encodeURIComponent(hd(Ud))}).join(Ld):Gd+encodeURIComponent(hd(Md[Vd]))}).filter(Boolean).join(Ld):""},gd=function(Md,Ld,Fd){var Hd={},Vd=Ld.getAllResponseHeaders();return Vd&&Vd.length>0&&Vd.trim().split(` -`).forEach(function(Gd){if(Gd){var Ud=Gd.indexOf(":"),qd=Gd.substr(0,Ud).trim().toLowerCase(),Wd=Gd.substr(Ud+1).trim();Hd[qd]=Wd}}),{error:Md,statusCode:Ld.status,statusMessage:Ld.statusText,headers:Hd,body:Fd}},yd=function(Md,Ld){return!Ld&&Ld==="text"?Md.responseText:Md.response},vd=function(Md,Ld){var Fd=(Md.method||"GET").toUpperCase(),Hd=Md.url;if(Md.qs){var Vd=md(Md.qs);Vd&&(Hd+=(Hd.indexOf("?")===-1?"?":"&")+Vd)}var Gd=new XMLHttpRequest;if(Gd.open(Fd,Hd,!0),Gd.responseType=Md.dataType||"text",Md.xhrFields)for(var Ud in Md.xhrFields)Gd[Ud]=Md.xhrFields[Ud];var qd=Md.headers;if(qd)for(var Wd in qd)qd.hasOwnProperty(Wd)&&Wd.toLowerCase()!=="content-length"&&Wd.toLowerCase()!=="user-agent"&&Wd.toLowerCase()!=="origin"&&Wd.toLowerCase()!=="host"&&Gd.setRequestHeader(Wd,qd[Wd]);return Md.onProgress&&Gd.upload&&(Gd.upload.onprogress=Md.onProgress),Md.onDownloadProgress&&(Gd.onprogress=Md.onDownloadProgress),Md.timeout&&(Gd.timeout=Md.timeout),Gd.ontimeout=function(Kd){var Xd=new Error("timeout");Ld(gd(Xd,Gd))},Gd.onload=function(){Ld(gd(null,Gd,yd(Gd,Md.dataType)))},Gd.onerror=function(Kd){var Xd=yd(Gd,Md.dataType);if(Xd)Ld(gd(null,Gd,Xd));else{var df=Gd.statusText;!df&&Gd.status===0&&(df=new Error("CORS blocked or network error")),Ld(gd(df,Gd,Xd))}},Gd.send(Md.body||""),Gd};rd.exports=vd},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(rd,sd){function pd(fd,hd){if(!(fd instanceof hd))throw new TypeError("Cannot call a class as a function")}rd.exports=pd,rd.exports.__esModule=!0,rd.exports.default=rd.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(rd,sd,pd){var fd=pd("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function hd(gd,yd){for(var vd=0;vd{for(const md of fd)if(typeof md=="string"&&hd===md||md instanceof RegExp&&md.test(hd))return!0}:()=>!1}rd.exports=pd},"./node_modules/fast-xml-parser/src/util.js":function(rd,sd,pd){const fd=":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",hd=fd+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",md="["+fd+"]["+hd+"]*",gd=new RegExp("^"+md+"$"),yd=function(Nd,Md){const Ld=[];let Fd=Md.exec(Nd);for(;Fd;){const Hd=[];Hd.startIndex=Md.lastIndex-Fd[0].length;const Vd=Fd.length;for(let Gd=0;Gd"u")};sd.isExist=function(Nd){return typeof Nd<"u"},sd.isEmptyObject=function(Nd){return Object.keys(Nd).length===0},sd.merge=function(Nd,Md,Ld){if(Md){const Fd=Object.keys(Md),Hd=Fd.length;for(let Vd=0;Vd"&&Xd[_f]!==" "&&Xd[_f]!==" "&&Xd[_f]!==` -`&&Xd[_f]!=="\r";_f++)If+=Xd[_f];if(If=If.trim(),If[If.length-1]==="/"&&(If=If.substring(0,If.length-1),_f--),!qd(If)){let Pf;return If.trim().length===0?Pf="Invalid space after '<'.":Pf="Tag '"+If+"' is an invalid name.",Gd("InvalidTag",Pf,Wd(Xd,_f))}const Sf=Md(Xd,_f);if(Sf===!1)return Gd("InvalidAttr","Attributes for '"+If+"' have open quote.",Wd(Xd,_f));let wf=Sf.value;if(_f=Sf.index,wf[wf.length-1]==="/"){const Pf=_f-wf.length;wf=wf.substring(0,wf.length-1);const lh=Fd(wf,df);if(lh===!0)pf=!0;else return Gd(lh.err.code,lh.err.msg,Wd(Xd,Pf+lh.err.line))}else if(Cf)if(Sf.tagClosed){if(wf.trim().length>0)return Gd("InvalidTag","Closing tag '"+If+"' can't have attributes or invalid starting.",Wd(Xd,xf));if(Ef.length===0)return Gd("InvalidTag","Closing tag '"+If+"' has not been opened.",Wd(Xd,xf));{const Pf=Ef.pop();if(If!==Pf.tagName){let lh=Wd(Xd,Pf.tagStartPos);return Gd("InvalidTag","Expected closing tag '"+Pf.tagName+"' (opened in line "+lh.line+", col "+lh.col+") instead of closing tag '"+If+"'.",Wd(Xd,xf))}Ef.length==0&&(mf=!0)}}else return Gd("InvalidTag","Closing tag '"+If+"' doesn't have proper closing.",Wd(Xd,_f));else{const Pf=Fd(wf,df);if(Pf!==!0)return Gd(Pf.err.code,Pf.err.msg,Wd(Xd,_f-wf.length+Pf.err.line));if(mf===!0)return Gd("InvalidXml","Multiple possible root nodes found.",Wd(Xd,_f));df.unpairedTags.indexOf(If)!==-1||Ef.push({tagName:If,tagStartPos:xf}),pf=!0}for(_f++;_f0)return Gd("InvalidXml","Invalid '"+JSON.stringify(Ef.map(_f=>_f.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Gd("InvalidXml","Start tag expected.",1);return!0};function md(Xd){return Xd===" "||Xd===" "||Xd===` -`||Xd==="\r"}function gd(Xd,df){const Ef=df;for(;df5&&pf==="xml")return Gd("InvalidXml","XML declaration allowed only at the start of the document.",Wd(Xd,df));if(Xd[df]=="?"&&Xd[df+1]==">"){df++;break}else continue}return df}function yd(Xd,df){if(Xd.length>df+5&&Xd[df+1]==="-"&&Xd[df+2]==="-"){for(df+=3;df"){df+=2;break}}else if(Xd.length>df+8&&Xd[df+1]==="D"&&Xd[df+2]==="O"&&Xd[df+3]==="C"&&Xd[df+4]==="T"&&Xd[df+5]==="Y"&&Xd[df+6]==="P"&&Xd[df+7]==="E"){let Ef=1;for(df+=8;df"&&(Ef--,Ef===0))break}else if(Xd.length>df+9&&Xd[df+1]==="["&&Xd[df+2]==="C"&&Xd[df+3]==="D"&&Xd[df+4]==="A"&&Xd[df+5]==="T"&&Xd[df+6]==="A"&&Xd[df+7]==="["){for(df+=8;df"){df+=2;break}}return df}const vd='"',Nd="'";function Md(Xd,df){let Ef="",pf="",mf=!1;for(;df"&&pf===""){mf=!0;break}Ef+=Xd[df]}return pf!==""?!1:{value:Ef,index:df,tagClosed:mf}}const Ld=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Fd(Xd,df){const Ef=fd.getAllMatches(Xd,Ld),pf={};for(let mf=0;mf","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function gd(Md){this.options=Object.assign({},md,Md),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=hd(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Nd),this.processTextOrObjNode=yd,this.options.format?(this.indentate=vd,this.tagEndChar=`> + */class Bowser{static getParser(ed,ud=!1){if(typeof ed!="string")throw new Error("UserAgent should be a string");return new Parser(ed,ud)}static parse(ed){return new Parser(ed).getResult()}static get BROWSER_MAP(){return BROWSER_MAP}static get ENGINE_MAP(){return ENGINE_MAP}static get OS_MAP(){return OS_MAP}static get PLATFORMS_MAP(){return PLATFORMS_MAP}}const createDefaultUserAgentProvider=({serviceId:Ra,clientVersion:ed})=>async ud=>{var gd,yd,vd,Cd,wd,Nd;const dd=typeof window<"u"&&((gd=window==null?void 0:window.navigator)!=null&&gd.userAgent)?Bowser.parse(window.navigator.userAgent):void 0,hd=[["aws-sdk-js",ed],["ua","2.1"],[`os/${((yd=dd==null?void 0:dd.os)==null?void 0:yd.name)||"other"}`,(vd=dd==null?void 0:dd.os)==null?void 0:vd.version],["lang/js"],["md/browser",`${((Cd=dd==null?void 0:dd.browser)==null?void 0:Cd.name)??"unknown"}_${((wd=dd==null?void 0:dd.browser)==null?void 0:wd.version)??"unknown"}`]];Ra&&hd.push([`api/${Ra}`,ed]);const md=await((Nd=ud==null?void 0:ud.userAgentAppId)==null?void 0:Nd.call(ud));return md&&hd.push([`app/${md}`]),hd};class Int64{constructor(ed){if(this.bytes=ed,ed.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(ed){if(ed>9223372036854776e3||ed<-9223372036854776e3)throw new Error(`${ed} is too large (or, if negative, too small) to represent as an Int64`);const ud=new Uint8Array(8);for(let dd=7,hd=Math.abs(Math.round(ed));dd>-1&&hd>0;dd--,hd/=256)ud[dd]=hd;return ed<0&&negate(ud),new Int64(ud)}valueOf(){const ed=this.bytes.slice(0),ud=ed[0]&128;return ud&&negate(ed),parseInt(toHex(ed),16)*(ud?-1:1)}toString(){return String(this.valueOf())}}function negate(Ra){for(let ed=0;ed<8;ed++)Ra[ed]^=255;for(let ed=7;ed>-1&&(Ra[ed]++,Ra[ed]===0);ed--);}class HeaderMarshaller{constructor(ed,ud){this.toUtf8=ed,this.fromUtf8=ud}format(ed){const ud=[];for(const md of Object.keys(ed)){const gd=this.fromUtf8(md);ud.push(Uint8Array.from([gd.byteLength]),gd,this.formatHeaderValue(ed[md]))}const dd=new Uint8Array(ud.reduce((md,gd)=>md+gd.byteLength,0));let hd=0;for(const md of ud)dd.set(md,hd),hd+=md.byteLength;return dd}formatHeaderValue(ed){switch(ed.type){case"boolean":return Uint8Array.from([ed.value?0:1]);case"byte":return Uint8Array.from([2,ed.value]);case"short":const ud=new DataView(new ArrayBuffer(3));return ud.setUint8(0,3),ud.setInt16(1,ed.value,!1),new Uint8Array(ud.buffer);case"integer":const dd=new DataView(new ArrayBuffer(5));return dd.setUint8(0,4),dd.setInt32(1,ed.value,!1),new Uint8Array(dd.buffer);case"long":const hd=new Uint8Array(9);return hd[0]=5,hd.set(ed.value.bytes,1),hd;case"binary":const md=new DataView(new ArrayBuffer(3+ed.value.byteLength));md.setUint8(0,6),md.setUint16(1,ed.value.byteLength,!1);const gd=new Uint8Array(md.buffer);return gd.set(ed.value,3),gd;case"string":const yd=this.fromUtf8(ed.value),vd=new DataView(new ArrayBuffer(3+yd.byteLength));vd.setUint8(0,7),vd.setUint16(1,yd.byteLength,!1);const Cd=new Uint8Array(vd.buffer);return Cd.set(yd,3),Cd;case"timestamp":const wd=new Uint8Array(9);return wd[0]=8,wd.set(Int64.fromNumber(ed.value.valueOf()).bytes,1),wd;case"uuid":if(!UUID_PATTERN.test(ed.value))throw new Error(`Invalid UUID received: ${ed.value}`);const Nd=new Uint8Array(17);return Nd[0]=9,Nd.set(fromHex(ed.value.replace(/\-/g,"")),1),Nd}}parse(ed){const ud={};let dd=0;for(;dd{if(typeof yd!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+yd);ed=yd,ud=4,dd=new Uint8Array(yd),new DataView(dd.buffer).setUint32(0,yd,!1)},gd=async function*(){const yd=Ra[Symbol.asyncIterator]();for(;;){const{value:vd,done:Cd}=await yd.next();if(Cd){if(ed)if(ed===ud)yield dd;else throw new Error("Truncated event message received.");else return;return}const wd=vd.length;let Nd=0;for(;Nd({[Symbol.asyncIterator]:async function*(){const ed=Ra.getReader();try{for(;;){const{done:ud,value:dd}=await ed.read();if(ud)return;yield dd}}finally{ed.releaseLock()}}}),iterableToReadableStream=Ra=>{const ed=Ra[Symbol.asyncIterator]();return new ReadableStream({async pull(ud){const{done:dd,value:hd}=await ed.next();if(dd)return ud.close();ud.enqueue(hd)}})};class EventStreamMarshaller{constructor({utf8Encoder:ed,utf8Decoder:ud}){this.universalMarshaller=new EventStreamMarshaller$1({utf8Decoder:ud,utf8Encoder:ed})}deserialize(ed,ud){const dd=isReadableStream$1(ed)?readableStreamtoIterable(ed):ed;return this.universalMarshaller.deserialize(dd,ud)}serialize(ed,ud){const dd=this.universalMarshaller.serialize(ed,ud);return typeof ReadableStream=="function"?iterableToReadableStream(dd):dd}}const isReadableStream$1=Ra=>typeof ReadableStream=="function"&&Ra instanceof ReadableStream,eventStreamSerdeProvider=Ra=>new EventStreamMarshaller(Ra);async function blobReader(Ra,ed,ud=1024*1024){const dd=Ra.size;let hd=0;for(;hd{dd.update(hd)}),dd.digest()},invalidProvider=Ra=>()=>Promise.reject(Ra),BLOCK_SIZE=64,DIGEST_LENGTH=16,INIT=[1732584193,4023233417,2562383102,271733878];class Md5{constructor(){this.reset()}update(ed){if(isEmptyData(ed))return;if(this.finished)throw new Error("Attempted to update an already finished hash.");const ud=convertToBuffer(ed);let dd=0,{byteLength:hd}=ud;for(this.bytesHashed+=hd;hd>0;)this.buffer.setUint8(this.bufferLength++,ud[dd++]),hd--,this.bufferLength===BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)}async digest(){if(!this.finished){const{buffer:ud,bufferLength:dd,bytesHashed:hd}=this,md=hd*8;if(ud.setUint8(this.bufferLength++,128),dd%BLOCK_SIZE>=BLOCK_SIZE-8){for(let gd=this.bufferLength;gd>>0,!0),ud.setUint32(BLOCK_SIZE-4,Math.floor(md/4294967296),!0),this.hashBuffer(),this.finished=!0}const ed=new DataView(new ArrayBuffer(DIGEST_LENGTH));for(let ud=0;ud<4;ud++)ed.setUint32(ud*4,this.state[ud],!0);return new Uint8Array(ed.buffer,ed.byteOffset,ed.byteLength)}hashBuffer(){const{buffer:ed,state:ud}=this;let dd=ud[0],hd=ud[1],md=ud[2],gd=ud[3];dd=ff(dd,hd,md,gd,ed.getUint32(0,!0),7,3614090360),gd=ff(gd,dd,hd,md,ed.getUint32(4,!0),12,3905402710),md=ff(md,gd,dd,hd,ed.getUint32(8,!0),17,606105819),hd=ff(hd,md,gd,dd,ed.getUint32(12,!0),22,3250441966),dd=ff(dd,hd,md,gd,ed.getUint32(16,!0),7,4118548399),gd=ff(gd,dd,hd,md,ed.getUint32(20,!0),12,1200080426),md=ff(md,gd,dd,hd,ed.getUint32(24,!0),17,2821735955),hd=ff(hd,md,gd,dd,ed.getUint32(28,!0),22,4249261313),dd=ff(dd,hd,md,gd,ed.getUint32(32,!0),7,1770035416),gd=ff(gd,dd,hd,md,ed.getUint32(36,!0),12,2336552879),md=ff(md,gd,dd,hd,ed.getUint32(40,!0),17,4294925233),hd=ff(hd,md,gd,dd,ed.getUint32(44,!0),22,2304563134),dd=ff(dd,hd,md,gd,ed.getUint32(48,!0),7,1804603682),gd=ff(gd,dd,hd,md,ed.getUint32(52,!0),12,4254626195),md=ff(md,gd,dd,hd,ed.getUint32(56,!0),17,2792965006),hd=ff(hd,md,gd,dd,ed.getUint32(60,!0),22,1236535329),dd=gg(dd,hd,md,gd,ed.getUint32(4,!0),5,4129170786),gd=gg(gd,dd,hd,md,ed.getUint32(24,!0),9,3225465664),md=gg(md,gd,dd,hd,ed.getUint32(44,!0),14,643717713),hd=gg(hd,md,gd,dd,ed.getUint32(0,!0),20,3921069994),dd=gg(dd,hd,md,gd,ed.getUint32(20,!0),5,3593408605),gd=gg(gd,dd,hd,md,ed.getUint32(40,!0),9,38016083),md=gg(md,gd,dd,hd,ed.getUint32(60,!0),14,3634488961),hd=gg(hd,md,gd,dd,ed.getUint32(16,!0),20,3889429448),dd=gg(dd,hd,md,gd,ed.getUint32(36,!0),5,568446438),gd=gg(gd,dd,hd,md,ed.getUint32(56,!0),9,3275163606),md=gg(md,gd,dd,hd,ed.getUint32(12,!0),14,4107603335),hd=gg(hd,md,gd,dd,ed.getUint32(32,!0),20,1163531501),dd=gg(dd,hd,md,gd,ed.getUint32(52,!0),5,2850285829),gd=gg(gd,dd,hd,md,ed.getUint32(8,!0),9,4243563512),md=gg(md,gd,dd,hd,ed.getUint32(28,!0),14,1735328473),hd=gg(hd,md,gd,dd,ed.getUint32(48,!0),20,2368359562),dd=hh(dd,hd,md,gd,ed.getUint32(20,!0),4,4294588738),gd=hh(gd,dd,hd,md,ed.getUint32(32,!0),11,2272392833),md=hh(md,gd,dd,hd,ed.getUint32(44,!0),16,1839030562),hd=hh(hd,md,gd,dd,ed.getUint32(56,!0),23,4259657740),dd=hh(dd,hd,md,gd,ed.getUint32(4,!0),4,2763975236),gd=hh(gd,dd,hd,md,ed.getUint32(16,!0),11,1272893353),md=hh(md,gd,dd,hd,ed.getUint32(28,!0),16,4139469664),hd=hh(hd,md,gd,dd,ed.getUint32(40,!0),23,3200236656),dd=hh(dd,hd,md,gd,ed.getUint32(52,!0),4,681279174),gd=hh(gd,dd,hd,md,ed.getUint32(0,!0),11,3936430074),md=hh(md,gd,dd,hd,ed.getUint32(12,!0),16,3572445317),hd=hh(hd,md,gd,dd,ed.getUint32(24,!0),23,76029189),dd=hh(dd,hd,md,gd,ed.getUint32(36,!0),4,3654602809),gd=hh(gd,dd,hd,md,ed.getUint32(48,!0),11,3873151461),md=hh(md,gd,dd,hd,ed.getUint32(60,!0),16,530742520),hd=hh(hd,md,gd,dd,ed.getUint32(8,!0),23,3299628645),dd=ii(dd,hd,md,gd,ed.getUint32(0,!0),6,4096336452),gd=ii(gd,dd,hd,md,ed.getUint32(28,!0),10,1126891415),md=ii(md,gd,dd,hd,ed.getUint32(56,!0),15,2878612391),hd=ii(hd,md,gd,dd,ed.getUint32(20,!0),21,4237533241),dd=ii(dd,hd,md,gd,ed.getUint32(48,!0),6,1700485571),gd=ii(gd,dd,hd,md,ed.getUint32(12,!0),10,2399980690),md=ii(md,gd,dd,hd,ed.getUint32(40,!0),15,4293915773),hd=ii(hd,md,gd,dd,ed.getUint32(4,!0),21,2240044497),dd=ii(dd,hd,md,gd,ed.getUint32(32,!0),6,1873313359),gd=ii(gd,dd,hd,md,ed.getUint32(60,!0),10,4264355552),md=ii(md,gd,dd,hd,ed.getUint32(24,!0),15,2734768916),hd=ii(hd,md,gd,dd,ed.getUint32(52,!0),21,1309151649),dd=ii(dd,hd,md,gd,ed.getUint32(16,!0),6,4149444226),gd=ii(gd,dd,hd,md,ed.getUint32(44,!0),10,3174756917),md=ii(md,gd,dd,hd,ed.getUint32(8,!0),15,718787259),hd=ii(hd,md,gd,dd,ed.getUint32(36,!0),21,3951481745),ud[0]=dd+ud[0]&4294967295,ud[1]=hd+ud[1]&4294967295,ud[2]=md+ud[2]&4294967295,ud[3]=gd+ud[3]&4294967295}reset(){this.state=Uint32Array.from(INIT),this.buffer=new DataView(new ArrayBuffer(BLOCK_SIZE)),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}}function cmn(Ra,ed,ud,dd,hd,md){return ed=(ed+Ra&4294967295)+(dd+md&4294967295)&4294967295,(ed<>>32-hd)+ud&4294967295}function ff(Ra,ed,ud,dd,hd,md,gd){return cmn(ed&ud|~ed&dd,Ra,ed,hd,md,gd)}function gg(Ra,ed,ud,dd,hd,md,gd){return cmn(ed&dd|ud&~dd,Ra,ed,hd,md,gd)}function hh(Ra,ed,ud,dd,hd,md,gd){return cmn(ed^ud^dd,Ra,ed,hd,md,gd)}function ii(Ra,ed,ud,dd,hd,md,gd){return cmn(ud^(ed|~dd),Ra,ed,hd,md,gd)}function isEmptyData(Ra){return typeof Ra=="string"?Ra.length===0:Ra.byteLength===0}function convertToBuffer(Ra){return typeof Ra=="string"?fromUtf8$3(Ra):ArrayBuffer.isView(Ra)?new Uint8Array(Ra.buffer,Ra.byteOffset,Ra.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(Ra)}const TEXT_ENCODER=typeof TextEncoder=="function"?new TextEncoder:null,calculateBodyLength=Ra=>{if(typeof Ra=="string"){if(TEXT_ENCODER)return TEXT_ENCODER.encode(Ra).byteLength;let ed=Ra.length;for(let ud=ed-1;ud>=0;ud--){const dd=Ra.charCodeAt(ud);dd>127&&dd<=2047?ed++:dd>2047&&dd<=65535&&(ed+=2),dd>=56320&&dd<=57343&&ud--}return ed}else{if(typeof Ra.byteLength=="number")return Ra.byteLength;if(typeof Ra.size=="number")return Ra.size}throw new Error(`Body Length computation failed for ${Ra}`)},getRuntimeConfig$1=Ra=>({apiVersion:"2006-03-01",base64Decoder:(Ra==null?void 0:Ra.base64Decoder)??fromBase64,base64Encoder:(Ra==null?void 0:Ra.base64Encoder)??toBase64,disableHostPrefix:(Ra==null?void 0:Ra.disableHostPrefix)??!1,endpointProvider:(Ra==null?void 0:Ra.endpointProvider)??defaultEndpointResolver,extensions:(Ra==null?void 0:Ra.extensions)??[],getAwsChunkedEncodingStream:(Ra==null?void 0:Ra.getAwsChunkedEncodingStream)??getAwsChunkedEncodingStream,httpAuthSchemeProvider:(Ra==null?void 0:Ra.httpAuthSchemeProvider)??defaultS3HttpAuthSchemeProvider,httpAuthSchemes:(Ra==null?void 0:Ra.httpAuthSchemes)??[{schemeId:"aws.auth#sigv4",identityProvider:ed=>ed.getIdentityProvider("aws.auth#sigv4"),signer:new AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:ed=>ed.getIdentityProvider("aws.auth#sigv4a"),signer:new AwsSdkSigV4ASigner}],logger:(Ra==null?void 0:Ra.logger)??new NoOpLogger,sdkStreamMixin:(Ra==null?void 0:Ra.sdkStreamMixin)??sdkStreamMixin,serviceId:(Ra==null?void 0:Ra.serviceId)??"S3",signerConstructor:(Ra==null?void 0:Ra.signerConstructor)??SignatureV4MultiRegion,signingEscapePath:(Ra==null?void 0:Ra.signingEscapePath)??!1,urlParser:(Ra==null?void 0:Ra.urlParser)??parseUrl,useArnRegion:(Ra==null?void 0:Ra.useArnRegion)??!1,utf8Decoder:(Ra==null?void 0:Ra.utf8Decoder)??fromUtf8$3,utf8Encoder:(Ra==null?void 0:Ra.utf8Encoder)??toUtf8}),DEFAULTS_MODE_OPTIONS=["in-region","cross-region","mobile","standard","legacy"],resolveDefaultsModeConfig=({defaultsMode:Ra}={})=>memoize$1(async()=>{const ed=typeof Ra=="function"?await Ra():Ra;switch(ed==null?void 0:ed.toLowerCase()){case"auto":return Promise.resolve(isMobileBrowser()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(ed==null?void 0:ed.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${ed}`)}}),isMobileBrowser=()=>{var ud,dd;const Ra=typeof window<"u"&&((ud=window==null?void 0:window.navigator)!=null&&ud.userAgent)?Bowser.parse(window.navigator.userAgent):void 0,ed=(dd=Ra==null?void 0:Ra.platform)==null?void 0:dd.type;return ed==="tablet"||ed==="mobile"},getRuntimeConfig=Ra=>{const ed=resolveDefaultsModeConfig(Ra),ud=()=>ed().then(loadConfigsForDefaultMode),dd=getRuntimeConfig$1(Ra);return{...dd,...Ra,runtime:"browser",defaultsMode:ed,bodyLengthChecker:(Ra==null?void 0:Ra.bodyLengthChecker)??calculateBodyLength,credentialDefaultProvider:(Ra==null?void 0:Ra.credentialDefaultProvider)??(hd=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:(Ra==null?void 0:Ra.defaultUserAgentProvider)??createDefaultUserAgentProvider({serviceId:dd.serviceId,clientVersion:packageInfo.version}),eventStreamSerdeProvider:(Ra==null?void 0:Ra.eventStreamSerdeProvider)??eventStreamSerdeProvider,maxAttempts:(Ra==null?void 0:Ra.maxAttempts)??DEFAULT_MAX_ATTEMPTS,md5:(Ra==null?void 0:Ra.md5)??Md5,region:(Ra==null?void 0:Ra.region)??invalidProvider("Region is missing"),requestHandler:FetchHttpHandler.create((Ra==null?void 0:Ra.requestHandler)??ud),retryMode:(Ra==null?void 0:Ra.retryMode)??(async()=>(await ud()).retryMode||DEFAULT_RETRY_MODE),sha1:(Ra==null?void 0:Ra.sha1)??Sha1,sha256:(Ra==null?void 0:Ra.sha256)??Sha256,streamCollector:(Ra==null?void 0:Ra.streamCollector)??streamCollector,streamHasher:(Ra==null?void 0:Ra.streamHasher)??blobHasher,useDualstackEndpoint:(Ra==null?void 0:Ra.useDualstackEndpoint)??(()=>Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),useFipsEndpoint:(Ra==null?void 0:Ra.useFipsEndpoint)??(()=>Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT))}},getAwsRegionExtensionConfiguration=Ra=>{let ed=async()=>{if(Ra.region===void 0)throw new Error("Region is missing from runtimeConfig");const ud=Ra.region;return typeof ud=="string"?ud:ud()};return{setRegion(ud){ed=ud},region(){return ed}}},resolveAwsRegionExtensionConfiguration=Ra=>({region:Ra.region()}),getHttpAuthExtensionConfiguration=Ra=>{const ed=Ra.httpAuthSchemes;let ud=Ra.httpAuthSchemeProvider,dd=Ra.credentials;return{setHttpAuthScheme(hd){const md=ed.findIndex(gd=>gd.schemeId===hd.schemeId);md===-1?ed.push(hd):ed.splice(md,1,hd)},httpAuthSchemes(){return ed},setHttpAuthSchemeProvider(hd){ud=hd},httpAuthSchemeProvider(){return ud},setCredentials(hd){dd=hd},credentials(){return dd}}},resolveHttpAuthRuntimeConfig=Ra=>({httpAuthSchemes:Ra.httpAuthSchemes(),httpAuthSchemeProvider:Ra.httpAuthSchemeProvider(),credentials:Ra.credentials()}),asPartial=Ra=>Ra,resolveRuntimeExtensions=(Ra,ed)=>{const ud={...asPartial(getAwsRegionExtensionConfiguration(Ra)),...asPartial(getDefaultExtensionConfiguration(Ra)),...asPartial(getHttpHandlerExtensionConfiguration(Ra)),...asPartial(getHttpAuthExtensionConfiguration(Ra))};return ed.forEach(dd=>dd.configure(ud)),{...Ra,...resolveAwsRegionExtensionConfiguration(ud),...resolveDefaultRuntimeConfig(ud),...resolveHttpHandlerRuntimeConfig(ud),...resolveHttpAuthRuntimeConfig(ud)}};class S3Client extends Client$1{constructor(...[ud]){const dd=getRuntimeConfig(ud||{}),hd=resolveClientEndpointParameters(dd),md=resolveUserAgentConfig(hd),gd=resolveFlexibleChecksumsConfig(md),yd=resolveRetryConfig(gd),vd=resolveRegionConfig(yd),Cd=vd,wd=resolveEndpointConfig(Cd),Nd=resolveEventStreamSerdeConfig(wd),Ld=resolveHttpAuthSchemeConfig(Nd),Ud=resolveS3Config(Ld,{session:[()=>this,CreateSessionCommand]}),jd=resolveRuntimeExtensions(Ud,(ud==null?void 0:ud.extensions)||[]);super(jd);Ig(this,"config");this.config=jd,this.middlewareStack.use(getUserAgentPlugin(this.config)),this.middlewareStack.use(getRetryPlugin(this.config)),this.middlewareStack.use(getContentLengthPlugin(this.config)),this.middlewareStack.use(getHostHeaderPlugin(this.config)),this.middlewareStack.use(getLoggerPlugin(this.config)),this.middlewareStack.use(getRecursionDetectionPlugin(this.config)),this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:defaultS3HttpAuthSchemeParametersProvider,identityProviderConfigProvider:async Gd=>new DefaultIdentityProviderConfig({"aws.auth#sigv4":Gd.credentials,"aws.auth#sigv4a":Gd.credentials})})),this.middlewareStack.use(getHttpSigningPlugin(this.config)),this.middlewareStack.use(getValidateBucketNamePlugin(this.config)),this.middlewareStack.use(getAddExpectContinuePlugin(this.config)),this.middlewareStack.use(getRegionRedirectMiddlewarePlugin(this.config)),this.middlewareStack.use(getS3ExpressPlugin(this.config)),this.middlewareStack.use(getS3ExpressHttpSigningPlugin(this.config))}destroy(){super.destroy()}}function ssecMiddleware(Ra){return ed=>async ud=>{const dd={...ud.input},hd=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const md of hd){const gd=dd[md.target];if(gd){let yd;typeof gd=="string"?isValidBase64EncodedSSECustomerKey(gd,Ra)?yd=Ra.base64Decoder(gd):(yd=Ra.utf8Decoder(gd),dd[md.target]=Ra.base64Encoder(yd)):(yd=ArrayBuffer.isView(gd)?new Uint8Array(gd.buffer,gd.byteOffset,gd.byteLength):new Uint8Array(gd),dd[md.target]=Ra.base64Encoder(yd));const vd=new Ra.md5;vd.update(yd),dd[md.hash]=Ra.base64Encoder(await vd.digest())}}return ed({...ud,input:dd})}}const ssecMiddlewareOptions={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},getSsecPlugin=Ra=>({applyToStack:ed=>{ed.add(ssecMiddleware(Ra),ssecMiddlewareOptions)}});function isValidBase64EncodedSSECustomerKey(Ra,ed){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(Ra))return!1;try{return ed.base64Decoder(Ra).length===32}catch{return!1}}class PutObjectCommand extends Command.classBuilder().ep({...commonParams,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(ed,ud,dd,hd){return[getSerdePlugin(dd,this.serialize,this.deserialize),getEndpointPlugin(dd,ed.getEndpointParameterInstructions()),getFlexibleChecksumsPlugin(dd,{requestAlgorithmMember:{httpHeader:"x-amz-sdk-checksum-algorithm",name:"ChecksumAlgorithm"},requestChecksumRequired:!1}),getCheckContentLengthHeaderPlugin(),getThrow200ExceptionsPlugin(dd),getSsecPlugin(dd)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(PutObjectRequestFilterSensitiveLog,PutObjectOutputFilterSensitiveLog).ser(se_PutObjectCommand).de(de_PutObjectCommand).build(){}function formatUrl(Ra){const{port:ed,query:ud}=Ra;let{protocol:dd,path:hd,hostname:md}=Ra;dd&&dd.slice(-1)!==":"&&(dd+=":"),ed&&(md+=`:${ed}`),hd&&hd.charAt(0)!=="/"&&(hd=`/${hd}`);let gd=ud?buildQueryString(ud):"";gd&&gd[0]!=="?"&&(gd=`?${gd}`);let yd="";if(Ra.username!=null||Ra.password!=null){const Cd=Ra.username??"",wd=Ra.password??"";yd=`${Cd}:${wd}@`}let vd="";return Ra.fragment&&(vd=`#${Ra.fragment}`),`${dd}//${yd}${md}${hd}${gd}${vd}`}const UNSIGNED_PAYLOAD="UNSIGNED-PAYLOAD",SHA256_HEADER="X-Amz-Content-Sha256";class S3RequestPresigner{constructor(ed){Ig(this,"signer");const ud={service:ed.signingName||ed.service||"s3",uriEscapePath:ed.uriEscapePath||!1,applyChecksum:ed.applyChecksum||!1,...ed};this.signer=new SignatureV4MultiRegion(ud)}presign(ed,{unsignableHeaders:ud=new Set,hoistableHeaders:dd=new Set,unhoistableHeaders:hd=new Set,...md}={}){return this.prepareRequest(ed,{unsignableHeaders:ud,unhoistableHeaders:hd,hoistableHeaders:dd}),this.signer.presign(ed,{expiresIn:900,unsignableHeaders:ud,unhoistableHeaders:hd,...md})}presignWithCredentials(ed,ud,{unsignableHeaders:dd=new Set,hoistableHeaders:hd=new Set,unhoistableHeaders:md=new Set,...gd}={}){return this.prepareRequest(ed,{unsignableHeaders:dd,unhoistableHeaders:md,hoistableHeaders:hd}),this.signer.presignWithCredentials(ed,ud,{expiresIn:900,unsignableHeaders:dd,unhoistableHeaders:md,...gd})}prepareRequest(ed,{unsignableHeaders:ud=new Set,unhoistableHeaders:dd=new Set,hoistableHeaders:hd=new Set}={}){ud.add("content-type"),Object.keys(ed.headers).map(vd=>vd.toLowerCase()).filter(vd=>vd.startsWith("x-amz-server-side-encryption")).forEach(vd=>{hd.has(vd)||dd.add(vd)}),ed.headers[SHA256_HEADER]=UNSIGNED_PAYLOAD;const md=ed.headers.host,gd=ed.port,yd=`${ed.hostname}${ed.port!=null?":"+gd:""}`;(!md||md===ed.hostname&&ed.port!=null)&&(ed.headers.host=yd)}}const getSignedUrl=async(Ra,ed,ud={})=>{var Nd,Ld,Ud;let dd,hd;if(typeof Ra.config.endpointProvider=="function"){const Gd=(Ld=(Nd=(await getEndpointFromInstructions(ed.input,ed.constructor,Ra.config)).properties)==null?void 0:Nd.authSchemes)==null?void 0:Ld[0];(Gd==null?void 0:Gd.name)==="sigv4a"?hd=(Ud=Gd==null?void 0:Gd.signingRegionSet)==null?void 0:Ud.join(","):hd=Gd==null?void 0:Gd.signingRegion,dd=new S3RequestPresigner({...Ra.config,signingName:Gd==null?void 0:Gd.signingName,region:async()=>hd})}else dd=new S3RequestPresigner(Ra.config);const md=(jd,Gd)=>async Yd=>{const{request:zd}=Yd;if(!HttpRequest.isInstance(zd))throw new Error("Request to be presigned is not an valid HTTP request.");delete zd.headers["amz-sdk-invocation-id"],delete zd.headers["amz-sdk-request"],delete zd.headers["x-amz-user-agent"];let qd;const Wd={...ud,signingRegion:ud.signingRegion??Gd.signing_region??hd,signingService:ud.signingService??Gd.signing_service};return Gd.s3ExpressIdentity?qd=await dd.presignWithCredentials(zd,Gd.s3ExpressIdentity,Wd):qd=await dd.presign(zd,Wd),{response:{},output:{$metadata:{httpStatusCode:200},presigned:qd}}},gd="presignInterceptMiddleware",yd=Ra.middlewareStack.clone();yd.addRelativeTo(md,{name:gd,relation:"before",toMiddleware:"awsAuthMiddleware",override:!0});const vd=ed.resolveMiddleware(yd,Ra.config,{}),{output:Cd}=await vd({input:ed.input}),{presigned:wd}=Cd;return formatUrl(wd)};var toString=Object.prototype.toString,isModern=typeof Buffer$4<"u"&&typeof Buffer$4.alloc=="function"&&typeof Buffer$4.allocUnsafe=="function"&&typeof Buffer$4.from=="function";function isArrayBuffer(Ra){return toString.call(Ra).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(Ra,ed,ud){ed>>>=0;var dd=Ra.byteLength-ed;if(dd<0)throw new RangeError("'offset' is out of bounds");if(ud===void 0)ud=dd;else if(ud>>>=0,ud>dd)throw new RangeError("'length' is out of bounds");return isModern?Buffer$4.from(Ra.slice(ed,ed+ud)):new Buffer$4(new Uint8Array(Ra.slice(ed,ed+ud)))}function fromString(Ra,ed){if((typeof ed!="string"||ed==="")&&(ed="utf8"),!Buffer$4.isEncoding(ed))throw new TypeError('"encoding" must be a valid string encoding');return isModern?Buffer$4.from(Ra,ed):new Buffer$4(Ra,ed)}function bufferFrom(Ra,ed,ud){if(typeof Ra=="number")throw new TypeError('"value" argument must not be a number');return isArrayBuffer(Ra)?fromArrayBuffer(Ra,ed,ud):typeof Ra=="string"?fromString(Ra,ed):isModern?Buffer$4.from(Ra):new Buffer$4(Ra)}var bufferFrom_1=bufferFrom;const Buffer$1=getDefaultExportFromCjs(bufferFrom_1);var cosJsSdkV5={exports:{}};(function(Ra,ed){(function(dd,hd){Ra.exports=hd()})(commonjsGlobal,function(){return function(ud){var dd={};function hd(md){if(dd[md])return dd[md].exports;var gd=dd[md]={i:md,l:!1,exports:{}};return ud[md].call(gd.exports,gd,gd.exports,hd),gd.l=!0,gd.exports}return hd.m=ud,hd.c=dd,hd.d=function(md,gd,yd){hd.o(md,gd)||Object.defineProperty(md,gd,{enumerable:!0,get:yd})},hd.r=function(md){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(md,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(md,"__esModule",{value:!0})},hd.t=function(md,gd){if(gd&1&&(md=hd(md)),gd&8||gd&4&&typeof md=="object"&&md&&md.__esModule)return md;var yd=Object.create(null);if(hd.r(yd),Object.defineProperty(yd,"default",{enumerable:!0,value:md}),gd&2&&typeof md!="string")for(var vd in md)hd.d(yd,vd,(function(Cd){return md[Cd]}).bind(null,vd));return yd},hd.n=function(md){var gd=md&&md.__esModule?function(){return md.default}:function(){return md};return hd.d(gd,"a",gd),gd},hd.o=function(md,gd){return Object.prototype.hasOwnProperty.call(md,gd)},hd.p="/dist/",hd(hd.s="./index.js")}({"./index.js":function(ud,dd,hd){var md=hd("./src/cos.js");ud.exports=md},"./lib/base64.js":function(ud,dd){var hd=function(md){md=md||{};var gd=md.Base64,yd="2.1.9",vd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cd=function(Af){for(var Df={},Of=0,Cf=Af.length;Of>>6)+wd(128|Of&63):wd(224|Of>>>12&15)+wd(128|Of>>>6&63)+wd(128|Of&63)}else{var Of=65536+(Df.charCodeAt(0)-55296)*1024+(Df.charCodeAt(1)-56320);return wd(240|Of>>>18&7)+wd(128|Of>>>12&63)+wd(128|Of>>>6&63)+wd(128|Of&63)}},Ld=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ud=function(Df){return Df.replace(Ld,Nd)},jd=function(Df){var Of=[0,2,1][Df.length%3],Cf=Df.charCodeAt(0)<<16|(Df.length>1?Df.charCodeAt(1):0)<<8|(Df.length>2?Df.charCodeAt(2):0),If=[vd.charAt(Cf>>>18),vd.charAt(Cf>>>12&63),Of>=2?"=":vd.charAt(Cf>>>6&63),Of>=1?"=":vd.charAt(Cf&63)];return If.join("")},Gd=md.btoa?function(Af){return md.btoa(Af)}:function(Af){return Af.replace(/[\s\S]{1,3}/g,jd)},Yd=function(Af){return Gd(Ud(Af))},zd=function(Df,Of){return Of?Yd(String(Df)).replace(/[+\/]/g,function(Cf){return Cf=="+"?"-":"_"}).replace(/=/g,""):Yd(String(Df))},qd=function(Df){return zd(Df,!0)},Wd=new RegExp(["[À-ß][€-¿]","[à-ï][€-¿]{2}","[ð-÷][€-¿]{3}"].join("|"),"g"),Xd=function(Df){switch(Df.length){case 4:var Of=(7&Df.charCodeAt(0))<<18|(63&Df.charCodeAt(1))<<12|(63&Df.charCodeAt(2))<<6|63&Df.charCodeAt(3),Cf=Of-65536;return wd((Cf>>>10)+55296)+wd((Cf&1023)+56320);case 3:return wd((15&Df.charCodeAt(0))<<12|(63&Df.charCodeAt(1))<<6|63&Df.charCodeAt(2));default:return wd((31&Df.charCodeAt(0))<<6|63&Df.charCodeAt(1))}},Jd=function(Df){return Df.replace(Wd,Xd)},Zd=function(Df){var Of=Df.length,Cf=Of%4,If=(Of>0?Cd[Df.charAt(0)]<<18:0)|(Of>1?Cd[Df.charAt(1)]<<12:0)|(Of>2?Cd[Df.charAt(2)]<<6:0)|(Of>3?Cd[Df.charAt(3)]:0),Ff=[wd(If>>>16),wd(If>>>8&255),wd(If&255)];return Ff.length-=[0,0,2,1][Cf],Ff.join("")},mf=md.atob?function(Af){return md.atob(Af)}:function(Af){return Af.replace(/[\s\S]{1,4}/g,Zd)},xf=function(Af){return Jd(mf(Af))},_f=function(Df){return xf(String(Df).replace(/[-_]/g,function(Of){return Of=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,""))},vf=function(){var Df=md.Base64;return md.Base64=gd,Df},gf={VERSION:yd,atob:mf,btoa:Gd,fromBase64:_f,toBase64:zd,utob:Ud,encode:zd,encodeURI:qd,btou:Jd,decode:_f,noConflict:vf};return gf}();ud.exports=hd},"./lib/crypto.js":function(ud,dd,hd){(function(md){var gd=hd("./node_modules/@babel/runtime/helpers/typeof.js"),yd=yd||function(vd,Cd){var wd={},Nd=wd.lib={},Ld=function(){},Ud=Nd.Base={extend:function(Zd){Ld.prototype=this;var mf=new Ld;return Zd&&mf.mixIn(Zd),mf.hasOwnProperty("init")||(mf.init=function(){mf.$super.init.apply(this,arguments)}),mf.init.prototype=mf,mf.$super=this,mf},create:function(){var Zd=this.extend();return Zd.init.apply(Zd,arguments),Zd},init:function(){},mixIn:function(Zd){for(var mf in Zd)Zd.hasOwnProperty(mf)&&(this[mf]=Zd[mf]);Zd.hasOwnProperty("toString")&&(this.toString=Zd.toString)},clone:function(){return this.init.prototype.extend(this)}},jd=Nd.WordArray=Ud.extend({init:function(Zd,mf){Zd=this.words=Zd||[],this.sigBytes=mf!=Cd?mf:4*Zd.length},toString:function(Zd){return(Zd||Yd).stringify(this)},concat:function(Zd){var mf=this.words,xf=Zd.words,_f=this.sigBytes;if(Zd=Zd.sigBytes,this.clamp(),_f%4)for(var vf=0;vf>>2]|=(xf[vf>>>2]>>>24-8*(vf%4)&255)<<24-8*((_f+vf)%4);else if(65535>>2]=xf[vf>>>2];else mf.push.apply(mf,xf);return this.sigBytes+=Zd,this},clamp:function(){var Zd=this.words,mf=this.sigBytes;Zd[mf>>>2]&=4294967295<<32-8*(mf%4),Zd.length=vd.ceil(mf/4)},clone:function(){var Zd=Ud.clone.call(this);return Zd.words=this.words.slice(0),Zd},random:function(Zd){for(var mf=[],xf=0;xf>>2]>>>24-8*(_f%4)&255;xf.push((vf>>>4).toString(16)),xf.push((vf&15).toString(16))}return xf.join("")},parse:function(Zd){for(var mf=Zd.length,xf=[],_f=0;_f>>3]|=parseInt(Zd.substr(_f,2),16)<<24-4*(_f%8);return new jd.init(xf,mf/2)}},zd=Gd.Latin1={stringify:function(Zd){var mf=Zd.words;Zd=Zd.sigBytes;for(var xf=[],_f=0;_f>>2]>>>24-8*(_f%4)&255));return xf.join("")},parse:function(Zd){for(var mf=Zd.length,xf=[],_f=0;_f>>2]|=(Zd.charCodeAt(_f)&255)<<24-8*(_f%4);return new jd.init(xf,mf)}},qd=Gd.Utf8={stringify:function(Zd){try{return decodeURIComponent(escape(zd.stringify(Zd)))}catch{throw Error("Malformed UTF-8 data")}},parse:function(Zd){return zd.parse(unescape(encodeURIComponent(Zd)))}},Wd=Nd.BufferedBlockAlgorithm=Ud.extend({reset:function(){this._data=new jd.init,this._nDataBytes=0},_append:function(Zd){typeof Zd=="string"&&(Zd=qd.parse(Zd)),this._data.concat(Zd),this._nDataBytes+=Zd.sigBytes},_process:function(Zd){var mf=this._data,xf=mf.words,_f=mf.sigBytes,vf=this.blockSize,gf=_f/(4*vf),gf=Zd?vd.ceil(gf):vd.max((gf|0)-this._minBufferSize,0);if(Zd=gf*vf,_f=vd.min(4*Zd,_f),Zd){for(var Af=0;AfZd;Zd++){if(16>Zd)Nd[Zd]=jd[Gd+Zd]|0;else{var mf=Nd[Zd-3]^Nd[Zd-8]^Nd[Zd-14]^Nd[Zd-16];Nd[Zd]=mf<<1|mf>>>31}mf=(zd<<5|zd>>>27)+Jd+Nd[Zd],mf=20>Zd?mf+((qd&Wd|~qd&Xd)+1518500249):40>Zd?mf+((qd^Wd^Xd)+1859775393):60>Zd?mf+((qd&Wd|qd&Xd|Wd&Xd)-1894007588):mf+((qd^Wd^Xd)-899497514),Jd=Xd,Xd=Wd,Wd=qd<<30|qd>>>2,qd=zd,zd=mf}Yd[0]=Yd[0]+zd|0,Yd[1]=Yd[1]+qd|0,Yd[2]=Yd[2]+Wd|0,Yd[3]=Yd[3]+Xd|0,Yd[4]=Yd[4]+Jd|0},_doFinalize:function(){var jd=this._data,Gd=jd.words,Yd=8*this._nDataBytes,zd=8*jd.sigBytes;return Gd[zd>>>5]|=128<<24-zd%32,Gd[(zd+64>>>9<<4)+14]=Math.floor(Yd/4294967296),Gd[(zd+64>>>9<<4)+15]=Yd,jd.sigBytes=4*Gd.length,this._process(),this._hash},clone:function(){var jd=wd.clone.call(this);return jd._hash=this._hash.clone(),jd}});vd.SHA1=wd._createHelper(Ld),vd.HmacSHA1=wd._createHmacHelper(Ld)})(),function(){var vd=yd,Cd=vd.enc.Utf8;vd.algo.HMAC=vd.lib.Base.extend({init:function(Nd,Ld){Nd=this._hasher=new Nd.init,typeof Ld=="string"&&(Ld=Cd.parse(Ld));var Ud=Nd.blockSize,jd=4*Ud;Ld.sigBytes>jd&&(Ld=Nd.finalize(Ld)),Ld.clamp();for(var Gd=this._oKey=Ld.clone(),Yd=this._iKey=Ld.clone(),zd=Gd.words,qd=Yd.words,Wd=0;Wd>>2]>>>24-qd%4*8&255,Xd=jd[qd+1>>>2]>>>24-(qd+1)%4*8&255,Jd=jd[qd+2>>>2]>>>24-(qd+2)%4*8&255,Zd=Wd<<16|Xd<<8|Jd,mf=0;mf<4&&qd+mf*.75>>6*(3-mf)&63));var xf=Yd.charAt(64);if(xf)for(;zd.length%4;)zd.push(xf);return zd.join("")},parse:function(Ud){var jd=Ud.length,Gd=this._map,Yd=Gd.charAt(64);if(Yd){var zd=Ud.indexOf(Yd);zd!=-1&&(jd=zd)}for(var qd=[],Wd=0,Xd=0;Xd>>6-Xd%4*2;qd[Wd>>>2]|=(Jd|Zd)<<24-Wd%4*8,Wd++}return wd.create(qd,Wd)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),gd(md)==="object"?md.exports=yd:window.CryptoJS=yd}).call(this,hd("./node_modules/webpack/buildin/module.js")(ud))},"./lib/md5.js":function(ud,dd,hd){(function(md){var gd,yd=hd("./node_modules/@babel/runtime/helpers/typeof.js");(function(){var vd=(typeof window>"u"?"undefined":yd(window))==="object",Cd=vd?window:{};Cd.JS_MD5_NO_WINDOW&&(vd=!1);var wd=!vd&&(typeof self>"u"?"undefined":yd(self))==="object";wd&&(Cd=self);var Nd=!Cd.JS_MD5_NO_COMMON_JS&&yd(md)==="object"&&md.exports,Ld=hd("./node_modules/webpack/buildin/amd-options.js"),Ud=!Cd.JS_MD5_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",jd="0123456789abcdef".split(""),Gd=[128,32768,8388608,-2147483648],Yd=[0,8,16,24],zd=["hex","array","digest","buffer","arrayBuffer","base64"],qd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),Wd=[],Xd;if(Ud){var Jd=new ArrayBuffer(68);Xd=new Uint8Array(Jd),Wd=new Uint32Array(Jd)}(Cd.JS_MD5_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(vf){return Object.prototype.toString.call(vf)==="[object Array]"}),Ud&&(Cd.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(vf){return yd(vf)==="object"&&vf.buffer&&vf.buffer.constructor===ArrayBuffer});var Zd=function(gf){return function(Af,Df){return new xf(!0).update(Af,Df)[gf]()}},mf=function(){var gf=Zd("hex");gf.getCtx=gf.create=function(){return new xf},gf.update=function(Of){return gf.create().update(Of)};for(var Af=0;Af>6,Ff[Of++]=128|Af&63):Af<55296||Af>=57344?(Ff[Of++]=224|Af>>12,Ff[Of++]=128|Af>>6&63,Ff[Of++]=128|Af&63):(Af=65536+((Af&1023)<<10|vf.charCodeAt(++Df)&1023),Ff[Of++]=240|Af>>18,Ff[Of++]=128|Af>>12&63,Ff[Of++]=128|Af>>6&63,Ff[Of++]=128|Af&63);else for(Of=this.start;Df>2]|=Af<>2]|=(192|Af>>6)<>2]|=(128|Af&63)<=57344?(If[Of>>2]|=(224|Af>>12)<>2]|=(128|Af>>6&63)<>2]|=(128|Af&63)<>2]|=(240|Af>>18)<>2]|=(128|Af>>12&63)<>2]|=(128|Af>>6&63)<>2]|=(128|Af&63)<=64?(this.start=Of-64,this.hash(),this.hashed=!0):this.start=Of}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},xf.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var vf=this.blocks,gf=this.lastByteIndex;vf[gf>>2]|=Gd[gf&3],gf>=56&&(this.hashed||this.hash(),vf[0]=vf[16],vf[16]=vf[1]=vf[2]=vf[3]=vf[4]=vf[5]=vf[6]=vf[7]=vf[8]=vf[9]=vf[10]=vf[11]=vf[12]=vf[13]=vf[14]=vf[15]=0),vf[14]=this.bytes<<3,vf[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},xf.prototype.hash=function(){var vf,gf,Af,Df,Of,Cf,If=this.blocks;this.first?(vf=If[0]-680876937,vf=(vf<<7|vf>>>25)-271733879<<0,Df=(-1732584194^vf&2004318071)+If[1]-117830708,Df=(Df<<12|Df>>>20)+vf<<0,Af=(-271733879^Df&(vf^-271733879))+If[2]-1126478375,Af=(Af<<17|Af>>>15)+Df<<0,gf=(vf^Af&(Df^vf))+If[3]-1316259209,gf=(gf<<22|gf>>>10)+Af<<0):(vf=this.h0,gf=this.h1,Af=this.h2,Df=this.h3,vf+=(Df^gf&(Af^Df))+If[0]-680876936,vf=(vf<<7|vf>>>25)+gf<<0,Df+=(Af^vf&(gf^Af))+If[1]-389564586,Df=(Df<<12|Df>>>20)+vf<<0,Af+=(gf^Df&(vf^gf))+If[2]+606105819,Af=(Af<<17|Af>>>15)+Df<<0,gf+=(vf^Af&(Df^vf))+If[3]-1044525330,gf=(gf<<22|gf>>>10)+Af<<0),vf+=(Df^gf&(Af^Df))+If[4]-176418897,vf=(vf<<7|vf>>>25)+gf<<0,Df+=(Af^vf&(gf^Af))+If[5]+1200080426,Df=(Df<<12|Df>>>20)+vf<<0,Af+=(gf^Df&(vf^gf))+If[6]-1473231341,Af=(Af<<17|Af>>>15)+Df<<0,gf+=(vf^Af&(Df^vf))+If[7]-45705983,gf=(gf<<22|gf>>>10)+Af<<0,vf+=(Df^gf&(Af^Df))+If[8]+1770035416,vf=(vf<<7|vf>>>25)+gf<<0,Df+=(Af^vf&(gf^Af))+If[9]-1958414417,Df=(Df<<12|Df>>>20)+vf<<0,Af+=(gf^Df&(vf^gf))+If[10]-42063,Af=(Af<<17|Af>>>15)+Df<<0,gf+=(vf^Af&(Df^vf))+If[11]-1990404162,gf=(gf<<22|gf>>>10)+Af<<0,vf+=(Df^gf&(Af^Df))+If[12]+1804603682,vf=(vf<<7|vf>>>25)+gf<<0,Df+=(Af^vf&(gf^Af))+If[13]-40341101,Df=(Df<<12|Df>>>20)+vf<<0,Af+=(gf^Df&(vf^gf))+If[14]-1502002290,Af=(Af<<17|Af>>>15)+Df<<0,gf+=(vf^Af&(Df^vf))+If[15]+1236535329,gf=(gf<<22|gf>>>10)+Af<<0,vf+=(Af^Df&(gf^Af))+If[1]-165796510,vf=(vf<<5|vf>>>27)+gf<<0,Df+=(gf^Af&(vf^gf))+If[6]-1069501632,Df=(Df<<9|Df>>>23)+vf<<0,Af+=(vf^gf&(Df^vf))+If[11]+643717713,Af=(Af<<14|Af>>>18)+Df<<0,gf+=(Df^vf&(Af^Df))+If[0]-373897302,gf=(gf<<20|gf>>>12)+Af<<0,vf+=(Af^Df&(gf^Af))+If[5]-701558691,vf=(vf<<5|vf>>>27)+gf<<0,Df+=(gf^Af&(vf^gf))+If[10]+38016083,Df=(Df<<9|Df>>>23)+vf<<0,Af+=(vf^gf&(Df^vf))+If[15]-660478335,Af=(Af<<14|Af>>>18)+Df<<0,gf+=(Df^vf&(Af^Df))+If[4]-405537848,gf=(gf<<20|gf>>>12)+Af<<0,vf+=(Af^Df&(gf^Af))+If[9]+568446438,vf=(vf<<5|vf>>>27)+gf<<0,Df+=(gf^Af&(vf^gf))+If[14]-1019803690,Df=(Df<<9|Df>>>23)+vf<<0,Af+=(vf^gf&(Df^vf))+If[3]-187363961,Af=(Af<<14|Af>>>18)+Df<<0,gf+=(Df^vf&(Af^Df))+If[8]+1163531501,gf=(gf<<20|gf>>>12)+Af<<0,vf+=(Af^Df&(gf^Af))+If[13]-1444681467,vf=(vf<<5|vf>>>27)+gf<<0,Df+=(gf^Af&(vf^gf))+If[2]-51403784,Df=(Df<<9|Df>>>23)+vf<<0,Af+=(vf^gf&(Df^vf))+If[7]+1735328473,Af=(Af<<14|Af>>>18)+Df<<0,gf+=(Df^vf&(Af^Df))+If[12]-1926607734,gf=(gf<<20|gf>>>12)+Af<<0,Of=gf^Af,vf+=(Of^Df)+If[5]-378558,vf=(vf<<4|vf>>>28)+gf<<0,Df+=(Of^vf)+If[8]-2022574463,Df=(Df<<11|Df>>>21)+vf<<0,Cf=Df^vf,Af+=(Cf^gf)+If[11]+1839030562,Af=(Af<<16|Af>>>16)+Df<<0,gf+=(Cf^Af)+If[14]-35309556,gf=(gf<<23|gf>>>9)+Af<<0,Of=gf^Af,vf+=(Of^Df)+If[1]-1530992060,vf=(vf<<4|vf>>>28)+gf<<0,Df+=(Of^vf)+If[4]+1272893353,Df=(Df<<11|Df>>>21)+vf<<0,Cf=Df^vf,Af+=(Cf^gf)+If[7]-155497632,Af=(Af<<16|Af>>>16)+Df<<0,gf+=(Cf^Af)+If[10]-1094730640,gf=(gf<<23|gf>>>9)+Af<<0,Of=gf^Af,vf+=(Of^Df)+If[13]+681279174,vf=(vf<<4|vf>>>28)+gf<<0,Df+=(Of^vf)+If[0]-358537222,Df=(Df<<11|Df>>>21)+vf<<0,Cf=Df^vf,Af+=(Cf^gf)+If[3]-722521979,Af=(Af<<16|Af>>>16)+Df<<0,gf+=(Cf^Af)+If[6]+76029189,gf=(gf<<23|gf>>>9)+Af<<0,Of=gf^Af,vf+=(Of^Df)+If[9]-640364487,vf=(vf<<4|vf>>>28)+gf<<0,Df+=(Of^vf)+If[12]-421815835,Df=(Df<<11|Df>>>21)+vf<<0,Cf=Df^vf,Af+=(Cf^gf)+If[15]+530742520,Af=(Af<<16|Af>>>16)+Df<<0,gf+=(Cf^Af)+If[2]-995338651,gf=(gf<<23|gf>>>9)+Af<<0,vf+=(Af^(gf|~Df))+If[0]-198630844,vf=(vf<<6|vf>>>26)+gf<<0,Df+=(gf^(vf|~Af))+If[7]+1126891415,Df=(Df<<10|Df>>>22)+vf<<0,Af+=(vf^(Df|~gf))+If[14]-1416354905,Af=(Af<<15|Af>>>17)+Df<<0,gf+=(Df^(Af|~vf))+If[5]-57434055,gf=(gf<<21|gf>>>11)+Af<<0,vf+=(Af^(gf|~Df))+If[12]+1700485571,vf=(vf<<6|vf>>>26)+gf<<0,Df+=(gf^(vf|~Af))+If[3]-1894986606,Df=(Df<<10|Df>>>22)+vf<<0,Af+=(vf^(Df|~gf))+If[10]-1051523,Af=(Af<<15|Af>>>17)+Df<<0,gf+=(Df^(Af|~vf))+If[1]-2054922799,gf=(gf<<21|gf>>>11)+Af<<0,vf+=(Af^(gf|~Df))+If[8]+1873313359,vf=(vf<<6|vf>>>26)+gf<<0,Df+=(gf^(vf|~Af))+If[15]-30611744,Df=(Df<<10|Df>>>22)+vf<<0,Af+=(vf^(Df|~gf))+If[6]-1560198380,Af=(Af<<15|Af>>>17)+Df<<0,gf+=(Df^(Af|~vf))+If[13]+1309151649,gf=(gf<<21|gf>>>11)+Af<<0,vf+=(Af^(gf|~Df))+If[4]-145523070,vf=(vf<<6|vf>>>26)+gf<<0,Df+=(gf^(vf|~Af))+If[11]-1120210379,Df=(Df<<10|Df>>>22)+vf<<0,Af+=(vf^(Df|~gf))+If[2]+718787259,Af=(Af<<15|Af>>>17)+Df<<0,gf+=(Df^(Af|~vf))+If[9]-343485551,gf=(gf<<21|gf>>>11)+Af<<0,this.first?(this.h0=vf+1732584193<<0,this.h1=gf-271733879<<0,this.h2=Af-1732584194<<0,this.h3=Df+271733878<<0,this.first=!1):(this.h0=this.h0+vf<<0,this.h1=this.h1+gf<<0,this.h2=this.h2+Af<<0,this.h3=this.h3+Df<<0)},xf.prototype.hex=function(){this.finalize();var vf=this.h0,gf=this.h1,Af=this.h2,Df=this.h3;return jd[vf>>4&15]+jd[vf&15]+jd[vf>>12&15]+jd[vf>>8&15]+jd[vf>>20&15]+jd[vf>>16&15]+jd[vf>>28&15]+jd[vf>>24&15]+jd[gf>>4&15]+jd[gf&15]+jd[gf>>12&15]+jd[gf>>8&15]+jd[gf>>20&15]+jd[gf>>16&15]+jd[gf>>28&15]+jd[gf>>24&15]+jd[Af>>4&15]+jd[Af&15]+jd[Af>>12&15]+jd[Af>>8&15]+jd[Af>>20&15]+jd[Af>>16&15]+jd[Af>>28&15]+jd[Af>>24&15]+jd[Df>>4&15]+jd[Df&15]+jd[Df>>12&15]+jd[Df>>8&15]+jd[Df>>20&15]+jd[Df>>16&15]+jd[Df>>28&15]+jd[Df>>24&15]},xf.prototype.toString=xf.prototype.hex,xf.prototype.digest=function(vf){if(vf==="hex")return this.hex();this.finalize();var gf=this.h0,Af=this.h1,Df=this.h2,Of=this.h3,Cf=[gf&255,gf>>8&255,gf>>16&255,gf>>24&255,Af&255,Af>>8&255,Af>>16&255,Af>>24&255,Df&255,Df>>8&255,Df>>16&255,Df>>24&255,Of&255,Of>>8&255,Of>>16&255,Of>>24&255];return Cf},xf.prototype.array=xf.prototype.digest,xf.prototype.arrayBuffer=function(){this.finalize();var vf=new ArrayBuffer(16),gf=new Uint32Array(vf);return gf[0]=this.h0,gf[1]=this.h1,gf[2]=this.h2,gf[3]=this.h3,vf},xf.prototype.buffer=xf.prototype.arrayBuffer,xf.prototype.base64=function(){for(var vf,gf,Af,Df="",Of=this.array(),Cf=0;Cf<15;)vf=Of[Cf++],gf=Of[Cf++],Af=Of[Cf++],Df+=qd[vf>>>2]+qd[(vf<<4|gf>>>4)&63]+qd[(gf<<2|Af>>>6)&63]+qd[Af&63];return vf=Of[Cf],Df+=qd[vf>>>2]+qd[vf<<4&63]+"==",Df};var _f=mf();Nd?md.exports=_f:(Cd.md5=_f,Ld&&(gd=(function(){return _f}).call(_f,hd,_f,md),gd!==void 0&&(md.exports=gd)))})()}).call(this,hd("./node_modules/webpack/buildin/module.js")(ud))},"./lib/request.js":function(ud,dd,hd){var md=hd("./node_modules/@babel/runtime/helpers/typeof.js"),gd=function(Ld){switch(md(Ld)){case"string":return Ld;case"boolean":return Ld?"true":"false";case"number":return isFinite(Ld)?Ld:"";default:return""}},yd=function(Ld,Ud,jd,Gd){return Ud=Ud||"&",jd=jd||"=",Ld===null&&(Ld=void 0),md(Ld)==="object"?Object.keys(Ld).map(function(Yd){var zd=encodeURIComponent(gd(Yd))+jd;return Array.isArray(Ld[Yd])?Ld[Yd].map(function(qd){return zd+encodeURIComponent(gd(qd))}).join(Ud):zd+encodeURIComponent(gd(Ld[Yd]))}).filter(Boolean).join(Ud):""},vd=function(Ld,Ud,jd){var Gd={},Yd=Ud.getAllResponseHeaders();return Yd&&Yd.length>0&&Yd.trim().split(` +`).forEach(function(zd){if(zd){var qd=zd.indexOf(":"),Wd=zd.substr(0,qd).trim().toLowerCase(),Xd=zd.substr(qd+1).trim();Gd[Wd]=Xd}}),{error:Ld,statusCode:Ud.status,statusMessage:Ud.statusText,headers:Gd,body:jd}},Cd=function(Ld,Ud){return!Ud&&Ud==="text"?Ld.responseText:Ld.response},wd=function(Ld,Ud){var jd=(Ld.method||"GET").toUpperCase(),Gd=Ld.url;if(Ld.qs){var Yd=yd(Ld.qs);Yd&&(Gd+=(Gd.indexOf("?")===-1?"?":"&")+Yd)}var zd=new XMLHttpRequest;if(zd.open(jd,Gd,!0),zd.responseType=Ld.dataType||"text",Ld.xhrFields)for(var qd in Ld.xhrFields)zd[qd]=Ld.xhrFields[qd];var Wd=Ld.headers;if(Wd)for(var Xd in Wd)Wd.hasOwnProperty(Xd)&&Xd.toLowerCase()!=="content-length"&&Xd.toLowerCase()!=="user-agent"&&Xd.toLowerCase()!=="origin"&&Xd.toLowerCase()!=="host"&&zd.setRequestHeader(Xd,Wd[Xd]);return Ld.onProgress&&zd.upload&&(zd.upload.onprogress=Ld.onProgress),Ld.onDownloadProgress&&(zd.onprogress=Ld.onDownloadProgress),Ld.timeout&&(zd.timeout=Ld.timeout),zd.ontimeout=function(Jd){var Zd=new Error("timeout");Ud(vd(Zd,zd))},zd.onload=function(){Ud(vd(null,zd,Cd(zd,Ld.dataType)))},zd.onerror=function(Jd){var Zd=Cd(zd,Ld.dataType);if(Zd)Ud(vd(null,zd,Zd));else{var mf=zd.statusText;!mf&&zd.status===0&&(mf=new Error("CORS blocked or network error")),Ud(vd(mf,zd,Zd))}},zd.send(Ld.body||""),zd};ud.exports=wd},"./node_modules/@babel/runtime/helpers/classCallCheck.js":function(ud,dd){function hd(md,gd){if(!(md instanceof gd))throw new TypeError("Cannot call a class as a function")}ud.exports=hd,ud.exports.__esModule=!0,ud.exports.default=ud.exports},"./node_modules/@babel/runtime/helpers/createClass.js":function(ud,dd,hd){var md=hd("./node_modules/@babel/runtime/helpers/toPropertyKey.js");function gd(vd,Cd){for(var wd=0;wd{for(const yd of md)if(typeof yd=="string"&&gd===yd||yd instanceof RegExp&&yd.test(gd))return!0}:()=>!1}ud.exports=hd},"./node_modules/fast-xml-parser/src/util.js":function(ud,dd,hd){const md=":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",gd=md+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",yd="["+md+"]["+gd+"]*",vd=new RegExp("^"+yd+"$"),Cd=function(Nd,Ld){const Ud=[];let jd=Ld.exec(Nd);for(;jd;){const Gd=[];Gd.startIndex=Ld.lastIndex-jd[0].length;const Yd=jd.length;for(let zd=0;zd"u")};dd.isExist=function(Nd){return typeof Nd<"u"},dd.isEmptyObject=function(Nd){return Object.keys(Nd).length===0},dd.merge=function(Nd,Ld,Ud){if(Ld){const jd=Object.keys(Ld),Gd=jd.length;for(let Yd=0;Yd"&&Zd[gf]!==" "&&Zd[gf]!==" "&&Zd[gf]!==` +`&&Zd[gf]!=="\r";gf++)Of+=Zd[gf];if(Of=Of.trim(),Of[Of.length-1]==="/"&&(Of=Of.substring(0,Of.length-1),gf--),!Wd(Of)){let Ff;return Of.trim().length===0?Ff="Invalid space after '<'.":Ff="Tag '"+Of+"' is an invalid name.",zd("InvalidTag",Ff,Xd(Zd,gf))}const Cf=Ld(Zd,gf);if(Cf===!1)return zd("InvalidAttr","Attributes for '"+Of+"' have open quote.",Xd(Zd,gf));let If=Cf.value;if(gf=Cf.index,If[If.length-1]==="/"){const Ff=gf-If.length;If=If.substring(0,If.length-1);const sh=jd(If,mf);if(sh===!0)_f=!0;else return zd(sh.err.code,sh.err.msg,Xd(Zd,Ff+sh.err.line))}else if(Df)if(Cf.tagClosed){if(If.trim().length>0)return zd("InvalidTag","Closing tag '"+Of+"' can't have attributes or invalid starting.",Xd(Zd,Af));if(xf.length===0)return zd("InvalidTag","Closing tag '"+Of+"' has not been opened.",Xd(Zd,Af));{const Ff=xf.pop();if(Of!==Ff.tagName){let sh=Xd(Zd,Ff.tagStartPos);return zd("InvalidTag","Expected closing tag '"+Ff.tagName+"' (opened in line "+sh.line+", col "+sh.col+") instead of closing tag '"+Of+"'.",Xd(Zd,Af))}xf.length==0&&(vf=!0)}}else return zd("InvalidTag","Closing tag '"+Of+"' doesn't have proper closing.",Xd(Zd,gf));else{const Ff=jd(If,mf);if(Ff!==!0)return zd(Ff.err.code,Ff.err.msg,Xd(Zd,gf-If.length+Ff.err.line));if(vf===!0)return zd("InvalidXml","Multiple possible root nodes found.",Xd(Zd,gf));mf.unpairedTags.indexOf(Of)!==-1||xf.push({tagName:Of,tagStartPos:Af}),_f=!0}for(gf++;gf0)return zd("InvalidXml","Invalid '"+JSON.stringify(xf.map(gf=>gf.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return zd("InvalidXml","Start tag expected.",1);return!0};function yd(Zd){return Zd===" "||Zd===" "||Zd===` +`||Zd==="\r"}function vd(Zd,mf){const xf=mf;for(;mf5&&_f==="xml")return zd("InvalidXml","XML declaration allowed only at the start of the document.",Xd(Zd,mf));if(Zd[mf]=="?"&&Zd[mf+1]==">"){mf++;break}else continue}return mf}function Cd(Zd,mf){if(Zd.length>mf+5&&Zd[mf+1]==="-"&&Zd[mf+2]==="-"){for(mf+=3;mf"){mf+=2;break}}else if(Zd.length>mf+8&&Zd[mf+1]==="D"&&Zd[mf+2]==="O"&&Zd[mf+3]==="C"&&Zd[mf+4]==="T"&&Zd[mf+5]==="Y"&&Zd[mf+6]==="P"&&Zd[mf+7]==="E"){let xf=1;for(mf+=8;mf"&&(xf--,xf===0))break}else if(Zd.length>mf+9&&Zd[mf+1]==="["&&Zd[mf+2]==="C"&&Zd[mf+3]==="D"&&Zd[mf+4]==="A"&&Zd[mf+5]==="T"&&Zd[mf+6]==="A"&&Zd[mf+7]==="["){for(mf+=8;mf"){mf+=2;break}}return mf}const wd='"',Nd="'";function Ld(Zd,mf){let xf="",_f="",vf=!1;for(;mf"&&_f===""){vf=!0;break}xf+=Zd[mf]}return _f!==""?!1:{value:xf,index:mf,tagClosed:vf}}const Ud=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function jd(Zd,mf){const xf=md.getAllMatches(Zd,Ud),_f={};for(let vf=0;vf","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function vd(Ld){this.options=Object.assign({},yd,Ld),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=gd(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Nd),this.processTextOrObjNode=Cd,this.options.format?(this.indentate=wd,this.tagEndChar=`> `,this.newLine=` -`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}gd.prototype.build=function(Md){return this.options.preserveOrder?fd(Md,this.options):(Array.isArray(Md)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Md={[this.options.arrayNodeName]:Md}),this.j2x(Md,0,[]).val)},gd.prototype.j2x=function(Md,Ld,Fd){let Hd="",Vd="";const Gd=Fd.join(".");for(let Ud in Md)if(Object.prototype.hasOwnProperty.call(Md,Ud))if(typeof Md[Ud]>"u")this.isAttribute(Ud)&&(Vd+="");else if(Md[Ud]===null)this.isAttribute(Ud)?Vd+="":Ud[0]==="?"?Vd+=this.indentate(Ld)+"<"+Ud+"?"+this.tagEndChar:Vd+=this.indentate(Ld)+"<"+Ud+"/"+this.tagEndChar;else if(Md[Ud]instanceof Date)Vd+=this.buildTextValNode(Md[Ud],Ud,"",Ld);else if(typeof Md[Ud]!="object"){const qd=this.isAttribute(Ud);if(qd&&!this.ignoreAttributesFn(qd,Gd))Hd+=this.buildAttrPairStr(qd,""+Md[Ud]);else if(!qd)if(Ud===this.options.textNodeName){let Wd=this.options.tagValueProcessor(Ud,""+Md[Ud]);Vd+=this.replaceEntitiesValue(Wd)}else Vd+=this.buildTextValNode(Md[Ud],Ud,"",Ld)}else if(Array.isArray(Md[Ud])){const qd=Md[Ud].length;let Wd="",Kd="";for(let Xd=0;Xd"u"))if(df===null)Ud[0]==="?"?Vd+=this.indentate(Ld)+"<"+Ud+"?"+this.tagEndChar:Vd+=this.indentate(Ld)+"<"+Ud+"/"+this.tagEndChar;else if(typeof df=="object")if(this.options.oneListGroup){const Ef=this.j2x(df,Ld+1,Fd.concat(Ud));Wd+=Ef.val,this.options.attributesGroupName&&df.hasOwnProperty(this.options.attributesGroupName)&&(Kd+=Ef.attrStr)}else Wd+=this.processTextOrObjNode(df,Ud,Ld,Fd);else if(this.options.oneListGroup){let Ef=this.options.tagValueProcessor(Ud,df);Ef=this.replaceEntitiesValue(Ef),Wd+=Ef}else Wd+=this.buildTextValNode(df,Ud,"",Ld)}this.options.oneListGroup&&(Wd=this.buildObjectNode(Wd,Ud,Kd,Ld)),Vd+=Wd}else if(this.options.attributesGroupName&&Ud===this.options.attributesGroupName){const qd=Object.keys(Md[Ud]),Wd=qd.length;for(let Kd=0;Kd"+Md+Vd:this.options.commentPropName!==!1&&Ld===this.options.commentPropName&&Gd.length===0?this.indentate(Hd)+``+this.newLine:this.indentate(Hd)+"<"+Ld+Fd+Gd+this.tagEndChar+Md+this.indentate(Hd)+Vd}},gd.prototype.closeTag=function(Md){let Ld="";return this.options.unpairedTags.indexOf(Md)!==-1?this.options.suppressUnpairedNode||(Ld="/"):this.options.suppressEmptyNode?Ld="/":Ld=`>`+this.newLine;if(this.options.commentPropName!==!1&&Ld===this.options.commentPropName)return this.indentate(Hd)+``+this.newLine;if(Ld[0]==="?")return this.indentate(Hd)+"<"+Ld+Fd+"?"+this.tagEndChar;{let Vd=this.options.tagValueProcessor(Ld,Md);return Vd=this.replaceEntitiesValue(Vd),Vd===""?this.indentate(Hd)+"<"+Ld+Fd+this.closeTag(Ld)+this.tagEndChar:this.indentate(Hd)+"<"+Ld+Fd+">"+Vd+"0&&this.options.processEntities)for(let Ld=0;Ld0&&(Ld=pd),hd(Nd,Md,"",Ld)}function hd(Nd,Md,Ld,Fd){let Hd="",Vd=!1;for(let Gd=0;Gd`,Vd=!1;continue}else if(qd===Md.commentPropName){Hd+=Fd+``,Vd=!0;continue}else if(qd[0]==="?"){const pf=gd(Ud[":@"],Md),mf=qd==="?xml"?"":Fd;let _f=Ud[qd][0][Md.textNodeName];_f=_f.length!==0?" "+_f:"",Hd+=mf+`<${qd}${_f}${pf}?>`,Vd=!0;continue}let Kd=Fd;Kd!==""&&(Kd+=Md.indentBy);const Xd=gd(Ud[":@"],Md),df=Fd+`<${qd}${Xd}`,Ef=hd(Ud[qd],Md,Wd,Kd);Md.unpairedTags.indexOf(qd)!==-1?Md.suppressUnpairedNode?Hd+=df+">":Hd+=df+"/>":(!Ef||Ef.length===0)&&Md.suppressEmptyNode?Hd+=df+"/>":Ef&&Ef.endsWith(">")?Hd+=df+`>${Ef}${Fd}`:(Hd+=df+">",Ef&&Fd!==""&&(Ef.includes("/>")||Ef.includes("`),Vd=!0}return Hd}function md(Nd){const Md=Object.keys(Nd);for(let Ld=0;Ld0&&Md.processEntities)for(let Ld=0;Ld"){if(Ud?Ld[Fd-1]==="-"&&Ld[Fd-2]==="-"&&(Ud=!1,Vd--):Vd--,Vd===0)break}else Ld[Fd]==="["?Gd=!0:qd+=Ld[Fd];if(Vd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:Hd,i:Fd}}function md(Ld,Fd){let Hd="";for(;Fd!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(hd,md,gd){return hd}},fd=function(hd){return Object.assign({},pd,hd)};sd.buildOptions=fd,sd.defaultOptions=pd},"./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js":function(rd,sd,pd){const fd=pd("./node_modules/fast-xml-parser/src/util.js"),hd=pd("./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"),md=pd("./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"),gd=pd("./node_modules/strnum/strnum.js"),yd=pd("./node_modules/fast-xml-parser/src/ignoreAttributes.js");class vd{constructor(_f){this.options=_f,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(xf,Cf)=>String.fromCharCode(Number.parseInt(Cf,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(xf,Cf)=>String.fromCharCode(Number.parseInt(Cf,16))}},this.addExternalEntities=Nd,this.parseXml=Vd,this.parseTextData=Md,this.resolveNameSpace=Ld,this.buildAttributesMap=Hd,this.isItStopNode=Wd,this.replaceEntitiesValue=Ud,this.readStopNodeData=Ef,this.saveTextToParentTag=qd,this.addChild=Gd,this.ignoreAttributesFn=yd(this.options.ignoreAttributes)}}function Nd(mf){const _f=Object.keys(mf);for(let xf=0;xf<_f.length;xf++){const Cf=_f[xf];this.lastEntities[Cf]={regex:new RegExp("&"+Cf+";","g"),val:mf[Cf]}}}function Md(mf,_f,xf,Cf,If,Sf,wf){if(mf!==void 0&&(this.options.trimValues&&!Cf&&(mf=mf.trim()),mf.length>0)){wf||(mf=this.replaceEntitiesValue(mf));const Pf=this.options.tagValueProcessor(_f,mf,xf,If,Sf);return Pf==null?mf:typeof Pf!=typeof mf||Pf!==mf?Pf:this.options.trimValues?pf(mf,this.options.parseTagValue,this.options.numberParseOptions):mf.trim()===mf?pf(mf,this.options.parseTagValue,this.options.numberParseOptions):mf}}function Ld(mf){if(this.options.removeNSPrefix){const _f=mf.split(":"),xf=mf.charAt(0)==="/"?"/":"";if(_f[0]==="xmlns")return"";_f.length===2&&(mf=xf+_f[1])}return mf}const Fd=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Hd(mf,_f,xf){if(this.options.ignoreAttributes!==!0&&typeof mf=="string"){const Cf=fd.getAllMatches(mf,Fd),If=Cf.length,Sf={};for(let wf=0;wf",Sf,"Closing Tag is not closed.");let lh=mf.substring(Sf+2,Pf).trim();if(this.options.removeNSPrefix){const Mh=lh.indexOf(":");Mh!==-1&&(lh=lh.substr(Mh+1))}this.options.transformTagName&&(lh=this.options.transformTagName(lh)),xf&&(Cf=this.saveTextToParentTag(Cf,xf,If));const xh=If.substring(If.lastIndexOf(".")+1);if(lh&&this.options.unpairedTags.indexOf(lh)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let Eh=0;xh&&this.options.unpairedTags.indexOf(xh)!==-1?(Eh=If.lastIndexOf(".",If.lastIndexOf(".")-1),this.tagsNodeStack.pop()):Eh=If.lastIndexOf("."),If=If.substring(0,Eh),xf=this.tagsNodeStack.pop(),Cf="",Sf=Pf}else if(mf[Sf+1]==="?"){let Pf=df(mf,Sf,!1,"?>");if(!Pf)throw new Error("Pi Tag is not closed.");if(Cf=this.saveTextToParentTag(Cf,xf,If),!(this.options.ignoreDeclaration&&Pf.tagName==="?xml"||this.options.ignorePiTags)){const lh=new hd(Pf.tagName);lh.add(this.options.textNodeName,""),Pf.tagName!==Pf.tagExp&&Pf.attrExpPresent&&(lh[":@"]=this.buildAttributesMap(Pf.tagExp,If,Pf.tagName)),this.addChild(xf,lh,If)}Sf=Pf.closeIndex+1}else if(mf.substr(Sf+1,3)==="!--"){const Pf=Xd(mf,"-->",Sf+4,"Comment is not closed.");if(this.options.commentPropName){const lh=mf.substring(Sf+4,Pf-2);Cf=this.saveTextToParentTag(Cf,xf,If),xf.add(this.options.commentPropName,[{[this.options.textNodeName]:lh}])}Sf=Pf}else if(mf.substr(Sf+1,2)==="!D"){const Pf=md(mf,Sf);this.docTypeEntities=Pf.entities,Sf=Pf.i}else if(mf.substr(Sf+1,2)==="!["){const Pf=Xd(mf,"]]>",Sf,"CDATA is not closed.")-2,lh=mf.substring(Sf+9,Pf);Cf=this.saveTextToParentTag(Cf,xf,If);let xh=this.parseTextData(lh,xf.tagname,If,!0,!1,!0,!0);xh==null&&(xh=""),this.options.cdataPropName?xf.add(this.options.cdataPropName,[{[this.options.textNodeName]:lh}]):xf.add(this.options.textNodeName,xh),Sf=Pf+2}else{let Pf=df(mf,Sf,this.options.removeNSPrefix),lh=Pf.tagName;const xh=Pf.rawTagName;let Eh=Pf.tagExp,Mh=Pf.attrExpPresent,dh=Pf.closeIndex;this.options.transformTagName&&(lh=this.options.transformTagName(lh)),xf&&Cf&&xf.tagname!=="!xml"&&(Cf=this.saveTextToParentTag(Cf,xf,If,!1));const eh=xf;if(eh&&this.options.unpairedTags.indexOf(eh.tagname)!==-1&&(xf=this.tagsNodeStack.pop(),If=If.substring(0,If.lastIndexOf("."))),lh!==_f.tagname&&(If+=If?"."+lh:lh),this.isItStopNode(this.options.stopNodes,If,lh)){let fh="";if(Eh.length>0&&Eh.lastIndexOf("/")===Eh.length-1)lh[lh.length-1]==="/"?(lh=lh.substr(0,lh.length-1),If=If.substr(0,If.length-1),Eh=lh):Eh=Eh.substr(0,Eh.length-1),Sf=Pf.closeIndex;else if(this.options.unpairedTags.indexOf(lh)!==-1)Sf=Pf.closeIndex;else{const vh=this.readStopNodeData(mf,xh,dh+1);if(!vh)throw new Error(`Unexpected end of ${xh}`);Sf=vh.i,fh=vh.tagContent}const Sh=new hd(lh);lh!==Eh&&Mh&&(Sh[":@"]=this.buildAttributesMap(Eh,If,lh)),fh&&(fh=this.parseTextData(fh,lh,If,!0,Mh,!0,!0)),If=If.substr(0,If.lastIndexOf(".")),Sh.add(this.options.textNodeName,fh),this.addChild(xf,Sh,If)}else{if(Eh.length>0&&Eh.lastIndexOf("/")===Eh.length-1){lh[lh.length-1]==="/"?(lh=lh.substr(0,lh.length-1),If=If.substr(0,If.length-1),Eh=lh):Eh=Eh.substr(0,Eh.length-1),this.options.transformTagName&&(lh=this.options.transformTagName(lh));const fh=new hd(lh);lh!==Eh&&Mh&&(fh[":@"]=this.buildAttributesMap(Eh,If,lh)),this.addChild(xf,fh,If),If=If.substr(0,If.lastIndexOf("."))}else{const fh=new hd(lh);this.tagsNodeStack.push(xf),lh!==Eh&&Mh&&(fh[":@"]=this.buildAttributesMap(Eh,If,lh)),this.addChild(xf,fh,If),xf=fh}Cf="",Sf=dh}}else Cf+=mf[Sf];return _f.child};function Gd(mf,_f,xf){const Cf=this.options.updateTag(_f.tagname,xf,_f[":@"]);Cf===!1||(typeof Cf=="string"&&(_f.tagname=Cf),mf.addChild(_f))}const Ud=function(mf){if(this.options.processEntities){for(let _f in this.docTypeEntities){const xf=this.docTypeEntities[_f];mf=mf.replace(xf.regx,xf.val)}for(let _f in this.lastEntities){const xf=this.lastEntities[_f];mf=mf.replace(xf.regex,xf.val)}if(this.options.htmlEntities)for(let _f in this.htmlEntities){const xf=this.htmlEntities[_f];mf=mf.replace(xf.regex,xf.val)}mf=mf.replace(this.ampEntity.regex,this.ampEntity.val)}return mf};function qd(mf,_f,xf,Cf){return mf&&(Cf===void 0&&(Cf=Object.keys(_f.child).length===0),mf=this.parseTextData(mf,_f.tagname,xf,!1,_f[":@"]?Object.keys(_f[":@"]).length!==0:!1,Cf),mf!==void 0&&mf!==""&&_f.add(this.options.textNodeName,mf),mf=""),mf}function Wd(mf,_f,xf){const Cf="*."+xf;for(const If in mf){const Sf=mf[If];if(Cf===Sf||_f===Sf)return!0}return!1}function Kd(mf,_f,xf=">"){let Cf,If="";for(let Sf=_f;Sf",xf,`${_f} is not closed`);if(mf.substring(xf+2,Sf).trim()===_f&&(If--,If===0))return{tagContent:mf.substring(Cf,xf),i:Sf};xf=Sf}else if(mf[xf+1]==="?")xf=Xd(mf,"?>",xf+1,"StopNode is not closed.");else if(mf.substr(xf+1,3)==="!--")xf=Xd(mf,"-->",xf+3,"StopNode is not closed.");else if(mf.substr(xf+1,2)==="![")xf=Xd(mf,"]]>",xf,"StopNode is not closed.")-2;else{const Sf=df(mf,xf,">");Sf&&((Sf&&Sf.tagName)===_f&&Sf.tagExp[Sf.tagExp.length-1]!=="/"&&If++,xf=Sf.closeIndex)}}function pf(mf,_f,xf){if(_f&&typeof mf=="string"){const Cf=mf.trim();return Cf==="true"?!0:Cf==="false"?!1:gd(mf,xf)}else return fd.isExist(mf)?mf:""}rd.exports=vd},"./node_modules/fast-xml-parser/src/xmlparser/XMLParser.js":function(rd,sd,pd){const{buildOptions:fd}=pd("./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"),hd=pd("./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"),{prettify:md}=pd("./node_modules/fast-xml-parser/src/xmlparser/node2json.js"),gd=pd("./node_modules/fast-xml-parser/src/validator.js");class yd{constructor(Nd){this.externalEntities={},this.options=fd(Nd)}parse(Nd,Md){if(typeof Nd!="string")if(Nd.toString)Nd=Nd.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(Md){Md===!0&&(Md={});const Hd=gd.validate(Nd,Md);if(Hd!==!0)throw Error(`${Hd.err.msg}:${Hd.err.line}:${Hd.err.col}`)}const Ld=new hd(this.options);Ld.addExternalEntities(this.externalEntities);const Fd=Ld.parseXml(Nd);return this.options.preserveOrder||Fd===void 0?Fd:md(Fd,this.options)}addEntity(Nd,Md){if(Md.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(Nd.indexOf("&")!==-1||Nd.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(Md==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[Nd]=Md}}rd.exports=yd},"./node_modules/fast-xml-parser/src/xmlparser/node2json.js":function(rd,sd,pd){function fd(vd,Nd){return hd(vd,Nd)}function hd(vd,Nd,Md){let Ld;const Fd={};for(let Hd=0;Hd0&&(Fd[Nd.textNodeName]=Ld):Ld!==void 0&&(Fd[Nd.textNodeName]=Ld),Fd}function md(vd){const Nd=Object.keys(vd);for(let Md=0;Md0?this.child.push({[md.tagname]:md.child,":@":md[":@"]}):this.child.push({[md.tagname]:md.child})}}rd.exports=fd},"./node_modules/process/browser.js":function(rd,sd){var pd=rd.exports={},fd,hd;function md(){throw new Error("setTimeout has not been defined")}function gd(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?fd=setTimeout:fd=md}catch{fd=md}try{typeof clearTimeout=="function"?hd=clearTimeout:hd=gd}catch{hd=gd}})();function yd(qd){if(fd===setTimeout)return setTimeout(qd,0);if((fd===md||!fd)&&setTimeout)return fd=setTimeout,setTimeout(qd,0);try{return fd(qd,0)}catch{try{return fd.call(null,qd,0)}catch{return fd.call(this,qd,0)}}}function vd(qd){if(hd===clearTimeout)return clearTimeout(qd);if((hd===gd||!hd)&&clearTimeout)return hd=clearTimeout,clearTimeout(qd);try{return hd(qd)}catch{try{return hd.call(null,qd)}catch{return hd.call(this,qd)}}}var Nd=[],Md=!1,Ld,Fd=-1;function Hd(){!Md||!Ld||(Md=!1,Ld.length?Nd=Ld.concat(Nd):Fd=-1,Nd.length&&Vd())}function Vd(){if(!Md){var qd=yd(Hd);Md=!0;for(var Wd=Nd.length;Wd;){for(Ld=Nd,Nd=[];++Fd1)for(var Kd=1;Kd0&&Ld&&Nd[2]!==".")return yd;if(!vd.leadingZeros&&Fd.length>0&&!Ld&&Nd[1]!==".")return yd;{const Gd=Number(Nd),Ud=""+Gd;return Ud.search(/[eE]/)!==-1||Vd?vd.eNotation?Gd:yd:Nd.indexOf(".")!==-1?Ud==="0"&&Hd===""||Ud===Hd||Ld&&Ud==="-"+Hd?Gd:yd:Fd?Hd===Ud||Ld+Hd===Ud?Gd:yd:Nd===Ud||Nd===Ld+Ud?Gd:yd}}else return yd}}function gd(yd){return yd&&yd.indexOf(".")!==-1&&(yd=yd.replace(/0+$/,""),yd==="."?yd="0":yd[0]==="."?yd="0"+yd:yd[yd.length-1]==="."&&(yd=yd.substr(0,yd.length-1))),yd}rd.exports=md},"./node_modules/webpack/buildin/amd-options.js":function(rd,sd){(function(pd){rd.exports=pd}).call(this,{})},"./node_modules/webpack/buildin/module.js":function(rd,sd){rd.exports=function(pd){return pd.webpackPolyfill||(pd.deprecate=function(){},pd.paths=[],pd.children||(pd.children=[]),Object.defineProperty(pd,"loaded",{enumerable:!0,get:function(){return pd.l}}),Object.defineProperty(pd,"id",{enumerable:!0,get:function(){return pd.i}}),pd.webpackPolyfill=1),pd}},"./package.json":function(rd){rd.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.8.7","description":"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js demo/CIDemos/*.js test/test.js server/sts.js lib/request.js index.d.ts","server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m","test":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"fast-xml-parser":"4.5.0"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.0.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":function(rd,sd,pd){var fd=pd("./node_modules/@babel/runtime/helpers/typeof.js"),hd=pd("./src/session.js"),md=pd("./src/async.js"),gd=pd("./src/event.js").EventProxy,yd=pd("./src/util.js"),vd=pd("./src/tracker.js");function Nd(pf,mf){var _f=this,xf=new gd,Cf=pf.TaskId,If=pf.Bucket,Sf=pf.Region,wf=pf.Key,Pf=pf.Body,lh=pf.ChunkSize||pf.SliceSize||_f.options.ChunkSize,xh=pf.AsyncLimit,Eh=pf.StorageClass,Mh=pf.ServerSideEncryption,dh,eh,fh=pf.onHashProgress,Sh=pf.tracker;Sh&&Sh.setParams({chunkSize:lh}),xf.on("error",function(vh){if(_f._isRunningTask(Cf))return pf.UploadData.UploadId&&hd.removeUsing(pf.UploadData.UploadId),vh.UploadId=pf.UploadData.UploadId||"",mf(vh)}),xf.on("upload_complete",function(vh){var Df=yd.extend({UploadId:pf.UploadData.UploadId||""},vh);mf(null,Df)}),xf.on("upload_slice_complete",function(vh){var Df={};yd.each(pf.Headers,function(Af,_h){var Nh=_h.toLowerCase();(Nh.indexOf("x-cos-meta-")===0||["pic-operations","x-cos-callback","x-cos-callback-var","x-cos-return-body"].includes(Nh))&&(Df[_h]=Af)}),Gd.call(_f,{Bucket:If,Region:Sf,Key:wf,UploadId:vh.UploadId,SliceList:vh.SliceList,Headers:Df,tracker:Sh},function(Af,_h){if(_f._isRunningTask(Cf)){if(hd.removeUsing(vh.UploadId),Af)return eh(null,!0),xf.emit("error",Af);hd.removeUploadId.call(_f,vh.UploadId),eh({loaded:dh,total:dh},!0),xf.emit("upload_complete",_h)}})}),xf.on("get_upload_data_finish",function(vh){var Df=hd.getFileId(Pf,pf.ChunkSize,If,wf);Df&&hd.saveUploadId.call(_f,Df,vh.UploadId,_f.options.UploadIdCacheLimit),hd.setUsing(vh.UploadId),eh(null,!0),Hd.call(_f,{TaskId:Cf,Bucket:If,Region:Sf,Key:wf,Body:Pf,FileSize:dh,SliceSize:lh,AsyncLimit:xh,ServerSideEncryption:Mh,UploadData:vh,Headers:pf.Headers,onProgress:eh,tracker:Sh},function(Af,_h){if(_f._isRunningTask(Cf)){if(Af)return eh(null,!0),xf.emit("error",Af);xf.emit("upload_slice_complete",_h)}})}),xf.on("get_file_size_finish",function(){if(eh=yd.throttleOnProgress.call(_f,dh,pf.onProgress),pf.UploadData.UploadId)xf.emit("get_upload_data_finish",pf.UploadData);else{var vh=yd.extend({TaskId:Cf,Bucket:If,Region:Sf,Key:wf,Headers:pf.Headers,StorageClass:Eh,Body:Pf,FileSize:dh,SliceSize:lh,onHashProgress:fh,tracker:Sh},pf);Md.call(_f,vh,function(Df,Af){if(_f._isRunningTask(Cf)){if(Df)return xf.emit("error",Df);pf.UploadData.UploadId=Af.UploadId,pf.UploadData.PartList=Af.PartList,xf.emit("get_upload_data_finish",pf.UploadData)}})}}),dh=pf.ContentLength,delete pf.ContentLength,!pf.Headers&&(pf.Headers={}),yd.each(pf.Headers,function(vh,Df){Df.toLowerCase()==="content-length"&&delete pf.Headers[Df]}),function(){for(var vh=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],Df=1024*1024,Af=0;AfEh)return Af(null,!1);if(_h>1){var Nh=Math.max(Df[0].Size,Df[1].Size);if(Nh!==xh)return Af(null,!1)}var dm=function Jf(oh){if(oh<_h){var Xh=Df[oh];eh(Xh.PartNumber,function(Tm,kh){kh&&kh.ETag===Xh.ETag&&kh.Size===Xh.Size?Jf(oh+1):Af(null,!1)})}else Af(null,!0)};dm(0)},Sh=new gd;Sh.on("error",function(vh){if(wf._isRunningTask(_f))return mf(vh)}),Sh.on("upload_id_available",function(vh){var Df={},Af=[];yd.each(vh.PartList,function(dm){Df[dm.PartNumber]=dm});for(var _h=1;_h<=Eh;_h++){var Nh=Df[_h];Nh?(Nh.PartNumber=_h,Nh.Uploaded=!0):Nh={PartNumber:_h,ETag:null,Uploaded:!1},Af.push(Nh)}vh.PartList=Af,mf(null,vh)}),Sh.on("no_available_upload_id",function(){if(wf._isRunningTask(_f)){var vh=yd.extend({Bucket:xf,Region:Cf,Key:If,Query:yd.clone(pf.Query),StorageClass:Sf,Body:pf.Body,calledBySdk:"sliceUploadFile",tracker:pf.tracker},pf),Df=yd.clone(pf.Headers);delete Df["x-cos-mime-limit"],vh.Headers=Df,wf.multipartInit(vh,function(Af,_h){if(wf._isRunningTask(_f)){if(Af)return Sh.emit("error",Af);var Nh=_h.UploadId;if(!Nh)return mf(yd.error(new Error("no such upload id")));Sh.emit("upload_id_available",{UploadId:Nh,PartList:[]})}})}}),Sh.on("has_and_check_upload_id",function(vh){vh=vh.reverse(),md.eachLimit(vh,1,function(Df,Af){if(wf._isRunningTask(_f)){if(hd.using[Df]){Af();return}Fd.call(wf,{Bucket:xf,Region:Cf,Key:If,UploadId:Df,tracker:pf.tracker},function(_h,Nh){if(wf._isRunningTask(_f)){if(_h)return hd.removeUsing(Df),Sh.emit("error",_h);var dm=Nh.PartList;dm.forEach(function(Jf){Jf.PartNumber*=1,Jf.Size*=1,Jf.ETag=Jf.ETag||""}),fh(dm,function(Jf,oh){if(wf._isRunningTask(_f)){if(Jf)return Sh.emit("error",Jf);oh?Af({UploadId:Df,PartList:dm}):Af()}})}})}},function(Df){wf._isRunningTask(_f)&&(dh(null,!0),Df&&Df.UploadId?Sh.emit("upload_id_available",Df):Sh.emit("no_available_upload_id"))})}),Sh.on("seek_local_avail_upload_id",function(vh){var Df=hd.getFileId(pf.Body,pf.ChunkSize,xf,If),Af=hd.getUploadIdList.call(wf,Df);if(!Df||!Af){Sh.emit("has_and_check_upload_id",vh);return}var _h=function Nh(dm){if(dm>=Af.length){Sh.emit("has_and_check_upload_id",vh);return}var Jf=Af[dm];if(!yd.isInArray(vh,Jf)){hd.removeUploadId.call(wf,Jf),Nh(dm+1);return}if(hd.using[Jf]){Nh(dm+1);return}Fd.call(wf,{Bucket:xf,Region:Cf,Key:If,UploadId:Jf,tracker:pf.tracker},function(oh,Xh){wf._isRunningTask(_f)&&(oh?(hd.removeUploadId.call(wf,Jf),Nh(dm+1)):Sh.emit("upload_id_available",{UploadId:Jf,PartList:Xh.PartList}))})};_h(0)}),Sh.on("get_remote_upload_id_list",function(){Ld.call(wf,{Bucket:xf,Region:Cf,Key:If,tracker:pf.tracker},function(vh,Df){if(wf._isRunningTask(_f)){if(vh)return Sh.emit("error",vh);var Af=yd.filter(Df.UploadList,function(dm){return dm.Key===If&&(!Sf||dm.StorageClass.toUpperCase()===Sf.toUpperCase())}).reverse().map(function(dm){return dm.UploadId||dm.UploadID});if(Af.length)Sh.emit("seek_local_avail_upload_id",Af);else{var _h=hd.getFileId(pf.Body,pf.ChunkSize,xf,If),Nh;_h&&(Nh=hd.getUploadIdList.call(wf,_h))&&yd.each(Nh,function(dm){hd.removeUploadId.call(wf,dm)}),Sh.emit("no_available_upload_id")}}})}),Sh.emit("get_remote_upload_id_list")}function Ld(pf,mf){var _f=this,xf=[],Cf={Bucket:pf.Bucket,Region:pf.Region,Prefix:pf.Key,calledBySdk:pf.calledBySdk||"sliceUploadFile",tracker:pf.tracker},If=function Sf(){_f.multipartList(Cf,function(wf,Pf){if(wf)return mf(wf);xf.push.apply(xf,Pf.Upload||[]),Pf.IsTruncated==="true"?(Cf.KeyMarker=Pf.NextKeyMarker,Cf.UploadIdMarker=Pf.NextUploadIdMarker,Sf()):mf(null,{UploadList:xf})})};If()}function Fd(pf,mf){var _f=this,xf=[],Cf={Bucket:pf.Bucket,Region:pf.Region,Key:pf.Key,UploadId:pf.UploadId,calledBySdk:"sliceUploadFile",tracker:pf.tracker},If=function Sf(){_f.multipartListPart(Cf,function(wf,Pf){if(wf)return mf(wf);xf.push.apply(xf,Pf.Part||[]),Pf.IsTruncated==="true"?(Cf.PartNumberMarker=Pf.NextPartNumberMarker,Sf()):mf(null,{PartList:xf})})};If()}function Hd(pf,mf){var _f=this,xf=pf.TaskId,Cf=pf.Bucket,If=pf.Region,Sf=pf.Key,wf=pf.UploadData,Pf=pf.FileSize,lh=pf.SliceSize,xh=Math.min(pf.AsyncLimit||_f.options.ChunkParallelLimit||1,256),Eh=pf.Body,Mh=Math.ceil(Pf/lh),dh=0,eh=pf.ServerSideEncryption,fh=pf.Headers,Sh=yd.filter(wf.PartList,function(Df){return Df.Uploaded&&(dh+=Df.PartNumber>=Mh&&Pf%lh||lh),!Df.Uploaded}),vh=pf.onProgress;md.eachLimit(Sh,xh,function(Df,Af){if(_f._isRunningTask(xf)){var _h=Df.PartNumber,Nh=Math.min(Pf,Df.PartNumber*lh)-(Df.PartNumber-1)*lh,dm=0;Vd.call(_f,{TaskId:xf,Bucket:Cf,Region:If,Key:Sf,SliceSize:lh,FileSize:Pf,PartNumber:_h,ServerSideEncryption:eh,Body:Eh,UploadData:wf,Headers:fh,onProgress:function(oh){dh+=oh.loaded-dm,dm=oh.loaded,vh({loaded:dh,total:Pf})},tracker:pf.tracker},function(Jf,oh){_f._isRunningTask(xf)&&(!Jf&&!oh.ETag&&(Jf='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),Jf?dh-=dm:(dh+=Nh-dm,Df.ETag=oh.ETag),vh({loaded:dh,total:Pf}),Af(Jf||null,oh))})}},function(Df){if(_f._isRunningTask(xf)){if(Df)return mf(Df);mf(null,{UploadId:wf.UploadId,SliceList:wf.PartList})}})}function Vd(pf,mf){var _f=this,xf=pf.TaskId,Cf=pf.Bucket,If=pf.Region,Sf=pf.Key,wf=pf.FileSize,Pf=pf.Body,lh=pf.PartNumber*1,xh=pf.SliceSize,Eh=pf.ServerSideEncryption,Mh=pf.UploadData,dh=pf.Headers||{},eh=_f.options.ChunkRetryTimes+1,fh=xh*(lh-1),Sh=xh,vh=fh+xh;vh>wf&&(vh=wf,Sh=vh-fh);var Df=["x-cos-traffic-limit","x-cos-mime-limit"],Af={};yd.each(dh,function(Nh,dm){Df.indexOf(dm)>-1&&(Af[dm]=Nh)});var _h=Mh.PartList[lh-1];md.retry(eh,function(Nh){_f._isRunningTask(xf)&&yd.fileSlice(Pf,fh,vh,!0,function(dm){_f.multipartUpload({TaskId:xf,Bucket:Cf,Region:If,Key:Sf,ContentLength:Sh,PartNumber:lh,UploadId:Mh.UploadId,ServerSideEncryption:Eh,Body:dm,Headers:Af,onProgress:pf.onProgress,calledBySdk:"sliceUploadFile",tracker:pf.tracker},function(Jf,oh){if(_f._isRunningTask(xf))return Jf?Nh(Jf):(_h.Uploaded=!0,Nh(null,oh))})})},function(Nh,dm){if(_f._isRunningTask(xf))return mf(Nh,dm)})}function Gd(pf,mf){var _f=pf.Bucket,xf=pf.Region,Cf=pf.Key,If=pf.UploadId,Sf=pf.SliceList,wf=this,Pf=this.options.ChunkRetryTimes+1,lh=pf.Headers,xh=Sf.map(function(Eh){return{PartNumber:Eh.PartNumber,ETag:Eh.ETag}});md.retry(Pf,function(Eh){wf.multipartComplete({Bucket:_f,Region:xf,Key:Cf,UploadId:If,Parts:xh,Headers:lh,calledBySdk:"sliceUploadFile",tracker:pf.tracker},Eh)},function(Eh,Mh){mf(Eh,Mh)})}function Ud(pf,mf){var _f=pf.Bucket,xf=pf.Region,Cf=pf.Key,If=pf.UploadId,Sf=pf.Level||"task",wf=pf.AsyncLimit,Pf=this,lh=new gd;if(lh.on("error",function(xh){return mf(xh)}),lh.on("get_abort_array",function(xh){qd.call(Pf,{Bucket:_f,Region:xf,Key:Cf,Headers:pf.Headers,AsyncLimit:wf,AbortArray:xh},mf)}),Sf==="bucket")Ld.call(Pf,{Bucket:_f,Region:xf,calledBySdk:"abortUploadTask"},function(xh,Eh){if(xh)return mf(xh);lh.emit("get_abort_array",Eh.UploadList||[])});else if(Sf==="file"){if(!Cf)return mf(yd.error(new Error("abort_upload_task_no_key")));Ld.call(Pf,{Bucket:_f,Region:xf,Key:Cf,calledBySdk:"abortUploadTask"},function(xh,Eh){if(xh)return mf(xh);lh.emit("get_abort_array",Eh.UploadList||[])})}else if(Sf==="task"){if(!If)return mf(yd.error(new Error("abort_upload_task_no_id")));if(!Cf)return mf(yd.error(new Error("abort_upload_task_no_key")));lh.emit("get_abort_array",[{Key:Cf,UploadId:If}])}else return mf(yd.error(new Error("abort_unknown_level")))}function qd(pf,mf){var _f=pf.Bucket,xf=pf.Region,Cf=pf.Key,If=pf.AbortArray,Sf=pf.AsyncLimit||1,wf=this,Pf=0,lh=new Array(If.length);md.eachLimit(If,Sf,function(xh,Eh){var Mh=Pf;if(Cf&&Cf!==xh.Key){lh[Mh]={error:{KeyNotMatch:!0}},Eh(null);return}var dh=xh.UploadId||xh.UploadID;wf.multipartAbort({Bucket:_f,Region:xf,Key:xh.Key,Headers:pf.Headers,UploadId:dh},function(eh){var fh={Bucket:_f,Region:xf,Key:xh.Key,UploadId:dh};lh[Mh]={error:eh,task:fh},Eh(null)}),Pf++},function(xh){if(xh)return mf(xh);for(var Eh=[],Mh=[],dh=0,eh=lh.length;dhxf?"sliceUploadFile":"putObject";pf.tracker=new vd({Beacon:_f.options.BeaconReporter,clsReporter:_f.options.ClsReporter,bucket:pf.Bucket,region:pf.Region,apiName:"uploadFile",realApi:lh,fileKey:pf.Key,fileSize:Sf,accelerate:Pf,deepTracker:_f.options.DeepTracker,customId:_f.options.CustomId,delay:_f.options.TrackerDelay})}yd.each(pf,function(fh,Sh){fd(fh)!=="object"&&typeof fh!="function"&&(wf[Sh]=fh)});var xh=pf.onTaskReady,Eh=function(Sh){wf.TaskId=Sh,xh&&xh(Sh)};pf.onTaskReady=Eh;var Mh=Sf>xf?"sliceUploadFile":"putObject",dh=pf.onFileFinish,eh=function(Sh,vh){pf.tracker&&pf.tracker.report(Sh,vh),dh&&dh(Sh,vh,wf),mf&&mf(Sh,vh)};Cf.push({api:Mh,params:pf,callback:eh}),_f._addTasks(Cf)}function Kd(pf,mf){var _f=this,xf=pf.SliceSize===void 0?_f.options.SliceSize:pf.SliceSize,Cf=0,If=0,Sf=yd.throttleOnProgress.call(_f,If,pf.onProgress),wf=pf.files.length,Pf=pf.onFileFinish,lh=Array(wf),xh=function(dh,eh,fh){Sf(null,!0),Pf&&Pf(dh,eh,fh),lh[fh.Index]={options:fh,error:dh,data:eh},--wf<=0&&mf&&mf(null,{files:lh})},Eh=[];yd.each(pf.files,function(Mh,dh){(function(){var eh=Mh.Body,fh=eh.size||eh.length||0,Sh={Index:dh,TaskId:""};if(!_f.options.UseRawKey&&Mh.Key&&Mh.Key.substr(0,1)==="/"&&(Mh.Key=Mh.Key.substr(1)),Cf+=fh,_f.options.EnableReporter){var vh=_f.options.UseAccelerate||typeof _f.options.Domain=="string"&&_f.options.Domain.includes("accelerate."),Df=fh>xf?"sliceUploadFile":"putObject";Mh.tracker=new vd({Beacon:_f.options.BeaconReporter,clsReporter:_f.options.ClsReporter,bucket:Mh.Bucket,region:Mh.Region,apiName:"uploadFiles",realApi:Df,fileKey:Mh.Key,fileSize:fh,accelerate:vh,deepTracker:_f.options.DeepTracker,customId:_f.options.CustomId,delay:_f.options.TrackerDelay})}yd.each(Mh,function(kh,Zf){fd(kh)!=="object"&&typeof kh!="function"&&(Sh[Zf]=kh)});var Af=Mh.onTaskReady,_h=function(Zf){Sh.TaskId=Zf,Af&&Af(Zf)};Mh.onTaskReady=_h;var Nh=0,dm=Mh.onProgress,Jf=function(Zf){If=If-Nh+Zf.loaded,Nh=Zf.loaded,dm&&dm(Zf),Sf({loaded:If,total:Cf})};Mh.onProgress=Jf;var oh=fh>xf?"sliceUploadFile":"putObject",Xh=Mh.onFileFinish,Tm=function(Zf,th){Mh.tracker&&Mh.tracker.report(Zf,th),Xh&&Xh(Zf,th),xh(Zf,th,Sh)};Eh.push({api:oh,params:Mh,callback:Tm})})()}),_f._addTasks(Eh)}function Xd(pf,mf){var _f=new gd,xf=this,Cf=pf.Bucket,If=pf.Region,Sf=pf.Key,wf=pf.CopySource,Pf=yd.getSourceParams.call(this,wf);if(!Pf){mf(yd.error(new Error("CopySource format error")));return}var lh=Pf.Bucket,xh=Pf.Region,Eh=decodeURIComponent(Pf.Key),Mh=pf.CopySliceSize===void 0?xf.options.CopySliceSize:pf.CopySliceSize;Mh=Math.max(0,Mh);var dh=pf.CopyChunkSize||this.options.CopyChunkSize,eh=this.options.CopyChunkParallelLimit,fh=this.options.ChunkRetryTimes+1,Sh=0,vh=0,Df,Af,_h={},Nh={},dm={};_f.on("copy_slice_complete",function(Jf){yd.each(pf.Headers,function(Xh,Tm){Tm.toLowerCase().indexOf("x-cos-meta-")});var oh=yd.map(Jf.PartList,function(Xh){return{PartNumber:Xh.PartNumber,ETag:Xh.ETag}});md.retry(fh,function(Xh){xf.multipartComplete({Bucket:Cf,Region:If,Key:Sf,UploadId:Jf.UploadId,Parts:oh,tracker:pf.tracker,calledBySdk:"sliceCopyFile"},Xh)},function(Xh,Tm){if(hd.removeUsing(Jf.UploadId),Xh)return Af(null,!0),mf(Xh);hd.removeUploadId(Jf.UploadId),Af({loaded:Df,total:Df},!0),mf(null,Tm)})}),_f.on("get_copy_data_finish",function(Jf){var oh=hd.getCopyFileId(wf,_h,dh,Cf,Sf);oh&&hd.saveUploadId(oh,Jf.UploadId,xf.options.UploadIdCacheLimit),hd.setUsing(Jf.UploadId);var Xh=yd.filter(Jf.PartList,function(Tm){return Tm.Uploaded&&(vh+=Tm.PartNumber>=Sh&&Df%dh||dh),!Tm.Uploaded});md.eachLimit(Xh,eh,function(Tm,kh){var Zf=Tm.PartNumber,th=Tm.CopySourceRange,$h=Tm.end-Tm.start;md.retry(fh,function(wh){df.call(xf,{Bucket:Cf,Region:If,Key:Sf,CopySource:wf,UploadId:Jf.UploadId,PartNumber:Zf,CopySourceRange:th,tracker:pf.tracker,calledBySdk:"sliceCopyFile"},wh)},function(wh,fm){if(wh)return kh(wh);vh+=$h,Af({loaded:vh,total:Df}),Tm.ETag=fm.ETag,kh(wh||null,fm)})},function(Tm){if(Tm)return hd.removeUsing(Jf.UploadId),Af(null,!0),mf(Tm);_f.emit("copy_slice_complete",Jf)})}),_f.on("get_chunk_size_finish",function(){var Jf=function(){xf.multipartInit({Bucket:Cf,Region:If,Key:Sf,Headers:dm,tracker:pf.tracker,calledBySdk:"sliceCopyFile"},function(Zf,th){if(Zf)return mf(Zf);pf.UploadId=th.UploadId,_f.emit("get_copy_data_finish",{UploadId:pf.UploadId,PartList:pf.PartList})})},oh=hd.getCopyFileId(wf,_h,dh,Cf,Sf),Xh=hd.getUploadIdList(oh);if(!oh||!Xh)return Jf();var Tm=function kh(Zf){if(Zf>=Xh.length)return Jf();var th=Xh[Zf];if(hd.using[th])return kh(Zf+1);Fd.call(xf,{Bucket:Cf,Region:If,Key:Sf,UploadId:th,tracker:pf.tracker,calledBySdk:"sliceCopyFile"},function($h,wh){if($h)hd.removeUploadId(th),kh(Zf+1);else{if(hd.using[th])return kh(Zf+1);var fm={},zh=0;yd.each(wh.PartList,function(Mm){var Rm=parseInt(Mm.Size),tg=zh+Rm-1;fm[Mm.PartNumber+"|"+zh+"|"+tg]=Mm.ETag,zh+=Rm}),yd.each(pf.PartList,function(Mm){var Rm=fm[Mm.PartNumber+"|"+Mm.start+"|"+Mm.end];Rm&&(Mm.ETag=Rm,Mm.Uploaded=!0)}),_f.emit("get_copy_data_finish",{UploadId:th,PartList:pf.PartList})}})};Tm(0)}),_f.on("get_file_size_finish",function(){if(function(){for(var oh=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],Xh=1024*1024,Tm=0;TmZf.length&&(Nh[kh]=Tm)}),_f.emit("get_file_size_finish")}})}function df(pf,mf){var _f=pf.TaskId,xf=pf.Bucket,Cf=pf.Region,If=pf.Key,Sf=pf.CopySource,wf=pf.UploadId,Pf=pf.PartNumber*1,lh=pf.CopySourceRange,xh=this.options.ChunkRetryTimes+1,Eh=this;md.retry(xh,function(Mh){Eh.uploadPartCopy({TaskId:_f,Bucket:xf,Region:Cf,Key:If,CopySource:Sf,UploadId:wf,PartNumber:Pf,CopySourceRange:lh,tracker:pf.tracker,calledBySdk:pf.calledBySdk},function(dh,eh){Mh(dh||null,eh)})},function(Mh,dh){return mf(Mh,dh)})}var Ef={sliceUploadFile:Nd,abortUploadTask:Ud,uploadFile:Wd,uploadFiles:Kd,sliceCopyFile:Xd};rd.exports.init=function(pf,mf){mf.transferToTaskMethod(Ef,"sliceUploadFile"),yd.each(Ef,function(_f,xf){pf.prototype[xf]=yd.apiWrapper(xf,_f)})}},"./src/async.js":function(rd,sd){var pd=function(gd,yd,vd,Nd){if(Nd=Nd||function(){},!gd.length||yd<=0)return Nd();var Md=0,Ld=0,Fd=0;(function Hd(){if(Md>=gd.length)return Nd();for(;Fd=gd.length?Nd():Hd())})})()},fd=function(gd,yd,vd){var Nd=function Md(Ld){yd(function(Fd,Hd){Fd&&Ld"u"?"undefined":fd(location))==="object"&&location.protocol==="http:"?"http:":"https:"),mm=this.options.ServiceDomain,jm=nh.AppId||this.options.appId,Lm=nh.Region;mm?(mm=mm.replace(/\{\{AppId\}\}/gi,jm||"").replace(/\{\{Region\}\}/gi,Lm||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(mm)||(mm=im+"//"+mm),mm.slice(-1)==="/"&&(mm=mm.slice(0,-1))):Lm?mm=im+"//cos."+Lm+".myqcloud.com":mm=im+"//service.cos.myqcloud.com";var zm="",Vm=Lm?"cos."+Lm+".myqcloud.com":"service.cos.myqcloud.com",Dm=mm.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");Vm===Dm&&(zm=Vm),$g.call(this,{Action:"name/cos:GetService",url:mm,method:"GET",headers:nh.Headers,SignHost:zm,tracker:nh.tracker},function(og,pg){if(og)return gm(og);var qg=pg&&pg.ListAllMyBucketsResult&&pg.ListAllMyBucketsResult.Buckets&&pg.ListAllMyBucketsResult.Buckets.Bucket||[];qg=md.isArray(qg)?qg:[qg];var xg=pg&&pg.ListAllMyBucketsResult&&pg.ListAllMyBucketsResult.Owner||{};gm(null,{Buckets:qg,Owner:xg,statusCode:pg.statusCode,headers:pg.headers})})}function yd(nh,gm){var im=this,mm="";if(nh.BucketAZConfig){var jm={BucketAZConfig:nh.BucketAZConfig};mm=md.json2xml({CreateBucketConfiguration:jm})}$g.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,body:mm,tracker:nh.tracker},function(Lm,zm){if(Lm)return gm(Lm);var Vm=v_({protocol:im.options.Protocol,domain:im.options.Domain,bucket:nh.Bucket,region:nh.Region,isLocation:!0});gm(null,{Location:Vm,statusCode:zm.statusCode,headers:zm.headers})})}function vd(nh,gm){$g.call(this,{Action:"name/cos:HeadBucket",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,method:"HEAD",tracker:nh.tracker},gm)}function Nd(nh,gm){var im={};im.prefix=nh.Prefix||"",im.delimiter=nh.Delimiter,im.marker=nh.Marker,im["max-keys"]=nh.MaxKeys,im["encoding-type"]=nh.EncodingType,$g.call(this,{Action:"name/cos:GetBucket",ResourceKey:im.prefix,method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,qs:im,tracker:nh.tracker},function(mm,jm){if(mm)return gm(mm);var Lm=jm.ListBucketResult||{},zm=Lm.Contents||[],Vm=Lm.CommonPrefixes||[];zm=md.isArray(zm)?zm:[zm],Vm=md.isArray(Vm)?Vm:[Vm];var Dm=md.clone(Lm);md.extend(Dm,{Contents:zm,CommonPrefixes:Vm,statusCode:jm.statusCode,headers:jm.headers}),gm(null,Dm)})}function Md(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucket",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,method:"DELETE",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function Ld(nh,gm){var im=nh.Headers,mm="";if(nh.AccessControlPolicy){var jm=md.clone(nh.AccessControlPolicy||{}),Lm=jm.Grants||jm.Grant;Lm=md.isArray(Lm)?Lm:[Lm],delete jm.Grant,delete jm.Grants,jm.AccessControlList={Grant:Lm},mm=md.json2xml({AccessControlPolicy:jm}),im["Content-Type"]="application/xml",im["Content-MD5"]=md.b64(md.md5(mm))}md.each(im,function(zm,Vm){Vm.indexOf("x-cos-grant-")===0&&(im[Vm]=R_(im[Vm]))}),$g.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,headers:im,action:"acl",body:mm,tracker:nh.tracker},function(zm,Vm){if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function Fd(nh,gm){$g.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"acl",tracker:nh.tracker},function(im,mm){if(im)return gm(im);var jm=mm.AccessControlPolicy||{},Lm=jm.Owner||{},zm=jm.AccessControlList.Grant||[];zm=md.isArray(zm)?zm:[zm];var Vm=t_(jm);mm.headers&&mm.headers["x-cos-acl"]&&(Vm.ACL=mm.headers["x-cos-acl"]),Vm=md.extend(Vm,{Owner:Lm,Grants:zm,statusCode:mm.statusCode,headers:mm.headers}),gm(null,Vm)})}function Hd(nh,gm){var im=nh.CORSConfiguration||{},mm=im.CORSRules||nh.CORSRules||[];mm=md.clone(md.isArray(mm)?mm:[mm]),md.each(mm,function(Vm){md.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Dm){var og=Dm+"s",pg=Vm[og]||Vm[Dm]||[];delete Vm[og],Vm[Dm]=md.isArray(pg)?pg:[pg]})});var jm={CORSRule:mm};nh.ResponseVary&&(jm.ResponseVary=nh.ResponseVary);var Lm=md.json2xml({CORSConfiguration:jm}),zm=nh.Headers;zm["Content-Type"]="application/xml",zm["Content-MD5"]=md.b64(md.md5(Lm)),$g.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:Lm,action:"cors",headers:zm,tracker:nh.tracker},function(Vm,Dm){if(Vm)return gm(Vm);gm(null,{statusCode:Dm.statusCode,headers:Dm.headers})})}function Vd(nh,gm){$g.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"cors",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error&&im.error.Code==="NoSuchCORSConfiguration"){var jm={CORSRules:[],statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=mm.CORSConfiguration||{},zm=Lm.CORSRules||Lm.CORSRule||[];zm=md.clone(md.isArray(zm)?zm:[zm]);var Vm=Lm.ResponseVary;md.each(zm,function(Dm){md.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(og){var pg=og+"s",qg=Dm[pg]||Dm[og]||[];delete Dm[og],Dm[pg]=md.isArray(qg)?qg:[qg]})}),gm(null,{CORSRules:zm,ResponseVary:Vm,statusCode:mm.statusCode,headers:mm.headers})})}function Gd(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"cors",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode||im.statusCode,headers:mm.headers})})}function Ud(nh,gm){$g.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"location",tracker:nh.tracker},gm)}function qd(nh,gm){var im=nh.Policy;try{typeof im=="string"&&(im=JSON.parse(im))}catch{}if(!im||typeof im=="string")return gm(md.error(new Error("Policy format error")));var mm=JSON.stringify(im);im.version||(im.version="2.0");var jm=nh.Headers;jm["Content-Type"]="application/json",jm["Content-MD5"]=md.b64(md.md5(mm)),$g.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,action:"policy",body:mm,headers:jm,tracker:nh.tracker},function(Lm,zm){if(Lm&&Lm.statusCode===204)return gm(null,{statusCode:Lm.statusCode});if(Lm)return gm(Lm);gm(null,{statusCode:zm.statusCode,headers:zm.headers})})}function Wd(nh,gm){$g.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"policy",rawBody:!0,tracker:nh.tracker},function(im,mm){if(im)return im.statusCode&&im.statusCode===403?gm(md.error(im,{ErrorStatus:"Access Denied"})):im.statusCode&&im.statusCode===405?gm(md.error(im,{ErrorStatus:"Method Not Allowed"})):im.statusCode&&im.statusCode===404?gm(md.error(im,{ErrorStatus:"Policy Not Found"})):gm(im);var jm={};try{jm=JSON.parse(mm.body)}catch{}gm(null,{Policy:jm,statusCode:mm.statusCode,headers:mm.headers})})}function Kd(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"policy",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode||im.statusCode,headers:mm.headers})})}function Xd(nh,gm){var im=nh.Tagging||{},mm=im.TagSet||im.Tags||nh.Tags||[];mm=md.clone(md.isArray(mm)?mm:[mm]);var jm=md.json2xml({Tagging:{TagSet:{Tag:mm}}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"tagging",headers:Lm,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function df(nh,gm){$g.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"tagging",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error&&(im.error==="Not Found"||im.error.Code==="NoSuchTagSet")){var jm={Tags:[],statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=[];try{Lm=mm.Tagging.TagSet.Tag||[]}catch{}Lm=md.clone(md.isArray(Lm)?Lm:[Lm]),gm(null,{Tags:Lm,statusCode:mm.statusCode,headers:mm.headers})})}function Ef(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"tagging",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function pf(nh,gm){var im=nh.LifecycleConfiguration||{},mm=im.Rules||nh.Rules||[];mm=md.clone(mm);var jm=md.json2xml({LifecycleConfiguration:{Rule:mm}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"lifecycle",headers:Lm,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function mf(nh,gm){$g.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"lifecycle",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error&&im.error.Code==="NoSuchLifecycleConfiguration"){var jm={Rules:[],statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=[];try{Lm=mm.LifecycleConfiguration.Rule||[]}catch{}Lm=md.clone(md.isArray(Lm)?Lm:[Lm]),gm(null,{Rules:Lm,statusCode:mm.statusCode,headers:mm.headers})})}function _f(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"lifecycle",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function xf(nh,gm){if(!nh.VersioningConfiguration){gm(md.error(new Error("missing param VersioningConfiguration")));return}var im=nh.VersioningConfiguration||{},mm=md.json2xml({VersioningConfiguration:im}),jm=nh.Headers;jm["Content-Type"]="application/xml",jm["Content-MD5"]=md.b64(md.md5(mm)),$g.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:mm,action:"versioning",headers:jm,tracker:nh.tracker},function(Lm,zm){if(Lm&&Lm.statusCode===204)return gm(null,{statusCode:Lm.statusCode});if(Lm)return gm(Lm);gm(null,{statusCode:zm.statusCode,headers:zm.headers})})}function Cf(nh,gm){$g.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"versioning",tracker:nh.tracker},function(im,mm){im||!mm.VersioningConfiguration&&(mm.VersioningConfiguration={}),gm(im,mm)})}function If(nh,gm){var im=md.clone(nh.ReplicationConfiguration),mm=md.json2xml({ReplicationConfiguration:im});mm=mm.replace(/<(\/?)Rules>/gi,"<$1Rule>"),mm=mm.replace(/<(\/?)Tags>/gi,"<$1Tag>");var jm=nh.Headers;jm["Content-Type"]="application/xml",jm["Content-MD5"]=md.b64(md.md5(mm)),$g.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:mm,action:"replication",headers:jm,tracker:nh.tracker},function(Lm,zm){if(Lm&&Lm.statusCode===204)return gm(null,{statusCode:Lm.statusCode});if(Lm)return gm(Lm);gm(null,{statusCode:zm.statusCode,headers:zm.headers})})}function Sf(nh,gm){$g.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"replication",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error&&(im.error==="Not Found"||im.error.Code==="ReplicationConfigurationnotFoundError")){var jm={ReplicationConfiguration:{Rules:[]},statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}!mm.ReplicationConfiguration&&(mm.ReplicationConfiguration={}),mm.ReplicationConfiguration.Rule&&(mm.ReplicationConfiguration.Rules=md.makeArray(mm.ReplicationConfiguration.Rule),delete mm.ReplicationConfiguration.Rule),gm(im,mm)})}function wf(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"replication",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function Pf(nh,gm){if(!nh.WebsiteConfiguration){gm(md.error(new Error("missing param WebsiteConfiguration")));return}var im=md.clone(nh.WebsiteConfiguration||{}),mm=im.RoutingRules||im.RoutingRule||[];mm=md.isArray(mm)?mm:[mm],delete im.RoutingRule,delete im.RoutingRules,mm.length&&(im.RoutingRules={RoutingRule:mm});var jm=md.json2xml({WebsiteConfiguration:im}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"website",headers:Lm,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function lh(nh,gm){$g.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,action:"website",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error.Code==="NoSuchWebsiteConfiguration"){var jm={WebsiteConfiguration:{},statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=mm.WebsiteConfiguration||{};if(Lm.RoutingRules){var zm=md.clone(Lm.RoutingRules.RoutingRule||[]);zm=md.makeArray(zm),Lm.RoutingRules=zm}gm(null,{WebsiteConfiguration:Lm,statusCode:mm.statusCode,headers:mm.headers})})}function xh(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"website",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function Eh(nh,gm){if(!nh.RefererConfiguration){gm(md.error(new Error("missing param RefererConfiguration")));return}var im=md.clone(nh.RefererConfiguration||{}),mm=im.DomainList||{},jm=mm.Domains||mm.Domain||[];jm=md.isArray(jm)?jm:[jm],jm.length&&(im.DomainList={Domain:jm});var Lm=md.json2xml({RefererConfiguration:im}),zm=nh.Headers;zm["Content-Type"]="application/xml",zm["Content-MD5"]=md.b64(md.md5(Lm)),$g.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:Lm,action:"referer",headers:zm,tracker:nh.tracker},function(Vm,Dm){if(Vm&&Vm.statusCode===204)return gm(null,{statusCode:Vm.statusCode});if(Vm)return gm(Vm);gm(null,{statusCode:Dm.statusCode,headers:Dm.headers})})}function Mh(nh,gm){$g.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,action:"referer",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error.Code==="NoSuchRefererConfiguration"){var jm={WebsiteConfiguration:{},statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=mm.RefererConfiguration||{};if(Lm.DomainList){var zm=md.makeArray(Lm.DomainList.Domain||[]);Lm.DomainList={Domains:zm}}gm(null,{RefererConfiguration:Lm,statusCode:mm.statusCode,headers:mm.headers})})}function dh(nh,gm){var im=nh.DomainConfiguration||{},mm=im.DomainRule||nh.DomainRule||[];mm=md.clone(mm);var jm=md.json2xml({DomainConfiguration:{DomainRule:mm}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"domain",headers:Lm,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function eh(nh,gm){$g.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"domain",tracker:nh.tracker},function(im,mm){if(im)return gm(im);var jm=[];try{jm=mm.DomainConfiguration.DomainRule||[]}catch{}jm=md.clone(md.isArray(jm)?jm:[jm]),gm(null,{DomainRule:jm,statusCode:mm.statusCode,headers:mm.headers})})}function fh(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"domain",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function Sh(nh,gm){var im=nh.OriginConfiguration||{},mm=im.OriginRule||nh.OriginRule||[];mm=md.clone(mm);var jm=md.json2xml({OriginConfiguration:{OriginRule:mm}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"origin",headers:Lm,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function vh(nh,gm){$g.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"origin",tracker:nh.tracker},function(im,mm){if(im)return gm(im);var jm=[];try{jm=mm.OriginConfiguration.OriginRule||[]}catch{}jm=md.clone(md.isArray(jm)?jm:[jm]),gm(null,{OriginRule:jm,statusCode:mm.statusCode,headers:mm.headers})})}function Df(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"origin",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function Af(nh,gm){var im=md.json2xml({BucketLoggingStatus:nh.BucketLoggingStatus||""}),mm=nh.Headers;mm["Content-Type"]="application/xml",mm["Content-MD5"]=md.b64(md.md5(im)),$g.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:im,action:"logging",headers:mm,tracker:nh.tracker},function(jm,Lm){if(jm&&jm.statusCode===204)return gm(null,{statusCode:jm.statusCode});if(jm)return gm(jm);gm(null,{statusCode:Lm.statusCode,headers:Lm.headers})})}function _h(nh,gm){$g.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"logging",tracker:nh.tracker},function(im,mm){if(im)return gm(im);gm(null,{BucketLoggingStatus:mm.BucketLoggingStatus,statusCode:mm.statusCode,headers:mm.headers})})}function Nh(nh,gm,im){var mm=md.clone(gm.InventoryConfiguration);if(mm.OptionalFields){var jm=mm.OptionalFields||[];mm.OptionalFields={Field:jm}}if(mm.Destination&&mm.Destination.COSBucketDestination&&mm.Destination.COSBucketDestination.Encryption){var Lm=mm.Destination.COSBucketDestination.Encryption;Object.keys(Lm).indexOf("SSECOS")>-1&&(Lm["SSE-COS"]=Lm.SSECOS,delete Lm.SSECOS)}var zm=md.json2xml({InventoryConfiguration:mm}),Vm=gm.Headers;Vm["Content-Type"]="application/xml",Vm["Content-MD5"]=md.b64(md.md5(zm));var Dm=nh==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";$g.call(this,{Action:Dm,method:nh,Bucket:gm.Bucket,Region:gm.Region,body:zm,action:"inventory",qs:{id:gm.Id},headers:Vm,tracker:gm.tracker},function(og,pg){if(og&&og.statusCode===204)return im(null,{statusCode:og.statusCode});if(og)return im(og);im(null,{statusCode:pg.statusCode,headers:pg.headers})})}function dm(nh,gm){return Nh.call(this,"PUT",nh,gm)}function Jf(nh,gm){return Nh.call(this,"POST",nh,gm)}function oh(nh,gm){$g.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"inventory",qs:{id:nh.Id},tracker:nh.tracker},function(im,mm){if(im)return gm(im);var jm=mm.InventoryConfiguration;if(jm&&jm.OptionalFields&&jm.OptionalFields.Field){var Lm=jm.OptionalFields.Field;md.isArray(Lm)||(Lm=[Lm]),jm.OptionalFields=Lm}if(jm.Destination&&jm.Destination.COSBucketDestination&&jm.Destination.COSBucketDestination.Encryption){var zm=jm.Destination.COSBucketDestination.Encryption;Object.keys(zm).indexOf("SSE-COS")>-1&&(zm.SSECOS=zm["SSE-COS"],delete zm["SSE-COS"])}gm(null,{InventoryConfiguration:jm,statusCode:mm.statusCode,headers:mm.headers})})}function Xh(nh,gm){$g.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"inventory",qs:{"continuation-token":nh.ContinuationToken},tracker:nh.tracker},function(im,mm){if(im)return gm(im);var jm=mm.ListInventoryConfigurationResult,Lm=jm.InventoryConfiguration||[];Lm=md.isArray(Lm)?Lm:[Lm],delete jm.InventoryConfiguration,md.each(Lm,function(zm){if(zm&&zm.OptionalFields&&zm.OptionalFields.Field){var Vm=zm.OptionalFields.Field;md.isArray(Vm)||(Vm=[Vm]),zm.OptionalFields=Vm}if(zm.Destination&&zm.Destination.COSBucketDestination&&zm.Destination.COSBucketDestination.Encryption){var Dm=zm.Destination.COSBucketDestination.Encryption;Object.keys(Dm).indexOf("SSE-COS")>-1&&(Dm.SSECOS=Dm["SSE-COS"],delete Dm["SSE-COS"])}}),jm.InventoryConfigurations=Lm,md.extend(jm,{statusCode:mm.statusCode,headers:mm.headers}),gm(null,jm)})}function Tm(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"inventory",qs:{id:nh.Id},tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function kh(nh,gm){if(!nh.AccelerateConfiguration){gm(md.error(new Error("missing param AccelerateConfiguration")));return}var im={AccelerateConfiguration:nh.AccelerateConfiguration||{}},mm=md.json2xml(im),jm={};jm["Content-Type"]="application/xml",jm["Content-MD5"]=md.b64(md.md5(mm)),$g.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:mm,action:"accelerate",headers:jm,tracker:nh.tracker},function(Lm,zm){if(Lm)return gm(Lm);gm(null,{statusCode:zm.statusCode,headers:zm.headers})})}function Zf(nh,gm){$g.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:nh.Bucket,Region:nh.Region,action:"accelerate",tracker:nh.tracker},function(im,mm){im||!mm.AccelerateConfiguration&&(mm.AccelerateConfiguration={}),gm(im,mm)})}function th(nh,gm){var im=nh.ServerSideEncryptionConfiguration||{},mm=im.Rule||im.Rules||[],jm=md.json2xml({ServerSideEncryptionConfiguration:{Rule:mm}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"encryption",headers:Lm,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function $h(nh,gm){$g.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"encryption",tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.code==="NoSuchEncryptionConfiguration"){var jm={EncryptionConfiguration:{Rules:[]},statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=md.makeArray(mm.EncryptionConfiguration&&mm.EncryptionConfiguration.Rule||[]);mm.EncryptionConfiguration={Rules:Lm},gm(im,mm)})}function wh(nh,gm){$g.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"encryption",tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function fm(nh,gm){$g.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,VersionId:nh.VersionId,headers:nh.Headers,tracker:nh.tracker},function(im,mm){if(im){var jm=im.statusCode;return nh.Headers["If-Modified-Since"]&&jm&&jm===304?gm(null,{NotModified:!0,statusCode:jm}):gm(im)}mm.ETag=md.attr(mm.headers,"etag",""),gm(null,mm)})}function zh(nh,gm){var im={};im.prefix=nh.Prefix||"",im.delimiter=nh.Delimiter,im["key-marker"]=nh.KeyMarker,im["version-id-marker"]=nh.VersionIdMarker,im["max-keys"]=nh.MaxKeys,im["encoding-type"]=nh.EncodingType,$g.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:im.prefix,method:"GET",Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,qs:im,action:"versions",tracker:nh.tracker},function(mm,jm){if(mm)return gm(mm);var Lm=jm.ListVersionsResult||{},zm=Lm.DeleteMarker||[];zm=md.isArray(zm)?zm:[zm];var Vm=Lm.Version||[];Vm=md.isArray(Vm)?Vm:[Vm];var Dm=md.clone(Lm);delete Dm.DeleteMarker,delete Dm.Version,md.extend(Dm,{DeleteMarkers:zm,Versions:Vm,statusCode:jm.statusCode,headers:jm.headers}),gm(null,Dm)})}function Mm(nh,gm){if(this.options.ObjectKeySimplifyCheck){var im=md.simplifyPath(nh.Key);if(im==="/"){gm(md.error(new Error("The Getobject Key is illegal")));return}}var mm=nh.Query||{},jm=nh.QueryString||"",Lm=md.throttleOnProgress.call(this,0,nh.onProgress),zm=nh.tracker;zm&&zm.setParams({signStartTime:new Date().getTime()}),mm["response-content-type"]=nh.ResponseContentType,mm["response-content-language"]=nh.ResponseContentLanguage,mm["response-expires"]=nh.ResponseExpires,mm["response-cache-control"]=nh.ResponseCacheControl,mm["response-content-disposition"]=nh.ResponseContentDisposition,mm["response-content-encoding"]=nh.ResponseContentEncoding,$g.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,VersionId:nh.VersionId,DataType:nh.DataType,headers:nh.Headers,qs:mm,qsStr:jm,rawBody:!0,onDownloadProgress:Lm,tracker:zm},function(Vm,Dm){if(Lm(null,!0),Vm){var og=Vm.statusCode;return nh.Headers["If-Modified-Since"]&&og&&og===304?gm(null,{NotModified:!0}):gm(Vm)}gm(null,{Body:Dm.body,ETag:md.attr(Dm.headers,"etag",""),statusCode:Dm.statusCode,headers:Dm.headers})})}function Rm(nh,gm){var im=this,mm=nh.ContentLength,jm=md.throttleOnProgress.call(im,mm,nh.onProgress),Lm=nh.Headers;!Lm["Cache-Control"]&&!Lm["cache-control"]&&(Lm["Cache-Control"]=""),!Lm["Content-Type"]&&!Lm["content-type"]&&(Lm["Content-Type"]=nh.Body&&nh.Body.type||"");var zm=nh.UploadAddMetaMd5||im.options.UploadAddMetaMd5||im.options.UploadCheckContentMd5,Vm=nh.tracker;zm&&Vm&&Vm.setParams({md5StartTime:new Date().getTime()}),md.getBodyMd5(zm,nh.Body,function(Dm){Dm&&(Vm&&Vm.setParams({md5EndTime:new Date().getTime()}),im.options.UploadCheckContentMd5&&(Lm["Content-MD5"]=md.b64(Dm)),(nh.UploadAddMetaMd5||im.options.UploadAddMetaMd5)&&(Lm["x-cos-meta-md5"]=Dm)),nh.ContentLength!==void 0&&(Lm["Content-Length"]=nh.ContentLength),jm(null,!0),$g.call(im,{Action:"name/cos:PutObject",TaskId:nh.TaskId,method:"PUT",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,qs:nh.Query,body:nh.Body,onProgress:jm,tracker:Vm},function(og,pg){if(og)return jm(null,!0),gm(og);jm({loaded:mm,total:mm},!0);var qg=v_({ForcePathStyle:im.options.ForcePathStyle,protocol:im.options.Protocol,domain:im.options.Domain,bucket:nh.Bucket,region:im.options.UseAccelerate?"accelerate":nh.Region,object:nh.Key});qg=qg.substr(qg.indexOf("://")+3),pg.Location=qg,pg.ETag=md.attr(pg.headers,"etag",""),gm(null,pg)})},nh.onHashProgress)}function tg(nh,gm){$g.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,VersionId:nh.VersionId,action:nh.Recursive?"recursive":"",tracker:nh.tracker},function(im,mm){if(im){var jm=im.statusCode;return jm&&jm===404?gm(null,{BucketNotFound:!0,statusCode:jm}):gm(im)}gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function Fm(nh,gm){var im={};nh.VersionId&&(im.versionId=nh.VersionId),$g.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,qs:im,action:"acl",tracker:nh.tracker},function(mm,jm){if(mm)return gm(mm);var Lm=jm.AccessControlPolicy||{},zm=Lm.Owner||{},Vm=Lm.AccessControlList&&Lm.AccessControlList.Grant||[];Vm=md.isArray(Vm)?Vm:[Vm];var Dm=t_(Lm);delete Dm.GrantWrite,jm.headers&&jm.headers["x-cos-acl"]&&(Dm.ACL=jm.headers["x-cos-acl"]),Dm=md.extend(Dm,{Owner:zm,Grants:Vm,statusCode:jm.statusCode,headers:jm.headers}),gm(null,Dm)})}function Ym(nh,gm){var im=nh.Headers,mm="";if(nh.AccessControlPolicy){var jm=md.clone(nh.AccessControlPolicy||{}),Lm=jm.Grants||jm.Grant;Lm=md.isArray(Lm)?Lm:[Lm],delete jm.Grant,delete jm.Grants,jm.AccessControlList={Grant:Lm},mm=md.json2xml({AccessControlPolicy:jm}),im["Content-Type"]="application/xml",im["Content-MD5"]=md.b64(md.md5(mm))}md.each(im,function(zm,Vm){Vm.indexOf("x-cos-grant-")===0&&(im[Vm]=R_(im[Vm]))}),$g.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,action:"acl",headers:im,body:mm,tracker:nh.tracker},function(zm,Vm){if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function rg(nh,gm){var im=nh.Headers;im.Origin=nh.Origin,im["Access-Control-Request-Method"]=nh.AccessControlRequestMethod,im["Access-Control-Request-Headers"]=nh.AccessControlRequestHeaders,$g.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:im,tracker:nh.tracker},function(mm,jm){if(mm)return mm.statusCode&&mm.statusCode===403?gm(null,{OptionsForbidden:!0,statusCode:mm.statusCode}):gm(mm);var Lm=jm.headers||{};gm(null,{AccessControlAllowOrigin:Lm["access-control-allow-origin"],AccessControlAllowMethods:Lm["access-control-allow-methods"],AccessControlAllowHeaders:Lm["access-control-allow-headers"],AccessControlExposeHeaders:Lm["access-control-expose-headers"],AccessControlMaxAge:Lm["access-control-max-age"],statusCode:jm.statusCode,headers:jm.headers})})}function Eg(nh,gm){var im=this,mm=nh.Headers;!mm["Cache-Control"]&&!mm["cache-control"]&&(mm["Cache-Control"]="");var jm=nh.CopySource||"",Lm=md.getSourceParams.call(this,jm);if(!Lm){gm(md.error(new Error("CopySource format error")));return}var zm=Lm.Bucket,Vm=Lm.Region,Dm=decodeURIComponent(Lm.Key);$g.call(this,{Scope:[{action:"name/cos:GetObject",bucket:zm,region:Vm,prefix:Dm},{action:"name/cos:PutObject",bucket:nh.Bucket,region:nh.Region,prefix:nh.Key}],method:"PUT",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,VersionId:nh.VersionId,headers:nh.Headers,tracker:nh.tracker},function(og,pg){if(og)return gm(og);var qg=md.clone(pg.CopyObjectResult||{}),xg=v_({ForcePathStyle:im.options.ForcePathStyle,protocol:im.options.Protocol,domain:im.options.Domain,bucket:nh.Bucket,region:nh.Region,object:nh.Key,isLocation:!0});md.extend(qg,{Location:xg,statusCode:pg.statusCode,headers:pg.headers}),gm(null,qg)})}function Fh(nh,gm){var im=nh.CopySource||"",mm=md.getSourceParams.call(this,im);if(!mm){gm(md.error(new Error("CopySource format error")));return}var jm=mm.Bucket,Lm=mm.Region,zm=decodeURIComponent(mm.Key);$g.call(this,{Scope:[{action:"name/cos:GetObject",bucket:jm,region:Lm,prefix:zm},{action:"name/cos:PutObject",bucket:nh.Bucket,region:nh.Region,prefix:nh.Key}],method:"PUT",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,VersionId:nh.VersionId,qs:{partNumber:nh.PartNumber,uploadId:nh.UploadId},headers:nh.Headers,tracker:nh.tracker},function(Vm,Dm){if(Vm)return gm(Vm);var og=md.clone(Dm.CopyPartResult||{});md.extend(og,{statusCode:Dm.statusCode,headers:Dm.headers}),gm(null,og)})}function kf(nh,gm){var im=nh.Objects||[],mm=nh.Quiet;im=md.isArray(im)?im:[im];var jm=md.json2xml({Delete:{Object:im,Quiet:mm||!1}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm));var zm=md.map(im,function(Vm){return{action:"name/cos:DeleteObject",bucket:nh.Bucket,region:nh.Region,prefix:Vm.Key}});$g.call(this,{Scope:zm,method:"POST",Bucket:nh.Bucket,Region:nh.Region,body:jm,action:"delete",headers:Lm,tracker:nh.tracker},function(Vm,Dm){if(Vm)return gm(Vm);var og=Dm.DeleteResult||{},pg=og.Deleted||[],qg=og.Error||[];pg=md.isArray(pg)?pg:[pg],qg=md.isArray(qg)?qg:[qg];var xg=md.clone(og);md.extend(xg,{Error:qg,Deleted:pg,statusCode:Dm.statusCode,headers:Dm.headers}),gm(null,xg)})}function Rf(nh,gm){var im=nh.Headers;if(!nh.RestoreRequest){gm(md.error(new Error("missing param RestoreRequest")));return}var mm=nh.RestoreRequest||{},jm=md.json2xml({RestoreRequest:mm});im["Content-Type"]="application/xml",im["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,VersionId:nh.VersionId,body:jm,action:"restore",headers:im,tracker:nh.tracker},gm)}function Dh(nh,gm){var im=nh.Tagging||{},mm=im.TagSet||im.Tags||nh.Tags||[];mm=md.clone(md.isArray(mm)?mm:[mm]);var jm=md.json2xml({Tagging:{TagSet:{Tag:mm}}}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:nh.Bucket,Key:nh.Key,Region:nh.Region,body:jm,action:"tagging",headers:Lm,VersionId:nh.VersionId,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function Vh(nh,gm){$g.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:nh.Key,Bucket:nh.Bucket,Region:nh.Region,headers:nh.Headers,action:"tagging",VersionId:nh.VersionId,tracker:nh.tracker},function(im,mm){if(im){if(im.statusCode===404&&im.error&&(im.error==="Not Found"||im.error.Code==="NoSuchTagSet")){var jm={Tags:[],statusCode:im.statusCode};im.headers&&(jm.headers=im.headers),gm(null,jm)}else gm(im);return}var Lm=[];try{Lm=mm.Tagging.TagSet.Tag||[]}catch{}Lm=md.clone(md.isArray(Lm)?Lm:[Lm]),gm(null,{Tags:Lm,statusCode:mm.statusCode,headers:mm.headers})})}function Sm(nh,gm){$g.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,action:"tagging",VersionId:nh.VersionId,tracker:nh.tracker},function(im,mm){if(im&&im.statusCode===204)return gm(null,{statusCode:im.statusCode});if(im)return gm(im);gm(null,{statusCode:mm.statusCode,headers:mm.headers})})}function $m(nh,gm){var im=nh.SelectType;if(!im)return gm(md.error(new Error("missing param SelectType")));var mm=nh.SelectRequest||{},jm=md.json2xml({SelectRequest:mm}),Lm=nh.Headers;Lm["Content-Type"]="application/xml",Lm["Content-MD5"]=md.b64(md.md5(jm)),$g.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,headers:nh.Headers,action:"select",qs:{"select-type":nh.SelectType},VersionId:nh.VersionId,body:jm,DataType:"arraybuffer",rawBody:!0,tracker:nh.tracker},function(zm,Vm){if(zm&&zm.statusCode===204)return gm(null,{statusCode:zm.statusCode});if(zm)return gm(zm);var Dm=md.parseSelectPayload(Vm.body);gm(null,{statusCode:Vm.statusCode,headers:Vm.headers,Body:Dm.body,Payload:Dm.payload})})}function Km(nh,gm){var im=this,mm=nh.Headers,jm=nh.tracker;!mm["Cache-Control"]&&!mm["cache-control"]&&(mm["Cache-Control"]=""),!mm["Content-Type"]&&!mm["content-type"]&&(mm["Content-Type"]=nh.Body&&nh.Body.type||"");var Lm=nh.Body&&(nh.UploadAddMetaMd5||im.options.UploadAddMetaMd5);Lm&&jm&&jm.setParams({md5StartTime:new Date().getTime()}),md.getBodyMd5(Lm,nh.Body,function(zm){zm&&(nh.Headers["x-cos-meta-md5"]=zm),Lm&&jm&&jm.setParams({md5EndTime:new Date().getTime()}),$g.call(im,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,action:"uploads",headers:nh.Headers,qs:nh.Query,tracker:jm},function(Vm,Dm){if(Vm)return jm&&jm.parent&&jm.parent.setParams({errorNode:"multipartInit"}),gm(Vm);if(Dm=md.clone(Dm||{}),Dm&&Dm.InitiateMultipartUploadResult)return gm(null,md.extend(Dm.InitiateMultipartUploadResult,{statusCode:Dm.statusCode,headers:Dm.headers}));gm(null,Dm)})},nh.onHashProgress)}function Ag(nh,gm){var im=this;md.getFileSize("multipartUpload",nh,function(){var mm=nh.tracker,jm=im.options.UploadCheckContentMd5;jm&&mm&&mm.setParams({md5StartTime:new Date().getTime()}),md.getBodyMd5(jm,nh.Body,function(Lm){Lm&&(nh.Headers["Content-MD5"]=md.b64(Lm)),jm&&mm&&mm.setParams({md5EndTime:new Date().getTime()}),mm&&mm.setParams({partNumber:nh.PartNumber}),$g.call(im,{Action:"name/cos:UploadPart",TaskId:nh.TaskId,method:"PUT",Bucket:nh.Bucket,Region:nh.Region,Key:nh.Key,qs:{partNumber:nh.PartNumber,uploadId:nh.UploadId},headers:nh.Headers,onProgress:nh.onProgress,body:nh.Body||null,tracker:mm},function(zm,Vm){if(zm)return mm&&mm.parent&&mm.parent.setParams({errorNode:"multipartUpload"}),gm(zm);gm(null,{ETag:md.attr(Vm.headers,"etag",""),statusCode:Vm.statusCode,headers:Vm.headers})})})})}function ig(nh,gm){for(var im=this,mm=nh.UploadId,jm=nh.Parts,Lm=nh.tracker,zm=0,Vm=jm.length;zm-1?qg(pg.Authorization):"sign="+encodeURIComponent(pg.Authorization)),pg.SecurityToken&&(xg+="&x-cos-security-token="+pg.SecurityToken),pg.ClientIP&&(xg+="&clientIP="+pg.ClientIP),pg.ClientUA&&(xg+="&clientUA="+pg.ClientUA),pg.Token&&(xg+="&token="+pg.Token),Lm&&(xg+="&"+Lm),setTimeout(function(){gm(null,{Url:xg})})}});return Dm?(zm+="?"+Dm.Authorization+(Dm.SecurityToken?"&x-cos-security-token="+Dm.SecurityToken:""),Lm&&(zm+="&"+Lm)):Lm&&(zm+="?"+Lm),zm}function t_(nh){var gm={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},im={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},mm=nh&&nh.AccessControlList||{},jm=mm.Grant;jm&&(jm=md.isArray(jm)?jm:[jm]);var Lm={READ:0,WRITE:0,FULL_CONTROL:0};return jm&&jm.length&&md.each(jm,function(zm){var Vm=zm.Grantee.URI&&zm.Grantee.URI.endsWith("/groups/global/AllUsers");zm.Grantee.ID==="qcs::cam::anyone:anyone"||Vm?Lm[zm.Permission]=1:zm.Grantee.ID!==nh.Owner.ID&&gm[im[zm.Permission]].push('id="'+zm.Grantee.ID+'"')}),Lm.FULL_CONTROL||Lm.WRITE&&Lm.READ?gm.ACL="public-read-write":Lm.READ?gm.ACL="public-read":gm.ACL="private",md.each(im,function(zm){gm[zm]=R_(gm[zm].join(","))}),gm}function R_(nh){var gm=nh.split(","),im={},mm,jm;for(mm=0;mm"u"?"undefined":fd(location))==="object"&&location.protocol==="http:"?"http:":"https:");Lm||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(gm)>-1?Lm="{Region}.myqcloud.com":Lm="cos.{Region}.myqcloud.com",nh.ForcePathStyle||(Lm="{Bucket}."+Lm)),Lm=Lm.replace(/\{\{AppId\}\}/gi,jm).replace(/\{\{Bucket\}\}/gi,mm).replace(/\{\{Region\}\}/gi,gm).replace(/\{\{.*?\}\}/gi,""),Lm=Lm.replace(/\{AppId\}/gi,jm).replace(/\{BucketName\}/gi,mm).replace(/\{Bucket\}/gi,im).replace(/\{Region\}/gi,gm).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(Lm)||(Lm=Vm+"//"+Lm),Lm.slice(-1)==="/"&&(Lm=Lm.slice(0,-1));var Dm=Lm;return nh.ForcePathStyle&&(Dm+="/"+im),Dm+="/",zm&&(Dm+=md.camSafeUrlEncode(zm).replace(/%2F/g,"/")),nh.isLocation&&(Dm=Dm.replace(/^https?:\/\//,"")),Dm}var X_=function(gm){if(!gm.Bucket||!gm.Region)return"";var im=gm.UseAccelerate===void 0?this.options.UseAccelerate:gm.UseAccelerate,mm=gm.Url||v_({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:gm.Bucket,region:im?"accelerate":gm.Region}),jm=mm.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return jm};function eb(nh,gm){var im=md.clone(nh.Headers),mm="";md.each(im,function(m_,a_){(m_===""||["content-type","cache-control","expires"].indexOf(a_.toLowerCase())>-1)&&delete im[a_],a_.toLowerCase()==="host"&&(mm=m_)});var jm=nh.ForceSignHost!==!1;!mm&&nh.SignHost&&jm&&(im.Host=nh.SignHost);var Lm=!1,zm=function(a_,qh){Lm||(Lm=!0,qh&&qh.XCosSecurityToken&&!qh.SecurityToken&&(qh=md.clone(qh),qh.SecurityToken=qh.XCosSecurityToken,delete qh.XCosSecurityToken),gm&&gm(a_,qh))},Vm=this,Dm=nh.Bucket||"",og=nh.Region||"",pg=nh.Key||"";Vm.options.ForcePathStyle&&Dm&&(pg=Dm+"/"+pg);var qg="/"+pg,xg={},Yg=nh.Scope;if(!Yg){var w_=nh.Action||"",C_=nh.ResourceKey||nh.Key||"";Yg=nh.Scope||[{action:w_,bucket:Dm,region:og,prefix:C_}]}var p_=md.md5(JSON.stringify(Yg));Vm._StsCache=Vm._StsCache||[],function(){var m_,a_;for(m_=Vm._StsCache.length-1;m_>=0;m_--){a_=Vm._StsCache[m_];var qh=Math.round(md.getSkewTime(Vm.options.SystemClockOffset)/1e3)+30;if(a_.StartTime&&qh=a_.ExpiredTime){Vm._StsCache.splice(m_,1);continue}if(!a_.ScopeLimit||a_.ScopeLimit&&a_.ScopeKey===p_){xg=a_;break}}}();var Mg=function(){var a_="";xg.StartTime&&nh.Expires?a_=xg.StartTime+";"+(xg.StartTime+nh.Expires*1):xg.StartTime&&xg.ExpiredTime&&(a_=xg.StartTime+";"+xg.ExpiredTime);var qh=md.getAuth({SecretId:xg.TmpSecretId,SecretKey:xg.TmpSecretKey,Method:nh.Method,Pathname:qg,Query:nh.Query,Headers:im,Expires:nh.Expires,UseRawKey:Vm.options.UseRawKey,SystemClockOffset:Vm.options.SystemClockOffset,KeyTime:a_,ForceSignHost:jm}),Pm={Authorization:qh,SecurityToken:xg.SecurityToken||xg.XCosSecurityToken||"",Token:xg.Token||"",ClientIP:xg.ClientIP||"",ClientUA:xg.ClientUA||"",SignFrom:"client"};zm(null,Pm)},q_=function(a_){if(a_.Authorization){var qh=!1,Pm=a_.Authorization;if(Pm)if(Pm.indexOf(" ")>-1)qh=!1;else if(Pm.indexOf("q-sign-algorithm=")>-1&&Pm.indexOf("q-ak=")>-1&&Pm.indexOf("q-sign-time=")>-1&&Pm.indexOf("q-key-time=")>-1&&Pm.indexOf("q-url-param-list=")>-1)qh=!0;else try{Pm=atob(Pm),Pm.indexOf("a=")>-1&&Pm.indexOf("k=")>-1&&Pm.indexOf("t=")>-1&&Pm.indexOf("r=")>-1&&Pm.indexOf("b=")>-1&&(qh=!0)}catch{}if(!qh)return md.error(new Error("getAuthorization callback params format error"))}else{if(!a_.TmpSecretId)return md.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!a_.TmpSecretKey)return md.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!a_.SecurityToken&&!a_.XCosSecurityToken)return md.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!a_.ExpiredTime)return md.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(a_.ExpiredTime&&a_.ExpiredTime.toString().length!==10)return md.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(a_.StartTime&&a_.StartTime.toString().length!==10)return md.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(xg.ExpiredTime&&xg.ExpiredTime-md.getSkewTime(Vm.options.SystemClockOffset)/1e3>60)Mg();else if(Vm.options.getAuthorization)Vm.options.getAuthorization.call(Vm,{Bucket:Dm,Region:og,Method:nh.Method,Key:pg,Pathname:qg,Query:nh.Query,Headers:im,Scope:Yg,SystemClockOffset:Vm.options.SystemClockOffset,ForceSignHost:jm},function(m_){typeof m_=="string"&&(m_={Authorization:m_});var a_=q_(m_);if(a_)return zm(a_);m_.Authorization?zm(null,m_):(xg=m_||{},xg.Scope=Yg,xg.ScopeKey=p_,Vm._StsCache.push(xg),Mg())});else if(Vm.options.getSTS)Vm.options.getSTS.call(Vm,{Bucket:Dm,Region:og},function(m_){xg=m_||{},xg.Scope=Yg,xg.ScopeKey=p_,xg.TmpSecretId||(xg.TmpSecretId=xg.SecretId),xg.TmpSecretKey||(xg.TmpSecretKey=xg.SecretKey);var a_=q_(xg);if(a_)return zm(a_);Vm._StsCache.push(xg),Mg()});else return function(){var m_="";if(Vm.options.StartTime&&nh.Expires){if(Vm.options.StartTime.toString().length!==10)return zm(md.error(new Error('params "StartTime" should be 10 digits')));m_=Vm.options.StartTime+";"+(Vm.options.StartTime+nh.Expires*1)}else if(Vm.options.StartTime&&Vm.options.ExpiredTime){if(Vm.options.StartTime.toString().length!==10)return zm(md.error(new Error('params "StartTime" should be 10 digits')));if(Vm.options.ExpiredTime.toString().length!==10)return zm(md.error(new Error('params "ExpiredTime" should be 10 digits')));m_=Vm.options.StartTime+";"+Vm.options.ExpiredTime*1}var a_=md.getAuth({SecretId:nh.SecretId||Vm.options.SecretId,SecretKey:nh.SecretKey||Vm.options.SecretKey,Method:nh.Method,Pathname:qg,Query:nh.Query,Headers:im,Expires:nh.Expires,KeyTime:m_,UseRawKey:Vm.options.UseRawKey,SystemClockOffset:Vm.options.SystemClockOffset,ForceSignHost:jm}),qh={Authorization:a_,SecurityToken:Vm.options.SecurityToken||Vm.options.XCosSecurityToken,SignFrom:"client"};return zm(null,qh),qh}();return""}function I_(nh){var gm=this,im=!1,mm=!1,jm=!1,Lm=nh.headers&&(nh.headers.date||nh.headers.Date)||nh.error&&nh.error.ServerTime;try{var zm=nh.error.Code,Vm=nh.error.Message;(zm==="RequestTimeTooSkewed"||zm==="AccessDenied"&&Vm==="Request has expired")&&(mm=!0)}catch{}if(nh)if(mm&&Lm){var Dm=Date.parse(Lm);this.options.CorrectClockSkew&&Math.abs(md.getSkewTime(this.options.SystemClockOffset)-Dm)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=Dm-Date.now(),im=!0)}else Math.floor(nh.statusCode/100)===5?im=!0:nh.message==="CORS blocked or network error"&&(jm=!0,im=gm.options.AutoSwitchHost);return{canRetry:im,networkError:jm}}function $_(nh){var gm=nh.requestUrl,im=nh.clientCalcSign,mm=nh.networkError;if(!this.options.AutoSwitchHost||!gm||!im||!mm)return!1;var jm=/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/,Lm=/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/,zm=jm.test(gm)&&!Lm.test(gm);return zm}function $g(nh,gm){var im=this;!nh.headers&&(nh.headers={}),!nh.qs&&(nh.qs={}),nh.VersionId&&(nh.qs.versionId=nh.VersionId),nh.qs=md.clearKey(nh.qs),nh.headers&&(nh.headers=md.clearKey(nh.headers)),nh.qs&&(nh.qs=md.clearKey(nh.qs));var mm=md.clone(nh.qs);nh.action&&(mm[nh.action]="");var jm=nh.url||nh.Url,Lm=nh.SignHost||X_.call(this,{Bucket:nh.Bucket,Region:nh.Region,Url:jm}),zm=nh.tracker,Vm=function Dm(og){var pg=im.options.SystemClockOffset;zm&&zm.setParams({signStartTime:new Date().getTime(),httpRetryTimes:og-1}),nh.SwitchHost&&(Lm=Lm.replace(/myqcloud.com/,"tencentcos.cn")),eb.call(im,{Bucket:nh.Bucket||"",Region:nh.Region||"",Method:nh.method,Key:nh.Key,Query:mm,Headers:nh.headers,SignHost:Lm,Action:nh.Action,ResourceKey:nh.ResourceKey,Scope:nh.Scope,ForceSignHost:im.options.ForceSignHost,SwitchHost:nh.SwitchHost},function(qg,xg){if(qg){gm(qg);return}zm&&zm.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),nh.AuthData=xg,Lb.call(im,nh,function(Yg,w_){zm&&zm.setParams({httpEndTime:new Date().getTime()});var C_=!1,p_=!1;if(Yg){var Mg=I_.call(im,Yg);C_=Mg.canRetry||pg!==im.options.SystemClockOffset,p_=Mg.networkError}if(Yg&&og<2&&C_){nh.headers&&(delete nh.headers.Authorization,delete nh.headers.token,delete nh.headers.clientIP,delete nh.headers.clientUA,nh.headers["x-cos-security-token"]&&delete nh.headers["x-cos-security-token"],nh.headers["x-ci-security-token"]&&delete nh.headers["x-ci-security-token"]);var q_=$_.call(im,{requestUrl:(Yg==null?void 0:Yg.url)||"",clientCalcSign:xg.SignFrom==="client",networkError:p_});nh.SwitchHost=q_,nh.retry=!0,Dm(og+1)}else gm(Yg,w_)})})};Vm(1)}function Lb(nh,gm){var im=this,mm=nh.TaskId;if(!(mm&&!im._isRunningTask(mm))){var jm=nh.Bucket,Lm=nh.Region,zm=nh.Key,Vm=nh.method||"GET",Dm=nh.Url||nh.url,og=nh.body,pg=nh.rawBody;im.options.UseAccelerate&&(Lm="accelerate"),Dm=Dm||v_({ForcePathStyle:im.options.ForcePathStyle,protocol:im.options.Protocol,domain:im.options.Domain,bucket:jm,region:Lm,object:zm}),nh.SwitchHost&&(Dm=Dm.replace(/myqcloud.com/,"tencentcos.cn"));var qg=zm?Dm:"";nh.action&&(Dm=Dm+"?"+(md.isIOS_QQ?"".concat(nh.action,"="):nh.action)),nh.qsStr&&(Dm.indexOf("?")>-1?Dm=Dm+"&"+nh.qsStr:Dm=Dm+"?"+nh.qsStr);var xg={method:Vm,url:Dm,headers:nh.headers,qs:nh.qs,body:og},Yg="x-cos-security-token";if(md.isCIHost(Dm)&&(Yg="x-ci-security-token"),xg.headers.Authorization=nh.AuthData.Authorization,nh.AuthData.Token&&(xg.headers.token=nh.AuthData.Token),nh.AuthData.ClientIP&&(xg.headers.clientIP=nh.AuthData.ClientIP),nh.AuthData.ClientUA&&(xg.headers.clientUA=nh.AuthData.ClientUA),nh.AuthData.SecurityToken&&(xg.headers[Yg]=nh.AuthData.SecurityToken),nh.Action&&(xg.action=nh.Action),xg.key=nh.Key||nh.ResourceKey,xg.headers&&(xg.headers=md.clearKey(xg.headers)),nh.retry&&(xg.headers["x-cos-sdk-retry"]=!0),xg=md.clearKey(xg),nh.onProgress&&typeof nh.onProgress=="function"){var w_=og&&(og.size||og.length)||0;xg.onProgress=function(qh){if(!(mm&&!im._isRunningTask(mm))){var Pm=qh?qh.loaded:0;nh.onProgress({loaded:Pm,total:w_})}}}nh.onDownloadProgress&&(xg.onDownloadProgress=nh.onDownloadProgress),nh.DataType&&(xg.dataType=nh.DataType),this.options.Timeout&&(xg.timeout=this.options.Timeout),im.options.ForcePathStyle&&(xg.pathStyle=im.options.ForcePathStyle),im.emit("before-send",xg);var C_=xg.url.includes("accelerate."),p_=xg.qs?Object.keys(xg.qs).map(function(qh){return"".concat(qh,"=").concat(xg.qs[qh])}).join("&"):"",Mg=p_?xg.url+"?"+p_:xg.url;if(nh.tracker){var q_;nh.tracker.setParams({url:Mg,httpMethod:xg.method,accelerate:C_,httpSize:((q_=xg.body)===null||q_===void 0?void 0:q_.size)||0}),nh.tracker.parent&&!nh.tracker.parent.params.url&&nh.tracker.parent.setParams({url:qg,accelerate:C_})}var m_=(im.options.Request||hd)(xg,function(qh){if(!(qh&&qh.error==="abort")){var Pm={options:xg,error:qh&&qh.error,statusCode:qh&&qh.statusCode||0,statusMessage:qh&&qh.statusMessage||"",headers:qh&&qh.headers||{},body:qh&&qh.body};im.emit("after-receive",Pm);var dg=Pm.error,Ig=Pm.body,sg={statusCode:Pm.statusCode,statusMessage:Pm.statusMessage,headers:Pm.headers},Fg,b_=function(Ub,Y_){if(mm&&im.off("inner-kill-task",a_),!Fg){Fg=!0;var Tb={};if(sg.statusCode&&(Tb.statusCode=sg.statusCode),sg.headers&&(Tb.headers=sg.headers),Ub)xg.url&&(Tb.url=xg.url),xg.method&&(Tb.method=xg.method),Ub=md.extend(Ub||{},Tb),gm(Ub,null);else{if(nh.Action==="name/cos:PutObject"){var pb={};for(var Sy in nh.headers){var pE=Sy.toLowerCase();pb[pE]=nh.headers[Sy]}pb["x-cos-callback"]?Y_.Error?(Y_.CallbackError=md.clone(Y_.Error),delete Y_.Error):Y_.CallbackBody=md.clone(Y_):pb["x-cos-return-body"]&&(Y_.Error?(Y_.ReturnError=md.clone(Y_.Error),delete Y_.Error):Y_.ReturnBody=md.clone(Y_))}Y_=md.extend(Y_||{},Tb),gm(null,Y_)}m_=null}};if(dg)return b_(md.error(dg));var W_=sg.statusCode,sb=Math.floor(W_/100)===2;if(pg){if(sb)return b_(null,{body:Ig});if(Ig instanceof Blob){md.readAsBinaryString(Ig,function(l_){var Ub=md.parseResBody(l_),Y_=Ub.Error||Ub;return b_(md.error(new Error(Y_.Message||"response body error"),{code:Y_.Code,error:Y_}))});return}}var jb=md.parseResBody(Ig),uy=jb.Error||jb;sb?b_(null,jb):uy?b_(md.error(new Error(uy.Message),{code:uy.Code,error:uy})):W_?b_(md.error(new Error(sg.statusMessage),{code:""+W_})):W_&&b_(md.error(new Error("statusCode error")))}}),a_=function qh(Pm){Pm.TaskId===mm&&(m_&&m_.abort&&m_.abort(),im.off("inner-kill-task",qh))};mm&&im.on("inner-kill-task",a_)}}var Kb={getService:gd,putBucket:yd,headBucket:vd,getBucket:Nd,deleteBucket:Md,putBucketAcl:Ld,getBucketAcl:Fd,putBucketCors:Hd,getBucketCors:Vd,deleteBucketCors:Gd,getBucketLocation:Ud,getBucketPolicy:Wd,putBucketPolicy:qd,deleteBucketPolicy:Kd,putBucketTagging:Xd,getBucketTagging:df,deleteBucketTagging:Ef,putBucketLifecycle:pf,getBucketLifecycle:mf,deleteBucketLifecycle:_f,putBucketVersioning:xf,getBucketVersioning:Cf,putBucketReplication:If,getBucketReplication:Sf,deleteBucketReplication:wf,putBucketWebsite:Pf,getBucketWebsite:lh,deleteBucketWebsite:xh,putBucketReferer:Eh,getBucketReferer:Mh,putBucketDomain:dh,getBucketDomain:eh,deleteBucketDomain:fh,putBucketOrigin:Sh,getBucketOrigin:vh,deleteBucketOrigin:Df,putBucketLogging:Af,getBucketLogging:_h,putBucketInventory:dm,postBucketInventory:Jf,getBucketInventory:oh,listBucketInventory:Xh,deleteBucketInventory:Tm,putBucketAccelerate:kh,getBucketAccelerate:Zf,putBucketEncryption:th,getBucketEncryption:$h,deleteBucketEncryption:wh,getObject:Mm,headObject:fm,listObjectVersions:zh,putObject:Rm,deleteObject:tg,getObjectAcl:Fm,putObjectAcl:Ym,optionsObject:rg,putObjectCopy:Eg,deleteMultipleObject:kf,restoreObject:Rf,putObjectTagging:Dh,getObjectTagging:Vh,deleteObjectTagging:Sm,selectObjectContent:$m,appendObject:d_,uploadPartCopy:Fh,multipartInit:Km,multipartUpload:Ag,multipartComplete:ig,multipartList:_g,multipartListPart:vg,multipartAbort:Og,request:Wg,getObjectUrl:y_,getAuth:o_};function db(nh,gm,im){md.each(["Cors","Acl"],function(mm){if(nh.slice(-mm.length)===mm){var jm=nh.slice(0,-mm.length)+mm.toUpperCase(),Lm=md.apiWrapper(nh,gm),zm=!1;im[jm]=function(){!zm&&console.warn("warning: cos."+jm+" has been deprecated. Please Use cos."+nh+" instead."),zm=!0,Lm.apply(this,arguments)}}})}rd.exports.init=function(nh,gm){gm.transferToTaskMethod(Kb,"putObject"),md.each(Kb,function(im,mm){nh.prototype[mm]=md.apiWrapper(mm,im),db(mm,im,nh.prototype)})}},"./src/cos.js":function(rd,sd,pd){var fd=pd("./src/util.js"),hd=pd("./src/event.js"),md=pd("./src/task.js"),gd=pd("./src/base.js"),yd=pd("./src/advance.js"),vd=pd("./package.json"),Nd={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",StartTime:0,ExpiredTime:0,ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1024*1024,SliceSize:1024*1024,CopyChunkParallelLimit:20,CopyChunkSize:1024*1024*10,CopySliceSize:1024*1024*10,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,AutoSwitchHost:!0,CopySourceParser:null,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},Md=function(Fd){if(this.options=fd.extend(fd.clone(Nd),Fd||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1024*1024,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1024*1024,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),fd.isNode()&&(console.log("Tip: Next.js、Nuxt.js 等服务端渲染技术可正常使用JavaScript SDK,请忽略下方 nodejs 环境警告"),console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),this.options.ForcePathStyle)throw console.warn("cos-js-sdk-v5不再支持使用path-style,仅支持使用virtual-hosted-style,参考文档:https://cloud.tencent.com/document/product/436/96243"),new Error("ForcePathStyle is not supported");hd.init(this),md.init(this)};gd.init(Md,md),yd.init(Md,md),Md.util={md5:fd.md5,xml2json:fd.xml2json,json2xml:fd.json2xml,encodeBase64:fd.encodeBase64},Md.getAuthorization=fd.getAuth,Md.version=vd.version,rd.exports=Md},"./src/event.js":function(rd,sd){var pd=function(md){var gd={},yd=function(Nd){return!gd[Nd]&&(gd[Nd]=[]),gd[Nd]};md.on=function(vd,Nd){vd==="task-list-update"&&console.warn('warning: Event "'+vd+'" has been deprecated. Please use "list-update" instead.'),yd(vd).push(Nd)},md.off=function(vd,Nd){for(var Md=yd(vd),Ld=Md.length-1;Ld>=0;Ld--)Nd===Md[Ld]&&Md.splice(Ld,1)},md.emit=function(vd,Nd){for(var Md=yd(vd).map(function(Fd){return Fd}),Ld=0;Ld=0;Ud--){var qd=gd[Ud][2];(!qd||qd+md=0;qd--){var Wd=gd[qd];Wd[0]===Vd&&Wd[1]===Gd&&gd.splice(qd,1)}gd.unshift([Vd,Gd,Math.round(Date.now()/1e3)]),gd.length>Ud&&gd.splice(Ud),Ld()}},removeUploadId:function(Vd){Md.call(this),delete Fd.using[Vd];for(var Gd=gd.length-1;Gd>=0;Gd--)gd[Gd][1]===Vd&&gd.splice(Gd,1);Ld()}};rd.exports=Fd},"./src/task.js":function(rd,sd,pd){var fd=pd("./src/session.js"),hd=pd("./src/util.js"),md={},gd=function(Nd,Md){md[Md]=Nd[Md],Nd[Md]=function(Ld,Fd){Ld.SkipTask?md[Md].call(this,Ld,Fd):this._addTask(Md,Ld,Fd)}},yd=function(Nd){var Md=[],Ld={},Fd=0,Hd=0,Vd=function(df){var Ef={id:df.id,Bucket:df.Bucket,Region:df.Region,Key:df.Key,FilePath:df.FilePath,state:df.state,loaded:df.loaded,size:df.size,speed:df.speed,percent:df.percent,hashPercent:df.hashPercent,error:df.error};return df.FilePath&&(Ef.FilePath=df.FilePath),df._custom&&(Ef._custom=df._custom),Ef},Gd=function(){var Xd,df=function(){Xd=0,Nd.emit("task-list-update",{list:hd.map(Md,Vd)}),Nd.emit("list-update",{list:hd.map(Md,Vd)})};return function(){Xd||(Xd=setTimeout(df))}}(),Ud=function(){if(!(Md.length<=Nd.options.UploadQueueSize)){for(var df=0;dfNd.options.UploadQueueSize;){var Ef=Md[df].state==="waiting"||Md[df].state==="checking"||Md[df].state==="uploading";!Md[df]||!Ef?(Ld[Md[df].id]&&delete Ld[Md[df].id],Md.splice(df,1),Hd--):df++}Gd()}},qd=function Xd(){if(!(Fd>=Nd.options.FileParallelLimit)){for(;Md[Hd]&&Md[Hd].state!=="waiting";)Hd++;if(!(Hd>=Md.length)){var df=Md[Hd];Hd++,Fd++,df.state="checking",df.params.onTaskStart&&df.params.onTaskStart(Vd(df)),!df.params.UploadData&&(df.params.UploadData={});var Ef=hd.formatParams(df.api,df.params);md[df.api].call(Nd,Ef,function(pf,mf){Nd._isRunningTask(df.id)&&((df.state==="checking"||df.state==="uploading")&&(df.state=pf?"error":"success",pf&&(df.error=pf),Fd--,Gd(),Xd(),df.callback&&df.callback(pf,mf),df.state==="success"&&(df.params&&(delete df.params.UploadData,delete df.params.Body,delete df.params),delete df.callback)),Ud())}),Gd(),setTimeout(Xd)}}},Wd=function(df,Ef){var pf=Ld[df];if(pf){var mf=pf&&pf.state==="waiting",_f=pf&&(pf.state==="checking"||pf.state==="uploading");if(Ef==="canceled"&&pf.state!=="canceled"||Ef==="paused"&&mf||Ef==="paused"&&_f){pf.state=Ef,Nd.emit("inner-kill-task",{TaskId:df,toState:Ef});try{var xf=pf&&pf.params&&pf.params.UploadData.UploadId}catch{}Ef==="canceled"&&xf&&fd.removeUsing(xf),Gd(),_f&&(Fd--,qd()),Ef==="canceled"&&(pf.params&&(delete pf.params.UploadData,delete pf.params.Body,delete pf.params),delete pf.callback)}Ud()}};Nd._addTasks=function(Xd){hd.each(Xd,function(df){Nd._addTask(df.api,df.params,df.callback,!0)}),Gd()};var Kd=!0;Nd._addTask=function(Xd,df,Ef,pf){df=hd.formatParams(Xd,df);var mf=hd.uuid();df.TaskId=mf,df.onTaskReady&&df.onTaskReady(mf),df.TaskReady&&(df.TaskReady(mf),Kd&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),Kd=!1);var _f={params:df,callback:Ef,api:Xd,index:Md.length,id:mf,Bucket:df.Bucket,Region:df.Region,Key:df.Key,FilePath:df.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:df._custom},xf=df.onHashProgress;df.onHashProgress=function(If){Nd._isRunningTask(_f.id)&&(_f.hashPercent=If.percent,xf&&xf(If),Gd())};var Cf=df.onProgress;return df.onProgress=function(If){Nd._isRunningTask(_f.id)&&(_f.state==="checking"&&(_f.state="uploading"),_f.loaded=If.loaded,_f.speed=If.speed,_f.percent=If.percent,Cf&&Cf(If),Gd())},hd.getFileSize(Xd,df,function(If,Sf){if(If)return Ef(hd.error(If));Ld[mf]=_f,Md.push(_f),_f.size=Sf,!pf&&Gd(),qd(),Ud()}),mf},Nd._isRunningTask=function(Xd){var df=Ld[Xd];return!!(df&&(df.state==="checking"||df.state==="uploading"))},Nd.getTaskList=function(){return hd.map(Md,Vd)},Nd.cancelTask=function(Xd){Wd(Xd,"canceled")},Nd.pauseTask=function(Xd){Wd(Xd,"paused")},Nd.restartTask=function(Xd){var df=Ld[Xd];df&&(df.state==="paused"||df.state==="error")&&(df.state="waiting",Gd(),Hd=Math.min(Hd,df.index),qd())},Nd.isUploadRunning=function(){return Fd||Hd"u"?"undefined":md(navigator))==="object"){var Ef=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(Ef==null?void 0:Ef.type)||(Ef==null?void 0:Ef.effectiveType)||"unknown"}return"unknown"},getProtocol:function(){return(typeof location>"u"?"undefined":md(location))==="object"?location.protocol.replace(/:/,""):"unknown protocol"},getOsType:function(){if((typeof navigator>"u"?"undefined":md(navigator))!=="object")return"unknown os";var Ef=navigator.userAgent.toLowerCase(),pf=/macintosh|mac os x/i.test(navigator.userAgent);return Ef.indexOf("win32")>=0||Ef.indexOf("wow32")>=0?"win32":Ef.indexOf("win64")>=0||Ef.indexOf("wow64")>=0?"win64":pf?"mac":"unknown os"},isMobile:function(){var Ef=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator>"u"?"undefined":md(navigator))==="object"&&navigator.userAgent.match(Ef))},isAndroid:function(){var Ef=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":md(navigator))==="object"&&navigator.userAgent.match(Ef))},isIOS:function(){var Ef=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":md(navigator))==="object"&&navigator.userAgent.match(Ef))},isOtherMobile:function(){return Ld&&!isAndroid&&!isIOS},getUA:function(){if((typeof navigator>"u"?"undefined":md(navigator))!=="object")return"unknown device";var Ef=navigator.userAgent;return Ef}},Ld=Md.isMobile(),Fd=Md.isAndroid()?"android":"ios",Hd=Md.getOsType(),Vd=Ld?Fd:Hd,Gd=Md.getUA(),Ud=Md.getProtocol(),qd=function(Ef){return["putObject","sliceUploadFile","uploadFile","uploadFiles"].includes(Ef)?"UploadTask":Ef==="getObject"?"DownloadTask":["putObjectCopy","sliceCopyFile"].includes(Ef)?"CopyTask":Ef};function Wd(df){return df.replace(/([A-Z])/g,"_$1").toLowerCase()}function Kd(df){var Ef={},pf=["sdkVersionName","sdkVersionCode","osName","networkType","requestName","requestResult","bucket","region","appid","accelerate","url","host","requestPath","userAgent","networkProtocol","httpMethod","httpSize","httpSpeed","httpTookTime","httpMd5","httpSign","httpFullTime","httpDomain","partNumber","httpRetryTimes","customId","traceId","realApi"],mf=[].concat(pf,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),_f=df.requestResult==="Success"?pf:mf;for(var xf in df)if(_f.includes(xf)){var Cf=Wd(xf);Ef[Cf]=df[xf]}return Ef.request_name=df.realApi?qd(df.realApi):df.requestName,Ef}var Xd=function(){function df(Ef){fd(this,df);var pf=Ef.parent,mf=Ef.traceId,_f=Ef.bucket,xf=Ef.region,Cf=Ef.apiName,If=Ef.realApi,Sf=Ef.httpMethod,wf=Ef.fileKey,Pf=Ef.fileSize,lh=Ef.accelerate,xh=Ef.customId,Eh=Ef.delay,Mh=Ef.deepTracker,dh=Ef.Beacon,eh=Ef.clsReporter,fh=_f&&_f.substr(_f.lastIndexOf("-")+1)||"";this.parent=pf,this.deepTracker=Mh,this.delay=Eh,eh&&!this.clsReporter&&(this.clsReporter=eh),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:gd.version,osName:Vd,networkType:"",requestName:Cf||"",requestResult:"",realApi:If,bucket:_f,region:xf,accelerate:lh,httpMethod:Sf,url:"",host:"",httpDomain:"",requestPath:wf||"",userAgent:Gd,networkProtocol:Ud,errorType:"",errorCode:"",errorName:"",errorMessage:"",errorRequestId:"",errorHttpCode:0,errorServiceName:"",errorNode:"",httpTookTime:0,httpSize:Pf||0,httpMd5:0,httpSign:0,httpFullTime:0,httpSpeed:0,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0,traceId:mf||Md.getUid(),appid:fh,partNumber:0,httpRetryTimes:0,customId:xh||"",partTime:0},dh&&(this.beacon=vd(dh,Eh))}return hd(df,[{key:"formatResult",value:function(pf,mf){var _f,xf,Cf,If,Sf,wf,Pf=new Date().getTime(),lh=Md.getNetType(),xh=pf?(pf==null?void 0:pf.code)||(pf==null||(_f=pf.error)===null||_f===void 0?void 0:_f.code)||(pf==null||(xf=pf.error)===null||xf===void 0?void 0:xf.Code):"",Eh=pf?(pf==null?void 0:pf.message)||(pf==null||(Cf=pf.error)===null||Cf===void 0?void 0:Cf.message)||(pf==null||(If=pf.error)===null||If===void 0?void 0:If.Message):"",Mh=Eh,dh=pf?(pf==null?void 0:pf.resource)||(pf==null||(Sf=pf.error)===null||Sf===void 0?void 0:Sf.resource)||(pf==null||(wf=pf.error)===null||wf===void 0?void 0:wf.Resource):"",eh=pf?pf==null?void 0:pf.statusCode:mf.statusCode,fh=pf?(pf==null?void 0:pf.headers)&&(pf==null?void 0:pf.headers["x-cos-request-id"]):(mf==null?void 0:mf.headers)&&(mf==null?void 0:mf.headers["x-cos-request-id"]),Sh=pf?fh?"Server":"Client":"";this.params.requestName==="getObject"&&(this.params.httpSize=mf?mf.headers&&mf.headers["content-length"]:0);var vh=this.params.realApi==="sliceUploadFile",Df=this.params.realApi==="sliceCopyFile";if(vh||Df){var Af=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:Af<0?0:Af.toFixed(3)})}else{var _h=Pf-this.params.startTime,Nh=this.params.httpEndTime-this.params.httpStartTime,dm=this.params.httpSize/1024/(Nh/1e3),Jf=this.params.md5EndTime-this.params.md5StartTime,oh=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",Nd(Nh)),this.parent.addParamValue("httpFullTime",Nd(_h)),this.parent.addParamValue("httpMd5",Nd(Jf)),this.parent.addParamValue("httpSign",Nd(oh)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",Nd(Nh))),Object.assign(this.params,{httpFullTime:Nd(_h),httpMd5:Nd(Jf),httpSign:Nd(oh),httpTookTime:Nd(Nh),httpSpeed:dm<0?0:dm.toFixed(3)})}if(Object.assign(this.params,{networkType:lh,requestResult:pf?"Failure":"Success",errorType:Sh,errorCode:xh,errorHttpCode:eh,errorName:Mh,errorMessage:Eh,errorServiceName:dh,errorRequestId:fh}),pf&&(!xh||!Eh)&&(this.params.fullError=pf?JSON.stringify(pf):""),this.params.url){try{var Xh=/^http(s)?:\/\/(.*?)\//.exec(this.params.url);this.params.host=Xh[2]}catch{this.params.host=this.params.url}this.params.httpDomain=this.params.host}}},{key:"report",value:function(pf,mf){if(!(!this.beacon&&!this.clsReporter)){this.formatResult(pf,mf);var _f=Kd(this.params);this.beacon&&this.sendEventsToBeacon(_f),this.clsReporter&&this.sendEventsToCLS(_f)}}},{key:"setParams",value:function(pf){Object.assign(this.params,pf)}},{key:"addParamValue",value:function(pf,mf){this.params[pf]=(+this.params[pf]+ +mf).toFixed(3)}},{key:"sendEventsToBeacon",value:function(pf){var mf=this.params.requestName==="sliceUploadFile"||this.params.realApi==="sliceUploadFile";if(!(mf&&!this.deepTracker)){var _f="qcloud_track_cos_sdk";this.delay===0?this.beacon&&this.beacon.onDirectUserAction(_f,pf):this.beacon&&this.beacon.onUserAction(_f,pf)}}},{key:"sendEventsToCLS",value:function(pf){var mf=this.delay===0;this.clsReporter.log(pf,mf)}},{key:"generateSubTracker",value:function(pf){return Object.assign(pf,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,accelerate:this.params.accelerate,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay,clsReporter:this.clsReporter}),new df(pf)}}]),df}();rd.exports=Xd},"./src/util.js":function(rd,sd,pd){(function(fd){var hd=pd("./node_modules/@babel/runtime/helpers/typeof.js");function md(kf,Rf){var Dh=typeof Symbol<"u"&&kf[Symbol.iterator]||kf["@@iterator"];if(!Dh){if(Array.isArray(kf)||(Dh=gd(kf))||Rf){Dh&&(kf=Dh);var Vh=0,Sm=function(){};return{s:Sm,n:function(){return Vh>=kf.length?{done:!0}:{done:!1,value:kf[Vh++]}},e:function(_g){throw _g},f:Sm}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $m,Km=!0,Ag=!1;return{s:function(){Dh=Dh.call(kf)},n:function(){var _g=Dh.next();return Km=_g.done,_g},e:function(_g){Ag=!0,$m=_g},f:function(){try{Km||Dh.return==null||Dh.return()}finally{if(Ag)throw $m}}}}function gd(kf,Rf){if(kf){if(typeof kf=="string")return yd(kf,Rf);var Dh={}.toString.call(kf).slice(8,-1);return Dh==="Object"&&kf.constructor&&(Dh=kf.constructor.name),Dh==="Map"||Dh==="Set"?Array.from(kf):Dh==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Dh)?yd(kf,Rf):void 0}}function yd(kf,Rf){(Rf==null||Rf>kf.length)&&(Rf=kf.length);for(var Dh=0,Vh=Array(Rf);Dh$m?1:-1})}var df=function(Rf,Dh){var Vh,Sm,$m,Km=[],Ag=Xd(Rf);for(Vh=0;Vh-1||Ef.indexOf(Sm)>-1)&&(Dh[Vh]=Rf[Vh])}return Dh},mf=function(Rf){Rf=Rf||{};var Dh=Rf.SecretId,Vh=Rf.SecretKey,Sm=Rf.KeyTime,$m=(Rf.method||Rf.Method||"get").toLowerCase(),Km=eh(Rf.Query||Rf.params||{}),Ag=pf(eh(Rf.Headers||Rf.headers||{})),ig=Rf.Key||"",_g;Rf.UseRawKey?_g=Rf.Pathname||Rf.pathname||"/"+ig:(_g=Rf.Pathname||Rf.pathname||ig,_g.indexOf("/")!==0&&(_g="/"+_g));var vg=Rf.ForceSignHost!==!1;if(!Ag.Host&&!Ag.host&&Rf.Bucket&&Rf.Region&&vg&&(Ag.Host=Rf.Bucket+".cos."+Rf.Region+".myqcloud.com"),!Dh)throw new Error("missing param SecretId");if(!Vh)throw new Error("missing param SecretKey");var Og=Math.round($h(Rf.SystemClockOffset)/1e3)-1,Wg=Og,d_=Rf.Expires||Rf.expires;d_===void 0?Wg+=900:Wg+=d_*1||0;var o_="sha1",y_=Dh,t_=Sm||Og+";"+Wg,R_=Sm||Og+";"+Wg,v_=Xd(Ag,!0).join(";").toLowerCase(),X_=Xd(Km,!0).join(";").toLowerCase(),eb=Nd.HmacSHA1(R_,Vh).toString(),I_=[$m,_g,Fh.obj2str(Km,!0),Fh.obj2str(Ag,!0),""].join(` -`),$_=["sha1",t_,Nd.SHA1(I_).toString(),""].join(` -`),$g=Nd.HmacSHA1($_,eb).toString(),Lb=["q-sign-algorithm="+o_,"q-ak="+y_,"q-sign-time="+t_,"q-key-time="+R_,"q-header-list="+v_,"q-url-param-list="+X_,"q-signature="+$g].join("&");return Lb},_f=function(Rf,Dh,Vh){var Sm=Dh/8,$m=Rf.slice(Vh,Vh+Sm);return new Uint8Array($m).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[Dh]($m)[0]},xf=function(Rf,Dh,Vh,Sm){var $m=Rf.slice(Dh,Vh),Km="";return new Uint8Array($m).forEach(function(Ag){Km+=String.fromCharCode(Ag)}),Sm&&(Km=decodeURIComponent(escape(Km))),Km},Cf=function(Rf){for(var Dh={},Vh=xf(Rf),Sm={records:[]};Rf.byteLength;){var $m=_f(Rf,32,0),Km=_f(Rf,32,4),Ag=$m-Km-16,ig=0,_g;for(Rf=Rf.slice(12);igparseInt(Sm[$m])?1:-1;return 0},Rf=function(Vh){if(!Vh)return!1;var Sm=(Vh.match(/Chrome\/([.\d]+)/)||[])[1],$m=(Vh.match(/QBCore\/([.\d]+)/)||[])[1],Km=(Vh.match(/QQBrowser\/([.\d]+)/)||[])[1],Ag=Sm&&kf(Sm,"53.0.2785.116")<0&&$m&&kf($m,"3.53.991.400")<0&&Km&&kf(Km,"9.0.2524.400")<=0||!1;return Ag};return Rf(typeof navigator<"u"&&navigator.userAgent)}(),xh=function(Rf,Dh,Vh,Sm,$m){var Km;if(Rf.slice?Km=Rf.slice(Dh,Vh):Rf.mozSlice?Km=Rf.mozSlice(Dh,Vh):Rf.webkitSlice&&(Km=Rf.webkitSlice(Dh,Vh)),Sm&&lh){var Ag=new FileReader;Ag.onload=function(ig){Km=null,$m(new Blob([Ag.result]))},Ag.readAsArrayBuffer(Km)}else $m(Km)},Eh=function(Rf,Dh,Vh,Sm){Vh=Vh||Sf,Rf?typeof Dh=="string"?Vh(Fh.md5(Dh,!0)):Blob&&Dh instanceof Blob?Fh.getFileMd5(Dh,function($m,Km){Vh(Km)},Sm):Vh():Vh()},Mh=1024*1024,dh=function(Rf,Dh,Vh){var Sm=Rf.size,$m=0,Km=vd.getCtx(),Ag=function ig(_g){if(_g>=Sm){var vg=Km.digest("hex");Dh(null,vg);return}var Og=Math.min(Sm,_g+Mh);Fh.fileSlice(Rf,_g,Og,!1,function(Wg){Pf(Wg,function(d_){Wg=null,Km=Km.update(d_,!0),$m+=d_.length,d_=null,Vh&&Vh({loaded:$m,total:Sm,percent:Math.round($m/Sm*1e4)/1e4}),ig(_g+Mh)})})};Ag(0)};function eh(kf){return Nh(kf,function(Rf){return hd(Rf)==="object"&&Rf!==null?eh(Rf):Rf})}function fh(kf,Rf,Dh){return kf&&Rf in kf?kf[Rf]:Dh}function Sh(kf,Rf){return _h(Rf,function(Dh,Vh){kf[Vh]=Rf[Vh]}),kf}function vh(kf){return kf instanceof Array}function Df(kf,Rf){for(var Dh=!1,Vh=0;Vh-1,ig=!Km||typeof Km=="string"&&Km.indexOf("{Region}")>-1;if(Rf.indexOf("Bucket")>-1||Rf==="deleteMultipleObject"||Rf==="multipartList"||Rf==="listObjectVersions"){if(Ag&&!Vh)return"Bucket";if(ig&&!Sm)return"Region"}else if(Rf.indexOf("Object")>-1||Rf.indexOf("multipart")>-1||Rf==="sliceUploadFile"||Rf==="abortUploadTask"||Rf==="uploadFile"){if(Ag&&!Vh)return"Bucket";if(ig&&!Sm)return"Region";if(!$m)return"Key"}return!1},Tm=function(Rf,Dh){if(Dh=Sh({},Dh),Rf!=="getAuth"&&Rf!=="getV4Auth"&&Rf!=="getObjectUrl"){var Vh=Dh.Headers||{};if(Dh&&hd(Dh)==="object"){(function(){for(var $m in Dh)Dh.hasOwnProperty($m)&&$m.indexOf("x-cos-")>-1&&(Vh[$m]=Dh[$m])})();var Sm={"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations","x-cos-callback":"Callback","x-cos-callback-var":"CallbackVar","x-cos-return-body":"ReturnBody"};Fh.each(Sm,function($m,Km){Dh[$m]!==void 0&&(Vh[Km]=Dh[$m])}),Dh.Headers=wf(Vh)}}return Dh},kh=function(Rf,Dh){return function(Vh,Sm){var $m=this;typeof Vh=="function"&&(Sm=Vh,Vh={}),Vh=Tm(Rf,Vh);var Km;if($m.options.EnableReporter)if(Vh.calledBySdk==="sliceUploadFile"||Vh.calledBySdk==="sliceCopyFile")Km=Vh.tracker&&Vh.tracker.generateSubTracker({apiName:Rf});else if(["uploadFile","uploadFiles"].includes(Rf))Km=null;else{var Ag=0;Vh.Body&&(Ag=typeof Vh.Body=="string"?Vh.Body.length:Vh.Body.size||Vh.Body.byteLength||0);var ig=$m.options.UseAccelerate||typeof $m.options.Domain=="string"&&$m.options.Domain.includes("accelerate.");Km=new Ud({Beacon:$m.options.BeaconReporter,clsReporter:$m.options.ClsReporter,bucket:Vh.Bucket,region:Vh.Region,apiName:Rf,realApi:Rf,accelerate:ig,fileKey:Vh.Key,fileSize:Ag,deepTracker:$m.options.DeepTracker,customId:$m.options.CustomId,delay:$m.options.TrackerDelay})}Vh.tracker=Km;var _g=function(t_){return t_&&t_.headers&&(t_.headers["x-cos-request-id"]&&(t_.RequestId=t_.headers["x-cos-request-id"]),t_.headers["x-ci-request-id"]&&(t_.RequestId=t_.headers["x-ci-request-id"]),t_.headers["x-cos-version-id"]&&(t_.VersionId=t_.headers["x-cos-version-id"]),t_.headers["x-cos-delete-marker"]&&(t_.DeleteMarker=t_.headers["x-cos-delete-marker"])),t_},vg=function(t_,R_){Km&&Km.report(t_,R_),Sm&&Sm(_g(t_),_g(R_))},Og=function(){if(Rf!=="getService"&&Rf!=="abortUploadTask"){var t_=Xh.call($m,Rf,Vh);if(t_)return"missing param "+t_;if(Vh.Region){if($m.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(Vh.Region))return"Region format error."}else{if(Vh.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(Vh.Region))return"Region format error."}!$m.options.CompatibilityMode&&Vh.Region.indexOf("-")===-1&&Vh.Region!=="yfb"&&Vh.Region!=="default"&&Vh.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(Vh.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(Vh.Bucket))if(Vh.AppId)Vh.Bucket=Vh.Bucket+"-"+Vh.AppId;else if($m.options.AppId)Vh.Bucket=Vh.Bucket+"-"+$m.options.AppId;else return'Bucket should format as "test-1250000000".';Vh.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete Vh.AppId)}!$m.options.UseRawKey&&Vh.Key&&Vh.Key.substr(0,1)==="/"&&(Vh.Key=Vh.Key.substr(1))}},Wg=Og(),d_=["getAuth","getObjectUrl"].includes(Rf);if(typeof Promise=="function"&&!d_&&!Sm)return new Promise(function(y_,t_){if(Sm=function(v_,X_){v_?t_(v_):y_(X_)},Wg)return vg(Fh.error(new Error(Wg)));Dh.call($m,Vh,vg)});if(Wg)return vg(Fh.error(new Error(Wg)));var o_=Dh.call($m,Vh,vg);if(d_)return o_}},Zf=function(Rf,Dh){var Vh=this,Sm=0,$m=0,Km=Date.now(),Ag,ig;function _g(){if(ig=0,Dh&&typeof Dh=="function"){Ag=Date.now();var vg=Math.max(0,Math.round(($m-Sm)/((Ag-Km)/1e3)*100)/100)||0,Og;$m===0&&Rf===0?Og=1:Og=Math.floor($m/Rf*100)/100||0,Km=Ag,Sm=$m;try{Dh({loaded:$m,total:Rf,speed:vg,percent:Og})}catch{}}}return function(vg,Og){if(vg&&($m=vg.loaded,Rf=vg.total),Og)clearTimeout(ig),_g();else{if(ig)return;ig=setTimeout(_g,Vh.options.ProgressInterval)}}},th=function(Rf,Dh,Vh){var Sm;if(typeof Dh.Body=="string"?Dh.Body=new Blob([Dh.Body],{type:"text/plain"}):Dh.Body instanceof ArrayBuffer&&(Dh.Body=new Blob([Dh.Body])),Dh.Body&&(Dh.Body instanceof Blob||Dh.Body.toString()==="[object File]"||Dh.Body.toString()==="[object Blob]"))Sm=Dh.Body.size;else{Vh(Fh.error(new Error("params body format error, Only allow File|Blob|String.")));return}Dh.ContentLength=Sm,Vh(null,Sm)},$h=function(Rf){return Date.now()+(Rf||0)},wh=function(Rf,Dh){var Vh=Rf;return Rf.message=Rf.message||null,typeof Dh=="string"?(Rf.error=Dh,Rf.message=Dh):hd(Dh)==="object"&&Dh!==null&&(Sh(Rf,Dh),(Dh.code||Dh.name)&&(Rf.code=Dh.code||Dh.name),Dh.message&&(Rf.message=Dh.message),Dh.stack&&(Rf.stack=Dh.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(Rf,"name",{writable:!0,enumerable:!1}),Object.defineProperty(Rf,"message",{enumerable:!0})),Rf.name=Dh&&Dh.name||Rf.name||Rf.code||"Error",Rf.code||(Rf.code=Rf.name),Rf.error||(Rf.error=eh(Vh)),Rf},fm=function(){return(typeof globalThis>"u"?"undefined":hd(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},zh=function(){return(typeof window>"u"?"undefined":hd(window))!=="object"&&(typeof fd>"u"?"undefined":hd(fd))==="object"&&!0&&!fm()},Mm=function(Rf){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test(Rf)},Rm=function(){if((typeof navigator>"u"?"undefined":hd(navigator))!=="object")return!1;var kf=navigator.userAgent,Rf=!!kf.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return Rf}(),tg=function(){return(typeof navigator>"u"?"undefined":hd(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Fm=function(Rf,Dh){var Vh=Gd.encode(Rf);return Dh&&(Vh=Vh.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),Vh},Ym=function(Rf){return Rf?Gd.decode(Rf):""},rg=function(Rf){var Dh=Rf.split("/"),Vh=[],Sm=md(Dh),$m;try{for(Sm.s();!($m=Sm.n()).done;){var Km=$m.value;Km===".."?Vh.length&&Vh.pop():Km.length&&Km!=="."&&Vh.push(Km)}}catch(Ag){Sm.e(Ag)}finally{Sm.f()}return"/"+Vh.join("/")},Eg=function(Rf){var Dh;if(Rf&&typeof Rf=="string"){var Vh=Rf.trim(),Sm=Vh.indexOf("<")===0,$m=Vh.indexOf("{")===0;if(Sm)Dh=Fh.xml2json(Rf)||{};else if($m)try{var Km=Rf.replace(/\n/g," "),Ag=JSON.parse(Km);Object.prototype.toString.call(Ag)==="[object Object]"?Dh=Ag:Dh=Rf}catch{Dh=Rf}else Dh=Rf}else Dh=Rf||{};return Dh},Fh={noop:Sf,formatParams:Tm,apiWrapper:kh,xml2json:qd,json2xml:Wd,md5:vd,clearKey:wf,fileSlice:xh,getBodyMd5:Eh,getFileMd5:dh,b64:Jf,extend:Sh,isArray:vh,isInArray:Df,makeArray:Af,each:_h,map:Nh,filter:dm,clone:eh,attr:fh,uuid:oh,camSafeUrlEncode:Kd,throttleOnProgress:Zf,getFileSize:th,getSkewTime:$h,error:wh,obj2str:df,getAuth:mf,parseSelectPayload:Cf,getSourceParams:If,isBrowser:!0,isNode:zh,isCIHost:Mm,isIOS_QQ:Rm&&tg,encodeBase64:Fm,decodeBase64:Ym,simplifyPath:rg,readAsBinaryString:Pf,parseResBody:Eg};rd.exports=Fh}).call(this,pd("./node_modules/process/browser.js"))}})})})(cosJsSdkV5);var cosJsSdkV5Exports=cosJsSdkV5.exports;const COS=getDefaultExportFromCjs(cosJsSdkV5Exports);var cryptoJs={exports:{}},core={exports:{}};const __viteBrowserExternal={},http=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(http);var hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd()})(commonjsGlobal,function(){var rd=rd||function(sd,pd){var fd;if(typeof window<"u"&&window.crypto&&(fd=window.crypto),typeof self<"u"&&self.crypto&&(fd=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(fd=globalThis.crypto),!fd&&typeof window<"u"&&window.msCrypto&&(fd=window.msCrypto),!fd&&typeof commonjsGlobal<"u"&&commonjsGlobal.crypto&&(fd=commonjsGlobal.crypto),!fd&&typeof commonjsRequire=="function")try{fd=require$$0$1}catch{}var hd=function(){if(fd){if(typeof fd.getRandomValues=="function")try{return fd.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof fd.randomBytes=="function")try{return fd.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},md=Object.create||function(){function Ud(){}return function(qd){var Wd;return Ud.prototype=qd,Wd=new Ud,Ud.prototype=null,Wd}}(),gd={},yd=gd.lib={},vd=yd.Base=function(){return{extend:function(Ud){var qd=md(this);return Ud&&qd.mixIn(Ud),(!qd.hasOwnProperty("init")||this.init===qd.init)&&(qd.init=function(){qd.$super.init.apply(this,arguments)}),qd.init.prototype=qd,qd.$super=this,qd},create:function(){var Ud=this.extend();return Ud.init.apply(Ud,arguments),Ud},init:function(){},mixIn:function(Ud){for(var qd in Ud)Ud.hasOwnProperty(qd)&&(this[qd]=Ud[qd]);Ud.hasOwnProperty("toString")&&(this.toString=Ud.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),Nd=yd.WordArray=vd.extend({init:function(Ud,qd){Ud=this.words=Ud||[],qd!=pd?this.sigBytes=qd:this.sigBytes=Ud.length*4},toString:function(Ud){return(Ud||Ld).stringify(this)},concat:function(Ud){var qd=this.words,Wd=Ud.words,Kd=this.sigBytes,Xd=Ud.sigBytes;if(this.clamp(),Kd%4)for(var df=0;df>>2]>>>24-df%4*8&255;qd[Kd+df>>>2]|=Ef<<24-(Kd+df)%4*8}else for(var pf=0;pf>>2]=Wd[pf>>>2];return this.sigBytes+=Xd,this},clamp:function(){var Ud=this.words,qd=this.sigBytes;Ud[qd>>>2]&=4294967295<<32-qd%4*8,Ud.length=sd.ceil(qd/4)},clone:function(){var Ud=vd.clone.call(this);return Ud.words=this.words.slice(0),Ud},random:function(Ud){for(var qd=[],Wd=0;Wd>>2]>>>24-Xd%4*8&255;Kd.push((df>>>4).toString(16)),Kd.push((df&15).toString(16))}return Kd.join("")},parse:function(Ud){for(var qd=Ud.length,Wd=[],Kd=0;Kd>>3]|=parseInt(Ud.substr(Kd,2),16)<<24-Kd%8*4;return new Nd.init(Wd,qd/2)}},Fd=Md.Latin1={stringify:function(Ud){for(var qd=Ud.words,Wd=Ud.sigBytes,Kd=[],Xd=0;Xd>>2]>>>24-Xd%4*8&255;Kd.push(String.fromCharCode(df))}return Kd.join("")},parse:function(Ud){for(var qd=Ud.length,Wd=[],Kd=0;Kd>>2]|=(Ud.charCodeAt(Kd)&255)<<24-Kd%4*8;return new Nd.init(Wd,qd)}},Hd=Md.Utf8={stringify:function(Ud){try{return decodeURIComponent(escape(Fd.stringify(Ud)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(Ud){return Fd.parse(unescape(encodeURIComponent(Ud)))}},Vd=yd.BufferedBlockAlgorithm=vd.extend({reset:function(){this._data=new Nd.init,this._nDataBytes=0},_append:function(Ud){typeof Ud=="string"&&(Ud=Hd.parse(Ud)),this._data.concat(Ud),this._nDataBytes+=Ud.sigBytes},_process:function(Ud){var qd,Wd=this._data,Kd=Wd.words,Xd=Wd.sigBytes,df=this.blockSize,Ef=df*4,pf=Xd/Ef;Ud?pf=sd.ceil(pf):pf=sd.max((pf|0)-this._minBufferSize,0);var mf=pf*df,_f=sd.min(mf*4,Xd);if(mf){for(var xf=0;xf>>2]|=gd[Nd]<<24-Nd%4*8;hd.call(this,vd,yd)}else hd.apply(this,arguments)};md.prototype=fd}}(),rd.lib.WordArray})}(libTypedarrays)),libTypedarrays.exports}var encUtf16={exports:{}},hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.WordArray,hd=sd.enc;hd.Utf16=hd.Utf16BE={stringify:function(gd){for(var yd=gd.words,vd=gd.sigBytes,Nd=[],Md=0;Md>>2]>>>16-Md%4*8&65535;Nd.push(String.fromCharCode(Ld))}return Nd.join("")},parse:function(gd){for(var yd=gd.length,vd=[],Nd=0;Nd>>1]|=gd.charCodeAt(Nd)<<16-Nd%2*16;return fd.create(vd,yd*2)}},hd.Utf16LE={stringify:function(gd){for(var yd=gd.words,vd=gd.sigBytes,Nd=[],Md=0;Md>>2]>>>16-Md%4*8&65535);Nd.push(String.fromCharCode(Ld))}return Nd.join("")},parse:function(gd){for(var yd=gd.length,vd=[],Nd=0;Nd>>1]|=md(gd.charCodeAt(Nd)<<16-Nd%2*16);return fd.create(vd,yd*2)}};function md(gd){return gd<<8&4278255360|gd>>>8&16711935}}(),rd.enc.Utf16})}(encUtf16)),encUtf16.exports}var encBase64={exports:{}},hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.WordArray,hd=sd.enc;hd.Base64={stringify:function(gd){var yd=gd.words,vd=gd.sigBytes,Nd=this._map;gd.clamp();for(var Md=[],Ld=0;Ld>>2]>>>24-Ld%4*8&255,Hd=yd[Ld+1>>>2]>>>24-(Ld+1)%4*8&255,Vd=yd[Ld+2>>>2]>>>24-(Ld+2)%4*8&255,Gd=Fd<<16|Hd<<8|Vd,Ud=0;Ud<4&&Ld+Ud*.75>>6*(3-Ud)&63));var qd=Nd.charAt(64);if(qd)for(;Md.length%4;)Md.push(qd);return Md.join("")},parse:function(gd){var yd=gd.length,vd=this._map,Nd=this._reverseMap;if(!Nd){Nd=this._reverseMap=[];for(var Md=0;Md>>6-Ld%4*2,Vd=Fd|Hd;Nd[Md>>>2]|=Vd<<24-Md%4*8,Md++}return fd.create(Nd,Md)}}(),rd.enc.Base64})}(encBase64)),encBase64.exports}var encBase64url={exports:{}},hasRequiredEncBase64url;function requireEncBase64url(){return hasRequiredEncBase64url||(hasRequiredEncBase64url=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.WordArray,hd=sd.enc;hd.Base64url={stringify:function(gd,yd){yd===void 0&&(yd=!0);var vd=gd.words,Nd=gd.sigBytes,Md=yd?this._safe_map:this._map;gd.clamp();for(var Ld=[],Fd=0;Fd>>2]>>>24-Fd%4*8&255,Vd=vd[Fd+1>>>2]>>>24-(Fd+1)%4*8&255,Gd=vd[Fd+2>>>2]>>>24-(Fd+2)%4*8&255,Ud=Hd<<16|Vd<<8|Gd,qd=0;qd<4&&Fd+qd*.75>>6*(3-qd)&63));var Wd=Md.charAt(64);if(Wd)for(;Ld.length%4;)Ld.push(Wd);return Ld.join("")},parse:function(gd,yd){yd===void 0&&(yd=!0);var vd=gd.length,Nd=yd?this._safe_map:this._map,Md=this._reverseMap;if(!Md){Md=this._reverseMap=[];for(var Ld=0;Ld>>6-Ld%4*2,Vd=Fd|Hd;Nd[Md>>>2]|=Vd<<24-Md%4*8,Md++}return fd.create(Nd,Md)}}(),rd.enc.Base64url})}(encBase64url)),encBase64url.exports}var md5$1={exports:{}},hasRequiredMd5$1;function requireMd5$1(){return hasRequiredMd5$1||(hasRequiredMd5$1=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){return function(sd){var pd=rd,fd=pd.lib,hd=fd.WordArray,md=fd.Hasher,gd=pd.algo,yd=[];(function(){for(var Hd=0;Hd<64;Hd++)yd[Hd]=sd.abs(sd.sin(Hd+1))*4294967296|0})();var vd=gd.MD5=md.extend({_doReset:function(){this._hash=new hd.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(Hd,Vd){for(var Gd=0;Gd<16;Gd++){var Ud=Vd+Gd,qd=Hd[Ud];Hd[Ud]=(qd<<8|qd>>>24)&16711935|(qd<<24|qd>>>8)&4278255360}var Wd=this._hash.words,Kd=Hd[Vd+0],Xd=Hd[Vd+1],df=Hd[Vd+2],Ef=Hd[Vd+3],pf=Hd[Vd+4],mf=Hd[Vd+5],_f=Hd[Vd+6],xf=Hd[Vd+7],Cf=Hd[Vd+8],If=Hd[Vd+9],Sf=Hd[Vd+10],wf=Hd[Vd+11],Pf=Hd[Vd+12],lh=Hd[Vd+13],xh=Hd[Vd+14],Eh=Hd[Vd+15],Mh=Wd[0],dh=Wd[1],eh=Wd[2],fh=Wd[3];Mh=Nd(Mh,dh,eh,fh,Kd,7,yd[0]),fh=Nd(fh,Mh,dh,eh,Xd,12,yd[1]),eh=Nd(eh,fh,Mh,dh,df,17,yd[2]),dh=Nd(dh,eh,fh,Mh,Ef,22,yd[3]),Mh=Nd(Mh,dh,eh,fh,pf,7,yd[4]),fh=Nd(fh,Mh,dh,eh,mf,12,yd[5]),eh=Nd(eh,fh,Mh,dh,_f,17,yd[6]),dh=Nd(dh,eh,fh,Mh,xf,22,yd[7]),Mh=Nd(Mh,dh,eh,fh,Cf,7,yd[8]),fh=Nd(fh,Mh,dh,eh,If,12,yd[9]),eh=Nd(eh,fh,Mh,dh,Sf,17,yd[10]),dh=Nd(dh,eh,fh,Mh,wf,22,yd[11]),Mh=Nd(Mh,dh,eh,fh,Pf,7,yd[12]),fh=Nd(fh,Mh,dh,eh,lh,12,yd[13]),eh=Nd(eh,fh,Mh,dh,xh,17,yd[14]),dh=Nd(dh,eh,fh,Mh,Eh,22,yd[15]),Mh=Md(Mh,dh,eh,fh,Xd,5,yd[16]),fh=Md(fh,Mh,dh,eh,_f,9,yd[17]),eh=Md(eh,fh,Mh,dh,wf,14,yd[18]),dh=Md(dh,eh,fh,Mh,Kd,20,yd[19]),Mh=Md(Mh,dh,eh,fh,mf,5,yd[20]),fh=Md(fh,Mh,dh,eh,Sf,9,yd[21]),eh=Md(eh,fh,Mh,dh,Eh,14,yd[22]),dh=Md(dh,eh,fh,Mh,pf,20,yd[23]),Mh=Md(Mh,dh,eh,fh,If,5,yd[24]),fh=Md(fh,Mh,dh,eh,xh,9,yd[25]),eh=Md(eh,fh,Mh,dh,Ef,14,yd[26]),dh=Md(dh,eh,fh,Mh,Cf,20,yd[27]),Mh=Md(Mh,dh,eh,fh,lh,5,yd[28]),fh=Md(fh,Mh,dh,eh,df,9,yd[29]),eh=Md(eh,fh,Mh,dh,xf,14,yd[30]),dh=Md(dh,eh,fh,Mh,Pf,20,yd[31]),Mh=Ld(Mh,dh,eh,fh,mf,4,yd[32]),fh=Ld(fh,Mh,dh,eh,Cf,11,yd[33]),eh=Ld(eh,fh,Mh,dh,wf,16,yd[34]),dh=Ld(dh,eh,fh,Mh,xh,23,yd[35]),Mh=Ld(Mh,dh,eh,fh,Xd,4,yd[36]),fh=Ld(fh,Mh,dh,eh,pf,11,yd[37]),eh=Ld(eh,fh,Mh,dh,xf,16,yd[38]),dh=Ld(dh,eh,fh,Mh,Sf,23,yd[39]),Mh=Ld(Mh,dh,eh,fh,lh,4,yd[40]),fh=Ld(fh,Mh,dh,eh,Kd,11,yd[41]),eh=Ld(eh,fh,Mh,dh,Ef,16,yd[42]),dh=Ld(dh,eh,fh,Mh,_f,23,yd[43]),Mh=Ld(Mh,dh,eh,fh,If,4,yd[44]),fh=Ld(fh,Mh,dh,eh,Pf,11,yd[45]),eh=Ld(eh,fh,Mh,dh,Eh,16,yd[46]),dh=Ld(dh,eh,fh,Mh,df,23,yd[47]),Mh=Fd(Mh,dh,eh,fh,Kd,6,yd[48]),fh=Fd(fh,Mh,dh,eh,xf,10,yd[49]),eh=Fd(eh,fh,Mh,dh,xh,15,yd[50]),dh=Fd(dh,eh,fh,Mh,mf,21,yd[51]),Mh=Fd(Mh,dh,eh,fh,Pf,6,yd[52]),fh=Fd(fh,Mh,dh,eh,Ef,10,yd[53]),eh=Fd(eh,fh,Mh,dh,Sf,15,yd[54]),dh=Fd(dh,eh,fh,Mh,Xd,21,yd[55]),Mh=Fd(Mh,dh,eh,fh,Cf,6,yd[56]),fh=Fd(fh,Mh,dh,eh,Eh,10,yd[57]),eh=Fd(eh,fh,Mh,dh,_f,15,yd[58]),dh=Fd(dh,eh,fh,Mh,lh,21,yd[59]),Mh=Fd(Mh,dh,eh,fh,pf,6,yd[60]),fh=Fd(fh,Mh,dh,eh,wf,10,yd[61]),eh=Fd(eh,fh,Mh,dh,df,15,yd[62]),dh=Fd(dh,eh,fh,Mh,If,21,yd[63]),Wd[0]=Wd[0]+Mh|0,Wd[1]=Wd[1]+dh|0,Wd[2]=Wd[2]+eh|0,Wd[3]=Wd[3]+fh|0},_doFinalize:function(){var Hd=this._data,Vd=Hd.words,Gd=this._nDataBytes*8,Ud=Hd.sigBytes*8;Vd[Ud>>>5]|=128<<24-Ud%32;var qd=sd.floor(Gd/4294967296),Wd=Gd;Vd[(Ud+64>>>9<<4)+15]=(qd<<8|qd>>>24)&16711935|(qd<<24|qd>>>8)&4278255360,Vd[(Ud+64>>>9<<4)+14]=(Wd<<8|Wd>>>24)&16711935|(Wd<<24|Wd>>>8)&4278255360,Hd.sigBytes=(Vd.length+1)*4,this._process();for(var Kd=this._hash,Xd=Kd.words,df=0;df<4;df++){var Ef=Xd[df];Xd[df]=(Ef<<8|Ef>>>24)&16711935|(Ef<<24|Ef>>>8)&4278255360}return Kd},clone:function(){var Hd=md.clone.call(this);return Hd._hash=this._hash.clone(),Hd}});function Nd(Hd,Vd,Gd,Ud,qd,Wd,Kd){var Xd=Hd+(Vd&Gd|~Vd&Ud)+qd+Kd;return(Xd<>>32-Wd)+Vd}function Md(Hd,Vd,Gd,Ud,qd,Wd,Kd){var Xd=Hd+(Vd&Ud|Gd&~Ud)+qd+Kd;return(Xd<>>32-Wd)+Vd}function Ld(Hd,Vd,Gd,Ud,qd,Wd,Kd){var Xd=Hd+(Vd^Gd^Ud)+qd+Kd;return(Xd<>>32-Wd)+Vd}function Fd(Hd,Vd,Gd,Ud,qd,Wd,Kd){var Xd=Hd+(Gd^(Vd|~Ud))+qd+Kd;return(Xd<>>32-Wd)+Vd}pd.MD5=md._createHelper(vd),pd.HmacMD5=md._createHmacHelper(vd)}(Math),rd.MD5})}(md5$1)),md5$1.exports}var sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.WordArray,hd=pd.Hasher,md=sd.algo,gd=[],yd=md.SHA1=hd.extend({_doReset:function(){this._hash=new fd.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(vd,Nd){for(var Md=this._hash.words,Ld=Md[0],Fd=Md[1],Hd=Md[2],Vd=Md[3],Gd=Md[4],Ud=0;Ud<80;Ud++){if(Ud<16)gd[Ud]=vd[Nd+Ud]|0;else{var qd=gd[Ud-3]^gd[Ud-8]^gd[Ud-14]^gd[Ud-16];gd[Ud]=qd<<1|qd>>>31}var Wd=(Ld<<5|Ld>>>27)+Gd+gd[Ud];Ud<20?Wd+=(Fd&Hd|~Fd&Vd)+1518500249:Ud<40?Wd+=(Fd^Hd^Vd)+1859775393:Ud<60?Wd+=(Fd&Hd|Fd&Vd|Hd&Vd)-1894007588:Wd+=(Fd^Hd^Vd)-899497514,Gd=Vd,Vd=Hd,Hd=Fd<<30|Fd>>>2,Fd=Ld,Ld=Wd}Md[0]=Md[0]+Ld|0,Md[1]=Md[1]+Fd|0,Md[2]=Md[2]+Hd|0,Md[3]=Md[3]+Vd|0,Md[4]=Md[4]+Gd|0},_doFinalize:function(){var vd=this._data,Nd=vd.words,Md=this._nDataBytes*8,Ld=vd.sigBytes*8;return Nd[Ld>>>5]|=128<<24-Ld%32,Nd[(Ld+64>>>9<<4)+14]=Math.floor(Md/4294967296),Nd[(Ld+64>>>9<<4)+15]=Md,vd.sigBytes=Nd.length*4,this._process(),this._hash},clone:function(){var vd=hd.clone.call(this);return vd._hash=this._hash.clone(),vd}});sd.SHA1=hd._createHelper(yd),sd.HmacSHA1=hd._createHmacHelper(yd)}(),rd.SHA1})}(sha1)),sha1.exports}var sha256={exports:{}},hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){return function(sd){var pd=rd,fd=pd.lib,hd=fd.WordArray,md=fd.Hasher,gd=pd.algo,yd=[],vd=[];(function(){function Ld(Gd){for(var Ud=sd.sqrt(Gd),qd=2;qd<=Ud;qd++)if(!(Gd%qd))return!1;return!0}function Fd(Gd){return(Gd-(Gd|0))*4294967296|0}for(var Hd=2,Vd=0;Vd<64;)Ld(Hd)&&(Vd<8&&(yd[Vd]=Fd(sd.pow(Hd,1/2))),vd[Vd]=Fd(sd.pow(Hd,1/3)),Vd++),Hd++})();var Nd=[],Md=gd.SHA256=md.extend({_doReset:function(){this._hash=new hd.init(yd.slice(0))},_doProcessBlock:function(Ld,Fd){for(var Hd=this._hash.words,Vd=Hd[0],Gd=Hd[1],Ud=Hd[2],qd=Hd[3],Wd=Hd[4],Kd=Hd[5],Xd=Hd[6],df=Hd[7],Ef=0;Ef<64;Ef++){if(Ef<16)Nd[Ef]=Ld[Fd+Ef]|0;else{var pf=Nd[Ef-15],mf=(pf<<25|pf>>>7)^(pf<<14|pf>>>18)^pf>>>3,_f=Nd[Ef-2],xf=(_f<<15|_f>>>17)^(_f<<13|_f>>>19)^_f>>>10;Nd[Ef]=mf+Nd[Ef-7]+xf+Nd[Ef-16]}var Cf=Wd&Kd^~Wd&Xd,If=Vd&Gd^Vd&Ud^Gd&Ud,Sf=(Vd<<30|Vd>>>2)^(Vd<<19|Vd>>>13)^(Vd<<10|Vd>>>22),wf=(Wd<<26|Wd>>>6)^(Wd<<21|Wd>>>11)^(Wd<<7|Wd>>>25),Pf=df+wf+Cf+vd[Ef]+Nd[Ef],lh=Sf+If;df=Xd,Xd=Kd,Kd=Wd,Wd=qd+Pf|0,qd=Ud,Ud=Gd,Gd=Vd,Vd=Pf+lh|0}Hd[0]=Hd[0]+Vd|0,Hd[1]=Hd[1]+Gd|0,Hd[2]=Hd[2]+Ud|0,Hd[3]=Hd[3]+qd|0,Hd[4]=Hd[4]+Wd|0,Hd[5]=Hd[5]+Kd|0,Hd[6]=Hd[6]+Xd|0,Hd[7]=Hd[7]+df|0},_doFinalize:function(){var Ld=this._data,Fd=Ld.words,Hd=this._nDataBytes*8,Vd=Ld.sigBytes*8;return Fd[Vd>>>5]|=128<<24-Vd%32,Fd[(Vd+64>>>9<<4)+14]=sd.floor(Hd/4294967296),Fd[(Vd+64>>>9<<4)+15]=Hd,Ld.sigBytes=Fd.length*4,this._process(),this._hash},clone:function(){var Ld=md.clone.call(this);return Ld._hash=this._hash.clone(),Ld}});pd.SHA256=md._createHelper(Md),pd.HmacSHA256=md._createHmacHelper(Md)}(Math),rd.SHA256})}(sha256)),sha256.exports}var sha224={exports:{}},hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireSha256())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.WordArray,hd=sd.algo,md=hd.SHA256,gd=hd.SHA224=md.extend({_doReset:function(){this._hash=new fd.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var yd=md._doFinalize.call(this);return yd.sigBytes-=4,yd}});sd.SHA224=md._createHelper(gd),sd.HmacSHA224=md._createHmacHelper(gd)}(),rd.SHA224})}(sha224)),sha224.exports}var sha512={exports:{}},hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireX64Core())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.Hasher,hd=sd.x64,md=hd.Word,gd=hd.WordArray,yd=sd.algo;function vd(){return md.create.apply(md,arguments)}var Nd=[vd(1116352408,3609767458),vd(1899447441,602891725),vd(3049323471,3964484399),vd(3921009573,2173295548),vd(961987163,4081628472),vd(1508970993,3053834265),vd(2453635748,2937671579),vd(2870763221,3664609560),vd(3624381080,2734883394),vd(310598401,1164996542),vd(607225278,1323610764),vd(1426881987,3590304994),vd(1925078388,4068182383),vd(2162078206,991336113),vd(2614888103,633803317),vd(3248222580,3479774868),vd(3835390401,2666613458),vd(4022224774,944711139),vd(264347078,2341262773),vd(604807628,2007800933),vd(770255983,1495990901),vd(1249150122,1856431235),vd(1555081692,3175218132),vd(1996064986,2198950837),vd(2554220882,3999719339),vd(2821834349,766784016),vd(2952996808,2566594879),vd(3210313671,3203337956),vd(3336571891,1034457026),vd(3584528711,2466948901),vd(113926993,3758326383),vd(338241895,168717936),vd(666307205,1188179964),vd(773529912,1546045734),vd(1294757372,1522805485),vd(1396182291,2643833823),vd(1695183700,2343527390),vd(1986661051,1014477480),vd(2177026350,1206759142),vd(2456956037,344077627),vd(2730485921,1290863460),vd(2820302411,3158454273),vd(3259730800,3505952657),vd(3345764771,106217008),vd(3516065817,3606008344),vd(3600352804,1432725776),vd(4094571909,1467031594),vd(275423344,851169720),vd(430227734,3100823752),vd(506948616,1363258195),vd(659060556,3750685593),vd(883997877,3785050280),vd(958139571,3318307427),vd(1322822218,3812723403),vd(1537002063,2003034995),vd(1747873779,3602036899),vd(1955562222,1575990012),vd(2024104815,1125592928),vd(2227730452,2716904306),vd(2361852424,442776044),vd(2428436474,593698344),vd(2756734187,3733110249),vd(3204031479,2999351573),vd(3329325298,3815920427),vd(3391569614,3928383900),vd(3515267271,566280711),vd(3940187606,3454069534),vd(4118630271,4000239992),vd(116418474,1914138554),vd(174292421,2731055270),vd(289380356,3203993006),vd(460393269,320620315),vd(685471733,587496836),vd(852142971,1086792851),vd(1017036298,365543100),vd(1126000580,2618297676),vd(1288033470,3409855158),vd(1501505948,4234509866),vd(1607167915,987167468),vd(1816402316,1246189591)],Md=[];(function(){for(var Fd=0;Fd<80;Fd++)Md[Fd]=vd()})();var Ld=yd.SHA512=fd.extend({_doReset:function(){this._hash=new gd.init([new md.init(1779033703,4089235720),new md.init(3144134277,2227873595),new md.init(1013904242,4271175723),new md.init(2773480762,1595750129),new md.init(1359893119,2917565137),new md.init(2600822924,725511199),new md.init(528734635,4215389547),new md.init(1541459225,327033209)])},_doProcessBlock:function(Fd,Hd){for(var Vd=this._hash.words,Gd=Vd[0],Ud=Vd[1],qd=Vd[2],Wd=Vd[3],Kd=Vd[4],Xd=Vd[5],df=Vd[6],Ef=Vd[7],pf=Gd.high,mf=Gd.low,_f=Ud.high,xf=Ud.low,Cf=qd.high,If=qd.low,Sf=Wd.high,wf=Wd.low,Pf=Kd.high,lh=Kd.low,xh=Xd.high,Eh=Xd.low,Mh=df.high,dh=df.low,eh=Ef.high,fh=Ef.low,Sh=pf,vh=mf,Df=_f,Af=xf,_h=Cf,Nh=If,dm=Sf,Jf=wf,oh=Pf,Xh=lh,Tm=xh,kh=Eh,Zf=Mh,th=dh,$h=eh,wh=fh,fm=0;fm<80;fm++){var zh,Mm,Rm=Md[fm];if(fm<16)Mm=Rm.high=Fd[Hd+fm*2]|0,zh=Rm.low=Fd[Hd+fm*2+1]|0;else{var tg=Md[fm-15],Fm=tg.high,Ym=tg.low,rg=(Fm>>>1|Ym<<31)^(Fm>>>8|Ym<<24)^Fm>>>7,Eg=(Ym>>>1|Fm<<31)^(Ym>>>8|Fm<<24)^(Ym>>>7|Fm<<25),Fh=Md[fm-2],kf=Fh.high,Rf=Fh.low,Dh=(kf>>>19|Rf<<13)^(kf<<3|Rf>>>29)^kf>>>6,Vh=(Rf>>>19|kf<<13)^(Rf<<3|kf>>>29)^(Rf>>>6|kf<<26),Sm=Md[fm-7],$m=Sm.high,Km=Sm.low,Ag=Md[fm-16],ig=Ag.high,_g=Ag.low;zh=Eg+Km,Mm=rg+$m+(zh>>>0>>0?1:0),zh=zh+Vh,Mm=Mm+Dh+(zh>>>0>>0?1:0),zh=zh+_g,Mm=Mm+ig+(zh>>>0<_g>>>0?1:0),Rm.high=Mm,Rm.low=zh}var vg=oh&Tm^~oh&Zf,Og=Xh&kh^~Xh&th,Wg=Sh&Df^Sh&_h^Df&_h,d_=vh&Af^vh&Nh^Af&Nh,o_=(Sh>>>28|vh<<4)^(Sh<<30|vh>>>2)^(Sh<<25|vh>>>7),y_=(vh>>>28|Sh<<4)^(vh<<30|Sh>>>2)^(vh<<25|Sh>>>7),t_=(oh>>>14|Xh<<18)^(oh>>>18|Xh<<14)^(oh<<23|Xh>>>9),R_=(Xh>>>14|oh<<18)^(Xh>>>18|oh<<14)^(Xh<<23|oh>>>9),v_=Nd[fm],X_=v_.high,eb=v_.low,I_=wh+R_,$_=$h+t_+(I_>>>0>>0?1:0),I_=I_+Og,$_=$_+vg+(I_>>>0>>0?1:0),I_=I_+eb,$_=$_+X_+(I_>>>0>>0?1:0),I_=I_+zh,$_=$_+Mm+(I_>>>0>>0?1:0),$g=y_+d_,Lb=o_+Wg+($g>>>0>>0?1:0);$h=Zf,wh=th,Zf=Tm,th=kh,Tm=oh,kh=Xh,Xh=Jf+I_|0,oh=dm+$_+(Xh>>>0>>0?1:0)|0,dm=_h,Jf=Nh,_h=Df,Nh=Af,Df=Sh,Af=vh,vh=I_+$g|0,Sh=$_+Lb+(vh>>>0>>0?1:0)|0}mf=Gd.low=mf+vh,Gd.high=pf+Sh+(mf>>>0>>0?1:0),xf=Ud.low=xf+Af,Ud.high=_f+Df+(xf>>>0>>0?1:0),If=qd.low=If+Nh,qd.high=Cf+_h+(If>>>0>>0?1:0),wf=Wd.low=wf+Jf,Wd.high=Sf+dm+(wf>>>0>>0?1:0),lh=Kd.low=lh+Xh,Kd.high=Pf+oh+(lh>>>0>>0?1:0),Eh=Xd.low=Eh+kh,Xd.high=xh+Tm+(Eh>>>0>>0?1:0),dh=df.low=dh+th,df.high=Mh+Zf+(dh>>>0>>0?1:0),fh=Ef.low=fh+wh,Ef.high=eh+$h+(fh>>>0>>0?1:0)},_doFinalize:function(){var Fd=this._data,Hd=Fd.words,Vd=this._nDataBytes*8,Gd=Fd.sigBytes*8;Hd[Gd>>>5]|=128<<24-Gd%32,Hd[(Gd+128>>>10<<5)+30]=Math.floor(Vd/4294967296),Hd[(Gd+128>>>10<<5)+31]=Vd,Fd.sigBytes=Hd.length*4,this._process();var Ud=this._hash.toX32();return Ud},clone:function(){var Fd=fd.clone.call(this);return Fd._hash=this._hash.clone(),Fd},blockSize:1024/32});sd.SHA512=fd._createHelper(Ld),sd.HmacSHA512=fd._createHmacHelper(Ld)}(),rd.SHA512})}(sha512)),sha512.exports}var sha384={exports:{}},hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireX64Core(),requireSha512())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.x64,fd=pd.Word,hd=pd.WordArray,md=sd.algo,gd=md.SHA512,yd=md.SHA384=gd.extend({_doReset:function(){this._hash=new hd.init([new fd.init(3418070365,3238371032),new fd.init(1654270250,914150663),new fd.init(2438529370,812702999),new fd.init(355462360,4144912697),new fd.init(1731405415,4290775857),new fd.init(2394180231,1750603025),new fd.init(3675008525,1694076839),new fd.init(1203062813,3204075428)])},_doFinalize:function(){var vd=gd._doFinalize.call(this);return vd.sigBytes-=16,vd}});sd.SHA384=gd._createHelper(yd),sd.HmacSHA384=gd._createHmacHelper(yd)}(),rd.SHA384})}(sha384)),sha384.exports}var sha3={exports:{}},hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireX64Core())})(commonjsGlobal,function(rd){return function(sd){var pd=rd,fd=pd.lib,hd=fd.WordArray,md=fd.Hasher,gd=pd.x64,yd=gd.Word,vd=pd.algo,Nd=[],Md=[],Ld=[];(function(){for(var Vd=1,Gd=0,Ud=0;Ud<24;Ud++){Nd[Vd+5*Gd]=(Ud+1)*(Ud+2)/2%64;var qd=Gd%5,Wd=(2*Vd+3*Gd)%5;Vd=qd,Gd=Wd}for(var Vd=0;Vd<5;Vd++)for(var Gd=0;Gd<5;Gd++)Md[Vd+5*Gd]=Gd+(2*Vd+3*Gd)%5*5;for(var Kd=1,Xd=0;Xd<24;Xd++){for(var df=0,Ef=0,pf=0;pf<7;pf++){if(Kd&1){var mf=(1<>>24)&16711935|(Kd<<24|Kd>>>8)&4278255360,Xd=(Xd<<8|Xd>>>24)&16711935|(Xd<<24|Xd>>>8)&4278255360;var df=Ud[Wd];df.high^=Xd,df.low^=Kd}for(var Ef=0;Ef<24;Ef++){for(var pf=0;pf<5;pf++){for(var mf=0,_f=0,xf=0;xf<5;xf++){var df=Ud[pf+5*xf];mf^=df.high,_f^=df.low}var Cf=Fd[pf];Cf.high=mf,Cf.low=_f}for(var pf=0;pf<5;pf++)for(var If=Fd[(pf+4)%5],Sf=Fd[(pf+1)%5],wf=Sf.high,Pf=Sf.low,mf=If.high^(wf<<1|Pf>>>31),_f=If.low^(Pf<<1|wf>>>31),xf=0;xf<5;xf++){var df=Ud[pf+5*xf];df.high^=mf,df.low^=_f}for(var lh=1;lh<25;lh++){var mf,_f,df=Ud[lh],xh=df.high,Eh=df.low,Mh=Nd[lh];Mh<32?(mf=xh<>>32-Mh,_f=Eh<>>32-Mh):(mf=Eh<>>64-Mh,_f=xh<>>64-Mh);var dh=Fd[Md[lh]];dh.high=mf,dh.low=_f}var eh=Fd[0],fh=Ud[0];eh.high=fh.high,eh.low=fh.low;for(var pf=0;pf<5;pf++)for(var xf=0;xf<5;xf++){var lh=pf+5*xf,df=Ud[lh],Sh=Fd[lh],vh=Fd[(pf+1)%5+5*xf],Df=Fd[(pf+2)%5+5*xf];df.high=Sh.high^~vh.high&Df.high,df.low=Sh.low^~vh.low&Df.low}var df=Ud[0],Af=Ld[Ef];df.high^=Af.high,df.low^=Af.low}},_doFinalize:function(){var Vd=this._data,Gd=Vd.words;this._nDataBytes*8;var Ud=Vd.sigBytes*8,qd=this.blockSize*32;Gd[Ud>>>5]|=1<<24-Ud%32,Gd[(sd.ceil((Ud+1)/qd)*qd>>>5)-1]|=128,Vd.sigBytes=Gd.length*4,this._process();for(var Wd=this._state,Kd=this.cfg.outputLength/8,Xd=Kd/8,df=[],Ef=0;Ef>>24)&16711935|(mf<<24|mf>>>8)&4278255360,_f=(_f<<8|_f>>>24)&16711935|(_f<<24|_f>>>8)&4278255360,df.push(_f),df.push(mf)}return new hd.init(df,Kd)},clone:function(){for(var Vd=md.clone.call(this),Gd=Vd._state=this._state.slice(0),Ud=0;Ud<25;Ud++)Gd[Ud]=Gd[Ud].clone();return Vd}});pd.SHA3=md._createHelper(Hd),pd.HmacSHA3=md._createHmacHelper(Hd)}(Math),rd.SHA3})}(sha3)),sha3.exports}var ripemd160={exports:{}},hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){/** @preserve +`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}vd.prototype.build=function(Ld){return this.options.preserveOrder?md(Ld,this.options):(Array.isArray(Ld)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Ld={[this.options.arrayNodeName]:Ld}),this.j2x(Ld,0,[]).val)},vd.prototype.j2x=function(Ld,Ud,jd){let Gd="",Yd="";const zd=jd.join(".");for(let qd in Ld)if(Object.prototype.hasOwnProperty.call(Ld,qd))if(typeof Ld[qd]>"u")this.isAttribute(qd)&&(Yd+="");else if(Ld[qd]===null)this.isAttribute(qd)?Yd+="":qd[0]==="?"?Yd+=this.indentate(Ud)+"<"+qd+"?"+this.tagEndChar:Yd+=this.indentate(Ud)+"<"+qd+"/"+this.tagEndChar;else if(Ld[qd]instanceof Date)Yd+=this.buildTextValNode(Ld[qd],qd,"",Ud);else if(typeof Ld[qd]!="object"){const Wd=this.isAttribute(qd);if(Wd&&!this.ignoreAttributesFn(Wd,zd))Gd+=this.buildAttrPairStr(Wd,""+Ld[qd]);else if(!Wd)if(qd===this.options.textNodeName){let Xd=this.options.tagValueProcessor(qd,""+Ld[qd]);Yd+=this.replaceEntitiesValue(Xd)}else Yd+=this.buildTextValNode(Ld[qd],qd,"",Ud)}else if(Array.isArray(Ld[qd])){const Wd=Ld[qd].length;let Xd="",Jd="";for(let Zd=0;Zd"u"))if(mf===null)qd[0]==="?"?Yd+=this.indentate(Ud)+"<"+qd+"?"+this.tagEndChar:Yd+=this.indentate(Ud)+"<"+qd+"/"+this.tagEndChar;else if(typeof mf=="object")if(this.options.oneListGroup){const xf=this.j2x(mf,Ud+1,jd.concat(qd));Xd+=xf.val,this.options.attributesGroupName&&mf.hasOwnProperty(this.options.attributesGroupName)&&(Jd+=xf.attrStr)}else Xd+=this.processTextOrObjNode(mf,qd,Ud,jd);else if(this.options.oneListGroup){let xf=this.options.tagValueProcessor(qd,mf);xf=this.replaceEntitiesValue(xf),Xd+=xf}else Xd+=this.buildTextValNode(mf,qd,"",Ud)}this.options.oneListGroup&&(Xd=this.buildObjectNode(Xd,qd,Jd,Ud)),Yd+=Xd}else if(this.options.attributesGroupName&&qd===this.options.attributesGroupName){const Wd=Object.keys(Ld[qd]),Xd=Wd.length;for(let Jd=0;Jd"+Ld+Yd:this.options.commentPropName!==!1&&Ud===this.options.commentPropName&&zd.length===0?this.indentate(Gd)+``+this.newLine:this.indentate(Gd)+"<"+Ud+jd+zd+this.tagEndChar+Ld+this.indentate(Gd)+Yd}},vd.prototype.closeTag=function(Ld){let Ud="";return this.options.unpairedTags.indexOf(Ld)!==-1?this.options.suppressUnpairedNode||(Ud="/"):this.options.suppressEmptyNode?Ud="/":Ud=`>`+this.newLine;if(this.options.commentPropName!==!1&&Ud===this.options.commentPropName)return this.indentate(Gd)+``+this.newLine;if(Ud[0]==="?")return this.indentate(Gd)+"<"+Ud+jd+"?"+this.tagEndChar;{let Yd=this.options.tagValueProcessor(Ud,Ld);return Yd=this.replaceEntitiesValue(Yd),Yd===""?this.indentate(Gd)+"<"+Ud+jd+this.closeTag(Ud)+this.tagEndChar:this.indentate(Gd)+"<"+Ud+jd+">"+Yd+"0&&this.options.processEntities)for(let Ud=0;Ud0&&(Ud=hd),gd(Nd,Ld,"",Ud)}function gd(Nd,Ld,Ud,jd){let Gd="",Yd=!1;for(let zd=0;zd`,Yd=!1;continue}else if(Wd===Ld.commentPropName){Gd+=jd+``,Yd=!0;continue}else if(Wd[0]==="?"){const _f=vd(qd[":@"],Ld),vf=Wd==="?xml"?"":jd;let gf=qd[Wd][0][Ld.textNodeName];gf=gf.length!==0?" "+gf:"",Gd+=vf+`<${Wd}${gf}${_f}?>`,Yd=!0;continue}let Jd=jd;Jd!==""&&(Jd+=Ld.indentBy);const Zd=vd(qd[":@"],Ld),mf=jd+`<${Wd}${Zd}`,xf=gd(qd[Wd],Ld,Xd,Jd);Ld.unpairedTags.indexOf(Wd)!==-1?Ld.suppressUnpairedNode?Gd+=mf+">":Gd+=mf+"/>":(!xf||xf.length===0)&&Ld.suppressEmptyNode?Gd+=mf+"/>":xf&&xf.endsWith(">")?Gd+=mf+`>${xf}${jd}`:(Gd+=mf+">",xf&&jd!==""&&(xf.includes("/>")||xf.includes("`),Yd=!0}return Gd}function yd(Nd){const Ld=Object.keys(Nd);for(let Ud=0;Ud0&&Ld.processEntities)for(let Ud=0;Ud"){if(Wd?jd[Gd-1]==="-"&&jd[Gd-2]==="-"&&(Wd=!1,zd--):zd--,zd===0)break}else jd[Gd]==="["?qd=!0:Xd+=jd[Gd];if(zd!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:Yd,i:Gd}}function yd(jd,Gd){let Yd="";for(;Gd!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(gd,yd,vd){return gd}},md=function(gd){return Object.assign({},hd,gd)};dd.buildOptions=md,dd.defaultOptions=hd},"./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js":function(ud,dd,hd){const md=hd("./node_modules/fast-xml-parser/src/util.js"),gd=hd("./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js"),yd=hd("./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js"),vd=hd("./node_modules/strnum/strnum.js"),Cd=hd("./node_modules/fast-xml-parser/src/ignoreAttributes.js");class wd{constructor(gf){this.options=gf,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(Af,Df)=>String.fromCharCode(Number.parseInt(Df,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(Af,Df)=>String.fromCharCode(Number.parseInt(Df,16))}},this.addExternalEntities=Nd,this.parseXml=Yd,this.parseTextData=Ld,this.resolveNameSpace=Ud,this.buildAttributesMap=Gd,this.isItStopNode=Xd,this.replaceEntitiesValue=qd,this.readStopNodeData=xf,this.saveTextToParentTag=Wd,this.addChild=zd,this.ignoreAttributesFn=Cd(this.options.ignoreAttributes)}}function Nd(vf){const gf=Object.keys(vf);for(let Af=0;Af0)){If||(vf=this.replaceEntitiesValue(vf));const Ff=this.options.tagValueProcessor(gf,vf,Af,Of,Cf);return Ff==null?vf:typeof Ff!=typeof vf||Ff!==vf?Ff:this.options.trimValues?_f(vf,this.options.parseTagValue,this.options.numberParseOptions):vf.trim()===vf?_f(vf,this.options.parseTagValue,this.options.numberParseOptions):vf}}function Ud(vf){if(this.options.removeNSPrefix){const gf=vf.split(":"),Af=vf.charAt(0)==="/"?"/":"";if(gf[0]==="xmlns")return"";gf.length===2&&(vf=Af+gf[1])}return vf}const jd=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Gd(vf,gf,Af){if(this.options.ignoreAttributes!==!0&&typeof vf=="string"){const Df=md.getAllMatches(vf,jd),Of=Df.length,Cf={};for(let If=0;If",Cf,"Closing Tag is not closed.");let sh=vf.substring(Cf+2,Ff).trim();if(this.options.removeNSPrefix){const Mh=sh.indexOf(":");Mh!==-1&&(sh=sh.substr(Mh+1))}this.options.transformTagName&&(sh=this.options.transformTagName(sh)),Af&&(Df=this.saveTextToParentTag(Df,Af,Of));const Sh=Of.substring(Of.lastIndexOf(".")+1);if(sh&&this.options.unpairedTags.indexOf(sh)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: `);let yh=0;Sh&&this.options.unpairedTags.indexOf(Sh)!==-1?(yh=Of.lastIndexOf(".",Of.lastIndexOf(".")-1),this.tagsNodeStack.pop()):yh=Of.lastIndexOf("."),Of=Of.substring(0,yh),Af=this.tagsNodeStack.pop(),Df="",Cf=Ff}else if(vf[Cf+1]==="?"){let Ff=mf(vf,Cf,!1,"?>");if(!Ff)throw new Error("Pi Tag is not closed.");if(Df=this.saveTextToParentTag(Df,Af,Of),!(this.options.ignoreDeclaration&&Ff.tagName==="?xml"||this.options.ignorePiTags)){const sh=new gd(Ff.tagName);sh.add(this.options.textNodeName,""),Ff.tagName!==Ff.tagExp&&Ff.attrExpPresent&&(sh[":@"]=this.buildAttributesMap(Ff.tagExp,Of,Ff.tagName)),this.addChild(Af,sh,Of)}Cf=Ff.closeIndex+1}else if(vf.substr(Cf+1,3)==="!--"){const Ff=Zd(vf,"-->",Cf+4,"Comment is not closed.");if(this.options.commentPropName){const sh=vf.substring(Cf+4,Ff-2);Df=this.saveTextToParentTag(Df,Af,Of),Af.add(this.options.commentPropName,[{[this.options.textNodeName]:sh}])}Cf=Ff}else if(vf.substr(Cf+1,2)==="!D"){const Ff=yd(vf,Cf);this.docTypeEntities=Ff.entities,Cf=Ff.i}else if(vf.substr(Cf+1,2)==="!["){const Ff=Zd(vf,"]]>",Cf,"CDATA is not closed.")-2,sh=vf.substring(Cf+9,Ff);Df=this.saveTextToParentTag(Df,Af,Of);let Sh=this.parseTextData(sh,Af.tagname,Of,!0,!1,!0,!0);Sh==null&&(Sh=""),this.options.cdataPropName?Af.add(this.options.cdataPropName,[{[this.options.textNodeName]:sh}]):Af.add(this.options.textNodeName,Sh),Cf=Ff+2}else{let Ff=mf(vf,Cf,this.options.removeNSPrefix),sh=Ff.tagName;const Sh=Ff.rawTagName;let yh=Ff.tagExp,Mh=Ff.attrExpPresent,lh=Ff.closeIndex;this.options.transformTagName&&(sh=this.options.transformTagName(sh)),Af&&Df&&Af.tagname!=="!xml"&&(Df=this.saveTextToParentTag(Df,Af,Of,!1));const rh=Af;if(rh&&this.options.unpairedTags.indexOf(rh.tagname)!==-1&&(Af=this.tagsNodeStack.pop(),Of=Of.substring(0,Of.lastIndexOf("."))),sh!==gf.tagname&&(Of+=Of?"."+sh:sh),this.isItStopNode(this.options.stopNodes,Of,sh)){let mh="";if(yh.length>0&&yh.lastIndexOf("/")===yh.length-1)sh[sh.length-1]==="/"?(sh=sh.substr(0,sh.length-1),Of=Of.substr(0,Of.length-1),yh=sh):yh=yh.substr(0,yh.length-1),Cf=Ff.closeIndex;else if(this.options.unpairedTags.indexOf(sh)!==-1)Cf=Ff.closeIndex;else{const Eh=this.readStopNodeData(vf,Sh,lh+1);if(!Eh)throw new Error(`Unexpected end of ${Sh}`);Cf=Eh.i,mh=Eh.tagContent}const xh=new gd(sh);sh!==yh&&Mh&&(xh[":@"]=this.buildAttributesMap(yh,Of,sh)),mh&&(mh=this.parseTextData(mh,sh,Of,!0,Mh,!0,!0)),Of=Of.substr(0,Of.lastIndexOf(".")),xh.add(this.options.textNodeName,mh),this.addChild(Af,xh,Of)}else{if(yh.length>0&&yh.lastIndexOf("/")===yh.length-1){sh[sh.length-1]==="/"?(sh=sh.substr(0,sh.length-1),Of=Of.substr(0,Of.length-1),yh=sh):yh=yh.substr(0,yh.length-1),this.options.transformTagName&&(sh=this.options.transformTagName(sh));const mh=new gd(sh);sh!==yh&&Mh&&(mh[":@"]=this.buildAttributesMap(yh,Of,sh)),this.addChild(Af,mh,Of),Of=Of.substr(0,Of.lastIndexOf("."))}else{const mh=new gd(sh);this.tagsNodeStack.push(Af),sh!==yh&&Mh&&(mh[":@"]=this.buildAttributesMap(yh,Of,sh)),this.addChild(Af,mh,Of),Af=mh}Df="",Cf=lh}}else Df+=vf[Cf];return gf.child};function zd(vf,gf,Af){const Df=this.options.updateTag(gf.tagname,Af,gf[":@"]);Df===!1||(typeof Df=="string"&&(gf.tagname=Df),vf.addChild(gf))}const qd=function(vf){if(this.options.processEntities){for(let gf in this.docTypeEntities){const Af=this.docTypeEntities[gf];vf=vf.replace(Af.regx,Af.val)}for(let gf in this.lastEntities){const Af=this.lastEntities[gf];vf=vf.replace(Af.regex,Af.val)}if(this.options.htmlEntities)for(let gf in this.htmlEntities){const Af=this.htmlEntities[gf];vf=vf.replace(Af.regex,Af.val)}vf=vf.replace(this.ampEntity.regex,this.ampEntity.val)}return vf};function Wd(vf,gf,Af,Df){return vf&&(Df===void 0&&(Df=Object.keys(gf.child).length===0),vf=this.parseTextData(vf,gf.tagname,Af,!1,gf[":@"]?Object.keys(gf[":@"]).length!==0:!1,Df),vf!==void 0&&vf!==""&&gf.add(this.options.textNodeName,vf),vf=""),vf}function Xd(vf,gf,Af){const Df="*."+Af;for(const Of in vf){const Cf=vf[Of];if(Df===Cf||gf===Cf)return!0}return!1}function Jd(vf,gf,Af=">"){let Df,Of="";for(let Cf=gf;Cf",Af,`${gf} is not closed`);if(vf.substring(Af+2,Cf).trim()===gf&&(Of--,Of===0))return{tagContent:vf.substring(Df,Af),i:Cf};Af=Cf}else if(vf[Af+1]==="?")Af=Zd(vf,"?>",Af+1,"StopNode is not closed.");else if(vf.substr(Af+1,3)==="!--")Af=Zd(vf,"-->",Af+3,"StopNode is not closed.");else if(vf.substr(Af+1,2)==="![")Af=Zd(vf,"]]>",Af,"StopNode is not closed.")-2;else{const Cf=mf(vf,Af,">");Cf&&((Cf&&Cf.tagName)===gf&&Cf.tagExp[Cf.tagExp.length-1]!=="/"&&Of++,Af=Cf.closeIndex)}}function _f(vf,gf,Af){if(gf&&typeof vf=="string"){const Df=vf.trim();return Df==="true"?!0:Df==="false"?!1:vd(vf,Af)}else return md.isExist(vf)?vf:""}ud.exports=wd},"./node_modules/fast-xml-parser/src/xmlparser/XMLParser.js":function(ud,dd,hd){const{buildOptions:md}=hd("./node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js"),gd=hd("./node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js"),{prettify:yd}=hd("./node_modules/fast-xml-parser/src/xmlparser/node2json.js"),vd=hd("./node_modules/fast-xml-parser/src/validator.js");class Cd{constructor(Nd){this.externalEntities={},this.options=md(Nd)}parse(Nd,Ld){if(typeof Nd!="string")if(Nd.toString)Nd=Nd.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(Ld){Ld===!0&&(Ld={});const Gd=vd.validate(Nd,Ld);if(Gd!==!0)throw Error(`${Gd.err.msg}:${Gd.err.line}:${Gd.err.col}`)}const Ud=new gd(this.options);Ud.addExternalEntities(this.externalEntities);const jd=Ud.parseXml(Nd);return this.options.preserveOrder||jd===void 0?jd:yd(jd,this.options)}addEntity(Nd,Ld){if(Ld.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(Nd.indexOf("&")!==-1||Nd.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for ' '");if(Ld==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[Nd]=Ld}}ud.exports=Cd},"./node_modules/fast-xml-parser/src/xmlparser/node2json.js":function(ud,dd,hd){function md(wd,Nd){return gd(wd,Nd)}function gd(wd,Nd,Ld){let Ud;const jd={};for(let Gd=0;Gd0&&(jd[Nd.textNodeName]=Ud):Ud!==void 0&&(jd[Nd.textNodeName]=Ud),jd}function yd(wd){const Nd=Object.keys(wd);for(let Ld=0;Ld0?this.child.push({[yd.tagname]:yd.child,":@":yd[":@"]}):this.child.push({[yd.tagname]:yd.child})}}ud.exports=md},"./node_modules/process/browser.js":function(ud,dd){var hd=ud.exports={},md,gd;function yd(){throw new Error("setTimeout has not been defined")}function vd(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?md=setTimeout:md=yd}catch{md=yd}try{typeof clearTimeout=="function"?gd=clearTimeout:gd=vd}catch{gd=vd}})();function Cd(Wd){if(md===setTimeout)return setTimeout(Wd,0);if((md===yd||!md)&&setTimeout)return md=setTimeout,setTimeout(Wd,0);try{return md(Wd,0)}catch{try{return md.call(null,Wd,0)}catch{return md.call(this,Wd,0)}}}function wd(Wd){if(gd===clearTimeout)return clearTimeout(Wd);if((gd===vd||!gd)&&clearTimeout)return gd=clearTimeout,clearTimeout(Wd);try{return gd(Wd)}catch{try{return gd.call(null,Wd)}catch{return gd.call(this,Wd)}}}var Nd=[],Ld=!1,Ud,jd=-1;function Gd(){!Ld||!Ud||(Ld=!1,Ud.length?Nd=Ud.concat(Nd):jd=-1,Nd.length&&Yd())}function Yd(){if(!Ld){var Wd=Cd(Gd);Ld=!0;for(var Xd=Nd.length;Xd;){for(Ud=Nd,Nd=[];++jd1)for(var Jd=1;Jd0&&Ud&&Nd[2]!==".")return Cd;if(!wd.leadingZeros&&jd.length>0&&!Ud&&Nd[1]!==".")return Cd;{const zd=Number(Nd),qd=""+zd;return qd.search(/[eE]/)!==-1||Yd?wd.eNotation?zd:Cd:Nd.indexOf(".")!==-1?qd==="0"&&Gd===""||qd===Gd||Ud&&qd==="-"+Gd?zd:Cd:jd?Gd===qd||Ud+Gd===qd?zd:Cd:Nd===qd||Nd===Ud+qd?zd:Cd}}else return Cd}}function vd(Cd){return Cd&&Cd.indexOf(".")!==-1&&(Cd=Cd.replace(/0+$/,""),Cd==="."?Cd="0":Cd[0]==="."?Cd="0"+Cd:Cd[Cd.length-1]==="."&&(Cd=Cd.substr(0,Cd.length-1))),Cd}ud.exports=yd},"./node_modules/webpack/buildin/amd-options.js":function(ud,dd){(function(hd){ud.exports=hd}).call(this,{})},"./node_modules/webpack/buildin/module.js":function(ud,dd){ud.exports=function(hd){return hd.webpackPolyfill||(hd.deprecate=function(){},hd.paths=[],hd.children||(hd.children=[]),Object.defineProperty(hd,"loaded",{enumerable:!0,get:function(){return hd.l}}),Object.defineProperty(hd,"id",{enumerable:!0,get:function(){return hd.i}}),hd.webpackPolyfill=1),hd}},"./package.json":function(ud){ud.exports=JSON.parse('{"name":"cos-js-sdk-v5","version":"1.8.7","description":"JavaScript SDK for [腾讯云对象存储](https://cloud.tencent.com/product/cos)","main":"dist/cos-js-sdk-v5.js","types":"index.d.ts","scripts":{"prettier":"prettier --write src demo/demo.js demo/CIDemos/*.js test/test.js server/sts.js lib/request.js index.d.ts","server":"node server/sts.js","dev":"cross-env NODE_ENV=development webpack -w --mode=development","build":"cross-env NODE_ENV=production webpack --mode=production","cos-auth.min.js":"uglifyjs ./demo/common/cos-auth.js -o ./demo/common/cos-auth.min.js -c -m","test":"jest --runInBand --coverage"},"repository":{"type":"git","url":"git+https://github.com/tencentyun/cos-js-sdk-v5.git"},"keywords":[],"author":"carsonxu","license":"ISC","bugs":{"url":"https://github.com/tencentyun/cos-js-sdk-v5/issues"},"homepage":"https://github.com/tencentyun/cos-js-sdk-v5#readme","dependencies":{"fast-xml-parser":"4.5.0"},"devDependencies":{"@babel/core":"7.17.9","@babel/plugin-transform-runtime":"7.18.10","@babel/preset-env":"7.16.11","babel-loader":"8.2.5","body-parser":"^1.18.3","cross-env":"^5.2.0","express":"^4.16.4","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","prettier":"^3.0.1","qcloud-cos-sts":"^3.0.2","request":"^2.87.0","terser-webpack-plugin":"4.2.3","uglifyjs":"^2.4.11","webpack":"4.46.0","webpack-cli":"4.10.0"}}')},"./src/advance.js":function(ud,dd,hd){var md=hd("./node_modules/@babel/runtime/helpers/typeof.js"),gd=hd("./src/session.js"),yd=hd("./src/async.js"),vd=hd("./src/event.js").EventProxy,Cd=hd("./src/util.js"),wd=hd("./src/tracker.js");function Nd(_f,vf){var gf=this,Af=new vd,Df=_f.TaskId,Of=_f.Bucket,Cf=_f.Region,If=_f.Key,Ff=_f.Body,sh=_f.ChunkSize||_f.SliceSize||gf.options.ChunkSize,Sh=_f.AsyncLimit,yh=_f.StorageClass,Mh=_f.ServerSideEncryption,lh,rh,mh=_f.onHashProgress,xh=_f.tracker;xh&&xh.setParams({chunkSize:sh}),Af.on("error",function(Eh){if(gf._isRunningTask(Df))return _f.UploadData.UploadId&&gd.removeUsing(_f.UploadData.UploadId),Eh.UploadId=_f.UploadData.UploadId||"",vf(Eh)}),Af.on("upload_complete",function(Eh){var kf=Cd.extend({UploadId:_f.UploadData.UploadId||""},Eh);vf(null,kf)}),Af.on("upload_slice_complete",function(Eh){var kf={};Cd.each(_f.Headers,function(Rf,_h){var Ph=_h.toLowerCase();(Ph.indexOf("x-cos-meta-")===0||["pic-operations","x-cos-callback","x-cos-callback-var","x-cos-return-body"].includes(Ph))&&(kf[_h]=Rf)}),zd.call(gf,{Bucket:Of,Region:Cf,Key:If,UploadId:Eh.UploadId,SliceList:Eh.SliceList,Headers:kf,tracker:xh},function(Rf,_h){if(gf._isRunningTask(Df)){if(gd.removeUsing(Eh.UploadId),Rf)return rh(null,!0),Af.emit("error",Rf);gd.removeUploadId.call(gf,Eh.UploadId),rh({loaded:lh,total:lh},!0),Af.emit("upload_complete",_h)}})}),Af.on("get_upload_data_finish",function(Eh){var kf=gd.getFileId(Ff,_f.ChunkSize,Of,If);kf&&gd.saveUploadId.call(gf,kf,Eh.UploadId,gf.options.UploadIdCacheLimit),gd.setUsing(Eh.UploadId),rh(null,!0),Gd.call(gf,{TaskId:Df,Bucket:Of,Region:Cf,Key:If,Body:Ff,FileSize:lh,SliceSize:sh,AsyncLimit:Sh,ServerSideEncryption:Mh,UploadData:Eh,Headers:_f.Headers,onProgress:rh,tracker:xh},function(Rf,_h){if(gf._isRunningTask(Df)){if(Rf)return rh(null,!0),Af.emit("error",Rf);Af.emit("upload_slice_complete",_h)}})}),Af.on("get_file_size_finish",function(){if(rh=Cd.throttleOnProgress.call(gf,lh,_f.onProgress),_f.UploadData.UploadId)Af.emit("get_upload_data_finish",_f.UploadData);else{var Eh=Cd.extend({TaskId:Df,Bucket:Of,Region:Cf,Key:If,Headers:_f.Headers,StorageClass:yh,Body:Ff,FileSize:lh,SliceSize:sh,onHashProgress:mh,tracker:xh},_f);Ld.call(gf,Eh,function(kf,Rf){if(gf._isRunningTask(Df)){if(kf)return Af.emit("error",kf);_f.UploadData.UploadId=Rf.UploadId,_f.UploadData.PartList=Rf.PartList,Af.emit("get_upload_data_finish",_f.UploadData)}})}}),lh=_f.ContentLength,delete _f.ContentLength,!_f.Headers&&(_f.Headers={}),Cd.each(_f.Headers,function(Eh,kf){kf.toLowerCase()==="content-length"&&delete _f.Headers[kf]}),function(){for(var Eh=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],kf=1024*1024,Rf=0;Rfyh)return Rf(null,!1);if(_h>1){var Ph=Math.max(kf[0].Size,kf[1].Size);if(Ph!==Sh)return Rf(null,!1)}var sm=function th(oh){if(oh<_h){var Zh=kf[oh];rh(Zh.PartNumber,function(Sm,$h){$h&&$h.ETag===Zh.ETag&&$h.Size===Zh.Size?th(oh+1):Rf(null,!1)})}else Rf(null,!0)};sm(0)},xh=new vd;xh.on("error",function(Eh){if(If._isRunningTask(gf))return vf(Eh)}),xh.on("upload_id_available",function(Eh){var kf={},Rf=[];Cd.each(Eh.PartList,function(sm){kf[sm.PartNumber]=sm});for(var _h=1;_h<=yh;_h++){var Ph=kf[_h];Ph?(Ph.PartNumber=_h,Ph.Uploaded=!0):Ph={PartNumber:_h,ETag:null,Uploaded:!1},Rf.push(Ph)}Eh.PartList=Rf,vf(null,Eh)}),xh.on("no_available_upload_id",function(){if(If._isRunningTask(gf)){var Eh=Cd.extend({Bucket:Af,Region:Df,Key:Of,Query:Cd.clone(_f.Query),StorageClass:Cf,Body:_f.Body,calledBySdk:"sliceUploadFile",tracker:_f.tracker},_f),kf=Cd.clone(_f.Headers);delete kf["x-cos-mime-limit"],Eh.Headers=kf,If.multipartInit(Eh,function(Rf,_h){if(If._isRunningTask(gf)){if(Rf)return xh.emit("error",Rf);var Ph=_h.UploadId;if(!Ph)return vf(Cd.error(new Error("no such upload id")));xh.emit("upload_id_available",{UploadId:Ph,PartList:[]})}})}}),xh.on("has_and_check_upload_id",function(Eh){Eh=Eh.reverse(),yd.eachLimit(Eh,1,function(kf,Rf){if(If._isRunningTask(gf)){if(gd.using[kf]){Rf();return}jd.call(If,{Bucket:Af,Region:Df,Key:Of,UploadId:kf,tracker:_f.tracker},function(_h,Ph){if(If._isRunningTask(gf)){if(_h)return gd.removeUsing(kf),xh.emit("error",_h);var sm=Ph.PartList;sm.forEach(function(th){th.PartNumber*=1,th.Size*=1,th.ETag=th.ETag||""}),mh(sm,function(th,oh){if(If._isRunningTask(gf)){if(th)return xh.emit("error",th);oh?Rf({UploadId:kf,PartList:sm}):Rf()}})}})}},function(kf){If._isRunningTask(gf)&&(lh(null,!0),kf&&kf.UploadId?xh.emit("upload_id_available",kf):xh.emit("no_available_upload_id"))})}),xh.on("seek_local_avail_upload_id",function(Eh){var kf=gd.getFileId(_f.Body,_f.ChunkSize,Af,Of),Rf=gd.getUploadIdList.call(If,kf);if(!kf||!Rf){xh.emit("has_and_check_upload_id",Eh);return}var _h=function Ph(sm){if(sm>=Rf.length){xh.emit("has_and_check_upload_id",Eh);return}var th=Rf[sm];if(!Cd.isInArray(Eh,th)){gd.removeUploadId.call(If,th),Ph(sm+1);return}if(gd.using[th]){Ph(sm+1);return}jd.call(If,{Bucket:Af,Region:Df,Key:Of,UploadId:th,tracker:_f.tracker},function(oh,Zh){If._isRunningTask(gf)&&(oh?(gd.removeUploadId.call(If,th),Ph(sm+1)):xh.emit("upload_id_available",{UploadId:th,PartList:Zh.PartList}))})};_h(0)}),xh.on("get_remote_upload_id_list",function(){Ud.call(If,{Bucket:Af,Region:Df,Key:Of,tracker:_f.tracker},function(Eh,kf){if(If._isRunningTask(gf)){if(Eh)return xh.emit("error",Eh);var Rf=Cd.filter(kf.UploadList,function(sm){return sm.Key===Of&&(!Cf||sm.StorageClass.toUpperCase()===Cf.toUpperCase())}).reverse().map(function(sm){return sm.UploadId||sm.UploadID});if(Rf.length)xh.emit("seek_local_avail_upload_id",Rf);else{var _h=gd.getFileId(_f.Body,_f.ChunkSize,Af,Of),Ph;_h&&(Ph=gd.getUploadIdList.call(If,_h))&&Cd.each(Ph,function(sm){gd.removeUploadId.call(If,sm)}),xh.emit("no_available_upload_id")}}})}),xh.emit("get_remote_upload_id_list")}function Ud(_f,vf){var gf=this,Af=[],Df={Bucket:_f.Bucket,Region:_f.Region,Prefix:_f.Key,calledBySdk:_f.calledBySdk||"sliceUploadFile",tracker:_f.tracker},Of=function Cf(){gf.multipartList(Df,function(If,Ff){if(If)return vf(If);Af.push.apply(Af,Ff.Upload||[]),Ff.IsTruncated==="true"?(Df.KeyMarker=Ff.NextKeyMarker,Df.UploadIdMarker=Ff.NextUploadIdMarker,Cf()):vf(null,{UploadList:Af})})};Of()}function jd(_f,vf){var gf=this,Af=[],Df={Bucket:_f.Bucket,Region:_f.Region,Key:_f.Key,UploadId:_f.UploadId,calledBySdk:"sliceUploadFile",tracker:_f.tracker},Of=function Cf(){gf.multipartListPart(Df,function(If,Ff){if(If)return vf(If);Af.push.apply(Af,Ff.Part||[]),Ff.IsTruncated==="true"?(Df.PartNumberMarker=Ff.NextPartNumberMarker,Cf()):vf(null,{PartList:Af})})};Of()}function Gd(_f,vf){var gf=this,Af=_f.TaskId,Df=_f.Bucket,Of=_f.Region,Cf=_f.Key,If=_f.UploadData,Ff=_f.FileSize,sh=_f.SliceSize,Sh=Math.min(_f.AsyncLimit||gf.options.ChunkParallelLimit||1,256),yh=_f.Body,Mh=Math.ceil(Ff/sh),lh=0,rh=_f.ServerSideEncryption,mh=_f.Headers,xh=Cd.filter(If.PartList,function(kf){return kf.Uploaded&&(lh+=kf.PartNumber>=Mh&&Ff%sh||sh),!kf.Uploaded}),Eh=_f.onProgress;yd.eachLimit(xh,Sh,function(kf,Rf){if(gf._isRunningTask(Af)){var _h=kf.PartNumber,Ph=Math.min(Ff,kf.PartNumber*sh)-(kf.PartNumber-1)*sh,sm=0;Yd.call(gf,{TaskId:Af,Bucket:Df,Region:Of,Key:Cf,SliceSize:sh,FileSize:Ff,PartNumber:_h,ServerSideEncryption:rh,Body:yh,UploadData:If,Headers:mh,onProgress:function(oh){lh+=oh.loaded-sm,sm=oh.loaded,Eh({loaded:lh,total:Ff})},tracker:_f.tracker},function(th,oh){gf._isRunningTask(Af)&&(!th&&!oh.ETag&&(th='get ETag error, please add "ETag" to CORS ExposeHeader setting.( 获取ETag失败,请在CORS ExposeHeader设置中添加ETag,请参考文档:https://cloud.tencent.com/document/product/436/13318 )'),th?lh-=sm:(lh+=Ph-sm,kf.ETag=oh.ETag),Eh({loaded:lh,total:Ff}),Rf(th||null,oh))})}},function(kf){if(gf._isRunningTask(Af)){if(kf)return vf(kf);vf(null,{UploadId:If.UploadId,SliceList:If.PartList})}})}function Yd(_f,vf){var gf=this,Af=_f.TaskId,Df=_f.Bucket,Of=_f.Region,Cf=_f.Key,If=_f.FileSize,Ff=_f.Body,sh=_f.PartNumber*1,Sh=_f.SliceSize,yh=_f.ServerSideEncryption,Mh=_f.UploadData,lh=_f.Headers||{},rh=gf.options.ChunkRetryTimes+1,mh=Sh*(sh-1),xh=Sh,Eh=mh+Sh;Eh>If&&(Eh=If,xh=Eh-mh);var kf=["x-cos-traffic-limit","x-cos-mime-limit"],Rf={};Cd.each(lh,function(Ph,sm){kf.indexOf(sm)>-1&&(Rf[sm]=Ph)});var _h=Mh.PartList[sh-1];yd.retry(rh,function(Ph){gf._isRunningTask(Af)&&Cd.fileSlice(Ff,mh,Eh,!0,function(sm){gf.multipartUpload({TaskId:Af,Bucket:Df,Region:Of,Key:Cf,ContentLength:xh,PartNumber:sh,UploadId:Mh.UploadId,ServerSideEncryption:yh,Body:sm,Headers:Rf,onProgress:_f.onProgress,calledBySdk:"sliceUploadFile",tracker:_f.tracker},function(th,oh){if(gf._isRunningTask(Af))return th?Ph(th):(_h.Uploaded=!0,Ph(null,oh))})})},function(Ph,sm){if(gf._isRunningTask(Af))return vf(Ph,sm)})}function zd(_f,vf){var gf=_f.Bucket,Af=_f.Region,Df=_f.Key,Of=_f.UploadId,Cf=_f.SliceList,If=this,Ff=this.options.ChunkRetryTimes+1,sh=_f.Headers,Sh=Cf.map(function(yh){return{PartNumber:yh.PartNumber,ETag:yh.ETag}});yd.retry(Ff,function(yh){If.multipartComplete({Bucket:gf,Region:Af,Key:Df,UploadId:Of,Parts:Sh,Headers:sh,calledBySdk:"sliceUploadFile",tracker:_f.tracker},yh)},function(yh,Mh){vf(yh,Mh)})}function qd(_f,vf){var gf=_f.Bucket,Af=_f.Region,Df=_f.Key,Of=_f.UploadId,Cf=_f.Level||"task",If=_f.AsyncLimit,Ff=this,sh=new vd;if(sh.on("error",function(Sh){return vf(Sh)}),sh.on("get_abort_array",function(Sh){Wd.call(Ff,{Bucket:gf,Region:Af,Key:Df,Headers:_f.Headers,AsyncLimit:If,AbortArray:Sh},vf)}),Cf==="bucket")Ud.call(Ff,{Bucket:gf,Region:Af,calledBySdk:"abortUploadTask"},function(Sh,yh){if(Sh)return vf(Sh);sh.emit("get_abort_array",yh.UploadList||[])});else if(Cf==="file"){if(!Df)return vf(Cd.error(new Error("abort_upload_task_no_key")));Ud.call(Ff,{Bucket:gf,Region:Af,Key:Df,calledBySdk:"abortUploadTask"},function(Sh,yh){if(Sh)return vf(Sh);sh.emit("get_abort_array",yh.UploadList||[])})}else if(Cf==="task"){if(!Of)return vf(Cd.error(new Error("abort_upload_task_no_id")));if(!Df)return vf(Cd.error(new Error("abort_upload_task_no_key")));sh.emit("get_abort_array",[{Key:Df,UploadId:Of}])}else return vf(Cd.error(new Error("abort_unknown_level")))}function Wd(_f,vf){var gf=_f.Bucket,Af=_f.Region,Df=_f.Key,Of=_f.AbortArray,Cf=_f.AsyncLimit||1,If=this,Ff=0,sh=new Array(Of.length);yd.eachLimit(Of,Cf,function(Sh,yh){var Mh=Ff;if(Df&&Df!==Sh.Key){sh[Mh]={error:{KeyNotMatch:!0}},yh(null);return}var lh=Sh.UploadId||Sh.UploadID;If.multipartAbort({Bucket:gf,Region:Af,Key:Sh.Key,Headers:_f.Headers,UploadId:lh},function(rh){var mh={Bucket:gf,Region:Af,Key:Sh.Key,UploadId:lh};sh[Mh]={error:rh,task:mh},yh(null)}),Ff++},function(Sh){if(Sh)return vf(Sh);for(var yh=[],Mh=[],lh=0,rh=sh.length;lhAf?"sliceUploadFile":"putObject";_f.tracker=new wd({Beacon:gf.options.BeaconReporter,clsReporter:gf.options.ClsReporter,bucket:_f.Bucket,region:_f.Region,apiName:"uploadFile",realApi:sh,fileKey:_f.Key,fileSize:Cf,accelerate:Ff,deepTracker:gf.options.DeepTracker,customId:gf.options.CustomId,delay:gf.options.TrackerDelay})}Cd.each(_f,function(mh,xh){md(mh)!=="object"&&typeof mh!="function"&&(If[xh]=mh)});var Sh=_f.onTaskReady,yh=function(xh){If.TaskId=xh,Sh&&Sh(xh)};_f.onTaskReady=yh;var Mh=Cf>Af?"sliceUploadFile":"putObject",lh=_f.onFileFinish,rh=function(xh,Eh){_f.tracker&&_f.tracker.report(xh,Eh),lh&&lh(xh,Eh,If),vf&&vf(xh,Eh)};Df.push({api:Mh,params:_f,callback:rh}),gf._addTasks(Df)}function Jd(_f,vf){var gf=this,Af=_f.SliceSize===void 0?gf.options.SliceSize:_f.SliceSize,Df=0,Of=0,Cf=Cd.throttleOnProgress.call(gf,Of,_f.onProgress),If=_f.files.length,Ff=_f.onFileFinish,sh=Array(If),Sh=function(lh,rh,mh){Cf(null,!0),Ff&&Ff(lh,rh,mh),sh[mh.Index]={options:mh,error:lh,data:rh},--If<=0&&vf&&vf(null,{files:sh})},yh=[];Cd.each(_f.files,function(Mh,lh){(function(){var rh=Mh.Body,mh=rh.size||rh.length||0,xh={Index:lh,TaskId:""};if(!gf.options.UseRawKey&&Mh.Key&&Mh.Key.substr(0,1)==="/"&&(Mh.Key=Mh.Key.substr(1)),Df+=mh,gf.options.EnableReporter){var Eh=gf.options.UseAccelerate||typeof gf.options.Domain=="string"&&gf.options.Domain.includes("accelerate."),kf=mh>Af?"sliceUploadFile":"putObject";Mh.tracker=new wd({Beacon:gf.options.BeaconReporter,clsReporter:gf.options.ClsReporter,bucket:Mh.Bucket,region:Mh.Region,apiName:"uploadFiles",realApi:kf,fileKey:Mh.Key,fileSize:mh,accelerate:Eh,deepTracker:gf.options.DeepTracker,customId:gf.options.CustomId,delay:gf.options.TrackerDelay})}Cd.each(Mh,function($h,Vf){md($h)!=="object"&&typeof $h!="function"&&(xh[Vf]=$h)});var Rf=Mh.onTaskReady,_h=function(Vf){xh.TaskId=Vf,Rf&&Rf(Vf)};Mh.onTaskReady=_h;var Ph=0,sm=Mh.onProgress,th=function(Vf){Of=Of-Ph+Vf.loaded,Ph=Vf.loaded,sm&&sm(Vf),Cf({loaded:Of,total:Df})};Mh.onProgress=th;var oh=mh>Af?"sliceUploadFile":"putObject",Zh=Mh.onFileFinish,Sm=function(Vf,nh){Mh.tracker&&Mh.tracker.report(Vf,nh),Zh&&Zh(Vf,nh),Sh&&Sh(Vf,nh,xh)};yh.push({api:oh,params:Mh,callback:Sm})})()}),gf._addTasks(yh)}function Zd(_f,vf){var gf=new vd,Af=this,Df=_f.Bucket,Of=_f.Region,Cf=_f.Key,If=_f.CopySource,Ff=Cd.getSourceParams.call(this,If);if(!Ff){vf(Cd.error(new Error("CopySource format error")));return}var sh=Ff.Bucket,Sh=Ff.Region,yh=decodeURIComponent(Ff.Key),Mh=_f.CopySliceSize===void 0?Af.options.CopySliceSize:_f.CopySliceSize;Mh=Math.max(0,Mh);var lh=_f.CopyChunkSize||this.options.CopyChunkSize,rh=this.options.CopyChunkParallelLimit,mh=this.options.ChunkRetryTimes+1,xh=0,Eh=0,kf,Rf,_h={},Ph={},sm={};gf.on("copy_slice_complete",function(th){Cd.each(_f.Headers,function(Zh,Sm){Sm.toLowerCase().indexOf("x-cos-meta-")});var oh=Cd.map(th.PartList,function(Zh){return{PartNumber:Zh.PartNumber,ETag:Zh.ETag}});yd.retry(mh,function(Zh){Af.multipartComplete({Bucket:Df,Region:Of,Key:Cf,UploadId:th.UploadId,Parts:oh,tracker:_f.tracker,calledBySdk:"sliceCopyFile"},Zh)},function(Zh,Sm){if(gd.removeUsing(th.UploadId),Zh)return Rf(null,!0),vf(Zh);gd.removeUploadId(th.UploadId),Rf({loaded:kf,total:kf},!0),vf(null,Sm)})}),gf.on("get_copy_data_finish",function(th){var oh=gd.getCopyFileId(If,_h,lh,Df,Cf);oh&&gd.saveUploadId(oh,th.UploadId,Af.options.UploadIdCacheLimit),gd.setUsing(th.UploadId);var Zh=Cd.filter(th.PartList,function(Sm){return Sm.Uploaded&&(Eh+=Sm.PartNumber>=xh&&kf%lh||lh),!Sm.Uploaded});yd.eachLimit(Zh,rh,function(Sm,$h){var Vf=Sm.PartNumber,nh=Sm.CopySourceRange,Lh=Sm.end-Sm.start;yd.retry(mh,function(Ih){mf.call(Af,{Bucket:Df,Region:Of,Key:Cf,CopySource:If,UploadId:th.UploadId,PartNumber:Vf,CopySourceRange:nh,tracker:_f.tracker,calledBySdk:"sliceCopyFile"},Ih)},function(Ih,om){if(Ih)return $h(Ih);Eh+=Lh,Rf({loaded:Eh,total:kf}),Sm.ETag=om.ETag,$h(Ih||null,om)})},function(Sm){if(Sm)return gd.removeUsing(th.UploadId),Rf(null,!0),vf(Sm);gf.emit("copy_slice_complete",th)})}),gf.on("get_chunk_size_finish",function(){var th=function(){Af.multipartInit({Bucket:Df,Region:Of,Key:Cf,Headers:sm,tracker:_f.tracker,calledBySdk:"sliceCopyFile"},function(Vf,nh){if(Vf)return vf(Vf);_f.UploadId=nh.UploadId,gf.emit("get_copy_data_finish",{UploadId:_f.UploadId,PartList:_f.PartList})})},oh=gd.getCopyFileId(If,_h,lh,Df,Cf),Zh=gd.getUploadIdList(oh);if(!oh||!Zh)return th();var Sm=function $h(Vf){if(Vf>=Zh.length)return th();var nh=Zh[Vf];if(gd.using[nh])return $h(Vf+1);jd.call(Af,{Bucket:Df,Region:Of,Key:Cf,UploadId:nh,tracker:_f.tracker,calledBySdk:"sliceCopyFile"},function(Lh,Ih){if(Lh)gd.removeUploadId(nh),$h(Vf+1);else{if(gd.using[nh])return $h(Vf+1);var om={},zh=0;Cd.each(Ih.PartList,function(Om){var Im=parseInt(Om.Size),Zm=zh+Im-1;om[Om.PartNumber+"|"+zh+"|"+Zm]=Om.ETag,zh+=Im}),Cd.each(_f.PartList,function(Om){var Im=om[Om.PartNumber+"|"+Om.start+"|"+Om.end];Im&&(Om.ETag=Im,Om.Uploaded=!0)}),gf.emit("get_copy_data_finish",{UploadId:nh,PartList:_f.PartList})}})};Sm(0)}),gf.on("get_file_size_finish",function(){if(function(){for(var oh=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,5120],Zh=1024*1024,Sm=0;SmVf.length&&(Ph[$h]=Sm)}),gf.emit("get_file_size_finish")}})}function mf(_f,vf){var gf=_f.TaskId,Af=_f.Bucket,Df=_f.Region,Of=_f.Key,Cf=_f.CopySource,If=_f.UploadId,Ff=_f.PartNumber*1,sh=_f.CopySourceRange,Sh=this.options.ChunkRetryTimes+1,yh=this;yd.retry(Sh,function(Mh){yh.uploadPartCopy({TaskId:gf,Bucket:Af,Region:Df,Key:Of,CopySource:Cf,UploadId:If,PartNumber:Ff,CopySourceRange:sh,tracker:_f.tracker,calledBySdk:_f.calledBySdk},function(lh,rh){Mh(lh||null,rh)})},function(Mh,lh){return vf(Mh,lh)})}var xf={sliceUploadFile:Nd,abortUploadTask:qd,uploadFile:Xd,uploadFiles:Jd,sliceCopyFile:Zd};ud.exports.init=function(_f,vf){vf.transferToTaskMethod(xf,"sliceUploadFile"),Cd.each(xf,function(gf,Af){_f.prototype[Af]=Cd.apiWrapper(Af,gf)})}},"./src/async.js":function(ud,dd){var hd=function(vd,Cd,wd,Nd){if(Nd=Nd||function(){},!vd.length||Cd<=0)return Nd();var Ld=0,Ud=0,jd=0;(function Gd(){if(Ld>=vd.length)return Nd();for(;jd=vd.length?Nd():Gd())})})()},md=function(vd,Cd,wd){var Nd=function Ld(Ud){Cd(function(jd,Gd){jd&&Ud"u"?"undefined":md(location))==="object"&&location.protocol==="http:"?"http:":"https:"),hm=this.options.ServiceDomain,Fm=ih.AppId||this.options.appId,Pm=ih.Region;hm?(hm=hm.replace(/\{\{AppId\}\}/gi,Fm||"").replace(/\{\{Region\}\}/gi,Pm||"").replace(/\{\{.*?\}\}/gi,""),/^[a-zA-Z]+:\/\//.test(hm)||(hm=Qh+"//"+hm),hm.slice(-1)==="/"&&(hm=hm.slice(0,-1))):Pm?hm=Qh+"//cos."+Pm+".myqcloud.com":hm=Qh+"//service.cos.myqcloud.com";var Vm="",Gm=Pm?"cos."+Pm+".myqcloud.com":"service.cos.myqcloud.com",Tm=hm.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");Gm===Tm&&(Vm=Gm),Pg.call(this,{Action:"name/cos:GetService",url:hm,method:"GET",headers:ih.Headers,SignHost:Vm,tracker:ih.tracker},function(lg,fg){if(lg)return mm(lg);var zg=fg&&fg.ListAllMyBucketsResult&&fg.ListAllMyBucketsResult.Buckets&&fg.ListAllMyBucketsResult.Buckets.Bucket||[];zg=yd.isArray(zg)?zg:[zg];var Tg=fg&&fg.ListAllMyBucketsResult&&fg.ListAllMyBucketsResult.Owner||{};mm(null,{Buckets:zg,Owner:Tg,statusCode:fg.statusCode,headers:fg.headers})})}function Cd(ih,mm){var Qh=this,hm="";if(ih.BucketAZConfig){var Fm={BucketAZConfig:ih.BucketAZConfig};hm=yd.json2xml({CreateBucketConfiguration:Fm})}Pg.call(this,{Action:"name/cos:PutBucket",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,body:hm,tracker:ih.tracker},function(Pm,Vm){if(Pm)return mm(Pm);var Gm=S_({protocol:Qh.options.Protocol,domain:Qh.options.Domain,bucket:ih.Bucket,region:ih.Region,isLocation:!0});mm(null,{Location:Gm,statusCode:Vm.statusCode,headers:Vm.headers})})}function wd(ih,mm){Pg.call(this,{Action:"name/cos:HeadBucket",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,method:"HEAD",tracker:ih.tracker},mm)}function Nd(ih,mm){var Qh={};Qh.prefix=ih.Prefix||"",Qh.delimiter=ih.Delimiter,Qh.marker=ih.Marker,Qh["max-keys"]=ih.MaxKeys,Qh["encoding-type"]=ih.EncodingType,Pg.call(this,{Action:"name/cos:GetBucket",ResourceKey:Qh.prefix,method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,qs:Qh,tracker:ih.tracker},function(hm,Fm){if(hm)return mm(hm);var Pm=Fm.ListBucketResult||{},Vm=Pm.Contents||[],Gm=Pm.CommonPrefixes||[];Vm=yd.isArray(Vm)?Vm:[Vm],Gm=yd.isArray(Gm)?Gm:[Gm];var Tm=yd.clone(Pm);yd.extend(Tm,{Contents:Vm,CommonPrefixes:Gm,statusCode:Fm.statusCode,headers:Fm.headers}),mm(null,Tm)})}function Ld(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucket",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,method:"DELETE",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function Ud(ih,mm){var Qh=ih.Headers,hm="";if(ih.AccessControlPolicy){var Fm=yd.clone(ih.AccessControlPolicy||{}),Pm=Fm.Grants||Fm.Grant;Pm=yd.isArray(Pm)?Pm:[Pm],delete Fm.Grant,delete Fm.Grants,Fm.AccessControlList={Grant:Pm},hm=yd.json2xml({AccessControlPolicy:Fm}),Qh["Content-Type"]="application/xml",Qh["Content-MD5"]=yd.b64(yd.md5(hm))}yd.each(Qh,function(Vm,Gm){Gm.indexOf("x-cos-grant-")===0&&(Qh[Gm]=O_(Qh[Gm]))}),Pg.call(this,{Action:"name/cos:PutBucketACL",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,headers:Qh,action:"acl",body:hm,tracker:ih.tracker},function(Vm,Gm){if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function jd(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketACL",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"acl",tracker:ih.tracker},function(Qh,hm){if(Qh)return mm(Qh);var Fm=hm.AccessControlPolicy||{},Pm=Fm.Owner||{},Vm=Fm.AccessControlList.Grant||[];Vm=yd.isArray(Vm)?Vm:[Vm];var Gm=r_(Fm);hm.headers&&hm.headers["x-cos-acl"]&&(Gm.ACL=hm.headers["x-cos-acl"]),Gm=yd.extend(Gm,{Owner:Pm,Grants:Vm,statusCode:hm.statusCode,headers:hm.headers}),mm(null,Gm)})}function Gd(ih,mm){var Qh=ih.CORSConfiguration||{},hm=Qh.CORSRules||ih.CORSRules||[];hm=yd.clone(yd.isArray(hm)?hm:[hm]),yd.each(hm,function(Gm){yd.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(Tm){var lg=Tm+"s",fg=Gm[lg]||Gm[Tm]||[];delete Gm[lg],Gm[Tm]=yd.isArray(fg)?fg:[fg]})});var Fm={CORSRule:hm};ih.ResponseVary&&(Fm.ResponseVary=ih.ResponseVary);var Pm=yd.json2xml({CORSConfiguration:Fm}),Vm=ih.Headers;Vm["Content-Type"]="application/xml",Vm["Content-MD5"]=yd.b64(yd.md5(Pm)),Pg.call(this,{Action:"name/cos:PutBucketCORS",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Pm,action:"cors",headers:Vm,tracker:ih.tracker},function(Gm,Tm){if(Gm)return mm(Gm);mm(null,{statusCode:Tm.statusCode,headers:Tm.headers})})}function Yd(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketCORS",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"cors",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error&&Qh.error.Code==="NoSuchCORSConfiguration"){var Fm={CORSRules:[],statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=hm.CORSConfiguration||{},Vm=Pm.CORSRules||Pm.CORSRule||[];Vm=yd.clone(yd.isArray(Vm)?Vm:[Vm]);var Gm=Pm.ResponseVary;yd.each(Vm,function(Tm){yd.each(["AllowedOrigin","AllowedHeader","AllowedMethod","ExposeHeader"],function(lg){var fg=lg+"s",zg=Tm[fg]||Tm[lg]||[];delete Tm[lg],Tm[fg]=yd.isArray(zg)?zg:[zg]})}),mm(null,{CORSRules:Vm,ResponseVary:Gm,statusCode:hm.statusCode,headers:hm.headers})})}function zd(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketCORS",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"cors",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode||Qh.statusCode,headers:hm.headers})})}function qd(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketLocation",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"location",tracker:ih.tracker},mm)}function Wd(ih,mm){var Qh=ih.Policy;try{typeof Qh=="string"&&(Qh=JSON.parse(Qh))}catch{}if(!Qh||typeof Qh=="string")return mm(yd.error(new Error("Policy format error")));var hm=JSON.stringify(Qh);Qh.version||(Qh.version="2.0");var Fm=ih.Headers;Fm["Content-Type"]="application/json",Fm["Content-MD5"]=yd.b64(yd.md5(hm)),Pg.call(this,{Action:"name/cos:PutBucketPolicy",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,action:"policy",body:hm,headers:Fm,tracker:ih.tracker},function(Pm,Vm){if(Pm&&Pm.statusCode===204)return mm(null,{statusCode:Pm.statusCode});if(Pm)return mm(Pm);mm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function Xd(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketPolicy",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"policy",rawBody:!0,tracker:ih.tracker},function(Qh,hm){if(Qh)return Qh.statusCode&&Qh.statusCode===403?mm(yd.error(Qh,{ErrorStatus:"Access Denied"})):Qh.statusCode&&Qh.statusCode===405?mm(yd.error(Qh,{ErrorStatus:"Method Not Allowed"})):Qh.statusCode&&Qh.statusCode===404?mm(yd.error(Qh,{ErrorStatus:"Policy Not Found"})):mm(Qh);var Fm={};try{Fm=JSON.parse(hm.body)}catch{}mm(null,{Policy:Fm,statusCode:hm.statusCode,headers:hm.headers})})}function Jd(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketPolicy",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"policy",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode||Qh.statusCode,headers:hm.headers})})}function Zd(ih,mm){var Qh=ih.Tagging||{},hm=Qh.TagSet||Qh.Tags||ih.Tags||[];hm=yd.clone(yd.isArray(hm)?hm:[hm]);var Fm=yd.json2xml({Tagging:{TagSet:{Tag:hm}}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutBucketTagging",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"tagging",headers:Pm,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function mf(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketTagging",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"tagging",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error&&(Qh.error==="Not Found"||Qh.error.Code==="NoSuchTagSet")){var Fm={Tags:[],statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=[];try{Pm=hm.Tagging.TagSet.Tag||[]}catch{}Pm=yd.clone(yd.isArray(Pm)?Pm:[Pm]),mm(null,{Tags:Pm,statusCode:hm.statusCode,headers:hm.headers})})}function xf(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketTagging",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"tagging",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function _f(ih,mm){var Qh=ih.LifecycleConfiguration||{},hm=Qh.Rules||ih.Rules||[];hm=yd.clone(hm);var Fm=yd.json2xml({LifecycleConfiguration:{Rule:hm}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutBucketLifecycle",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"lifecycle",headers:Pm,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function vf(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketLifecycle",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"lifecycle",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error&&Qh.error.Code==="NoSuchLifecycleConfiguration"){var Fm={Rules:[],statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=[];try{Pm=hm.LifecycleConfiguration.Rule||[]}catch{}Pm=yd.clone(yd.isArray(Pm)?Pm:[Pm]),mm(null,{Rules:Pm,statusCode:hm.statusCode,headers:hm.headers})})}function gf(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketLifecycle",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"lifecycle",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function Af(ih,mm){if(!ih.VersioningConfiguration){mm(yd.error(new Error("missing param VersioningConfiguration")));return}var Qh=ih.VersioningConfiguration||{},hm=yd.json2xml({VersioningConfiguration:Qh}),Fm=ih.Headers;Fm["Content-Type"]="application/xml",Fm["Content-MD5"]=yd.b64(yd.md5(hm)),Pg.call(this,{Action:"name/cos:PutBucketVersioning",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:hm,action:"versioning",headers:Fm,tracker:ih.tracker},function(Pm,Vm){if(Pm&&Pm.statusCode===204)return mm(null,{statusCode:Pm.statusCode});if(Pm)return mm(Pm);mm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function Df(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketVersioning",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"versioning",tracker:ih.tracker},function(Qh,hm){Qh||!hm.VersioningConfiguration&&(hm.VersioningConfiguration={}),mm(Qh,hm)})}function Of(ih,mm){var Qh=yd.clone(ih.ReplicationConfiguration),hm=yd.json2xml({ReplicationConfiguration:Qh});hm=hm.replace(/<(\/?)Rules>/gi,"<$1Rule>"),hm=hm.replace(/<(\/?)Tags>/gi,"<$1Tag>");var Fm=ih.Headers;Fm["Content-Type"]="application/xml",Fm["Content-MD5"]=yd.b64(yd.md5(hm)),Pg.call(this,{Action:"name/cos:PutBucketReplication",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:hm,action:"replication",headers:Fm,tracker:ih.tracker},function(Pm,Vm){if(Pm&&Pm.statusCode===204)return mm(null,{statusCode:Pm.statusCode});if(Pm)return mm(Pm);mm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function Cf(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketReplication",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"replication",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error&&(Qh.error==="Not Found"||Qh.error.Code==="ReplicationConfigurationnotFoundError")){var Fm={ReplicationConfiguration:{Rules:[]},statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}!hm.ReplicationConfiguration&&(hm.ReplicationConfiguration={}),hm.ReplicationConfiguration.Rule&&(hm.ReplicationConfiguration.Rules=yd.makeArray(hm.ReplicationConfiguration.Rule),delete hm.ReplicationConfiguration.Rule),mm(Qh,hm)})}function If(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"replication",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function Ff(ih,mm){if(!ih.WebsiteConfiguration){mm(yd.error(new Error("missing param WebsiteConfiguration")));return}var Qh=yd.clone(ih.WebsiteConfiguration||{}),hm=Qh.RoutingRules||Qh.RoutingRule||[];hm=yd.isArray(hm)?hm:[hm],delete Qh.RoutingRule,delete Qh.RoutingRules,hm.length&&(Qh.RoutingRules={RoutingRule:hm});var Fm=yd.json2xml({WebsiteConfiguration:Qh}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutBucketWebsite",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"website",headers:Pm,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function sh(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketWebsite",method:"GET",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,action:"website",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error.Code==="NoSuchWebsiteConfiguration"){var Fm={WebsiteConfiguration:{},statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=hm.WebsiteConfiguration||{};if(Pm.RoutingRules){var Vm=yd.clone(Pm.RoutingRules.RoutingRule||[]);Vm=yd.makeArray(Vm),Pm.RoutingRules=Vm}mm(null,{WebsiteConfiguration:Pm,statusCode:hm.statusCode,headers:hm.headers})})}function Sh(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketWebsite",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"website",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function yh(ih,mm){if(!ih.RefererConfiguration){mm(yd.error(new Error("missing param RefererConfiguration")));return}var Qh=yd.clone(ih.RefererConfiguration||{}),hm=Qh.DomainList||{},Fm=hm.Domains||hm.Domain||[];Fm=yd.isArray(Fm)?Fm:[Fm],Fm.length&&(Qh.DomainList={Domain:Fm});var Pm=yd.json2xml({RefererConfiguration:Qh}),Vm=ih.Headers;Vm["Content-Type"]="application/xml",Vm["Content-MD5"]=yd.b64(yd.md5(Pm)),Pg.call(this,{Action:"name/cos:PutBucketReferer",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Pm,action:"referer",headers:Vm,tracker:ih.tracker},function(Gm,Tm){if(Gm&&Gm.statusCode===204)return mm(null,{statusCode:Gm.statusCode});if(Gm)return mm(Gm);mm(null,{statusCode:Tm.statusCode,headers:Tm.headers})})}function Mh(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketReferer",method:"GET",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,action:"referer",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error.Code==="NoSuchRefererConfiguration"){var Fm={WebsiteConfiguration:{},statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=hm.RefererConfiguration||{};if(Pm.DomainList){var Vm=yd.makeArray(Pm.DomainList.Domain||[]);Pm.DomainList={Domains:Vm}}mm(null,{RefererConfiguration:Pm,statusCode:hm.statusCode,headers:hm.headers})})}function lh(ih,mm){var Qh=ih.DomainConfiguration||{},hm=Qh.DomainRule||ih.DomainRule||[];hm=yd.clone(hm);var Fm=yd.json2xml({DomainConfiguration:{DomainRule:hm}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutBucketDomain",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"domain",headers:Pm,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function rh(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketDomain",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"domain",tracker:ih.tracker},function(Qh,hm){if(Qh)return mm(Qh);var Fm=[];try{Fm=hm.DomainConfiguration.DomainRule||[]}catch{}Fm=yd.clone(yd.isArray(Fm)?Fm:[Fm]),mm(null,{DomainRule:Fm,statusCode:hm.statusCode,headers:hm.headers})})}function mh(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketDomain",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"domain",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function xh(ih,mm){var Qh=ih.OriginConfiguration||{},hm=Qh.OriginRule||ih.OriginRule||[];hm=yd.clone(hm);var Fm=yd.json2xml({OriginConfiguration:{OriginRule:hm}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutBucketOrigin",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"origin",headers:Pm,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function Eh(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketOrigin",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"origin",tracker:ih.tracker},function(Qh,hm){if(Qh)return mm(Qh);var Fm=[];try{Fm=hm.OriginConfiguration.OriginRule||[]}catch{}Fm=yd.clone(yd.isArray(Fm)?Fm:[Fm]),mm(null,{OriginRule:Fm,statusCode:hm.statusCode,headers:hm.headers})})}function kf(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketOrigin",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"origin",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function Rf(ih,mm){var Qh=yd.json2xml({BucketLoggingStatus:ih.BucketLoggingStatus||""}),hm=ih.Headers;hm["Content-Type"]="application/xml",hm["Content-MD5"]=yd.b64(yd.md5(Qh)),Pg.call(this,{Action:"name/cos:PutBucketLogging",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Qh,action:"logging",headers:hm,tracker:ih.tracker},function(Fm,Pm){if(Fm&&Fm.statusCode===204)return mm(null,{statusCode:Fm.statusCode});if(Fm)return mm(Fm);mm(null,{statusCode:Pm.statusCode,headers:Pm.headers})})}function _h(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketLogging",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"logging",tracker:ih.tracker},function(Qh,hm){if(Qh)return mm(Qh);mm(null,{BucketLoggingStatus:hm.BucketLoggingStatus,statusCode:hm.statusCode,headers:hm.headers})})}function Ph(ih,mm,Qh){var hm=yd.clone(mm.InventoryConfiguration);if(hm.OptionalFields){var Fm=hm.OptionalFields||[];hm.OptionalFields={Field:Fm}}if(hm.Destination&&hm.Destination.COSBucketDestination&&hm.Destination.COSBucketDestination.Encryption){var Pm=hm.Destination.COSBucketDestination.Encryption;Object.keys(Pm).indexOf("SSECOS")>-1&&(Pm["SSE-COS"]=Pm.SSECOS,delete Pm.SSECOS)}var Vm=yd.json2xml({InventoryConfiguration:hm}),Gm=mm.Headers;Gm["Content-Type"]="application/xml",Gm["Content-MD5"]=yd.b64(yd.md5(Vm));var Tm=ih==="PUT"?"name/cos:PutBucketInventory":"name/cos:PostBucketInventory";Pg.call(this,{Action:Tm,method:ih,Bucket:mm.Bucket,Region:mm.Region,body:Vm,action:"inventory",qs:{id:mm.Id},headers:Gm,tracker:mm.tracker},function(lg,fg){if(lg&&lg.statusCode===204)return Qh(null,{statusCode:lg.statusCode});if(lg)return Qh(lg);Qh(null,{statusCode:fg.statusCode,headers:fg.headers})})}function sm(ih,mm){return Ph.call(this,"PUT",ih,mm)}function th(ih,mm){return Ph.call(this,"POST",ih,mm)}function oh(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketInventory",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"inventory",qs:{id:ih.Id},tracker:ih.tracker},function(Qh,hm){if(Qh)return mm(Qh);var Fm=hm.InventoryConfiguration;if(Fm&&Fm.OptionalFields&&Fm.OptionalFields.Field){var Pm=Fm.OptionalFields.Field;yd.isArray(Pm)||(Pm=[Pm]),Fm.OptionalFields=Pm}if(Fm.Destination&&Fm.Destination.COSBucketDestination&&Fm.Destination.COSBucketDestination.Encryption){var Vm=Fm.Destination.COSBucketDestination.Encryption;Object.keys(Vm).indexOf("SSE-COS")>-1&&(Vm.SSECOS=Vm["SSE-COS"],delete Vm["SSE-COS"])}mm(null,{InventoryConfiguration:Fm,statusCode:hm.statusCode,headers:hm.headers})})}function Zh(ih,mm){Pg.call(this,{Action:"name/cos:ListBucketInventory",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"inventory",qs:{"continuation-token":ih.ContinuationToken},tracker:ih.tracker},function(Qh,hm){if(Qh)return mm(Qh);var Fm=hm.ListInventoryConfigurationResult,Pm=Fm.InventoryConfiguration||[];Pm=yd.isArray(Pm)?Pm:[Pm],delete Fm.InventoryConfiguration,yd.each(Pm,function(Vm){if(Vm&&Vm.OptionalFields&&Vm.OptionalFields.Field){var Gm=Vm.OptionalFields.Field;yd.isArray(Gm)||(Gm=[Gm]),Vm.OptionalFields=Gm}if(Vm.Destination&&Vm.Destination.COSBucketDestination&&Vm.Destination.COSBucketDestination.Encryption){var Tm=Vm.Destination.COSBucketDestination.Encryption;Object.keys(Tm).indexOf("SSE-COS")>-1&&(Tm.SSECOS=Tm["SSE-COS"],delete Tm["SSE-COS"])}}),Fm.InventoryConfigurations=Pm,yd.extend(Fm,{statusCode:hm.statusCode,headers:hm.headers}),mm(null,Fm)})}function Sm(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketInventory",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"inventory",qs:{id:ih.Id},tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function $h(ih,mm){if(!ih.AccelerateConfiguration){mm(yd.error(new Error("missing param AccelerateConfiguration")));return}var Qh={AccelerateConfiguration:ih.AccelerateConfiguration||{}},hm=yd.json2xml(Qh),Fm={};Fm["Content-Type"]="application/xml",Fm["Content-MD5"]=yd.b64(yd.md5(hm)),Pg.call(this,{Action:"name/cos:PutBucketAccelerate",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:hm,action:"accelerate",headers:Fm,tracker:ih.tracker},function(Pm,Vm){if(Pm)return mm(Pm);mm(null,{statusCode:Vm.statusCode,headers:Vm.headers})})}function Vf(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketAccelerate",method:"GET",Bucket:ih.Bucket,Region:ih.Region,action:"accelerate",tracker:ih.tracker},function(Qh,hm){Qh||!hm.AccelerateConfiguration&&(hm.AccelerateConfiguration={}),mm(Qh,hm)})}function nh(ih,mm){var Qh=ih.ServerSideEncryptionConfiguration||{},hm=Qh.Rule||Qh.Rules||[],Fm=yd.json2xml({ServerSideEncryptionConfiguration:{Rule:hm}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutBucketEncryption",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"encryption",headers:Pm,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function Lh(ih,mm){Pg.call(this,{Action:"name/cos:GetBucketEncryption",method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"encryption",tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.code==="NoSuchEncryptionConfiguration"){var Fm={EncryptionConfiguration:{Rules:[]},statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=yd.makeArray(hm.EncryptionConfiguration&&hm.EncryptionConfiguration.Rule||[]);hm.EncryptionConfiguration={Rules:Pm},mm(Qh,hm)})}function Ih(ih,mm){Pg.call(this,{Action:"name/cos:DeleteBucketReplication",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"encryption",tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function om(ih,mm){Pg.call(this,{Action:"name/cos:HeadObject",method:"HEAD",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,VersionId:ih.VersionId,headers:ih.Headers,tracker:ih.tracker},function(Qh,hm){if(Qh){var Fm=Qh.statusCode;return ih.Headers["If-Modified-Since"]&&Fm&&Fm===304?mm(null,{NotModified:!0,statusCode:Fm}):mm(Qh)}hm.ETag=yd.attr(hm.headers,"etag",""),mm(null,hm)})}function zh(ih,mm){var Qh={};Qh.prefix=ih.Prefix||"",Qh.delimiter=ih.Delimiter,Qh["key-marker"]=ih.KeyMarker,Qh["version-id-marker"]=ih.VersionIdMarker,Qh["max-keys"]=ih.MaxKeys,Qh["encoding-type"]=ih.EncodingType,Pg.call(this,{Action:"name/cos:GetBucketObjectVersions",ResourceKey:Qh.prefix,method:"GET",Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,qs:Qh,action:"versions",tracker:ih.tracker},function(hm,Fm){if(hm)return mm(hm);var Pm=Fm.ListVersionsResult||{},Vm=Pm.DeleteMarker||[];Vm=yd.isArray(Vm)?Vm:[Vm];var Gm=Pm.Version||[];Gm=yd.isArray(Gm)?Gm:[Gm];var Tm=yd.clone(Pm);delete Tm.DeleteMarker,delete Tm.Version,yd.extend(Tm,{DeleteMarkers:Vm,Versions:Gm,statusCode:Fm.statusCode,headers:Fm.headers}),mm(null,Tm)})}function Om(ih,mm){if(this.options.ObjectKeySimplifyCheck){var Qh=yd.simplifyPath(ih.Key);if(Qh==="/"){mm(yd.error(new Error("The Getobject Key is illegal")));return}}var hm=ih.Query||{},Fm=ih.QueryString||"",Pm=yd.throttleOnProgress.call(this,0,ih.onProgress),Vm=ih.tracker;Vm&&Vm.setParams({signStartTime:new Date().getTime()}),hm["response-content-type"]=ih.ResponseContentType,hm["response-content-language"]=ih.ResponseContentLanguage,hm["response-expires"]=ih.ResponseExpires,hm["response-cache-control"]=ih.ResponseCacheControl,hm["response-content-disposition"]=ih.ResponseContentDisposition,hm["response-content-encoding"]=ih.ResponseContentEncoding,Pg.call(this,{Action:"name/cos:GetObject",method:"GET",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,VersionId:ih.VersionId,DataType:ih.DataType,headers:ih.Headers,qs:hm,qsStr:Fm,rawBody:!0,onDownloadProgress:Pm,tracker:Vm},function(Gm,Tm){if(Pm(null,!0),Gm){var lg=Gm.statusCode;return ih.Headers["If-Modified-Since"]&&lg&&lg===304?mm(null,{NotModified:!0}):mm(Gm)}mm(null,{Body:Tm.body,ETag:yd.attr(Tm.headers,"etag",""),statusCode:Tm.statusCode,headers:Tm.headers})})}function Im(ih,mm){var Qh=this,hm=ih.ContentLength,Fm=yd.throttleOnProgress.call(Qh,hm,ih.onProgress),Pm=ih.Headers;!Pm["Cache-Control"]&&!Pm["cache-control"]&&(Pm["Cache-Control"]=""),!Pm["Content-Type"]&&!Pm["content-type"]&&(Pm["Content-Type"]=ih.Body&&ih.Body.type||"");var Vm=ih.UploadAddMetaMd5||Qh.options.UploadAddMetaMd5||Qh.options.UploadCheckContentMd5,Gm=ih.tracker;Vm&&Gm&&Gm.setParams({md5StartTime:new Date().getTime()}),yd.getBodyMd5(Vm,ih.Body,function(Tm){Tm&&(Gm&&Gm.setParams({md5EndTime:new Date().getTime()}),Qh.options.UploadCheckContentMd5&&(Pm["Content-MD5"]=yd.b64(Tm)),(ih.UploadAddMetaMd5||Qh.options.UploadAddMetaMd5)&&(Pm["x-cos-meta-md5"]=Tm)),ih.ContentLength!==void 0&&(Pm["Content-Length"]=ih.ContentLength),Fm(null,!0),Pg.call(Qh,{Action:"name/cos:PutObject",TaskId:ih.TaskId,method:"PUT",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,qs:ih.Query,body:ih.Body,onProgress:Fm,tracker:Gm},function(lg,fg){if(lg)return Fm(null,!0),mm(lg);Fm({loaded:hm,total:hm},!0);var zg=S_({ForcePathStyle:Qh.options.ForcePathStyle,protocol:Qh.options.Protocol,domain:Qh.options.Domain,bucket:ih.Bucket,region:Qh.options.UseAccelerate?"accelerate":ih.Region,object:ih.Key});zg=zg.substr(zg.indexOf("://")+3),fg.Location=zg,fg.ETag=yd.attr(fg.headers,"etag",""),mm(null,fg)})},ih.onHashProgress)}function Zm(ih,mm){Pg.call(this,{Action:"name/cos:DeleteObject",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,VersionId:ih.VersionId,action:ih.Recursive?"recursive":"",tracker:ih.tracker},function(Qh,hm){if(Qh){var Fm=Qh.statusCode;return Fm&&Fm===404?mm(null,{BucketNotFound:!0,statusCode:Fm}):mm(Qh)}mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function Lm(ih,mm){var Qh={};ih.VersionId&&(Qh.versionId=ih.VersionId),Pg.call(this,{Action:"name/cos:GetObjectACL",method:"GET",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,qs:Qh,action:"acl",tracker:ih.tracker},function(hm,Fm){if(hm)return mm(hm);var Pm=Fm.AccessControlPolicy||{},Vm=Pm.Owner||{},Gm=Pm.AccessControlList&&Pm.AccessControlList.Grant||[];Gm=yd.isArray(Gm)?Gm:[Gm];var Tm=r_(Pm);delete Tm.GrantWrite,Fm.headers&&Fm.headers["x-cos-acl"]&&(Tm.ACL=Fm.headers["x-cos-acl"]),Tm=yd.extend(Tm,{Owner:Vm,Grants:Gm,statusCode:Fm.statusCode,headers:Fm.headers}),mm(null,Tm)})}function Wm(ih,mm){var Qh=ih.Headers,hm="";if(ih.AccessControlPolicy){var Fm=yd.clone(ih.AccessControlPolicy||{}),Pm=Fm.Grants||Fm.Grant;Pm=yd.isArray(Pm)?Pm:[Pm],delete Fm.Grant,delete Fm.Grants,Fm.AccessControlList={Grant:Pm},hm=yd.json2xml({AccessControlPolicy:Fm}),Qh["Content-Type"]="application/xml",Qh["Content-MD5"]=yd.b64(yd.md5(hm))}yd.each(Qh,function(Vm,Gm){Gm.indexOf("x-cos-grant-")===0&&(Qh[Gm]=O_(Qh[Gm]))}),Pg.call(this,{Action:"name/cos:PutObjectACL",method:"PUT",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,action:"acl",headers:Qh,body:hm,tracker:ih.tracker},function(Vm,Gm){if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function ig(ih,mm){var Qh=ih.Headers;Qh.Origin=ih.Origin,Qh["Access-Control-Request-Method"]=ih.AccessControlRequestMethod,Qh["Access-Control-Request-Headers"]=ih.AccessControlRequestHeaders,Pg.call(this,{Action:"name/cos:OptionsObject",method:"OPTIONS",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:Qh,tracker:ih.tracker},function(hm,Fm){if(hm)return hm.statusCode&&hm.statusCode===403?mm(null,{OptionsForbidden:!0,statusCode:hm.statusCode}):mm(hm);var Pm=Fm.headers||{};mm(null,{AccessControlAllowOrigin:Pm["access-control-allow-origin"],AccessControlAllowMethods:Pm["access-control-allow-methods"],AccessControlAllowHeaders:Pm["access-control-allow-headers"],AccessControlExposeHeaders:Pm["access-control-expose-headers"],AccessControlMaxAge:Pm["access-control-max-age"],statusCode:Fm.statusCode,headers:Fm.headers})})}function yg(ih,mm){var Qh=this,hm=ih.Headers;!hm["Cache-Control"]&&!hm["cache-control"]&&(hm["Cache-Control"]="");var Fm=ih.CopySource||"",Pm=yd.getSourceParams.call(this,Fm);if(!Pm){mm(yd.error(new Error("CopySource format error")));return}var Vm=Pm.Bucket,Gm=Pm.Region,Tm=decodeURIComponent(Pm.Key);Pg.call(this,{Scope:[{action:"name/cos:GetObject",bucket:Vm,region:Gm,prefix:Tm},{action:"name/cos:PutObject",bucket:ih.Bucket,region:ih.Region,prefix:ih.Key}],method:"PUT",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,VersionId:ih.VersionId,headers:ih.Headers,tracker:ih.tracker},function(lg,fg){if(lg)return mm(lg);var zg=yd.clone(fg.CopyObjectResult||{}),Tg=S_({ForcePathStyle:Qh.options.ForcePathStyle,protocol:Qh.options.Protocol,domain:Qh.options.Domain,bucket:ih.Bucket,region:ih.Region,object:ih.Key,isLocation:!0});yd.extend(zg,{Location:Tg,statusCode:fg.statusCode,headers:fg.headers}),mm(null,zg)})}function jh(ih,mm){var Qh=ih.CopySource||"",hm=yd.getSourceParams.call(this,Qh);if(!hm){mm(yd.error(new Error("CopySource format error")));return}var Fm=hm.Bucket,Pm=hm.Region,Vm=decodeURIComponent(hm.Key);Pg.call(this,{Scope:[{action:"name/cos:GetObject",bucket:Fm,region:Pm,prefix:Vm},{action:"name/cos:PutObject",bucket:ih.Bucket,region:ih.Region,prefix:ih.Key}],method:"PUT",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,VersionId:ih.VersionId,qs:{partNumber:ih.PartNumber,uploadId:ih.UploadId},headers:ih.Headers,tracker:ih.tracker},function(Gm,Tm){if(Gm)return mm(Gm);var lg=yd.clone(Tm.CopyPartResult||{});yd.extend(lg,{statusCode:Tm.statusCode,headers:Tm.headers}),mm(null,lg)})}function Pf(ih,mm){var Qh=ih.Objects||[],hm=ih.Quiet;Qh=yd.isArray(Qh)?Qh:[Qh];var Fm=yd.json2xml({Delete:{Object:Qh,Quiet:hm||!1}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm));var Vm=yd.map(Qh,function(Gm){return{action:"name/cos:DeleteObject",bucket:ih.Bucket,region:ih.Region,prefix:Gm.Key}});Pg.call(this,{Scope:Vm,method:"POST",Bucket:ih.Bucket,Region:ih.Region,body:Fm,action:"delete",headers:Pm,tracker:ih.tracker},function(Gm,Tm){if(Gm)return mm(Gm);var lg=Tm.DeleteResult||{},fg=lg.Deleted||[],zg=lg.Error||[];fg=yd.isArray(fg)?fg:[fg],zg=yd.isArray(zg)?zg:[zg];var Tg=yd.clone(lg);yd.extend(Tg,{Error:zg,Deleted:fg,statusCode:Tm.statusCode,headers:Tm.headers}),mm(null,Tg)})}function $f(ih,mm){var Qh=ih.Headers;if(!ih.RestoreRequest){mm(yd.error(new Error("missing param RestoreRequest")));return}var hm=ih.RestoreRequest||{},Fm=yd.json2xml({RestoreRequest:hm});Qh["Content-Type"]="application/xml",Qh["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:RestoreObject",method:"POST",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,VersionId:ih.VersionId,body:Fm,action:"restore",headers:Qh,tracker:ih.tracker},mm)}function Nh(ih,mm){var Qh=ih.Tagging||{},hm=Qh.TagSet||Qh.Tags||ih.Tags||[];hm=yd.clone(yd.isArray(hm)?hm:[hm]);var Fm=yd.json2xml({Tagging:{TagSet:{Tag:hm}}}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:PutObjectTagging",method:"PUT",Bucket:ih.Bucket,Key:ih.Key,Region:ih.Region,body:Fm,action:"tagging",headers:Pm,VersionId:ih.VersionId,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers})})}function Wh(ih,mm){Pg.call(this,{Action:"name/cos:GetObjectTagging",method:"GET",Key:ih.Key,Bucket:ih.Bucket,Region:ih.Region,headers:ih.Headers,action:"tagging",VersionId:ih.VersionId,tracker:ih.tracker},function(Qh,hm){if(Qh){if(Qh.statusCode===404&&Qh.error&&(Qh.error==="Not Found"||Qh.error.Code==="NoSuchTagSet")){var Fm={Tags:[],statusCode:Qh.statusCode};Qh.headers&&(Fm.headers=Qh.headers),mm(null,Fm)}else mm(Qh);return}var Pm=[];try{Pm=hm.Tagging.TagSet.Tag||[]}catch{}Pm=yd.clone(yd.isArray(Pm)?Pm:[Pm]),mm(null,{Tags:Pm,statusCode:hm.statusCode,headers:hm.headers})})}function _m(ih,mm){Pg.call(this,{Action:"name/cos:DeleteObjectTagging",method:"DELETE",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,action:"tagging",VersionId:ih.VersionId,tracker:ih.tracker},function(Qh,hm){if(Qh&&Qh.statusCode===204)return mm(null,{statusCode:Qh.statusCode});if(Qh)return mm(Qh);mm(null,{statusCode:hm.statusCode,headers:hm.headers})})}function $m(ih,mm){var Qh=ih.SelectType;if(!Qh)return mm(yd.error(new Error("missing param SelectType")));var hm=ih.SelectRequest||{},Fm=yd.json2xml({SelectRequest:hm}),Pm=ih.Headers;Pm["Content-Type"]="application/xml",Pm["Content-MD5"]=yd.b64(yd.md5(Fm)),Pg.call(this,{Action:"name/cos:GetObject",method:"POST",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,headers:ih.Headers,action:"select",qs:{"select-type":ih.SelectType},VersionId:ih.VersionId,body:Fm,DataType:"arraybuffer",rawBody:!0,tracker:ih.tracker},function(Vm,Gm){if(Vm&&Vm.statusCode===204)return mm(null,{statusCode:Vm.statusCode});if(Vm)return mm(Vm);var Tm=yd.parseSelectPayload(Gm.body);mm(null,{statusCode:Gm.statusCode,headers:Gm.headers,Body:Tm.body,Payload:Tm.payload})})}function Ym(ih,mm){var Qh=this,hm=ih.Headers,Fm=ih.tracker;!hm["Cache-Control"]&&!hm["cache-control"]&&(hm["Cache-Control"]=""),!hm["Content-Type"]&&!hm["content-type"]&&(hm["Content-Type"]=ih.Body&&ih.Body.type||"");var Pm=ih.Body&&(ih.UploadAddMetaMd5||Qh.options.UploadAddMetaMd5);Pm&&Fm&&Fm.setParams({md5StartTime:new Date().getTime()}),yd.getBodyMd5(Pm,ih.Body,function(Vm){Vm&&(ih.Headers["x-cos-meta-md5"]=Vm),Pm&&Fm&&Fm.setParams({md5EndTime:new Date().getTime()}),Pg.call(Qh,{Action:"name/cos:InitiateMultipartUpload",method:"POST",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,action:"uploads",headers:ih.Headers,qs:ih.Query,tracker:Fm},function(Gm,Tm){if(Gm)return Fm&&Fm.parent&&Fm.parent.setParams({errorNode:"multipartInit"}),mm(Gm);if(Tm=yd.clone(Tm||{}),Tm&&Tm.InitiateMultipartUploadResult)return mm(null,yd.extend(Tm.InitiateMultipartUploadResult,{statusCode:Tm.statusCode,headers:Tm.headers}));mm(null,Tm)})},ih.onHashProgress)}function Ag(ih,mm){var Qh=this;yd.getFileSize("multipartUpload",ih,function(){var hm=ih.tracker,Fm=Qh.options.UploadCheckContentMd5;Fm&&hm&&hm.setParams({md5StartTime:new Date().getTime()}),yd.getBodyMd5(Fm,ih.Body,function(Pm){Pm&&(ih.Headers["Content-MD5"]=yd.b64(Pm)),Fm&&hm&&hm.setParams({md5EndTime:new Date().getTime()}),hm&&hm.setParams({partNumber:ih.PartNumber}),Pg.call(Qh,{Action:"name/cos:UploadPart",TaskId:ih.TaskId,method:"PUT",Bucket:ih.Bucket,Region:ih.Region,Key:ih.Key,qs:{partNumber:ih.PartNumber,uploadId:ih.UploadId},headers:ih.Headers,onProgress:ih.onProgress,body:ih.Body||null,tracker:hm},function(Vm,Gm){if(Vm)return hm&&hm.parent&&hm.parent.setParams({errorNode:"multipartUpload"}),mm(Vm);mm(null,{ETag:yd.attr(Gm.headers,"etag",""),statusCode:Gm.statusCode,headers:Gm.headers})})})})}function sg(ih,mm){for(var Qh=this,hm=ih.UploadId,Fm=ih.Parts,Pm=ih.tracker,Vm=0,Gm=Fm.length;Vm-1?zg(fg.Authorization):"sign="+encodeURIComponent(fg.Authorization)),fg.SecurityToken&&(Tg+="&x-cos-security-token="+fg.SecurityToken),fg.ClientIP&&(Tg+="&clientIP="+fg.ClientIP),fg.ClientUA&&(Tg+="&clientUA="+fg.ClientUA),fg.Token&&(Tg+="&token="+fg.Token),Pm&&(Tg+="&"+Pm),setTimeout(function(){mm(null,{Url:Tg})})}});return Tm?(Vm+="?"+Tm.Authorization+(Tm.SecurityToken?"&x-cos-security-token="+Tm.SecurityToken:""),Pm&&(Vm+="&"+Pm)):Pm&&(Vm+="?"+Pm),Vm}function r_(ih){var mm={GrantFullControl:[],GrantWrite:[],GrantRead:[],GrantReadAcp:[],GrantWriteAcp:[],ACL:""},Qh={FULL_CONTROL:"GrantFullControl",WRITE:"GrantWrite",READ:"GrantRead",READ_ACP:"GrantReadAcp",WRITE_ACP:"GrantWriteAcp"},hm=ih&&ih.AccessControlList||{},Fm=hm.Grant;Fm&&(Fm=yd.isArray(Fm)?Fm:[Fm]);var Pm={READ:0,WRITE:0,FULL_CONTROL:0};return Fm&&Fm.length&&yd.each(Fm,function(Vm){var Gm=Vm.Grantee.URI&&Vm.Grantee.URI.endsWith("/groups/global/AllUsers");Vm.Grantee.ID==="qcs::cam::anyone:anyone"||Gm?Pm[Vm.Permission]=1:Vm.Grantee.ID!==ih.Owner.ID&&mm[Qh[Vm.Permission]].push('id="'+Vm.Grantee.ID+'"')}),Pm.FULL_CONTROL||Pm.WRITE&&Pm.READ?mm.ACL="public-read-write":Pm.READ?mm.ACL="public-read":mm.ACL="private",yd.each(Qh,function(Vm){mm[Vm]=O_(mm[Vm].join(","))}),mm}function O_(ih){var mm=ih.split(","),Qh={},hm,Fm;for(hm=0;hm"u"?"undefined":md(location))==="object"&&location.protocol==="http:"?"http:":"https:");Pm||(["cn-south","cn-south-2","cn-north","cn-east","cn-southwest","sg"].indexOf(mm)>-1?Pm="{Region}.myqcloud.com":Pm="cos.{Region}.myqcloud.com",ih.ForcePathStyle||(Pm="{Bucket}."+Pm)),Pm=Pm.replace(/\{\{AppId\}\}/gi,Fm).replace(/\{\{Bucket\}\}/gi,hm).replace(/\{\{Region\}\}/gi,mm).replace(/\{\{.*?\}\}/gi,""),Pm=Pm.replace(/\{AppId\}/gi,Fm).replace(/\{BucketName\}/gi,hm).replace(/\{Bucket\}/gi,Qh).replace(/\{Region\}/gi,mm).replace(/\{.*?\}/gi,""),/^[a-zA-Z]+:\/\//.test(Pm)||(Pm=Gm+"//"+Pm),Pm.slice(-1)==="/"&&(Pm=Pm.slice(0,-1));var Tm=Pm;return ih.ForcePathStyle&&(Tm+="/"+Qh),Tm+="/",Vm&&(Tm+=yd.camSafeUrlEncode(Vm).replace(/%2F/g,"/")),ih.isLocation&&(Tm=Tm.replace(/^https?:\/\//,"")),Tm}var Q_=function(mm){if(!mm.Bucket||!mm.Region)return"";var Qh=mm.UseAccelerate===void 0?this.options.UseAccelerate:mm.UseAccelerate,hm=mm.Url||S_({ForcePathStyle:this.options.ForcePathStyle,protocol:this.options.Protocol,domain:this.options.Domain,bucket:mm.Bucket,region:Qh?"accelerate":mm.Region}),Fm=hm.replace(/^https?:\/\/([^/]+)(\/.*)?$/,"$1");return Fm};function t0(ih,mm){var Qh=yd.clone(ih.Headers),hm="";yd.each(Qh,function(g_,s_){(g_===""||["content-type","cache-control","expires"].indexOf(s_.toLowerCase())>-1)&&delete Qh[s_],s_.toLowerCase()==="host"&&(hm=g_)});var Fm=ih.ForceSignHost!==!1;!hm&&ih.SignHost&&Fm&&(Qh.Host=ih.SignHost);var Pm=!1,Vm=function(s_,Hh){Pm||(Pm=!0,Hh&&Hh.XCosSecurityToken&&!Hh.SecurityToken&&(Hh=yd.clone(Hh),Hh.SecurityToken=Hh.XCosSecurityToken,delete Hh.XCosSecurityToken),mm&&mm(s_,Hh))},Gm=this,Tm=ih.Bucket||"",lg=ih.Region||"",fg=ih.Key||"";Gm.options.ForcePathStyle&&Tm&&(fg=Tm+"/"+fg);var zg="/"+fg,Tg={},Xg=ih.Scope;if(!Xg){var D_=ih.Action||"",A_=ih.ResourceKey||ih.Key||"";Xg=ih.Scope||[{action:D_,bucket:Tm,region:lg,prefix:A_}]}var f_=yd.md5(JSON.stringify(Xg));Gm._StsCache=Gm._StsCache||[],function(){var g_,s_;for(g_=Gm._StsCache.length-1;g_>=0;g_--){s_=Gm._StsCache[g_];var Hh=Math.round(yd.getSkewTime(Gm.options.SystemClockOffset)/1e3)+30;if(s_.StartTime&&Hh=s_.ExpiredTime){Gm._StsCache.splice(g_,1);continue}if(!s_.ScopeLimit||s_.ScopeLimit&&s_.ScopeKey===f_){Tg=s_;break}}}();var Mg=function(){var s_="";Tg.StartTime&&ih.Expires?s_=Tg.StartTime+";"+(Tg.StartTime+ih.Expires*1):Tg.StartTime&&Tg.ExpiredTime&&(s_=Tg.StartTime+";"+Tg.ExpiredTime);var Hh=yd.getAuth({SecretId:Tg.TmpSecretId,SecretKey:Tg.TmpSecretKey,Method:ih.Method,Pathname:zg,Query:ih.Query,Headers:Qh,Expires:ih.Expires,UseRawKey:Gm.options.UseRawKey,SystemClockOffset:Gm.options.SystemClockOffset,KeyTime:s_,ForceSignHost:Fm}),Mm={Authorization:Hh,SecurityToken:Tg.SecurityToken||Tg.XCosSecurityToken||"",Token:Tg.Token||"",ClientIP:Tg.ClientIP||"",ClientUA:Tg.ClientUA||"",SignFrom:"client"};Vm(null,Mm)},V_=function(s_){if(s_.Authorization){var Hh=!1,Mm=s_.Authorization;if(Mm)if(Mm.indexOf(" ")>-1)Hh=!1;else if(Mm.indexOf("q-sign-algorithm=")>-1&&Mm.indexOf("q-ak=")>-1&&Mm.indexOf("q-sign-time=")>-1&&Mm.indexOf("q-key-time=")>-1&&Mm.indexOf("q-url-param-list=")>-1)Hh=!0;else try{Mm=atob(Mm),Mm.indexOf("a=")>-1&&Mm.indexOf("k=")>-1&&Mm.indexOf("t=")>-1&&Mm.indexOf("r=")>-1&&Mm.indexOf("b=")>-1&&(Hh=!0)}catch{}if(!Hh)return yd.error(new Error("getAuthorization callback params format error"))}else{if(!s_.TmpSecretId)return yd.error(new Error('getAuthorization callback params missing "TmpSecretId"'));if(!s_.TmpSecretKey)return yd.error(new Error('getAuthorization callback params missing "TmpSecretKey"'));if(!s_.SecurityToken&&!s_.XCosSecurityToken)return yd.error(new Error('getAuthorization callback params missing "SecurityToken"'));if(!s_.ExpiredTime)return yd.error(new Error('getAuthorization callback params missing "ExpiredTime"'));if(s_.ExpiredTime&&s_.ExpiredTime.toString().length!==10)return yd.error(new Error('getAuthorization callback params "ExpiredTime" should be 10 digits'));if(s_.StartTime&&s_.StartTime.toString().length!==10)return yd.error(new Error('getAuthorization callback params "StartTime" should be 10 StartTime'))}return!1};if(Tg.ExpiredTime&&Tg.ExpiredTime-yd.getSkewTime(Gm.options.SystemClockOffset)/1e3>60)Mg();else if(Gm.options.getAuthorization)Gm.options.getAuthorization.call(Gm,{Bucket:Tm,Region:lg,Method:ih.Method,Key:fg,Pathname:zg,Query:ih.Query,Headers:Qh,Scope:Xg,SystemClockOffset:Gm.options.SystemClockOffset,ForceSignHost:Fm},function(g_){typeof g_=="string"&&(g_={Authorization:g_});var s_=V_(g_);if(s_)return Vm(s_);g_.Authorization?Vm(null,g_):(Tg=g_||{},Tg.Scope=Xg,Tg.ScopeKey=f_,Gm._StsCache.push(Tg),Mg())});else if(Gm.options.getSTS)Gm.options.getSTS.call(Gm,{Bucket:Tm,Region:lg},function(g_){Tg=g_||{},Tg.Scope=Xg,Tg.ScopeKey=f_,Tg.TmpSecretId||(Tg.TmpSecretId=Tg.SecretId),Tg.TmpSecretKey||(Tg.TmpSecretKey=Tg.SecretKey);var s_=V_(Tg);if(s_)return Vm(s_);Gm._StsCache.push(Tg),Mg()});else return function(){var g_="";if(Gm.options.StartTime&&ih.Expires){if(Gm.options.StartTime.toString().length!==10)return Vm(yd.error(new Error('params "StartTime" should be 10 digits')));g_=Gm.options.StartTime+";"+(Gm.options.StartTime+ih.Expires*1)}else if(Gm.options.StartTime&&Gm.options.ExpiredTime){if(Gm.options.StartTime.toString().length!==10)return Vm(yd.error(new Error('params "StartTime" should be 10 digits')));if(Gm.options.ExpiredTime.toString().length!==10)return Vm(yd.error(new Error('params "ExpiredTime" should be 10 digits')));g_=Gm.options.StartTime+";"+Gm.options.ExpiredTime*1}var s_=yd.getAuth({SecretId:ih.SecretId||Gm.options.SecretId,SecretKey:ih.SecretKey||Gm.options.SecretKey,Method:ih.Method,Pathname:zg,Query:ih.Query,Headers:Qh,Expires:ih.Expires,KeyTime:g_,UseRawKey:Gm.options.UseRawKey,SystemClockOffset:Gm.options.SystemClockOffset,ForceSignHost:Fm}),Hh={Authorization:s_,SecurityToken:Gm.options.SecurityToken||Gm.options.XCosSecurityToken,SignFrom:"client"};return Vm(null,Hh),Hh}();return""}function R_(ih){var mm=this,Qh=!1,hm=!1,Fm=!1,Pm=ih.headers&&(ih.headers.date||ih.headers.Date)||ih.error&&ih.error.ServerTime;try{var Vm=ih.error.Code,Gm=ih.error.Message;(Vm==="RequestTimeTooSkewed"||Vm==="AccessDenied"&&Gm==="Request has expired")&&(hm=!0)}catch{}if(ih)if(hm&&Pm){var Tm=Date.parse(Pm);this.options.CorrectClockSkew&&Math.abs(yd.getSkewTime(this.options.SystemClockOffset)-Tm)>=3e4&&(console.error("error: Local time is too skewed."),this.options.SystemClockOffset=Tm-Date.now(),Qh=!0)}else Math.floor(ih.statusCode/100)===5?Qh=!0:ih.message==="CORS blocked or network error"&&(Fm=!0,Qh=mm.options.AutoSwitchHost);return{canRetry:Qh,networkError:Fm}}function P_(ih){var mm=ih.requestUrl,Qh=ih.clientCalcSign,hm=ih.networkError;if(!this.options.AutoSwitchHost||!mm||!Qh||!hm)return!1;var Fm=/^https?:\/\/[^\/]*\.cos\.[^\/]*\.myqcloud\.com(\/.*)?$/,Pm=/^https?:\/\/[^\/]*\.cos\.accelerate\.myqcloud\.com(\/.*)?$/,Vm=Fm.test(mm)&&!Pm.test(mm);return Vm}function Pg(ih,mm){var Qh=this;!ih.headers&&(ih.headers={}),!ih.qs&&(ih.qs={}),ih.VersionId&&(ih.qs.versionId=ih.VersionId),ih.qs=yd.clearKey(ih.qs),ih.headers&&(ih.headers=yd.clearKey(ih.headers)),ih.qs&&(ih.qs=yd.clearKey(ih.qs));var hm=yd.clone(ih.qs);ih.action&&(hm[ih.action]="");var Fm=ih.url||ih.Url,Pm=ih.SignHost||Q_.call(this,{Bucket:ih.Bucket,Region:ih.Region,Url:Fm}),Vm=ih.tracker,Gm=function Tm(lg){var fg=Qh.options.SystemClockOffset;Vm&&Vm.setParams({signStartTime:new Date().getTime(),httpRetryTimes:lg-1}),ih.SwitchHost&&(Pm=Pm.replace(/myqcloud.com/,"tencentcos.cn")),t0.call(Qh,{Bucket:ih.Bucket||"",Region:ih.Region||"",Method:ih.method,Key:ih.Key,Query:hm,Headers:ih.headers,SignHost:Pm,Action:ih.Action,ResourceKey:ih.ResourceKey,Scope:ih.Scope,ForceSignHost:Qh.options.ForceSignHost,SwitchHost:ih.SwitchHost},function(zg,Tg){if(zg){mm(zg);return}Vm&&Vm.setParams({signEndTime:new Date().getTime(),httpStartTime:new Date().getTime()}),ih.AuthData=Tg,$0.call(Qh,ih,function(Xg,D_){Vm&&Vm.setParams({httpEndTime:new Date().getTime()});var A_=!1,f_=!1;if(Xg){var Mg=R_.call(Qh,Xg);A_=Mg.canRetry||fg!==Qh.options.SystemClockOffset,f_=Mg.networkError}if(Xg&&lg<2&&A_){ih.headers&&(delete ih.headers.Authorization,delete ih.headers.token,delete ih.headers.clientIP,delete ih.headers.clientUA,ih.headers["x-cos-security-token"]&&delete ih.headers["x-cos-security-token"],ih.headers["x-ci-security-token"]&&delete ih.headers["x-ci-security-token"]);var V_=P_.call(Qh,{requestUrl:(Xg==null?void 0:Xg.url)||"",clientCalcSign:Tg.SignFrom==="client",networkError:f_});ih.SwitchHost=V_,ih.retry=!0,Tm(lg+1)}else mm(Xg,D_)})})};Gm(1)}function $0(ih,mm){var Qh=this,hm=ih.TaskId;if(!(hm&&!Qh._isRunningTask(hm))){var Fm=ih.Bucket,Pm=ih.Region,Vm=ih.Key,Gm=ih.method||"GET",Tm=ih.Url||ih.url,lg=ih.body,fg=ih.rawBody;Qh.options.UseAccelerate&&(Pm="accelerate"),Tm=Tm||S_({ForcePathStyle:Qh.options.ForcePathStyle,protocol:Qh.options.Protocol,domain:Qh.options.Domain,bucket:Fm,region:Pm,object:Vm}),ih.SwitchHost&&(Tm=Tm.replace(/myqcloud.com/,"tencentcos.cn"));var zg=Vm?Tm:"";ih.action&&(Tm=Tm+"?"+(yd.isIOS_QQ?"".concat(ih.action,"="):ih.action)),ih.qsStr&&(Tm.indexOf("?")>-1?Tm=Tm+"&"+ih.qsStr:Tm=Tm+"?"+ih.qsStr);var Tg={method:Gm,url:Tm,headers:ih.headers,qs:ih.qs,body:lg},Xg="x-cos-security-token";if(yd.isCIHost(Tm)&&(Xg="x-ci-security-token"),Tg.headers.Authorization=ih.AuthData.Authorization,ih.AuthData.Token&&(Tg.headers.token=ih.AuthData.Token),ih.AuthData.ClientIP&&(Tg.headers.clientIP=ih.AuthData.ClientIP),ih.AuthData.ClientUA&&(Tg.headers.clientUA=ih.AuthData.ClientUA),ih.AuthData.SecurityToken&&(Tg.headers[Xg]=ih.AuthData.SecurityToken),ih.Action&&(Tg.action=ih.Action),Tg.key=ih.Key||ih.ResourceKey,Tg.headers&&(Tg.headers=yd.clearKey(Tg.headers)),ih.retry&&(Tg.headers["x-cos-sdk-retry"]=!0),Tg=yd.clearKey(Tg),ih.onProgress&&typeof ih.onProgress=="function"){var D_=lg&&(lg.size||lg.length)||0;Tg.onProgress=function(Hh){if(!(hm&&!Qh._isRunningTask(hm))){var Mm=Hh?Hh.loaded:0;ih.onProgress({loaded:Mm,total:D_})}}}ih.onDownloadProgress&&(Tg.onDownloadProgress=ih.onDownloadProgress),ih.DataType&&(Tg.dataType=ih.DataType),this.options.Timeout&&(Tg.timeout=this.options.Timeout),Qh.options.ForcePathStyle&&(Tg.pathStyle=Qh.options.ForcePathStyle),Qh.emit("before-send",Tg);var A_=Tg.url.includes("accelerate."),f_=Tg.qs?Object.keys(Tg.qs).map(function(Hh){return"".concat(Hh,"=").concat(Tg.qs[Hh])}).join("&"):"",Mg=f_?Tg.url+"?"+f_:Tg.url;if(ih.tracker){var V_;ih.tracker.setParams({url:Mg,httpMethod:Tg.method,accelerate:A_,httpSize:((V_=Tg.body)===null||V_===void 0?void 0:V_.size)||0}),ih.tracker.parent&&!ih.tracker.parent.params.url&&ih.tracker.parent.setParams({url:zg,accelerate:A_})}var g_=(Qh.options.Request||gd)(Tg,function(Hh){if(!(Hh&&Hh.error==="abort")){var Mm={options:Tg,error:Hh&&Hh.error,statusCode:Hh&&Hh.statusCode||0,statusMessage:Hh&&Hh.statusMessage||"",headers:Hh&&Hh.headers||{},body:Hh&&Hh.body};Qh.emit("after-receive",Mm);var pg=Mm.error,Rg=Mm.body,og={statusCode:Mm.statusCode,statusMessage:Mm.statusMessage,headers:Mm.headers},Fg,y_=function(B0,K_){if(hm&&Qh.off("inner-kill-task",s_),!Fg){Fg=!0;var E0={};if(og&&og.statusCode&&(E0.statusCode=og.statusCode),og&&og.headers&&(E0.headers=og.headers),B0)Tg.url&&(E0.url=Tg.url),Tg.method&&(E0.method=Tg.method),B0=yd.extend(B0||{},E0),mm(B0,null);else{if(ih.Action==="name/cos:PutObject"){var d0={};for(var nb in ih.headers){var Pb=nb.toLowerCase();d0[Pb]=ih.headers[nb]}d0["x-cos-callback"]?K_.Error?(K_.CallbackError=yd.clone(K_.Error),delete K_.Error):K_.CallbackBody=yd.clone(K_):d0["x-cos-return-body"]&&(K_.Error?(K_.ReturnError=yd.clone(K_.Error),delete K_.Error):K_.ReturnBody=yd.clone(K_))}K_=yd.extend(K_||{},E0),mm(null,K_)}g_=null}};if(pg)return y_(yd.error(pg));var Y_=og.statusCode,s0=Math.floor(Y_/100)===2;if(fg){if(s0)return y_(null,{body:Rg});if(Rg instanceof Blob){yd.readAsBinaryString(Rg,function(u_){var B0=yd.parseResBody(u_),K_=B0.Error||B0;return y_(yd.error(new Error(K_.Message||"response body error"),{code:K_.Code,error:K_}))});return}}var L0=yd.parseResBody(Rg),rb=L0.Error||L0;s0?y_(null,L0):rb?y_(yd.error(new Error(rb.Message),{code:rb.Code,error:rb})):Y_?y_(yd.error(new Error(og.statusMessage),{code:""+Y_})):Y_&&y_(yd.error(new Error("statusCode error")))}}),s_=function Hh(Mm){Mm.TaskId===hm&&(g_&&g_.abort&&g_.abort(),Qh.off("inner-kill-task",Hh))};hm&&Qh.on("inner-kill-task",s_)}}var z0={getService:vd,putBucket:Cd,headBucket:wd,getBucket:Nd,deleteBucket:Ld,putBucketAcl:Ud,getBucketAcl:jd,putBucketCors:Gd,getBucketCors:Yd,deleteBucketCors:zd,getBucketLocation:qd,getBucketPolicy:Xd,putBucketPolicy:Wd,deleteBucketPolicy:Jd,putBucketTagging:Zd,getBucketTagging:mf,deleteBucketTagging:xf,putBucketLifecycle:_f,getBucketLifecycle:vf,deleteBucketLifecycle:gf,putBucketVersioning:Af,getBucketVersioning:Df,putBucketReplication:Of,getBucketReplication:Cf,deleteBucketReplication:If,putBucketWebsite:Ff,getBucketWebsite:sh,deleteBucketWebsite:Sh,putBucketReferer:yh,getBucketReferer:Mh,putBucketDomain:lh,getBucketDomain:rh,deleteBucketDomain:mh,putBucketOrigin:xh,getBucketOrigin:Eh,deleteBucketOrigin:kf,putBucketLogging:Rf,getBucketLogging:_h,putBucketInventory:sm,postBucketInventory:th,getBucketInventory:oh,listBucketInventory:Zh,deleteBucketInventory:Sm,putBucketAccelerate:$h,getBucketAccelerate:Vf,putBucketEncryption:nh,getBucketEncryption:Lh,deleteBucketEncryption:Ih,getObject:Om,headObject:om,listObjectVersions:zh,putObject:Im,deleteObject:Zm,getObjectAcl:Lm,putObjectAcl:Wm,optionsObject:ig,putObjectCopy:yg,deleteMultipleObject:Pf,restoreObject:$f,putObjectTagging:Nh,getObjectTagging:Wh,deleteObjectTagging:_m,selectObjectContent:$m,appendObject:p_,uploadPartCopy:jh,multipartInit:Ym,multipartUpload:Ag,multipartComplete:sg,multipartList:mg,multipartListPart:vg,multipartAbort:kg,request:Kg,getObjectUrl:v_,getAuth:l_};function c0(ih,mm,Qh){yd.each(["Cors","Acl"],function(hm){if(ih.slice(-hm.length)===hm){var Fm=ih.slice(0,-hm.length)+hm.toUpperCase(),Pm=yd.apiWrapper(ih,mm),Vm=!1;Qh[Fm]=function(){!Vm&&console.warn("warning: cos."+Fm+" has been deprecated. Please Use cos."+ih+" instead."),Vm=!0,Pm.apply(this,arguments)}}})}ud.exports.init=function(ih,mm){mm.transferToTaskMethod(z0,"putObject"),yd.each(z0,function(Qh,hm){ih.prototype[hm]=yd.apiWrapper(hm,Qh),c0(hm,Qh,ih.prototype)})}},"./src/cos.js":function(ud,dd,hd){var md=hd("./src/util.js"),gd=hd("./src/event.js"),yd=hd("./src/task.js"),vd=hd("./src/base.js"),Cd=hd("./src/advance.js"),wd=hd("./package.json"),Nd={AppId:"",SecretId:"",SecretKey:"",SecurityToken:"",StartTime:0,ExpiredTime:0,ChunkRetryTimes:2,FileParallelLimit:3,ChunkParallelLimit:3,ChunkSize:1024*1024,SliceSize:1024*1024,CopyChunkParallelLimit:20,CopyChunkSize:1024*1024*10,CopySliceSize:1024*1024*10,MaxPartNumber:1e4,ProgressInterval:1e3,Domain:"",ServiceDomain:"",Protocol:"",CompatibilityMode:!1,ForcePathStyle:!1,UseRawKey:!1,Timeout:0,CorrectClockSkew:!0,SystemClockOffset:0,UploadCheckContentMd5:!1,UploadQueueSize:1e4,UploadAddMetaMd5:!1,UploadIdCacheLimit:50,UseAccelerate:!1,ForceSignHost:!0,AutoSwitchHost:!0,CopySourceParser:null,ObjectKeySimplifyCheck:!0,DeepTracker:!1,TrackerDelay:5e3,CustomId:"",BeaconReporter:null,ClsReporter:null},Ld=function(jd){if(this.options=md.extend(md.clone(Nd),jd||{}),this.options.FileParallelLimit=Math.max(1,this.options.FileParallelLimit),this.options.ChunkParallelLimit=Math.max(1,this.options.ChunkParallelLimit),this.options.ChunkRetryTimes=Math.max(0,this.options.ChunkRetryTimes),this.options.ChunkSize=Math.max(1024*1024,this.options.ChunkSize),this.options.CopyChunkParallelLimit=Math.max(1,this.options.CopyChunkParallelLimit),this.options.CopyChunkSize=Math.max(1024*1024,this.options.CopyChunkSize),this.options.CopySliceSize=Math.max(0,this.options.CopySliceSize),this.options.MaxPartNumber=Math.max(1024,Math.min(1e4,this.options.MaxPartNumber)),this.options.Timeout=Math.max(0,this.options.Timeout),this.options.EnableReporter=this.options.BeaconReporter||this.options.ClsReporter,this.options.AppId&&console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g: "test-1250000000").'),this.options.SecretId&&this.options.SecretId.indexOf(" ")>-1&&(console.error("error: SecretId格式错误,请检查"),console.error("error: SecretId format is incorrect. Please check")),this.options.SecretKey&&this.options.SecretKey.indexOf(" ")>-1&&(console.error("error: SecretKey格式错误,请检查"),console.error("error: SecretKey format is incorrect. Please check")),md.isNode()&&(console.log("Tip: Next.js、Nuxt.js 等服务端渲染技术可正常使用JavaScript SDK,请忽略下方 nodejs 环境警告"),console.warn("warning: cos-js-sdk-v5 不支持 nodejs 环境使用,请改用 cos-nodejs-sdk-v5,参考文档: https://cloud.tencent.com/document/product/436/8629"),console.warn("warning: cos-js-sdk-v5 does not support nodejs environment. Please use cos-nodejs-sdk-v5 instead. See: https://cloud.tencent.com/document/product/436/8629")),this.options.ForcePathStyle)throw console.warn("cos-js-sdk-v5不再支持使用path-style,仅支持使用virtual-hosted-style,参考文档:https://cloud.tencent.com/document/product/436/96243"),new Error("ForcePathStyle is not supported");gd.init(this),yd.init(this)};vd.init(Ld,yd),Cd.init(Ld,yd),Ld.util={md5:md.md5,xml2json:md.xml2json,json2xml:md.json2xml,encodeBase64:md.encodeBase64},Ld.getAuthorization=md.getAuth,Ld.version=wd.version,ud.exports=Ld},"./src/event.js":function(ud,dd){var hd=function(yd){var vd={},Cd=function(Nd){return!vd[Nd]&&(vd[Nd]=[]),vd[Nd]};yd.on=function(wd,Nd){wd==="task-list-update"&&console.warn('warning: Event "'+wd+'" has been deprecated. Please use "list-update" instead.'),Cd(wd).push(Nd)},yd.off=function(wd,Nd){for(var Ld=Cd(wd),Ud=Ld.length-1;Ud>=0;Ud--)Nd===Ld[Ud]&&Ld.splice(Ud,1)},yd.emit=function(wd,Nd){for(var Ld=Cd(wd).map(function(jd){return jd}),Ud=0;Ud=0;qd--){var Wd=vd[qd][2];(!Wd||Wd+yd=0;Wd--){var Xd=vd[Wd];Xd[0]===Yd&&Xd[1]===zd&&vd.splice(Wd,1)}vd.unshift([Yd,zd,Math.round(Date.now()/1e3)]),vd.length>qd&&vd.splice(qd),Ud()}},removeUploadId:function(Yd){Ld.call(this),delete jd.using[Yd];for(var zd=vd.length-1;zd>=0;zd--)vd[zd][1]===Yd&&vd.splice(zd,1);Ud()}};ud.exports=jd},"./src/task.js":function(ud,dd,hd){var md=hd("./src/session.js"),gd=hd("./src/util.js"),yd={},vd=function(Nd,Ld){yd[Ld]=Nd[Ld],Nd[Ld]=function(Ud,jd){Ud.SkipTask?yd[Ld].call(this,Ud,jd):this._addTask(Ld,Ud,jd)}},Cd=function(Nd){var Ld=[],Ud={},jd=0,Gd=0,Yd=function(mf){var xf={id:mf.id,Bucket:mf.Bucket,Region:mf.Region,Key:mf.Key,FilePath:mf.FilePath,state:mf.state,loaded:mf.loaded,size:mf.size,speed:mf.speed,percent:mf.percent,hashPercent:mf.hashPercent,error:mf.error};return mf.FilePath&&(xf.FilePath=mf.FilePath),mf._custom&&(xf._custom=mf._custom),xf},zd=function(){var Zd,mf=function(){Zd=0,Nd.emit("task-list-update",{list:gd.map(Ld,Yd)}),Nd.emit("list-update",{list:gd.map(Ld,Yd)})};return function(){Zd||(Zd=setTimeout(mf))}}(),qd=function(){if(!(Ld.length<=Nd.options.UploadQueueSize)){for(var mf=0;mfNd.options.UploadQueueSize;){var xf=Ld[mf].state==="waiting"||Ld[mf].state==="checking"||Ld[mf].state==="uploading";!Ld[mf]||!xf?(Ud[Ld[mf].id]&&delete Ud[Ld[mf].id],Ld.splice(mf,1),Gd--):mf++}zd()}},Wd=function Zd(){if(!(jd>=Nd.options.FileParallelLimit)){for(;Ld[Gd]&&Ld[Gd].state!=="waiting";)Gd++;if(!(Gd>=Ld.length)){var mf=Ld[Gd];Gd++,jd++,mf.state="checking",mf.params.onTaskStart&&mf.params.onTaskStart(Yd(mf)),!mf.params.UploadData&&(mf.params.UploadData={});var xf=gd.formatParams(mf.api,mf.params);yd[mf.api].call(Nd,xf,function(_f,vf){Nd._isRunningTask(mf.id)&&((mf.state==="checking"||mf.state==="uploading")&&(mf.state=_f?"error":"success",_f&&(mf.error=_f),jd--,zd(),Zd(),mf.callback&&mf.callback(_f,vf),mf.state==="success"&&(mf.params&&(delete mf.params.UploadData,delete mf.params.Body,delete mf.params),delete mf.callback)),qd())}),zd(),setTimeout(Zd)}}},Xd=function(mf,xf){var _f=Ud[mf];if(_f){var vf=_f&&_f.state==="waiting",gf=_f&&(_f.state==="checking"||_f.state==="uploading");if(xf==="canceled"&&_f.state!=="canceled"||xf==="paused"&&vf||xf==="paused"&&gf){_f.state=xf,Nd.emit("inner-kill-task",{TaskId:mf,toState:xf});try{var Af=_f&&_f.params&&_f.params.UploadData.UploadId}catch{}xf==="canceled"&&Af&&md.removeUsing(Af),zd(),gf&&(jd--,Wd()),xf==="canceled"&&(_f.params&&(delete _f.params.UploadData,delete _f.params.Body,delete _f.params),delete _f.callback)}qd()}};Nd._addTasks=function(Zd){gd.each(Zd,function(mf){Nd._addTask(mf.api,mf.params,mf.callback,!0)}),zd()};var Jd=!0;Nd._addTask=function(Zd,mf,xf,_f){mf=gd.formatParams(Zd,mf);var vf=gd.uuid();mf.TaskId=vf,mf.onTaskReady&&mf.onTaskReady(vf),mf.TaskReady&&(mf.TaskReady(vf),Jd&&console.warn('warning: Param "TaskReady" has been deprecated. Please use "onTaskReady" instead.'),Jd=!1);var gf={params:mf,callback:xf,api:Zd,index:Ld.length,id:vf,Bucket:mf.Bucket,Region:mf.Region,Key:mf.Key,FilePath:mf.FilePath||"",state:"waiting",loaded:0,size:0,speed:0,percent:0,hashPercent:0,error:null,_custom:mf._custom},Af=mf.onHashProgress;mf.onHashProgress=function(Of){Nd._isRunningTask(gf.id)&&(gf.hashPercent=Of.percent,Af&&Af(Of),zd())};var Df=mf.onProgress;return mf.onProgress=function(Of){Nd._isRunningTask(gf.id)&&(gf.state==="checking"&&(gf.state="uploading"),gf.loaded=Of.loaded,gf.speed=Of.speed,gf.percent=Of.percent,Df&&Df(Of),zd())},gd.getFileSize(Zd,mf,function(Of,Cf){if(Of)return xf(gd.error(Of));Ud[vf]=gf,Ld.push(gf),gf.size=Cf,!_f&&zd(),Wd(),qd()}),vf},Nd._isRunningTask=function(Zd){var mf=Ud[Zd];return!!(mf&&(mf.state==="checking"||mf.state==="uploading"))},Nd.getTaskList=function(){return gd.map(Ld,Yd)},Nd.cancelTask=function(Zd){Xd(Zd,"canceled")},Nd.pauseTask=function(Zd){Xd(Zd,"paused")},Nd.restartTask=function(Zd){var mf=Ud[Zd];mf&&(mf.state==="paused"||mf.state==="error")&&(mf.state="waiting",zd(),Gd=Math.min(Gd,mf.index),Wd())},Nd.isUploadRunning=function(){return jd||Gd"u"?"undefined":yd(navigator))==="object"){var xf=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return(xf==null?void 0:xf.type)||(xf==null?void 0:xf.effectiveType)||"unknown"}return"unknown"},getProtocol:function(){return(typeof location>"u"?"undefined":yd(location))==="object"?location.protocol.replace(/:/,""):"unknown protocol"},getOsType:function(){if((typeof navigator>"u"?"undefined":yd(navigator))!=="object")return"unknown os";var xf=navigator.userAgent.toLowerCase(),_f=/macintosh|mac os x/i.test(navigator.userAgent);return xf.indexOf("win32")>=0||xf.indexOf("wow32")>=0?"win32":xf.indexOf("win64")>=0||xf.indexOf("wow64")>=0?"win64":_f?"mac":"unknown os"},isMobile:function(){var xf=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i;return!!((typeof navigator>"u"?"undefined":yd(navigator))==="object"&&navigator.userAgent.match(xf))},isAndroid:function(){var xf=/(Android|Adr|Linux)/i;return!!((typeof navigator>"u"?"undefined":yd(navigator))==="object"&&navigator.userAgent.match(xf))},isIOS:function(){var xf=/(iPhone|iPod|iPad|iOS)/i;return!!((typeof navigator>"u"?"undefined":yd(navigator))==="object"&&navigator.userAgent.match(xf))},isOtherMobile:function(){return Ud&&!isAndroid&&!isIOS},getUA:function(){if((typeof navigator>"u"?"undefined":yd(navigator))!=="object")return"unknown device";var xf=navigator.userAgent;return xf}},Ud=Ld.isMobile(),jd=Ld.isAndroid()?"android":Ld.isIOS?"ios":"other_mobile",Gd=Ld.getOsType(),Yd=Ud?jd:Gd,zd=Ld.getUA(),qd=Ld.getProtocol(),Wd=function(xf){return["putObject","sliceUploadFile","uploadFile","uploadFiles"].includes(xf)?"UploadTask":xf==="getObject"?"DownloadTask":["putObjectCopy","sliceCopyFile"].includes(xf)?"CopyTask":xf};function Xd(mf){return mf.replace(/([A-Z])/g,"_$1").toLowerCase()}function Jd(mf){var xf={},_f=["sdkVersionName","sdkVersionCode","osName","networkType","requestName","requestResult","bucket","region","appid","accelerate","url","host","requestPath","userAgent","networkProtocol","httpMethod","httpSize","httpSpeed","httpTookTime","httpMd5","httpSign","httpFullTime","httpDomain","partNumber","httpRetryTimes","customId","traceId","realApi"],vf=[].concat(_f,["errorNode","errorCode","errorName","errorMessage","errorRequestId","errorHttpCode","errorServiceName","errorType","fullError"]),gf=mf.requestResult==="Success"?_f:vf;for(var Af in mf)if(gf.includes(Af)){var Df=Xd(Af);xf[Df]=mf[Af]}return xf.request_name=mf.realApi?Wd(mf.realApi):mf.requestName,xf}var Zd=function(){function mf(xf){md(this,mf);var _f=xf.parent,vf=xf.traceId,gf=xf.bucket,Af=xf.region,Df=xf.apiName,Of=xf.realApi,Cf=xf.httpMethod,If=xf.fileKey,Ff=xf.fileSize,sh=xf.accelerate,Sh=xf.customId,yh=xf.delay,Mh=xf.deepTracker,lh=xf.Beacon,rh=xf.clsReporter,mh=gf&&gf.substr(gf.lastIndexOf("-")+1)||"";this.parent=_f,this.deepTracker=Mh,this.delay=yh,rh&&!this.clsReporter&&(this.clsReporter=rh),this.params={sdkVersionName:"cos-js-sdk-v5",sdkVersionCode:vd.version,osName:Yd,networkType:"",requestName:Df||"",requestResult:"",realApi:Of,bucket:gf,region:Af,accelerate:sh,httpMethod:Cf,url:"",host:"",httpDomain:"",requestPath:If||"",userAgent:zd,networkProtocol:qd,errorType:"",errorCode:"",errorName:"",errorMessage:"",errorRequestId:"",errorHttpCode:0,errorServiceName:"",errorNode:"",httpTookTime:0,httpSize:Ff||0,httpMd5:0,httpSign:0,httpFullTime:0,httpSpeed:0,md5StartTime:0,md5EndTime:0,signStartTime:0,signEndTime:0,httpStartTime:0,httpEndTime:0,startTime:new Date().getTime(),endTime:0,traceId:vf||Ld.getUid(),appid:mh,partNumber:0,httpRetryTimes:0,customId:Sh||"",partTime:0},lh&&(this.beacon=wd(lh,yh))}return gd(mf,[{key:"formatResult",value:function(_f,vf){var gf,Af,Df,Of,Cf,If,Ff=new Date().getTime(),sh=Ld.getNetType(),Sh=_f?(_f==null?void 0:_f.code)||(_f==null||(gf=_f.error)===null||gf===void 0?void 0:gf.code)||(_f==null||(Af=_f.error)===null||Af===void 0?void 0:Af.Code):"",yh=_f?(_f==null?void 0:_f.message)||(_f==null||(Df=_f.error)===null||Df===void 0?void 0:Df.message)||(_f==null||(Of=_f.error)===null||Of===void 0?void 0:Of.Message):"",Mh=yh,lh=_f?(_f==null?void 0:_f.resource)||(_f==null||(Cf=_f.error)===null||Cf===void 0?void 0:Cf.resource)||(_f==null||(If=_f.error)===null||If===void 0?void 0:If.Resource):"",rh=_f?_f==null?void 0:_f.statusCode:vf.statusCode,mh=_f?(_f==null?void 0:_f.headers)&&(_f==null?void 0:_f.headers["x-cos-request-id"]):(vf==null?void 0:vf.headers)&&(vf==null?void 0:vf.headers["x-cos-request-id"]),xh=_f?mh?"Server":"Client":"";this.params.requestName==="getObject"&&(this.params.httpSize=vf?vf.headers&&vf.headers["content-length"]:0);var Eh=this.params.realApi==="sliceUploadFile",kf=this.params.realApi==="sliceCopyFile";if(Eh||kf){var Rf=this.params.httpSize/1024/this.params.partTime;Object.assign(this.params,{httpSpeed:Rf<0?0:Rf.toFixed(3)})}else{var _h=Ff-this.params.startTime,Ph=this.params.httpEndTime-this.params.httpStartTime,sm=this.params.httpSize/1024/(Ph/1e3),th=this.params.md5EndTime-this.params.md5StartTime,oh=this.params.signEndTime-this.params.signStartTime;this.parent&&(this.parent.addParamValue("httpTookTime",Nd(Ph)),this.parent.addParamValue("httpFullTime",Nd(_h)),this.parent.addParamValue("httpMd5",Nd(th)),this.parent.addParamValue("httpSign",Nd(oh)),["multipartUpload","uploadPartCopy","putObjectCopy"].includes(this.params.requestName)&&this.parent.addParamValue("partTime",Nd(Ph))),Object.assign(this.params,{httpFullTime:Nd(_h),httpMd5:Nd(th),httpSign:Nd(oh),httpTookTime:Nd(Ph),httpSpeed:sm<0?0:sm.toFixed(3)})}if(Object.assign(this.params,{networkType:sh,requestResult:_f?"Failure":"Success",errorType:xh,errorCode:Sh,errorHttpCode:rh,errorName:Mh,errorMessage:yh,errorServiceName:lh,errorRequestId:mh}),_f&&(!Sh||!yh)&&(this.params.fullError=_f?JSON.stringify(_f):""),this.params.url){try{var Zh=/^http(s)?:\/\/(.*?)\//.exec(this.params.url);this.params.host=Zh[2]}catch{this.params.host=this.params.url}this.params.httpDomain=this.params.host}}},{key:"report",value:function(_f,vf){if(!(!this.beacon&&!this.clsReporter)){this.formatResult(_f,vf);var gf=Jd(this.params);this.beacon&&this.sendEventsToBeacon(gf),this.clsReporter&&this.sendEventsToCLS(gf)}}},{key:"setParams",value:function(_f){Object.assign(this.params,_f)}},{key:"addParamValue",value:function(_f,vf){this.params[_f]=(+this.params[_f]+ +vf).toFixed(3)}},{key:"sendEventsToBeacon",value:function(_f){var vf=this.params.requestName==="sliceUploadFile"||this.params.realApi==="sliceUploadFile";if(!(vf&&!this.deepTracker)){var gf="qcloud_track_cos_sdk";this.delay===0?this.beacon&&this.beacon.onDirectUserAction(gf,_f):this.beacon&&this.beacon.onUserAction(gf,_f)}}},{key:"sendEventsToCLS",value:function(_f){var vf=this.delay===0;this.clsReporter.log(_f,vf)}},{key:"generateSubTracker",value:function(_f){return Object.assign(_f,{parent:this,deepTracker:this.deepTracker,traceId:this.params.traceId,bucket:this.params.bucket,region:this.params.region,accelerate:this.params.accelerate,fileKey:this.params.requestPath,customId:this.params.customId,delay:this.delay,clsReporter:this.clsReporter}),new mf(_f)}}]),mf}();ud.exports=Zd},"./src/util.js":function(ud,dd,hd){(function(md){var gd=hd("./node_modules/@babel/runtime/helpers/typeof.js");function yd(Pf,$f){var Nh=typeof Symbol<"u"&&Pf[Symbol.iterator]||Pf["@@iterator"];if(!Nh){if(Array.isArray(Pf)||(Nh=vd(Pf))||$f){Nh&&(Pf=Nh);var Wh=0,_m=function(){};return{s:_m,n:function(){return Wh>=Pf.length?{done:!0}:{done:!1,value:Pf[Wh++]}},e:function(mg){throw mg},f:_m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $m,Ym=!0,Ag=!1;return{s:function(){Nh=Nh.call(Pf)},n:function(){var mg=Nh.next();return Ym=mg.done,mg},e:function(mg){Ag=!0,$m=mg},f:function(){try{Ym||Nh.return==null||Nh.return()}finally{if(Ag)throw $m}}}}function vd(Pf,$f){if(Pf){if(typeof Pf=="string")return Cd(Pf,$f);var Nh={}.toString.call(Pf).slice(8,-1);return Nh==="Object"&&Pf.constructor&&(Nh=Pf.constructor.name),Nh==="Map"||Nh==="Set"?Array.from(Pf):Nh==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Nh)?Cd(Pf,$f):void 0}}function Cd(Pf,$f){($f==null||$f>Pf.length)&&($f=Pf.length);for(var Nh=0,Wh=Array($f);Nh<$f;Nh++)Wh[Nh]=Pf[Nh];return Wh}var wd=hd("./lib/md5.js"),Nd=hd("./lib/crypto.js"),Ld=hd("./node_modules/fast-xml-parser/src/fxp.js"),Ud=Ld.XMLParser,jd=Ld.XMLBuilder,Gd=new Ud({ignoreDeclaration:!0,ignoreAttributes:!0,parseTagValue:!1}),Yd=new jd,zd=hd("./lib/base64.js"),qd=hd("./src/tracker.js"),Wd=function($f){var Nh=Gd.parse($f);return Nh},Xd=function($f){var Nh=Yd.build($f);return Nh};function Jd(Pf){return encodeURIComponent(Pf).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A")}function Zd(Pf,$f){var Nh=[];for(var Wh in Pf)Pf.hasOwnProperty(Wh)&&Nh.push($f?Jd(Wh).toLowerCase():Wh);return Nh.sort(function(_m,$m){return _m=_m.toLowerCase(),$m=$m.toLowerCase(),_m===$m?0:_m>$m?1:-1})}var mf=function($f,Nh){var Wh,_m,$m,Ym=[],Ag=Zd($f);for(Wh=0;Wh-1||xf.indexOf(_m)>-1)&&(Nh[Wh]=$f[Wh])}return Nh},vf=function($f){$f=$f||{};var Nh=$f.SecretId,Wh=$f.SecretKey,_m=$f.KeyTime,$m=($f.method||$f.Method||"get").toLowerCase(),Ym=rh($f.Query||$f.params||{}),Ag=_f(rh($f.Headers||$f.headers||{})),sg=$f.Key||"",mg;$f.UseRawKey?mg=$f.Pathname||$f.pathname||"/"+sg:(mg=$f.Pathname||$f.pathname||sg,mg.indexOf("/")!==0&&(mg="/"+mg));var vg=$f.ForceSignHost!==!1;if(!Ag.Host&&!Ag.host&&$f.Bucket&&$f.Region&&vg&&(Ag.Host=$f.Bucket+".cos."+$f.Region+".myqcloud.com"),!Nh)throw new Error("missing param SecretId");if(!Wh)throw new Error("missing param SecretKey");var kg=Math.round(Lh($f.SystemClockOffset)/1e3)-1,Kg=kg,p_=$f.Expires||$f.expires;p_===void 0?Kg+=900:Kg+=p_*1||0;var l_="sha1",v_=Nh,r_=_m||kg+";"+Kg,O_=_m||kg+";"+Kg,S_=Zd(Ag,!0).join(";").toLowerCase(),Q_=Zd(Ym,!0).join(";").toLowerCase(),t0=Nd.HmacSHA1(O_,Wh).toString(),R_=[$m,mg,jh.obj2str(Ym,!0),jh.obj2str(Ag,!0),""].join(` +`),P_=["sha1",r_,Nd.SHA1(R_).toString(),""].join(` +`),Pg=Nd.HmacSHA1(P_,t0).toString(),$0=["q-sign-algorithm="+l_,"q-ak="+v_,"q-sign-time="+r_,"q-key-time="+O_,"q-header-list="+S_,"q-url-param-list="+Q_,"q-signature="+Pg].join("&");return $0},gf=function($f,Nh,Wh){var _m=Nh/8,$m=$f.slice(Wh,Wh+_m);return new Uint8Array($m).reverse(),new{8:Uint8Array,16:Uint16Array,32:Uint32Array}[Nh]($m)[0]},Af=function($f,Nh,Wh,_m){var $m=$f.slice(Nh,Wh),Ym="";return new Uint8Array($m).forEach(function(Ag){Ym+=String.fromCharCode(Ag)}),_m&&(Ym=decodeURIComponent(escape(Ym))),Ym},Df=function($f){for(var Nh={},Wh=Af($f),_m={records:[]};$f.byteLength;){var $m=gf($f,32,0),Ym=gf($f,32,4),Ag=$m-Ym-16,sg=0,mg;for($f=$f.slice(12);sgparseInt(_m[$m])?1:-1;return 0},$f=function(Wh){if(!Wh)return!1;var _m=(Wh.match(/Chrome\/([.\d]+)/)||[])[1],$m=(Wh.match(/QBCore\/([.\d]+)/)||[])[1],Ym=(Wh.match(/QQBrowser\/([.\d]+)/)||[])[1],Ag=_m&&Pf(_m,"53.0.2785.116")<0&&$m&&Pf($m,"3.53.991.400")<0&&Ym&&Pf(Ym,"9.0.2524.400")<=0||!1;return Ag};return $f(typeof navigator<"u"&&navigator.userAgent)}(),Sh=function($f,Nh,Wh,_m,$m){var Ym;if($f.slice?Ym=$f.slice(Nh,Wh):$f.mozSlice?Ym=$f.mozSlice(Nh,Wh):$f.webkitSlice&&(Ym=$f.webkitSlice(Nh,Wh)),_m&&sh){var Ag=new FileReader;Ag.onload=function(sg){Ym=null,$m(new Blob([Ag.result]))},Ag.readAsArrayBuffer(Ym)}else $m(Ym)},yh=function($f,Nh,Wh,_m){Wh=Wh||Cf,$f?typeof Nh=="string"?Wh(jh.md5(Nh,!0)):Blob&&Nh instanceof Blob?jh.getFileMd5(Nh,function($m,Ym){Wh(Ym)},_m):Wh():Wh()},Mh=1024*1024,lh=function($f,Nh,Wh){var _m=$f.size,$m=0,Ym=wd.getCtx(),Ag=function sg(mg){if(mg>=_m){var vg=Ym.digest("hex");Nh(null,vg);return}var kg=Math.min(_m,mg+Mh);jh.fileSlice($f,mg,kg,!1,function(Kg){Ff(Kg,function(p_){Kg=null,Ym=Ym.update(p_,!0),$m+=p_.length,p_=null,Wh&&Wh({loaded:$m,total:_m,percent:Math.round($m/_m*1e4)/1e4}),sg(mg+Mh)})})};Ag(0)};function rh(Pf){return Ph(Pf,function($f){return gd($f)==="object"&&$f!==null?rh($f):$f})}function mh(Pf,$f,Nh){return Pf&&$f in Pf?Pf[$f]:Nh}function xh(Pf,$f){return _h($f,function(Nh,Wh){Pf[Wh]=$f[Wh]}),Pf}function Eh(Pf){return Pf instanceof Array}function kf(Pf,$f){for(var Nh=!1,Wh=0;Wh-1,sg=!Ym||typeof Ym=="string"&&Ym.indexOf("{Region}")>-1;if($f.indexOf("Bucket")>-1||$f==="deleteMultipleObject"||$f==="multipartList"||$f==="listObjectVersions"){if(Ag&&!Wh)return"Bucket";if(sg&&!_m)return"Region"}else if($f.indexOf("Object")>-1||$f.indexOf("multipart")>-1||$f==="sliceUploadFile"||$f==="abortUploadTask"||$f==="uploadFile"){if(Ag&&!Wh)return"Bucket";if(sg&&!_m)return"Region";if(!$m)return"Key"}return!1},Sm=function($f,Nh){if(Nh=xh({},Nh),$f!=="getAuth"&&$f!=="getV4Auth"&&$f!=="getObjectUrl"){var Wh=Nh.Headers||{};if(Nh&&gd(Nh)==="object"){(function(){for(var $m in Nh)Nh.hasOwnProperty($m)&&$m.indexOf("x-cos-")>-1&&(Wh[$m]=Nh[$m])})();var _m={"x-cos-mfa":"MFA","Content-MD5":"ContentMD5","Content-Length":"ContentLength","Content-Type":"ContentType",Expect:"Expect",Expires:"Expires","Cache-Control":"CacheControl","Content-Disposition":"ContentDisposition","Content-Encoding":"ContentEncoding",Range:"Range","If-Modified-Since":"IfModifiedSince","If-Unmodified-Since":"IfUnmodifiedSince","If-Match":"IfMatch","If-None-Match":"IfNoneMatch","x-cos-copy-source":"CopySource","x-cos-copy-source-Range":"CopySourceRange","x-cos-metadata-directive":"MetadataDirective","x-cos-copy-source-If-Modified-Since":"CopySourceIfModifiedSince","x-cos-copy-source-If-Unmodified-Since":"CopySourceIfUnmodifiedSince","x-cos-copy-source-If-Match":"CopySourceIfMatch","x-cos-copy-source-If-None-Match":"CopySourceIfNoneMatch","x-cos-acl":"ACL","x-cos-grant-read":"GrantRead","x-cos-grant-write":"GrantWrite","x-cos-grant-full-control":"GrantFullControl","x-cos-grant-read-acp":"GrantReadAcp","x-cos-grant-write-acp":"GrantWriteAcp","x-cos-storage-class":"StorageClass","x-cos-traffic-limit":"TrafficLimit","x-cos-mime-limit":"MimeLimit","x-cos-server-side-encryption-customer-algorithm":"SSECustomerAlgorithm","x-cos-server-side-encryption-customer-key":"SSECustomerKey","x-cos-server-side-encryption-customer-key-MD5":"SSECustomerKeyMD5","x-cos-server-side-encryption":"ServerSideEncryption","x-cos-server-side-encryption-cos-kms-key-id":"SSEKMSKeyId","x-cos-server-side-encryption-context":"SSEContext","Pic-Operations":"PicOperations","x-cos-callback":"Callback","x-cos-callback-var":"CallbackVar","x-cos-return-body":"ReturnBody"};jh.each(_m,function($m,Ym){Nh[$m]!==void 0&&(Wh[Ym]=Nh[$m])}),Nh.Headers=If(Wh)}}return Nh},$h=function($f,Nh){return function(Wh,_m){var $m=this;typeof Wh=="function"&&(_m=Wh,Wh={}),Wh=Sm($f,Wh);var Ym;if($m.options.EnableReporter)if(Wh.calledBySdk==="sliceUploadFile"||Wh.calledBySdk==="sliceCopyFile")Ym=Wh.tracker&&Wh.tracker.generateSubTracker({apiName:$f});else if(["uploadFile","uploadFiles"].includes($f))Ym=null;else{var Ag=0;Wh.Body&&(Ag=typeof Wh.Body=="string"?Wh.Body.length:Wh.Body.size||Wh.Body.byteLength||0);var sg=$m.options.UseAccelerate||typeof $m.options.Domain=="string"&&$m.options.Domain.includes("accelerate.");Ym=new qd({Beacon:$m.options.BeaconReporter,clsReporter:$m.options.ClsReporter,bucket:Wh.Bucket,region:Wh.Region,apiName:$f,realApi:$f,accelerate:sg,fileKey:Wh.Key,fileSize:Ag,deepTracker:$m.options.DeepTracker,customId:$m.options.CustomId,delay:$m.options.TrackerDelay})}Wh.tracker=Ym;var mg=function(r_){return r_&&r_.headers&&(r_.headers["x-cos-request-id"]&&(r_.RequestId=r_.headers["x-cos-request-id"]),r_.headers["x-ci-request-id"]&&(r_.RequestId=r_.headers["x-ci-request-id"]),r_.headers["x-cos-version-id"]&&(r_.VersionId=r_.headers["x-cos-version-id"]),r_.headers["x-cos-delete-marker"]&&(r_.DeleteMarker=r_.headers["x-cos-delete-marker"])),r_},vg=function(r_,O_){Ym&&Ym.report(r_,O_),_m&&_m(mg(r_),mg(O_))},kg=function(){if($f!=="getService"&&$f!=="abortUploadTask"){var r_=Zh.call($m,$f,Wh);if(r_)return"missing param "+r_;if(Wh.Region){if($m.options.CompatibilityMode){if(!/^([a-z\d-.]+)$/.test(Wh.Region))return"Region format error."}else{if(Wh.Region.indexOf("cos.")>-1)return'param Region should not be start with "cos."';if(!/^([a-z\d-]+)$/.test(Wh.Region))return"Region format error."}!$m.options.CompatibilityMode&&Wh.Region.indexOf("-")===-1&&Wh.Region!=="yfb"&&Wh.Region!=="default"&&Wh.Region!=="accelerate"&&console.warn("warning: param Region format error, find help here: https://cloud.tencent.com/document/product/436/6224")}if(Wh.Bucket){if(!/^([a-z\d-]+)-(\d+)$/.test(Wh.Bucket))if(Wh.AppId)Wh.Bucket=Wh.Bucket+"-"+Wh.AppId;else if($m.options.AppId)Wh.Bucket=Wh.Bucket+"-"+$m.options.AppId;else return'Bucket should format as "test-1250000000".';Wh.AppId&&(console.warn('warning: AppId has been deprecated, Please put it at the end of parameter Bucket(E.g Bucket:"test-1250000000" ).'),delete Wh.AppId)}!$m.options.UseRawKey&&Wh.Key&&Wh.Key.substr(0,1)==="/"&&(Wh.Key=Wh.Key.substr(1))}},Kg=kg(),p_=["getAuth","getObjectUrl"].includes($f);if(typeof Promise=="function"&&!p_&&!_m)return new Promise(function(v_,r_){if(_m=function(S_,Q_){S_?r_(S_):v_(Q_)},Kg)return vg(jh.error(new Error(Kg)));Nh.call($m,Wh,vg)});if(Kg)return vg(jh.error(new Error(Kg)));var l_=Nh.call($m,Wh,vg);if(p_)return l_}},Vf=function($f,Nh){var Wh=this,_m=0,$m=0,Ym=Date.now(),Ag,sg;function mg(){if(sg=0,Nh&&typeof Nh=="function"){Ag=Date.now();var vg=Math.max(0,Math.round(($m-_m)/((Ag-Ym)/1e3)*100)/100)||0,kg;$m===0&&$f===0?kg=1:kg=Math.floor($m/$f*100)/100||0,Ym=Ag,_m=$m;try{Nh({loaded:$m,total:$f,speed:vg,percent:kg})}catch{}}}return function(vg,kg){if(vg&&($m=vg.loaded,$f=vg.total),kg)clearTimeout(sg),mg();else{if(sg)return;sg=setTimeout(mg,Wh.options.ProgressInterval)}}},nh=function($f,Nh,Wh){var _m;if(typeof Nh.Body=="string"?Nh.Body=new Blob([Nh.Body],{type:"text/plain"}):Nh.Body instanceof ArrayBuffer&&(Nh.Body=new Blob([Nh.Body])),Nh.Body&&(Nh.Body instanceof Blob||Nh.Body.toString()==="[object File]"||Nh.Body.toString()==="[object Blob]"))_m=Nh.Body.size;else{Wh(jh.error(new Error("params body format error, Only allow File|Blob|String.")));return}Nh.ContentLength=_m,Wh(null,_m)},Lh=function($f){return Date.now()+($f||0)},Ih=function($f,Nh){var Wh=$f;return $f.message=$f.message||null,typeof Nh=="string"?($f.error=Nh,$f.message=Nh):gd(Nh)==="object"&&Nh!==null&&(xh($f,Nh),(Nh.code||Nh.name)&&($f.code=Nh.code||Nh.name),Nh.message&&($f.message=Nh.message),Nh.stack&&($f.stack=Nh.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty($f,"name",{writable:!0,enumerable:!1}),Object.defineProperty($f,"message",{enumerable:!0})),$f.name=Nh&&Nh.name||$f.name||$f.code||"Error",$f.code||($f.code=$f.name),$f.error||($f.error=rh(Wh)),$f},om=function(){return(typeof globalThis>"u"?"undefined":gd(globalThis))==="object"&&(globalThis.constructor.name==="DedicatedWorkerGlobalScope"||globalThis.FileReaderSync)},zh=function(){return(typeof window>"u"?"undefined":gd(window))!=="object"&&(typeof md>"u"?"undefined":gd(md))==="object"&&!0&&!om()},Om=function($f){return/^https?:\/\/([^/]+\.)?ci\.[^/]+/.test($f)},Im=function(){if((typeof navigator>"u"?"undefined":gd(navigator))!=="object")return!1;var Pf=navigator.userAgent,$f=!!Pf.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return $f}(),Zm=function(){return(typeof navigator>"u"?"undefined":gd(navigator))!=="object"?!1:/\sQQ/i.test(navigator.userAgent)}(),Lm=function($f,Nh){var Wh=zd.encode($f);return Nh&&(Wh=Wh.replaceAll("+","-").replaceAll("/","_").replaceAll("=","")),Wh},Wm=function($f){return $f?zd.decode($f):""},ig=function($f){var Nh=$f.split("/"),Wh=[],_m=yd(Nh),$m;try{for(_m.s();!($m=_m.n()).done;){var Ym=$m.value;Ym===".."?Wh.length&&Wh.pop():Ym.length&&Ym!=="."&&Wh.push(Ym)}}catch(Ag){_m.e(Ag)}finally{_m.f()}return"/"+Wh.join("/")},yg=function($f){var Nh;if($f&&typeof $f=="string"){var Wh=$f.trim(),_m=Wh.indexOf("<")===0,$m=Wh.indexOf("{")===0;if(_m)Nh=jh.xml2json($f)||{};else if($m)try{var Ym=$f.replace(/\n/g," "),Ag=JSON.parse(Ym);Object.prototype.toString.call(Ag)==="[object Object]"?Nh=Ag:Nh=$f}catch{Nh=$f}else Nh=$f}else Nh=$f||{};return Nh},jh={noop:Cf,formatParams:Sm,apiWrapper:$h,xml2json:Wd,json2xml:Xd,md5:wd,clearKey:If,fileSlice:Sh,getBodyMd5:yh,getFileMd5:lh,b64:th,extend:xh,isArray:Eh,isInArray:kf,makeArray:Rf,each:_h,map:Ph,filter:sm,clone:rh,attr:mh,uuid:oh,camSafeUrlEncode:Jd,throttleOnProgress:Vf,getFileSize:nh,getSkewTime:Lh,error:Ih,obj2str:mf,getAuth:vf,parseSelectPayload:Df,getSourceParams:Of,isBrowser:!0,isNode:zh,isCIHost:Om,isIOS_QQ:Im&&Zm,encodeBase64:Lm,decodeBase64:Wm,simplifyPath:ig,readAsBinaryString:Ff,parseResBody:yg};ud.exports=jh}).call(this,hd("./node_modules/process/browser.js"))}})})})(cosJsSdkV5);var cosJsSdkV5Exports=cosJsSdkV5.exports;const COS=getDefaultExportFromCjs(cosJsSdkV5Exports);var cryptoJs={exports:{}},core={exports:{}};const __viteBrowserExternal={},http=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$0$1=getAugmentedNamespace(http);var hasRequiredCore;function requireCore(){return hasRequiredCore||(hasRequiredCore=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd()})(commonjsGlobal,function(){var ud=ud||function(dd,hd){var md;if(typeof window<"u"&&window.crypto&&(md=window.crypto),typeof self<"u"&&self.crypto&&(md=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(md=globalThis.crypto),!md&&typeof window<"u"&&window.msCrypto&&(md=window.msCrypto),!md&&typeof commonjsGlobal<"u"&&commonjsGlobal.crypto&&(md=commonjsGlobal.crypto),!md&&typeof commonjsRequire=="function")try{md=require$$0$1}catch{}var gd=function(){if(md){if(typeof md.getRandomValues=="function")try{return md.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof md.randomBytes=="function")try{return md.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},yd=Object.create||function(){function qd(){}return function(Wd){var Xd;return qd.prototype=Wd,Xd=new qd,qd.prototype=null,Xd}}(),vd={},Cd=vd.lib={},wd=Cd.Base=function(){return{extend:function(qd){var Wd=yd(this);return qd&&Wd.mixIn(qd),(!Wd.hasOwnProperty("init")||this.init===Wd.init)&&(Wd.init=function(){Wd.$super.init.apply(this,arguments)}),Wd.init.prototype=Wd,Wd.$super=this,Wd},create:function(){var qd=this.extend();return qd.init.apply(qd,arguments),qd},init:function(){},mixIn:function(qd){for(var Wd in qd)qd.hasOwnProperty(Wd)&&(this[Wd]=qd[Wd]);qd.hasOwnProperty("toString")&&(this.toString=qd.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),Nd=Cd.WordArray=wd.extend({init:function(qd,Wd){qd=this.words=qd||[],Wd!=hd?this.sigBytes=Wd:this.sigBytes=qd.length*4},toString:function(qd){return(qd||Ud).stringify(this)},concat:function(qd){var Wd=this.words,Xd=qd.words,Jd=this.sigBytes,Zd=qd.sigBytes;if(this.clamp(),Jd%4)for(var mf=0;mf>>2]>>>24-mf%4*8&255;Wd[Jd+mf>>>2]|=xf<<24-(Jd+mf)%4*8}else for(var _f=0;_f>>2]=Xd[_f>>>2];return this.sigBytes+=Zd,this},clamp:function(){var qd=this.words,Wd=this.sigBytes;qd[Wd>>>2]&=4294967295<<32-Wd%4*8,qd.length=dd.ceil(Wd/4)},clone:function(){var qd=wd.clone.call(this);return qd.words=this.words.slice(0),qd},random:function(qd){for(var Wd=[],Xd=0;Xd>>2]>>>24-Zd%4*8&255;Jd.push((mf>>>4).toString(16)),Jd.push((mf&15).toString(16))}return Jd.join("")},parse:function(qd){for(var Wd=qd.length,Xd=[],Jd=0;Jd>>3]|=parseInt(qd.substr(Jd,2),16)<<24-Jd%8*4;return new Nd.init(Xd,Wd/2)}},jd=Ld.Latin1={stringify:function(qd){for(var Wd=qd.words,Xd=qd.sigBytes,Jd=[],Zd=0;Zd>>2]>>>24-Zd%4*8&255;Jd.push(String.fromCharCode(mf))}return Jd.join("")},parse:function(qd){for(var Wd=qd.length,Xd=[],Jd=0;Jd>>2]|=(qd.charCodeAt(Jd)&255)<<24-Jd%4*8;return new Nd.init(Xd,Wd)}},Gd=Ld.Utf8={stringify:function(qd){try{return decodeURIComponent(escape(jd.stringify(qd)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(qd){return jd.parse(unescape(encodeURIComponent(qd)))}},Yd=Cd.BufferedBlockAlgorithm=wd.extend({reset:function(){this._data=new Nd.init,this._nDataBytes=0},_append:function(qd){typeof qd=="string"&&(qd=Gd.parse(qd)),this._data.concat(qd),this._nDataBytes+=qd.sigBytes},_process:function(qd){var Wd,Xd=this._data,Jd=Xd.words,Zd=Xd.sigBytes,mf=this.blockSize,xf=mf*4,_f=Zd/xf;qd?_f=dd.ceil(_f):_f=dd.max((_f|0)-this._minBufferSize,0);var vf=_f*mf,gf=dd.min(vf*4,Zd);if(vf){for(var Af=0;Af>>2]|=vd[Nd]<<24-Nd%4*8;gd.call(this,wd,Cd)}else gd.apply(this,arguments)};yd.prototype=md}}(),ud.lib.WordArray})}(libTypedarrays)),libTypedarrays.exports}var encUtf16={exports:{}},hasRequiredEncUtf16;function requireEncUtf16(){return hasRequiredEncUtf16||(hasRequiredEncUtf16=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.WordArray,gd=dd.enc;gd.Utf16=gd.Utf16BE={stringify:function(vd){for(var Cd=vd.words,wd=vd.sigBytes,Nd=[],Ld=0;Ld>>2]>>>16-Ld%4*8&65535;Nd.push(String.fromCharCode(Ud))}return Nd.join("")},parse:function(vd){for(var Cd=vd.length,wd=[],Nd=0;Nd>>1]|=vd.charCodeAt(Nd)<<16-Nd%2*16;return md.create(wd,Cd*2)}},gd.Utf16LE={stringify:function(vd){for(var Cd=vd.words,wd=vd.sigBytes,Nd=[],Ld=0;Ld>>2]>>>16-Ld%4*8&65535);Nd.push(String.fromCharCode(Ud))}return Nd.join("")},parse:function(vd){for(var Cd=vd.length,wd=[],Nd=0;Nd>>1]|=yd(vd.charCodeAt(Nd)<<16-Nd%2*16);return md.create(wd,Cd*2)}};function yd(vd){return vd<<8&4278255360|vd>>>8&16711935}}(),ud.enc.Utf16})}(encUtf16)),encUtf16.exports}var encBase64={exports:{}},hasRequiredEncBase64;function requireEncBase64(){return hasRequiredEncBase64||(hasRequiredEncBase64=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.WordArray,gd=dd.enc;gd.Base64={stringify:function(vd){var Cd=vd.words,wd=vd.sigBytes,Nd=this._map;vd.clamp();for(var Ld=[],Ud=0;Ud>>2]>>>24-Ud%4*8&255,Gd=Cd[Ud+1>>>2]>>>24-(Ud+1)%4*8&255,Yd=Cd[Ud+2>>>2]>>>24-(Ud+2)%4*8&255,zd=jd<<16|Gd<<8|Yd,qd=0;qd<4&&Ud+qd*.75>>6*(3-qd)&63));var Wd=Nd.charAt(64);if(Wd)for(;Ld.length%4;)Ld.push(Wd);return Ld.join("")},parse:function(vd){var Cd=vd.length,wd=this._map,Nd=this._reverseMap;if(!Nd){Nd=this._reverseMap=[];for(var Ld=0;Ld>>6-Ud%4*2,Yd=jd|Gd;Nd[Ld>>>2]|=Yd<<24-Ld%4*8,Ld++}return md.create(Nd,Ld)}}(),ud.enc.Base64})}(encBase64)),encBase64.exports}var encBase64url={exports:{}},hasRequiredEncBase64url;function requireEncBase64url(){return hasRequiredEncBase64url||(hasRequiredEncBase64url=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.WordArray,gd=dd.enc;gd.Base64url={stringify:function(vd,Cd){Cd===void 0&&(Cd=!0);var wd=vd.words,Nd=vd.sigBytes,Ld=Cd?this._safe_map:this._map;vd.clamp();for(var Ud=[],jd=0;jd>>2]>>>24-jd%4*8&255,Yd=wd[jd+1>>>2]>>>24-(jd+1)%4*8&255,zd=wd[jd+2>>>2]>>>24-(jd+2)%4*8&255,qd=Gd<<16|Yd<<8|zd,Wd=0;Wd<4&&jd+Wd*.75>>6*(3-Wd)&63));var Xd=Ld.charAt(64);if(Xd)for(;Ud.length%4;)Ud.push(Xd);return Ud.join("")},parse:function(vd,Cd){Cd===void 0&&(Cd=!0);var wd=vd.length,Nd=Cd?this._safe_map:this._map,Ld=this._reverseMap;if(!Ld){Ld=this._reverseMap=[];for(var Ud=0;Ud>>6-Ud%4*2,Yd=jd|Gd;Nd[Ld>>>2]|=Yd<<24-Ld%4*8,Ld++}return md.create(Nd,Ld)}}(),ud.enc.Base64url})}(encBase64url)),encBase64url.exports}var md5$1={exports:{}},hasRequiredMd5$1;function requireMd5$1(){return hasRequiredMd5$1||(hasRequiredMd5$1=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){return function(dd){var hd=ud,md=hd.lib,gd=md.WordArray,yd=md.Hasher,vd=hd.algo,Cd=[];(function(){for(var Gd=0;Gd<64;Gd++)Cd[Gd]=dd.abs(dd.sin(Gd+1))*4294967296|0})();var wd=vd.MD5=yd.extend({_doReset:function(){this._hash=new gd.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(Gd,Yd){for(var zd=0;zd<16;zd++){var qd=Yd+zd,Wd=Gd[qd];Gd[qd]=(Wd<<8|Wd>>>24)&16711935|(Wd<<24|Wd>>>8)&4278255360}var Xd=this._hash.words,Jd=Gd[Yd+0],Zd=Gd[Yd+1],mf=Gd[Yd+2],xf=Gd[Yd+3],_f=Gd[Yd+4],vf=Gd[Yd+5],gf=Gd[Yd+6],Af=Gd[Yd+7],Df=Gd[Yd+8],Of=Gd[Yd+9],Cf=Gd[Yd+10],If=Gd[Yd+11],Ff=Gd[Yd+12],sh=Gd[Yd+13],Sh=Gd[Yd+14],yh=Gd[Yd+15],Mh=Xd[0],lh=Xd[1],rh=Xd[2],mh=Xd[3];Mh=Nd(Mh,lh,rh,mh,Jd,7,Cd[0]),mh=Nd(mh,Mh,lh,rh,Zd,12,Cd[1]),rh=Nd(rh,mh,Mh,lh,mf,17,Cd[2]),lh=Nd(lh,rh,mh,Mh,xf,22,Cd[3]),Mh=Nd(Mh,lh,rh,mh,_f,7,Cd[4]),mh=Nd(mh,Mh,lh,rh,vf,12,Cd[5]),rh=Nd(rh,mh,Mh,lh,gf,17,Cd[6]),lh=Nd(lh,rh,mh,Mh,Af,22,Cd[7]),Mh=Nd(Mh,lh,rh,mh,Df,7,Cd[8]),mh=Nd(mh,Mh,lh,rh,Of,12,Cd[9]),rh=Nd(rh,mh,Mh,lh,Cf,17,Cd[10]),lh=Nd(lh,rh,mh,Mh,If,22,Cd[11]),Mh=Nd(Mh,lh,rh,mh,Ff,7,Cd[12]),mh=Nd(mh,Mh,lh,rh,sh,12,Cd[13]),rh=Nd(rh,mh,Mh,lh,Sh,17,Cd[14]),lh=Nd(lh,rh,mh,Mh,yh,22,Cd[15]),Mh=Ld(Mh,lh,rh,mh,Zd,5,Cd[16]),mh=Ld(mh,Mh,lh,rh,gf,9,Cd[17]),rh=Ld(rh,mh,Mh,lh,If,14,Cd[18]),lh=Ld(lh,rh,mh,Mh,Jd,20,Cd[19]),Mh=Ld(Mh,lh,rh,mh,vf,5,Cd[20]),mh=Ld(mh,Mh,lh,rh,Cf,9,Cd[21]),rh=Ld(rh,mh,Mh,lh,yh,14,Cd[22]),lh=Ld(lh,rh,mh,Mh,_f,20,Cd[23]),Mh=Ld(Mh,lh,rh,mh,Of,5,Cd[24]),mh=Ld(mh,Mh,lh,rh,Sh,9,Cd[25]),rh=Ld(rh,mh,Mh,lh,xf,14,Cd[26]),lh=Ld(lh,rh,mh,Mh,Df,20,Cd[27]),Mh=Ld(Mh,lh,rh,mh,sh,5,Cd[28]),mh=Ld(mh,Mh,lh,rh,mf,9,Cd[29]),rh=Ld(rh,mh,Mh,lh,Af,14,Cd[30]),lh=Ld(lh,rh,mh,Mh,Ff,20,Cd[31]),Mh=Ud(Mh,lh,rh,mh,vf,4,Cd[32]),mh=Ud(mh,Mh,lh,rh,Df,11,Cd[33]),rh=Ud(rh,mh,Mh,lh,If,16,Cd[34]),lh=Ud(lh,rh,mh,Mh,Sh,23,Cd[35]),Mh=Ud(Mh,lh,rh,mh,Zd,4,Cd[36]),mh=Ud(mh,Mh,lh,rh,_f,11,Cd[37]),rh=Ud(rh,mh,Mh,lh,Af,16,Cd[38]),lh=Ud(lh,rh,mh,Mh,Cf,23,Cd[39]),Mh=Ud(Mh,lh,rh,mh,sh,4,Cd[40]),mh=Ud(mh,Mh,lh,rh,Jd,11,Cd[41]),rh=Ud(rh,mh,Mh,lh,xf,16,Cd[42]),lh=Ud(lh,rh,mh,Mh,gf,23,Cd[43]),Mh=Ud(Mh,lh,rh,mh,Of,4,Cd[44]),mh=Ud(mh,Mh,lh,rh,Ff,11,Cd[45]),rh=Ud(rh,mh,Mh,lh,yh,16,Cd[46]),lh=Ud(lh,rh,mh,Mh,mf,23,Cd[47]),Mh=jd(Mh,lh,rh,mh,Jd,6,Cd[48]),mh=jd(mh,Mh,lh,rh,Af,10,Cd[49]),rh=jd(rh,mh,Mh,lh,Sh,15,Cd[50]),lh=jd(lh,rh,mh,Mh,vf,21,Cd[51]),Mh=jd(Mh,lh,rh,mh,Ff,6,Cd[52]),mh=jd(mh,Mh,lh,rh,xf,10,Cd[53]),rh=jd(rh,mh,Mh,lh,Cf,15,Cd[54]),lh=jd(lh,rh,mh,Mh,Zd,21,Cd[55]),Mh=jd(Mh,lh,rh,mh,Df,6,Cd[56]),mh=jd(mh,Mh,lh,rh,yh,10,Cd[57]),rh=jd(rh,mh,Mh,lh,gf,15,Cd[58]),lh=jd(lh,rh,mh,Mh,sh,21,Cd[59]),Mh=jd(Mh,lh,rh,mh,_f,6,Cd[60]),mh=jd(mh,Mh,lh,rh,If,10,Cd[61]),rh=jd(rh,mh,Mh,lh,mf,15,Cd[62]),lh=jd(lh,rh,mh,Mh,Of,21,Cd[63]),Xd[0]=Xd[0]+Mh|0,Xd[1]=Xd[1]+lh|0,Xd[2]=Xd[2]+rh|0,Xd[3]=Xd[3]+mh|0},_doFinalize:function(){var Gd=this._data,Yd=Gd.words,zd=this._nDataBytes*8,qd=Gd.sigBytes*8;Yd[qd>>>5]|=128<<24-qd%32;var Wd=dd.floor(zd/4294967296),Xd=zd;Yd[(qd+64>>>9<<4)+15]=(Wd<<8|Wd>>>24)&16711935|(Wd<<24|Wd>>>8)&4278255360,Yd[(qd+64>>>9<<4)+14]=(Xd<<8|Xd>>>24)&16711935|(Xd<<24|Xd>>>8)&4278255360,Gd.sigBytes=(Yd.length+1)*4,this._process();for(var Jd=this._hash,Zd=Jd.words,mf=0;mf<4;mf++){var xf=Zd[mf];Zd[mf]=(xf<<8|xf>>>24)&16711935|(xf<<24|xf>>>8)&4278255360}return Jd},clone:function(){var Gd=yd.clone.call(this);return Gd._hash=this._hash.clone(),Gd}});function Nd(Gd,Yd,zd,qd,Wd,Xd,Jd){var Zd=Gd+(Yd&zd|~Yd&qd)+Wd+Jd;return(Zd<>>32-Xd)+Yd}function Ld(Gd,Yd,zd,qd,Wd,Xd,Jd){var Zd=Gd+(Yd&qd|zd&~qd)+Wd+Jd;return(Zd<>>32-Xd)+Yd}function Ud(Gd,Yd,zd,qd,Wd,Xd,Jd){var Zd=Gd+(Yd^zd^qd)+Wd+Jd;return(Zd<>>32-Xd)+Yd}function jd(Gd,Yd,zd,qd,Wd,Xd,Jd){var Zd=Gd+(zd^(Yd|~qd))+Wd+Jd;return(Zd<>>32-Xd)+Yd}hd.MD5=yd._createHelper(wd),hd.HmacMD5=yd._createHmacHelper(wd)}(Math),ud.MD5})}(md5$1)),md5$1.exports}var sha1={exports:{}},hasRequiredSha1;function requireSha1(){return hasRequiredSha1||(hasRequiredSha1=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.WordArray,gd=hd.Hasher,yd=dd.algo,vd=[],Cd=yd.SHA1=gd.extend({_doReset:function(){this._hash=new md.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(wd,Nd){for(var Ld=this._hash.words,Ud=Ld[0],jd=Ld[1],Gd=Ld[2],Yd=Ld[3],zd=Ld[4],qd=0;qd<80;qd++){if(qd<16)vd[qd]=wd[Nd+qd]|0;else{var Wd=vd[qd-3]^vd[qd-8]^vd[qd-14]^vd[qd-16];vd[qd]=Wd<<1|Wd>>>31}var Xd=(Ud<<5|Ud>>>27)+zd+vd[qd];qd<20?Xd+=(jd&Gd|~jd&Yd)+1518500249:qd<40?Xd+=(jd^Gd^Yd)+1859775393:qd<60?Xd+=(jd&Gd|jd&Yd|Gd&Yd)-1894007588:Xd+=(jd^Gd^Yd)-899497514,zd=Yd,Yd=Gd,Gd=jd<<30|jd>>>2,jd=Ud,Ud=Xd}Ld[0]=Ld[0]+Ud|0,Ld[1]=Ld[1]+jd|0,Ld[2]=Ld[2]+Gd|0,Ld[3]=Ld[3]+Yd|0,Ld[4]=Ld[4]+zd|0},_doFinalize:function(){var wd=this._data,Nd=wd.words,Ld=this._nDataBytes*8,Ud=wd.sigBytes*8;return Nd[Ud>>>5]|=128<<24-Ud%32,Nd[(Ud+64>>>9<<4)+14]=Math.floor(Ld/4294967296),Nd[(Ud+64>>>9<<4)+15]=Ld,wd.sigBytes=Nd.length*4,this._process(),this._hash},clone:function(){var wd=gd.clone.call(this);return wd._hash=this._hash.clone(),wd}});dd.SHA1=gd._createHelper(Cd),dd.HmacSHA1=gd._createHmacHelper(Cd)}(),ud.SHA1})}(sha1)),sha1.exports}var sha256={exports:{}},hasRequiredSha256;function requireSha256(){return hasRequiredSha256||(hasRequiredSha256=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){return function(dd){var hd=ud,md=hd.lib,gd=md.WordArray,yd=md.Hasher,vd=hd.algo,Cd=[],wd=[];(function(){function Ud(zd){for(var qd=dd.sqrt(zd),Wd=2;Wd<=qd;Wd++)if(!(zd%Wd))return!1;return!0}function jd(zd){return(zd-(zd|0))*4294967296|0}for(var Gd=2,Yd=0;Yd<64;)Ud(Gd)&&(Yd<8&&(Cd[Yd]=jd(dd.pow(Gd,1/2))),wd[Yd]=jd(dd.pow(Gd,1/3)),Yd++),Gd++})();var Nd=[],Ld=vd.SHA256=yd.extend({_doReset:function(){this._hash=new gd.init(Cd.slice(0))},_doProcessBlock:function(Ud,jd){for(var Gd=this._hash.words,Yd=Gd[0],zd=Gd[1],qd=Gd[2],Wd=Gd[3],Xd=Gd[4],Jd=Gd[5],Zd=Gd[6],mf=Gd[7],xf=0;xf<64;xf++){if(xf<16)Nd[xf]=Ud[jd+xf]|0;else{var _f=Nd[xf-15],vf=(_f<<25|_f>>>7)^(_f<<14|_f>>>18)^_f>>>3,gf=Nd[xf-2],Af=(gf<<15|gf>>>17)^(gf<<13|gf>>>19)^gf>>>10;Nd[xf]=vf+Nd[xf-7]+Af+Nd[xf-16]}var Df=Xd&Jd^~Xd&Zd,Of=Yd&zd^Yd&qd^zd&qd,Cf=(Yd<<30|Yd>>>2)^(Yd<<19|Yd>>>13)^(Yd<<10|Yd>>>22),If=(Xd<<26|Xd>>>6)^(Xd<<21|Xd>>>11)^(Xd<<7|Xd>>>25),Ff=mf+If+Df+wd[xf]+Nd[xf],sh=Cf+Of;mf=Zd,Zd=Jd,Jd=Xd,Xd=Wd+Ff|0,Wd=qd,qd=zd,zd=Yd,Yd=Ff+sh|0}Gd[0]=Gd[0]+Yd|0,Gd[1]=Gd[1]+zd|0,Gd[2]=Gd[2]+qd|0,Gd[3]=Gd[3]+Wd|0,Gd[4]=Gd[4]+Xd|0,Gd[5]=Gd[5]+Jd|0,Gd[6]=Gd[6]+Zd|0,Gd[7]=Gd[7]+mf|0},_doFinalize:function(){var Ud=this._data,jd=Ud.words,Gd=this._nDataBytes*8,Yd=Ud.sigBytes*8;return jd[Yd>>>5]|=128<<24-Yd%32,jd[(Yd+64>>>9<<4)+14]=dd.floor(Gd/4294967296),jd[(Yd+64>>>9<<4)+15]=Gd,Ud.sigBytes=jd.length*4,this._process(),this._hash},clone:function(){var Ud=yd.clone.call(this);return Ud._hash=this._hash.clone(),Ud}});hd.SHA256=yd._createHelper(Ld),hd.HmacSHA256=yd._createHmacHelper(Ld)}(Math),ud.SHA256})}(sha256)),sha256.exports}var sha224={exports:{}},hasRequiredSha224;function requireSha224(){return hasRequiredSha224||(hasRequiredSha224=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireSha256())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.WordArray,gd=dd.algo,yd=gd.SHA256,vd=gd.SHA224=yd.extend({_doReset:function(){this._hash=new md.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var Cd=yd._doFinalize.call(this);return Cd.sigBytes-=4,Cd}});dd.SHA224=yd._createHelper(vd),dd.HmacSHA224=yd._createHmacHelper(vd)}(),ud.SHA224})}(sha224)),sha224.exports}var sha512={exports:{}},hasRequiredSha512;function requireSha512(){return hasRequiredSha512||(hasRequiredSha512=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireX64Core())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.Hasher,gd=dd.x64,yd=gd.Word,vd=gd.WordArray,Cd=dd.algo;function wd(){return yd.create.apply(yd,arguments)}var Nd=[wd(1116352408,3609767458),wd(1899447441,602891725),wd(3049323471,3964484399),wd(3921009573,2173295548),wd(961987163,4081628472),wd(1508970993,3053834265),wd(2453635748,2937671579),wd(2870763221,3664609560),wd(3624381080,2734883394),wd(310598401,1164996542),wd(607225278,1323610764),wd(1426881987,3590304994),wd(1925078388,4068182383),wd(2162078206,991336113),wd(2614888103,633803317),wd(3248222580,3479774868),wd(3835390401,2666613458),wd(4022224774,944711139),wd(264347078,2341262773),wd(604807628,2007800933),wd(770255983,1495990901),wd(1249150122,1856431235),wd(1555081692,3175218132),wd(1996064986,2198950837),wd(2554220882,3999719339),wd(2821834349,766784016),wd(2952996808,2566594879),wd(3210313671,3203337956),wd(3336571891,1034457026),wd(3584528711,2466948901),wd(113926993,3758326383),wd(338241895,168717936),wd(666307205,1188179964),wd(773529912,1546045734),wd(1294757372,1522805485),wd(1396182291,2643833823),wd(1695183700,2343527390),wd(1986661051,1014477480),wd(2177026350,1206759142),wd(2456956037,344077627),wd(2730485921,1290863460),wd(2820302411,3158454273),wd(3259730800,3505952657),wd(3345764771,106217008),wd(3516065817,3606008344),wd(3600352804,1432725776),wd(4094571909,1467031594),wd(275423344,851169720),wd(430227734,3100823752),wd(506948616,1363258195),wd(659060556,3750685593),wd(883997877,3785050280),wd(958139571,3318307427),wd(1322822218,3812723403),wd(1537002063,2003034995),wd(1747873779,3602036899),wd(1955562222,1575990012),wd(2024104815,1125592928),wd(2227730452,2716904306),wd(2361852424,442776044),wd(2428436474,593698344),wd(2756734187,3733110249),wd(3204031479,2999351573),wd(3329325298,3815920427),wd(3391569614,3928383900),wd(3515267271,566280711),wd(3940187606,3454069534),wd(4118630271,4000239992),wd(116418474,1914138554),wd(174292421,2731055270),wd(289380356,3203993006),wd(460393269,320620315),wd(685471733,587496836),wd(852142971,1086792851),wd(1017036298,365543100),wd(1126000580,2618297676),wd(1288033470,3409855158),wd(1501505948,4234509866),wd(1607167915,987167468),wd(1816402316,1246189591)],Ld=[];(function(){for(var jd=0;jd<80;jd++)Ld[jd]=wd()})();var Ud=Cd.SHA512=md.extend({_doReset:function(){this._hash=new vd.init([new yd.init(1779033703,4089235720),new yd.init(3144134277,2227873595),new yd.init(1013904242,4271175723),new yd.init(2773480762,1595750129),new yd.init(1359893119,2917565137),new yd.init(2600822924,725511199),new yd.init(528734635,4215389547),new yd.init(1541459225,327033209)])},_doProcessBlock:function(jd,Gd){for(var Yd=this._hash.words,zd=Yd[0],qd=Yd[1],Wd=Yd[2],Xd=Yd[3],Jd=Yd[4],Zd=Yd[5],mf=Yd[6],xf=Yd[7],_f=zd.high,vf=zd.low,gf=qd.high,Af=qd.low,Df=Wd.high,Of=Wd.low,Cf=Xd.high,If=Xd.low,Ff=Jd.high,sh=Jd.low,Sh=Zd.high,yh=Zd.low,Mh=mf.high,lh=mf.low,rh=xf.high,mh=xf.low,xh=_f,Eh=vf,kf=gf,Rf=Af,_h=Df,Ph=Of,sm=Cf,th=If,oh=Ff,Zh=sh,Sm=Sh,$h=yh,Vf=Mh,nh=lh,Lh=rh,Ih=mh,om=0;om<80;om++){var zh,Om,Im=Ld[om];if(om<16)Om=Im.high=jd[Gd+om*2]|0,zh=Im.low=jd[Gd+om*2+1]|0;else{var Zm=Ld[om-15],Lm=Zm.high,Wm=Zm.low,ig=(Lm>>>1|Wm<<31)^(Lm>>>8|Wm<<24)^Lm>>>7,yg=(Wm>>>1|Lm<<31)^(Wm>>>8|Lm<<24)^(Wm>>>7|Lm<<25),jh=Ld[om-2],Pf=jh.high,$f=jh.low,Nh=(Pf>>>19|$f<<13)^(Pf<<3|$f>>>29)^Pf>>>6,Wh=($f>>>19|Pf<<13)^($f<<3|Pf>>>29)^($f>>>6|Pf<<26),_m=Ld[om-7],$m=_m.high,Ym=_m.low,Ag=Ld[om-16],sg=Ag.high,mg=Ag.low;zh=yg+Ym,Om=ig+$m+(zh>>>0>>0?1:0),zh=zh+Wh,Om=Om+Nh+(zh>>>0>>0?1:0),zh=zh+mg,Om=Om+sg+(zh>>>0>>0?1:0),Im.high=Om,Im.low=zh}var vg=oh&Sm^~oh&Vf,kg=Zh&$h^~Zh&nh,Kg=xh&kf^xh&_h^kf&_h,p_=Eh&Rf^Eh&Ph^Rf&Ph,l_=(xh>>>28|Eh<<4)^(xh<<30|Eh>>>2)^(xh<<25|Eh>>>7),v_=(Eh>>>28|xh<<4)^(Eh<<30|xh>>>2)^(Eh<<25|xh>>>7),r_=(oh>>>14|Zh<<18)^(oh>>>18|Zh<<14)^(oh<<23|Zh>>>9),O_=(Zh>>>14|oh<<18)^(Zh>>>18|oh<<14)^(Zh<<23|oh>>>9),S_=Nd[om],Q_=S_.high,t0=S_.low,R_=Ih+O_,P_=Lh+r_+(R_>>>0>>0?1:0),R_=R_+kg,P_=P_+vg+(R_>>>0>>0?1:0),R_=R_+t0,P_=P_+Q_+(R_>>>0>>0?1:0),R_=R_+zh,P_=P_+Om+(R_>>>0>>0?1:0),Pg=v_+p_,$0=l_+Kg+(Pg>>>0>>0?1:0);Lh=Vf,Ih=nh,Vf=Sm,nh=$h,Sm=oh,$h=Zh,Zh=th+R_|0,oh=sm+P_+(Zh>>>0>>0?1:0)|0,sm=_h,th=Ph,_h=kf,Ph=Rf,kf=xh,Rf=Eh,Eh=R_+Pg|0,xh=P_+$0+(Eh>>>0>>0?1:0)|0}vf=zd.low=vf+Eh,zd.high=_f+xh+(vf>>>0>>0?1:0),Af=qd.low=Af+Rf,qd.high=gf+kf+(Af>>>0>>0?1:0),Of=Wd.low=Of+Ph,Wd.high=Df+_h+(Of>>>0>>0?1:0),If=Xd.low=If+th,Xd.high=Cf+sm+(If>>>0>>0?1:0),sh=Jd.low=sh+Zh,Jd.high=Ff+oh+(sh>>>0>>0?1:0),yh=Zd.low=yh+$h,Zd.high=Sh+Sm+(yh>>>0<$h>>>0?1:0),lh=mf.low=lh+nh,mf.high=Mh+Vf+(lh>>>0>>0?1:0),mh=xf.low=mh+Ih,xf.high=rh+Lh+(mh>>>0>>0?1:0)},_doFinalize:function(){var jd=this._data,Gd=jd.words,Yd=this._nDataBytes*8,zd=jd.sigBytes*8;Gd[zd>>>5]|=128<<24-zd%32,Gd[(zd+128>>>10<<5)+30]=Math.floor(Yd/4294967296),Gd[(zd+128>>>10<<5)+31]=Yd,jd.sigBytes=Gd.length*4,this._process();var qd=this._hash.toX32();return qd},clone:function(){var jd=md.clone.call(this);return jd._hash=this._hash.clone(),jd},blockSize:1024/32});dd.SHA512=md._createHelper(Ud),dd.HmacSHA512=md._createHmacHelper(Ud)}(),ud.SHA512})}(sha512)),sha512.exports}var sha384={exports:{}},hasRequiredSha384;function requireSha384(){return hasRequiredSha384||(hasRequiredSha384=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireX64Core(),requireSha512())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.x64,md=hd.Word,gd=hd.WordArray,yd=dd.algo,vd=yd.SHA512,Cd=yd.SHA384=vd.extend({_doReset:function(){this._hash=new gd.init([new md.init(3418070365,3238371032),new md.init(1654270250,914150663),new md.init(2438529370,812702999),new md.init(355462360,4144912697),new md.init(1731405415,4290775857),new md.init(2394180231,1750603025),new md.init(3675008525,1694076839),new md.init(1203062813,3204075428)])},_doFinalize:function(){var wd=vd._doFinalize.call(this);return wd.sigBytes-=16,wd}});dd.SHA384=vd._createHelper(Cd),dd.HmacSHA384=vd._createHmacHelper(Cd)}(),ud.SHA384})}(sha384)),sha384.exports}var sha3={exports:{}},hasRequiredSha3;function requireSha3(){return hasRequiredSha3||(hasRequiredSha3=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireX64Core())})(commonjsGlobal,function(ud){return function(dd){var hd=ud,md=hd.lib,gd=md.WordArray,yd=md.Hasher,vd=hd.x64,Cd=vd.Word,wd=hd.algo,Nd=[],Ld=[],Ud=[];(function(){for(var Yd=1,zd=0,qd=0;qd<24;qd++){Nd[Yd+5*zd]=(qd+1)*(qd+2)/2%64;var Wd=zd%5,Xd=(2*Yd+3*zd)%5;Yd=Wd,zd=Xd}for(var Yd=0;Yd<5;Yd++)for(var zd=0;zd<5;zd++)Ld[Yd+5*zd]=zd+(2*Yd+3*zd)%5*5;for(var Jd=1,Zd=0;Zd<24;Zd++){for(var mf=0,xf=0,_f=0;_f<7;_f++){if(Jd&1){var vf=(1<<_f)-1;vf<32?xf^=1<>>24)&16711935|(Jd<<24|Jd>>>8)&4278255360,Zd=(Zd<<8|Zd>>>24)&16711935|(Zd<<24|Zd>>>8)&4278255360;var mf=qd[Xd];mf.high^=Zd,mf.low^=Jd}for(var xf=0;xf<24;xf++){for(var _f=0;_f<5;_f++){for(var vf=0,gf=0,Af=0;Af<5;Af++){var mf=qd[_f+5*Af];vf^=mf.high,gf^=mf.low}var Df=jd[_f];Df.high=vf,Df.low=gf}for(var _f=0;_f<5;_f++)for(var Of=jd[(_f+4)%5],Cf=jd[(_f+1)%5],If=Cf.high,Ff=Cf.low,vf=Of.high^(If<<1|Ff>>>31),gf=Of.low^(Ff<<1|If>>>31),Af=0;Af<5;Af++){var mf=qd[_f+5*Af];mf.high^=vf,mf.low^=gf}for(var sh=1;sh<25;sh++){var vf,gf,mf=qd[sh],Sh=mf.high,yh=mf.low,Mh=Nd[sh];Mh<32?(vf=Sh<>>32-Mh,gf=yh<>>32-Mh):(vf=yh<>>64-Mh,gf=Sh<>>64-Mh);var lh=jd[Ld[sh]];lh.high=vf,lh.low=gf}var rh=jd[0],mh=qd[0];rh.high=mh.high,rh.low=mh.low;for(var _f=0;_f<5;_f++)for(var Af=0;Af<5;Af++){var sh=_f+5*Af,mf=qd[sh],xh=jd[sh],Eh=jd[(_f+1)%5+5*Af],kf=jd[(_f+2)%5+5*Af];mf.high=xh.high^~Eh.high&kf.high,mf.low=xh.low^~Eh.low&kf.low}var mf=qd[0],Rf=Ud[xf];mf.high^=Rf.high,mf.low^=Rf.low}},_doFinalize:function(){var Yd=this._data,zd=Yd.words;this._nDataBytes*8;var qd=Yd.sigBytes*8,Wd=this.blockSize*32;zd[qd>>>5]|=1<<24-qd%32,zd[(dd.ceil((qd+1)/Wd)*Wd>>>5)-1]|=128,Yd.sigBytes=zd.length*4,this._process();for(var Xd=this._state,Jd=this.cfg.outputLength/8,Zd=Jd/8,mf=[],xf=0;xf>>24)&16711935|(vf<<24|vf>>>8)&4278255360,gf=(gf<<8|gf>>>24)&16711935|(gf<<24|gf>>>8)&4278255360,mf.push(gf),mf.push(vf)}return new gd.init(mf,Jd)},clone:function(){for(var Yd=yd.clone.call(this),zd=Yd._state=this._state.slice(0),qd=0;qd<25;qd++)zd[qd]=zd[qd].clone();return Yd}});hd.SHA3=yd._createHelper(Gd),hd.HmacSHA3=yd._createHmacHelper(Gd)}(Math),ud.SHA3})}(sha3)),sha3.exports}var ripemd160={exports:{}},hasRequiredRipemd160;function requireRipemd160(){return hasRequiredRipemd160||(hasRequiredRipemd160=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){/** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -1172,53 +1172,53 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */return function(sd){var pd=rd,fd=pd.lib,hd=fd.WordArray,md=fd.Hasher,gd=pd.algo,yd=hd.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),vd=hd.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),Nd=hd.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),Md=hd.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),Ld=hd.create([0,1518500249,1859775393,2400959708,2840853838]),Fd=hd.create([1352829926,1548603684,1836072691,2053994217,0]),Hd=gd.RIPEMD160=md.extend({_doReset:function(){this._hash=hd.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(Xd,df){for(var Ef=0;Ef<16;Ef++){var pf=df+Ef,mf=Xd[pf];Xd[pf]=(mf<<8|mf>>>24)&16711935|(mf<<24|mf>>>8)&4278255360}var _f=this._hash.words,xf=Ld.words,Cf=Fd.words,If=yd.words,Sf=vd.words,wf=Nd.words,Pf=Md.words,lh,xh,Eh,Mh,dh,eh,fh,Sh,vh,Df;eh=lh=_f[0],fh=xh=_f[1],Sh=Eh=_f[2],vh=Mh=_f[3],Df=dh=_f[4];for(var Af,Ef=0;Ef<80;Ef+=1)Af=lh+Xd[df+If[Ef]]|0,Ef<16?Af+=Vd(xh,Eh,Mh)+xf[0]:Ef<32?Af+=Gd(xh,Eh,Mh)+xf[1]:Ef<48?Af+=Ud(xh,Eh,Mh)+xf[2]:Ef<64?Af+=qd(xh,Eh,Mh)+xf[3]:Af+=Wd(xh,Eh,Mh)+xf[4],Af=Af|0,Af=Kd(Af,wf[Ef]),Af=Af+dh|0,lh=dh,dh=Mh,Mh=Kd(Eh,10),Eh=xh,xh=Af,Af=eh+Xd[df+Sf[Ef]]|0,Ef<16?Af+=Wd(fh,Sh,vh)+Cf[0]:Ef<32?Af+=qd(fh,Sh,vh)+Cf[1]:Ef<48?Af+=Ud(fh,Sh,vh)+Cf[2]:Ef<64?Af+=Gd(fh,Sh,vh)+Cf[3]:Af+=Vd(fh,Sh,vh)+Cf[4],Af=Af|0,Af=Kd(Af,Pf[Ef]),Af=Af+Df|0,eh=Df,Df=vh,vh=Kd(Sh,10),Sh=fh,fh=Af;Af=_f[1]+Eh+vh|0,_f[1]=_f[2]+Mh+Df|0,_f[2]=_f[3]+dh+eh|0,_f[3]=_f[4]+lh+fh|0,_f[4]=_f[0]+xh+Sh|0,_f[0]=Af},_doFinalize:function(){var Xd=this._data,df=Xd.words,Ef=this._nDataBytes*8,pf=Xd.sigBytes*8;df[pf>>>5]|=128<<24-pf%32,df[(pf+64>>>9<<4)+14]=(Ef<<8|Ef>>>24)&16711935|(Ef<<24|Ef>>>8)&4278255360,Xd.sigBytes=(df.length+1)*4,this._process();for(var mf=this._hash,_f=mf.words,xf=0;xf<5;xf++){var Cf=_f[xf];_f[xf]=(Cf<<8|Cf>>>24)&16711935|(Cf<<24|Cf>>>8)&4278255360}return mf},clone:function(){var Xd=md.clone.call(this);return Xd._hash=this._hash.clone(),Xd}});function Vd(Xd,df,Ef){return Xd^df^Ef}function Gd(Xd,df,Ef){return Xd&df|~Xd&Ef}function Ud(Xd,df,Ef){return(Xd|~df)^Ef}function qd(Xd,df,Ef){return Xd&Ef|df&~Ef}function Wd(Xd,df,Ef){return Xd^(df|~Ef)}function Kd(Xd,df){return Xd<>>32-df}pd.RIPEMD160=md._createHelper(Hd),pd.HmacRIPEMD160=md._createHmacHelper(Hd)}(),rd.RIPEMD160})}(ripemd160)),ripemd160.exports}var hmac={exports:{}},hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(Ra,qa){(function(rd,sd){Ra.exports=sd(requireCore())})(commonjsGlobal,function(rd){(function(){var sd=rd,pd=sd.lib,fd=pd.Base,hd=sd.enc,md=hd.Utf8,gd=sd.algo;gd.HMAC=fd.extend({init:function(yd,vd){yd=this._hasher=new yd.init,typeof vd=="string"&&(vd=md.parse(vd));var Nd=yd.blockSize,Md=Nd*4;vd.sigBytes>Md&&(vd=yd.finalize(vd)),vd.clamp();for(var Ld=this._oKey=vd.clone(),Fd=this._iKey=vd.clone(),Hd=Ld.words,Vd=Fd.words,Gd=0;Gd>>2]&255;mf.sigBytes-=_f}};fd.BlockCipher=Ld.extend({cfg:Ld.cfg.extend({mode:Vd,padding:Ud}),reset:function(){var mf;Ld.reset.call(this);var _f=this.cfg,xf=_f.iv,Cf=_f.mode;this._xformMode==this._ENC_XFORM_MODE?mf=Cf.createEncryptor:(mf=Cf.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==mf?this._mode.init(this,xf&&xf.words):(this._mode=mf.call(Cf,this,xf&&xf.words),this._mode.__creator=mf)},_doProcessBlock:function(mf,_f){this._mode.processBlock(mf,_f)},_doFinalize:function(){var mf,_f=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(_f.pad(this._data,this.blockSize),mf=this._process(!0)):(mf=this._process(!0),_f.unpad(mf)),mf},blockSize:128/32});var qd=fd.CipherParams=hd.extend({init:function(mf){this.mixIn(mf)},toString:function(mf){return(mf||this.formatter).stringify(this)}}),Wd=pd.format={},Kd=Wd.OpenSSL={stringify:function(mf){var _f,xf=mf.ciphertext,Cf=mf.salt;return Cf?_f=md.create([1398893684,1701076831]).concat(Cf).concat(xf):_f=xf,_f.toString(vd)},parse:function(mf){var _f,xf=vd.parse(mf),Cf=xf.words;return Cf[0]==1398893684&&Cf[1]==1701076831&&(_f=md.create(Cf.slice(2,4)),Cf.splice(0,4),xf.sigBytes-=16),qd.create({ciphertext:xf,salt:_f})}},Xd=fd.SerializableCipher=hd.extend({cfg:hd.extend({format:Kd}),encrypt:function(mf,_f,xf,Cf){Cf=this.cfg.extend(Cf);var If=mf.createEncryptor(xf,Cf),Sf=If.finalize(_f),wf=If.cfg;return qd.create({ciphertext:Sf,key:xf,iv:wf.iv,algorithm:mf,mode:wf.mode,padding:wf.padding,blockSize:mf.blockSize,formatter:Cf.format})},decrypt:function(mf,_f,xf,Cf){Cf=this.cfg.extend(Cf),_f=this._parse(_f,Cf.format);var If=mf.createDecryptor(xf,Cf).finalize(_f.ciphertext);return If},_parse:function(mf,_f){return typeof mf=="string"?_f.parse(mf,this):mf}}),df=pd.kdf={},Ef=df.OpenSSL={execute:function(mf,_f,xf,Cf,If){if(Cf||(Cf=md.random(64/8)),If)var Sf=Md.create({keySize:_f+xf,hasher:If}).compute(mf,Cf);else var Sf=Md.create({keySize:_f+xf}).compute(mf,Cf);var wf=md.create(Sf.words.slice(_f),xf*4);return Sf.sigBytes=_f*4,qd.create({key:Sf,iv:wf,salt:Cf})}},pf=fd.PasswordBasedCipher=Xd.extend({cfg:Xd.cfg.extend({kdf:Ef}),encrypt:function(mf,_f,xf,Cf){Cf=this.cfg.extend(Cf);var If=Cf.kdf.execute(xf,mf.keySize,mf.ivSize,Cf.salt,Cf.hasher);Cf.iv=If.iv;var Sf=Xd.encrypt.call(this,mf,_f,If.key,Cf);return Sf.mixIn(If),Sf},decrypt:function(mf,_f,xf,Cf){Cf=this.cfg.extend(Cf),_f=this._parse(_f,Cf.format);var If=Cf.kdf.execute(xf,mf.keySize,mf.ivSize,_f.salt,Cf.hasher);Cf.iv=If.iv;var Sf=Xd.decrypt.call(this,mf,_f,If.key,Cf);return Sf}})}()})}(cipherCore)),cipherCore.exports}var modeCfb={exports:{}},hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireCipherCore())})(commonjsGlobal,function(rd){return rd.mode.CFB=function(){var sd=rd.lib.BlockCipherMode.extend();sd.Encryptor=sd.extend({processBlock:function(fd,hd){var md=this._cipher,gd=md.blockSize;pd.call(this,fd,hd,gd,md),this._prevBlock=fd.slice(hd,hd+gd)}}),sd.Decryptor=sd.extend({processBlock:function(fd,hd){var md=this._cipher,gd=md.blockSize,yd=fd.slice(hd,hd+gd);pd.call(this,fd,hd,gd,md),this._prevBlock=yd}});function pd(fd,hd,md,gd){var yd,vd=this._iv;vd?(yd=vd.slice(0),this._iv=void 0):yd=this._prevBlock,gd.encryptBlock(yd,0);for(var Nd=0;Nd>>24)&16711935|(vf<<24|vf>>>8)&4278255360}var gf=this._hash.words,Af=Ud.words,Df=jd.words,Of=Cd.words,Cf=wd.words,If=Nd.words,Ff=Ld.words,sh,Sh,yh,Mh,lh,rh,mh,xh,Eh,kf;rh=sh=gf[0],mh=Sh=gf[1],xh=yh=gf[2],Eh=Mh=gf[3],kf=lh=gf[4];for(var Rf,xf=0;xf<80;xf+=1)Rf=sh+Zd[mf+Of[xf]]|0,xf<16?Rf+=Yd(Sh,yh,Mh)+Af[0]:xf<32?Rf+=zd(Sh,yh,Mh)+Af[1]:xf<48?Rf+=qd(Sh,yh,Mh)+Af[2]:xf<64?Rf+=Wd(Sh,yh,Mh)+Af[3]:Rf+=Xd(Sh,yh,Mh)+Af[4],Rf=Rf|0,Rf=Jd(Rf,If[xf]),Rf=Rf+lh|0,sh=lh,lh=Mh,Mh=Jd(yh,10),yh=Sh,Sh=Rf,Rf=rh+Zd[mf+Cf[xf]]|0,xf<16?Rf+=Xd(mh,xh,Eh)+Df[0]:xf<32?Rf+=Wd(mh,xh,Eh)+Df[1]:xf<48?Rf+=qd(mh,xh,Eh)+Df[2]:xf<64?Rf+=zd(mh,xh,Eh)+Df[3]:Rf+=Yd(mh,xh,Eh)+Df[4],Rf=Rf|0,Rf=Jd(Rf,Ff[xf]),Rf=Rf+kf|0,rh=kf,kf=Eh,Eh=Jd(xh,10),xh=mh,mh=Rf;Rf=gf[1]+yh+Eh|0,gf[1]=gf[2]+Mh+kf|0,gf[2]=gf[3]+lh+rh|0,gf[3]=gf[4]+sh+mh|0,gf[4]=gf[0]+Sh+xh|0,gf[0]=Rf},_doFinalize:function(){var Zd=this._data,mf=Zd.words,xf=this._nDataBytes*8,_f=Zd.sigBytes*8;mf[_f>>>5]|=128<<24-_f%32,mf[(_f+64>>>9<<4)+14]=(xf<<8|xf>>>24)&16711935|(xf<<24|xf>>>8)&4278255360,Zd.sigBytes=(mf.length+1)*4,this._process();for(var vf=this._hash,gf=vf.words,Af=0;Af<5;Af++){var Df=gf[Af];gf[Af]=(Df<<8|Df>>>24)&16711935|(Df<<24|Df>>>8)&4278255360}return vf},clone:function(){var Zd=yd.clone.call(this);return Zd._hash=this._hash.clone(),Zd}});function Yd(Zd,mf,xf){return Zd^mf^xf}function zd(Zd,mf,xf){return Zd&mf|~Zd&xf}function qd(Zd,mf,xf){return(Zd|~mf)^xf}function Wd(Zd,mf,xf){return Zd&xf|mf&~xf}function Xd(Zd,mf,xf){return Zd^(mf|~xf)}function Jd(Zd,mf){return Zd<>>32-mf}hd.RIPEMD160=yd._createHelper(Gd),hd.HmacRIPEMD160=yd._createHmacHelper(Gd)}(),ud.RIPEMD160})}(ripemd160)),ripemd160.exports}var hmac={exports:{}},hasRequiredHmac;function requireHmac(){return hasRequiredHmac||(hasRequiredHmac=1,function(Ra,ed){(function(ud,dd){Ra.exports=dd(requireCore())})(commonjsGlobal,function(ud){(function(){var dd=ud,hd=dd.lib,md=hd.Base,gd=dd.enc,yd=gd.Utf8,vd=dd.algo;vd.HMAC=md.extend({init:function(Cd,wd){Cd=this._hasher=new Cd.init,typeof wd=="string"&&(wd=yd.parse(wd));var Nd=Cd.blockSize,Ld=Nd*4;wd.sigBytes>Ld&&(wd=Cd.finalize(wd)),wd.clamp();for(var Ud=this._oKey=wd.clone(),jd=this._iKey=wd.clone(),Gd=Ud.words,Yd=jd.words,zd=0;zd>>2]&255;vf.sigBytes-=gf}};md.BlockCipher=Ud.extend({cfg:Ud.cfg.extend({mode:Yd,padding:qd}),reset:function(){var vf;Ud.reset.call(this);var gf=this.cfg,Af=gf.iv,Df=gf.mode;this._xformMode==this._ENC_XFORM_MODE?vf=Df.createEncryptor:(vf=Df.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==vf?this._mode.init(this,Af&&Af.words):(this._mode=vf.call(Df,this,Af&&Af.words),this._mode.__creator=vf)},_doProcessBlock:function(vf,gf){this._mode.processBlock(vf,gf)},_doFinalize:function(){var vf,gf=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(gf.pad(this._data,this.blockSize),vf=this._process(!0)):(vf=this._process(!0),gf.unpad(vf)),vf},blockSize:128/32});var Wd=md.CipherParams=gd.extend({init:function(vf){this.mixIn(vf)},toString:function(vf){return(vf||this.formatter).stringify(this)}}),Xd=hd.format={},Jd=Xd.OpenSSL={stringify:function(vf){var gf,Af=vf.ciphertext,Df=vf.salt;return Df?gf=yd.create([1398893684,1701076831]).concat(Df).concat(Af):gf=Af,gf.toString(wd)},parse:function(vf){var gf,Af=wd.parse(vf),Df=Af.words;return Df[0]==1398893684&&Df[1]==1701076831&&(gf=yd.create(Df.slice(2,4)),Df.splice(0,4),Af.sigBytes-=16),Wd.create({ciphertext:Af,salt:gf})}},Zd=md.SerializableCipher=gd.extend({cfg:gd.extend({format:Jd}),encrypt:function(vf,gf,Af,Df){Df=this.cfg.extend(Df);var Of=vf.createEncryptor(Af,Df),Cf=Of.finalize(gf),If=Of.cfg;return Wd.create({ciphertext:Cf,key:Af,iv:If.iv,algorithm:vf,mode:If.mode,padding:If.padding,blockSize:vf.blockSize,formatter:Df.format})},decrypt:function(vf,gf,Af,Df){Df=this.cfg.extend(Df),gf=this._parse(gf,Df.format);var Of=vf.createDecryptor(Af,Df).finalize(gf.ciphertext);return Of},_parse:function(vf,gf){return typeof vf=="string"?gf.parse(vf,this):vf}}),mf=hd.kdf={},xf=mf.OpenSSL={execute:function(vf,gf,Af,Df,Of){if(Df||(Df=yd.random(64/8)),Of)var Cf=Ld.create({keySize:gf+Af,hasher:Of}).compute(vf,Df);else var Cf=Ld.create({keySize:gf+Af}).compute(vf,Df);var If=yd.create(Cf.words.slice(gf),Af*4);return Cf.sigBytes=gf*4,Wd.create({key:Cf,iv:If,salt:Df})}},_f=md.PasswordBasedCipher=Zd.extend({cfg:Zd.cfg.extend({kdf:xf}),encrypt:function(vf,gf,Af,Df){Df=this.cfg.extend(Df);var Of=Df.kdf.execute(Af,vf.keySize,vf.ivSize,Df.salt,Df.hasher);Df.iv=Of.iv;var Cf=Zd.encrypt.call(this,vf,gf,Of.key,Df);return Cf.mixIn(Of),Cf},decrypt:function(vf,gf,Af,Df){Df=this.cfg.extend(Df),gf=this._parse(gf,Df.format);var Of=Df.kdf.execute(Af,vf.keySize,vf.ivSize,gf.salt,Df.hasher);Df.iv=Of.iv;var Cf=Zd.decrypt.call(this,vf,gf,Of.key,Df);return Cf}})}()})}(cipherCore)),cipherCore.exports}var modeCfb={exports:{}},hasRequiredModeCfb;function requireModeCfb(){return hasRequiredModeCfb||(hasRequiredModeCfb=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireCipherCore())})(commonjsGlobal,function(ud){return ud.mode.CFB=function(){var dd=ud.lib.BlockCipherMode.extend();dd.Encryptor=dd.extend({processBlock:function(md,gd){var yd=this._cipher,vd=yd.blockSize;hd.call(this,md,gd,vd,yd),this._prevBlock=md.slice(gd,gd+vd)}}),dd.Decryptor=dd.extend({processBlock:function(md,gd){var yd=this._cipher,vd=yd.blockSize,Cd=md.slice(gd,gd+vd);hd.call(this,md,gd,vd,yd),this._prevBlock=Cd}});function hd(md,gd,yd,vd){var Cd,wd=this._iv;wd?(Cd=wd.slice(0),this._iv=void 0):Cd=this._prevBlock,vd.encryptBlock(Cd,0);for(var Nd=0;Nd>24&255)===255){var gd=md>>16&255,yd=md>>8&255,vd=md&255;gd===255?(gd=0,yd===255?(yd=0,vd===255?vd=0:++vd):++yd):++gd,md=0,md+=gd<<16,md+=yd<<8,md+=vd}else md+=1<<24;return md}function fd(md){return(md[0]=pd(md[0]))===0&&(md[1]=pd(md[1])),md}var hd=sd.Encryptor=sd.extend({processBlock:function(md,gd){var yd=this._cipher,vd=yd.blockSize,Nd=this._iv,Md=this._counter;Nd&&(Md=this._counter=Nd.slice(0),this._iv=void 0),fd(Md);var Ld=Md.slice(0);yd.encryptBlock(Ld,0);for(var Fd=0;Fd>>2]|=md<<24-gd%4*8,sd.sigBytes+=md},unpad:function(sd){var pd=sd.words[sd.sigBytes-1>>>2]&255;sd.sigBytes-=pd}},rd.pad.Ansix923})}(padAnsix923)),padAnsix923.exports}var padIso10126={exports:{}},hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireCipherCore())})(commonjsGlobal,function(rd){return rd.pad.Iso10126={pad:function(sd,pd){var fd=pd*4,hd=fd-sd.sigBytes%fd;sd.concat(rd.lib.WordArray.random(hd-1)).concat(rd.lib.WordArray.create([hd<<24],1))},unpad:function(sd){var pd=sd.words[sd.sigBytes-1>>>2]&255;sd.sigBytes-=pd}},rd.pad.Iso10126})}(padIso10126)),padIso10126.exports}var padIso97971={exports:{}},hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireCipherCore())})(commonjsGlobal,function(rd){return rd.pad.Iso97971={pad:function(sd,pd){sd.concat(rd.lib.WordArray.create([2147483648],1)),rd.pad.ZeroPadding.pad(sd,pd)},unpad:function(sd){rd.pad.ZeroPadding.unpad(sd),sd.sigBytes--}},rd.pad.Iso97971})}(padIso97971)),padIso97971.exports}var padZeropadding={exports:{}},hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireCipherCore())})(commonjsGlobal,function(rd){return rd.pad.ZeroPadding={pad:function(sd,pd){var fd=pd*4;sd.clamp(),sd.sigBytes+=fd-(sd.sigBytes%fd||fd)},unpad:function(sd){for(var pd=sd.words,fd=sd.sigBytes-1,fd=sd.sigBytes-1;fd>=0;fd--)if(pd[fd>>>2]>>>24-fd%4*8&255){sd.sigBytes=fd+1;break}}},rd.pad.ZeroPadding})}(padZeropadding)),padZeropadding.exports}var padNopadding={exports:{}},hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireCipherCore())})(commonjsGlobal,function(rd){return rd.pad.NoPadding={pad:function(){},unpad:function(){}},rd.pad.NoPadding})}(padNopadding)),padNopadding.exports}var formatHex={exports:{}},hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireCipherCore())})(commonjsGlobal,function(rd){return function(sd){var pd=rd,fd=pd.lib,hd=fd.CipherParams,md=pd.enc,gd=md.Hex,yd=pd.format;yd.Hex={stringify:function(vd){return vd.ciphertext.toString(gd)},parse:function(vd){var Nd=gd.parse(vd);return hd.create({ciphertext:Nd})}}}(),rd.format.Hex})}(formatHex)),formatHex.exports}var aes={exports:{}},hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.BlockCipher,hd=sd.algo,md=[],gd=[],yd=[],vd=[],Nd=[],Md=[],Ld=[],Fd=[],Hd=[],Vd=[];(function(){for(var qd=[],Wd=0;Wd<256;Wd++)Wd<128?qd[Wd]=Wd<<1:qd[Wd]=Wd<<1^283;for(var Kd=0,Xd=0,Wd=0;Wd<256;Wd++){var df=Xd^Xd<<1^Xd<<2^Xd<<3^Xd<<4;df=df>>>8^df&255^99,md[Kd]=df,gd[df]=Kd;var Ef=qd[Kd],pf=qd[Ef],mf=qd[pf],_f=qd[df]*257^df*16843008;yd[Kd]=_f<<24|_f>>>8,vd[Kd]=_f<<16|_f>>>16,Nd[Kd]=_f<<8|_f>>>24,Md[Kd]=_f;var _f=mf*16843009^pf*65537^Ef*257^Kd*16843008;Ld[df]=_f<<24|_f>>>8,Fd[df]=_f<<16|_f>>>16,Hd[df]=_f<<8|_f>>>24,Vd[df]=_f,Kd?(Kd=Ef^qd[qd[qd[mf^Ef]]],Xd^=qd[qd[Xd]]):Kd=Xd=1}})();var Gd=[0,1,2,4,8,16,32,64,128,27,54],Ud=hd.AES=fd.extend({_doReset:function(){var qd;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var Wd=this._keyPriorReset=this._key,Kd=Wd.words,Xd=Wd.sigBytes/4,df=this._nRounds=Xd+6,Ef=(df+1)*4,pf=this._keySchedule=[],mf=0;mf6&&mf%Xd==4&&(qd=md[qd>>>24]<<24|md[qd>>>16&255]<<16|md[qd>>>8&255]<<8|md[qd&255]):(qd=qd<<8|qd>>>24,qd=md[qd>>>24]<<24|md[qd>>>16&255]<<16|md[qd>>>8&255]<<8|md[qd&255],qd^=Gd[mf/Xd|0]<<24),pf[mf]=pf[mf-Xd]^qd);for(var _f=this._invKeySchedule=[],xf=0;xf>>24]]^Fd[md[qd>>>16&255]]^Hd[md[qd>>>8&255]]^Vd[md[qd&255]]}}},encryptBlock:function(qd,Wd){this._doCryptBlock(qd,Wd,this._keySchedule,yd,vd,Nd,Md,md)},decryptBlock:function(qd,Wd){var Kd=qd[Wd+1];qd[Wd+1]=qd[Wd+3],qd[Wd+3]=Kd,this._doCryptBlock(qd,Wd,this._invKeySchedule,Ld,Fd,Hd,Vd,gd);var Kd=qd[Wd+1];qd[Wd+1]=qd[Wd+3],qd[Wd+3]=Kd},_doCryptBlock:function(qd,Wd,Kd,Xd,df,Ef,pf,mf){for(var _f=this._nRounds,xf=qd[Wd]^Kd[0],Cf=qd[Wd+1]^Kd[1],If=qd[Wd+2]^Kd[2],Sf=qd[Wd+3]^Kd[3],wf=4,Pf=1;Pf<_f;Pf++){var lh=Xd[xf>>>24]^df[Cf>>>16&255]^Ef[If>>>8&255]^pf[Sf&255]^Kd[wf++],xh=Xd[Cf>>>24]^df[If>>>16&255]^Ef[Sf>>>8&255]^pf[xf&255]^Kd[wf++],Eh=Xd[If>>>24]^df[Sf>>>16&255]^Ef[xf>>>8&255]^pf[Cf&255]^Kd[wf++],Mh=Xd[Sf>>>24]^df[xf>>>16&255]^Ef[Cf>>>8&255]^pf[If&255]^Kd[wf++];xf=lh,Cf=xh,If=Eh,Sf=Mh}var lh=(mf[xf>>>24]<<24|mf[Cf>>>16&255]<<16|mf[If>>>8&255]<<8|mf[Sf&255])^Kd[wf++],xh=(mf[Cf>>>24]<<24|mf[If>>>16&255]<<16|mf[Sf>>>8&255]<<8|mf[xf&255])^Kd[wf++],Eh=(mf[If>>>24]<<24|mf[Sf>>>16&255]<<16|mf[xf>>>8&255]<<8|mf[Cf&255])^Kd[wf++],Mh=(mf[Sf>>>24]<<24|mf[xf>>>16&255]<<16|mf[Cf>>>8&255]<<8|mf[If&255])^Kd[wf++];qd[Wd]=lh,qd[Wd+1]=xh,qd[Wd+2]=Eh,qd[Wd+3]=Mh},keySize:256/32});sd.AES=fd._createHelper(Ud)}(),rd.AES})}(aes)),aes.exports}var tripledes={exports:{}},hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.WordArray,hd=pd.BlockCipher,md=sd.algo,gd=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],yd=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],vd=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],Nd=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Md=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Ld=md.DES=hd.extend({_doReset:function(){for(var Gd=this._key,Ud=Gd.words,qd=[],Wd=0;Wd<56;Wd++){var Kd=gd[Wd]-1;qd[Wd]=Ud[Kd>>>5]>>>31-Kd%32&1}for(var Xd=this._subKeys=[],df=0;df<16;df++){for(var Ef=Xd[df]=[],pf=vd[df],Wd=0;Wd<24;Wd++)Ef[Wd/6|0]|=qd[(yd[Wd]-1+pf)%28]<<31-Wd%6,Ef[4+(Wd/6|0)]|=qd[28+(yd[Wd+24]-1+pf)%28]<<31-Wd%6;Ef[0]=Ef[0]<<1|Ef[0]>>>31;for(var Wd=1;Wd<7;Wd++)Ef[Wd]=Ef[Wd]>>>(Wd-1)*4+3;Ef[7]=Ef[7]<<5|Ef[7]>>>27}for(var mf=this._invSubKeys=[],Wd=0;Wd<16;Wd++)mf[Wd]=Xd[15-Wd]},encryptBlock:function(Gd,Ud){this._doCryptBlock(Gd,Ud,this._subKeys)},decryptBlock:function(Gd,Ud){this._doCryptBlock(Gd,Ud,this._invSubKeys)},_doCryptBlock:function(Gd,Ud,qd){this._lBlock=Gd[Ud],this._rBlock=Gd[Ud+1],Fd.call(this,4,252645135),Fd.call(this,16,65535),Hd.call(this,2,858993459),Hd.call(this,8,16711935),Fd.call(this,1,1431655765);for(var Wd=0;Wd<16;Wd++){for(var Kd=qd[Wd],Xd=this._lBlock,df=this._rBlock,Ef=0,pf=0;pf<8;pf++)Ef|=Nd[pf][((df^Kd[pf])&Md[pf])>>>0];this._lBlock=df,this._rBlock=Xd^Ef}var mf=this._lBlock;this._lBlock=this._rBlock,this._rBlock=mf,Fd.call(this,1,1431655765),Hd.call(this,8,16711935),Hd.call(this,2,858993459),Fd.call(this,16,65535),Fd.call(this,4,252645135),Gd[Ud]=this._lBlock,Gd[Ud+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function Fd(Gd,Ud){var qd=(this._lBlock>>>Gd^this._rBlock)&Ud;this._rBlock^=qd,this._lBlock^=qd<>>Gd^this._lBlock)&Ud;this._lBlock^=qd,this._rBlock^=qd<192.");var qd=Ud.slice(0,2),Wd=Ud.length<4?Ud.slice(0,2):Ud.slice(2,4),Kd=Ud.length<6?Ud.slice(0,2):Ud.slice(4,6);this._des1=Ld.createEncryptor(fd.create(qd)),this._des2=Ld.createEncryptor(fd.create(Wd)),this._des3=Ld.createEncryptor(fd.create(Kd))},encryptBlock:function(Gd,Ud){this._des1.encryptBlock(Gd,Ud),this._des2.decryptBlock(Gd,Ud),this._des3.encryptBlock(Gd,Ud)},decryptBlock:function(Gd,Ud){this._des3.decryptBlock(Gd,Ud),this._des2.encryptBlock(Gd,Ud),this._des1.decryptBlock(Gd,Ud)},keySize:192/32,ivSize:64/32,blockSize:64/32});sd.TripleDES=hd._createHelper(Vd)}(),rd.TripleDES})}(tripledes)),tripledes.exports}var rc4={exports:{}},hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.StreamCipher,hd=sd.algo,md=hd.RC4=fd.extend({_doReset:function(){for(var vd=this._key,Nd=vd.words,Md=vd.sigBytes,Ld=this._S=[],Fd=0;Fd<256;Fd++)Ld[Fd]=Fd;for(var Fd=0,Hd=0;Fd<256;Fd++){var Vd=Fd%Md,Gd=Nd[Vd>>>2]>>>24-Vd%4*8&255;Hd=(Hd+Ld[Fd]+Gd)%256;var Ud=Ld[Fd];Ld[Fd]=Ld[Hd],Ld[Hd]=Ud}this._i=this._j=0},_doProcessBlock:function(vd,Nd){vd[Nd]^=gd.call(this)},keySize:256/32,ivSize:0});function gd(){for(var vd=this._S,Nd=this._i,Md=this._j,Ld=0,Fd=0;Fd<4;Fd++){Nd=(Nd+1)%256,Md=(Md+vd[Nd])%256;var Hd=vd[Nd];vd[Nd]=vd[Md],vd[Md]=Hd,Ld|=vd[(vd[Nd]+vd[Md])%256]<<24-Fd*8}return this._i=Nd,this._j=Md,Ld}sd.RC4=fd._createHelper(md);var yd=hd.RC4Drop=md.extend({cfg:md.cfg.extend({drop:192}),_doReset:function(){md._doReset.call(this);for(var vd=this.cfg.drop;vd>0;vd--)gd.call(this)}});sd.RC4Drop=fd._createHelper(yd)}(),rd.RC4})}(rc4)),rc4.exports}var rabbit={exports:{}},hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.StreamCipher,hd=sd.algo,md=[],gd=[],yd=[],vd=hd.Rabbit=fd.extend({_doReset:function(){for(var Md=this._key.words,Ld=this.cfg.iv,Fd=0;Fd<4;Fd++)Md[Fd]=(Md[Fd]<<8|Md[Fd]>>>24)&16711935|(Md[Fd]<<24|Md[Fd]>>>8)&4278255360;var Hd=this._X=[Md[0],Md[3]<<16|Md[2]>>>16,Md[1],Md[0]<<16|Md[3]>>>16,Md[2],Md[1]<<16|Md[0]>>>16,Md[3],Md[2]<<16|Md[1]>>>16],Vd=this._C=[Md[2]<<16|Md[2]>>>16,Md[0]&4294901760|Md[1]&65535,Md[3]<<16|Md[3]>>>16,Md[1]&4294901760|Md[2]&65535,Md[0]<<16|Md[0]>>>16,Md[2]&4294901760|Md[3]&65535,Md[1]<<16|Md[1]>>>16,Md[3]&4294901760|Md[0]&65535];this._b=0;for(var Fd=0;Fd<4;Fd++)Nd.call(this);for(var Fd=0;Fd<8;Fd++)Vd[Fd]^=Hd[Fd+4&7];if(Ld){var Gd=Ld.words,Ud=Gd[0],qd=Gd[1],Wd=(Ud<<8|Ud>>>24)&16711935|(Ud<<24|Ud>>>8)&4278255360,Kd=(qd<<8|qd>>>24)&16711935|(qd<<24|qd>>>8)&4278255360,Xd=Wd>>>16|Kd&4294901760,df=Kd<<16|Wd&65535;Vd[0]^=Wd,Vd[1]^=Xd,Vd[2]^=Kd,Vd[3]^=df,Vd[4]^=Wd,Vd[5]^=Xd,Vd[6]^=Kd,Vd[7]^=df;for(var Fd=0;Fd<4;Fd++)Nd.call(this)}},_doProcessBlock:function(Md,Ld){var Fd=this._X;Nd.call(this),md[0]=Fd[0]^Fd[5]>>>16^Fd[3]<<16,md[1]=Fd[2]^Fd[7]>>>16^Fd[5]<<16,md[2]=Fd[4]^Fd[1]>>>16^Fd[7]<<16,md[3]=Fd[6]^Fd[3]>>>16^Fd[1]<<16;for(var Hd=0;Hd<4;Hd++)md[Hd]=(md[Hd]<<8|md[Hd]>>>24)&16711935|(md[Hd]<<24|md[Hd]>>>8)&4278255360,Md[Ld+Hd]^=md[Hd]},blockSize:128/32,ivSize:64/32});function Nd(){for(var Md=this._X,Ld=this._C,Fd=0;Fd<8;Fd++)gd[Fd]=Ld[Fd];Ld[0]=Ld[0]+1295307597+this._b|0,Ld[1]=Ld[1]+3545052371+(Ld[0]>>>0>>0?1:0)|0,Ld[2]=Ld[2]+886263092+(Ld[1]>>>0>>0?1:0)|0,Ld[3]=Ld[3]+1295307597+(Ld[2]>>>0>>0?1:0)|0,Ld[4]=Ld[4]+3545052371+(Ld[3]>>>0>>0?1:0)|0,Ld[5]=Ld[5]+886263092+(Ld[4]>>>0>>0?1:0)|0,Ld[6]=Ld[6]+1295307597+(Ld[5]>>>0>>0?1:0)|0,Ld[7]=Ld[7]+3545052371+(Ld[6]>>>0>>0?1:0)|0,this._b=Ld[7]>>>0>>0?1:0;for(var Fd=0;Fd<8;Fd++){var Hd=Md[Fd]+Ld[Fd],Vd=Hd&65535,Gd=Hd>>>16,Ud=((Vd*Vd>>>17)+Vd*Gd>>>15)+Gd*Gd,qd=((Hd&4294901760)*Hd|0)+((Hd&65535)*Hd|0);yd[Fd]=Ud^qd}Md[0]=yd[0]+(yd[7]<<16|yd[7]>>>16)+(yd[6]<<16|yd[6]>>>16)|0,Md[1]=yd[1]+(yd[0]<<8|yd[0]>>>24)+yd[7]|0,Md[2]=yd[2]+(yd[1]<<16|yd[1]>>>16)+(yd[0]<<16|yd[0]>>>16)|0,Md[3]=yd[3]+(yd[2]<<8|yd[2]>>>24)+yd[1]|0,Md[4]=yd[4]+(yd[3]<<16|yd[3]>>>16)+(yd[2]<<16|yd[2]>>>16)|0,Md[5]=yd[5]+(yd[4]<<8|yd[4]>>>24)+yd[3]|0,Md[6]=yd[6]+(yd[5]<<16|yd[5]>>>16)+(yd[4]<<16|yd[4]>>>16)|0,Md[7]=yd[7]+(yd[6]<<8|yd[6]>>>24)+yd[5]|0}sd.Rabbit=fd._createHelper(vd)}(),rd.Rabbit})}(rabbit)),rabbit.exports}var rabbitLegacy={exports:{}},hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.StreamCipher,hd=sd.algo,md=[],gd=[],yd=[],vd=hd.RabbitLegacy=fd.extend({_doReset:function(){var Md=this._key.words,Ld=this.cfg.iv,Fd=this._X=[Md[0],Md[3]<<16|Md[2]>>>16,Md[1],Md[0]<<16|Md[3]>>>16,Md[2],Md[1]<<16|Md[0]>>>16,Md[3],Md[2]<<16|Md[1]>>>16],Hd=this._C=[Md[2]<<16|Md[2]>>>16,Md[0]&4294901760|Md[1]&65535,Md[3]<<16|Md[3]>>>16,Md[1]&4294901760|Md[2]&65535,Md[0]<<16|Md[0]>>>16,Md[2]&4294901760|Md[3]&65535,Md[1]<<16|Md[1]>>>16,Md[3]&4294901760|Md[0]&65535];this._b=0;for(var Vd=0;Vd<4;Vd++)Nd.call(this);for(var Vd=0;Vd<8;Vd++)Hd[Vd]^=Fd[Vd+4&7];if(Ld){var Gd=Ld.words,Ud=Gd[0],qd=Gd[1],Wd=(Ud<<8|Ud>>>24)&16711935|(Ud<<24|Ud>>>8)&4278255360,Kd=(qd<<8|qd>>>24)&16711935|(qd<<24|qd>>>8)&4278255360,Xd=Wd>>>16|Kd&4294901760,df=Kd<<16|Wd&65535;Hd[0]^=Wd,Hd[1]^=Xd,Hd[2]^=Kd,Hd[3]^=df,Hd[4]^=Wd,Hd[5]^=Xd,Hd[6]^=Kd,Hd[7]^=df;for(var Vd=0;Vd<4;Vd++)Nd.call(this)}},_doProcessBlock:function(Md,Ld){var Fd=this._X;Nd.call(this),md[0]=Fd[0]^Fd[5]>>>16^Fd[3]<<16,md[1]=Fd[2]^Fd[7]>>>16^Fd[5]<<16,md[2]=Fd[4]^Fd[1]>>>16^Fd[7]<<16,md[3]=Fd[6]^Fd[3]>>>16^Fd[1]<<16;for(var Hd=0;Hd<4;Hd++)md[Hd]=(md[Hd]<<8|md[Hd]>>>24)&16711935|(md[Hd]<<24|md[Hd]>>>8)&4278255360,Md[Ld+Hd]^=md[Hd]},blockSize:128/32,ivSize:64/32});function Nd(){for(var Md=this._X,Ld=this._C,Fd=0;Fd<8;Fd++)gd[Fd]=Ld[Fd];Ld[0]=Ld[0]+1295307597+this._b|0,Ld[1]=Ld[1]+3545052371+(Ld[0]>>>0>>0?1:0)|0,Ld[2]=Ld[2]+886263092+(Ld[1]>>>0>>0?1:0)|0,Ld[3]=Ld[3]+1295307597+(Ld[2]>>>0>>0?1:0)|0,Ld[4]=Ld[4]+3545052371+(Ld[3]>>>0>>0?1:0)|0,Ld[5]=Ld[5]+886263092+(Ld[4]>>>0>>0?1:0)|0,Ld[6]=Ld[6]+1295307597+(Ld[5]>>>0>>0?1:0)|0,Ld[7]=Ld[7]+3545052371+(Ld[6]>>>0>>0?1:0)|0,this._b=Ld[7]>>>0>>0?1:0;for(var Fd=0;Fd<8;Fd++){var Hd=Md[Fd]+Ld[Fd],Vd=Hd&65535,Gd=Hd>>>16,Ud=((Vd*Vd>>>17)+Vd*Gd>>>15)+Gd*Gd,qd=((Hd&4294901760)*Hd|0)+((Hd&65535)*Hd|0);yd[Fd]=Ud^qd}Md[0]=yd[0]+(yd[7]<<16|yd[7]>>>16)+(yd[6]<<16|yd[6]>>>16)|0,Md[1]=yd[1]+(yd[0]<<8|yd[0]>>>24)+yd[7]|0,Md[2]=yd[2]+(yd[1]<<16|yd[1]>>>16)+(yd[0]<<16|yd[0]>>>16)|0,Md[3]=yd[3]+(yd[2]<<8|yd[2]>>>24)+yd[1]|0,Md[4]=yd[4]+(yd[3]<<16|yd[3]>>>16)+(yd[2]<<16|yd[2]>>>16)|0,Md[5]=yd[5]+(yd[4]<<8|yd[4]>>>24)+yd[3]|0,Md[6]=yd[6]+(yd[5]<<16|yd[5]>>>16)+(yd[4]<<16|yd[4]>>>16)|0,Md[7]=yd[7]+(yd[6]<<8|yd[6]>>>24)+yd[5]|0}sd.RabbitLegacy=fd._createHelper(vd)}(),rd.RabbitLegacy})}(rabbitLegacy)),rabbitLegacy.exports}var blowfish={exports:{}},hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(Ra,qa){(function(rd,sd,pd){Ra.exports=sd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(rd){return function(){var sd=rd,pd=sd.lib,fd=pd.BlockCipher,hd=sd.algo;const md=16,gd=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],yd=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var vd={pbox:[],sbox:[]};function Nd(Vd,Gd){let Ud=Gd>>24&255,qd=Gd>>16&255,Wd=Gd>>8&255,Kd=Gd&255,Xd=Vd.sbox[0][Ud]+Vd.sbox[1][qd];return Xd=Xd^Vd.sbox[2][Wd],Xd=Xd+Vd.sbox[3][Kd],Xd}function Md(Vd,Gd,Ud){let qd=Gd,Wd=Ud,Kd;for(let Xd=0;Xd1;--Xd)qd=qd^Vd.pbox[Xd],Wd=Nd(Vd,qd)^Wd,Kd=qd,qd=Wd,Wd=Kd;return Kd=qd,qd=Wd,Wd=Kd,Wd=Wd^Vd.pbox[1],qd=qd^Vd.pbox[0],{left:qd,right:Wd}}function Fd(Vd,Gd,Ud){for(let df=0;df<4;df++){Vd.sbox[df]=[];for(let Ef=0;Ef<256;Ef++)Vd.sbox[df][Ef]=yd[df][Ef]}let qd=0;for(let df=0;df=Ud&&(qd=0);let Wd=0,Kd=0,Xd=0;for(let df=0;df2){var gd=rd.lastIndexOf("/");if(gd!==rd.length-1){gd===-1?(rd="",sd=0):(rd=rd.slice(0,gd),sd=rd.length-1-rd.lastIndexOf("/")),pd=md,fd=0;continue}}else if(rd.length===2||rd.length===1){rd="",sd=0,pd=md,fd=0;continue}}qa&&(rd.length>0?rd+="/..":rd="..",sd=2)}else rd.length>0?rd+="/"+Ra.slice(pd+1,md):rd=Ra.slice(pd+1,md),sd=md-pd-1;pd=md,fd=0}else hd===46&&fd!==-1?++fd:fd=-1}return rd}function _format(Ra,qa){var rd=qa.dir||qa.root,sd=qa.base||(qa.name||"")+(qa.ext||"");return rd?rd===qa.root?rd+sd:rd+Ra+sd:sd}var posix={resolve:function(){for(var qa="",rd=!1,sd,pd=arguments.length-1;pd>=-1&&!rd;pd--){var fd;pd>=0?fd=arguments[pd]:(sd===void 0&&(sd=define_process_default$6.cwd()),fd=sd),assertPath(fd),fd.length!==0&&(qa=fd+"/"+qa,rd=fd.charCodeAt(0)===47)}return qa=normalizeStringPosix(qa,!rd),rd?qa.length>0?"/"+qa:"/":qa.length>0?qa:"."},normalize:function(qa){if(assertPath(qa),qa.length===0)return".";var rd=qa.charCodeAt(0)===47,sd=qa.charCodeAt(qa.length-1)===47;return qa=normalizeStringPosix(qa,!rd),qa.length===0&&!rd&&(qa="."),qa.length>0&&sd&&(qa+="/"),rd?"/"+qa:qa},isAbsolute:function(qa){return assertPath(qa),qa.length>0&&qa.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var qa,rd=0;rd0&&(qa===void 0?qa=sd:qa+="/"+sd)}return qa===void 0?".":posix.normalize(qa)},relative:function(qa,rd){if(assertPath(qa),assertPath(rd),qa===rd||(qa=posix.resolve(qa),rd=posix.resolve(rd),qa===rd))return"";for(var sd=1;sdyd){if(rd.charCodeAt(hd+Nd)===47)return rd.slice(hd+Nd+1);if(Nd===0)return rd.slice(hd+Nd)}else fd>yd&&(qa.charCodeAt(sd+Nd)===47?vd=Nd:Nd===0&&(vd=0));break}var Md=qa.charCodeAt(sd+Nd),Ld=rd.charCodeAt(hd+Nd);if(Md!==Ld)break;Md===47&&(vd=Nd)}var Fd="";for(Nd=sd+vd+1;Nd<=pd;++Nd)(Nd===pd||qa.charCodeAt(Nd)===47)&&(Fd.length===0?Fd+="..":Fd+="/..");return Fd.length>0?Fd+rd.slice(hd+vd):(hd+=vd,rd.charCodeAt(hd)===47&&++hd,rd.slice(hd))},_makeLong:function(qa){return qa},dirname:function(qa){if(assertPath(qa),qa.length===0)return".";for(var rd=qa.charCodeAt(0),sd=rd===47,pd=-1,fd=!0,hd=qa.length-1;hd>=1;--hd)if(rd=qa.charCodeAt(hd),rd===47){if(!fd){pd=hd;break}}else fd=!1;return pd===-1?sd?"/":".":sd&&pd===1?"//":qa.slice(0,pd)},basename:function(qa,rd){if(rd!==void 0&&typeof rd!="string")throw new TypeError('"ext" argument must be a string');assertPath(qa);var sd=0,pd=-1,fd=!0,hd;if(rd!==void 0&&rd.length>0&&rd.length<=qa.length){if(rd.length===qa.length&&rd===qa)return"";var md=rd.length-1,gd=-1;for(hd=qa.length-1;hd>=0;--hd){var yd=qa.charCodeAt(hd);if(yd===47){if(!fd){sd=hd+1;break}}else gd===-1&&(fd=!1,gd=hd+1),md>=0&&(yd===rd.charCodeAt(md)?--md===-1&&(pd=hd):(md=-1,pd=gd))}return sd===pd?pd=gd:pd===-1&&(pd=qa.length),qa.slice(sd,pd)}else{for(hd=qa.length-1;hd>=0;--hd)if(qa.charCodeAt(hd)===47){if(!fd){sd=hd+1;break}}else pd===-1&&(fd=!1,pd=hd+1);return pd===-1?"":qa.slice(sd,pd)}},extname:function(qa){assertPath(qa);for(var rd=-1,sd=0,pd=-1,fd=!0,hd=0,md=qa.length-1;md>=0;--md){var gd=qa.charCodeAt(md);if(gd===47){if(!fd){sd=md+1;break}continue}pd===-1&&(fd=!1,pd=md+1),gd===46?rd===-1?rd=md:hd!==1&&(hd=1):rd!==-1&&(hd=-1)}return rd===-1||pd===-1||hd===0||hd===1&&rd===pd-1&&rd===sd+1?"":qa.slice(rd,pd)},format:function(qa){if(qa===null||typeof qa!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof qa);return _format("/",qa)},parse:function(qa){assertPath(qa);var rd={root:"",dir:"",base:"",ext:"",name:""};if(qa.length===0)return rd;var sd=qa.charCodeAt(0),pd=sd===47,fd;pd?(rd.root="/",fd=1):fd=0;for(var hd=-1,md=0,gd=-1,yd=!0,vd=qa.length-1,Nd=0;vd>=fd;--vd){if(sd=qa.charCodeAt(vd),sd===47){if(!yd){md=vd+1;break}continue}gd===-1&&(yd=!1,gd=vd+1),sd===46?hd===-1?hd=vd:Nd!==1&&(Nd=1):hd!==-1&&(Nd=-1)}return hd===-1||gd===-1||Nd===0||Nd===1&&hd===gd-1&&hd===md+1?gd!==-1&&(md===0&&pd?rd.base=rd.name=qa.slice(1,gd):rd.base=rd.name=qa.slice(md,gd)):(md===0&&pd?(rd.name=qa.slice(1,hd),rd.base=qa.slice(1,gd)):(rd.name=qa.slice(md,hd),rd.base=qa.slice(md,gd)),rd.ext=qa.slice(hd,gd)),md>0?rd.dir=qa.slice(0,md-1):pd&&(rd.dir="/"),rd},sep:"/",delimiter:":",win32:null,posix:null};posix.posix=posix;var pathBrowserify=posix,define_process_default$5={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};function apply(Ra,...qa){return(...rd)=>Ra(...qa,...rd)}function initialParams(Ra){return function(...qa){var rd=qa.pop();return Ra.call(this,qa,rd)}}var hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,hasSetImmediate=typeof setImmediate=="function"&&setImmediate,hasNextTick=typeof define_process_default$5=="object"&&typeof define_process_default$5.nextTick=="function";function fallback(Ra){setTimeout(Ra,0)}function wrap(Ra){return(qa,...rd)=>Ra(()=>qa(...rd))}var _defer$1;hasQueueMicrotask?_defer$1=queueMicrotask:hasSetImmediate?_defer$1=setImmediate:hasNextTick?_defer$1=define_process_default$5.nextTick:_defer$1=fallback;var setImmediate$1$1=wrap(_defer$1);function asyncify(Ra){return isAsync(Ra)?function(...qa){const rd=qa.pop(),sd=Ra.apply(this,qa);return handlePromise(sd,rd)}:initialParams(function(qa,rd){var sd;try{sd=Ra.apply(this,qa)}catch(pd){return rd(pd)}if(sd&&typeof sd.then=="function")return handlePromise(sd,rd);rd(null,sd)})}function handlePromise(Ra,qa){return Ra.then(rd=>{invokeCallback(qa,null,rd)},rd=>{invokeCallback(qa,rd&&(rd instanceof Error||rd.message)?rd:new Error(rd))})}function invokeCallback(Ra,qa,rd){try{Ra(qa,rd)}catch(sd){setImmediate$1$1(pd=>{throw pd},sd)}}function isAsync(Ra){return Ra[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(Ra){return Ra[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(Ra){return typeof Ra[Symbol.asyncIterator]=="function"}function wrapAsync(Ra){if(typeof Ra!="function")throw new Error("expected a function");return isAsync(Ra)?asyncify(Ra):Ra}function awaitify(Ra,qa){if(qa||(qa=Ra.length),!qa)throw new Error("arity is undefined");function rd(...sd){return typeof sd[qa-1]=="function"?Ra.apply(this,sd):new Promise((pd,fd)=>{sd[qa-1]=(hd,...md)=>{if(hd)return fd(hd);pd(md.length>1?md:md[0])},Ra.apply(this,sd)})}return rd}function applyEach$1(Ra){return function(rd,...sd){return awaitify(function(fd){var hd=this;return Ra(rd,(md,gd)=>{wrapAsync(md).apply(hd,sd.concat(gd))},fd)})}}function _asyncMap(Ra,qa,rd,sd){qa=qa||[];var pd=[],fd=0,hd=wrapAsync(rd);return Ra(qa,(md,gd,yd)=>{var vd=fd++;hd(md,(Nd,Md)=>{pd[vd]=Md,yd(Nd)})},md=>{sd(md,pd)})}function isArrayLike(Ra){return Ra&&typeof Ra.length=="number"&&Ra.length>=0&&Ra.length%1===0}const breakLoop={};function once(Ra){function qa(...rd){if(Ra!==null){var sd=Ra;Ra=null,sd.apply(this,rd)}}return Object.assign(qa,Ra),qa}function getIterator(Ra){return Ra[Symbol.iterator]&&Ra[Symbol.iterator]()}function createArrayIterator(Ra){var qa=-1,rd=Ra.length;return function(){return++qa=qa||hd||pd||(hd=!0,Ra.next().then(({value:Md,done:Ld})=>{if(!(fd||pd)){if(hd=!1,Ld){pd=!0,md<=0&&sd(null);return}md++,rd(Md,gd,vd),gd++,yd()}}).catch(Nd))}function vd(Md,Ld){if(md-=1,!fd){if(Md)return Nd(Md);if(Md===!1){pd=!0,fd=!0;return}if(Ld===breakLoop||pd&&md<=0)return pd=!0,sd(null);yd()}}function Nd(Md){fd||(hd=!1,pd=!0,sd(Md))}yd()}var eachOfLimit$2=Ra=>(qa,rd,sd)=>{if(sd=once(sd),Ra<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!qa)return sd(null);if(isAsyncGenerator(qa))return asyncEachOfLimit(qa,Ra,rd,sd);if(isAsyncIterable(qa))return asyncEachOfLimit(qa[Symbol.asyncIterator](),Ra,rd,sd);var pd=createIterator(qa),fd=!1,hd=!1,md=0,gd=!1;function yd(Nd,Md){if(!hd)if(md-=1,Nd)fd=!0,sd(Nd);else if(Nd===!1)fd=!0,hd=!0;else{if(Md===breakLoop||fd&&md<=0)return fd=!0,sd(null);gd||vd()}}function vd(){for(gd=!0;md1?pd:pd[0])}return rd[PROMISE_SYMBOL]=new Promise((sd,pd)=>{Ra=sd,qa=pd}),rd}function auto(Ra,qa,rd){typeof qa!="number"&&(rd=qa,qa=null),rd=once(rd||promiseCallback());var sd=Object.keys(Ra).length;if(!sd)return rd(null);qa||(qa=sd);var pd={},fd=0,hd=!1,md=!1,gd=Object.create(null),yd=[],vd=[],Nd={};Object.keys(Ra).forEach(qd=>{var Wd=Ra[qd];if(!Array.isArray(Wd)){Md(qd,[Wd]),vd.push(qd);return}var Kd=Wd.slice(0,Wd.length-1),Xd=Kd.length;if(Xd===0){Md(qd,Wd),vd.push(qd);return}Nd[qd]=Xd,Kd.forEach(df=>{if(!Ra[df])throw new Error("async.auto task `"+qd+"` has a non-existent dependency `"+df+"` in "+Kd.join(", "));Fd(df,()=>{Xd--,Xd===0&&Md(qd,Wd)})})}),Gd(),Ld();function Md(qd,Wd){yd.push(()=>Vd(qd,Wd))}function Ld(){if(!hd){if(yd.length===0&&fd===0)return rd(null,pd);for(;yd.length&&fdKd()),Ld()}function Vd(qd,Wd){if(!md){var Kd=onlyOnce((df,...Ef)=>{if(fd--,df===!1){hd=!0;return}if(Ef.length<2&&([Ef]=Ef),df){var pf={};if(Object.keys(pd).forEach(mf=>{pf[mf]=pd[mf]}),pf[qd]=Ef,md=!0,gd=Object.create(null),hd)return;rd(df,pf)}else pd[qd]=Ef,Hd(qd)});fd++;var Xd=wrapAsync(Wd[Wd.length-1]);Wd.length>1?Xd(pd,Kd):Xd(Kd)}}function Gd(){for(var qd,Wd=0;vd.length;)qd=vd.pop(),Wd++,Ud(qd).forEach(Kd=>{--Nd[Kd]===0&&vd.push(Kd)});if(Wd!==sd)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function Ud(qd){var Wd=[];return Object.keys(Ra).forEach(Kd=>{const Xd=Ra[Kd];Array.isArray(Xd)&&Xd.indexOf(qd)>=0&&Wd.push(Kd)}),Wd}return rd[PROMISE_SYMBOL]}var FN_ARGS=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,ARROW_FN_ARGS=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,FN_ARG_SPLIT=/,/,FN_ARG=/(=.+)?(\s*)$/;function stripComments(Ra){let qa="",rd=0,sd=Ra.indexOf("*/");for(;rd>24&255)===255){var vd=yd>>16&255,Cd=yd>>8&255,wd=yd&255;vd===255?(vd=0,Cd===255?(Cd=0,wd===255?wd=0:++wd):++Cd):++vd,yd=0,yd+=vd<<16,yd+=Cd<<8,yd+=wd}else yd+=1<<24;return yd}function md(yd){return(yd[0]=hd(yd[0]))===0&&(yd[1]=hd(yd[1])),yd}var gd=dd.Encryptor=dd.extend({processBlock:function(yd,vd){var Cd=this._cipher,wd=Cd.blockSize,Nd=this._iv,Ld=this._counter;Nd&&(Ld=this._counter=Nd.slice(0),this._iv=void 0),md(Ld);var Ud=Ld.slice(0);Cd.encryptBlock(Ud,0);for(var jd=0;jd>>2]|=yd<<24-vd%4*8,dd.sigBytes+=yd},unpad:function(dd){var hd=dd.words[dd.sigBytes-1>>>2]&255;dd.sigBytes-=hd}},ud.pad.Ansix923})}(padAnsix923)),padAnsix923.exports}var padIso10126={exports:{}},hasRequiredPadIso10126;function requirePadIso10126(){return hasRequiredPadIso10126||(hasRequiredPadIso10126=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireCipherCore())})(commonjsGlobal,function(ud){return ud.pad.Iso10126={pad:function(dd,hd){var md=hd*4,gd=md-dd.sigBytes%md;dd.concat(ud.lib.WordArray.random(gd-1)).concat(ud.lib.WordArray.create([gd<<24],1))},unpad:function(dd){var hd=dd.words[dd.sigBytes-1>>>2]&255;dd.sigBytes-=hd}},ud.pad.Iso10126})}(padIso10126)),padIso10126.exports}var padIso97971={exports:{}},hasRequiredPadIso97971;function requirePadIso97971(){return hasRequiredPadIso97971||(hasRequiredPadIso97971=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireCipherCore())})(commonjsGlobal,function(ud){return ud.pad.Iso97971={pad:function(dd,hd){dd.concat(ud.lib.WordArray.create([2147483648],1)),ud.pad.ZeroPadding.pad(dd,hd)},unpad:function(dd){ud.pad.ZeroPadding.unpad(dd),dd.sigBytes--}},ud.pad.Iso97971})}(padIso97971)),padIso97971.exports}var padZeropadding={exports:{}},hasRequiredPadZeropadding;function requirePadZeropadding(){return hasRequiredPadZeropadding||(hasRequiredPadZeropadding=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireCipherCore())})(commonjsGlobal,function(ud){return ud.pad.ZeroPadding={pad:function(dd,hd){var md=hd*4;dd.clamp(),dd.sigBytes+=md-(dd.sigBytes%md||md)},unpad:function(dd){for(var hd=dd.words,md=dd.sigBytes-1,md=dd.sigBytes-1;md>=0;md--)if(hd[md>>>2]>>>24-md%4*8&255){dd.sigBytes=md+1;break}}},ud.pad.ZeroPadding})}(padZeropadding)),padZeropadding.exports}var padNopadding={exports:{}},hasRequiredPadNopadding;function requirePadNopadding(){return hasRequiredPadNopadding||(hasRequiredPadNopadding=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireCipherCore())})(commonjsGlobal,function(ud){return ud.pad.NoPadding={pad:function(){},unpad:function(){}},ud.pad.NoPadding})}(padNopadding)),padNopadding.exports}var formatHex={exports:{}},hasRequiredFormatHex;function requireFormatHex(){return hasRequiredFormatHex||(hasRequiredFormatHex=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireCipherCore())})(commonjsGlobal,function(ud){return function(dd){var hd=ud,md=hd.lib,gd=md.CipherParams,yd=hd.enc,vd=yd.Hex,Cd=hd.format;Cd.Hex={stringify:function(wd){return wd.ciphertext.toString(vd)},parse:function(wd){var Nd=vd.parse(wd);return gd.create({ciphertext:Nd})}}}(),ud.format.Hex})}(formatHex)),formatHex.exports}var aes={exports:{}},hasRequiredAes;function requireAes(){return hasRequiredAes||(hasRequiredAes=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.BlockCipher,gd=dd.algo,yd=[],vd=[],Cd=[],wd=[],Nd=[],Ld=[],Ud=[],jd=[],Gd=[],Yd=[];(function(){for(var Wd=[],Xd=0;Xd<256;Xd++)Xd<128?Wd[Xd]=Xd<<1:Wd[Xd]=Xd<<1^283;for(var Jd=0,Zd=0,Xd=0;Xd<256;Xd++){var mf=Zd^Zd<<1^Zd<<2^Zd<<3^Zd<<4;mf=mf>>>8^mf&255^99,yd[Jd]=mf,vd[mf]=Jd;var xf=Wd[Jd],_f=Wd[xf],vf=Wd[_f],gf=Wd[mf]*257^mf*16843008;Cd[Jd]=gf<<24|gf>>>8,wd[Jd]=gf<<16|gf>>>16,Nd[Jd]=gf<<8|gf>>>24,Ld[Jd]=gf;var gf=vf*16843009^_f*65537^xf*257^Jd*16843008;Ud[mf]=gf<<24|gf>>>8,jd[mf]=gf<<16|gf>>>16,Gd[mf]=gf<<8|gf>>>24,Yd[mf]=gf,Jd?(Jd=xf^Wd[Wd[Wd[vf^xf]]],Zd^=Wd[Wd[Zd]]):Jd=Zd=1}})();var zd=[0,1,2,4,8,16,32,64,128,27,54],qd=gd.AES=md.extend({_doReset:function(){var Wd;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var Xd=this._keyPriorReset=this._key,Jd=Xd.words,Zd=Xd.sigBytes/4,mf=this._nRounds=Zd+6,xf=(mf+1)*4,_f=this._keySchedule=[],vf=0;vf6&&vf%Zd==4&&(Wd=yd[Wd>>>24]<<24|yd[Wd>>>16&255]<<16|yd[Wd>>>8&255]<<8|yd[Wd&255]):(Wd=Wd<<8|Wd>>>24,Wd=yd[Wd>>>24]<<24|yd[Wd>>>16&255]<<16|yd[Wd>>>8&255]<<8|yd[Wd&255],Wd^=zd[vf/Zd|0]<<24),_f[vf]=_f[vf-Zd]^Wd);for(var gf=this._invKeySchedule=[],Af=0;Af>>24]]^jd[yd[Wd>>>16&255]]^Gd[yd[Wd>>>8&255]]^Yd[yd[Wd&255]]}}},encryptBlock:function(Wd,Xd){this._doCryptBlock(Wd,Xd,this._keySchedule,Cd,wd,Nd,Ld,yd)},decryptBlock:function(Wd,Xd){var Jd=Wd[Xd+1];Wd[Xd+1]=Wd[Xd+3],Wd[Xd+3]=Jd,this._doCryptBlock(Wd,Xd,this._invKeySchedule,Ud,jd,Gd,Yd,vd);var Jd=Wd[Xd+1];Wd[Xd+1]=Wd[Xd+3],Wd[Xd+3]=Jd},_doCryptBlock:function(Wd,Xd,Jd,Zd,mf,xf,_f,vf){for(var gf=this._nRounds,Af=Wd[Xd]^Jd[0],Df=Wd[Xd+1]^Jd[1],Of=Wd[Xd+2]^Jd[2],Cf=Wd[Xd+3]^Jd[3],If=4,Ff=1;Ff>>24]^mf[Df>>>16&255]^xf[Of>>>8&255]^_f[Cf&255]^Jd[If++],Sh=Zd[Df>>>24]^mf[Of>>>16&255]^xf[Cf>>>8&255]^_f[Af&255]^Jd[If++],yh=Zd[Of>>>24]^mf[Cf>>>16&255]^xf[Af>>>8&255]^_f[Df&255]^Jd[If++],Mh=Zd[Cf>>>24]^mf[Af>>>16&255]^xf[Df>>>8&255]^_f[Of&255]^Jd[If++];Af=sh,Df=Sh,Of=yh,Cf=Mh}var sh=(vf[Af>>>24]<<24|vf[Df>>>16&255]<<16|vf[Of>>>8&255]<<8|vf[Cf&255])^Jd[If++],Sh=(vf[Df>>>24]<<24|vf[Of>>>16&255]<<16|vf[Cf>>>8&255]<<8|vf[Af&255])^Jd[If++],yh=(vf[Of>>>24]<<24|vf[Cf>>>16&255]<<16|vf[Af>>>8&255]<<8|vf[Df&255])^Jd[If++],Mh=(vf[Cf>>>24]<<24|vf[Af>>>16&255]<<16|vf[Df>>>8&255]<<8|vf[Of&255])^Jd[If++];Wd[Xd]=sh,Wd[Xd+1]=Sh,Wd[Xd+2]=yh,Wd[Xd+3]=Mh},keySize:256/32});dd.AES=md._createHelper(qd)}(),ud.AES})}(aes)),aes.exports}var tripledes={exports:{}},hasRequiredTripledes;function requireTripledes(){return hasRequiredTripledes||(hasRequiredTripledes=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.WordArray,gd=hd.BlockCipher,yd=dd.algo,vd=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],Cd=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],wd=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],Nd=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],Ld=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],Ud=yd.DES=gd.extend({_doReset:function(){for(var zd=this._key,qd=zd.words,Wd=[],Xd=0;Xd<56;Xd++){var Jd=vd[Xd]-1;Wd[Xd]=qd[Jd>>>5]>>>31-Jd%32&1}for(var Zd=this._subKeys=[],mf=0;mf<16;mf++){for(var xf=Zd[mf]=[],_f=wd[mf],Xd=0;Xd<24;Xd++)xf[Xd/6|0]|=Wd[(Cd[Xd]-1+_f)%28]<<31-Xd%6,xf[4+(Xd/6|0)]|=Wd[28+(Cd[Xd+24]-1+_f)%28]<<31-Xd%6;xf[0]=xf[0]<<1|xf[0]>>>31;for(var Xd=1;Xd<7;Xd++)xf[Xd]=xf[Xd]>>>(Xd-1)*4+3;xf[7]=xf[7]<<5|xf[7]>>>27}for(var vf=this._invSubKeys=[],Xd=0;Xd<16;Xd++)vf[Xd]=Zd[15-Xd]},encryptBlock:function(zd,qd){this._doCryptBlock(zd,qd,this._subKeys)},decryptBlock:function(zd,qd){this._doCryptBlock(zd,qd,this._invSubKeys)},_doCryptBlock:function(zd,qd,Wd){this._lBlock=zd[qd],this._rBlock=zd[qd+1],jd.call(this,4,252645135),jd.call(this,16,65535),Gd.call(this,2,858993459),Gd.call(this,8,16711935),jd.call(this,1,1431655765);for(var Xd=0;Xd<16;Xd++){for(var Jd=Wd[Xd],Zd=this._lBlock,mf=this._rBlock,xf=0,_f=0;_f<8;_f++)xf|=Nd[_f][((mf^Jd[_f])&Ld[_f])>>>0];this._lBlock=mf,this._rBlock=Zd^xf}var vf=this._lBlock;this._lBlock=this._rBlock,this._rBlock=vf,jd.call(this,1,1431655765),Gd.call(this,8,16711935),Gd.call(this,2,858993459),jd.call(this,16,65535),jd.call(this,4,252645135),zd[qd]=this._lBlock,zd[qd+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function jd(zd,qd){var Wd=(this._lBlock>>>zd^this._rBlock)&qd;this._rBlock^=Wd,this._lBlock^=Wd<>>zd^this._lBlock)&qd;this._lBlock^=Wd,this._rBlock^=Wd<192.");var Wd=qd.slice(0,2),Xd=qd.length<4?qd.slice(0,2):qd.slice(2,4),Jd=qd.length<6?qd.slice(0,2):qd.slice(4,6);this._des1=Ud.createEncryptor(md.create(Wd)),this._des2=Ud.createEncryptor(md.create(Xd)),this._des3=Ud.createEncryptor(md.create(Jd))},encryptBlock:function(zd,qd){this._des1.encryptBlock(zd,qd),this._des2.decryptBlock(zd,qd),this._des3.encryptBlock(zd,qd)},decryptBlock:function(zd,qd){this._des3.decryptBlock(zd,qd),this._des2.encryptBlock(zd,qd),this._des1.decryptBlock(zd,qd)},keySize:192/32,ivSize:64/32,blockSize:64/32});dd.TripleDES=gd._createHelper(Yd)}(),ud.TripleDES})}(tripledes)),tripledes.exports}var rc4={exports:{}},hasRequiredRc4;function requireRc4(){return hasRequiredRc4||(hasRequiredRc4=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.StreamCipher,gd=dd.algo,yd=gd.RC4=md.extend({_doReset:function(){for(var wd=this._key,Nd=wd.words,Ld=wd.sigBytes,Ud=this._S=[],jd=0;jd<256;jd++)Ud[jd]=jd;for(var jd=0,Gd=0;jd<256;jd++){var Yd=jd%Ld,zd=Nd[Yd>>>2]>>>24-Yd%4*8&255;Gd=(Gd+Ud[jd]+zd)%256;var qd=Ud[jd];Ud[jd]=Ud[Gd],Ud[Gd]=qd}this._i=this._j=0},_doProcessBlock:function(wd,Nd){wd[Nd]^=vd.call(this)},keySize:256/32,ivSize:0});function vd(){for(var wd=this._S,Nd=this._i,Ld=this._j,Ud=0,jd=0;jd<4;jd++){Nd=(Nd+1)%256,Ld=(Ld+wd[Nd])%256;var Gd=wd[Nd];wd[Nd]=wd[Ld],wd[Ld]=Gd,Ud|=wd[(wd[Nd]+wd[Ld])%256]<<24-jd*8}return this._i=Nd,this._j=Ld,Ud}dd.RC4=md._createHelper(yd);var Cd=gd.RC4Drop=yd.extend({cfg:yd.cfg.extend({drop:192}),_doReset:function(){yd._doReset.call(this);for(var wd=this.cfg.drop;wd>0;wd--)vd.call(this)}});dd.RC4Drop=md._createHelper(Cd)}(),ud.RC4})}(rc4)),rc4.exports}var rabbit={exports:{}},hasRequiredRabbit;function requireRabbit(){return hasRequiredRabbit||(hasRequiredRabbit=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.StreamCipher,gd=dd.algo,yd=[],vd=[],Cd=[],wd=gd.Rabbit=md.extend({_doReset:function(){for(var Ld=this._key.words,Ud=this.cfg.iv,jd=0;jd<4;jd++)Ld[jd]=(Ld[jd]<<8|Ld[jd]>>>24)&16711935|(Ld[jd]<<24|Ld[jd]>>>8)&4278255360;var Gd=this._X=[Ld[0],Ld[3]<<16|Ld[2]>>>16,Ld[1],Ld[0]<<16|Ld[3]>>>16,Ld[2],Ld[1]<<16|Ld[0]>>>16,Ld[3],Ld[2]<<16|Ld[1]>>>16],Yd=this._C=[Ld[2]<<16|Ld[2]>>>16,Ld[0]&4294901760|Ld[1]&65535,Ld[3]<<16|Ld[3]>>>16,Ld[1]&4294901760|Ld[2]&65535,Ld[0]<<16|Ld[0]>>>16,Ld[2]&4294901760|Ld[3]&65535,Ld[1]<<16|Ld[1]>>>16,Ld[3]&4294901760|Ld[0]&65535];this._b=0;for(var jd=0;jd<4;jd++)Nd.call(this);for(var jd=0;jd<8;jd++)Yd[jd]^=Gd[jd+4&7];if(Ud){var zd=Ud.words,qd=zd[0],Wd=zd[1],Xd=(qd<<8|qd>>>24)&16711935|(qd<<24|qd>>>8)&4278255360,Jd=(Wd<<8|Wd>>>24)&16711935|(Wd<<24|Wd>>>8)&4278255360,Zd=Xd>>>16|Jd&4294901760,mf=Jd<<16|Xd&65535;Yd[0]^=Xd,Yd[1]^=Zd,Yd[2]^=Jd,Yd[3]^=mf,Yd[4]^=Xd,Yd[5]^=Zd,Yd[6]^=Jd,Yd[7]^=mf;for(var jd=0;jd<4;jd++)Nd.call(this)}},_doProcessBlock:function(Ld,Ud){var jd=this._X;Nd.call(this),yd[0]=jd[0]^jd[5]>>>16^jd[3]<<16,yd[1]=jd[2]^jd[7]>>>16^jd[5]<<16,yd[2]=jd[4]^jd[1]>>>16^jd[7]<<16,yd[3]=jd[6]^jd[3]>>>16^jd[1]<<16;for(var Gd=0;Gd<4;Gd++)yd[Gd]=(yd[Gd]<<8|yd[Gd]>>>24)&16711935|(yd[Gd]<<24|yd[Gd]>>>8)&4278255360,Ld[Ud+Gd]^=yd[Gd]},blockSize:128/32,ivSize:64/32});function Nd(){for(var Ld=this._X,Ud=this._C,jd=0;jd<8;jd++)vd[jd]=Ud[jd];Ud[0]=Ud[0]+1295307597+this._b|0,Ud[1]=Ud[1]+3545052371+(Ud[0]>>>0>>0?1:0)|0,Ud[2]=Ud[2]+886263092+(Ud[1]>>>0>>0?1:0)|0,Ud[3]=Ud[3]+1295307597+(Ud[2]>>>0>>0?1:0)|0,Ud[4]=Ud[4]+3545052371+(Ud[3]>>>0>>0?1:0)|0,Ud[5]=Ud[5]+886263092+(Ud[4]>>>0>>0?1:0)|0,Ud[6]=Ud[6]+1295307597+(Ud[5]>>>0>>0?1:0)|0,Ud[7]=Ud[7]+3545052371+(Ud[6]>>>0>>0?1:0)|0,this._b=Ud[7]>>>0>>0?1:0;for(var jd=0;jd<8;jd++){var Gd=Ld[jd]+Ud[jd],Yd=Gd&65535,zd=Gd>>>16,qd=((Yd*Yd>>>17)+Yd*zd>>>15)+zd*zd,Wd=((Gd&4294901760)*Gd|0)+((Gd&65535)*Gd|0);Cd[jd]=qd^Wd}Ld[0]=Cd[0]+(Cd[7]<<16|Cd[7]>>>16)+(Cd[6]<<16|Cd[6]>>>16)|0,Ld[1]=Cd[1]+(Cd[0]<<8|Cd[0]>>>24)+Cd[7]|0,Ld[2]=Cd[2]+(Cd[1]<<16|Cd[1]>>>16)+(Cd[0]<<16|Cd[0]>>>16)|0,Ld[3]=Cd[3]+(Cd[2]<<8|Cd[2]>>>24)+Cd[1]|0,Ld[4]=Cd[4]+(Cd[3]<<16|Cd[3]>>>16)+(Cd[2]<<16|Cd[2]>>>16)|0,Ld[5]=Cd[5]+(Cd[4]<<8|Cd[4]>>>24)+Cd[3]|0,Ld[6]=Cd[6]+(Cd[5]<<16|Cd[5]>>>16)+(Cd[4]<<16|Cd[4]>>>16)|0,Ld[7]=Cd[7]+(Cd[6]<<8|Cd[6]>>>24)+Cd[5]|0}dd.Rabbit=md._createHelper(wd)}(),ud.Rabbit})}(rabbit)),rabbit.exports}var rabbitLegacy={exports:{}},hasRequiredRabbitLegacy;function requireRabbitLegacy(){return hasRequiredRabbitLegacy||(hasRequiredRabbitLegacy=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.StreamCipher,gd=dd.algo,yd=[],vd=[],Cd=[],wd=gd.RabbitLegacy=md.extend({_doReset:function(){var Ld=this._key.words,Ud=this.cfg.iv,jd=this._X=[Ld[0],Ld[3]<<16|Ld[2]>>>16,Ld[1],Ld[0]<<16|Ld[3]>>>16,Ld[2],Ld[1]<<16|Ld[0]>>>16,Ld[3],Ld[2]<<16|Ld[1]>>>16],Gd=this._C=[Ld[2]<<16|Ld[2]>>>16,Ld[0]&4294901760|Ld[1]&65535,Ld[3]<<16|Ld[3]>>>16,Ld[1]&4294901760|Ld[2]&65535,Ld[0]<<16|Ld[0]>>>16,Ld[2]&4294901760|Ld[3]&65535,Ld[1]<<16|Ld[1]>>>16,Ld[3]&4294901760|Ld[0]&65535];this._b=0;for(var Yd=0;Yd<4;Yd++)Nd.call(this);for(var Yd=0;Yd<8;Yd++)Gd[Yd]^=jd[Yd+4&7];if(Ud){var zd=Ud.words,qd=zd[0],Wd=zd[1],Xd=(qd<<8|qd>>>24)&16711935|(qd<<24|qd>>>8)&4278255360,Jd=(Wd<<8|Wd>>>24)&16711935|(Wd<<24|Wd>>>8)&4278255360,Zd=Xd>>>16|Jd&4294901760,mf=Jd<<16|Xd&65535;Gd[0]^=Xd,Gd[1]^=Zd,Gd[2]^=Jd,Gd[3]^=mf,Gd[4]^=Xd,Gd[5]^=Zd,Gd[6]^=Jd,Gd[7]^=mf;for(var Yd=0;Yd<4;Yd++)Nd.call(this)}},_doProcessBlock:function(Ld,Ud){var jd=this._X;Nd.call(this),yd[0]=jd[0]^jd[5]>>>16^jd[3]<<16,yd[1]=jd[2]^jd[7]>>>16^jd[5]<<16,yd[2]=jd[4]^jd[1]>>>16^jd[7]<<16,yd[3]=jd[6]^jd[3]>>>16^jd[1]<<16;for(var Gd=0;Gd<4;Gd++)yd[Gd]=(yd[Gd]<<8|yd[Gd]>>>24)&16711935|(yd[Gd]<<24|yd[Gd]>>>8)&4278255360,Ld[Ud+Gd]^=yd[Gd]},blockSize:128/32,ivSize:64/32});function Nd(){for(var Ld=this._X,Ud=this._C,jd=0;jd<8;jd++)vd[jd]=Ud[jd];Ud[0]=Ud[0]+1295307597+this._b|0,Ud[1]=Ud[1]+3545052371+(Ud[0]>>>0>>0?1:0)|0,Ud[2]=Ud[2]+886263092+(Ud[1]>>>0>>0?1:0)|0,Ud[3]=Ud[3]+1295307597+(Ud[2]>>>0>>0?1:0)|0,Ud[4]=Ud[4]+3545052371+(Ud[3]>>>0>>0?1:0)|0,Ud[5]=Ud[5]+886263092+(Ud[4]>>>0>>0?1:0)|0,Ud[6]=Ud[6]+1295307597+(Ud[5]>>>0>>0?1:0)|0,Ud[7]=Ud[7]+3545052371+(Ud[6]>>>0>>0?1:0)|0,this._b=Ud[7]>>>0>>0?1:0;for(var jd=0;jd<8;jd++){var Gd=Ld[jd]+Ud[jd],Yd=Gd&65535,zd=Gd>>>16,qd=((Yd*Yd>>>17)+Yd*zd>>>15)+zd*zd,Wd=((Gd&4294901760)*Gd|0)+((Gd&65535)*Gd|0);Cd[jd]=qd^Wd}Ld[0]=Cd[0]+(Cd[7]<<16|Cd[7]>>>16)+(Cd[6]<<16|Cd[6]>>>16)|0,Ld[1]=Cd[1]+(Cd[0]<<8|Cd[0]>>>24)+Cd[7]|0,Ld[2]=Cd[2]+(Cd[1]<<16|Cd[1]>>>16)+(Cd[0]<<16|Cd[0]>>>16)|0,Ld[3]=Cd[3]+(Cd[2]<<8|Cd[2]>>>24)+Cd[1]|0,Ld[4]=Cd[4]+(Cd[3]<<16|Cd[3]>>>16)+(Cd[2]<<16|Cd[2]>>>16)|0,Ld[5]=Cd[5]+(Cd[4]<<8|Cd[4]>>>24)+Cd[3]|0,Ld[6]=Cd[6]+(Cd[5]<<16|Cd[5]>>>16)+(Cd[4]<<16|Cd[4]>>>16)|0,Ld[7]=Cd[7]+(Cd[6]<<8|Cd[6]>>>24)+Cd[5]|0}dd.RabbitLegacy=md._createHelper(wd)}(),ud.RabbitLegacy})}(rabbitLegacy)),rabbitLegacy.exports}var blowfish={exports:{}},hasRequiredBlowfish;function requireBlowfish(){return hasRequiredBlowfish||(hasRequiredBlowfish=1,function(Ra,ed){(function(ud,dd,hd){Ra.exports=dd(requireCore(),requireEncBase64(),requireMd5$1(),requireEvpkdf(),requireCipherCore())})(commonjsGlobal,function(ud){return function(){var dd=ud,hd=dd.lib,md=hd.BlockCipher,gd=dd.algo;const yd=16,vd=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],Cd=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var wd={pbox:[],sbox:[]};function Nd(Yd,zd){let qd=zd>>24&255,Wd=zd>>16&255,Xd=zd>>8&255,Jd=zd&255,Zd=Yd.sbox[0][qd]+Yd.sbox[1][Wd];return Zd=Zd^Yd.sbox[2][Xd],Zd=Zd+Yd.sbox[3][Jd],Zd}function Ld(Yd,zd,qd){let Wd=zd,Xd=qd,Jd;for(let Zd=0;Zd1;--Zd)Wd=Wd^Yd.pbox[Zd],Xd=Nd(Yd,Wd)^Xd,Jd=Wd,Wd=Xd,Xd=Jd;return Jd=Wd,Wd=Xd,Xd=Jd,Xd=Xd^Yd.pbox[1],Wd=Wd^Yd.pbox[0],{left:Wd,right:Xd}}function jd(Yd,zd,qd){for(let mf=0;mf<4;mf++){Yd.sbox[mf]=[];for(let xf=0;xf<256;xf++)Yd.sbox[mf][xf]=Cd[mf][xf]}let Wd=0;for(let mf=0;mf=qd&&(Wd=0);let Xd=0,Jd=0,Zd=0;for(let mf=0;mf2){var vd=ud.lastIndexOf("/");if(vd!==ud.length-1){vd===-1?(ud="",dd=0):(ud=ud.slice(0,vd),dd=ud.length-1-ud.lastIndexOf("/")),hd=yd,md=0;continue}}else if(ud.length===2||ud.length===1){ud="",dd=0,hd=yd,md=0;continue}}ed&&(ud.length>0?ud+="/..":ud="..",dd=2)}else ud.length>0?ud+="/"+Ra.slice(hd+1,yd):ud=Ra.slice(hd+1,yd),dd=yd-hd-1;hd=yd,md=0}else gd===46&&md!==-1?++md:md=-1}return ud}function _format(Ra,ed){var ud=ed.dir||ed.root,dd=ed.base||(ed.name||"")+(ed.ext||"");return ud?ud===ed.root?ud+dd:ud+Ra+dd:dd}var posix={resolve:function(){for(var ed="",ud=!1,dd,hd=arguments.length-1;hd>=-1&&!ud;hd--){var md;hd>=0?md=arguments[hd]:(dd===void 0&&(dd=define_process_default$6.cwd()),md=dd),assertPath(md),md.length!==0&&(ed=md+"/"+ed,ud=md.charCodeAt(0)===47)}return ed=normalizeStringPosix(ed,!ud),ud?ed.length>0?"/"+ed:"/":ed.length>0?ed:"."},normalize:function(ed){if(assertPath(ed),ed.length===0)return".";var ud=ed.charCodeAt(0)===47,dd=ed.charCodeAt(ed.length-1)===47;return ed=normalizeStringPosix(ed,!ud),ed.length===0&&!ud&&(ed="."),ed.length>0&&dd&&(ed+="/"),ud?"/"+ed:ed},isAbsolute:function(ed){return assertPath(ed),ed.length>0&&ed.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var ed,ud=0;ud0&&(ed===void 0?ed=dd:ed+="/"+dd)}return ed===void 0?".":posix.normalize(ed)},relative:function(ed,ud){if(assertPath(ed),assertPath(ud),ed===ud||(ed=posix.resolve(ed),ud=posix.resolve(ud),ed===ud))return"";for(var dd=1;ddCd){if(ud.charCodeAt(gd+Nd)===47)return ud.slice(gd+Nd+1);if(Nd===0)return ud.slice(gd+Nd)}else md>Cd&&(ed.charCodeAt(dd+Nd)===47?wd=Nd:Nd===0&&(wd=0));break}var Ld=ed.charCodeAt(dd+Nd),Ud=ud.charCodeAt(gd+Nd);if(Ld!==Ud)break;Ld===47&&(wd=Nd)}var jd="";for(Nd=dd+wd+1;Nd<=hd;++Nd)(Nd===hd||ed.charCodeAt(Nd)===47)&&(jd.length===0?jd+="..":jd+="/..");return jd.length>0?jd+ud.slice(gd+wd):(gd+=wd,ud.charCodeAt(gd)===47&&++gd,ud.slice(gd))},_makeLong:function(ed){return ed},dirname:function(ed){if(assertPath(ed),ed.length===0)return".";for(var ud=ed.charCodeAt(0),dd=ud===47,hd=-1,md=!0,gd=ed.length-1;gd>=1;--gd)if(ud=ed.charCodeAt(gd),ud===47){if(!md){hd=gd;break}}else md=!1;return hd===-1?dd?"/":".":dd&&hd===1?"//":ed.slice(0,hd)},basename:function(ed,ud){if(ud!==void 0&&typeof ud!="string")throw new TypeError('"ext" argument must be a string');assertPath(ed);var dd=0,hd=-1,md=!0,gd;if(ud!==void 0&&ud.length>0&&ud.length<=ed.length){if(ud.length===ed.length&&ud===ed)return"";var yd=ud.length-1,vd=-1;for(gd=ed.length-1;gd>=0;--gd){var Cd=ed.charCodeAt(gd);if(Cd===47){if(!md){dd=gd+1;break}}else vd===-1&&(md=!1,vd=gd+1),yd>=0&&(Cd===ud.charCodeAt(yd)?--yd===-1&&(hd=gd):(yd=-1,hd=vd))}return dd===hd?hd=vd:hd===-1&&(hd=ed.length),ed.slice(dd,hd)}else{for(gd=ed.length-1;gd>=0;--gd)if(ed.charCodeAt(gd)===47){if(!md){dd=gd+1;break}}else hd===-1&&(md=!1,hd=gd+1);return hd===-1?"":ed.slice(dd,hd)}},extname:function(ed){assertPath(ed);for(var ud=-1,dd=0,hd=-1,md=!0,gd=0,yd=ed.length-1;yd>=0;--yd){var vd=ed.charCodeAt(yd);if(vd===47){if(!md){dd=yd+1;break}continue}hd===-1&&(md=!1,hd=yd+1),vd===46?ud===-1?ud=yd:gd!==1&&(gd=1):ud!==-1&&(gd=-1)}return ud===-1||hd===-1||gd===0||gd===1&&ud===hd-1&&ud===dd+1?"":ed.slice(ud,hd)},format:function(ed){if(ed===null||typeof ed!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof ed);return _format("/",ed)},parse:function(ed){assertPath(ed);var ud={root:"",dir:"",base:"",ext:"",name:""};if(ed.length===0)return ud;var dd=ed.charCodeAt(0),hd=dd===47,md;hd?(ud.root="/",md=1):md=0;for(var gd=-1,yd=0,vd=-1,Cd=!0,wd=ed.length-1,Nd=0;wd>=md;--wd){if(dd=ed.charCodeAt(wd),dd===47){if(!Cd){yd=wd+1;break}continue}vd===-1&&(Cd=!1,vd=wd+1),dd===46?gd===-1?gd=wd:Nd!==1&&(Nd=1):gd!==-1&&(Nd=-1)}return gd===-1||vd===-1||Nd===0||Nd===1&&gd===vd-1&&gd===yd+1?vd!==-1&&(yd===0&&hd?ud.base=ud.name=ed.slice(1,vd):ud.base=ud.name=ed.slice(yd,vd)):(yd===0&&hd?(ud.name=ed.slice(1,gd),ud.base=ed.slice(1,vd)):(ud.name=ed.slice(yd,gd),ud.base=ed.slice(yd,vd)),ud.ext=ed.slice(gd,vd)),yd>0?ud.dir=ed.slice(0,yd-1):hd&&(ud.dir="/"),ud},sep:"/",delimiter:":",win32:null,posix:null};posix.posix=posix;var pathBrowserify=posix,define_process_default$5={};function apply(Ra,...ed){return(...ud)=>Ra(...ed,...ud)}function initialParams(Ra){return function(...ed){var ud=ed.pop();return Ra.call(this,ed,ud)}}var hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,hasSetImmediate=typeof setImmediate=="function"&&setImmediate,hasNextTick=typeof define_process_default$5=="object"&&typeof define_process_default$5.nextTick=="function";function fallback(Ra){setTimeout(Ra,0)}function wrap(Ra){return(ed,...ud)=>Ra(()=>ed(...ud))}var _defer$1;hasQueueMicrotask?_defer$1=queueMicrotask:hasSetImmediate?_defer$1=setImmediate:hasNextTick?_defer$1=define_process_default$5.nextTick:_defer$1=fallback;var setImmediate$1$1=wrap(_defer$1);function asyncify(Ra){return isAsync(Ra)?function(...ed){const ud=ed.pop(),dd=Ra.apply(this,ed);return handlePromise(dd,ud)}:initialParams(function(ed,ud){var dd;try{dd=Ra.apply(this,ed)}catch(hd){return ud(hd)}if(dd&&typeof dd.then=="function")return handlePromise(dd,ud);ud(null,dd)})}function handlePromise(Ra,ed){return Ra.then(ud=>{invokeCallback(ed,null,ud)},ud=>{invokeCallback(ed,ud&&(ud instanceof Error||ud.message)?ud:new Error(ud))})}function invokeCallback(Ra,ed,ud){try{Ra(ed,ud)}catch(dd){setImmediate$1$1(hd=>{throw hd},dd)}}function isAsync(Ra){return Ra[Symbol.toStringTag]==="AsyncFunction"}function isAsyncGenerator(Ra){return Ra[Symbol.toStringTag]==="AsyncGenerator"}function isAsyncIterable(Ra){return typeof Ra[Symbol.asyncIterator]=="function"}function wrapAsync(Ra){if(typeof Ra!="function")throw new Error("expected a function");return isAsync(Ra)?asyncify(Ra):Ra}function awaitify(Ra,ed){if(ed||(ed=Ra.length),!ed)throw new Error("arity is undefined");function ud(...dd){return typeof dd[ed-1]=="function"?Ra.apply(this,dd):new Promise((hd,md)=>{dd[ed-1]=(gd,...yd)=>{if(gd)return md(gd);hd(yd.length>1?yd:yd[0])},Ra.apply(this,dd)})}return ud}function applyEach$1(Ra){return function(ud,...dd){return awaitify(function(md){var gd=this;return Ra(ud,(yd,vd)=>{wrapAsync(yd).apply(gd,dd.concat(vd))},md)})}}function _asyncMap(Ra,ed,ud,dd){ed=ed||[];var hd=[],md=0,gd=wrapAsync(ud);return Ra(ed,(yd,vd,Cd)=>{var wd=md++;gd(yd,(Nd,Ld)=>{hd[wd]=Ld,Cd(Nd)})},yd=>{dd(yd,hd)})}function isArrayLike(Ra){return Ra&&typeof Ra.length=="number"&&Ra.length>=0&&Ra.length%1===0}const breakLoop={};function once(Ra){function ed(...ud){if(Ra!==null){var dd=Ra;Ra=null,dd.apply(this,ud)}}return Object.assign(ed,Ra),ed}function getIterator(Ra){return Ra[Symbol.iterator]&&Ra[Symbol.iterator]()}function createArrayIterator(Ra){var ed=-1,ud=Ra.length;return function(){return++ed=ed||gd||hd||(gd=!0,Ra.next().then(({value:Ld,done:Ud})=>{if(!(md||hd)){if(gd=!1,Ud){hd=!0,yd<=0&&dd(null);return}yd++,ud(Ld,vd,wd),vd++,Cd()}}).catch(Nd))}function wd(Ld,Ud){if(yd-=1,!md){if(Ld)return Nd(Ld);if(Ld===!1){hd=!0,md=!0;return}if(Ud===breakLoop||hd&&yd<=0)return hd=!0,dd(null);Cd()}}function Nd(Ld){md||(gd=!1,hd=!0,dd(Ld))}Cd()}var eachOfLimit$2=Ra=>(ed,ud,dd)=>{if(dd=once(dd),Ra<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!ed)return dd(null);if(isAsyncGenerator(ed))return asyncEachOfLimit(ed,Ra,ud,dd);if(isAsyncIterable(ed))return asyncEachOfLimit(ed[Symbol.asyncIterator](),Ra,ud,dd);var hd=createIterator(ed),md=!1,gd=!1,yd=0,vd=!1;function Cd(Nd,Ld){if(!gd)if(yd-=1,Nd)md=!0,dd(Nd);else if(Nd===!1)md=!0,gd=!0;else{if(Ld===breakLoop||md&&yd<=0)return md=!0,dd(null);vd||wd()}}function wd(){for(vd=!0;yd1?hd:hd[0])}return ud[PROMISE_SYMBOL]=new Promise((dd,hd)=>{Ra=dd,ed=hd}),ud}function auto(Ra,ed,ud){typeof ed!="number"&&(ud=ed,ed=null),ud=once(ud||promiseCallback());var dd=Object.keys(Ra).length;if(!dd)return ud(null);ed||(ed=dd);var hd={},md=0,gd=!1,yd=!1,vd=Object.create(null),Cd=[],wd=[],Nd={};Object.keys(Ra).forEach(Wd=>{var Xd=Ra[Wd];if(!Array.isArray(Xd)){Ld(Wd,[Xd]),wd.push(Wd);return}var Jd=Xd.slice(0,Xd.length-1),Zd=Jd.length;if(Zd===0){Ld(Wd,Xd),wd.push(Wd);return}Nd[Wd]=Zd,Jd.forEach(mf=>{if(!Ra[mf])throw new Error("async.auto task `"+Wd+"` has a non-existent dependency `"+mf+"` in "+Jd.join(", "));jd(mf,()=>{Zd--,Zd===0&&Ld(Wd,Xd)})})}),zd(),Ud();function Ld(Wd,Xd){Cd.push(()=>Yd(Wd,Xd))}function Ud(){if(!gd){if(Cd.length===0&&md===0)return ud(null,hd);for(;Cd.length&&mdJd()),Ud()}function Yd(Wd,Xd){if(!yd){var Jd=onlyOnce((mf,...xf)=>{if(md--,mf===!1){gd=!0;return}if(xf.length<2&&([xf]=xf),mf){var _f={};if(Object.keys(hd).forEach(vf=>{_f[vf]=hd[vf]}),_f[Wd]=xf,yd=!0,vd=Object.create(null),gd)return;ud(mf,_f)}else hd[Wd]=xf,Gd(Wd)});md++;var Zd=wrapAsync(Xd[Xd.length-1]);Xd.length>1?Zd(hd,Jd):Zd(Jd)}}function zd(){for(var Wd,Xd=0;wd.length;)Wd=wd.pop(),Xd++,qd(Wd).forEach(Jd=>{--Nd[Jd]===0&&wd.push(Jd)});if(Xd!==dd)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}function qd(Wd){var Xd=[];return Object.keys(Ra).forEach(Jd=>{const Zd=Ra[Jd];Array.isArray(Zd)&&Zd.indexOf(Wd)>=0&&Xd.push(Jd)}),Xd}return ud[PROMISE_SYMBOL]}var FN_ARGS=/^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/,ARROW_FN_ARGS=/^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/,FN_ARG_SPLIT=/,/,FN_ARG=/(=.+)?(\s*)$/;function stripComments(Ra){let ed="",ud=0,dd=Ra.indexOf("*/");for(;udpd.replace(FN_ARG,"").trim())}function autoInject(Ra,qa){var rd={};return Object.keys(Ra).forEach(sd=>{var pd=Ra[sd],fd,hd=isAsync(pd),md=!hd&&pd.length===1||hd&&pd.length===0;if(Array.isArray(pd))fd=[...pd],pd=fd.pop(),rd[sd]=fd.concat(fd.length>0?gd:pd);else if(md)rd[sd]=pd;else{if(fd=parseParams(pd),pd.length===0&&!hd&&fd.length===0)throw new Error("autoInject task functions require explicit parameters.");hd||fd.pop(),rd[sd]=fd.concat(gd)}function gd(yd,vd){var Nd=fd.map(Md=>yd[Md]);Nd.push(vd),wrapAsync(pd)(...Nd)}}),auto(rd,qa)}class DLL{constructor(){this.head=this.tail=null,this.length=0}removeLink(qa){return qa.prev?qa.prev.next=qa.next:this.head=qa.next,qa.next?qa.next.prev=qa.prev:this.tail=qa.prev,qa.prev=qa.next=null,this.length-=1,qa}empty(){for(;this.head;)this.shift();return this}insertAfter(qa,rd){rd.prev=qa,rd.next=qa.next,qa.next?qa.next.prev=rd:this.tail=rd,qa.next=rd,this.length+=1}insertBefore(qa,rd){rd.prev=qa.prev,rd.next=qa,qa.prev?qa.prev.next=rd:this.head=rd,qa.prev=rd,this.length+=1}unshift(qa){this.head?this.insertBefore(this.head,qa):setInitial(this,qa)}push(qa){this.tail?this.insertAfter(this.tail,qa):setInitial(this,qa)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var qa=this.head;qa;)yield qa.data,qa=qa.next}remove(qa){for(var rd=this.head;rd;){var{next:sd}=rd;qa(rd)&&this.removeLink(rd),rd=sd}return this}}function setInitial(Ra,qa){Ra.length=1,Ra.head=Ra.tail=qa}function queue$1(Ra,qa,rd){if(qa==null)qa=1;else if(qa===0)throw new RangeError("Concurrency must not be zero");var sd=wrapAsync(Ra),pd=0,fd=[];const hd={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function md(Ud,qd){hd[Ud].push(qd)}function gd(Ud,qd){const Wd=(...Kd)=>{yd(Ud,Wd),qd(...Kd)};hd[Ud].push(Wd)}function yd(Ud,qd){if(!Ud)return Object.keys(hd).forEach(Wd=>hd[Wd]=[]);if(!qd)return hd[Ud]=[];hd[Ud]=hd[Ud].filter(Wd=>Wd!==qd)}function vd(Ud,...qd){hd[Ud].forEach(Wd=>Wd(...qd))}var Nd=!1;function Md(Ud,qd,Wd,Kd){if(Kd!=null&&typeof Kd!="function")throw new Error("task callback must be a function");Gd.started=!0;var Xd,df;function Ef(mf,..._f){if(mf)return Wd?df(mf):Xd();if(_f.length<=1)return Xd(_f[0]);Xd(_f)}var pf=Gd._createTaskItem(Ud,Wd?Ef:Kd||Ef);if(qd?Gd._tasks.unshift(pf):Gd._tasks.push(pf),Nd||(Nd=!0,setImmediate$1$1(()=>{Nd=!1,Gd.process()})),Wd||!Kd)return new Promise((mf,_f)=>{Xd=mf,df=_f})}function Ld(Ud){return function(qd,...Wd){pd-=1;for(var Kd=0,Xd=Ud.length;Kd0&&fd.splice(Ef,1),df.callback(qd,...Wd),qd!=null&&vd("error",qd,df.data)}pd<=Gd.concurrency-Gd.buffer&&vd("unsaturated"),Gd.idle()&&vd("drain"),Gd.process()}}function Fd(Ud){return Ud.length===0&&Gd.idle()?(setImmediate$1$1(()=>vd("drain")),!0):!1}const Hd=Ud=>qd=>{if(!qd)return new Promise((Wd,Kd)=>{gd(Ud,(Xd,df)=>{if(Xd)return Kd(Xd);Wd(df)})});yd(Ud),md(Ud,qd)};var Vd=!1,Gd={_tasks:new DLL,_createTaskItem(Ud,qd){return{data:Ud,callback:qd}},*[Symbol.iterator](){yield*Gd._tasks[Symbol.iterator]()},concurrency:qa,payload:rd,buffer:qa/4,started:!1,paused:!1,push(Ud,qd){return Array.isArray(Ud)?Fd(Ud)?void 0:Ud.map(Wd=>Md(Wd,!1,!1,qd)):Md(Ud,!1,!1,qd)},pushAsync(Ud,qd){return Array.isArray(Ud)?Fd(Ud)?void 0:Ud.map(Wd=>Md(Wd,!1,!0,qd)):Md(Ud,!1,!0,qd)},kill(){yd(),Gd._tasks.empty()},unshift(Ud,qd){return Array.isArray(Ud)?Fd(Ud)?void 0:Ud.map(Wd=>Md(Wd,!0,!1,qd)):Md(Ud,!0,!1,qd)},unshiftAsync(Ud,qd){return Array.isArray(Ud)?Fd(Ud)?void 0:Ud.map(Wd=>Md(Wd,!0,!0,qd)):Md(Ud,!0,!0,qd)},remove(Ud){Gd._tasks.remove(Ud)},process(){if(!Vd){for(Vd=!0;!Gd.paused&&pd{pd(qa,fd,(gd,yd)=>{qa=yd,md(gd)})},fd=>sd(fd,qa))}var reduce$1=awaitify(reduce,4);function seq(...Ra){var qa=Ra.map(wrapAsync);return function(...rd){var sd=this,pd=rd[rd.length-1];return typeof pd=="function"?rd.pop():pd=promiseCallback(),reduce$1(qa,rd,(fd,hd,md)=>{hd.apply(sd,fd.concat((gd,...yd)=>{md(gd,yd)}))},(fd,hd)=>pd(fd,...hd)),pd[PROMISE_SYMBOL]}}function compose(...Ra){return seq(...Ra.reverse())}function mapLimit(Ra,qa,rd,sd){return _asyncMap(eachOfLimit$2(qa),Ra,rd,sd)}var mapLimit$1=awaitify(mapLimit,4);function concatLimit(Ra,qa,rd,sd){var pd=wrapAsync(rd);return mapLimit$1(Ra,qa,(fd,hd)=>{pd(fd,(md,...gd)=>md?hd(md):hd(md,gd))},(fd,hd)=>{for(var md=[],gd=0;gd{var hd=!1,md;const gd=wrapAsync(pd);rd(sd,(yd,vd,Nd)=>{gd(yd,(Md,Ld)=>{if(Md||Md===!1)return Nd(Md);if(Ra(Ld)&&!md)return hd=!0,md=qa(!0,yd),Nd(null,breakLoop);Nd()})},yd=>{if(yd)return fd(yd);fd(null,hd?md:qa(!1))})}}function detect(Ra,qa,rd){return _createTester(sd=>sd,(sd,pd)=>pd)(eachOf$1,Ra,qa,rd)}var detect$1=awaitify(detect,3);function detectLimit(Ra,qa,rd,sd){return _createTester(pd=>pd,(pd,fd)=>fd)(eachOfLimit$2(qa),Ra,rd,sd)}var detectLimit$1=awaitify(detectLimit,4);function detectSeries(Ra,qa,rd){return _createTester(sd=>sd,(sd,pd)=>pd)(eachOfLimit$2(1),Ra,qa,rd)}var detectSeries$1=awaitify(detectSeries,3);function consoleFunc(Ra){return(qa,...rd)=>wrapAsync(qa)(...rd,(sd,...pd)=>{typeof console=="object"&&(sd?console.error&&console.error(sd):console[Ra]&&pd.forEach(fd=>console[Ra](fd)))})}var dir=consoleFunc("dir");function doWhilst(Ra,qa,rd){rd=onlyOnce(rd);var sd=wrapAsync(Ra),pd=wrapAsync(qa),fd;function hd(gd,...yd){if(gd)return rd(gd);gd!==!1&&(fd=yd,pd(...yd,md))}function md(gd,yd){if(gd)return rd(gd);if(gd!==!1){if(!yd)return rd(null,...fd);sd(hd)}}return md(null,!0)}var doWhilst$1=awaitify(doWhilst,3);function doUntil(Ra,qa,rd){const sd=wrapAsync(qa);return doWhilst$1(Ra,(...pd)=>{const fd=pd.pop();sd(...pd,(hd,md)=>fd(hd,!md))},rd)}function _withoutIndex(Ra){return(qa,rd,sd)=>Ra(qa,sd)}function eachLimit$2(Ra,qa,rd){return eachOf$1(Ra,_withoutIndex(wrapAsync(qa)),rd)}var each=awaitify(eachLimit$2,3);function eachLimit(Ra,qa,rd,sd){return eachOfLimit$2(qa)(Ra,_withoutIndex(wrapAsync(rd)),sd)}var eachLimit$1=awaitify(eachLimit,4);function eachSeries(Ra,qa,rd){return eachLimit$1(Ra,1,qa,rd)}var eachSeries$1=awaitify(eachSeries,3);function ensureAsync(Ra){return isAsync(Ra)?Ra:function(...qa){var rd=qa.pop(),sd=!0;qa.push((...pd)=>{sd?setImmediate$1$1(()=>rd(...pd)):rd(...pd)}),Ra.apply(this,qa),sd=!1}}function every(Ra,qa,rd){return _createTester(sd=>!sd,sd=>!sd)(eachOf$1,Ra,qa,rd)}var every$1=awaitify(every,3);function everyLimit(Ra,qa,rd,sd){return _createTester(pd=>!pd,pd=>!pd)(eachOfLimit$2(qa),Ra,rd,sd)}var everyLimit$1=awaitify(everyLimit,4);function everySeries(Ra,qa,rd){return _createTester(sd=>!sd,sd=>!sd)(eachOfSeries$1,Ra,qa,rd)}var everySeries$1=awaitify(everySeries,3);function filterArray(Ra,qa,rd,sd){var pd=new Array(qa.length);Ra(qa,(fd,hd,md)=>{rd(fd,(gd,yd)=>{pd[hd]=!!yd,md(gd)})},fd=>{if(fd)return sd(fd);for(var hd=[],md=0;md{rd(fd,(gd,yd)=>{if(gd)return md(gd);yd&&pd.push({index:hd,value:fd}),md(gd)})},fd=>{if(fd)return sd(fd);sd(null,pd.sort((hd,md)=>hd.index-md.index).map(hd=>hd.value))})}function _filter(Ra,qa,rd,sd){var pd=isArrayLike(qa)?filterArray:filterGeneric;return pd(Ra,qa,wrapAsync(rd),sd)}function filter(Ra,qa,rd){return _filter(eachOf$1,Ra,qa,rd)}var filter$1=awaitify(filter,3);function filterLimit(Ra,qa,rd,sd){return _filter(eachOfLimit$2(qa),Ra,rd,sd)}var filterLimit$1=awaitify(filterLimit,4);function filterSeries(Ra,qa,rd){return _filter(eachOfSeries$1,Ra,qa,rd)}var filterSeries$1=awaitify(filterSeries,3);function forever(Ra,qa){var rd=onlyOnce(qa),sd=wrapAsync(ensureAsync(Ra));function pd(fd){if(fd)return rd(fd);fd!==!1&&sd(pd)}return pd()}var forever$1=awaitify(forever,2);function groupByLimit(Ra,qa,rd,sd){var pd=wrapAsync(rd);return mapLimit$1(Ra,qa,(fd,hd)=>{pd(fd,(md,gd)=>md?hd(md):hd(md,{key:gd,val:fd}))},(fd,hd)=>{for(var md={},{hasOwnProperty:gd}=Object.prototype,yd=0;yd{fd(hd,md,(yd,vd)=>{if(yd)return gd(yd);pd[md]=vd,gd(yd)})},hd=>sd(hd,pd))}var mapValuesLimit$1=awaitify(mapValuesLimit,4);function mapValues(Ra,qa,rd){return mapValuesLimit$1(Ra,1/0,qa,rd)}function mapValuesSeries(Ra,qa,rd){return mapValuesLimit$1(Ra,1,qa,rd)}function memoize(Ra,qa=rd=>rd){var rd=Object.create(null),sd=Object.create(null),pd=wrapAsync(Ra),fd=initialParams((hd,md)=>{var gd=qa(...hd);gd in rd?setImmediate$1$1(()=>md(null,...rd[gd])):gd in sd?sd[gd].push(md):(sd[gd]=[md],pd(...hd,(yd,...vd)=>{yd||(rd[gd]=vd);var Nd=sd[gd];delete sd[gd];for(var Md=0,Ld=Nd.length;Md{var sd=isArrayLike(qa)?[]:{};Ra(qa,(pd,fd,hd)=>{wrapAsync(pd)((md,...gd)=>{gd.length<2&&([gd]=gd),sd[fd]=gd,hd(md)})},pd=>rd(pd,sd))},3);function parallel(Ra,qa){return _parallel(eachOf$1,Ra,qa)}function parallelLimit(Ra,qa,rd){return _parallel(eachOfLimit$2(qa),Ra,rd)}function queue(Ra,qa){var rd=wrapAsync(Ra);return queue$1((sd,pd)=>{rd(sd[0],pd)},qa,1)}class Heap{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(qa){let rd;for(;qa>0&&smaller(this.heap[qa],this.heap[rd=parent(qa)]);){let sd=this.heap[qa];this.heap[qa]=this.heap[rd],this.heap[rd]=sd,qa=rd}}percDown(qa){let rd;for(;(rd=leftChi(qa))=0;sd--)this.percDown(sd);return this}}function leftChi(Ra){return(Ra<<1)+1}function parent(Ra){return(Ra+1>>1)-1}function smaller(Ra,qa){return Ra.priority!==qa.priority?Ra.priority({data:hd,priority:md,callback:gd});function fd(hd,md){return Array.isArray(hd)?hd.map(gd=>({data:gd,priority:md})):{data:hd,priority:md}}return rd.push=function(hd,md=0,gd){return sd(fd(hd,md),gd)},rd.pushAsync=function(hd,md=0,gd){return pd(fd(hd,md),gd)},delete rd.unshift,delete rd.unshiftAsync,rd}function race(Ra,qa){if(qa=once(qa),!Array.isArray(Ra))return qa(new TypeError("First argument to race must be an array of functions"));if(!Ra.length)return qa();for(var rd=0,sd=Ra.length;rd{let md={};if(fd&&(md.error=fd),hd.length>0){var gd=hd;hd.length<=1&&([gd]=hd),md.value=gd}pd(null,md)}),qa.apply(this,sd)})}function reflectAll(Ra){var qa;return Array.isArray(Ra)?qa=Ra.map(reflect):(qa={},Object.keys(Ra).forEach(rd=>{qa[rd]=reflect.call(this,Ra[rd])})),qa}function reject$2(Ra,qa,rd,sd){const pd=wrapAsync(rd);return _filter(Ra,qa,(fd,hd)=>{pd(fd,(md,gd)=>{hd(md,!gd)})},sd)}function reject(Ra,qa,rd){return reject$2(eachOf$1,Ra,qa,rd)}var reject$1=awaitify(reject,3);function rejectLimit(Ra,qa,rd,sd){return reject$2(eachOfLimit$2(qa),Ra,rd,sd)}var rejectLimit$1=awaitify(rejectLimit,4);function rejectSeries(Ra,qa,rd){return reject$2(eachOfSeries$1,Ra,qa,rd)}var rejectSeries$1=awaitify(rejectSeries,3);function constant(Ra){return function(){return Ra}}const DEFAULT_TIMES=5,DEFAULT_INTERVAL=0;function retry(Ra,qa,rd){var sd={times:DEFAULT_TIMES,intervalFunc:constant(DEFAULT_INTERVAL)};if(arguments.length<3&&typeof Ra=="function"?(rd=qa||promiseCallback(),qa=Ra):(parseTimes(sd,Ra),rd=rd||promiseCallback()),typeof qa!="function")throw new Error("Invalid arguments for async.retry");var pd=wrapAsync(qa),fd=1;function hd(){pd((md,...gd)=>{md!==!1&&(md&&fd++{(pd.lengthsd)(eachOf$1,Ra,qa,rd)}var some$1=awaitify(some,3);function someLimit(Ra,qa,rd,sd){return _createTester(Boolean,pd=>pd)(eachOfLimit$2(qa),Ra,rd,sd)}var someLimit$1=awaitify(someLimit,4);function someSeries(Ra,qa,rd){return _createTester(Boolean,sd=>sd)(eachOfSeries$1,Ra,qa,rd)}var someSeries$1=awaitify(someSeries,3);function sortBy(Ra,qa,rd){var sd=wrapAsync(qa);return map$1(Ra,(fd,hd)=>{sd(fd,(md,gd)=>{if(md)return hd(md);hd(md,{value:fd,criteria:gd})})},(fd,hd)=>{if(fd)return rd(fd);rd(null,hd.sort(pd).map(md=>md.value))});function pd(fd,hd){var md=fd.criteria,gd=hd.criteria;return mdgd?1:0}}var sortBy$1=awaitify(sortBy,3);function timeout(Ra,qa,rd){var sd=wrapAsync(Ra);return initialParams((pd,fd)=>{var hd=!1,md;function gd(){var yd=Ra.name||"anonymous",vd=new Error('Callback function "'+yd+'" timed out.');vd.code="ETIMEDOUT",rd&&(vd.info=rd),hd=!0,fd(vd)}pd.push((...yd)=>{hd||(fd(...yd),clearTimeout(md))}),md=setTimeout(gd,qa),sd(...pd)})}function range(Ra){for(var qa=Array(Ra);Ra--;)qa[Ra]=Ra;return qa}function timesLimit(Ra,qa,rd,sd){var pd=wrapAsync(rd);return mapLimit$1(range(Ra),qa,pd,sd)}function times(Ra,qa,rd){return timesLimit(Ra,1/0,qa,rd)}function timesSeries(Ra,qa,rd){return timesLimit(Ra,1,qa,rd)}function transform(Ra,qa,rd,sd){arguments.length<=3&&typeof qa=="function"&&(sd=rd,rd=qa,qa=Array.isArray(Ra)?[]:{}),sd=once(sd||promiseCallback());var pd=wrapAsync(rd);return eachOf$1(Ra,(fd,hd,md)=>{pd(qa,fd,hd,md)},fd=>sd(fd,qa)),sd[PROMISE_SYMBOL]}function tryEach(Ra,qa){var rd=null,sd;return eachSeries$1(Ra,(pd,fd)=>{wrapAsync(pd)((hd,...md)=>{if(hd===!1)return fd(hd);md.length<2?[sd]=md:sd=md,rd=hd,fd(hd?null:{})})},()=>qa(rd,sd))}var tryEach$1=awaitify(tryEach);function unmemoize(Ra){return(...qa)=>(Ra.unmemoized||Ra)(...qa)}function whilst(Ra,qa,rd){rd=onlyOnce(rd);var sd=wrapAsync(qa),pd=wrapAsync(Ra),fd=[];function hd(gd,...yd){if(gd)return rd(gd);fd=yd,gd!==!1&&pd(md)}function md(gd,yd){if(gd)return rd(gd);if(gd!==!1){if(!yd)return rd(null,...fd);sd(hd)}}return pd(md)}var whilst$1=awaitify(whilst,3);function until(Ra,qa,rd){const sd=wrapAsync(Ra);return whilst$1(pd=>sd((fd,hd)=>pd(fd,!hd)),qa,rd)}function waterfall(Ra,qa){if(qa=once(qa),!Array.isArray(Ra))return qa(new Error("First argument to waterfall must be an array of functions"));if(!Ra.length)return qa();var rd=0;function sd(fd){var hd=wrapAsync(Ra[rd++]);hd(...fd,onlyOnce(pd))}function pd(fd,...hd){if(fd!==!1){if(fd||rd===Ra.length)return qa(fd,...hd);sd(hd)}}sd([])}var waterfall$1=awaitify(waterfall),index={apply,applyEach,applyEachSeries,asyncify,auto,autoInject,cargo:cargo$1,cargoQueue:cargo,compose,concat:concat$1,concatLimit:concatLimit$1,concatSeries:concatSeries$1,constant:constant$1,detect:detect$1,detectLimit:detectLimit$1,detectSeries:detectSeries$1,dir,doUntil,doWhilst:doWhilst$1,each,eachLimit:eachLimit$1,eachOf:eachOf$1,eachOfLimit:eachOfLimit$1,eachOfSeries:eachOfSeries$1,eachSeries:eachSeries$1,ensureAsync,every:every$1,everyLimit:everyLimit$1,everySeries:everySeries$1,filter:filter$1,filterLimit:filterLimit$1,filterSeries:filterSeries$1,forever:forever$1,groupBy,groupByLimit:groupByLimit$1,groupBySeries,log,map:map$1,mapLimit:mapLimit$1,mapSeries:mapSeries$1,mapValues,mapValuesLimit:mapValuesLimit$1,mapValuesSeries,memoize,nextTick,parallel,parallelLimit,priorityQueue,queue,race:race$1,reduce:reduce$1,reduceRight,reflect,reflectAll,reject:reject$1,rejectLimit:rejectLimit$1,rejectSeries:rejectSeries$1,retry,retryable,seq,series,setImmediate:setImmediate$1$1,some:some$1,someLimit:someLimit$1,someSeries:someSeries$1,sortBy:sortBy$1,timeout,times,timesLimit,timesSeries,transform,tryEach:tryEach$1,unmemoize,until,waterfall:waterfall$1,whilst:whilst$1,all:every$1,allLimit:everyLimit$1,allSeries:everySeries$1,any:some$1,anyLimit:someLimit$1,anySeries:someSeries$1,find:detect$1,findLimit:detectLimit$1,findSeries:detectSeries$1,flatMap:concat$1,flatMapLimit:concatLimit$1,flatMapSeries:concatSeries$1,forEach:each,forEachSeries:eachSeries$1,forEachLimit:eachLimit$1,forEachOf:eachOf$1,forEachOfSeries:eachOfSeries$1,forEachOfLimit:eachOfLimit$1,inject:reduce$1,foldl:reduce$1,foldr:reduceRight,select:filter$1,selectLimit:filterLimit$1,selectSeries:filterSeries$1,wrapSync:asyncify,during:whilst$1,doDuring:doWhilst$1},readableBrowser={exports:{}};(function(Ra,qa){qa=Ra.exports=require_stream_readable(),qa.Stream=qa,qa.Readable=qa,qa.Writable=require_stream_writable(),qa.Duplex=require_stream_duplex(),qa.Transform=_stream_transform,qa.PassThrough=_stream_passthrough,qa.finished=endOfStream,qa.pipeline=pipeline_1})(readableBrowser,readableBrowser.exports);var readableBrowserExports=readableBrowser.exports;const{Transform:Transform$1}=readableBrowserExports;class Block extends Transform$1{constructor(qa,rd={}){super(rd),typeof qa=="object"&&(rd=qa,qa=rd.size),this.size=qa||512;const{nopad:sd,zeroPadding:pd=!0}=rd;sd?this._zeroPadding=!1:this._zeroPadding=!!pd,this._buffered=[],this._bufferedBytes=0}_transform(qa,rd,sd){for(this._bufferedBytes+=qa.length,this._buffered.push(qa);this._bufferedBytes>=this.size;){this._bufferedBytes-=this.size;const pd=[];let fd=0;for(;fdhd.replace(FN_ARG,"").trim())}function autoInject(Ra,ed){var ud={};return Object.keys(Ra).forEach(dd=>{var hd=Ra[dd],md,gd=isAsync(hd),yd=!gd&&hd.length===1||gd&&hd.length===0;if(Array.isArray(hd))md=[...hd],hd=md.pop(),ud[dd]=md.concat(md.length>0?vd:hd);else if(yd)ud[dd]=hd;else{if(md=parseParams(hd),hd.length===0&&!gd&&md.length===0)throw new Error("autoInject task functions require explicit parameters.");gd||md.pop(),ud[dd]=md.concat(vd)}function vd(Cd,wd){var Nd=md.map(Ld=>Cd[Ld]);Nd.push(wd),wrapAsync(hd)(...Nd)}}),auto(ud,ed)}class DLL{constructor(){this.head=this.tail=null,this.length=0}removeLink(ed){return ed.prev?ed.prev.next=ed.next:this.head=ed.next,ed.next?ed.next.prev=ed.prev:this.tail=ed.prev,ed.prev=ed.next=null,this.length-=1,ed}empty(){for(;this.head;)this.shift();return this}insertAfter(ed,ud){ud.prev=ed,ud.next=ed.next,ed.next?ed.next.prev=ud:this.tail=ud,ed.next=ud,this.length+=1}insertBefore(ed,ud){ud.prev=ed.prev,ud.next=ed,ed.prev?ed.prev.next=ud:this.head=ud,ed.prev=ud,this.length+=1}unshift(ed){this.head?this.insertBefore(this.head,ed):setInitial(this,ed)}push(ed){this.tail?this.insertAfter(this.tail,ed):setInitial(this,ed)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var ed=this.head;ed;)yield ed.data,ed=ed.next}remove(ed){for(var ud=this.head;ud;){var{next:dd}=ud;ed(ud)&&this.removeLink(ud),ud=dd}return this}}function setInitial(Ra,ed){Ra.length=1,Ra.head=Ra.tail=ed}function queue$1(Ra,ed,ud){if(ed==null)ed=1;else if(ed===0)throw new RangeError("Concurrency must not be zero");var dd=wrapAsync(Ra),hd=0,md=[];const gd={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function yd(qd,Wd){gd[qd].push(Wd)}function vd(qd,Wd){const Xd=(...Jd)=>{Cd(qd,Xd),Wd(...Jd)};gd[qd].push(Xd)}function Cd(qd,Wd){if(!qd)return Object.keys(gd).forEach(Xd=>gd[Xd]=[]);if(!Wd)return gd[qd]=[];gd[qd]=gd[qd].filter(Xd=>Xd!==Wd)}function wd(qd,...Wd){gd[qd].forEach(Xd=>Xd(...Wd))}var Nd=!1;function Ld(qd,Wd,Xd,Jd){if(Jd!=null&&typeof Jd!="function")throw new Error("task callback must be a function");zd.started=!0;var Zd,mf;function xf(vf,...gf){if(vf)return Xd?mf(vf):Zd();if(gf.length<=1)return Zd(gf[0]);Zd(gf)}var _f=zd._createTaskItem(qd,Xd?xf:Jd||xf);if(Wd?zd._tasks.unshift(_f):zd._tasks.push(_f),Nd||(Nd=!0,setImmediate$1$1(()=>{Nd=!1,zd.process()})),Xd||!Jd)return new Promise((vf,gf)=>{Zd=vf,mf=gf})}function Ud(qd){return function(Wd,...Xd){hd-=1;for(var Jd=0,Zd=qd.length;Jd0&&md.splice(xf,1),mf.callback(Wd,...Xd),Wd!=null&&wd("error",Wd,mf.data)}hd<=zd.concurrency-zd.buffer&&wd("unsaturated"),zd.idle()&&wd("drain"),zd.process()}}function jd(qd){return qd.length===0&&zd.idle()?(setImmediate$1$1(()=>wd("drain")),!0):!1}const Gd=qd=>Wd=>{if(!Wd)return new Promise((Xd,Jd)=>{vd(qd,(Zd,mf)=>{if(Zd)return Jd(Zd);Xd(mf)})});Cd(qd),yd(qd,Wd)};var Yd=!1,zd={_tasks:new DLL,_createTaskItem(qd,Wd){return{data:qd,callback:Wd}},*[Symbol.iterator](){yield*zd._tasks[Symbol.iterator]()},concurrency:ed,payload:ud,buffer:ed/4,started:!1,paused:!1,push(qd,Wd){return Array.isArray(qd)?jd(qd)?void 0:qd.map(Xd=>Ld(Xd,!1,!1,Wd)):Ld(qd,!1,!1,Wd)},pushAsync(qd,Wd){return Array.isArray(qd)?jd(qd)?void 0:qd.map(Xd=>Ld(Xd,!1,!0,Wd)):Ld(qd,!1,!0,Wd)},kill(){Cd(),zd._tasks.empty()},unshift(qd,Wd){return Array.isArray(qd)?jd(qd)?void 0:qd.map(Xd=>Ld(Xd,!0,!1,Wd)):Ld(qd,!0,!1,Wd)},unshiftAsync(qd,Wd){return Array.isArray(qd)?jd(qd)?void 0:qd.map(Xd=>Ld(Xd,!0,!0,Wd)):Ld(qd,!0,!0,Wd)},remove(qd){zd._tasks.remove(qd)},process(){if(!Yd){for(Yd=!0;!zd.paused&&hd{hd(ed,md,(vd,Cd)=>{ed=Cd,yd(vd)})},md=>dd(md,ed))}var reduce$1=awaitify(reduce,4);function seq(...Ra){var ed=Ra.map(wrapAsync);return function(...ud){var dd=this,hd=ud[ud.length-1];return typeof hd=="function"?ud.pop():hd=promiseCallback(),reduce$1(ed,ud,(md,gd,yd)=>{gd.apply(dd,md.concat((vd,...Cd)=>{yd(vd,Cd)}))},(md,gd)=>hd(md,...gd)),hd[PROMISE_SYMBOL]}}function compose(...Ra){return seq(...Ra.reverse())}function mapLimit(Ra,ed,ud,dd){return _asyncMap(eachOfLimit$2(ed),Ra,ud,dd)}var mapLimit$1=awaitify(mapLimit,4);function concatLimit(Ra,ed,ud,dd){var hd=wrapAsync(ud);return mapLimit$1(Ra,ed,(md,gd)=>{hd(md,(yd,...vd)=>yd?gd(yd):gd(yd,vd))},(md,gd)=>{for(var yd=[],vd=0;vd{var gd=!1,yd;const vd=wrapAsync(hd);ud(dd,(Cd,wd,Nd)=>{vd(Cd,(Ld,Ud)=>{if(Ld||Ld===!1)return Nd(Ld);if(Ra(Ud)&&!yd)return gd=!0,yd=ed(!0,Cd),Nd(null,breakLoop);Nd()})},Cd=>{if(Cd)return md(Cd);md(null,gd?yd:ed(!1))})}}function detect(Ra,ed,ud){return _createTester(dd=>dd,(dd,hd)=>hd)(eachOf$1,Ra,ed,ud)}var detect$1=awaitify(detect,3);function detectLimit(Ra,ed,ud,dd){return _createTester(hd=>hd,(hd,md)=>md)(eachOfLimit$2(ed),Ra,ud,dd)}var detectLimit$1=awaitify(detectLimit,4);function detectSeries(Ra,ed,ud){return _createTester(dd=>dd,(dd,hd)=>hd)(eachOfLimit$2(1),Ra,ed,ud)}var detectSeries$1=awaitify(detectSeries,3);function consoleFunc(Ra){return(ed,...ud)=>wrapAsync(ed)(...ud,(dd,...hd)=>{typeof console=="object"&&(dd?console.error&&console.error(dd):console[Ra]&&hd.forEach(md=>console[Ra](md)))})}var dir=consoleFunc("dir");function doWhilst(Ra,ed,ud){ud=onlyOnce(ud);var dd=wrapAsync(Ra),hd=wrapAsync(ed),md;function gd(vd,...Cd){if(vd)return ud(vd);vd!==!1&&(md=Cd,hd(...Cd,yd))}function yd(vd,Cd){if(vd)return ud(vd);if(vd!==!1){if(!Cd)return ud(null,...md);dd(gd)}}return yd(null,!0)}var doWhilst$1=awaitify(doWhilst,3);function doUntil(Ra,ed,ud){const dd=wrapAsync(ed);return doWhilst$1(Ra,(...hd)=>{const md=hd.pop();dd(...hd,(gd,yd)=>md(gd,!yd))},ud)}function _withoutIndex(Ra){return(ed,ud,dd)=>Ra(ed,dd)}function eachLimit$2(Ra,ed,ud){return eachOf$1(Ra,_withoutIndex(wrapAsync(ed)),ud)}var each=awaitify(eachLimit$2,3);function eachLimit(Ra,ed,ud,dd){return eachOfLimit$2(ed)(Ra,_withoutIndex(wrapAsync(ud)),dd)}var eachLimit$1=awaitify(eachLimit,4);function eachSeries(Ra,ed,ud){return eachLimit$1(Ra,1,ed,ud)}var eachSeries$1=awaitify(eachSeries,3);function ensureAsync(Ra){return isAsync(Ra)?Ra:function(...ed){var ud=ed.pop(),dd=!0;ed.push((...hd)=>{dd?setImmediate$1$1(()=>ud(...hd)):ud(...hd)}),Ra.apply(this,ed),dd=!1}}function every(Ra,ed,ud){return _createTester(dd=>!dd,dd=>!dd)(eachOf$1,Ra,ed,ud)}var every$1=awaitify(every,3);function everyLimit(Ra,ed,ud,dd){return _createTester(hd=>!hd,hd=>!hd)(eachOfLimit$2(ed),Ra,ud,dd)}var everyLimit$1=awaitify(everyLimit,4);function everySeries(Ra,ed,ud){return _createTester(dd=>!dd,dd=>!dd)(eachOfSeries$1,Ra,ed,ud)}var everySeries$1=awaitify(everySeries,3);function filterArray(Ra,ed,ud,dd){var hd=new Array(ed.length);Ra(ed,(md,gd,yd)=>{ud(md,(vd,Cd)=>{hd[gd]=!!Cd,yd(vd)})},md=>{if(md)return dd(md);for(var gd=[],yd=0;yd{ud(md,(vd,Cd)=>{if(vd)return yd(vd);Cd&&hd.push({index:gd,value:md}),yd(vd)})},md=>{if(md)return dd(md);dd(null,hd.sort((gd,yd)=>gd.index-yd.index).map(gd=>gd.value))})}function _filter(Ra,ed,ud,dd){var hd=isArrayLike(ed)?filterArray:filterGeneric;return hd(Ra,ed,wrapAsync(ud),dd)}function filter(Ra,ed,ud){return _filter(eachOf$1,Ra,ed,ud)}var filter$1=awaitify(filter,3);function filterLimit(Ra,ed,ud,dd){return _filter(eachOfLimit$2(ed),Ra,ud,dd)}var filterLimit$1=awaitify(filterLimit,4);function filterSeries(Ra,ed,ud){return _filter(eachOfSeries$1,Ra,ed,ud)}var filterSeries$1=awaitify(filterSeries,3);function forever(Ra,ed){var ud=onlyOnce(ed),dd=wrapAsync(ensureAsync(Ra));function hd(md){if(md)return ud(md);md!==!1&&dd(hd)}return hd()}var forever$1=awaitify(forever,2);function groupByLimit(Ra,ed,ud,dd){var hd=wrapAsync(ud);return mapLimit$1(Ra,ed,(md,gd)=>{hd(md,(yd,vd)=>yd?gd(yd):gd(yd,{key:vd,val:md}))},(md,gd)=>{for(var yd={},{hasOwnProperty:vd}=Object.prototype,Cd=0;Cd{md(gd,yd,(Cd,wd)=>{if(Cd)return vd(Cd);hd[yd]=wd,vd(Cd)})},gd=>dd(gd,hd))}var mapValuesLimit$1=awaitify(mapValuesLimit,4);function mapValues(Ra,ed,ud){return mapValuesLimit$1(Ra,1/0,ed,ud)}function mapValuesSeries(Ra,ed,ud){return mapValuesLimit$1(Ra,1,ed,ud)}function memoize(Ra,ed=ud=>ud){var ud=Object.create(null),dd=Object.create(null),hd=wrapAsync(Ra),md=initialParams((gd,yd)=>{var vd=ed(...gd);vd in ud?setImmediate$1$1(()=>yd(null,...ud[vd])):vd in dd?dd[vd].push(yd):(dd[vd]=[yd],hd(...gd,(Cd,...wd)=>{Cd||(ud[vd]=wd);var Nd=dd[vd];delete dd[vd];for(var Ld=0,Ud=Nd.length;Ld{var dd=isArrayLike(ed)?[]:{};Ra(ed,(hd,md,gd)=>{wrapAsync(hd)((yd,...vd)=>{vd.length<2&&([vd]=vd),dd[md]=vd,gd(yd)})},hd=>ud(hd,dd))},3);function parallel(Ra,ed){return _parallel(eachOf$1,Ra,ed)}function parallelLimit(Ra,ed,ud){return _parallel(eachOfLimit$2(ed),Ra,ud)}function queue(Ra,ed){var ud=wrapAsync(Ra);return queue$1((dd,hd)=>{ud(dd[0],hd)},ed,1)}class Heap{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(ed){let ud;for(;ed>0&&smaller(this.heap[ed],this.heap[ud=parent(ed)]);){let dd=this.heap[ed];this.heap[ed]=this.heap[ud],this.heap[ud]=dd,ed=ud}}percDown(ed){let ud;for(;(ud=leftChi(ed))=0;dd--)this.percDown(dd);return this}}function leftChi(Ra){return(Ra<<1)+1}function parent(Ra){return(Ra+1>>1)-1}function smaller(Ra,ed){return Ra.priority!==ed.priority?Ra.priority({data:gd,priority:yd,callback:vd});function md(gd,yd){return Array.isArray(gd)?gd.map(vd=>({data:vd,priority:yd})):{data:gd,priority:yd}}return ud.push=function(gd,yd=0,vd){return dd(md(gd,yd),vd)},ud.pushAsync=function(gd,yd=0,vd){return hd(md(gd,yd),vd)},delete ud.unshift,delete ud.unshiftAsync,ud}function race(Ra,ed){if(ed=once(ed),!Array.isArray(Ra))return ed(new TypeError("First argument to race must be an array of functions"));if(!Ra.length)return ed();for(var ud=0,dd=Ra.length;ud{let yd={};if(md&&(yd.error=md),gd.length>0){var vd=gd;gd.length<=1&&([vd]=gd),yd.value=vd}hd(null,yd)}),ed.apply(this,dd)})}function reflectAll(Ra){var ed;return Array.isArray(Ra)?ed=Ra.map(reflect):(ed={},Object.keys(Ra).forEach(ud=>{ed[ud]=reflect.call(this,Ra[ud])})),ed}function reject$2(Ra,ed,ud,dd){const hd=wrapAsync(ud);return _filter(Ra,ed,(md,gd)=>{hd(md,(yd,vd)=>{gd(yd,!vd)})},dd)}function reject(Ra,ed,ud){return reject$2(eachOf$1,Ra,ed,ud)}var reject$1=awaitify(reject,3);function rejectLimit(Ra,ed,ud,dd){return reject$2(eachOfLimit$2(ed),Ra,ud,dd)}var rejectLimit$1=awaitify(rejectLimit,4);function rejectSeries(Ra,ed,ud){return reject$2(eachOfSeries$1,Ra,ed,ud)}var rejectSeries$1=awaitify(rejectSeries,3);function constant(Ra){return function(){return Ra}}const DEFAULT_TIMES=5,DEFAULT_INTERVAL=0;function retry(Ra,ed,ud){var dd={times:DEFAULT_TIMES,intervalFunc:constant(DEFAULT_INTERVAL)};if(arguments.length<3&&typeof Ra=="function"?(ud=ed||promiseCallback(),ed=Ra):(parseTimes(dd,Ra),ud=ud||promiseCallback()),typeof ed!="function")throw new Error("Invalid arguments for async.retry");var hd=wrapAsync(ed),md=1;function gd(){hd((yd,...vd)=>{yd!==!1&&(yd&&md++{(hd.lengthdd)(eachOf$1,Ra,ed,ud)}var some$1=awaitify(some,3);function someLimit(Ra,ed,ud,dd){return _createTester(Boolean,hd=>hd)(eachOfLimit$2(ed),Ra,ud,dd)}var someLimit$1=awaitify(someLimit,4);function someSeries(Ra,ed,ud){return _createTester(Boolean,dd=>dd)(eachOfSeries$1,Ra,ed,ud)}var someSeries$1=awaitify(someSeries,3);function sortBy(Ra,ed,ud){var dd=wrapAsync(ed);return map$1(Ra,(md,gd)=>{dd(md,(yd,vd)=>{if(yd)return gd(yd);gd(yd,{value:md,criteria:vd})})},(md,gd)=>{if(md)return ud(md);ud(null,gd.sort(hd).map(yd=>yd.value))});function hd(md,gd){var yd=md.criteria,vd=gd.criteria;return ydvd?1:0}}var sortBy$1=awaitify(sortBy,3);function timeout(Ra,ed,ud){var dd=wrapAsync(Ra);return initialParams((hd,md)=>{var gd=!1,yd;function vd(){var Cd=Ra.name||"anonymous",wd=new Error('Callback function "'+Cd+'" timed out.');wd.code="ETIMEDOUT",ud&&(wd.info=ud),gd=!0,md(wd)}hd.push((...Cd)=>{gd||(md(...Cd),clearTimeout(yd))}),yd=setTimeout(vd,ed),dd(...hd)})}function range(Ra){for(var ed=Array(Ra);Ra--;)ed[Ra]=Ra;return ed}function timesLimit(Ra,ed,ud,dd){var hd=wrapAsync(ud);return mapLimit$1(range(Ra),ed,hd,dd)}function times(Ra,ed,ud){return timesLimit(Ra,1/0,ed,ud)}function timesSeries(Ra,ed,ud){return timesLimit(Ra,1,ed,ud)}function transform(Ra,ed,ud,dd){arguments.length<=3&&typeof ed=="function"&&(dd=ud,ud=ed,ed=Array.isArray(Ra)?[]:{}),dd=once(dd||promiseCallback());var hd=wrapAsync(ud);return eachOf$1(Ra,(md,gd,yd)=>{hd(ed,md,gd,yd)},md=>dd(md,ed)),dd[PROMISE_SYMBOL]}function tryEach(Ra,ed){var ud=null,dd;return eachSeries$1(Ra,(hd,md)=>{wrapAsync(hd)((gd,...yd)=>{if(gd===!1)return md(gd);yd.length<2?[dd]=yd:dd=yd,ud=gd,md(gd?null:{})})},()=>ed(ud,dd))}var tryEach$1=awaitify(tryEach);function unmemoize(Ra){return(...ed)=>(Ra.unmemoized||Ra)(...ed)}function whilst(Ra,ed,ud){ud=onlyOnce(ud);var dd=wrapAsync(ed),hd=wrapAsync(Ra),md=[];function gd(vd,...Cd){if(vd)return ud(vd);md=Cd,vd!==!1&&hd(yd)}function yd(vd,Cd){if(vd)return ud(vd);if(vd!==!1){if(!Cd)return ud(null,...md);dd(gd)}}return hd(yd)}var whilst$1=awaitify(whilst,3);function until(Ra,ed,ud){const dd=wrapAsync(Ra);return whilst$1(hd=>dd((md,gd)=>hd(md,!gd)),ed,ud)}function waterfall(Ra,ed){if(ed=once(ed),!Array.isArray(Ra))return ed(new Error("First argument to waterfall must be an array of functions"));if(!Ra.length)return ed();var ud=0;function dd(md){var gd=wrapAsync(Ra[ud++]);gd(...md,onlyOnce(hd))}function hd(md,...gd){if(md!==!1){if(md||ud===Ra.length)return ed(md,...gd);dd(gd)}}dd([])}var waterfall$1=awaitify(waterfall),index={apply,applyEach,applyEachSeries,asyncify,auto,autoInject,cargo:cargo$1,cargoQueue:cargo,compose,concat:concat$1,concatLimit:concatLimit$1,concatSeries:concatSeries$1,constant:constant$1,detect:detect$1,detectLimit:detectLimit$1,detectSeries:detectSeries$1,dir,doUntil,doWhilst:doWhilst$1,each,eachLimit:eachLimit$1,eachOf:eachOf$1,eachOfLimit:eachOfLimit$1,eachOfSeries:eachOfSeries$1,eachSeries:eachSeries$1,ensureAsync,every:every$1,everyLimit:everyLimit$1,everySeries:everySeries$1,filter:filter$1,filterLimit:filterLimit$1,filterSeries:filterSeries$1,forever:forever$1,groupBy,groupByLimit:groupByLimit$1,groupBySeries,log,map:map$1,mapLimit:mapLimit$1,mapSeries:mapSeries$1,mapValues,mapValuesLimit:mapValuesLimit$1,mapValuesSeries,memoize,nextTick,parallel,parallelLimit,priorityQueue,queue,race:race$1,reduce:reduce$1,reduceRight,reflect,reflectAll,reject:reject$1,rejectLimit:rejectLimit$1,rejectSeries:rejectSeries$1,retry,retryable,seq,series,setImmediate:setImmediate$1$1,some:some$1,someLimit:someLimit$1,someSeries:someSeries$1,sortBy:sortBy$1,timeout,times,timesLimit,timesSeries,transform,tryEach:tryEach$1,unmemoize,until,waterfall:waterfall$1,whilst:whilst$1,all:every$1,allLimit:everyLimit$1,allSeries:everySeries$1,any:some$1,anyLimit:someLimit$1,anySeries:someSeries$1,find:detect$1,findLimit:detectLimit$1,findSeries:detectSeries$1,flatMap:concat$1,flatMapLimit:concatLimit$1,flatMapSeries:concatSeries$1,forEach:each,forEachSeries:eachSeries$1,forEachLimit:eachLimit$1,forEachOf:eachOf$1,forEachOfSeries:eachOfSeries$1,forEachOfLimit:eachOfLimit$1,inject:reduce$1,foldl:reduce$1,foldr:reduceRight,select:filter$1,selectLimit:filterLimit$1,selectSeries:filterSeries$1,wrapSync:asyncify,during:whilst$1,doDuring:doWhilst$1},readableBrowser={exports:{}};(function(Ra,ed){ed=Ra.exports=require_stream_readable(),ed.Stream=ed,ed.Readable=ed,ed.Writable=require_stream_writable(),ed.Duplex=require_stream_duplex(),ed.Transform=_stream_transform,ed.PassThrough=_stream_passthrough,ed.finished=endOfStream,ed.pipeline=pipeline_1})(readableBrowser,readableBrowser.exports);var readableBrowserExports=readableBrowser.exports;const{Transform:Transform$1}=readableBrowserExports;class Block extends Transform$1{constructor(ed,ud={}){super(ud),typeof ed=="object"&&(ud=ed,ed=ud.size),this.size=ed||512;const{nopad:dd,zeroPadding:hd=!0}=ud;dd?this._zeroPadding=!1:this._zeroPadding=!!hd,this._buffered=[],this._bufferedBytes=0}_transform(ed,ud,dd){for(this._bufferedBytes+=ed.length,this._buffered.push(ed);this._bufferedBytes>=this.size;){this._bufferedBytes-=this.size;const hd=[];let md=0;for(;md * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */lodash.exports;(function(Ra,qa){(function(){var rd,sd="4.17.21",pd=200,fd="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",hd="Expected a function",md="Invalid `variable` option passed into `_.template`",gd="__lodash_hash_undefined__",yd=500,vd="__lodash_placeholder__",Nd=1,Md=2,Ld=4,Fd=1,Hd=2,Vd=1,Gd=2,Ud=4,qd=8,Wd=16,Kd=32,Xd=64,df=128,Ef=256,pf=512,mf=30,_f="...",xf=800,Cf=16,If=1,Sf=2,wf=3,Pf=1/0,lh=9007199254740991,xh=17976931348623157e292,Eh=NaN,Mh=4294967295,dh=Mh-1,eh=Mh>>>1,fh=[["ary",df],["bind",Vd],["bindKey",Gd],["curry",qd],["curryRight",Wd],["flip",pf],["partial",Kd],["partialRight",Xd],["rearg",Ef]],Sh="[object Arguments]",vh="[object Array]",Df="[object AsyncFunction]",Af="[object Boolean]",_h="[object Date]",Nh="[object DOMException]",dm="[object Error]",Jf="[object Function]",oh="[object GeneratorFunction]",Xh="[object Map]",Tm="[object Number]",kh="[object Null]",Zf="[object Object]",th="[object Promise]",$h="[object Proxy]",wh="[object RegExp]",fm="[object Set]",zh="[object String]",Mm="[object Symbol]",Rm="[object Undefined]",tg="[object WeakMap]",Fm="[object WeakSet]",Ym="[object ArrayBuffer]",rg="[object DataView]",Eg="[object Float32Array]",Fh="[object Float64Array]",kf="[object Int8Array]",Rf="[object Int16Array]",Dh="[object Int32Array]",Vh="[object Uint8Array]",Sm="[object Uint8ClampedArray]",$m="[object Uint16Array]",Km="[object Uint32Array]",Ag=/\b__p \+= '';/g,ig=/\b(__p \+=) '' \+/g,_g=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vg=/&(?:amp|lt|gt|quot|#39);/g,Og=/[&<>"']/g,Wg=RegExp(vg.source),d_=RegExp(Og.source),o_=/<%-([\s\S]+?)%>/g,y_=/<%([\s\S]+?)%>/g,t_=/<%=([\s\S]+?)%>/g,R_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,v_=/^\w*$/,X_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eb=/[\\^$.*+?()[\]{}|]/g,I_=RegExp(eb.source),$_=/^\s+/,$g=/\s/,Lb=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Kb=/\{\n\/\* \[wrapped with (.+)\] \*/,db=/,? & /,nh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,gm=/[()=,{}\[\]\/\s]/,im=/\\(\\)?/g,mm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jm=/\w*$/,Lm=/^[-+]0x[0-9a-f]+$/i,zm=/^0b[01]+$/i,Vm=/^\[object .+?Constructor\]$/,Dm=/^0o[0-7]+$/i,og=/^(?:0|[1-9]\d*)$/,pg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qg=/($^)/,xg=/['\n\r\u2028\u2029\\]/g,Yg="\\ud800-\\udfff",w_="\\u0300-\\u036f",C_="\\ufe20-\\ufe2f",p_="\\u20d0-\\u20ff",Mg=w_+C_+p_,q_="\\u2700-\\u27bf",m_="a-z\\xdf-\\xf6\\xf8-\\xff",a_="\\xac\\xb1\\xd7\\xf7",qh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pm="\\u2000-\\u206f",dg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ig="A-Z\\xc0-\\xd6\\xd8-\\xde",sg="\\ufe0e\\ufe0f",Fg=a_+qh+Pm+dg,b_="['’]",W_="["+Yg+"]",sb="["+Fg+"]",jb="["+Mg+"]",uy="\\d+",l_="["+q_+"]",Ub="["+m_+"]",Y_="[^"+Yg+Fg+uy+q_+m_+Ig+"]",Tb="\\ud83c[\\udffb-\\udfff]",pb="(?:"+jb+"|"+Tb+")",Sy="[^"+Yg+"]",pE="(?:\\ud83c[\\udde6-\\uddff]){2}",xb="[\\ud800-\\udbff][\\udc00-\\udfff]",Ty="["+Ig+"]",l0="\\u200d",UE="(?:"+Ub+"|"+Y_+")",r_="(?:"+Ty+"|"+Y_+")",HE="(?:"+b_+"(?:d|ll|m|re|s|t|ve))?",DE="(?:"+b_+"(?:D|LL|M|RE|S|T|VE))?",u0=pb+"?",L0="["+sg+"]?",B0="(?:"+l0+"(?:"+[Sy,pE,xb].join("|")+")"+L0+u0+")*",NE="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xb=L0+u0+B0,Fy="(?:"+[l_,pE,xb].join("|")+")"+Xb,IE="(?:"+[Sy+jb+"?",jb,pE,xb,W_].join("|")+")",GE=RegExp(b_,"g"),hS=RegExp(jb,"g"),Sv=RegExp(Tb+"(?="+Tb+")|"+IE+Xb,"g"),mS=RegExp([Ty+"?"+Ub+"+"+HE+"(?="+[sb,Ty,"$"].join("|")+")",r_+"+"+DE+"(?="+[sb,Ty+UE,"$"].join("|")+")",Ty+"?"+UE+"+"+HE,Ty+"+"+DE,fb,NE,uy,Fy].join("|"),"g"),pT=RegExp("["+l0+Yg+Mg+sg+"]"),xv=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gS=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],_S=-1,Pg={};Pg[Eg]=Pg[Fh]=Pg[kf]=Pg[Rf]=Pg[Dh]=Pg[Vh]=Pg[Sm]=Pg[$m]=Pg[Km]=!0,Pg[Sh]=Pg[vh]=Pg[Ym]=Pg[Af]=Pg[rg]=Pg[_h]=Pg[dm]=Pg[Jf]=Pg[Xh]=Pg[Tm]=Pg[Zf]=Pg[wh]=Pg[fm]=Pg[zh]=Pg[tg]=!1;var H_={};H_[Sh]=H_[vh]=H_[Ym]=H_[rg]=H_[Af]=H_[_h]=H_[Eg]=H_[Fh]=H_[kf]=H_[Rf]=H_[Dh]=H_[Xh]=H_[Tm]=H_[Zf]=H_[wh]=H_[fm]=H_[zh]=H_[Mm]=H_[Vh]=H_[Sm]=H_[$m]=H_[Km]=!0,H_[dm]=H_[Jf]=H_[tg]=!1;var c0={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},F0={"&":"&","<":"<",">":">",'"':""","'":"'"},Cv={"&":"&","<":"<",">":">",""":'"',"'":"'"},yS={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ES=parseFloat,d0=parseInt,vS=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,wv=typeof self=="object"&&self&&self.Object===Object&&self,j_=vS||wv||Function("return this")(),Nv=qa&&!qa.nodeType&&qa,RE=Nv&&!0&&Ra&&!Ra.nodeType&&Ra,Q_=RE&&RE.exports===Nv,Cy=Q_&&vS.process,ob=function(){try{var Zm=RE&&RE.require&&RE.require("util").types;return Zm||Cy&&Cy.binding&&Cy.binding("util")}catch{}}(),p0=ob&&ob.isArrayBuffer,Ay=ob&&ob.isDate,qE=ob&&ob.isMap,j0=ob&&ob.isRegExp,Hy=ob&&ob.isSet,SS=ob&&ob.isTypedArray;function zb(Zm,fg,lg){switch(lg.length){case 0:return Zm.call(fg);case 1:return Zm.call(fg,lg[0]);case 2:return Zm.call(fg,lg[0],lg[1]);case 3:return Zm.call(fg,lg[0],lg[1],lg[2])}return Zm.apply(fg,lg)}function Pv(Zm,fg,lg,e_){for(var __=-1,O_=Zm==null?0:Zm.length;++__-1}function H0(Zm,fg,lg){for(var e_=-1,__=Zm==null?0:Zm.length;++e_<__;)if(lg(fg,Zm[e_]))return!0;return!1}function K_(Zm,fg){for(var lg=-1,e_=Zm==null?0:Zm.length,__=Array(e_);++lg-1;);return lg}function Cb(Zm,fg){for(var lg=Zm.length;lg--&&Zd(fg,Zm[lg],0)>-1;);return lg}function h0(Zm,fg){for(var lg=Zm.length,e_=0;lg--;)Zm[lg]===fg&&++e_;return e_}var G0=Im(c0),hE=Im(F0);function m0(Zm){return"\\"+yS[Zm]}function hT(Zm,fg){return Zm==null?rd:Zm[fg]}function q0(Zm){return pT.test(Zm)}function ex(Zm){return xv.test(Zm)}function o1(Zm){for(var fg,lg=[];!(fg=Zm.next()).done;)lg.push(fg.value);return lg}function AS(Zm){var fg=-1,lg=Array(Zm.size);return Zm.forEach(function(e_,__){lg[++fg]=[__,e_]}),lg}function wS(Zm,fg){return function(lg){return Zm(fg(lg))}}function Zb(Zm,fg){for(var lg=-1,e_=Zm.length,__=0,O_=[];++lg-1}function mx(Qd,yf){var Of=this.__data__,Ch=Q0(Of,Qd);return Ch<0?(++this.size,Of.push([Qd,yf])):Of[Ch][1]=yf,this}nE.prototype.clear=b1,nE.prototype.delete=wT,nE.prototype.get=DT,nE.prototype.has=hx,nE.prototype.set=mx;function rE(Qd){var yf=-1,Of=Qd==null?0:Qd.length;for(this.clear();++yf=yf?Qd:yf)),Qd}function ty(Qd,yf,Of,Ch,pm,Nm){var Wm,Xm=yf&Nd,ng=yf&Md,wg=yf&Ld;if(Of&&(Wm=pm?Of(Qd,Ch,pm,Nm):Of(Qd)),Wm!==rd)return Wm;if(!_b(Qd))return Qd;var Dg=S_(Qd);if(Dg){if(Wm=P1(Qd),!Xm)return Jb(Qd,Wm)}else{var Rg=Nb(Qd),Jg=Rg==Jf||Rg==oh;if(vv(Qd))return HT(Qd,Xm);if(Rg==Zf||Rg==Sh||Jg&&!pm){if(Wm=ng||Jg?{}:Xx(Qd),!Xm)return ng?R1(Qd,Ex(Wm,Qd)):jx(Qd,RT(Wm,Qd))}else{if(!H_[Rg])return pm?Qd:{};Wm=eT(Qd,Rg,Xm)}}Nm||(Nm=new nb);var s_=Nm.get(Qd);if(s_)return s_;Nm.set(Qd,Wm),SC(Qd)?Qd.forEach(function(h_){Wm.add(ty(h_,yf,Of,h_,Qd,Nm))}):EC(Qd)&&Qd.forEach(function(h_,N_){Wm.set(N_,ty(h_,yf,Of,N_,Qd,Nm))});var f_=wg?ng?ZS:JS:ng?Py:Vb,A_=Dg?rd:f_(Qd);return Qb(A_||Qd,function(h_,N_){A_&&(N_=h_,h_=Qd[N_]),X0(Wm,N_,ty(h_,yf,Of,N_,Qd,Nm))}),Wm}function S1(Qd){var yf=Vb(Qd);return function(Of){return OT(Of,Qd,yf)}}function OT(Qd,yf,Of){var Ch=Of.length;if(Qd==null)return!Ch;for(Qd=V_(Qd);Ch--;){var pm=Of[Ch],Nm=yf[pm],Wm=Qd[pm];if(Wm===rd&&!(pm in Qd)||!Nm(Wm))return!1}return!0}function vx(Qd,yf,Of){if(typeof Qd!="function")throw new Iy(hd);return i_(function(){Qd.apply(rd,Of)},yf)}function Wv(Qd,yf,Of,Ch){var pm=-1,Nm=U0,Wm=!0,Xm=Qd.length,ng=[],wg=yf.length;if(!Xm)return ng;Of&&(yf=K_(yf,g_(Of))),Ch?(Nm=H0,Wm=!1):yf.length>=pd&&(Nm=D_,Wm=!1,yf=new KE(yf));e:for(;++pmpm?0:pm+Of),Ch=Ch===rd||Ch>pm?pm:x_(Ch),Ch<0&&(Ch+=pm),Ch=Of>Ch?0:xC(Ch);Of0&&Of(Xm)?yf>1?wb(Xm,yf-1,Of,Ch,pm):Gy(pm,Xm):Ch||(pm[pm.length]=Xm)}return pm}var Z0=Ux(),MT=Ux(!0);function Oy(Qd,yf){return Qd&&Z0(Qd,yf,Vb)}function jS(Qd,yf){return Qd&&MT(Qd,yf,Vb)}function US(Qd,yf){return fE(yf,function(Of){return k0(Qd[Of])})}function ZE(Qd,yf){yf=n0(yf,Qd);for(var Of=0,Ch=yf.length;Qd!=null&&Ofyf}function Tx(Qd,yf){return Qd!=null&&F_.call(Qd,yf)}function xx(Qd,yf){return Qd!=null&&yf in V_(Qd)}function ev(Qd,yf,Of){return Qd>=Eb(yf,Of)&&Qd=120&&Dg.length>=120)?new KE(Wm&&Dg):rd}Dg=Qd[0];var Rg=-1,Jg=Xm[0];e:for(;++Rg-1;)Xm!==Qd&&b0.call(Xm,ng,1),b0.call(Qd,ng,1);return Qd}function Hb(Qd,yf){for(var Of=Qd?yf.length:0,Ch=Of-1;Of--;){var pm=yf[Of];if(Of==Ch||pm!==Nm){var Nm=pm;gf(pm)?b0.call(Qd,pm,1):qS(Qd,pm)}}return Qd}function GS(Qd,yf){return Qd+E0(CT()*(yf-Qd+1))}function C1(Qd,yf,Of,Ch){for(var pm=-1,Nm=Z_(jv((yf-Qd)/(Of||1)),0),Wm=lg(Nm);Nm--;)Wm[Ch?Nm:++pm]=Qd,Qd+=Of;return Wm}function jT(Qd,yf){var Of="";if(!Qd||yf<1||yf>lh)return Of;do yf%2&&(Of+=Qd),yf=E0(yf/2),yf&&(Qd+=Qd);while(yf);return Of}function T_(Qd,yf){return n_(kg(Qd,yf,By),Qd+"")}function $x(Qd){return NT(nT(Qd))}function Px(Qd,yf){var Of=nT(Qd);return ub(Of,LE(yf,0,Of.length))}function lv(Qd,yf,Of,Ch){if(!_b(Qd))return Qd;yf=n0(yf,Qd);for(var pm=-1,Nm=yf.length,Wm=Nm-1,Xm=Qd;Xm!=null&&++pmpm?0:pm+yf),Of=Of>pm?pm:Of,Of<0&&(Of+=pm),pm=yf>Of?0:Of-yf>>>0,yf>>>=0;for(var Nm=lg(pm);++Ch>>1,Wm=Qd[Nm];Wm!==null&&!uE(Wm)&&(Of?Wm<=yf:Wm=pd){var wg=yf?null:k1(Qd);if(wg)return ey(wg);Wm=!1,pm=D_,ng=new KE}else ng=yf?[]:Xm;e:for(;++Ch=Ch?Qd:Db(Qd,yf,Of)}var Fx=vT||function(Qd){return j_.clearTimeout(Qd)};function HT(Qd,yf){if(yf)return Qd.slice();var Of=Qd.length,Ch=yT?yT(Of):new Qd.constructor(Of);return Qd.copy(Ch),Ch}function pv(Qd){var yf=new Qd.constructor(Qd.byteLength);return new RS(yf).set(new RS(Qd)),yf}function D1(Qd,yf){var Of=yf?pv(Qd.buffer):Qd.buffer;return new Qd.constructor(Of,Qd.byteOffset,Qd.byteLength)}function N1(Qd){var yf=new Qd.constructor(Qd.source,jm.exec(Qd));return yf.lastIndex=Qd.lastIndex,yf}function rS(Qd){return Gv?V_(Gv.call(Qd)):{}}function GT(Qd,yf){var Of=yf?pv(Qd.buffer):Qd.buffer;return new Qd.constructor(Of,Qd.byteOffset,Qd.length)}function qT(Qd,yf){if(Qd!==yf){var Of=Qd!==rd,Ch=Qd===null,pm=Qd===Qd,Nm=uE(Qd),Wm=yf!==rd,Xm=yf===null,ng=yf===yf,wg=uE(yf);if(!Xm&&!wg&&!Nm&&Qd>yf||Nm&&Wm&&ng&&!Xm&&!wg||Ch&&Wm&&ng||!Of&&ng||!pm)return 1;if(!Ch&&!Nm&&!wg&&Qd=Xm)return ng;var wg=Of[Ch];return ng*(wg=="desc"?-1:1)}}return Qd.index-yf.index}function zS(Qd,yf,Of,Ch){for(var pm=-1,Nm=Qd.length,Wm=Of.length,Xm=-1,ng=yf.length,wg=Z_(Nm-Wm,0),Dg=lg(ng+wg),Rg=!Ch;++Xm1?Of[pm-1]:rd,Wm=pm>2?Of[2]:rd;for(Nm=Qd.length>3&&typeof Nm=="function"?(pm--,Nm):rd,Wm&&hf(Of[0],Of[1],Wm)&&(Nm=pm<3?rd:Nm,pm=1),yf=V_(yf);++Ch-1?pm[Nm?yf[Wm]:Wm]:rd}}function qx(Qd){return TE(function(yf){var Of=yf.length,Ch=Of,pm=U_.prototype.thru;for(Qd&&yf.reverse();Ch--;){var Nm=yf[Ch];if(typeof Nm!="function")throw new Iy(hd);if(pm&&!Wm&&cS(Nm)=="wrapper")var Wm=new U_([],!0)}for(Ch=Wm?Ch:Of;++Ch1&&M_.reverse(),Dg&&ngXm))return!1;var wg=Nm.get(Qd),Dg=Nm.get(yf);if(wg&&Dg)return wg==yf&&Dg==Qd;var Rg=-1,Jg=!0,s_=Of&Hd?new KE:rd;for(Nm.set(Qd,yf),Nm.set(yf,Qd);++Rg1?"& ":"")+yf[Ch],yf=yf.join(Of>2?", ":" "),Qd.replace(Lb,`{ -/* [wrapped with `+yf+`] */ -`)}function Yd(Qd){return S_(Qd)||pS(Qd)||!!(lx&&Qd&&Qd[lx])}function gf(Qd,yf){var Of=typeof Qd;return yf=yf??lh,!!yf&&(Of=="number"||Of!="symbol"&&og.test(Qd))&&Qd>-1&&Qd%1==0&&Qd0){if(++yf>=xf)return arguments[0]}else yf=0;return Qd.apply(rd,arguments)}}function ub(Qd,yf){var Of=-1,Ch=Qd.length,pm=Ch-1;for(yf=yf===rd?Ch:yf;++Of1?Qd[yf-1]:rd;return Of=typeof Of=="function"?(Qd.pop(),Of):rd,iC(Qd,Of)});function sC(Qd){var yf=_m(Qd);return yf.__chain__=!0,yf}function $A(Qd,yf){return yf(Qd),Qd}function Qx(Qd,yf){return yf(Qd)}var PA=TE(function(Qd){var yf=Qd.length,Of=yf?Qd[0]:0,Ch=this.__wrapped__,pm=function(Nm){return J0(Nm,Qd)};return yf>1||this.__actions__.length||!(Ch instanceof c_)||!gf(Of)?this.thru(pm):(Ch=Ch.slice(Of,+Of+(yf?1:0)),Ch.__actions__.push({func:Qx,args:[pm],thisArg:rd}),new U_(Ch,this.__chain__).thru(function(Nm){return yf&&!Nm.length&&Nm.push(rd),Nm}))});function LA(){return sC(this)}function BA(){return new U_(this.value(),this.__chain__)}function FA(){this.__values__===rd&&(this.__values__=TC(this.value()));var Qd=this.__index__>=this.__values__.length,yf=Qd?rd:this.__values__[this.__index__++];return{done:Qd,value:yf}}function jA(){return this}function UA(Qd){for(var yf,Of=this;Of instanceof Bb;){var Ch=Gb(Of);Ch.__index__=0,Ch.__values__=rd,yf?pm.__wrapped__=Ch:yf=Ch;var pm=Ch;Of=Of.__wrapped__}return pm.__wrapped__=Qd,yf}function HA(){var Qd=this.__wrapped__;if(Qd instanceof c_){var yf=Qd;return this.__actions__.length&&(yf=new c_(this)),yf=yf.reverse(),yf.__actions__.push({func:Qx,args:[L1],thisArg:rd}),new U_(yf,this.__chain__)}return this.thru(L1)}function GA(){return Zv(this.__wrapped__,this.__actions__)}var qA=fv(function(Qd,yf,Of){F_.call(Qd,Of)?++Qd[Of]:PE(Qd,Of,1)});function VA(Qd,yf,Of){var Ch=S_(Qd)?f0:T1;return Of&&hf(Qd,yf,Of)&&(yf=rd),Ch(Qd,u_(yf,3))}function zA(Qd,yf){var Of=S_(Qd)?fE:A0;return Of(Qd,u_(yf,3))}var WA=zT(CE),YA=zT(s0);function KA(Qd,yf){return wb(Jx(Qd,yf),1)}function XA(Qd,yf){return wb(Jx(Qd,yf),Pf)}function QA(Qd,yf,Of){return Of=Of===rd?1:x_(Of),wb(Jx(Qd,yf),Of)}function oC(Qd,yf){var Of=S_(Qd)?Qb:sE;return Of(Qd,u_(yf,3))}function lC(Qd,yf){var Of=S_(Qd)?TS:kT;return Of(Qd,u_(yf,3))}var JA=fv(function(Qd,yf,Of){F_.call(Qd,Of)?Qd[Of].push(yf):PE(Qd,Of,[yf])});function ZA(Qd,yf,Of,Ch){Qd=$y(Qd)?Qd:nT(Qd),Of=Of&&!Ch?x_(Of):0;var pm=Qd.length;return Of<0&&(Of=Z_(pm+Of,0)),r1(Qd)?Of<=pm&&Qd.indexOf(yf,Of)>-1:!!pm&&Zd(Qd,yf,Of)>-1}var ew=T_(function(Qd,yf,Of){var Ch=-1,pm=typeof yf=="function",Nm=$y(Qd)?lg(Qd.length):[];return sE(Qd,function(Wm){Nm[++Ch]=pm?zb(yf,Wm,Of):nv(Wm,yf,Of)}),Nm}),tw=fv(function(Qd,yf,Of){PE(Qd,Of,yf)});function Jx(Qd,yf){var Of=S_(Qd)?K_:LT;return Of(Qd,u_(yf,3))}function nw(Qd,yf,Of,Ch){return Qd==null?[]:(S_(yf)||(yf=yf==null?[]:[yf]),Of=Ch?rd:Of,S_(Of)||(Of=Of==null?[]:[Of]),Ox(Qd,yf,Of))}var rw=fv(function(Qd,yf,Of){Qd[Of?0:1].push(yf)},function(){return[[],[]]});function iw(Qd,yf,Of){var Ch=S_(Qd)?Lv:Gm,pm=arguments.length<3;return Ch(Qd,u_(yf,4),Of,pm,sE)}function sw(Qd,yf,Of){var Ch=S_(Qd)?xS:Gm,pm=arguments.length<3;return Ch(Qd,u_(yf,4),Of,pm,kT)}function ow(Qd,yf){var Of=S_(Qd)?fE:A0;return Of(Qd,t1(u_(yf,3)))}function lw(Qd){var yf=S_(Qd)?NT:$x;return yf(Qd)}function uw(Qd,yf,Of){(Of?hf(Qd,yf,Of):yf===rd)?yf=1:yf=x_(yf);var Ch=S_(Qd)?v1:Px;return Ch(Qd,yf)}function dw(Qd){var yf=S_(Qd)?IT:w1;return yf(Qd)}function pw(Qd){if(Qd==null)return 0;if($y(Qd))return r1(Qd)?V0(Qd):Qd.length;var yf=Nb(Qd);return yf==Xh||yf==fm?Qd.size:D0(Qd).length}function fw(Qd,yf,Of){var Ch=S_(Qd)?VE:Qv;return Of&&hf(Qd,yf,Of)&&(yf=rd),Ch(Qd,u_(yf,3))}var hw=T_(function(Qd,yf){if(Qd==null)return[];var Of=yf.length;return Of>1&&hf(Qd,yf[0],yf[1])?yf=[]:Of>2&&hf(yf[0],yf[1],yf[2])&&(yf=[yf[0]]),Ox(Qd,wb(yf,1),[])}),Zx=Y0||function(){return j_.Date.now()};function mw(Qd,yf){if(typeof yf!="function")throw new Iy(hd);return Qd=x_(Qd),function(){if(--Qd<1)return yf.apply(this,arguments)}}function uC(Qd,yf,Of){return yf=Of?rd:yf,yf=Qd&&yf==null?Qd.length:yf,k_(Qd,df,rd,rd,rd,rd,yf)}function cC(Qd,yf){var Of;if(typeof yf!="function")throw new Iy(hd);return Qd=x_(Qd),function(){return--Qd>0&&(Of=yf.apply(this,arguments)),Qd<=1&&(yf=rd),Of}}var F1=T_(function(Qd,yf,Of){var Ch=Vd;if(Of.length){var pm=Zb(Of,_v(F1));Ch|=Kd}return k_(Qd,Ch,yf,Of,pm)}),dC=T_(function(Qd,yf,Of){var Ch=Vd|Gd;if(Of.length){var pm=Zb(Of,_v(dC));Ch|=Kd}return k_(yf,Ch,Qd,Of,pm)});function pC(Qd,yf,Of){yf=Of?rd:yf;var Ch=k_(Qd,qd,rd,rd,rd,rd,rd,yf);return Ch.placeholder=pC.placeholder,Ch}function hC(Qd,yf,Of){yf=Of?rd:yf;var Ch=k_(Qd,Wd,rd,rd,rd,rd,rd,yf);return Ch.placeholder=hC.placeholder,Ch}function mC(Qd,yf,Of){var Ch,pm,Nm,Wm,Xm,ng,wg=0,Dg=!1,Rg=!1,Jg=!0;if(typeof Qd!="function")throw new Iy(hd);yf=wE(yf)||0,_b(Of)&&(Dg=!!Of.leading,Rg="maxWait"in Of,Nm=Rg?Z_(wE(Of.maxWait)||0,yf):Nm,Jg="trailing"in Of?!!Of.trailing:Jg);function s_(kb){var jE=Ch,$0=pm;return Ch=pm=rd,wg=kb,Wm=Qd.apply($0,jE),Wm}function f_(kb){return wg=kb,Xm=i_(N_,yf),Dg?s_(kb):Wm}function A_(kb){var jE=kb-ng,$0=kb-wg,PC=yf-jE;return Rg?Eb(PC,Nm-$0):PC}function h_(kb){var jE=kb-ng,$0=kb-wg;return ng===rd||jE>=yf||jE<0||Rg&&$0>=Nm}function N_(){var kb=Zx();if(h_(kb))return M_(kb);Xm=i_(N_,A_(kb))}function M_(kb){return Xm=rd,Jg&&Ch?s_(kb):(Ch=pm=rd,Wm)}function cE(){Xm!==rd&&Fx(Xm),wg=0,Ch=ng=pm=Xm=rd}function sy(){return Xm===rd?Wm:M_(Zx())}function dE(){var kb=Zx(),jE=h_(kb);if(Ch=arguments,pm=this,ng=kb,jE){if(Xm===rd)return f_(ng);if(Rg)return Fx(Xm),Xm=i_(N_,yf),s_(ng)}return Xm===rd&&(Xm=i_(N_,yf)),Wm}return dE.cancel=cE,dE.flush=sy,dE}var gw=T_(function(Qd,yf){return vx(Qd,1,yf)}),_w=T_(function(Qd,yf,Of){return vx(Qd,wE(yf)||0,Of)});function yw(Qd){return k_(Qd,pf)}function e1(Qd,yf){if(typeof Qd!="function"||yf!=null&&typeof yf!="function")throw new Iy(hd);var Of=function(){var Ch=arguments,pm=yf?yf.apply(this,Ch):Ch[0],Nm=Of.cache;if(Nm.has(pm))return Nm.get(pm);var Wm=Qd.apply(this,Ch);return Of.cache=Nm.set(pm,Wm)||Nm,Wm};return Of.cache=new(e1.Cache||rE),Of}e1.Cache=rE;function t1(Qd){if(typeof Qd!="function")throw new Iy(hd);return function(){var yf=arguments;switch(yf.length){case 0:return!Qd.call(this);case 1:return!Qd.call(this,yf[0]);case 2:return!Qd.call(this,yf[0],yf[1]);case 3:return!Qd.call(this,yf[0],yf[1],yf[2])}return!Qd.apply(this,yf)}}function Ew(Qd){return cC(2,Qd)}var vw=nS(function(Qd,yf){yf=yf.length==1&&S_(yf[0])?K_(yf[0],g_(u_())):K_(wb(yf,1),g_(u_()));var Of=yf.length;return T_(function(Ch){for(var pm=-1,Nm=Eb(Ch.length,Of);++pm=yf}),pS=$T(function(){return arguments}())?$T:function(Qd){return Sb(Qd)&&F_.call(Qd,"callee")&&!OS.call(Qd,"callee")},S_=lg.isArray,Pw=p0?g_(p0):rv;function $y(Qd){return Qd!=null&&n1(Qd.length)&&!k0(Qd)}function Rb(Qd){return Sb(Qd)&&$y(Qd)}function Lw(Qd){return Qd===!0||Qd===!1||Sb(Qd)&&$b(Qd)==Af}var vv=c1||Q1,Bw=Ay?g_(Ay):Ax;function Fw(Qd){return Sb(Qd)&&Qd.nodeType===1&&!JT(Qd)}function jw(Qd){if(Qd==null)return!0;if($y(Qd)&&(S_(Qd)||typeof Qd=="string"||typeof Qd.splice=="function"||vv(Qd)||tT(Qd)||pS(Qd)))return!Qd.length;var yf=Nb(Qd);if(yf==Xh||yf==fm)return!Qd.size;if(Kh(Qd))return!D0(Qd).length;for(var Of in Qd)if(F_.call(Qd,Of))return!1;return!0}function Uw(Qd,yf){return e0(Qd,yf)}function Hw(Qd,yf,Of){Of=typeof Of=="function"?Of:rd;var Ch=Of?Of(Qd,yf):rd;return Ch===rd?e0(Qd,yf,rd,Of):!!Ch}function U1(Qd){if(!Sb(Qd))return!1;var yf=$b(Qd);return yf==dm||yf==Nh||typeof Qd.message=="string"&&typeof Qd.name=="string"&&!JT(Qd)}function Gw(Qd){return typeof Qd=="number"&&ux(Qd)}function k0(Qd){if(!_b(Qd))return!1;var yf=$b(Qd);return yf==Jf||yf==oh||yf==Df||yf==$h}function yC(Qd){return typeof Qd=="number"&&Qd==x_(Qd)}function n1(Qd){return typeof Qd=="number"&&Qd>-1&&Qd%1==0&&Qd<=lh}function _b(Qd){var yf=typeof Qd;return Qd!=null&&(yf=="object"||yf=="function")}function Sb(Qd){return Qd!=null&&typeof Qd=="object"}var EC=qE?g_(qE):Yv;function qw(Qd,yf){return Qd===yf||PT(Qd,yf,B_(yf))}function Vw(Qd,yf,Of){return Of=typeof Of=="function"?Of:rd,PT(Qd,yf,B_(yf),Of)}function zw(Qd){return vC(Qd)&&Qd!=+Qd}function Ww(Qd){if(Lh(Qd))throw new __(fd);return w0(Qd)}function Yw(Qd){return Qd===null}function Kw(Qd){return Qd==null}function vC(Qd){return typeof Qd=="number"||Sb(Qd)&&$b(Qd)==Tm}function JT(Qd){if(!Sb(Qd)||$b(Qd)!=Zf)return!1;var yf=WE(Qd);if(yf===null)return!0;var Of=F_.call(yf,"constructor")&&yf.constructor;return typeof Of=="function"&&Of instanceof Of&&z0.call(Of)==_0}var H1=j0?g_(j0):Dx;function Xw(Qd){return yC(Qd)&&Qd>=-9007199254740991&&Qd<=lh}var SC=Hy?g_(Hy):Nx;function r1(Qd){return typeof Qd=="string"||!S_(Qd)&&Sb(Qd)&&$b(Qd)==zh}function uE(Qd){return typeof Qd=="symbol"||Sb(Qd)&&$b(Qd)==Mm}var tT=SS?g_(SS):Ix;function Qw(Qd){return Qd===rd}function Jw(Qd){return Sb(Qd)&&Nb(Qd)==tg}function Zw(Qd){return Sb(Qd)&&$b(Qd)==Fm}var eD=sS(N0),tD=sS(function(Qd,yf){return Qd<=yf});function TC(Qd){if(!Qd)return[];if($y(Qd))return r1(Qd)?qy(Qd):Jb(Qd);if(y0&&Qd[y0])return o1(Qd[y0]());var yf=Nb(Qd),Of=yf==Xh?AS:yf==fm?ey:nT;return Of(Qd)}function M0(Qd){if(!Qd)return Qd===0?Qd:0;if(Qd=wE(Qd),Qd===Pf||Qd===-1/0){var yf=Qd<0?-1:1;return yf*xh}return Qd===Qd?Qd:0}function x_(Qd){var yf=M0(Qd),Of=yf%1;return yf===yf?Of?yf-Of:yf:0}function xC(Qd){return Qd?LE(x_(Qd),0,Mh):0}function wE(Qd){if(typeof Qd=="number")return Qd;if(uE(Qd))return Eh;if(_b(Qd)){var yf=typeof Qd.valueOf=="function"?Qd.valueOf():Qd;Qd=_b(yf)?yf+"":yf}if(typeof Qd!="string")return Qd===0?Qd:+Qd;Qd=Zg(Qd);var Of=zm.test(Qd);return Of||Dm.test(Qd)?d0(Qd.slice(2),Of?2:8):Lm.test(Qd)?Eh:+Qd}function CC(Qd){return lE(Qd,Py(Qd))}function nD(Qd){return Qd?LE(x_(Qd),-9007199254740991,lh):Qd===0?Qd:0}function z_(Qd){return Qd==null?"":ry(Qd)}var rD=SE(function(Qd,yf){if(Kh(yf)||$y(yf)){lE(yf,Vb(yf),Qd);return}for(var Of in yf)F_.call(yf,Of)&&X0(Qd,Of,yf[Of])}),AC=SE(function(Qd,yf){lE(yf,Py(yf),Qd)}),i1=SE(function(Qd,yf,Of,Ch){lE(yf,Py(yf),Qd,Ch)}),iD=SE(function(Qd,yf,Of,Ch){lE(yf,Vb(yf),Qd,Ch)}),sD=TE(J0);function oD(Qd,yf){var Of=K0(Qd);return yf==null?Of:RT(Of,yf)}var lD=T_(function(Qd,yf){Qd=V_(Qd);var Of=-1,Ch=yf.length,pm=Ch>2?yf[2]:rd;for(pm&&hf(yf[0],yf[1],pm)&&(Ch=1);++Of1),Nm}),lE(Qd,ZS(Qd),Of),Ch&&(Of=ty(Of,Nd|Md|Ld,lS));for(var pm=yf.length;pm--;)qS(Of,yf[pm]);return Of});function wD(Qd,yf){return DC(Qd,t1(u_(yf)))}var DD=TE(function(Qd,yf){return Qd==null?{}:kx(Qd,yf)});function DC(Qd,yf){if(Qd==null)return{};var Of=K_(ZS(Qd),function(Ch){return[Ch]});return yf=u_(yf),Mx(Qd,Of,function(Ch,pm){return yf(Ch,pm[0])})}function ND(Qd,yf,Of){yf=n0(yf,Qd);var Ch=-1,pm=yf.length;for(pm||(pm=1,Qd=rd);++Chyf){var Ch=Qd;Qd=yf,yf=Ch}if(Of||Qd%1||yf%1){var pm=CT();return Eb(Qd+pm*(yf-Qd+ES("1e-"+((pm+"").length-1))),yf)}return GS(Qd,yf)}var jD=mv(function(Qd,yf,Of){return yf=yf.toLowerCase(),Qd+(Of?RC(yf):yf)});function RC(Qd){return V1(z_(Qd).toLowerCase())}function OC(Qd){return Qd=z_(Qd),Qd&&Qd.replace(pg,G0).replace(hS,"")}function UD(Qd,yf,Of){Qd=z_(Qd),yf=ry(yf);var Ch=Qd.length;Of=Of===rd?Ch:LE(x_(Of),0,Ch);var pm=Of;return Of-=yf.length,Of>=0&&Qd.slice(Of,pm)==yf}function HD(Qd){return Qd=z_(Qd),Qd&&d_.test(Qd)?Qd.replace(Og,hE):Qd}function GD(Qd){return Qd=z_(Qd),Qd&&I_.test(Qd)?Qd.replace(eb,"\\$&"):Qd}var qD=mv(function(Qd,yf,Of){return Qd+(Of?"-":"")+yf.toLowerCase()}),VD=mv(function(Qd,yf,Of){return Qd+(Of?" ":"")+yf.toLowerCase()}),zD=Gx("toLowerCase");function WD(Qd,yf,Of){Qd=z_(Qd),yf=x_(yf);var Ch=yf?V0(Qd):0;if(!yf||Ch>=yf)return Qd;var pm=(yf-Ch)/2;return KS(E0(pm),Of)+Qd+KS(jv(pm),Of)}function YD(Qd,yf,Of){Qd=z_(Qd),yf=x_(yf);var Ch=yf?V0(Qd):0;return yf&&Ch>>0,Of?(Qd=z_(Qd),Qd&&(typeof yf=="string"||yf!=null&&!H1(yf))&&(yf=ry(yf),!yf&&q0(Qd))?BE(qy(Qd),0,Of):Qd.split(yf,Of)):[]}var tN=mv(function(Qd,yf,Of){return Qd+(Of?" ":"")+V1(yf)});function nN(Qd,yf,Of){return Qd=z_(Qd),Of=Of==null?0:LE(x_(Of),0,Qd.length),yf=ry(yf),Qd.slice(Of,Of+yf.length)==yf}function rN(Qd,yf,Of){var Ch=_m.templateSettings;Of&&hf(Qd,yf,Of)&&(yf=rd),Qd=z_(Qd),yf=i1({},yf,Ch,Wx);var pm=i1({},yf.imports,Ch.imports,Wx),Nm=Vb(pm),Wm=tb(pm,Nm),Xm,ng,wg=0,Dg=yf.interpolate||qg,Rg="__p += '",Jg=Fv((yf.escape||qg).source+"|"+Dg.source+"|"+(Dg===t_?mm:qg).source+"|"+(yf.evaluate||qg).source+"|$","g"),s_="//# sourceURL="+(F_.call(yf,"sourceURL")?(yf.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++_S+"]")+` -`;Qd.replace(Jg,function(h_,N_,M_,cE,sy,dE){return M_||(M_=cE),Rg+=Qd.slice(wg,dE).replace(xg,m0),N_&&(Xm=!0,Rg+=`' + -__e(`+N_+`) + -'`),sy&&(ng=!0,Rg+=`'; -`+sy+`; -__p += '`),M_&&(Rg+=`' + + */lodash.exports;(function(Ra,ed){(function(){var ud,dd="4.17.21",hd=200,md="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",gd="Expected a function",yd="Invalid `variable` option passed into `_.template`",vd="__lodash_hash_undefined__",Cd=500,wd="__lodash_placeholder__",Nd=1,Ld=2,Ud=4,jd=1,Gd=2,Yd=1,zd=2,qd=4,Wd=8,Xd=16,Jd=32,Zd=64,mf=128,xf=256,_f=512,vf=30,gf="...",Af=800,Df=16,Of=1,Cf=2,If=3,Ff=1/0,sh=9007199254740991,Sh=17976931348623157e292,yh=NaN,Mh=4294967295,lh=Mh-1,rh=Mh>>>1,mh=[["ary",mf],["bind",Yd],["bindKey",zd],["curry",Wd],["curryRight",Xd],["flip",_f],["partial",Jd],["partialRight",Zd],["rearg",xf]],xh="[object Arguments]",Eh="[object Array]",kf="[object AsyncFunction]",Rf="[object Boolean]",_h="[object Date]",Ph="[object DOMException]",sm="[object Error]",th="[object Function]",oh="[object GeneratorFunction]",Zh="[object Map]",Sm="[object Number]",$h="[object Null]",Vf="[object Object]",nh="[object Promise]",Lh="[object Proxy]",Ih="[object RegExp]",om="[object Set]",zh="[object String]",Om="[object Symbol]",Im="[object Undefined]",Zm="[object WeakMap]",Lm="[object WeakSet]",Wm="[object ArrayBuffer]",ig="[object DataView]",yg="[object Float32Array]",jh="[object Float64Array]",Pf="[object Int8Array]",$f="[object Int16Array]",Nh="[object Int32Array]",Wh="[object Uint8Array]",_m="[object Uint8ClampedArray]",$m="[object Uint16Array]",Ym="[object Uint32Array]",Ag=/\b__p \+= '';/g,sg=/\b(__p \+=) '' \+/g,mg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,vg=/&(?:amp|lt|gt|quot|#39);/g,kg=/[&<>"']/g,Kg=RegExp(vg.source),p_=RegExp(kg.source),l_=/<%-([\s\S]+?)%>/g,v_=/<%([\s\S]+?)%>/g,r_=/<%=([\s\S]+?)%>/g,O_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S_=/^\w*$/,Q_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,t0=/[\\^$.*+?()[\]{}|]/g,R_=RegExp(t0.source),P_=/^\s+/,Pg=/\s/,$0=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,z0=/\{\n\/\* \[wrapped with (.+)\] \*/,c0=/,? & /,ih=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,mm=/[()=,{}\[\]\/\s]/,Qh=/\\(\\)?/g,hm=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fm=/\w*$/,Pm=/^[-+]0x[0-9a-f]+$/i,Vm=/^0b[01]+$/i,Gm=/^\[object .+?Constructor\]$/,Tm=/^0o[0-7]+$/i,lg=/^(?:0|[1-9]\d*)$/,fg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zg=/($^)/,Tg=/['\n\r\u2028\u2029\\]/g,Xg="\\ud800-\\udfff",D_="\\u0300-\\u036f",A_="\\ufe20-\\ufe2f",f_="\\u20d0-\\u20ff",Mg=D_+A_+f_,V_="\\u2700-\\u27bf",g_="a-z\\xdf-\\xf6\\xf8-\\xff",s_="\\xac\\xb1\\xd7\\xf7",Hh="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mm="\\u2000-\\u206f",pg=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rg="A-Z\\xc0-\\xd6\\xd8-\\xde",og="\\ufe0e\\ufe0f",Fg=s_+Hh+Mm+pg,y_="['’]",Y_="["+Xg+"]",s0="["+Fg+"]",L0="["+Mg+"]",rb="\\d+",u_="["+V_+"]",B0="["+g_+"]",K_="[^"+Xg+Fg+rb+V_+g_+Rg+"]",E0="\\ud83c[\\udffb-\\udfff]",d0="(?:"+L0+"|"+E0+")",nb="[^"+Xg+"]",Pb="(?:\\ud83c[\\udde6-\\uddff]){2}",S0="[\\ud800-\\udbff][\\udc00-\\udfff]",ib="["+Rg+"]",ov="\\u200d",Iy="(?:"+B0+"|"+K_+")",i_="(?:"+ib+"|"+K_+")",Ry="(?:"+y_+"(?:d|ll|m|re|s|t|ve))?",Kb="(?:"+y_+"(?:D|LL|M|RE|S|T|VE))?",lv=d0+"?",Jv="["+og+"]?",Zv="(?:"+ov+"(?:"+[nb,Pb,S0].join("|")+")"+Jv+lv+")*",Xb="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",p0="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",W0=Jv+lv+Zv,_b="(?:"+[u_,Pb,S0].join("|")+")"+W0,Qb="(?:"+[nb+L0+"?",L0,Pb,S0,Y_].join("|")+")",Oy=RegExp(y_,"g"),g1=RegExp(L0,"g"),PE=RegExp(E0+"(?="+E0+")|"+Qb+W0,"g"),_1=RegExp([ib+"?"+B0+"+"+Ry+"(?="+[s0,ib,"$"].join("|")+")",i_+"+"+Kb+"(?="+[s0,ib+Iy,"$"].join("|")+")",ib+"?"+Iy+"+"+Ry,ib+"+"+Kb,p0,Xb,rb,_b].join("|"),"g"),pS=RegExp("["+ov+Xg+Mg+og+"]"),LE=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,b1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],y1=-1,Lg={};Lg[yg]=Lg[jh]=Lg[Pf]=Lg[$f]=Lg[Nh]=Lg[Wh]=Lg[_m]=Lg[$m]=Lg[Ym]=!0,Lg[xh]=Lg[Eh]=Lg[Wm]=Lg[Rf]=Lg[ig]=Lg[_h]=Lg[sm]=Lg[th]=Lg[Zh]=Lg[Sm]=Lg[Vf]=Lg[Ih]=Lg[om]=Lg[zh]=Lg[Zm]=!1;var q_={};q_[xh]=q_[Eh]=q_[Wm]=q_[ig]=q_[Rf]=q_[_h]=q_[yg]=q_[jh]=q_[Pf]=q_[$f]=q_[Nh]=q_[Zh]=q_[Sm]=q_[Vf]=q_[Ih]=q_[om]=q_[zh]=q_[Om]=q_[Wh]=q_[_m]=q_[$m]=q_[Ym]=!0,q_[sm]=q_[th]=q_[Zm]=!1;var uv={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},eE={"&":"&","<":"<",">":">",'"':""","'":"'"},BE={"&":"&","<":"<",">":">",""":'"',"'":"'"},v1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},E1=parseFloat,dv=parseInt,S1=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal,FE=typeof self=="object"&&self&&self.Object===Object&&self,j_=S1||FE||Function("return this")(),UE=ed&&!ed.nodeType&&ed,Jb=UE&&!0&&Ra&&!Ra.nodeType&&Ra,J_=Jb&&Jb.exports===UE,sb=J_&&S1.process,o0=function(){try{var Jm=Jb&&Jb.require&&Jb.require("util").types;return Jm||sb&&sb.binding&&sb.binding("util")}catch{}}(),hv=o0&&o0.isArrayBuffer,ob=o0&&o0.isDate,$y=o0&&o0.isMap,tE=o0&&o0.isRegExp,yb=o0&&o0.isSet,x1=o0&&o0.isTypedArray;function q0(Jm,hg,ug){switch(ug.length){case 0:return Jm.call(hg);case 1:return Jm.call(hg,ug[0]);case 2:return Jm.call(hg,ug[0],ug[1]);case 3:return Jm.call(hg,ug[0],ug[1],ug[2])}return Jm.apply(hg,ug)}function jE(Jm,hg,ug,t_){for(var b_=-1,k_=Jm==null?0:Jm.length;++b_-1}function nE(Jm,hg,ug){for(var t_=-1,b_=Jm==null?0:Jm.length;++t_-1;);return ug}function x0(Jm,hg){for(var ug=Jm.length;ug--&&hf(hg,Jm[ug],0)>-1;);return ug}function gv(Jm,hg){for(var ug=Jm.length,t_=0;ug--;)Jm[ug]===hg&&++t_;return t_}var iE=Nm(uv),Bb=Nm(eE);function _v(Jm){return"\\"+v1[Jm]}function hS(Jm,hg){return Jm==null?ud:Jm[hg]}function sE(Jm){return pS.test(Jm)}function ex(Jm){return LE.test(Jm)}function lT(Jm){for(var hg,ug=[];!(hg=Jm.next()).done;)ug.push(hg.value);return ug}function w1(Jm){var hg=-1,ug=Array(Jm.size);return Jm.forEach(function(t_,b_){ug[++hg]=[b_,t_]}),ug}function D1(Jm,hg){return function(ug){return Jm(hg(ug))}}function X0(Jm,hg){for(var ug=-1,t_=Jm.length,b_=0,k_=[];++ug-1}function mx(df,Sf){var Mf=this.__data__,Th=fE(Mf,df);return Th<0?(++this.size,Mf.push([df,Sf])):Mf[Th][1]=Sf,this}Ab.prototype.clear=ET,Ab.prototype.delete=AS,Ab.prototype.get=wS,Ab.prototype.has=hx,Ab.prototype.set=mx;function wb(df){var Sf=-1,Mf=df==null?0:df.length;for(this.clear();++Sf=Sf?df:Sf)),df}function J0(df,Sf,Mf,Th,lm,Dm){var zm,Km=Sf&Nd,rg=Sf&Ld,Dg=Sf&Ud;if(Mf&&(zm=lm?Mf(df,Th,lm,Dm):Mf(df)),zm!==ud)return zm;if(!g0(df))return df;var Ng=x_(df);if(Ng){if(zm=FT(df),!Km)return K0(df,zm)}else{var Og=w0(df),Zg=Og==th||Og==oh;if(ME(df))return HS(df,Km);if(Og==Vf||Og==xh||Zg&&!lm){if(zm=rg||Zg?{}:Xx(df),!Km)return rg?$T(df,vx(zm,df)):Ux(df,RS(zm,df))}else{if(!q_[Og])return lm?df:{};zm=eS(df,Og,Km)}}Dm||(Dm=new n0);var o_=Dm.get(df);if(o_)return o_;Dm.set(df,zm),CC(df)?df.forEach(function(m_){zm.add(J0(m_,Sf,Mf,m_,df,Dm))}):xC(df)&&df.forEach(function(m_,I_){zm.set(I_,J0(m_,Sf,Mf,I_,df,Dm))});var h_=Dg?rg?Z1:J1:rg?mb:H0,w_=Ng?ud:h_(df);return Y0(w_||df,function(m_,I_){w_&&(I_=m_,m_=df[I_]),pE(zm,I_,J0(m_,Sf,Mf,I_,df,Dm))}),zm}function CT(df){var Sf=H0(df);return function(Mf){return OS(Mf,df,Sf)}}function OS(df,Sf,Mf){var Th=Mf.length;if(df==null)return!Th;for(df=z_(df);Th--;){var lm=Mf[Th],Dm=Sf[lm],zm=df[lm];if(zm===ud&&!(lm in df)||!Dm(zm))return!1}return!0}function Ex(df,Sf,Mf){if(typeof df!="function")throw new ub(gd);return a_(function(){df.apply(ud,Mf)},Sf)}function QE(df,Sf,Mf,Th){var lm=-1,Dm=rE,zm=!0,Km=df.length,rg=[],Dg=Sf.length;if(!Km)return rg;Mf&&(Sf=X_(Sf,__(Mf))),Th?(Dm=nE,zm=!1):Sf.length>=hd&&(Dm=N_,zm=!1,Sf=new Fy(Sf));e:for(;++lmlm?0:lm+Mf),Th=Th===ud||Th>lm?lm:C_(Th),Th<0&&(Th+=lm),Th=Mf>Th?0:wC(Th);Mf0&&Mf(Km)?Sf>1?C0(Km,Sf-1,Mf,Th,lm):vb(lm,Km):Th||(lm[lm.length]=Km)}return lm}var mE=jx(),$S=jx(!0);function pb(df,Sf){return df&&mE(df,Sf,H0)}function U1(df,Sf){return df&&$S(df,Sf,H0)}function j1(df,Sf){return Lb(Sf,function(Mf){return Yv(df[Mf])})}function zy(df,Sf){Sf=ev(Sf,df);for(var Mf=0,Th=Sf.length;df!=null&&MfSf}function xx(df,Sf){return df!=null&&U_.call(df,Sf)}function Tx(df,Sf){return df!=null&&Sf in z_(df)}function gE(df,Sf,Mf){return df>=b0(Sf,Mf)&&df=120&&Ng.length>=120)?new Fy(zm&&Ng):ud}Ng=df[0];var Og=-1,Zg=Km[0];e:for(;++Og-1;)Km!==df&&Sv.call(Km,rg,1),Sv.call(df,rg,1);return df}function F0(df,Sf){for(var Mf=df?Sf.length:0,Th=Mf-1;Mf--;){var lm=Sf[Mf];if(Mf==Th||lm!==Dm){var Dm=lm;Ef(lm)?Sv.call(df,lm,1):G1(df,lm)}}return df}function q1(df,Sf){return df+Cv(TS()*(Sf-df+1))}function DT(df,Sf,Mf,Th){for(var lm=-1,Dm=e0(VE((Sf-df)/(Mf||1)),0),zm=ug(Dm);Dm--;)zm[Th?Dm:++lm]=df,df+=Mf;return zm}function US(df,Sf){var Mf="";if(!df||Sf<1||Sf>sh)return Mf;do Sf%2&&(Mf+=df),Sf=Cv(Sf/2),Sf&&(df+=df);while(Sf);return Mf}function T_(df,Sf){return n_($g(df,Sf,gb),df+"")}function Mx(df){return DS(rS(df))}function Px(df,Sf){var Mf=rS(df);return u0(Mf,Ty(Sf,0,Mf.length))}function AE(df,Sf,Mf,Th){if(!g0(df))return df;Sf=ev(Sf,df);for(var lm=-1,Dm=Sf.length,zm=Dm-1,Km=df;Km!=null&&++lmlm?0:lm+Sf),Mf=Mf>lm?lm:Mf,Mf<0&&(Mf+=lm),lm=Sf>Mf?0:Mf-Sf>>>0,Sf>>>=0;for(var Dm=ug(lm);++Th>>1,zm=df[Dm];zm!==null&&!kb(zm)&&(Mf?zm<=Sf:zm=hd){var Dg=Sf?null:PT(df);if(Dg)return Q0(Dg);zm=!1,lm=N_,rg=new Fy}else rg=Sf?[]:Km;e:for(;++Th=Th?df:A0(df,Sf,Mf)}var Fx=vS||function(df){return j_.clearTimeout(df)};function HS(df,Sf){if(Sf)return df.slice();var Mf=df.length,Th=_S?_S(Mf):new df.constructor(Mf);return df.copy(Th),Th}function wE(df){var Sf=new df.constructor(df.byteLength);return new R1(Sf).set(new R1(df)),Sf}function RT(df,Sf){var Mf=Sf?wE(df.buffer):df.buffer;return new df.constructor(Mf,df.byteOffset,df.byteLength)}function OT(df){var Sf=new df.constructor(df.source,Fm.exec(df));return Sf.lastIndex=df.lastIndex,Sf}function s1(df){return YE?z_(YE.call(df)):{}}function qS(df,Sf){var Mf=Sf?wE(df.buffer):df.buffer;return new df.constructor(Mf,df.byteOffset,df.length)}function GS(df,Sf){if(df!==Sf){var Mf=df!==ud,Th=df===null,lm=df===df,Dm=kb(df),zm=Sf!==ud,Km=Sf===null,rg=Sf===Sf,Dg=kb(Sf);if(!Km&&!Dg&&!Dm&&df>Sf||Dm&&zm&&rg&&!Km&&!Dg||Th&&zm&&rg||!Mf&&rg||!lm)return 1;if(!Th&&!Dm&&!Dg&&df=Km)return rg;var Dg=Mf[Th];return rg*(Dg=="desc"?-1:1)}}return df.index-Sf.index}function z1(df,Sf,Mf,Th){for(var lm=-1,Dm=df.length,zm=Mf.length,Km=-1,rg=Sf.length,Dg=e0(Dm-zm,0),Ng=ug(rg+Dg),Og=!Th;++Km1?Mf[lm-1]:ud,zm=lm>2?Mf[2]:ud;for(Dm=df.length>3&&typeof Dm=="function"?(lm--,Dm):ud,zm&&yf(Mf[0],Mf[1],zm)&&(Dm=lm<3?ud:Dm,lm=1),Sf=z_(Sf);++Th-1?lm[Dm?Sf[zm]:zm]:ud}}function Gx(df){return Gb(function(Sf){var Mf=Sf.length,Th=Mf,lm=H_.prototype.thru;for(df&&Sf.reverse();Th--;){var Dm=Sf[Th];if(typeof Dm!="function")throw new ub(gd);if(lm&&!zm&&p1(Dm)=="wrapper")var zm=new H_([],!0)}for(Th=zm?Th:Mf;++Th1&&M_.reverse(),Ng&&rgKm))return!1;var Dg=Dm.get(df),Ng=Dm.get(Sf);if(Dg&&Ng)return Dg==Sf&&Ng==df;var Og=-1,Zg=!0,o_=Mf&Gd?new Fy:ud;for(Dm.set(df,Sf),Dm.set(Sf,df);++Og1?"& ":"")+Sf[Th],Sf=Sf.join(Mf>2?", ":" "),df.replace($0,`{ +/* [wrapped with `+Sf+`] */ +`)}function Qd(df){return x_(df)||h1(df)||!!(lx&&df&&df[lx])}function Ef(df,Sf){var Mf=typeof df;return Sf=Sf??sh,!!Sf&&(Mf=="number"||Mf!="symbol"&&lg.test(df))&&df>-1&&df%1==0&&df0){if(++Sf>=Af)return arguments[0]}else Sf=0;return df.apply(ud,arguments)}}function u0(df,Sf){var Mf=-1,Th=df.length,lm=Th-1;for(Sf=Sf===ud?Th:Sf;++Mf1?df[Sf-1]:ud;return Mf=typeof Mf=="function"?(df.pop(),Mf):ud,lC(df,Mf)});function uC(df){var Sf=gm(df);return Sf.__chain__=!0,Sf}function FA(df,Sf){return Sf(df),df}function Qx(df,Sf){return Sf(df)}var UA=Gb(function(df){var Sf=df.length,Mf=Sf?df[0]:0,Th=this.__wrapped__,lm=function(Dm){return hE(Dm,df)};return Sf>1||this.__actions__.length||!(Th instanceof d_)||!Ef(Mf)?this.thru(lm):(Th=Th.slice(Mf,+Mf+(Sf?1:0)),Th.__actions__.push({func:Qx,args:[lm],thisArg:ud}),new H_(Th,this.__chain__).thru(function(Dm){return Sf&&!Dm.length&&Dm.push(ud),Dm}))});function jA(){return uC(this)}function HA(){return new H_(this.value(),this.__chain__)}function qA(){this.__values__===ud&&(this.__values__=AC(this.value()));var df=this.__index__>=this.__values__.length,Sf=df?ud:this.__values__[this.__index__++];return{done:df,value:Sf}}function GA(){return this}function VA(df){for(var Sf,Mf=this;Mf instanceof M0;){var Th=U0(Mf);Th.__index__=0,Th.__values__=ud,Sf?lm.__wrapped__=Th:Sf=Th;var lm=Th;Mf=Mf.__wrapped__}return lm.__wrapped__=df,Sf}function zA(){var df=this.__wrapped__;if(df instanceof d_){var Sf=df;return this.__actions__.length&&(Sf=new d_(this)),Sf=Sf.reverse(),Sf.__actions__.push({func:Qx,args:[UT],thisArg:ud}),new H_(Sf,this.__chain__)}return this.thru(UT)}function WA(){return r1(this.__wrapped__,this.__actions__)}var YA=DE(function(df,Sf,Mf){U_.call(df,Mf)?++df[Mf]:Sy(df,Mf,1)});function KA(df,Sf,Mf){var Th=x_(df)?mv:AT;return Mf&&yf(df,Sf,Mf)&&(Sf=ud),Th(df,c_(Sf,3))}function XA(df,Sf){var Mf=x_(df)?Lb:Lv;return Mf(df,c_(Sf,3))}var QA=zS(zb),JA=zS(iv);function ZA(df,Sf){return C0(Jx(df,Sf),1)}function ew(df,Sf){return C0(Jx(df,Sf),Ff)}function tw(df,Sf,Mf){return Mf=Mf===ud?1:C_(Mf),C0(Jx(df,Sf),Mf)}function cC(df,Sf){var Mf=x_(df)?Y0:Nb;return Mf(df,c_(Sf,3))}function dC(df,Sf){var Mf=x_(df)?T1:kS;return Mf(df,c_(Sf,3))}var rw=DE(function(df,Sf,Mf){U_.call(df,Mf)?df[Mf].push(Sf):Sy(df,Mf,[Sf])});function nw(df,Sf,Mf,Th){df=hb(df)?df:rS(df),Mf=Mf&&!Th?C_(Mf):0;var lm=df.length;return Mf<0&&(Mf=e0(lm+Mf,0)),nT(df)?Mf<=lm&&df.indexOf(Sf,Mf)>-1:!!lm&&hf(df,Sf,Mf)>-1}var iw=T_(function(df,Sf,Mf){var Th=-1,lm=typeof Sf=="function",Dm=hb(df)?ug(df.length):[];return Nb(df,function(zm){Dm[++Th]=lm?q0(Sf,zm,Mf):vE(zm,Sf,Mf)}),Dm}),sw=DE(function(df,Sf,Mf){Sy(df,Mf,Sf)});function Jx(df,Sf){var Mf=x_(df)?X_:LS;return Mf(df,c_(Sf,3))}function ow(df,Sf,Mf,Th){return df==null?[]:(x_(Sf)||(Sf=Sf==null?[]:[Sf]),Mf=Th?ud:Mf,x_(Mf)||(Mf=Mf==null?[]:[Mf]),Ox(df,Sf,Mf))}var lw=DE(function(df,Sf,Mf){df[Mf?0:1].push(Sf)},function(){return[[],[]]});function uw(df,Sf,Mf){var Th=x_(df)?HE:Hm,lm=arguments.length<3;return Th(df,c_(Sf,4),Mf,lm,Nb)}function dw(df,Sf,Mf){var Th=x_(df)?C1:Hm,lm=arguments.length<3;return Th(df,c_(Sf,4),Mf,lm,kS)}function pw(df,Sf){var Mf=x_(df)?Lb:Lv;return Mf(df,tT(c_(Sf,3)))}function fw(df){var Sf=x_(df)?DS:Mx;return Sf(df)}function hw(df,Sf,Mf){(Mf?yf(df,Sf,Mf):Sf===ud)?Sf=1:Sf=C_(Sf);var Th=x_(df)?TT:Px;return Th(df,Sf)}function mw(df){var Sf=x_(df)?IS:IT;return Sf(df)}function gw(df){if(df==null)return 0;if(hb(df))return nT(df)?oE(df):df.length;var Sf=w0(df);return Sf==Zh||Sf==om?df.size:Uv(df).length}function _w(df,Sf,Mf){var Th=x_(df)?My:e1;return Mf&&yf(df,Sf,Mf)&&(Sf=ud),Th(df,c_(Sf,3))}var yw=T_(function(df,Sf){if(df==null)return[];var Mf=Sf.length;return Mf>1&&yf(df,Sf[0],Sf[1])?Sf=[]:Mf>2&&yf(Sf[0],Sf[1],Sf[2])&&(Sf=[Sf[0]]),Ox(df,C0(Sf,1),[])}),Zx=cE||function(){return j_.Date.now()};function vw(df,Sf){if(typeof Sf!="function")throw new ub(gd);return df=C_(df),function(){if(--df<1)return Sf.apply(this,arguments)}}function pC(df,Sf,Mf){return Sf=Mf?ud:Sf,Sf=df&&Sf==null?df.length:Sf,$_(df,mf,ud,ud,ud,ud,Sf)}function hC(df,Sf){var Mf;if(typeof Sf!="function")throw new ub(gd);return df=C_(df),function(){return--df>0&&(Mf=Sf.apply(this,arguments)),df<=1&&(Sf=ud),Mf}}var HT=T_(function(df,Sf,Mf){var Th=Yd;if(Mf.length){var lm=X0(Mf,OE(HT));Th|=Jd}return $_(df,Th,Sf,Mf,lm)}),mC=T_(function(df,Sf,Mf){var Th=Yd|zd;if(Mf.length){var lm=X0(Mf,OE(mC));Th|=Jd}return $_(Sf,Th,df,Mf,lm)});function gC(df,Sf,Mf){Sf=Mf?ud:Sf;var Th=$_(df,Wd,ud,ud,ud,ud,ud,Sf);return Th.placeholder=gC.placeholder,Th}function yC(df,Sf,Mf){Sf=Mf?ud:Sf;var Th=$_(df,Xd,ud,ud,ud,ud,ud,Sf);return Th.placeholder=yC.placeholder,Th}function vC(df,Sf,Mf){var Th,lm,Dm,zm,Km,rg,Dg=0,Ng=!1,Og=!1,Zg=!0;if(typeof df!="function")throw new ub(gd);Sf=Yb(Sf)||0,g0(Mf)&&(Ng=!!Mf.leading,Og="maxWait"in Mf,Dm=Og?e0(Yb(Mf.maxWait)||0,Sf):Dm,Zg="trailing"in Mf?!!Mf.trailing:Zg);function o_(I0){var Ny=Th,Xv=lm;return Th=lm=ud,Dg=I0,zm=df.apply(Xv,Ny),zm}function h_(I0){return Dg=I0,Km=a_(I_,Sf),Ng?o_(I0):zm}function w_(I0){var Ny=I0-rg,Xv=I0-Dg,FC=Sf-Ny;return Og?b0(FC,Dm-Xv):FC}function m_(I0){var Ny=I0-rg,Xv=I0-Dg;return rg===ud||Ny>=Sf||Ny<0||Og&&Xv>=Dm}function I_(){var I0=Zx();if(m_(I0))return M_(I0);Km=a_(I_,w_(I0))}function M_(I0){return Km=ud,Zg&&Th?o_(I0):(Th=lm=ud,zm)}function $b(){Km!==ud&&Fx(Km),Dg=0,Th=rg=lm=Km=ud}function tb(){return Km===ud?zm:M_(Zx())}function Mb(){var I0=Zx(),Ny=m_(I0);if(Th=arguments,lm=this,rg=I0,Ny){if(Km===ud)return h_(rg);if(Og)return Fx(Km),Km=a_(I_,Sf),o_(rg)}return Km===ud&&(Km=a_(I_,Sf)),zm}return Mb.cancel=$b,Mb.flush=tb,Mb}var Ew=T_(function(df,Sf){return Ex(df,1,Sf)}),Sw=T_(function(df,Sf,Mf){return Ex(df,Yb(Sf)||0,Mf)});function xw(df){return $_(df,_f)}function eT(df,Sf){if(typeof df!="function"||Sf!=null&&typeof Sf!="function")throw new ub(gd);var Mf=function(){var Th=arguments,lm=Sf?Sf.apply(this,Th):Th[0],Dm=Mf.cache;if(Dm.has(lm))return Dm.get(lm);var zm=df.apply(this,Th);return Mf.cache=Dm.set(lm,zm)||Dm,zm};return Mf.cache=new(eT.Cache||wb),Mf}eT.Cache=wb;function tT(df){if(typeof df!="function")throw new ub(gd);return function(){var Sf=arguments;switch(Sf.length){case 0:return!df.call(this);case 1:return!df.call(this,Sf[0]);case 2:return!df.call(this,Sf[0],Sf[1]);case 3:return!df.call(this,Sf[0],Sf[1],Sf[2])}return!df.apply(this,Sf)}}function Tw(df){return hC(2,df)}var Cw=a1(function(df,Sf){Sf=Sf.length==1&&x_(Sf[0])?X_(Sf[0],__(c_())):X_(C0(Sf,1),__(c_()));var Mf=Sf.length;return T_(function(Th){for(var lm=-1,Dm=b0(Th.length,Mf);++lm=Sf}),h1=MS(function(){return arguments}())?MS:function(df){return v0(df)&&U_.call(df,"callee")&&!O1.call(df,"callee")},x_=ug.isArray,Uw=hv?__(hv):SE;function hb(df){return df!=null&&rT(df.length)&&!Yv(df)}function N0(df){return v0(df)&&hb(df)}function jw(df){return df===!0||df===!1||v0(df)&&O0(df)==Rf}var ME=dT||eC,Hw=ob?__(ob):Ax;function qw(df){return v0(df)&&df.nodeType===1&&!JS(df)}function Gw(df){if(df==null)return!0;if(hb(df)&&(x_(df)||typeof df=="string"||typeof df.splice=="function"||ME(df)||tS(df)||h1(df)))return!df.length;var Sf=w0(df);if(Sf==Zh||Sf==om)return!df.size;if(Kh(df))return!Uv(df).length;for(var Mf in df)if(U_.call(df,Mf))return!1;return!0}function Vw(df,Sf){return Xy(df,Sf)}function zw(df,Sf,Mf){Mf=typeof Mf=="function"?Mf:ud;var Th=Mf?Mf(df,Sf):ud;return Th===ud?Xy(df,Sf,ud,Mf):!!Th}function GT(df){if(!v0(df))return!1;var Sf=O0(df);return Sf==sm||Sf==Ph||typeof df.message=="string"&&typeof df.name=="string"&&!JS(df)}function Ww(df){return typeof df=="number"&&ux(df)}function Yv(df){if(!g0(df))return!1;var Sf=O0(df);return Sf==th||Sf==oh||Sf==kf||Sf==Lh}function SC(df){return typeof df=="number"&&df==C_(df)}function rT(df){return typeof df=="number"&&df>-1&&df%1==0&&df<=sh}function g0(df){var Sf=typeof df;return df!=null&&(Sf=="object"||Sf=="function")}function v0(df){return df!=null&&typeof df=="object"}var xC=$y?__($y):JE;function Yw(df,Sf){return df===Sf||PS(df,Sf,F_(Sf))}function Kw(df,Sf,Mf){return Mf=typeof Mf=="function"?Mf:ud,PS(df,Sf,F_(Sf),Mf)}function Xw(df){return TC(df)&&df!=+df}function Qw(df){if(Fh(df))throw new b_(md);return Bv(df)}function Jw(df){return df===null}function Zw(df){return df==null}function TC(df){return typeof df=="number"||v0(df)&&O0(df)==Sm}function JS(df){if(!v0(df)||O0(df)!=Vf)return!1;var Sf=Ly(df);if(Sf===null)return!0;var Mf=U_.call(Sf,"constructor")&&Sf.constructor;return typeof Mf=="function"&&Mf instanceof Mf&&lE.call(Mf)==Ev}var VT=tE?__(tE):Dx;function eD(df){return SC(df)&&df>=-9007199254740991&&df<=sh}var CC=yb?__(yb):Nx;function nT(df){return typeof df=="string"||!x_(df)&&v0(df)&&O0(df)==zh}function kb(df){return typeof df=="symbol"||v0(df)&&O0(df)==Om}var tS=x1?__(x1):Ix;function tD(df){return df===ud}function rD(df){return v0(df)&&w0(df)==Zm}function nD(df){return v0(df)&&O0(df)==Lm}var iD=l1(Hv),sD=l1(function(df,Sf){return df<=Sf});function AC(df){if(!df)return[];if(hb(df))return nT(df)?Eb(df):K0(df);if(xv&&df[xv])return lT(df[xv]());var Sf=w0(df),Mf=Sf==Zh?w1:Sf==om?Q0:rS;return Mf(df)}function Kv(df){if(!df)return df===0?df:0;if(df=Yb(df),df===Ff||df===-1/0){var Sf=df<0?-1:1;return Sf*Sh}return df===df?df:0}function C_(df){var Sf=Kv(df),Mf=Sf%1;return Sf===Sf?Mf?Sf-Mf:Sf:0}function wC(df){return df?Ty(C_(df),0,Mh):0}function Yb(df){if(typeof df=="number")return df;if(kb(df))return yh;if(g0(df)){var Sf=typeof df.valueOf=="function"?df.valueOf():df;df=g0(Sf)?Sf+"":Sf}if(typeof df!="string")return df===0?df:+df;df=e_(df);var Mf=Vm.test(df);return Mf||Tm.test(df)?dv(df.slice(2),Mf?2:8):Pm.test(df)?yh:+df}function DC(df){return Rb(df,mb(df))}function oD(df){return df?Ty(C_(df),-9007199254740991,sh):df===0?df:0}function W_(df){return df==null?"":Z0(df)}var lD=qb(function(df,Sf){if(Kh(Sf)||hb(Sf)){Rb(Sf,H0(Sf),df);return}for(var Mf in Sf)U_.call(Sf,Mf)&&pE(df,Mf,Sf[Mf])}),NC=qb(function(df,Sf){Rb(Sf,mb(Sf),df)}),iT=qb(function(df,Sf,Mf,Th){Rb(Sf,mb(Sf),df,Th)}),uD=qb(function(df,Sf,Mf,Th){Rb(Sf,H0(Sf),df,Th)}),cD=Gb(hE);function dD(df,Sf){var Mf=dE(df);return Sf==null?Mf:RS(Mf,Sf)}var pD=T_(function(df,Sf){df=z_(df);var Mf=-1,Th=Sf.length,lm=Th>2?Sf[2]:ud;for(lm&&yf(Sf[0],Sf[1],lm)&&(Th=1);++Mf1),Dm}),Rb(df,Z1(df),Mf),Th&&(Mf=J0(Mf,Nd|Ld|Ud,c1));for(var lm=Sf.length;lm--;)G1(Mf,Sf[lm]);return Mf});function RD(df,Sf){return RC(df,tT(c_(Sf)))}var OD=Gb(function(df,Sf){return df==null?{}:kx(df,Sf)});function RC(df,Sf){if(df==null)return{};var Mf=X_(Z1(df),function(Th){return[Th]});return Sf=c_(Sf),$x(df,Mf,function(Th,lm){return Sf(Th,lm[0])})}function kD(df,Sf,Mf){Sf=ev(Sf,df);var Th=-1,lm=Sf.length;for(lm||(lm=1,df=ud);++ThSf){var Th=df;df=Sf,Sf=Th}if(Mf||df%1||Sf%1){var lm=TS();return b0(df+lm*(Sf-df+E1("1e-"+((lm+"").length-1))),Sf)}return q1(df,Sf)}var GD=IE(function(df,Sf,Mf){return Sf=Sf.toLowerCase(),df+(Mf?$C(Sf):Sf)});function $C(df){return YT(W_(df).toLowerCase())}function MC(df){return df=W_(df),df&&df.replace(fg,iE).replace(g1,"")}function VD(df,Sf,Mf){df=W_(df),Sf=Z0(Sf);var Th=df.length;Mf=Mf===ud?Th:Ty(C_(Mf),0,Th);var lm=Mf;return Mf-=Sf.length,Mf>=0&&df.slice(Mf,lm)==Sf}function zD(df){return df=W_(df),df&&p_.test(df)?df.replace(kg,Bb):df}function WD(df){return df=W_(df),df&&R_.test(df)?df.replace(t0,"\\$&"):df}var YD=IE(function(df,Sf,Mf){return df+(Mf?"-":"")+Sf.toLowerCase()}),KD=IE(function(df,Sf,Mf){return df+(Mf?" ":"")+Sf.toLowerCase()}),XD=qx("toLowerCase");function QD(df,Sf,Mf){df=W_(df),Sf=C_(Sf);var Th=Sf?oE(df):0;if(!Sf||Th>=Sf)return df;var lm=(Sf-Th)/2;return K1(Cv(lm),Mf)+df+K1(VE(lm),Mf)}function JD(df,Sf,Mf){df=W_(df),Sf=C_(Sf);var Th=Sf?oE(df):0;return Sf&&Th>>0,Mf?(df=W_(df),df&&(typeof Sf=="string"||Sf!=null&&!VT(Sf))&&(Sf=Z0(Sf),!Sf&&sE(df))?Ay(Eb(df),0,Mf):df.split(Sf,Mf)):[]}var sN=IE(function(df,Sf,Mf){return df+(Mf?" ":"")+YT(Sf)});function oN(df,Sf,Mf){return df=W_(df),Mf=Mf==null?0:Ty(C_(Mf),0,df.length),Sf=Z0(Sf),df.slice(Mf,Mf+Sf.length)==Sf}function lN(df,Sf,Mf){var Th=gm.templateSettings;Mf&&yf(df,Sf,Mf)&&(Sf=ud),df=W_(df),Sf=iT({},Sf,Th,Wx);var lm=iT({},Sf.imports,Th.imports,Wx),Dm=H0(lm),zm=r0(lm,Dm),Km,rg,Dg=0,Ng=Sf.interpolate||zg,Og="__p += '",Zg=GE((Sf.escape||zg).source+"|"+Ng.source+"|"+(Ng===r_?hm:zg).source+"|"+(Sf.evaluate||zg).source+"|$","g"),o_="//# sourceURL="+(U_.call(Sf,"sourceURL")?(Sf.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++y1+"]")+` +`;df.replace(Zg,function(m_,I_,M_,$b,tb,Mb){return M_||(M_=$b),Og+=df.slice(Dg,Mb).replace(Tg,_v),I_&&(Km=!0,Og+=`' + +__e(`+I_+`) + +'`),tb&&(rg=!0,Og+=`'; +`+tb+`; +__p += '`),M_&&(Og+=`' + ((__t = (`+M_+`)) == null ? '' : __t) + -'`),wg=dE+h_.length,h_}),Rg+=`'; -`;var f_=F_.call(yf,"variable")&&yf.variable;if(!f_)Rg=`with (obj) { -`+Rg+` +'`),Dg=Mb+m_.length,m_}),Og+=`'; +`;var h_=U_.call(Sf,"variable")&&Sf.variable;if(!h_)Og=`with (obj) { +`+Og+` } -`;else if(gm.test(f_))throw new __(md);Rg=(ng?Rg.replace(Ag,""):Rg).replace(ig,"$1").replace(_g,"$1;"),Rg="function("+(f_||"obj")+`) { -`+(f_?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(Xm?", __e = _.escape":"")+(ng?`, __j = Array.prototype.join; +`;else if(mm.test(h_))throw new b_(yd);Og=(rg?Og.replace(Ag,""):Og).replace(sg,"$1").replace(mg,"$1;"),Og="function("+(h_||"obj")+`) { +`+(h_?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(Km?", __e = _.escape":"")+(rg?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+Rg+`return __p -}`;var A_=MC(function(){return O_(Nm,s_+"return "+Rg).apply(rd,Wm)});if(A_.source=Rg,U1(A_))throw A_;return A_}function iN(Qd){return z_(Qd).toLowerCase()}function sN(Qd){return z_(Qd).toUpperCase()}function oN(Qd,yf,Of){if(Qd=z_(Qd),Qd&&(Of||yf===rd))return Zg(Qd);if(!Qd||!(yf=ry(yf)))return Qd;var Ch=qy(Qd),pm=qy(yf),Nm=P_(Ch,pm),Wm=Cb(Ch,pm)+1;return BE(Ch,Nm,Wm).join("")}function lN(Qd,yf,Of){if(Qd=z_(Qd),Qd&&(Of||yf===rd))return Qd.slice(0,mT(Qd)+1);if(!Qd||!(yf=ry(yf)))return Qd;var Ch=qy(Qd),pm=Cb(Ch,qy(yf))+1;return BE(Ch,0,pm).join("")}function uN(Qd,yf,Of){if(Qd=z_(Qd),Qd&&(Of||yf===rd))return Qd.replace($_,"");if(!Qd||!(yf=ry(yf)))return Qd;var Ch=qy(Qd),pm=P_(Ch,qy(yf));return BE(Ch,pm).join("")}function cN(Qd,yf){var Of=mf,Ch=_f;if(_b(yf)){var pm="separator"in yf?yf.separator:pm;Of="length"in yf?x_(yf.length):Of,Ch="omission"in yf?ry(yf.omission):Ch}Qd=z_(Qd);var Nm=Qd.length;if(q0(Qd)){var Wm=qy(Qd);Nm=Wm.length}if(Of>=Nm)return Qd;var Xm=Of-V0(Ch);if(Xm<1)return Ch;var ng=Wm?BE(Wm,0,Xm).join(""):Qd.slice(0,Xm);if(pm===rd)return ng+Ch;if(Wm&&(Xm+=ng.length-Xm),H1(pm)){if(Qd.slice(Xm).search(pm)){var wg,Dg=ng;for(pm.global||(pm=Fv(pm.source,z_(jm.exec(pm))+"g")),pm.lastIndex=0;wg=pm.exec(Dg);)var Rg=wg.index;ng=ng.slice(0,Rg===rd?Xm:Rg)}}else if(Qd.indexOf(ry(pm),Xm)!=Xm){var Jg=ng.lastIndexOf(pm);Jg>-1&&(ng=ng.slice(0,Jg))}return ng+Ch}function dN(Qd){return Qd=z_(Qd),Qd&&Wg.test(Qd)?Qd.replace(vg,rx):Qd}var pN=mv(function(Qd,yf,Of){return Qd+(Of?" ":"")+yf.toUpperCase()}),V1=Gx("toUpperCase");function kC(Qd,yf,Of){return Qd=z_(Qd),yf=Of?rd:yf,yf===rd?ex(Qd)?sx(Qd):fT(Qd):Qd.match(yf)||[]}var MC=T_(function(Qd,yf){try{return zb(Qd,rd,yf)}catch(Of){return U1(Of)?Of:new __(Of)}}),fN=TE(function(Qd,yf){return Qb(yf,function(Of){Of=rb(Of),PE(Qd,Of,F1(Qd[Of],Qd))}),Qd});function hN(Qd){var yf=Qd==null?0:Qd.length,Of=u_();return Qd=yf?K_(Qd,function(Ch){if(typeof Ch[1]!="function")throw new Iy(hd);return[Of(Ch[0]),Ch[1]]}):[],T_(function(Ch){for(var pm=-1;++pmlh)return[];var Of=Mh,Ch=Eb(Qd,Mh);yf=u_(yf),Qd-=Mh;for(var pm=Bg(Ch,yf);++Of0||yf<0)?new c_(Of):(Qd<0?Of=Of.takeRight(-Qd):Qd&&(Of=Of.drop(Qd)),yf!==rd&&(yf=x_(yf),Of=yf<0?Of.dropRight(-yf):Of.take(yf-Qd)),Of)},c_.prototype.takeRightWhile=function(Qd){return this.reverse().takeWhile(Qd).reverse()},c_.prototype.toArray=function(){return this.take(Mh)},Oy(c_.prototype,function(Qd,yf){var Of=/^(?:filter|find|map|reject)|While$/.test(yf),Ch=/^(?:head|last)$/.test(yf),pm=_m[Ch?"take"+(yf=="last"?"Right":""):yf],Nm=Ch||/^find/.test(yf);pm&&(_m.prototype[yf]=function(){var Wm=this.__wrapped__,Xm=Ch?[1]:arguments,ng=Wm instanceof c_,wg=Xm[0],Dg=ng||S_(Wm),Rg=function(N_){var M_=pm.apply(_m,Gy([N_],Xm));return Ch&&Jg?M_[0]:M_};Dg&&Of&&typeof wg=="function"&&wg.length!=1&&(ng=Dg=!1);var Jg=this.__chain__,s_=!!this.__actions__.length,f_=Nm&&!Jg,A_=ng&&!s_;if(!Nm&&Dg){Wm=A_?Wm:new c_(this);var h_=Qd.apply(Wm,Xm);return h_.__actions__.push({func:Qx,args:[Rg],thisArg:rd}),new U_(h_,Jg)}return f_&&A_?Qd.apply(this,Xm):(h_=this.thru(Rg),f_?Ch?h_.value()[0]:h_.value():h_)})}),Qb(["pop","push","shift","sort","splice","unshift"],function(Qd){var yf=DS[Qd],Of=/^(?:push|sort|unshift)$/.test(Qd)?"tap":"thru",Ch=/^(?:pop|shift)$/.test(Qd);_m.prototype[Qd]=function(){var pm=arguments;if(Ch&&!this.__chain__){var Nm=this.value();return yf.apply(S_(Nm)?Nm:[],pm)}return this[Of](function(Wm){return yf.apply(S_(Wm)?Wm:[],pm)})}}),Oy(c_.prototype,function(Qd,yf){var Of=_m[yf];if(Of){var Ch=Of.name+"";F_.call(S0,Ch)||(S0[Ch]=[]),S0[Ch].push({name:yf,func:Of})}}),S0[WS(rd,Gd).name]=[{name:"wrapper",func:rd}],c_.prototype.clone=Ab,c_.prototype.reverse=qv,c_.prototype.value=h1,_m.prototype.at=PA,_m.prototype.chain=LA,_m.prototype.commit=BA,_m.prototype.next=FA,_m.prototype.plant=UA,_m.prototype.reverse=HA,_m.prototype.toJSON=_m.prototype.valueOf=_m.prototype.value=GA,_m.prototype.first=_m.prototype.head,y0&&(_m.prototype[y0]=jA),_m},OE=gT();RE?((RE.exports=OE)._=OE,Nv._=OE):j_._=OE}).call(commonjsGlobal)})(lodash,lodash.exports);var lodashExports=lodash.exports;const _=getDefaultExportFromCjs(lodashExports);var queryString={},strictUriEncode=Ra=>encodeURIComponent(Ra).replace(/[!'()*]/g,qa=>`%${qa.charCodeAt(0).toString(16).toUpperCase()}`),token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(Ra,qa){try{return[decodeURIComponent(Ra.join(""))]}catch{}if(Ra.length===1)return Ra;qa=qa||1;var rd=Ra.slice(0,qa),sd=Ra.slice(qa);return Array.prototype.concat.call([],decodeComponents(rd),decodeComponents(sd))}function decode(Ra){try{return decodeURIComponent(Ra)}catch{for(var qa=Ra.match(singleMatcher)||[],rd=1;rd{if(!(typeof Ra=="string"&&typeof qa=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(qa==="")return[Ra];const rd=Ra.indexOf(qa);return rd===-1?[Ra]:[Ra.slice(0,rd),Ra.slice(rd+qa.length)]},filterObj=function(Ra,qa){for(var rd={},sd=Object.keys(Ra),pd=Array.isArray(qa),fd=0;fdUd==null,hd=Symbol("encodeFragmentIdentifier");function md(Ud){switch(Ud.arrayFormat){case"index":return qd=>(Wd,Kd)=>{const Xd=Wd.length;return Kd===void 0||Ud.skipNull&&Kd===null||Ud.skipEmptyString&&Kd===""?Wd:Kd===null?[...Wd,[vd(qd,Ud),"[",Xd,"]"].join("")]:[...Wd,[vd(qd,Ud),"[",vd(Xd,Ud),"]=",vd(Kd,Ud)].join("")]};case"bracket":return qd=>(Wd,Kd)=>Kd===void 0||Ud.skipNull&&Kd===null||Ud.skipEmptyString&&Kd===""?Wd:Kd===null?[...Wd,[vd(qd,Ud),"[]"].join("")]:[...Wd,[vd(qd,Ud),"[]=",vd(Kd,Ud)].join("")];case"colon-list-separator":return qd=>(Wd,Kd)=>Kd===void 0||Ud.skipNull&&Kd===null||Ud.skipEmptyString&&Kd===""?Wd:Kd===null?[...Wd,[vd(qd,Ud),":list="].join("")]:[...Wd,[vd(qd,Ud),":list=",vd(Kd,Ud)].join("")];case"comma":case"separator":case"bracket-separator":{const qd=Ud.arrayFormat==="bracket-separator"?"[]=":"=";return Wd=>(Kd,Xd)=>Xd===void 0||Ud.skipNull&&Xd===null||Ud.skipEmptyString&&Xd===""?Kd:(Xd=Xd===null?"":Xd,Kd.length===0?[[vd(Wd,Ud),qd,vd(Xd,Ud)].join("")]:[[Kd,vd(Xd,Ud)].join(Ud.arrayFormatSeparator)])}default:return qd=>(Wd,Kd)=>Kd===void 0||Ud.skipNull&&Kd===null||Ud.skipEmptyString&&Kd===""?Wd:Kd===null?[...Wd,vd(qd,Ud)]:[...Wd,[vd(qd,Ud),"=",vd(Kd,Ud)].join("")]}}function gd(Ud){let qd;switch(Ud.arrayFormat){case"index":return(Wd,Kd,Xd)=>{if(qd=/\[(\d*)\]$/.exec(Wd),Wd=Wd.replace(/\[\d*\]$/,""),!qd){Xd[Wd]=Kd;return}Xd[Wd]===void 0&&(Xd[Wd]={}),Xd[Wd][qd[1]]=Kd};case"bracket":return(Wd,Kd,Xd)=>{if(qd=/(\[\])$/.exec(Wd),Wd=Wd.replace(/\[\]$/,""),!qd){Xd[Wd]=Kd;return}if(Xd[Wd]===void 0){Xd[Wd]=[Kd];return}Xd[Wd]=[].concat(Xd[Wd],Kd)};case"colon-list-separator":return(Wd,Kd,Xd)=>{if(qd=/(:list)$/.exec(Wd),Wd=Wd.replace(/:list$/,""),!qd){Xd[Wd]=Kd;return}if(Xd[Wd]===void 0){Xd[Wd]=[Kd];return}Xd[Wd]=[].concat(Xd[Wd],Kd)};case"comma":case"separator":return(Wd,Kd,Xd)=>{const df=typeof Kd=="string"&&Kd.includes(Ud.arrayFormatSeparator),Ef=typeof Kd=="string"&&!df&&Nd(Kd,Ud).includes(Ud.arrayFormatSeparator);Kd=Ef?Nd(Kd,Ud):Kd;const pf=df||Ef?Kd.split(Ud.arrayFormatSeparator).map(mf=>Nd(mf,Ud)):Kd===null?Kd:Nd(Kd,Ud);Xd[Wd]=pf};case"bracket-separator":return(Wd,Kd,Xd)=>{const df=/(\[\])$/.test(Wd);if(Wd=Wd.replace(/\[\]$/,""),!df){Xd[Wd]=Kd&&Nd(Kd,Ud);return}const Ef=Kd===null?[]:Kd.split(Ud.arrayFormatSeparator).map(pf=>Nd(pf,Ud));if(Xd[Wd]===void 0){Xd[Wd]=Ef;return}Xd[Wd]=[].concat(Xd[Wd],Ef)};default:return(Wd,Kd,Xd)=>{if(Xd[Wd]===void 0){Xd[Wd]=Kd;return}Xd[Wd]=[].concat(Xd[Wd],Kd)}}}function yd(Ud){if(typeof Ud!="string"||Ud.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function vd(Ud,qd){return qd.encode?qd.strict?qa(Ud):encodeURIComponent(Ud):Ud}function Nd(Ud,qd){return qd.decode?rd(Ud):Ud}function Md(Ud){return Array.isArray(Ud)?Ud.sort():typeof Ud=="object"?Md(Object.keys(Ud)).sort((qd,Wd)=>Number(qd)-Number(Wd)).map(qd=>Ud[qd]):Ud}function Ld(Ud){const qd=Ud.indexOf("#");return qd!==-1&&(Ud=Ud.slice(0,qd)),Ud}function Fd(Ud){let qd="";const Wd=Ud.indexOf("#");return Wd!==-1&&(qd=Ud.slice(Wd)),qd}function Hd(Ud){Ud=Ld(Ud);const qd=Ud.indexOf("?");return qd===-1?"":Ud.slice(qd+1)}function Vd(Ud,qd){return qd.parseNumbers&&!Number.isNaN(Number(Ud))&&typeof Ud=="string"&&Ud.trim()!==""?Ud=Number(Ud):qd.parseBooleans&&Ud!==null&&(Ud.toLowerCase()==="true"||Ud.toLowerCase()==="false")&&(Ud=Ud.toLowerCase()==="true"),Ud}function Gd(Ud,qd){qd=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},qd),yd(qd.arrayFormatSeparator);const Wd=gd(qd),Kd=Object.create(null);if(typeof Ud!="string"||(Ud=Ud.trim().replace(/^[?#&]/,""),!Ud))return Kd;for(const Xd of Ud.split("&")){if(Xd==="")continue;let[df,Ef]=sd(qd.decode?Xd.replace(/\+/g," "):Xd,"=");Ef=Ef===void 0?null:["comma","separator","bracket-separator"].includes(qd.arrayFormat)?Ef:Nd(Ef,qd),Wd(Nd(df,qd),Ef,Kd)}for(const Xd of Object.keys(Kd)){const df=Kd[Xd];if(typeof df=="object"&&df!==null)for(const Ef of Object.keys(df))df[Ef]=Vd(df[Ef],qd);else Kd[Xd]=Vd(df,qd)}return qd.sort===!1?Kd:(qd.sort===!0?Object.keys(Kd).sort():Object.keys(Kd).sort(qd.sort)).reduce((Xd,df)=>{const Ef=Kd[df];return Ef&&typeof Ef=="object"&&!Array.isArray(Ef)?Xd[df]=Md(Ef):Xd[df]=Ef,Xd},Object.create(null))}Ra.extract=Hd,Ra.parse=Gd,Ra.stringify=(Ud,qd)=>{if(!Ud)return"";qd=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},qd),yd(qd.arrayFormatSeparator);const Wd=Ef=>qd.skipNull&&fd(Ud[Ef])||qd.skipEmptyString&&Ud[Ef]==="",Kd=md(qd),Xd={};for(const Ef of Object.keys(Ud))Wd(Ef)||(Xd[Ef]=Ud[Ef]);const df=Object.keys(Xd);return qd.sort!==!1&&df.sort(qd.sort),df.map(Ef=>{const pf=Ud[Ef];return pf===void 0?"":pf===null?vd(Ef,qd):Array.isArray(pf)?pf.length===0&&qd.arrayFormat==="bracket-separator"?vd(Ef,qd)+"[]":pf.reduce(Kd(Ef),[]).join("&"):vd(Ef,qd)+"="+vd(pf,qd)}).filter(Ef=>Ef.length>0).join("&")},Ra.parseUrl=(Ud,qd)=>{qd=Object.assign({decode:!0},qd);const[Wd,Kd]=sd(Ud,"#");return Object.assign({url:Wd.split("?")[0]||"",query:Gd(Hd(Ud),qd)},qd&&qd.parseFragmentIdentifier&&Kd?{fragmentIdentifier:Nd(Kd,qd)}:{})},Ra.stringifyUrl=(Ud,qd)=>{qd=Object.assign({encode:!0,strict:!0,[hd]:!0},qd);const Wd=Ld(Ud.url).split("?")[0]||"",Kd=Ra.extract(Ud.url),Xd=Ra.parse(Kd,{sort:!1}),df=Object.assign(Xd,Ud.query);let Ef=Ra.stringify(df,qd);Ef&&(Ef=`?${Ef}`);let pf=Fd(Ud.url);return Ud.fragmentIdentifier&&(pf=`#${qd[hd]?vd(Ud.fragmentIdentifier,qd):Ud.fragmentIdentifier}`),`${Wd}${Ef}${pf}`},Ra.pick=(Ud,qd,Wd)=>{Wd=Object.assign({parseFragmentIdentifier:!0,[hd]:!1},Wd);const{url:Kd,query:Xd,fragmentIdentifier:df}=Ra.parseUrl(Ud,Wd);return Ra.stringifyUrl({url:Kd,query:pd(Xd,qd),fragmentIdentifier:df},Wd)},Ra.exclude=(Ud,qd,Wd)=>{const Kd=Array.isArray(qd)?Xd=>!qd.includes(Xd):(Xd,df)=>!qd(Xd,df);return Ra.pick(Ud,Kd,Wd)}})(queryString);const Encoder=TextEncoder;var xml$2={exports:{}},XML_CHARACTER_MAP={"&":"&",'"':""","'":"'","<":"<",">":">"};function escapeForXML$1(Ra){return Ra&&Ra.replace?Ra.replace(/([&"<>'])/g,function(qa,rd){return XML_CHARACTER_MAP[rd]}):Ra}var escapeForXML_1=escapeForXML$1,define_process_default$4={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}},escapeForXML=escapeForXML_1,Stream=streamBrowserify.Stream,DEFAULT_INDENT=" ";function xml$1(Ra,qa){typeof qa!="object"&&(qa={indent:qa});var rd=qa.stream?new Stream:null,sd="",pd=!1,fd=qa.indent?qa.indent===!0?DEFAULT_INDENT:qa.indent:"",hd=!0;function md(Md){hd?define_process_default$4.nextTick(Md):Md()}function gd(Md,Ld){if(Ld!==void 0&&(sd+=Ld),Md&&!pd&&(rd=rd||new Stream,pd=!0),Md&&pd){var Fd=sd;md(function(){rd.emit("data",Fd)}),sd=""}}function yd(Md,Ld){format(gd,resolve(Md,fd,fd?1:0),Ld)}function vd(){if(rd){var Md=sd;md(function(){rd.emit("data",Md),rd.emit("end"),rd.readable=!1,rd.emit("close")})}}function Nd(Md){var Ld=Md.encoding||"UTF-8",Fd={version:"1.0",encoding:Ld};Md.standalone&&(Fd.standalone=Md.standalone),yd({"?xml":{_attr:Fd}}),sd=sd.replace("/>","?>")}return md(function(){hd=!1}),qa.declaration&&Nd(qa.declaration),Ra&&Ra.forEach?Ra.forEach(function(Md,Ld){var Fd;Ld+1===Ra.length&&(Fd=vd),yd(Md,Fd)}):yd(Ra,vd),rd?(rd.readable=!0,rd):sd}function element(){var Ra=Array.prototype.slice.call(arguments),qa={_elem:resolve(Ra)};return qa.push=function(rd){if(!this.append)throw new Error("not assigned to a parent!");var sd=this,pd=this._elem.indent;format(this.append,resolve(rd,pd,this._elem.icount+(pd?1:0)),function(){sd.append(!0)})},qa.close=function(rd){rd!==void 0&&this.push(rd),this.end&&this.end()},qa}function create_indent(Ra,qa){return new Array(qa||0).join(Ra||"")}function resolve(Ra,qa,rd){rd=rd||0;var sd=create_indent(qa,rd),pd,fd=Ra,hd=!1;if(typeof Ra=="object"){var md=Object.keys(Ra);if(pd=md[0],fd=Ra[pd],fd&&fd._elem)return fd._elem.name=pd,fd._elem.icount=rd,fd._elem.indent=qa,fd._elem.indents=sd,fd._elem.interrupt=fd,fd._elem}var gd=[],yd=[],vd;function Nd(Md){var Ld=Object.keys(Md);Ld.forEach(function(Fd){gd.push(attribute(Fd,Md[Fd]))})}switch(typeof fd){case"object":if(fd===null)break;fd._attr&&Nd(fd._attr),fd._cdata&&yd.push(("/g,"]]]]>")+"]]>"),fd.forEach&&(vd=!1,yd.push(""),fd.forEach(function(Md){if(typeof Md=="object"){var Ld=Object.keys(Md)[0];Ld=="_attr"?Nd(Md._attr):yd.push(resolve(Md,qa,rd+1))}else yd.pop(),vd=!0,yd.push(escapeForXML(Md))}),vd||yd.push(""));break;default:yd.push(escapeForXML(fd))}return{name:pd,interrupt:hd,attributes:gd,content:yd,icount:rd,indents:sd,indent:qa}}function format(Ra,qa,rd){if(typeof qa!="object")return Ra(!1,qa);var sd=qa.interrupt?1:qa.content.length;function pd(){for(;qa.content.length;){var hd=qa.content.shift();if(hd!==void 0){if(fd(hd))return;format(Ra,hd)}}Ra(!1,(sd>1?qa.indents:"")+(qa.name?"":"")+(qa.indent&&!rd?` -`:"")),rd&&rd()}function fd(hd){return hd.interrupt?(hd.interrupt.append=Ra,hd.interrupt.end=pd,hd.interrupt=!1,Ra(!0),!0):!1}if(Ra(!1,qa.indents+(qa.name?"<"+qa.name:"")+(qa.attributes.length?" "+qa.attributes.join(" "):"")+(sd?qa.name?">":"":qa.name?"/>":"")+(qa.indent&&sd>1?` -`:"")),!sd)return Ra(!1,qa.indent?` -`:"");fd(qa)||pd()}function attribute(Ra,qa){return Ra+'="'+escapeForXML(qa)+'"'}xml$2.exports=xml$1;xml$2.exports.element=xml$2.exports.Element=element;var xmlExports=xml$2.exports;const Xml=getDefaultExportFromCjs(xmlExports);var xml2js={},defaults={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,(function(){defaults.defaults={"0.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:""},"0.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(commonjsGlobal)),defaults}var builder={},lib$2={},Utility={},hasRequiredUtility;function requireUtility(){return hasRequiredUtility||(hasRequiredUtility=1,(function(){var Ra,qa,rd,sd,pd,fd,hd,md=[].slice,gd={}.hasOwnProperty;Ra=function(){var yd,vd,Nd,Md,Ld,Fd;if(Fd=arguments[0],Ld=2<=arguments.length?md.call(arguments,1):[],pd(Object.assign))Object.assign.apply(null,arguments);else for(yd=0,Nd=Ld.length;yd":"attribute: {"+rd+"}, parent: <"+this.parent.name+">"},qa.prototype.isEqualNode=function(rd){return!(rd.namespaceURI!==this.namespaceURI||rd.prefix!==this.prefix||rd.localName!==this.localName||rd.value!==this.value)},qa}()}).call(commonjsGlobal)),XMLAttribute.exports}var XMLNamedNodeMap={exports:{}},hasRequiredXMLNamedNodeMap;function requireXMLNamedNodeMap(){return hasRequiredXMLNamedNodeMap||(hasRequiredXMLNamedNodeMap=1,(function(){XMLNamedNodeMap.exports=function(){function Ra(qa){this.nodes=qa}return Object.defineProperty(Ra.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),Ra.prototype.clone=function(){return this.nodes=null},Ra.prototype.getNamedItem=function(qa){return this.nodes[qa]},Ra.prototype.setNamedItem=function(qa){var rd;return rd=this.nodes[qa.nodeName],this.nodes[qa.nodeName]=qa,rd||null},Ra.prototype.removeNamedItem=function(qa){var rd;return rd=this.nodes[qa],delete this.nodes[qa],rd||null},Ra.prototype.item=function(qa){return this.nodes[Object.keys(this.nodes)[qa]]||null},Ra.prototype.getNamedItemNS=function(qa,rd){throw new Error("This DOM method is not implemented.")},Ra.prototype.setNamedItemNS=function(qa){throw new Error("This DOM method is not implemented.")},Ra.prototype.removeNamedItemNS=function(qa,rd){throw new Error("This DOM method is not implemented.")},Ra}()}).call(commonjsGlobal)),XMLNamedNodeMap.exports}var hasRequiredXMLElement;function requireXMLElement(){return hasRequiredXMLElement||(hasRequiredXMLElement=1,(function(){var Ra,qa,rd,sd,pd,fd,hd,md,gd=function(vd,Nd){for(var Md in Nd)yd.call(Nd,Md)&&(vd[Md]=Nd[Md]);function Ld(){this.constructor=vd}return Ld.prototype=Nd.prototype,vd.prototype=new Ld,vd.__super__=Nd.prototype,vd},yd={}.hasOwnProperty;md=requireUtility(),hd=md.isObject,fd=md.isFunction,pd=md.getValue,sd=requireXMLNode(),Ra=requireNodeType(),qa=requireXMLAttribute(),rd=requireXMLNamedNodeMap(),XMLElement.exports=function(vd){gd(Nd,vd);function Nd(Md,Ld,Fd){var Hd,Vd,Gd,Ud;if(Nd.__super__.constructor.call(this,Md),Ld==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(Ld),this.type=Ra.Element,this.attribs={},this.schemaTypeInfo=null,Fd!=null&&this.attribute(Fd),Md.type===Ra.Document&&(this.isRoot=!0,this.documentObject=Md,Md.rootObject=this,Md.children)){for(Ud=Md.children,Vd=0,Gd=Ud.length;Vd=Hd;Ld=0<=Hd?++Fd:--Fd)if(!this.attribs[Ld].isEqualNode(Md.attribs[Ld]))return!1;return!0},Nd}(sd)}).call(commonjsGlobal)),XMLElement.exports}var XMLCData={exports:{}},XMLCharacterData={exports:{}},hasRequiredXMLCharacterData;function requireXMLCharacterData(){return hasRequiredXMLCharacterData||(hasRequiredXMLCharacterData=1,(function(){var Ra,qa=function(sd,pd){for(var fd in pd)rd.call(pd,fd)&&(sd[fd]=pd[fd]);function hd(){this.constructor=sd}return hd.prototype=pd.prototype,sd.prototype=new hd,sd.__super__=pd.prototype,sd},rd={}.hasOwnProperty;Ra=requireXMLNode(),XMLCharacterData.exports=function(sd){qa(pd,sd);function pd(fd){pd.__super__.constructor.call(this,fd),this.value=""}return Object.defineProperty(pd.prototype,"data",{get:function(){return this.value},set:function(fd){return this.value=fd||""}}),Object.defineProperty(pd.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(pd.prototype,"textContent",{get:function(){return this.value},set:function(fd){return this.value=fd||""}}),pd.prototype.clone=function(){return Object.create(this)},pd.prototype.substringData=function(fd,hd){throw new Error("This DOM method is not implemented."+this.debugInfo())},pd.prototype.appendData=function(fd){throw new Error("This DOM method is not implemented."+this.debugInfo())},pd.prototype.insertData=function(fd,hd){throw new Error("This DOM method is not implemented."+this.debugInfo())},pd.prototype.deleteData=function(fd,hd){throw new Error("This DOM method is not implemented."+this.debugInfo())},pd.prototype.replaceData=function(fd,hd,md){throw new Error("This DOM method is not implemented."+this.debugInfo())},pd.prototype.isEqualNode=function(fd){return!(!pd.__super__.isEqualNode.apply(this,arguments).isEqualNode(fd)||fd.data!==this.data)},pd}(Ra)}).call(commonjsGlobal)),XMLCharacterData.exports}var hasRequiredXMLCData;function requireXMLCData(){return hasRequiredXMLCData||(hasRequiredXMLCData=1,(function(){var Ra,qa,rd=function(pd,fd){for(var hd in fd)sd.call(fd,hd)&&(pd[hd]=fd[hd]);function md(){this.constructor=pd}return md.prototype=fd.prototype,pd.prototype=new md,pd.__super__=fd.prototype,pd},sd={}.hasOwnProperty;Ra=requireNodeType(),qa=requireXMLCharacterData(),XMLCData.exports=function(pd){rd(fd,pd);function fd(hd,md){if(fd.__super__.constructor.call(this,hd),md==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=Ra.CData,this.value=this.stringify.cdata(md)}return fd.prototype.clone=function(){return Object.create(this)},fd.prototype.toString=function(hd){return this.options.writer.cdata(this,this.options.writer.filterOptions(hd))},fd}(qa)}).call(commonjsGlobal)),XMLCData.exports}var XMLComment={exports:{}},hasRequiredXMLComment;function requireXMLComment(){return hasRequiredXMLComment||(hasRequiredXMLComment=1,(function(){var Ra,qa,rd=function(pd,fd){for(var hd in fd)sd.call(fd,hd)&&(pd[hd]=fd[hd]);function md(){this.constructor=pd}return md.prototype=fd.prototype,pd.prototype=new md,pd.__super__=fd.prototype,pd},sd={}.hasOwnProperty;Ra=requireNodeType(),qa=requireXMLCharacterData(),XMLComment.exports=function(pd){rd(fd,pd);function fd(hd,md){if(fd.__super__.constructor.call(this,hd),md==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=Ra.Comment,this.value=this.stringify.comment(md)}return fd.prototype.clone=function(){return Object.create(this)},fd.prototype.toString=function(hd){return this.options.writer.comment(this,this.options.writer.filterOptions(hd))},fd}(qa)}).call(commonjsGlobal)),XMLComment.exports}var XMLDeclaration={exports:{}},hasRequiredXMLDeclaration;function requireXMLDeclaration(){return hasRequiredXMLDeclaration||(hasRequiredXMLDeclaration=1,(function(){var Ra,qa,rd,sd=function(fd,hd){for(var md in hd)pd.call(hd,md)&&(fd[md]=hd[md]);function gd(){this.constructor=fd}return gd.prototype=hd.prototype,fd.prototype=new gd,fd.__super__=hd.prototype,fd},pd={}.hasOwnProperty;rd=requireUtility().isObject,qa=requireXMLNode(),Ra=requireNodeType(),XMLDeclaration.exports=function(fd){sd(hd,fd);function hd(md,gd,yd,vd){var Nd;hd.__super__.constructor.call(this,md),rd(gd)&&(Nd=gd,gd=Nd.version,yd=Nd.encoding,vd=Nd.standalone),gd||(gd="1.0"),this.type=Ra.Declaration,this.version=this.stringify.xmlVersion(gd),yd!=null&&(this.encoding=this.stringify.xmlEncoding(yd)),vd!=null&&(this.standalone=this.stringify.xmlStandalone(vd))}return hd.prototype.toString=function(md){return this.options.writer.declaration(this,this.options.writer.filterOptions(md))},hd}(qa)}).call(commonjsGlobal)),XMLDeclaration.exports}var XMLDocType={exports:{}},XMLDTDAttList={exports:{}},hasRequiredXMLDTDAttList;function requireXMLDTDAttList(){return hasRequiredXMLDTDAttList||(hasRequiredXMLDTDAttList=1,(function(){var Ra,qa,rd=function(pd,fd){for(var hd in fd)sd.call(fd,hd)&&(pd[hd]=fd[hd]);function md(){this.constructor=pd}return md.prototype=fd.prototype,pd.prototype=new md,pd.__super__=fd.prototype,pd},sd={}.hasOwnProperty;qa=requireXMLNode(),Ra=requireNodeType(),XMLDTDAttList.exports=function(pd){rd(fd,pd);function fd(hd,md,gd,yd,vd,Nd){if(fd.__super__.constructor.call(this,hd),md==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(gd==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(md));if(!yd)throw new Error("Missing DTD attribute type. "+this.debugInfo(md));if(!vd)throw new Error("Missing DTD attribute default. "+this.debugInfo(md));if(vd.indexOf("#")!==0&&(vd="#"+vd),!vd.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(md));if(Nd&&!vd.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(md));this.elementName=this.stringify.name(md),this.type=Ra.AttributeDeclaration,this.attributeName=this.stringify.name(gd),this.attributeType=this.stringify.dtdAttType(yd),Nd&&(this.defaultValue=this.stringify.dtdAttDefault(Nd)),this.defaultValueType=vd}return fd.prototype.toString=function(hd){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(hd))},fd}(qa)}).call(commonjsGlobal)),XMLDTDAttList.exports}var XMLDTDEntity={exports:{}},hasRequiredXMLDTDEntity;function requireXMLDTDEntity(){return hasRequiredXMLDTDEntity||(hasRequiredXMLDTDEntity=1,(function(){var Ra,qa,rd,sd=function(fd,hd){for(var md in hd)pd.call(hd,md)&&(fd[md]=hd[md]);function gd(){this.constructor=fd}return gd.prototype=hd.prototype,fd.prototype=new gd,fd.__super__=hd.prototype,fd},pd={}.hasOwnProperty;rd=requireUtility().isObject,qa=requireXMLNode(),Ra=requireNodeType(),XMLDTDEntity.exports=function(fd){sd(hd,fd);function hd(md,gd,yd,vd){if(hd.__super__.constructor.call(this,md),yd==null)throw new Error("Missing DTD entity name. "+this.debugInfo(yd));if(vd==null)throw new Error("Missing DTD entity value. "+this.debugInfo(yd));if(this.pe=!!gd,this.name=this.stringify.name(yd),this.type=Ra.EntityDeclaration,!rd(vd))this.value=this.stringify.dtdEntityValue(vd),this.internal=!0;else{if(!vd.pubID&&!vd.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(yd));if(vd.pubID&&!vd.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(yd));if(this.internal=!1,vd.pubID!=null&&(this.pubID=this.stringify.dtdPubID(vd.pubID)),vd.sysID!=null&&(this.sysID=this.stringify.dtdSysID(vd.sysID)),vd.nData!=null&&(this.nData=this.stringify.dtdNData(vd.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(yd))}}return Object.defineProperty(hd.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(hd.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(hd.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(hd.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(hd.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(hd.prototype,"xmlVersion",{get:function(){return null}}),hd.prototype.toString=function(md){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(md))},hd}(qa)}).call(commonjsGlobal)),XMLDTDEntity.exports}var XMLDTDElement={exports:{}},hasRequiredXMLDTDElement;function requireXMLDTDElement(){return hasRequiredXMLDTDElement||(hasRequiredXMLDTDElement=1,(function(){var Ra,qa,rd=function(pd,fd){for(var hd in fd)sd.call(fd,hd)&&(pd[hd]=fd[hd]);function md(){this.constructor=pd}return md.prototype=fd.prototype,pd.prototype=new md,pd.__super__=fd.prototype,pd},sd={}.hasOwnProperty;qa=requireXMLNode(),Ra=requireNodeType(),XMLDTDElement.exports=function(pd){rd(fd,pd);function fd(hd,md,gd){if(fd.__super__.constructor.call(this,hd),md==null)throw new Error("Missing DTD element name. "+this.debugInfo());gd||(gd="(#PCDATA)"),Array.isArray(gd)&&(gd="("+gd.join(",")+")"),this.name=this.stringify.name(md),this.type=Ra.ElementDeclaration,this.value=this.stringify.dtdElementValue(gd)}return fd.prototype.toString=function(hd){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(hd))},fd}(qa)}).call(commonjsGlobal)),XMLDTDElement.exports}var XMLDTDNotation={exports:{}},hasRequiredXMLDTDNotation;function requireXMLDTDNotation(){return hasRequiredXMLDTDNotation||(hasRequiredXMLDTDNotation=1,(function(){var Ra,qa,rd=function(pd,fd){for(var hd in fd)sd.call(fd,hd)&&(pd[hd]=fd[hd]);function md(){this.constructor=pd}return md.prototype=fd.prototype,pd.prototype=new md,pd.__super__=fd.prototype,pd},sd={}.hasOwnProperty;qa=requireXMLNode(),Ra=requireNodeType(),XMLDTDNotation.exports=function(pd){rd(fd,pd);function fd(hd,md,gd){if(fd.__super__.constructor.call(this,hd),md==null)throw new Error("Missing DTD notation name. "+this.debugInfo(md));if(!gd.pubID&&!gd.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(md));this.name=this.stringify.name(md),this.type=Ra.NotationDeclaration,gd.pubID!=null&&(this.pubID=this.stringify.dtdPubID(gd.pubID)),gd.sysID!=null&&(this.sysID=this.stringify.dtdSysID(gd.sysID))}return Object.defineProperty(fd.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(fd.prototype,"systemId",{get:function(){return this.sysID}}),fd.prototype.toString=function(hd){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(hd))},fd}(qa)}).call(commonjsGlobal)),XMLDTDNotation.exports}var hasRequiredXMLDocType;function requireXMLDocType(){return hasRequiredXMLDocType||(hasRequiredXMLDocType=1,(function(){var Ra,qa,rd,sd,pd,fd,hd,md,gd=function(vd,Nd){for(var Md in Nd)yd.call(Nd,Md)&&(vd[Md]=Nd[Md]);function Ld(){this.constructor=vd}return Ld.prototype=Nd.prototype,vd.prototype=new Ld,vd.__super__=Nd.prototype,vd},yd={}.hasOwnProperty;md=requireUtility().isObject,hd=requireXMLNode(),Ra=requireNodeType(),qa=requireXMLDTDAttList(),sd=requireXMLDTDEntity(),rd=requireXMLDTDElement(),pd=requireXMLDTDNotation(),fd=requireXMLNamedNodeMap(),XMLDocType.exports=function(vd){gd(Nd,vd);function Nd(Md,Ld,Fd){var Hd,Vd,Gd,Ud,qd,Wd;if(Nd.__super__.constructor.call(this,Md),this.type=Ra.DocType,Md.children){for(Ud=Md.children,Vd=0,Gd=Ud.length;Vd":(Kd=this.parent)!=null&&Kd.name?"node: <"+qd+">, parent: <"+this.parent.name+">":"node: <"+qd+">"},Ud.prototype.ele=function(qd,Wd,Kd){return this.element(qd,Wd,Kd)},Ud.prototype.nod=function(qd,Wd,Kd){return this.node(qd,Wd,Kd)},Ud.prototype.txt=function(qd){return this.text(qd)},Ud.prototype.dat=function(qd){return this.cdata(qd)},Ud.prototype.com=function(qd){return this.comment(qd)},Ud.prototype.ins=function(qd,Wd){return this.instruction(qd,Wd)},Ud.prototype.doc=function(){return this.document()},Ud.prototype.dec=function(qd,Wd,Kd){return this.declaration(qd,Wd,Kd)},Ud.prototype.e=function(qd,Wd,Kd){return this.element(qd,Wd,Kd)},Ud.prototype.n=function(qd,Wd,Kd){return this.node(qd,Wd,Kd)},Ud.prototype.t=function(qd){return this.text(qd)},Ud.prototype.d=function(qd){return this.cdata(qd)},Ud.prototype.c=function(qd){return this.comment(qd)},Ud.prototype.r=function(qd){return this.raw(qd)},Ud.prototype.i=function(qd,Wd){return this.instruction(qd,Wd)},Ud.prototype.u=function(){return this.up()},Ud.prototype.importXMLBuilder=function(qd){return this.importDocument(qd)},Ud.prototype.replaceChild=function(qd,Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.removeChild=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.appendChild=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.hasChildNodes=function(){return this.children.length!==0},Ud.prototype.cloneNode=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.isSupported=function(qd,Wd){return!0},Ud.prototype.hasAttributes=function(){return this.attribs.length!==0},Ud.prototype.compareDocumentPosition=function(qd){var Wd,Kd;return Wd=this,Wd===qd?0:this.document()!==qd.document()?(Kd=Ra.Disconnected|Ra.ImplementationSpecific,Math.random()<.5?Kd|=Ra.Preceding:Kd|=Ra.Following,Kd):Wd.isAncestor(qd)?Ra.Contains|Ra.Preceding:Wd.isDescendant(qd)?Ra.Contains|Ra.Following:Wd.isPreceding(qd)?Ra.Preceding:Ra.Following},Ud.prototype.isSameNode=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.lookupPrefix=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.isDefaultNamespace=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.lookupNamespaceURI=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.isEqualNode=function(qd){var Wd,Kd,Xd;if(qd.nodeType!==this.nodeType||qd.children.length!==this.children.length)return!1;for(Wd=Kd=0,Xd=this.children.length-1;0<=Xd?Kd<=Xd:Kd>=Xd;Wd=0<=Xd?++Kd:--Kd)if(!this.children[Wd].isEqualNode(qd.children[Wd]))return!1;return!0},Ud.prototype.getFeature=function(qd,Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.setUserData=function(qd,Wd,Kd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.getUserData=function(qd){throw new Error("This DOM method is not implemented."+this.debugInfo())},Ud.prototype.contains=function(qd){return qd?qd===this||this.isDescendant(qd):!1},Ud.prototype.isDescendant=function(qd){var Wd,Kd,Xd,df,Ef;for(Ef=this.children,Xd=0,df=Ef.length;XdKd},Ud.prototype.treePosition=function(qd){var Wd,Kd;return Kd=0,Wd=!1,this.foreachTreeNode(this.document(),function(Xd){if(Kd++,!Wd&&Xd===qd)return Wd=!0}),Wd?Kd:-1},Ud.prototype.foreachTreeNode=function(qd,Wd){var Kd,Xd,df,Ef,pf;for(qd||(qd=this.document()),Ef=qd.children,Xd=0,df=Ef.length;Xd","]]]]>"),this.assertLegalChar(sd))},rd.prototype.comment=function(sd){if(this.options.noValidation)return sd;if(sd=""+sd||"",sd.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+sd);return this.assertLegalChar(sd)},rd.prototype.raw=function(sd){return this.options.noValidation?sd:""+sd||""},rd.prototype.attValue=function(sd){return this.options.noValidation?sd:this.assertLegalChar(this.attEscape(sd=""+sd||""))},rd.prototype.insTarget=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.insValue=function(sd){if(this.options.noValidation)return sd;if(sd=""+sd||"",sd.match(/\?>/))throw new Error("Invalid processing instruction value: "+sd);return this.assertLegalChar(sd)},rd.prototype.xmlVersion=function(sd){if(this.options.noValidation)return sd;if(sd=""+sd||"",!sd.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+sd);return sd},rd.prototype.xmlEncoding=function(sd){if(this.options.noValidation)return sd;if(sd=""+sd||"",!sd.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+sd);return this.assertLegalChar(sd)},rd.prototype.xmlStandalone=function(sd){return this.options.noValidation?sd:sd?"yes":"no"},rd.prototype.dtdPubID=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.dtdSysID=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.dtdElementValue=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.dtdAttType=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.dtdAttDefault=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.dtdEntityValue=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.dtdNData=function(sd){return this.options.noValidation?sd:this.assertLegalChar(""+sd||"")},rd.prototype.convertAttKey="@",rd.prototype.convertPIKey="?",rd.prototype.convertTextKey="#text",rd.prototype.convertCDataKey="#cdata",rd.prototype.convertCommentKey="#comment",rd.prototype.convertRawKey="#raw",rd.prototype.assertLegalChar=function(sd){var pd,fd;if(this.options.noValidation)return sd;if(pd="",this.options.version==="1.0"){if(pd=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fd=sd.match(pd))throw new Error("Invalid character in string: "+sd+" at index "+fd.index)}else if(this.options.version==="1.1"&&(pd=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,fd=sd.match(pd)))throw new Error("Invalid character in string: "+sd+" at index "+fd.index);return sd},rd.prototype.assertLegalName=function(sd){var pd;if(this.options.noValidation)return sd;if(this.assertLegalChar(sd),pd=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!sd.match(pd))throw new Error("Invalid character in name");return sd},rd.prototype.textEscape=function(sd){var pd;return this.options.noValidation?sd:(pd=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,sd.replace(pd,"&").replace(//g,">").replace(/\r/g," "))},rd.prototype.attEscape=function(sd){var pd;return this.options.noValidation?sd:(pd=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,sd.replace(pd,"&").replace(/0)?new Array(gd).join(hd.indent):""},pd.prototype.endline=function(fd,hd,md){return!hd.pretty||hd.suppressPrettyCount?"":hd.newline},pd.prototype.attribute=function(fd,hd,md){var gd;return this.openAttribute(fd,hd,md),gd=" "+fd.name+'="'+fd.value+'"',this.closeAttribute(fd,hd,md),gd},pd.prototype.cdata=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+""+this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.comment=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+""+this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.declaration=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+"",gd+=this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.docType=function(fd,hd,md){var gd,yd,vd,Nd,Md;if(md||(md=0),this.openNode(fd,hd,md),hd.state=qa.OpenTag,Nd=this.indent(fd,hd,md),Nd+="0){for(Nd+=" [",Nd+=this.endline(fd,hd,md),hd.state=qa.InsideTag,Md=fd.children,yd=0,vd=Md.length;yd",Nd+=this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),Nd},pd.prototype.element=function(fd,hd,md){var gd,yd,vd,Nd,Md,Ld,Fd,Hd,Vd,Gd,Ud,qd,Wd,Kd;md||(md=0),Gd=!1,Ud="",this.openNode(fd,hd,md),hd.state=qa.OpenTag,Ud+=this.indent(fd,hd,md)+"<"+fd.name,qd=fd.attribs;for(Vd in qd)sd.call(qd,Vd)&&(gd=qd[Vd],Ud+=this.attribute(gd,hd,md));if(vd=fd.children.length,Nd=vd===0?null:fd.children[0],vd===0||fd.children.every(function(Xd){return(Xd.type===Ra.Text||Xd.type===Ra.Raw)&&Xd.value===""}))hd.allowEmpty?(Ud+=">",hd.state=qa.CloseTag,Ud+=""+this.endline(fd,hd,md)):(hd.state=qa.CloseTag,Ud+=hd.spaceBeforeSlash+"/>"+this.endline(fd,hd,md));else if(hd.pretty&&vd===1&&(Nd.type===Ra.Text||Nd.type===Ra.Raw)&&Nd.value!=null)Ud+=">",hd.state=qa.InsideTag,hd.suppressPrettyCount++,Gd=!0,Ud+=this.writeChildNode(Nd,hd,md+1),hd.suppressPrettyCount--,Gd=!1,hd.state=qa.CloseTag,Ud+=""+this.endline(fd,hd,md);else{if(hd.dontPrettyTextNodes){for(Wd=fd.children,Md=0,Fd=Wd.length;Md"+this.endline(fd,hd,md),hd.state=qa.InsideTag,Kd=fd.children,Ld=0,Hd=Kd.length;Ld",Gd&&hd.suppressPrettyCount--,Ud+=this.endline(fd,hd,md),hd.state=qa.None}return this.closeNode(fd,hd,md),Ud},pd.prototype.writeChildNode=function(fd,hd,md){switch(fd.type){case Ra.CData:return this.cdata(fd,hd,md);case Ra.Comment:return this.comment(fd,hd,md);case Ra.Element:return this.element(fd,hd,md);case Ra.Raw:return this.raw(fd,hd,md);case Ra.Text:return this.text(fd,hd,md);case Ra.ProcessingInstruction:return this.processingInstruction(fd,hd,md);case Ra.Dummy:return"";case Ra.Declaration:return this.declaration(fd,hd,md);case Ra.DocType:return this.docType(fd,hd,md);case Ra.AttributeDeclaration:return this.dtdAttList(fd,hd,md);case Ra.ElementDeclaration:return this.dtdElement(fd,hd,md);case Ra.EntityDeclaration:return this.dtdEntity(fd,hd,md);case Ra.NotationDeclaration:return this.dtdNotation(fd,hd,md);default:throw new Error("Unknown XML node type: "+fd.constructor.name)}},pd.prototype.processingInstruction=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+"",gd+=this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.raw=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md),hd.state=qa.InsideTag,gd+=fd.value,hd.state=qa.CloseTag,gd+=this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.text=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md),hd.state=qa.InsideTag,gd+=fd.value,hd.state=qa.CloseTag,gd+=this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.dtdAttList=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+""+this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.dtdElement=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+""+this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.dtdEntity=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+""+this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.dtdNotation=function(fd,hd,md){var gd;return this.openNode(fd,hd,md),hd.state=qa.OpenTag,gd=this.indent(fd,hd,md)+""+this.endline(fd,hd,md),hd.state=qa.None,this.closeNode(fd,hd,md),gd},pd.prototype.openNode=function(fd,hd,md){},pd.prototype.closeNode=function(fd,hd,md){},pd.prototype.openAttribute=function(fd,hd,md){},pd.prototype.closeAttribute=function(fd,hd,md){},pd}()}).call(commonjsGlobal)),XMLWriterBase.exports}var hasRequiredXMLStringWriter;function requireXMLStringWriter(){return hasRequiredXMLStringWriter||(hasRequiredXMLStringWriter=1,(function(){var Ra,qa=function(sd,pd){for(var fd in pd)rd.call(pd,fd)&&(sd[fd]=pd[fd]);function hd(){this.constructor=sd}return hd.prototype=pd.prototype,sd.prototype=new hd,sd.__super__=pd.prototype,sd},rd={}.hasOwnProperty;Ra=requireXMLWriterBase(),XMLStringWriter.exports=function(sd){qa(pd,sd);function pd(fd){pd.__super__.constructor.call(this,fd)}return pd.prototype.document=function(fd,hd){var md,gd,yd,vd,Nd;for(hd=this.filterOptions(hd),vd="",Nd=fd.children,gd=0,yd=Nd.length;gd=0;)this.up();return this.onEnd()},Ef.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Ef.prototype.openNode=function(pf){var mf,_f,xf,Cf;if(!pf.isOpen){if(!this.root&&this.currentLevel===0&&pf.type===Ra.Element&&(this.root=pf),_f="",pf.type===Ra.Element){this.writerOptions.state=qa.OpenTag,_f=this.writer.indent(pf,this.writerOptions,this.currentLevel)+"<"+pf.name,Cf=pf.attribs;for(xf in Cf)df.call(Cf,xf)&&(mf=Cf[xf],_f+=this.writer.attribute(mf,this.writerOptions,this.currentLevel));_f+=(pf.children?">":"/>")+this.writer.endline(pf,this.writerOptions,this.currentLevel),this.writerOptions.state=qa.InsideTag}else this.writerOptions.state=qa.OpenTag,_f=this.writer.indent(pf,this.writerOptions,this.currentLevel)+""),_f+=this.writer.endline(pf,this.writerOptions,this.currentLevel);return this.onData(_f,this.currentLevel),pf.isOpen=!0}},Ef.prototype.closeNode=function(pf){var mf;if(!pf.isClosed)return mf="",this.writerOptions.state=qa.CloseTag,pf.type===Ra.Element?mf=this.writer.indent(pf,this.writerOptions,this.currentLevel)+""+this.writer.endline(pf,this.writerOptions,this.currentLevel):mf=this.writer.indent(pf,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(pf,this.writerOptions,this.currentLevel),this.writerOptions.state=qa.None,this.onData(mf,this.currentLevel),pf.isClosed=!0},Ef.prototype.onData=function(pf,mf){return this.documentStarted=!0,this.onDataCallback(pf,mf+1)},Ef.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Ef.prototype.debugInfo=function(pf){return pf==null?"":"node: <"+pf+">"},Ef.prototype.ele=function(){return this.element.apply(this,arguments)},Ef.prototype.nod=function(pf,mf,_f){return this.node(pf,mf,_f)},Ef.prototype.txt=function(pf){return this.text(pf)},Ef.prototype.dat=function(pf){return this.cdata(pf)},Ef.prototype.com=function(pf){return this.comment(pf)},Ef.prototype.ins=function(pf,mf){return this.instruction(pf,mf)},Ef.prototype.dec=function(pf,mf,_f){return this.declaration(pf,mf,_f)},Ef.prototype.dtd=function(pf,mf,_f){return this.doctype(pf,mf,_f)},Ef.prototype.e=function(pf,mf,_f){return this.element(pf,mf,_f)},Ef.prototype.n=function(pf,mf,_f){return this.node(pf,mf,_f)},Ef.prototype.t=function(pf){return this.text(pf)},Ef.prototype.d=function(pf){return this.cdata(pf)},Ef.prototype.c=function(pf){return this.comment(pf)},Ef.prototype.r=function(pf){return this.raw(pf)},Ef.prototype.i=function(pf,mf){return this.instruction(pf,mf)},Ef.prototype.att=function(){return this.currentNode&&this.currentNode.type===Ra.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ef.prototype.a=function(){return this.currentNode&&this.currentNode.type===Ra.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Ef.prototype.ent=function(pf,mf){return this.entity(pf,mf)},Ef.prototype.pent=function(pf,mf){return this.pEntity(pf,mf)},Ef.prototype.not=function(pf,mf){return this.notation(pf,mf)},Ef}()}).call(commonjsGlobal)),XMLDocumentCB.exports}var XMLStreamWriter={exports:{}},hasRequiredXMLStreamWriter;function requireXMLStreamWriter(){return hasRequiredXMLStreamWriter||(hasRequiredXMLStreamWriter=1,(function(){var Ra,qa,rd,sd=function(fd,hd){for(var md in hd)pd.call(hd,md)&&(fd[md]=hd[md]);function gd(){this.constructor=fd}return gd.prototype=hd.prototype,fd.prototype=new gd,fd.__super__=hd.prototype,fd},pd={}.hasOwnProperty;Ra=requireNodeType(),rd=requireXMLWriterBase(),qa=requireWriterState(),XMLStreamWriter.exports=function(fd){sd(hd,fd);function hd(md,gd){this.stream=md,hd.__super__.constructor.call(this,gd)}return hd.prototype.endline=function(md,gd,yd){return md.isLastRootNode&&gd.state===qa.CloseTag?"":hd.__super__.endline.call(this,md,gd,yd)},hd.prototype.document=function(md,gd){var yd,vd,Nd,Md,Ld,Fd,Hd,Vd,Gd;for(Hd=md.children,vd=Nd=0,Ld=Hd.length;Nd0){for(this.stream.write(" ["),this.stream.write(this.endline(md,gd,yd)),gd.state=qa.InsideTag,Ld=md.children,Nd=0,Md=Ld.length;Nd"),this.stream.write(this.endline(md,gd,yd)),gd.state=qa.None,this.closeNode(md,gd,yd)},hd.prototype.element=function(md,gd,yd){var vd,Nd,Md,Ld,Fd,Hd,Vd,Gd,Ud;yd||(yd=0),this.openNode(md,gd,yd),gd.state=qa.OpenTag,this.stream.write(this.indent(md,gd,yd)+"<"+md.name),Gd=md.attribs;for(Vd in Gd)pd.call(Gd,Vd)&&(vd=Gd[Vd],this.attribute(vd,gd,yd));if(Md=md.children.length,Ld=Md===0?null:md.children[0],Md===0||md.children.every(function(qd){return(qd.type===Ra.Text||qd.type===Ra.Raw)&&qd.value===""}))gd.allowEmpty?(this.stream.write(">"),gd.state=qa.CloseTag,this.stream.write("")):(gd.state=qa.CloseTag,this.stream.write(gd.spaceBeforeSlash+"/>"));else if(gd.pretty&&Md===1&&(Ld.type===Ra.Text||Ld.type===Ra.Raw)&&Ld.value!=null)this.stream.write(">"),gd.state=qa.InsideTag,gd.suppressPrettyCount++,this.writeChildNode(Ld,gd,yd+1),gd.suppressPrettyCount--,gd.state=qa.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(md,gd,yd)),gd.state=qa.InsideTag,Ud=md.children,Fd=0,Hd=Ud.length;Fd")}return this.stream.write(this.endline(md,gd,yd)),gd.state=qa.None,this.closeNode(md,gd,yd)},hd.prototype.processingInstruction=function(md,gd,yd){return this.stream.write(hd.__super__.processingInstruction.call(this,md,gd,yd))},hd.prototype.raw=function(md,gd,yd){return this.stream.write(hd.__super__.raw.call(this,md,gd,yd))},hd.prototype.text=function(md,gd,yd){return this.stream.write(hd.__super__.text.call(this,md,gd,yd))},hd.prototype.dtdAttList=function(md,gd,yd){return this.stream.write(hd.__super__.dtdAttList.call(this,md,gd,yd))},hd.prototype.dtdElement=function(md,gd,yd){return this.stream.write(hd.__super__.dtdElement.call(this,md,gd,yd))},hd.prototype.dtdEntity=function(md,gd,yd){return this.stream.write(hd.__super__.dtdEntity.call(this,md,gd,yd))},hd.prototype.dtdNotation=function(md,gd,yd){return this.stream.write(hd.__super__.dtdNotation.call(this,md,gd,yd))},hd}(rd)}).call(commonjsGlobal)),XMLStreamWriter.exports}var hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,(function(){var Ra,qa,rd,sd,pd,fd,hd,md,gd,yd;yd=requireUtility(),md=yd.assign,gd=yd.isFunction,rd=requireXMLDOMImplementation(),sd=requireXMLDocument(),pd=requireXMLDocumentCB(),hd=requireXMLStringWriter(),fd=requireXMLStreamWriter(),Ra=requireNodeType(),qa=requireWriterState(),lib$2.create=function(vd,Nd,Md,Ld){var Fd,Hd;if(vd==null)throw new Error("Root element needs a name.");return Ld=md({},Nd,Md,Ld),Fd=new sd(Ld),Hd=Fd.element(vd),Ld.headless||(Fd.declaration(Ld),(Ld.pubID!=null||Ld.sysID!=null)&&Fd.dtd(Ld)),Hd},lib$2.begin=function(vd,Nd,Md){var Ld;return gd(vd)&&(Ld=[vd,Nd],Nd=Ld[0],Md=Ld[1],vd={}),Nd?new pd(vd,Nd,Md):new sd(vd)},lib$2.stringWriter=function(vd){return new hd(vd)},lib$2.streamWriter=function(vd,Nd){return new fd(vd,Nd)},lib$2.implementation=new rd,lib$2.nodeType=Ra,lib$2.writerState=qa}).call(commonjsGlobal)),lib$2}var hasRequiredBuilder;function requireBuilder(){return hasRequiredBuilder||(hasRequiredBuilder=1,(function(){var Ra,qa,rd,sd,pd,fd={}.hasOwnProperty;Ra=requireLib(),qa=requireDefaults().defaults,sd=function(hd){return typeof hd=="string"&&(hd.indexOf("&")>=0||hd.indexOf(">")>=0||hd.indexOf("<")>=0)},pd=function(hd){return""},rd=function(hd){return hd.replace("]]>","]]]]>")},builder.Builder=function(){function hd(md){var gd,yd,vd;this.options={},yd=qa["0.2"];for(gd in yd)fd.call(yd,gd)&&(vd=yd[gd],this.options[gd]=vd);for(gd in md)fd.call(md,gd)&&(vd=md[gd],this.options[gd]=vd)}return hd.prototype.buildObject=function(md){var gd,yd,vd,Nd,Md;return gd=this.options.attrkey,yd=this.options.charkey,Object.keys(md).length===1&&this.options.rootName===qa["0.2"].rootName?(Md=Object.keys(md)[0],md=md[Md]):Md=this.options.rootName,vd=function(Ld){return function(Fd,Hd){var Vd,Gd,Ud,qd,Wd,Kd;if(typeof Hd!="object")Ld.options.cdata&&sd(Hd)?Fd.raw(pd(Hd)):Fd.txt(Hd);else if(Array.isArray(Hd)){for(qd in Hd)if(fd.call(Hd,qd)){Gd=Hd[qd];for(Wd in Gd)Ud=Gd[Wd],Fd=vd(Fd.ele(Wd),Ud).up()}}else for(Wd in Hd)if(fd.call(Hd,Wd))if(Gd=Hd[Wd],Wd===gd){if(typeof Gd=="object")for(Vd in Gd)Kd=Gd[Vd],Fd=Fd.att(Vd,Kd)}else if(Wd===yd)Ld.options.cdata&&sd(Gd)?Fd=Fd.raw(pd(Gd)):Fd=Fd.txt(Gd);else if(Array.isArray(Gd))for(qd in Gd)fd.call(Gd,qd)&&(Ud=Gd[qd],typeof Ud=="string"?Ld.options.cdata&&sd(Ud)?Fd=Fd.ele(Wd).raw(pd(Ud)).up():Fd=Fd.ele(Wd,Ud).up():Fd=vd(Fd.ele(Wd),Ud).up());else typeof Gd=="object"?Fd=vd(Fd.ele(Wd),Gd).up():typeof Gd=="string"&&Ld.options.cdata&&sd(Gd)?Fd=Fd.ele(Wd).raw(pd(Gd)).up():(Gd==null&&(Gd=""),Fd=Fd.ele(Wd,Gd.toString()).up());return Fd}}(this),Nd=Ra.create(Md,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),vd(Nd,md).end(this.options.renderOpts)},hd}()}).call(commonjsGlobal)),builder}var parser={},sax={},hasRequiredSax;function requireSax(){return hasRequiredSax||(hasRequiredSax=1,function(Ra){(function(qa){qa.parser=function(Df,Af){return new sd(Df,Af)},qa.SAXParser=sd,qa.SAXStream=vd,qa.createStream=yd,qa.MAX_BUFFER_LENGTH=64*1024;var rd=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];qa.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function sd(Df,Af){if(!(this instanceof sd))return new sd(Df,Af);var _h=this;fd(_h),_h.q=_h.c="",_h.bufferCheckPosition=qa.MAX_BUFFER_LENGTH,_h.opt=Af||{},_h.opt.lowercase=_h.opt.lowercase||_h.opt.lowercasetags,_h.looseCase=_h.opt.lowercase?"toLowerCase":"toUpperCase",_h.tags=[],_h.closed=_h.closedRoot=_h.sawRoot=!1,_h.tag=_h.error=null,_h.strict=!!Df,_h.noscript=!!(Df||_h.opt.noscript),_h.state=pf.BEGIN,_h.strictEntities=_h.opt.strictEntities,_h.ENTITIES=_h.strictEntities?Object.create(qa.XML_ENTITIES):Object.create(qa.ENTITIES),_h.attribList=[],_h.opt.xmlns&&(_h.ns=Object.create(Hd)),_h.opt.unquotedAttributeValues===void 0&&(_h.opt.unquotedAttributeValues=!Df),_h.trackPosition=_h.opt.position!==!1,_h.trackPosition&&(_h.position=_h.line=_h.column=0),_f(_h,"onready")}Object.create||(Object.create=function(Df){function Af(){}Af.prototype=Df;var _h=new Af;return _h}),Object.keys||(Object.keys=function(Df){var Af=[];for(var _h in Df)Df.hasOwnProperty(_h)&&Af.push(_h);return Af});function pd(Df){for(var Af=Math.max(qa.MAX_BUFFER_LENGTH,10),_h=0,Nh=0,dm=rd.length;NhAf)switch(rd[Nh]){case"textNode":Cf(Df);break;case"cdata":xf(Df,"oncdata",Df.cdata),Df.cdata="";break;case"script":xf(Df,"onscript",Df.script),Df.script="";break;default:Sf(Df,"Max buffer length exceeded: "+rd[Nh])}_h=Math.max(_h,Jf)}var oh=qa.MAX_BUFFER_LENGTH-_h;Df.bufferCheckPosition=oh+Df.position}function fd(Df){for(var Af=0,_h=rd.length;Af<_h;Af++)Df[rd[Af]]=""}function hd(Df){Cf(Df),Df.cdata!==""&&(xf(Df,"oncdata",Df.cdata),Df.cdata=""),Df.script!==""&&(xf(Df,"onscript",Df.script),Df.script="")}sd.prototype={end:function(){wf(this)},write:vh,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){hd(this)}};var md;try{md=streamBrowserify.Stream}catch{md=function(){}}md||(md=function(){});var gd=qa.EVENTS.filter(function(Df){return Df!=="error"&&Df!=="end"});function yd(Df,Af){return new vd(Df,Af)}function vd(Df,Af){if(!(this instanceof vd))return new vd(Df,Af);md.apply(this),this._parser=new sd(Df,Af),this.writable=!0,this.readable=!0;var _h=this;this._parser.onend=function(){_h.emit("end")},this._parser.onerror=function(Nh){_h.emit("error",Nh),_h._parser.error=null},this._decoder=null,gd.forEach(function(Nh){Object.defineProperty(_h,"on"+Nh,{get:function(){return _h._parser["on"+Nh]},set:function(dm){if(!dm)return _h.removeAllListeners(Nh),_h._parser["on"+Nh]=dm,dm;_h.on(Nh,dm)},enumerable:!0,configurable:!1})})}vd.prototype=Object.create(md.prototype,{constructor:{value:vd}}),vd.prototype.write=function(Df){if(typeof Buffer$4=="function"&&typeof Buffer$4.isBuffer=="function"&&Buffer$4.isBuffer(Df)){if(!this._decoder){var Af=requireString_decoder().StringDecoder;this._decoder=new Af("utf8")}Df=this._decoder.write(Df)}return this._parser.write(Df.toString()),this.emit("data",Df),!0},vd.prototype.end=function(Df){return Df&&Df.length&&this.write(Df),this._parser.end(),!0},vd.prototype.on=function(Df,Af){var _h=this;return!_h._parser["on"+Df]&&gd.indexOf(Df)!==-1&&(_h._parser["on"+Df]=function(){var Nh=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Nh.splice(0,0,Df),_h.emit.apply(_h,Nh)}),md.prototype.on.call(_h,Df,Af)};var Nd="[CDATA[",Md="DOCTYPE",Ld="http://www.w3.org/XML/1998/namespace",Fd="http://www.w3.org/2000/xmlns/",Hd={xml:Ld,xmlns:Fd},Vd=/[:_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]/,Gd=/[:_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-]/,Ud=/[#:_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]/,qd=/[#:_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-]/;function Wd(Df){return Df===" "||Df===` -`||Df==="\r"||Df===" "}function Kd(Df){return Df==='"'||Df==="'"}function Xd(Df){return Df===">"||Wd(Df)}function df(Df,Af){return Df.test(Af)}function Ef(Df,Af){return!df(Df,Af)}var pf=0;qa.STATE={BEGIN:pf++,BEGIN_WHITESPACE:pf++,TEXT:pf++,TEXT_ENTITY:pf++,OPEN_WAKA:pf++,SGML_DECL:pf++,SGML_DECL_QUOTED:pf++,DOCTYPE:pf++,DOCTYPE_QUOTED:pf++,DOCTYPE_DTD:pf++,DOCTYPE_DTD_QUOTED:pf++,COMMENT_STARTING:pf++,COMMENT:pf++,COMMENT_ENDING:pf++,COMMENT_ENDED:pf++,CDATA:pf++,CDATA_ENDING:pf++,CDATA_ENDING_2:pf++,PROC_INST:pf++,PROC_INST_BODY:pf++,PROC_INST_ENDING:pf++,OPEN_TAG:pf++,OPEN_TAG_SLASH:pf++,ATTRIB:pf++,ATTRIB_NAME:pf++,ATTRIB_NAME_SAW_WHITE:pf++,ATTRIB_VALUE:pf++,ATTRIB_VALUE_QUOTED:pf++,ATTRIB_VALUE_CLOSED:pf++,ATTRIB_VALUE_UNQUOTED:pf++,ATTRIB_VALUE_ENTITY_Q:pf++,ATTRIB_VALUE_ENTITY_U:pf++,CLOSE_TAG:pf++,CLOSE_TAG_SAW_WHITE:pf++,SCRIPT:pf++,SCRIPT_ENDING:pf++},qa.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},qa.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},Object.keys(qa.ENTITIES).forEach(function(Df){var Af=qa.ENTITIES[Df],_h=typeof Af=="number"?String.fromCharCode(Af):Af;qa.ENTITIES[Df]=_h});for(var mf in qa.STATE)qa.STATE[qa.STATE[mf]]=mf;pf=qa.STATE;function _f(Df,Af,_h){Df[Af]&&Df[Af](_h)}function xf(Df,Af,_h){Df.textNode&&Cf(Df),_f(Df,Af,_h)}function Cf(Df){Df.textNode=If(Df.opt,Df.textNode),Df.textNode&&_f(Df,"ontext",Df.textNode),Df.textNode=""}function If(Df,Af){return Df.trim&&(Af=Af.trim()),Df.normalize&&(Af=Af.replace(/\s+/g," ")),Af}function Sf(Df,Af){return Cf(Df),Df.trackPosition&&(Af+=` -Line: `+Df.line+` -Column: `+Df.column+` -Char: `+Df.c),Af=new Error(Af),Df.error=Af,_f(Df,"onerror",Af),Df}function wf(Df){return Df.sawRoot&&!Df.closedRoot&&Pf(Df,"Unclosed root tag"),Df.state!==pf.BEGIN&&Df.state!==pf.BEGIN_WHITESPACE&&Df.state!==pf.TEXT&&Sf(Df,"Unexpected end"),Cf(Df),Df.c="",Df.closed=!0,_f(Df,"onend"),sd.call(Df,Df.strict,Df.opt),Df}function Pf(Df,Af){if(typeof Df!="object"||!(Df instanceof sd))throw new Error("bad call to strictFail");Df.strict&&Sf(Df,Af)}function lh(Df){Df.strict||(Df.tagName=Df.tagName[Df.looseCase]());var Af=Df.tags[Df.tags.length-1]||Df,_h=Df.tag={name:Df.tagName,attributes:{}};Df.opt.xmlns&&(_h.ns=Af.ns),Df.attribList.length=0,xf(Df,"onopentagstart",_h)}function xh(Df,Af){var _h=Df.indexOf(":"),Nh=_h<0?["",Df]:Df.split(":"),dm=Nh[0],Jf=Nh[1];return Af&&Df==="xmlns"&&(dm="xmlns",Jf=""),{prefix:dm,local:Jf}}function Eh(Df){if(Df.strict||(Df.attribName=Df.attribName[Df.looseCase]()),Df.attribList.indexOf(Df.attribName)!==-1||Df.tag.attributes.hasOwnProperty(Df.attribName)){Df.attribName=Df.attribValue="";return}if(Df.opt.xmlns){var Af=xh(Df.attribName,!0),_h=Af.prefix,Nh=Af.local;if(_h==="xmlns")if(Nh==="xml"&&Df.attribValue!==Ld)Pf(Df,"xml: prefix must be bound to "+Ld+` -Actual: `+Df.attribValue);else if(Nh==="xmlns"&&Df.attribValue!==Fd)Pf(Df,"xmlns: prefix must be bound to "+Fd+` -Actual: `+Df.attribValue);else{var dm=Df.tag,Jf=Df.tags[Df.tags.length-1]||Df;dm.ns===Jf.ns&&(dm.ns=Object.create(Jf.ns)),dm.ns[Nh]=Df.attribValue}Df.attribList.push([Df.attribName,Df.attribValue])}else Df.tag.attributes[Df.attribName]=Df.attribValue,xf(Df,"onattribute",{name:Df.attribName,value:Df.attribValue});Df.attribName=Df.attribValue=""}function Mh(Df,Af){if(Df.opt.xmlns){var _h=Df.tag,Nh=xh(Df.tagName);_h.prefix=Nh.prefix,_h.local=Nh.local,_h.uri=_h.ns[Nh.prefix]||"",_h.prefix&&!_h.uri&&(Pf(Df,"Unbound namespace prefix: "+JSON.stringify(Df.tagName)),_h.uri=Nh.prefix);var dm=Df.tags[Df.tags.length-1]||Df;_h.ns&&dm.ns!==_h.ns&&Object.keys(_h.ns).forEach(function(zh){xf(Df,"onopennamespace",{prefix:zh,uri:_h.ns[zh]})});for(var Jf=0,oh=Df.attribList.length;Jf",Df.tagName="",Df.state=pf.SCRIPT;return}xf(Df,"onscript",Df.script),Df.script=""}var Af=Df.tags.length,_h=Df.tagName;Df.strict||(_h=_h[Df.looseCase]());for(var Nh=_h;Af--;){var dm=Df.tags[Af];if(dm.name!==Nh)Pf(Df,"Unexpected close tag");else break}if(Af<0){Pf(Df,"Unmatched closing tag: "+Df.tagName),Df.textNode+="",Df.state=pf.TEXT;return}Df.tagName=_h;for(var Jf=Df.tags.length;Jf-- >Af;){var oh=Df.tag=Df.tags.pop();Df.tagName=Df.tag.name,xf(Df,"onclosetag",Df.tagName);var Xh={};for(var Tm in oh.ns)Xh[Tm]=oh.ns[Tm];var kh=Df.tags[Df.tags.length-1]||Df;Df.opt.xmlns&&oh.ns!==kh.ns&&Object.keys(oh.ns).forEach(function(Zf){var th=oh.ns[Zf];xf(Df,"onclosenamespace",{prefix:Zf,uri:th})})}Af===0&&(Df.closedRoot=!0),Df.tagName=Df.attribValue=Df.attribName="",Df.attribList.length=0,Df.state=pf.TEXT}function eh(Df){var Af=Df.entity,_h=Af.toLowerCase(),Nh,dm="";return Df.ENTITIES[Af]?Df.ENTITIES[Af]:Df.ENTITIES[_h]?Df.ENTITIES[_h]:(Af=_h,Af.charAt(0)==="#"&&(Af.charAt(1)==="x"?(Af=Af.slice(2),Nh=parseInt(Af,16),dm=Nh.toString(16)):(Af=Af.slice(1),Nh=parseInt(Af,10),dm=Nh.toString(10))),Af=Af.replace(/^0+/,""),isNaN(Nh)||dm.toLowerCase()!==Af?(Pf(Df,"Invalid character entity"),"&"+Df.entity+";"):String.fromCodePoint(Nh))}function fh(Df,Af){Af==="<"?(Df.state=pf.OPEN_WAKA,Df.startTagPosition=Df.position):Wd(Af)||(Pf(Df,"Non-whitespace before first tag."),Df.textNode=Af,Df.state=pf.TEXT)}function Sh(Df,Af){var _h="";return Af"?(xf(Af,"onsgmldeclaration",Af.sgmlDecl),Af.sgmlDecl="",Af.state=pf.TEXT):(Kd(Nh)&&(Af.state=pf.SGML_DECL_QUOTED),Af.sgmlDecl+=Nh);continue;case pf.SGML_DECL_QUOTED:Nh===Af.q&&(Af.state=pf.SGML_DECL,Af.q=""),Af.sgmlDecl+=Nh;continue;case pf.DOCTYPE:Nh===">"?(Af.state=pf.TEXT,xf(Af,"ondoctype",Af.doctype),Af.doctype=!0):(Af.doctype+=Nh,Nh==="["?Af.state=pf.DOCTYPE_DTD:Kd(Nh)&&(Af.state=pf.DOCTYPE_QUOTED,Af.q=Nh));continue;case pf.DOCTYPE_QUOTED:Af.doctype+=Nh,Nh===Af.q&&(Af.q="",Af.state=pf.DOCTYPE);continue;case pf.DOCTYPE_DTD:Nh==="]"?(Af.doctype+=Nh,Af.state=pf.DOCTYPE):Nh==="<"?(Af.state=pf.OPEN_WAKA,Af.startTagPosition=Af.position):Kd(Nh)?(Af.doctype+=Nh,Af.state=pf.DOCTYPE_DTD_QUOTED,Af.q=Nh):Af.doctype+=Nh;continue;case pf.DOCTYPE_DTD_QUOTED:Af.doctype+=Nh,Nh===Af.q&&(Af.state=pf.DOCTYPE_DTD,Af.q="");continue;case pf.COMMENT:Nh==="-"?Af.state=pf.COMMENT_ENDING:Af.comment+=Nh;continue;case pf.COMMENT_ENDING:Nh==="-"?(Af.state=pf.COMMENT_ENDED,Af.comment=If(Af.opt,Af.comment),Af.comment&&xf(Af,"oncomment",Af.comment),Af.comment=""):(Af.comment+="-"+Nh,Af.state=pf.COMMENT);continue;case pf.COMMENT_ENDED:Nh!==">"?(Pf(Af,"Malformed comment"),Af.comment+="--"+Nh,Af.state=pf.COMMENT):Af.doctype&&Af.doctype!==!0?Af.state=pf.DOCTYPE_DTD:Af.state=pf.TEXT;continue;case pf.CDATA:Nh==="]"?Af.state=pf.CDATA_ENDING:Af.cdata+=Nh;continue;case pf.CDATA_ENDING:Nh==="]"?Af.state=pf.CDATA_ENDING_2:(Af.cdata+="]"+Nh,Af.state=pf.CDATA);continue;case pf.CDATA_ENDING_2:Nh===">"?(Af.cdata&&xf(Af,"oncdata",Af.cdata),xf(Af,"onclosecdata"),Af.cdata="",Af.state=pf.TEXT):Nh==="]"?Af.cdata+="]":(Af.cdata+="]]"+Nh,Af.state=pf.CDATA);continue;case pf.PROC_INST:Nh==="?"?Af.state=pf.PROC_INST_ENDING:Wd(Nh)?Af.state=pf.PROC_INST_BODY:Af.procInstName+=Nh;continue;case pf.PROC_INST_BODY:if(!Af.procInstBody&&Wd(Nh))continue;Nh==="?"?Af.state=pf.PROC_INST_ENDING:Af.procInstBody+=Nh;continue;case pf.PROC_INST_ENDING:Nh===">"?(xf(Af,"onprocessinginstruction",{name:Af.procInstName,body:Af.procInstBody}),Af.procInstName=Af.procInstBody="",Af.state=pf.TEXT):(Af.procInstBody+="?"+Nh,Af.state=pf.PROC_INST_BODY);continue;case pf.OPEN_TAG:df(Gd,Nh)?Af.tagName+=Nh:(lh(Af),Nh===">"?Mh(Af):Nh==="/"?Af.state=pf.OPEN_TAG_SLASH:(Wd(Nh)||Pf(Af,"Invalid character in tag name"),Af.state=pf.ATTRIB));continue;case pf.OPEN_TAG_SLASH:Nh===">"?(Mh(Af,!0),dh(Af)):(Pf(Af,"Forward-slash in opening tag not followed by >"),Af.state=pf.ATTRIB);continue;case pf.ATTRIB:if(Wd(Nh))continue;Nh===">"?Mh(Af):Nh==="/"?Af.state=pf.OPEN_TAG_SLASH:df(Vd,Nh)?(Af.attribName=Nh,Af.attribValue="",Af.state=pf.ATTRIB_NAME):Pf(Af,"Invalid attribute name");continue;case pf.ATTRIB_NAME:Nh==="="?Af.state=pf.ATTRIB_VALUE:Nh===">"?(Pf(Af,"Attribute without value"),Af.attribValue=Af.attribName,Eh(Af),Mh(Af)):Wd(Nh)?Af.state=pf.ATTRIB_NAME_SAW_WHITE:df(Gd,Nh)?Af.attribName+=Nh:Pf(Af,"Invalid attribute name");continue;case pf.ATTRIB_NAME_SAW_WHITE:if(Nh==="=")Af.state=pf.ATTRIB_VALUE;else{if(Wd(Nh))continue;Pf(Af,"Attribute without value"),Af.tag.attributes[Af.attribName]="",Af.attribValue="",xf(Af,"onattribute",{name:Af.attribName,value:""}),Af.attribName="",Nh===">"?Mh(Af):df(Vd,Nh)?(Af.attribName=Nh,Af.state=pf.ATTRIB_NAME):(Pf(Af,"Invalid attribute name"),Af.state=pf.ATTRIB)}continue;case pf.ATTRIB_VALUE:if(Wd(Nh))continue;Kd(Nh)?(Af.q=Nh,Af.state=pf.ATTRIB_VALUE_QUOTED):(Af.opt.unquotedAttributeValues||Sf(Af,"Unquoted attribute value"),Af.state=pf.ATTRIB_VALUE_UNQUOTED,Af.attribValue=Nh);continue;case pf.ATTRIB_VALUE_QUOTED:if(Nh!==Af.q){Nh==="&"?Af.state=pf.ATTRIB_VALUE_ENTITY_Q:Af.attribValue+=Nh;continue}Eh(Af),Af.q="",Af.state=pf.ATTRIB_VALUE_CLOSED;continue;case pf.ATTRIB_VALUE_CLOSED:Wd(Nh)?Af.state=pf.ATTRIB:Nh===">"?Mh(Af):Nh==="/"?Af.state=pf.OPEN_TAG_SLASH:df(Vd,Nh)?(Pf(Af,"No whitespace between attributes"),Af.attribName=Nh,Af.attribValue="",Af.state=pf.ATTRIB_NAME):Pf(Af,"Invalid attribute name");continue;case pf.ATTRIB_VALUE_UNQUOTED:if(!Xd(Nh)){Nh==="&"?Af.state=pf.ATTRIB_VALUE_ENTITY_U:Af.attribValue+=Nh;continue}Eh(Af),Nh===">"?Mh(Af):Af.state=pf.ATTRIB;continue;case pf.CLOSE_TAG:if(Af.tagName)Nh===">"?dh(Af):df(Gd,Nh)?Af.tagName+=Nh:Af.script?(Af.script+=""?dh(Af):Pf(Af,"Invalid characters in closing tag");continue;case pf.TEXT_ENTITY:case pf.ATTRIB_VALUE_ENTITY_Q:case pf.ATTRIB_VALUE_ENTITY_U:var oh,Xh;switch(Af.state){case pf.TEXT_ENTITY:oh=pf.TEXT,Xh="textNode";break;case pf.ATTRIB_VALUE_ENTITY_Q:oh=pf.ATTRIB_VALUE_QUOTED,Xh="attribValue";break;case pf.ATTRIB_VALUE_ENTITY_U:oh=pf.ATTRIB_VALUE_UNQUOTED,Xh="attribValue";break}if(Nh===";"){var Tm=eh(Af);Af.opt.unparsedEntities&&!Object.values(qa.XML_ENTITIES).includes(Tm)?(Af.entity="",Af.state=oh,Af.write(Tm)):(Af[Xh]+=Tm,Af.entity="",Af.state=oh)}else df(Af.entity.length?qd:Ud,Nh)?Af.entity+=Nh:(Pf(Af,"Invalid character in entity name"),Af[Xh]+="&"+Af.entity+Nh,Af.entity="",Af.state=oh);continue;default:throw new Error(Af,"Unknown state: "+Af.state)}return Af.position>=Af.bufferCheckPosition&&pd(Af),Af}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var Df=String.fromCharCode,Af=Math.floor,_h=function(){var Nh=16384,dm=[],Jf,oh,Xh=-1,Tm=arguments.length;if(!Tm)return"";for(var kh="";++Xh1114111||Af(Zf)!==Zf)throw RangeError("Invalid code point: "+Zf);Zf<=65535?dm.push(Zf):(Zf-=65536,Jf=(Zf>>10)+55296,oh=Zf%1024+56320,dm.push(Jf,oh)),(Xh+1===Tm||dm.length>Nh)&&(kh+=Df.apply(null,dm),dm.length=0)}return kh};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:_h,configurable:!0,writable:!0}):String.fromCodePoint=_h}()})(Ra)}(sax)),sax}var bom={},hasRequiredBom;function requireBom(){return hasRequiredBom||(hasRequiredBom=1,(function(){bom.stripBOM=function(Ra){return Ra[0]==="\uFEFF"?Ra.substring(1):Ra}}).call(commonjsGlobal)),bom}var processors={},hasRequiredProcessors;function requireProcessors(){return hasRequiredProcessors||(hasRequiredProcessors=1,(function(){var Ra;Ra=new RegExp(/(?!xmlns)^.*:/),processors.normalize=function(qa){return qa.toLowerCase()},processors.firstCharLowerCase=function(qa){return qa.charAt(0).toLowerCase()+qa.slice(1)},processors.stripPrefix=function(qa){return qa.replace(Ra,"")},processors.parseNumbers=function(qa){return isNaN(qa)||(qa=qa%1===0?parseInt(qa,10):parseFloat(qa)),qa},processors.parseBooleans=function(qa){return/^(?:true|false)$/i.test(qa)&&(qa=qa.toLowerCase()==="true"),qa}}).call(commonjsGlobal)),processors}var main={},setImmediate$1={},hasRequiredSetImmediate;function requireSetImmediate(){if(hasRequiredSetImmediate)return setImmediate$1;hasRequiredSetImmediate=1;var Ra={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};return function(qa,rd){if(qa.setImmediate)return;var sd=1,pd={},fd=!1,hd=qa.document,md;function gd(qd){typeof qd!="function"&&(qd=new Function(""+qd));for(var Wd=new Array(arguments.length-1),Kd=0;Kd"u"?commonjsGlobal:self),setImmediate$1}var hasRequiredMain;function requireMain(){if(hasRequiredMain)return main;hasRequiredMain=1;var Ra=typeof commonjsGlobal<"u"&&commonjsGlobal||typeof self<"u"&&self||window,qa=Function.prototype.apply;main.setTimeout=function(){return new rd(qa.call(setTimeout,Ra,arguments),clearTimeout)},main.setInterval=function(){return new rd(qa.call(setInterval,Ra,arguments),clearInterval)},main.clearTimeout=main.clearInterval=function(sd){sd&&sd.close()};function rd(sd,pd){this._id=sd,this._clearFn=pd}return rd.prototype.unref=rd.prototype.ref=function(){},rd.prototype.close=function(){this._clearFn.call(Ra,this._id)},main.enroll=function(sd,pd){clearTimeout(sd._idleTimeoutId),sd._idleTimeout=pd},main.unenroll=function(sd){clearTimeout(sd._idleTimeoutId),sd._idleTimeout=-1},main._unrefActive=main.active=function(sd){clearTimeout(sd._idleTimeoutId);var pd=sd._idleTimeout;pd>=0&&(sd._idleTimeoutId=setTimeout(function(){sd._onTimeout&&sd._onTimeout()},pd))},requireSetImmediate(),main.setImmediate=typeof self<"u"&&self.setImmediate||typeof commonjsGlobal<"u"&&commonjsGlobal.setImmediate||commonjsGlobal&&commonjsGlobal.setImmediate,main.clearImmediate=typeof self<"u"&&self.clearImmediate||typeof commonjsGlobal<"u"&&commonjsGlobal.clearImmediate||commonjsGlobal&&commonjsGlobal.clearImmediate,main}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(Ra){(function(){var qa,rd,sd,pd,fd,hd,md,gd,yd=function(Md,Ld){return function(){return Md.apply(Ld,arguments)}},vd=function(Md,Ld){for(var Fd in Ld)Nd.call(Ld,Fd)&&(Md[Fd]=Ld[Fd]);function Hd(){this.constructor=Md}return Hd.prototype=Ld.prototype,Md.prototype=new Hd,Md.__super__=Ld.prototype,Md},Nd={}.hasOwnProperty;md=requireSax(),sd=eventsExports,qa=requireBom(),hd=requireProcessors(),gd=requireMain().setImmediate,rd=requireDefaults().defaults,pd=function(Md){return typeof Md=="object"&&Md!=null&&Object.keys(Md).length===0},fd=function(Md,Ld,Fd){var Hd,Vd,Gd;for(Hd=0,Vd=Md.length;Hd0&&(Xd[Ud.options.childkey]=Ef),Ef=Xd;else if(_f){_f[Ud.options.childkey]=_f[Ud.options.childkey]||[],pf=Object.create(null);for(Kd in Ef)Nd.call(Ef,Kd)&&(pf[Kd]=Ef[Kd]);_f[Ud.options.childkey].push(pf),delete Ef["#name"],Object.keys(Ef).length===1&&Hd in Ef&&!Ud.EXPLICIT_CHARKEY&&(Ef=Ef[Hd])}}return Gd.length>0?Ud.assignOrPush(_f,df,Ef):(Ud.options.explicitRoot&&(mf=Ef,Ef=Object.create(null),Ef[df]=mf),Ud.resultObject=Ef,Ud.saxParser.ended=!0,Ud.emit("end",Ud.resultObject))}}(this),Vd=function(Ud){return function(qd){var Wd,Kd;if(Kd=Gd[Gd.length-1],Kd)return Kd[Hd]+=qd,Ud.options.explicitChildren&&Ud.options.preserveChildrenOrder&&Ud.options.charsAsChildren&&(Ud.options.includeWhiteChars||qd.replace(/\\n/g,"").trim()!=="")&&(Kd[Ud.options.childkey]=Kd[Ud.options.childkey]||[],Wd={"#name":"__text__"},Wd[Hd]=qd,Ud.options.normalize&&(Wd[Hd]=Wd[Hd].replace(/\s{2,}/g," ").trim()),Kd[Ud.options.childkey].push(Wd)),Kd}}(this),this.saxParser.ontext=Vd,this.saxParser.oncdata=function(Ud){return function(qd){var Wd;if(Wd=Vd(qd),Wd)return Wd.cdata=!0}}()},Ld.prototype.parseString=function(Fd,Hd){var Vd;Hd!=null&&typeof Hd=="function"&&(this.on("end",function(Gd){return this.reset(),Hd(null,Gd)}),this.on("error",function(Gd){return this.reset(),Hd(Gd)}));try{return Fd=Fd.toString(),Fd.trim()===""?(this.emit("end",null),!0):(Fd=qa.stripBOM(Fd),this.options.async?(this.remaining=Fd,gd(this.processAsync),this.saxParser):this.saxParser.write(Fd).close())}catch(Gd){if(Vd=Gd,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Vd}else return this.emit("error",Vd),this.saxParser.errThrown=!0}},Ld.prototype.parseStringPromise=function(Fd){return new Promise(function(Hd){return function(Vd,Gd){return Hd.parseString(Fd,function(Ud,qd){return Ud?Gd(Ud):Vd(qd)})}}(this))},Ld}(sd),Ra.parseString=function(Md,Ld,Fd){var Hd,Vd,Gd;return Fd!=null?(typeof Fd=="function"&&(Hd=Fd),typeof Ld=="object"&&(Vd=Ld)):(typeof Ld=="function"&&(Hd=Ld),Vd={}),Gd=new Ra.Parser(Vd),Gd.parseString(Md,Hd)},Ra.parseStringPromise=function(Md,Ld){var Fd,Hd;return typeof Ld=="object"&&(Fd=Ld),Hd=new Ra.Parser(Fd),Hd.parseStringPromise(Md)}}).call(commonjsGlobal)}(parser)),parser}(function(){var Ra,qa,rd,sd,pd=function(hd,md){for(var gd in md)fd.call(md,gd)&&(hd[gd]=md[gd]);function yd(){this.constructor=hd}return yd.prototype=md.prototype,hd.prototype=new yd,hd.__super__=md.prototype,hd},fd={}.hasOwnProperty;qa=requireDefaults(),Ra=requireBuilder(),rd=requireParser(),sd=requireProcessors(),xml2js.defaults=qa.defaults,xml2js.processors=sd,xml2js.ValidationError=function(hd){pd(md,hd);function md(gd){this.message=gd}return md}(Error),xml2js.Builder=Ra.Builder,xml2js.Parser=rd.Parser,xml2js.parseString=rd.parseString,xml2js.parseStringPromise=rd.parseStringPromise}).call(commonjsGlobal);class ExtendableError extends Error{constructor(qa,rd){super(qa,rd),this.name=this.constructor.name}}class AnonymousRequestError extends ExtendableError{}class InvalidArgumentError extends ExtendableError{}class InvalidEndpointError extends ExtendableError{}class InvalidBucketNameError extends ExtendableError{}class InvalidObjectNameError extends ExtendableError{}class AccessKeyRequiredError extends ExtendableError{}class SecretKeyRequiredError extends ExtendableError{}class ExpiresParamError extends ExtendableError{}class InvalidDateError extends ExtendableError{}class InvalidPrefixError extends ExtendableError{}class InvalidBucketPolicyError extends ExtendableError{}class InvalidXMLError extends ExtendableError{}class S3Error extends ExtendableError{}class IsValidBucketNameError extends ExtendableError{}var ipaddr$1={exports:{}};(function(Ra){(function(qa){const rd="(0?\\d+|0x[a-f0-9]+)",sd={fourOctet:new RegExp(`^${rd}\\.${rd}\\.${rd}\\.${rd}$`,"i"),threeOctet:new RegExp(`^${rd}\\.${rd}\\.${rd}$`,"i"),twoOctet:new RegExp(`^${rd}\\.${rd}$`,"i"),longValue:new RegExp(`^${rd}$`,"i")},pd=new RegExp("^0[0-7]+$","i"),fd=new RegExp("^0x[a-f0-9]+$","i"),hd="%[0-9a-z]{1,}",md="(?:[0-9a-f]+::?)+",gd={zoneIndex:new RegExp(hd,"i"),native:new RegExp(`^(::)?(${md})?([0-9a-f]+)?(::)?(${hd})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${rd}\\.${rd}\\.${rd}\\.${rd}(${hd})?)$`,"i"),transitional:new RegExp(`^((?:${md})|(?:::)(?:${md})?)${rd}\\.${rd}\\.${rd}\\.${rd}(${hd})?$`,"i")};function yd(Fd,Hd){if(Fd.indexOf("::")!==Fd.lastIndexOf("::"))return null;let Vd=0,Gd=-1,Ud=(Fd.match(gd.zoneIndex)||[])[0],qd,Wd;for(Ud&&(Ud=Ud.substring(1),Fd=Fd.replace(/%.+$/,""));(Gd=Fd.indexOf(":",Gd+1))>=0;)Vd++;if(Fd.substr(0,2)==="::"&&Vd--,Fd.substr(-2,2)==="::"&&Vd--,Vd>Hd)return null;for(Wd=Hd-Vd,qd=":";Wd--;)qd+="0:";return Fd=Fd.replace("::",qd),Fd[0]===":"&&(Fd=Fd.slice(1)),Fd[Fd.length-1]===":"&&(Fd=Fd.slice(0,-1)),Hd=function(){const Kd=Fd.split(":"),Xd=[];for(let df=0;df0;){if(qd=Vd-Gd,qd<0&&(qd=0),Fd[Ud]>>qd!==Hd[Ud]>>qd)return!1;Gd-=Vd,Ud+=1}return!0}function Nd(Fd){if(fd.test(Fd))return parseInt(Fd,16);if(Fd[0]==="0"&&!isNaN(parseInt(Fd[1],10))){if(pd.test(Fd))return parseInt(Fd,8);throw new Error(`ipaddr: cannot parse ${Fd} as octal`)}return parseInt(Fd,10)}function Md(Fd,Hd){for(;Fd.length=0;Ud-=1)if(qd=this.octets[Ud],qd in Gd){if(Wd=Gd[qd],Vd&&Wd!==0)return null;Wd!==8&&(Vd=!0),Hd+=Wd}else return null;return 32-Hd},Fd.prototype.range=function(){return Ld.subnetMatch(this,this.SpecialRanges)},Fd.prototype.toByteArray=function(){return this.octets.slice(0)},Fd.prototype.toIPv4MappedAddress=function(){return Ld.IPv6.parse(`::ffff:${this.toString()}`)},Fd.prototype.toNormalizedString=function(){return this.toString()},Fd.prototype.toString=function(){return this.octets.join(".")},Fd}(),Ld.IPv4.broadcastAddressFromCIDR=function(Fd){try{const Hd=this.parseCIDR(Fd),Vd=Hd[0].toByteArray(),Gd=this.subnetMaskFromPrefixLength(Hd[1]).toByteArray(),Ud=[];let qd=0;for(;qd<4;)Ud.push(parseInt(Vd[qd],10)|parseInt(Gd[qd],10)^255),qd++;return new this(Ud)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},Ld.IPv4.isIPv4=function(Fd){return this.parser(Fd)!==null},Ld.IPv4.isValid=function(Fd){try{return new this(this.parser(Fd)),!0}catch{return!1}},Ld.IPv4.isValidCIDR=function(Fd){try{return this.parseCIDR(Fd),!0}catch{return!1}},Ld.IPv4.isValidFourPartDecimal=function(Fd){return!!(Ld.IPv4.isValid(Fd)&&Fd.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},Ld.IPv4.networkAddressFromCIDR=function(Fd){let Hd,Vd,Gd,Ud,qd;try{for(Hd=this.parseCIDR(Fd),Gd=Hd[0].toByteArray(),qd=this.subnetMaskFromPrefixLength(Hd[1]).toByteArray(),Ud=[],Vd=0;Vd<4;)Ud.push(parseInt(Gd[Vd],10)&parseInt(qd[Vd],10)),Vd++;return new this(Ud)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},Ld.IPv4.parse=function(Fd){const Hd=this.parser(Fd);if(Hd===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(Hd)},Ld.IPv4.parseCIDR=function(Fd){let Hd;if(Hd=Fd.match(/^(.+)\/(\d+)$/)){const Vd=parseInt(Hd[2]);if(Vd>=0&&Vd<=32){const Gd=[this.parse(Hd[1]),Vd];return Object.defineProperty(Gd,"toString",{value:function(){return this.join("/")}}),Gd}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},Ld.IPv4.parser=function(Fd){let Hd,Vd,Gd;if(Hd=Fd.match(sd.fourOctet))return function(){const Ud=Hd.slice(1,6),qd=[];for(let Wd=0;Wd4294967295||Gd<0)throw new Error("ipaddr: address outside defined range");return function(){const Ud=[];let qd;for(qd=0;qd<=24;qd+=8)Ud.push(Gd>>qd&255);return Ud}().reverse()}else return(Hd=Fd.match(sd.twoOctet))?function(){const Ud=Hd.slice(1,4),qd=[];if(Gd=Nd(Ud[1]),Gd>16777215||Gd<0)throw new Error("ipaddr: address outside defined range");return qd.push(Nd(Ud[0])),qd.push(Gd>>16&255),qd.push(Gd>>8&255),qd.push(Gd&255),qd}():(Hd=Fd.match(sd.threeOctet))?function(){const Ud=Hd.slice(1,5),qd=[];if(Gd=Nd(Ud[2]),Gd>65535||Gd<0)throw new Error("ipaddr: address outside defined range");return qd.push(Nd(Ud[0])),qd.push(Nd(Ud[1])),qd.push(Gd>>8&255),qd.push(Gd&255),qd}():null},Ld.IPv4.subnetMaskFromPrefixLength=function(Fd){if(Fd=parseInt(Fd),Fd<0||Fd>32)throw new Error("ipaddr: invalid IPv4 prefix length");const Hd=[0,0,0,0];let Vd=0;const Gd=Math.floor(Fd/8);for(;Vd=0;Wd-=1)if(Ud=this.parts[Wd],Ud in Gd){if(qd=Gd[Ud],Vd&&qd!==0)return null;qd!==16&&(Vd=!0),Hd+=qd}else return null;return 128-Hd},Fd.prototype.range=function(){return Ld.subnetMatch(this,this.SpecialRanges)},Fd.prototype.toByteArray=function(){let Hd;const Vd=[],Gd=this.parts;for(let Ud=0;Ud>8),Vd.push(Hd&255);return Vd},Fd.prototype.toFixedLengthString=function(){const Hd=(function(){const Gd=[];for(let Ud=0;Ud>8,Vd&255,Gd>>8,Gd&255])},Fd.prototype.toNormalizedString=function(){const Hd=(function(){const Gd=[];for(let Ud=0;UdUd&&(Gd=qd.index,Ud=qd[0].length);return Ud<0?Vd:`${Vd.substring(0,Gd)}::${Vd.substring(Gd+Ud)}`},Fd.prototype.toString=function(){return this.toRFC5952String()},Fd}(),Ld.IPv6.broadcastAddressFromCIDR=function(Fd){try{const Hd=this.parseCIDR(Fd),Vd=Hd[0].toByteArray(),Gd=this.subnetMaskFromPrefixLength(Hd[1]).toByteArray(),Ud=[];let qd=0;for(;qd<16;)Ud.push(parseInt(Vd[qd],10)|parseInt(Gd[qd],10)^255),qd++;return new this(Ud)}catch(Hd){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${Hd})`)}},Ld.IPv6.isIPv6=function(Fd){return this.parser(Fd)!==null},Ld.IPv6.isValid=function(Fd){if(typeof Fd=="string"&&Fd.indexOf(":")===-1)return!1;try{const Hd=this.parser(Fd);return new this(Hd.parts,Hd.zoneId),!0}catch{return!1}},Ld.IPv6.isValidCIDR=function(Fd){if(typeof Fd=="string"&&Fd.indexOf(":")===-1)return!1;try{return this.parseCIDR(Fd),!0}catch{return!1}},Ld.IPv6.networkAddressFromCIDR=function(Fd){let Hd,Vd,Gd,Ud,qd;try{for(Hd=this.parseCIDR(Fd),Gd=Hd[0].toByteArray(),qd=this.subnetMaskFromPrefixLength(Hd[1]).toByteArray(),Ud=[],Vd=0;Vd<16;)Ud.push(parseInt(Gd[Vd],10)&parseInt(qd[Vd],10)),Vd++;return new this(Ud)}catch(Wd){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${Wd})`)}},Ld.IPv6.parse=function(Fd){const Hd=this.parser(Fd);if(Hd.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(Hd.parts,Hd.zoneId)},Ld.IPv6.parseCIDR=function(Fd){let Hd,Vd,Gd;if((Vd=Fd.match(/^(.+)\/(\d+)$/))&&(Hd=parseInt(Vd[2]),Hd>=0&&Hd<=128))return Gd=[this.parse(Vd[1]),Hd],Object.defineProperty(Gd,"toString",{value:function(){return this.join("/")}}),Gd;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},Ld.IPv6.parser=function(Fd){let Hd,Vd,Gd,Ud,qd,Wd;if(Gd=Fd.match(gd.deprecatedTransitional))return this.parser(`::ffff:${Gd[1]}`);if(gd.native.test(Fd))return yd(Fd,8);if((Gd=Fd.match(gd.transitional))&&(Wd=Gd[6]||"",Hd=Gd[1],Gd[1].endsWith("::")||(Hd=Hd.slice(0,-1)),Hd=yd(Hd+Wd,6),Hd.parts)){for(qd=[parseInt(Gd[2]),parseInt(Gd[3]),parseInt(Gd[4]),parseInt(Gd[5])],Vd=0;Vd128)throw new Error("ipaddr: invalid IPv6 prefix length");const Hd=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let Vd=0;const Gd=Math.floor(Fd/8);for(;Vd=Dm)return df;var Km=Mf-oE(Th);if(Km<1)return Th;var rg=zm?Ay(zm,0,Km).join(""):df.slice(0,Km);if(lm===ud)return rg+Th;if(zm&&(Km+=rg.length-Km),VT(lm)){if(df.slice(Km).search(lm)){var Dg,Ng=rg;for(lm.global||(lm=GE(lm.source,W_(Fm.exec(lm))+"g")),lm.lastIndex=0;Dg=lm.exec(Ng);)var Og=Dg.index;rg=rg.slice(0,Og===ud?Km:Og)}}else if(df.indexOf(Z0(lm),Km)!=Km){var Zg=rg.lastIndexOf(lm);Zg>-1&&(rg=rg.slice(0,Zg))}return rg+Th}function mN(df){return df=W_(df),df&&Kg.test(df)?df.replace(vg,nx):df}var gN=IE(function(df,Sf,Mf){return df+(Mf?" ":"")+Sf.toUpperCase()}),YT=qx("toUpperCase");function PC(df,Sf,Mf){return df=W_(df),Sf=Mf?ud:Sf,Sf===ud?ex(df)?sx(df):fS(df):df.match(Sf)||[]}var LC=T_(function(df,Sf){try{return q0(df,ud,Sf)}catch(Mf){return GT(Mf)?Mf:new b_(Mf)}}),_N=Gb(function(df,Sf){return Y0(Sf,function(Mf){Mf=i0(Mf),Sy(df,Mf,HT(df[Mf],df))}),df});function yN(df){var Sf=df==null?0:df.length,Mf=c_();return df=Sf?X_(df,function(Th){if(typeof Th[1]!="function")throw new ub(gd);return[Mf(Th[0]),Th[1]]}):[],T_(function(Th){for(var lm=-1;++lmsh)return[];var Mf=Mh,Th=b0(df,Mh);Sf=c_(Sf),df-=Mh;for(var lm=Bg(Th,Sf);++Mf0||Sf<0)?new d_(Mf):(df<0?Mf=Mf.takeRight(-df):df&&(Mf=Mf.drop(df)),Sf!==ud&&(Sf=C_(Sf),Mf=Sf<0?Mf.dropRight(-Sf):Mf.take(Sf-df)),Mf)},d_.prototype.takeRightWhile=function(df){return this.reverse().takeWhile(df).reverse()},d_.prototype.toArray=function(){return this.take(Mh)},pb(d_.prototype,function(df,Sf){var Mf=/^(?:filter|find|map|reject)|While$/.test(Sf),Th=/^(?:head|last)$/.test(Sf),lm=gm[Th?"take"+(Sf=="last"?"Right":""):Sf],Dm=Th||/^find/.test(Sf);lm&&(gm.prototype[Sf]=function(){var zm=this.__wrapped__,Km=Th?[1]:arguments,rg=zm instanceof d_,Dg=Km[0],Ng=rg||x_(zm),Og=function(I_){var M_=lm.apply(gm,vb([I_],Km));return Th&&Zg?M_[0]:M_};Ng&&Mf&&typeof Dg=="function"&&Dg.length!=1&&(rg=Ng=!1);var Zg=this.__chain__,o_=!!this.__actions__.length,h_=Dm&&!Zg,w_=rg&&!o_;if(!Dm&&Ng){zm=w_?zm:new d_(this);var m_=df.apply(zm,Km);return m_.__actions__.push({func:Qx,args:[Og],thisArg:ud}),new H_(m_,Zg)}return h_&&w_?df.apply(this,Km):(m_=this.thru(Og),h_?Th?m_.value()[0]:m_.value():m_)})}),Y0(["pop","push","shift","sort","splice","unshift"],function(df){var Sf=N1[df],Mf=/^(?:push|sort|unshift)$/.test(df)?"tap":"thru",Th=/^(?:pop|shift)$/.test(df);gm.prototype[df]=function(){var lm=arguments;if(Th&&!this.__chain__){var Dm=this.value();return Sf.apply(x_(Dm)?Dm:[],lm)}return this[Mf](function(zm){return Sf.apply(x_(zm)?zm:[],lm)})}}),pb(d_.prototype,function(df,Sf){var Mf=gm[Sf];if(Mf){var Th=Mf.name+"";U_.call(Dv,Th)||(Dv[Th]=[]),Dv[Th].push({name:Sf,func:Mf})}}),Dv[W1(ud,zd).name]=[{name:"wrapper",func:ud}],d_.prototype.clone=T0,d_.prototype.reverse=KE,d_.prototype.value=mT,gm.prototype.at=UA,gm.prototype.chain=jA,gm.prototype.commit=HA,gm.prototype.next=qA,gm.prototype.plant=VA,gm.prototype.reverse=zA,gm.prototype.toJSON=gm.prototype.valueOf=gm.prototype.value=WA,gm.prototype.first=gm.prototype.head,xv&&(gm.prototype[xv]=GA),gm},Zb=gS();Jb?((Jb.exports=Zb)._=Zb,UE._=Zb):j_._=Zb}).call(commonjsGlobal)})(lodash,lodash.exports);var lodashExports=lodash.exports;const _=getDefaultExportFromCjs(lodashExports);var queryString={},strictUriEncode=Ra=>encodeURIComponent(Ra).replace(/[!'()*]/g,ed=>`%${ed.charCodeAt(0).toString(16).toUpperCase()}`),token="%[a-f0-9]{2}",singleMatcher=new RegExp("("+token+")|([^%]+?)","gi"),multiMatcher=new RegExp("("+token+")+","gi");function decodeComponents(Ra,ed){try{return[decodeURIComponent(Ra.join(""))]}catch{}if(Ra.length===1)return Ra;ed=ed||1;var ud=Ra.slice(0,ed),dd=Ra.slice(ed);return Array.prototype.concat.call([],decodeComponents(ud),decodeComponents(dd))}function decode(Ra){try{return decodeURIComponent(Ra)}catch{for(var ed=Ra.match(singleMatcher)||[],ud=1;ud{if(!(typeof Ra=="string"&&typeof ed=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(ed==="")return[Ra];const ud=Ra.indexOf(ed);return ud===-1?[Ra]:[Ra.slice(0,ud),Ra.slice(ud+ed.length)]},filterObj=function(Ra,ed){for(var ud={},dd=Object.keys(Ra),hd=Array.isArray(ed),md=0;mdqd==null,gd=Symbol("encodeFragmentIdentifier");function yd(qd){switch(qd.arrayFormat){case"index":return Wd=>(Xd,Jd)=>{const Zd=Xd.length;return Jd===void 0||qd.skipNull&&Jd===null||qd.skipEmptyString&&Jd===""?Xd:Jd===null?[...Xd,[wd(Wd,qd),"[",Zd,"]"].join("")]:[...Xd,[wd(Wd,qd),"[",wd(Zd,qd),"]=",wd(Jd,qd)].join("")]};case"bracket":return Wd=>(Xd,Jd)=>Jd===void 0||qd.skipNull&&Jd===null||qd.skipEmptyString&&Jd===""?Xd:Jd===null?[...Xd,[wd(Wd,qd),"[]"].join("")]:[...Xd,[wd(Wd,qd),"[]=",wd(Jd,qd)].join("")];case"colon-list-separator":return Wd=>(Xd,Jd)=>Jd===void 0||qd.skipNull&&Jd===null||qd.skipEmptyString&&Jd===""?Xd:Jd===null?[...Xd,[wd(Wd,qd),":list="].join("")]:[...Xd,[wd(Wd,qd),":list=",wd(Jd,qd)].join("")];case"comma":case"separator":case"bracket-separator":{const Wd=qd.arrayFormat==="bracket-separator"?"[]=":"=";return Xd=>(Jd,Zd)=>Zd===void 0||qd.skipNull&&Zd===null||qd.skipEmptyString&&Zd===""?Jd:(Zd=Zd===null?"":Zd,Jd.length===0?[[wd(Xd,qd),Wd,wd(Zd,qd)].join("")]:[[Jd,wd(Zd,qd)].join(qd.arrayFormatSeparator)])}default:return Wd=>(Xd,Jd)=>Jd===void 0||qd.skipNull&&Jd===null||qd.skipEmptyString&&Jd===""?Xd:Jd===null?[...Xd,wd(Wd,qd)]:[...Xd,[wd(Wd,qd),"=",wd(Jd,qd)].join("")]}}function vd(qd){let Wd;switch(qd.arrayFormat){case"index":return(Xd,Jd,Zd)=>{if(Wd=/\[(\d*)\]$/.exec(Xd),Xd=Xd.replace(/\[\d*\]$/,""),!Wd){Zd[Xd]=Jd;return}Zd[Xd]===void 0&&(Zd[Xd]={}),Zd[Xd][Wd[1]]=Jd};case"bracket":return(Xd,Jd,Zd)=>{if(Wd=/(\[\])$/.exec(Xd),Xd=Xd.replace(/\[\]$/,""),!Wd){Zd[Xd]=Jd;return}if(Zd[Xd]===void 0){Zd[Xd]=[Jd];return}Zd[Xd]=[].concat(Zd[Xd],Jd)};case"colon-list-separator":return(Xd,Jd,Zd)=>{if(Wd=/(:list)$/.exec(Xd),Xd=Xd.replace(/:list$/,""),!Wd){Zd[Xd]=Jd;return}if(Zd[Xd]===void 0){Zd[Xd]=[Jd];return}Zd[Xd]=[].concat(Zd[Xd],Jd)};case"comma":case"separator":return(Xd,Jd,Zd)=>{const mf=typeof Jd=="string"&&Jd.includes(qd.arrayFormatSeparator),xf=typeof Jd=="string"&&!mf&&Nd(Jd,qd).includes(qd.arrayFormatSeparator);Jd=xf?Nd(Jd,qd):Jd;const _f=mf||xf?Jd.split(qd.arrayFormatSeparator).map(vf=>Nd(vf,qd)):Jd===null?Jd:Nd(Jd,qd);Zd[Xd]=_f};case"bracket-separator":return(Xd,Jd,Zd)=>{const mf=/(\[\])$/.test(Xd);if(Xd=Xd.replace(/\[\]$/,""),!mf){Zd[Xd]=Jd&&Nd(Jd,qd);return}const xf=Jd===null?[]:Jd.split(qd.arrayFormatSeparator).map(_f=>Nd(_f,qd));if(Zd[Xd]===void 0){Zd[Xd]=xf;return}Zd[Xd]=[].concat(Zd[Xd],xf)};default:return(Xd,Jd,Zd)=>{if(Zd[Xd]===void 0){Zd[Xd]=Jd;return}Zd[Xd]=[].concat(Zd[Xd],Jd)}}}function Cd(qd){if(typeof qd!="string"||qd.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function wd(qd,Wd){return Wd.encode?Wd.strict?ed(qd):encodeURIComponent(qd):qd}function Nd(qd,Wd){return Wd.decode?ud(qd):qd}function Ld(qd){return Array.isArray(qd)?qd.sort():typeof qd=="object"?Ld(Object.keys(qd)).sort((Wd,Xd)=>Number(Wd)-Number(Xd)).map(Wd=>qd[Wd]):qd}function Ud(qd){const Wd=qd.indexOf("#");return Wd!==-1&&(qd=qd.slice(0,Wd)),qd}function jd(qd){let Wd="";const Xd=qd.indexOf("#");return Xd!==-1&&(Wd=qd.slice(Xd)),Wd}function Gd(qd){qd=Ud(qd);const Wd=qd.indexOf("?");return Wd===-1?"":qd.slice(Wd+1)}function Yd(qd,Wd){return Wd.parseNumbers&&!Number.isNaN(Number(qd))&&typeof qd=="string"&&qd.trim()!==""?qd=Number(qd):Wd.parseBooleans&&qd!==null&&(qd.toLowerCase()==="true"||qd.toLowerCase()==="false")&&(qd=qd.toLowerCase()==="true"),qd}function zd(qd,Wd){Wd=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},Wd),Cd(Wd.arrayFormatSeparator);const Xd=vd(Wd),Jd=Object.create(null);if(typeof qd!="string"||(qd=qd.trim().replace(/^[?#&]/,""),!qd))return Jd;for(const Zd of qd.split("&")){if(Zd==="")continue;let[mf,xf]=dd(Wd.decode?Zd.replace(/\+/g," "):Zd,"=");xf=xf===void 0?null:["comma","separator","bracket-separator"].includes(Wd.arrayFormat)?xf:Nd(xf,Wd),Xd(Nd(mf,Wd),xf,Jd)}for(const Zd of Object.keys(Jd)){const mf=Jd[Zd];if(typeof mf=="object"&&mf!==null)for(const xf of Object.keys(mf))mf[xf]=Yd(mf[xf],Wd);else Jd[Zd]=Yd(mf,Wd)}return Wd.sort===!1?Jd:(Wd.sort===!0?Object.keys(Jd).sort():Object.keys(Jd).sort(Wd.sort)).reduce((Zd,mf)=>{const xf=Jd[mf];return xf&&typeof xf=="object"&&!Array.isArray(xf)?Zd[mf]=Ld(xf):Zd[mf]=xf,Zd},Object.create(null))}Ra.extract=Gd,Ra.parse=zd,Ra.stringify=(qd,Wd)=>{if(!qd)return"";Wd=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},Wd),Cd(Wd.arrayFormatSeparator);const Xd=xf=>Wd.skipNull&&md(qd[xf])||Wd.skipEmptyString&&qd[xf]==="",Jd=yd(Wd),Zd={};for(const xf of Object.keys(qd))Xd(xf)||(Zd[xf]=qd[xf]);const mf=Object.keys(Zd);return Wd.sort!==!1&&mf.sort(Wd.sort),mf.map(xf=>{const _f=qd[xf];return _f===void 0?"":_f===null?wd(xf,Wd):Array.isArray(_f)?_f.length===0&&Wd.arrayFormat==="bracket-separator"?wd(xf,Wd)+"[]":_f.reduce(Jd(xf),[]).join("&"):wd(xf,Wd)+"="+wd(_f,Wd)}).filter(xf=>xf.length>0).join("&")},Ra.parseUrl=(qd,Wd)=>{Wd=Object.assign({decode:!0},Wd);const[Xd,Jd]=dd(qd,"#");return Object.assign({url:Xd.split("?")[0]||"",query:zd(Gd(qd),Wd)},Wd&&Wd.parseFragmentIdentifier&&Jd?{fragmentIdentifier:Nd(Jd,Wd)}:{})},Ra.stringifyUrl=(qd,Wd)=>{Wd=Object.assign({encode:!0,strict:!0,[gd]:!0},Wd);const Xd=Ud(qd.url).split("?")[0]||"",Jd=Ra.extract(qd.url),Zd=Ra.parse(Jd,{sort:!1}),mf=Object.assign(Zd,qd.query);let xf=Ra.stringify(mf,Wd);xf&&(xf=`?${xf}`);let _f=jd(qd.url);return qd.fragmentIdentifier&&(_f=`#${Wd[gd]?wd(qd.fragmentIdentifier,Wd):qd.fragmentIdentifier}`),`${Xd}${xf}${_f}`},Ra.pick=(qd,Wd,Xd)=>{Xd=Object.assign({parseFragmentIdentifier:!0,[gd]:!1},Xd);const{url:Jd,query:Zd,fragmentIdentifier:mf}=Ra.parseUrl(qd,Xd);return Ra.stringifyUrl({url:Jd,query:hd(Zd,Wd),fragmentIdentifier:mf},Xd)},Ra.exclude=(qd,Wd,Xd)=>{const Jd=Array.isArray(Wd)?Zd=>!Wd.includes(Zd):(Zd,mf)=>!Wd(Zd,mf);return Ra.pick(qd,Jd,Xd)}})(queryString);const Encoder=TextEncoder;var xml$2={exports:{}},XML_CHARACTER_MAP={"&":"&",'"':""","'":"'","<":"<",">":">"};function escapeForXML$1(Ra){return Ra&&Ra.replace?Ra.replace(/([&"<>'])/g,function(ed,ud){return XML_CHARACTER_MAP[ud]}):Ra}var escapeForXML_1=escapeForXML$1,define_process_default$4={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_177c26d6-fb22-449a-87e2-db9959d53fe4",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_177c26d6-fb22-449a-87e2-db9959d53fe4",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:6575",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13671567639",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8aa748ac-6dd4-4073-9410-acf109d056c5",INVOCATION_ID:"97e2fcc9618d40ada1c1d6a5738ecc02",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"504",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub-Actions-1000003902",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_177c26d6-fb22-449a-87e2-db9959d53fe4",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_177c26d6-fb22-449a-87e2-db9959d53fe4",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_177c26d6-fb22-449a-87e2-db9959d53fe4",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2146,ppid:2145,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}},escapeForXML=escapeForXML_1,Stream=streamBrowserify.Stream,DEFAULT_INDENT=" ";function xml$1(Ra,ed){typeof ed!="object"&&(ed={indent:ed});var ud=ed.stream?new Stream:null,dd="",hd=!1,md=ed.indent?ed.indent===!0?DEFAULT_INDENT:ed.indent:"",gd=!0;function yd(Ld){gd?define_process_default$4.nextTick(Ld):Ld()}function vd(Ld,Ud){if(Ud!==void 0&&(dd+=Ud),Ld&&!hd&&(ud=ud||new Stream,hd=!0),Ld&&hd){var jd=dd;yd(function(){ud.emit("data",jd)}),dd=""}}function Cd(Ld,Ud){format(vd,resolve(Ld,md,md?1:0),Ud)}function wd(){if(ud){var Ld=dd;yd(function(){ud.emit("data",Ld),ud.emit("end"),ud.readable=!1,ud.emit("close")})}}function Nd(Ld){var Ud=Ld.encoding||"UTF-8",jd={version:"1.0",encoding:Ud};Ld.standalone&&(jd.standalone=Ld.standalone),Cd({"?xml":{_attr:jd}}),dd=dd.replace("/>","?>")}return yd(function(){gd=!1}),ed.declaration&&Nd(ed.declaration),Ra&&Ra.forEach?Ra.forEach(function(Ld,Ud){var jd;Ud+1===Ra.length&&(jd=wd),Cd(Ld,jd)}):Cd(Ra,wd),ud?(ud.readable=!0,ud):dd}function element(){var Ra=Array.prototype.slice.call(arguments),ed={_elem:resolve(Ra)};return ed.push=function(ud){if(!this.append)throw new Error("not assigned to a parent!");var dd=this,hd=this._elem.indent;format(this.append,resolve(ud,hd,this._elem.icount+(hd?1:0)),function(){dd.append(!0)})},ed.close=function(ud){ud!==void 0&&this.push(ud),this.end&&this.end()},ed}function create_indent(Ra,ed){return new Array(ed||0).join(Ra||"")}function resolve(Ra,ed,ud){ud=ud||0;var dd=create_indent(ed,ud),hd,md=Ra,gd=!1;if(typeof Ra=="object"){var yd=Object.keys(Ra);if(hd=yd[0],md=Ra[hd],md&&md._elem)return md._elem.name=hd,md._elem.icount=ud,md._elem.indent=ed,md._elem.indents=dd,md._elem.interrupt=md,md._elem}var vd=[],Cd=[],wd;function Nd(Ld){var Ud=Object.keys(Ld);Ud.forEach(function(jd){vd.push(attribute(jd,Ld[jd]))})}switch(typeof md){case"object":if(md===null)break;md._attr&&Nd(md._attr),md._cdata&&Cd.push(("/g,"]]]]>")+"]]>"),md.forEach&&(wd=!1,Cd.push(""),md.forEach(function(Ld){if(typeof Ld=="object"){var Ud=Object.keys(Ld)[0];Ud=="_attr"?Nd(Ld._attr):Cd.push(resolve(Ld,ed,ud+1))}else Cd.pop(),wd=!0,Cd.push(escapeForXML(Ld))}),wd||Cd.push(""));break;default:Cd.push(escapeForXML(md))}return{name:hd,interrupt:gd,attributes:vd,content:Cd,icount:ud,indents:dd,indent:ed}}function format(Ra,ed,ud){if(typeof ed!="object")return Ra(!1,ed);var dd=ed.interrupt?1:ed.content.length;function hd(){for(;ed.content.length;){var gd=ed.content.shift();if(gd!==void 0){if(md(gd))return;format(Ra,gd)}}Ra(!1,(dd>1?ed.indents:"")+(ed.name?"":"")+(ed.indent&&!ud?` +`:"")),ud&&ud()}function md(gd){return gd.interrupt?(gd.interrupt.append=Ra,gd.interrupt.end=hd,gd.interrupt=!1,Ra(!0),!0):!1}if(Ra(!1,ed.indents+(ed.name?"<"+ed.name:"")+(ed.attributes.length?" "+ed.attributes.join(" "):"")+(dd?ed.name?">":"":ed.name?"/>":"")+(ed.indent&&dd>1?` +`:"")),!dd)return Ra(!1,ed.indent?` +`:"");md(ed)||hd()}function attribute(Ra,ed){return Ra+'="'+escapeForXML(ed)+'"'}xml$2.exports=xml$1;xml$2.exports.element=xml$2.exports.Element=element;var xmlExports=xml$2.exports;const Xml=getDefaultExportFromCjs(xmlExports);var xml2js={},defaults={},hasRequiredDefaults;function requireDefaults(){return hasRequiredDefaults||(hasRequiredDefaults=1,(function(){defaults.defaults={"0.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:""},"0.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(commonjsGlobal)),defaults}var builder={},lib$2={},Utility={},hasRequiredUtility;function requireUtility(){return hasRequiredUtility||(hasRequiredUtility=1,(function(){var Ra,ed,ud,dd,hd,md,gd,yd=[].slice,vd={}.hasOwnProperty;Ra=function(){var Cd,wd,Nd,Ld,Ud,jd;if(jd=arguments[0],Ud=2<=arguments.length?yd.call(arguments,1):[],hd(Object.assign))Object.assign.apply(null,arguments);else for(Cd=0,Nd=Ud.length;Cd":"attribute: {"+ud+"}, parent: <"+this.parent.name+">"},ed.prototype.isEqualNode=function(ud){return!(ud.namespaceURI!==this.namespaceURI||ud.prefix!==this.prefix||ud.localName!==this.localName||ud.value!==this.value)},ed}()}).call(commonjsGlobal)),XMLAttribute.exports}var XMLNamedNodeMap={exports:{}},hasRequiredXMLNamedNodeMap;function requireXMLNamedNodeMap(){return hasRequiredXMLNamedNodeMap||(hasRequiredXMLNamedNodeMap=1,(function(){XMLNamedNodeMap.exports=function(){function Ra(ed){this.nodes=ed}return Object.defineProperty(Ra.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),Ra.prototype.clone=function(){return this.nodes=null},Ra.prototype.getNamedItem=function(ed){return this.nodes[ed]},Ra.prototype.setNamedItem=function(ed){var ud;return ud=this.nodes[ed.nodeName],this.nodes[ed.nodeName]=ed,ud||null},Ra.prototype.removeNamedItem=function(ed){var ud;return ud=this.nodes[ed],delete this.nodes[ed],ud||null},Ra.prototype.item=function(ed){return this.nodes[Object.keys(this.nodes)[ed]]||null},Ra.prototype.getNamedItemNS=function(ed,ud){throw new Error("This DOM method is not implemented.")},Ra.prototype.setNamedItemNS=function(ed){throw new Error("This DOM method is not implemented.")},Ra.prototype.removeNamedItemNS=function(ed,ud){throw new Error("This DOM method is not implemented.")},Ra}()}).call(commonjsGlobal)),XMLNamedNodeMap.exports}var hasRequiredXMLElement;function requireXMLElement(){return hasRequiredXMLElement||(hasRequiredXMLElement=1,(function(){var Ra,ed,ud,dd,hd,md,gd,yd,vd=function(wd,Nd){for(var Ld in Nd)Cd.call(Nd,Ld)&&(wd[Ld]=Nd[Ld]);function Ud(){this.constructor=wd}return Ud.prototype=Nd.prototype,wd.prototype=new Ud,wd.__super__=Nd.prototype,wd},Cd={}.hasOwnProperty;yd=requireUtility(),gd=yd.isObject,md=yd.isFunction,hd=yd.getValue,dd=requireXMLNode(),Ra=requireNodeType(),ed=requireXMLAttribute(),ud=requireXMLNamedNodeMap(),XMLElement.exports=function(wd){vd(Nd,wd);function Nd(Ld,Ud,jd){var Gd,Yd,zd,qd;if(Nd.__super__.constructor.call(this,Ld),Ud==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(Ud),this.type=Ra.Element,this.attribs={},this.schemaTypeInfo=null,jd!=null&&this.attribute(jd),Ld.type===Ra.Document&&(this.isRoot=!0,this.documentObject=Ld,Ld.rootObject=this,Ld.children)){for(qd=Ld.children,Yd=0,zd=qd.length;Yd=Gd;Ud=0<=Gd?++jd:--jd)if(!this.attribs[Ud].isEqualNode(Ld.attribs[Ud]))return!1;return!0},Nd}(dd)}).call(commonjsGlobal)),XMLElement.exports}var XMLCData={exports:{}},XMLCharacterData={exports:{}},hasRequiredXMLCharacterData;function requireXMLCharacterData(){return hasRequiredXMLCharacterData||(hasRequiredXMLCharacterData=1,(function(){var Ra,ed=function(dd,hd){for(var md in hd)ud.call(hd,md)&&(dd[md]=hd[md]);function gd(){this.constructor=dd}return gd.prototype=hd.prototype,dd.prototype=new gd,dd.__super__=hd.prototype,dd},ud={}.hasOwnProperty;Ra=requireXMLNode(),XMLCharacterData.exports=function(dd){ed(hd,dd);function hd(md){hd.__super__.constructor.call(this,md),this.value=""}return Object.defineProperty(hd.prototype,"data",{get:function(){return this.value},set:function(md){return this.value=md||""}}),Object.defineProperty(hd.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(hd.prototype,"textContent",{get:function(){return this.value},set:function(md){return this.value=md||""}}),hd.prototype.clone=function(){return Object.create(this)},hd.prototype.substringData=function(md,gd){throw new Error("This DOM method is not implemented."+this.debugInfo())},hd.prototype.appendData=function(md){throw new Error("This DOM method is not implemented."+this.debugInfo())},hd.prototype.insertData=function(md,gd){throw new Error("This DOM method is not implemented."+this.debugInfo())},hd.prototype.deleteData=function(md,gd){throw new Error("This DOM method is not implemented."+this.debugInfo())},hd.prototype.replaceData=function(md,gd,yd){throw new Error("This DOM method is not implemented."+this.debugInfo())},hd.prototype.isEqualNode=function(md){return!(!hd.__super__.isEqualNode.apply(this,arguments).isEqualNode(md)||md.data!==this.data)},hd}(Ra)}).call(commonjsGlobal)),XMLCharacterData.exports}var hasRequiredXMLCData;function requireXMLCData(){return hasRequiredXMLCData||(hasRequiredXMLCData=1,(function(){var Ra,ed,ud=function(hd,md){for(var gd in md)dd.call(md,gd)&&(hd[gd]=md[gd]);function yd(){this.constructor=hd}return yd.prototype=md.prototype,hd.prototype=new yd,hd.__super__=md.prototype,hd},dd={}.hasOwnProperty;Ra=requireNodeType(),ed=requireXMLCharacterData(),XMLCData.exports=function(hd){ud(md,hd);function md(gd,yd){if(md.__super__.constructor.call(this,gd),yd==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=Ra.CData,this.value=this.stringify.cdata(yd)}return md.prototype.clone=function(){return Object.create(this)},md.prototype.toString=function(gd){return this.options.writer.cdata(this,this.options.writer.filterOptions(gd))},md}(ed)}).call(commonjsGlobal)),XMLCData.exports}var XMLComment={exports:{}},hasRequiredXMLComment;function requireXMLComment(){return hasRequiredXMLComment||(hasRequiredXMLComment=1,(function(){var Ra,ed,ud=function(hd,md){for(var gd in md)dd.call(md,gd)&&(hd[gd]=md[gd]);function yd(){this.constructor=hd}return yd.prototype=md.prototype,hd.prototype=new yd,hd.__super__=md.prototype,hd},dd={}.hasOwnProperty;Ra=requireNodeType(),ed=requireXMLCharacterData(),XMLComment.exports=function(hd){ud(md,hd);function md(gd,yd){if(md.__super__.constructor.call(this,gd),yd==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=Ra.Comment,this.value=this.stringify.comment(yd)}return md.prototype.clone=function(){return Object.create(this)},md.prototype.toString=function(gd){return this.options.writer.comment(this,this.options.writer.filterOptions(gd))},md}(ed)}).call(commonjsGlobal)),XMLComment.exports}var XMLDeclaration={exports:{}},hasRequiredXMLDeclaration;function requireXMLDeclaration(){return hasRequiredXMLDeclaration||(hasRequiredXMLDeclaration=1,(function(){var Ra,ed,ud,dd=function(md,gd){for(var yd in gd)hd.call(gd,yd)&&(md[yd]=gd[yd]);function vd(){this.constructor=md}return vd.prototype=gd.prototype,md.prototype=new vd,md.__super__=gd.prototype,md},hd={}.hasOwnProperty;ud=requireUtility().isObject,ed=requireXMLNode(),Ra=requireNodeType(),XMLDeclaration.exports=function(md){dd(gd,md);function gd(yd,vd,Cd,wd){var Nd;gd.__super__.constructor.call(this,yd),ud(vd)&&(Nd=vd,vd=Nd.version,Cd=Nd.encoding,wd=Nd.standalone),vd||(vd="1.0"),this.type=Ra.Declaration,this.version=this.stringify.xmlVersion(vd),Cd!=null&&(this.encoding=this.stringify.xmlEncoding(Cd)),wd!=null&&(this.standalone=this.stringify.xmlStandalone(wd))}return gd.prototype.toString=function(yd){return this.options.writer.declaration(this,this.options.writer.filterOptions(yd))},gd}(ed)}).call(commonjsGlobal)),XMLDeclaration.exports}var XMLDocType={exports:{}},XMLDTDAttList={exports:{}},hasRequiredXMLDTDAttList;function requireXMLDTDAttList(){return hasRequiredXMLDTDAttList||(hasRequiredXMLDTDAttList=1,(function(){var Ra,ed,ud=function(hd,md){for(var gd in md)dd.call(md,gd)&&(hd[gd]=md[gd]);function yd(){this.constructor=hd}return yd.prototype=md.prototype,hd.prototype=new yd,hd.__super__=md.prototype,hd},dd={}.hasOwnProperty;ed=requireXMLNode(),Ra=requireNodeType(),XMLDTDAttList.exports=function(hd){ud(md,hd);function md(gd,yd,vd,Cd,wd,Nd){if(md.__super__.constructor.call(this,gd),yd==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(vd==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(yd));if(!Cd)throw new Error("Missing DTD attribute type. "+this.debugInfo(yd));if(!wd)throw new Error("Missing DTD attribute default. "+this.debugInfo(yd));if(wd.indexOf("#")!==0&&(wd="#"+wd),!wd.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(yd));if(Nd&&!wd.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(yd));this.elementName=this.stringify.name(yd),this.type=Ra.AttributeDeclaration,this.attributeName=this.stringify.name(vd),this.attributeType=this.stringify.dtdAttType(Cd),Nd&&(this.defaultValue=this.stringify.dtdAttDefault(Nd)),this.defaultValueType=wd}return md.prototype.toString=function(gd){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(gd))},md}(ed)}).call(commonjsGlobal)),XMLDTDAttList.exports}var XMLDTDEntity={exports:{}},hasRequiredXMLDTDEntity;function requireXMLDTDEntity(){return hasRequiredXMLDTDEntity||(hasRequiredXMLDTDEntity=1,(function(){var Ra,ed,ud,dd=function(md,gd){for(var yd in gd)hd.call(gd,yd)&&(md[yd]=gd[yd]);function vd(){this.constructor=md}return vd.prototype=gd.prototype,md.prototype=new vd,md.__super__=gd.prototype,md},hd={}.hasOwnProperty;ud=requireUtility().isObject,ed=requireXMLNode(),Ra=requireNodeType(),XMLDTDEntity.exports=function(md){dd(gd,md);function gd(yd,vd,Cd,wd){if(gd.__super__.constructor.call(this,yd),Cd==null)throw new Error("Missing DTD entity name. "+this.debugInfo(Cd));if(wd==null)throw new Error("Missing DTD entity value. "+this.debugInfo(Cd));if(this.pe=!!vd,this.name=this.stringify.name(Cd),this.type=Ra.EntityDeclaration,!ud(wd))this.value=this.stringify.dtdEntityValue(wd),this.internal=!0;else{if(!wd.pubID&&!wd.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(Cd));if(wd.pubID&&!wd.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(Cd));if(this.internal=!1,wd.pubID!=null&&(this.pubID=this.stringify.dtdPubID(wd.pubID)),wd.sysID!=null&&(this.sysID=this.stringify.dtdSysID(wd.sysID)),wd.nData!=null&&(this.nData=this.stringify.dtdNData(wd.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(Cd))}}return Object.defineProperty(gd.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(gd.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(gd.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(gd.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(gd.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(gd.prototype,"xmlVersion",{get:function(){return null}}),gd.prototype.toString=function(yd){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(yd))},gd}(ed)}).call(commonjsGlobal)),XMLDTDEntity.exports}var XMLDTDElement={exports:{}},hasRequiredXMLDTDElement;function requireXMLDTDElement(){return hasRequiredXMLDTDElement||(hasRequiredXMLDTDElement=1,(function(){var Ra,ed,ud=function(hd,md){for(var gd in md)dd.call(md,gd)&&(hd[gd]=md[gd]);function yd(){this.constructor=hd}return yd.prototype=md.prototype,hd.prototype=new yd,hd.__super__=md.prototype,hd},dd={}.hasOwnProperty;ed=requireXMLNode(),Ra=requireNodeType(),XMLDTDElement.exports=function(hd){ud(md,hd);function md(gd,yd,vd){if(md.__super__.constructor.call(this,gd),yd==null)throw new Error("Missing DTD element name. "+this.debugInfo());vd||(vd="(#PCDATA)"),Array.isArray(vd)&&(vd="("+vd.join(",")+")"),this.name=this.stringify.name(yd),this.type=Ra.ElementDeclaration,this.value=this.stringify.dtdElementValue(vd)}return md.prototype.toString=function(gd){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(gd))},md}(ed)}).call(commonjsGlobal)),XMLDTDElement.exports}var XMLDTDNotation={exports:{}},hasRequiredXMLDTDNotation;function requireXMLDTDNotation(){return hasRequiredXMLDTDNotation||(hasRequiredXMLDTDNotation=1,(function(){var Ra,ed,ud=function(hd,md){for(var gd in md)dd.call(md,gd)&&(hd[gd]=md[gd]);function yd(){this.constructor=hd}return yd.prototype=md.prototype,hd.prototype=new yd,hd.__super__=md.prototype,hd},dd={}.hasOwnProperty;ed=requireXMLNode(),Ra=requireNodeType(),XMLDTDNotation.exports=function(hd){ud(md,hd);function md(gd,yd,vd){if(md.__super__.constructor.call(this,gd),yd==null)throw new Error("Missing DTD notation name. "+this.debugInfo(yd));if(!vd.pubID&&!vd.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(yd));this.name=this.stringify.name(yd),this.type=Ra.NotationDeclaration,vd.pubID!=null&&(this.pubID=this.stringify.dtdPubID(vd.pubID)),vd.sysID!=null&&(this.sysID=this.stringify.dtdSysID(vd.sysID))}return Object.defineProperty(md.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(md.prototype,"systemId",{get:function(){return this.sysID}}),md.prototype.toString=function(gd){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(gd))},md}(ed)}).call(commonjsGlobal)),XMLDTDNotation.exports}var hasRequiredXMLDocType;function requireXMLDocType(){return hasRequiredXMLDocType||(hasRequiredXMLDocType=1,(function(){var Ra,ed,ud,dd,hd,md,gd,yd,vd=function(wd,Nd){for(var Ld in Nd)Cd.call(Nd,Ld)&&(wd[Ld]=Nd[Ld]);function Ud(){this.constructor=wd}return Ud.prototype=Nd.prototype,wd.prototype=new Ud,wd.__super__=Nd.prototype,wd},Cd={}.hasOwnProperty;yd=requireUtility().isObject,gd=requireXMLNode(),Ra=requireNodeType(),ed=requireXMLDTDAttList(),dd=requireXMLDTDEntity(),ud=requireXMLDTDElement(),hd=requireXMLDTDNotation(),md=requireXMLNamedNodeMap(),XMLDocType.exports=function(wd){vd(Nd,wd);function Nd(Ld,Ud,jd){var Gd,Yd,zd,qd,Wd,Xd;if(Nd.__super__.constructor.call(this,Ld),this.type=Ra.DocType,Ld.children){for(qd=Ld.children,Yd=0,zd=qd.length;Yd":(Jd=this.parent)!=null&&Jd.name?"node: <"+Wd+">, parent: <"+this.parent.name+">":"node: <"+Wd+">"},qd.prototype.ele=function(Wd,Xd,Jd){return this.element(Wd,Xd,Jd)},qd.prototype.nod=function(Wd,Xd,Jd){return this.node(Wd,Xd,Jd)},qd.prototype.txt=function(Wd){return this.text(Wd)},qd.prototype.dat=function(Wd){return this.cdata(Wd)},qd.prototype.com=function(Wd){return this.comment(Wd)},qd.prototype.ins=function(Wd,Xd){return this.instruction(Wd,Xd)},qd.prototype.doc=function(){return this.document()},qd.prototype.dec=function(Wd,Xd,Jd){return this.declaration(Wd,Xd,Jd)},qd.prototype.e=function(Wd,Xd,Jd){return this.element(Wd,Xd,Jd)},qd.prototype.n=function(Wd,Xd,Jd){return this.node(Wd,Xd,Jd)},qd.prototype.t=function(Wd){return this.text(Wd)},qd.prototype.d=function(Wd){return this.cdata(Wd)},qd.prototype.c=function(Wd){return this.comment(Wd)},qd.prototype.r=function(Wd){return this.raw(Wd)},qd.prototype.i=function(Wd,Xd){return this.instruction(Wd,Xd)},qd.prototype.u=function(){return this.up()},qd.prototype.importXMLBuilder=function(Wd){return this.importDocument(Wd)},qd.prototype.replaceChild=function(Wd,Xd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.removeChild=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.appendChild=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.hasChildNodes=function(){return this.children.length!==0},qd.prototype.cloneNode=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.isSupported=function(Wd,Xd){return!0},qd.prototype.hasAttributes=function(){return this.attribs.length!==0},qd.prototype.compareDocumentPosition=function(Wd){var Xd,Jd;return Xd=this,Xd===Wd?0:this.document()!==Wd.document()?(Jd=Ra.Disconnected|Ra.ImplementationSpecific,Math.random()<.5?Jd|=Ra.Preceding:Jd|=Ra.Following,Jd):Xd.isAncestor(Wd)?Ra.Contains|Ra.Preceding:Xd.isDescendant(Wd)?Ra.Contains|Ra.Following:Xd.isPreceding(Wd)?Ra.Preceding:Ra.Following},qd.prototype.isSameNode=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.lookupPrefix=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.isDefaultNamespace=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.lookupNamespaceURI=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.isEqualNode=function(Wd){var Xd,Jd,Zd;if(Wd.nodeType!==this.nodeType||Wd.children.length!==this.children.length)return!1;for(Xd=Jd=0,Zd=this.children.length-1;0<=Zd?Jd<=Zd:Jd>=Zd;Xd=0<=Zd?++Jd:--Jd)if(!this.children[Xd].isEqualNode(Wd.children[Xd]))return!1;return!0},qd.prototype.getFeature=function(Wd,Xd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.setUserData=function(Wd,Xd,Jd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.getUserData=function(Wd){throw new Error("This DOM method is not implemented."+this.debugInfo())},qd.prototype.contains=function(Wd){return Wd?Wd===this||this.isDescendant(Wd):!1},qd.prototype.isDescendant=function(Wd){var Xd,Jd,Zd,mf,xf;for(xf=this.children,Zd=0,mf=xf.length;ZdJd},qd.prototype.treePosition=function(Wd){var Xd,Jd;return Jd=0,Xd=!1,this.foreachTreeNode(this.document(),function(Zd){if(Jd++,!Xd&&Zd===Wd)return Xd=!0}),Xd?Jd:-1},qd.prototype.foreachTreeNode=function(Wd,Xd){var Jd,Zd,mf,xf,_f;for(Wd||(Wd=this.document()),xf=Wd.children,Zd=0,mf=xf.length;Zd","]]]]>"),this.assertLegalChar(dd))},ud.prototype.comment=function(dd){if(this.options.noValidation)return dd;if(dd=""+dd||"",dd.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+dd);return this.assertLegalChar(dd)},ud.prototype.raw=function(dd){return this.options.noValidation?dd:""+dd||""},ud.prototype.attValue=function(dd){return this.options.noValidation?dd:this.assertLegalChar(this.attEscape(dd=""+dd||""))},ud.prototype.insTarget=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.insValue=function(dd){if(this.options.noValidation)return dd;if(dd=""+dd||"",dd.match(/\?>/))throw new Error("Invalid processing instruction value: "+dd);return this.assertLegalChar(dd)},ud.prototype.xmlVersion=function(dd){if(this.options.noValidation)return dd;if(dd=""+dd||"",!dd.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+dd);return dd},ud.prototype.xmlEncoding=function(dd){if(this.options.noValidation)return dd;if(dd=""+dd||"",!dd.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+dd);return this.assertLegalChar(dd)},ud.prototype.xmlStandalone=function(dd){return this.options.noValidation?dd:dd?"yes":"no"},ud.prototype.dtdPubID=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.dtdSysID=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.dtdElementValue=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.dtdAttType=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.dtdAttDefault=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.dtdEntityValue=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.dtdNData=function(dd){return this.options.noValidation?dd:this.assertLegalChar(""+dd||"")},ud.prototype.convertAttKey="@",ud.prototype.convertPIKey="?",ud.prototype.convertTextKey="#text",ud.prototype.convertCDataKey="#cdata",ud.prototype.convertCommentKey="#comment",ud.prototype.convertRawKey="#raw",ud.prototype.assertLegalChar=function(dd){var hd,md;if(this.options.noValidation)return dd;if(hd="",this.options.version==="1.0"){if(hd=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,md=dd.match(hd))throw new Error("Invalid character in string: "+dd+" at index "+md.index)}else if(this.options.version==="1.1"&&(hd=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,md=dd.match(hd)))throw new Error("Invalid character in string: "+dd+" at index "+md.index);return dd},ud.prototype.assertLegalName=function(dd){var hd;if(this.options.noValidation)return dd;if(this.assertLegalChar(dd),hd=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!dd.match(hd))throw new Error("Invalid character in name");return dd},ud.prototype.textEscape=function(dd){var hd;return this.options.noValidation?dd:(hd=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,dd.replace(hd,"&").replace(//g,">").replace(/\r/g," "))},ud.prototype.attEscape=function(dd){var hd;return this.options.noValidation?dd:(hd=this.options.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,dd.replace(hd,"&").replace(/0)?new Array(vd).join(gd.indent):""},hd.prototype.endline=function(md,gd,yd){return!gd.pretty||gd.suppressPrettyCount?"":gd.newline},hd.prototype.attribute=function(md,gd,yd){var vd;return this.openAttribute(md,gd,yd),vd=" "+md.name+'="'+md.value+'"',this.closeAttribute(md,gd,yd),vd},hd.prototype.cdata=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+""+this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.comment=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+""+this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.declaration=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+"",vd+=this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.docType=function(md,gd,yd){var vd,Cd,wd,Nd,Ld;if(yd||(yd=0),this.openNode(md,gd,yd),gd.state=ed.OpenTag,Nd=this.indent(md,gd,yd),Nd+="0){for(Nd+=" [",Nd+=this.endline(md,gd,yd),gd.state=ed.InsideTag,Ld=md.children,Cd=0,wd=Ld.length;Cd",Nd+=this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),Nd},hd.prototype.element=function(md,gd,yd){var vd,Cd,wd,Nd,Ld,Ud,jd,Gd,Yd,zd,qd,Wd,Xd,Jd;yd||(yd=0),zd=!1,qd="",this.openNode(md,gd,yd),gd.state=ed.OpenTag,qd+=this.indent(md,gd,yd)+"<"+md.name,Wd=md.attribs;for(Yd in Wd)dd.call(Wd,Yd)&&(vd=Wd[Yd],qd+=this.attribute(vd,gd,yd));if(wd=md.children.length,Nd=wd===0?null:md.children[0],wd===0||md.children.every(function(Zd){return(Zd.type===Ra.Text||Zd.type===Ra.Raw)&&Zd.value===""}))gd.allowEmpty?(qd+=">",gd.state=ed.CloseTag,qd+=""+this.endline(md,gd,yd)):(gd.state=ed.CloseTag,qd+=gd.spaceBeforeSlash+"/>"+this.endline(md,gd,yd));else if(gd.pretty&&wd===1&&(Nd.type===Ra.Text||Nd.type===Ra.Raw)&&Nd.value!=null)qd+=">",gd.state=ed.InsideTag,gd.suppressPrettyCount++,zd=!0,qd+=this.writeChildNode(Nd,gd,yd+1),gd.suppressPrettyCount--,zd=!1,gd.state=ed.CloseTag,qd+=""+this.endline(md,gd,yd);else{if(gd.dontPrettyTextNodes){for(Xd=md.children,Ld=0,jd=Xd.length;Ld"+this.endline(md,gd,yd),gd.state=ed.InsideTag,Jd=md.children,Ud=0,Gd=Jd.length;Ud",zd&&gd.suppressPrettyCount--,qd+=this.endline(md,gd,yd),gd.state=ed.None}return this.closeNode(md,gd,yd),qd},hd.prototype.writeChildNode=function(md,gd,yd){switch(md.type){case Ra.CData:return this.cdata(md,gd,yd);case Ra.Comment:return this.comment(md,gd,yd);case Ra.Element:return this.element(md,gd,yd);case Ra.Raw:return this.raw(md,gd,yd);case Ra.Text:return this.text(md,gd,yd);case Ra.ProcessingInstruction:return this.processingInstruction(md,gd,yd);case Ra.Dummy:return"";case Ra.Declaration:return this.declaration(md,gd,yd);case Ra.DocType:return this.docType(md,gd,yd);case Ra.AttributeDeclaration:return this.dtdAttList(md,gd,yd);case Ra.ElementDeclaration:return this.dtdElement(md,gd,yd);case Ra.EntityDeclaration:return this.dtdEntity(md,gd,yd);case Ra.NotationDeclaration:return this.dtdNotation(md,gd,yd);default:throw new Error("Unknown XML node type: "+md.constructor.name)}},hd.prototype.processingInstruction=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+"",vd+=this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.raw=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd),gd.state=ed.InsideTag,vd+=md.value,gd.state=ed.CloseTag,vd+=this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.text=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd),gd.state=ed.InsideTag,vd+=md.value,gd.state=ed.CloseTag,vd+=this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.dtdAttList=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+""+this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.dtdElement=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+""+this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.dtdEntity=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+""+this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.dtdNotation=function(md,gd,yd){var vd;return this.openNode(md,gd,yd),gd.state=ed.OpenTag,vd=this.indent(md,gd,yd)+""+this.endline(md,gd,yd),gd.state=ed.None,this.closeNode(md,gd,yd),vd},hd.prototype.openNode=function(md,gd,yd){},hd.prototype.closeNode=function(md,gd,yd){},hd.prototype.openAttribute=function(md,gd,yd){},hd.prototype.closeAttribute=function(md,gd,yd){},hd}()}).call(commonjsGlobal)),XMLWriterBase.exports}var hasRequiredXMLStringWriter;function requireXMLStringWriter(){return hasRequiredXMLStringWriter||(hasRequiredXMLStringWriter=1,(function(){var Ra,ed=function(dd,hd){for(var md in hd)ud.call(hd,md)&&(dd[md]=hd[md]);function gd(){this.constructor=dd}return gd.prototype=hd.prototype,dd.prototype=new gd,dd.__super__=hd.prototype,dd},ud={}.hasOwnProperty;Ra=requireXMLWriterBase(),XMLStringWriter.exports=function(dd){ed(hd,dd);function hd(md){hd.__super__.constructor.call(this,md)}return hd.prototype.document=function(md,gd){var yd,vd,Cd,wd,Nd;for(gd=this.filterOptions(gd),wd="",Nd=md.children,vd=0,Cd=Nd.length;vd=0;)this.up();return this.onEnd()},xf.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},xf.prototype.openNode=function(_f){var vf,gf,Af,Df;if(!_f.isOpen){if(!this.root&&this.currentLevel===0&&_f.type===Ra.Element&&(this.root=_f),gf="",_f.type===Ra.Element){this.writerOptions.state=ed.OpenTag,gf=this.writer.indent(_f,this.writerOptions,this.currentLevel)+"<"+_f.name,Df=_f.attribs;for(Af in Df)mf.call(Df,Af)&&(vf=Df[Af],gf+=this.writer.attribute(vf,this.writerOptions,this.currentLevel));gf+=(_f.children?">":"/>")+this.writer.endline(_f,this.writerOptions,this.currentLevel),this.writerOptions.state=ed.InsideTag}else this.writerOptions.state=ed.OpenTag,gf=this.writer.indent(_f,this.writerOptions,this.currentLevel)+""),gf+=this.writer.endline(_f,this.writerOptions,this.currentLevel);return this.onData(gf,this.currentLevel),_f.isOpen=!0}},xf.prototype.closeNode=function(_f){var vf;if(!_f.isClosed)return vf="",this.writerOptions.state=ed.CloseTag,_f.type===Ra.Element?vf=this.writer.indent(_f,this.writerOptions,this.currentLevel)+""+this.writer.endline(_f,this.writerOptions,this.currentLevel):vf=this.writer.indent(_f,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(_f,this.writerOptions,this.currentLevel),this.writerOptions.state=ed.None,this.onData(vf,this.currentLevel),_f.isClosed=!0},xf.prototype.onData=function(_f,vf){return this.documentStarted=!0,this.onDataCallback(_f,vf+1)},xf.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},xf.prototype.debugInfo=function(_f){return _f==null?"":"node: <"+_f+">"},xf.prototype.ele=function(){return this.element.apply(this,arguments)},xf.prototype.nod=function(_f,vf,gf){return this.node(_f,vf,gf)},xf.prototype.txt=function(_f){return this.text(_f)},xf.prototype.dat=function(_f){return this.cdata(_f)},xf.prototype.com=function(_f){return this.comment(_f)},xf.prototype.ins=function(_f,vf){return this.instruction(_f,vf)},xf.prototype.dec=function(_f,vf,gf){return this.declaration(_f,vf,gf)},xf.prototype.dtd=function(_f,vf,gf){return this.doctype(_f,vf,gf)},xf.prototype.e=function(_f,vf,gf){return this.element(_f,vf,gf)},xf.prototype.n=function(_f,vf,gf){return this.node(_f,vf,gf)},xf.prototype.t=function(_f){return this.text(_f)},xf.prototype.d=function(_f){return this.cdata(_f)},xf.prototype.c=function(_f){return this.comment(_f)},xf.prototype.r=function(_f){return this.raw(_f)},xf.prototype.i=function(_f,vf){return this.instruction(_f,vf)},xf.prototype.att=function(){return this.currentNode&&this.currentNode.type===Ra.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},xf.prototype.a=function(){return this.currentNode&&this.currentNode.type===Ra.DocType?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},xf.prototype.ent=function(_f,vf){return this.entity(_f,vf)},xf.prototype.pent=function(_f,vf){return this.pEntity(_f,vf)},xf.prototype.not=function(_f,vf){return this.notation(_f,vf)},xf}()}).call(commonjsGlobal)),XMLDocumentCB.exports}var XMLStreamWriter={exports:{}},hasRequiredXMLStreamWriter;function requireXMLStreamWriter(){return hasRequiredXMLStreamWriter||(hasRequiredXMLStreamWriter=1,(function(){var Ra,ed,ud,dd=function(md,gd){for(var yd in gd)hd.call(gd,yd)&&(md[yd]=gd[yd]);function vd(){this.constructor=md}return vd.prototype=gd.prototype,md.prototype=new vd,md.__super__=gd.prototype,md},hd={}.hasOwnProperty;Ra=requireNodeType(),ud=requireXMLWriterBase(),ed=requireWriterState(),XMLStreamWriter.exports=function(md){dd(gd,md);function gd(yd,vd){this.stream=yd,gd.__super__.constructor.call(this,vd)}return gd.prototype.endline=function(yd,vd,Cd){return yd.isLastRootNode&&vd.state===ed.CloseTag?"":gd.__super__.endline.call(this,yd,vd,Cd)},gd.prototype.document=function(yd,vd){var Cd,wd,Nd,Ld,Ud,jd,Gd,Yd,zd;for(Gd=yd.children,wd=Nd=0,Ud=Gd.length;Nd0){for(this.stream.write(" ["),this.stream.write(this.endline(yd,vd,Cd)),vd.state=ed.InsideTag,Ud=yd.children,Nd=0,Ld=Ud.length;Nd"),this.stream.write(this.endline(yd,vd,Cd)),vd.state=ed.None,this.closeNode(yd,vd,Cd)},gd.prototype.element=function(yd,vd,Cd){var wd,Nd,Ld,Ud,jd,Gd,Yd,zd,qd;Cd||(Cd=0),this.openNode(yd,vd,Cd),vd.state=ed.OpenTag,this.stream.write(this.indent(yd,vd,Cd)+"<"+yd.name),zd=yd.attribs;for(Yd in zd)hd.call(zd,Yd)&&(wd=zd[Yd],this.attribute(wd,vd,Cd));if(Ld=yd.children.length,Ud=Ld===0?null:yd.children[0],Ld===0||yd.children.every(function(Wd){return(Wd.type===Ra.Text||Wd.type===Ra.Raw)&&Wd.value===""}))vd.allowEmpty?(this.stream.write(">"),vd.state=ed.CloseTag,this.stream.write("")):(vd.state=ed.CloseTag,this.stream.write(vd.spaceBeforeSlash+"/>"));else if(vd.pretty&&Ld===1&&(Ud.type===Ra.Text||Ud.type===Ra.Raw)&&Ud.value!=null)this.stream.write(">"),vd.state=ed.InsideTag,vd.suppressPrettyCount++,this.writeChildNode(Ud,vd,Cd+1),vd.suppressPrettyCount--,vd.state=ed.CloseTag,this.stream.write("");else{for(this.stream.write(">"+this.endline(yd,vd,Cd)),vd.state=ed.InsideTag,qd=yd.children,jd=0,Gd=qd.length;jd")}return this.stream.write(this.endline(yd,vd,Cd)),vd.state=ed.None,this.closeNode(yd,vd,Cd)},gd.prototype.processingInstruction=function(yd,vd,Cd){return this.stream.write(gd.__super__.processingInstruction.call(this,yd,vd,Cd))},gd.prototype.raw=function(yd,vd,Cd){return this.stream.write(gd.__super__.raw.call(this,yd,vd,Cd))},gd.prototype.text=function(yd,vd,Cd){return this.stream.write(gd.__super__.text.call(this,yd,vd,Cd))},gd.prototype.dtdAttList=function(yd,vd,Cd){return this.stream.write(gd.__super__.dtdAttList.call(this,yd,vd,Cd))},gd.prototype.dtdElement=function(yd,vd,Cd){return this.stream.write(gd.__super__.dtdElement.call(this,yd,vd,Cd))},gd.prototype.dtdEntity=function(yd,vd,Cd){return this.stream.write(gd.__super__.dtdEntity.call(this,yd,vd,Cd))},gd.prototype.dtdNotation=function(yd,vd,Cd){return this.stream.write(gd.__super__.dtdNotation.call(this,yd,vd,Cd))},gd}(ud)}).call(commonjsGlobal)),XMLStreamWriter.exports}var hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,(function(){var Ra,ed,ud,dd,hd,md,gd,yd,vd,Cd;Cd=requireUtility(),yd=Cd.assign,vd=Cd.isFunction,ud=requireXMLDOMImplementation(),dd=requireXMLDocument(),hd=requireXMLDocumentCB(),gd=requireXMLStringWriter(),md=requireXMLStreamWriter(),Ra=requireNodeType(),ed=requireWriterState(),lib$2.create=function(wd,Nd,Ld,Ud){var jd,Gd;if(wd==null)throw new Error("Root element needs a name.");return Ud=yd({},Nd,Ld,Ud),jd=new dd(Ud),Gd=jd.element(wd),Ud.headless||(jd.declaration(Ud),(Ud.pubID!=null||Ud.sysID!=null)&&jd.dtd(Ud)),Gd},lib$2.begin=function(wd,Nd,Ld){var Ud;return vd(wd)&&(Ud=[wd,Nd],Nd=Ud[0],Ld=Ud[1],wd={}),Nd?new hd(wd,Nd,Ld):new dd(wd)},lib$2.stringWriter=function(wd){return new gd(wd)},lib$2.streamWriter=function(wd,Nd){return new md(wd,Nd)},lib$2.implementation=new ud,lib$2.nodeType=Ra,lib$2.writerState=ed}).call(commonjsGlobal)),lib$2}var hasRequiredBuilder;function requireBuilder(){return hasRequiredBuilder||(hasRequiredBuilder=1,(function(){var Ra,ed,ud,dd,hd,md={}.hasOwnProperty;Ra=requireLib(),ed=requireDefaults().defaults,dd=function(gd){return typeof gd=="string"&&(gd.indexOf("&")>=0||gd.indexOf(">")>=0||gd.indexOf("<")>=0)},hd=function(gd){return""},ud=function(gd){return gd.replace("]]>","]]]]>")},builder.Builder=function(){function gd(yd){var vd,Cd,wd;this.options={},Cd=ed["0.2"];for(vd in Cd)md.call(Cd,vd)&&(wd=Cd[vd],this.options[vd]=wd);for(vd in yd)md.call(yd,vd)&&(wd=yd[vd],this.options[vd]=wd)}return gd.prototype.buildObject=function(yd){var vd,Cd,wd,Nd,Ld;return vd=this.options.attrkey,Cd=this.options.charkey,Object.keys(yd).length===1&&this.options.rootName===ed["0.2"].rootName?(Ld=Object.keys(yd)[0],yd=yd[Ld]):Ld=this.options.rootName,wd=function(Ud){return function(jd,Gd){var Yd,zd,qd,Wd,Xd,Jd;if(typeof Gd!="object")Ud.options.cdata&&dd(Gd)?jd.raw(hd(Gd)):jd.txt(Gd);else if(Array.isArray(Gd)){for(Wd in Gd)if(md.call(Gd,Wd)){zd=Gd[Wd];for(Xd in zd)qd=zd[Xd],jd=wd(jd.ele(Xd),qd).up()}}else for(Xd in Gd)if(md.call(Gd,Xd))if(zd=Gd[Xd],Xd===vd){if(typeof zd=="object")for(Yd in zd)Jd=zd[Yd],jd=jd.att(Yd,Jd)}else if(Xd===Cd)Ud.options.cdata&&dd(zd)?jd=jd.raw(hd(zd)):jd=jd.txt(zd);else if(Array.isArray(zd))for(Wd in zd)md.call(zd,Wd)&&(qd=zd[Wd],typeof qd=="string"?Ud.options.cdata&&dd(qd)?jd=jd.ele(Xd).raw(hd(qd)).up():jd=jd.ele(Xd,qd).up():jd=wd(jd.ele(Xd),qd).up());else typeof zd=="object"?jd=wd(jd.ele(Xd),zd).up():typeof zd=="string"&&Ud.options.cdata&&dd(zd)?jd=jd.ele(Xd).raw(hd(zd)).up():(zd==null&&(zd=""),jd=jd.ele(Xd,zd.toString()).up());return jd}}(this),Nd=Ra.create(Ld,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),wd(Nd,yd).end(this.options.renderOpts)},gd}()}).call(commonjsGlobal)),builder}var parser={},sax={},hasRequiredSax;function requireSax(){return hasRequiredSax||(hasRequiredSax=1,function(Ra){(function(ed){ed.parser=function(kf,Rf){return new dd(kf,Rf)},ed.SAXParser=dd,ed.SAXStream=wd,ed.createStream=Cd,ed.MAX_BUFFER_LENGTH=64*1024;var ud=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];ed.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function dd(kf,Rf){if(!(this instanceof dd))return new dd(kf,Rf);var _h=this;md(_h),_h.q=_h.c="",_h.bufferCheckPosition=ed.MAX_BUFFER_LENGTH,_h.opt=Rf||{},_h.opt.lowercase=_h.opt.lowercase||_h.opt.lowercasetags,_h.looseCase=_h.opt.lowercase?"toLowerCase":"toUpperCase",_h.tags=[],_h.closed=_h.closedRoot=_h.sawRoot=!1,_h.tag=_h.error=null,_h.strict=!!kf,_h.noscript=!!(kf||_h.opt.noscript),_h.state=_f.BEGIN,_h.strictEntities=_h.opt.strictEntities,_h.ENTITIES=_h.strictEntities?Object.create(ed.XML_ENTITIES):Object.create(ed.ENTITIES),_h.attribList=[],_h.opt.xmlns&&(_h.ns=Object.create(Gd)),_h.opt.unquotedAttributeValues===void 0&&(_h.opt.unquotedAttributeValues=!kf),_h.trackPosition=_h.opt.position!==!1,_h.trackPosition&&(_h.position=_h.line=_h.column=0),gf(_h,"onready")}Object.create||(Object.create=function(kf){function Rf(){}Rf.prototype=kf;var _h=new Rf;return _h}),Object.keys||(Object.keys=function(kf){var Rf=[];for(var _h in kf)kf.hasOwnProperty(_h)&&Rf.push(_h);return Rf});function hd(kf){for(var Rf=Math.max(ed.MAX_BUFFER_LENGTH,10),_h=0,Ph=0,sm=ud.length;PhRf)switch(ud[Ph]){case"textNode":Df(kf);break;case"cdata":Af(kf,"oncdata",kf.cdata),kf.cdata="";break;case"script":Af(kf,"onscript",kf.script),kf.script="";break;default:Cf(kf,"Max buffer length exceeded: "+ud[Ph])}_h=Math.max(_h,th)}var oh=ed.MAX_BUFFER_LENGTH-_h;kf.bufferCheckPosition=oh+kf.position}function md(kf){for(var Rf=0,_h=ud.length;Rf<_h;Rf++)kf[ud[Rf]]=""}function gd(kf){Df(kf),kf.cdata!==""&&(Af(kf,"oncdata",kf.cdata),kf.cdata=""),kf.script!==""&&(Af(kf,"onscript",kf.script),kf.script="")}dd.prototype={end:function(){If(this)},write:Eh,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){gd(this)}};var yd;try{yd=streamBrowserify.Stream}catch{yd=function(){}}yd||(yd=function(){});var vd=ed.EVENTS.filter(function(kf){return kf!=="error"&&kf!=="end"});function Cd(kf,Rf){return new wd(kf,Rf)}function wd(kf,Rf){if(!(this instanceof wd))return new wd(kf,Rf);yd.apply(this),this._parser=new dd(kf,Rf),this.writable=!0,this.readable=!0;var _h=this;this._parser.onend=function(){_h.emit("end")},this._parser.onerror=function(Ph){_h.emit("error",Ph),_h._parser.error=null},this._decoder=null,vd.forEach(function(Ph){Object.defineProperty(_h,"on"+Ph,{get:function(){return _h._parser["on"+Ph]},set:function(sm){if(!sm)return _h.removeAllListeners(Ph),_h._parser["on"+Ph]=sm,sm;_h.on(Ph,sm)},enumerable:!0,configurable:!1})})}wd.prototype=Object.create(yd.prototype,{constructor:{value:wd}}),wd.prototype.write=function(kf){if(typeof Buffer$4=="function"&&typeof Buffer$4.isBuffer=="function"&&Buffer$4.isBuffer(kf)){if(!this._decoder){var Rf=requireString_decoder().StringDecoder;this._decoder=new Rf("utf8")}kf=this._decoder.write(kf)}return this._parser.write(kf.toString()),this.emit("data",kf),!0},wd.prototype.end=function(kf){return kf&&kf.length&&this.write(kf),this._parser.end(),!0},wd.prototype.on=function(kf,Rf){var _h=this;return!_h._parser["on"+kf]&&vd.indexOf(kf)!==-1&&(_h._parser["on"+kf]=function(){var Ph=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);Ph.splice(0,0,kf),_h.emit.apply(_h,Ph)}),yd.prototype.on.call(_h,kf,Rf)};var Nd="[CDATA[",Ld="DOCTYPE",Ud="http://www.w3.org/XML/1998/namespace",jd="http://www.w3.org/2000/xmlns/",Gd={xml:Ud,xmlns:jd},Yd=/[:_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]/,zd=/[:_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-]/,qd=/[#:_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]/,Wd=/[#:_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-]/;function Xd(kf){return kf===" "||kf===` +`||kf==="\r"||kf===" "}function Jd(kf){return kf==='"'||kf==="'"}function Zd(kf){return kf===">"||Xd(kf)}function mf(kf,Rf){return kf.test(Rf)}function xf(kf,Rf){return!mf(kf,Rf)}var _f=0;ed.STATE={BEGIN:_f++,BEGIN_WHITESPACE:_f++,TEXT:_f++,TEXT_ENTITY:_f++,OPEN_WAKA:_f++,SGML_DECL:_f++,SGML_DECL_QUOTED:_f++,DOCTYPE:_f++,DOCTYPE_QUOTED:_f++,DOCTYPE_DTD:_f++,DOCTYPE_DTD_QUOTED:_f++,COMMENT_STARTING:_f++,COMMENT:_f++,COMMENT_ENDING:_f++,COMMENT_ENDED:_f++,CDATA:_f++,CDATA_ENDING:_f++,CDATA_ENDING_2:_f++,PROC_INST:_f++,PROC_INST_BODY:_f++,PROC_INST_ENDING:_f++,OPEN_TAG:_f++,OPEN_TAG_SLASH:_f++,ATTRIB:_f++,ATTRIB_NAME:_f++,ATTRIB_NAME_SAW_WHITE:_f++,ATTRIB_VALUE:_f++,ATTRIB_VALUE_QUOTED:_f++,ATTRIB_VALUE_CLOSED:_f++,ATTRIB_VALUE_UNQUOTED:_f++,ATTRIB_VALUE_ENTITY_Q:_f++,ATTRIB_VALUE_ENTITY_U:_f++,CLOSE_TAG:_f++,CLOSE_TAG_SAW_WHITE:_f++,SCRIPT:_f++,SCRIPT_ENDING:_f++},ed.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},ed.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},Object.keys(ed.ENTITIES).forEach(function(kf){var Rf=ed.ENTITIES[kf],_h=typeof Rf=="number"?String.fromCharCode(Rf):Rf;ed.ENTITIES[kf]=_h});for(var vf in ed.STATE)ed.STATE[ed.STATE[vf]]=vf;_f=ed.STATE;function gf(kf,Rf,_h){kf[Rf]&&kf[Rf](_h)}function Af(kf,Rf,_h){kf.textNode&&Df(kf),gf(kf,Rf,_h)}function Df(kf){kf.textNode=Of(kf.opt,kf.textNode),kf.textNode&&gf(kf,"ontext",kf.textNode),kf.textNode=""}function Of(kf,Rf){return kf.trim&&(Rf=Rf.trim()),kf.normalize&&(Rf=Rf.replace(/\s+/g," ")),Rf}function Cf(kf,Rf){return Df(kf),kf.trackPosition&&(Rf+=` +Line: `+kf.line+` +Column: `+kf.column+` +Char: `+kf.c),Rf=new Error(Rf),kf.error=Rf,gf(kf,"onerror",Rf),kf}function If(kf){return kf.sawRoot&&!kf.closedRoot&&Ff(kf,"Unclosed root tag"),kf.state!==_f.BEGIN&&kf.state!==_f.BEGIN_WHITESPACE&&kf.state!==_f.TEXT&&Cf(kf,"Unexpected end"),Df(kf),kf.c="",kf.closed=!0,gf(kf,"onend"),dd.call(kf,kf.strict,kf.opt),kf}function Ff(kf,Rf){if(typeof kf!="object"||!(kf instanceof dd))throw new Error("bad call to strictFail");kf.strict&&Cf(kf,Rf)}function sh(kf){kf.strict||(kf.tagName=kf.tagName[kf.looseCase]());var Rf=kf.tags[kf.tags.length-1]||kf,_h=kf.tag={name:kf.tagName,attributes:{}};kf.opt.xmlns&&(_h.ns=Rf.ns),kf.attribList.length=0,Af(kf,"onopentagstart",_h)}function Sh(kf,Rf){var _h=kf.indexOf(":"),Ph=_h<0?["",kf]:kf.split(":"),sm=Ph[0],th=Ph[1];return Rf&&kf==="xmlns"&&(sm="xmlns",th=""),{prefix:sm,local:th}}function yh(kf){if(kf.strict||(kf.attribName=kf.attribName[kf.looseCase]()),kf.attribList.indexOf(kf.attribName)!==-1||kf.tag.attributes.hasOwnProperty(kf.attribName)){kf.attribName=kf.attribValue="";return}if(kf.opt.xmlns){var Rf=Sh(kf.attribName,!0),_h=Rf.prefix,Ph=Rf.local;if(_h==="xmlns")if(Ph==="xml"&&kf.attribValue!==Ud)Ff(kf,"xml: prefix must be bound to "+Ud+` +Actual: `+kf.attribValue);else if(Ph==="xmlns"&&kf.attribValue!==jd)Ff(kf,"xmlns: prefix must be bound to "+jd+` +Actual: `+kf.attribValue);else{var sm=kf.tag,th=kf.tags[kf.tags.length-1]||kf;sm.ns===th.ns&&(sm.ns=Object.create(th.ns)),sm.ns[Ph]=kf.attribValue}kf.attribList.push([kf.attribName,kf.attribValue])}else kf.tag.attributes[kf.attribName]=kf.attribValue,Af(kf,"onattribute",{name:kf.attribName,value:kf.attribValue});kf.attribName=kf.attribValue=""}function Mh(kf,Rf){if(kf.opt.xmlns){var _h=kf.tag,Ph=Sh(kf.tagName);_h.prefix=Ph.prefix,_h.local=Ph.local,_h.uri=_h.ns[Ph.prefix]||"",_h.prefix&&!_h.uri&&(Ff(kf,"Unbound namespace prefix: "+JSON.stringify(kf.tagName)),_h.uri=Ph.prefix);var sm=kf.tags[kf.tags.length-1]||kf;_h.ns&&sm.ns!==_h.ns&&Object.keys(_h.ns).forEach(function(zh){Af(kf,"onopennamespace",{prefix:zh,uri:_h.ns[zh]})});for(var th=0,oh=kf.attribList.length;th",kf.tagName="",kf.state=_f.SCRIPT;return}Af(kf,"onscript",kf.script),kf.script=""}var Rf=kf.tags.length,_h=kf.tagName;kf.strict||(_h=_h[kf.looseCase]());for(var Ph=_h;Rf--;){var sm=kf.tags[Rf];if(sm.name!==Ph)Ff(kf,"Unexpected close tag");else break}if(Rf<0){Ff(kf,"Unmatched closing tag: "+kf.tagName),kf.textNode+="",kf.state=_f.TEXT;return}kf.tagName=_h;for(var th=kf.tags.length;th-- >Rf;){var oh=kf.tag=kf.tags.pop();kf.tagName=kf.tag.name,Af(kf,"onclosetag",kf.tagName);var Zh={};for(var Sm in oh.ns)Zh[Sm]=oh.ns[Sm];var $h=kf.tags[kf.tags.length-1]||kf;kf.opt.xmlns&&oh.ns!==$h.ns&&Object.keys(oh.ns).forEach(function(Vf){var nh=oh.ns[Vf];Af(kf,"onclosenamespace",{prefix:Vf,uri:nh})})}Rf===0&&(kf.closedRoot=!0),kf.tagName=kf.attribValue=kf.attribName="",kf.attribList.length=0,kf.state=_f.TEXT}function rh(kf){var Rf=kf.entity,_h=Rf.toLowerCase(),Ph,sm="";return kf.ENTITIES[Rf]?kf.ENTITIES[Rf]:kf.ENTITIES[_h]?kf.ENTITIES[_h]:(Rf=_h,Rf.charAt(0)==="#"&&(Rf.charAt(1)==="x"?(Rf=Rf.slice(2),Ph=parseInt(Rf,16),sm=Ph.toString(16)):(Rf=Rf.slice(1),Ph=parseInt(Rf,10),sm=Ph.toString(10))),Rf=Rf.replace(/^0+/,""),isNaN(Ph)||sm.toLowerCase()!==Rf?(Ff(kf,"Invalid character entity"),"&"+kf.entity+";"):String.fromCodePoint(Ph))}function mh(kf,Rf){Rf==="<"?(kf.state=_f.OPEN_WAKA,kf.startTagPosition=kf.position):Xd(Rf)||(Ff(kf,"Non-whitespace before first tag."),kf.textNode=Rf,kf.state=_f.TEXT)}function xh(kf,Rf){var _h="";return Rf"?(Af(Rf,"onsgmldeclaration",Rf.sgmlDecl),Rf.sgmlDecl="",Rf.state=_f.TEXT):(Jd(Ph)&&(Rf.state=_f.SGML_DECL_QUOTED),Rf.sgmlDecl+=Ph);continue;case _f.SGML_DECL_QUOTED:Ph===Rf.q&&(Rf.state=_f.SGML_DECL,Rf.q=""),Rf.sgmlDecl+=Ph;continue;case _f.DOCTYPE:Ph===">"?(Rf.state=_f.TEXT,Af(Rf,"ondoctype",Rf.doctype),Rf.doctype=!0):(Rf.doctype+=Ph,Ph==="["?Rf.state=_f.DOCTYPE_DTD:Jd(Ph)&&(Rf.state=_f.DOCTYPE_QUOTED,Rf.q=Ph));continue;case _f.DOCTYPE_QUOTED:Rf.doctype+=Ph,Ph===Rf.q&&(Rf.q="",Rf.state=_f.DOCTYPE);continue;case _f.DOCTYPE_DTD:Ph==="]"?(Rf.doctype+=Ph,Rf.state=_f.DOCTYPE):Ph==="<"?(Rf.state=_f.OPEN_WAKA,Rf.startTagPosition=Rf.position):Jd(Ph)?(Rf.doctype+=Ph,Rf.state=_f.DOCTYPE_DTD_QUOTED,Rf.q=Ph):Rf.doctype+=Ph;continue;case _f.DOCTYPE_DTD_QUOTED:Rf.doctype+=Ph,Ph===Rf.q&&(Rf.state=_f.DOCTYPE_DTD,Rf.q="");continue;case _f.COMMENT:Ph==="-"?Rf.state=_f.COMMENT_ENDING:Rf.comment+=Ph;continue;case _f.COMMENT_ENDING:Ph==="-"?(Rf.state=_f.COMMENT_ENDED,Rf.comment=Of(Rf.opt,Rf.comment),Rf.comment&&Af(Rf,"oncomment",Rf.comment),Rf.comment=""):(Rf.comment+="-"+Ph,Rf.state=_f.COMMENT);continue;case _f.COMMENT_ENDED:Ph!==">"?(Ff(Rf,"Malformed comment"),Rf.comment+="--"+Ph,Rf.state=_f.COMMENT):Rf.doctype&&Rf.doctype!==!0?Rf.state=_f.DOCTYPE_DTD:Rf.state=_f.TEXT;continue;case _f.CDATA:Ph==="]"?Rf.state=_f.CDATA_ENDING:Rf.cdata+=Ph;continue;case _f.CDATA_ENDING:Ph==="]"?Rf.state=_f.CDATA_ENDING_2:(Rf.cdata+="]"+Ph,Rf.state=_f.CDATA);continue;case _f.CDATA_ENDING_2:Ph===">"?(Rf.cdata&&Af(Rf,"oncdata",Rf.cdata),Af(Rf,"onclosecdata"),Rf.cdata="",Rf.state=_f.TEXT):Ph==="]"?Rf.cdata+="]":(Rf.cdata+="]]"+Ph,Rf.state=_f.CDATA);continue;case _f.PROC_INST:Ph==="?"?Rf.state=_f.PROC_INST_ENDING:Xd(Ph)?Rf.state=_f.PROC_INST_BODY:Rf.procInstName+=Ph;continue;case _f.PROC_INST_BODY:if(!Rf.procInstBody&&Xd(Ph))continue;Ph==="?"?Rf.state=_f.PROC_INST_ENDING:Rf.procInstBody+=Ph;continue;case _f.PROC_INST_ENDING:Ph===">"?(Af(Rf,"onprocessinginstruction",{name:Rf.procInstName,body:Rf.procInstBody}),Rf.procInstName=Rf.procInstBody="",Rf.state=_f.TEXT):(Rf.procInstBody+="?"+Ph,Rf.state=_f.PROC_INST_BODY);continue;case _f.OPEN_TAG:mf(zd,Ph)?Rf.tagName+=Ph:(sh(Rf),Ph===">"?Mh(Rf):Ph==="/"?Rf.state=_f.OPEN_TAG_SLASH:(Xd(Ph)||Ff(Rf,"Invalid character in tag name"),Rf.state=_f.ATTRIB));continue;case _f.OPEN_TAG_SLASH:Ph===">"?(Mh(Rf,!0),lh(Rf)):(Ff(Rf,"Forward-slash in opening tag not followed by >"),Rf.state=_f.ATTRIB);continue;case _f.ATTRIB:if(Xd(Ph))continue;Ph===">"?Mh(Rf):Ph==="/"?Rf.state=_f.OPEN_TAG_SLASH:mf(Yd,Ph)?(Rf.attribName=Ph,Rf.attribValue="",Rf.state=_f.ATTRIB_NAME):Ff(Rf,"Invalid attribute name");continue;case _f.ATTRIB_NAME:Ph==="="?Rf.state=_f.ATTRIB_VALUE:Ph===">"?(Ff(Rf,"Attribute without value"),Rf.attribValue=Rf.attribName,yh(Rf),Mh(Rf)):Xd(Ph)?Rf.state=_f.ATTRIB_NAME_SAW_WHITE:mf(zd,Ph)?Rf.attribName+=Ph:Ff(Rf,"Invalid attribute name");continue;case _f.ATTRIB_NAME_SAW_WHITE:if(Ph==="=")Rf.state=_f.ATTRIB_VALUE;else{if(Xd(Ph))continue;Ff(Rf,"Attribute without value"),Rf.tag.attributes[Rf.attribName]="",Rf.attribValue="",Af(Rf,"onattribute",{name:Rf.attribName,value:""}),Rf.attribName="",Ph===">"?Mh(Rf):mf(Yd,Ph)?(Rf.attribName=Ph,Rf.state=_f.ATTRIB_NAME):(Ff(Rf,"Invalid attribute name"),Rf.state=_f.ATTRIB)}continue;case _f.ATTRIB_VALUE:if(Xd(Ph))continue;Jd(Ph)?(Rf.q=Ph,Rf.state=_f.ATTRIB_VALUE_QUOTED):(Rf.opt.unquotedAttributeValues||Cf(Rf,"Unquoted attribute value"),Rf.state=_f.ATTRIB_VALUE_UNQUOTED,Rf.attribValue=Ph);continue;case _f.ATTRIB_VALUE_QUOTED:if(Ph!==Rf.q){Ph==="&"?Rf.state=_f.ATTRIB_VALUE_ENTITY_Q:Rf.attribValue+=Ph;continue}yh(Rf),Rf.q="",Rf.state=_f.ATTRIB_VALUE_CLOSED;continue;case _f.ATTRIB_VALUE_CLOSED:Xd(Ph)?Rf.state=_f.ATTRIB:Ph===">"?Mh(Rf):Ph==="/"?Rf.state=_f.OPEN_TAG_SLASH:mf(Yd,Ph)?(Ff(Rf,"No whitespace between attributes"),Rf.attribName=Ph,Rf.attribValue="",Rf.state=_f.ATTRIB_NAME):Ff(Rf,"Invalid attribute name");continue;case _f.ATTRIB_VALUE_UNQUOTED:if(!Zd(Ph)){Ph==="&"?Rf.state=_f.ATTRIB_VALUE_ENTITY_U:Rf.attribValue+=Ph;continue}yh(Rf),Ph===">"?Mh(Rf):Rf.state=_f.ATTRIB;continue;case _f.CLOSE_TAG:if(Rf.tagName)Ph===">"?lh(Rf):mf(zd,Ph)?Rf.tagName+=Ph:Rf.script?(Rf.script+=""?lh(Rf):Ff(Rf,"Invalid characters in closing tag");continue;case _f.TEXT_ENTITY:case _f.ATTRIB_VALUE_ENTITY_Q:case _f.ATTRIB_VALUE_ENTITY_U:var oh,Zh;switch(Rf.state){case _f.TEXT_ENTITY:oh=_f.TEXT,Zh="textNode";break;case _f.ATTRIB_VALUE_ENTITY_Q:oh=_f.ATTRIB_VALUE_QUOTED,Zh="attribValue";break;case _f.ATTRIB_VALUE_ENTITY_U:oh=_f.ATTRIB_VALUE_UNQUOTED,Zh="attribValue";break}if(Ph===";"){var Sm=rh(Rf);Rf.opt.unparsedEntities&&!Object.values(ed.XML_ENTITIES).includes(Sm)?(Rf.entity="",Rf.state=oh,Rf.write(Sm)):(Rf[Zh]+=Sm,Rf.entity="",Rf.state=oh)}else mf(Rf.entity.length?Wd:qd,Ph)?Rf.entity+=Ph:(Ff(Rf,"Invalid character in entity name"),Rf[Zh]+="&"+Rf.entity+Ph,Rf.entity="",Rf.state=oh);continue;default:throw new Error(Rf,"Unknown state: "+Rf.state)}return Rf.position>=Rf.bufferCheckPosition&&hd(Rf),Rf}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var kf=String.fromCharCode,Rf=Math.floor,_h=function(){var Ph=16384,sm=[],th,oh,Zh=-1,Sm=arguments.length;if(!Sm)return"";for(var $h="";++Zh1114111||Rf(Vf)!==Vf)throw RangeError("Invalid code point: "+Vf);Vf<=65535?sm.push(Vf):(Vf-=65536,th=(Vf>>10)+55296,oh=Vf%1024+56320,sm.push(th,oh)),(Zh+1===Sm||sm.length>Ph)&&($h+=kf.apply(null,sm),sm.length=0)}return $h};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:_h,configurable:!0,writable:!0}):String.fromCodePoint=_h}()})(Ra)}(sax)),sax}var bom={},hasRequiredBom;function requireBom(){return hasRequiredBom||(hasRequiredBom=1,(function(){bom.stripBOM=function(Ra){return Ra[0]==="\uFEFF"?Ra.substring(1):Ra}}).call(commonjsGlobal)),bom}var processors={},hasRequiredProcessors;function requireProcessors(){return hasRequiredProcessors||(hasRequiredProcessors=1,(function(){var Ra;Ra=new RegExp(/(?!xmlns)^.*:/),processors.normalize=function(ed){return ed.toLowerCase()},processors.firstCharLowerCase=function(ed){return ed.charAt(0).toLowerCase()+ed.slice(1)},processors.stripPrefix=function(ed){return ed.replace(Ra,"")},processors.parseNumbers=function(ed){return isNaN(ed)||(ed=ed%1===0?parseInt(ed,10):parseFloat(ed)),ed},processors.parseBooleans=function(ed){return/^(?:true|false)$/i.test(ed)&&(ed=ed.toLowerCase()==="true"),ed}}).call(commonjsGlobal)),processors}var main={},setImmediate$1={},hasRequiredSetImmediate;function requireSetImmediate(){if(hasRequiredSetImmediate)return setImmediate$1;hasRequiredSetImmediate=1;var Ra={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_177c26d6-fb22-449a-87e2-db9959d53fe4",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_177c26d6-fb22-449a-87e2-db9959d53fe4",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:6575",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13671567639",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8aa748ac-6dd4-4073-9410-acf109d056c5",INVOCATION_ID:"97e2fcc9618d40ada1c1d6a5738ecc02",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"504",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub-Actions-1000003902",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_177c26d6-fb22-449a-87e2-db9959d53fe4",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_177c26d6-fb22-449a-87e2-db9959d53fe4",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_177c26d6-fb22-449a-87e2-db9959d53fe4",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2146,ppid:2145,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};return function(ed,ud){if(ed.setImmediate)return;var dd=1,hd={},md=!1,gd=ed.document,yd;function vd(Wd){typeof Wd!="function"&&(Wd=new Function(""+Wd));for(var Xd=new Array(arguments.length-1),Jd=0;Jd"u"?commonjsGlobal:self),setImmediate$1}var hasRequiredMain;function requireMain(){if(hasRequiredMain)return main;hasRequiredMain=1;var Ra=typeof commonjsGlobal<"u"&&commonjsGlobal||typeof self<"u"&&self||window,ed=Function.prototype.apply;main.setTimeout=function(){return new ud(ed.call(setTimeout,Ra,arguments),clearTimeout)},main.setInterval=function(){return new ud(ed.call(setInterval,Ra,arguments),clearInterval)},main.clearTimeout=main.clearInterval=function(dd){dd&&dd.close()};function ud(dd,hd){this._id=dd,this._clearFn=hd}return ud.prototype.unref=ud.prototype.ref=function(){},ud.prototype.close=function(){this._clearFn.call(Ra,this._id)},main.enroll=function(dd,hd){clearTimeout(dd._idleTimeoutId),dd._idleTimeout=hd},main.unenroll=function(dd){clearTimeout(dd._idleTimeoutId),dd._idleTimeout=-1},main._unrefActive=main.active=function(dd){clearTimeout(dd._idleTimeoutId);var hd=dd._idleTimeout;hd>=0&&(dd._idleTimeoutId=setTimeout(function(){dd._onTimeout&&dd._onTimeout()},hd))},requireSetImmediate(),main.setImmediate=typeof self<"u"&&self.setImmediate||typeof commonjsGlobal<"u"&&commonjsGlobal.setImmediate||commonjsGlobal&&commonjsGlobal.setImmediate,main.clearImmediate=typeof self<"u"&&self.clearImmediate||typeof commonjsGlobal<"u"&&commonjsGlobal.clearImmediate||commonjsGlobal&&commonjsGlobal.clearImmediate,main}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(Ra){(function(){var ed,ud,dd,hd,md,gd,yd,vd,Cd=function(Ld,Ud){return function(){return Ld.apply(Ud,arguments)}},wd=function(Ld,Ud){for(var jd in Ud)Nd.call(Ud,jd)&&(Ld[jd]=Ud[jd]);function Gd(){this.constructor=Ld}return Gd.prototype=Ud.prototype,Ld.prototype=new Gd,Ld.__super__=Ud.prototype,Ld},Nd={}.hasOwnProperty;yd=requireSax(),dd=eventsExports,ed=requireBom(),gd=requireProcessors(),vd=requireMain().setImmediate,ud=requireDefaults().defaults,hd=function(Ld){return typeof Ld=="object"&&Ld!=null&&Object.keys(Ld).length===0},md=function(Ld,Ud,jd){var Gd,Yd,zd;for(Gd=0,Yd=Ld.length;Gd0&&(Zd[qd.options.childkey]=xf),xf=Zd;else if(gf){gf[qd.options.childkey]=gf[qd.options.childkey]||[],_f=Object.create(null);for(Jd in xf)Nd.call(xf,Jd)&&(_f[Jd]=xf[Jd]);gf[qd.options.childkey].push(_f),delete xf["#name"],Object.keys(xf).length===1&&Gd in xf&&!qd.EXPLICIT_CHARKEY&&(xf=xf[Gd])}}return zd.length>0?qd.assignOrPush(gf,mf,xf):(qd.options.explicitRoot&&(vf=xf,xf=Object.create(null),xf[mf]=vf),qd.resultObject=xf,qd.saxParser.ended=!0,qd.emit("end",qd.resultObject))}}(this),Yd=function(qd){return function(Wd){var Xd,Jd;if(Jd=zd[zd.length-1],Jd)return Jd[Gd]+=Wd,qd.options.explicitChildren&&qd.options.preserveChildrenOrder&&qd.options.charsAsChildren&&(qd.options.includeWhiteChars||Wd.replace(/\\n/g,"").trim()!=="")&&(Jd[qd.options.childkey]=Jd[qd.options.childkey]||[],Xd={"#name":"__text__"},Xd[Gd]=Wd,qd.options.normalize&&(Xd[Gd]=Xd[Gd].replace(/\s{2,}/g," ").trim()),Jd[qd.options.childkey].push(Xd)),Jd}}(this),this.saxParser.ontext=Yd,this.saxParser.oncdata=function(qd){return function(Wd){var Xd;if(Xd=Yd(Wd),Xd)return Xd.cdata=!0}}()},Ud.prototype.parseString=function(jd,Gd){var Yd;Gd!=null&&typeof Gd=="function"&&(this.on("end",function(zd){return this.reset(),Gd(null,zd)}),this.on("error",function(zd){return this.reset(),Gd(zd)}));try{return jd=jd.toString(),jd.trim()===""?(this.emit("end",null),!0):(jd=ed.stripBOM(jd),this.options.async?(this.remaining=jd,vd(this.processAsync),this.saxParser):this.saxParser.write(jd).close())}catch(zd){if(Yd=zd,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw Yd}else return this.emit("error",Yd),this.saxParser.errThrown=!0}},Ud.prototype.parseStringPromise=function(jd){return new Promise(function(Gd){return function(Yd,zd){return Gd.parseString(jd,function(qd,Wd){return qd?zd(qd):Yd(Wd)})}}(this))},Ud}(dd),Ra.parseString=function(Ld,Ud,jd){var Gd,Yd,zd;return jd!=null?(typeof jd=="function"&&(Gd=jd),typeof Ud=="object"&&(Yd=Ud)):(typeof Ud=="function"&&(Gd=Ud),Yd={}),zd=new Ra.Parser(Yd),zd.parseString(Ld,Gd)},Ra.parseStringPromise=function(Ld,Ud){var jd,Gd;return typeof Ud=="object"&&(jd=Ud),Gd=new Ra.Parser(jd),Gd.parseStringPromise(Ld)}}).call(commonjsGlobal)}(parser)),parser}(function(){var Ra,ed,ud,dd,hd=function(gd,yd){for(var vd in yd)md.call(yd,vd)&&(gd[vd]=yd[vd]);function Cd(){this.constructor=gd}return Cd.prototype=yd.prototype,gd.prototype=new Cd,gd.__super__=yd.prototype,gd},md={}.hasOwnProperty;ed=requireDefaults(),Ra=requireBuilder(),ud=requireParser(),dd=requireProcessors(),xml2js.defaults=ed.defaults,xml2js.processors=dd,xml2js.ValidationError=function(gd){hd(yd,gd);function yd(vd){this.message=vd}return yd}(Error),xml2js.Builder=Ra.Builder,xml2js.Parser=ud.Parser,xml2js.parseString=ud.parseString,xml2js.parseStringPromise=ud.parseStringPromise}).call(commonjsGlobal);class ExtendableError extends Error{constructor(ed,ud){super(ed,ud),this.name=this.constructor.name}}class AnonymousRequestError extends ExtendableError{}class InvalidArgumentError extends ExtendableError{}class InvalidEndpointError extends ExtendableError{}class InvalidBucketNameError extends ExtendableError{}class InvalidObjectNameError extends ExtendableError{}class AccessKeyRequiredError extends ExtendableError{}class SecretKeyRequiredError extends ExtendableError{}class ExpiresParamError extends ExtendableError{}class InvalidDateError extends ExtendableError{}class InvalidPrefixError extends ExtendableError{}class InvalidBucketPolicyError extends ExtendableError{}class InvalidXMLError extends ExtendableError{}class S3Error extends ExtendableError{}class IsValidBucketNameError extends ExtendableError{}var ipaddr$1={exports:{}};(function(Ra){(function(ed){const ud="(0?\\d+|0x[a-f0-9]+)",dd={fourOctet:new RegExp(`^${ud}\\.${ud}\\.${ud}\\.${ud}$`,"i"),threeOctet:new RegExp(`^${ud}\\.${ud}\\.${ud}$`,"i"),twoOctet:new RegExp(`^${ud}\\.${ud}$`,"i"),longValue:new RegExp(`^${ud}$`,"i")},hd=new RegExp("^0[0-7]+$","i"),md=new RegExp("^0x[a-f0-9]+$","i"),gd="%[0-9a-z]{1,}",yd="(?:[0-9a-f]+::?)+",vd={zoneIndex:new RegExp(gd,"i"),native:new RegExp(`^(::)?(${yd})?([0-9a-f]+)?(::)?(${gd})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${ud}\\.${ud}\\.${ud}\\.${ud}(${gd})?)$`,"i"),transitional:new RegExp(`^((?:${yd})|(?:::)(?:${yd})?)${ud}\\.${ud}\\.${ud}\\.${ud}(${gd})?$`,"i")};function Cd(jd,Gd){if(jd.indexOf("::")!==jd.lastIndexOf("::"))return null;let Yd=0,zd=-1,qd=(jd.match(vd.zoneIndex)||[])[0],Wd,Xd;for(qd&&(qd=qd.substring(1),jd=jd.replace(/%.+$/,""));(zd=jd.indexOf(":",zd+1))>=0;)Yd++;if(jd.substr(0,2)==="::"&&Yd--,jd.substr(-2,2)==="::"&&Yd--,Yd>Gd)return null;for(Xd=Gd-Yd,Wd=":";Xd--;)Wd+="0:";return jd=jd.replace("::",Wd),jd[0]===":"&&(jd=jd.slice(1)),jd[jd.length-1]===":"&&(jd=jd.slice(0,-1)),Gd=function(){const Jd=jd.split(":"),Zd=[];for(let mf=0;mf0;){if(Wd=Yd-zd,Wd<0&&(Wd=0),jd[qd]>>Wd!==Gd[qd]>>Wd)return!1;zd-=Yd,qd+=1}return!0}function Nd(jd){if(md.test(jd))return parseInt(jd,16);if(jd[0]==="0"&&!isNaN(parseInt(jd[1],10))){if(hd.test(jd))return parseInt(jd,8);throw new Error(`ipaddr: cannot parse ${jd} as octal`)}return parseInt(jd,10)}function Ld(jd,Gd){for(;jd.length=0;qd-=1)if(Wd=this.octets[qd],Wd in zd){if(Xd=zd[Wd],Yd&&Xd!==0)return null;Xd!==8&&(Yd=!0),Gd+=Xd}else return null;return 32-Gd},jd.prototype.range=function(){return Ud.subnetMatch(this,this.SpecialRanges)},jd.prototype.toByteArray=function(){return this.octets.slice(0)},jd.prototype.toIPv4MappedAddress=function(){return Ud.IPv6.parse(`::ffff:${this.toString()}`)},jd.prototype.toNormalizedString=function(){return this.toString()},jd.prototype.toString=function(){return this.octets.join(".")},jd}(),Ud.IPv4.broadcastAddressFromCIDR=function(jd){try{const Gd=this.parseCIDR(jd),Yd=Gd[0].toByteArray(),zd=this.subnetMaskFromPrefixLength(Gd[1]).toByteArray(),qd=[];let Wd=0;for(;Wd<4;)qd.push(parseInt(Yd[Wd],10)|parseInt(zd[Wd],10)^255),Wd++;return new this(qd)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},Ud.IPv4.isIPv4=function(jd){return this.parser(jd)!==null},Ud.IPv4.isValid=function(jd){try{return new this(this.parser(jd)),!0}catch{return!1}},Ud.IPv4.isValidCIDR=function(jd){try{return this.parseCIDR(jd),!0}catch{return!1}},Ud.IPv4.isValidFourPartDecimal=function(jd){return!!(Ud.IPv4.isValid(jd)&&jd.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},Ud.IPv4.networkAddressFromCIDR=function(jd){let Gd,Yd,zd,qd,Wd;try{for(Gd=this.parseCIDR(jd),zd=Gd[0].toByteArray(),Wd=this.subnetMaskFromPrefixLength(Gd[1]).toByteArray(),qd=[],Yd=0;Yd<4;)qd.push(parseInt(zd[Yd],10)&parseInt(Wd[Yd],10)),Yd++;return new this(qd)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},Ud.IPv4.parse=function(jd){const Gd=this.parser(jd);if(Gd===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(Gd)},Ud.IPv4.parseCIDR=function(jd){let Gd;if(Gd=jd.match(/^(.+)\/(\d+)$/)){const Yd=parseInt(Gd[2]);if(Yd>=0&&Yd<=32){const zd=[this.parse(Gd[1]),Yd];return Object.defineProperty(zd,"toString",{value:function(){return this.join("/")}}),zd}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},Ud.IPv4.parser=function(jd){let Gd,Yd,zd;if(Gd=jd.match(dd.fourOctet))return function(){const qd=Gd.slice(1,6),Wd=[];for(let Xd=0;Xd4294967295||zd<0)throw new Error("ipaddr: address outside defined range");return function(){const qd=[];let Wd;for(Wd=0;Wd<=24;Wd+=8)qd.push(zd>>Wd&255);return qd}().reverse()}else return(Gd=jd.match(dd.twoOctet))?function(){const qd=Gd.slice(1,4),Wd=[];if(zd=Nd(qd[1]),zd>16777215||zd<0)throw new Error("ipaddr: address outside defined range");return Wd.push(Nd(qd[0])),Wd.push(zd>>16&255),Wd.push(zd>>8&255),Wd.push(zd&255),Wd}():(Gd=jd.match(dd.threeOctet))?function(){const qd=Gd.slice(1,5),Wd=[];if(zd=Nd(qd[2]),zd>65535||zd<0)throw new Error("ipaddr: address outside defined range");return Wd.push(Nd(qd[0])),Wd.push(Nd(qd[1])),Wd.push(zd>>8&255),Wd.push(zd&255),Wd}():null},Ud.IPv4.subnetMaskFromPrefixLength=function(jd){if(jd=parseInt(jd),jd<0||jd>32)throw new Error("ipaddr: invalid IPv4 prefix length");const Gd=[0,0,0,0];let Yd=0;const zd=Math.floor(jd/8);for(;Yd=0;Xd-=1)if(qd=this.parts[Xd],qd in zd){if(Wd=zd[qd],Yd&&Wd!==0)return null;Wd!==16&&(Yd=!0),Gd+=Wd}else return null;return 128-Gd},jd.prototype.range=function(){return Ud.subnetMatch(this,this.SpecialRanges)},jd.prototype.toByteArray=function(){let Gd;const Yd=[],zd=this.parts;for(let qd=0;qd>8),Yd.push(Gd&255);return Yd},jd.prototype.toFixedLengthString=function(){const Gd=(function(){const zd=[];for(let qd=0;qd>8,Yd&255,zd>>8,zd&255])},jd.prototype.toNormalizedString=function(){const Gd=(function(){const zd=[];for(let qd=0;qdqd&&(zd=Wd.index,qd=Wd[0].length);return qd<0?Yd:`${Yd.substring(0,zd)}::${Yd.substring(zd+qd)}`},jd.prototype.toString=function(){return this.toRFC5952String()},jd}(),Ud.IPv6.broadcastAddressFromCIDR=function(jd){try{const Gd=this.parseCIDR(jd),Yd=Gd[0].toByteArray(),zd=this.subnetMaskFromPrefixLength(Gd[1]).toByteArray(),qd=[];let Wd=0;for(;Wd<16;)qd.push(parseInt(Yd[Wd],10)|parseInt(zd[Wd],10)^255),Wd++;return new this(qd)}catch(Gd){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${Gd})`)}},Ud.IPv6.isIPv6=function(jd){return this.parser(jd)!==null},Ud.IPv6.isValid=function(jd){if(typeof jd=="string"&&jd.indexOf(":")===-1)return!1;try{const Gd=this.parser(jd);return new this(Gd.parts,Gd.zoneId),!0}catch{return!1}},Ud.IPv6.isValidCIDR=function(jd){if(typeof jd=="string"&&jd.indexOf(":")===-1)return!1;try{return this.parseCIDR(jd),!0}catch{return!1}},Ud.IPv6.networkAddressFromCIDR=function(jd){let Gd,Yd,zd,qd,Wd;try{for(Gd=this.parseCIDR(jd),zd=Gd[0].toByteArray(),Wd=this.subnetMaskFromPrefixLength(Gd[1]).toByteArray(),qd=[],Yd=0;Yd<16;)qd.push(parseInt(zd[Yd],10)&parseInt(Wd[Yd],10)),Yd++;return new this(qd)}catch(Xd){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${Xd})`)}},Ud.IPv6.parse=function(jd){const Gd=this.parser(jd);if(Gd.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(Gd.parts,Gd.zoneId)},Ud.IPv6.parseCIDR=function(jd){let Gd,Yd,zd;if((Yd=jd.match(/^(.+)\/(\d+)$/))&&(Gd=parseInt(Yd[2]),Gd>=0&&Gd<=128))return zd=[this.parse(Yd[1]),Gd],Object.defineProperty(zd,"toString",{value:function(){return this.join("/")}}),zd;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},Ud.IPv6.parser=function(jd){let Gd,Yd,zd,qd,Wd,Xd;if(zd=jd.match(vd.deprecatedTransitional))return this.parser(`::ffff:${zd[1]}`);if(vd.native.test(jd))return Cd(jd,8);if((zd=jd.match(vd.transitional))&&(Xd=zd[6]||"",Gd=zd[1],zd[1].endsWith("::")||(Gd=Gd.slice(0,-1)),Gd=Cd(Gd+Xd,6),Gd.parts)){for(Wd=[parseInt(zd[2]),parseInt(zd[3]),parseInt(zd[4]),parseInt(zd[5])],Yd=0;Yd128)throw new Error("ipaddr: invalid IPv6 prefix length");const Gd=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];let Yd=0;const zd=Math.floor(jd/8);for(;YdWd||qd===Wd&&Nd[Ud].substr(0,12)==="application/"))continue}Nd[Ud]=Fd}}})}})(mimeTypes$1);let ENCRYPTION_TYPES=function(Ra){return Ra.SSEC="SSE-C",Ra.KMS="KMS",Ra}({}),RETENTION_MODES=function(Ra){return Ra.GOVERNANCE="GOVERNANCE",Ra.COMPLIANCE="COMPLIANCE",Ra}({}),RETENTION_VALIDITY_UNITS=function(Ra){return Ra.DAYS="Days",Ra.YEARS="Years",Ra}({}),LEGAL_HOLD_STATUS=function(Ra){return Ra.ENABLED="ON",Ra.DISABLED="OFF",Ra}({});const MetaDataHeaderPrefix="x-amz-meta-";function uriEscape(Ra){return Ra.split("").reduce((qa,rd)=>{const sd=Buffer$4.from(rd);if(sd.length===1&&("A"<=rd&&rd<="Z"||"a"<=rd&&rd<="z"||"0"<=rd&&rd<="9"||rd==="_"||rd==="."||rd==="~"||rd==="-"))return qa=qa+rd,qa;for(const pd of sd)qa=qa+"%"+pd.toString(16).toUpperCase();return qa},"")}function uriResourceEscape(Ra){return uriEscape(Ra).replace(/%2F/g,"/")}function getScope(Ra,qa,rd="s3"){return`${makeDateShort(qa)}/${Ra}/${rd}/aws4_request`}function isAmazonEndpoint(Ra){return Ra==="s3.amazonaws.com"||Ra==="s3.cn-north-1.amazonaws.com.cn"}function isVirtualHostStyle(Ra,qa,rd,sd){return qa==="https:"&&rd.includes(".")?!1:isAmazonEndpoint(Ra)||!sd}function isValidIP(Ra){return ipaddr.isValid(Ra)}function isValidEndpoint(Ra){return isValidDomain(Ra)||isValidIP(Ra)}function isValidDomain(Ra){if(!isString(Ra)||Ra.length===0||Ra.length>255||Ra[0]==="-"||Ra.slice(-1)==="-"||Ra[0]==="_"||Ra.slice(-1)==="_"||Ra[0]===".")return!1;const qa="`~!@#$%^&*()+={}[]|\\\"';:>63||Ra.includes("..")||/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/.test(Ra)?!1:!!/^[a-z0-9][a-z0-9.-]+[a-z0-9]$/.test(Ra)}function isValidObjectName(Ra){return isValidPrefix(Ra)?Ra.length!==0:!1}function isValidPrefix(Ra){return!(!isString(Ra)||Ra.length>1024)}function isNumber(Ra){return typeof Ra=="number"}function isFunction(Ra){return typeof Ra=="function"}function isString(Ra){return typeof Ra=="string"}function isObject(Ra){return typeof Ra=="object"&&Ra!==null}function isReadableStream(Ra){return isObject(Ra)&&isFunction(Ra._read)}function isBoolean(Ra){return typeof Ra=="boolean"}function isEmpty(Ra){return _.isEmpty(Ra)}function isEmptyObject(Ra){return Object.values(Ra).filter(qa=>qa!==void 0).length!==0}function isDefined(Ra){return Ra!=null}function isValidDate(Ra){return Ra instanceof Date&&!isNaN(Ra)}function makeDateLong(Ra){Ra=Ra||new Date;const qa=Ra.toISOString();return qa.slice(0,4)+qa.slice(5,7)+qa.slice(8,13)+qa.slice(14,16)+qa.slice(17,19)+"Z"}function makeDateShort(Ra){Ra=Ra||new Date;const qa=Ra.toISOString();return qa.slice(0,4)+qa.slice(5,7)+qa.slice(8,10)}function pipesetup(...Ra){return Ra.reduce((qa,rd)=>(qa.on("error",sd=>rd.emit("error",sd)),qa.pipe(rd)))}function readableStream(Ra){const qa=new streamBrowserify.Readable;return qa._read=()=>{},qa.push(Ra),qa.push(null),qa}function insertContentType(Ra,qa){for(const rd in Ra)if(rd.toLowerCase()==="content-type")return Ra;return{...Ra,"content-type":probeContentType(qa)}}function prependXAMZMeta(Ra){return Ra?_.mapKeys(Ra,(qa,rd)=>isAmzHeader(rd)||isSupportedHeader(rd)||isStorageClassHeader(rd)?rd:MetaDataHeaderPrefix+rd):{}}function isAmzHeader(Ra){const qa=Ra.toLowerCase();return qa.startsWith(MetaDataHeaderPrefix)||qa==="x-amz-acl"||qa.startsWith("x-amz-server-side-encryption-")||qa==="x-amz-server-side-encryption"}function isSupportedHeader(Ra){return["content-type","cache-control","content-encoding","content-disposition","content-language","x-amz-website-redirect-location"].includes(Ra.toLowerCase())}function isStorageClassHeader(Ra){return Ra.toLowerCase()==="x-amz-storage-class"}function extractMetadata(Ra){return _.mapKeys(_.pickBy(Ra,(qa,rd)=>isSupportedHeader(rd)||isStorageClassHeader(rd)||isAmzHeader(rd)),(qa,rd)=>{const sd=rd.toLowerCase();return sd.startsWith(MetaDataHeaderPrefix)?sd.slice(MetaDataHeaderPrefix.length):rd})}function getVersionId(Ra={}){return Ra["x-amz-version-id"]||null}function getSourceVersionId(Ra={}){return Ra["x-amz-copy-source-version-id"]||null}function sanitizeETag(Ra=""){const qa={'"':"",""":"",""":"",""":"",""":""};return Ra.replace(/^("|"|")|("|"|")$/g,rd=>qa[rd])}function toMd5(Ra){return(void 0)("md5").update(Buffer$4.from(Ra)).digest().toString("base64")}function toSha256(Ra){return(void 0)("sha256").update(Ra).digest("hex")}function toArray(Ra){return Array.isArray(Ra)?Ra:[Ra]}function sanitizeObjectKey(Ra){const qa=(Ra?Ra.toString():"").replace(/\+/g," ");return decodeURIComponent(qa)}function sanitizeSize(Ra){return Ra?Number.parseInt(Ra):void 0}const PART_CONSTRAINTS={ABS_MIN_PART_SIZE:1024*1024*5,MIN_PART_SIZE:1024*1024*16,MAX_PARTS_COUNT:1e4,MAX_PART_SIZE:1024*1024*1024*5,MAX_SINGLE_PUT_OBJECT_SIZE:1024*1024*1024*5,MAX_MULTIPART_PUT_OBJECT_SIZE:1024*1024*1024*1024*5},GENERIC_SSE_HEADER="X-Amz-Server-Side-Encryption",ENCRYPTION_HEADERS={sseGenericHeader:GENERIC_SSE_HEADER,sseKmsKeyID:GENERIC_SSE_HEADER+"-Aws-Kms-Key-Id"};function getEncryptionHeaders(Ra){const qa=Ra.type;if(!isEmpty(qa)){if(qa===ENCRYPTION_TYPES.SSEC)return{[ENCRYPTION_HEADERS.sseGenericHeader]:"AES256"};if(qa===ENCRYPTION_TYPES.KMS)return{[ENCRYPTION_HEADERS.sseGenericHeader]:Ra.SSEAlgorithm,[ENCRYPTION_HEADERS.sseKmsKeyID]:Ra.KMSMasterKeyID}}return{}}function partsRequired(Ra){const qa=PART_CONSTRAINTS.MAX_MULTIPART_PUT_OBJECT_SIZE/(PART_CONSTRAINTS.MAX_PARTS_COUNT-1);let rd=Ra/qa;return Ra%qa>0&&rd++,rd=Math.trunc(rd),rd}function calculateEvenSplits(Ra,qa){if(Ra===0)return null;const rd=partsRequired(Ra),sd=[],pd=[];let fd=qa.Start;(isEmpty(fd)||fd===-1)&&(fd=0);const hd=Math.trunc(Ra/rd),md=Ra%rd;let gd=fd;for(let yd=0;ydthis.End||this.Start<0)throw new InvalidObjectNameError("Source start must be non-negative, and start must be at most end.");if(this.MatchRange&&!isNumber(this.Start)||!isNumber(this.End))throw new InvalidObjectNameError("MatchRange is specified. But Invalid Start and End values are specified.");return!0}getHeaders(){const qa={};return qa["x-amz-copy-source"]=encodeURI(this.Bucket+"/"+this.Object),isEmpty(this.VersionID)||(qa["x-amz-copy-source"]=`${encodeURI(this.Bucket+"/"+this.Object)}?versionId=${this.VersionID}`),isEmpty(this.MatchETag)||(qa["x-amz-copy-source-if-match"]=this.MatchETag),isEmpty(this.NoMatchETag)||(qa["x-amz-copy-source-if-none-match"]=this.NoMatchETag),isEmpty(this.MatchModifiedSince)||(qa["x-amz-copy-source-if-modified-since"]=this.MatchModifiedSince),isEmpty(this.MatchUnmodifiedSince)||(qa["x-amz-copy-source-if-unmodified-since"]=this.MatchUnmodifiedSince),qa}}class CopyDestinationOptions{constructor({Bucket:qa,Object:rd,Encryption:sd,UserMetadata:pd,UserTags:fd,LegalHold:hd,RetainUntilDate:md,Mode:gd,MetadataDirective:yd}){this.Bucket=qa,this.Object=rd,this.Encryption=sd??void 0,this.UserMetadata=pd,this.UserTags=fd,this.LegalHold=hd,this.Mode=gd,this.RetainUntilDate=md,this.MetadataDirective=yd}getHeaders(){const qa="REPLACE",rd={},sd=this.UserTags;if(isEmpty(sd)||(rd["X-Amz-Tagging-Directive"]=qa,rd["X-Amz-Tagging"]=isObject(sd)?queryString.stringify(sd):isString(sd)?sd:""),this.Mode&&(rd["X-Amz-Object-Lock-Mode"]=this.Mode),this.RetainUntilDate&&(rd["X-Amz-Object-Lock-Retain-Until-Date"]=this.RetainUntilDate),this.LegalHold&&(rd["X-Amz-Object-Lock-Legal-Hold"]=this.LegalHold),this.UserMetadata)for(const[pd,fd]of Object.entries(this.UserMetadata))rd[`X-Amz-Meta-${pd}`]=fd.toString();if(this.MetadataDirective&&(rd["X-Amz-Metadata-Directive"]=this.MetadataDirective),this.Encryption){const pd=getEncryptionHeaders(this.Encryption);for(const[fd,hd]of Object.entries(pd))rd[fd]=hd}return rd}validate(){if(!isValidBucketName(this.Bucket))throw new InvalidBucketNameError("Invalid Destination bucket name: "+this.Bucket);if(!isValidObjectName(this.Object))throw new InvalidObjectNameError(`Invalid Destination object name: ${this.Object}`);if(!isEmpty(this.UserMetadata)&&!isObject(this.UserMetadata))throw new InvalidObjectNameError("Destination UserMetadata should be an object with key value pairs");if(!isEmpty(this.Mode)&&![RETENTION_MODES.GOVERNANCE,RETENTION_MODES.COMPLIANCE].includes(this.Mode))throw new InvalidObjectNameError("Invalid Mode specified for destination object it should be one of [GOVERNANCE,COMPLIANCE]");if(this.Encryption!==void 0&&isEmptyObject(this.Encryption))throw new InvalidObjectNameError("Invalid Encryption configuration for destination object ");return!0}}class SelectResults{constructor({records:qa,response:rd,stats:sd,progress:pd}){this.records=qa,this.response=rd,this.stats=sd,this.progress=pd}setStats(qa){this.stats=qa}getStats(){return this.stats}setProgress(qa){this.progress=qa}getProgress(){return this.progress}setResponse(qa){this.response=qa}getResponse(){return this.response}setRecords(qa){this.records=qa}getRecords(){return this.records}}function callbackify(Ra){return function(){const qa=[...arguments],rd=qa.pop();return typeof rd=="function"?Ra.apply(this,qa).then(sd=>rd(null,sd),sd=>rd(sd)):Ra.apply(this,arguments)}}var lib$1={},define_process_default$3={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};Object.defineProperty(lib$1,"__esModule",{value:!0});var _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ra){return typeof Ra}:function(Ra){return Ra&&typeof Symbol=="function"&&Ra.constructor===Symbol&&Ra!==Symbol.prototype?"symbol":typeof Ra},isBrowser=typeof window<"u"&&typeof window.document<"u",isNode=typeof define_process_default$3<"u"&&define_process_default$3.versions!=null&&define_process_default$3.versions.node!=null,isWebWorker=(typeof self>"u"?"undefined":_typeof(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",isJsDom=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",isBrowser_1=lib$1.isBrowser=isBrowser;lib$1.isWebWorker=isWebWorker;lib$1.isNode=isNode;lib$1.isJsDom=isJsDom;lib$1.isDeno=isDeno;class Credentials{constructor({accessKey:qa,secretKey:rd,sessionToken:sd}){this.accessKey=qa,this.secretKey=rd,this.sessionToken=sd}setAccessKey(qa){this.accessKey=qa}getAccessKey(){return this.accessKey}setSecretKey(qa){this.secretKey=qa}getSecretKey(){return this.secretKey}setSessionToken(qa){this.sessionToken=qa}getSessionToken(){return this.sessionToken}get(){return this}}class CredentialProvider{constructor({accessKey:qa,secretKey:rd,sessionToken:sd}){this.credentials=new Credentials({accessKey:qa,secretKey:rd,sessionToken:sd})}async getCredentials(){return this.credentials.get()}setCredentials(qa){if(qa instanceof Credentials)this.credentials=qa;else throw new Error("Unable to set Credentials. it should be an instance of Credentials class")}setAccessKey(qa){this.credentials.setAccessKey(qa)}getAccessKey(){return this.credentials.getAccessKey()}setSecretKey(qa){this.credentials.setSecretKey(qa)}getSecretKey(){return this.credentials.getSecretKey()}setSessionToken(qa){this.credentials.setSessionToken(qa)}getSessionToken(){return this.credentials.getSessionToken()}}const signV4Algorithm="AWS4-HMAC-SHA256";function getCanonicalRequest(Ra,qa,rd,sd,pd){if(!isString(Ra))throw new TypeError('method should be of type "string"');if(!isString(qa))throw new TypeError('path should be of type "string"');if(!isObject(rd))throw new TypeError('headers should be of type "object"');if(!Array.isArray(sd))throw new TypeError('signedHeaders should be of type "array"');if(!isString(pd))throw new TypeError('hashedPayload should be of type "string"');const fd=sd.reduce((gd,yd)=>{const vd=`${rd[yd]}`.replace(/ +/g," ");return gd.push(`${yd.toLowerCase()}:${vd}`),gd},[]),hd=qa.split("?")[0];let md=qa.split("?")[1];return md||(md=""),md&&(md=md.split("&").sort().map(gd=>gd.includes("=")?gd:gd+"=").join("&")),[Ra.toUpperCase(),hd,md,fd.join(` + */(function(Ra){var ed=mimeDb,ud=pathBrowserify.extname,dd=/^\s*([^;\s]*)(?:;|\s|$)/,hd=/^text\//i;Ra.charset=md,Ra.charsets={lookup:md},Ra.contentType=gd,Ra.extension=yd,Ra.extensions=Object.create(null),Ra.lookup=vd,Ra.types=Object.create(null),Cd(Ra.extensions,Ra.types);function md(wd){if(!wd||typeof wd!="string")return!1;var Nd=dd.exec(wd),Ld=Nd&&ed[Nd[1].toLowerCase()];return Ld&&Ld.charset?Ld.charset:Nd&&hd.test(Nd[1])?"UTF-8":!1}function gd(wd){if(!wd||typeof wd!="string")return!1;var Nd=wd.indexOf("/")===-1?Ra.lookup(wd):wd;if(!Nd)return!1;if(Nd.indexOf("charset")===-1){var Ld=Ra.charset(Nd);Ld&&(Nd+="; charset="+Ld.toLowerCase())}return Nd}function yd(wd){if(!wd||typeof wd!="string")return!1;var Nd=dd.exec(wd),Ld=Nd&&Ra.extensions[Nd[1].toLowerCase()];return!Ld||!Ld.length?!1:Ld[0]}function vd(wd){if(!wd||typeof wd!="string")return!1;var Nd=ud("x."+wd).toLowerCase().substr(1);return Nd&&Ra.types[Nd]||!1}function Cd(wd,Nd){var Ld=["nginx","apache",void 0,"iana"];Object.keys(ed).forEach(function(jd){var Gd=ed[jd],Yd=Gd.extensions;if(!(!Yd||!Yd.length)){wd[jd]=Yd;for(var zd=0;zdXd||Wd===Xd&&Nd[qd].substr(0,12)==="application/"))continue}Nd[qd]=jd}}})}})(mimeTypes$1);let ENCRYPTION_TYPES=function(Ra){return Ra.SSEC="SSE-C",Ra.KMS="KMS",Ra}({}),RETENTION_MODES=function(Ra){return Ra.GOVERNANCE="GOVERNANCE",Ra.COMPLIANCE="COMPLIANCE",Ra}({}),RETENTION_VALIDITY_UNITS=function(Ra){return Ra.DAYS="Days",Ra.YEARS="Years",Ra}({}),LEGAL_HOLD_STATUS=function(Ra){return Ra.ENABLED="ON",Ra.DISABLED="OFF",Ra}({});const MetaDataHeaderPrefix="x-amz-meta-";function uriEscape(Ra){return Ra.split("").reduce((ed,ud)=>{const dd=Buffer$4.from(ud);if(dd.length===1&&("A"<=ud&&ud<="Z"||"a"<=ud&&ud<="z"||"0"<=ud&&ud<="9"||ud==="_"||ud==="."||ud==="~"||ud==="-"))return ed=ed+ud,ed;for(const hd of dd)ed=ed+"%"+hd.toString(16).toUpperCase();return ed},"")}function uriResourceEscape(Ra){return uriEscape(Ra).replace(/%2F/g,"/")}function getScope(Ra,ed,ud="s3"){return`${makeDateShort(ed)}/${Ra}/${ud}/aws4_request`}function isAmazonEndpoint(Ra){return Ra==="s3.amazonaws.com"||Ra==="s3.cn-north-1.amazonaws.com.cn"}function isVirtualHostStyle(Ra,ed,ud,dd){return ed==="https:"&&ud.includes(".")?!1:isAmazonEndpoint(Ra)||!dd}function isValidIP(Ra){return ipaddr.isValid(Ra)}function isValidEndpoint(Ra){return isValidDomain(Ra)||isValidIP(Ra)}function isValidDomain(Ra){if(!isString(Ra)||Ra.length===0||Ra.length>255||Ra[0]==="-"||Ra.slice(-1)==="-"||Ra[0]==="_"||Ra.slice(-1)==="_"||Ra[0]===".")return!1;const ed="`~!@#$%^&*()+={}[]|\\\"';:>63||Ra.includes("..")||/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/.test(Ra)?!1:!!/^[a-z0-9][a-z0-9.-]+[a-z0-9]$/.test(Ra)}function isValidObjectName(Ra){return isValidPrefix(Ra)?Ra.length!==0:!1}function isValidPrefix(Ra){return!(!isString(Ra)||Ra.length>1024)}function isNumber(Ra){return typeof Ra=="number"}function isFunction(Ra){return typeof Ra=="function"}function isString(Ra){return typeof Ra=="string"}function isObject(Ra){return typeof Ra=="object"&&Ra!==null}function isReadableStream(Ra){return isObject(Ra)&&isFunction(Ra._read)}function isBoolean(Ra){return typeof Ra=="boolean"}function isEmpty(Ra){return _.isEmpty(Ra)}function isEmptyObject(Ra){return Object.values(Ra).filter(ed=>ed!==void 0).length!==0}function isDefined(Ra){return Ra!=null}function isValidDate(Ra){return Ra instanceof Date&&!isNaN(Ra)}function makeDateLong(Ra){Ra=Ra||new Date;const ed=Ra.toISOString();return ed.slice(0,4)+ed.slice(5,7)+ed.slice(8,13)+ed.slice(14,16)+ed.slice(17,19)+"Z"}function makeDateShort(Ra){Ra=Ra||new Date;const ed=Ra.toISOString();return ed.slice(0,4)+ed.slice(5,7)+ed.slice(8,10)}function pipesetup(...Ra){return Ra.reduce((ed,ud)=>(ed.on("error",dd=>ud.emit("error",dd)),ed.pipe(ud)))}function readableStream(Ra){const ed=new streamBrowserify.Readable;return ed._read=()=>{},ed.push(Ra),ed.push(null),ed}function insertContentType(Ra,ed){for(const ud in Ra)if(ud.toLowerCase()==="content-type")return Ra;return{...Ra,"content-type":probeContentType(ed)}}function prependXAMZMeta(Ra){return Ra?_.mapKeys(Ra,(ed,ud)=>isAmzHeader(ud)||isSupportedHeader(ud)||isStorageClassHeader(ud)?ud:MetaDataHeaderPrefix+ud):{}}function isAmzHeader(Ra){const ed=Ra.toLowerCase();return ed.startsWith(MetaDataHeaderPrefix)||ed==="x-amz-acl"||ed.startsWith("x-amz-server-side-encryption-")||ed==="x-amz-server-side-encryption"}function isSupportedHeader(Ra){return["content-type","cache-control","content-encoding","content-disposition","content-language","x-amz-website-redirect-location"].includes(Ra.toLowerCase())}function isStorageClassHeader(Ra){return Ra.toLowerCase()==="x-amz-storage-class"}function extractMetadata(Ra){return _.mapKeys(_.pickBy(Ra,(ed,ud)=>isSupportedHeader(ud)||isStorageClassHeader(ud)||isAmzHeader(ud)),(ed,ud)=>{const dd=ud.toLowerCase();return dd.startsWith(MetaDataHeaderPrefix)?dd.slice(MetaDataHeaderPrefix.length):ud})}function getVersionId(Ra={}){return Ra["x-amz-version-id"]||null}function getSourceVersionId(Ra={}){return Ra["x-amz-copy-source-version-id"]||null}function sanitizeETag(Ra=""){const ed={'"':"",""":"",""":"",""":"",""":""};return Ra.replace(/^("|"|")|("|"|")$/g,ud=>ed[ud])}function toMd5(Ra){return(void 0)("md5").update(Buffer$4.from(Ra)).digest().toString("base64")}function toSha256(Ra){return(void 0)("sha256").update(Ra).digest("hex")}function toArray(Ra){return Array.isArray(Ra)?Ra:[Ra]}function sanitizeObjectKey(Ra){const ed=(Ra?Ra.toString():"").replace(/\+/g," ");return decodeURIComponent(ed)}function sanitizeSize(Ra){return Ra?Number.parseInt(Ra):void 0}const PART_CONSTRAINTS={ABS_MIN_PART_SIZE:1024*1024*5,MAX_PARTS_COUNT:1e4,MAX_PART_SIZE:1024*1024*1024*5,MAX_MULTIPART_PUT_OBJECT_SIZE:1024*1024*1024*1024*5},GENERIC_SSE_HEADER="X-Amz-Server-Side-Encryption",ENCRYPTION_HEADERS={sseGenericHeader:GENERIC_SSE_HEADER,sseKmsKeyID:GENERIC_SSE_HEADER+"-Aws-Kms-Key-Id"};function getEncryptionHeaders(Ra){const ed=Ra.type;if(!isEmpty(ed)){if(ed===ENCRYPTION_TYPES.SSEC)return{[ENCRYPTION_HEADERS.sseGenericHeader]:"AES256"};if(ed===ENCRYPTION_TYPES.KMS)return{[ENCRYPTION_HEADERS.sseGenericHeader]:Ra.SSEAlgorithm,[ENCRYPTION_HEADERS.sseKmsKeyID]:Ra.KMSMasterKeyID}}return{}}function partsRequired(Ra){const ed=PART_CONSTRAINTS.MAX_MULTIPART_PUT_OBJECT_SIZE/(PART_CONSTRAINTS.MAX_PARTS_COUNT-1);let ud=Ra/ed;return Ra%ed>0&&ud++,ud=Math.trunc(ud),ud}function calculateEvenSplits(Ra,ed){if(Ra===0)return null;const ud=partsRequired(Ra),dd=[],hd=[];let md=ed.Start;(isEmpty(md)||md===-1)&&(md=0);const gd=Math.trunc(Ra/ud),yd=Ra%ud;let vd=md;for(let Cd=0;Cdthis.End||this.Start<0)throw new InvalidObjectNameError("Source start must be non-negative, and start must be at most end.");if(this.MatchRange&&!isNumber(this.Start)||!isNumber(this.End))throw new InvalidObjectNameError("MatchRange is specified. But Invalid Start and End values are specified.");return!0}getHeaders(){const ed={};return ed["x-amz-copy-source"]=encodeURI(this.Bucket+"/"+this.Object),isEmpty(this.VersionID)||(ed["x-amz-copy-source"]=`${encodeURI(this.Bucket+"/"+this.Object)}?versionId=${this.VersionID}`),isEmpty(this.MatchETag)||(ed["x-amz-copy-source-if-match"]=this.MatchETag),isEmpty(this.NoMatchETag)||(ed["x-amz-copy-source-if-none-match"]=this.NoMatchETag),isEmpty(this.MatchModifiedSince)||(ed["x-amz-copy-source-if-modified-since"]=this.MatchModifiedSince),isEmpty(this.MatchUnmodifiedSince)||(ed["x-amz-copy-source-if-unmodified-since"]=this.MatchUnmodifiedSince),ed}}class CopyDestinationOptions{constructor({Bucket:ed,Object:ud,Encryption:dd,UserMetadata:hd,UserTags:md,LegalHold:gd,RetainUntilDate:yd,Mode:vd,MetadataDirective:Cd}){this.Bucket=ed,this.Object=ud,this.Encryption=dd??void 0,this.UserMetadata=hd,this.UserTags=md,this.LegalHold=gd,this.Mode=vd,this.RetainUntilDate=yd,this.MetadataDirective=Cd}getHeaders(){const ed="REPLACE",ud={},dd=this.UserTags;if(isEmpty(dd)||(ud["X-Amz-Tagging-Directive"]=ed,ud["X-Amz-Tagging"]=isObject(dd)?queryString.stringify(dd):isString(dd)?dd:""),this.Mode&&(ud["X-Amz-Object-Lock-Mode"]=this.Mode),this.RetainUntilDate&&(ud["X-Amz-Object-Lock-Retain-Until-Date"]=this.RetainUntilDate),this.LegalHold&&(ud["X-Amz-Object-Lock-Legal-Hold"]=this.LegalHold),this.UserMetadata)for(const[hd,md]of Object.entries(this.UserMetadata))ud[`X-Amz-Meta-${hd}`]=md.toString();if(this.MetadataDirective&&(ud["X-Amz-Metadata-Directive"]=this.MetadataDirective),this.Encryption){const hd=getEncryptionHeaders(this.Encryption);for(const[md,gd]of Object.entries(hd))ud[md]=gd}return ud}validate(){if(!isValidBucketName(this.Bucket))throw new InvalidBucketNameError("Invalid Destination bucket name: "+this.Bucket);if(!isValidObjectName(this.Object))throw new InvalidObjectNameError(`Invalid Destination object name: ${this.Object}`);if(!isEmpty(this.UserMetadata)&&!isObject(this.UserMetadata))throw new InvalidObjectNameError("Destination UserMetadata should be an object with key value pairs");if(!isEmpty(this.Mode)&&![RETENTION_MODES.GOVERNANCE,RETENTION_MODES.COMPLIANCE].includes(this.Mode))throw new InvalidObjectNameError("Invalid Mode specified for destination object it should be one of [GOVERNANCE,COMPLIANCE]");if(this.Encryption!==void 0&&isEmptyObject(this.Encryption))throw new InvalidObjectNameError("Invalid Encryption configuration for destination object ");return!0}}class SelectResults{constructor({records:ed,response:ud,stats:dd,progress:hd}){this.records=ed,this.response=ud,this.stats=dd,this.progress=hd}setStats(ed){this.stats=ed}getStats(){return this.stats}setProgress(ed){this.progress=ed}getProgress(){return this.progress}setResponse(ed){this.response=ed}getResponse(){return this.response}setRecords(ed){this.records=ed}getRecords(){return this.records}}function callbackify(Ra){return function(){const ed=[...arguments],ud=ed.pop();return typeof ud=="function"?Ra.apply(this,ed).then(dd=>ud(null,dd),dd=>ud(dd)):Ra.apply(this,arguments)}}var lib$1={},define_process_default$3={versions:{node:"20.18.3"}};Object.defineProperty(lib$1,"__esModule",{value:!0});var _typeof=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ra){return typeof Ra}:function(Ra){return Ra&&typeof Symbol=="function"&&Ra.constructor===Symbol&&Ra!==Symbol.prototype?"symbol":typeof Ra},isBrowser=typeof window<"u"&&typeof window.document<"u",isNode=typeof define_process_default$3<"u"&&define_process_default$3.versions!=null&&define_process_default$3.versions.node!=null,isWebWorker=(typeof self>"u"?"undefined":_typeof(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",isJsDom=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),isDeno=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",isBrowser_1=lib$1.isBrowser=isBrowser;lib$1.isWebWorker=isWebWorker;lib$1.isNode=isNode;lib$1.isJsDom=isJsDom;lib$1.isDeno=isDeno;class Credentials{constructor({accessKey:ed,secretKey:ud,sessionToken:dd}){this.accessKey=ed,this.secretKey=ud,this.sessionToken=dd}setAccessKey(ed){this.accessKey=ed}getAccessKey(){return this.accessKey}setSecretKey(ed){this.secretKey=ed}getSecretKey(){return this.secretKey}setSessionToken(ed){this.sessionToken=ed}getSessionToken(){return this.sessionToken}get(){return this}}class CredentialProvider{constructor({accessKey:ed,secretKey:ud,sessionToken:dd}){this.credentials=new Credentials({accessKey:ed,secretKey:ud,sessionToken:dd})}async getCredentials(){return this.credentials.get()}setCredentials(ed){if(ed instanceof Credentials)this.credentials=ed;else throw new Error("Unable to set Credentials. it should be an instance of Credentials class")}setAccessKey(ed){this.credentials.setAccessKey(ed)}getAccessKey(){return this.credentials.getAccessKey()}setSecretKey(ed){this.credentials.setSecretKey(ed)}getSecretKey(){return this.credentials.getSecretKey()}setSessionToken(ed){this.credentials.setSessionToken(ed)}getSessionToken(){return this.credentials.getSessionToken()}}const signV4Algorithm="AWS4-HMAC-SHA256";function getCanonicalRequest(Ra,ed,ud,dd,hd){if(!isString(Ra))throw new TypeError('method should be of type "string"');if(!isString(ed))throw new TypeError('path should be of type "string"');if(!isObject(ud))throw new TypeError('headers should be of type "object"');if(!Array.isArray(dd))throw new TypeError('signedHeaders should be of type "array"');if(!isString(hd))throw new TypeError('hashedPayload should be of type "string"');const md=dd.reduce((vd,Cd)=>{const wd=`${ud[Cd]}`.replace(/ +/g," ");return vd.push(`${Cd.toLowerCase()}:${wd}`),vd},[]),gd=ed.split("?")[0];let yd=ed.split("?")[1];return yd||(yd=""),yd&&(yd=yd.split("&").sort().map(vd=>vd.includes("=")?vd:vd+"=").join("&")),[Ra.toUpperCase(),gd,yd,md.join(` `)+` -`,sd.join(";").toLowerCase(),pd].join(` -`)}function getCredential(Ra,qa,rd,sd="s3"){if(!isString(Ra))throw new TypeError('accessKey should be of type "string"');if(!isString(qa))throw new TypeError('region should be of type "string"');if(!isObject(rd))throw new TypeError('requestDate should be of type "object"');return`${Ra}/${getScope(qa,rd,sd)}`}function getSignedHeaders(Ra){if(!isObject(Ra))throw new TypeError('request should be of type "object"');const qa=["authorization","content-length","content-type","user-agent"];return Object.keys(Ra).filter(rd=>!qa.includes(rd)).sort()}function getSigningKey(Ra,qa,rd,sd="s3"){if(!isObject(Ra))throw new TypeError('date should be of type "object"');if(!isString(qa))throw new TypeError('region should be of type "string"');if(!isString(rd))throw new TypeError('secretKey should be of type "string"');const pd=makeDateShort(Ra);return(void 0)("sha256",(void 0)("sha256",(void 0)("sha256",(void 0)("sha256","AWS4"+rd).update(pd).digest()).update(qa).digest()).update(sd).digest()).update("aws4_request").digest()}function getStringToSign(Ra,qa,rd,sd="s3"){if(!isString(Ra))throw new TypeError('canonicalRequest should be of type "string"');if(!isObject(qa))throw new TypeError('requestDate should be of type "object"');if(!isString(rd))throw new TypeError('region should be of type "string"');const pd=(void 0)("sha256").update(Ra).digest("hex"),fd=getScope(rd,qa,sd);return[signV4Algorithm,makeDateLong(qa),fd,pd].join(` -`)}function postPresignSignatureV4(Ra,qa,rd,sd){if(!isString(Ra))throw new TypeError('region should be of type "string"');if(!isObject(qa))throw new TypeError('date should be of type "object"');if(!isString(rd))throw new TypeError('secretKey should be of type "string"');if(!isString(sd))throw new TypeError('policyBase64 should be of type "string"');return(void 0)("sha256",getSigningKey(qa,Ra,rd)).update(sd).digest("hex").toLowerCase()}function signV4(Ra,qa,rd,sd,pd,fd,hd="s3"){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(qa))throw new TypeError('accessKey should be of type "string"');if(!isString(rd))throw new TypeError('secretKey should be of type "string"');if(!isString(sd))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for signing");if(!rd)throw new SecretKeyRequiredError("secretKey is required for signing");const md=getSignedHeaders(Ra.headers),gd=getCanonicalRequest(Ra.method,Ra.path,Ra.headers,md,fd),yd=hd||"s3",vd=getStringToSign(gd,pd,sd,yd),Nd=getSigningKey(pd,sd,rd,yd),Md=getCredential(qa,sd,pd,yd),Ld=(void 0)("sha256",Nd).update(vd).digest("hex").toLowerCase();return`${signV4Algorithm} Credential=${Md}, SignedHeaders=${md.join(";").toLowerCase()}, Signature=${Ld}`}function presignSignatureV4(Ra,qa,rd,sd,pd,fd,hd){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(qa))throw new TypeError('accessKey should be of type "string"');if(!isString(rd))throw new TypeError('secretKey should be of type "string"');if(!isString(pd))throw new TypeError('region should be of type "string"');if(!qa)throw new AccessKeyRequiredError("accessKey is required for presigning");if(!rd)throw new SecretKeyRequiredError("secretKey is required for presigning");if(!isNumber(hd))throw new TypeError('expires should be of type "number"');if(hd<1)throw new ExpiresParamError("expires param cannot be less than 1 seconds");if(hd>604800)throw new ExpiresParamError("expires param cannot be greater than 7 days");const md=makeDateLong(fd),gd=getSignedHeaders(Ra.headers),yd=getCredential(qa,pd,fd),vd="UNSIGNED-PAYLOAD",Nd=[];Nd.push(`X-Amz-Algorithm=${signV4Algorithm}`),Nd.push(`X-Amz-Credential=${uriEscape(yd)}`),Nd.push(`X-Amz-Date=${md}`),Nd.push(`X-Amz-Expires=${hd}`),Nd.push(`X-Amz-SignedHeaders=${uriEscape(gd.join(";").toLowerCase())}`),sd&&Nd.push(`X-Amz-Security-Token=${uriEscape(sd)}`);const Md=Ra.path.split("?")[0];let Ld=Ra.path.split("?")[1];Ld?Ld=Ld+"&"+Nd.join("&"):Ld=Nd.join("&");const Fd=Md+"?"+Ld,Hd=getCanonicalRequest(Ra.method,Fd,Ra.headers,gd,vd),Vd=getStringToSign(Hd,fd,pd),Ud=(void 0)("sha256",getSigningKey(fd,pd,rd)).update(Vd).digest("hex").toLowerCase();return Ra.protocol+"//"+Ra.headers.host+Fd+`&X-Amz-Signature=${Ud}`}async function readAsBuffer(Ra){return new Promise((qa,rd)=>{const sd=[];Ra.on("data",pd=>sd.push(pd)).on("error",pd=>rd(pd)).on("end",()=>qa(Buffer$4.concat(sd)))})}async function readAsString(Ra){return(await readAsBuffer(Ra)).toString()}async function drainResponse(Ra){return new Promise((qa,rd)=>{Ra.on("data",()=>{}).on("error",sd=>rd(sd)).on("end",()=>qa())})}function parseBucketRegion(Ra){return parseXml(Ra).LocationConstraint}const fxp=new fxp$2.XMLParser;function parseError(Ra,qa){let rd={};const sd=fxp.parse(Ra);sd.Error&&(rd=sd.Error);const pd=new S3Error;return Object.entries(rd).forEach(([fd,hd])=>{pd[fd.toLowerCase()]=hd}),Object.entries(qa).forEach(([fd,hd])=>{pd[fd]=hd}),pd}async function parseResponseError(Ra){const qa=Ra.statusCode;let rd,sd;qa===301?(rd="MovedPermanently",sd="Moved Permanently"):qa===307?(rd="TemporaryRedirect",sd="Are you using the correct endpoint URL?"):qa===403?(rd="AccessDenied",sd="Valid and authorized credentials required"):qa===404?(rd="NotFound",sd="Not Found"):qa===405||qa===501?(rd="MethodNotAllowed",sd="Method Not Allowed"):(rd="UnknownError",sd=`${qa}`);const pd={};pd.amzRequestid=Ra.headers["x-amz-request-id"],pd.amzId2=Ra.headers["x-amz-id-2"],pd.amzBucketRegion=Ra.headers["x-amz-bucket-region"];const fd=await readAsString(Ra);if(fd)throw parseError(fd,pd);const hd=new S3Error(sd,{cause:pd});throw hd.code=rd,Object.entries(pd).forEach(([md,gd])=>{hd[md]=gd}),hd}function parseListObjectsV2WithMetadata(Ra){const qa={objects:[],isTruncated:!1,nextContinuationToken:""};let rd=parseXml(Ra);if(!rd.ListBucketResult)throw new InvalidXMLError('Missing tag: "ListBucketResult"');return rd=rd.ListBucketResult,rd.IsTruncated&&(qa.isTruncated=rd.IsTruncated),rd.NextContinuationToken&&(qa.nextContinuationToken=rd.NextContinuationToken),rd.Contents&&toArray(rd.Contents).forEach(sd=>{const pd=sanitizeObjectKey(sd.Key),fd=new Date(sd.LastModified),hd=sanitizeETag(sd.ETag),md=sd.Size;let gd;sd.UserMetadata!=null?gd=toArray(sd.UserMetadata)[0]:gd=null,qa.objects.push({name:pd,lastModified:fd,etag:hd,size:md,metadata:gd})}),rd.CommonPrefixes&&toArray(rd.CommonPrefixes).forEach(sd=>{qa.objects.push({prefix:sanitizeObjectKey(toArray(sd.Prefix)[0]),size:0})}),qa}function parseListParts(Ra){let qa=parseXml(Ra);const rd={isTruncated:!1,parts:[],marker:0};if(!qa.ListPartsResult)throw new InvalidXMLError('Missing tag: "ListPartsResult"');return qa=qa.ListPartsResult,qa.IsTruncated&&(rd.isTruncated=qa.IsTruncated),qa.NextPartNumberMarker&&(rd.marker=toArray(qa.NextPartNumberMarker)[0]||""),qa.Part&&toArray(qa.Part).forEach(sd=>{const pd=parseInt(toArray(sd.PartNumber)[0],10),fd=new Date(sd.LastModified),hd=sd.ETag.replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"");rd.parts.push({part:pd,lastModified:fd,etag:hd,size:parseInt(sd.Size,10)})}),rd}function parseListBucket(Ra){let qa=[];const rd=parseXml(Ra);if(!rd.ListAllMyBucketsResult)throw new InvalidXMLError('Missing tag: "ListAllMyBucketsResult"');const{ListAllMyBucketsResult:{Buckets:sd={}}={}}=rd;return sd.Bucket&&(qa=toArray(sd.Bucket).map((pd={})=>{const{Name:fd,CreationDate:hd}=pd,md=new Date(hd);return{name:fd,creationDate:md}})),qa}function parseInitiateMultipart(Ra){let qa=parseXml(Ra);if(!qa.InitiateMultipartUploadResult)throw new InvalidXMLError('Missing tag: "InitiateMultipartUploadResult"');if(qa=qa.InitiateMultipartUploadResult,qa.UploadId)return qa.UploadId;throw new InvalidXMLError('Missing tag: "UploadId"')}function parseReplicationConfig(Ra){const qa=parseXml(Ra),{Role:rd,Rule:sd}=qa.ReplicationConfiguration;return{ReplicationConfiguration:{role:rd,rules:toArray(sd)}}}class Extensions{constructor(qa){this.client=qa}listObjectsV2WithMetadata(qa,rd,sd,pd){if(rd===void 0&&(rd=""),sd===void 0&&(sd=!1),pd===void 0&&(pd=""),!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidPrefix(rd))throw new InvalidPrefixError(`Invalid prefix : ${rd}`);if(!isString(rd))throw new TypeError('prefix should be of type "string"');if(!isBoolean(sd))throw new TypeError('recursive should be of type "boolean"');if(!isString(pd))throw new TypeError('startAfter should be of type "string"');const fd=sd?"":"/";return streamBrowserify.Readable.from(this.listObjectsV2WithMetadataGen(qa,rd,fd,pd),{objectMode:!0})}async*listObjectsV2WithMetadataGen(qa,rd,sd,pd){let fd=!1,hd="";do{const md=await this.listObjectsV2WithMetadataQuery(qa,rd,hd,sd,pd);fd=!md.isTruncated,hd=md.nextContinuationToken;for(const gd of md.objects)yield gd}while(!fd)}async listObjectsV2WithMetadataQuery(qa,rd,sd,pd,fd){const hd=[];hd.push("list-type=2"),hd.push("encoding-type=url"),hd.push(`prefix=${uriEscape(rd)}`),hd.push(`delimiter=${uriEscape(pd)}`),hd.push("metadata=true"),sd&&(sd=uriEscape(sd),hd.push(`continuation-token=${sd}`)),fd&&(fd=uriEscape(fd),hd.push(`start-after=${fd}`)),hd.push("max-keys=1000"),hd.sort();let md="";hd.length>0&&(md=`${hd.join("&")}`);const yd=await this.client.makeRequestAsync({method:"GET",bucketName:qa,query:md});return parseListObjectsV2WithMetadata(await readAsString(yd))}}async function request$1(Ra,qa,rd=null){return new Promise((sd,pd)=>{const fd=Ra.request(qa,hd=>{sd(hd)});if(!rd||Buffer$4.isBuffer(rd)||typeof rd=="string"){fd.on("error",hd=>{pd(hd)}).end(rd);return}streamBrowserify.pipeline(rd,fd,hd=>{hd&&pd(hd)})})}const awsS3Endpoint={"us-east-1":"s3.amazonaws.com","us-east-2":"s3-us-east-2.amazonaws.com","us-west-1":"s3-us-west-1.amazonaws.com","us-west-2":"s3-us-west-2.amazonaws.com","ca-central-1":"s3.ca-central-1.amazonaws.com","eu-west-1":"s3-eu-west-1.amazonaws.com","eu-west-2":"s3-eu-west-2.amazonaws.com","sa-east-1":"s3-sa-east-1.amazonaws.com","eu-central-1":"s3-eu-central-1.amazonaws.com","ap-south-1":"s3-ap-south-1.amazonaws.com","ap-southeast-1":"s3-ap-southeast-1.amazonaws.com","ap-southeast-2":"s3-ap-southeast-2.amazonaws.com","ap-northeast-1":"s3-ap-northeast-1.amazonaws.com","cn-north-1":"s3.cn-north-1.amazonaws.com.cn","ap-east-1":"s3.ap-east-1.amazonaws.com","eu-north-1":"s3.eu-north-1.amazonaws.com"};function getS3Endpoint(Ra){if(!isString(Ra))throw new TypeError(`Invalid region: ${Ra}`);const qa=awsS3Endpoint[Ra];return qa||"s3.amazonaws.com"}var define_process_default$2={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};const Package={version:"7.1.3"},requestOptionProperties=["agent","ca","cert","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","family","honorCipherOrder","key","passphrase","pfx","rejectUnauthorized","secureOptions","secureProtocol","servername","sessionIdContext"];class TypedClient{constructor(qa){Ng(this,"partSize",64*1024*1024);Ng(this,"maximumPartSize",5*1024*1024*1024);Ng(this,"maxObjectSize",5*1024*1024*1024*1024);if(qa.secure!==void 0)throw new Error('"secure" option deprecated, "useSSL" should be used instead');if(qa.useSSL===void 0&&(qa.useSSL=!0),qa.port||(qa.port=0),!isValidEndpoint(qa.endPoint))throw new InvalidEndpointError(`Invalid endPoint : ${qa.endPoint}`);if(!isValidPort(qa.port))throw new InvalidArgumentError(`Invalid port : ${qa.port}`);if(!isBoolean(qa.useSSL))throw new InvalidArgumentError(`Invalid useSSL flag type : ${qa.useSSL}, expected to be of type "boolean"`);if(qa.region&&!isString(qa.region))throw new InvalidArgumentError(`Invalid region : ${qa.region}`);const rd=qa.endPoint.toLowerCase();let sd=qa.port,pd,fd,hd;if(qa.useSSL?(fd=http,pd="https:",sd=sd||443,hd=void 0):(fd=http,pd="http:",sd=sd||80,hd=void 0),qa.transport){if(!isObject(qa.transport))throw new InvalidArgumentError(`Invalid transport type : ${qa.transport}, expected to be type "object"`);fd=qa.transport}if(qa.transportAgent){if(!isObject(qa.transportAgent))throw new InvalidArgumentError(`Invalid transportAgent type: ${qa.transportAgent}, expected to be type "object"`);hd=qa.transportAgent}const gd=`MinIO ${`(${define_process_default$2.platform}; ${define_process_default$2.arch})`} minio-js/${Package.version}`;if(this.transport=fd,this.transportAgent=hd,this.host=rd,this.port=sd,this.protocol=pd,this.userAgent=`${gd}`,qa.pathStyle===void 0?this.pathStyle=!0:this.pathStyle=qa.pathStyle,this.accessKey=qa.accessKey??"",this.secretKey=qa.secretKey??"",this.sessionToken=qa.sessionToken,this.anonymous=!this.accessKey||!this.secretKey,qa.credentialsProvider&&(this.credentialsProvider=qa.credentialsProvider),this.regionMap={},qa.region&&(this.region=qa.region),qa.partSize&&(this.partSize=qa.partSize,this.overRidePartSize=!0),this.partSize<5*1024*1024)throw new InvalidArgumentError("Part size should be greater than 5MB");if(this.partSize>5*1024*1024*1024)throw new InvalidArgumentError("Part size should be less than 5GB");this.enableSHA256=!this.anonymous&&!qa.useSSL,this.s3AccelerateEndpoint=qa.s3AccelerateEndpoint||void 0,this.reqOptions={},this.clientExtensions=new Extensions(this)}get extensions(){return this.clientExtensions}setS3TransferAccelerate(qa){this.s3AccelerateEndpoint=qa}setRequestOptions(qa){if(!isObject(qa))throw new TypeError('request options should be of type "object"');this.reqOptions=_.pick(qa,requestOptionProperties)}getAccelerateEndPointIfSet(qa,rd){if(!isEmpty(this.s3AccelerateEndpoint)&&!isEmpty(qa)&&!isEmpty(rd)){if(qa.includes("."))throw new Error(`Transfer Acceleration is not supported for non compliant bucket:${qa}`);return this.s3AccelerateEndpoint}return!1}getRequestOptions(qa){const rd=qa.method,sd=qa.region,pd=qa.bucketName;let fd=qa.objectName;const hd=qa.headers,md=qa.query;let gd={method:rd,headers:{},protocol:this.protocol,agent:this.transportAgent},yd;pd&&(yd=isVirtualHostStyle(this.host,this.protocol,pd,this.pathStyle));let vd="/",Nd=this.host,Md;if(this.port&&(Md=this.port),fd&&(fd=uriResourceEscape(fd)),isAmazonEndpoint(Nd)){const Ld=this.getAccelerateEndPointIfSet(pd,fd);Ld?Nd=`${Ld}`:Nd=getS3Endpoint(sd)}if(yd&&!qa.pathStyle?(pd&&(Nd=`${pd}.${Nd}`),fd&&(vd=`/${fd}`)):(pd&&(vd=`/${pd}`),fd&&(vd=`/${pd}/${fd}`)),md&&(vd+=`?${md}`),gd.headers.host=Nd,(gd.protocol==="http:"&&Md!==80||gd.protocol==="https:"&&Md!==443)&&(gd.headers.host=`${Nd}:${Md}`),gd.headers["user-agent"]=this.userAgent,hd)for(const[Ld,Fd]of Object.entries(hd))gd.headers[Ld.toLowerCase()]=Fd;return gd=Object.assign({},this.reqOptions,gd),{...gd,headers:_.mapValues(_.pickBy(gd.headers,isDefined),Ld=>Ld.toString()),host:Nd,port:Md,path:vd}}async setCredentialsProvider(qa){if(!(qa instanceof CredentialProvider))throw new Error("Unable to get credentials. Expected instance of CredentialProvider");this.credentialsProvider=qa,await this.checkAndRefreshCreds()}async checkAndRefreshCreds(){if(this.credentialsProvider)try{const qa=await this.credentialsProvider.getCredentials();this.accessKey=qa.getAccessKey(),this.secretKey=qa.getSecretKey(),this.sessionToken=qa.getSessionToken()}catch(qa){throw new Error(`Unable to get credentials: ${qa}`,{cause:qa})}}logHTTP(qa,rd,sd){if(!this.logStream)return;if(!isObject(qa))throw new TypeError('reqOptions should be of type "object"');if(rd&&!isReadableStream(rd))throw new TypeError('response should be of type "Stream"');if(sd&&!(sd instanceof Error))throw new TypeError('err should be of type "Error"');const pd=this.logStream,fd=hd=>{Object.entries(hd).forEach(([md,gd])=>{if(md=="authorization"&&isString(gd)){const yd=new RegExp("Signature=([0-9a-f]+)");gd=gd.replace(yd,"Signature=**REDACTED**")}pd.write(`${md}: ${gd} -`)}),pd.write(` -`)};if(pd.write(`REQUEST: ${qa.method} ${qa.path} -`),fd(qa.headers),rd&&(this.logStream.write(`RESPONSE: ${rd.statusCode} -`),fd(rd.headers)),sd){pd.write(`ERROR BODY: -`);const hd=JSON.stringify(sd,null," ");pd.write(`${hd} -`)}}traceOn(qa){qa||(qa=define_process_default$2.stdout),this.logStream=qa}traceOff(){this.logStream=void 0}async makeRequestAsync(qa,rd="",sd=[200],pd=""){if(!isObject(qa))throw new TypeError('options should be of type "object"');if(!isString(rd)&&!isObject(rd))throw new TypeError('payload should be of type "string" or "Buffer"');if(sd.forEach(hd=>{if(!isNumber(hd))throw new TypeError('statusCode should be of type "number"')}),!isString(pd))throw new TypeError('region should be of type "string"');qa.headers||(qa.headers={}),(qa.method==="POST"||qa.method==="PUT"||qa.method==="DELETE")&&(qa.headers["content-length"]=rd.length.toString());const fd=this.enableSHA256?toSha256(rd):"";return this.makeRequestStreamAsync(qa,rd,fd,sd,pd)}async makeRequestAsyncOmit(qa,rd="",sd=[200],pd=""){const fd=await this.makeRequestAsync(qa,rd,sd,pd);return await drainResponse(fd),fd}async makeRequestStreamAsync(qa,rd,sd,pd,fd){if(!isObject(qa))throw new TypeError('options should be of type "object"');if(!(Buffer$4.isBuffer(rd)||typeof rd=="string"||isReadableStream(rd)))throw new InvalidArgumentError(`stream should be a Buffer, string or readable Stream, got ${typeof rd} instead`);if(!isString(sd))throw new TypeError('sha256sum should be of type "string"');if(pd.forEach(gd=>{if(!isNumber(gd))throw new TypeError('statusCode should be of type "number"')}),!isString(fd))throw new TypeError('region should be of type "string"');if(!this.enableSHA256&&sd.length!==0)throw new InvalidArgumentError("sha256sum expected to be empty for anonymous or https requests");if(this.enableSHA256&&sd.length!==64)throw new InvalidArgumentError(`Invalid sha256sum : ${sd}`);await this.checkAndRefreshCreds(),fd=fd||await this.getBucketRegionAsync(qa.bucketName);const hd=this.getRequestOptions({...qa,region:fd});if(!this.anonymous){this.enableSHA256||(sd="UNSIGNED-PAYLOAD");const gd=new Date;hd.headers["x-amz-date"]=makeDateLong(gd),hd.headers["x-amz-content-sha256"]=sd,this.sessionToken&&(hd.headers["x-amz-security-token"]=this.sessionToken),hd.headers.authorization=signV4(hd,this.accessKey,this.secretKey,fd,gd,sd)}const md=await request$1(this.transport,hd,rd);if(!md.statusCode)throw new Error("BUG: response doesn't have a statusCode");if(!pd.includes(md.statusCode)){delete this.regionMap[qa.bucketName];const gd=await parseResponseError(md);throw this.logHTTP(hd,md,gd),gd}return this.logHTTP(hd,md),md}async getBucketRegionAsync(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name : ${qa}`);if(this.region)return this.region;const rd=this.regionMap[qa];if(rd)return rd;const sd=async yd=>{const vd=await readAsString(yd),Nd=parseBucketRegion(vd)||DEFAULT_REGION;return this.regionMap[qa]=Nd,Nd},pd="GET",fd="location",hd=this.pathStyle&&!isBrowser_1;let md;try{const yd=await this.makeRequestAsync({method:pd,bucketName:qa,query:fd,pathStyle:hd},"",[200],DEFAULT_REGION);return sd(yd)}catch(yd){if(yd.name!=="AuthorizationHeaderMalformed"||(md=yd.Region,!md))throw yd}const gd=await this.makeRequestAsync({method:pd,bucketName:qa,query:fd,pathStyle:hd},"",[200],md);return await sd(gd)}makeRequest(qa,rd="",sd=[200],pd="",fd,hd){let md;fd?md=this.makeRequestAsync(qa,rd,sd,pd):md=this.makeRequestAsyncOmit(qa,rd,sd,pd),md.then(gd=>hd(null,gd),gd=>{hd(gd)})}makeRequestStream(qa,rd,sd,pd,fd,hd,md){(async()=>{const yd=await this.makeRequestStreamAsync(qa,rd,sd,pd,fd);return hd||await drainResponse(yd),yd})().then(yd=>md(null,yd),yd=>md(yd))}getBucketRegion(qa,rd){return this.getBucketRegionAsync(qa).then(sd=>rd(null,sd),sd=>rd(sd))}async removeBucket(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:qa},"",[204]),delete this.regionMap[qa]}async statObject(qa,rd,sd={}){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isObject(sd))throw new InvalidArgumentError('statOpts should be of type "object"');const pd=queryString.stringify(sd),hd=await this.makeRequestAsyncOmit({method:"HEAD",bucketName:qa,objectName:rd,query:pd});return{size:parseInt(hd.headers["content-length"]),metaData:extractMetadata(hd.headers),lastModified:new Date(hd.headers["last-modified"]),versionId:getVersionId(hd.headers),etag:sanitizeETag(hd.headers.etag)}}async removeObject(qa,rd,sd={}){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isObject(sd))throw new InvalidArgumentError('removeOpts should be of type "object"');const pd="DELETE",fd={};sd.governanceBypass&&(fd["X-Amz-Bypass-Governance-Retention"]=!0),sd.forceDelete&&(fd["x-minio-force-delete"]=!0);const hd={};sd.versionId&&(hd.versionId=`${sd.versionId}`);const md=queryString.stringify(hd);await this.makeRequestAsyncOmit({method:pd,bucketName:qa,objectName:rd,headers:fd,query:md},"",[200,204])}async initiateNewMultipartUpload(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isObject(sd))throw new InvalidObjectNameError('contentType should be of type "object"');const hd=await this.makeRequestAsync({method:"POST",bucketName:qa,objectName:rd,query:"uploads",headers:sd}),md=await readAsBuffer(hd);return parseInitiateMultipart(md.toString())}async abortMultipartUpload(qa,rd,sd){const pd="DELETE",fd=`uploadId=${sd}`,hd={method:pd,bucketName:qa,objectName:rd,query:fd};await this.makeRequestAsyncOmit(hd,"",[204])}async listParts(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isString(sd))throw new TypeError('uploadId should be of type "string"');if(!sd)throw new InvalidArgumentError("uploadId cannot be empty");const pd=[];let fd=0,hd;do hd=await this.listPartsQuery(qa,rd,sd,fd),fd=hd.marker,pd.push(...hd.parts);while(hd.isTruncated);return pd}async listPartsQuery(qa,rd,sd,pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isString(sd))throw new TypeError('uploadId should be of type "string"');if(!isNumber(pd))throw new TypeError('marker should be of type "number"');if(!sd)throw new InvalidArgumentError("uploadId cannot be empty");let fd=`uploadId=${uriEscape(sd)}`;pd&&(fd+=`&part-number-marker=${pd}`);const md=await this.makeRequestAsync({method:"GET",bucketName:qa,objectName:rd,query:fd});return parseListParts(await readAsString(md))}async listBuckets(){const rd=await this.makeRequestAsync({method:"GET"},"",[200],DEFAULT_REGION),sd=await readAsString(rd);return parseListBucket(sd)}async removeBucketReplication(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:qa,query:"replication"},"",[200,204],"")}async setBucketReplication(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(isObject(rd)){if(_.isEmpty(rd.role))throw new InvalidArgumentError("Role cannot be empty");if(rd.role&&!isString(rd.role))throw new InvalidArgumentError("Invalid value for role",rd.role);if(_.isEmpty(rd.rules))throw new InvalidArgumentError("Minimum one replication rule must be specified")}else throw new InvalidArgumentError('replicationConfig should be of type "object"');const sd="PUT",pd="replication",fd={},hd={ReplicationConfiguration:{Role:rd.role,Rule:rd.rules}},gd=new xml2js.Builder({renderOpts:{pretty:!1},headless:!0}).buildObject(hd);fd["Content-MD5"]=toMd5(gd),await this.makeRequestAsyncOmit({method:sd,bucketName:qa,query:pd,headers:fd},gd)}async getBucketReplication(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);const pd=await this.makeRequestAsync({method:"GET",bucketName:qa,query:"replication"},"",[200,204]),fd=await readAsString(pd);return parseReplicationConfig(fd)}}class CopyConditions{constructor(){Ng(this,"modified","");Ng(this,"unmodified","");Ng(this,"matchETag","");Ng(this,"matchETagExcept","")}setModified(qa){if(!(qa instanceof Date))throw new TypeError("date must be of type Date");this.modified=qa.toUTCString()}setUnmodified(qa){if(!(qa instanceof Date))throw new TypeError("date must be of type Date");this.unmodified=qa.toUTCString()}setMatchETag(qa){this.matchETag=qa}setMatchETagExcept(qa){this.matchETagExcept=qa}}class PostPolicy{constructor(){Ng(this,"policy",{conditions:[]});Ng(this,"formData",{})}setExpires(qa){if(!qa)throw new InvalidDateError("Invalid date: cannot be null");this.policy.expiration=qa.toISOString()}setKey(qa){if(!isValidObjectName(qa))throw new InvalidObjectNameError(`Invalid object name : ${qa}`);this.policy.conditions.push(["eq","$key",qa]),this.formData.key=qa}setKeyStartsWith(qa){if(!isValidPrefix(qa))throw new InvalidPrefixError(`Invalid prefix : ${qa}`);this.policy.conditions.push(["starts-with","$key",qa]),this.formData.key=qa}setBucket(qa){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name : ${qa}`);this.policy.conditions.push(["eq","$bucket",qa]),this.formData.bucket=qa}setContentType(qa){if(!qa)throw new Error("content-type cannot be null");this.policy.conditions.push(["eq","$Content-Type",qa]),this.formData["Content-Type"]=qa}setContentTypeStartsWith(qa){if(!qa)throw new Error("content-type cannot be null");this.policy.conditions.push(["starts-with","$Content-Type",qa]),this.formData["Content-Type"]=qa}setContentDisposition(qa){if(!qa)throw new Error("content-disposition cannot be null");this.policy.conditions.push(["eq","$Content-Disposition",qa]),this.formData["Content-Disposition"]=qa}setContentLengthRange(qa,rd){if(qa>rd)throw new Error("min cannot be more than max");if(qa<0)throw new Error("min should be > 0");if(rd<0)throw new Error("max should be > 0");this.policy.conditions.push(["content-length-range",qa,rd])}setUserMetaData(qa){if(!isObject(qa))throw new TypeError('metadata should be of type "object"');Object.entries(qa).forEach(([rd,sd])=>{const pd=`x-amz-meta-${rd}`;this.policy.conditions.push(["eq",`$${pd}`,sd]),this.formData[pd]=sd.toString()})}}var jsonStream={exports:{}},util=util$6,TransformStream$1=streamBrowserify.Transform;jsonStream.exports=function(Ra){return new JSONStream(Ra)};var JSONStream=jsonStream.exports.JSONStream=function(Ra){Ra=Ra||{},TransformStream$1.call(this,Ra),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this._async=Ra.async||!1};util.inherits(JSONStream,TransformStream$1);JSONStream.prototype._transform=function(Ra,qa,rd){Buffer$4.isBuffer(Ra)||(Ra=new Buffer$4(Ra)),this._buffer&&(Ra=Buffer$4.concat([this._buffer,Ra]));for(var sd=0,pd=0;++sd<=Ra.length;)if(Ra[sd]===10||sd===Ra.length){var fd;try{fd=JSON.parse(Ra.slice(pd,sd))}catch{}fd&&(this.push(fd),fd=null),Ra[sd]===10&&(pd=++sd)}return this._buffer=Ra.slice(pd),this._async?void setImmediate(rd):void rd()};var jsonStreamExports=jsonStream.exports;const JSONParser=getDefaultExportFromCjs(jsonStreamExports);var through2$1={exports:{}};const{Transform}=readableBrowserExports;function inherits(Ra,qa){Ra.super_=qa,Ra.prototype=Object.create(qa.prototype,{constructor:{value:Ra,enumerable:!1,writable:!0,configurable:!0}})}function through2(Ra){return(qa,rd,sd)=>(typeof qa=="function"&&(sd=rd,rd=qa,qa={}),typeof rd!="function"&&(rd=(pd,fd,hd)=>hd(null,pd)),typeof sd!="function"&&(sd=null),Ra(qa,rd,sd))}const make=through2((Ra,qa,rd)=>{const sd=new Transform(Ra);return sd._transform=qa,rd&&(sd._flush=rd),sd}),ctor=through2((Ra,qa,rd)=>{function sd(pd){if(!(this instanceof sd))return new sd(pd);this.options=Object.assign({},Ra,pd),Transform.call(this,this.options),this._transform=qa,rd&&(this._flush=rd)}return inherits(sd,Transform),sd}),obj=through2(function(Ra,qa,rd){const sd=new Transform(Object.assign({objectMode:!0,highWaterMark:16},Ra));return sd._transform=qa,rd&&(sd._flush=rd),sd});through2$1.exports=make;through2$1.exports.ctor=ctor;through2$1.exports.obj=obj;var through2Exports=through2$1.exports;const Through2=getDefaultExportFromCjs(through2Exports);var Buffer=buffer.Buffer,CRC_TABLE=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(CRC_TABLE=new Int32Array(CRC_TABLE));function ensureBuffer(Ra){if(Buffer.isBuffer(Ra))return Ra;var qa=typeof Buffer.alloc=="function"&&typeof Buffer.from=="function";if(typeof Ra=="number")return qa?Buffer.alloc(Ra):new Buffer(Ra);if(typeof Ra=="string")return qa?Buffer.from(Ra):new Buffer(Ra);throw new Error("input must be buffer, number, or string, received "+typeof Ra)}function bufferizeInt(Ra){var qa=ensureBuffer(4);return qa.writeInt32BE(Ra,0),qa}function _crc32(Ra,qa){Ra=ensureBuffer(Ra),Buffer.isBuffer(qa)&&(qa=qa.readUInt32BE(0));for(var rd=~~qa^-1,sd=0;sd>>8;return rd^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};var bufferCrc32=crc32;const crc32$1=getDefaultExportFromCjs(bufferCrc32),fxpWithoutNumParser=new fxp$2.XMLParser({numberParseOptions:{skipLike:/./}});function parseCopyObject(Ra){var qa={etag:"",lastModified:""},rd=parseXml(Ra);if(!rd.CopyObjectResult)throw new InvalidXMLError('Missing tag: "CopyObjectResult"');return rd=rd.CopyObjectResult,rd.ETag&&(qa.etag=rd.ETag.replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"")),rd.LastModified&&(qa.lastModified=new Date(rd.LastModified)),qa}function parseListMultipart(Ra){var qa={uploads:[],prefixes:[],isTruncated:!1},rd=parseXml(Ra);if(!rd.ListMultipartUploadsResult)throw new InvalidXMLError('Missing tag: "ListMultipartUploadsResult"');return rd=rd.ListMultipartUploadsResult,rd.IsTruncated&&(qa.isTruncated=rd.IsTruncated),rd.NextKeyMarker&&(qa.nextKeyMarker=rd.NextKeyMarker),rd.NextUploadIdMarker&&(qa.nextUploadIdMarker=rd.nextUploadIdMarker||""),rd.CommonPrefixes&&toArray(rd.CommonPrefixes).forEach(sd=>{qa.prefixes.push({prefix:sanitizeObjectKey(toArray(sd.Prefix)[0])})}),rd.Upload&&toArray(rd.Upload).forEach(sd=>{var pd=sd.Key,fd=sd.UploadId,hd={id:sd.Initiator.ID,displayName:sd.Initiator.DisplayName},md={id:sd.Owner.ID,displayName:sd.Owner.DisplayName},gd=sd.StorageClass,yd=new Date(sd.Initiated);qa.uploads.push({key:pd,uploadId:fd,initiator:hd,owner:md,storageClass:gd,initiated:yd})}),qa}function parseBucketNotification(Ra){var qa={TopicConfiguration:[],QueueConfiguration:[],CloudFunctionConfiguration:[]},rd=function(fd){var hd=[];return fd&&toArray(fd).forEach(md=>{hd.push(md)}),hd},sd=function(fd){var hd=[];return fd&&(fd=toArray(fd),fd[0].S3Key&&(fd[0].S3Key=toArray(fd[0].S3Key),fd[0].S3Key[0].FilterRule&&toArray(fd[0].S3Key[0].FilterRule).forEach(md=>{var gd=toArray(md.Name)[0],yd=toArray(md.Value)[0];hd.push({Name:gd,Value:yd})}))),hd},pd=parseXml(Ra);return pd=pd.NotificationConfiguration,pd.TopicConfiguration&&toArray(pd.TopicConfiguration).forEach(fd=>{var hd=toArray(fd.Id)[0],md=toArray(fd.Topic)[0],gd=rd(fd.Event),yd=sd(fd.Filter);qa.TopicConfiguration.push({Id:hd,Topic:md,Event:gd,Filter:yd})}),pd.QueueConfiguration&&toArray(pd.QueueConfiguration).forEach(fd=>{var hd=toArray(fd.Id)[0],md=toArray(fd.Queue)[0],gd=rd(fd.Event),yd=sd(fd.Filter);qa.QueueConfiguration.push({Id:hd,Queue:md,Event:gd,Filter:yd})}),pd.CloudFunctionConfiguration&&toArray(pd.CloudFunctionConfiguration).forEach(fd=>{var hd=toArray(fd.Id)[0],md=toArray(fd.CloudFunction)[0],gd=rd(fd.Event),yd=sd(fd.Filter);qa.CloudFunctionConfiguration.push({Id:hd,CloudFunction:md,Event:gd,Filter:yd})}),qa}function parseCompleteMultipart(Ra){var qa=parseXml(Ra).CompleteMultipartUploadResult;if(qa.Location){var rd=toArray(qa.Location)[0],sd=toArray(qa.Bucket)[0],pd=qa.Key,fd=qa.ETag.replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"");return{location:rd,bucket:sd,key:pd,etag:fd}}if(qa.Code&&qa.Message){var hd=toArray(qa.Code)[0],md=toArray(qa.Message)[0];return{errCode:hd,errMessage:md}}}const formatObjInfo=(Ra,qa={})=>{let{Key:rd,LastModified:sd,ETag:pd,Size:fd,VersionId:hd,IsLatest:md}=Ra;isObject(qa)||(qa={});const gd=sanitizeObjectKey(toArray(rd)[0]),yd=new Date(toArray(sd)[0]),vd=sanitizeETag(toArray(pd)[0]),Nd=sanitizeSize(fd);return{name:gd,lastModified:yd,etag:vd,size:Nd,versionId:hd,isLatest:md,isDeleteMarker:qa.IsDeleteMarker?qa.IsDeleteMarker:!1}};function parseListObjects(Ra){var qa={objects:[],isTruncated:!1};let rd=!1,sd,pd;const fd=fxpWithoutNumParser.parse(Ra),hd=yd=>{yd&&toArray(yd).forEach(vd=>{qa.objects.push({prefix:sanitizeObjectKey(toArray(vd.Prefix)[0]),size:0})})},md=fd.ListBucketResult,gd=fd.ListVersionsResult;return md&&(md.IsTruncated&&(rd=md.IsTruncated),md.Contents&&toArray(md.Contents).forEach(yd=>{const vd=sanitizeObjectKey(toArray(yd.Key)[0]),Nd=new Date(toArray(yd.LastModified)[0]),Md=sanitizeETag(toArray(yd.ETag)[0]),Ld=sanitizeSize(yd.Size);qa.objects.push({name:vd,lastModified:Nd,etag:Md,size:Ld})}),md.NextMarker&&(sd=md.NextMarker),hd(md.CommonPrefixes)),gd&&(gd.IsTruncated&&(rd=gd.IsTruncated),gd.Version&&toArray(gd.Version).forEach(yd=>{qa.objects.push(formatObjInfo(yd))}),gd.DeleteMarker&&toArray(gd.DeleteMarker).forEach(yd=>{qa.objects.push(formatObjInfo(yd,{IsDeleteMarker:!0}))}),gd.NextKeyMarker&&(pd=gd.NextKeyMarker),gd.NextVersionIdMarker&&(qa.versionIdMarker=gd.NextVersionIdMarker),hd(gd.CommonPrefixes)),qa.isTruncated=rd,rd&&(qa.nextMarker=pd||sd),qa}function parseListObjectsV2(Ra){var qa={objects:[],isTruncated:!1},rd=parseXml(Ra);if(!rd.ListBucketResult)throw new InvalidXMLError('Missing tag: "ListBucketResult"');return rd=rd.ListBucketResult,rd.IsTruncated&&(qa.isTruncated=rd.IsTruncated),rd.NextContinuationToken&&(qa.nextContinuationToken=rd.NextContinuationToken),rd.Contents&&toArray(rd.Contents).forEach(sd=>{var pd=sanitizeObjectKey(toArray(sd.Key)[0]),fd=new Date(sd.LastModified),hd=sanitizeETag(sd.ETag),md=sd.Size;qa.objects.push({name:pd,lastModified:fd,etag:hd,size:md})}),rd.CommonPrefixes&&toArray(rd.CommonPrefixes).forEach(sd=>{qa.objects.push({prefix:sanitizeObjectKey(toArray(sd.Prefix)[0]),size:0})}),qa}function parseBucketVersioningConfig(Ra){var qa=parseXml(Ra);return qa.VersioningConfiguration}function parseTagging(Ra){const qa=parseXml(Ra);let rd=[];if(qa.Tagging&&qa.Tagging.TagSet&&qa.Tagging.TagSet.Tag){const sd=qa.Tagging.TagSet.Tag;isObject(sd)?rd.push(sd):rd=sd}return rd}function parseLifecycleConfig(Ra){return parseXml(Ra).LifecycleConfiguration}function parseObjectLockConfig(Ra){const qa=parseXml(Ra);let rd={};if(qa.ObjectLockConfiguration){rd={objectLockEnabled:qa.ObjectLockConfiguration.ObjectLockEnabled};let sd;if(qa.ObjectLockConfiguration&&qa.ObjectLockConfiguration.Rule&&qa.ObjectLockConfiguration.Rule.DefaultRetention&&(sd=qa.ObjectLockConfiguration.Rule.DefaultRetention||{},rd.mode=sd.Mode),sd){const pd=sd.Years;pd?(rd.validity=pd,rd.unit=RETENTION_VALIDITY_UNITS.YEARS):(rd.validity=sd.Days,rd.unit=RETENTION_VALIDITY_UNITS.DAYS)}return rd}}function parseObjectRetentionConfig(Ra){const rd=parseXml(Ra).Retention;return{mode:rd.Mode,retainUntilDate:rd.RetainUntilDate}}function parseBucketEncryptionConfig(Ra){return parseXml(Ra)}function parseObjectLegalHoldConfig(Ra){return parseXml(Ra).LegalHold}function uploadPartParser(Ra){return parseXml(Ra).CopyPartResult}function removeObjectsParser(Ra){const qa=parseXml(Ra);return qa.DeleteResult&&qa.DeleteResult.Error?toArray(qa.DeleteResult.Error):[]}function parseSelectObjectContentResponse(Ra){function qa(fd){const hd=Buffer$4.from(fd.read(1)).readUInt8(),gd=(Buffer$4.from(fd.read(hd)).toString()||"").split(":");return gd.length>=1?gd[1]:""}function rd(fd){const hd=Buffer$4.from(fd.read(2)).readUInt16BE();return Buffer$4.from(fd.read(hd)).toString()}const sd=new SelectResults({}),pd=readableStream(Ra);for(;pd._readableState.length;){let fd;const hd=Buffer$4.from(pd.read(4));fd=crc32$1(hd);const md=Buffer$4.from(pd.read(4));fd=crc32$1(md,fd);const gd=fd.readInt32BE(),yd=Buffer$4.from(pd.read(4));fd=crc32$1(yd,fd);const vd=hd.readInt32BE(),Nd=md.readInt32BE(),Md=yd.readInt32BE();if(Md!==gd)throw new Error(`Header Checksum Mismatch, Prelude CRC of ${Md} does not equal expected CRC of ${gd}`);const Ld={};if(Nd>0){const Gd=Buffer$4.from(pd.read(Nd));fd=crc32$1(Gd,fd);const Ud=readableStream(Gd);for(;Ud._readableState.length;){let qd=qa(Ud);Ud.read(1),Ld[qd]=rd(Ud)}}let Fd;const Hd=vd-Nd-16;if(Hd>0){const Gd=Buffer$4.from(pd.read(Hd));fd=crc32$1(Gd,fd);const Ud=Buffer$4.from(pd.read(4)).readInt32BE(),qd=fd.readInt32BE();if(Ud!==qd)throw new Error(`Message Checksum Mismatch, Message CRC of ${Ud} does not equal expected CRC of ${qd}`);Fd=readableStream(Gd)}const Vd=Ld["message-type"];switch(Vd){case"error":{const Gd=Ld["error-code"]+':"'+Ld["error-message"]+'"';throw new Error(Gd)}case"event":{const Gd=Ld["content-type"];switch(Ld["event-type"]){case"End":return sd.setResponse(Ra),sd;case"Records":{const qd=Fd.read(Hd);sd.setRecords(qd);break}case"Progress":switch(Gd){case"text/xml":{const qd=Fd.read(Hd);sd.setProgress(qd.toString());break}default:{const qd=`Unexpected content-type ${Gd} sent for event-type Progress`;throw new Error(qd)}}break;case"Stats":switch(Gd){case"text/xml":{const qd=Fd.read(Hd);sd.setStats(qd.toString());break}default:{const qd=`Unexpected content-type ${Gd} sent for event-type Stats`;throw new Error(qd)}}break;default:{const qd=`Un implemented event detected ${Vd}.`;console.warn(qd)}}}}}}function getConcater(Ra,qa){var rd=!1,sd=[];if(Ra&&!isFunction(Ra))throw new TypeError('parser should be of type "function"');return Ra&&(rd=!0),Through2({objectMode:rd},function(pd,fd,hd){sd.push(pd),hd()},function(pd){sd.length&&(Ra?this.push(Ra(Buffer$4.concat(sd).toString())):this.push(Buffer$4.concat(sd))),pd()})}function getCopyObjectTransformer(){return getConcater(parseCopyObject)}function getListMultipartTransformer(){return getConcater(parseListMultipart)}function getListObjectsTransformer(){return getConcater(parseListObjects)}function getListObjectsV2Transformer(){return getConcater(parseListObjectsV2)}function getCompleteMultipartTransformer(){return getConcater(parseCompleteMultipart)}function getBucketNotificationTransformer(){return getConcater(parseBucketNotification)}function getNotificationTransformer(){return new JSONParser}function bucketVersioningTransformer(){return getConcater(parseBucketVersioningConfig)}function getTagsTransformer(){return getConcater(parseTagging)}function lifecycleTransformer(){return getConcater(parseLifecycleConfig)}function objectLockTransformer(){return getConcater(parseObjectLockConfig)}function objectRetentionTransformer(){return getConcater(parseObjectRetentionConfig)}function bucketEncryptionTransformer(){return getConcater(parseBucketEncryptionConfig)}function objectLegalHoldTransformer(){return getConcater(parseObjectLegalHoldConfig)}function uploadPartTransformer(){return getConcater(uploadPartParser)}function selectObjectContentTransformer(){return getConcater()}function removeObjectsTransformer(){return getConcater(removeObjectsParser)}var define_process_default$1={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};class NotificationConfig{add(qa){let rd="";qa instanceof TopicConfig&&(rd="TopicConfiguration"),qa instanceof QueueConfig&&(rd="QueueConfiguration"),qa instanceof CloudFunctionConfig&&(rd="CloudFunctionConfiguration"),this[rd]||(this[rd]=[]),this[rd].push(qa)}}class TargetConfig{setId(qa){this.Id=qa}addEvent(qa){this.Event||(this.Event=[]),this.Event.push(qa)}addFilterSuffix(qa){this.Filter||(this.Filter={S3Key:{FilterRule:[]}}),this.Filter.S3Key.FilterRule.push({Name:"suffix",Value:qa})}addFilterPrefix(qa){this.Filter||(this.Filter={S3Key:{FilterRule:[]}}),this.Filter.S3Key.FilterRule.push({Name:"prefix",Value:qa})}}class TopicConfig extends TargetConfig{constructor(qa){super(),this.Topic=qa}}class QueueConfig extends TargetConfig{constructor(qa){super(),this.Queue=qa}}class CloudFunctionConfig extends TargetConfig{constructor(qa){super(),this.CloudFunction=qa}}class NotificationPoller extends eventsExports.EventEmitter{constructor(qa,rd,sd,pd,fd){super(),this.client=qa,this.bucketName=rd,this.prefix=sd,this.suffix=pd,this.events=fd,this.ending=!1}start(){this.ending=!1,define_process_default$1.nextTick(()=>{this.checkForChanges()})}stop(){this.ending=!0}checkForChanges(){if(this.ending)return;let qa="GET";var rd=[];if(this.prefix){var sd=uriEscape(this.prefix);rd.push(`prefix=${sd}`)}if(this.suffix){var pd=uriEscape(this.suffix);rd.push(`suffix=${pd}`)}this.events&&this.events.forEach(md=>rd.push("events="+uriEscape(md))),rd.sort();var fd="";rd.length>0&&(fd=`${rd.join("&")}`);const hd=this.client.region||DEFAULT_REGION;this.client.makeRequest({method:qa,bucketName:this.bucketName,query:fd},"",[200],hd,!0,(md,gd)=>{if(md)return this.emit("error",md);let yd=getNotificationTransformer();pipesetup(gd,yd).on("data",vd=>{let Nd=vd.Records;Nd||(Nd=[]),Nd.forEach(Md=>{this.emit("notification",Md)}),this.ending&&gd.destroy()}).on("error",vd=>this.emit("error",vd)).on("end",()=>{define_process_default$1.nextTick(()=>{this.checkForChanges()})})})}}var define_process_default={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_42a463d1-4841-44ca-9554-2524e3c62899",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_42a463d1-4841-44ca-9554-2524e3c62899",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:4882",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13629777579",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_a03a3ef6-462b-4b52-838c-6a902305f57f",INVOCATION_ID:"876636608661408692495c494d2c576e",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"503",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub Actions 17",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"f3337f83bd8375f5694b1162f61353ac04a5408f",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_42a463d1-4841-44ca-9554-2524e3c62899",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_42a463d1-4841-44ca-9554-2524e3c62899",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_42a463d1-4841-44ca-9554-2524e3c62899",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2163,ppid:2161,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};class ObjectUploader extends streamBrowserify.Transform{constructor(qa,rd,sd,pd,fd,hd){super(),this.emptyStream=!0,this.client=qa,this.bucketName=rd,this.objectName=sd,this.partSize=pd,this.metaData=fd,this.callback=hd,this.partNumber=1,this.oldParts=null,this.etags=[],this.id=null,this.on("error",md=>{hd(md)})}_transform(qa,rd,sd){this.emptyStream=!1;let pd="PUT",fd={"Content-Length":qa.length},hd="";if(this.client.enableSHA256||(hd=(void 0)("md5").update(qa).digest(),fd["Content-MD5"]=hd.toString("base64")),this.partNumber==1&&qa.length{if(Nd)return sd(Nd);let Ld={etag:sanitizeETag(Md.headers.etag),versionId:getVersionId(Md.headers)};Md.on("data",()=>{}),define_process_default.nextTick(()=>{this.callback(null,Ld)}),sd()});return}if(this.id===null){this.once("ready",()=>{this._transform(qa,rd,sd)}),this.client.findUploadId(this.bucketName,this.objectName,(vd,Nd)=>{if(vd)return this.emit("error",vd);if(!Nd){this.client.initiateNewMultipartUpload(this.bucketName,this.objectName,this.metaData).then(Md=>{this.id=Md,this.emit("ready")},Md=>sd(Md));return}this.id=Nd,this.client.listParts(this.bucketName,this.objectName,Nd).then(Md=>{Md||(Md=[]),this.oldParts=Md.reduce(function(Ld,Fd){return Ld[Fd.part]||(Ld[Fd.part]=Fd),Ld},{}),this.emit("ready")},Md=>this.emit("error",Md))});return}let md=this.partNumber++;if(this.oldParts){let vd=this.oldParts[md];if(hd||(hd=(void 0)("md5").update(qa).digest()),vd&&hd.toString("hex")===vd.etag){this.etags.push({part:md,etag:vd.etag}),sd();return}}let gd=queryString.stringify({partNumber:md,uploadId:this.id}),yd={method:pd,query:gd,headers:fd,bucketName:this.bucketName,objectName:this.objectName};this.client.makeRequest(yd,qa,[200],"",!0,(vd,Nd)=>{if(vd)return sd(vd);let Md=Nd.headers.etag;Md&&(Md=Md.replace(/^"/,"").replace(/"$/,"")),this.etags.push({part:md,etag:Md}),Nd.on("data",()=>{}),sd()})}_flush(qa){if(this.emptyStream){let rd="PUT",sd=Object.assign({},this.metaData,{"Content-Length":0}),pd={method:rd,headers:sd,query:"",bucketName:this.bucketName,objectName:this.objectName};this.client.makeRequest(pd,"",[200],"",!0,(fd,hd)=>{if(fd)return qa(fd);let md={etag:sanitizeETag(hd.headers.etag),versionId:getVersionId(hd.headers)};hd.on("data",()=>{}),define_process_default.nextTick(()=>{this.callback(null,md)}),qa()});return}this.id!==null&&this.client.completeMultipartUpload(this.bucketName,this.objectName,this.id,this.etags,(rd,sd)=>{if(rd)return qa(rd);define_process_default.nextTick(()=>{this.callback(null,sd)}),qa()})}}function promisify(Ra){return function(){if(typeof arguments[arguments.length-1]=="function")return Ra.apply(this,arguments);let rd=[...arguments];return new Promise((sd,pd)=>{rd.push((fd,hd)=>{if(fd)return pd(fd);sd(hd)}),Ra.apply(this,rd)})}}class Client extends TypedClient{setAppInfo(qa,rd){if(!isString(qa))throw new TypeError(`Invalid appName: ${qa}`);if(qa.trim()==="")throw new InvalidArgumentError("Input appName cannot be empty.");if(!isString(rd))throw new TypeError(`Invalid appVersion: ${rd}`);if(rd.trim()==="")throw new InvalidArgumentError("Input appVersion cannot be empty.");this.userAgent=`${this.userAgent} ${qa}/${rd}`}calculatePartSize(qa){if(!isNumber(qa))throw new TypeError('size should be of type "number"');if(qa>this.maxObjectSize)throw new TypeError(`size should not be more than ${this.maxObjectSize}`);if(this.overRidePartSize)return this.partSize;for(var rd=this.partSize;;){if(rd*1e4>qa)return rd;rd+=16*1024*1024}}makeBucket(qa,rd,sd={},pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(isObject(rd)&&(pd=sd,sd=rd,rd=""),isFunction(rd)&&(pd=rd,rd="",sd={}),isFunction(sd)&&(pd=sd,sd={}),!isString(rd))throw new TypeError('region should be of type "string"');if(!isObject(sd))throw new TypeError('makeOpts should be of type "object"');if(!isFunction(pd))throw new TypeError('callback should be of type "function"');var fd="";if(rd&&this.region&&rd!==this.region)throw new InvalidArgumentError(`Configured region ${this.region}, requested ${rd}`);if(rd&&rd!==DEFAULT_REGION){var hd=[];hd.push({_attr:{xmlns:"http://s3.amazonaws.com/doc/2006-03-01/"}}),hd.push({LocationConstraint:rd});var md={CreateBucketConfiguration:hd};fd=Xml(md)}var gd="PUT",yd={};sd.ObjectLocking&&(yd["x-amz-bucket-object-lock-enabled"]=!0),rd||(rd=DEFAULT_REGION);const vd=Nd=>{if(Nd&&(rd===""||rd===DEFAULT_REGION))if(Nd.code==="AuthorizationHeaderMalformed"&&Nd.region!=="")this.makeRequest({method:gd,bucketName:qa,headers:yd},fd,[200],Nd.region,!1,pd);else return pd&&pd(Nd);return pd&&pd(Nd)};this.makeRequest({method:gd,bucketName:qa,headers:yd},fd,[200],rd,!1,vd)}listIncompleteUploads(qa,rd,sd){if(rd===void 0&&(rd=""),sd===void 0&&(sd=!1),!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidPrefix(rd))throw new InvalidPrefixError(`Invalid prefix : ${rd}`);if(!isBoolean(sd))throw new TypeError('recursive should be of type "boolean"');var pd=sd?"":"/",fd="",hd="",md=[],gd=!1,yd=streamBrowserify.Readable({objectMode:!0});return yd._read=()=>{if(md.length)return yd.push(md.shift());if(gd)return yd.push(null);this.listIncompleteUploadsQuery(qa,rd,fd,hd,pd).on("error",vd=>yd.emit("error",vd)).on("data",vd=>{vd.prefixes.forEach(Nd=>md.push(Nd)),index.eachSeries(vd.uploads,(Nd,Md)=>{this.listParts(qa,Nd.key,Nd.uploadId).then(Ld=>{Nd.size=Ld.reduce((Fd,Hd)=>Fd+Hd.size,0),md.push(Nd),Md()},Md)},Nd=>{if(Nd){yd.emit("error",Nd);return}vd.isTruncated?(fd=vd.nextKeyMarker,hd=vd.nextUploadIdMarker):gd=!0,yd._read()})})},yd}bucketExists(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new TypeError('callback should be of type "function"');var sd="HEAD";this.makeRequest({method:sd,bucketName:qa},"",[200],"",!1,pd=>{if(pd)return pd.code=="NoSuchBucket"||pd.code=="NotFound"?rd(null,!1):rd(pd);rd(null,!0)})}removeIncompleteUpload(qa,rd,sd){if(!isValidBucketName(qa))throw new IsValidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isFunction(sd))throw new TypeError('callback should be of type "function"');var pd;index.during(fd=>{this.findUploadId(qa,rd,(hd,md)=>{if(hd)return fd(hd);pd=md,fd(null,md)})},fd=>{var hd="DELETE",md=`uploadId=${pd}`;this.makeRequest({method:hd,bucketName:qa,objectName:rd,query:md},"",[204],"",!1,gd=>fd(gd))},sd)}fGetObject(qa,rd,sd,pd={},fd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isString(sd))throw new TypeError('filePath should be of type "string"');if(isFunction(pd)&&(fd=pd,pd={}),!isFunction(fd))throw new TypeError('callback should be of type "function"');var hd,md,gd,yd=vd=>{if(vd)return fd(vd);(void 0)(hd,sd,fd)};index.waterfall([vd=>this.statObject(qa,rd,pd,vd),(vd,Nd)=>{gd=vd,(void 0)(pathBrowserify.dirname(sd),{recursive:!0},Md=>Nd(Md))},vd=>{hd=`${sd}.${gd.etag}.part.minio`,(void 0)(hd,(Nd,Md)=>{var Ld=0;if(Nd)md=(void 0)(hd,{flags:"w"});else{if(gd.size===Md.size)return yd();Ld=Md.size,md=(void 0)(hd,{flags:"a"})}this.getPartialObject(qa,rd,Ld,0,pd,vd)})},(vd,Nd)=>{pipesetup(vd,md).on("error",Md=>Nd(Md)).on("finish",Nd)},vd=>(void 0)(hd,vd),(vd,Nd)=>{if(vd.size===gd.size)return Nd();Nd(new Error("Size mismatch between downloaded file and the object"))}],yd)}getObject(qa,rd,sd={},pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(isFunction(sd)&&(pd=sd,sd={}),!isFunction(pd))throw new TypeError('callback should be of type "function"');this.getPartialObject(qa,rd,0,0,sd,pd)}getPartialObject(qa,rd,sd,pd,fd={},hd){if(isFunction(pd)&&(hd=pd,pd=0),!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isNumber(sd))throw new TypeError('offset should be of type "number"');if(!isNumber(pd))throw new TypeError('length should be of type "number"');if(isFunction(fd)&&(hd=fd,fd={}),!isFunction(hd))throw new TypeError('callback should be of type "function"');var md="";(sd||pd)&&(sd?md=`bytes=${+sd}-`:(md="bytes=0-",sd=0),pd&&(md+=`${+pd+sd-1}`));var gd={};md!==""&&(gd.range=md);var yd=[200];md&&yd.push(206);var vd="GET",Nd=queryString.stringify(fd);this.makeRequest({method:vd,bucketName:qa,objectName:rd,headers:gd,query:Nd},"",yd,"",!0,hd)}fPutObject(qa,rd,sd,pd,fd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isString(sd))throw new TypeError('filePath should be of type "string"');if(isFunction(pd)&&(fd=pd,pd={}),!isObject(pd))throw new TypeError('metaData should be of type "object"');pd=insertContentType(pd,sd),(void 0)(sd,(hd,md)=>hd?fd(hd):this.putObject(qa,rd,(void 0)(sd),md.size,pd,fd))}putObject(qa,rd,sd,pd,fd,hd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(isFunction(pd)?(hd=pd,fd={}):isFunction(fd)&&(hd=fd,fd={}),isObject(pd)&&(fd=pd),fd=prependXAMZMeta(fd),typeof sd=="string"||sd instanceof Buffer$4)pd=sd.length,sd=readableStream(sd);else if(!isReadableStream(sd))throw new TypeError('third argument should be of type "stream.Readable" or "Buffer" or "string"');if(!isFunction(hd))throw new TypeError('callback should be of type "function"');if(isNumber(pd)&&pd<0)throw new InvalidArgumentError(`size cannot be negative, given size: ${pd}`);isNumber(pd)||(pd=this.maxObjectSize),pd=this.calculatePartSize(pd);let md=new BlockStream2({size:pd,zeroPadding:!1}),gd=new ObjectUploader(this,qa,rd,pd,fd,hd);pipesetup(sd,md,gd)}copyObjectV1(qa,rd,sd,pd,fd){var hd=qa,md=rd,gd=sd,yd,vd;if(typeof pd=="function"&&fd===void 0?(yd=null,vd=pd):(yd=pd,vd=fd),!isValidBucketName(hd))throw new InvalidBucketNameError("Invalid bucket name: "+hd);if(!isValidObjectName(md))throw new InvalidObjectNameError(`Invalid object name: ${md}`);if(!isString(gd))throw new TypeError('srcObject should be of type "string"');if(gd==="")throw new InvalidPrefixError("Empty source prefix");if(yd!==null&&!(yd instanceof CopyConditions))throw new TypeError('conditions should be of type "CopyConditions"');var Nd={};Nd["x-amz-copy-source"]=uriResourceEscape(gd),yd!==null&&(yd.modified!==""&&(Nd["x-amz-copy-source-if-modified-since"]=yd.modified),yd.unmodified!==""&&(Nd["x-amz-copy-source-if-unmodified-since"]=yd.unmodified),yd.matchETag!==""&&(Nd["x-amz-copy-source-if-match"]=yd.matchETag),yd.matchEtagExcept!==""&&(Nd["x-amz-copy-source-if-none-match"]=yd.matchETagExcept));var Md="PUT";this.makeRequest({method:Md,bucketName:hd,objectName:md,headers:Nd},"",[200],"",!0,(Ld,Fd)=>{if(Ld)return vd(Ld);var Hd=getCopyObjectTransformer();pipesetup(Fd,Hd).on("error",Vd=>vd(Vd)).on("data",Vd=>vd(null,Vd))})}copyObjectV2(qa,rd,sd){if(!(qa instanceof CopySourceOptions))throw new InvalidArgumentError("sourceConfig should of type CopySourceOptions ");if(!(rd instanceof CopyDestinationOptions))throw new InvalidArgumentError("destConfig should of type CopyDestinationOptions ");if(!rd.validate()||!rd.validate())return!1;if(!isFunction(sd))throw new TypeError('callback should be of type "function"');const pd=Object.assign({},qa.getHeaders(),rd.getHeaders()),fd=rd.Bucket,hd=rd.Object;this.makeRequest({method:"PUT",bucketName:fd,objectName:hd,headers:pd},"",[200],"",!0,(gd,yd)=>{if(gd)return sd(gd);const vd=getCopyObjectTransformer();pipesetup(yd,vd).on("error",Nd=>sd(Nd)).on("data",Nd=>{const Md=yd.headers,Ld={Bucket:rd.Bucket,Key:rd.Object,LastModified:Nd.LastModified,MetaData:extractMetadata(Md),VersionId:getVersionId(Md),SourceVersionId:getSourceVersionId(Md),Etag:sanitizeETag(Md.etag),Size:+Md["content-length"]};return sd(null,Ld)})})}copyObject(...qa){return qa[0]instanceof CopySourceOptions&&qa[1]instanceof CopyDestinationOptions?this.copyObjectV2(...arguments):this.copyObjectV1(...arguments)}listObjectsQuery(qa,rd,sd,pd={}){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isString(rd))throw new TypeError('prefix should be of type "string"');if(!isString(sd))throw new TypeError('marker should be of type "string"');let{Delimiter:fd,MaxKeys:hd,IncludeVersion:md}=pd;if(!isObject(pd))throw new TypeError('listQueryOpts should be of type "object"');if(!isString(fd))throw new TypeError('Delimiter should be of type "string"');if(!isNumber(hd))throw new TypeError('MaxKeys should be of type "number"');const gd=[];gd.push(`prefix=${uriEscape(rd)}`),gd.push(`delimiter=${uriEscape(fd)}`),gd.push("encoding-type=url"),md&&gd.push("versions"),sd&&(sd=uriEscape(sd),md?gd.push(`key-marker=${sd}`):gd.push(`marker=${sd}`)),hd&&(hd>=1e3&&(hd=1e3),gd.push(`max-keys=${hd}`)),gd.sort();var yd="";gd.length>0&&(yd=`${gd.join("&")}`);var vd="GET",Nd=getListObjectsTransformer();return this.makeRequest({method:vd,bucketName:qa,query:yd},"",[200],"",!0,(Md,Ld)=>{if(Md)return Nd.emit("error",Md);pipesetup(Ld,Nd)}),Nd}listObjects(qa,rd,sd,pd={}){if(rd===void 0&&(rd=""),sd===void 0&&(sd=!1),!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidPrefix(rd))throw new InvalidPrefixError(`Invalid prefix : ${rd}`);if(!isString(rd))throw new TypeError('prefix should be of type "string"');if(!isBoolean(sd))throw new TypeError('recursive should be of type "boolean"');if(!isObject(pd))throw new TypeError('listOpts should be of type "object"');var fd="";const hd={Delimiter:sd?"":"/",MaxKeys:1e3,IncludeVersion:pd.IncludeVersion};var md=[],gd=!1,yd=streamBrowserify.Readable({objectMode:!0});return yd._read=()=>{if(md.length){yd.push(md.shift());return}if(gd)return yd.push(null);this.listObjectsQuery(qa,rd,fd,hd).on("error",vd=>yd.emit("error",vd)).on("data",vd=>{vd.isTruncated?fd=vd.nextMarker||vd.versionIdMarker:gd=!0,md=vd.objects,yd._read()})},yd}listObjectsV2Query(qa,rd,sd,pd,fd,hd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isString(rd))throw new TypeError('prefix should be of type "string"');if(!isString(sd))throw new TypeError('continuationToken should be of type "string"');if(!isString(pd))throw new TypeError('delimiter should be of type "string"');if(!isNumber(fd))throw new TypeError('maxKeys should be of type "number"');if(!isString(hd))throw new TypeError('startAfter should be of type "string"');var md=[];md.push("list-type=2"),md.push("encoding-type=url"),md.push(`prefix=${uriEscape(rd)}`),md.push(`delimiter=${uriEscape(pd)}`),sd&&(sd=uriEscape(sd),md.push(`continuation-token=${sd}`)),hd&&(hd=uriEscape(hd),md.push(`start-after=${hd}`)),fd&&(fd>=1e3&&(fd=1e3),md.push(`max-keys=${fd}`)),md.sort();var gd="";md.length>0&&(gd=`${md.join("&")}`);var yd="GET",vd=getListObjectsV2Transformer();return this.makeRequest({method:yd,bucketName:qa,query:gd},"",[200],"",!0,(Nd,Md)=>{if(Nd)return vd.emit("error",Nd);pipesetup(Md,vd)}),vd}listObjectsV2(qa,rd,sd,pd){if(rd===void 0&&(rd=""),sd===void 0&&(sd=!1),pd===void 0&&(pd=""),!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidPrefix(rd))throw new InvalidPrefixError(`Invalid prefix : ${rd}`);if(!isString(rd))throw new TypeError('prefix should be of type "string"');if(!isBoolean(sd))throw new TypeError('recursive should be of type "boolean"');if(!isString(pd))throw new TypeError('startAfter should be of type "string"');var fd=sd?"":"/",hd="",md=[],gd=!1,yd=streamBrowserify.Readable({objectMode:!0});return yd._read=()=>{if(md.length){yd.push(md.shift());return}if(gd)return yd.push(null);this.listObjectsV2Query(qa,rd,hd,fd,1e3,pd).on("error",vd=>yd.emit("error",vd)).on("data",vd=>{vd.isTruncated?hd=vd.nextContinuationToken:gd=!0,md=vd.objects,yd._read()})},yd}removeObjects(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!Array.isArray(rd))throw new InvalidArgumentError("objectsList should be a list");if(!isFunction(sd))throw new TypeError('callback should be of type "function"');const pd=1e3,fd="delete",hd="POST";let md=rd.reduce((vd,Nd)=>(vd.list.push(Nd),vd.list.length===pd&&(vd.listOfList.push(vd.list),vd.list=[]),vd),{listOfList:[],list:[]});md.list.length>0&&md.listOfList.push(md.list);const gd=new Encoder,yd=[];index.eachSeries(md.listOfList,(vd,Nd)=>{var Md=[];vd.forEach(function(Ud){isObject(Ud)?Md.push({Key:Ud.name,VersionId:Ud.versionId}):Md.push({Key:Ud})});let Ld={Delete:{Quiet:!0,Object:Md}},Hd=new xml2js.Builder({headless:!0}).buildObject(Ld);Hd=Buffer$4.from(gd.encode(Hd));const Vd={};Vd["Content-MD5"]=toMd5(Hd);let Gd;this.makeRequest({method:hd,bucketName:qa,query:fd,headers:Vd},Hd,[200],"",!0,(Ud,qd)=>{if(Ud)return Nd(Ud);pipesetup(qd,removeObjectsTransformer()).on("data",Wd=>{Gd=Wd}).on("error",Wd=>Nd(Wd,null)).on("end",()=>(yd.push(Gd),Nd(null,Gd)))})},()=>{sd(null,_.flatten(yd))})}getBucketPolicy(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);if(!isFunction(rd))throw new TypeError('callback should be of type "function"');this.makeRequest({method:"GET",bucketName:qa,query:"policy"},"",[200],"",!0,(fd,hd)=>{if(fd)return rd(fd);let md=Buffer$4.from("");pipesetup(hd,getConcater()).on("data",gd=>md=gd).on("error",rd).on("end",()=>{rd(null,md.toString())})})}setBucketPolicy(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);if(!isString(rd))throw new InvalidBucketPolicyError(`Invalid bucket policy: ${rd} - must be "string"`);if(!isFunction(sd))throw new TypeError('callback should be of type "function"');let pd="DELETE",fd="policy";rd&&(pd="PUT"),this.makeRequest({method:pd,bucketName:qa,query:fd},rd,[204],"",!1,sd)}presignedUrl(qa,rd,sd,pd,fd,hd,md){if(this.anonymous)throw new AnonymousRequestError("Presigned "+qa+" url cannot be generated for anonymous requests");if(isFunction(hd)&&(md=hd,hd=new Date),isFunction(fd)&&(md=fd,fd={},hd=new Date),isFunction(pd)&&(md=pd,fd={},pd=24*60*60*7,hd=new Date),!isNumber(pd))throw new TypeError('expires should be of type "number"');if(!isObject(fd))throw new TypeError('reqParams should be of type "object"');if(!isValidDate(hd))throw new TypeError('requestDate should be of type "Date" and valid');if(!isFunction(md))throw new TypeError('callback should be of type "function"');var gd=queryString.stringify(fd);this.getBucketRegion(rd,(yd,vd)=>{if(yd)return md(yd);var Nd,Md=this.getRequestOptions({method:qa,region:vd,bucketName:rd,objectName:sd,query:gd});this.checkAndRefreshCreds();try{Nd=presignSignatureV4(Md,this.accessKey,this.secretKey,this.sessionToken,vd,hd,pd)}catch(Ld){return md(Ld)}md(null,Nd)})}presignedGetObject(qa,rd,sd,pd,fd,hd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);isFunction(pd)&&(hd=pd,pd={},fd=new Date);var md=["response-content-type","response-content-language","response-expires","response-cache-control","response-content-disposition","response-content-encoding"];return md.forEach(gd=>{if(pd!==void 0&&pd[gd]!==void 0&&!isString(pd[gd]))throw new TypeError(`response header ${gd} should be of type "string"`)}),this.presignedUrl("GET",qa,rd,sd,pd,fd,hd)}presignedPutObject(qa,rd,sd,pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);return this.presignedUrl("PUT",qa,rd,sd,pd)}newPostPolicy(){return new PostPolicy}presignedPostPolicy(qa,rd){if(this.anonymous)throw new AnonymousRequestError("Presigned POST policy cannot be generated for anonymous requests");if(!isObject(qa))throw new TypeError('postPolicy should be of type "object"');if(!isFunction(rd))throw new TypeError('cb should be of type "function"');this.getBucketRegion(qa.formData.bucket,(sd,pd)=>{if(sd)return rd(sd);var fd=new Date,hd=makeDateLong(fd);if(this.checkAndRefreshCreds(),!qa.policy.expiration){var md=new Date;md.setSeconds(24*60*60*7),qa.setExpires(md)}qa.policy.conditions.push(["eq","$x-amz-date",hd]),qa.formData["x-amz-date"]=hd,qa.policy.conditions.push(["eq","$x-amz-algorithm","AWS4-HMAC-SHA256"]),qa.formData["x-amz-algorithm"]="AWS4-HMAC-SHA256",qa.policy.conditions.push(["eq","$x-amz-credential",this.accessKey+"/"+getScope(pd,fd)]),qa.formData["x-amz-credential"]=this.accessKey+"/"+getScope(pd,fd),this.sessionToken&&(qa.policy.conditions.push(["eq","$x-amz-security-token",this.sessionToken]),qa.formData["x-amz-security-token"]=this.sessionToken);var gd=Buffer$4.from(JSON.stringify(qa.policy)).toString("base64");qa.formData.policy=gd;var yd=postPresignSignatureV4(pd,fd,this.secretKey,gd);qa.formData["x-amz-signature"]=yd;var vd={};vd.region=pd,vd.bucketName=qa.formData.bucket;var Nd=this.getRequestOptions(vd),Md=this.port==80||this.port===443?"":`:${this.port.toString()}`,Ld=`${Nd.protocol}//${Nd.host}${Md}${Nd.path}`;rd(null,{postURL:Ld,formData:qa.formData})})}completeMultipartUpload(qa,rd,sd,pd,fd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isString(sd))throw new TypeError('uploadId should be of type "string"');if(!isObject(pd))throw new TypeError('etags should be of type "Array"');if(!isFunction(fd))throw new TypeError('cb should be of type "function"');if(!sd)throw new InvalidArgumentError("uploadId cannot be empty");var hd="POST",md=`uploadId=${uriEscape(sd)}`,gd=[];pd.forEach(Nd=>{gd.push({Part:[{PartNumber:Nd.part},{ETag:Nd.etag}]})});var yd={CompleteMultipartUpload:gd},vd=Xml(yd);this.makeRequest({method:hd,bucketName:qa,objectName:rd,query:md},vd,[200],"",!0,(Nd,Md)=>{if(Nd)return fd(Nd);var Ld=getCompleteMultipartTransformer();pipesetup(Md,Ld).on("error",Fd=>fd(Fd)).on("data",Fd=>{if(Fd.errCode)fd(new S3Error(Fd.errMessage));else{const Hd={etag:Fd.etag,versionId:getVersionId(Md.headers)};fd(null,Hd)}})})}listIncompleteUploadsQuery(qa,rd,sd,pd,fd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isString(rd))throw new TypeError('prefix should be of type "string"');if(!isString(sd))throw new TypeError('keyMarker should be of type "string"');if(!isString(pd))throw new TypeError('uploadIdMarker should be of type "string"');if(!isString(fd))throw new TypeError('delimiter should be of type "string"');var hd=[];hd.push(`prefix=${uriEscape(rd)}`),hd.push(`delimiter=${uriEscape(fd)}`),sd&&(sd=uriEscape(sd),hd.push(`key-marker=${sd}`)),pd&&hd.push(`upload-id-marker=${pd}`);var md=1e3;hd.push(`max-uploads=${md}`),hd.sort(),hd.unshift("uploads");var gd="";hd.length>0&&(gd=`${hd.join("&")}`);var yd="GET",vd=getListMultipartTransformer();return this.makeRequest({method:yd,bucketName:qa,query:gd},"",[200],"",!0,(Nd,Md)=>{if(Nd)return vd.emit("error",Nd);pipesetup(Md,vd)}),vd}findUploadId(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(!isFunction(sd))throw new TypeError('cb should be of type "function"');var pd,fd=(hd,md)=>{this.listIncompleteUploadsQuery(qa,rd,hd,md,"").on("error",gd=>sd(gd)).on("data",gd=>{if(gd.uploads.forEach(yd=>{if(yd.key===rd&&(!pd||yd.initiated.getTime()>pd.initiated.getTime())){pd=yd;return}}),gd.isTruncated){fd(gd.nextKeyMarker,gd.nextUploadIdMarker);return}if(pd)return sd(null,pd.uploadId);sd(null,void 0)})};fd("","")}setBucketNotification(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isObject(rd))throw new TypeError('notification config should be of type "Object"');if(!isFunction(sd))throw new TypeError('callback should be of type "function"');var pd="PUT",fd="notification",hd=new xml2js.Builder({rootName:"NotificationConfiguration",renderOpts:{pretty:!1},headless:!0}),md=hd.buildObject(rd);this.makeRequest({method:pd,bucketName:qa,query:fd},md,[200],"",!1,sd)}removeAllBucketNotification(qa,rd){this.setBucketNotification(qa,new NotificationConfig,rd)}getBucketNotification(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new TypeError('callback should be of type "function"');var sd="GET",pd="notification";this.makeRequest({method:sd,bucketName:qa,query:pd},"",[200],"",!0,(fd,hd)=>{if(fd)return rd(fd);var md=getBucketNotificationTransformer(),gd;pipesetup(hd,md).on("data",yd=>gd=yd).on("error",yd=>rd(yd)).on("end",()=>rd(null,gd))})}listenBucketNotification(qa,rd,sd,pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);if(!isString(rd))throw new TypeError("prefix must be of type string");if(!isString(sd))throw new TypeError("suffix must be of type string");if(!Array.isArray(pd))throw new TypeError("events must be of type Array");let fd=new NotificationPoller(this,qa,rd,sd,pd);return fd.start(),fd}getBucketVersioning(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new InvalidArgumentError('callback should be of type "function"');var sd="GET",pd="versioning";this.makeRequest({method:sd,bucketName:qa,query:pd},"",[200],"",!0,(fd,hd)=>{if(fd)return rd(fd);let md=Buffer$4.from("");pipesetup(hd,bucketVersioningTransformer()).on("data",gd=>{md=gd}).on("error",rd).on("end",()=>{rd(null,md)})})}setBucketVersioning(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!Object.keys(rd).length)throw new InvalidArgumentError('versionConfig should be of type "object"');if(!isFunction(sd))throw new TypeError('callback should be of type "function"');var pd="PUT",fd="versioning",hd=new xml2js.Builder({rootName:"VersioningConfiguration",renderOpts:{pretty:!1},headless:!0}),md=hd.buildObject(rd);this.makeRequest({method:pd,bucketName:qa,query:fd},md,[200],"",!1,sd)}setTagging(qa){const{bucketName:rd,objectName:sd,tags:pd,putOpts:fd={},cb:hd}=qa,md="PUT";let gd="tagging";fd&&fd.versionId&&(gd=`${gd}&versionId=${fd.versionId}`);const yd=[];for(const[Vd,Gd]of Object.entries(pd))yd.push({Key:Vd,Value:Gd});const vd={Tagging:{TagSet:{Tag:yd}}},Nd=new Encoder,Md={};let Fd=new xml2js.Builder({headless:!0,renderOpts:{pretty:!1}}).buildObject(vd);Fd=Buffer$4.from(Nd.encode(Fd)),Md["Content-MD5"]=toMd5(Fd);const Hd={method:md,bucketName:rd,query:gd,headers:Md};sd&&(Hd.objectName=sd),Md["Content-MD5"]=toMd5(Fd),this.makeRequest(Hd,Fd,[200],"",!1,hd)}setBucketTagging(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isObject(rd))throw new InvalidArgumentError('tags should be of type "object"');if(Object.keys(rd).length>10)throw new InvalidArgumentError('maximum tags allowed is 10"');if(!isFunction(sd))throw new InvalidArgumentError('callback should be of type "function"');return this.setTagging({bucketName:qa,tags:rd,cb:sd})}setObjectTagging(qa,rd,sd,pd={},fd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidBucketNameError("Invalid object name: "+rd);if(isFunction(pd)&&(fd=pd,pd={}),!isObject(sd))throw new InvalidArgumentError('tags should be of type "object"');if(Object.keys(sd).length>10)throw new InvalidArgumentError('Maximum tags allowed is 10"');if(!isFunction(fd))throw new TypeError('callback should be of type "function"');return this.setTagging({bucketName:qa,objectName:rd,tags:sd,putOpts:pd,cb:fd})}removeTagging({bucketName:qa,objectName:rd,removeOpts:sd,cb:pd}){const fd="DELETE";let hd="tagging";sd&&Object.keys(sd).length&&sd.versionId&&(hd=`${hd}&versionId=${sd.versionId}`);const md={method:fd,bucketName:qa,objectName:rd,query:hd};rd&&(md.objectName=rd),this.makeRequest(md,"",[200,204],"",!0,pd)}removeBucketTagging(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new TypeError('callback should be of type "function"');return this.removeTagging({bucketName:qa,cb:rd})}removeObjectTagging(qa,rd,sd,pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidBucketNameError("Invalid object name: "+rd);if(isFunction(sd)&&(pd=sd,sd={}),sd&&Object.keys(sd).length&&!isObject(sd))throw new InvalidArgumentError('removeOpts should be of type "object"');if(!isFunction(pd))throw new TypeError('callback should be of type "function"');return this.removeTagging({bucketName:qa,objectName:rd,removeOpts:sd,cb:pd})}getBucketTagging(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);const fd={method:"GET",bucketName:qa,query:"tagging"};this.makeRequest(fd,"",[200],"",!0,(hd,md)=>{var gd=getTagsTransformer();if(hd)return rd(hd);let yd;pipesetup(md,gd).on("data",vd=>yd=vd).on("error",vd=>rd(vd)).on("end",()=>rd(null,yd))})}getObjectTagging(qa,rd,sd={},pd=()=>!1){const fd="GET";let hd="tagging";if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidBucketNameError("Invalid object name: "+rd);if(isFunction(sd)&&(pd=sd,sd={}),!isObject(sd))throw new InvalidArgumentError('getOpts should be of type "object"');if(!isFunction(pd))throw new TypeError('callback should be of type "function"');sd&&sd.versionId&&(hd=`${hd}&versionId=${sd.versionId}`);const md={method:fd,bucketName:qa,query:hd};rd&&(md.objectName=rd),this.makeRequest(md,"",[200],"",!0,(gd,yd)=>{const vd=getTagsTransformer();if(gd)return pd(gd);let Nd;pipesetup(yd,vd).on("data",Md=>Nd=Md).on("error",Md=>pd(Md)).on("end",()=>pd(null,Nd))})}applyBucketLifecycle(qa,rd,sd){const pd="PUT",fd="lifecycle",hd=new Encoder,md={};let yd=new xml2js.Builder({rootName:"LifecycleConfiguration",headless:!0,renderOpts:{pretty:!1}}).buildObject(rd);yd=Buffer$4.from(hd.encode(yd));const vd={method:pd,bucketName:qa,query:fd,headers:md};md["Content-MD5"]=toMd5(yd),this.makeRequest(vd,yd,[200],"",!1,sd)}removeBucketLifecycle(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);this.makeRequest({method:"DELETE",bucketName:qa,query:"lifecycle"},"",[204],"",!1,rd)}setBucketLifecycle(qa,rd=null,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);_.isEmpty(rd)?this.removeBucketLifecycle(qa,sd):this.applyBucketLifecycle(qa,rd,sd)}getBucketLifecycle(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);const fd={method:"GET",bucketName:qa,query:"lifecycle"};this.makeRequest(fd,"",[200],"",!0,(hd,md)=>{const gd=lifecycleTransformer();if(hd)return rd(hd);let yd;pipesetup(md,gd).on("data",vd=>yd=vd).on("error",vd=>rd(vd)).on("end",()=>rd(null,yd))})}setObjectLockConfig(qa,rd={},sd){const pd=[RETENTION_MODES.COMPLIANCE,RETENTION_MODES.GOVERNANCE],fd=[RETENTION_VALIDITY_UNITS.DAYS,RETENTION_VALIDITY_UNITS.YEARS];if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(rd.mode&&!pd.includes(rd.mode))throw new TypeError(`lockConfigOpts.mode should be one of ${pd}`);if(rd.unit&&!fd.includes(rd.unit))throw new TypeError(`lockConfigOpts.unit should be one of ${fd}`);if(rd.validity&&!isNumber(rd.validity))throw new TypeError("lockConfigOpts.validity should be a number");const hd="PUT",md="object-lock";let gd={ObjectLockEnabled:"Enabled"};const yd=Object.keys(rd);if(yd.length>0){if(_.difference(yd,["unit","mode","validity"]).length!==0)throw new TypeError("lockConfigOpts.mode,lockConfigOpts.unit,lockConfigOpts.validity all the properties should be specified.");gd.Rule={DefaultRetention:{}},rd.mode&&(gd.Rule.DefaultRetention.Mode=rd.mode),rd.unit===RETENTION_VALIDITY_UNITS.DAYS?gd.Rule.DefaultRetention.Days=rd.validity:rd.unit===RETENTION_VALIDITY_UNITS.YEARS&&(gd.Rule.DefaultRetention.Years=rd.validity)}const Nd=new xml2js.Builder({rootName:"ObjectLockConfiguration",renderOpts:{pretty:!1},headless:!0}).buildObject(gd),Md={};Md["Content-MD5"]=toMd5(Nd),this.makeRequest({method:hd,bucketName:qa,query:md,headers:Md},Nd,[200],"",!1,sd)}getObjectLockConfig(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new InvalidArgumentError('callback should be of type "function"');this.makeRequest({method:"GET",bucketName:qa,query:"object-lock"},"",[200],"",!0,(fd,hd)=>{if(fd)return rd(fd);let md=Buffer$4.from("");pipesetup(hd,objectLockTransformer()).on("data",gd=>{md=gd}).on("error",rd).on("end",()=>{rd(null,md)})})}putObjectRetention(qa,rd,sd={},pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(isObject(sd)){if(sd.governanceBypass&&!isBoolean(sd.governanceBypass))throw new InvalidArgumentError("Invalid value for governanceBypass",sd.governanceBypass);if(sd.mode&&![RETENTION_MODES.COMPLIANCE,RETENTION_MODES.GOVERNANCE].includes(sd.mode))throw new InvalidArgumentError("Invalid object retention mode ",sd.mode);if(sd.retainUntilDate&&!isString(sd.retainUntilDate))throw new InvalidArgumentError("Invalid value for retainUntilDate",sd.retainUntilDate);if(sd.versionId&&!isString(sd.versionId))throw new InvalidArgumentError("Invalid value for versionId",sd.versionId)}else throw new InvalidArgumentError('retentionOpts should be of type "object"');if(!isFunction(pd))throw new TypeError('callback should be of type "function"');const fd="PUT";let hd="retention";const md={};sd.governanceBypass&&(md["X-Amz-Bypass-Governance-Retention"]=!0);const gd=new xml2js.Builder({rootName:"Retention",renderOpts:{pretty:!1},headless:!0}),yd={};sd.mode&&(yd.Mode=sd.mode),sd.retainUntilDate&&(yd.RetainUntilDate=sd.retainUntilDate),sd.versionId&&(hd+=`&versionId=${sd.versionId}`);let vd=gd.buildObject(yd);md["Content-MD5"]=toMd5(vd),this.makeRequest({method:fd,bucketName:qa,objectName:rd,query:hd,headers:md},vd,[200,204],"",!1,pd)}getObjectRetention(qa,rd,sd,pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(isObject(sd)){if(sd.versionId&&!isString(sd.versionId))throw new InvalidArgumentError('VersionID should be of type "string"')}else throw new InvalidArgumentError('callback should be of type "object"');if(pd&&!isFunction(pd))throw new InvalidArgumentError('callback should be of type "function"');const fd="GET";let hd="retention";sd.versionId&&(hd+=`&versionId=${sd.versionId}`),this.makeRequest({method:fd,bucketName:qa,objectName:rd,query:hd},"",[200],"",!0,(md,gd)=>{if(md)return pd(md);let yd=Buffer$4.from("");pipesetup(gd,objectRetentionTransformer()).on("data",vd=>{yd=vd}).on("error",pd).on("end",()=>{pd(null,yd)})})}setBucketEncryption(qa,rd,sd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(isFunction(rd)&&(sd=rd,rd=null),!_.isEmpty(rd)&&rd.Rule.length>1)throw new InvalidArgumentError("Invalid Rule length. Only one rule is allowed.: "+rd.Rule);if(sd&&!isFunction(sd))throw new TypeError('callback should be of type "function"');let pd=rd;_.isEmpty(rd)&&(pd={Rule:[{ApplyServerSideEncryptionByDefault:{SSEAlgorithm:"AES256"}}]});let fd="PUT",hd="encryption",gd=new xml2js.Builder({rootName:"ServerSideEncryptionConfiguration",renderOpts:{pretty:!1},headless:!0}).buildObject(pd);const yd={};yd["Content-MD5"]=toMd5(gd),this.makeRequest({method:fd,bucketName:qa,query:hd,headers:yd},gd,[200],"",!1,sd)}getBucketEncryption(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new InvalidArgumentError('callback should be of type "function"');this.makeRequest({method:"GET",bucketName:qa,query:"encryption"},"",[200],"",!0,(fd,hd)=>{if(fd)return rd(fd);let md=Buffer$4.from("");pipesetup(hd,bucketEncryptionTransformer()).on("data",gd=>{md=gd}).on("error",rd).on("end",()=>{rd(null,md)})})}removeBucketEncryption(qa,rd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isFunction(rd))throw new InvalidArgumentError('callback should be of type "function"');this.makeRequest({method:"DELETE",bucketName:qa,query:"encryption"},"",[204],"",!1,rd)}getObjectLegalHold(qa,rd,sd={},pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(isFunction(sd)&&(pd=sd,sd={}),isObject(sd)){if(Object.keys(sd).length>0&&sd.versionId&&!isString(sd.versionId))throw new TypeError("versionId should be of type string.:",sd.versionId)}else throw new TypeError('getOpts should be of type "Object"');if(!isFunction(pd))throw new InvalidArgumentError('callback should be of type "function"');const fd="GET";let hd="legal-hold";sd.versionId&&(hd+=`&versionId=${sd.versionId}`),this.makeRequest({method:fd,bucketName:qa,objectName:rd,query:hd},"",[200],"",!0,(md,gd)=>{if(md)return pd(md);let yd=Buffer$4.from("");pipesetup(gd,objectLegalHoldTransformer()).on("data",vd=>{yd=vd}).on("error",pd).on("end",()=>{pd(null,yd)})})}setObjectLegalHold(qa,rd,sd={},pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError("Invalid bucket name: "+qa);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);const fd={status:LEGAL_HOLD_STATUS.ENABLED};if(isFunction(sd)&&(pd=sd,sd=fd),isObject(sd)){if(![LEGAL_HOLD_STATUS.ENABLED,LEGAL_HOLD_STATUS.DISABLED].includes(sd.status))throw new TypeError("Invalid status: "+sd.status);if(sd.versionId&&!sd.versionId.length)throw new TypeError("versionId should be of type string.:"+sd.versionId)}else throw new TypeError('setOpts should be of type "Object"');if(!isFunction(pd))throw new InvalidArgumentError('callback should be of type "function"');_.isEmpty(sd)&&(sd={defaultOpts:fd});const hd="PUT";let md="legal-hold";sd.versionId&&(md+=`&versionId=${sd.versionId}`);let gd={Status:sd.status};const vd=new xml2js.Builder({rootName:"LegalHold",renderOpts:{pretty:!1},headless:!0}).buildObject(gd),Nd={};Nd["Content-MD5"]=toMd5(vd),this.makeRequest({method:hd,bucketName:qa,objectName:rd,query:md,headers:Nd},vd,[200],"",!1,pd)}uploadPartCopy(qa,rd){const{bucketName:sd,objectName:pd,uploadID:fd,partNumber:hd,headers:md}=qa,gd="PUT";let yd=`uploadId=${fd}&partNumber=${hd}`;const vd={method:gd,bucketName:sd,objectName:pd,query:yd,headers:md};return this.makeRequest(vd,"",[200],"",!0,(Nd,Md)=>{let Ld=Buffer$4.from("");if(Nd)return rd(Nd);pipesetup(Md,uploadPartTransformer()).on("data",Fd=>{Ld=Fd}).on("error",rd).on("end",()=>{let Fd={etag:sanitizeETag(Ld.ETag),key:pd,part:hd};rd(null,Fd)})})}composeObject(qa={},rd=[],sd){const pd=this,fd=rd.length;if(!Array.isArray(rd))throw new InvalidArgumentError("sourceConfig should an array of CopySourceOptions ");if(!(qa instanceof CopyDestinationOptions))throw new InvalidArgumentError("destConfig should of type CopyDestinationOptions ");if(fd<1||fd>PART_CONSTRAINTS.MAX_PARTS_COUNT)throw new InvalidArgumentError(`"There must be as least one and up to ${PART_CONSTRAINTS.MAX_PARTS_COUNT} source objects.`);if(!isFunction(sd))throw new TypeError('callback should be of type "function"');for(let Nd=0;Nd{let Md={};return _.isEmpty(Nd.VersionID)||(Md={versionId:Nd.VersionID}),Md},md=[];let gd=0,yd=0;const vd=rd.map(Nd=>pd.statObject(Nd.Bucket,Nd.Object,hd(Nd)));return Promise.all(vd).then(Nd=>{const Md=Nd.map((Gd,Ud)=>{const qd=rd[Ud];let Wd=Gd.size;if(qd.MatchRange){const Kd=qd.Start,Xd=qd.End;if(Xd>=Wd||Kd<0)throw new InvalidArgumentError(`CopySrcOptions ${Ud} has invalid segment-to-copy [${Kd}, ${Xd}] (size is ${Wd})`);Wd=Xd-Kd+1}if(WdPART_CONSTRAINTS.MAX_MULTIPART_PUT_OBJECT_SIZE)throw new InvalidArgumentError(`Cannot compose an object of size ${gd} (> 5TiB)`);if(md[Ud]=Wd,yd+=partsRequired(Wd),yd>PART_CONSTRAINTS.MAX_PARTS_COUNT)throw new InvalidArgumentError(`Your proposed compose object requires more than ${PART_CONSTRAINTS.MAX_PARTS_COUNT} parts`);return Gd});if(yd===1&&gd<=PART_CONSTRAINTS.MAX_PART_SIZE||gd===0)return this.copyObject(rd[0],qa,sd);for(let Gd=0;GdcalculateEvenSplits(md[Ud],rd[Ud]));function Fd(Gd){const Ud=[];return Ld.forEach((qd,Wd)=>{const{startIndex:Kd,endIndex:Xd,objInfo:df}=qd;let Ef=Wd+1;const pf=Array.from(Kd),mf=rd[Wd].getHeaders();pf.forEach((_f,xf)=>{let Cf=Xd[xf];const If=`${df.Bucket}/${df.Object}`;mf["x-amz-copy-source"]=`${If}`,mf["x-amz-copy-source-range"]=`bytes=${_f}-${Cf}`;const Sf={bucketName:qa.Bucket,objectName:qa.Object,uploadID:Gd,partNumber:Ef,headers:mf,sourceObj:If};Ud.push(Sf)})}),Ud}const Hd=Gd=>{const Ud=Fd(Gd);index.map(Ud,pd.uploadPartCopy.bind(pd),(qd,Wd)=>{if(qd){this.abortMultipartUpload(qa.Bucket,qa.Object,Gd).then(()=>sd(),Xd=>sd(Xd));return}const Kd=Wd.map(Xd=>({etag:Xd.etag,part:Xd.part}));return pd.completeMultipartUpload(qa.Bucket,qa.Object,Gd,Kd,sd)})},Vd=qa.getHeaders();pd.initiateNewMultipartUpload(qa.Bucket,qa.Object,Vd).then(Gd=>{Hd(Gd)},Gd=>{sd(Gd,null)})}).catch(Nd=>{sd(Nd,null)})}selectObjectContent(qa,rd,sd={},pd){if(!isValidBucketName(qa))throw new InvalidBucketNameError(`Invalid bucket name: ${qa}`);if(!isValidObjectName(rd))throw new InvalidObjectNameError(`Invalid object name: ${rd}`);if(_.isEmpty(sd))throw new TypeError("valid select configuration is required");if(!isString(sd.expression))throw new TypeError('sqlExpression should be of type "string"');if(_.isEmpty(sd.inputSerialization))throw new TypeError("inputSerialization is required");if(!isObject(sd.inputSerialization))throw new TypeError('inputSerialization should be of type "object"');if(_.isEmpty(sd.outputSerialization))throw new TypeError("outputSerialization is required");if(!isObject(sd.outputSerialization))throw new TypeError('outputSerialization should be of type "object"');if(!isFunction(pd))throw new TypeError('callback should be of type "function"');const fd="POST";let hd="select";hd+="&select-type=2";const md=[{Expression:sd.expression},{ExpressionType:sd.expressionType||"SQL"},{InputSerialization:[sd.inputSerialization]},{OutputSerialization:[sd.outputSerialization]}];sd.requestProgress&&md.push({RequestProgress:sd.requestProgress}),sd.scanRange&&md.push({ScanRange:sd.scanRange});const yd=new xml2js.Builder({rootName:"SelectObjectContentRequest",renderOpts:{pretty:!1},headless:!0}).buildObject(md);this.makeRequest({method:fd,bucketName:qa,objectName:rd,query:hd},yd,[200],"",!0,(vd,Nd)=>{if(vd)return pd(vd);let Md;pipesetup(Nd,selectObjectContentTransformer()).on("data",Ld=>{Md=parseSelectObjectContentResponse(Ld)}).on("error",pd).on("end",()=>{pd(null,Md)})})}}Client.prototype.makeBucket=promisify(Client.prototype.makeBucket);Client.prototype.bucketExists=promisify(Client.prototype.bucketExists);Client.prototype.getObject=promisify(Client.prototype.getObject);Client.prototype.getPartialObject=promisify(Client.prototype.getPartialObject);Client.prototype.fGetObject=promisify(Client.prototype.fGetObject);Client.prototype.putObject=promisify(Client.prototype.putObject);Client.prototype.fPutObject=promisify(Client.prototype.fPutObject);Client.prototype.copyObject=promisify(Client.prototype.copyObject);Client.prototype.removeObjects=promisify(Client.prototype.removeObjects);Client.prototype.presignedUrl=promisify(Client.prototype.presignedUrl);Client.prototype.presignedGetObject=promisify(Client.prototype.presignedGetObject);Client.prototype.presignedPutObject=promisify(Client.prototype.presignedPutObject);Client.prototype.presignedPostPolicy=promisify(Client.prototype.presignedPostPolicy);Client.prototype.getBucketNotification=promisify(Client.prototype.getBucketNotification);Client.prototype.setBucketNotification=promisify(Client.prototype.setBucketNotification);Client.prototype.removeAllBucketNotification=promisify(Client.prototype.removeAllBucketNotification);Client.prototype.getBucketPolicy=promisify(Client.prototype.getBucketPolicy);Client.prototype.setBucketPolicy=promisify(Client.prototype.setBucketPolicy);Client.prototype.removeIncompleteUpload=promisify(Client.prototype.removeIncompleteUpload);Client.prototype.getBucketVersioning=promisify(Client.prototype.getBucketVersioning);Client.prototype.setBucketVersioning=promisify(Client.prototype.setBucketVersioning);Client.prototype.setBucketTagging=promisify(Client.prototype.setBucketTagging);Client.prototype.removeBucketTagging=promisify(Client.prototype.removeBucketTagging);Client.prototype.getBucketTagging=promisify(Client.prototype.getBucketTagging);Client.prototype.setObjectTagging=promisify(Client.prototype.setObjectTagging);Client.prototype.removeObjectTagging=promisify(Client.prototype.removeObjectTagging);Client.prototype.getObjectTagging=promisify(Client.prototype.getObjectTagging);Client.prototype.setBucketLifecycle=promisify(Client.prototype.setBucketLifecycle);Client.prototype.getBucketLifecycle=promisify(Client.prototype.getBucketLifecycle);Client.prototype.removeBucketLifecycle=promisify(Client.prototype.removeBucketLifecycle);Client.prototype.setObjectLockConfig=promisify(Client.prototype.setObjectLockConfig);Client.prototype.getObjectLockConfig=promisify(Client.prototype.getObjectLockConfig);Client.prototype.putObjectRetention=promisify(Client.prototype.putObjectRetention);Client.prototype.getObjectRetention=promisify(Client.prototype.getObjectRetention);Client.prototype.setBucketEncryption=promisify(Client.prototype.setBucketEncryption);Client.prototype.getBucketEncryption=promisify(Client.prototype.getBucketEncryption);Client.prototype.removeBucketEncryption=promisify(Client.prototype.removeBucketEncryption);Client.prototype.setObjectLegalHold=promisify(Client.prototype.setObjectLegalHold);Client.prototype.getObjectLegalHold=promisify(Client.prototype.getObjectLegalHold);Client.prototype.composeObject=promisify(Client.prototype.composeObject);Client.prototype.selectObjectContent=promisify(Client.prototype.selectObjectContent);Client.prototype.removeObject=callbackify(Client.prototype.removeObject);Client.prototype.statObject=callbackify(Client.prototype.statObject);Client.prototype.removeBucket=callbackify(Client.prototype.removeBucket);Client.prototype.listBuckets=callbackify(Client.prototype.listBuckets);Client.prototype.removeBucketReplication=callbackify(Client.prototype.removeBucketReplication);Client.prototype.setBucketReplication=callbackify(Client.prototype.setBucketReplication);Client.prototype.getBucketReplication=callbackify(Client.prototype.getBucketReplication);var __extends$3=function(){var Ra=function(qa,rd){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(sd,pd){sd.__proto__=pd}||function(sd,pd){for(var fd in pd)pd.hasOwnProperty(fd)&&(sd[fd]=pd[fd])},Ra(qa,rd)};return function(qa,rd){Ra(qa,rd);function sd(){this.constructor=qa}qa.prototype=rd===null?Object.create(rd):(sd.prototype=rd.prototype,new sd)}}(),QiniuErrorName;(function(Ra){Ra.InvalidFile="InvalidFile",Ra.InvalidToken="InvalidToken",Ra.InvalidMetadata="InvalidMetadata",Ra.InvalidChunkSize="InvalidChunkSize",Ra.InvalidCustomVars="InvalidCustomVars",Ra.NotAvailableUploadHost="NotAvailableUploadHost",Ra.ReadCacheFailed="ReadCacheFailed",Ra.InvalidCacheData="InvalidCacheData",Ra.WriteCacheFailed="WriteCacheFailed",Ra.RemoveCacheFailed="RemoveCacheFailed",Ra.GetCanvasContextFailed="GetCanvasContextFailed",Ra.UnsupportedFileType="UnsupportedFileType",Ra.FileReaderReadFailed="FileReaderReadFailed",Ra.NotAvailableXMLHttpRequest="NotAvailableXMLHttpRequest",Ra.InvalidProgressEventTarget="InvalidProgressEventTarget",Ra.RequestError="RequestError"})(QiniuErrorName||(QiniuErrorName={}));var QiniuError=function(){function Ra(qa,rd){this.name=qa,this.message=rd,this.stack=new Error().stack}return Ra}(),QiniuRequestError=function(Ra){__extends$3(qa,Ra);function qa(rd,sd,pd,fd){var hd=Ra.call(this,QiniuErrorName.RequestError,pd)||this;return hd.code=rd,hd.reqId=sd,hd.isRequestError=!0,hd.data=fd,hd}return qa}(QiniuError),QiniuNetworkError=function(Ra){__extends$3(qa,Ra);function qa(rd,sd){return sd===void 0&&(sd=""),Ra.call(this,0,sd,rd)||this}return qa}(QiniuRequestError),Pool=function(){function Ra(qa,rd){this.runTask=qa,this.limit=rd,this.aborted=!1,this.queue=[],this.processing=[]}return Ra.prototype.enqueue=function(qa){var rd=this;return new Promise(function(sd,pd){rd.queue.push({task:qa,resolve:sd,reject:pd}),rd.check()})},Ra.prototype.run=function(qa){var rd=this;this.queue=this.queue.filter(function(sd){return sd!==qa}),this.processing.push(qa),this.runTask(qa.task).then(function(){rd.processing=rd.processing.filter(function(sd){return sd!==qa}),qa.resolve(),rd.check()},function(sd){return qa.reject(sd)})},Ra.prototype.check=function(){var qa=this;if(!this.aborted){var rd=this.processing.length,sd=this.limit-rd;this.queue.slice(0,sd).forEach(function(pd){qa.run(pd)})}},Ra.prototype.abort=function(){this.queue=[],this.aborted=!0},Ra}(),__extends$2=function(){var Ra=function(qa,rd){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(sd,pd){sd.__proto__=pd}||function(sd,pd){for(var fd in pd)pd.hasOwnProperty(fd)&&(sd[fd]=pd[fd])},Ra(qa,rd)};return function(qa,rd){Ra(qa,rd);function sd(){this.constructor=qa}qa.prototype=rd===null?Object.create(rd):(sd.prototype=rd.prototype,new sd)}}(),__assign$6=function(){return __assign$6=Object.assign||function(Ra){for(var qa,rd=1,sd=arguments.length;rd"u")return"";var qa=Ra+"",rd="",sd,pd,fd=0;sd=pd=0,fd=qa.length;for(var hd=0;hd127&&md<2048)gd=String.fromCharCode(md>>6|192,md&63|128);else if((md&63488^55296)>0)gd=String.fromCharCode(md>>12|224,md>>6&63|128,md&63|128);else{if((md&64512^55296)>0)throw new RangeError("Unmatched trail surrogate at "+hd);var yd=qa.charCodeAt(++hd);if((yd&64512^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(hd-1));md=((md&1023)<<10)+(yd&1023)+65536,gd=String.fromCharCode(md>>18|240,md>>12&63|128,md>>6&63|128,md&63|128)}gd!==null&&(pd>sd&&(rd+=qa.slice(sd,pd)),rd+=gd,sd=pd=hd+1)}return pd>sd&&(rd+=qa.slice(sd,fd)),rd}function utf8Decode(Ra){var qa=[],rd=0,sd=0,pd=0;for(Ra+="";rd>10&1023)),qa.push(String.fromCharCode(56320|sd&1023))):qa.push(String.fromCharCode(sd)),rd+=pd}return qa.join("")}function base64Encode(Ra){var qa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",rd,sd,pd,fd,hd,md,gd,yd,vd=0,Nd=0,Md="",Ld=[];if(!Ra)return Ra;Ra=utf8Encode(Ra+"");do rd=Ra.charCodeAt(vd++),sd=Ra.charCodeAt(vd++),pd=Ra.charCodeAt(vd++),yd=rd<<16|sd<<8|pd,fd=yd>>18&63,hd=yd>>12&63,md=yd>>6&63,gd=yd&63,Ld[Nd++]=qa.charAt(fd)+qa.charAt(hd)+qa.charAt(md)+qa.charAt(gd);while(vd>16&255,sd=yd>>8&255,pd=yd&255,md===64?Ld[Nd++]=String.fromCharCode(rd):gd===64?Ld[Nd++]=String.fromCharCode(rd,sd):Ld[Nd++]=String.fromCharCode(rd,sd,pd);while(vd>>25)+Wd|0,Xd+=(qd&Wd|~qd&Kd)+Ud[1]-389564586|0,Xd=(Xd<<12|Xd>>>20)+qd|0,Kd+=(Xd&qd|~Xd&Wd)+Ud[2]+606105819|0,Kd=(Kd<<17|Kd>>>15)+Xd|0,Wd+=(Kd&Xd|~Kd&qd)+Ud[3]-1044525330|0,Wd=(Wd<<22|Wd>>>10)+Kd|0,qd+=(Wd&Kd|~Wd&Xd)+Ud[4]-176418897|0,qd=(qd<<7|qd>>>25)+Wd|0,Xd+=(qd&Wd|~qd&Kd)+Ud[5]+1200080426|0,Xd=(Xd<<12|Xd>>>20)+qd|0,Kd+=(Xd&qd|~Xd&Wd)+Ud[6]-1473231341|0,Kd=(Kd<<17|Kd>>>15)+Xd|0,Wd+=(Kd&Xd|~Kd&qd)+Ud[7]-45705983|0,Wd=(Wd<<22|Wd>>>10)+Kd|0,qd+=(Wd&Kd|~Wd&Xd)+Ud[8]+1770035416|0,qd=(qd<<7|qd>>>25)+Wd|0,Xd+=(qd&Wd|~qd&Kd)+Ud[9]-1958414417|0,Xd=(Xd<<12|Xd>>>20)+qd|0,Kd+=(Xd&qd|~Xd&Wd)+Ud[10]-42063|0,Kd=(Kd<<17|Kd>>>15)+Xd|0,Wd+=(Kd&Xd|~Kd&qd)+Ud[11]-1990404162|0,Wd=(Wd<<22|Wd>>>10)+Kd|0,qd+=(Wd&Kd|~Wd&Xd)+Ud[12]+1804603682|0,qd=(qd<<7|qd>>>25)+Wd|0,Xd+=(qd&Wd|~qd&Kd)+Ud[13]-40341101|0,Xd=(Xd<<12|Xd>>>20)+qd|0,Kd+=(Xd&qd|~Xd&Wd)+Ud[14]-1502002290|0,Kd=(Kd<<17|Kd>>>15)+Xd|0,Wd+=(Kd&Xd|~Kd&qd)+Ud[15]+1236535329|0,Wd=(Wd<<22|Wd>>>10)+Kd|0,qd+=(Wd&Xd|Kd&~Xd)+Ud[1]-165796510|0,qd=(qd<<5|qd>>>27)+Wd|0,Xd+=(qd&Kd|Wd&~Kd)+Ud[6]-1069501632|0,Xd=(Xd<<9|Xd>>>23)+qd|0,Kd+=(Xd&Wd|qd&~Wd)+Ud[11]+643717713|0,Kd=(Kd<<14|Kd>>>18)+Xd|0,Wd+=(Kd&qd|Xd&~qd)+Ud[0]-373897302|0,Wd=(Wd<<20|Wd>>>12)+Kd|0,qd+=(Wd&Xd|Kd&~Xd)+Ud[5]-701558691|0,qd=(qd<<5|qd>>>27)+Wd|0,Xd+=(qd&Kd|Wd&~Kd)+Ud[10]+38016083|0,Xd=(Xd<<9|Xd>>>23)+qd|0,Kd+=(Xd&Wd|qd&~Wd)+Ud[15]-660478335|0,Kd=(Kd<<14|Kd>>>18)+Xd|0,Wd+=(Kd&qd|Xd&~qd)+Ud[4]-405537848|0,Wd=(Wd<<20|Wd>>>12)+Kd|0,qd+=(Wd&Xd|Kd&~Xd)+Ud[9]+568446438|0,qd=(qd<<5|qd>>>27)+Wd|0,Xd+=(qd&Kd|Wd&~Kd)+Ud[14]-1019803690|0,Xd=(Xd<<9|Xd>>>23)+qd|0,Kd+=(Xd&Wd|qd&~Wd)+Ud[3]-187363961|0,Kd=(Kd<<14|Kd>>>18)+Xd|0,Wd+=(Kd&qd|Xd&~qd)+Ud[8]+1163531501|0,Wd=(Wd<<20|Wd>>>12)+Kd|0,qd+=(Wd&Xd|Kd&~Xd)+Ud[13]-1444681467|0,qd=(qd<<5|qd>>>27)+Wd|0,Xd+=(qd&Kd|Wd&~Kd)+Ud[2]-51403784|0,Xd=(Xd<<9|Xd>>>23)+qd|0,Kd+=(Xd&Wd|qd&~Wd)+Ud[7]+1735328473|0,Kd=(Kd<<14|Kd>>>18)+Xd|0,Wd+=(Kd&qd|Xd&~qd)+Ud[12]-1926607734|0,Wd=(Wd<<20|Wd>>>12)+Kd|0,qd+=(Wd^Kd^Xd)+Ud[5]-378558|0,qd=(qd<<4|qd>>>28)+Wd|0,Xd+=(qd^Wd^Kd)+Ud[8]-2022574463|0,Xd=(Xd<<11|Xd>>>21)+qd|0,Kd+=(Xd^qd^Wd)+Ud[11]+1839030562|0,Kd=(Kd<<16|Kd>>>16)+Xd|0,Wd+=(Kd^Xd^qd)+Ud[14]-35309556|0,Wd=(Wd<<23|Wd>>>9)+Kd|0,qd+=(Wd^Kd^Xd)+Ud[1]-1530992060|0,qd=(qd<<4|qd>>>28)+Wd|0,Xd+=(qd^Wd^Kd)+Ud[4]+1272893353|0,Xd=(Xd<<11|Xd>>>21)+qd|0,Kd+=(Xd^qd^Wd)+Ud[7]-155497632|0,Kd=(Kd<<16|Kd>>>16)+Xd|0,Wd+=(Kd^Xd^qd)+Ud[10]-1094730640|0,Wd=(Wd<<23|Wd>>>9)+Kd|0,qd+=(Wd^Kd^Xd)+Ud[13]+681279174|0,qd=(qd<<4|qd>>>28)+Wd|0,Xd+=(qd^Wd^Kd)+Ud[0]-358537222|0,Xd=(Xd<<11|Xd>>>21)+qd|0,Kd+=(Xd^qd^Wd)+Ud[3]-722521979|0,Kd=(Kd<<16|Kd>>>16)+Xd|0,Wd+=(Kd^Xd^qd)+Ud[6]+76029189|0,Wd=(Wd<<23|Wd>>>9)+Kd|0,qd+=(Wd^Kd^Xd)+Ud[9]-640364487|0,qd=(qd<<4|qd>>>28)+Wd|0,Xd+=(qd^Wd^Kd)+Ud[12]-421815835|0,Xd=(Xd<<11|Xd>>>21)+qd|0,Kd+=(Xd^qd^Wd)+Ud[15]+530742520|0,Kd=(Kd<<16|Kd>>>16)+Xd|0,Wd+=(Kd^Xd^qd)+Ud[2]-995338651|0,Wd=(Wd<<23|Wd>>>9)+Kd|0,qd+=(Kd^(Wd|~Xd))+Ud[0]-198630844|0,qd=(qd<<6|qd>>>26)+Wd|0,Xd+=(Wd^(qd|~Kd))+Ud[7]+1126891415|0,Xd=(Xd<<10|Xd>>>22)+qd|0,Kd+=(qd^(Xd|~Wd))+Ud[14]-1416354905|0,Kd=(Kd<<15|Kd>>>17)+Xd|0,Wd+=(Xd^(Kd|~qd))+Ud[5]-57434055|0,Wd=(Wd<<21|Wd>>>11)+Kd|0,qd+=(Kd^(Wd|~Xd))+Ud[12]+1700485571|0,qd=(qd<<6|qd>>>26)+Wd|0,Xd+=(Wd^(qd|~Kd))+Ud[3]-1894986606|0,Xd=(Xd<<10|Xd>>>22)+qd|0,Kd+=(qd^(Xd|~Wd))+Ud[10]-1051523|0,Kd=(Kd<<15|Kd>>>17)+Xd|0,Wd+=(Xd^(Kd|~qd))+Ud[1]-2054922799|0,Wd=(Wd<<21|Wd>>>11)+Kd|0,qd+=(Kd^(Wd|~Xd))+Ud[8]+1873313359|0,qd=(qd<<6|qd>>>26)+Wd|0,Xd+=(Wd^(qd|~Kd))+Ud[15]-30611744|0,Xd=(Xd<<10|Xd>>>22)+qd|0,Kd+=(qd^(Xd|~Wd))+Ud[6]-1560198380|0,Kd=(Kd<<15|Kd>>>17)+Xd|0,Wd+=(Xd^(Kd|~qd))+Ud[13]+1309151649|0,Wd=(Wd<<21|Wd>>>11)+Kd|0,qd+=(Kd^(Wd|~Xd))+Ud[4]-145523070|0,qd=(qd<<6|qd>>>26)+Wd|0,Xd+=(Wd^(qd|~Kd))+Ud[11]-1120210379|0,Xd=(Xd<<10|Xd>>>22)+qd|0,Kd+=(qd^(Xd|~Wd))+Ud[2]+718787259|0,Kd=(Kd<<15|Kd>>>17)+Xd|0,Wd+=(Xd^(Kd|~qd))+Ud[9]-343485551|0,Wd=(Wd<<21|Wd>>>11)+Kd|0,Gd[0]=qd+Gd[0]|0,Gd[1]=Wd+Gd[1]|0,Gd[2]=Kd+Gd[2]|0,Gd[3]=Xd+Gd[3]|0}function fd(Gd){var Ud=[],qd;for(qd=0;qd<64;qd+=4)Ud[qd>>2]=Gd.charCodeAt(qd)+(Gd.charCodeAt(qd+1)<<8)+(Gd.charCodeAt(qd+2)<<16)+(Gd.charCodeAt(qd+3)<<24);return Ud}function hd(Gd){var Ud=[],qd;for(qd=0;qd<64;qd+=4)Ud[qd>>2]=Gd[qd]+(Gd[qd+1]<<8)+(Gd[qd+2]<<16)+(Gd[qd+3]<<24);return Ud}function md(Gd){var Ud=Gd.length,qd=[1732584193,-271733879,-1732584194,271733878],Wd,Kd,Xd,df,Ef,pf;for(Wd=64;Wd<=Ud;Wd+=64)pd(qd,fd(Gd.substring(Wd-64,Wd)));for(Gd=Gd.substring(Wd-64),Kd=Gd.length,Xd=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Wd=0;Wd>2]|=Gd.charCodeAt(Wd)<<(Wd%4<<3);if(Xd[Wd>>2]|=128<<(Wd%4<<3),Wd>55)for(pd(qd,Xd),Wd=0;Wd<16;Wd+=1)Xd[Wd]=0;return df=Ud*8,df=df.toString(16).match(/(.*?)(.{0,8})$/),Ef=parseInt(df[2],16),pf=parseInt(df[1],16)||0,Xd[14]=Ef,Xd[15]=pf,pd(qd,Xd),qd}function gd(Gd){var Ud=Gd.length,qd=[1732584193,-271733879,-1732584194,271733878],Wd,Kd,Xd,df,Ef,pf;for(Wd=64;Wd<=Ud;Wd+=64)pd(qd,hd(Gd.subarray(Wd-64,Wd)));for(Gd=Wd-64>2]|=Gd[Wd]<<(Wd%4<<3);if(Xd[Wd>>2]|=128<<(Wd%4<<3),Wd>55)for(pd(qd,Xd),Wd=0;Wd<16;Wd+=1)Xd[Wd]=0;return df=Ud*8,df=df.toString(16).match(/(.*?)(.{0,8})$/),Ef=parseInt(df[2],16),pf=parseInt(df[1],16)||0,Xd[14]=Ef,Xd[15]=pf,pd(qd,Xd),qd}function yd(Gd){var Ud="",qd;for(qd=0;qd<4;qd+=1)Ud+=sd[Gd>>qd*8+4&15]+sd[Gd>>qd*8&15];return Ud}function vd(Gd){var Ud;for(Ud=0;UdXd?new ArrayBuffer(0):(df=Xd-Kd,Ef=new ArrayBuffer(df),pf=new Uint8Array(Ef),mf=new Uint8Array(this,Kd,df),pf.set(mf),Ef)}}();function Nd(Gd){return/[\u0080-\uFFFF]/.test(Gd)&&(Gd=unescape(encodeURIComponent(Gd))),Gd}function Md(Gd,Ud){var qd=Gd.length,Wd=new ArrayBuffer(qd),Kd=new Uint8Array(Wd),Xd;for(Xd=0;Xd>2]|=Ud.charCodeAt(Wd)<<(Wd%4<<3);return this._finish(Kd,qd),Xd=vd(this._hash),Gd&&(Xd=Hd(Xd)),this.reset(),Xd},Vd.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},Vd.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},Vd.prototype.setState=function(Gd){return this._buff=Gd.buff,this._length=Gd.length,this._hash=Gd.hash,this},Vd.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},Vd.prototype._finish=function(Gd,Ud){var qd=Ud,Wd,Kd,Xd;if(Gd[qd>>2]|=128<<(qd%4<<3),qd>55)for(pd(this._hash,Gd),qd=0;qd<16;qd+=1)Gd[qd]=0;Wd=this._length*8,Wd=Wd.toString(16).match(/(.*?)(.{0,8})$/),Kd=parseInt(Wd[2],16),Xd=parseInt(Wd[1],16)||0,Gd[14]=Kd,Gd[15]=Xd,pd(this._hash,Gd)},Vd.hash=function(Gd,Ud){return Vd.hashBinary(Nd(Gd),Ud)},Vd.hashBinary=function(Gd,Ud){var qd=md(Gd),Wd=vd(qd);return Ud?Hd(Wd):Wd},Vd.ArrayBuffer=function(){this.reset()},Vd.ArrayBuffer.prototype.append=function(Gd){var Ud=Fd(this._buff.buffer,Gd),qd=Ud.length,Wd;for(this._length+=Gd.byteLength,Wd=64;Wd<=qd;Wd+=64)pd(this._hash,hd(Ud.subarray(Wd-64,Wd)));return this._buff=Wd-64>2]|=Ud[Kd]<<(Kd%4<<3);return this._finish(Wd,qd),Xd=vd(this._hash),Gd&&(Xd=Hd(Xd)),this.reset(),Xd},Vd.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},Vd.ArrayBuffer.prototype.getState=function(){var Gd=Vd.prototype.getState.call(this);return Gd.buff=Ld(Gd.buff),Gd},Vd.ArrayBuffer.prototype.setState=function(Gd){return Gd.buff=Md(Gd.buff,!0),Vd.prototype.setState.call(this,Gd)},Vd.ArrayBuffer.prototype.destroy=Vd.prototype.destroy,Vd.ArrayBuffer.prototype._finish=Vd.prototype._finish,Vd.ArrayBuffer.hash=function(Gd,Ud){var qd=gd(new Uint8Array(Gd)),Wd=vd(qd);return Ud?Hd(Wd):Wd},Vd})})(sparkMd5);var sparkMd5Exports=sparkMd5.exports;const SparkMD5=getDefaultExportFromCjs(sparkMd5Exports);var __assign$5=function(){return __assign$5=Object.assign||function(Ra){for(var qa,rd=1,sd=arguments.length;rd0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]Ra.size)rd=Ra.size;else for(;Ra.size>rd*1e4;)rd*=2;for(var sd=[],pd=Math.ceil(Ra.size/rd),fd=0;fd3?qa[1]:qa[0];if(!rd)throw new QiniuError(QiniuErrorName.InvalidToken,"missing assess key field.");var sd=null;try{sd=JSON.parse(urlSafeBase64Decode(qa[qa.length-1]))}catch{throw new QiniuError(QiniuErrorName.InvalidToken,"token parse failed.")}if(sd==null)throw new QiniuError(QiniuErrorName.InvalidToken,"putPolicy is null.");if(sd.scope==null)throw new QiniuError(QiniuErrorName.InvalidToken,"scope field is null.");var pd=sd.scope.split(":")[0];if(!pd)throw new QiniuError(QiniuErrorName.InvalidToken,"resolve bucketName failed.");return{assessKey:rd,bucketName:pd,scope:sd.scope}}function createObjectURL(Ra){var qa=window.URL||window.webkitURL||window.mozURL;return qa.createObjectURL(Ra)}var _a,region={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},regionUphostMap=(_a={},_a[region.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},_a[region.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},_a[region.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},_a[region.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},_a[region.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},_a[region.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},_a),stringifyPrimitive=function(Ra){switch(typeof Ra){case"string":return Ra;case"boolean":return Ra?"true":"false";case"number":return isFinite(Ra)?Ra:"";default:return""}},encode=function(Ra,qa,rd,sd){return qa=qa||"&",rd=rd||"=",Ra===null&&(Ra=void 0),typeof Ra=="object"?Object.keys(Ra).map(function(pd){var fd=encodeURIComponent(stringifyPrimitive(pd))+rd;return Array.isArray(Ra[pd])?Ra[pd].map(function(hd){return fd+encodeURIComponent(stringifyPrimitive(hd))}).join(qa):fd+encodeURIComponent(stringifyPrimitive(Ra[pd]))}).filter(Boolean).join(qa):sd?encodeURIComponent(stringifyPrimitive(sd))+rd+encodeURIComponent(stringifyPrimitive(Ra)):""},stringify;stringify=encode;var __assign$4=function(){return __assign$4=Object.assign||function(Ra){for(var qa,rd=1,sd=arguments.length;rd0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]0?[2,sd+"://"+rd.uphost[0]]:(pd=getPutPolicy(qa),[4,getUpHosts(pd.assessKey,pd.bucketName,sd)]);case 1:return fd=md.sent(),hd=fd.data.up.acc.main,[2,sd+"://"+hd[0]]}})})}var __assign$3=function(){return __assign$3=Object.assign||function(Ra){for(var qa,rd=1,sd=arguments.length;rd0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]0)&&!(pd=sd.next()).done;)fd.push(pd.value)}catch(md){hd={error:md}}finally{try{pd&&!pd.done&&(rd=sd.return)&&rd.call(sd)}finally{if(hd)throw hd.error}}return fd},__spread$3=function(){for(var Ra=[],qa=0;qa1e4*GB)return this.handleError(new QiniuError(QiniuErrorName.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!isCustomVarsValid(this.putExtra.customVars))return this.handleError(new QiniuError(QiniuErrorName.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!isMetaDataValid(this.putExtra.metadata))return this.handleError(new QiniuError(QiniuErrorName.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];fd.label=1;case 1:return fd.trys.push([1,4,,5]),this.uploadAt=new Date().getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return fd.sent(),[4,this.run()];case 3:return qa=fd.sent(),this.onComplete(qa.data),this.checkAndUnfreezeHost(),this.sendLog(qa.reqId,200),[2];case 4:return rd=fd.sent(),this.aborted?(this.logger.warn("upload is aborted."),this.sendLog("",-2),[2]):(this.clear(),this.logger.error(rd),rd instanceof QiniuRequestError&&(this.sendLog(rd.reqId,rd.code),this.checkAndFreezeHost(rd),sd=++this.retryCount<=this.config.retryCount,pd=RETRY_CODE_LIST.includes(rd.code),pd&&sd)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(rd),[3,5]));case 5:return[2]}})})},Ra.prototype.clear=function(){this.xhrList.forEach(function(qa){qa.onreadystatechange=null,qa.abort()}),this.xhrList=[],this.logger.info("cleanup uploading xhr.")},Ra.prototype.stop=function(){this.logger.info("aborted."),this.clear(),this.aborted=!0},Ra.prototype.addXhr=function(qa){this.xhrList.push(qa)},Ra.prototype.sendLog=function(qa,rd){var sd,pd;this.logger.report({code:rd,reqId:qa,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:getPortFromUrl((sd=this.uploadHost)===null||sd===void 0?void 0:sd.getUrl()),host:getDomainFromUrl((pd=this.uploadHost)===null||pd===void 0?void 0:pd.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor((new Date().getTime()-this.uploadAt)/1e3)})},Ra.prototype.getProgressInfoItem=function(qa,rd,sd){return __assign$3({size:rd,loaded:qa,percent:qa/rd*100},sd==null?{}:{fromCache:sd})},Ra}(),__extends$1=function(){var Ra=function(qa,rd){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(sd,pd){sd.__proto__=pd}||function(sd,pd){for(var fd in pd)pd.hasOwnProperty(fd)&&(sd[fd]=pd[fd])},Ra(qa,rd)};return function(qa,rd){Ra(qa,rd);function sd(){this.constructor=qa}qa.prototype=rd===null?Object.create(rd):(sd.prototype=rd.prototype,new sd)}}(),__assign$2=function(){return __assign$2=Object.assign||function(Ra){for(var qa,rd=1,sd=arguments.length;rd0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]1024)throw new QiniuError(QiniuErrorName.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:gd.sent(),rd=new Pool(function(yd){return __awaiter$4(md,void 0,void 0,function(){return __generator$4(this,function(vd){switch(vd.label){case 0:if(this.aborted)throw rd.abort(),new Error("pool is aborted");return[4,this.uploadChunk(yd)];case 1:return vd.sent(),[2]}})})},this.config.concurrentRequestLimit),sd=null,pd=this.getLocalKey(),fd=this.chunks.map(function(yd,vd){return rd.enqueue({chunk:yd,index:vd})}),gd.label=2;case 2:return gd.trys.push([2,5,,6]),[4,Promise.all(fd)];case 3:return gd.sent(),[4,this.mkFileReq()];case 4:return sd=gd.sent(),[3,6];case 5:throw hd=gd.sent(),hd instanceof QiniuRequestError&&(hd.code===612||hd.code===400)&&removeLocalFileInfo(pd,this.logger),hd;case 6:return removeLocalFileInfo(pd,this.logger),[2,sd]}})})},qa.prototype.uploadChunk=function(rd){return __awaiter$4(this,void 0,void 0,function(){var sd,pd,fd,hd,md,gd,yd,vd,Nd,Md=this;return __generator$4(this,function(Ld){switch(Ld.label){case 0:return sd=rd.index,pd=rd.chunk,fd=this.cachedUploadedList[sd],this.logger.info("upload part "+sd+", cache:",fd),hd=this.config.checkByMD5,md=function(){Md.usedCacheList[sd]=!0,Md.updateChunkProgress(pd.size,sd),Md.uploadedList[sd]=fd,Md.updateLocalCache()},fd&&!hd?(md(),[2]):[4,computeMd5(pd)];case 1:return gd=Ld.sent(),this.logger.info("computed part md5.",gd),fd&&gd===fd.md5?(md(),[2]):(this.usedCacheList[sd]=!1,yd=function(Fd){Md.updateChunkProgress(Fd.loaded,sd)},vd={body:pd,md5:this.config.checkByServer?gd:void 0,onProgress:yd,onCreate:function(Fd){return Md.addXhr(Fd)}},this.logger.info("part "+sd+" start uploading."),[4,uploadChunk(this.token,this.key,rd.index+1,this.getUploadInfo(),vd)]);case 2:return Nd=Ld.sent(),this.logger.info("part "+sd+" upload completed."),yd({loaded:pd.size,total:pd.size}),this.uploadedList[sd]={etag:Nd.data.etag,md5:Nd.data.md5,size:pd.size},this.updateLocalCache(),[2]}})})},qa.prototype.mkFileReq=function(){return __awaiter$4(this,void 0,void 0,function(){var rd,sd,pd=this;return __generator$4(this,function(fd){switch(fd.label){case 0:return rd=__assign$2(__assign$2(__assign$2({parts:this.uploadedList.map(function(hd,md){return{etag:hd.etag,partNumber:md+1}}),fname:this.putExtra.fname},this.putExtra.mimeType&&{mimeType:this.putExtra.mimeType}),this.putExtra.customVars&&{customVars:this.putExtra.customVars}),this.putExtra.metadata&&{metadata:this.putExtra.metadata}),this.logger.info("parts upload completed, make file.",rd),[4,uploadComplete(this.token,this.key,this.getUploadInfo(),{onCreate:function(hd){return pd.addXhr(hd)},body:JSON.stringify(rd)})];case 1:return sd=fd.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,sd]}})})},qa.prototype.initBeforeUploadChunks=function(){return __awaiter$4(this,void 0,void 0,function(){var rd,sd,pd;return __generator$4(this,function(fd){switch(fd.label){case 0:return this.uploadedList=[],this.usedCacheList=[],rd=getLocalFileInfo(this.getLocalKey(),this.logger),rd?[3,2]:(this.logger.info("init upload parts from api."),[4,initUploadParts(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return sd=fd.sent(),this.logger.info("initd upload parts of id: "+sd.data.uploadId+"."),this.uploadId=sd.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:pd=["resume upload parts from local cache,","total "+rd.data.length+" part,","id is "+rd.id+"."],this.logger.info(pd.join(" ")),this.cachedUploadedList=rd.data,this.uploadId=rd.id,fd.label=3;case 3:return this.chunks=getChunks(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map(function(hd){return 0})},this.notifyResumeProgress(),[2]}})})},qa.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},qa.prototype.getLocalKey=function(){return createLocalKey(this.file.name,this.key,this.file.size)},qa.prototype.updateLocalCache=function(){setLocalFileInfo(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},qa.prototype.updateChunkProgress=function(rd,sd){this.loaded.chunks[sd]=rd,this.notifyResumeProgress()},qa.prototype.updateMkFileProgress=function(rd){this.loaded.mkFileProgress=rd,this.notifyResumeProgress()},qa.prototype.notifyResumeProgress=function(){var rd=this;this.progress={total:this.getProgressInfoItem(sum(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map(function(sd,pd){var fd=rd.usedCacheList[pd];return rd.getProgressInfoItem(rd.loaded.chunks[pd],sd.size,fd)}),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)},qa}(Base),__awaiter$3=function(Ra,qa,rd,sd){function pd(fd){return fd instanceof rd?fd:new rd(function(hd){hd(fd)})}return new(rd||(rd=Promise))(function(fd,hd){function md(vd){try{yd(sd.next(vd))}catch(Nd){hd(Nd)}}function gd(vd){try{yd(sd.throw(vd))}catch(Nd){hd(Nd)}}function yd(vd){vd.done?fd(vd.value):pd(vd.value).then(md,gd)}yd((sd=sd.apply(Ra,qa||[])).next())})},__generator$3=function(Ra,qa){var rd={label:0,sent:function(){if(fd[0]&1)throw fd[1];return fd[1]},trys:[],ops:[]},sd,pd,fd,hd;return hd={next:md(0),throw:md(1),return:md(2)},typeof Symbol=="function"&&(hd[Symbol.iterator]=function(){return this}),hd;function md(yd){return function(vd){return gd([yd,vd])}}function gd(yd){if(sd)throw new TypeError("Generator is already executing.");for(;rd;)try{if(sd=1,pd&&(fd=yd[0]&2?pd.return:yd[0]?pd.throw||((fd=pd.return)&&fd.call(pd),0):pd.next)&&!(fd=fd.call(pd,yd[1])).done)return fd;switch(pd=0,fd&&(yd=[yd[0]&2,fd.value]),yd[0]){case 0:case 1:fd=yd;break;case 4:return rd.label++,{value:yd[1],done:!1};case 5:rd.label++,pd=yd[1],yd=[0];continue;case 7:yd=rd.ops.pop(),rd.trys.pop();continue;default:if(fd=rd.trys,!(fd=fd.length>0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]>>1^3988292384:sd>>>=1;qa[rd]=sd}return qa},Ra.prototype.append=function(qa){for(var rd=this.crc,sd=0;sd>>8^this.table[(rd^qa[sd])&255];this.crc=rd},Ra.prototype.compute=function(){return(this.crc^-1)>>>0},Ra.prototype.readAsUint8Array=function(qa){return __awaiter$3(this,void 0,void 0,function(){var rd;return __generator$3(this,function(sd){switch(sd.label){case 0:return typeof qa.arrayBuffer!="function"?[3,2]:(rd=Uint8Array.bind,[4,qa.arrayBuffer()]);case 1:return[2,new(rd.apply(Uint8Array,[void 0,sd.sent()]))];case 2:return[2,new Promise(function(pd,fd){var hd=new FileReader;hd.onload=function(){if(hd.result==null){fd();return}if(typeof hd.result=="string"){fd();return}pd(new Uint8Array(hd.result))},hd.readAsArrayBuffer(qa)})]}})})},Ra.prototype.file=function(qa){return __awaiter$3(this,void 0,void 0,function(){var rd,sd,pd,fd,hd,md;return __generator$3(this,function(gd){switch(gd.label){case 0:return qa.size<=MB?(rd=this.append,[4,this.readAsUint8Array(qa)]):[3,2];case 1:return rd.apply(this,[gd.sent()]),[2,this.compute()];case 2:sd=Math.ceil(qa.size/MB),pd=0,gd.label=3;case 3:return pd0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]0&&reportV3(Ra,qa,rd-1)};var pd=[qa.code||"",qa.reqId||"",qa.host||"",qa.remoteIp||"",qa.port||"",qa.duration||"",qa.time||"",qa.bytesSent||"",qa.upType||"",qa.size||""].join(",");sd.send(pd)}var __read$2=function(Ra,qa){var rd=typeof Symbol=="function"&&Ra[Symbol.iterator];if(!rd)return Ra;var sd=rd.call(Ra),pd,fd=[],hd;try{for(;(qa===void 0||qa-- >0)&&!(pd=sd.next()).done;)fd.push(pd.value)}catch(md){hd={error:md}}finally{try{pd&&!pd.done&&(rd=sd.return)&&rd.call(sd)}finally{if(hd)throw hd.error}}return fd},__spread$2=function(){for(var Ra=[],qa=0;qa0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]0)&&!(pd=sd.next()).done;)fd.push(pd.value)}catch(md){hd={error:md}}finally{try{pd&&!pd.done&&(rd=sd.return)&&rd.call(sd)}finally{if(hd)throw hd.error}}return fd},__spread$1=function(){for(var Ra=[],qa=0;qa=qa},Ra.prototype.freeze=function(qa){qa===void 0&&(qa=20);var rd=new Date().getTime()+qa*1e3;unfreezeTimeMap.set(this.host,rd)},Ra.prototype.unfreeze=function(){unfreezeTimeMap.delete(this.host)},Ra.prototype.getUrl=function(){return this.protocol+"://"+this.host},Ra.prototype.getUnfreezeTime=function(){return unfreezeTimeMap.get(this.host)},Ra}(),HostPool=function(){function Ra(qa){qa===void 0&&(qa=[]),this.initHosts=qa,this.cachedHostsMap=new Map}return Ra.prototype.register=function(qa,rd,sd,pd){this.cachedHostsMap.set(qa+"@"+rd,sd.map(function(fd){return new Host(fd,pd)}))},Ra.prototype.refresh=function(qa,rd,sd){var pd,fd,hd,md;return __awaiter$1(this,void 0,void 0,function(){var gd,yd,vd;return __generator$1(this,function(Nd){switch(Nd.label){case 0:return gd=this.cachedHostsMap.get(qa+"@"+rd)||[],gd.length>0?[2]:this.initHosts.length>0?(this.register(qa,rd,this.initHosts,sd),[2]):[4,getUpHosts(qa,rd,sd)];case 1:return yd=Nd.sent(),(yd==null?void 0:yd.data)!=null&&(vd=__spread$1(((fd=(pd=yd.data.up)===null||pd===void 0?void 0:pd.acc)===null||fd===void 0?void 0:fd.main)||[],((md=(hd=yd.data.up)===null||hd===void 0?void 0:hd.acc)===null||md===void 0?void 0:md.backup)||[]),this.register(qa,rd,vd,sd)),[2]}})})},Ra.prototype.getUp=function(qa,rd,sd){return __awaiter$1(this,void 0,void 0,function(){var pd,fd,hd;return __generator$1(this,function(md){switch(md.label){case 0:return[4,this.refresh(qa,rd,sd)];case 1:return md.sent(),pd=this.cachedHostsMap.get(qa+"@"+rd)||[],pd.length===0?[2,null]:(fd=pd.filter(function(gd){return!gd.isFrozen()}),fd.length>0?[2,fd[0]]:(hd=pd.slice().sort(function(gd,yd){return(gd.getUnfreezeTime()||0)-(yd.getUnfreezeTime()||0)}),[2,hd[0]]))}})})},Ra}();function createUploadManager(Ra,qa,rd,sd){return Ra.config&&Ra.config.forceDirect?(sd.info("ues forceDirect mode."),new Direct(Ra,qa,rd,sd)):Ra.file.size>4*MB?(sd.info("file size over 4M, use Resume."),new Resume(Ra,qa,rd,sd)):(sd.info("file size less or equal than 4M, use Direct."),new Direct(Ra,qa,rd,sd))}function upload(Ra,qa,rd,sd,pd){var fd=new Logger(rd,pd==null?void 0:pd.disableStatisticsReport,pd==null?void 0:pd.debugLogLevel,Ra.name),hd={file:Ra,key:qa,token:rd,putExtra:sd,config:normalizeUploadConfig(pd,fd)},md=new HostPool(hd.config.uphost);return new Observable(function(gd){var yd=createUploadManager(hd,{onData:function(vd){return gd.next(vd)},onError:function(vd){return gd.error(vd)},onComplete:function(vd){return gd.complete(vd)}},md,fd);return yd.putFile(),yd.stop.bind(yd)})}var __assign$1=function(){return __assign$1=Object.assign||function(Ra){for(var qa,rd=1,sd=arguments.length;rd0)&&!(pd=sd.next()).done;)fd.push(pd.value)}catch(md){hd={error:md}}finally{try{pd&&!pd.done&&(rd=sd.return)&&rd.call(sd)}finally{if(hd)throw hd.error}}return fd},__spread=function(){for(var Ra=[],qa=0;qa0&&fd[fd.length-1])&&(yd[0]===6||yd[0]===2)){rd=0;continue}if(yd[0]===3&&(!fd||yd[1]>fd[0]&&yd[1]this.file.size&&this.config.noCompressIfLarger?[2,{dist:this.file,width:qa.width,height:qa.height}]:[2,{dist:hd,width:fd.width,height:fd.height}]}})})},Ra.prototype.clear=function(qa,rd,sd){this.outputType===defaultType?(qa.fillStyle="#fff",qa.fillRect(0,0,rd,sd)):qa.clearRect(0,0,rd,sd)},Ra.prototype.getOriginImage=function(){var qa=this;return new Promise(function(rd,sd){var pd=createObjectURL(qa.file),fd=new Image;fd.onload=function(){rd(fd)},fd.onerror=function(){sd("image load error")},fd.src=pd})},Ra.prototype.getCanvas=function(qa){var rd=this;return new Promise(function(sd,pd){var fd=document.createElement("canvas"),hd=fd.getContext("2d");if(!hd){pd(new QiniuError(QiniuErrorName.GetCanvasContextFailed,"context is null"));return}var md=qa.width,gd=qa.height;fd.height=gd,fd.width=md,rd.clear(hd,md,gd),hd.drawImage(qa,0,0),sd(fd)})},Ra.prototype.doScale=function(qa,rd){return __awaiter(this,void 0,void 0,function(){var sd,pd,fd,hd,md,gd,yd,vd,Nd,Md,Ld,Fd,Hd,Vd,Gd,Ud;return __generator(this,function(qd){if(rd===1)return[2,qa];if(sd=qa.getContext("2d"),pd=Math.min(maxSteps,Math.ceil(1/rd/scaleFactor)),fd=Math.pow(rd,1/pd),hd=document.createElement("canvas"),md=hd.getContext("2d"),gd=qa.width,yd=qa.height,vd=gd,Nd=yd,hd.width=gd,hd.height=yd,!md||!sd)throw new QiniuError(QiniuErrorName.GetCanvasContextFailed,"mctx or sctx can't be null");for(Fd=0;Fd!ed.includes(ud)).sort()}function getSigningKey(Ra,ed,ud,dd="s3"){if(!isObject(Ra))throw new TypeError('date should be of type "object"');if(!isString(ed))throw new TypeError('region should be of type "string"');if(!isString(ud))throw new TypeError('secretKey should be of type "string"');const hd=makeDateShort(Ra);return(void 0)("sha256",(void 0)("sha256",(void 0)("sha256",(void 0)("sha256","AWS4"+ud).update(hd).digest()).update(ed).digest()).update(dd).digest()).update("aws4_request").digest()}function getStringToSign(Ra,ed,ud,dd="s3"){if(!isString(Ra))throw new TypeError('canonicalRequest should be of type "string"');if(!isObject(ed))throw new TypeError('requestDate should be of type "object"');if(!isString(ud))throw new TypeError('region should be of type "string"');const hd=(void 0)("sha256").update(Ra).digest("hex"),md=getScope(ud,ed,dd);return[signV4Algorithm,makeDateLong(ed),md,hd].join(` +`)}function postPresignSignatureV4(Ra,ed,ud,dd){if(!isString(Ra))throw new TypeError('region should be of type "string"');if(!isObject(ed))throw new TypeError('date should be of type "object"');if(!isString(ud))throw new TypeError('secretKey should be of type "string"');if(!isString(dd))throw new TypeError('policyBase64 should be of type "string"');return(void 0)("sha256",getSigningKey(ed,Ra,ud)).update(dd).digest("hex").toLowerCase()}function signV4(Ra,ed,ud,dd,hd,md,gd="s3"){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(ed))throw new TypeError('accessKey should be of type "string"');if(!isString(ud))throw new TypeError('secretKey should be of type "string"');if(!isString(dd))throw new TypeError('region should be of type "string"');if(!ed)throw new AccessKeyRequiredError("accessKey is required for signing");if(!ud)throw new SecretKeyRequiredError("secretKey is required for signing");const yd=getSignedHeaders(Ra.headers),vd=getCanonicalRequest(Ra.method,Ra.path,Ra.headers,yd,md),Cd=gd||"s3",wd=getStringToSign(vd,hd,dd,Cd),Nd=getSigningKey(hd,dd,ud,Cd),Ld=getCredential(ed,dd,hd,Cd),Ud=(void 0)("sha256",Nd).update(wd).digest("hex").toLowerCase();return`${signV4Algorithm} Credential=${Ld}, SignedHeaders=${yd.join(";").toLowerCase()}, Signature=${Ud}`}function presignSignatureV4(Ra,ed,ud,dd,hd,md,gd){if(!isObject(Ra))throw new TypeError('request should be of type "object"');if(!isString(ed))throw new TypeError('accessKey should be of type "string"');if(!isString(ud))throw new TypeError('secretKey should be of type "string"');if(!isString(hd))throw new TypeError('region should be of type "string"');if(!ed)throw new AccessKeyRequiredError("accessKey is required for presigning");if(!ud)throw new SecretKeyRequiredError("secretKey is required for presigning");if(!isNumber(gd))throw new TypeError('expires should be of type "number"');if(gd<1)throw new ExpiresParamError("expires param cannot be less than 1 seconds");if(gd>604800)throw new ExpiresParamError("expires param cannot be greater than 7 days");const yd=makeDateLong(md),vd=getSignedHeaders(Ra.headers),Cd=getCredential(ed,hd,md),wd="UNSIGNED-PAYLOAD",Nd=[];Nd.push(`X-Amz-Algorithm=${signV4Algorithm}`),Nd.push(`X-Amz-Credential=${uriEscape(Cd)}`),Nd.push(`X-Amz-Date=${yd}`),Nd.push(`X-Amz-Expires=${gd}`),Nd.push(`X-Amz-SignedHeaders=${uriEscape(vd.join(";").toLowerCase())}`),dd&&Nd.push(`X-Amz-Security-Token=${uriEscape(dd)}`);const Ld=Ra.path.split("?")[0];let Ud=Ra.path.split("?")[1];Ud?Ud=Ud+"&"+Nd.join("&"):Ud=Nd.join("&");const jd=Ld+"?"+Ud,Gd=getCanonicalRequest(Ra.method,jd,Ra.headers,vd,wd),Yd=getStringToSign(Gd,md,hd),qd=(void 0)("sha256",getSigningKey(md,hd,ud)).update(Yd).digest("hex").toLowerCase();return Ra.protocol+"//"+Ra.headers.host+jd+`&X-Amz-Signature=${qd}`}async function readAsBuffer(Ra){return new Promise((ed,ud)=>{const dd=[];Ra.on("data",hd=>dd.push(hd)).on("error",hd=>ud(hd)).on("end",()=>ed(Buffer$4.concat(dd)))})}async function readAsString(Ra){return(await readAsBuffer(Ra)).toString()}async function drainResponse(Ra){return new Promise((ed,ud)=>{Ra.on("data",()=>{}).on("error",dd=>ud(dd)).on("end",()=>ed())})}function parseBucketRegion(Ra){return parseXml(Ra).LocationConstraint}const fxp=new fxp$2.XMLParser;function parseError(Ra,ed){let ud={};const dd=fxp.parse(Ra);dd.Error&&(ud=dd.Error);const hd=new S3Error;return Object.entries(ud).forEach(([md,gd])=>{hd[md.toLowerCase()]=gd}),Object.entries(ed).forEach(([md,gd])=>{hd[md]=gd}),hd}async function parseResponseError(Ra){const ed=Ra.statusCode;let ud,dd;ed===301?(ud="MovedPermanently",dd="Moved Permanently"):ed===307?(ud="TemporaryRedirect",dd="Are you using the correct endpoint URL?"):ed===403?(ud="AccessDenied",dd="Valid and authorized credentials required"):ed===404?(ud="NotFound",dd="Not Found"):ed===405||ed===501?(ud="MethodNotAllowed",dd="Method Not Allowed"):(ud="UnknownError",dd=`${ed}`);const hd={};hd.amzRequestid=Ra.headers["x-amz-request-id"],hd.amzId2=Ra.headers["x-amz-id-2"],hd.amzBucketRegion=Ra.headers["x-amz-bucket-region"];const md=await readAsString(Ra);if(md)throw parseError(md,hd);const gd=new S3Error(dd,{cause:hd});throw gd.code=ud,Object.entries(hd).forEach(([yd,vd])=>{gd[yd]=vd}),gd}function parseListObjectsV2WithMetadata(Ra){const ed={objects:[],isTruncated:!1,nextContinuationToken:""};let ud=parseXml(Ra);if(!ud.ListBucketResult)throw new InvalidXMLError('Missing tag: "ListBucketResult"');return ud=ud.ListBucketResult,ud.IsTruncated&&(ed.isTruncated=ud.IsTruncated),ud.NextContinuationToken&&(ed.nextContinuationToken=ud.NextContinuationToken),ud.Contents&&toArray(ud.Contents).forEach(dd=>{const hd=sanitizeObjectKey(dd.Key),md=new Date(dd.LastModified),gd=sanitizeETag(dd.ETag),yd=dd.Size;let vd;dd.UserMetadata!=null?vd=toArray(dd.UserMetadata)[0]:vd=null,ed.objects.push({name:hd,lastModified:md,etag:gd,size:yd,metadata:vd})}),ud.CommonPrefixes&&toArray(ud.CommonPrefixes).forEach(dd=>{ed.objects.push({prefix:sanitizeObjectKey(toArray(dd.Prefix)[0]),size:0})}),ed}function parseListParts(Ra){let ed=parseXml(Ra);const ud={isTruncated:!1,parts:[],marker:0};if(!ed.ListPartsResult)throw new InvalidXMLError('Missing tag: "ListPartsResult"');return ed=ed.ListPartsResult,ed.IsTruncated&&(ud.isTruncated=ed.IsTruncated),ed.NextPartNumberMarker&&(ud.marker=toArray(ed.NextPartNumberMarker)[0]||""),ed.Part&&toArray(ed.Part).forEach(dd=>{const hd=parseInt(toArray(dd.PartNumber)[0],10),md=new Date(dd.LastModified),gd=dd.ETag.replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"");ud.parts.push({part:hd,lastModified:md,etag:gd,size:parseInt(dd.Size,10)})}),ud}function parseListBucket(Ra){let ed=[];const ud=parseXml(Ra);if(!ud.ListAllMyBucketsResult)throw new InvalidXMLError('Missing tag: "ListAllMyBucketsResult"');const{ListAllMyBucketsResult:{Buckets:dd={}}={}}=ud;return dd.Bucket&&(ed=toArray(dd.Bucket).map((hd={})=>{const{Name:md,CreationDate:gd}=hd,yd=new Date(gd);return{name:md,creationDate:yd}})),ed}function parseInitiateMultipart(Ra){let ed=parseXml(Ra);if(!ed.InitiateMultipartUploadResult)throw new InvalidXMLError('Missing tag: "InitiateMultipartUploadResult"');if(ed=ed.InitiateMultipartUploadResult,ed.UploadId)return ed.UploadId;throw new InvalidXMLError('Missing tag: "UploadId"')}function parseReplicationConfig(Ra){const ed=parseXml(Ra),{Role:ud,Rule:dd}=ed.ReplicationConfiguration;return{ReplicationConfiguration:{role:ud,rules:toArray(dd)}}}class Extensions{constructor(ed){this.client=ed}listObjectsV2WithMetadata(ed,ud,dd,hd){if(ud===void 0&&(ud=""),dd===void 0&&(dd=!1),hd===void 0&&(hd=""),!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidPrefix(ud))throw new InvalidPrefixError(`Invalid prefix : ${ud}`);if(!isString(ud))throw new TypeError('prefix should be of type "string"');if(!isBoolean(dd))throw new TypeError('recursive should be of type "boolean"');if(!isString(hd))throw new TypeError('startAfter should be of type "string"');const md=dd?"":"/";return streamBrowserify.Readable.from(this.listObjectsV2WithMetadataGen(ed,ud,md,hd),{objectMode:!0})}async*listObjectsV2WithMetadataGen(ed,ud,dd,hd){let md=!1,gd="";do{const yd=await this.listObjectsV2WithMetadataQuery(ed,ud,gd,dd,hd);md=!yd.isTruncated,gd=yd.nextContinuationToken;for(const vd of yd.objects)yield vd}while(!md)}async listObjectsV2WithMetadataQuery(ed,ud,dd,hd,md){const gd=[];gd.push("list-type=2"),gd.push("encoding-type=url"),gd.push(`prefix=${uriEscape(ud)}`),gd.push(`delimiter=${uriEscape(hd)}`),gd.push("metadata=true"),dd&&(dd=uriEscape(dd),gd.push(`continuation-token=${dd}`)),md&&(md=uriEscape(md),gd.push(`start-after=${md}`)),gd.push("max-keys=1000"),gd.sort();let yd="";gd.length>0&&(yd=`${gd.join("&")}`);const Cd=await this.client.makeRequestAsync({method:"GET",bucketName:ed,query:yd});return parseListObjectsV2WithMetadata(await readAsString(Cd))}}async function request$1(Ra,ed,ud=null){return new Promise((dd,hd)=>{const md=Ra.request(ed,gd=>{dd(gd)});if(!ud||Buffer$4.isBuffer(ud)||typeof ud=="string"){md.on("error",gd=>{hd(gd)}).end(ud);return}streamBrowserify.pipeline(ud,md,gd=>{gd&&hd(gd)})})}const awsS3Endpoint={"us-east-1":"s3.amazonaws.com","us-east-2":"s3-us-east-2.amazonaws.com","us-west-1":"s3-us-west-1.amazonaws.com","us-west-2":"s3-us-west-2.amazonaws.com","ca-central-1":"s3.ca-central-1.amazonaws.com","eu-west-1":"s3-eu-west-1.amazonaws.com","eu-west-2":"s3-eu-west-2.amazonaws.com","sa-east-1":"s3-sa-east-1.amazonaws.com","eu-central-1":"s3-eu-central-1.amazonaws.com","ap-south-1":"s3-ap-south-1.amazonaws.com","ap-southeast-1":"s3-ap-southeast-1.amazonaws.com","ap-southeast-2":"s3-ap-southeast-2.amazonaws.com","ap-northeast-1":"s3-ap-northeast-1.amazonaws.com","cn-north-1":"s3.cn-north-1.amazonaws.com.cn","ap-east-1":"s3.ap-east-1.amazonaws.com","eu-north-1":"s3.eu-north-1.amazonaws.com"};function getS3Endpoint(Ra){if(!isString(Ra))throw new TypeError(`Invalid region: ${Ra}`);const ed=awsS3Endpoint[Ra];return ed||"s3.amazonaws.com"}var define_process_default$2={arch:"x64",platform:"linux",stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0}};const Package={version:"7.1.3"},requestOptionProperties=["agent","ca","cert","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","family","honorCipherOrder","key","passphrase","pfx","rejectUnauthorized","secureOptions","secureProtocol","servername","sessionIdContext"];class TypedClient{constructor(ed){Ig(this,"partSize",64*1024*1024);Ig(this,"maximumPartSize",5*1024*1024*1024);Ig(this,"maxObjectSize",5*1024*1024*1024*1024);if(ed.secure!==void 0)throw new Error('"secure" option deprecated, "useSSL" should be used instead');if(ed.useSSL===void 0&&(ed.useSSL=!0),ed.port||(ed.port=0),!isValidEndpoint(ed.endPoint))throw new InvalidEndpointError(`Invalid endPoint : ${ed.endPoint}`);if(!isValidPort(ed.port))throw new InvalidArgumentError(`Invalid port : ${ed.port}`);if(!isBoolean(ed.useSSL))throw new InvalidArgumentError(`Invalid useSSL flag type : ${ed.useSSL}, expected to be of type "boolean"`);if(ed.region&&!isString(ed.region))throw new InvalidArgumentError(`Invalid region : ${ed.region}`);const ud=ed.endPoint.toLowerCase();let dd=ed.port,hd,md,gd;if(ed.useSSL?(md=http,hd="https:",dd=dd||443,gd=void 0):(md=http,hd="http:",dd=dd||80,gd=void 0),ed.transport){if(!isObject(ed.transport))throw new InvalidArgumentError(`Invalid transport type : ${ed.transport}, expected to be type "object"`);md=ed.transport}if(ed.transportAgent){if(!isObject(ed.transportAgent))throw new InvalidArgumentError(`Invalid transportAgent type: ${ed.transportAgent}, expected to be type "object"`);gd=ed.transportAgent}const vd=`MinIO ${`(${define_process_default$2.platform}; ${define_process_default$2.arch})`} minio-js/${Package.version}`;if(this.transport=md,this.transportAgent=gd,this.host=ud,this.port=dd,this.protocol=hd,this.userAgent=`${vd}`,ed.pathStyle===void 0?this.pathStyle=!0:this.pathStyle=ed.pathStyle,this.accessKey=ed.accessKey??"",this.secretKey=ed.secretKey??"",this.sessionToken=ed.sessionToken,this.anonymous=!this.accessKey||!this.secretKey,ed.credentialsProvider&&(this.credentialsProvider=ed.credentialsProvider),this.regionMap={},ed.region&&(this.region=ed.region),ed.partSize&&(this.partSize=ed.partSize,this.overRidePartSize=!0),this.partSize<5*1024*1024)throw new InvalidArgumentError("Part size should be greater than 5MB");if(this.partSize>5*1024*1024*1024)throw new InvalidArgumentError("Part size should be less than 5GB");this.enableSHA256=!this.anonymous&&!ed.useSSL,this.s3AccelerateEndpoint=ed.s3AccelerateEndpoint||void 0,this.reqOptions={},this.clientExtensions=new Extensions(this)}get extensions(){return this.clientExtensions}setS3TransferAccelerate(ed){this.s3AccelerateEndpoint=ed}setRequestOptions(ed){if(!isObject(ed))throw new TypeError('request options should be of type "object"');this.reqOptions=_.pick(ed,requestOptionProperties)}getAccelerateEndPointIfSet(ed,ud){if(!isEmpty(this.s3AccelerateEndpoint)&&!isEmpty(ed)&&!isEmpty(ud)){if(ed.includes("."))throw new Error(`Transfer Acceleration is not supported for non compliant bucket:${ed}`);return this.s3AccelerateEndpoint}return!1}getRequestOptions(ed){const ud=ed.method,dd=ed.region,hd=ed.bucketName;let md=ed.objectName;const gd=ed.headers,yd=ed.query;let vd={method:ud,headers:{},protocol:this.protocol,agent:this.transportAgent},Cd;hd&&(Cd=isVirtualHostStyle(this.host,this.protocol,hd,this.pathStyle));let wd="/",Nd=this.host,Ld;if(this.port&&(Ld=this.port),md&&(md=uriResourceEscape(md)),isAmazonEndpoint(Nd)){const Ud=this.getAccelerateEndPointIfSet(hd,md);Ud?Nd=`${Ud}`:Nd=getS3Endpoint(dd)}if(Cd&&!ed.pathStyle?(hd&&(Nd=`${hd}.${Nd}`),md&&(wd=`/${md}`)):(hd&&(wd=`/${hd}`),md&&(wd=`/${hd}/${md}`)),yd&&(wd+=`?${yd}`),vd.headers.host=Nd,(vd.protocol==="http:"&&Ld!==80||vd.protocol==="https:"&&Ld!==443)&&(vd.headers.host=`${Nd}:${Ld}`),vd.headers["user-agent"]=this.userAgent,gd)for(const[Ud,jd]of Object.entries(gd))vd.headers[Ud.toLowerCase()]=jd;return vd=Object.assign({},this.reqOptions,vd),{...vd,headers:_.mapValues(_.pickBy(vd.headers,isDefined),Ud=>Ud.toString()),host:Nd,port:Ld,path:wd}}async setCredentialsProvider(ed){if(!(ed instanceof CredentialProvider))throw new Error("Unable to get credentials. Expected instance of CredentialProvider");this.credentialsProvider=ed,await this.checkAndRefreshCreds()}async checkAndRefreshCreds(){if(this.credentialsProvider)try{const ed=await this.credentialsProvider.getCredentials();this.accessKey=ed.getAccessKey(),this.secretKey=ed.getSecretKey(),this.sessionToken=ed.getSessionToken()}catch(ed){throw new Error(`Unable to get credentials: ${ed}`,{cause:ed})}}logHTTP(ed,ud,dd){if(!this.logStream)return;if(!isObject(ed))throw new TypeError('reqOptions should be of type "object"');if(ud&&!isReadableStream(ud))throw new TypeError('response should be of type "Stream"');if(dd&&!(dd instanceof Error))throw new TypeError('err should be of type "Error"');const hd=this.logStream,md=gd=>{Object.entries(gd).forEach(([yd,vd])=>{if(yd=="authorization"&&isString(vd)){const Cd=new RegExp("Signature=([0-9a-f]+)");vd=vd.replace(Cd,"Signature=**REDACTED**")}hd.write(`${yd}: ${vd} +`)}),hd.write(` +`)};if(hd.write(`REQUEST: ${ed.method} ${ed.path} +`),md(ed.headers),ud&&(this.logStream.write(`RESPONSE: ${ud.statusCode} +`),md(ud.headers)),dd){hd.write(`ERROR BODY: +`);const gd=JSON.stringify(dd,null," ");hd.write(`${gd} +`)}}traceOn(ed){ed||(ed=define_process_default$2.stdout),this.logStream=ed}traceOff(){this.logStream=void 0}async makeRequestAsync(ed,ud="",dd=[200],hd=""){if(!isObject(ed))throw new TypeError('options should be of type "object"');if(!isString(ud)&&!isObject(ud))throw new TypeError('payload should be of type "string" or "Buffer"');if(dd.forEach(gd=>{if(!isNumber(gd))throw new TypeError('statusCode should be of type "number"')}),!isString(hd))throw new TypeError('region should be of type "string"');ed.headers||(ed.headers={}),(ed.method==="POST"||ed.method==="PUT"||ed.method==="DELETE")&&(ed.headers["content-length"]=ud.length.toString());const md=this.enableSHA256?toSha256(ud):"";return this.makeRequestStreamAsync(ed,ud,md,dd,hd)}async makeRequestAsyncOmit(ed,ud="",dd=[200],hd=""){const md=await this.makeRequestAsync(ed,ud,dd,hd);return await drainResponse(md),md}async makeRequestStreamAsync(ed,ud,dd,hd,md){if(!isObject(ed))throw new TypeError('options should be of type "object"');if(!(Buffer$4.isBuffer(ud)||typeof ud=="string"||isReadableStream(ud)))throw new InvalidArgumentError(`stream should be a Buffer, string or readable Stream, got ${typeof ud} instead`);if(!isString(dd))throw new TypeError('sha256sum should be of type "string"');if(hd.forEach(vd=>{if(!isNumber(vd))throw new TypeError('statusCode should be of type "number"')}),!isString(md))throw new TypeError('region should be of type "string"');if(!this.enableSHA256&&dd.length!==0)throw new InvalidArgumentError("sha256sum expected to be empty for anonymous or https requests");if(this.enableSHA256&&dd.length!==64)throw new InvalidArgumentError(`Invalid sha256sum : ${dd}`);await this.checkAndRefreshCreds(),md=md||await this.getBucketRegionAsync(ed.bucketName);const gd=this.getRequestOptions({...ed,region:md});if(!this.anonymous){this.enableSHA256||(dd="UNSIGNED-PAYLOAD");const vd=new Date;gd.headers["x-amz-date"]=makeDateLong(vd),gd.headers["x-amz-content-sha256"]=dd,this.sessionToken&&(gd.headers["x-amz-security-token"]=this.sessionToken),gd.headers.authorization=signV4(gd,this.accessKey,this.secretKey,md,vd,dd)}const yd=await request$1(this.transport,gd,ud);if(!yd.statusCode)throw new Error("BUG: response doesn't have a statusCode");if(!hd.includes(yd.statusCode)){delete this.regionMap[ed.bucketName];const vd=await parseResponseError(yd);throw this.logHTTP(gd,yd,vd),vd}return this.logHTTP(gd,yd),yd}async getBucketRegionAsync(ed){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name : ${ed}`);if(this.region)return this.region;const ud=this.regionMap[ed];if(ud)return ud;const dd=async Cd=>{const wd=await readAsString(Cd),Nd=parseBucketRegion(wd)||DEFAULT_REGION;return this.regionMap[ed]=Nd,Nd},hd="GET",md="location",gd=this.pathStyle&&!isBrowser_1;let yd;try{const Cd=await this.makeRequestAsync({method:hd,bucketName:ed,query:md,pathStyle:gd},"",[200],DEFAULT_REGION);return dd(Cd)}catch(Cd){if(Cd.name!=="AuthorizationHeaderMalformed"||(yd=Cd.Region,!yd))throw Cd}const vd=await this.makeRequestAsync({method:hd,bucketName:ed,query:md,pathStyle:gd},"",[200],yd);return await dd(vd)}makeRequest(ed,ud="",dd=[200],hd="",md,gd){let yd;md?yd=this.makeRequestAsync(ed,ud,dd,hd):yd=this.makeRequestAsyncOmit(ed,ud,dd,hd),yd.then(vd=>gd(null,vd),vd=>{gd(vd)})}makeRequestStream(ed,ud,dd,hd,md,gd,yd){(async()=>{const Cd=await this.makeRequestStreamAsync(ed,ud,dd,hd,md);return gd||await drainResponse(Cd),Cd})().then(Cd=>yd(null,Cd),Cd=>yd(Cd))}getBucketRegion(ed,ud){return this.getBucketRegionAsync(ed).then(dd=>ud(null,dd),dd=>ud(dd))}async removeBucket(ed){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:ed},"",[204]),delete this.regionMap[ed]}async statObject(ed,ud,dd={}){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isObject(dd))throw new InvalidArgumentError('statOpts should be of type "object"');const hd=queryString.stringify(dd),gd=await this.makeRequestAsyncOmit({method:"HEAD",bucketName:ed,objectName:ud,query:hd});return{size:parseInt(gd.headers["content-length"]),metaData:extractMetadata(gd.headers),lastModified:new Date(gd.headers["last-modified"]),versionId:getVersionId(gd.headers),etag:sanitizeETag(gd.headers.etag)}}async removeObject(ed,ud,dd={}){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isObject(dd))throw new InvalidArgumentError('removeOpts should be of type "object"');const hd="DELETE",md={};dd.governanceBypass&&(md["X-Amz-Bypass-Governance-Retention"]=!0),dd.forceDelete&&(md["x-minio-force-delete"]=!0);const gd={};dd.versionId&&(gd.versionId=`${dd.versionId}`);const yd=queryString.stringify(gd);await this.makeRequestAsyncOmit({method:hd,bucketName:ed,objectName:ud,headers:md,query:yd},"",[200,204])}async initiateNewMultipartUpload(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isObject(dd))throw new InvalidObjectNameError('contentType should be of type "object"');const gd=await this.makeRequestAsync({method:"POST",bucketName:ed,objectName:ud,query:"uploads",headers:dd}),yd=await readAsBuffer(gd);return parseInitiateMultipart(yd.toString())}async abortMultipartUpload(ed,ud,dd){const hd="DELETE",md=`uploadId=${dd}`,gd={method:hd,bucketName:ed,objectName:ud,query:md};await this.makeRequestAsyncOmit(gd,"",[204])}async listParts(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isString(dd))throw new TypeError('uploadId should be of type "string"');if(!dd)throw new InvalidArgumentError("uploadId cannot be empty");const hd=[];let md=0,gd;do gd=await this.listPartsQuery(ed,ud,dd,md),md=gd.marker,hd.push(...gd.parts);while(gd.isTruncated);return hd}async listPartsQuery(ed,ud,dd,hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isString(dd))throw new TypeError('uploadId should be of type "string"');if(!isNumber(hd))throw new TypeError('marker should be of type "number"');if(!dd)throw new InvalidArgumentError("uploadId cannot be empty");let md=`uploadId=${uriEscape(dd)}`;hd&&(md+=`&part-number-marker=${hd}`);const yd=await this.makeRequestAsync({method:"GET",bucketName:ed,objectName:ud,query:md});return parseListParts(await readAsString(yd))}async listBuckets(){const ud=await this.makeRequestAsync({method:"GET"},"",[200],DEFAULT_REGION),dd=await readAsString(ud);return parseListBucket(dd)}async removeBucketReplication(ed){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);await this.makeRequestAsyncOmit({method:"DELETE",bucketName:ed,query:"replication"},"",[200,204],"")}async setBucketReplication(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(isObject(ud)){if(_.isEmpty(ud.role))throw new InvalidArgumentError("Role cannot be empty");if(ud.role&&!isString(ud.role))throw new InvalidArgumentError("Invalid value for role",ud.role);if(_.isEmpty(ud.rules))throw new InvalidArgumentError("Minimum one replication rule must be specified")}else throw new InvalidArgumentError('replicationConfig should be of type "object"');const dd="PUT",hd="replication",md={},gd={ReplicationConfiguration:{Role:ud.role,Rule:ud.rules}},vd=new xml2js.Builder({renderOpts:{pretty:!1},headless:!0}).buildObject(gd);md["Content-MD5"]=toMd5(vd),await this.makeRequestAsyncOmit({method:dd,bucketName:ed,query:hd,headers:md},vd)}async getBucketReplication(ed){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);const hd=await this.makeRequestAsync({method:"GET",bucketName:ed,query:"replication"},"",[200,204]),md=await readAsString(hd);return parseReplicationConfig(md)}}class CopyConditions{constructor(){Ig(this,"modified","");Ig(this,"unmodified","");Ig(this,"matchETag","");Ig(this,"matchETagExcept","")}setModified(ed){if(!(ed instanceof Date))throw new TypeError("date must be of type Date");this.modified=ed.toUTCString()}setUnmodified(ed){if(!(ed instanceof Date))throw new TypeError("date must be of type Date");this.unmodified=ed.toUTCString()}setMatchETag(ed){this.matchETag=ed}setMatchETagExcept(ed){this.matchETagExcept=ed}}class PostPolicy{constructor(){Ig(this,"policy",{conditions:[]});Ig(this,"formData",{})}setExpires(ed){if(!ed)throw new InvalidDateError("Invalid date: cannot be null");this.policy.expiration=ed.toISOString()}setKey(ed){if(!isValidObjectName(ed))throw new InvalidObjectNameError(`Invalid object name : ${ed}`);this.policy.conditions.push(["eq","$key",ed]),this.formData.key=ed}setKeyStartsWith(ed){if(!isValidPrefix(ed))throw new InvalidPrefixError(`Invalid prefix : ${ed}`);this.policy.conditions.push(["starts-with","$key",ed]),this.formData.key=ed}setBucket(ed){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name : ${ed}`);this.policy.conditions.push(["eq","$bucket",ed]),this.formData.bucket=ed}setContentType(ed){if(!ed)throw new Error("content-type cannot be null");this.policy.conditions.push(["eq","$Content-Type",ed]),this.formData["Content-Type"]=ed}setContentTypeStartsWith(ed){if(!ed)throw new Error("content-type cannot be null");this.policy.conditions.push(["starts-with","$Content-Type",ed]),this.formData["Content-Type"]=ed}setContentDisposition(ed){if(!ed)throw new Error("content-disposition cannot be null");this.policy.conditions.push(["eq","$Content-Disposition",ed]),this.formData["Content-Disposition"]=ed}setContentLengthRange(ed,ud){if(ed>ud)throw new Error("min cannot be more than max");if(ed<0)throw new Error("min should be > 0");if(ud<0)throw new Error("max should be > 0");this.policy.conditions.push(["content-length-range",ed,ud])}setUserMetaData(ed){if(!isObject(ed))throw new TypeError('metadata should be of type "object"');Object.entries(ed).forEach(([ud,dd])=>{const hd=`x-amz-meta-${ud}`;this.policy.conditions.push(["eq",`$${hd}`,dd]),this.formData[hd]=dd.toString()})}}var jsonStream={exports:{}},util=util$6,TransformStream$1=streamBrowserify.Transform;jsonStream.exports=function(Ra){return new JSONStream(Ra)};var JSONStream=jsonStream.exports.JSONStream=function(Ra){Ra=Ra||{},TransformStream$1.call(this,Ra),this._writableState.objectMode=!1,this._readableState.objectMode=!0,this._async=Ra.async||!1};util.inherits(JSONStream,TransformStream$1);JSONStream.prototype._transform=function(Ra,ed,ud){Buffer$4.isBuffer(Ra)||(Ra=new Buffer$4(Ra)),this._buffer&&(Ra=Buffer$4.concat([this._buffer,Ra]));for(var dd=0,hd=0;++dd<=Ra.length;)if(Ra[dd]===10||dd===Ra.length){var md;try{md=JSON.parse(Ra.slice(hd,dd))}catch{}md&&(this.push(md),md=null),Ra[dd]===10&&(hd=++dd)}return this._buffer=Ra.slice(hd),this._async?void setImmediate(ud):void ud()};var jsonStreamExports=jsonStream.exports;const JSONParser=getDefaultExportFromCjs(jsonStreamExports);var through2$1={exports:{}};const{Transform}=readableBrowserExports;function inherits(Ra,ed){Ra.super_=ed,Ra.prototype=Object.create(ed.prototype,{constructor:{value:Ra,enumerable:!1,writable:!0,configurable:!0}})}function through2(Ra){return(ed,ud,dd)=>(typeof ed=="function"&&(dd=ud,ud=ed,ed={}),typeof ud!="function"&&(ud=(hd,md,gd)=>gd(null,hd)),typeof dd!="function"&&(dd=null),Ra(ed,ud,dd))}const make=through2((Ra,ed,ud)=>{const dd=new Transform(Ra);return dd._transform=ed,ud&&(dd._flush=ud),dd}),ctor=through2((Ra,ed,ud)=>{function dd(hd){if(!(this instanceof dd))return new dd(hd);this.options=Object.assign({},Ra,hd),Transform.call(this,this.options),this._transform=ed,ud&&(this._flush=ud)}return inherits(dd,Transform),dd}),obj=through2(function(Ra,ed,ud){const dd=new Transform(Object.assign({objectMode:!0,highWaterMark:16},Ra));return dd._transform=ed,ud&&(dd._flush=ud),dd});through2$1.exports=make;through2$1.exports.ctor=ctor;through2$1.exports.obj=obj;var through2Exports=through2$1.exports;const Through2=getDefaultExportFromCjs(through2Exports);var Buffer=buffer.Buffer,CRC_TABLE=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];typeof Int32Array<"u"&&(CRC_TABLE=new Int32Array(CRC_TABLE));function ensureBuffer(Ra){if(Buffer.isBuffer(Ra))return Ra;var ed=typeof Buffer.alloc=="function"&&typeof Buffer.from=="function";if(typeof Ra=="number")return ed?Buffer.alloc(Ra):new Buffer(Ra);if(typeof Ra=="string")return ed?Buffer.from(Ra):new Buffer(Ra);throw new Error("input must be buffer, number, or string, received "+typeof Ra)}function bufferizeInt(Ra){var ed=ensureBuffer(4);return ed.writeInt32BE(Ra,0),ed}function _crc32(Ra,ed){Ra=ensureBuffer(Ra),Buffer.isBuffer(ed)&&(ed=ed.readUInt32BE(0));for(var ud=~~ed^-1,dd=0;dd>>8;return ud^-1}function crc32(){return bufferizeInt(_crc32.apply(null,arguments))}crc32.signed=function(){return _crc32.apply(null,arguments)};crc32.unsigned=function(){return _crc32.apply(null,arguments)>>>0};var bufferCrc32=crc32;const crc32$1=getDefaultExportFromCjs(bufferCrc32),fxpWithoutNumParser=new fxp$2.XMLParser({numberParseOptions:{skipLike:/./}});function parseCopyObject(Ra){var ed={etag:"",lastModified:""},ud=parseXml(Ra);if(!ud.CopyObjectResult)throw new InvalidXMLError('Missing tag: "CopyObjectResult"');return ud=ud.CopyObjectResult,ud.ETag&&(ed.etag=ud.ETag.replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"")),ud.LastModified&&(ed.lastModified=new Date(ud.LastModified)),ed}function parseListMultipart(Ra){var ed={uploads:[],prefixes:[],isTruncated:!1},ud=parseXml(Ra);if(!ud.ListMultipartUploadsResult)throw new InvalidXMLError('Missing tag: "ListMultipartUploadsResult"');return ud=ud.ListMultipartUploadsResult,ud.IsTruncated&&(ed.isTruncated=ud.IsTruncated),ud.NextKeyMarker&&(ed.nextKeyMarker=ud.NextKeyMarker),ud.NextUploadIdMarker&&(ed.nextUploadIdMarker=ud.nextUploadIdMarker||""),ud.CommonPrefixes&&toArray(ud.CommonPrefixes).forEach(dd=>{ed.prefixes.push({prefix:sanitizeObjectKey(toArray(dd.Prefix)[0])})}),ud.Upload&&toArray(ud.Upload).forEach(dd=>{var hd=dd.Key,md=dd.UploadId,gd={id:dd.Initiator.ID,displayName:dd.Initiator.DisplayName},yd={id:dd.Owner.ID,displayName:dd.Owner.DisplayName},vd=dd.StorageClass,Cd=new Date(dd.Initiated);ed.uploads.push({key:hd,uploadId:md,initiator:gd,owner:yd,storageClass:vd,initiated:Cd})}),ed}function parseBucketNotification(Ra){var ed={TopicConfiguration:[],QueueConfiguration:[],CloudFunctionConfiguration:[]},ud=function(md){var gd=[];return md&&toArray(md).forEach(yd=>{gd.push(yd)}),gd},dd=function(md){var gd=[];return md&&(md=toArray(md),md[0].S3Key&&(md[0].S3Key=toArray(md[0].S3Key),md[0].S3Key[0].FilterRule&&toArray(md[0].S3Key[0].FilterRule).forEach(yd=>{var vd=toArray(yd.Name)[0],Cd=toArray(yd.Value)[0];gd.push({Name:vd,Value:Cd})}))),gd},hd=parseXml(Ra);return hd=hd.NotificationConfiguration,hd.TopicConfiguration&&toArray(hd.TopicConfiguration).forEach(md=>{var gd=toArray(md.Id)[0],yd=toArray(md.Topic)[0],vd=ud(md.Event),Cd=dd(md.Filter);ed.TopicConfiguration.push({Id:gd,Topic:yd,Event:vd,Filter:Cd})}),hd.QueueConfiguration&&toArray(hd.QueueConfiguration).forEach(md=>{var gd=toArray(md.Id)[0],yd=toArray(md.Queue)[0],vd=ud(md.Event),Cd=dd(md.Filter);ed.QueueConfiguration.push({Id:gd,Queue:yd,Event:vd,Filter:Cd})}),hd.CloudFunctionConfiguration&&toArray(hd.CloudFunctionConfiguration).forEach(md=>{var gd=toArray(md.Id)[0],yd=toArray(md.CloudFunction)[0],vd=ud(md.Event),Cd=dd(md.Filter);ed.CloudFunctionConfiguration.push({Id:gd,CloudFunction:yd,Event:vd,Filter:Cd})}),ed}function parseCompleteMultipart(Ra){var ed=parseXml(Ra).CompleteMultipartUploadResult;if(ed.Location){var ud=toArray(ed.Location)[0],dd=toArray(ed.Bucket)[0],hd=ed.Key,md=ed.ETag.replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"").replace(/^"/g,"").replace(/"$/g,"");return{location:ud,bucket:dd,key:hd,etag:md}}if(ed.Code&&ed.Message){var gd=toArray(ed.Code)[0],yd=toArray(ed.Message)[0];return{errCode:gd,errMessage:yd}}}const formatObjInfo=(Ra,ed={})=>{let{Key:ud,LastModified:dd,ETag:hd,Size:md,VersionId:gd,IsLatest:yd}=Ra;isObject(ed)||(ed={});const vd=sanitizeObjectKey(toArray(ud)[0]),Cd=new Date(toArray(dd)[0]),wd=sanitizeETag(toArray(hd)[0]),Nd=sanitizeSize(md);return{name:vd,lastModified:Cd,etag:wd,size:Nd,versionId:gd,isLatest:yd,isDeleteMarker:ed.IsDeleteMarker?ed.IsDeleteMarker:!1}};function parseListObjects(Ra){var ed={objects:[],isTruncated:!1};let ud=!1,dd,hd;const md=fxpWithoutNumParser.parse(Ra),gd=Cd=>{Cd&&toArray(Cd).forEach(wd=>{ed.objects.push({prefix:sanitizeObjectKey(toArray(wd.Prefix)[0]),size:0})})},yd=md.ListBucketResult,vd=md.ListVersionsResult;return yd&&(yd.IsTruncated&&(ud=yd.IsTruncated),yd.Contents&&toArray(yd.Contents).forEach(Cd=>{const wd=sanitizeObjectKey(toArray(Cd.Key)[0]),Nd=new Date(toArray(Cd.LastModified)[0]),Ld=sanitizeETag(toArray(Cd.ETag)[0]),Ud=sanitizeSize(Cd.Size);ed.objects.push({name:wd,lastModified:Nd,etag:Ld,size:Ud})}),yd.NextMarker&&(dd=yd.NextMarker),gd(yd.CommonPrefixes)),vd&&(vd.IsTruncated&&(ud=vd.IsTruncated),vd.Version&&toArray(vd.Version).forEach(Cd=>{ed.objects.push(formatObjInfo(Cd))}),vd.DeleteMarker&&toArray(vd.DeleteMarker).forEach(Cd=>{ed.objects.push(formatObjInfo(Cd,{IsDeleteMarker:!0}))}),vd.NextKeyMarker&&(hd=vd.NextKeyMarker),vd.NextVersionIdMarker&&(ed.versionIdMarker=vd.NextVersionIdMarker),gd(vd.CommonPrefixes)),ed.isTruncated=ud,ud&&(ed.nextMarker=hd||dd),ed}function parseListObjectsV2(Ra){var ed={objects:[],isTruncated:!1},ud=parseXml(Ra);if(!ud.ListBucketResult)throw new InvalidXMLError('Missing tag: "ListBucketResult"');return ud=ud.ListBucketResult,ud.IsTruncated&&(ed.isTruncated=ud.IsTruncated),ud.NextContinuationToken&&(ed.nextContinuationToken=ud.NextContinuationToken),ud.Contents&&toArray(ud.Contents).forEach(dd=>{var hd=sanitizeObjectKey(toArray(dd.Key)[0]),md=new Date(dd.LastModified),gd=sanitizeETag(dd.ETag),yd=dd.Size;ed.objects.push({name:hd,lastModified:md,etag:gd,size:yd})}),ud.CommonPrefixes&&toArray(ud.CommonPrefixes).forEach(dd=>{ed.objects.push({prefix:sanitizeObjectKey(toArray(dd.Prefix)[0]),size:0})}),ed}function parseBucketVersioningConfig(Ra){var ed=parseXml(Ra);return ed.VersioningConfiguration}function parseTagging(Ra){const ed=parseXml(Ra);let ud=[];if(ed.Tagging&&ed.Tagging.TagSet&&ed.Tagging.TagSet.Tag){const dd=ed.Tagging.TagSet.Tag;isObject(dd)?ud.push(dd):ud=dd}return ud}function parseLifecycleConfig(Ra){return parseXml(Ra).LifecycleConfiguration}function parseObjectLockConfig(Ra){const ed=parseXml(Ra);let ud={};if(ed.ObjectLockConfiguration){ud={objectLockEnabled:ed.ObjectLockConfiguration.ObjectLockEnabled};let dd;if(ed.ObjectLockConfiguration&&ed.ObjectLockConfiguration.Rule&&ed.ObjectLockConfiguration.Rule.DefaultRetention&&(dd=ed.ObjectLockConfiguration.Rule.DefaultRetention||{},ud.mode=dd.Mode),dd){const hd=dd.Years;hd?(ud.validity=hd,ud.unit=RETENTION_VALIDITY_UNITS.YEARS):(ud.validity=dd.Days,ud.unit=RETENTION_VALIDITY_UNITS.DAYS)}return ud}}function parseObjectRetentionConfig(Ra){const ud=parseXml(Ra).Retention;return{mode:ud.Mode,retainUntilDate:ud.RetainUntilDate}}function parseBucketEncryptionConfig(Ra){return parseXml(Ra)}function parseObjectLegalHoldConfig(Ra){return parseXml(Ra).LegalHold}function uploadPartParser(Ra){return parseXml(Ra).CopyPartResult}function removeObjectsParser(Ra){const ed=parseXml(Ra);return ed.DeleteResult&&ed.DeleteResult.Error?toArray(ed.DeleteResult.Error):[]}function parseSelectObjectContentResponse(Ra){function ed(md){const gd=Buffer$4.from(md.read(1)).readUInt8(),vd=(Buffer$4.from(md.read(gd)).toString()||"").split(":");return vd.length>=1?vd[1]:""}function ud(md){const gd=Buffer$4.from(md.read(2)).readUInt16BE();return Buffer$4.from(md.read(gd)).toString()}const dd=new SelectResults({}),hd=readableStream(Ra);for(;hd._readableState.length;){let md;const gd=Buffer$4.from(hd.read(4));md=crc32$1(gd);const yd=Buffer$4.from(hd.read(4));md=crc32$1(yd,md);const vd=md.readInt32BE(),Cd=Buffer$4.from(hd.read(4));md=crc32$1(Cd,md);const wd=gd.readInt32BE(),Nd=yd.readInt32BE(),Ld=Cd.readInt32BE();if(Ld!==vd)throw new Error(`Header Checksum Mismatch, Prelude CRC of ${Ld} does not equal expected CRC of ${vd}`);const Ud={};if(Nd>0){const zd=Buffer$4.from(hd.read(Nd));md=crc32$1(zd,md);const qd=readableStream(zd);for(;qd._readableState.length;){let Wd=ed(qd);qd.read(1),Ud[Wd]=ud(qd)}}let jd;const Gd=wd-Nd-16;if(Gd>0){const zd=Buffer$4.from(hd.read(Gd));md=crc32$1(zd,md);const qd=Buffer$4.from(hd.read(4)).readInt32BE(),Wd=md.readInt32BE();if(qd!==Wd)throw new Error(`Message Checksum Mismatch, Message CRC of ${qd} does not equal expected CRC of ${Wd}`);jd=readableStream(zd)}const Yd=Ud["message-type"];switch(Yd){case"error":{const zd=Ud["error-code"]+':"'+Ud["error-message"]+'"';throw new Error(zd)}case"event":{const zd=Ud["content-type"];switch(Ud["event-type"]){case"End":return dd.setResponse(Ra),dd;case"Records":{const Wd=jd.read(Gd);dd.setRecords(Wd);break}case"Progress":switch(zd){case"text/xml":{const Wd=jd.read(Gd);dd.setProgress(Wd.toString());break}default:{const Wd=`Unexpected content-type ${zd} sent for event-type Progress`;throw new Error(Wd)}}break;case"Stats":switch(zd){case"text/xml":{const Wd=jd.read(Gd);dd.setStats(Wd.toString());break}default:{const Wd=`Unexpected content-type ${zd} sent for event-type Stats`;throw new Error(Wd)}}break;default:{const Wd=`Un implemented event detected ${Yd}.`;console.warn(Wd)}}}}}}function getConcater(Ra,ed){var ud=!1,dd=[];if(Ra&&!isFunction(Ra))throw new TypeError('parser should be of type "function"');return Ra&&(ud=!0),Through2({objectMode:ud},function(hd,md,gd){dd.push(hd),gd()},function(hd){dd.length&&(Ra?this.push(Ra(Buffer$4.concat(dd).toString())):this.push(Buffer$4.concat(dd))),hd()})}function getCopyObjectTransformer(){return getConcater(parseCopyObject)}function getListMultipartTransformer(){return getConcater(parseListMultipart)}function getListObjectsTransformer(){return getConcater(parseListObjects)}function getListObjectsV2Transformer(){return getConcater(parseListObjectsV2)}function getCompleteMultipartTransformer(){return getConcater(parseCompleteMultipart)}function getBucketNotificationTransformer(){return getConcater(parseBucketNotification)}function getNotificationTransformer(){return new JSONParser}function bucketVersioningTransformer(){return getConcater(parseBucketVersioningConfig)}function getTagsTransformer(){return getConcater(parseTagging)}function lifecycleTransformer(){return getConcater(parseLifecycleConfig)}function objectLockTransformer(){return getConcater(parseObjectLockConfig)}function objectRetentionTransformer(){return getConcater(parseObjectRetentionConfig)}function bucketEncryptionTransformer(){return getConcater(parseBucketEncryptionConfig)}function objectLegalHoldTransformer(){return getConcater(parseObjectLegalHoldConfig)}function uploadPartTransformer(){return getConcater(uploadPartParser)}function selectObjectContentTransformer(){return getConcater()}function removeObjectsTransformer(){return getConcater(removeObjectsParser)}var define_process_default$1={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_177c26d6-fb22-449a-87e2-db9959d53fe4",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_177c26d6-fb22-449a-87e2-db9959d53fe4",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:6575",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13671567639",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8aa748ac-6dd4-4073-9410-acf109d056c5",INVOCATION_ID:"97e2fcc9618d40ada1c1d6a5738ecc02",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"504",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub-Actions-1000003902",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_177c26d6-fb22-449a-87e2-db9959d53fe4",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_177c26d6-fb22-449a-87e2-db9959d53fe4",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_177c26d6-fb22-449a-87e2-db9959d53fe4",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2146,ppid:2145,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};class NotificationConfig{add(ed){let ud="";ed instanceof TopicConfig&&(ud="TopicConfiguration"),ed instanceof QueueConfig&&(ud="QueueConfiguration"),ed instanceof CloudFunctionConfig&&(ud="CloudFunctionConfiguration"),this[ud]||(this[ud]=[]),this[ud].push(ed)}}class TargetConfig{setId(ed){this.Id=ed}addEvent(ed){this.Event||(this.Event=[]),this.Event.push(ed)}addFilterSuffix(ed){this.Filter||(this.Filter={S3Key:{FilterRule:[]}}),this.Filter.S3Key.FilterRule.push({Name:"suffix",Value:ed})}addFilterPrefix(ed){this.Filter||(this.Filter={S3Key:{FilterRule:[]}}),this.Filter.S3Key.FilterRule.push({Name:"prefix",Value:ed})}}class TopicConfig extends TargetConfig{constructor(ed){super(),this.Topic=ed}}class QueueConfig extends TargetConfig{constructor(ed){super(),this.Queue=ed}}class CloudFunctionConfig extends TargetConfig{constructor(ed){super(),this.CloudFunction=ed}}class NotificationPoller extends eventsExports.EventEmitter{constructor(ed,ud,dd,hd,md){super(),this.client=ed,this.bucketName=ud,this.prefix=dd,this.suffix=hd,this.events=md,this.ending=!1}start(){this.ending=!1,define_process_default$1.nextTick(()=>{this.checkForChanges()})}stop(){this.ending=!0}checkForChanges(){if(this.ending)return;let ed="GET";var ud=[];if(this.prefix){var dd=uriEscape(this.prefix);ud.push(`prefix=${dd}`)}if(this.suffix){var hd=uriEscape(this.suffix);ud.push(`suffix=${hd}`)}this.events&&this.events.forEach(yd=>ud.push("events="+uriEscape(yd))),ud.sort();var md="";ud.length>0&&(md=`${ud.join("&")}`);const gd=this.client.region||DEFAULT_REGION;this.client.makeRequest({method:ed,bucketName:this.bucketName,query:md},"",[200],gd,!0,(yd,vd)=>{if(yd)return this.emit("error",yd);let Cd=getNotificationTransformer();pipesetup(vd,Cd).on("data",wd=>{let Nd=wd.Records;Nd||(Nd=[]),Nd.forEach(Ld=>{this.emit("notification",Ld)}),this.ending&&vd.destroy()}).on("error",wd=>this.emit("error",wd)).on("end",()=>{define_process_default$1.nextTick(()=>{this.checkForChanges()})})})}}var define_process_default={version:"v20.18.3",versions:{node:"20.18.3",acorn:"8.14.0",ada:"2.9.2",ares:"1.34.4",base64:"0.5.2",brotli:"1.1.0",cjs_module_lexer:"1.4.1",cldr:"45.0",icu:"75.1",llhttp:"8.1.2",modules:"115",napi:"9",nghttp2:"1.61.0",nghttp3:"0.7.0",ngtcp2:"1.1.0",openssl:"3.0.15+quic",simdutf:"5.6.4",tz:"2024b",undici:"6.21.1",unicode:"15.1",uv:"1.46.0",uvwasi:"0.0.21",v8:"11.3.244.8-node.25",zlib:"1.3.0.1-motley-82a5fec"},arch:"x64",platform:"linux",release:{name:"node",lts:"Iron",sourceUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3.tar.gz",headersUrl:"https://nodejs.org/download/release/v20.18.3/node-v20.18.3-headers.tar.gz"},moduleLoadList:["Internal Binding builtins","Internal Binding module_wrap","Internal Binding errors","NativeModule internal/assert","Internal Binding util","NativeModule internal/errors","Internal Binding config","Internal Binding timers","Internal Binding async_wrap","Internal Binding task_queue","Internal Binding symbols","NativeModule internal/async_hooks","Internal Binding constants","Internal Binding types","Internal Binding options","NativeModule internal/options","Internal Binding string_decoder","NativeModule internal/util","NativeModule internal/util/types","NativeModule internal/validators","NativeModule internal/linkedlist","NativeModule internal/priority_queue","Internal Binding icu","NativeModule internal/util/inspect","NativeModule internal/util/debuglog","NativeModule internal/timers","NativeModule internal/events/abort_listener","NativeModule events","Internal Binding buffer","NativeModule internal/buffer","NativeModule buffer","Internal Binding messaging","NativeModule internal/worker/js_transferable","NativeModule internal/querystring","NativeModule internal/constants","NativeModule path","NativeModule querystring","Internal Binding url","NativeModule internal/url","NativeModule internal/fs/utils","Internal Binding process_methods","NativeModule internal/process/per_thread","Internal Binding credentials","NativeModule internal/process/promises","NativeModule internal/fixed_queue","NativeModule async_hooks","NativeModule internal/process/task_queues","NativeModule timers","Internal Binding trace_events","Internal Binding contextify","NativeModule internal/vm","NativeModule internal/process/execution","NativeModule internal/process/warning","NativeModule internal/source_map/source_map_cache","Internal Binding fs","Internal Binding blob","Internal Binding encoding_binding","NativeModule internal/encoding","NativeModule internal/streams/utils","NativeModule util","NativeModule internal/webstreams/util","NativeModule internal/webstreams/queuingstrategies","NativeModule internal/blob","Internal Binding permission","NativeModule internal/process/permission","NativeModule fs","NativeModule internal/modules/helpers","NativeModule internal/console/constructor","NativeModule internal/console/global","NativeModule internal/util/inspector","Internal Binding inspector","NativeModule internal/webidl","Internal Binding performance","NativeModule internal/perf/utils","NativeModule internal/event_target","Internal Binding wasm_web_api","Internal Binding mksnapshot","NativeModule internal/v8/startup_snapshot","NativeModule internal/process/signal","NativeModule url","NativeModule internal/modules/package_json_reader","NativeModule internal/modules/cjs/loader","NativeModule internal/process/pre_execution","NativeModule internal/modules/esm/utils","NativeModule internal/inspector_async_hook","Internal Binding worker","NativeModule internal/modules/run_main","NativeModule internal/net","NativeModule internal/dns/utils","NativeModule internal/modules/esm/assert","NativeModule internal/modules/esm/loader","NativeModule internal/modules/esm/module_map","NativeModule internal/modules/esm/translators","NativeModule internal/modules/esm/package_config","NativeModule internal/modules/esm/formats","NativeModule internal/modules/esm/get_format","NativeModule internal/modules/esm/resolve","NativeModule internal/modules/esm/module_job","NativeModule internal/modules/esm/load","Internal Binding fs_dir","NativeModule internal/fs/dir","NativeModule string_decoder","Internal Binding fs_event_wrap","Internal Binding uv","NativeModule internal/fs/watchers","NativeModule internal/fs/recursive_watch","NativeModule internal/readline/utils","NativeModule internal/readline/callbacks","NativeModule internal/readline/interface","NativeModule internal/fs/promises","NativeModule internal/perf/performance_entry","NativeModule internal/perf/observe","NativeModule internal/perf/resource_timing","NativeModule internal/perf/nodetiming","NativeModule internal/perf/usertiming","NativeModule internal/perf/event_loop_utilization","NativeModule internal/histogram","NativeModule internal/perf/timerify","NativeModule internal/perf/performance","NativeModule internal/perf/event_loop_delay","NativeModule perf_hooks","NativeModule internal/modules/esm/initialize_import_meta","NativeModule internal/streams/destroy","NativeModule internal/abort_controller","NativeModule internal/streams/end-of-stream","NativeModule internal/streams/legacy","NativeModule internal/streams/add-abort-signal","NativeModule internal/streams/state","NativeModule internal/streams/from","NativeModule internal/streams/readable","NativeModule internal/streams/writable","NativeModule internal/streams/duplex","NativeModule internal/streams/pipeline","NativeModule internal/streams/compose","NativeModule internal/streams/operators","NativeModule stream/promises","NativeModule internal/streams/transform","NativeModule internal/streams/passthrough","NativeModule internal/streams/duplexpair","NativeModule stream","NativeModule internal/fs/streams","NativeModule fs/promises","NativeModule internal/util/parse_args/utils","NativeModule internal/util/parse_args/parse_args","NativeModule internal/mime","NativeModule internal/source_map/source_map","NativeModule module","Internal Binding crypto","NativeModule internal/crypto/random","NativeModule internal/crypto/hashnames","NativeModule internal/crypto/util","NativeModule internal/crypto/pbkdf2","NativeModule internal/crypto/scrypt","NativeModule internal/crypto/keys","NativeModule internal/crypto/hkdf","NativeModule internal/crypto/keygen","NativeModule internal/crypto/diffiehellman","NativeModule internal/streams/lazy_transform","NativeModule internal/crypto/cipher","NativeModule internal/crypto/sig","NativeModule internal/crypto/hash","NativeModule internal/crypto/x509","NativeModule internal/crypto/certificate","NativeModule crypto","NativeModule internal/crypto/webcrypto","Internal Binding stream_wrap","Internal Binding tcp_wrap","Internal Binding pipe_wrap","NativeModule internal/stream_base_commons","NativeModule diagnostics_channel","NativeModule net","Internal Binding tty_wrap","NativeModule internal/tty","NativeModule tty","NativeModule internal/deps/cjs-module-lexer/dist/lexer","Internal Binding udp_wrap","NativeModule internal/dgram","NativeModule dgram","Internal Binding process_wrap","NativeModule internal/socket_list","Internal Binding spawn_sync","NativeModule internal/child_process","NativeModule child_process","NativeModule _http_agent","Internal Binding http_parser","NativeModule internal/freelist","NativeModule _http_incoming","NativeModule _http_common","NativeModule internal/http","NativeModule _http_outgoing","NativeModule _http_client","NativeModule _http_server","NativeModule http","Internal Binding cares_wrap","NativeModule internal/tls/secure-context","NativeModule _tls_common","Internal Binding js_stream","NativeModule internal/js_stream_socket","Internal Binding tls_wrap","NativeModule _tls_wrap","NativeModule internal/tls/secure-pair","NativeModule tls","NativeModule https","Internal Binding block_list","NativeModule internal/socketaddress","NativeModule internal/blocklist","Internal Binding os","NativeModule os","NativeModule internal/dns/callback_resolver","NativeModule dns","NativeModule internal/dns/promises","NativeModule internal/util/colors","NativeModule internal/assert/assertion_error","NativeModule internal/assert/utils","NativeModule internal/assert/calltracker","NativeModule assert","Internal Binding serdes","Internal Binding profiler","Internal Binding heap_utils","Internal Binding internal_only_v8","NativeModule internal/heap_utils","NativeModule internal/promise_hooks","Internal Binding v8","NativeModule v8","NativeModule internal/worker/io","NativeModule internal/error_serdes","NativeModule internal/worker","NativeModule worker_threads","NativeModule internal/file","NativeModule internal/readline/emitKeypressEvents","NativeModule internal/readline/promises","NativeModule readline/promises","NativeModule readline","Internal Binding zlib","NativeModule zlib","NativeModule process","Internal Binding report","NativeModule internal/process/report","NativeModule constants","NativeModule internal/crypto/webidl"],_events:{newListener:[null,null],removeListener:[null,null]},_eventsCount:3,domain:null,_exiting:!1,config:{target_defaults:{cflags:[],default_configuration:"Release",defines:["NODE_OPENSSL_CONF_NAME=nodejs_conf","NODE_OPENSSL_HAS_QUIC","ICU_NO_USER_DATA_OVERRIDE"],include_dirs:[],libraries:[]},variables:{asan:0,clang:0,coverage:!1,dcheck_always_on:0,debug_nghttp2:!1,debug_node:!1,enable_lto:!1,enable_pgo_generate:!1,enable_pgo_use:!1,error_on_warn:!1,force_dynamic_crt:0,gas_version:"2.35",host_arch:"x64",icu_data_in:"../../deps/icu-tmp/icudt75l.dat",icu_endianness:"l",icu_gyp_path:"tools/icu/icu-generic.gyp",icu_path:"deps/icu-small",icu_small:!1,icu_ver_major:"75",is_debug:0,libdir:"lib",llvm_version:"0.0",napi_build_version:"9",node_builtin_shareable_builtins:["deps/cjs-module-lexer/lexer.js","deps/cjs-module-lexer/dist/lexer.js","deps/undici/undici.js"],node_byteorder:"little",node_debug_lib:!1,node_enable_d8:!1,node_enable_v8_vtunejit:!1,node_fipsinstall:!1,node_install_corepack:!0,node_install_npm:!0,node_library_files:["lib/_http_agent.js","lib/_http_client.js","lib/_http_common.js","lib/_http_incoming.js","lib/_http_outgoing.js","lib/_http_server.js","lib/_stream_duplex.js","lib/_stream_passthrough.js","lib/_stream_readable.js","lib/_stream_transform.js","lib/_stream_wrap.js","lib/_stream_writable.js","lib/_tls_common.js","lib/_tls_wrap.js","lib/assert.js","lib/assert/strict.js","lib/async_hooks.js","lib/buffer.js","lib/child_process.js","lib/cluster.js","lib/console.js","lib/constants.js","lib/crypto.js","lib/dgram.js","lib/diagnostics_channel.js","lib/dns.js","lib/dns/promises.js","lib/domain.js","lib/events.js","lib/fs.js","lib/fs/promises.js","lib/http.js","lib/http2.js","lib/https.js","lib/inspector.js","lib/inspector/promises.js","lib/internal/abort_controller.js","lib/internal/assert.js","lib/internal/assert/assertion_error.js","lib/internal/assert/calltracker.js","lib/internal/assert/utils.js","lib/internal/async_hooks.js","lib/internal/blob.js","lib/internal/blocklist.js","lib/internal/bootstrap/node.js","lib/internal/bootstrap/realm.js","lib/internal/bootstrap/shadow_realm.js","lib/internal/bootstrap/switches/does_not_own_process_state.js","lib/internal/bootstrap/switches/does_own_process_state.js","lib/internal/bootstrap/switches/is_main_thread.js","lib/internal/bootstrap/switches/is_not_main_thread.js","lib/internal/bootstrap/web/exposed-wildcard.js","lib/internal/bootstrap/web/exposed-window-or-worker.js","lib/internal/buffer.js","lib/internal/child_process.js","lib/internal/child_process/serialization.js","lib/internal/cli_table.js","lib/internal/cluster/child.js","lib/internal/cluster/primary.js","lib/internal/cluster/round_robin_handle.js","lib/internal/cluster/shared_handle.js","lib/internal/cluster/utils.js","lib/internal/cluster/worker.js","lib/internal/console/constructor.js","lib/internal/console/global.js","lib/internal/constants.js","lib/internal/crypto/aes.js","lib/internal/crypto/certificate.js","lib/internal/crypto/cfrg.js","lib/internal/crypto/cipher.js","lib/internal/crypto/diffiehellman.js","lib/internal/crypto/ec.js","lib/internal/crypto/hash.js","lib/internal/crypto/hashnames.js","lib/internal/crypto/hkdf.js","lib/internal/crypto/keygen.js","lib/internal/crypto/keys.js","lib/internal/crypto/mac.js","lib/internal/crypto/pbkdf2.js","lib/internal/crypto/random.js","lib/internal/crypto/rsa.js","lib/internal/crypto/scrypt.js","lib/internal/crypto/sig.js","lib/internal/crypto/util.js","lib/internal/crypto/webcrypto.js","lib/internal/crypto/webidl.js","lib/internal/crypto/x509.js","lib/internal/debugger/inspect.js","lib/internal/debugger/inspect_client.js","lib/internal/debugger/inspect_repl.js","lib/internal/dgram.js","lib/internal/dns/callback_resolver.js","lib/internal/dns/promises.js","lib/internal/dns/utils.js","lib/internal/encoding.js","lib/internal/error_serdes.js","lib/internal/errors.js","lib/internal/event_target.js","lib/internal/events/abort_listener.js","lib/internal/events/symbols.js","lib/internal/file.js","lib/internal/fixed_queue.js","lib/internal/freelist.js","lib/internal/freeze_intrinsics.js","lib/internal/fs/cp/cp-sync.js","lib/internal/fs/cp/cp.js","lib/internal/fs/dir.js","lib/internal/fs/promises.js","lib/internal/fs/read/context.js","lib/internal/fs/recursive_watch.js","lib/internal/fs/rimraf.js","lib/internal/fs/streams.js","lib/internal/fs/sync_write_stream.js","lib/internal/fs/utils.js","lib/internal/fs/watchers.js","lib/internal/heap_utils.js","lib/internal/histogram.js","lib/internal/http.js","lib/internal/http2/compat.js","lib/internal/http2/core.js","lib/internal/http2/util.js","lib/internal/inspector_async_hook.js","lib/internal/inspector_network_tracking.js","lib/internal/js_stream_socket.js","lib/internal/legacy/processbinding.js","lib/internal/linkedlist.js","lib/internal/main/check_syntax.js","lib/internal/main/embedding.js","lib/internal/main/eval_stdin.js","lib/internal/main/eval_string.js","lib/internal/main/inspect.js","lib/internal/main/mksnapshot.js","lib/internal/main/print_help.js","lib/internal/main/prof_process.js","lib/internal/main/repl.js","lib/internal/main/run_main_module.js","lib/internal/main/test_runner.js","lib/internal/main/watch_mode.js","lib/internal/main/worker_thread.js","lib/internal/mime.js","lib/internal/modules/cjs/loader.js","lib/internal/modules/esm/assert.js","lib/internal/modules/esm/create_dynamic_module.js","lib/internal/modules/esm/fetch_module.js","lib/internal/modules/esm/formats.js","lib/internal/modules/esm/get_format.js","lib/internal/modules/esm/hooks.js","lib/internal/modules/esm/initialize_import_meta.js","lib/internal/modules/esm/load.js","lib/internal/modules/esm/loader.js","lib/internal/modules/esm/module_job.js","lib/internal/modules/esm/module_map.js","lib/internal/modules/esm/package_config.js","lib/internal/modules/esm/resolve.js","lib/internal/modules/esm/shared_constants.js","lib/internal/modules/esm/translators.js","lib/internal/modules/esm/utils.js","lib/internal/modules/esm/worker.js","lib/internal/modules/helpers.js","lib/internal/modules/package_json_reader.js","lib/internal/modules/run_main.js","lib/internal/navigator.js","lib/internal/net.js","lib/internal/options.js","lib/internal/per_context/domexception.js","lib/internal/per_context/messageport.js","lib/internal/per_context/primordials.js","lib/internal/perf/event_loop_delay.js","lib/internal/perf/event_loop_utilization.js","lib/internal/perf/nodetiming.js","lib/internal/perf/observe.js","lib/internal/perf/performance.js","lib/internal/perf/performance_entry.js","lib/internal/perf/resource_timing.js","lib/internal/perf/timerify.js","lib/internal/perf/usertiming.js","lib/internal/perf/utils.js","lib/internal/policy/manifest.js","lib/internal/policy/sri.js","lib/internal/priority_queue.js","lib/internal/process/execution.js","lib/internal/process/per_thread.js","lib/internal/process/permission.js","lib/internal/process/policy.js","lib/internal/process/pre_execution.js","lib/internal/process/promises.js","lib/internal/process/report.js","lib/internal/process/signal.js","lib/internal/process/task_queues.js","lib/internal/process/warning.js","lib/internal/process/worker_thread_only.js","lib/internal/promise_hooks.js","lib/internal/querystring.js","lib/internal/readline/callbacks.js","lib/internal/readline/emitKeypressEvents.js","lib/internal/readline/interface.js","lib/internal/readline/promises.js","lib/internal/readline/utils.js","lib/internal/repl.js","lib/internal/repl/await.js","lib/internal/repl/history.js","lib/internal/repl/utils.js","lib/internal/socket_list.js","lib/internal/socketaddress.js","lib/internal/source_map/prepare_stack_trace.js","lib/internal/source_map/source_map.js","lib/internal/source_map/source_map_cache.js","lib/internal/stream_base_commons.js","lib/internal/streams/add-abort-signal.js","lib/internal/streams/compose.js","lib/internal/streams/destroy.js","lib/internal/streams/duplex.js","lib/internal/streams/duplexify.js","lib/internal/streams/duplexpair.js","lib/internal/streams/end-of-stream.js","lib/internal/streams/from.js","lib/internal/streams/lazy_transform.js","lib/internal/streams/legacy.js","lib/internal/streams/operators.js","lib/internal/streams/passthrough.js","lib/internal/streams/pipeline.js","lib/internal/streams/readable.js","lib/internal/streams/state.js","lib/internal/streams/transform.js","lib/internal/streams/utils.js","lib/internal/streams/writable.js","lib/internal/test/binding.js","lib/internal/test/transfer.js","lib/internal/test_runner/coverage.js","lib/internal/test_runner/harness.js","lib/internal/test_runner/mock/loader.js","lib/internal/test_runner/mock/mock.js","lib/internal/test_runner/mock/mock_timers.js","lib/internal/test_runner/reporter/dot.js","lib/internal/test_runner/reporter/junit.js","lib/internal/test_runner/reporter/lcov.js","lib/internal/test_runner/reporter/spec.js","lib/internal/test_runner/reporter/tap.js","lib/internal/test_runner/reporter/utils.js","lib/internal/test_runner/reporter/v8-serializer.js","lib/internal/test_runner/runner.js","lib/internal/test_runner/test.js","lib/internal/test_runner/tests_stream.js","lib/internal/test_runner/utils.js","lib/internal/timers.js","lib/internal/tls/secure-context.js","lib/internal/tls/secure-pair.js","lib/internal/trace_events_async_hooks.js","lib/internal/tty.js","lib/internal/url.js","lib/internal/util.js","lib/internal/util/colors.js","lib/internal/util/comparisons.js","lib/internal/util/debuglog.js","lib/internal/util/embedding.js","lib/internal/util/inspect.js","lib/internal/util/inspector.js","lib/internal/util/iterable_weak_map.js","lib/internal/util/parse_args/parse_args.js","lib/internal/util/parse_args/utils.js","lib/internal/util/types.js","lib/internal/v8/startup_snapshot.js","lib/internal/v8_prof_polyfill.js","lib/internal/v8_prof_processor.js","lib/internal/validators.js","lib/internal/vm.js","lib/internal/vm/module.js","lib/internal/wasm_web_api.js","lib/internal/watch_mode/files_watcher.js","lib/internal/watchdog.js","lib/internal/webidl.js","lib/internal/webstreams/adapters.js","lib/internal/webstreams/compression.js","lib/internal/webstreams/encoding.js","lib/internal/webstreams/queuingstrategies.js","lib/internal/webstreams/readablestream.js","lib/internal/webstreams/transfer.js","lib/internal/webstreams/transformstream.js","lib/internal/webstreams/util.js","lib/internal/webstreams/writablestream.js","lib/internal/worker.js","lib/internal/worker/io.js","lib/internal/worker/js_transferable.js","lib/module.js","lib/net.js","lib/os.js","lib/path.js","lib/path/posix.js","lib/path/win32.js","lib/perf_hooks.js","lib/process.js","lib/punycode.js","lib/querystring.js","lib/readline.js","lib/readline/promises.js","lib/repl.js","lib/sea.js","lib/stream.js","lib/stream/consumers.js","lib/stream/promises.js","lib/stream/web.js","lib/string_decoder.js","lib/sys.js","lib/test.js","lib/test/reporters.js","lib/timers.js","lib/timers/promises.js","lib/tls.js","lib/trace_events.js","lib/tty.js","lib/url.js","lib/util.js","lib/util/types.js","lib/v8.js","lib/vm.js","lib/wasi.js","lib/worker_threads.js","lib/zlib.js"],node_module_version:115,node_no_browser_globals:!1,node_prefix:"/",node_release_urlbase:"https://nodejs.org/download/release/",node_section_ordering_info:"",node_shared:!1,node_shared_ada:!1,node_shared_brotli:!1,node_shared_cares:!1,node_shared_http_parser:!1,node_shared_libuv:!1,node_shared_nghttp2:!1,node_shared_nghttp3:!1,node_shared_ngtcp2:!1,node_shared_openssl:!1,node_shared_simdjson:!1,node_shared_simdutf:!1,node_shared_uvwasi:!1,node_shared_zlib:!1,node_tag:"",node_target_type:"executable",node_use_bundled_v8:!0,node_use_node_code_cache:!0,node_use_node_snapshot:!0,node_use_openssl:!0,node_use_v8_platform:!0,node_with_ltcg:!1,node_without_node_options:!1,node_write_snapshot_as_array_literals:!1,openssl_is_fips:!1,openssl_quic:!0,ossfuzz:!1,shlib_suffix:"so.115",single_executable_application:!0,target_arch:"x64",ubsan:0,use_prefix_to_find_headers:!1,v8_enable_31bit_smis_on_64bit_arch:0,v8_enable_extensible_ro_snapshot:0,v8_enable_gdbjit:0,v8_enable_hugepage:0,v8_enable_i18n_support:1,v8_enable_inspector:1,v8_enable_javascript_promise_hooks:1,v8_enable_lite_mode:0,v8_enable_maglev:0,v8_enable_object_print:1,v8_enable_pointer_compression:0,v8_enable_sandbox:0,v8_enable_shared_ro_heap:1,v8_enable_short_builtin_calls:1,v8_enable_v8_checks:0,v8_enable_webassembly:1,v8_no_strict_aliasing:1,v8_optimized_debug:1,v8_promise_internal_field_count:1,v8_random_seed:0,v8_trace_maps:0,v8_use_siphash:1,want_separate_host_toolset:0}},allowedNodeEnvironmentFlags:{},features:{inspector:!0,debug:!1,uv:!0,ipv6:!0,tls_alpn:!0,tls_sni:!0,tls_ocsp:!0,tls:!0,cached_builtins:!0},sourceMapsEnabled:!1,stdout:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:1,_isStdio:!0},stdin:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:2,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,fd:0},stderr:{connecting:!1,_hadError:!1,_parent:null,_host:null,_closeAfterHandlingError:!1,_events:{},_readableState:{highWaterMark:16384,buffer:[],bufferIndex:0,length:0,pipes:[],awaitDrainWriters:null,readable:!1},_writableState:{highWaterMark:16384,length:0,corked:0,writelen:0,bufferedIndex:0,pendingcb:0},allowHalfOpen:!1,_eventsCount:1,_sockname:null,_pendingData:null,_pendingEncoding:"",server:null,_server:null,_type:"pipe",fd:2,_isStdio:!0},env:{GITHUB_STATE:"/home/runner/work/_temp/_runner_file_commands/save_state_177c26d6-fb22-449a-87e2-db9959d53fe4",STATS_TRP:"true",DEPLOYMENT_BASEPATH:"/opt/runner",DOTNET_NOLOGO:"1",USER:"runner",npm_config_user_agent:"npm/10.8.2 node/v20.18.3 linux x64 workspaces/false ci/github-actions",CI:"true",RUNNER_ENVIRONMENT:"github-hosted",GITHUB_ENV:"/home/runner/work/_temp/_runner_file_commands/set_env_177c26d6-fb22-449a-87e2-db9959d53fe4",PIPX_HOME:"/opt/pipx",npm_node_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",JAVA_HOME_8_X64:"/usr/lib/jvm/temurin-8-jdk-amd64",SHLVL:"1",npm_config_noproxy:"",HOME:"/home/runner",RUNNER_TEMP:"/home/runner/work/_temp",GITHUB_EVENT_PATH:"/home/runner/work/_temp/_github_workflow/event.json",npm_package_json:"/home/runner/work/md/md/package.json",JAVA_HOME_11_X64:"/usr/lib/jvm/temurin-11-jdk-amd64",PIPX_BIN_DIR:"/opt/pipx_bin",GITHUB_REPOSITORY_OWNER:"doocs",GRADLE_HOME:"/usr/share/gradle-8.12.1",ANDROID_NDK_LATEST_HOME:"/usr/local/lib/android/sdk/ndk/28.0.13004108",JAVA_HOME_21_X64:"/usr/lib/jvm/temurin-21-jdk-amd64",STATS_RDCL:"true",GITHUB_RETENTION_DAYS:"90",GITHUB_REPOSITORY_OWNER_ID:"43716716",POWERSHELL_DISTRIBUTION_CHANNEL:"GitHub-Actions-ubuntu24",AZURE_EXTENSION_DIR:"/opt/az/azcliextensions",GITHUB_HEAD_REF:"",npm_config_userconfig:"/home/runner/.npmrc",npm_config_local_prefix:"/home/runner/work/md/md",SYSTEMD_EXEC_PID:"834",GITHUB_GRAPHQL_URL:"https://api.github.com/graphql",COLOR:"0",NVM_DIR:"/home/runner/.nvm",DOTNET_SKIP_FIRST_TIME_EXPERIENCE:"1",GOROOT_1_21_X64:"/opt/hostedtoolcache/go/1.21.13/x64",JAVA_HOME_17_X64:"/usr/lib/jvm/temurin-17-jdk-amd64",ImageVersion:"20250223.1.0",RUNNER_OS:"Linux",GITHUB_API_URL:"https://api.github.com",GOROOT_1_22_X64:"/opt/hostedtoolcache/go/1.22.12/x64",SWIFT_PATH:"/usr/share/swift/usr/bin",RUNNER_USER:"runner",STATS_V3PS:"true",CHROMEWEBDRIVER:"/usr/local/share/chromedriver-linux64",GOROOT_1_23_X64:"/opt/hostedtoolcache/go/1.23.6/x64",JOURNAL_STREAM:"8:6575",GITHUB_WORKFLOW:"Build and Deploy",_:"/opt/hostedtoolcache/node/20.18.3/x64/bin/npm",npm_config_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",npm_config_npm_version:"10.8.2",MEMORY_PRESSURE_WATCH:"/sys/fs/cgroup/system.slice/runner-provisioner.service/memory.pressure",ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE:"/opt/actionarchivecache",STATS_D:"true",GITHUB_RUN_ID:"13671567639",STATS_VMFE:"true",npm_config_cache:"/home/runner/.npm",GITHUB_REF_TYPE:"branch",BOOTSTRAP_HASKELL_NONINTERACTIVE:"1",GITHUB_WORKFLOW_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_BASE_REF:"",ImageOS:"ubuntu24",GITHUB_WORKFLOW_REF:"doocs/md/.github/workflows/build.yml@refs/heads/main",PERFLOG_LOCATION_SETTING:"RUNNER_PERFLOG",GITHUB_ACTION_REPOSITORY:"",npm_config_node_gyp:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/runner/work/md/md/node_modules/.bin:/home/runner/work/md/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/opt/hostedtoolcache/node/20.18.3/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",ANT_HOME:"/usr/share/ant",DOTNET_MULTILEVEL_LOOKUP:"0",RUNNER_TRACKING_ID:"github_8aa748ac-6dd4-4073-9410-acf109d056c5",INVOCATION_ID:"97e2fcc9618d40ada1c1d6a5738ecc02",RUNNER_TOOL_CACHE:"/opt/hostedtoolcache",NODE:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",npm_package_name:"md",GITHUB_ACTION:"__run_2",GITHUB_RUN_NUMBER:"504",GITHUB_TRIGGERING_ACTOR:"yanglbme",RUNNER_ARCH:"X64",XDG_RUNTIME_DIR:"/run/user/1001",AGENT_TOOLSDIRECTORY:"/opt/hostedtoolcache",LANG:"C.UTF-8",VCPKG_INSTALLATION_ROOT:"/usr/local/share/vcpkg",CONDA:"/usr/share/miniconda",RUNNER_NAME:"GitHub-Actions-1000003902",XDG_CONFIG_HOME:"/home/runner/.config",STATS_VMD:"true",GITHUB_REF_NAME:"main",GITHUB_REPOSITORY:"doocs/md",STATS_D_D:"true",npm_lifecycle_script:"vite build",STATS_UE:"true",ANDROID_NDK_ROOT:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_ACTION_REF:"",DEBIAN_FRONTEND:"noninteractive",GITHUB_REPOSITORY_ID:"218952803",GITHUB_ACTIONS:"true",STATS_PIP:"false",npm_package_version:"1.6.0",npm_lifecycle_event:"build:only",GITHUB_REF_PROTECTED:"true",GITHUB_WORKSPACE:"/home/runner/work/md/md",ACCEPT_EULA:"Y",GITHUB_JOB:"build-and-deploy",RUNNER_PERFLOG:"/home/runner/perflog",GITHUB_SHA:"8a504e864b8c79f562789bf546a44427610de527",GITHUB_RUN_ATTEMPT:"1",STATS_D_TC:"true",GITHUB_REF:"refs/heads/main",GITHUB_ACTOR:"yanglbme",ANDROID_SDK_ROOT:"/usr/local/lib/android/sdk",npm_config_globalconfig:"/opt/hostedtoolcache/node/20.18.3/x64/etc/npmrc",npm_config_init_module:"/home/runner/.npm-init.js",GITHUB_PATH:"/home/runner/work/_temp/_runner_file_commands/add_path_177c26d6-fb22-449a-87e2-db9959d53fe4",JAVA_HOME:"/usr/lib/jvm/temurin-17-jdk-amd64",PWD:"/home/runner/work/md/md",GITHUB_ACTOR_ID:"21008209",RUNNER_WORKSPACE:"/home/runner/work/md",npm_execpath:"/opt/hostedtoolcache/node/20.18.3/x64/lib/node_modules/npm/bin/npm-cli.js",HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS:"3650",GITHUB_EVENT_NAME:"push",HOMEBREW_NO_AUTO_UPDATE:"1",ANDROID_HOME:"/usr/local/lib/android/sdk",GITHUB_SERVER_URL:"https://github.com",GECKOWEBDRIVER:"/usr/local/share/gecko_driver",GHCUP_INSTALL_BASE_PREFIX:"/usr/local",GITHUB_OUTPUT:"/home/runner/work/_temp/_runner_file_commands/set_output_177c26d6-fb22-449a-87e2-db9959d53fe4",npm_config_global_prefix:"/opt/hostedtoolcache/node/20.18.3/x64",EDGEWEBDRIVER:"/usr/local/share/edge_driver",STATS_EXT:"true",npm_command:"run-script",ANDROID_NDK:"/usr/local/lib/android/sdk/ndk/27.2.12479018",SGX_AESM_ADDR:"1",CHROME_BIN:"/usr/bin/google-chrome",SELENIUM_JAR_PATH:"/usr/share/java/selenium-server.jar",MEMORY_PRESSURE_WRITE:"c29tZSAyMDAwMDAgMjAwMDAwMAA=",STATS_EXTP:"https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data",ANDROID_NDK_HOME:"/usr/local/lib/android/sdk/ndk/27.2.12479018",GITHUB_STEP_SUMMARY:"/home/runner/work/_temp/_runner_file_commands/step_summary_177c26d6-fb22-449a-87e2-db9959d53fe4",INIT_CWD:"/home/runner/work/md/md",EDITOR:"vi",NODE_ENV:"production",LAUNCH_EDITOR:"code"},title:"node",argv:["/opt/hostedtoolcache/node/20.18.3/x64/bin/node","/home/runner/work/md/md/node_modules/.bin/vite","build"],execArgv:[],pid:2146,ppid:2145,execPath:"/opt/hostedtoolcache/node/20.18.3/x64/bin/node",debugPort:9229,argv0:"node",_preload_modules:[],report:{directory:"",filename:"",compact:!1,excludeNetwork:!1,signal:"SIGUSR2",reportOnFatalError:!1,reportOnSignal:!1,reportOnUncaughtException:!1}};class ObjectUploader extends streamBrowserify.Transform{constructor(ed,ud,dd,hd,md,gd){super(),this.emptyStream=!0,this.client=ed,this.bucketName=ud,this.objectName=dd,this.partSize=hd,this.metaData=md,this.callback=gd,this.partNumber=1,this.oldParts=null,this.etags=[],this.id=null,this.on("error",yd=>{gd(yd)})}_transform(ed,ud,dd){this.emptyStream=!1;let hd="PUT",md={"Content-Length":ed.length},gd="";if(this.client.enableSHA256||(gd=(void 0)("md5").update(ed).digest(),md["Content-MD5"]=gd.toString("base64")),this.partNumber==1&&ed.length{if(Nd)return dd(Nd);let Ud={etag:sanitizeETag(Ld.headers.etag),versionId:getVersionId(Ld.headers)};Ld.on("data",()=>{}),define_process_default.nextTick(()=>{this.callback(null,Ud)}),dd()});return}if(this.id===null){this.once("ready",()=>{this._transform(ed,ud,dd)}),this.client.findUploadId(this.bucketName,this.objectName,(wd,Nd)=>{if(wd)return this.emit("error",wd);if(!Nd){this.client.initiateNewMultipartUpload(this.bucketName,this.objectName,this.metaData).then(Ld=>{this.id=Ld,this.emit("ready")},Ld=>dd(Ld));return}this.id=Nd,this.client.listParts(this.bucketName,this.objectName,Nd).then(Ld=>{Ld||(Ld=[]),this.oldParts=Ld.reduce(function(Ud,jd){return Ud[jd.part]||(Ud[jd.part]=jd),Ud},{}),this.emit("ready")},Ld=>this.emit("error",Ld))});return}let yd=this.partNumber++;if(this.oldParts){let wd=this.oldParts[yd];if(gd||(gd=(void 0)("md5").update(ed).digest()),wd&&gd.toString("hex")===wd.etag){this.etags.push({part:yd,etag:wd.etag}),dd();return}}let vd=queryString.stringify({partNumber:yd,uploadId:this.id}),Cd={method:hd,query:vd,headers:md,bucketName:this.bucketName,objectName:this.objectName};this.client.makeRequest(Cd,ed,[200],"",!0,(wd,Nd)=>{if(wd)return dd(wd);let Ld=Nd.headers.etag;Ld&&(Ld=Ld.replace(/^"/,"").replace(/"$/,"")),this.etags.push({part:yd,etag:Ld}),Nd.on("data",()=>{}),dd()})}_flush(ed){if(this.emptyStream){let ud="PUT",dd=Object.assign({},this.metaData,{"Content-Length":0}),hd={method:ud,headers:dd,query:"",bucketName:this.bucketName,objectName:this.objectName};this.client.makeRequest(hd,"",[200],"",!0,(md,gd)=>{if(md)return ed(md);let yd={etag:sanitizeETag(gd.headers.etag),versionId:getVersionId(gd.headers)};gd.on("data",()=>{}),define_process_default.nextTick(()=>{this.callback(null,yd)}),ed()});return}this.id!==null&&this.client.completeMultipartUpload(this.bucketName,this.objectName,this.id,this.etags,(ud,dd)=>{if(ud)return ed(ud);define_process_default.nextTick(()=>{this.callback(null,dd)}),ed()})}}function promisify(Ra){return function(){if(typeof arguments[arguments.length-1]=="function")return Ra.apply(this,arguments);let ud=[...arguments];return new Promise((dd,hd)=>{ud.push((md,gd)=>{if(md)return hd(md);dd(gd)}),Ra.apply(this,ud)})}}class Client extends TypedClient{setAppInfo(ed,ud){if(!isString(ed))throw new TypeError(`Invalid appName: ${ed}`);if(ed.trim()==="")throw new InvalidArgumentError("Input appName cannot be empty.");if(!isString(ud))throw new TypeError(`Invalid appVersion: ${ud}`);if(ud.trim()==="")throw new InvalidArgumentError("Input appVersion cannot be empty.");this.userAgent=`${this.userAgent} ${ed}/${ud}`}calculatePartSize(ed){if(!isNumber(ed))throw new TypeError('size should be of type "number"');if(ed>this.maxObjectSize)throw new TypeError(`size should not be more than ${this.maxObjectSize}`);if(this.overRidePartSize)return this.partSize;for(var ud=this.partSize;;){if(ud*1e4>ed)return ud;ud+=16*1024*1024}}makeBucket(ed,ud,dd={},hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(isObject(ud)&&(hd=dd,dd=ud,ud=""),isFunction(ud)&&(hd=ud,ud="",dd={}),isFunction(dd)&&(hd=dd,dd={}),!isString(ud))throw new TypeError('region should be of type "string"');if(!isObject(dd))throw new TypeError('makeOpts should be of type "object"');if(!isFunction(hd))throw new TypeError('callback should be of type "function"');var md="";if(ud&&this.region&&ud!==this.region)throw new InvalidArgumentError(`Configured region ${this.region}, requested ${ud}`);if(ud&&ud!==DEFAULT_REGION){var gd=[];gd.push({_attr:{xmlns:"http://s3.amazonaws.com/doc/2006-03-01/"}}),gd.push({LocationConstraint:ud});var yd={CreateBucketConfiguration:gd};md=Xml(yd)}var vd="PUT",Cd={};dd.ObjectLocking&&(Cd["x-amz-bucket-object-lock-enabled"]=!0),ud||(ud=DEFAULT_REGION);const wd=Nd=>{if(Nd&&(ud===""||ud===DEFAULT_REGION))if(Nd.code==="AuthorizationHeaderMalformed"&&Nd.region!=="")this.makeRequest({method:vd,bucketName:ed,headers:Cd},md,[200],Nd.region,!1,hd);else return hd&&hd(Nd);return hd&&hd(Nd)};this.makeRequest({method:vd,bucketName:ed,headers:Cd},md,[200],ud,!1,wd)}listIncompleteUploads(ed,ud,dd){if(ud===void 0&&(ud=""),dd===void 0&&(dd=!1),!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidPrefix(ud))throw new InvalidPrefixError(`Invalid prefix : ${ud}`);if(!isBoolean(dd))throw new TypeError('recursive should be of type "boolean"');var hd=dd?"":"/",md="",gd="",yd=[],vd=!1,Cd=streamBrowserify.Readable({objectMode:!0});return Cd._read=()=>{if(yd.length)return Cd.push(yd.shift());if(vd)return Cd.push(null);this.listIncompleteUploadsQuery(ed,ud,md,gd,hd).on("error",wd=>Cd.emit("error",wd)).on("data",wd=>{wd.prefixes.forEach(Nd=>yd.push(Nd)),index.eachSeries(wd.uploads,(Nd,Ld)=>{this.listParts(ed,Nd.key,Nd.uploadId).then(Ud=>{Nd.size=Ud.reduce((jd,Gd)=>jd+Gd.size,0),yd.push(Nd),Ld()},Ld)},Nd=>{if(Nd){Cd.emit("error",Nd);return}wd.isTruncated?(md=wd.nextKeyMarker,gd=wd.nextUploadIdMarker):vd=!0,Cd._read()})})},Cd}bucketExists(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new TypeError('callback should be of type "function"');var dd="HEAD";this.makeRequest({method:dd,bucketName:ed},"",[200],"",!1,hd=>{if(hd)return hd.code=="NoSuchBucket"||hd.code=="NotFound"?ud(null,!1):ud(hd);ud(null,!0)})}removeIncompleteUpload(ed,ud,dd){if(!isValidBucketName(ed))throw new IsValidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isFunction(dd))throw new TypeError('callback should be of type "function"');var hd;index.during(md=>{this.findUploadId(ed,ud,(gd,yd)=>{if(gd)return md(gd);hd=yd,md(null,yd)})},md=>{var gd="DELETE",yd=`uploadId=${hd}`;this.makeRequest({method:gd,bucketName:ed,objectName:ud,query:yd},"",[204],"",!1,vd=>md(vd))},dd)}fGetObject(ed,ud,dd,hd={},md){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isString(dd))throw new TypeError('filePath should be of type "string"');if(isFunction(hd)&&(md=hd,hd={}),!isFunction(md))throw new TypeError('callback should be of type "function"');var gd,yd,vd,Cd=wd=>{if(wd)return md(wd);(void 0)(gd,dd,md)};index.waterfall([wd=>this.statObject(ed,ud,hd,wd),(wd,Nd)=>{vd=wd,(void 0)(pathBrowserify.dirname(dd),{recursive:!0},Ld=>Nd(Ld))},wd=>{gd=`${dd}.${vd.etag}.part.minio`,(void 0)(gd,(Nd,Ld)=>{var Ud=0;if(Nd)yd=(void 0)(gd,{flags:"w"});else{if(vd.size===Ld.size)return Cd();Ud=Ld.size,yd=(void 0)(gd,{flags:"a"})}this.getPartialObject(ed,ud,Ud,0,hd,wd)})},(wd,Nd)=>{pipesetup(wd,yd).on("error",Ld=>Nd(Ld)).on("finish",Nd)},wd=>(void 0)(gd,wd),(wd,Nd)=>{if(wd.size===vd.size)return Nd();Nd(new Error("Size mismatch between downloaded file and the object"))}],Cd)}getObject(ed,ud,dd={},hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(isFunction(dd)&&(hd=dd,dd={}),!isFunction(hd))throw new TypeError('callback should be of type "function"');this.getPartialObject(ed,ud,0,0,dd,hd)}getPartialObject(ed,ud,dd,hd,md={},gd){if(isFunction(hd)&&(gd=hd,hd=0),!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isNumber(dd))throw new TypeError('offset should be of type "number"');if(!isNumber(hd))throw new TypeError('length should be of type "number"');if(isFunction(md)&&(gd=md,md={}),!isFunction(gd))throw new TypeError('callback should be of type "function"');var yd="";(dd||hd)&&(dd?yd=`bytes=${+dd}-`:(yd="bytes=0-",dd=0),hd&&(yd+=`${+hd+dd-1}`));var vd={};yd!==""&&(vd.range=yd);var Cd=[200];yd&&Cd.push(206);var wd="GET",Nd=queryString.stringify(md);this.makeRequest({method:wd,bucketName:ed,objectName:ud,headers:vd,query:Nd},"",Cd,"",!0,gd)}fPutObject(ed,ud,dd,hd,md){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isString(dd))throw new TypeError('filePath should be of type "string"');if(isFunction(hd)&&(md=hd,hd={}),!isObject(hd))throw new TypeError('metaData should be of type "object"');hd=insertContentType(hd,dd),(void 0)(dd,(gd,yd)=>gd?md(gd):this.putObject(ed,ud,(void 0)(dd),yd.size,hd,md))}putObject(ed,ud,dd,hd,md,gd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(isFunction(hd)?(gd=hd,md={}):isFunction(md)&&(gd=md,md={}),isObject(hd)&&(md=hd),md=prependXAMZMeta(md),typeof dd=="string"||dd instanceof Buffer$4)hd=dd.length,dd=readableStream(dd);else if(!isReadableStream(dd))throw new TypeError('third argument should be of type "stream.Readable" or "Buffer" or "string"');if(!isFunction(gd))throw new TypeError('callback should be of type "function"');if(isNumber(hd)&&hd<0)throw new InvalidArgumentError(`size cannot be negative, given size: ${hd}`);isNumber(hd)||(hd=this.maxObjectSize),hd=this.calculatePartSize(hd);let yd=new BlockStream2({size:hd,zeroPadding:!1}),vd=new ObjectUploader(this,ed,ud,hd,md,gd);pipesetup(dd,yd,vd)}copyObjectV1(ed,ud,dd,hd,md){var gd=ed,yd=ud,vd=dd,Cd,wd;if(typeof hd=="function"&&md===void 0?(Cd=null,wd=hd):(Cd=hd,wd=md),!isValidBucketName(gd))throw new InvalidBucketNameError("Invalid bucket name: "+gd);if(!isValidObjectName(yd))throw new InvalidObjectNameError(`Invalid object name: ${yd}`);if(!isString(vd))throw new TypeError('srcObject should be of type "string"');if(vd==="")throw new InvalidPrefixError("Empty source prefix");if(Cd!==null&&!(Cd instanceof CopyConditions))throw new TypeError('conditions should be of type "CopyConditions"');var Nd={};Nd["x-amz-copy-source"]=uriResourceEscape(vd),Cd!==null&&(Cd.modified!==""&&(Nd["x-amz-copy-source-if-modified-since"]=Cd.modified),Cd.unmodified!==""&&(Nd["x-amz-copy-source-if-unmodified-since"]=Cd.unmodified),Cd.matchETag!==""&&(Nd["x-amz-copy-source-if-match"]=Cd.matchETag),Cd.matchEtagExcept!==""&&(Nd["x-amz-copy-source-if-none-match"]=Cd.matchETagExcept));var Ld="PUT";this.makeRequest({method:Ld,bucketName:gd,objectName:yd,headers:Nd},"",[200],"",!0,(Ud,jd)=>{if(Ud)return wd(Ud);var Gd=getCopyObjectTransformer();pipesetup(jd,Gd).on("error",Yd=>wd(Yd)).on("data",Yd=>wd(null,Yd))})}copyObjectV2(ed,ud,dd){if(!(ed instanceof CopySourceOptions))throw new InvalidArgumentError("sourceConfig should of type CopySourceOptions ");if(!(ud instanceof CopyDestinationOptions))throw new InvalidArgumentError("destConfig should of type CopyDestinationOptions ");if(!ud.validate()||!ud.validate())return!1;if(!isFunction(dd))throw new TypeError('callback should be of type "function"');const hd=Object.assign({},ed.getHeaders(),ud.getHeaders()),md=ud.Bucket,gd=ud.Object;this.makeRequest({method:"PUT",bucketName:md,objectName:gd,headers:hd},"",[200],"",!0,(vd,Cd)=>{if(vd)return dd(vd);const wd=getCopyObjectTransformer();pipesetup(Cd,wd).on("error",Nd=>dd(Nd)).on("data",Nd=>{const Ld=Cd.headers,Ud={Bucket:ud.Bucket,Key:ud.Object,LastModified:Nd.LastModified,MetaData:extractMetadata(Ld),VersionId:getVersionId(Ld),SourceVersionId:getSourceVersionId(Ld),Etag:sanitizeETag(Ld.etag),Size:+Ld["content-length"]};return dd(null,Ud)})})}copyObject(...ed){return ed[0]instanceof CopySourceOptions&&ed[1]instanceof CopyDestinationOptions?this.copyObjectV2(...arguments):this.copyObjectV1(...arguments)}listObjectsQuery(ed,ud,dd,hd={}){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isString(ud))throw new TypeError('prefix should be of type "string"');if(!isString(dd))throw new TypeError('marker should be of type "string"');let{Delimiter:md,MaxKeys:gd,IncludeVersion:yd}=hd;if(!isObject(hd))throw new TypeError('listQueryOpts should be of type "object"');if(!isString(md))throw new TypeError('Delimiter should be of type "string"');if(!isNumber(gd))throw new TypeError('MaxKeys should be of type "number"');const vd=[];vd.push(`prefix=${uriEscape(ud)}`),vd.push(`delimiter=${uriEscape(md)}`),vd.push("encoding-type=url"),yd&&vd.push("versions"),dd&&(dd=uriEscape(dd),yd?vd.push(`key-marker=${dd}`):vd.push(`marker=${dd}`)),gd&&(gd>=1e3&&(gd=1e3),vd.push(`max-keys=${gd}`)),vd.sort();var Cd="";vd.length>0&&(Cd=`${vd.join("&")}`);var wd="GET",Nd=getListObjectsTransformer();return this.makeRequest({method:wd,bucketName:ed,query:Cd},"",[200],"",!0,(Ld,Ud)=>{if(Ld)return Nd.emit("error",Ld);pipesetup(Ud,Nd)}),Nd}listObjects(ed,ud,dd,hd={}){if(ud===void 0&&(ud=""),dd===void 0&&(dd=!1),!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidPrefix(ud))throw new InvalidPrefixError(`Invalid prefix : ${ud}`);if(!isString(ud))throw new TypeError('prefix should be of type "string"');if(!isBoolean(dd))throw new TypeError('recursive should be of type "boolean"');if(!isObject(hd))throw new TypeError('listOpts should be of type "object"');var md="";const gd={Delimiter:dd?"":"/",MaxKeys:1e3,IncludeVersion:hd.IncludeVersion};var yd=[],vd=!1,Cd=streamBrowserify.Readable({objectMode:!0});return Cd._read=()=>{if(yd.length){Cd.push(yd.shift());return}if(vd)return Cd.push(null);this.listObjectsQuery(ed,ud,md,gd).on("error",wd=>Cd.emit("error",wd)).on("data",wd=>{wd.isTruncated?md=wd.nextMarker||wd.versionIdMarker:vd=!0,yd=wd.objects,Cd._read()})},Cd}listObjectsV2Query(ed,ud,dd,hd,md,gd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isString(ud))throw new TypeError('prefix should be of type "string"');if(!isString(dd))throw new TypeError('continuationToken should be of type "string"');if(!isString(hd))throw new TypeError('delimiter should be of type "string"');if(!isNumber(md))throw new TypeError('maxKeys should be of type "number"');if(!isString(gd))throw new TypeError('startAfter should be of type "string"');var yd=[];yd.push("list-type=2"),yd.push("encoding-type=url"),yd.push(`prefix=${uriEscape(ud)}`),yd.push(`delimiter=${uriEscape(hd)}`),dd&&(dd=uriEscape(dd),yd.push(`continuation-token=${dd}`)),gd&&(gd=uriEscape(gd),yd.push(`start-after=${gd}`)),md&&(md>=1e3&&(md=1e3),yd.push(`max-keys=${md}`)),yd.sort();var vd="";yd.length>0&&(vd=`${yd.join("&")}`);var Cd="GET",wd=getListObjectsV2Transformer();return this.makeRequest({method:Cd,bucketName:ed,query:vd},"",[200],"",!0,(Nd,Ld)=>{if(Nd)return wd.emit("error",Nd);pipesetup(Ld,wd)}),wd}listObjectsV2(ed,ud,dd,hd){if(ud===void 0&&(ud=""),dd===void 0&&(dd=!1),hd===void 0&&(hd=""),!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidPrefix(ud))throw new InvalidPrefixError(`Invalid prefix : ${ud}`);if(!isString(ud))throw new TypeError('prefix should be of type "string"');if(!isBoolean(dd))throw new TypeError('recursive should be of type "boolean"');if(!isString(hd))throw new TypeError('startAfter should be of type "string"');var md=dd?"":"/",gd="",yd=[],vd=!1,Cd=streamBrowserify.Readable({objectMode:!0});return Cd._read=()=>{if(yd.length){Cd.push(yd.shift());return}if(vd)return Cd.push(null);this.listObjectsV2Query(ed,ud,gd,md,1e3,hd).on("error",wd=>Cd.emit("error",wd)).on("data",wd=>{wd.isTruncated?gd=wd.nextContinuationToken:vd=!0,yd=wd.objects,Cd._read()})},Cd}removeObjects(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!Array.isArray(ud))throw new InvalidArgumentError("objectsList should be a list");if(!isFunction(dd))throw new TypeError('callback should be of type "function"');const hd=1e3,md="delete",gd="POST";let yd=ud.reduce((wd,Nd)=>(wd.list.push(Nd),wd.list.length===hd&&(wd.listOfList.push(wd.list),wd.list=[]),wd),{listOfList:[],list:[]});yd.list.length>0&&yd.listOfList.push(yd.list);const vd=new Encoder,Cd=[];index.eachSeries(yd.listOfList,(wd,Nd)=>{var Ld=[];wd.forEach(function(qd){isObject(qd)?Ld.push({Key:qd.name,VersionId:qd.versionId}):Ld.push({Key:qd})});let Ud={Delete:{Quiet:!0,Object:Ld}},Gd=new xml2js.Builder({headless:!0}).buildObject(Ud);Gd=Buffer$4.from(vd.encode(Gd));const Yd={};Yd["Content-MD5"]=toMd5(Gd);let zd;this.makeRequest({method:gd,bucketName:ed,query:md,headers:Yd},Gd,[200],"",!0,(qd,Wd)=>{if(qd)return Nd(qd);pipesetup(Wd,removeObjectsTransformer()).on("data",Xd=>{zd=Xd}).on("error",Xd=>Nd(Xd,null)).on("end",()=>(Cd.push(zd),Nd(null,zd)))})},()=>{dd(null,_.flatten(Cd))})}getBucketPolicy(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);if(!isFunction(ud))throw new TypeError('callback should be of type "function"');this.makeRequest({method:"GET",bucketName:ed,query:"policy"},"",[200],"",!0,(md,gd)=>{if(md)return ud(md);let yd=Buffer$4.from("");pipesetup(gd,getConcater()).on("data",vd=>yd=vd).on("error",ud).on("end",()=>{ud(null,yd.toString())})})}setBucketPolicy(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);if(!isString(ud))throw new InvalidBucketPolicyError(`Invalid bucket policy: ${ud} - must be "string"`);if(!isFunction(dd))throw new TypeError('callback should be of type "function"');let hd="DELETE",md="policy";ud&&(hd="PUT"),this.makeRequest({method:hd,bucketName:ed,query:md},ud,[204],"",!1,dd)}presignedUrl(ed,ud,dd,hd,md,gd,yd){if(this.anonymous)throw new AnonymousRequestError("Presigned "+ed+" url cannot be generated for anonymous requests");if(isFunction(gd)&&(yd=gd,gd=new Date),isFunction(md)&&(yd=md,md={},gd=new Date),isFunction(hd)&&(yd=hd,md={},hd=24*60*60*7,gd=new Date),!isNumber(hd))throw new TypeError('expires should be of type "number"');if(!isObject(md))throw new TypeError('reqParams should be of type "object"');if(!isValidDate(gd))throw new TypeError('requestDate should be of type "Date" and valid');if(!isFunction(yd))throw new TypeError('callback should be of type "function"');var vd=queryString.stringify(md);this.getBucketRegion(ud,(Cd,wd)=>{if(Cd)return yd(Cd);var Nd,Ld=this.getRequestOptions({method:ed,region:wd,bucketName:ud,objectName:dd,query:vd});this.checkAndRefreshCreds();try{Nd=presignSignatureV4(Ld,this.accessKey,this.secretKey,this.sessionToken,wd,gd,hd)}catch(Ud){return yd(Ud)}yd(null,Nd)})}presignedGetObject(ed,ud,dd,hd,md,gd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);isFunction(hd)&&(gd=hd,hd={},md=new Date);var yd=["response-content-type","response-content-language","response-expires","response-cache-control","response-content-disposition","response-content-encoding"];return yd.forEach(vd=>{if(hd!==void 0&&hd[vd]!==void 0&&!isString(hd[vd]))throw new TypeError(`response header ${vd} should be of type "string"`)}),this.presignedUrl("GET",ed,ud,dd,hd,md,gd)}presignedPutObject(ed,ud,dd,hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);return this.presignedUrl("PUT",ed,ud,dd,hd)}newPostPolicy(){return new PostPolicy}presignedPostPolicy(ed,ud){if(this.anonymous)throw new AnonymousRequestError("Presigned POST policy cannot be generated for anonymous requests");if(!isObject(ed))throw new TypeError('postPolicy should be of type "object"');if(!isFunction(ud))throw new TypeError('cb should be of type "function"');this.getBucketRegion(ed.formData.bucket,(dd,hd)=>{if(dd)return ud(dd);var md=new Date,gd=makeDateLong(md);if(this.checkAndRefreshCreds(),!ed.policy.expiration){var yd=new Date;yd.setSeconds(24*60*60*7),ed.setExpires(yd)}ed.policy.conditions.push(["eq","$x-amz-date",gd]),ed.formData["x-amz-date"]=gd,ed.policy.conditions.push(["eq","$x-amz-algorithm","AWS4-HMAC-SHA256"]),ed.formData["x-amz-algorithm"]="AWS4-HMAC-SHA256",ed.policy.conditions.push(["eq","$x-amz-credential",this.accessKey+"/"+getScope(hd,md)]),ed.formData["x-amz-credential"]=this.accessKey+"/"+getScope(hd,md),this.sessionToken&&(ed.policy.conditions.push(["eq","$x-amz-security-token",this.sessionToken]),ed.formData["x-amz-security-token"]=this.sessionToken);var vd=Buffer$4.from(JSON.stringify(ed.policy)).toString("base64");ed.formData.policy=vd;var Cd=postPresignSignatureV4(hd,md,this.secretKey,vd);ed.formData["x-amz-signature"]=Cd;var wd={};wd.region=hd,wd.bucketName=ed.formData.bucket;var Nd=this.getRequestOptions(wd),Ld=this.port==80||this.port===443?"":`:${this.port.toString()}`,Ud=`${Nd.protocol}//${Nd.host}${Ld}${Nd.path}`;ud(null,{postURL:Ud,formData:ed.formData})})}completeMultipartUpload(ed,ud,dd,hd,md){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isString(dd))throw new TypeError('uploadId should be of type "string"');if(!isObject(hd))throw new TypeError('etags should be of type "Array"');if(!isFunction(md))throw new TypeError('cb should be of type "function"');if(!dd)throw new InvalidArgumentError("uploadId cannot be empty");var gd="POST",yd=`uploadId=${uriEscape(dd)}`,vd=[];hd.forEach(Nd=>{vd.push({Part:[{PartNumber:Nd.part},{ETag:Nd.etag}]})});var Cd={CompleteMultipartUpload:vd},wd=Xml(Cd);this.makeRequest({method:gd,bucketName:ed,objectName:ud,query:yd},wd,[200],"",!0,(Nd,Ld)=>{if(Nd)return md(Nd);var Ud=getCompleteMultipartTransformer();pipesetup(Ld,Ud).on("error",jd=>md(jd)).on("data",jd=>{if(jd.errCode)md(new S3Error(jd.errMessage));else{const Gd={etag:jd.etag,versionId:getVersionId(Ld.headers)};md(null,Gd)}})})}listIncompleteUploadsQuery(ed,ud,dd,hd,md){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isString(ud))throw new TypeError('prefix should be of type "string"');if(!isString(dd))throw new TypeError('keyMarker should be of type "string"');if(!isString(hd))throw new TypeError('uploadIdMarker should be of type "string"');if(!isString(md))throw new TypeError('delimiter should be of type "string"');var gd=[];gd.push(`prefix=${uriEscape(ud)}`),gd.push(`delimiter=${uriEscape(md)}`),dd&&(dd=uriEscape(dd),gd.push(`key-marker=${dd}`)),hd&&gd.push(`upload-id-marker=${hd}`);var yd=1e3;gd.push(`max-uploads=${yd}`),gd.sort(),gd.unshift("uploads");var vd="";gd.length>0&&(vd=`${gd.join("&")}`);var Cd="GET",wd=getListMultipartTransformer();return this.makeRequest({method:Cd,bucketName:ed,query:vd},"",[200],"",!0,(Nd,Ld)=>{if(Nd)return wd.emit("error",Nd);pipesetup(Ld,wd)}),wd}findUploadId(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(!isFunction(dd))throw new TypeError('cb should be of type "function"');var hd,md=(gd,yd)=>{this.listIncompleteUploadsQuery(ed,ud,gd,yd,"").on("error",vd=>dd(vd)).on("data",vd=>{if(vd.uploads.forEach(Cd=>{if(Cd.key===ud&&(!hd||Cd.initiated.getTime()>hd.initiated.getTime())){hd=Cd;return}}),vd.isTruncated){md(vd.nextKeyMarker,vd.nextUploadIdMarker);return}if(hd)return dd(null,hd.uploadId);dd(null,void 0)})};md("","")}setBucketNotification(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isObject(ud))throw new TypeError('notification config should be of type "Object"');if(!isFunction(dd))throw new TypeError('callback should be of type "function"');var hd="PUT",md="notification",gd=new xml2js.Builder({rootName:"NotificationConfiguration",renderOpts:{pretty:!1},headless:!0}),yd=gd.buildObject(ud);this.makeRequest({method:hd,bucketName:ed,query:md},yd,[200],"",!1,dd)}removeAllBucketNotification(ed,ud){this.setBucketNotification(ed,new NotificationConfig,ud)}getBucketNotification(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new TypeError('callback should be of type "function"');var dd="GET",hd="notification";this.makeRequest({method:dd,bucketName:ed,query:hd},"",[200],"",!0,(md,gd)=>{if(md)return ud(md);var yd=getBucketNotificationTransformer(),vd;pipesetup(gd,yd).on("data",Cd=>vd=Cd).on("error",Cd=>ud(Cd)).on("end",()=>ud(null,vd))})}listenBucketNotification(ed,ud,dd,hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);if(!isString(ud))throw new TypeError("prefix must be of type string");if(!isString(dd))throw new TypeError("suffix must be of type string");if(!Array.isArray(hd))throw new TypeError("events must be of type Array");let md=new NotificationPoller(this,ed,ud,dd,hd);return md.start(),md}getBucketVersioning(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new InvalidArgumentError('callback should be of type "function"');var dd="GET",hd="versioning";this.makeRequest({method:dd,bucketName:ed,query:hd},"",[200],"",!0,(md,gd)=>{if(md)return ud(md);let yd=Buffer$4.from("");pipesetup(gd,bucketVersioningTransformer()).on("data",vd=>{yd=vd}).on("error",ud).on("end",()=>{ud(null,yd)})})}setBucketVersioning(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!Object.keys(ud).length)throw new InvalidArgumentError('versionConfig should be of type "object"');if(!isFunction(dd))throw new TypeError('callback should be of type "function"');var hd="PUT",md="versioning",gd=new xml2js.Builder({rootName:"VersioningConfiguration",renderOpts:{pretty:!1},headless:!0}),yd=gd.buildObject(ud);this.makeRequest({method:hd,bucketName:ed,query:md},yd,[200],"",!1,dd)}setTagging(ed){const{bucketName:ud,objectName:dd,tags:hd,putOpts:md={},cb:gd}=ed,yd="PUT";let vd="tagging";md&&md.versionId&&(vd=`${vd}&versionId=${md.versionId}`);const Cd=[];for(const[Yd,zd]of Object.entries(hd))Cd.push({Key:Yd,Value:zd});const wd={Tagging:{TagSet:{Tag:Cd}}},Nd=new Encoder,Ld={};let jd=new xml2js.Builder({headless:!0,renderOpts:{pretty:!1}}).buildObject(wd);jd=Buffer$4.from(Nd.encode(jd)),Ld["Content-MD5"]=toMd5(jd);const Gd={method:yd,bucketName:ud,query:vd,headers:Ld};dd&&(Gd.objectName=dd),Ld["Content-MD5"]=toMd5(jd),this.makeRequest(Gd,jd,[200],"",!1,gd)}setBucketTagging(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isObject(ud))throw new InvalidArgumentError('tags should be of type "object"');if(Object.keys(ud).length>10)throw new InvalidArgumentError('maximum tags allowed is 10"');if(!isFunction(dd))throw new InvalidArgumentError('callback should be of type "function"');return this.setTagging({bucketName:ed,tags:ud,cb:dd})}setObjectTagging(ed,ud,dd,hd={},md){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidBucketNameError("Invalid object name: "+ud);if(isFunction(hd)&&(md=hd,hd={}),!isObject(dd))throw new InvalidArgumentError('tags should be of type "object"');if(Object.keys(dd).length>10)throw new InvalidArgumentError('Maximum tags allowed is 10"');if(!isFunction(md))throw new TypeError('callback should be of type "function"');return this.setTagging({bucketName:ed,objectName:ud,tags:dd,putOpts:hd,cb:md})}removeTagging({bucketName:ed,objectName:ud,removeOpts:dd,cb:hd}){const md="DELETE";let gd="tagging";dd&&Object.keys(dd).length&&dd.versionId&&(gd=`${gd}&versionId=${dd.versionId}`);const yd={method:md,bucketName:ed,objectName:ud,query:gd};ud&&(yd.objectName=ud),this.makeRequest(yd,"",[200,204],"",!0,hd)}removeBucketTagging(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new TypeError('callback should be of type "function"');return this.removeTagging({bucketName:ed,cb:ud})}removeObjectTagging(ed,ud,dd,hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidBucketNameError("Invalid object name: "+ud);if(isFunction(dd)&&(hd=dd,dd={}),dd&&Object.keys(dd).length&&!isObject(dd))throw new InvalidArgumentError('removeOpts should be of type "object"');if(!isFunction(hd))throw new TypeError('callback should be of type "function"');return this.removeTagging({bucketName:ed,objectName:ud,removeOpts:dd,cb:hd})}getBucketTagging(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);const md={method:"GET",bucketName:ed,query:"tagging"};this.makeRequest(md,"",[200],"",!0,(gd,yd)=>{var vd=getTagsTransformer();if(gd)return ud(gd);let Cd;pipesetup(yd,vd).on("data",wd=>Cd=wd).on("error",wd=>ud(wd)).on("end",()=>ud(null,Cd))})}getObjectTagging(ed,ud,dd={},hd=()=>!1){const md="GET";let gd="tagging";if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidBucketNameError("Invalid object name: "+ud);if(isFunction(dd)&&(hd=dd,dd={}),!isObject(dd))throw new InvalidArgumentError('getOpts should be of type "object"');if(!isFunction(hd))throw new TypeError('callback should be of type "function"');dd&&dd.versionId&&(gd=`${gd}&versionId=${dd.versionId}`);const yd={method:md,bucketName:ed,query:gd};ud&&(yd.objectName=ud),this.makeRequest(yd,"",[200],"",!0,(vd,Cd)=>{const wd=getTagsTransformer();if(vd)return hd(vd);let Nd;pipesetup(Cd,wd).on("data",Ld=>Nd=Ld).on("error",Ld=>hd(Ld)).on("end",()=>hd(null,Nd))})}applyBucketLifecycle(ed,ud,dd){const hd="PUT",md="lifecycle",gd=new Encoder,yd={};let Cd=new xml2js.Builder({rootName:"LifecycleConfiguration",headless:!0,renderOpts:{pretty:!1}}).buildObject(ud);Cd=Buffer$4.from(gd.encode(Cd));const wd={method:hd,bucketName:ed,query:md,headers:yd};yd["Content-MD5"]=toMd5(Cd),this.makeRequest(wd,Cd,[200],"",!1,dd)}removeBucketLifecycle(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);this.makeRequest({method:"DELETE",bucketName:ed,query:"lifecycle"},"",[204],"",!1,ud)}setBucketLifecycle(ed,ud=null,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);_.isEmpty(ud)?this.removeBucketLifecycle(ed,dd):this.applyBucketLifecycle(ed,ud,dd)}getBucketLifecycle(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);const md={method:"GET",bucketName:ed,query:"lifecycle"};this.makeRequest(md,"",[200],"",!0,(gd,yd)=>{const vd=lifecycleTransformer();if(gd)return ud(gd);let Cd;pipesetup(yd,vd).on("data",wd=>Cd=wd).on("error",wd=>ud(wd)).on("end",()=>ud(null,Cd))})}setObjectLockConfig(ed,ud={},dd){const hd=[RETENTION_MODES.COMPLIANCE,RETENTION_MODES.GOVERNANCE],md=[RETENTION_VALIDITY_UNITS.DAYS,RETENTION_VALIDITY_UNITS.YEARS];if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(ud.mode&&!hd.includes(ud.mode))throw new TypeError(`lockConfigOpts.mode should be one of ${hd}`);if(ud.unit&&!md.includes(ud.unit))throw new TypeError(`lockConfigOpts.unit should be one of ${md}`);if(ud.validity&&!isNumber(ud.validity))throw new TypeError("lockConfigOpts.validity should be a number");const gd="PUT",yd="object-lock";let vd={ObjectLockEnabled:"Enabled"};const Cd=Object.keys(ud);if(Cd.length>0){if(_.difference(Cd,["unit","mode","validity"]).length!==0)throw new TypeError("lockConfigOpts.mode,lockConfigOpts.unit,lockConfigOpts.validity all the properties should be specified.");vd.Rule={DefaultRetention:{}},ud.mode&&(vd.Rule.DefaultRetention.Mode=ud.mode),ud.unit===RETENTION_VALIDITY_UNITS.DAYS?vd.Rule.DefaultRetention.Days=ud.validity:ud.unit===RETENTION_VALIDITY_UNITS.YEARS&&(vd.Rule.DefaultRetention.Years=ud.validity)}const Nd=new xml2js.Builder({rootName:"ObjectLockConfiguration",renderOpts:{pretty:!1},headless:!0}).buildObject(vd),Ld={};Ld["Content-MD5"]=toMd5(Nd),this.makeRequest({method:gd,bucketName:ed,query:yd,headers:Ld},Nd,[200],"",!1,dd)}getObjectLockConfig(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new InvalidArgumentError('callback should be of type "function"');this.makeRequest({method:"GET",bucketName:ed,query:"object-lock"},"",[200],"",!0,(md,gd)=>{if(md)return ud(md);let yd=Buffer$4.from("");pipesetup(gd,objectLockTransformer()).on("data",vd=>{yd=vd}).on("error",ud).on("end",()=>{ud(null,yd)})})}putObjectRetention(ed,ud,dd={},hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(isObject(dd)){if(dd.governanceBypass&&!isBoolean(dd.governanceBypass))throw new InvalidArgumentError("Invalid value for governanceBypass",dd.governanceBypass);if(dd.mode&&![RETENTION_MODES.COMPLIANCE,RETENTION_MODES.GOVERNANCE].includes(dd.mode))throw new InvalidArgumentError("Invalid object retention mode ",dd.mode);if(dd.retainUntilDate&&!isString(dd.retainUntilDate))throw new InvalidArgumentError("Invalid value for retainUntilDate",dd.retainUntilDate);if(dd.versionId&&!isString(dd.versionId))throw new InvalidArgumentError("Invalid value for versionId",dd.versionId)}else throw new InvalidArgumentError('retentionOpts should be of type "object"');if(!isFunction(hd))throw new TypeError('callback should be of type "function"');const md="PUT";let gd="retention";const yd={};dd.governanceBypass&&(yd["X-Amz-Bypass-Governance-Retention"]=!0);const vd=new xml2js.Builder({rootName:"Retention",renderOpts:{pretty:!1},headless:!0}),Cd={};dd.mode&&(Cd.Mode=dd.mode),dd.retainUntilDate&&(Cd.RetainUntilDate=dd.retainUntilDate),dd.versionId&&(gd+=`&versionId=${dd.versionId}`);let wd=vd.buildObject(Cd);yd["Content-MD5"]=toMd5(wd),this.makeRequest({method:md,bucketName:ed,objectName:ud,query:gd,headers:yd},wd,[200,204],"",!1,hd)}getObjectRetention(ed,ud,dd,hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(isObject(dd)){if(dd.versionId&&!isString(dd.versionId))throw new InvalidArgumentError('VersionID should be of type "string"')}else throw new InvalidArgumentError('callback should be of type "object"');if(hd&&!isFunction(hd))throw new InvalidArgumentError('callback should be of type "function"');const md="GET";let gd="retention";dd.versionId&&(gd+=`&versionId=${dd.versionId}`),this.makeRequest({method:md,bucketName:ed,objectName:ud,query:gd},"",[200],"",!0,(yd,vd)=>{if(yd)return hd(yd);let Cd=Buffer$4.from("");pipesetup(vd,objectRetentionTransformer()).on("data",wd=>{Cd=wd}).on("error",hd).on("end",()=>{hd(null,Cd)})})}setBucketEncryption(ed,ud,dd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(isFunction(ud)&&(dd=ud,ud=null),!_.isEmpty(ud)&&ud.Rule.length>1)throw new InvalidArgumentError("Invalid Rule length. Only one rule is allowed.: "+ud.Rule);if(dd&&!isFunction(dd))throw new TypeError('callback should be of type "function"');let hd=ud;_.isEmpty(ud)&&(hd={Rule:[{ApplyServerSideEncryptionByDefault:{SSEAlgorithm:"AES256"}}]});let md="PUT",gd="encryption",vd=new xml2js.Builder({rootName:"ServerSideEncryptionConfiguration",renderOpts:{pretty:!1},headless:!0}).buildObject(hd);const Cd={};Cd["Content-MD5"]=toMd5(vd),this.makeRequest({method:md,bucketName:ed,query:gd,headers:Cd},vd,[200],"",!1,dd)}getBucketEncryption(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new InvalidArgumentError('callback should be of type "function"');this.makeRequest({method:"GET",bucketName:ed,query:"encryption"},"",[200],"",!0,(md,gd)=>{if(md)return ud(md);let yd=Buffer$4.from("");pipesetup(gd,bucketEncryptionTransformer()).on("data",vd=>{yd=vd}).on("error",ud).on("end",()=>{ud(null,yd)})})}removeBucketEncryption(ed,ud){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isFunction(ud))throw new InvalidArgumentError('callback should be of type "function"');this.makeRequest({method:"DELETE",bucketName:ed,query:"encryption"},"",[204],"",!1,ud)}getObjectLegalHold(ed,ud,dd={},hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(isFunction(dd)&&(hd=dd,dd={}),isObject(dd)){if(Object.keys(dd).length>0&&dd.versionId&&!isString(dd.versionId))throw new TypeError("versionId should be of type string.:",dd.versionId)}else throw new TypeError('getOpts should be of type "Object"');if(!isFunction(hd))throw new InvalidArgumentError('callback should be of type "function"');const md="GET";let gd="legal-hold";dd.versionId&&(gd+=`&versionId=${dd.versionId}`),this.makeRequest({method:md,bucketName:ed,objectName:ud,query:gd},"",[200],"",!0,(yd,vd)=>{if(yd)return hd(yd);let Cd=Buffer$4.from("");pipesetup(vd,objectLegalHoldTransformer()).on("data",wd=>{Cd=wd}).on("error",hd).on("end",()=>{hd(null,Cd)})})}setObjectLegalHold(ed,ud,dd={},hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError("Invalid bucket name: "+ed);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);const md={status:LEGAL_HOLD_STATUS.ENABLED};if(isFunction(dd)&&(hd=dd,dd=md),isObject(dd)){if(![LEGAL_HOLD_STATUS.ENABLED,LEGAL_HOLD_STATUS.DISABLED].includes(dd.status))throw new TypeError("Invalid status: "+dd.status);if(dd.versionId&&!dd.versionId.length)throw new TypeError("versionId should be of type string.:"+dd.versionId)}else throw new TypeError('setOpts should be of type "Object"');if(!isFunction(hd))throw new InvalidArgumentError('callback should be of type "function"');_.isEmpty(dd)&&(dd={defaultOpts:md});const gd="PUT";let yd="legal-hold";dd.versionId&&(yd+=`&versionId=${dd.versionId}`);let vd={Status:dd.status};const wd=new xml2js.Builder({rootName:"LegalHold",renderOpts:{pretty:!1},headless:!0}).buildObject(vd),Nd={};Nd["Content-MD5"]=toMd5(wd),this.makeRequest({method:gd,bucketName:ed,objectName:ud,query:yd,headers:Nd},wd,[200],"",!1,hd)}uploadPartCopy(ed,ud){const{bucketName:dd,objectName:hd,uploadID:md,partNumber:gd,headers:yd}=ed,vd="PUT";let Cd=`uploadId=${md}&partNumber=${gd}`;const wd={method:vd,bucketName:dd,objectName:hd,query:Cd,headers:yd};return this.makeRequest(wd,"",[200],"",!0,(Nd,Ld)=>{let Ud=Buffer$4.from("");if(Nd)return ud(Nd);pipesetup(Ld,uploadPartTransformer()).on("data",jd=>{Ud=jd}).on("error",ud).on("end",()=>{let jd={etag:sanitizeETag(Ud.ETag),key:hd,part:gd};ud(null,jd)})})}composeObject(ed={},ud=[],dd){const hd=this,md=ud.length;if(!Array.isArray(ud))throw new InvalidArgumentError("sourceConfig should an array of CopySourceOptions ");if(!(ed instanceof CopyDestinationOptions))throw new InvalidArgumentError("destConfig should of type CopyDestinationOptions ");if(md<1||md>PART_CONSTRAINTS.MAX_PARTS_COUNT)throw new InvalidArgumentError(`"There must be as least one and up to ${PART_CONSTRAINTS.MAX_PARTS_COUNT} source objects.`);if(!isFunction(dd))throw new TypeError('callback should be of type "function"');for(let Nd=0;Nd{let Ld={};return _.isEmpty(Nd.VersionID)||(Ld={versionId:Nd.VersionID}),Ld},yd=[];let vd=0,Cd=0;const wd=ud.map(Nd=>hd.statObject(Nd.Bucket,Nd.Object,gd(Nd)));return Promise.all(wd).then(Nd=>{const Ld=Nd.map((zd,qd)=>{const Wd=ud[qd];let Xd=zd.size;if(Wd.MatchRange){const Jd=Wd.Start,Zd=Wd.End;if(Zd>=Xd||Jd<0)throw new InvalidArgumentError(`CopySrcOptions ${qd} has invalid segment-to-copy [${Jd}, ${Zd}] (size is ${Xd})`);Xd=Zd-Jd+1}if(XdPART_CONSTRAINTS.MAX_MULTIPART_PUT_OBJECT_SIZE)throw new InvalidArgumentError(`Cannot compose an object of size ${vd} (> 5TiB)`);if(yd[qd]=Xd,Cd+=partsRequired(Xd),Cd>PART_CONSTRAINTS.MAX_PARTS_COUNT)throw new InvalidArgumentError(`Your proposed compose object requires more than ${PART_CONSTRAINTS.MAX_PARTS_COUNT} parts`);return zd});if(Cd===1&&vd<=PART_CONSTRAINTS.MAX_PART_SIZE||vd===0)return this.copyObject(ud[0],ed,dd);for(let zd=0;zdcalculateEvenSplits(yd[qd],ud[qd]));function jd(zd){const qd=[];return Ud.forEach((Wd,Xd)=>{const{startIndex:Jd,endIndex:Zd,objInfo:mf}=Wd;let xf=Xd+1;const _f=Array.from(Jd),vf=ud[Xd].getHeaders();_f.forEach((gf,Af)=>{let Df=Zd[Af];const Of=`${mf.Bucket}/${mf.Object}`;vf["x-amz-copy-source"]=`${Of}`,vf["x-amz-copy-source-range"]=`bytes=${gf}-${Df}`;const Cf={bucketName:ed.Bucket,objectName:ed.Object,uploadID:zd,partNumber:xf,headers:vf,sourceObj:Of};qd.push(Cf)})}),qd}const Gd=zd=>{const qd=jd(zd);index.map(qd,hd.uploadPartCopy.bind(hd),(Wd,Xd)=>{if(Wd){this.abortMultipartUpload(ed.Bucket,ed.Object,zd).then(()=>dd(),Zd=>dd(Zd));return}const Jd=Xd.map(Zd=>({etag:Zd.etag,part:Zd.part}));return hd.completeMultipartUpload(ed.Bucket,ed.Object,zd,Jd,dd)})},Yd=ed.getHeaders();hd.initiateNewMultipartUpload(ed.Bucket,ed.Object,Yd).then(zd=>{Gd(zd)},zd=>{dd(zd,null)})}).catch(Nd=>{dd(Nd,null)})}selectObjectContent(ed,ud,dd={},hd){if(!isValidBucketName(ed))throw new InvalidBucketNameError(`Invalid bucket name: ${ed}`);if(!isValidObjectName(ud))throw new InvalidObjectNameError(`Invalid object name: ${ud}`);if(_.isEmpty(dd))throw new TypeError("valid select configuration is required");if(!isString(dd.expression))throw new TypeError('sqlExpression should be of type "string"');if(_.isEmpty(dd.inputSerialization))throw new TypeError("inputSerialization is required");if(!isObject(dd.inputSerialization))throw new TypeError('inputSerialization should be of type "object"');if(_.isEmpty(dd.outputSerialization))throw new TypeError("outputSerialization is required");if(!isObject(dd.outputSerialization))throw new TypeError('outputSerialization should be of type "object"');if(!isFunction(hd))throw new TypeError('callback should be of type "function"');const md="POST";let gd="select";gd+="&select-type=2";const yd=[{Expression:dd.expression},{ExpressionType:dd.expressionType||"SQL"},{InputSerialization:[dd.inputSerialization]},{OutputSerialization:[dd.outputSerialization]}];dd.requestProgress&&yd.push({RequestProgress:dd.requestProgress}),dd.scanRange&&yd.push({ScanRange:dd.scanRange});const Cd=new xml2js.Builder({rootName:"SelectObjectContentRequest",renderOpts:{pretty:!1},headless:!0}).buildObject(yd);this.makeRequest({method:md,bucketName:ed,objectName:ud,query:gd},Cd,[200],"",!0,(wd,Nd)=>{if(wd)return hd(wd);let Ld;pipesetup(Nd,selectObjectContentTransformer()).on("data",Ud=>{Ld=parseSelectObjectContentResponse(Ud)}).on("error",hd).on("end",()=>{hd(null,Ld)})})}}Client.prototype.makeBucket=promisify(Client.prototype.makeBucket);Client.prototype.bucketExists=promisify(Client.prototype.bucketExists);Client.prototype.getObject=promisify(Client.prototype.getObject);Client.prototype.getPartialObject=promisify(Client.prototype.getPartialObject);Client.prototype.fGetObject=promisify(Client.prototype.fGetObject);Client.prototype.putObject=promisify(Client.prototype.putObject);Client.prototype.fPutObject=promisify(Client.prototype.fPutObject);Client.prototype.copyObject=promisify(Client.prototype.copyObject);Client.prototype.removeObjects=promisify(Client.prototype.removeObjects);Client.prototype.presignedUrl=promisify(Client.prototype.presignedUrl);Client.prototype.presignedGetObject=promisify(Client.prototype.presignedGetObject);Client.prototype.presignedPutObject=promisify(Client.prototype.presignedPutObject);Client.prototype.presignedPostPolicy=promisify(Client.prototype.presignedPostPolicy);Client.prototype.getBucketNotification=promisify(Client.prototype.getBucketNotification);Client.prototype.setBucketNotification=promisify(Client.prototype.setBucketNotification);Client.prototype.removeAllBucketNotification=promisify(Client.prototype.removeAllBucketNotification);Client.prototype.getBucketPolicy=promisify(Client.prototype.getBucketPolicy);Client.prototype.setBucketPolicy=promisify(Client.prototype.setBucketPolicy);Client.prototype.removeIncompleteUpload=promisify(Client.prototype.removeIncompleteUpload);Client.prototype.getBucketVersioning=promisify(Client.prototype.getBucketVersioning);Client.prototype.setBucketVersioning=promisify(Client.prototype.setBucketVersioning);Client.prototype.setBucketTagging=promisify(Client.prototype.setBucketTagging);Client.prototype.removeBucketTagging=promisify(Client.prototype.removeBucketTagging);Client.prototype.getBucketTagging=promisify(Client.prototype.getBucketTagging);Client.prototype.setObjectTagging=promisify(Client.prototype.setObjectTagging);Client.prototype.removeObjectTagging=promisify(Client.prototype.removeObjectTagging);Client.prototype.getObjectTagging=promisify(Client.prototype.getObjectTagging);Client.prototype.setBucketLifecycle=promisify(Client.prototype.setBucketLifecycle);Client.prototype.getBucketLifecycle=promisify(Client.prototype.getBucketLifecycle);Client.prototype.removeBucketLifecycle=promisify(Client.prototype.removeBucketLifecycle);Client.prototype.setObjectLockConfig=promisify(Client.prototype.setObjectLockConfig);Client.prototype.getObjectLockConfig=promisify(Client.prototype.getObjectLockConfig);Client.prototype.putObjectRetention=promisify(Client.prototype.putObjectRetention);Client.prototype.getObjectRetention=promisify(Client.prototype.getObjectRetention);Client.prototype.setBucketEncryption=promisify(Client.prototype.setBucketEncryption);Client.prototype.getBucketEncryption=promisify(Client.prototype.getBucketEncryption);Client.prototype.removeBucketEncryption=promisify(Client.prototype.removeBucketEncryption);Client.prototype.setObjectLegalHold=promisify(Client.prototype.setObjectLegalHold);Client.prototype.getObjectLegalHold=promisify(Client.prototype.getObjectLegalHold);Client.prototype.composeObject=promisify(Client.prototype.composeObject);Client.prototype.selectObjectContent=promisify(Client.prototype.selectObjectContent);Client.prototype.removeObject=callbackify(Client.prototype.removeObject);Client.prototype.statObject=callbackify(Client.prototype.statObject);Client.prototype.removeBucket=callbackify(Client.prototype.removeBucket);Client.prototype.listBuckets=callbackify(Client.prototype.listBuckets);Client.prototype.removeBucketReplication=callbackify(Client.prototype.removeBucketReplication);Client.prototype.setBucketReplication=callbackify(Client.prototype.setBucketReplication);Client.prototype.getBucketReplication=callbackify(Client.prototype.getBucketReplication);var __extends$3=function(){var Ra=function(ed,ud){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dd,hd){dd.__proto__=hd}||function(dd,hd){for(var md in hd)hd.hasOwnProperty(md)&&(dd[md]=hd[md])},Ra(ed,ud)};return function(ed,ud){Ra(ed,ud);function dd(){this.constructor=ed}ed.prototype=ud===null?Object.create(ud):(dd.prototype=ud.prototype,new dd)}}(),QiniuErrorName;(function(Ra){Ra.InvalidFile="InvalidFile",Ra.InvalidToken="InvalidToken",Ra.InvalidMetadata="InvalidMetadata",Ra.InvalidChunkSize="InvalidChunkSize",Ra.InvalidCustomVars="InvalidCustomVars",Ra.NotAvailableUploadHost="NotAvailableUploadHost",Ra.ReadCacheFailed="ReadCacheFailed",Ra.InvalidCacheData="InvalidCacheData",Ra.WriteCacheFailed="WriteCacheFailed",Ra.RemoveCacheFailed="RemoveCacheFailed",Ra.GetCanvasContextFailed="GetCanvasContextFailed",Ra.UnsupportedFileType="UnsupportedFileType",Ra.FileReaderReadFailed="FileReaderReadFailed",Ra.NotAvailableXMLHttpRequest="NotAvailableXMLHttpRequest",Ra.InvalidProgressEventTarget="InvalidProgressEventTarget",Ra.RequestError="RequestError"})(QiniuErrorName||(QiniuErrorName={}));var QiniuError=function(){function Ra(ed,ud){this.name=ed,this.message=ud,this.stack=new Error().stack}return Ra}(),QiniuRequestError=function(Ra){__extends$3(ed,Ra);function ed(ud,dd,hd,md){var gd=Ra.call(this,QiniuErrorName.RequestError,hd)||this;return gd.code=ud,gd.reqId=dd,gd.isRequestError=!0,gd.data=md,gd}return ed}(QiniuError),QiniuNetworkError=function(Ra){__extends$3(ed,Ra);function ed(ud,dd){return dd===void 0&&(dd=""),Ra.call(this,0,dd,ud)||this}return ed}(QiniuRequestError),Pool=function(){function Ra(ed,ud){this.runTask=ed,this.limit=ud,this.aborted=!1,this.queue=[],this.processing=[]}return Ra.prototype.enqueue=function(ed){var ud=this;return new Promise(function(dd,hd){ud.queue.push({task:ed,resolve:dd,reject:hd}),ud.check()})},Ra.prototype.run=function(ed){var ud=this;this.queue=this.queue.filter(function(dd){return dd!==ed}),this.processing.push(ed),this.runTask(ed.task).then(function(){ud.processing=ud.processing.filter(function(dd){return dd!==ed}),ed.resolve(),ud.check()},function(dd){return ed.reject(dd)})},Ra.prototype.check=function(){var ed=this;if(!this.aborted){var ud=this.processing.length,dd=this.limit-ud;this.queue.slice(0,dd).forEach(function(hd){ed.run(hd)})}},Ra.prototype.abort=function(){this.queue=[],this.aborted=!0},Ra}(),__extends$2=function(){var Ra=function(ed,ud){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dd,hd){dd.__proto__=hd}||function(dd,hd){for(var md in hd)hd.hasOwnProperty(md)&&(dd[md]=hd[md])},Ra(ed,ud)};return function(ed,ud){Ra(ed,ud);function dd(){this.constructor=ed}ed.prototype=ud===null?Object.create(ud):(dd.prototype=ud.prototype,new dd)}}(),__assign$6=function(){return __assign$6=Object.assign||function(Ra){for(var ed,ud=1,dd=arguments.length;ud"u")return"";var ed=Ra+"",ud="",dd,hd,md=0;dd=hd=0,md=ed.length;for(var gd=0;gd127&&yd<2048)vd=String.fromCharCode(yd>>6|192,yd&63|128);else if((yd&63488^55296)>0)vd=String.fromCharCode(yd>>12|224,yd>>6&63|128,yd&63|128);else{if((yd&64512^55296)>0)throw new RangeError("Unmatched trail surrogate at "+gd);var Cd=ed.charCodeAt(++gd);if((Cd&64512^56320)>0)throw new RangeError("Unmatched lead surrogate at "+(gd-1));yd=((yd&1023)<<10)+(Cd&1023)+65536,vd=String.fromCharCode(yd>>18|240,yd>>12&63|128,yd>>6&63|128,yd&63|128)}vd!==null&&(hd>dd&&(ud+=ed.slice(dd,hd)),ud+=vd,dd=hd=gd+1)}return hd>dd&&(ud+=ed.slice(dd,md)),ud}function utf8Decode(Ra){var ed=[],ud=0,dd=0,hd=0;for(Ra+="";ud>10&1023)),ed.push(String.fromCharCode(56320|dd&1023))):ed.push(String.fromCharCode(dd)),ud+=hd}return ed.join("")}function base64Encode(Ra){var ed="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ud,dd,hd,md,gd,yd,vd,Cd,wd=0,Nd=0,Ld="",Ud=[];if(!Ra)return Ra;Ra=utf8Encode(Ra+"");do ud=Ra.charCodeAt(wd++),dd=Ra.charCodeAt(wd++),hd=Ra.charCodeAt(wd++),Cd=ud<<16|dd<<8|hd,md=Cd>>18&63,gd=Cd>>12&63,yd=Cd>>6&63,vd=Cd&63,Ud[Nd++]=ed.charAt(md)+ed.charAt(gd)+ed.charAt(yd)+ed.charAt(vd);while(wd>16&255,dd=Cd>>8&255,hd=Cd&255,yd===64?Ud[Nd++]=String.fromCharCode(ud):vd===64?Ud[Nd++]=String.fromCharCode(ud,dd):Ud[Nd++]=String.fromCharCode(ud,dd,hd);while(wd>>25)+Xd|0,Zd+=(Wd&Xd|~Wd&Jd)+qd[1]-389564586|0,Zd=(Zd<<12|Zd>>>20)+Wd|0,Jd+=(Zd&Wd|~Zd&Xd)+qd[2]+606105819|0,Jd=(Jd<<17|Jd>>>15)+Zd|0,Xd+=(Jd&Zd|~Jd&Wd)+qd[3]-1044525330|0,Xd=(Xd<<22|Xd>>>10)+Jd|0,Wd+=(Xd&Jd|~Xd&Zd)+qd[4]-176418897|0,Wd=(Wd<<7|Wd>>>25)+Xd|0,Zd+=(Wd&Xd|~Wd&Jd)+qd[5]+1200080426|0,Zd=(Zd<<12|Zd>>>20)+Wd|0,Jd+=(Zd&Wd|~Zd&Xd)+qd[6]-1473231341|0,Jd=(Jd<<17|Jd>>>15)+Zd|0,Xd+=(Jd&Zd|~Jd&Wd)+qd[7]-45705983|0,Xd=(Xd<<22|Xd>>>10)+Jd|0,Wd+=(Xd&Jd|~Xd&Zd)+qd[8]+1770035416|0,Wd=(Wd<<7|Wd>>>25)+Xd|0,Zd+=(Wd&Xd|~Wd&Jd)+qd[9]-1958414417|0,Zd=(Zd<<12|Zd>>>20)+Wd|0,Jd+=(Zd&Wd|~Zd&Xd)+qd[10]-42063|0,Jd=(Jd<<17|Jd>>>15)+Zd|0,Xd+=(Jd&Zd|~Jd&Wd)+qd[11]-1990404162|0,Xd=(Xd<<22|Xd>>>10)+Jd|0,Wd+=(Xd&Jd|~Xd&Zd)+qd[12]+1804603682|0,Wd=(Wd<<7|Wd>>>25)+Xd|0,Zd+=(Wd&Xd|~Wd&Jd)+qd[13]-40341101|0,Zd=(Zd<<12|Zd>>>20)+Wd|0,Jd+=(Zd&Wd|~Zd&Xd)+qd[14]-1502002290|0,Jd=(Jd<<17|Jd>>>15)+Zd|0,Xd+=(Jd&Zd|~Jd&Wd)+qd[15]+1236535329|0,Xd=(Xd<<22|Xd>>>10)+Jd|0,Wd+=(Xd&Zd|Jd&~Zd)+qd[1]-165796510|0,Wd=(Wd<<5|Wd>>>27)+Xd|0,Zd+=(Wd&Jd|Xd&~Jd)+qd[6]-1069501632|0,Zd=(Zd<<9|Zd>>>23)+Wd|0,Jd+=(Zd&Xd|Wd&~Xd)+qd[11]+643717713|0,Jd=(Jd<<14|Jd>>>18)+Zd|0,Xd+=(Jd&Wd|Zd&~Wd)+qd[0]-373897302|0,Xd=(Xd<<20|Xd>>>12)+Jd|0,Wd+=(Xd&Zd|Jd&~Zd)+qd[5]-701558691|0,Wd=(Wd<<5|Wd>>>27)+Xd|0,Zd+=(Wd&Jd|Xd&~Jd)+qd[10]+38016083|0,Zd=(Zd<<9|Zd>>>23)+Wd|0,Jd+=(Zd&Xd|Wd&~Xd)+qd[15]-660478335|0,Jd=(Jd<<14|Jd>>>18)+Zd|0,Xd+=(Jd&Wd|Zd&~Wd)+qd[4]-405537848|0,Xd=(Xd<<20|Xd>>>12)+Jd|0,Wd+=(Xd&Zd|Jd&~Zd)+qd[9]+568446438|0,Wd=(Wd<<5|Wd>>>27)+Xd|0,Zd+=(Wd&Jd|Xd&~Jd)+qd[14]-1019803690|0,Zd=(Zd<<9|Zd>>>23)+Wd|0,Jd+=(Zd&Xd|Wd&~Xd)+qd[3]-187363961|0,Jd=(Jd<<14|Jd>>>18)+Zd|0,Xd+=(Jd&Wd|Zd&~Wd)+qd[8]+1163531501|0,Xd=(Xd<<20|Xd>>>12)+Jd|0,Wd+=(Xd&Zd|Jd&~Zd)+qd[13]-1444681467|0,Wd=(Wd<<5|Wd>>>27)+Xd|0,Zd+=(Wd&Jd|Xd&~Jd)+qd[2]-51403784|0,Zd=(Zd<<9|Zd>>>23)+Wd|0,Jd+=(Zd&Xd|Wd&~Xd)+qd[7]+1735328473|0,Jd=(Jd<<14|Jd>>>18)+Zd|0,Xd+=(Jd&Wd|Zd&~Wd)+qd[12]-1926607734|0,Xd=(Xd<<20|Xd>>>12)+Jd|0,Wd+=(Xd^Jd^Zd)+qd[5]-378558|0,Wd=(Wd<<4|Wd>>>28)+Xd|0,Zd+=(Wd^Xd^Jd)+qd[8]-2022574463|0,Zd=(Zd<<11|Zd>>>21)+Wd|0,Jd+=(Zd^Wd^Xd)+qd[11]+1839030562|0,Jd=(Jd<<16|Jd>>>16)+Zd|0,Xd+=(Jd^Zd^Wd)+qd[14]-35309556|0,Xd=(Xd<<23|Xd>>>9)+Jd|0,Wd+=(Xd^Jd^Zd)+qd[1]-1530992060|0,Wd=(Wd<<4|Wd>>>28)+Xd|0,Zd+=(Wd^Xd^Jd)+qd[4]+1272893353|0,Zd=(Zd<<11|Zd>>>21)+Wd|0,Jd+=(Zd^Wd^Xd)+qd[7]-155497632|0,Jd=(Jd<<16|Jd>>>16)+Zd|0,Xd+=(Jd^Zd^Wd)+qd[10]-1094730640|0,Xd=(Xd<<23|Xd>>>9)+Jd|0,Wd+=(Xd^Jd^Zd)+qd[13]+681279174|0,Wd=(Wd<<4|Wd>>>28)+Xd|0,Zd+=(Wd^Xd^Jd)+qd[0]-358537222|0,Zd=(Zd<<11|Zd>>>21)+Wd|0,Jd+=(Zd^Wd^Xd)+qd[3]-722521979|0,Jd=(Jd<<16|Jd>>>16)+Zd|0,Xd+=(Jd^Zd^Wd)+qd[6]+76029189|0,Xd=(Xd<<23|Xd>>>9)+Jd|0,Wd+=(Xd^Jd^Zd)+qd[9]-640364487|0,Wd=(Wd<<4|Wd>>>28)+Xd|0,Zd+=(Wd^Xd^Jd)+qd[12]-421815835|0,Zd=(Zd<<11|Zd>>>21)+Wd|0,Jd+=(Zd^Wd^Xd)+qd[15]+530742520|0,Jd=(Jd<<16|Jd>>>16)+Zd|0,Xd+=(Jd^Zd^Wd)+qd[2]-995338651|0,Xd=(Xd<<23|Xd>>>9)+Jd|0,Wd+=(Jd^(Xd|~Zd))+qd[0]-198630844|0,Wd=(Wd<<6|Wd>>>26)+Xd|0,Zd+=(Xd^(Wd|~Jd))+qd[7]+1126891415|0,Zd=(Zd<<10|Zd>>>22)+Wd|0,Jd+=(Wd^(Zd|~Xd))+qd[14]-1416354905|0,Jd=(Jd<<15|Jd>>>17)+Zd|0,Xd+=(Zd^(Jd|~Wd))+qd[5]-57434055|0,Xd=(Xd<<21|Xd>>>11)+Jd|0,Wd+=(Jd^(Xd|~Zd))+qd[12]+1700485571|0,Wd=(Wd<<6|Wd>>>26)+Xd|0,Zd+=(Xd^(Wd|~Jd))+qd[3]-1894986606|0,Zd=(Zd<<10|Zd>>>22)+Wd|0,Jd+=(Wd^(Zd|~Xd))+qd[10]-1051523|0,Jd=(Jd<<15|Jd>>>17)+Zd|0,Xd+=(Zd^(Jd|~Wd))+qd[1]-2054922799|0,Xd=(Xd<<21|Xd>>>11)+Jd|0,Wd+=(Jd^(Xd|~Zd))+qd[8]+1873313359|0,Wd=(Wd<<6|Wd>>>26)+Xd|0,Zd+=(Xd^(Wd|~Jd))+qd[15]-30611744|0,Zd=(Zd<<10|Zd>>>22)+Wd|0,Jd+=(Wd^(Zd|~Xd))+qd[6]-1560198380|0,Jd=(Jd<<15|Jd>>>17)+Zd|0,Xd+=(Zd^(Jd|~Wd))+qd[13]+1309151649|0,Xd=(Xd<<21|Xd>>>11)+Jd|0,Wd+=(Jd^(Xd|~Zd))+qd[4]-145523070|0,Wd=(Wd<<6|Wd>>>26)+Xd|0,Zd+=(Xd^(Wd|~Jd))+qd[11]-1120210379|0,Zd=(Zd<<10|Zd>>>22)+Wd|0,Jd+=(Wd^(Zd|~Xd))+qd[2]+718787259|0,Jd=(Jd<<15|Jd>>>17)+Zd|0,Xd+=(Zd^(Jd|~Wd))+qd[9]-343485551|0,Xd=(Xd<<21|Xd>>>11)+Jd|0,zd[0]=Wd+zd[0]|0,zd[1]=Xd+zd[1]|0,zd[2]=Jd+zd[2]|0,zd[3]=Zd+zd[3]|0}function md(zd){var qd=[],Wd;for(Wd=0;Wd<64;Wd+=4)qd[Wd>>2]=zd.charCodeAt(Wd)+(zd.charCodeAt(Wd+1)<<8)+(zd.charCodeAt(Wd+2)<<16)+(zd.charCodeAt(Wd+3)<<24);return qd}function gd(zd){var qd=[],Wd;for(Wd=0;Wd<64;Wd+=4)qd[Wd>>2]=zd[Wd]+(zd[Wd+1]<<8)+(zd[Wd+2]<<16)+(zd[Wd+3]<<24);return qd}function yd(zd){var qd=zd.length,Wd=[1732584193,-271733879,-1732584194,271733878],Xd,Jd,Zd,mf,xf,_f;for(Xd=64;Xd<=qd;Xd+=64)hd(Wd,md(zd.substring(Xd-64,Xd)));for(zd=zd.substring(Xd-64),Jd=zd.length,Zd=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],Xd=0;Xd>2]|=zd.charCodeAt(Xd)<<(Xd%4<<3);if(Zd[Xd>>2]|=128<<(Xd%4<<3),Xd>55)for(hd(Wd,Zd),Xd=0;Xd<16;Xd+=1)Zd[Xd]=0;return mf=qd*8,mf=mf.toString(16).match(/(.*?)(.{0,8})$/),xf=parseInt(mf[2],16),_f=parseInt(mf[1],16)||0,Zd[14]=xf,Zd[15]=_f,hd(Wd,Zd),Wd}function vd(zd){var qd=zd.length,Wd=[1732584193,-271733879,-1732584194,271733878],Xd,Jd,Zd,mf,xf,_f;for(Xd=64;Xd<=qd;Xd+=64)hd(Wd,gd(zd.subarray(Xd-64,Xd)));for(zd=Xd-64>2]|=zd[Xd]<<(Xd%4<<3);if(Zd[Xd>>2]|=128<<(Xd%4<<3),Xd>55)for(hd(Wd,Zd),Xd=0;Xd<16;Xd+=1)Zd[Xd]=0;return mf=qd*8,mf=mf.toString(16).match(/(.*?)(.{0,8})$/),xf=parseInt(mf[2],16),_f=parseInt(mf[1],16)||0,Zd[14]=xf,Zd[15]=_f,hd(Wd,Zd),Wd}function Cd(zd){var qd="",Wd;for(Wd=0;Wd<4;Wd+=1)qd+=dd[zd>>Wd*8+4&15]+dd[zd>>Wd*8&15];return qd}function wd(zd){var qd;for(qd=0;qdZd?new ArrayBuffer(0):(mf=Zd-Jd,xf=new ArrayBuffer(mf),_f=new Uint8Array(xf),vf=new Uint8Array(this,Jd,mf),_f.set(vf),xf)}}();function Nd(zd){return/[\u0080-\uFFFF]/.test(zd)&&(zd=unescape(encodeURIComponent(zd))),zd}function Ld(zd,qd){var Wd=zd.length,Xd=new ArrayBuffer(Wd),Jd=new Uint8Array(Xd),Zd;for(Zd=0;Zd>2]|=qd.charCodeAt(Xd)<<(Xd%4<<3);return this._finish(Jd,Wd),Zd=wd(this._hash),zd&&(Zd=Gd(Zd)),this.reset(),Zd},Yd.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},Yd.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},Yd.prototype.setState=function(zd){return this._buff=zd.buff,this._length=zd.length,this._hash=zd.hash,this},Yd.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},Yd.prototype._finish=function(zd,qd){var Wd=qd,Xd,Jd,Zd;if(zd[Wd>>2]|=128<<(Wd%4<<3),Wd>55)for(hd(this._hash,zd),Wd=0;Wd<16;Wd+=1)zd[Wd]=0;Xd=this._length*8,Xd=Xd.toString(16).match(/(.*?)(.{0,8})$/),Jd=parseInt(Xd[2],16),Zd=parseInt(Xd[1],16)||0,zd[14]=Jd,zd[15]=Zd,hd(this._hash,zd)},Yd.hash=function(zd,qd){return Yd.hashBinary(Nd(zd),qd)},Yd.hashBinary=function(zd,qd){var Wd=yd(zd),Xd=wd(Wd);return qd?Gd(Xd):Xd},Yd.ArrayBuffer=function(){this.reset()},Yd.ArrayBuffer.prototype.append=function(zd){var qd=jd(this._buff.buffer,zd),Wd=qd.length,Xd;for(this._length+=zd.byteLength,Xd=64;Xd<=Wd;Xd+=64)hd(this._hash,gd(qd.subarray(Xd-64,Xd)));return this._buff=Xd-64>2]|=qd[Jd]<<(Jd%4<<3);return this._finish(Xd,Wd),Zd=wd(this._hash),zd&&(Zd=Gd(Zd)),this.reset(),Zd},Yd.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},Yd.ArrayBuffer.prototype.getState=function(){var zd=Yd.prototype.getState.call(this);return zd.buff=Ud(zd.buff),zd},Yd.ArrayBuffer.prototype.setState=function(zd){return zd.buff=Ld(zd.buff,!0),Yd.prototype.setState.call(this,zd)},Yd.ArrayBuffer.prototype.destroy=Yd.prototype.destroy,Yd.ArrayBuffer.prototype._finish=Yd.prototype._finish,Yd.ArrayBuffer.hash=function(zd,qd){var Wd=vd(new Uint8Array(zd)),Xd=wd(Wd);return qd?Gd(Xd):Xd},Yd})})(sparkMd5);var sparkMd5Exports=sparkMd5.exports;const SparkMD5=getDefaultExportFromCjs(sparkMd5Exports);var __assign$5=function(){return __assign$5=Object.assign||function(Ra){for(var ed,ud=1,dd=arguments.length;ud0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]Ra.size)ud=Ra.size;else for(;Ra.size>ud*1e4;)ud*=2;for(var dd=[],hd=Math.ceil(Ra.size/ud),md=0;md3?ed[1]:ed[0];if(!ud)throw new QiniuError(QiniuErrorName.InvalidToken,"missing assess key field.");var dd=null;try{dd=JSON.parse(urlSafeBase64Decode(ed[ed.length-1]))}catch{throw new QiniuError(QiniuErrorName.InvalidToken,"token parse failed.")}if(dd==null)throw new QiniuError(QiniuErrorName.InvalidToken,"putPolicy is null.");if(dd.scope==null)throw new QiniuError(QiniuErrorName.InvalidToken,"scope field is null.");var hd=dd.scope.split(":")[0];if(!hd)throw new QiniuError(QiniuErrorName.InvalidToken,"resolve bucketName failed.");return{assessKey:ud,bucketName:hd,scope:dd.scope}}function createObjectURL(Ra){var ed=window.URL||window.webkitURL||window.mozURL;return ed.createObjectURL(Ra)}var _a,region={z0:"z0",z1:"z1",z2:"z2",na0:"na0",as0:"as0",cnEast2:"cn-east-2"},regionUphostMap=(_a={},_a[region.z0]={srcUphost:["up.qiniup.com"],cdnUphost:["upload.qiniup.com"]},_a[region.z1]={srcUphost:["up-z1.qiniup.com"],cdnUphost:["upload-z1.qiniup.com"]},_a[region.z2]={srcUphost:["up-z2.qiniup.com"],cdnUphost:["upload-z2.qiniup.com"]},_a[region.na0]={srcUphost:["up-na0.qiniup.com"],cdnUphost:["upload-na0.qiniup.com"]},_a[region.as0]={srcUphost:["up-as0.qiniup.com"],cdnUphost:["upload-as0.qiniup.com"]},_a[region.cnEast2]={srcUphost:["up-cn-east-2.qiniup.com"],cdnUphost:["upload-cn-east-2.qiniup.com"]},_a),stringifyPrimitive=function(Ra){switch(typeof Ra){case"string":return Ra;case"boolean":return Ra?"true":"false";case"number":return isFinite(Ra)?Ra:"";default:return""}},encode=function(Ra,ed,ud,dd){return ed=ed||"&",ud=ud||"=",Ra===null&&(Ra=void 0),typeof Ra=="object"?Object.keys(Ra).map(function(hd){var md=encodeURIComponent(stringifyPrimitive(hd))+ud;return Array.isArray(Ra[hd])?Ra[hd].map(function(gd){return md+encodeURIComponent(stringifyPrimitive(gd))}).join(ed):md+encodeURIComponent(stringifyPrimitive(Ra[hd]))}).filter(Boolean).join(ed):dd?encodeURIComponent(stringifyPrimitive(dd))+ud+encodeURIComponent(stringifyPrimitive(Ra)):""},stringify;stringify=encode;var __assign$4=function(){return __assign$4=Object.assign||function(Ra){for(var ed,ud=1,dd=arguments.length;ud0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]0?[2,dd+"://"+ud.uphost[0]]:(hd=getPutPolicy(ed),[4,getUpHosts(hd.assessKey,hd.bucketName,dd)]);case 1:return md=yd.sent(),gd=md.data.up.acc.main,[2,dd+"://"+gd[0]]}})})}var __assign$3=function(){return __assign$3=Object.assign||function(Ra){for(var ed,ud=1,dd=arguments.length;ud0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]0)&&!(hd=dd.next()).done;)md.push(hd.value)}catch(yd){gd={error:yd}}finally{try{hd&&!hd.done&&(ud=dd.return)&&ud.call(dd)}finally{if(gd)throw gd.error}}return md},__spread$3=function(){for(var Ra=[],ed=0;ed1e4*GB)return this.handleError(new QiniuError(QiniuErrorName.InvalidFile,"file size exceed maximum value 10000G")),[2];if(this.putExtra.customVars&&!isCustomVarsValid(this.putExtra.customVars))return this.handleError(new QiniuError(QiniuErrorName.InvalidCustomVars,"customVars key should start width x:")),[2];if(this.putExtra.metadata&&!isMetaDataValid(this.putExtra.metadata))return this.handleError(new QiniuError(QiniuErrorName.InvalidMetadata,"metadata key should start with x-qn-meta-")),[2];md.label=1;case 1:return md.trys.push([1,4,,5]),this.uploadAt=new Date().getTime(),[4,this.checkAndUpdateUploadHost()];case 2:return md.sent(),[4,this.run()];case 3:return ed=md.sent(),this.onComplete(ed.data),this.checkAndUnfreezeHost(),this.sendLog(ed.reqId,200),[2];case 4:return ud=md.sent(),this.aborted?(this.logger.warn("upload is aborted."),this.sendLog("",-2),[2]):(this.clear(),this.logger.error(ud),ud instanceof QiniuRequestError&&(this.sendLog(ud.reqId,ud.code),this.checkAndFreezeHost(ud),dd=++this.retryCount<=this.config.retryCount,hd=RETRY_CODE_LIST.includes(ud.code),hd&&dd)?(this.logger.warn("error auto retry: "+this.retryCount+"/"+this.config.retryCount+"."),this.putFile(),[2]):(this.onError(ud),[3,5]));case 5:return[2]}})})},Ra.prototype.clear=function(){this.xhrList.forEach(function(ed){ed.onreadystatechange=null,ed.abort()}),this.xhrList=[],this.logger.info("cleanup uploading xhr.")},Ra.prototype.stop=function(){this.logger.info("aborted."),this.clear(),this.aborted=!0},Ra.prototype.addXhr=function(ed){this.xhrList.push(ed)},Ra.prototype.sendLog=function(ed,ud){var dd,hd;this.logger.report({code:ud,reqId:ed,remoteIp:"",upType:"jssdk-h5",size:this.file.size,time:Math.floor(this.uploadAt/1e3),port:getPortFromUrl((dd=this.uploadHost)===null||dd===void 0?void 0:dd.getUrl()),host:getDomainFromUrl((hd=this.uploadHost)===null||hd===void 0?void 0:hd.getUrl()),bytesSent:this.progress?this.progress.total.loaded:0,duration:Math.floor((new Date().getTime()-this.uploadAt)/1e3)})},Ra.prototype.getProgressInfoItem=function(ed,ud,dd){return __assign$3({size:ud,loaded:ed,percent:ed/ud*100},dd==null?{}:{fromCache:dd})},Ra}(),__extends$1=function(){var Ra=function(ed,ud){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dd,hd){dd.__proto__=hd}||function(dd,hd){for(var md in hd)hd.hasOwnProperty(md)&&(dd[md]=hd[md])},Ra(ed,ud)};return function(ed,ud){Ra(ed,ud);function dd(){this.constructor=ed}ed.prototype=ud===null?Object.create(ud):(dd.prototype=ud.prototype,new dd)}}(),__assign$2=function(){return __assign$2=Object.assign||function(Ra){for(var ed,ud=1,dd=arguments.length;ud0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]1024)throw new QiniuError(QiniuErrorName.InvalidChunkSize,"chunkSize maximum value is 1024");return[4,this.initBeforeUploadChunks()];case 1:vd.sent(),ud=new Pool(function(Cd){return __awaiter$4(yd,void 0,void 0,function(){return __generator$4(this,function(wd){switch(wd.label){case 0:if(this.aborted)throw ud.abort(),new Error("pool is aborted");return[4,this.uploadChunk(Cd)];case 1:return wd.sent(),[2]}})})},this.config.concurrentRequestLimit),dd=null,hd=this.getLocalKey(),md=this.chunks.map(function(Cd,wd){return ud.enqueue({chunk:Cd,index:wd})}),vd.label=2;case 2:return vd.trys.push([2,5,,6]),[4,Promise.all(md)];case 3:return vd.sent(),[4,this.mkFileReq()];case 4:return dd=vd.sent(),[3,6];case 5:throw gd=vd.sent(),gd instanceof QiniuRequestError&&(gd.code===612||gd.code===400)&&removeLocalFileInfo(hd,this.logger),gd;case 6:return removeLocalFileInfo(hd,this.logger),[2,dd]}})})},ed.prototype.uploadChunk=function(ud){return __awaiter$4(this,void 0,void 0,function(){var dd,hd,md,gd,yd,vd,Cd,wd,Nd,Ld=this;return __generator$4(this,function(Ud){switch(Ud.label){case 0:return dd=ud.index,hd=ud.chunk,md=this.cachedUploadedList[dd],this.logger.info("upload part "+dd+", cache:",md),gd=this.config.checkByMD5,yd=function(){Ld.usedCacheList[dd]=!0,Ld.updateChunkProgress(hd.size,dd),Ld.uploadedList[dd]=md,Ld.updateLocalCache()},md&&!gd?(yd(),[2]):[4,computeMd5(hd)];case 1:return vd=Ud.sent(),this.logger.info("computed part md5.",vd),md&&vd===md.md5?(yd(),[2]):(this.usedCacheList[dd]=!1,Cd=function(jd){Ld.updateChunkProgress(jd.loaded,dd)},wd={body:hd,md5:this.config.checkByServer?vd:void 0,onProgress:Cd,onCreate:function(jd){return Ld.addXhr(jd)}},this.logger.info("part "+dd+" start uploading."),[4,uploadChunk(this.token,this.key,ud.index+1,this.getUploadInfo(),wd)]);case 2:return Nd=Ud.sent(),this.logger.info("part "+dd+" upload completed."),Cd({loaded:hd.size,total:hd.size}),this.uploadedList[dd]={etag:Nd.data.etag,md5:Nd.data.md5,size:hd.size},this.updateLocalCache(),[2]}})})},ed.prototype.mkFileReq=function(){return __awaiter$4(this,void 0,void 0,function(){var ud,dd,hd=this;return __generator$4(this,function(md){switch(md.label){case 0:return ud=__assign$2(__assign$2(__assign$2({parts:this.uploadedList.map(function(gd,yd){return{etag:gd.etag,partNumber:yd+1}}),fname:this.putExtra.fname},this.putExtra.mimeType&&{mimeType:this.putExtra.mimeType}),this.putExtra.customVars&&{customVars:this.putExtra.customVars}),this.putExtra.metadata&&{metadata:this.putExtra.metadata}),this.logger.info("parts upload completed, make file.",ud),[4,uploadComplete(this.token,this.key,this.getUploadInfo(),{onCreate:function(gd){return hd.addXhr(gd)},body:JSON.stringify(ud)})];case 1:return dd=md.sent(),this.logger.info("finish Resume Progress."),this.updateMkFileProgress(1),[2,dd]}})})},ed.prototype.initBeforeUploadChunks=function(){return __awaiter$4(this,void 0,void 0,function(){var ud,dd,hd;return __generator$4(this,function(md){switch(md.label){case 0:return this.uploadedList=[],this.usedCacheList=[],ud=getLocalFileInfo(this.getLocalKey(),this.logger),ud?[3,2]:(this.logger.info("init upload parts from api."),[4,initUploadParts(this.token,this.bucketName,this.key,this.uploadHost.getUrl())]);case 1:return dd=md.sent(),this.logger.info("initd upload parts of id: "+dd.data.uploadId+"."),this.uploadId=dd.data.uploadId,this.cachedUploadedList=[],[3,3];case 2:hd=["resume upload parts from local cache,","total "+ud.data.length+" part,","id is "+ud.id+"."],this.logger.info(hd.join(" ")),this.cachedUploadedList=ud.data,this.uploadId=ud.id,md.label=3;case 3:return this.chunks=getChunks(this.file,this.config.chunkSize),this.loaded={mkFileProgress:0,chunks:this.chunks.map(function(gd){return 0})},this.notifyResumeProgress(),[2]}})})},ed.prototype.getUploadInfo=function(){return{id:this.uploadId,url:this.uploadHost.getUrl()}},ed.prototype.getLocalKey=function(){return createLocalKey(this.file.name,this.key,this.file.size)},ed.prototype.updateLocalCache=function(){setLocalFileInfo(this.getLocalKey(),{id:this.uploadId,data:this.uploadedList},this.logger)},ed.prototype.updateChunkProgress=function(ud,dd){this.loaded.chunks[dd]=ud,this.notifyResumeProgress()},ed.prototype.updateMkFileProgress=function(ud){this.loaded.mkFileProgress=ud,this.notifyResumeProgress()},ed.prototype.notifyResumeProgress=function(){var ud=this;this.progress={total:this.getProgressInfoItem(sum(this.loaded.chunks)+this.loaded.mkFileProgress,this.file.size+1),chunks:this.chunks.map(function(dd,hd){var md=ud.usedCacheList[hd];return ud.getProgressInfoItem(ud.loaded.chunks[hd],dd.size,md)}),uploadInfo:{id:this.uploadId,url:this.uploadHost.getUrl()}},this.onData(this.progress)},ed}(Base),__awaiter$3=function(Ra,ed,ud,dd){function hd(md){return md instanceof ud?md:new ud(function(gd){gd(md)})}return new(ud||(ud=Promise))(function(md,gd){function yd(wd){try{Cd(dd.next(wd))}catch(Nd){gd(Nd)}}function vd(wd){try{Cd(dd.throw(wd))}catch(Nd){gd(Nd)}}function Cd(wd){wd.done?md(wd.value):hd(wd.value).then(yd,vd)}Cd((dd=dd.apply(Ra,ed||[])).next())})},__generator$3=function(Ra,ed){var ud={label:0,sent:function(){if(md[0]&1)throw md[1];return md[1]},trys:[],ops:[]},dd,hd,md,gd;return gd={next:yd(0),throw:yd(1),return:yd(2)},typeof Symbol=="function"&&(gd[Symbol.iterator]=function(){return this}),gd;function yd(Cd){return function(wd){return vd([Cd,wd])}}function vd(Cd){if(dd)throw new TypeError("Generator is already executing.");for(;ud;)try{if(dd=1,hd&&(md=Cd[0]&2?hd.return:Cd[0]?hd.throw||((md=hd.return)&&md.call(hd),0):hd.next)&&!(md=md.call(hd,Cd[1])).done)return md;switch(hd=0,md&&(Cd=[Cd[0]&2,md.value]),Cd[0]){case 0:case 1:md=Cd;break;case 4:return ud.label++,{value:Cd[1],done:!1};case 5:ud.label++,hd=Cd[1],Cd=[0];continue;case 7:Cd=ud.ops.pop(),ud.trys.pop();continue;default:if(md=ud.trys,!(md=md.length>0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]>>1^3988292384:dd>>>=1;ed[ud]=dd}return ed},Ra.prototype.append=function(ed){for(var ud=this.crc,dd=0;dd>>8^this.table[(ud^ed[dd])&255];this.crc=ud},Ra.prototype.compute=function(){return(this.crc^-1)>>>0},Ra.prototype.readAsUint8Array=function(ed){return __awaiter$3(this,void 0,void 0,function(){var ud;return __generator$3(this,function(dd){switch(dd.label){case 0:return typeof ed.arrayBuffer!="function"?[3,2]:(ud=Uint8Array.bind,[4,ed.arrayBuffer()]);case 1:return[2,new(ud.apply(Uint8Array,[void 0,dd.sent()]))];case 2:return[2,new Promise(function(hd,md){var gd=new FileReader;gd.onload=function(){if(gd.result==null){md();return}if(typeof gd.result=="string"){md();return}hd(new Uint8Array(gd.result))},gd.readAsArrayBuffer(ed)})]}})})},Ra.prototype.file=function(ed){return __awaiter$3(this,void 0,void 0,function(){var ud,dd,hd,md,gd,yd;return __generator$3(this,function(vd){switch(vd.label){case 0:return ed.size<=MB?(ud=this.append,[4,this.readAsUint8Array(ed)]):[3,2];case 1:return ud.apply(this,[vd.sent()]),[2,this.compute()];case 2:dd=Math.ceil(ed.size/MB),hd=0,vd.label=3;case 3:return hd0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]0&&reportV3(Ra,ed,ud-1)};var hd=[ed.code||"",ed.reqId||"",ed.host||"",ed.remoteIp||"",ed.port||"",ed.duration||"",ed.time||"",ed.bytesSent||"",ed.upType||"",ed.size||""].join(",");dd.send(hd)}var __read$2=function(Ra,ed){var ud=typeof Symbol=="function"&&Ra[Symbol.iterator];if(!ud)return Ra;var dd=ud.call(Ra),hd,md=[],gd;try{for(;(ed===void 0||ed-- >0)&&!(hd=dd.next()).done;)md.push(hd.value)}catch(yd){gd={error:yd}}finally{try{hd&&!hd.done&&(ud=dd.return)&&ud.call(dd)}finally{if(gd)throw gd.error}}return md},__spread$2=function(){for(var Ra=[],ed=0;ed0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]0)&&!(hd=dd.next()).done;)md.push(hd.value)}catch(yd){gd={error:yd}}finally{try{hd&&!hd.done&&(ud=dd.return)&&ud.call(dd)}finally{if(gd)throw gd.error}}return md},__spread$1=function(){for(var Ra=[],ed=0;ed=ed},Ra.prototype.freeze=function(ed){ed===void 0&&(ed=20);var ud=new Date().getTime()+ed*1e3;unfreezeTimeMap.set(this.host,ud)},Ra.prototype.unfreeze=function(){unfreezeTimeMap.delete(this.host)},Ra.prototype.getUrl=function(){return this.protocol+"://"+this.host},Ra.prototype.getUnfreezeTime=function(){return unfreezeTimeMap.get(this.host)},Ra}(),HostPool=function(){function Ra(ed){ed===void 0&&(ed=[]),this.initHosts=ed,this.cachedHostsMap=new Map}return Ra.prototype.register=function(ed,ud,dd,hd){this.cachedHostsMap.set(ed+"@"+ud,dd.map(function(md){return new Host(md,hd)}))},Ra.prototype.refresh=function(ed,ud,dd){var hd,md,gd,yd;return __awaiter$1(this,void 0,void 0,function(){var vd,Cd,wd;return __generator$1(this,function(Nd){switch(Nd.label){case 0:return vd=this.cachedHostsMap.get(ed+"@"+ud)||[],vd.length>0?[2]:this.initHosts.length>0?(this.register(ed,ud,this.initHosts,dd),[2]):[4,getUpHosts(ed,ud,dd)];case 1:return Cd=Nd.sent(),(Cd==null?void 0:Cd.data)!=null&&(wd=__spread$1(((md=(hd=Cd.data.up)===null||hd===void 0?void 0:hd.acc)===null||md===void 0?void 0:md.main)||[],((yd=(gd=Cd.data.up)===null||gd===void 0?void 0:gd.acc)===null||yd===void 0?void 0:yd.backup)||[]),this.register(ed,ud,wd,dd)),[2]}})})},Ra.prototype.getUp=function(ed,ud,dd){return __awaiter$1(this,void 0,void 0,function(){var hd,md,gd;return __generator$1(this,function(yd){switch(yd.label){case 0:return[4,this.refresh(ed,ud,dd)];case 1:return yd.sent(),hd=this.cachedHostsMap.get(ed+"@"+ud)||[],hd.length===0?[2,null]:(md=hd.filter(function(vd){return!vd.isFrozen()}),md.length>0?[2,md[0]]:(gd=hd.slice().sort(function(vd,Cd){return(vd.getUnfreezeTime()||0)-(Cd.getUnfreezeTime()||0)}),[2,gd[0]]))}})})},Ra}();function createUploadManager(Ra,ed,ud,dd){return Ra.config&&Ra.config.forceDirect?(dd.info("ues forceDirect mode."),new Direct(Ra,ed,ud,dd)):Ra.file.size>4*MB?(dd.info("file size over 4M, use Resume."),new Resume(Ra,ed,ud,dd)):(dd.info("file size less or equal than 4M, use Direct."),new Direct(Ra,ed,ud,dd))}function upload(Ra,ed,ud,dd,hd){var md=new Logger(ud,hd==null?void 0:hd.disableStatisticsReport,hd==null?void 0:hd.debugLogLevel,Ra.name),gd={file:Ra,key:ed,token:ud,putExtra:dd,config:normalizeUploadConfig(hd,md)},yd=new HostPool(gd.config.uphost);return new Observable(function(vd){var Cd=createUploadManager(gd,{onData:function(wd){return vd.next(wd)},onError:function(wd){return vd.error(wd)},onComplete:function(wd){return vd.complete(wd)}},yd,md);return Cd.putFile(),Cd.stop.bind(Cd)})}var __assign$1=function(){return __assign$1=Object.assign||function(Ra){for(var ed,ud=1,dd=arguments.length;ud0)&&!(hd=dd.next()).done;)md.push(hd.value)}catch(yd){gd={error:yd}}finally{try{hd&&!hd.done&&(ud=dd.return)&&ud.call(dd)}finally{if(gd)throw gd.error}}return md},__spread=function(){for(var Ra=[],ed=0;ed0&&md[md.length-1])&&(Cd[0]===6||Cd[0]===2)){ud=0;continue}if(Cd[0]===3&&(!md||Cd[1]>md[0]&&Cd[1]this.file.size&&this.config.noCompressIfLarger?[2,{dist:this.file,width:ed.width,height:ed.height}]:[2,{dist:gd,width:md.width,height:md.height}]}})})},Ra.prototype.clear=function(ed,ud,dd){this.outputType===defaultType?(ed.fillStyle="#fff",ed.fillRect(0,0,ud,dd)):ed.clearRect(0,0,ud,dd)},Ra.prototype.getOriginImage=function(){var ed=this;return new Promise(function(ud,dd){var hd=createObjectURL(ed.file),md=new Image;md.onload=function(){ud(md)},md.onerror=function(){dd("image load error")},md.src=hd})},Ra.prototype.getCanvas=function(ed){var ud=this;return new Promise(function(dd,hd){var md=document.createElement("canvas"),gd=md.getContext("2d");if(!gd){hd(new QiniuError(QiniuErrorName.GetCanvasContextFailed,"context is null"));return}var yd=ed.width,vd=ed.height;md.height=vd,md.width=yd,ud.clear(gd,yd,vd),gd.drawImage(ed,0,0),dd(md)})},Ra.prototype.doScale=function(ed,ud){return __awaiter(this,void 0,void 0,function(){var dd,hd,md,gd,yd,vd,Cd,wd,Nd,Ld,Ud,jd,Gd,Yd,zd,qd;return __generator(this,function(Wd){if(ud===1)return[2,ed];if(dd=ed.getContext("2d"),hd=Math.min(maxSteps,Math.ceil(1/ud/scaleFactor)),md=Math.pow(ud,1/hd),gd=document.createElement("canvas"),yd=gd.getContext("2d"),vd=ed.width,Cd=ed.height,wd=vd,Nd=Cd,gd.width=vd,gd.height=Cd,!yd||!dd)throw new QiniuError(QiniuErrorName.GetCanvasContextFailed,"mctx or sctx can't be null");for(jd=0;jd=200&&Ud.status<300)pd(Ud.response,Ud);else{var Wd=new Error("the request is error");fd(Wd)}},Ud.open(Fd,rd,gd),Object.keys(Md).forEach(function(Wd){Ud.setRequestHeader(Wd,Md[Wd])});try{Ud.send(vd)}catch(Wd){fd(Wd)}})}}(ajax)),ajax}var utils={},md5={exports:{}},crypt={exports:{}},hasRequiredCrypt;function requireCrypt(){return hasRequiredCrypt||(hasRequiredCrypt=1,function(){var Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qa={rotl:function(rd,sd){return rd<>>32-sd},rotr:function(rd,sd){return rd<<32-sd|rd>>>sd},endian:function(rd){if(rd.constructor==Number)return qa.rotl(rd,8)&16711935|qa.rotl(rd,24)&4278255360;for(var sd=0;sd0;rd--)sd.push(Math.floor(Math.random()*256));return sd},bytesToWords:function(rd){for(var sd=[],pd=0,fd=0;pd>>5]|=rd[pd]<<24-fd%32;return sd},wordsToBytes:function(rd){for(var sd=[],pd=0;pd>>5]>>>24-pd%32&255);return sd},bytesToHex:function(rd){for(var sd=[],pd=0;pd>>4).toString(16)),sd.push((rd[pd]&15).toString(16));return sd.join("")},hexToBytes:function(rd){for(var sd=[],pd=0;pd>>6*(3-hd)&63)):sd.push("=");return sd.join("")},base64ToBytes:function(rd){rd=rd.replace(/[^A-Z0-9+\/]/ig,"");for(var sd=[],pd=0,fd=0;pd>>6-fd*2);return sd}};crypt.exports=qa}()),crypt.exports}var charenc_1,hasRequiredCharenc;function requireCharenc(){if(hasRequiredCharenc)return charenc_1;hasRequiredCharenc=1;var Ra={utf8:{stringToBytes:function(qa){return Ra.bin.stringToBytes(unescape(encodeURIComponent(qa)))},bytesToString:function(qa){return decodeURIComponent(escape(Ra.bin.bytesToString(qa)))}},bin:{stringToBytes:function(qa){for(var rd=[],sd=0;sd=200&&qd.status<300)hd(qd.response,qd);else{var Xd=new Error("the request is error");md(Xd)}},qd.open(jd,ud,vd),Object.keys(Ld).forEach(function(Xd){qd.setRequestHeader(Xd,Ld[Xd])});try{qd.send(wd)}catch(Xd){md(Xd)}})}}(ajax)),ajax}var utils={},md5={exports:{}},crypt={exports:{}},hasRequiredCrypt;function requireCrypt(){return hasRequiredCrypt||(hasRequiredCrypt=1,function(){var Ra="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ed={rotl:function(ud,dd){return ud<>>32-dd},rotr:function(ud,dd){return ud<<32-dd|ud>>>dd},endian:function(ud){if(ud.constructor==Number)return ed.rotl(ud,8)&16711935|ed.rotl(ud,24)&4278255360;for(var dd=0;dd0;ud--)dd.push(Math.floor(Math.random()*256));return dd},bytesToWords:function(ud){for(var dd=[],hd=0,md=0;hd>>5]|=ud[hd]<<24-md%32;return dd},wordsToBytes:function(ud){for(var dd=[],hd=0;hd>>5]>>>24-hd%32&255);return dd},bytesToHex:function(ud){for(var dd=[],hd=0;hd>>4).toString(16)),dd.push((ud[hd]&15).toString(16));return dd.join("")},hexToBytes:function(ud){for(var dd=[],hd=0;hd>>6*(3-gd)&63)):dd.push("=");return dd.join("")},base64ToBytes:function(ud){ud=ud.replace(/[^A-Z0-9+\/]/ig,"");for(var dd=[],hd=0,md=0;hd>>6-md*2);return dd}};crypt.exports=ed}()),crypt.exports}var charenc_1,hasRequiredCharenc;function requireCharenc(){if(hasRequiredCharenc)return charenc_1;hasRequiredCharenc=1;var Ra={utf8:{stringToBytes:function(ed){return Ra.bin.stringToBytes(unescape(encodeURIComponent(ed)))},bytesToString:function(ed){return decodeURIComponent(escape(Ra.bin.bytesToString(ed)))}},bin:{stringToBytes:function(ed){for(var ud=[],dd=0;dd * @license MIT - */var isBuffer_1,hasRequiredIsBuffer;function requireIsBuffer(){if(hasRequiredIsBuffer)return isBuffer_1;hasRequiredIsBuffer=1,isBuffer_1=function(rd){return rd!=null&&(Ra(rd)||qa(rd)||!!rd._isBuffer)};function Ra(rd){return!!rd.constructor&&typeof rd.constructor.isBuffer=="function"&&rd.constructor.isBuffer(rd)}function qa(rd){return typeof rd.readFloatLE=="function"&&typeof rd.slice=="function"&&Ra(rd.slice(0,0))}return isBuffer_1}var hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(){var Ra=requireCrypt(),qa=requireCharenc().utf8,rd=requireIsBuffer(),sd=requireCharenc().bin,pd=function(fd,hd){fd.constructor==String?hd&&hd.encoding==="binary"?fd=sd.stringToBytes(fd):fd=qa.stringToBytes(fd):rd(fd)?fd=Array.prototype.slice.call(fd,0):!Array.isArray(fd)&&fd.constructor!==Uint8Array&&(fd=fd.toString());for(var md=Ra.bytesToWords(fd),gd=fd.length*8,yd=1732584193,vd=-271733879,Nd=-1732584194,Md=271733878,Ld=0;Ld>>24)&16711935|(md[Ld]<<24|md[Ld]>>>8)&4278255360;md[gd>>>5]|=128<>>9<<4)+14]=gd;for(var Fd=pd._ff,Hd=pd._gg,Vd=pd._hh,Gd=pd._ii,Ld=0;Ld>>0,vd=vd+qd>>>0,Nd=Nd+Wd>>>0,Md=Md+Kd>>>0}return Ra.endian([yd,vd,Nd,Md])};pd._ff=function(fd,hd,md,gd,yd,vd,Nd){var Md=fd+(hd&md|~hd&gd)+(yd>>>0)+Nd;return(Md<>>32-vd)+hd},pd._gg=function(fd,hd,md,gd,yd,vd,Nd){var Md=fd+(hd&gd|md&~gd)+(yd>>>0)+Nd;return(Md<>>32-vd)+hd},pd._hh=function(fd,hd,md,gd,yd,vd,Nd){var Md=fd+(hd^md^gd)+(yd>>>0)+Nd;return(Md<>>32-vd)+hd},pd._ii=function(fd,hd,md,gd,yd,vd,Nd){var Md=fd+(md^(hd|~gd))+(yd>>>0)+Nd;return(Md<>>32-vd)+hd},pd._blocksize=16,pd._digestsize=16,md5.exports=function(fd,hd){if(fd==null)throw new Error("Illegal argument "+fd);var md=Ra.wordsToBytes(pd(fd,hd));return hd&&hd.asBytes?md:hd&&hd.asString?sd.bytesToString(md):Ra.bytesToHex(md)}}()),md5.exports}var digest={exports:{}};/*! ***** BEGIN LICENSE BLOCK ***** + */var isBuffer_1,hasRequiredIsBuffer;function requireIsBuffer(){if(hasRequiredIsBuffer)return isBuffer_1;hasRequiredIsBuffer=1,isBuffer_1=function(ud){return ud!=null&&(Ra(ud)||ed(ud)||!!ud._isBuffer)};function Ra(ud){return!!ud.constructor&&typeof ud.constructor.isBuffer=="function"&&ud.constructor.isBuffer(ud)}function ed(ud){return typeof ud.readFloatLE=="function"&&typeof ud.slice=="function"&&Ra(ud.slice(0,0))}return isBuffer_1}var hasRequiredMd5;function requireMd5(){return hasRequiredMd5||(hasRequiredMd5=1,function(){var Ra=requireCrypt(),ed=requireCharenc().utf8,ud=requireIsBuffer(),dd=requireCharenc().bin,hd=function(md,gd){md.constructor==String?gd&&gd.encoding==="binary"?md=dd.stringToBytes(md):md=ed.stringToBytes(md):ud(md)?md=Array.prototype.slice.call(md,0):!Array.isArray(md)&&md.constructor!==Uint8Array&&(md=md.toString());for(var yd=Ra.bytesToWords(md),vd=md.length*8,Cd=1732584193,wd=-271733879,Nd=-1732584194,Ld=271733878,Ud=0;Ud>>24)&16711935|(yd[Ud]<<24|yd[Ud]>>>8)&4278255360;yd[vd>>>5]|=128<>>9<<4)+14]=vd;for(var jd=hd._ff,Gd=hd._gg,Yd=hd._hh,zd=hd._ii,Ud=0;Ud>>0,wd=wd+Wd>>>0,Nd=Nd+Xd>>>0,Ld=Ld+Jd>>>0}return Ra.endian([Cd,wd,Nd,Ld])};hd._ff=function(md,gd,yd,vd,Cd,wd,Nd){var Ld=md+(gd&yd|~gd&vd)+(Cd>>>0)+Nd;return(Ld<>>32-wd)+gd},hd._gg=function(md,gd,yd,vd,Cd,wd,Nd){var Ld=md+(gd&vd|yd&~vd)+(Cd>>>0)+Nd;return(Ld<>>32-wd)+gd},hd._hh=function(md,gd,yd,vd,Cd,wd,Nd){var Ld=md+(gd^yd^vd)+(Cd>>>0)+Nd;return(Ld<>>32-wd)+gd},hd._ii=function(md,gd,yd,vd,Cd,wd,Nd){var Ld=md+(yd^(gd|~vd))+(Cd>>>0)+Nd;return(Ld<>>32-wd)+gd},hd._blocksize=16,hd._digestsize=16,md5.exports=function(md,gd){if(md==null)throw new Error("Illegal argument "+md);var yd=Ra.wordsToBytes(hd(md,gd));return gd&&gd.asBytes?yd:gd&&gd.asString?dd.bytesToString(yd):Ra.bytesToHex(yd)}}()),md5.exports}var digest={exports:{}};/*! ***** BEGIN LICENSE BLOCK ***** *! *! Copyright 2011-2012, 2014 Jean-Christophe Sirot *! @@ -1266,13 +1266,13 @@ object-assign *! You should have received a copy of the GNU General Public License along with *! digest.js. If not, see http://www.gnu.org/licenses/. *! - *! ***** END LICENSE BLOCK ***** */var hasRequiredDigest;function requireDigest(){return hasRequiredDigest||(hasRequiredDigest=1,function(Ra,qa){(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(rd,sd){var pd,fd=new Uint8Array(this);sd===void 0&&(sd=fd.length);var hd=new ArrayBuffer(sd-rd),md=new Uint8Array(hd);for(pd=0;pd>>31);for(Ud=0;Ud<80;Ud++)Gd=(Nd<<5|Nd>>>27)+Hd+Vd[Ud],Ud<20?Gd+=(Md&Ld|~Md&Fd)+1518500249|0:Ud<40?Gd+=(Md^Ld^Fd)+1859775393|0:Ud<60?Gd+=(Md&Ld|Md&Fd|Ld&Fd)+2400959708|0:Gd+=(Md^Ld^Fd)+3395469782|0,Hd=Fd,Fd=Ld,Ld=Md<<30|Md>>>2,Md=Nd,Nd=Gd;this.current[0]+=Nd,this.current[1]+=Md,this.current[2]+=Ld,this.current[3]+=Fd,this.current[4]+=Hd,this.currentLen+=64},sd.prototype.doPadding=function(){var vd=(this.inLen+this.currentLen)*8,Nd=0,Md=vd&4294967295,Ld=this.inLen<=55?55-this.inLen:119-this.inLen,Fd=new Uint8Array(new ArrayBuffer(Ld+1+8));return Fd[0]=128,Fd[Fd.length-1]=Md&255,Fd[Fd.length-2]=Md>>>8&255,Fd[Fd.length-3]=Md>>>16&255,Fd[Fd.length-4]=Md>>>24&255,Fd[Fd.length-5]=Nd&255,Fd[Fd.length-6]=Nd>>>8&255,Fd[Fd.length-7]=Nd>>>16&255,Fd[Fd.length-8]=Nd>>>24&255,Fd},sd.prototype.getDigest=function(){var vd=new Uint8Array(new ArrayBuffer(20));return vd[3]=this.current[0]&255,vd[2]=this.current[0]>>>8&255,vd[1]=this.current[0]>>>16&255,vd[0]=this.current[0]>>>24&255,vd[7]=this.current[1]&255,vd[6]=this.current[1]>>>8&255,vd[5]=this.current[1]>>>16&255,vd[4]=this.current[1]>>>24&255,vd[11]=this.current[2]&255,vd[10]=this.current[2]>>>8&255,vd[9]=this.current[2]>>>16&255,vd[8]=this.current[2]>>>24&255,vd[15]=this.current[3]&255,vd[14]=this.current[3]>>>8&255,vd[13]=this.current[3]>>>16&255,vd[12]=this.current[3]>>>24&255,vd[19]=this.current[4]&255,vd[18]=this.current[4]>>>8&255,vd[17]=this.current[4]>>>16&255,vd[16]=this.current[4]>>>24&255,vd.buffer},sd.prototype.reset=function(){this.currentLen=0,this.inLen=0,this.current=new Uint32Array(new ArrayBuffer(20)),this.current[0]=1732584193,this.current[1]=4023233417,this.current[2]=2562383102,this.current[3]=271733878,this.current[4]=3285377520},sd.prototype.blockLen=64,sd.prototype.digestLen=20;var pd=function(vd){var Nd=new ArrayBuffer(vd.length),Md=new Uint8Array(Nd),Ld;for(Ld=0;Ld255)throw"For more than one byte, use an array buffer";if(vd<0)throw"Input value must be positive";return fd(vd)}else throw"Unsupported type"},md=function(vd){var Nd=function(Fd){for(var Hd=Fd.length,Vd=0;Hd>0;){var Gd=this.blockLen-this.inLen;Gd>Hd&&(Gd=Hd);var Ud=Fd.subarray(Vd,Vd+Gd);this.inbuf.set(Ud,this.inLen),Vd+=Gd,Hd-=Gd,this.inLen+=Gd,this.inLen===this.blockLen&&(this.processBlock(this.inbuf),this.inLen=0)}},Md=function(){var Fd=this.doPadding();this.update(Fd);var Hd=this.getDigest();return this.reset(),Hd},Ld=function(){if(!vd)throw"Unsupported algorithm: "+vd.toString();vd.prototype.update=Nd,vd.prototype.finalize=Md;var Fd=new vd;return Fd.inbuf=new Uint8Array(new ArrayBuffer(Fd.blockLen)),Fd.reset(),Fd}();return{update:function(Fd){Ld.update(hd(Fd))},finalize:function(){return Ld.finalize()},digest:function(Fd){return Ld.update(hd(Fd)),Ld.finalize()},reset:function(){Ld.reset()},digestLength:function(){return Ld.digestLen}}},gd=function(vd){var Nd=!1,Md,Ld,Fd,Hd=function(){var qd,Wd;if(!Nd){if(Md===void 0)throw"MAC key is not defined";for(Md.byteLength>64?Wd=new Uint8Array(vd.digest(Md)):Wd=new Uint8Array(Md),Ld=new Uint8Array(new ArrayBuffer(64)),qd=0;qddf[0]?1:Xd[0]"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(Ra,qa,rd){var pd;if(native.randomUUID&&!qa&&!Ra)return native.randomUUID();Ra=Ra||{};const sd=Ra.random??((pd=Ra.rng)==null?void 0:pd.call(Ra))??rng();if(sd.length<16)throw new Error("Random bytes length must be >= 16");if(sd[6]=sd[6]&15|64,sd[8]=sd[8]&63|128,qa){if(rd=rd||0,rd<0||rd+16>qa.length)throw new RangeError(`UUID byte range ${rd}:${rd+15} is out of buffer bounds`);for(let fd=0;fd<16;++fd)qa[rd+fd]=sd[fd];return qa}return unsafeStringify(sd)}function getConfig(Ra,qa){if(Ra){const pd=qa==="github"?githubConfig:giteeConfig,{username:fd,repoList:hd,branch:md,accessTokenList:gd}=pd,yd=Math.floor(Math.random()*gd.length),vd=gd[yd].replace("doocsmd",""),Nd=Math.floor(Math.random()*hd.length),Md=hd[Nd];return{username:fd,repo:Md,branch:md,accessToken:vd}}const rd=JSON.parse(localStorage.getItem(`${qa}Config`)),sd=rd.repo.replace(`https://${qa}.com/`,"").replace(`http://${qa}.com/`,"").replace(`${qa}.com/`,"").split("/");return{username:sd[0],repo:sd[1],branch:rd.branch||"master",accessToken:rd.accessToken}}function getDir(){const Ra=new Date,qa=Ra.getFullYear(),rd=(Ra.getMonth()+1).toString().padStart(2,"0"),sd=Ra.getDate().toString().padStart(2,"0");return`${qa}/${rd}/${sd}`}function getDateFilename(Ra){const qa=new Date().getTime(),rd=Ra.split(".")[1];return`${qa}-${v4()}.${rd}`}async function ghFileUpload(Ra,qa){var Ld;const rd=localStorage.getItem("imgHost")==="default",{username:sd,repo:pd,branch:fd,accessToken:hd}=getConfig(rd,"github"),md=getDir(),gd=`https://api.github.com/repos/${sd}/${pd}/contents/${md}/`,yd=getDateFilename(qa),vd=await service({url:gd+yd,method:"put",headers:{Authorization:`token ${hd}`},data:{content:Ra,branch:fd,message:`Upload by ${window.location.href}`}}),Nd=`raw.githubusercontent.com/${sd}/${pd}/${fd}/`,Md=`fastly.jsdelivr.net/gh/${sd}/${pd}@${fd}/`;return vd.content=((Ld=vd.data)==null?void 0:Ld.content)||vd.content,rd?vd.content.download_url.replace(Nd,Md):vd.content.download_url}async function giteeUpload(Ra,qa){var Nd;const rd=localStorage.getItem("imgHost")==="default",{username:sd,repo:pd,branch:fd,accessToken:hd}=getConfig(rd,"gitee"),md=getDir(),gd=getDateFilename(qa),yd=`https://gitee.com/api/v5/repos/${sd}/${pd}/contents/${md}/${gd}`,vd=await service({url:yd,method:"POST",data:{content:Ra,branch:fd,access_token:hd,message:`Upload by ${window.location.href}`}});return vd.content=((Nd=vd.data)==null?void 0:Nd.content)||vd.content,encodeURI(vd.content.download_url)}function getQiniuToken(Ra,qa,rd){const sd=JSON.stringify(rd),pd=base64encode(utf16to8(sd)),hd=CryptoJS.HmacSHA1(pd,qa).toString(CryptoJS.enc.Base64);return`${Ra}:${safe64(hd)}:${pd}`}async function qiniuUpload(Ra){const{accessKey:qa,secretKey:rd,bucket:sd,region:pd,path:fd,domain:hd}=JSON.parse(localStorage.getItem("qiniuConfig")),md=getQiniuToken(qa,rd,{scope:sd,deadline:Math.trunc(new Date().getTime()/1e3)+3600}),yd=(fd?`${fd}/`:"")+getDateFilename(Ra.name),vd=upload(Ra,yd,md,{},{region:pd});return new Promise((Nd,Md)=>{vd.subscribe({next:Ld=>{console.log(Ld)},error:Ld=>{Md(Ld.message)},complete:Ld=>{Nd(`${hd}/${Ld.key}`)}})})}async function aliOSSFileUpload(Ra){const qa=getDateFilename(Ra.name),{region:rd,bucket:sd,accessKeyId:pd,accessKeySecret:fd,useSSL:hd,cdnHost:md,path:gd}=JSON.parse(localStorage.getItem("aliOSSConfig")),yd=gd?`${gd}/${qa}`:qa,vd=hd===void 0||hd,Nd=vd?"https":"http",Md=new OSS({region:rd,bucket:sd,accessKeyId:pd,accessKeySecret:fd,secure:vd});try{return await Md.put(yd,Ra),md?`${md}/${yd}`:`${Nd}://${sd}.${rd}.aliyuncs.com/${yd}`}catch(Ld){return Promise.reject(Ld)}}async function txCOSFileUpload(Ra){const qa=getDateFilename(Ra.name),{secretId:rd,secretKey:sd,bucket:pd,region:fd,path:hd,cdnHost:md}=JSON.parse(localStorage.getItem("txCOSConfig")),gd=new COS({SecretId:rd,SecretKey:sd});return new Promise((yd,vd)=>{gd.putObject({Bucket:pd,Region:fd,Key:`${hd}/${qa}`,Body:Ra},(Nd,Md)=>{Nd?vd(Nd):yd(md?hd===""?`${md}/${qa}`:`${md}/${hd}/${qa}`:`https://${Md.Location}`)})})}async function minioFileUpload(Ra,qa){const rd=getDateFilename(qa),{endpoint:sd,port:pd,useSSL:fd,bucket:hd,accessKey:md,secretKey:gd}=JSON.parse(localStorage.getItem("minioConfig")),yd=Buffer$1(Ra,"base64"),vd={endPoint:sd,useSSL:fd,accessKey:md,secretKey:gd},Nd=Number(pd||0),Md=Nd>0&&Nd!==80&&Nd!==443;return Md&&(vd.port=Nd),new Promise((Ld,Fd)=>{const Hd=new Client(vd);try{Hd.putObject(hd,rd,yd,Vd=>{Vd&&Fd(Vd);const Ud=`${`${fd?"https://":"http://"}${sd}${Md?`:${pd}`:""}`}/${hd}/${rd}`;Ld(Ud)})}catch(Vd){Fd(Vd)}})}async function getMpToken(Ra,qa,rd){const sd=localStorage.getItem(`mpToken:${Ra}`);if(sd){const md=JSON.parse(sd);if(md.expire&&md.expire>new Date().getTime())return md.access_token}const pd={method:"POST",data:{grant_type:"client_credential",appid:Ra,secret:qa}};let fd="https://api.weixin.qq.com/cgi-bin/stable_token";rd&&(fd=`${rd}/cgi-bin/stable_token`);const hd=await service(fd,pd);if(hd.access_token){const md={...hd,expire:new Date().getTime()+hd.expires_in*1e3};return localStorage.setItem(`mpToken:${Ra}`,JSON.stringify(md)),hd.access_token}return""}async function mpFileUpload(Ra){const{appID:qa,appsecret:rd,proxyOrigin:sd}=JSON.parse(localStorage.getItem("mpConfig")),pd=await getMpToken(qa,rd,sd);if(!pd)throw new Error("获取 access_token 失败");const fd=new FormData;fd.append("media",Ra,Ra.name);const hd={method:"POST",data:fd};let md=`https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=${pd}&type=image`;sd&&(md=`${sd}/cgi-bin/material/add_material?access_token=${pd}&type=image`);const gd=await service(md,hd);if(!gd.url)throw new Error("上传失败,未获取到URL");let yd=gd.url;return sd&&window.location.href.startsWith("http")&&(yd=`https://wsrv.nl?url=${encodeURIComponent(yd)}`),yd}async function r2Upload(Ra){const{accountId:qa,accessKey:rd,secretKey:sd,bucket:pd,path:fd,domain:hd}=JSON.parse(localStorage.getItem("r2Config")),gd=(fd?`${fd}/`:"")+getDateFilename(Ra.name),yd=new S3Client({region:"auto",endpoint:`https://${qa}.r2.cloudflarestorage.com`,credentials:{accessKeyId:rd,secretAccessKey:sd}});return new Promise((vd,Nd)=>{const Md=new PutObjectCommand({Bucket:pd,Key:gd,ContentType:Ra.type,Body:Ra});yd.send(Md).then(()=>{vd(`${hd}/${gd}`)}).catch(Ld=>{Nd(Ld)})})}async function formCustomUpload(content,file){const str=` + *! ***** END LICENSE BLOCK ***** */var hasRequiredDigest;function requireDigest(){return hasRequiredDigest||(hasRequiredDigest=1,function(Ra,ed){(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(ud,dd){var hd,md=new Uint8Array(this);dd===void 0&&(dd=md.length);var gd=new ArrayBuffer(dd-ud),yd=new Uint8Array(gd);for(hd=0;hd>>31);for(qd=0;qd<80;qd++)zd=(Nd<<5|Nd>>>27)+Gd+Yd[qd],qd<20?zd+=(Ld&Ud|~Ld&jd)+1518500249|0:qd<40?zd+=(Ld^Ud^jd)+1859775393|0:qd<60?zd+=(Ld&Ud|Ld&jd|Ud&jd)+2400959708|0:zd+=(Ld^Ud^jd)+3395469782|0,Gd=jd,jd=Ud,Ud=Ld<<30|Ld>>>2,Ld=Nd,Nd=zd;this.current[0]+=Nd,this.current[1]+=Ld,this.current[2]+=Ud,this.current[3]+=jd,this.current[4]+=Gd,this.currentLen+=64},dd.prototype.doPadding=function(){var wd=(this.inLen+this.currentLen)*8,Nd=0,Ld=wd&4294967295,Ud=this.inLen<=55?55-this.inLen:119-this.inLen,jd=new Uint8Array(new ArrayBuffer(Ud+1+8));return jd[0]=128,jd[jd.length-1]=Ld&255,jd[jd.length-2]=Ld>>>8&255,jd[jd.length-3]=Ld>>>16&255,jd[jd.length-4]=Ld>>>24&255,jd[jd.length-5]=Nd&255,jd[jd.length-6]=Nd>>>8&255,jd[jd.length-7]=Nd>>>16&255,jd[jd.length-8]=Nd>>>24&255,jd},dd.prototype.getDigest=function(){var wd=new Uint8Array(new ArrayBuffer(20));return wd[3]=this.current[0]&255,wd[2]=this.current[0]>>>8&255,wd[1]=this.current[0]>>>16&255,wd[0]=this.current[0]>>>24&255,wd[7]=this.current[1]&255,wd[6]=this.current[1]>>>8&255,wd[5]=this.current[1]>>>16&255,wd[4]=this.current[1]>>>24&255,wd[11]=this.current[2]&255,wd[10]=this.current[2]>>>8&255,wd[9]=this.current[2]>>>16&255,wd[8]=this.current[2]>>>24&255,wd[15]=this.current[3]&255,wd[14]=this.current[3]>>>8&255,wd[13]=this.current[3]>>>16&255,wd[12]=this.current[3]>>>24&255,wd[19]=this.current[4]&255,wd[18]=this.current[4]>>>8&255,wd[17]=this.current[4]>>>16&255,wd[16]=this.current[4]>>>24&255,wd.buffer},dd.prototype.reset=function(){this.currentLen=0,this.inLen=0,this.current=new Uint32Array(new ArrayBuffer(20)),this.current[0]=1732584193,this.current[1]=4023233417,this.current[2]=2562383102,this.current[3]=271733878,this.current[4]=3285377520},dd.prototype.blockLen=64,dd.prototype.digestLen=20;var hd=function(wd){var Nd=new ArrayBuffer(wd.length),Ld=new Uint8Array(Nd),Ud;for(Ud=0;Ud255)throw"For more than one byte, use an array buffer";if(wd<0)throw"Input value must be positive";return md(wd)}else throw"Unsupported type"},yd=function(wd){var Nd=function(jd){for(var Gd=jd.length,Yd=0;Gd>0;){var zd=this.blockLen-this.inLen;zd>Gd&&(zd=Gd);var qd=jd.subarray(Yd,Yd+zd);this.inbuf.set(qd,this.inLen),Yd+=zd,Gd-=zd,this.inLen+=zd,this.inLen===this.blockLen&&(this.processBlock(this.inbuf),this.inLen=0)}},Ld=function(){var jd=this.doPadding();this.update(jd);var Gd=this.getDigest();return this.reset(),Gd},Ud=function(){if(!wd)throw"Unsupported algorithm: "+wd.toString();wd.prototype.update=Nd,wd.prototype.finalize=Ld;var jd=new wd;return jd.inbuf=new Uint8Array(new ArrayBuffer(jd.blockLen)),jd.reset(),jd}();return{update:function(jd){Ud.update(gd(jd))},finalize:function(){return Ud.finalize()},digest:function(jd){return Ud.update(gd(jd)),Ud.finalize()},reset:function(){Ud.reset()},digestLength:function(){return Ud.digestLen}}},vd=function(wd){var Nd=!1,Ld,Ud,jd,Gd=function(){var Wd,Xd;if(!Nd){if(Ld===void 0)throw"MAC key is not defined";for(Ld.byteLength>64?Xd=new Uint8Array(wd.digest(Ld)):Xd=new Uint8Array(Ld),Ud=new Uint8Array(new ArrayBuffer(64)),Wd=0;Wdmf[0]?1:Zd[0]"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(Ra,ed,ud){var hd;if(native.randomUUID&&!ed&&!Ra)return native.randomUUID();Ra=Ra||{};const dd=Ra.random??((hd=Ra.rng)==null?void 0:hd.call(Ra))??rng();if(dd.length<16)throw new Error("Random bytes length must be >= 16");if(dd[6]=dd[6]&15|64,dd[8]=dd[8]&63|128,ed){if(ud=ud||0,ud<0||ud+16>ed.length)throw new RangeError(`UUID byte range ${ud}:${ud+15} is out of buffer bounds`);for(let md=0;md<16;++md)ed[ud+md]=dd[md];return ed}return unsafeStringify(dd)}function getConfig(Ra,ed){if(Ra){const hd=ed==="github"?githubConfig:giteeConfig,{username:md,repoList:gd,branch:yd,accessTokenList:vd}=hd,Cd=Math.floor(Math.random()*vd.length),wd=vd[Cd].replace("doocsmd",""),Nd=Math.floor(Math.random()*gd.length),Ld=gd[Nd];return{username:md,repo:Ld,branch:yd,accessToken:wd}}const ud=JSON.parse(localStorage.getItem(`${ed}Config`)),dd=ud.repo.replace(`https://${ed}.com/`,"").replace(`http://${ed}.com/`,"").replace(`${ed}.com/`,"").split("/");return{username:dd[0],repo:dd[1],branch:ud.branch||"master",accessToken:ud.accessToken}}function getDir(){const Ra=new Date,ed=Ra.getFullYear(),ud=(Ra.getMonth()+1).toString().padStart(2,"0"),dd=Ra.getDate().toString().padStart(2,"0");return`${ed}/${ud}/${dd}`}function getDateFilename(Ra){const ed=new Date().getTime(),ud=Ra.split(".")[1];return`${ed}-${v4()}.${ud}`}async function ghFileUpload(Ra,ed){var Ud;const ud=localStorage.getItem("imgHost")==="default",{username:dd,repo:hd,branch:md,accessToken:gd}=getConfig(ud,"github"),yd=getDir(),vd=`https://api.github.com/repos/${dd}/${hd}/contents/${yd}/`,Cd=getDateFilename(ed),wd=await service({url:vd+Cd,method:"put",headers:{Authorization:`token ${gd}`},data:{content:Ra,branch:md,message:`Upload by ${window.location.href}`}}),Nd=`raw.githubusercontent.com/${dd}/${hd}/${md}/`,Ld=`fastly.jsdelivr.net/gh/${dd}/${hd}@${md}/`;return wd.content=((Ud=wd.data)==null?void 0:Ud.content)||wd.content,ud?wd.content.download_url.replace(Nd,Ld):wd.content.download_url}async function giteeUpload(Ra,ed){var Nd;const ud=localStorage.getItem("imgHost")==="default",{username:dd,repo:hd,branch:md,accessToken:gd}=getConfig(ud,"gitee"),yd=getDir(),vd=getDateFilename(ed),Cd=`https://gitee.com/api/v5/repos/${dd}/${hd}/contents/${yd}/${vd}`,wd=await service({url:Cd,method:"POST",data:{content:Ra,branch:md,access_token:gd,message:`Upload by ${window.location.href}`}});return wd.content=((Nd=wd.data)==null?void 0:Nd.content)||wd.content,encodeURI(wd.content.download_url)}function getQiniuToken(Ra,ed,ud){const dd=JSON.stringify(ud),hd=base64encode(utf16to8(dd)),gd=CryptoJS.HmacSHA1(hd,ed).toString(CryptoJS.enc.Base64);return`${Ra}:${safe64(gd)}:${hd}`}async function qiniuUpload(Ra){const{accessKey:ed,secretKey:ud,bucket:dd,region:hd,path:md,domain:gd}=JSON.parse(localStorage.getItem("qiniuConfig")),yd=getQiniuToken(ed,ud,{scope:dd,deadline:Math.trunc(new Date().getTime()/1e3)+3600}),Cd=(md?`${md}/`:"")+getDateFilename(Ra.name),wd=upload(Ra,Cd,yd,{},{region:hd});return new Promise((Nd,Ld)=>{wd.subscribe({next:Ud=>{console.log(Ud)},error:Ud=>{Ld(Ud.message)},complete:Ud=>{Nd(`${gd}/${Ud.key}`)}})})}async function aliOSSFileUpload(Ra){const ed=getDateFilename(Ra.name),{region:ud,bucket:dd,accessKeyId:hd,accessKeySecret:md,useSSL:gd,cdnHost:yd,path:vd}=JSON.parse(localStorage.getItem("aliOSSConfig")),Cd=vd?`${vd}/${ed}`:ed,wd=gd===void 0||gd,Nd=wd?"https":"http",Ld=new OSS({region:ud,bucket:dd,accessKeyId:hd,accessKeySecret:md,secure:wd});try{return await Ld.put(Cd,Ra),yd?`${yd}/${Cd}`:`${Nd}://${dd}.${ud}.aliyuncs.com/${Cd}`}catch(Ud){return Promise.reject(Ud)}}async function txCOSFileUpload(Ra){const ed=getDateFilename(Ra.name),{secretId:ud,secretKey:dd,bucket:hd,region:md,path:gd,cdnHost:yd}=JSON.parse(localStorage.getItem("txCOSConfig")),vd=new COS({SecretId:ud,SecretKey:dd});return new Promise((Cd,wd)=>{vd.putObject({Bucket:hd,Region:md,Key:`${gd}/${ed}`,Body:Ra},(Nd,Ld)=>{Nd?wd(Nd):Cd(yd?gd===""?`${yd}/${ed}`:`${yd}/${gd}/${ed}`:`https://${Ld.Location}`)})})}async function minioFileUpload(Ra,ed){const ud=getDateFilename(ed),{endpoint:dd,port:hd,useSSL:md,bucket:gd,accessKey:yd,secretKey:vd}=JSON.parse(localStorage.getItem("minioConfig")),Cd=Buffer$1(Ra,"base64"),wd={endPoint:dd,useSSL:md,accessKey:yd,secretKey:vd},Nd=Number(hd||0),Ld=Nd>0&&Nd!==80&&Nd!==443;return Ld&&(wd.port=Nd),new Promise((Ud,jd)=>{const Gd=new Client(wd);try{Gd.putObject(gd,ud,Cd,Yd=>{Yd&&jd(Yd);const qd=`${`${md?"https://":"http://"}${dd}${Ld?`:${hd}`:""}`}/${gd}/${ud}`;Ud(qd)})}catch(Yd){jd(Yd)}})}async function getMpToken(Ra,ed,ud){const dd=localStorage.getItem(`mpToken:${Ra}`);if(dd){const yd=JSON.parse(dd);if(yd.expire&&yd.expire>new Date().getTime())return yd.access_token}const hd={method:"POST",data:{grant_type:"client_credential",appid:Ra,secret:ed}};let md="https://api.weixin.qq.com/cgi-bin/stable_token";ud&&(md=`${ud}/cgi-bin/stable_token`);const gd=await service(md,hd);if(gd.access_token){const yd={...gd,expire:new Date().getTime()+gd.expires_in*1e3};return localStorage.setItem(`mpToken:${Ra}`,JSON.stringify(yd)),gd.access_token}return""}async function mpFileUpload(Ra){const{appID:ed,appsecret:ud,proxyOrigin:dd}=JSON.parse(localStorage.getItem("mpConfig")),hd=await getMpToken(ed,ud,dd);if(!hd)throw new Error("获取 access_token 失败");const md=new FormData;md.append("media",Ra,Ra.name);const gd={method:"POST",data:md};let yd=`https://api.weixin.qq.com/cgi-bin/material/add_material?access_token=${hd}&type=image`;dd&&(yd=`${dd}/cgi-bin/material/add_material?access_token=${hd}&type=image`);const vd=await service(yd,gd);if(!vd.url)throw new Error("上传失败,未获取到URL");let Cd=vd.url;return dd&&window.location.href.startsWith("http")&&(Cd=`https://wsrv.nl?url=${encodeURIComponent(Cd)}`),Cd}async function r2Upload(Ra){const{accountId:ed,accessKey:ud,secretKey:dd,bucket:hd,path:md,domain:gd}=JSON.parse(localStorage.getItem("r2Config")),vd=(md?`${md}/`:"")+getDateFilename(Ra.name),Cd=new S3Client({region:"auto",endpoint:`https://${ed}.r2.cloudflarestorage.com`,credentials:{accessKeyId:ud,secretAccessKey:dd}}),wd=await getSignedUrl(Cd,new PutObjectCommand({Bucket:hd,Key:vd,ContentType:Ra.type}),{expiresIn:300});return await service(wd,{method:"PUT",headers:{"Content-Type":Ra.type},data:Ra}).catch(Nd=>{console.log(Nd)}),`${gd}/${vd}`}async function formCustomUpload(content,file){const str=` async (CUSTOM_ARG) => { ${localStorage.getItem("formCustomConfig")} } - `;return new Promise((resolve,reject)=>{const exportObj={content,file,util:{axios:service,CryptoJS,OSS,COS,Buffer:Buffer$1,uuidv4:v4,qiniu,tokenTools,getDir,getDateFilename},okCb:resolve,errCb:reject};eval(str)(exportObj).catch(Ra=>{console.error(Ra),reject(Ra)})})}function fileUpload(Ra,qa){const rd=localStorage.getItem("imgHost");switch(rd||localStorage.setItem("imgHost","default"),rd){case"aliOSS":return aliOSSFileUpload(qa);case"minio":return minioFileUpload(Ra,qa.name);case"txCOS":return txCOSFileUpload(qa);case"qiniu":return qiniuUpload(qa);case"gitee":return giteeUpload(Ra,qa.name);case"github":return ghFileUpload(Ra,qa.name);case"mp":return mpFileUpload(qa);case"r2":return r2Upload(qa);case"formCustom":return formCustomUpload(Ra,qa);default:return ghFileUpload(Ra,qa.name)}}const fileApi={fileUpload},_hoisted_1={class:"container-main flex flex-1 flex-col"},_hoisted_2={class:"container-main-section border-radius-10 relative flex flex-1 overflow-hidden border-1"},_hoisted_3={class:"preview border-x-1 shadow-xl"},_hoisted_4=["innerHTML"],_hoisted_5={key:0,class:"loading-mask"},_hoisted_6={class:"h-[30px] flex select-none items-center justify-end px-4 text-[12px]"},_sfc_main$1=defineComponent({__name:"CodemirrorEditor",setup(Ra){const qa=useStore(),rd=useDisplayStore(),{isDark:sd,output:pd,editor:fd,readingTime:hd}=storeToRefs(qa),{editorRefresh:md,exportEditorContent2HTML:gd,exportEditorContent2MD:yd,formatContent:vd,importMarkdownContent:Nd,resetStyleConfirm:Md}=qa,{toggleShowInsertFormDialog:Ld,toggleShowUploadImgDialog:Fd}=rd,Hd=ref$1(!1),Vd=ref$1(),Gd=ref$1(null);function Ud(){const Pf=Eh=>{let Mh,dh;clearTimeout(Vd.value),Eh==="preview"?(Mh=Gd.value,dh=document.querySelector(".CodeMirror-scroll"),fd.value.off("scroll",lh),Vd.value=setTimeout(()=>{fd.value.on("scroll",lh)},300)):(Mh=document.querySelector(".CodeMirror-scroll"),dh=Gd.value,dh.removeEventListener("scroll",xh,!1),Vd.value=setTimeout(()=>{dh.addEventListener("scroll",xh,!1)},300));const fh=Mh.scrollTop/(Mh.scrollHeight-Mh.offsetHeight)*(dh.scrollHeight-dh.offsetHeight);dh.scrollTo(0,fh)};function lh(){Pf("editor")}function xh(){Pf("preview")}Gd.value.addEventListener("scroll",xh,!1),fd.value.on("scroll",lh)}onMounted(()=>{setTimeout(()=>{Ud()},300)});function qd(){md()}const Wd=ref$1(!1),Kd=ref$1(!1);function Xd(){Kd.value=!0,Wd.value=!0}function df(){Wd.value=!1,setTimeout(()=>{Kd.value=!1},800)}function Ef(Pf){const lh=checkImage(Pf);if(!lh.ok)return Ke.error(lh.msg),!1;const xh=localStorage.getItem("imgHost")||"default";localStorage.setItem("imgHost",xh);const Eh=localStorage.getItem(`${xh}Config`);return xh==="default"||Eh?!0:(Ke.error(`请先配置 ${xh} 图床参数`),!1)}function pf(Pf){if(!Pf){Ke.error("上传图片未知异常");return}Fd(!1);const lh=fd.value.getCursor(),xh=`![](${Pf})`;toRaw(qa.editor).replaceSelection(` -${xh} -`,lh),Ke.success("图片上传成功")}function mf(Pf,lh){Hd.value=!0,toBase64$2(Pf).then(xh=>fileApi.fileUpload(xh,Pf)).then(xh=>{lh?lh(xh):pf(xh)}).catch(xh=>{Ke.error(xh.message)}).finally(()=>{Hd.value=!1})}const _f=ref$1();watch(sd,()=>{var lh,xh;const Pf=sd.value?"darcula":"xq-light";(xh=(lh=toRaw(fd.value))==null?void 0:lh.setOption)==null||xh.call(lh,"theme",Pf)});function xf(){const Pf=document.querySelector("#editor");Pf.value||(Pf.value=qa.posts[qa.currentPostIndex].content),fd.value=CodeMirror.fromTextArea(Pf,{mode:"text/x-markdown",theme:sd.value?"darcula":"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:{[`${shiftKey}-${altKey}-F`]:function(xh){formatDoc(xh.getValue()).then(Eh=>{xh.setValue(Eh)})},[`${ctrlKey}-B`]:function(xh){const Eh=xh.getSelection();xh.replaceSelection(`**${Eh}**`)},[`${ctrlKey}-I`]:function(xh){const Eh=xh.getSelection();xh.replaceSelection(`*${Eh}*`)},[`${ctrlKey}-D`]:function(xh){const Eh=xh.getSelection();xh.replaceSelection(`~~${Eh}~~`)},[`${ctrlKey}-K`]:function(xh){const Eh=xh.getSelection();xh.replaceSelection(`[${Eh}]()`)},[`${ctrlKey}-E`]:function(xh){const Eh=xh.getSelection();xh.replaceSelection(`\`${Eh}\``)},[`${ctrlKey}-L`]:function(xh){const Eh=xh.getSelection();xh.replaceSelection(`\`${Eh}\``)}}}),fd.value.on("change",lh=>{clearTimeout(_f.value),_f.value=setTimeout(()=>{qd(),qa.posts[qa.currentPostIndex].content=lh.getValue()},300)}),fd.value.on("paste",(lh,xh)=>{if(!(!(xh.clipboardData&&xh.clipboardData.items)||Hd.value))for(let Eh=0,Mh=xh.clipboardData.items.length;Eh{const eh=[...Mh.str.matchAll(/!\[(.*?)\]\((.*?)\)/g)||[]].filter(vh=>vh),fh=Mh.path.match(/.+?\//)[0];(await Promise.all(eh.map(vh=>new Promise(Df=>{let[,,Af]=vh;Af=Af.replace(/^.\//,"");const{file:_h}=dh.find(Nh=>Nh.path===`${fh}${Af}`)||{};mf(_h,Nh=>{Df({matchStr:Af,url:Nh})})})))).forEach(vh=>{Mh.str=Mh.str.replace(`](./${vh.matchStr})`,`](${vh.url})`).replace(`](${vh.matchStr})`,`](${vh.url})`)}),fd.value.setValue(Mh.str)};Pf.ondragover=Mh=>Mh.preventDefault(),Pf.ondrop=async Mh=>{Mh.preventDefault();for(const dh of Mh.dataTransfer.items)dh.getAsFileSystemHandle().then(async eh=>{if(eh.kind==="directory"){const fh=await Eh(eh),Sh=await xh({list:fh});lh({md:Sh,list:fh})}else{const fh=await eh.getFile();console.log("file",fh)}})};async function xh({list:Mh}){return new Promise(dh=>{const{path:eh,file:fh}=Mh.find(vh=>vh.path.match(/\.md$/)),Sh=new FileReader;Sh.readAsText(fh,"UTF-8"),Sh.onload=vh=>{dh({str:vh.target.result,file:fh,path:eh})}})}async function Eh(Mh){const dh=[];let eh="";try{const fh=[Mh];for(const Sh of fh){eh+=`${Sh.name}/`;for await(const[,vh]of Sh)vh.kind==="file"?dh.push({path:eh+vh.name,file:await vh.getFile()}):(dh.push({path:`${eh+vh.name}/`}),fh.push(vh))}}catch(fh){console.error(fh)}return dh}}return onMounted(()=>{xf(),qd(),wf()}),(Pf,lh)=>{var fm,zh;const xh=__unplugin_components_0,Eh=_sfc_main$C,Mh=_sfc_main$I,dh=_sfc_main$J,eh=_sfc_main$K,fh=_sfc_main$L,Sh=_sfc_main$M,vh=_sfc_main$N,Df=_sfc_main$O,Af=__unplugin_components_9,_h=_sfc_main$R,Nh=_sfc_main$S,dm=_sfc_main$15,Jf=__unplugin_components_13$1,oh=_sfc_main$1j,Xh=_sfc_main$1k,Tm=_sfc_main$1l,kh=_sfc_main$1m,Zf=_sfc_main$1n,th=_sfc_main$1p,$h=_sfc_main$1q,wh=_sfc_main$1r;return openBlock(),createElementBlock("div",{ref_key:"container",ref:Cf,class:"container flex flex-col"},[createVNode(xh,{onAddFormat:If,onFormatContent:unref(vd),onStartCopy:Xd,onEndCopy:df},null,8,["onFormatContent"]),createBaseVNode("main",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createVNode(Eh),createBaseVNode("div",{ref_key:"codeMirrorWrapper",ref:Sf,class:normalizeClass(["codeMirror-wrapper flex-1",{"order-1 border-l":!unref(qa).isEditOnLeft,"border-r":unref(qa).isEditOnLeft}])},[createVNode(vh,null,{default:withCtx(()=>[createVNode(Mh,null,{default:withCtx(()=>lh[9]||(lh[9]=[createBaseVNode("textarea",{id:"editor",type:"textarea",placeholder:"Your markdown text here."},null,-1)])),_:1}),createVNode(Sh,{class:"w-64"},{default:withCtx(()=>[createVNode(dh,{inset:"",onClick:lh[0]||(lh[0]=Mm=>unref(Fd)())},{default:withCtx(()=>lh[10]||(lh[10]=[createTextVNode(" 上传图片 ")])),_:1}),createVNode(dh,{inset:"",onClick:lh[1]||(lh[1]=Mm=>unref(Ld)())},{default:withCtx(()=>lh[11]||(lh[11]=[createTextVNode(" 插入表格 ")])),_:1}),createVNode(dh,{inset:"",onClick:lh[2]||(lh[2]=Mm=>unref(Md)())},{default:withCtx(()=>lh[12]||(lh[12]=[createTextVNode(" 恢复默认样式 ")])),_:1}),createVNode(eh),createVNode(dh,{inset:"",onClick:lh[3]||(lh[3]=Mm=>unref(Nd)())},{default:withCtx(()=>lh[13]||(lh[13]=[createTextVNode(" 导入 .md 文档 ")])),_:1}),createVNode(dh,{inset:"",onClick:lh[4]||(lh[4]=Mm=>unref(yd)())},{default:withCtx(()=>lh[14]||(lh[14]=[createTextVNode(" 导出 .md 文档 ")])),_:1}),createVNode(dh,{inset:"",onClick:lh[5]||(lh[5]=Mm=>unref(gd)())},{default:withCtx(()=>lh[15]||(lh[15]=[createTextVNode(" 导出 .html ")])),_:1}),createVNode(dh,{inset:"",onClick:lh[6]||(lh[6]=Mm=>unref(vd)())},{default:withCtx(()=>[lh[16]||(lh[16]=createTextVNode(" 格式化 ")),createVNode(fh,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(altSign))+" + "+toDisplayString(unref(shiftSign))+" + F",1)]),_:1})]),_:1})]),_:1})]),_:1})],2),createBaseVNode("div",{id:"preview",ref_key:"preview",ref:Gd,class:"preview-wrapper flex-1 p-5"},[createBaseVNode("div",{id:"output-wrapper",class:normalizeClass({output_night:!unref(Wd)})},[createBaseVNode("div",_hoisted_3,[createBaseVNode("section",{id:"output",innerHTML:unref(pd)},null,8,_hoisted_4),unref(Kd)?(openBlock(),createElementBlock("div",_hoisted_5,lh[17]||(lh[17]=[createBaseVNode("div",{class:"loading-mask-box"},[createBaseVNode("div",{class:"loading__img"}),createBaseVNode("span",null,"正在生成")],-1)]))):createCommentVNode("",!0)])],2),createVNode(Df,{target:"preview",right:40,bottom:40})],512),createVNode(Af,{class:"order-2 flex-1"}),createVNode(_h,{class:"order-2"})]),createBaseVNode("footer",_hoisted_6," 字数 "+toDisplayString((fm=unref(hd))==null?void 0:fm.words)+", 阅读大约需 "+toDisplayString(Math.ceil(((zh=unref(hd))==null?void 0:zh.minutes)??0))+" 分钟 ",1),createVNode(Nh,{onUploadImage:mf}),createVNode(dm),createVNode(Jf),createVNode(wh,{open:unref(qa).isOpenConfirmDialog,"onUpdate:open":lh[8]||(lh[8]=Mm=>unref(qa).isOpenConfirmDialog=Mm)},{default:withCtx(()=>[createVNode($h,null,{default:withCtx(()=>[createVNode(Tm,null,{default:withCtx(()=>[createVNode(oh,null,{default:withCtx(()=>lh[18]||(lh[18]=[createTextVNode("提示")])),_:1}),createVNode(Xh,null,{default:withCtx(()=>lh[19]||(lh[19]=[createTextVNode(" 此操作将丢失本地自定义样式,是否继续? ")])),_:1})]),_:1}),createVNode(th,null,{default:withCtx(()=>[createVNode(kh,null,{default:withCtx(()=>lh[20]||(lh[20]=[createTextVNode("取消")])),_:1}),createVNode(Zf,{onClick:lh[7]||(lh[7]=Mm=>unref(qa).resetStyle())},{default:withCtx(()=>lh[21]||(lh[21]=[createTextVNode(" 确认 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])])],512)}}}),CodemirrorEditor=_export_sfc(_sfc_main$1,[["__scopeId","data-v-74776407"]]),_sfc_main=defineComponent({__name:"App",setup(Ra){return(qa,rd)=>(openBlock(),createBlock(CodemirrorEditor))}});var css={exports:{}};(function(Ra,qa){(function(rd){rd(requireCodemirror())})(function(rd){rd.defineMode("css",function(mf,_f){var xf=_f.inline;_f.propertyKeywords||(_f=rd.resolveMode("text/css"));var Cf=mf.indentUnit,If=_f.tokenHooks,Sf=_f.documentTypes||{},wf=_f.mediaTypes||{},Pf=_f.mediaFeatures||{},lh=_f.mediaValueKeywords||{},xh=_f.propertyKeywords||{},Eh=_f.nonStandardPropertyKeywords||{},Mh=_f.fontProperties||{},dh=_f.counterDescriptors||{},eh=_f.colorKeywords||{},fh=_f.valueKeywords||{},Sh=_f.allowNested,vh=_f.lineComment,Df=_f.supportsAtComponent===!0,Af=mf.highlightNonStandardPropertyKeywords!==!1,_h,Nh;function dm(zh,Mm){return _h=Mm,zh}function Jf(zh,Mm){var Rm=zh.next();if(If[Rm]){var tg=If[Rm](zh,Mm);if(tg!==!1)return tg}if(Rm=="@")return zh.eatWhile(/[\w\\\-]/),dm("def",zh.current());if(Rm=="="||(Rm=="~"||Rm=="|")&&zh.eat("="))return dm(null,"compare");if(Rm=='"'||Rm=="'")return Mm.tokenize=oh(Rm),Mm.tokenize(zh,Mm);if(Rm=="#")return zh.eatWhile(/[\w\\\-]/),dm("atom","hash");if(Rm=="!")return zh.match(/^\s*\w*/),dm("keyword","important");if(/\d/.test(Rm)||Rm=="."&&zh.eat(/\d/))return zh.eatWhile(/[\w.%]/),dm("number","unit");if(Rm==="-"){if(/[\d.]/.test(zh.peek()))return zh.eatWhile(/[\w.%]/),dm("number","unit");if(zh.match(/^-[\w\\\-]*/))return zh.eatWhile(/[\w\\\-]/),zh.match(/^\s*:/,!1)?dm("variable-2","variable-definition"):dm("variable-2","variable");if(zh.match(/^\w+-/))return dm("meta","meta")}else return/[,+>*\/]/.test(Rm)?dm(null,"select-op"):Rm=="."&&zh.match(/^-?[_a-z][_a-z0-9-]*/i)?dm("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(Rm)?dm(null,Rm):zh.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(zh.current())&&(Mm.tokenize=Xh),dm("variable callee","variable")):/[\w\\\-]/.test(Rm)?(zh.eatWhile(/[\w\\\-]/),dm("property","word")):dm(null,null)}function oh(zh){return function(Mm,Rm){for(var tg=!1,Fm;(Fm=Mm.next())!=null;){if(Fm==zh&&!tg){zh==")"&&Mm.backUp(1);break}tg=!tg&&Fm=="\\"}return(Fm==zh||!tg&&zh!=")")&&(Rm.tokenize=null),dm("string","string")}}function Xh(zh,Mm){return zh.next(),zh.match(/^\s*[\"\')]/,!1)?Mm.tokenize=null:Mm.tokenize=oh(")"),dm(null,"(")}function Tm(zh,Mm,Rm){this.type=zh,this.indent=Mm,this.prev=Rm}function kh(zh,Mm,Rm,tg){return zh.context=new Tm(Rm,Mm.indentation()+(tg===!1?0:Cf),zh.context),Rm}function Zf(zh){return zh.context.prev&&(zh.context=zh.context.prev),zh.context.type}function th(zh,Mm,Rm){return fm[Rm.context.type](zh,Mm,Rm)}function $h(zh,Mm,Rm,tg){for(var Fm=tg||1;Fm>0;Fm--)Rm.context=Rm.context.prev;return th(zh,Mm,Rm)}function wh(zh){var Mm=zh.current().toLowerCase();fh.hasOwnProperty(Mm)?Nh="atom":eh.hasOwnProperty(Mm)?Nh="keyword":Nh="variable"}var fm={};return fm.top=function(zh,Mm,Rm){if(zh=="{")return kh(Rm,Mm,"block");if(zh=="}"&&Rm.context.prev)return Zf(Rm);if(Df&&/@component/i.test(zh))return kh(Rm,Mm,"atComponentBlock");if(/^@(-moz-)?document$/i.test(zh))return kh(Rm,Mm,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(zh))return kh(Rm,Mm,"atBlock");if(/^@(font-face|counter-style)/i.test(zh))return Rm.stateArg=zh,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(zh))return"keyframes";if(zh&&zh.charAt(0)=="@")return kh(Rm,Mm,"at");if(zh=="hash")Nh="builtin";else if(zh=="word")Nh="tag";else{if(zh=="variable-definition")return"maybeprop";if(zh=="interpolation")return kh(Rm,Mm,"interpolation");if(zh==":")return"pseudo";if(Sh&&zh=="(")return kh(Rm,Mm,"parens")}return Rm.context.type},fm.block=function(zh,Mm,Rm){if(zh=="word"){var tg=Mm.current().toLowerCase();return xh.hasOwnProperty(tg)?(Nh="property","maybeprop"):Eh.hasOwnProperty(tg)?(Nh=Af?"string-2":"property","maybeprop"):Sh?(Nh=Mm.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Nh+=" error","maybeprop")}else return zh=="meta"?"block":!Sh&&(zh=="hash"||zh=="qualifier")?(Nh="error","block"):fm.top(zh,Mm,Rm)},fm.maybeprop=function(zh,Mm,Rm){return zh==":"?kh(Rm,Mm,"prop"):th(zh,Mm,Rm)},fm.prop=function(zh,Mm,Rm){if(zh==";")return Zf(Rm);if(zh=="{"&&Sh)return kh(Rm,Mm,"propBlock");if(zh=="}"||zh=="{")return $h(zh,Mm,Rm);if(zh=="(")return kh(Rm,Mm,"parens");if(zh=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(Mm.current()))Nh+=" error";else if(zh=="word")wh(Mm);else if(zh=="interpolation")return kh(Rm,Mm,"interpolation");return"prop"},fm.propBlock=function(zh,Mm,Rm){return zh=="}"?Zf(Rm):zh=="word"?(Nh="property","maybeprop"):Rm.context.type},fm.parens=function(zh,Mm,Rm){return zh=="{"||zh=="}"?$h(zh,Mm,Rm):zh==")"?Zf(Rm):zh=="("?kh(Rm,Mm,"parens"):zh=="interpolation"?kh(Rm,Mm,"interpolation"):(zh=="word"&&wh(Mm),"parens")},fm.pseudo=function(zh,Mm,Rm){return zh=="meta"?"pseudo":zh=="word"?(Nh="variable-3",Rm.context.type):th(zh,Mm,Rm)},fm.documentTypes=function(zh,Mm,Rm){return zh=="word"&&Sf.hasOwnProperty(Mm.current())?(Nh="tag",Rm.context.type):fm.atBlock(zh,Mm,Rm)},fm.atBlock=function(zh,Mm,Rm){if(zh=="(")return kh(Rm,Mm,"atBlock_parens");if(zh=="}"||zh==";")return $h(zh,Mm,Rm);if(zh=="{")return Zf(Rm)&&kh(Rm,Mm,Sh?"block":"top");if(zh=="interpolation")return kh(Rm,Mm,"interpolation");if(zh=="word"){var tg=Mm.current().toLowerCase();tg=="only"||tg=="not"||tg=="and"||tg=="or"?Nh="keyword":wf.hasOwnProperty(tg)?Nh="attribute":Pf.hasOwnProperty(tg)?Nh="property":lh.hasOwnProperty(tg)?Nh="keyword":xh.hasOwnProperty(tg)?Nh="property":Eh.hasOwnProperty(tg)?Nh=Af?"string-2":"property":fh.hasOwnProperty(tg)?Nh="atom":eh.hasOwnProperty(tg)?Nh="keyword":Nh="error"}return Rm.context.type},fm.atComponentBlock=function(zh,Mm,Rm){return zh=="}"?$h(zh,Mm,Rm):zh=="{"?Zf(Rm)&&kh(Rm,Mm,Sh?"block":"top",!1):(zh=="word"&&(Nh="error"),Rm.context.type)},fm.atBlock_parens=function(zh,Mm,Rm){return zh==")"?Zf(Rm):zh=="{"||zh=="}"?$h(zh,Mm,Rm,2):fm.atBlock(zh,Mm,Rm)},fm.restricted_atBlock_before=function(zh,Mm,Rm){return zh=="{"?kh(Rm,Mm,"restricted_atBlock"):zh=="word"&&Rm.stateArg=="@counter-style"?(Nh="variable","restricted_atBlock_before"):th(zh,Mm,Rm)},fm.restricted_atBlock=function(zh,Mm,Rm){return zh=="}"?(Rm.stateArg=null,Zf(Rm)):zh=="word"?(Rm.stateArg=="@font-face"&&!Mh.hasOwnProperty(Mm.current().toLowerCase())||Rm.stateArg=="@counter-style"&&!dh.hasOwnProperty(Mm.current().toLowerCase())?Nh="error":Nh="property","maybeprop"):"restricted_atBlock"},fm.keyframes=function(zh,Mm,Rm){return zh=="word"?(Nh="variable","keyframes"):zh=="{"?kh(Rm,Mm,"top"):th(zh,Mm,Rm)},fm.at=function(zh,Mm,Rm){return zh==";"?Zf(Rm):zh=="{"||zh=="}"?$h(zh,Mm,Rm):(zh=="word"?Nh="tag":zh=="hash"&&(Nh="builtin"),"at")},fm.interpolation=function(zh,Mm,Rm){return zh=="}"?Zf(Rm):zh=="{"||zh==";"?$h(zh,Mm,Rm):(zh=="word"?Nh="variable":zh!="variable"&&zh!="("&&zh!=")"&&(Nh="error"),"interpolation")},{startState:function(zh){return{tokenize:null,state:xf?"block":"top",stateArg:null,context:new Tm(xf?"block":"top",zh||0,null)}},token:function(zh,Mm){if(!Mm.tokenize&&zh.eatSpace())return null;var Rm=(Mm.tokenize||Jf)(zh,Mm);return Rm&&typeof Rm=="object"&&(_h=Rm[1],Rm=Rm[0]),Nh=Rm,_h!="comment"&&(Mm.state=fm[Mm.state](_h,zh,Mm)),Nh},indent:function(zh,Mm){var Rm=zh.context,tg=Mm&&Mm.charAt(0),Fm=Rm.indent;return Rm.type=="prop"&&(tg=="}"||tg==")")&&(Rm=Rm.prev),Rm.prev&&(tg=="}"&&(Rm.type=="block"||Rm.type=="top"||Rm.type=="interpolation"||Rm.type=="restricted_atBlock")?(Rm=Rm.prev,Fm=Rm.indent):(tg==")"&&(Rm.type=="parens"||Rm.type=="atBlock_parens")||tg=="{"&&(Rm.type=="at"||Rm.type=="atBlock"))&&(Fm=Math.max(0,Rm.indent-Cf))),Fm},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:vh,fold:"brace"}});function sd(mf){for(var _f={},xf=0;xf!?|~^@]/,Fd=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Hd(qh){for(var Pm=!1,dg,Ig=!1;(dg=qh.next())!=null;){if(!Pm){if(dg=="/"&&!Ig)return;dg=="["?Ig=!0:Ig&&dg=="]"&&(Ig=!1)}Pm=!Pm&&dg=="\\"}}var Vd,Gd;function Ud(qh,Pm,dg){return Vd=qh,Gd=dg,Pm}function qd(qh,Pm){var dg=qh.next();if(dg=='"'||dg=="'")return Pm.tokenize=Wd(dg),Pm.tokenize(qh,Pm);if(dg=="."&&qh.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return Ud("number","number");if(dg=="."&&qh.match(".."))return Ud("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(dg))return Ud(dg);if(dg=="="&&qh.eat(">"))return Ud("=>","operator");if(dg=="0"&&qh.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return Ud("number","number");if(/\d/.test(dg))return qh.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),Ud("number","number");if(dg=="/")return qh.eat("*")?(Pm.tokenize=Kd,Kd(qh,Pm)):qh.eat("/")?(qh.skipToEnd(),Ud("comment","comment")):a_(qh,Pm,1)?(Hd(qh),qh.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),Ud("regexp","string-2")):(qh.eat("="),Ud("operator","operator",qh.current()));if(dg=="`")return Pm.tokenize=Xd,Xd(qh,Pm);if(dg=="#"&&qh.peek()=="!")return qh.skipToEnd(),Ud("meta","meta");if(dg=="#"&&qh.eatWhile(Nd))return Ud("variable","property");if(dg=="<"&&qh.match("!--")||dg=="-"&&qh.match("->")&&!/\S/.test(qh.string.slice(0,qh.start)))return qh.skipToEnd(),Ud("comment","comment");if(Ld.test(dg))return(dg!=">"||!Pm.lexical||Pm.lexical.type!=">")&&(qh.eat("=")?(dg=="!"||dg=="=")&&qh.eat("="):/[<>*+\-|&?]/.test(dg)&&(qh.eat(dg),dg==">"&&qh.eat(dg))),dg=="?"&&qh.eat(".")?Ud("."):Ud("operator","operator",qh.current());if(Nd.test(dg)){qh.eatWhile(Nd);var Ig=qh.current();if(Pm.lastType!="."){if(Md.propertyIsEnumerable(Ig)){var sg=Md[Ig];return Ud(sg.type,sg.style,Ig)}if(Ig=="async"&&qh.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return Ud("async","keyword",Ig)}return Ud("variable","variable",Ig)}}function Wd(qh){return function(Pm,dg){var Ig=!1,sg;if(md&&Pm.peek()=="@"&&Pm.match(Fd))return dg.tokenize=qd,Ud("jsonld-keyword","meta");for(;(sg=Pm.next())!=null&&!(sg==qh&&!Ig);)Ig=!Ig&&sg=="\\";return Ig||(dg.tokenize=qd),Ud("string","string")}}function Kd(qh,Pm){for(var dg=!1,Ig;Ig=qh.next();){if(Ig=="/"&&dg){Pm.tokenize=qd;break}dg=Ig=="*"}return Ud("comment","comment")}function Xd(qh,Pm){for(var dg=!1,Ig;(Ig=qh.next())!=null;){if(!dg&&(Ig=="`"||Ig=="$"&&qh.eat("{"))){Pm.tokenize=qd;break}dg=!dg&&Ig=="\\"}return Ud("quasi","string-2",qh.current())}var df="([{}])";function Ef(qh,Pm){Pm.fatArrowAt&&(Pm.fatArrowAt=null);var dg=qh.string.indexOf("=>",qh.start);if(!(dg<0)){if(vd){var Ig=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(qh.string.slice(qh.start,dg));Ig&&(dg=Ig.index)}for(var sg=0,Fg=!1,b_=dg-1;b_>=0;--b_){var W_=qh.string.charAt(b_),sb=df.indexOf(W_);if(sb>=0&&sb<3){if(!sg){++b_;break}if(--sg==0){W_=="("&&(Fg=!0);break}}else if(sb>=3&&sb<6)++sg;else if(Nd.test(W_))Fg=!0;else if(/["'\/`]/.test(W_))for(;;--b_){if(b_==0)return;var jb=qh.string.charAt(b_-1);if(jb==W_&&qh.string.charAt(b_-2)!="\\"){b_--;break}}else if(Fg&&!sg){++b_;break}}Fg&&!sg&&(Pm.fatArrowAt=b_)}}var pf={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function mf(qh,Pm,dg,Ig,sg,Fg){this.indented=qh,this.column=Pm,this.type=dg,this.prev=sg,this.info=Fg,Ig!=null&&(this.align=Ig)}function _f(qh,Pm){if(!yd)return!1;for(var dg=qh.localVars;dg;dg=dg.next)if(dg.name==Pm)return!0;for(var Ig=qh.context;Ig;Ig=Ig.prev)for(var dg=Ig.vars;dg;dg=dg.next)if(dg.name==Pm)return!0}function xf(qh,Pm,dg,Ig,sg){var Fg=qh.cc;for(Cf.state=qh,Cf.stream=sg,Cf.marked=null,Cf.cc=Fg,Cf.style=Pm,qh.lexical.hasOwnProperty("align")||(qh.lexical.align=!0);;){var b_=Fg.length?Fg.pop():gd?dm:_h;if(b_(dg,Ig)){for(;Fg.length&&Fg[Fg.length-1].lex;)Fg.pop()();return Cf.marked?Cf.marked:dg=="variable"&&_f(qh,Ig)?"variable-2":Pm}}}var Cf={state:null,column:null,marked:null,cc:null};function If(){for(var qh=arguments.length-1;qh>=0;qh--)Cf.cc.push(arguments[qh])}function Sf(){return If.apply(null,arguments),!0}function wf(qh,Pm){for(var dg=Pm;dg;dg=dg.next)if(dg.name==qh)return!0;return!1}function Pf(qh){var Pm=Cf.state;if(Cf.marked="def",!!yd){if(Pm.context){if(Pm.lexical.info=="var"&&Pm.context&&Pm.context.block){var dg=lh(qh,Pm.context);if(dg!=null){Pm.context=dg;return}}else if(!wf(qh,Pm.localVars)){Pm.localVars=new Mh(qh,Pm.localVars);return}}pd.globalVars&&!wf(qh,Pm.globalVars)&&(Pm.globalVars=new Mh(qh,Pm.globalVars))}}function lh(qh,Pm){if(Pm)if(Pm.block){var dg=lh(qh,Pm.prev);return dg?dg==Pm.prev?Pm:new Eh(dg,Pm.vars,!0):null}else return wf(qh,Pm.vars)?Pm:new Eh(Pm.prev,new Mh(qh,Pm.vars),!1);else return null}function xh(qh){return qh=="public"||qh=="private"||qh=="protected"||qh=="abstract"||qh=="readonly"}function Eh(qh,Pm,dg){this.prev=qh,this.vars=Pm,this.block=dg}function Mh(qh,Pm){this.name=qh,this.next=Pm}var dh=new Mh("this",new Mh("arguments",null));function eh(){Cf.state.context=new Eh(Cf.state.context,Cf.state.localVars,!1),Cf.state.localVars=dh}function fh(){Cf.state.context=new Eh(Cf.state.context,Cf.state.localVars,!0),Cf.state.localVars=null}eh.lex=fh.lex=!0;function Sh(){Cf.state.localVars=Cf.state.context.vars,Cf.state.context=Cf.state.context.prev}Sh.lex=!0;function vh(qh,Pm){var dg=function(){var Ig=Cf.state,sg=Ig.indented;if(Ig.lexical.type=="stat")sg=Ig.lexical.indented;else for(var Fg=Ig.lexical;Fg&&Fg.type==")"&&Fg.align;Fg=Fg.prev)sg=Fg.indented;Ig.lexical=new mf(sg,Cf.stream.column(),qh,null,Ig.lexical,Pm)};return dg.lex=!0,dg}function Df(){var qh=Cf.state;qh.lexical.prev&&(qh.lexical.type==")"&&(qh.indented=qh.lexical.indented),qh.lexical=qh.lexical.prev)}Df.lex=!0;function Af(qh){function Pm(dg){return dg==qh?Sf():qh==";"||dg=="}"||dg==")"||dg=="]"?If():Sf(Pm)}return Pm}function _h(qh,Pm){return qh=="var"?Sf(vh("vardef",Pm),R_,Af(";"),Df):qh=="keyword a"?Sf(vh("form"),oh,_h,Df):qh=="keyword b"?Sf(vh("form"),_h,Df):qh=="keyword d"?Cf.stream.match(/^\s*$/,!1)?Sf():Sf(vh("stat"),Tm,Af(";"),Df):qh=="debugger"?Sf(Af(";")):qh=="{"?Sf(vh("}"),fh,Rf,Df,Sh):qh==";"?Sf():qh=="if"?(Cf.state.lexical.info=="else"&&Cf.state.cc[Cf.state.cc.length-1]==Df&&Cf.state.cc.pop()(),Sf(vh("form"),oh,_h,Df,$g)):qh=="function"?Sf(nh):qh=="for"?Sf(vh("form"),fh,Lb,_h,Sh,Df):qh=="class"||vd&&Pm=="interface"?(Cf.marked="keyword",Sf(vh("form",qh=="class"?qh:Pm),Lm,Df)):qh=="variable"?vd&&Pm=="declare"?(Cf.marked="keyword",Sf(_h)):vd&&(Pm=="module"||Pm=="enum"||Pm=="type")&&Cf.stream.match(/^\s*\w/,!1)?(Cf.marked="keyword",Pm=="enum"?Sf(Mg):Pm=="type"?Sf(im,Af("operator"),Km,Af(";")):Sf(vh("form"),v_,Af("{"),vh("}"),Rf,Df,Df)):vd&&Pm=="namespace"?(Cf.marked="keyword",Sf(vh("form"),dm,_h,Df)):vd&&Pm=="abstract"?(Cf.marked="keyword",Sf(_h)):Sf(vh("stat"),tg):qh=="switch"?Sf(vh("form"),oh,Af("{"),vh("}","switch"),fh,Rf,Df,Df,Sh):qh=="case"?Sf(dm,Af(":")):qh=="default"?Sf(Af(":")):qh=="catch"?Sf(vh("form"),eh,Nh,_h,Df,Sh):qh=="export"?Sf(vh("stat"),og,Df):qh=="import"?Sf(vh("stat"),qg,Df):qh=="async"?Sf(_h):Pm=="@"?Sf(dm,_h):If(vh("stat"),dm,Af(";"),Df)}function Nh(qh){if(qh=="(")return Sf(mm,Af(")"))}function dm(qh,Pm){return Xh(qh,Pm,!1)}function Jf(qh,Pm){return Xh(qh,Pm,!0)}function oh(qh){return qh!="("?If():Sf(vh(")"),Tm,Af(")"),Df)}function Xh(qh,Pm,dg){if(Cf.state.fatArrowAt==Cf.stream.start){var Ig=dg?fm:wh;if(qh=="(")return Sf(eh,vh(")"),Fh(mm,")"),Df,Af("=>"),Ig,Sh);if(qh=="variable")return If(eh,v_,Af("=>"),Ig,Sh)}var sg=dg?Zf:kh;return pf.hasOwnProperty(qh)?Sf(sg):qh=="function"?Sf(nh,sg):qh=="class"||vd&&Pm=="interface"?(Cf.marked="keyword",Sf(vh("form"),jm,Df)):qh=="keyword c"||qh=="async"?Sf(dg?Jf:dm):qh=="("?Sf(vh(")"),Tm,Af(")"),Df,sg):qh=="operator"||qh=="spread"?Sf(dg?Jf:dm):qh=="["?Sf(vh("]"),p_,Df,sg):qh=="{"?kf(Ym,"}",null,sg):qh=="quasi"?If(th,sg):qh=="new"?Sf(zh(dg)):Sf()}function Tm(qh){return qh.match(/[;\}\)\],]/)?If():If(dm)}function kh(qh,Pm){return qh==","?Sf(Tm):Zf(qh,Pm,!1)}function Zf(qh,Pm,dg){var Ig=dg==!1?kh:Zf,sg=dg==!1?dm:Jf;if(qh=="=>")return Sf(eh,dg?fm:wh,Sh);if(qh=="operator")return/\+\+|--/.test(Pm)||vd&&Pm=="!"?Sf(Ig):vd&&Pm=="<"&&Cf.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?Sf(vh(">"),Fh(Km,">"),Df,Ig):Pm=="?"?Sf(dm,Af(":"),sg):Sf(sg);if(qh=="quasi")return If(th,Ig);if(qh!=";"){if(qh=="(")return kf(Jf,")","call",Ig);if(qh==".")return Sf(Fm,Ig);if(qh=="[")return Sf(vh("]"),Tm,Af("]"),Df,Ig);if(vd&&Pm=="as")return Cf.marked="keyword",Sf(Km,Ig);if(qh=="regexp")return Cf.state.lastType=Cf.marked="operator",Cf.stream.backUp(Cf.stream.pos-Cf.stream.start-1),Sf(sg)}}function th(qh,Pm){return qh!="quasi"?If():Pm.slice(Pm.length-2)!="${"?Sf(th):Sf(Tm,$h)}function $h(qh){if(qh=="}")return Cf.marked="string-2",Cf.state.tokenize=Xd,Sf(th)}function wh(qh){return Ef(Cf.stream,Cf.state),If(qh=="{"?_h:dm)}function fm(qh){return Ef(Cf.stream,Cf.state),If(qh=="{"?_h:Jf)}function zh(qh){return function(Pm){return Pm=="."?Sf(qh?Rm:Mm):Pm=="variable"&&vd?Sf(o_,qh?Zf:kh):If(qh?Jf:dm)}}function Mm(qh,Pm){if(Pm=="target")return Cf.marked="keyword",Sf(kh)}function Rm(qh,Pm){if(Pm=="target")return Cf.marked="keyword",Sf(Zf)}function tg(qh){return qh==":"?Sf(Df,_h):If(kh,Af(";"),Df)}function Fm(qh){if(qh=="variable")return Cf.marked="property",Sf()}function Ym(qh,Pm){if(qh=="async")return Cf.marked="property",Sf(Ym);if(qh=="variable"||Cf.style=="keyword"){if(Cf.marked="property",Pm=="get"||Pm=="set")return Sf(rg);var dg;return vd&&Cf.state.fatArrowAt==Cf.stream.start&&(dg=Cf.stream.match(/^\s*:\s*/,!1))&&(Cf.state.fatArrowAt=Cf.stream.pos+dg[0].length),Sf(Eg)}else{if(qh=="number"||qh=="string")return Cf.marked=md?"property":Cf.style+" property",Sf(Eg);if(qh=="jsonld-keyword")return Sf(Eg);if(vd&&xh(Pm))return Cf.marked="keyword",Sf(Ym);if(qh=="[")return Sf(dm,Dh,Af("]"),Eg);if(qh=="spread")return Sf(Jf,Eg);if(Pm=="*")return Cf.marked="keyword",Sf(Ym);if(qh==":")return If(Eg)}}function rg(qh){return qh!="variable"?If(Eg):(Cf.marked="property",Sf(nh))}function Eg(qh){if(qh==":")return Sf(Jf);if(qh=="(")return If(nh)}function Fh(qh,Pm,dg){function Ig(sg,Fg){if(dg?dg.indexOf(sg)>-1:sg==","){var b_=Cf.state.lexical;return b_.info=="call"&&(b_.pos=(b_.pos||0)+1),Sf(function(W_,sb){return W_==Pm||sb==Pm?If():If(qh)},Ig)}return sg==Pm||Fg==Pm?Sf():dg&&dg.indexOf(";")>-1?If(qh):Sf(Af(Pm))}return function(sg,Fg){return sg==Pm||Fg==Pm?Sf():If(qh,Ig)}}function kf(qh,Pm,dg){for(var Ig=3;Ig"),Km);if(qh=="quasi")return If(vg,d_)}function Ag(qh){if(qh=="=>")return Sf(Km)}function ig(qh){return qh.match(/[\}\)\]]/)?Sf():qh==","||qh==";"?Sf(ig):If(_g,ig)}function _g(qh,Pm){if(qh=="variable"||Cf.style=="keyword")return Cf.marked="property",Sf(_g);if(Pm=="?"||qh=="number"||qh=="string")return Sf(_g);if(qh==":")return Sf(Km);if(qh=="[")return Sf(Af("variable"),Vh,Af("]"),_g);if(qh=="(")return If(gm,_g);if(!qh.match(/[;\}\)\],]/))return Sf()}function vg(qh,Pm){return qh!="quasi"?If():Pm.slice(Pm.length-2)!="${"?Sf(vg):Sf(Km,Og)}function Og(qh){if(qh=="}")return Cf.marked="string-2",Cf.state.tokenize=Xd,Sf(vg)}function Wg(qh,Pm){return qh=="variable"&&Cf.stream.match(/^\s*[?:]/,!1)||Pm=="?"?Sf(Wg):qh==":"?Sf(Km):qh=="spread"?Sf(Wg):If(Km)}function d_(qh,Pm){if(Pm=="<")return Sf(vh(">"),Fh(Km,">"),Df,d_);if(Pm=="|"||qh=="."||Pm=="&")return Sf(Km);if(qh=="[")return Sf(Km,Af("]"),d_);if(Pm=="extends"||Pm=="implements")return Cf.marked="keyword",Sf(Km);if(Pm=="?")return Sf(Km,Af(":"),Km)}function o_(qh,Pm){if(Pm=="<")return Sf(vh(">"),Fh(Km,">"),Df,d_)}function y_(){return If(Km,t_)}function t_(qh,Pm){if(Pm=="=")return Sf(Km)}function R_(qh,Pm){return Pm=="enum"?(Cf.marked="keyword",Sf(Mg)):If(v_,Dh,I_,$_)}function v_(qh,Pm){if(vd&&xh(Pm))return Cf.marked="keyword",Sf(v_);if(qh=="variable")return Pf(Pm),Sf();if(qh=="spread")return Sf(v_);if(qh=="[")return kf(eb,"]");if(qh=="{")return kf(X_,"}")}function X_(qh,Pm){return qh=="variable"&&!Cf.stream.match(/^\s*:/,!1)?(Pf(Pm),Sf(I_)):(qh=="variable"&&(Cf.marked="property"),qh=="spread"?Sf(v_):qh=="}"?If():qh=="["?Sf(dm,Af("]"),Af(":"),X_):Sf(Af(":"),v_,I_))}function eb(){return If(v_,I_)}function I_(qh,Pm){if(Pm=="=")return Sf(Jf)}function $_(qh){if(qh==",")return Sf(R_)}function $g(qh,Pm){if(qh=="keyword b"&&Pm=="else")return Sf(vh("form","else"),_h,Df)}function Lb(qh,Pm){if(Pm=="await")return Sf(Lb);if(qh=="(")return Sf(vh(")"),Kb,Df)}function Kb(qh){return qh=="var"?Sf(R_,db):qh=="variable"?Sf(db):If(db)}function db(qh,Pm){return qh==")"?Sf():qh==";"?Sf(db):Pm=="in"||Pm=="of"?(Cf.marked="keyword",Sf(dm,db)):If(dm,db)}function nh(qh,Pm){if(Pm=="*")return Cf.marked="keyword",Sf(nh);if(qh=="variable")return Pf(Pm),Sf(nh);if(qh=="(")return Sf(eh,vh(")"),Fh(mm,")"),Df,Sm,_h,Sh);if(vd&&Pm=="<")return Sf(vh(">"),Fh(y_,">"),Df,nh)}function gm(qh,Pm){if(Pm=="*")return Cf.marked="keyword",Sf(gm);if(qh=="variable")return Pf(Pm),Sf(gm);if(qh=="(")return Sf(eh,vh(")"),Fh(mm,")"),Df,Sm,Sh);if(vd&&Pm=="<")return Sf(vh(">"),Fh(y_,">"),Df,gm)}function im(qh,Pm){if(qh=="keyword"||qh=="variable")return Cf.marked="type",Sf(im);if(Pm=="<")return Sf(vh(">"),Fh(y_,">"),Df)}function mm(qh,Pm){return Pm=="@"&&Sf(dm,mm),qh=="spread"?Sf(mm):vd&&xh(Pm)?(Cf.marked="keyword",Sf(mm)):vd&&qh=="this"?Sf(Dh,I_):If(v_,Dh,I_)}function jm(qh,Pm){return qh=="variable"?Lm(qh,Pm):zm(qh,Pm)}function Lm(qh,Pm){if(qh=="variable")return Pf(Pm),Sf(zm)}function zm(qh,Pm){if(Pm=="<")return Sf(vh(">"),Fh(y_,">"),Df,zm);if(Pm=="extends"||Pm=="implements"||vd&&qh==",")return Pm=="implements"&&(Cf.marked="keyword"),Sf(vd?Km:dm,zm);if(qh=="{")return Sf(vh("}"),Vm,Df)}function Vm(qh,Pm){if(qh=="async"||qh=="variable"&&(Pm=="static"||Pm=="get"||Pm=="set"||vd&&xh(Pm))&&Cf.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Cf.marked="keyword",Sf(Vm);if(qh=="variable"||Cf.style=="keyword")return Cf.marked="property",Sf(Dm,Vm);if(qh=="number"||qh=="string")return Sf(Dm,Vm);if(qh=="[")return Sf(dm,Dh,Af("]"),Dm,Vm);if(Pm=="*")return Cf.marked="keyword",Sf(Vm);if(vd&&qh=="(")return If(gm,Vm);if(qh==";"||qh==",")return Sf(Vm);if(qh=="}")return Sf();if(Pm=="@")return Sf(dm,Vm)}function Dm(qh,Pm){if(Pm=="!"||Pm=="?")return Sf(Dm);if(qh==":")return Sf(Km,I_);if(Pm=="=")return Sf(Jf);var dg=Cf.state.lexical.prev,Ig=dg&&dg.info=="interface";return If(Ig?gm:nh)}function og(qh,Pm){return Pm=="*"?(Cf.marked="keyword",Sf(C_,Af(";"))):Pm=="default"?(Cf.marked="keyword",Sf(dm,Af(";"))):qh=="{"?Sf(Fh(pg,"}"),C_,Af(";")):If(_h)}function pg(qh,Pm){if(Pm=="as")return Cf.marked="keyword",Sf(Af("variable"));if(qh=="variable")return If(Jf,pg)}function qg(qh){return qh=="string"?Sf():qh=="("?If(dm):qh=="."?If(kh):If(xg,Yg,C_)}function xg(qh,Pm){return qh=="{"?kf(xg,"}"):(qh=="variable"&&Pf(Pm),Pm=="*"&&(Cf.marked="keyword"),Sf(w_))}function Yg(qh){if(qh==",")return Sf(xg,Yg)}function w_(qh,Pm){if(Pm=="as")return Cf.marked="keyword",Sf(xg)}function C_(qh,Pm){if(Pm=="from")return Cf.marked="keyword",Sf(dm)}function p_(qh){return qh=="]"?Sf():If(Fh(Jf,"]"))}function Mg(){return If(vh("form"),v_,Af("{"),vh("}"),Fh(q_,"}"),Df,Df)}function q_(){return If(v_,I_)}function m_(qh,Pm){return qh.lastType=="operator"||qh.lastType==","||Ld.test(Pm.charAt(0))||/[,.]/.test(Pm.charAt(0))}function a_(qh,Pm,dg){return Pm.tokenize==qd&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(Pm.lastType)||Pm.lastType=="quasi"&&/\{\s*$/.test(qh.string.slice(0,qh.pos-(dg||0)))}return{startState:function(qh){var Pm={tokenize:qd,lastType:"sof",cc:[],lexical:new mf((qh||0)-fd,0,"block",!1),localVars:pd.localVars,context:pd.localVars&&new Eh(null,null,!1),indented:qh||0};return pd.globalVars&&typeof pd.globalVars=="object"&&(Pm.globalVars=pd.globalVars),Pm},token:function(qh,Pm){if(qh.sol()&&(Pm.lexical.hasOwnProperty("align")||(Pm.lexical.align=!1),Pm.indented=qh.indentation(),Ef(qh,Pm)),Pm.tokenize!=Kd&&qh.eatSpace())return null;var dg=Pm.tokenize(qh,Pm);return Vd=="comment"?dg:(Pm.lastType=Vd=="operator"&&(Gd=="++"||Gd=="--")?"incdec":Vd,xf(Pm,dg,Vd,Gd,qh))},indent:function(qh,Pm){if(qh.tokenize==Kd||qh.tokenize==Xd)return rd.Pass;if(qh.tokenize!=qd)return 0;var dg=Pm&&Pm.charAt(0),Ig=qh.lexical,sg;if(!/^\s*else\b/.test(Pm))for(var Fg=qh.cc.length-1;Fg>=0;--Fg){var b_=qh.cc[Fg];if(b_==Df)Ig=Ig.prev;else if(b_!=$g&&b_!=Sh)break}for(;(Ig.type=="stat"||Ig.type=="form")&&(dg=="}"||(sg=qh.cc[qh.cc.length-1])&&(sg==kh||sg==Zf)&&!/^[,\.=+\-*:?[\(]/.test(Pm));)Ig=Ig.prev;hd&&Ig.type==")"&&Ig.prev.type=="stat"&&(Ig=Ig.prev);var W_=Ig.type,sb=dg==W_;return W_=="vardef"?Ig.indented+(qh.lastType=="operator"||qh.lastType==","?Ig.info.length+1:0):W_=="form"&&dg=="{"?Ig.indented:W_=="form"?Ig.indented+fd:W_=="stat"?Ig.indented+(m_(qh,Pm)?hd||fd:0):Ig.info=="switch"&&!sb&&pd.doubleIndentSwitch!=!1?Ig.indented+(/^(?:case|default)\b/.test(Pm)?fd:2*fd):Ig.align?Ig.column+(sb?0:1):Ig.indented+(sb?0:fd)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:gd?null:"/*",blockCommentEnd:gd?null:"*/",blockCommentContinue:gd?null:" * ",lineComment:gd?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:gd?"json":"javascript",jsonldMode:md,jsonMode:gd,expressionAllowed:a_,skipExpression:function(qh){xf(qh,"atom","atom","true",new rd.StringStream("",2,null))}}}),rd.registerHelper("wordChars","javascript",/[\w$]/),rd.defineMIME("text/javascript","javascript"),rd.defineMIME("text/ecmascript","javascript"),rd.defineMIME("application/javascript","javascript"),rd.defineMIME("application/x-javascript","javascript"),rd.defineMIME("application/ecmascript","javascript"),rd.defineMIME("application/json",{name:"javascript",json:!0}),rd.defineMIME("application/x-json",{name:"javascript",json:!0}),rd.defineMIME("application/manifest+json",{name:"javascript",json:!0}),rd.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),rd.defineMIME("text/typescript",{name:"javascript",typescript:!0}),rd.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var xml={exports:{}},hasRequiredXml;function requireXml(){return hasRequiredXml||(hasRequiredXml=1,function(Ra,qa){(function(rd){rd(requireCodemirror())})(function(rd){var sd={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},pd={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};rd.defineMode("xml",function(fd,hd){var md=fd.indentUnit,gd={},yd=hd.htmlMode?sd:pd;for(var vd in yd)gd[vd]=yd[vd];for(var vd in hd)gd[vd]=hd[vd];var Nd,Md;function Ld(Sf,wf){function Pf(Eh){return wf.tokenize=Eh,Eh(Sf,wf)}var lh=Sf.next();if(lh=="<")return Sf.eat("!")?Sf.eat("[")?Sf.match("CDATA[")?Pf(Vd("atom","]]>")):null:Sf.match("--")?Pf(Vd("comment","-->")):Sf.match("DOCTYPE",!0,!0)?(Sf.eatWhile(/[\w\._\-]/),Pf(Gd(1))):null:Sf.eat("?")?(Sf.eatWhile(/[\w\._\-]/),wf.tokenize=Vd("meta","?>"),"meta"):(Nd=Sf.eat("/")?"closeTag":"openTag",wf.tokenize=Fd,"tag bracket");if(lh=="&"){var xh;return Sf.eat("#")?Sf.eat("x")?xh=Sf.eatWhile(/[a-fA-F\d]/)&&Sf.eat(";"):xh=Sf.eatWhile(/[\d]/)&&Sf.eat(";"):xh=Sf.eatWhile(/[\w\.\-:]/)&&Sf.eat(";"),xh?"atom":"error"}else return Sf.eatWhile(/[^&<]/),null}Ld.isInText=!0;function Fd(Sf,wf){var Pf=Sf.next();if(Pf==">"||Pf=="/"&&Sf.eat(">"))return wf.tokenize=Ld,Nd=Pf==">"?"endTag":"selfcloseTag","tag bracket";if(Pf=="=")return Nd="equals",null;if(Pf=="<"){wf.tokenize=Ld,wf.state=Xd,wf.tagName=wf.tagStart=null;var lh=wf.tokenize(Sf,wf);return lh?lh+" tag error":"tag error"}else return/[\'\"]/.test(Pf)?(wf.tokenize=Hd(Pf),wf.stringStartCol=Sf.column(),wf.tokenize(Sf,wf)):(Sf.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Hd(Sf){var wf=function(Pf,lh){for(;!Pf.eol();)if(Pf.next()==Sf){lh.tokenize=Fd;break}return"string"};return wf.isInAttribute=!0,wf}function Vd(Sf,wf){return function(Pf,lh){for(;!Pf.eol();){if(Pf.match(wf)){lh.tokenize=Ld;break}Pf.next()}return Sf}}function Gd(Sf){return function(wf,Pf){for(var lh;(lh=wf.next())!=null;){if(lh=="<")return Pf.tokenize=Gd(Sf+1),Pf.tokenize(wf,Pf);if(lh==">")if(Sf==1){Pf.tokenize=Ld;break}else return Pf.tokenize=Gd(Sf-1),Pf.tokenize(wf,Pf)}return"meta"}}function Ud(Sf){return Sf&&Sf.toLowerCase()}function qd(Sf,wf,Pf){this.prev=Sf.context,this.tagName=wf||"",this.indent=Sf.indented,this.startOfLine=Pf,(gd.doNotIndent.hasOwnProperty(wf)||Sf.context&&Sf.context.noIndent)&&(this.noIndent=!0)}function Wd(Sf){Sf.context&&(Sf.context=Sf.context.prev)}function Kd(Sf,wf){for(var Pf;;){if(!Sf.context||(Pf=Sf.context.tagName,!gd.contextGrabbers.hasOwnProperty(Ud(Pf))||!gd.contextGrabbers[Ud(Pf)].hasOwnProperty(Ud(wf))))return;Wd(Sf)}}function Xd(Sf,wf,Pf){return Sf=="openTag"?(Pf.tagStart=wf.column(),df):Sf=="closeTag"?Ef:Xd}function df(Sf,wf,Pf){return Sf=="word"?(Pf.tagName=wf.current(),Md="tag",_f):gd.allowMissingTagName&&Sf=="endTag"?(Md="tag bracket",_f(Sf,wf,Pf)):(Md="error",df)}function Ef(Sf,wf,Pf){if(Sf=="word"){var lh=wf.current();return Pf.context&&Pf.context.tagName!=lh&&gd.implicitlyClosed.hasOwnProperty(Ud(Pf.context.tagName))&&Wd(Pf),Pf.context&&Pf.context.tagName==lh||gd.matchClosing===!1?(Md="tag",pf):(Md="tag error",mf)}else return gd.allowMissingTagName&&Sf=="endTag"?(Md="tag bracket",pf(Sf,wf,Pf)):(Md="error",mf)}function pf(Sf,wf,Pf){return Sf!="endTag"?(Md="error",pf):(Wd(Pf),Xd)}function mf(Sf,wf,Pf){return Md="error",pf(Sf,wf,Pf)}function _f(Sf,wf,Pf){if(Sf=="word")return Md="attribute",xf;if(Sf=="endTag"||Sf=="selfcloseTag"){var lh=Pf.tagName,xh=Pf.tagStart;return Pf.tagName=Pf.tagStart=null,Sf=="selfcloseTag"||gd.autoSelfClosers.hasOwnProperty(Ud(lh))?Kd(Pf,lh):(Kd(Pf,lh),Pf.context=new qd(Pf,lh,xh==Pf.indented)),Xd}return Md="error",_f}function xf(Sf,wf,Pf){return Sf=="equals"?Cf:(gd.allowMissing||(Md="error"),_f(Sf,wf,Pf))}function Cf(Sf,wf,Pf){return Sf=="string"?If:Sf=="word"&&gd.allowUnquoted?(Md="string",_f):(Md="error",_f(Sf,wf,Pf))}function If(Sf,wf,Pf){return Sf=="string"?If:_f(Sf,wf,Pf)}return{startState:function(Sf){var wf={tokenize:Ld,state:Xd,indented:Sf||0,tagName:null,tagStart:null,context:null};return Sf!=null&&(wf.baseIndent=Sf),wf},token:function(Sf,wf){if(!wf.tagName&&Sf.sol()&&(wf.indented=Sf.indentation()),Sf.eatSpace())return null;Nd=null;var Pf=wf.tokenize(Sf,wf);return(Pf||Nd)&&Pf!="comment"&&(Md=null,wf.state=wf.state(Nd||Pf,Sf,wf),Md&&(Pf=Md=="error"?Pf+" error":Md)),Pf},indent:function(Sf,wf,Pf){var lh=Sf.context;if(Sf.tokenize.isInAttribute)return Sf.tagStart==Sf.indented?Sf.stringStartCol+1:Sf.indented+md;if(lh&&lh.noIndent)return rd.Pass;if(Sf.tokenize!=Fd&&Sf.tokenize!=Ld)return Pf?Pf.match(/^(\s*)/)[0].length:0;if(Sf.tagName)return gd.multilineTagIndentPastTag!==!1?Sf.tagStart+Sf.tagName.length+2:Sf.tagStart+md*(gd.multilineTagIndentFactor||1);if(gd.alignCDATA&&/$/,blockCommentStart:"",configuration:gd.htmlMode?"html":"xml",helperType:gd.htmlMode?"html":"xml",skipAttribute:function(Sf){Sf.state==Cf&&(Sf.state=_f)},xmlCurrentTag:function(Sf){return Sf.tagName?{name:Sf.tagName,close:Sf.type=="closeTag"}:null},xmlCurrentContext:function(Sf){for(var wf=[],Pf=Sf.context;Pf;Pf=Pf.prev)wf.push(Pf.tagName);return wf.reverse()}}}),rd.defineMIME("text/xml","xml"),rd.defineMIME("application/xml","xml"),rd.mimeModes.hasOwnProperty("text/html")||rd.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),xml.exports}var meta={exports:{}},hasRequiredMeta;function requireMeta(){return hasRequiredMeta||(hasRequiredMeta=1,function(Ra,qa){(function(rd){rd(requireCodemirror())})(function(rd){rd.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","cbl"]},{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"],alias:["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 sd=0;sd-1&&fd.substring(gd+1,fd.length);if(yd)return rd.findModeByExtension(yd)},rd.findModeByName=function(fd){fd=fd.toLowerCase();for(var hd=0;hd` "'(~:]+/,Vd=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,Gd=/^\s*\[[^\]]+?\]:.*$/,Ud=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,qd=" ";function Wd(dh,eh,fh){return eh.f=eh.inline=fh,fh(dh,eh)}function Kd(dh,eh,fh){return eh.f=eh.block=fh,fh(dh,eh)}function Xd(dh){return!dh||!/\S/.test(dh.string)}function df(dh){if(dh.linkTitle=!1,dh.linkHref=!1,dh.linkText=!1,dh.em=!1,dh.strong=!1,dh.strikethrough=!1,dh.quote=0,dh.indentedCode=!1,dh.f==pf){var eh=hd;if(!eh){var fh=rd.innerMode(fd,dh.htmlState);eh=fh.mode.name=="xml"&&fh.state.tagStart===null&&!fh.state.context&&fh.state.tokenize.isInText}eh&&(dh.f=Cf,dh.block=Ef,dh.htmlState=null)}return dh.trailingSpace=0,dh.trailingSpaceNewLine=!1,dh.prevLine=dh.thisLine,dh.thisLine={stream:null},null}function Ef(dh,eh){var fh=dh.column()===eh.indentation,Sh=Xd(eh.prevLine.stream),vh=eh.indentedCode,Df=eh.prevLine.hr,Af=eh.list!==!1,_h=(eh.listStack[eh.listStack.length-1]||0)+3;eh.indentedCode=!1;var Nh=eh.indentation;if(eh.indentationDiff===null&&(eh.indentationDiff=eh.indentation,Af)){for(eh.list=null;Nh=4&&(vh||eh.prevLine.fencedCodeEnd||eh.prevLine.header||Sh))return dh.skipToEnd(),eh.indentedCode=!0,gd.code;if(dh.eatSpace())return null;if(fh&&eh.indentation<=_h&&(oh=dh.match(Ld))&&oh[1].length<=6)return eh.quote=0,eh.header=oh[1].length,eh.thisLine.header=!0,pd.highlightFormatting&&(eh.formatting="header"),eh.f=eh.inline,_f(eh);if(eh.indentation<=_h&&dh.eat(">"))return eh.quote=fh?1:eh.quote+1,pd.highlightFormatting&&(eh.formatting="quote"),dh.eatSpace(),_f(eh);if(!Jf&&!eh.setext&&fh&&eh.indentation<=_h&&(oh=dh.match(Nd))){var Xh=oh[1]?"ol":"ul";return eh.indentation=Nh+dh.current().length,eh.list=!0,eh.quote=0,eh.listStack.push(eh.indentation),eh.em=!1,eh.strong=!1,eh.code=!1,eh.strikethrough=!1,pd.taskLists&&dh.match(Md,!1)&&(eh.taskList=!0),eh.f=eh.inline,pd.highlightFormatting&&(eh.formatting=["list","list-"+Xh]),_f(eh)}else{if(fh&&eh.indentation<=_h&&(oh=dh.match(Vd,!0)))return eh.quote=0,eh.fencedEndRE=new RegExp(oh[1]+"+ *$"),eh.localMode=pd.fencedCodeBlockHighlighting&&md(oh[2]||pd.fencedCodeBlockDefaultMode),eh.localMode&&(eh.localState=rd.startState(eh.localMode)),eh.f=eh.block=mf,pd.highlightFormatting&&(eh.formatting="code-block"),eh.code=-1,_f(eh);if(eh.setext||(!dm||!Af)&&!eh.quote&&eh.list===!1&&!eh.code&&!Jf&&!Gd.test(dh.string)&&(oh=dh.lookAhead(1))&&(oh=oh.match(Fd)))return eh.setext?(eh.header=eh.setext,eh.setext=0,dh.skipToEnd(),pd.highlightFormatting&&(eh.formatting="header")):(eh.header=oh[0].charAt(0)=="="?1:2,eh.setext=eh.header),eh.thisLine.header=!0,eh.f=eh.inline,_f(eh);if(Jf)return dh.skipToEnd(),eh.hr=!0,eh.thisLine.hr=!0,gd.hr;if(dh.peek()==="[")return Wd(dh,eh,lh)}return Wd(dh,eh,eh.inline)}function pf(dh,eh){var fh=fd.token(dh,eh.htmlState);if(!hd){var Sh=rd.innerMode(fd,eh.htmlState);(Sh.mode.name=="xml"&&Sh.state.tagStart===null&&!Sh.state.context&&Sh.state.tokenize.isInText||eh.md_inside&&dh.current().indexOf(">")>-1)&&(eh.f=Cf,eh.block=Ef,eh.htmlState=null)}return fh}function mf(dh,eh){var fh=eh.listStack[eh.listStack.length-1]||0,Sh=eh.indentation=dh.quote?eh.push(gd.formatting+"-"+dh.formatting[fh]+"-"+dh.quote):eh.push("error"))}if(dh.taskOpen)return eh.push("meta"),eh.length?eh.join(" "):null;if(dh.taskClosed)return eh.push("property"),eh.length?eh.join(" "):null;if(dh.linkHref?eh.push(gd.linkHref,"url"):(dh.strong&&eh.push(gd.strong),dh.em&&eh.push(gd.em),dh.strikethrough&&eh.push(gd.strikethrough),dh.emoji&&eh.push(gd.emoji),dh.linkText&&eh.push(gd.linkText),dh.code&&eh.push(gd.code),dh.image&&eh.push(gd.image),dh.imageAltText&&eh.push(gd.imageAltText,"link"),dh.imageMarker&&eh.push(gd.imageMarker)),dh.header&&eh.push(gd.header,gd.header+"-"+dh.header),dh.quote&&(eh.push(gd.quote),!pd.maxBlockquoteDepth||pd.maxBlockquoteDepth>=dh.quote?eh.push(gd.quote+"-"+dh.quote):eh.push(gd.quote+"-"+pd.maxBlockquoteDepth)),dh.list!==!1){var Sh=(dh.listStack.length-1)%3;Sh?Sh===1?eh.push(gd.list2):eh.push(gd.list3):eh.push(gd.list1)}return dh.trailingSpaceNewLine?eh.push("trailing-space-new-line"):dh.trailingSpace&&eh.push("trailing-space-"+(dh.trailingSpace%2?"a":"b")),eh.length?eh.join(" "):null}function xf(dh,eh){if(dh.match(Hd,!0))return _f(eh)}function Cf(dh,eh){var fh=eh.text(dh,eh);if(typeof fh<"u")return fh;if(eh.list)return eh.list=null,_f(eh);if(eh.taskList){var Sh=dh.match(Md,!0)[1]===" ";return Sh?eh.taskOpen=!0:eh.taskClosed=!0,pd.highlightFormatting&&(eh.formatting="task"),eh.taskList=!1,_f(eh)}if(eh.taskOpen=!1,eh.taskClosed=!1,eh.header&&dh.match(/^#+$/,!0))return pd.highlightFormatting&&(eh.formatting="header"),_f(eh);var vh=dh.next();if(eh.linkTitle){eh.linkTitle=!1;var Df=vh;vh==="("&&(Df=")"),Df=(Df+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Af="^\\s*(?:[^"+Df+"\\\\]+|\\\\\\\\|\\\\.)"+Df;if(dh.match(new RegExp(Af),!0))return gd.linkHref}if(vh==="`"){var _h=eh.formatting;pd.highlightFormatting&&(eh.formatting="code"),dh.eatWhile("`");var Nh=dh.current().length;if(eh.code==0&&(!eh.quote||Nh==1))return eh.code=Nh,_f(eh);if(Nh==eh.code){var dm=_f(eh);return eh.code=0,dm}else return eh.formatting=_h,_f(eh)}else if(eh.code)return _f(eh);if(vh==="\\"&&(dh.next(),pd.highlightFormatting)){var Jf=_f(eh),oh=gd.formatting+"-escape";return Jf?Jf+" "+oh:oh}if(vh==="!"&&dh.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return eh.imageMarker=!0,eh.image=!0,pd.highlightFormatting&&(eh.formatting="image"),_f(eh);if(vh==="["&&eh.imageMarker&&dh.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return eh.imageMarker=!1,eh.imageAltText=!0,pd.highlightFormatting&&(eh.formatting="image"),_f(eh);if(vh==="]"&&eh.imageAltText){pd.highlightFormatting&&(eh.formatting="image");var Jf=_f(eh);return eh.imageAltText=!1,eh.image=!1,eh.inline=eh.f=Sf,Jf}if(vh==="["&&!eh.image)return eh.linkText&&dh.match(/^.*?\]/)||(eh.linkText=!0,pd.highlightFormatting&&(eh.formatting="link")),_f(eh);if(vh==="]"&&eh.linkText){pd.highlightFormatting&&(eh.formatting="link");var Jf=_f(eh);return eh.linkText=!1,eh.inline=eh.f=dh.match(/\(.*?\)| ?\[.*?\]/,!1)?Sf:Cf,Jf}if(vh==="<"&&dh.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){eh.f=eh.inline=If,pd.highlightFormatting&&(eh.formatting="link");var Jf=_f(eh);return Jf?Jf+=" ":Jf="",Jf+gd.linkInline}if(vh==="<"&&dh.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){eh.f=eh.inline=If,pd.highlightFormatting&&(eh.formatting="link");var Jf=_f(eh);return Jf?Jf+=" ":Jf="",Jf+gd.linkEmail}if(pd.xml&&vh==="<"&&dh.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Xh=dh.string.indexOf(">",dh.pos);if(Xh!=-1){var Tm=dh.string.substring(dh.start,Xh);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Tm)&&(eh.md_inside=!0)}return dh.backUp(1),eh.htmlState=rd.startState(fd),Kd(dh,eh,pf)}if(pd.xml&&vh==="<"&&dh.match(/^\/\w*?>/))return eh.md_inside=!1,"tag";if(vh==="*"||vh==="_"){for(var kh=1,Zf=dh.pos==1?" ":dh.string.charAt(dh.pos-2);kh<3&&dh.eat(vh);)kh++;var th=dh.peek()||" ",$h=!/\s/.test(th)&&(!Ud.test(th)||/\s/.test(Zf)||Ud.test(Zf)),wh=!/\s/.test(Zf)&&(!Ud.test(Zf)||/\s/.test(th)||Ud.test(th)),fm=null,zh=null;if(kh%2&&(!eh.em&&$h&&(vh==="*"||!wh||Ud.test(Zf))?fm=!0:eh.em==vh&&wh&&(vh==="*"||!$h||Ud.test(th))&&(fm=!1)),kh>1&&(!eh.strong&&$h&&(vh==="*"||!wh||Ud.test(Zf))?zh=!0:eh.strong==vh&&wh&&(vh==="*"||!$h||Ud.test(th))&&(zh=!1)),zh!=null||fm!=null){pd.highlightFormatting&&(eh.formatting=fm==null?"strong":zh==null?"em":"strong em"),fm===!0&&(eh.em=vh),zh===!0&&(eh.strong=vh);var dm=_f(eh);return fm===!1&&(eh.em=!1),zh===!1&&(eh.strong=!1),dm}}else if(vh===" "&&(dh.eat("*")||dh.eat("_"))){if(dh.peek()===" ")return _f(eh);dh.backUp(1)}if(pd.strikethrough){if(vh==="~"&&dh.eatWhile(vh)){if(eh.strikethrough){pd.highlightFormatting&&(eh.formatting="strikethrough");var dm=_f(eh);return eh.strikethrough=!1,dm}else if(dh.match(/^[^\s]/,!1))return eh.strikethrough=!0,pd.highlightFormatting&&(eh.formatting="strikethrough"),_f(eh)}else if(vh===" "&&dh.match("~~",!0)){if(dh.peek()===" ")return _f(eh);dh.backUp(2)}}if(pd.emoji&&vh===":"&&dh.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){eh.emoji=!0,pd.highlightFormatting&&(eh.formatting="emoji");var Mm=_f(eh);return eh.emoji=!1,Mm}return vh===" "&&(dh.match(/^ +$/,!1)?eh.trailingSpace++:eh.trailingSpace&&(eh.trailingSpaceNewLine=!0)),_f(eh)}function If(dh,eh){var fh=dh.next();if(fh===">"){eh.f=eh.inline=Cf,pd.highlightFormatting&&(eh.formatting="link");var Sh=_f(eh);return Sh?Sh+=" ":Sh="",Sh+gd.linkInline}return dh.match(/^[^>]+/,!0),gd.linkInline}function Sf(dh,eh){if(dh.eatSpace())return null;var fh=dh.next();return fh==="("||fh==="["?(eh.f=eh.inline=Pf(fh==="("?")":"]"),pd.highlightFormatting&&(eh.formatting="link-string"),eh.linkHref=!0,_f(eh)):"error"}var wf={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Pf(dh){return function(eh,fh){var Sh=eh.next();if(Sh===dh){fh.f=fh.inline=Cf,pd.highlightFormatting&&(fh.formatting="link-string");var vh=_f(fh);return fh.linkHref=!1,vh}return eh.match(wf[dh]),fh.linkHref=!0,_f(fh)}}function lh(dh,eh){return dh.match(/^([^\]\\]|\\.)*\]:/,!1)?(eh.f=xh,dh.next(),pd.highlightFormatting&&(eh.formatting="link"),eh.linkText=!0,_f(eh)):Wd(dh,eh,Cf)}function xh(dh,eh){if(dh.match("]:",!0)){eh.f=eh.inline=Eh,pd.highlightFormatting&&(eh.formatting="link");var fh=_f(eh);return eh.linkText=!1,fh}return dh.match(/^([^\]\\]|\\.)+/,!0),gd.linkText}function Eh(dh,eh){return dh.eatSpace()?null:(dh.match(/^[^\s]+/,!0),dh.peek()===void 0?eh.linkTitle=!0:dh.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),eh.f=eh.inline=Cf,gd.linkHref+" url")}var Mh={startState:function(){return{f:Ef,prevLine:{stream:null},thisLine:{stream:null},block:Ef,htmlState:null,indentation:0,inline:Cf,text:xf,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(dh){return{f:dh.f,prevLine:dh.prevLine,thisLine:dh.thisLine,block:dh.block,htmlState:dh.htmlState&&rd.copyState(fd,dh.htmlState),indentation:dh.indentation,localMode:dh.localMode,localState:dh.localMode?rd.copyState(dh.localMode,dh.localState):null,inline:dh.inline,text:dh.text,formatting:!1,linkText:dh.linkText,linkTitle:dh.linkTitle,linkHref:dh.linkHref,code:dh.code,em:dh.em,strong:dh.strong,strikethrough:dh.strikethrough,emoji:dh.emoji,header:dh.header,setext:dh.setext,hr:dh.hr,taskList:dh.taskList,list:dh.list,listStack:dh.listStack.slice(0),quote:dh.quote,indentedCode:dh.indentedCode,trailingSpace:dh.trailingSpace,trailingSpaceNewLine:dh.trailingSpaceNewLine,md_inside:dh.md_inside,fencedEndRE:dh.fencedEndRE}},token:function(dh,eh){if(eh.formatting=!1,dh!=eh.thisLine.stream){if(eh.header=0,eh.hr=!1,dh.match(/^\s*$/,!0))return df(eh),null;if(eh.prevLine=eh.thisLine,eh.thisLine={stream:dh},eh.taskList=!1,eh.trailingSpace=0,eh.trailingSpaceNewLine=!1,!eh.localState&&(eh.f=eh.block,eh.f!=pf)){var fh=dh.match(/^\s*/,!0)[0].replace(/\t/g,qd).length;if(eh.indentation=fh,eh.indentationDiff=null,fh>0)return null}}return eh.f(dh,eh)},innerMode:function(dh){return dh.block==pf?{state:dh.htmlState,mode:fd}:dh.localState?{state:dh.localState,mode:dh.localMode}:{state:dh,mode:Mh}},indent:function(dh,eh,fh){return dh.block==pf&&fd.indent?fd.indent(dh.htmlState,eh,fh):dh.localState&&dh.localMode.indent?dh.localMode.indent(dh.localState,eh,fh):rd.Pass},blankLine:df,getType:_f,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mh},"xml"),rd.defineMIME("text/markdown","markdown"),rd.defineMIME("text/x-markdown","markdown")})})();(function(Ra,qa){(function(rd){rd(requireCodemirror())})(function(rd){var sd={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},pd=rd.Pos;rd.defineOption("autoCloseBrackets",!1,function(Gd,Ud,qd){qd&&qd!=rd.Init&&(Gd.removeKeyMap(hd),Gd.state.closeBrackets=null),Ud&&(md(fd(Ud,"pairs")),Gd.state.closeBrackets=Ud,Gd.addKeyMap(hd))});function fd(Gd,Ud){return Ud=="pairs"&&typeof Gd=="string"?Gd:typeof Gd=="object"&&Gd[Ud]!=null?Gd[Ud]:sd[Ud]}var hd={Backspace:vd,Enter:Nd};function md(Gd){for(var Ud=0;Ud=0;Kd--){var df=Wd[Kd].head;Gd.replaceRange("",pd(df.line,df.ch-1),pd(df.line,df.ch+1),"+delete")}}function Nd(Gd){var Ud=yd(Gd),qd=Ud&&fd(Ud,"explode");if(!qd||Gd.getOption("disableInput"))return rd.Pass;for(var Wd=Gd.listSelections(),Kd=0;Kd0?{line:df.head.line,ch:df.head.ch+Ud}:{line:df.head.line-1};qd.push({anchor:Ef,head:Ef})}Gd.setSelections(qd,Kd)}function Ld(Gd){var Ud=rd.cmpPos(Gd.anchor,Gd.head)>0;return{anchor:new pd(Gd.anchor.line,Gd.anchor.ch+(Ud?-1:1)),head:new pd(Gd.head.line,Gd.head.ch+(Ud?1:-1))}}function Fd(Gd,Ud){var qd=yd(Gd);if(!qd||Gd.getOption("disableInput"))return rd.Pass;var Wd=fd(qd,"pairs"),Kd=Wd.indexOf(Ud);if(Kd==-1)return rd.Pass;for(var Xd=fd(qd,"closeBefore"),df=fd(qd,"triples"),Ef=Wd.charAt(Kd+1)==Ud,pf=Gd.listSelections(),mf=Kd%2==0,_f,xf=0;xf=0&&Gd.getRange(If,pd(If.line,If.ch+3))==Ud+Ud+Ud?Sf="skipThree":Sf="skip";else if(Ef&&If.ch>1&&df.indexOf(Ud)>=0&&Gd.getRange(pd(If.line,If.ch-2),If)==Ud+Ud){if(If.ch>2&&/\bstring/.test(Gd.getTokenTypeAt(pd(If.line,If.ch-2))))return rd.Pass;Sf="addFour"}else if(Ef){var Pf=If.ch==0?" ":Gd.getRange(pd(If.line,If.ch-1),If);if(!rd.isWordChar(wf)&&Pf!=Ud&&!rd.isWordChar(Pf))Sf="both";else return rd.Pass}else if(mf&&(wf.length===0||/\s/.test(wf)||Xd.indexOf(wf)>-1))Sf="both";else return rd.Pass;if(!_f)_f=Sf;else if(_f!=Sf)return rd.Pass}var lh=Kd%2?Wd.charAt(Kd-1):Ud,xh=Kd%2?Ud:Wd.charAt(Kd+1);Gd.operation(function(){if(_f=="skip")Md(Gd,1);else if(_f=="skipThree")Md(Gd,3);else if(_f=="surround"){for(var Eh=Gd.getSelections(),Mh=0;Mh",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function hd(Md){return Md&&Md.bracketRegex||/[(){}[\]]/}function md(Md,Ld,Fd){var Hd=Md.getLineHandle(Ld.line),Vd=Ld.ch-1,Gd=Fd&&Fd.afterCursor;Gd==null&&(Gd=/(^| )cm-fat-cursor($| )/.test(Md.getWrapperElement().className));var Ud=hd(Fd),qd=!Gd&&Vd>=0&&Ud.test(Hd.text.charAt(Vd))&&fd[Hd.text.charAt(Vd)]||Ud.test(Hd.text.charAt(Vd+1))&&fd[Hd.text.charAt(++Vd)];if(!qd)return null;var Wd=qd.charAt(1)==">"?1:-1;if(Fd&&Fd.strict&&Wd>0!=(Vd==Ld.ch))return null;var Kd=Md.getTokenTypeAt(pd(Ld.line,Vd+1)),Xd=gd(Md,pd(Ld.line,Vd+(Wd>0?1:0)),Wd,Kd,Fd);return Xd==null?null:{from:pd(Ld.line,Vd),to:Xd&&Xd.pos,match:Xd&&Xd.ch==qd.charAt(0),forward:Wd>0}}function gd(Md,Ld,Fd,Hd,Vd){for(var Gd=Vd&&Vd.maxScanLineLength||1e4,Ud=Vd&&Vd.maxScanLines||1e3,qd=[],Wd=hd(Vd),Kd=Fd>0?Math.min(Ld.line+Ud,Md.lastLine()+1):Math.max(Md.firstLine()-1,Ld.line-Ud),Xd=Ld.line;Xd!=Kd;Xd+=Fd){var df=Md.getLine(Xd);if(df){var Ef=Fd>0?0:df.length-1,pf=Fd>0?df.length:-1;if(!(df.length>Gd))for(Xd==Ld.line&&(Ef=Ld.ch-(Fd<0?1:0));Ef!=pf;Ef+=Fd){var mf=df.charAt(Ef);if(Wd.test(mf)&&(Hd===void 0||(Md.getTokenTypeAt(pd(Xd,Ef+1))||"")==(Hd||""))){var _f=fd[mf];if(_f&&_f.charAt(1)==">"==Fd>0)qd.push(mf);else if(qd.length)qd.pop();else return{pos:pd(Xd,Ef),ch:mf}}}}}return Xd-Fd==(Fd>0?Md.lastLine():Md.firstLine())?!1:null}function yd(Md,Ld,Fd){for(var Hd=Md.state.matchBrackets.maxHighlightLineLength||1e3,Vd=Fd&&Fd.highlightNonMatching,Gd=[],Ud=Md.listSelections(),qd=0;qd1)){if(this.somethingSelected()){if(!Gd.hint.supportsSelection)return;for(var qd=0;qddf.clientHeight+1:!1,_h;setTimeout(function(){_h=Wd.getScrollInfo()});var Nh=Df.bottom-vh;if(Nh>0){var dm=Df.bottom-Df.top,Jf=Df.top-(Sf.bottom-Sf.top)-2;vh-Df.topJf&&(df.style.height=(dm=Jf)+"px"),df.style.top=(Pf=Sf.top-dm)+Eh+"px",lh=!1):df.style.height=vh-Df.top-2+"px"}var oh=Df.right-Sh;if(Af&&(oh+=Wd.display.nativeBarWidth),oh>0&&(Df.right-Df.left>Sh&&(df.style.width=Sh-5+"px",oh-=Df.right-Df.left-Sh),df.style.left=(wf=Math.max(Sf.left-oh-xh,0))+"px"),Af)for(var Xh=df.firstChild;Xh;Xh=Xh.nextSibling)Xh.style.paddingRight=Wd.display.nativeBarWidth+"px";if(Wd.addKeyMap(this.keyMap=vd(Gd,{moveFocus:function(Zf,th){qd.changeActive(qd.selectedHint+Zf,th)},setFocus:function(Zf){qd.changeActive(Zf)},menuSize:function(){return qd.screenAmount()},length:pf.length,close:function(){Gd.close()},pick:function(){qd.pick()},data:Ud})),Gd.options.closeOnUnfocus){var Tm;Wd.on("blur",this.onBlur=function(){Tm=setTimeout(function(){Gd.close()},100)}),Wd.on("focus",this.onFocus=function(){clearTimeout(Tm)})}Wd.on("scroll",this.onScroll=function(){var Zf=Wd.getScrollInfo(),th=Wd.getWrapperElement().getBoundingClientRect();_h||(_h=Wd.getScrollInfo());var $h=Pf+_h.top-Zf.top,wh=$h-(Xd.pageYOffset||(Kd.documentElement||Kd.body).scrollTop);if(lh||(wh+=df.offsetHeight),wh<=th.top||wh>=th.bottom)return Gd.close();df.style.top=$h+"px",df.style.left=wf+_h.left-Zf.left+"px"}),rd.on(df,"dblclick",function(Zf){var th=Nd(df,Zf.target||Zf.srcElement);th&&th.hintId!=null&&(qd.changeActive(th.hintId),qd.pick())}),rd.on(df,"click",function(Zf){var th=Nd(df,Zf.target||Zf.srcElement);th&&th.hintId!=null&&(qd.changeActive(th.hintId),Gd.options.completeOnSingleClick&&qd.pick())}),rd.on(df,"mousedown",function(){setTimeout(function(){Wd.focus()},20)});var kh=this.getSelectedHintRange();return(kh.from!==0||kh.to!==0)&&this.scrollToActive(),rd.signal(Ud,"select",pf[this.selectedHint],df.childNodes[this.selectedHint]),!0}Md.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var Gd=this.completion.cm.getInputField();Gd.removeAttribute("aria-activedescendant"),Gd.removeAttribute("aria-owns");var Ud=this.completion.cm;this.completion.options.closeOnUnfocus&&(Ud.off("blur",this.onBlur),Ud.off("focus",this.onFocus)),Ud.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var Gd=this;this.keyMap={Enter:function(){Gd.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(Gd,Ud){if(Gd>=this.data.list.length?Gd=Ud?this.data.list.length-1:0:Gd<0&&(Gd=Ud?0:this.data.list.length-1),this.selectedHint!=Gd){var qd=this.hints.childNodes[this.selectedHint];qd&&(qd.className=qd.className.replace(" "+pd,""),qd.removeAttribute("aria-selected")),qd=this.hints.childNodes[this.selectedHint=Gd],qd.className+=" "+pd,qd.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",qd.id),this.scrollToActive(),rd.signal(this.data,"select",this.data.list[this.selectedHint],qd)}},scrollToActive:function(){var Gd=this.getSelectedHintRange(),Ud=this.hints.childNodes[Gd.from],qd=this.hints.childNodes[Gd.to],Wd=this.hints.firstChild;Ud.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=qd.offsetTop+qd.offsetHeight-this.hints.clientHeight+Wd.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var Gd=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-Gd),to:Math.min(this.data.list.length-1,this.selectedHint+Gd)}}};function Ld(Gd,Ud){if(!Gd.somethingSelected())return Ud;for(var qd=[],Wd=0;Wd0?df(xf):mf(_f+1)})}mf(0)};return Kd.async=!0,Kd.supportsSelection=!0,Kd}else return(Wd=Gd.getHelper(Gd.getCursor(),"hintWords"))?function(Xd){return rd.hint.fromList(Xd,{words:Wd})}:rd.hint.anyword?function(Xd,df){return rd.hint.anyword(Xd,df)}:function(){}}rd.registerHelper("hint","auto",{resolve:Hd}),rd.registerHelper("hint","fromList",function(Gd,Ud){var qd=Gd.getCursor(),Wd=Gd.getTokenAt(qd),Kd,Xd=rd.Pos(qd.line,Wd.start),df=qd;Wd.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};rd.defineOption("hintOptions",null)})})();(function(Ra,qa){(function(rd){rd(requireCodemirror(),cssExports)})(function(rd){var sd={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};rd.registerHelper("hint","css",function(pd){var fd=pd.getCursor(),hd=pd.getTokenAt(fd),md=rd.innerMode(pd.getMode(),hd.state);if(md.mode.name!="css")return;if(hd.type=="keyword"&&"!important".indexOf(hd.string)==0)return{list:["!important"],from:rd.Pos(fd.line,hd.start),to:rd.Pos(fd.line,hd.end)};var gd=hd.start,yd=fd.ch,vd=hd.string.slice(0,yd-gd);/[^\w$_-]/.test(vd)&&(vd="",gd=yd=fd.ch);var Nd=rd.resolveMode("text/css"),Md=[];function Ld(Hd){for(var Vd in Hd)(!vd||Vd.lastIndexOf(vd,0)==0)&&Md.push(Vd)}var Fd=md.state.state;if(Fd=="pseudo"||hd.type=="variable-3"?Ld(sd):Fd=="block"||Fd=="maybeprop"?Ld(Nd.propertyKeywords):Fd=="prop"||Fd=="parens"||Fd=="at"||Fd=="params"?(Ld(Nd.valueKeywords),Ld(Nd.colorKeywords)):(Fd=="media"||Fd=="media_parens")&&(Ld(Nd.mediaTypes),Ld(Nd.mediaFeatures)),Md.length)return{list:Md,from:rd.Pos(fd.line,gd),to:rd.Pos(fd.line,yd)}})})})();const app=createApp(_sfc_main);app.use(createPinia());app.mount("#app");export{withPath as $,rgba$1 as A,defaultConfig_default as B,cleanAndMerge as C,getConfig$2 as D,random as E,setupGraphViewbox2 as F,selectSvgElement as G,version$2 as H,getThemeVariables3 as I,JSON_SCHEMA as J,line$1 as K,hasKatex as L,calculateMathMLDimensions as M,renderKatex as N,parseFontSize as O,parseGenericTypes as P,curveBasis as Q,generateId as R,lineBreakRegex as S,__export as T,commonDb_exports as U,setupGraphViewbox as V,isDark as W,lighten as X,darken as Y,ZERO_WIDTH_SPACE as Z,__name as _,assignWithDepth_default as a,hue as a$,halfPi as a0,epsilon as a1,tau as a2,cos as a3,sin as a4,min$3 as a5,abs$3 as a6,pi as a7,sqrt as a8,atan2 as a9,baseRest as aA,isArrayLikeObject as aB,constant$2 as aC,isFunction$2 as aD,isEmpty$1 as aE,computeDimensionOfText as aF,array$1 as aG,commonjsGlobal as aH,getDefaultExportFromCjs as aI,unknownIcon as aJ,registerIconPacks as aK,getIconSVG as aL,isObject$5 as aM,isIterateeCall as aN,keysIn as aO,eq as aP,isArrayLike$1 as aQ,isArray$1 as aR,identity as aS,isIndex$2 as aT,assignValue as aU,define$1 as aV,extend$1 as aW,Rgb as aX,Color as aY,rgbConvert as aZ,nogamma as a_,constant$3 as aa,asin as ab,acos as ac,max$4 as ad,insertCluster as ae,insertNode as af,positionNode as ag,getStylesFromArray as ah,evaluate as ai,createText as aj,getSubGraphTitleMargins as ak,getLineFunctionsWithOffset as al,replaceIconSubstring as am,decodeEntities as an,Utils$1 as ao,Color$1 as ap,global$1 as aq,markers_default as ar,clear2 as as,clear as at,clear$1 as au,updateNodeBounds as av,setNodeElem as aw,insertEdge as ax,positionEdgeLabel as ay,insertEdgeLabel as az,getAccDescription as b,dayjs2 as b0,constant$4 as b1,interpolateNumber as b2,color as b3,interpolateRgb as b4,interpolateString as b5,setToString as b6,overRest as b7,baseFor as b8,baseAssignValue as b9,isPrototype as bA,__vitePreload as bB,baseUnary as ba,merge$3 as bb,isObjectLike$2 as bc,baseGetTag as bd,Symbol$1 as be,arrayLikeKeys as bf,baseKeys as bg,memoize$2 as bh,isArguments$1 as bi,copyObject as bj,getPrototype as bk,cloneArrayBuffer as bl,cloneTypedArray as bm,getTag$2 as bn,nodeUtil as bo,copyArray as bp,isBuffer$1 as bq,cloneBuffer as br,initCloneObject as bs,Stack as bt,MapCache as bu,Uint8Array$1 as bv,isTypedArray$2 as bw,isLength as bx,Set$1 as by,createAssigner as bz,setAccDescription as c,getConfig2 as d,common_default as e,calculateTextHeight as f,getAccTitle as g,calculateTextWidth as h,sanitizeText as i,select as j,configureSvgSize as k,log$1 as l,sanitizeUrl_1 as m,setConfig2 as n,defaultConfig2 as o,setDiagramTitle as p,getDiagramTitle as q,load as r,setAccTitle as s,isValidShape as t,utils_default as u,clear$2 as v,wrapLabel as w,getEdgeId as x,getRegisteredLayoutAlgorithm as y,render$1 as z}; + `;return new Promise((resolve,reject)=>{const exportObj={content,file,util:{axios:service,CryptoJS,OSS,COS,Buffer:Buffer$1,uuidv4:v4,qiniu,tokenTools,getDir,getDateFilename},okCb:resolve,errCb:reject};eval(str)(exportObj).catch(Ra=>{console.error(Ra),reject(Ra)})})}function fileUpload(Ra,ed){const ud=localStorage.getItem("imgHost");switch(ud||localStorage.setItem("imgHost","default"),ud){case"aliOSS":return aliOSSFileUpload(ed);case"minio":return minioFileUpload(Ra,ed.name);case"txCOS":return txCOSFileUpload(ed);case"qiniu":return qiniuUpload(ed);case"gitee":return giteeUpload(Ra,ed.name);case"github":return ghFileUpload(Ra,ed.name);case"mp":return mpFileUpload(ed);case"r2":return r2Upload(ed);case"formCustom":return formCustomUpload(Ra,ed);default:return ghFileUpload(Ra,ed.name)}}const fileApi={fileUpload},_hoisted_1={class:"container-main flex flex-1 flex-col"},_hoisted_2={class:"container-main-section border-radius-10 relative flex flex-1 overflow-hidden border-1"},_hoisted_3={class:"preview border-x-1 shadow-xl"},_hoisted_4=["innerHTML"],_hoisted_5={key:0,class:"loading-mask"},_hoisted_6={class:"h-[30px] flex select-none items-center justify-end px-4 text-[12px]"},_sfc_main$1=defineComponent({__name:"CodemirrorEditor",setup(Ra){const ed=useStore(),ud=useDisplayStore(),{isDark:dd,output:hd,editor:md,readingTime:gd}=storeToRefs(ed),{editorRefresh:yd,exportEditorContent2HTML:vd,exportEditorContent2MD:Cd,formatContent:wd,importMarkdownContent:Nd,resetStyleConfirm:Ld}=ed,{toggleShowInsertFormDialog:Ud,toggleShowUploadImgDialog:jd}=ud,Gd=ref$1(!1),Yd=ref$1(),zd=ref$1(null);function qd(){const Ff=yh=>{let Mh,lh;clearTimeout(Yd.value),yh==="preview"?(Mh=zd.value,lh=document.querySelector(".CodeMirror-scroll"),md.value.off("scroll",sh),Yd.value=setTimeout(()=>{md.value.on("scroll",sh)},300)):(Mh=document.querySelector(".CodeMirror-scroll"),lh=zd.value,lh.removeEventListener("scroll",Sh,!1),Yd.value=setTimeout(()=>{lh.addEventListener("scroll",Sh,!1)},300));const mh=Mh.scrollTop/(Mh.scrollHeight-Mh.offsetHeight)*(lh.scrollHeight-lh.offsetHeight);lh.scrollTo(0,mh)};function sh(){Ff("editor")}function Sh(){Ff("preview")}zd.value.addEventListener("scroll",Sh,!1),md.value.on("scroll",sh)}onMounted(()=>{setTimeout(()=>{qd()},300)});function Wd(){yd()}const Xd=ref$1(!1),Jd=ref$1(!1);function Zd(){Jd.value=!0,Xd.value=!0}function mf(){Xd.value=!1,setTimeout(()=>{Jd.value=!1},800)}function xf(Ff){const sh=checkImage(Ff);if(!sh.ok)return Ke.error(sh.msg),!1;const Sh=localStorage.getItem("imgHost")||"default";localStorage.setItem("imgHost",Sh);const yh=localStorage.getItem(`${Sh}Config`);return Sh==="default"||yh?!0:(Ke.error(`请先配置 ${Sh} 图床参数`),!1)}function _f(Ff){if(!Ff){Ke.error("上传图片未知异常");return}jd(!1);const sh=md.value.getCursor(),Sh=`![](${Ff})`;toRaw(ed.editor).replaceSelection(` +${Sh} +`,sh),Ke.success("图片上传成功")}function vf(Ff,sh){Gd.value=!0,toBase64$2(Ff).then(Sh=>fileApi.fileUpload(Sh,Ff)).then(Sh=>{sh?sh(Sh):_f(Sh)}).catch(Sh=>{Ke.error(Sh.message)}).finally(()=>{Gd.value=!1})}const gf=ref$1();watch(dd,()=>{var sh,Sh;const Ff=dd.value?"darcula":"xq-light";(Sh=(sh=toRaw(md.value))==null?void 0:sh.setOption)==null||Sh.call(sh,"theme",Ff)});function Af(){const Ff=document.querySelector("#editor");Ff.value||(Ff.value=ed.posts[ed.currentPostIndex].content),md.value=CodeMirror.fromTextArea(Ff,{mode:"text/x-markdown",theme:dd.value?"darcula":"xq-light",lineNumbers:!1,lineWrapping:!0,styleActiveLine:!0,autoCloseBrackets:!0,extraKeys:{[`${shiftKey}-${altKey}-F`]:function(Sh){formatDoc(Sh.getValue()).then(yh=>{Sh.setValue(yh)})},[`${ctrlKey}-B`]:function(Sh){const yh=Sh.getSelection();Sh.replaceSelection(`**${yh}**`)},[`${ctrlKey}-I`]:function(Sh){const yh=Sh.getSelection();Sh.replaceSelection(`*${yh}*`)},[`${ctrlKey}-D`]:function(Sh){const yh=Sh.getSelection();Sh.replaceSelection(`~~${yh}~~`)},[`${ctrlKey}-K`]:function(Sh){const yh=Sh.getSelection();Sh.replaceSelection(`[${yh}]()`)},[`${ctrlKey}-E`]:function(Sh){const yh=Sh.getSelection();Sh.replaceSelection(`\`${yh}\``)},[`${ctrlKey}-L`]:function(Sh){const yh=Sh.getSelection();Sh.replaceSelection(`\`${yh}\``)}}}),md.value.on("change",sh=>{clearTimeout(gf.value),gf.value=setTimeout(()=>{Wd(),ed.posts[ed.currentPostIndex].content=sh.getValue()},300)}),md.value.on("paste",(sh,Sh)=>{if(!(!(Sh.clipboardData&&Sh.clipboardData.items)||Gd.value))for(let yh=0,Mh=Sh.clipboardData.items.length;yh{const rh=[...Mh.str.matchAll(/!\[(.*?)\]\((.*?)\)/g)||[]].filter(Eh=>Eh),mh=Mh.path.match(/.+?\//)[0];(await Promise.all(rh.map(Eh=>new Promise(kf=>{let[,,Rf]=Eh;Rf=Rf.replace(/^.\//,"");const{file:_h}=lh.find(Ph=>Ph.path===`${mh}${Rf}`)||{};vf(_h,Ph=>{kf({matchStr:Rf,url:Ph})})})))).forEach(Eh=>{Mh.str=Mh.str.replace(`](./${Eh.matchStr})`,`](${Eh.url})`).replace(`](${Eh.matchStr})`,`](${Eh.url})`)}),md.value.setValue(Mh.str)};Ff.ondragover=Mh=>Mh.preventDefault(),Ff.ondrop=async Mh=>{Mh.preventDefault();for(const lh of Mh.dataTransfer.items)lh.getAsFileSystemHandle().then(async rh=>{if(rh.kind==="directory"){const mh=await yh(rh),xh=await Sh({list:mh});sh({md:xh,list:mh})}else{const mh=await rh.getFile();console.log("file",mh)}})};async function Sh({list:Mh}){return new Promise(lh=>{const{path:rh,file:mh}=Mh.find(Eh=>Eh.path.match(/\.md$/)),xh=new FileReader;xh.readAsText(mh,"UTF-8"),xh.onload=Eh=>{lh({str:Eh.target.result,file:mh,path:rh})}})}async function yh(Mh){const lh=[];let rh="";try{const mh=[Mh];for(const xh of mh){rh+=`${xh.name}/`;for await(const[,Eh]of xh)Eh.kind==="file"?lh.push({path:rh+Eh.name,file:await Eh.getFile()}):(lh.push({path:`${rh+Eh.name}/`}),mh.push(Eh))}}catch(mh){console.error(mh)}return lh}}return onMounted(()=>{Af(),Wd(),If()}),(Ff,sh)=>{var om,zh;const Sh=__unplugin_components_0,yh=_sfc_main$C,Mh=_sfc_main$I,lh=_sfc_main$J,rh=_sfc_main$K,mh=_sfc_main$L,xh=_sfc_main$M,Eh=_sfc_main$N,kf=_sfc_main$O,Rf=__unplugin_components_9,_h=_sfc_main$R,Ph=_sfc_main$S,sm=_sfc_main$15,th=__unplugin_components_13$1,oh=_sfc_main$1j,Zh=_sfc_main$1k,Sm=_sfc_main$1l,$h=_sfc_main$1m,Vf=_sfc_main$1n,nh=_sfc_main$1p,Lh=_sfc_main$1q,Ih=_sfc_main$1r;return openBlock(),createElementBlock("div",{ref_key:"container",ref:Df,class:"container flex flex-col"},[createVNode(Sh,{onAddFormat:Of,onFormatContent:unref(wd),onStartCopy:Zd,onEndCopy:mf},null,8,["onFormatContent"]),createBaseVNode("main",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createVNode(yh),createBaseVNode("div",{ref_key:"codeMirrorWrapper",ref:Cf,class:normalizeClass(["codeMirror-wrapper flex-1",{"order-1 border-l":!unref(ed).isEditOnLeft,"border-r":unref(ed).isEditOnLeft}])},[createVNode(Eh,null,{default:withCtx(()=>[createVNode(Mh,null,{default:withCtx(()=>sh[9]||(sh[9]=[createBaseVNode("textarea",{id:"editor",type:"textarea",placeholder:"Your markdown text here."},null,-1)])),_:1}),createVNode(xh,{class:"w-64"},{default:withCtx(()=>[createVNode(lh,{inset:"",onClick:sh[0]||(sh[0]=Om=>unref(jd)())},{default:withCtx(()=>sh[10]||(sh[10]=[createTextVNode(" 上传图片 ")])),_:1}),createVNode(lh,{inset:"",onClick:sh[1]||(sh[1]=Om=>unref(Ud)())},{default:withCtx(()=>sh[11]||(sh[11]=[createTextVNode(" 插入表格 ")])),_:1}),createVNode(lh,{inset:"",onClick:sh[2]||(sh[2]=Om=>unref(Ld)())},{default:withCtx(()=>sh[12]||(sh[12]=[createTextVNode(" 恢复默认样式 ")])),_:1}),createVNode(rh),createVNode(lh,{inset:"",onClick:sh[3]||(sh[3]=Om=>unref(Nd)())},{default:withCtx(()=>sh[13]||(sh[13]=[createTextVNode(" 导入 .md 文档 ")])),_:1}),createVNode(lh,{inset:"",onClick:sh[4]||(sh[4]=Om=>unref(Cd)())},{default:withCtx(()=>sh[14]||(sh[14]=[createTextVNode(" 导出 .md 文档 ")])),_:1}),createVNode(lh,{inset:"",onClick:sh[5]||(sh[5]=Om=>unref(vd)())},{default:withCtx(()=>sh[15]||(sh[15]=[createTextVNode(" 导出 .html ")])),_:1}),createVNode(lh,{inset:"",onClick:sh[6]||(sh[6]=Om=>unref(wd)())},{default:withCtx(()=>[sh[16]||(sh[16]=createTextVNode(" 格式化 ")),createVNode(mh,null,{default:withCtx(()=>[createTextVNode(toDisplayString(unref(altSign))+" + "+toDisplayString(unref(shiftSign))+" + F",1)]),_:1})]),_:1})]),_:1})]),_:1})],2),createBaseVNode("div",{id:"preview",ref_key:"preview",ref:zd,class:"preview-wrapper flex-1 p-5"},[createBaseVNode("div",{id:"output-wrapper",class:normalizeClass({output_night:!unref(Xd)})},[createBaseVNode("div",_hoisted_3,[createBaseVNode("section",{id:"output",innerHTML:unref(hd)},null,8,_hoisted_4),unref(Jd)?(openBlock(),createElementBlock("div",_hoisted_5,sh[17]||(sh[17]=[createBaseVNode("div",{class:"loading-mask-box"},[createBaseVNode("div",{class:"loading__img"}),createBaseVNode("span",null,"正在生成")],-1)]))):createCommentVNode("",!0)])],2),createVNode(kf,{target:"preview",right:40,bottom:40})],512),createVNode(Rf,{class:"order-2 flex-1"}),createVNode(_h,{class:"order-2"})]),createBaseVNode("footer",_hoisted_6," 字数 "+toDisplayString((om=unref(gd))==null?void 0:om.words)+", 阅读大约需 "+toDisplayString(Math.ceil(((zh=unref(gd))==null?void 0:zh.minutes)??0))+" 分钟 ",1),createVNode(Ph,{onUploadImage:vf}),createVNode(sm),createVNode(th),createVNode(Ih,{open:unref(ed).isOpenConfirmDialog,"onUpdate:open":sh[8]||(sh[8]=Om=>unref(ed).isOpenConfirmDialog=Om)},{default:withCtx(()=>[createVNode(Lh,null,{default:withCtx(()=>[createVNode(Sm,null,{default:withCtx(()=>[createVNode(oh,null,{default:withCtx(()=>sh[18]||(sh[18]=[createTextVNode("提示")])),_:1}),createVNode(Zh,null,{default:withCtx(()=>sh[19]||(sh[19]=[createTextVNode(" 此操作将丢失本地自定义样式,是否继续? ")])),_:1})]),_:1}),createVNode(nh,null,{default:withCtx(()=>[createVNode($h,null,{default:withCtx(()=>sh[20]||(sh[20]=[createTextVNode("取消")])),_:1}),createVNode(Vf,{onClick:sh[7]||(sh[7]=Om=>unref(ed).resetStyle())},{default:withCtx(()=>sh[21]||(sh[21]=[createTextVNode(" 确认 ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"])])],512)}}}),CodemirrorEditor=_export_sfc(_sfc_main$1,[["__scopeId","data-v-74776407"]]),_sfc_main=defineComponent({__name:"App",setup(Ra){return(ed,ud)=>(openBlock(),createBlock(CodemirrorEditor))}});var css={exports:{}};(function(Ra,ed){(function(ud){ud(requireCodemirror())})(function(ud){ud.defineMode("css",function(vf,gf){var Af=gf.inline;gf.propertyKeywords||(gf=ud.resolveMode("text/css"));var Df=vf.indentUnit,Of=gf.tokenHooks,Cf=gf.documentTypes||{},If=gf.mediaTypes||{},Ff=gf.mediaFeatures||{},sh=gf.mediaValueKeywords||{},Sh=gf.propertyKeywords||{},yh=gf.nonStandardPropertyKeywords||{},Mh=gf.fontProperties||{},lh=gf.counterDescriptors||{},rh=gf.colorKeywords||{},mh=gf.valueKeywords||{},xh=gf.allowNested,Eh=gf.lineComment,kf=gf.supportsAtComponent===!0,Rf=vf.highlightNonStandardPropertyKeywords!==!1,_h,Ph;function sm(zh,Om){return _h=Om,zh}function th(zh,Om){var Im=zh.next();if(Of[Im]){var Zm=Of[Im](zh,Om);if(Zm!==!1)return Zm}if(Im=="@")return zh.eatWhile(/[\w\\\-]/),sm("def",zh.current());if(Im=="="||(Im=="~"||Im=="|")&&zh.eat("="))return sm(null,"compare");if(Im=='"'||Im=="'")return Om.tokenize=oh(Im),Om.tokenize(zh,Om);if(Im=="#")return zh.eatWhile(/[\w\\\-]/),sm("atom","hash");if(Im=="!")return zh.match(/^\s*\w*/),sm("keyword","important");if(/\d/.test(Im)||Im=="."&&zh.eat(/\d/))return zh.eatWhile(/[\w.%]/),sm("number","unit");if(Im==="-"){if(/[\d.]/.test(zh.peek()))return zh.eatWhile(/[\w.%]/),sm("number","unit");if(zh.match(/^-[\w\\\-]*/))return zh.eatWhile(/[\w\\\-]/),zh.match(/^\s*:/,!1)?sm("variable-2","variable-definition"):sm("variable-2","variable");if(zh.match(/^\w+-/))return sm("meta","meta")}else return/[,+>*\/]/.test(Im)?sm(null,"select-op"):Im=="."&&zh.match(/^-?[_a-z][_a-z0-9-]*/i)?sm("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(Im)?sm(null,Im):zh.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(zh.current())&&(Om.tokenize=Zh),sm("variable callee","variable")):/[\w\\\-]/.test(Im)?(zh.eatWhile(/[\w\\\-]/),sm("property","word")):sm(null,null)}function oh(zh){return function(Om,Im){for(var Zm=!1,Lm;(Lm=Om.next())!=null;){if(Lm==zh&&!Zm){zh==")"&&Om.backUp(1);break}Zm=!Zm&&Lm=="\\"}return(Lm==zh||!Zm&&zh!=")")&&(Im.tokenize=null),sm("string","string")}}function Zh(zh,Om){return zh.next(),zh.match(/^\s*[\"\')]/,!1)?Om.tokenize=null:Om.tokenize=oh(")"),sm(null,"(")}function Sm(zh,Om,Im){this.type=zh,this.indent=Om,this.prev=Im}function $h(zh,Om,Im,Zm){return zh.context=new Sm(Im,Om.indentation()+(Zm===!1?0:Df),zh.context),Im}function Vf(zh){return zh.context.prev&&(zh.context=zh.context.prev),zh.context.type}function nh(zh,Om,Im){return om[Im.context.type](zh,Om,Im)}function Lh(zh,Om,Im,Zm){for(var Lm=Zm||1;Lm>0;Lm--)Im.context=Im.context.prev;return nh(zh,Om,Im)}function Ih(zh){var Om=zh.current().toLowerCase();mh.hasOwnProperty(Om)?Ph="atom":rh.hasOwnProperty(Om)?Ph="keyword":Ph="variable"}var om={};return om.top=function(zh,Om,Im){if(zh=="{")return $h(Im,Om,"block");if(zh=="}"&&Im.context.prev)return Vf(Im);if(kf&&/@component/i.test(zh))return $h(Im,Om,"atComponentBlock");if(/^@(-moz-)?document$/i.test(zh))return $h(Im,Om,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(zh))return $h(Im,Om,"atBlock");if(/^@(font-face|counter-style)/i.test(zh))return Im.stateArg=zh,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(zh))return"keyframes";if(zh&&zh.charAt(0)=="@")return $h(Im,Om,"at");if(zh=="hash")Ph="builtin";else if(zh=="word")Ph="tag";else{if(zh=="variable-definition")return"maybeprop";if(zh=="interpolation")return $h(Im,Om,"interpolation");if(zh==":")return"pseudo";if(xh&&zh=="(")return $h(Im,Om,"parens")}return Im.context.type},om.block=function(zh,Om,Im){if(zh=="word"){var Zm=Om.current().toLowerCase();return Sh.hasOwnProperty(Zm)?(Ph="property","maybeprop"):yh.hasOwnProperty(Zm)?(Ph=Rf?"string-2":"property","maybeprop"):xh?(Ph=Om.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(Ph+=" error","maybeprop")}else return zh=="meta"?"block":!xh&&(zh=="hash"||zh=="qualifier")?(Ph="error","block"):om.top(zh,Om,Im)},om.maybeprop=function(zh,Om,Im){return zh==":"?$h(Im,Om,"prop"):nh(zh,Om,Im)},om.prop=function(zh,Om,Im){if(zh==";")return Vf(Im);if(zh=="{"&&xh)return $h(Im,Om,"propBlock");if(zh=="}"||zh=="{")return Lh(zh,Om,Im);if(zh=="(")return $h(Im,Om,"parens");if(zh=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(Om.current()))Ph+=" error";else if(zh=="word")Ih(Om);else if(zh=="interpolation")return $h(Im,Om,"interpolation");return"prop"},om.propBlock=function(zh,Om,Im){return zh=="}"?Vf(Im):zh=="word"?(Ph="property","maybeprop"):Im.context.type},om.parens=function(zh,Om,Im){return zh=="{"||zh=="}"?Lh(zh,Om,Im):zh==")"?Vf(Im):zh=="("?$h(Im,Om,"parens"):zh=="interpolation"?$h(Im,Om,"interpolation"):(zh=="word"&&Ih(Om),"parens")},om.pseudo=function(zh,Om,Im){return zh=="meta"?"pseudo":zh=="word"?(Ph="variable-3",Im.context.type):nh(zh,Om,Im)},om.documentTypes=function(zh,Om,Im){return zh=="word"&&Cf.hasOwnProperty(Om.current())?(Ph="tag",Im.context.type):om.atBlock(zh,Om,Im)},om.atBlock=function(zh,Om,Im){if(zh=="(")return $h(Im,Om,"atBlock_parens");if(zh=="}"||zh==";")return Lh(zh,Om,Im);if(zh=="{")return Vf(Im)&&$h(Im,Om,xh?"block":"top");if(zh=="interpolation")return $h(Im,Om,"interpolation");if(zh=="word"){var Zm=Om.current().toLowerCase();Zm=="only"||Zm=="not"||Zm=="and"||Zm=="or"?Ph="keyword":If.hasOwnProperty(Zm)?Ph="attribute":Ff.hasOwnProperty(Zm)?Ph="property":sh.hasOwnProperty(Zm)?Ph="keyword":Sh.hasOwnProperty(Zm)?Ph="property":yh.hasOwnProperty(Zm)?Ph=Rf?"string-2":"property":mh.hasOwnProperty(Zm)?Ph="atom":rh.hasOwnProperty(Zm)?Ph="keyword":Ph="error"}return Im.context.type},om.atComponentBlock=function(zh,Om,Im){return zh=="}"?Lh(zh,Om,Im):zh=="{"?Vf(Im)&&$h(Im,Om,xh?"block":"top",!1):(zh=="word"&&(Ph="error"),Im.context.type)},om.atBlock_parens=function(zh,Om,Im){return zh==")"?Vf(Im):zh=="{"||zh=="}"?Lh(zh,Om,Im,2):om.atBlock(zh,Om,Im)},om.restricted_atBlock_before=function(zh,Om,Im){return zh=="{"?$h(Im,Om,"restricted_atBlock"):zh=="word"&&Im.stateArg=="@counter-style"?(Ph="variable","restricted_atBlock_before"):nh(zh,Om,Im)},om.restricted_atBlock=function(zh,Om,Im){return zh=="}"?(Im.stateArg=null,Vf(Im)):zh=="word"?(Im.stateArg=="@font-face"&&!Mh.hasOwnProperty(Om.current().toLowerCase())||Im.stateArg=="@counter-style"&&!lh.hasOwnProperty(Om.current().toLowerCase())?Ph="error":Ph="property","maybeprop"):"restricted_atBlock"},om.keyframes=function(zh,Om,Im){return zh=="word"?(Ph="variable","keyframes"):zh=="{"?$h(Im,Om,"top"):nh(zh,Om,Im)},om.at=function(zh,Om,Im){return zh==";"?Vf(Im):zh=="{"||zh=="}"?Lh(zh,Om,Im):(zh=="word"?Ph="tag":zh=="hash"&&(Ph="builtin"),"at")},om.interpolation=function(zh,Om,Im){return zh=="}"?Vf(Im):zh=="{"||zh==";"?Lh(zh,Om,Im):(zh=="word"?Ph="variable":zh!="variable"&&zh!="("&&zh!=")"&&(Ph="error"),"interpolation")},{startState:function(zh){return{tokenize:null,state:Af?"block":"top",stateArg:null,context:new Sm(Af?"block":"top",zh||0,null)}},token:function(zh,Om){if(!Om.tokenize&&zh.eatSpace())return null;var Im=(Om.tokenize||th)(zh,Om);return Im&&typeof Im=="object"&&(_h=Im[1],Im=Im[0]),Ph=Im,_h!="comment"&&(Om.state=om[Om.state](_h,zh,Om)),Ph},indent:function(zh,Om){var Im=zh.context,Zm=Om&&Om.charAt(0),Lm=Im.indent;return Im.type=="prop"&&(Zm=="}"||Zm==")")&&(Im=Im.prev),Im.prev&&(Zm=="}"&&(Im.type=="block"||Im.type=="top"||Im.type=="interpolation"||Im.type=="restricted_atBlock")?(Im=Im.prev,Lm=Im.indent):(Zm==")"&&(Im.type=="parens"||Im.type=="atBlock_parens")||Zm=="{"&&(Im.type=="at"||Im.type=="atBlock"))&&(Lm=Math.max(0,Im.indent-Df))),Lm},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Eh,fold:"brace"}});function dd(vf){for(var gf={},Af=0;Af!?|~^@]/,jd=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Gd(Hh){for(var Mm=!1,pg,Rg=!1;(pg=Hh.next())!=null;){if(!Mm){if(pg=="/"&&!Rg)return;pg=="["?Rg=!0:Rg&&pg=="]"&&(Rg=!1)}Mm=!Mm&&pg=="\\"}}var Yd,zd;function qd(Hh,Mm,pg){return Yd=Hh,zd=pg,Mm}function Wd(Hh,Mm){var pg=Hh.next();if(pg=='"'||pg=="'")return Mm.tokenize=Xd(pg),Mm.tokenize(Hh,Mm);if(pg=="."&&Hh.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return qd("number","number");if(pg=="."&&Hh.match(".."))return qd("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(pg))return qd(pg);if(pg=="="&&Hh.eat(">"))return qd("=>","operator");if(pg=="0"&&Hh.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return qd("number","number");if(/\d/.test(pg))return Hh.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),qd("number","number");if(pg=="/")return Hh.eat("*")?(Mm.tokenize=Jd,Jd(Hh,Mm)):Hh.eat("/")?(Hh.skipToEnd(),qd("comment","comment")):s_(Hh,Mm,1)?(Gd(Hh),Hh.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),qd("regexp","string-2")):(Hh.eat("="),qd("operator","operator",Hh.current()));if(pg=="`")return Mm.tokenize=Zd,Zd(Hh,Mm);if(pg=="#"&&Hh.peek()=="!")return Hh.skipToEnd(),qd("meta","meta");if(pg=="#"&&Hh.eatWhile(Nd))return qd("variable","property");if(pg=="<"&&Hh.match("!--")||pg=="-"&&Hh.match("->")&&!/\S/.test(Hh.string.slice(0,Hh.start)))return Hh.skipToEnd(),qd("comment","comment");if(Ud.test(pg))return(pg!=">"||!Mm.lexical||Mm.lexical.type!=">")&&(Hh.eat("=")?(pg=="!"||pg=="=")&&Hh.eat("="):/[<>*+\-|&?]/.test(pg)&&(Hh.eat(pg),pg==">"&&Hh.eat(pg))),pg=="?"&&Hh.eat(".")?qd("."):qd("operator","operator",Hh.current());if(Nd.test(pg)){Hh.eatWhile(Nd);var Rg=Hh.current();if(Mm.lastType!="."){if(Ld.propertyIsEnumerable(Rg)){var og=Ld[Rg];return qd(og.type,og.style,Rg)}if(Rg=="async"&&Hh.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return qd("async","keyword",Rg)}return qd("variable","variable",Rg)}}function Xd(Hh){return function(Mm,pg){var Rg=!1,og;if(yd&&Mm.peek()=="@"&&Mm.match(jd))return pg.tokenize=Wd,qd("jsonld-keyword","meta");for(;(og=Mm.next())!=null&&!(og==Hh&&!Rg);)Rg=!Rg&&og=="\\";return Rg||(pg.tokenize=Wd),qd("string","string")}}function Jd(Hh,Mm){for(var pg=!1,Rg;Rg=Hh.next();){if(Rg=="/"&&pg){Mm.tokenize=Wd;break}pg=Rg=="*"}return qd("comment","comment")}function Zd(Hh,Mm){for(var pg=!1,Rg;(Rg=Hh.next())!=null;){if(!pg&&(Rg=="`"||Rg=="$"&&Hh.eat("{"))){Mm.tokenize=Wd;break}pg=!pg&&Rg=="\\"}return qd("quasi","string-2",Hh.current())}var mf="([{}])";function xf(Hh,Mm){Mm.fatArrowAt&&(Mm.fatArrowAt=null);var pg=Hh.string.indexOf("=>",Hh.start);if(!(pg<0)){if(wd){var Rg=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(Hh.string.slice(Hh.start,pg));Rg&&(pg=Rg.index)}for(var og=0,Fg=!1,y_=pg-1;y_>=0;--y_){var Y_=Hh.string.charAt(y_),s0=mf.indexOf(Y_);if(s0>=0&&s0<3){if(!og){++y_;break}if(--og==0){Y_=="("&&(Fg=!0);break}}else if(s0>=3&&s0<6)++og;else if(Nd.test(Y_))Fg=!0;else if(/["'\/`]/.test(Y_))for(;;--y_){if(y_==0)return;var L0=Hh.string.charAt(y_-1);if(L0==Y_&&Hh.string.charAt(y_-2)!="\\"){y_--;break}}else if(Fg&&!og){++y_;break}}Fg&&!og&&(Mm.fatArrowAt=y_)}}var _f={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function vf(Hh,Mm,pg,Rg,og,Fg){this.indented=Hh,this.column=Mm,this.type=pg,this.prev=og,this.info=Fg,Rg!=null&&(this.align=Rg)}function gf(Hh,Mm){if(!Cd)return!1;for(var pg=Hh.localVars;pg;pg=pg.next)if(pg.name==Mm)return!0;for(var Rg=Hh.context;Rg;Rg=Rg.prev)for(var pg=Rg.vars;pg;pg=pg.next)if(pg.name==Mm)return!0}function Af(Hh,Mm,pg,Rg,og){var Fg=Hh.cc;for(Df.state=Hh,Df.stream=og,Df.marked=null,Df.cc=Fg,Df.style=Mm,Hh.lexical.hasOwnProperty("align")||(Hh.lexical.align=!0);;){var y_=Fg.length?Fg.pop():vd?sm:_h;if(y_(pg,Rg)){for(;Fg.length&&Fg[Fg.length-1].lex;)Fg.pop()();return Df.marked?Df.marked:pg=="variable"&&gf(Hh,Rg)?"variable-2":Mm}}}var Df={state:null,marked:null,cc:null};function Of(){for(var Hh=arguments.length-1;Hh>=0;Hh--)Df.cc.push(arguments[Hh])}function Cf(){return Of.apply(null,arguments),!0}function If(Hh,Mm){for(var pg=Mm;pg;pg=pg.next)if(pg.name==Hh)return!0;return!1}function Ff(Hh){var Mm=Df.state;if(Df.marked="def",!!Cd){if(Mm.context){if(Mm.lexical.info=="var"&&Mm.context&&Mm.context.block){var pg=sh(Hh,Mm.context);if(pg!=null){Mm.context=pg;return}}else if(!If(Hh,Mm.localVars)){Mm.localVars=new Mh(Hh,Mm.localVars);return}}hd.globalVars&&!If(Hh,Mm.globalVars)&&(Mm.globalVars=new Mh(Hh,Mm.globalVars))}}function sh(Hh,Mm){if(Mm)if(Mm.block){var pg=sh(Hh,Mm.prev);return pg?pg==Mm.prev?Mm:new yh(pg,Mm.vars,!0):null}else return If(Hh,Mm.vars)?Mm:new yh(Mm.prev,new Mh(Hh,Mm.vars),!1);else return null}function Sh(Hh){return Hh=="public"||Hh=="private"||Hh=="protected"||Hh=="abstract"||Hh=="readonly"}function yh(Hh,Mm,pg){this.prev=Hh,this.vars=Mm,this.block=pg}function Mh(Hh,Mm){this.name=Hh,this.next=Mm}var lh=new Mh("this",new Mh("arguments",null));function rh(){Df.state.context=new yh(Df.state.context,Df.state.localVars,!1),Df.state.localVars=lh}function mh(){Df.state.context=new yh(Df.state.context,Df.state.localVars,!0),Df.state.localVars=null}rh.lex=mh.lex=!0;function xh(){Df.state.localVars=Df.state.context.vars,Df.state.context=Df.state.context.prev}xh.lex=!0;function Eh(Hh,Mm){var pg=function(){var Rg=Df.state,og=Rg.indented;if(Rg.lexical.type=="stat")og=Rg.lexical.indented;else for(var Fg=Rg.lexical;Fg&&Fg.type==")"&&Fg.align;Fg=Fg.prev)og=Fg.indented;Rg.lexical=new vf(og,Df.stream.column(),Hh,null,Rg.lexical,Mm)};return pg.lex=!0,pg}function kf(){var Hh=Df.state;Hh.lexical.prev&&(Hh.lexical.type==")"&&(Hh.indented=Hh.lexical.indented),Hh.lexical=Hh.lexical.prev)}kf.lex=!0;function Rf(Hh){function Mm(pg){return pg==Hh?Cf():Hh==";"||pg=="}"||pg==")"||pg=="]"?Of():Cf(Mm)}return Mm}function _h(Hh,Mm){return Hh=="var"?Cf(Eh("vardef",Mm),O_,Rf(";"),kf):Hh=="keyword a"?Cf(Eh("form"),oh,_h,kf):Hh=="keyword b"?Cf(Eh("form"),_h,kf):Hh=="keyword d"?Df.stream.match(/^\s*$/,!1)?Cf():Cf(Eh("stat"),Sm,Rf(";"),kf):Hh=="debugger"?Cf(Rf(";")):Hh=="{"?Cf(Eh("}"),mh,$f,kf,xh):Hh==";"?Cf():Hh=="if"?(Df.state.lexical.info=="else"&&Df.state.cc[Df.state.cc.length-1]==kf&&Df.state.cc.pop()(),Cf(Eh("form"),oh,_h,kf,Pg)):Hh=="function"?Cf(ih):Hh=="for"?Cf(Eh("form"),mh,$0,_h,xh,kf):Hh=="class"||wd&&Mm=="interface"?(Df.marked="keyword",Cf(Eh("form",Hh=="class"?Hh:Mm),Pm,kf)):Hh=="variable"?wd&&Mm=="declare"?(Df.marked="keyword",Cf(_h)):wd&&(Mm=="module"||Mm=="enum"||Mm=="type")&&Df.stream.match(/^\s*\w/,!1)?(Df.marked="keyword",Mm=="enum"?Cf(Mg):Mm=="type"?Cf(Qh,Rf("operator"),Ym,Rf(";")):Cf(Eh("form"),S_,Rf("{"),Eh("}"),$f,kf,kf)):wd&&Mm=="namespace"?(Df.marked="keyword",Cf(Eh("form"),sm,_h,kf)):wd&&Mm=="abstract"?(Df.marked="keyword",Cf(_h)):Cf(Eh("stat"),Zm):Hh=="switch"?Cf(Eh("form"),oh,Rf("{"),Eh("}","switch"),mh,$f,kf,kf,xh):Hh=="case"?Cf(sm,Rf(":")):Hh=="default"?Cf(Rf(":")):Hh=="catch"?Cf(Eh("form"),rh,Ph,_h,kf,xh):Hh=="export"?Cf(Eh("stat"),lg,kf):Hh=="import"?Cf(Eh("stat"),zg,kf):Hh=="async"?Cf(_h):Mm=="@"?Cf(sm,_h):Of(Eh("stat"),sm,Rf(";"),kf)}function Ph(Hh){if(Hh=="(")return Cf(hm,Rf(")"))}function sm(Hh,Mm){return Zh(Hh,Mm,!1)}function th(Hh,Mm){return Zh(Hh,Mm,!0)}function oh(Hh){return Hh!="("?Of():Cf(Eh(")"),Sm,Rf(")"),kf)}function Zh(Hh,Mm,pg){if(Df.state.fatArrowAt==Df.stream.start){var Rg=pg?om:Ih;if(Hh=="(")return Cf(rh,Eh(")"),jh(hm,")"),kf,Rf("=>"),Rg,xh);if(Hh=="variable")return Of(rh,S_,Rf("=>"),Rg,xh)}var og=pg?Vf:$h;return _f.hasOwnProperty(Hh)?Cf(og):Hh=="function"?Cf(ih,og):Hh=="class"||wd&&Mm=="interface"?(Df.marked="keyword",Cf(Eh("form"),Fm,kf)):Hh=="keyword c"||Hh=="async"?Cf(pg?th:sm):Hh=="("?Cf(Eh(")"),Sm,Rf(")"),kf,og):Hh=="operator"||Hh=="spread"?Cf(pg?th:sm):Hh=="["?Cf(Eh("]"),f_,kf,og):Hh=="{"?Pf(Wm,"}",null,og):Hh=="quasi"?Of(nh,og):Hh=="new"?Cf(zh(pg)):Cf()}function Sm(Hh){return Hh.match(/[;\}\)\],]/)?Of():Of(sm)}function $h(Hh,Mm){return Hh==","?Cf(Sm):Vf(Hh,Mm,!1)}function Vf(Hh,Mm,pg){var Rg=pg==!1?$h:Vf,og=pg==!1?sm:th;if(Hh=="=>")return Cf(rh,pg?om:Ih,xh);if(Hh=="operator")return/\+\+|--/.test(Mm)||wd&&Mm=="!"?Cf(Rg):wd&&Mm=="<"&&Df.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?Cf(Eh(">"),jh(Ym,">"),kf,Rg):Mm=="?"?Cf(sm,Rf(":"),og):Cf(og);if(Hh=="quasi")return Of(nh,Rg);if(Hh!=";"){if(Hh=="(")return Pf(th,")","call",Rg);if(Hh==".")return Cf(Lm,Rg);if(Hh=="[")return Cf(Eh("]"),Sm,Rf("]"),kf,Rg);if(wd&&Mm=="as")return Df.marked="keyword",Cf(Ym,Rg);if(Hh=="regexp")return Df.state.lastType=Df.marked="operator",Df.stream.backUp(Df.stream.pos-Df.stream.start-1),Cf(og)}}function nh(Hh,Mm){return Hh!="quasi"?Of():Mm.slice(Mm.length-2)!="${"?Cf(nh):Cf(Sm,Lh)}function Lh(Hh){if(Hh=="}")return Df.marked="string-2",Df.state.tokenize=Zd,Cf(nh)}function Ih(Hh){return xf(Df.stream,Df.state),Of(Hh=="{"?_h:sm)}function om(Hh){return xf(Df.stream,Df.state),Of(Hh=="{"?_h:th)}function zh(Hh){return function(Mm){return Mm=="."?Cf(Hh?Im:Om):Mm=="variable"&&wd?Cf(l_,Hh?Vf:$h):Of(Hh?th:sm)}}function Om(Hh,Mm){if(Mm=="target")return Df.marked="keyword",Cf($h)}function Im(Hh,Mm){if(Mm=="target")return Df.marked="keyword",Cf(Vf)}function Zm(Hh){return Hh==":"?Cf(kf,_h):Of($h,Rf(";"),kf)}function Lm(Hh){if(Hh=="variable")return Df.marked="property",Cf()}function Wm(Hh,Mm){if(Hh=="async")return Df.marked="property",Cf(Wm);if(Hh=="variable"||Df.style=="keyword"){if(Df.marked="property",Mm=="get"||Mm=="set")return Cf(ig);var pg;return wd&&Df.state.fatArrowAt==Df.stream.start&&(pg=Df.stream.match(/^\s*:\s*/,!1))&&(Df.state.fatArrowAt=Df.stream.pos+pg[0].length),Cf(yg)}else{if(Hh=="number"||Hh=="string")return Df.marked=yd?"property":Df.style+" property",Cf(yg);if(Hh=="jsonld-keyword")return Cf(yg);if(wd&&Sh(Mm))return Df.marked="keyword",Cf(Wm);if(Hh=="[")return Cf(sm,Nh,Rf("]"),yg);if(Hh=="spread")return Cf(th,yg);if(Mm=="*")return Df.marked="keyword",Cf(Wm);if(Hh==":")return Of(yg)}}function ig(Hh){return Hh!="variable"?Of(yg):(Df.marked="property",Cf(ih))}function yg(Hh){if(Hh==":")return Cf(th);if(Hh=="(")return Of(ih)}function jh(Hh,Mm,pg){function Rg(og,Fg){if(pg?pg.indexOf(og)>-1:og==","){var y_=Df.state.lexical;return y_.info=="call"&&(y_.pos=(y_.pos||0)+1),Cf(function(Y_,s0){return Y_==Mm||s0==Mm?Of():Of(Hh)},Rg)}return og==Mm||Fg==Mm?Cf():pg&&pg.indexOf(";")>-1?Of(Hh):Cf(Rf(Mm))}return function(og,Fg){return og==Mm||Fg==Mm?Cf():Of(Hh,Rg)}}function Pf(Hh,Mm,pg){for(var Rg=3;Rg"),Ym);if(Hh=="quasi")return Of(vg,p_)}function Ag(Hh){if(Hh=="=>")return Cf(Ym)}function sg(Hh){return Hh.match(/[\}\)\]]/)?Cf():Hh==","||Hh==";"?Cf(sg):Of(mg,sg)}function mg(Hh,Mm){if(Hh=="variable"||Df.style=="keyword")return Df.marked="property",Cf(mg);if(Mm=="?"||Hh=="number"||Hh=="string")return Cf(mg);if(Hh==":")return Cf(Ym);if(Hh=="[")return Cf(Rf("variable"),Wh,Rf("]"),mg);if(Hh=="(")return Of(mm,mg);if(!Hh.match(/[;\}\)\],]/))return Cf()}function vg(Hh,Mm){return Hh!="quasi"?Of():Mm.slice(Mm.length-2)!="${"?Cf(vg):Cf(Ym,kg)}function kg(Hh){if(Hh=="}")return Df.marked="string-2",Df.state.tokenize=Zd,Cf(vg)}function Kg(Hh,Mm){return Hh=="variable"&&Df.stream.match(/^\s*[?:]/,!1)||Mm=="?"?Cf(Kg):Hh==":"?Cf(Ym):Hh=="spread"?Cf(Kg):Of(Ym)}function p_(Hh,Mm){if(Mm=="<")return Cf(Eh(">"),jh(Ym,">"),kf,p_);if(Mm=="|"||Hh=="."||Mm=="&")return Cf(Ym);if(Hh=="[")return Cf(Ym,Rf("]"),p_);if(Mm=="extends"||Mm=="implements")return Df.marked="keyword",Cf(Ym);if(Mm=="?")return Cf(Ym,Rf(":"),Ym)}function l_(Hh,Mm){if(Mm=="<")return Cf(Eh(">"),jh(Ym,">"),kf,p_)}function v_(){return Of(Ym,r_)}function r_(Hh,Mm){if(Mm=="=")return Cf(Ym)}function O_(Hh,Mm){return Mm=="enum"?(Df.marked="keyword",Cf(Mg)):Of(S_,Nh,R_,P_)}function S_(Hh,Mm){if(wd&&Sh(Mm))return Df.marked="keyword",Cf(S_);if(Hh=="variable")return Ff(Mm),Cf();if(Hh=="spread")return Cf(S_);if(Hh=="[")return Pf(t0,"]");if(Hh=="{")return Pf(Q_,"}")}function Q_(Hh,Mm){return Hh=="variable"&&!Df.stream.match(/^\s*:/,!1)?(Ff(Mm),Cf(R_)):(Hh=="variable"&&(Df.marked="property"),Hh=="spread"?Cf(S_):Hh=="}"?Of():Hh=="["?Cf(sm,Rf("]"),Rf(":"),Q_):Cf(Rf(":"),S_,R_))}function t0(){return Of(S_,R_)}function R_(Hh,Mm){if(Mm=="=")return Cf(th)}function P_(Hh){if(Hh==",")return Cf(O_)}function Pg(Hh,Mm){if(Hh=="keyword b"&&Mm=="else")return Cf(Eh("form","else"),_h,kf)}function $0(Hh,Mm){if(Mm=="await")return Cf($0);if(Hh=="(")return Cf(Eh(")"),z0,kf)}function z0(Hh){return Hh=="var"?Cf(O_,c0):Hh=="variable"?Cf(c0):Of(c0)}function c0(Hh,Mm){return Hh==")"?Cf():Hh==";"?Cf(c0):Mm=="in"||Mm=="of"?(Df.marked="keyword",Cf(sm,c0)):Of(sm,c0)}function ih(Hh,Mm){if(Mm=="*")return Df.marked="keyword",Cf(ih);if(Hh=="variable")return Ff(Mm),Cf(ih);if(Hh=="(")return Cf(rh,Eh(")"),jh(hm,")"),kf,_m,_h,xh);if(wd&&Mm=="<")return Cf(Eh(">"),jh(v_,">"),kf,ih)}function mm(Hh,Mm){if(Mm=="*")return Df.marked="keyword",Cf(mm);if(Hh=="variable")return Ff(Mm),Cf(mm);if(Hh=="(")return Cf(rh,Eh(")"),jh(hm,")"),kf,_m,xh);if(wd&&Mm=="<")return Cf(Eh(">"),jh(v_,">"),kf,mm)}function Qh(Hh,Mm){if(Hh=="keyword"||Hh=="variable")return Df.marked="type",Cf(Qh);if(Mm=="<")return Cf(Eh(">"),jh(v_,">"),kf)}function hm(Hh,Mm){return Mm=="@"&&Cf(sm,hm),Hh=="spread"?Cf(hm):wd&&Sh(Mm)?(Df.marked="keyword",Cf(hm)):wd&&Hh=="this"?Cf(Nh,R_):Of(S_,Nh,R_)}function Fm(Hh,Mm){return Hh=="variable"?Pm(Hh,Mm):Vm(Hh,Mm)}function Pm(Hh,Mm){if(Hh=="variable")return Ff(Mm),Cf(Vm)}function Vm(Hh,Mm){if(Mm=="<")return Cf(Eh(">"),jh(v_,">"),kf,Vm);if(Mm=="extends"||Mm=="implements"||wd&&Hh==",")return Mm=="implements"&&(Df.marked="keyword"),Cf(wd?Ym:sm,Vm);if(Hh=="{")return Cf(Eh("}"),Gm,kf)}function Gm(Hh,Mm){if(Hh=="async"||Hh=="variable"&&(Mm=="static"||Mm=="get"||Mm=="set"||wd&&Sh(Mm))&&Df.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return Df.marked="keyword",Cf(Gm);if(Hh=="variable"||Df.style=="keyword")return Df.marked="property",Cf(Tm,Gm);if(Hh=="number"||Hh=="string")return Cf(Tm,Gm);if(Hh=="[")return Cf(sm,Nh,Rf("]"),Tm,Gm);if(Mm=="*")return Df.marked="keyword",Cf(Gm);if(wd&&Hh=="(")return Of(mm,Gm);if(Hh==";"||Hh==",")return Cf(Gm);if(Hh=="}")return Cf();if(Mm=="@")return Cf(sm,Gm)}function Tm(Hh,Mm){if(Mm=="!"||Mm=="?")return Cf(Tm);if(Hh==":")return Cf(Ym,R_);if(Mm=="=")return Cf(th);var pg=Df.state.lexical.prev,Rg=pg&&pg.info=="interface";return Of(Rg?mm:ih)}function lg(Hh,Mm){return Mm=="*"?(Df.marked="keyword",Cf(A_,Rf(";"))):Mm=="default"?(Df.marked="keyword",Cf(sm,Rf(";"))):Hh=="{"?Cf(jh(fg,"}"),A_,Rf(";")):Of(_h)}function fg(Hh,Mm){if(Mm=="as")return Df.marked="keyword",Cf(Rf("variable"));if(Hh=="variable")return Of(th,fg)}function zg(Hh){return Hh=="string"?Cf():Hh=="("?Of(sm):Hh=="."?Of($h):Of(Tg,Xg,A_)}function Tg(Hh,Mm){return Hh=="{"?Pf(Tg,"}"):(Hh=="variable"&&Ff(Mm),Mm=="*"&&(Df.marked="keyword"),Cf(D_))}function Xg(Hh){if(Hh==",")return Cf(Tg,Xg)}function D_(Hh,Mm){if(Mm=="as")return Df.marked="keyword",Cf(Tg)}function A_(Hh,Mm){if(Mm=="from")return Df.marked="keyword",Cf(sm)}function f_(Hh){return Hh=="]"?Cf():Of(jh(th,"]"))}function Mg(){return Of(Eh("form"),S_,Rf("{"),Eh("}"),jh(V_,"}"),kf,kf)}function V_(){return Of(S_,R_)}function g_(Hh,Mm){return Hh.lastType=="operator"||Hh.lastType==","||Ud.test(Mm.charAt(0))||/[,.]/.test(Mm.charAt(0))}function s_(Hh,Mm,pg){return Mm.tokenize==Wd&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(Mm.lastType)||Mm.lastType=="quasi"&&/\{\s*$/.test(Hh.string.slice(0,Hh.pos-(pg||0)))}return{startState:function(Hh){var Mm={tokenize:Wd,lastType:"sof",cc:[],lexical:new vf((Hh||0)-md,0,"block",!1),localVars:hd.localVars,context:hd.localVars&&new yh(null,null,!1),indented:Hh||0};return hd.globalVars&&typeof hd.globalVars=="object"&&(Mm.globalVars=hd.globalVars),Mm},token:function(Hh,Mm){if(Hh.sol()&&(Mm.lexical.hasOwnProperty("align")||(Mm.lexical.align=!1),Mm.indented=Hh.indentation(),xf(Hh,Mm)),Mm.tokenize!=Jd&&Hh.eatSpace())return null;var pg=Mm.tokenize(Hh,Mm);return Yd=="comment"?pg:(Mm.lastType=Yd=="operator"&&(zd=="++"||zd=="--")?"incdec":Yd,Af(Mm,pg,Yd,zd,Hh))},indent:function(Hh,Mm){if(Hh.tokenize==Jd||Hh.tokenize==Zd)return ud.Pass;if(Hh.tokenize!=Wd)return 0;var pg=Mm&&Mm.charAt(0),Rg=Hh.lexical,og;if(!/^\s*else\b/.test(Mm))for(var Fg=Hh.cc.length-1;Fg>=0;--Fg){var y_=Hh.cc[Fg];if(y_==kf)Rg=Rg.prev;else if(y_!=Pg&&y_!=xh)break}for(;(Rg.type=="stat"||Rg.type=="form")&&(pg=="}"||(og=Hh.cc[Hh.cc.length-1])&&(og==$h||og==Vf)&&!/^[,\.=+\-*:?[\(]/.test(Mm));)Rg=Rg.prev;gd&&Rg.type==")"&&Rg.prev.type=="stat"&&(Rg=Rg.prev);var Y_=Rg.type,s0=pg==Y_;return Y_=="vardef"?Rg.indented+(Hh.lastType=="operator"||Hh.lastType==","?Rg.info.length+1:0):Y_=="form"&&pg=="{"?Rg.indented:Y_=="form"?Rg.indented+md:Y_=="stat"?Rg.indented+(g_(Hh,Mm)?gd||md:0):Rg.info=="switch"&&!s0&&hd.doubleIndentSwitch!=!1?Rg.indented+(/^(?:case|default)\b/.test(Mm)?md:2*md):Rg.align?Rg.column+(s0?0:1):Rg.indented+(s0?0:md)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:vd?null:"/*",blockCommentEnd:vd?null:"*/",blockCommentContinue:vd?null:" * ",lineComment:vd?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:vd?"json":"javascript",jsonldMode:yd,jsonMode:vd,expressionAllowed:s_,skipExpression:function(Hh){Af(Hh,"atom","atom","true",new ud.StringStream("",2,null))}}}),ud.registerHelper("wordChars","javascript",/[\w$]/),ud.defineMIME("text/javascript","javascript"),ud.defineMIME("text/ecmascript","javascript"),ud.defineMIME("application/javascript","javascript"),ud.defineMIME("application/x-javascript","javascript"),ud.defineMIME("application/ecmascript","javascript"),ud.defineMIME("application/json",{name:"javascript",json:!0}),ud.defineMIME("application/x-json",{name:"javascript",json:!0}),ud.defineMIME("application/manifest+json",{name:"javascript",json:!0}),ud.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),ud.defineMIME("text/typescript",{name:"javascript",typescript:!0}),ud.defineMIME("application/typescript",{name:"javascript",typescript:!0})})})();var xml={exports:{}},hasRequiredXml;function requireXml(){return hasRequiredXml||(hasRequiredXml=1,function(Ra,ed){(function(ud){ud(requireCodemirror())})(function(ud){var dd={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},hd={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ud.defineMode("xml",function(md,gd){var yd=md.indentUnit,vd={},Cd=gd.htmlMode?dd:hd;for(var wd in Cd)vd[wd]=Cd[wd];for(var wd in gd)vd[wd]=gd[wd];var Nd,Ld;function Ud(Cf,If){function Ff(yh){return If.tokenize=yh,yh(Cf,If)}var sh=Cf.next();if(sh=="<")return Cf.eat("!")?Cf.eat("[")?Cf.match("CDATA[")?Ff(Yd("atom","]]>")):null:Cf.match("--")?Ff(Yd("comment","-->")):Cf.match("DOCTYPE",!0,!0)?(Cf.eatWhile(/[\w\._\-]/),Ff(zd(1))):null:Cf.eat("?")?(Cf.eatWhile(/[\w\._\-]/),If.tokenize=Yd("meta","?>"),"meta"):(Nd=Cf.eat("/")?"closeTag":"openTag",If.tokenize=jd,"tag bracket");if(sh=="&"){var Sh;return Cf.eat("#")?Cf.eat("x")?Sh=Cf.eatWhile(/[a-fA-F\d]/)&&Cf.eat(";"):Sh=Cf.eatWhile(/[\d]/)&&Cf.eat(";"):Sh=Cf.eatWhile(/[\w\.\-:]/)&&Cf.eat(";"),Sh?"atom":"error"}else return Cf.eatWhile(/[^&<]/),null}Ud.isInText=!0;function jd(Cf,If){var Ff=Cf.next();if(Ff==">"||Ff=="/"&&Cf.eat(">"))return If.tokenize=Ud,Nd=Ff==">"?"endTag":"selfcloseTag","tag bracket";if(Ff=="=")return Nd="equals",null;if(Ff=="<"){If.tokenize=Ud,If.state=Zd,If.tagName=If.tagStart=null;var sh=If.tokenize(Cf,If);return sh?sh+" tag error":"tag error"}else return/[\'\"]/.test(Ff)?(If.tokenize=Gd(Ff),If.stringStartCol=Cf.column(),If.tokenize(Cf,If)):(Cf.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Gd(Cf){var If=function(Ff,sh){for(;!Ff.eol();)if(Ff.next()==Cf){sh.tokenize=jd;break}return"string"};return If.isInAttribute=!0,If}function Yd(Cf,If){return function(Ff,sh){for(;!Ff.eol();){if(Ff.match(If)){sh.tokenize=Ud;break}Ff.next()}return Cf}}function zd(Cf){return function(If,Ff){for(var sh;(sh=If.next())!=null;){if(sh=="<")return Ff.tokenize=zd(Cf+1),Ff.tokenize(If,Ff);if(sh==">")if(Cf==1){Ff.tokenize=Ud;break}else return Ff.tokenize=zd(Cf-1),Ff.tokenize(If,Ff)}return"meta"}}function qd(Cf){return Cf&&Cf.toLowerCase()}function Wd(Cf,If,Ff){this.prev=Cf.context,this.tagName=If||"",this.indent=Cf.indented,this.startOfLine=Ff,(vd.doNotIndent.hasOwnProperty(If)||Cf.context&&Cf.context.noIndent)&&(this.noIndent=!0)}function Xd(Cf){Cf.context&&(Cf.context=Cf.context.prev)}function Jd(Cf,If){for(var Ff;;){if(!Cf.context||(Ff=Cf.context.tagName,!vd.contextGrabbers.hasOwnProperty(qd(Ff))||!vd.contextGrabbers[qd(Ff)].hasOwnProperty(qd(If))))return;Xd(Cf)}}function Zd(Cf,If,Ff){return Cf=="openTag"?(Ff.tagStart=If.column(),mf):Cf=="closeTag"?xf:Zd}function mf(Cf,If,Ff){return Cf=="word"?(Ff.tagName=If.current(),Ld="tag",gf):vd.allowMissingTagName&&Cf=="endTag"?(Ld="tag bracket",gf(Cf,If,Ff)):(Ld="error",mf)}function xf(Cf,If,Ff){if(Cf=="word"){var sh=If.current();return Ff.context&&Ff.context.tagName!=sh&&vd.implicitlyClosed.hasOwnProperty(qd(Ff.context.tagName))&&Xd(Ff),Ff.context&&Ff.context.tagName==sh||vd.matchClosing===!1?(Ld="tag",_f):(Ld="tag error",vf)}else return vd.allowMissingTagName&&Cf=="endTag"?(Ld="tag bracket",_f(Cf,If,Ff)):(Ld="error",vf)}function _f(Cf,If,Ff){return Cf!="endTag"?(Ld="error",_f):(Xd(Ff),Zd)}function vf(Cf,If,Ff){return Ld="error",_f(Cf,If,Ff)}function gf(Cf,If,Ff){if(Cf=="word")return Ld="attribute",Af;if(Cf=="endTag"||Cf=="selfcloseTag"){var sh=Ff.tagName,Sh=Ff.tagStart;return Ff.tagName=Ff.tagStart=null,Cf=="selfcloseTag"||vd.autoSelfClosers.hasOwnProperty(qd(sh))?Jd(Ff,sh):(Jd(Ff,sh),Ff.context=new Wd(Ff,sh,Sh==Ff.indented)),Zd}return Ld="error",gf}function Af(Cf,If,Ff){return Cf=="equals"?Df:(vd.allowMissing||(Ld="error"),gf(Cf,If,Ff))}function Df(Cf,If,Ff){return Cf=="string"?Of:Cf=="word"&&vd.allowUnquoted?(Ld="string",gf):(Ld="error",gf(Cf,If,Ff))}function Of(Cf,If,Ff){return Cf=="string"?Of:gf(Cf,If,Ff)}return{startState:function(Cf){var If={tokenize:Ud,state:Zd,indented:Cf||0,tagName:null,tagStart:null,context:null};return Cf!=null&&(If.baseIndent=Cf),If},token:function(Cf,If){if(!If.tagName&&Cf.sol()&&(If.indented=Cf.indentation()),Cf.eatSpace())return null;Nd=null;var Ff=If.tokenize(Cf,If);return(Ff||Nd)&&Ff!="comment"&&(Ld=null,If.state=If.state(Nd||Ff,Cf,If),Ld&&(Ff=Ld=="error"?Ff+" error":Ld)),Ff},indent:function(Cf,If,Ff){var sh=Cf.context;if(Cf.tokenize.isInAttribute)return Cf.tagStart==Cf.indented?Cf.stringStartCol+1:Cf.indented+yd;if(sh&&sh.noIndent)return ud.Pass;if(Cf.tokenize!=jd&&Cf.tokenize!=Ud)return Ff?Ff.match(/^(\s*)/)[0].length:0;if(Cf.tagName)return vd.multilineTagIndentPastTag!==!1?Cf.tagStart+Cf.tagName.length+2:Cf.tagStart+yd*(vd.multilineTagIndentFactor||1);if(vd.alignCDATA&&/$/,blockCommentStart:"",configuration:vd.htmlMode?"html":"xml",helperType:vd.htmlMode?"html":"xml",skipAttribute:function(Cf){Cf.state==Df&&(Cf.state=gf)},xmlCurrentTag:function(Cf){return Cf.tagName?{name:Cf.tagName,close:Cf.type=="closeTag"}:null},xmlCurrentContext:function(Cf){for(var If=[],Ff=Cf.context;Ff;Ff=Ff.prev)If.push(Ff.tagName);return If.reverse()}}}),ud.defineMIME("text/xml","xml"),ud.defineMIME("application/xml","xml"),ud.mimeModes.hasOwnProperty("text/html")||ud.defineMIME("text/html",{name:"xml",htmlMode:!0})})}()),xml.exports}var meta={exports:{}},hasRequiredMeta;function requireMeta(){return hasRequiredMeta||(hasRequiredMeta=1,function(Ra,ed){(function(ud){ud(requireCodemirror())})(function(ud){ud.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","cbl"]},{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"],alias:["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 dd=0;dd-1&&md.substring(vd+1,md.length);if(Cd)return ud.findModeByExtension(Cd)},ud.findModeByName=function(md){md=md.toLowerCase();for(var gd=0;gd` "'(~:]+/,Yd=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,zd=/^\s*\[[^\]]+?\]:.*$/,qd=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,Wd=" ";function Xd(lh,rh,mh){return rh.f=rh.inline=mh,mh(lh,rh)}function Jd(lh,rh,mh){return rh.f=rh.block=mh,mh(lh,rh)}function Zd(lh){return!lh||!/\S/.test(lh.string)}function mf(lh){if(lh.linkTitle=!1,lh.linkHref=!1,lh.linkText=!1,lh.em=!1,lh.strong=!1,lh.strikethrough=!1,lh.quote=0,lh.indentedCode=!1,lh.f==_f){var rh=gd;if(!rh){var mh=ud.innerMode(md,lh.htmlState);rh=mh.mode.name=="xml"&&mh.state.tagStart===null&&!mh.state.context&&mh.state.tokenize.isInText}rh&&(lh.f=Df,lh.block=xf,lh.htmlState=null)}return lh.trailingSpace=0,lh.trailingSpaceNewLine=!1,lh.prevLine=lh.thisLine,lh.thisLine={stream:null},null}function xf(lh,rh){var mh=lh.column()===rh.indentation,xh=Zd(rh.prevLine.stream),Eh=rh.indentedCode,kf=rh.prevLine.hr,Rf=rh.list!==!1,_h=(rh.listStack[rh.listStack.length-1]||0)+3;rh.indentedCode=!1;var Ph=rh.indentation;if(rh.indentationDiff===null&&(rh.indentationDiff=rh.indentation,Rf)){for(rh.list=null;Ph=4&&(Eh||rh.prevLine.fencedCodeEnd||rh.prevLine.header||xh))return lh.skipToEnd(),rh.indentedCode=!0,vd.code;if(lh.eatSpace())return null;if(mh&&rh.indentation<=_h&&(oh=lh.match(Ud))&&oh[1].length<=6)return rh.quote=0,rh.header=oh[1].length,rh.thisLine.header=!0,hd.highlightFormatting&&(rh.formatting="header"),rh.f=rh.inline,gf(rh);if(rh.indentation<=_h&&lh.eat(">"))return rh.quote=mh?1:rh.quote+1,hd.highlightFormatting&&(rh.formatting="quote"),lh.eatSpace(),gf(rh);if(!th&&!rh.setext&&mh&&rh.indentation<=_h&&(oh=lh.match(Nd))){var Zh=oh[1]?"ol":"ul";return rh.indentation=Ph+lh.current().length,rh.list=!0,rh.quote=0,rh.listStack.push(rh.indentation),rh.em=!1,rh.strong=!1,rh.code=!1,rh.strikethrough=!1,hd.taskLists&&lh.match(Ld,!1)&&(rh.taskList=!0),rh.f=rh.inline,hd.highlightFormatting&&(rh.formatting=["list","list-"+Zh]),gf(rh)}else{if(mh&&rh.indentation<=_h&&(oh=lh.match(Yd,!0)))return rh.quote=0,rh.fencedEndRE=new RegExp(oh[1]+"+ *$"),rh.localMode=hd.fencedCodeBlockHighlighting&&yd(oh[2]||hd.fencedCodeBlockDefaultMode),rh.localMode&&(rh.localState=ud.startState(rh.localMode)),rh.f=rh.block=vf,hd.highlightFormatting&&(rh.formatting="code-block"),rh.code=-1,gf(rh);if(rh.setext||(!sm||!Rf)&&!rh.quote&&rh.list===!1&&!rh.code&&!th&&!zd.test(lh.string)&&(oh=lh.lookAhead(1))&&(oh=oh.match(jd)))return rh.setext?(rh.header=rh.setext,rh.setext=0,lh.skipToEnd(),hd.highlightFormatting&&(rh.formatting="header")):(rh.header=oh[0].charAt(0)=="="?1:2,rh.setext=rh.header),rh.thisLine.header=!0,rh.f=rh.inline,gf(rh);if(th)return lh.skipToEnd(),rh.hr=!0,rh.thisLine.hr=!0,vd.hr;if(lh.peek()==="[")return Xd(lh,rh,sh)}return Xd(lh,rh,rh.inline)}function _f(lh,rh){var mh=md.token(lh,rh.htmlState);if(!gd){var xh=ud.innerMode(md,rh.htmlState);(xh.mode.name=="xml"&&xh.state.tagStart===null&&!xh.state.context&&xh.state.tokenize.isInText||rh.md_inside&&lh.current().indexOf(">")>-1)&&(rh.f=Df,rh.block=xf,rh.htmlState=null)}return mh}function vf(lh,rh){var mh=rh.listStack[rh.listStack.length-1]||0,xh=rh.indentation=lh.quote?rh.push(vd.formatting+"-"+lh.formatting[mh]+"-"+lh.quote):rh.push("error"))}if(lh.taskOpen)return rh.push("meta"),rh.length?rh.join(" "):null;if(lh.taskClosed)return rh.push("property"),rh.length?rh.join(" "):null;if(lh.linkHref?rh.push(vd.linkHref,"url"):(lh.strong&&rh.push(vd.strong),lh.em&&rh.push(vd.em),lh.strikethrough&&rh.push(vd.strikethrough),lh.emoji&&rh.push(vd.emoji),lh.linkText&&rh.push(vd.linkText),lh.code&&rh.push(vd.code),lh.image&&rh.push(vd.image),lh.imageAltText&&rh.push(vd.imageAltText,"link"),lh.imageMarker&&rh.push(vd.imageMarker)),lh.header&&rh.push(vd.header,vd.header+"-"+lh.header),lh.quote&&(rh.push(vd.quote),!hd.maxBlockquoteDepth||hd.maxBlockquoteDepth>=lh.quote?rh.push(vd.quote+"-"+lh.quote):rh.push(vd.quote+"-"+hd.maxBlockquoteDepth)),lh.list!==!1){var xh=(lh.listStack.length-1)%3;xh?xh===1?rh.push(vd.list2):rh.push(vd.list3):rh.push(vd.list1)}return lh.trailingSpaceNewLine?rh.push("trailing-space-new-line"):lh.trailingSpace&&rh.push("trailing-space-"+(lh.trailingSpace%2?"a":"b")),rh.length?rh.join(" "):null}function Af(lh,rh){if(lh.match(Gd,!0))return gf(rh)}function Df(lh,rh){var mh=rh.text(lh,rh);if(typeof mh<"u")return mh;if(rh.list)return rh.list=null,gf(rh);if(rh.taskList){var xh=lh.match(Ld,!0)[1]===" ";return xh?rh.taskOpen=!0:rh.taskClosed=!0,hd.highlightFormatting&&(rh.formatting="task"),rh.taskList=!1,gf(rh)}if(rh.taskOpen=!1,rh.taskClosed=!1,rh.header&&lh.match(/^#+$/,!0))return hd.highlightFormatting&&(rh.formatting="header"),gf(rh);var Eh=lh.next();if(rh.linkTitle){rh.linkTitle=!1;var kf=Eh;Eh==="("&&(kf=")"),kf=(kf+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Rf="^\\s*(?:[^"+kf+"\\\\]+|\\\\\\\\|\\\\.)"+kf;if(lh.match(new RegExp(Rf),!0))return vd.linkHref}if(Eh==="`"){var _h=rh.formatting;hd.highlightFormatting&&(rh.formatting="code"),lh.eatWhile("`");var Ph=lh.current().length;if(rh.code==0&&(!rh.quote||Ph==1))return rh.code=Ph,gf(rh);if(Ph==rh.code){var sm=gf(rh);return rh.code=0,sm}else return rh.formatting=_h,gf(rh)}else if(rh.code)return gf(rh);if(Eh==="\\"&&(lh.next(),hd.highlightFormatting)){var th=gf(rh),oh=vd.formatting+"-escape";return th?th+" "+oh:oh}if(Eh==="!"&&lh.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return rh.imageMarker=!0,rh.image=!0,hd.highlightFormatting&&(rh.formatting="image"),gf(rh);if(Eh==="["&&rh.imageMarker&&lh.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return rh.imageMarker=!1,rh.imageAltText=!0,hd.highlightFormatting&&(rh.formatting="image"),gf(rh);if(Eh==="]"&&rh.imageAltText){hd.highlightFormatting&&(rh.formatting="image");var th=gf(rh);return rh.imageAltText=!1,rh.image=!1,rh.inline=rh.f=Cf,th}if(Eh==="["&&!rh.image)return rh.linkText&&lh.match(/^.*?\]/)||(rh.linkText=!0,hd.highlightFormatting&&(rh.formatting="link")),gf(rh);if(Eh==="]"&&rh.linkText){hd.highlightFormatting&&(rh.formatting="link");var th=gf(rh);return rh.linkText=!1,rh.inline=rh.f=lh.match(/\(.*?\)| ?\[.*?\]/,!1)?Cf:Df,th}if(Eh==="<"&&lh.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){rh.f=rh.inline=Of,hd.highlightFormatting&&(rh.formatting="link");var th=gf(rh);return th?th+=" ":th="",th+vd.linkInline}if(Eh==="<"&&lh.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){rh.f=rh.inline=Of,hd.highlightFormatting&&(rh.formatting="link");var th=gf(rh);return th?th+=" ":th="",th+vd.linkEmail}if(hd.xml&&Eh==="<"&&lh.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var Zh=lh.string.indexOf(">",lh.pos);if(Zh!=-1){var Sm=lh.string.substring(lh.start,Zh);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Sm)&&(rh.md_inside=!0)}return lh.backUp(1),rh.htmlState=ud.startState(md),Jd(lh,rh,_f)}if(hd.xml&&Eh==="<"&&lh.match(/^\/\w*?>/))return rh.md_inside=!1,"tag";if(Eh==="*"||Eh==="_"){for(var $h=1,Vf=lh.pos==1?" ":lh.string.charAt(lh.pos-2);$h<3&&lh.eat(Eh);)$h++;var nh=lh.peek()||" ",Lh=!/\s/.test(nh)&&(!qd.test(nh)||/\s/.test(Vf)||qd.test(Vf)),Ih=!/\s/.test(Vf)&&(!qd.test(Vf)||/\s/.test(nh)||qd.test(nh)),om=null,zh=null;if($h%2&&(!rh.em&&Lh&&(Eh==="*"||!Ih||qd.test(Vf))?om=!0:rh.em==Eh&&Ih&&(Eh==="*"||!Lh||qd.test(nh))&&(om=!1)),$h>1&&(!rh.strong&&Lh&&(Eh==="*"||!Ih||qd.test(Vf))?zh=!0:rh.strong==Eh&&Ih&&(Eh==="*"||!Lh||qd.test(nh))&&(zh=!1)),zh!=null||om!=null){hd.highlightFormatting&&(rh.formatting=om==null?"strong":zh==null?"em":"strong em"),om===!0&&(rh.em=Eh),zh===!0&&(rh.strong=Eh);var sm=gf(rh);return om===!1&&(rh.em=!1),zh===!1&&(rh.strong=!1),sm}}else if(Eh===" "&&(lh.eat("*")||lh.eat("_"))){if(lh.peek()===" ")return gf(rh);lh.backUp(1)}if(hd.strikethrough){if(Eh==="~"&&lh.eatWhile(Eh)){if(rh.strikethrough){hd.highlightFormatting&&(rh.formatting="strikethrough");var sm=gf(rh);return rh.strikethrough=!1,sm}else if(lh.match(/^[^\s]/,!1))return rh.strikethrough=!0,hd.highlightFormatting&&(rh.formatting="strikethrough"),gf(rh)}else if(Eh===" "&&lh.match("~~",!0)){if(lh.peek()===" ")return gf(rh);lh.backUp(2)}}if(hd.emoji&&Eh===":"&&lh.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){rh.emoji=!0,hd.highlightFormatting&&(rh.formatting="emoji");var Om=gf(rh);return rh.emoji=!1,Om}return Eh===" "&&(lh.match(/^ +$/,!1)?rh.trailingSpace++:rh.trailingSpace&&(rh.trailingSpaceNewLine=!0)),gf(rh)}function Of(lh,rh){var mh=lh.next();if(mh===">"){rh.f=rh.inline=Df,hd.highlightFormatting&&(rh.formatting="link");var xh=gf(rh);return xh?xh+=" ":xh="",xh+vd.linkInline}return lh.match(/^[^>]+/,!0),vd.linkInline}function Cf(lh,rh){if(lh.eatSpace())return null;var mh=lh.next();return mh==="("||mh==="["?(rh.f=rh.inline=Ff(mh==="("?")":"]"),hd.highlightFormatting&&(rh.formatting="link-string"),rh.linkHref=!0,gf(rh)):"error"}var If={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Ff(lh){return function(rh,mh){var xh=rh.next();if(xh===lh){mh.f=mh.inline=Df,hd.highlightFormatting&&(mh.formatting="link-string");var Eh=gf(mh);return mh.linkHref=!1,Eh}return rh.match(If[lh]),mh.linkHref=!0,gf(mh)}}function sh(lh,rh){return lh.match(/^([^\]\\]|\\.)*\]:/,!1)?(rh.f=Sh,lh.next(),hd.highlightFormatting&&(rh.formatting="link"),rh.linkText=!0,gf(rh)):Xd(lh,rh,Df)}function Sh(lh,rh){if(lh.match("]:",!0)){rh.f=rh.inline=yh,hd.highlightFormatting&&(rh.formatting="link");var mh=gf(rh);return rh.linkText=!1,mh}return lh.match(/^([^\]\\]|\\.)+/,!0),vd.linkText}function yh(lh,rh){return lh.eatSpace()?null:(lh.match(/^[^\s]+/,!0),lh.peek()===void 0?rh.linkTitle=!0:lh.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/,!0),rh.f=rh.inline=Df,vd.linkHref+" url")}var Mh={startState:function(){return{f:xf,prevLine:{stream:null},thisLine:{stream:null},block:xf,htmlState:null,indentation:0,inline:Df,text:Af,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(lh){return{f:lh.f,prevLine:lh.prevLine,thisLine:lh.thisLine,block:lh.block,htmlState:lh.htmlState&&ud.copyState(md,lh.htmlState),indentation:lh.indentation,localMode:lh.localMode,localState:lh.localMode?ud.copyState(lh.localMode,lh.localState):null,inline:lh.inline,text:lh.text,formatting:!1,linkText:lh.linkText,linkTitle:lh.linkTitle,linkHref:lh.linkHref,code:lh.code,em:lh.em,strong:lh.strong,strikethrough:lh.strikethrough,emoji:lh.emoji,header:lh.header,setext:lh.setext,hr:lh.hr,taskList:lh.taskList,list:lh.list,listStack:lh.listStack.slice(0),quote:lh.quote,indentedCode:lh.indentedCode,trailingSpace:lh.trailingSpace,trailingSpaceNewLine:lh.trailingSpaceNewLine,md_inside:lh.md_inside,fencedEndRE:lh.fencedEndRE}},token:function(lh,rh){if(rh.formatting=!1,lh!=rh.thisLine.stream){if(rh.header=0,rh.hr=!1,lh.match(/^\s*$/,!0))return mf(rh),null;if(rh.prevLine=rh.thisLine,rh.thisLine={stream:lh},rh.taskList=!1,rh.trailingSpace=0,rh.trailingSpaceNewLine=!1,!rh.localState&&(rh.f=rh.block,rh.f!=_f)){var mh=lh.match(/^\s*/,!0)[0].replace(/\t/g,Wd).length;if(rh.indentation=mh,rh.indentationDiff=null,mh>0)return null}}return rh.f(lh,rh)},innerMode:function(lh){return lh.block==_f?{state:lh.htmlState,mode:md}:lh.localState?{state:lh.localState,mode:lh.localMode}:{state:lh,mode:Mh}},indent:function(lh,rh,mh){return lh.block==_f&&md.indent?md.indent(lh.htmlState,rh,mh):lh.localState&&lh.localMode.indent?lh.localMode.indent(lh.localState,rh,mh):ud.Pass},blankLine:mf,getType:gf,blockCommentStart:"",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Mh},"xml"),ud.defineMIME("text/markdown","markdown"),ud.defineMIME("text/x-markdown","markdown")})})();(function(Ra,ed){(function(ud){ud(requireCodemirror())})(function(ud){var dd={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},hd=ud.Pos;ud.defineOption("autoCloseBrackets",!1,function(zd,qd,Wd){Wd&&Wd!=ud.Init&&(zd.removeKeyMap(gd),zd.state.closeBrackets=null),qd&&(yd(md(qd,"pairs")),zd.state.closeBrackets=qd,zd.addKeyMap(gd))});function md(zd,qd){return qd=="pairs"&&typeof zd=="string"?zd:typeof zd=="object"&&zd[qd]!=null?zd[qd]:dd[qd]}var gd={Backspace:wd,Enter:Nd};function yd(zd){for(var qd=0;qd=0;Jd--){var mf=Xd[Jd].head;zd.replaceRange("",hd(mf.line,mf.ch-1),hd(mf.line,mf.ch+1),"+delete")}}function Nd(zd){var qd=Cd(zd),Wd=qd&&md(qd,"explode");if(!Wd||zd.getOption("disableInput"))return ud.Pass;for(var Xd=zd.listSelections(),Jd=0;Jd0?{line:mf.head.line,ch:mf.head.ch+qd}:{line:mf.head.line-1};Wd.push({anchor:xf,head:xf})}zd.setSelections(Wd,Jd)}function Ud(zd){var qd=ud.cmpPos(zd.anchor,zd.head)>0;return{anchor:new hd(zd.anchor.line,zd.anchor.ch+(qd?-1:1)),head:new hd(zd.head.line,zd.head.ch+(qd?1:-1))}}function jd(zd,qd){var Wd=Cd(zd);if(!Wd||zd.getOption("disableInput"))return ud.Pass;var Xd=md(Wd,"pairs"),Jd=Xd.indexOf(qd);if(Jd==-1)return ud.Pass;for(var Zd=md(Wd,"closeBefore"),mf=md(Wd,"triples"),xf=Xd.charAt(Jd+1)==qd,_f=zd.listSelections(),vf=Jd%2==0,gf,Af=0;Af<_f.length;Af++){var Df=_f[Af],Of=Df.head,Cf,If=zd.getRange(Of,hd(Of.line,Of.ch+1));if(vf&&!Df.empty())Cf="surround";else if((xf||!vf)&&If==qd)xf&&Yd(zd,Of)?Cf="both":mf.indexOf(qd)>=0&&zd.getRange(Of,hd(Of.line,Of.ch+3))==qd+qd+qd?Cf="skipThree":Cf="skip";else if(xf&&Of.ch>1&&mf.indexOf(qd)>=0&&zd.getRange(hd(Of.line,Of.ch-2),Of)==qd+qd){if(Of.ch>2&&/\bstring/.test(zd.getTokenTypeAt(hd(Of.line,Of.ch-2))))return ud.Pass;Cf="addFour"}else if(xf){var Ff=Of.ch==0?" ":zd.getRange(hd(Of.line,Of.ch-1),Of);if(!ud.isWordChar(If)&&Ff!=qd&&!ud.isWordChar(Ff))Cf="both";else return ud.Pass}else if(vf&&(If.length===0||/\s/.test(If)||Zd.indexOf(If)>-1))Cf="both";else return ud.Pass;if(!gf)gf=Cf;else if(gf!=Cf)return ud.Pass}var sh=Jd%2?Xd.charAt(Jd-1):qd,Sh=Jd%2?qd:Xd.charAt(Jd+1);zd.operation(function(){if(gf=="skip")Ld(zd,1);else if(gf=="skipThree")Ld(zd,3);else if(gf=="surround"){for(var yh=zd.getSelections(),Mh=0;Mh",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function gd(Ld){return Ld&&Ld.bracketRegex||/[(){}[\]]/}function yd(Ld,Ud,jd){var Gd=Ld.getLineHandle(Ud.line),Yd=Ud.ch-1,zd=jd&&jd.afterCursor;zd==null&&(zd=/(^| )cm-fat-cursor($| )/.test(Ld.getWrapperElement().className));var qd=gd(jd),Wd=!zd&&Yd>=0&&qd.test(Gd.text.charAt(Yd))&&md[Gd.text.charAt(Yd)]||qd.test(Gd.text.charAt(Yd+1))&&md[Gd.text.charAt(++Yd)];if(!Wd)return null;var Xd=Wd.charAt(1)==">"?1:-1;if(jd&&jd.strict&&Xd>0!=(Yd==Ud.ch))return null;var Jd=Ld.getTokenTypeAt(hd(Ud.line,Yd+1)),Zd=vd(Ld,hd(Ud.line,Yd+(Xd>0?1:0)),Xd,Jd,jd);return Zd==null?null:{from:hd(Ud.line,Yd),to:Zd&&Zd.pos,match:Zd&&Zd.ch==Wd.charAt(0),forward:Xd>0}}function vd(Ld,Ud,jd,Gd,Yd){for(var zd=Yd&&Yd.maxScanLineLength||1e4,qd=Yd&&Yd.maxScanLines||1e3,Wd=[],Xd=gd(Yd),Jd=jd>0?Math.min(Ud.line+qd,Ld.lastLine()+1):Math.max(Ld.firstLine()-1,Ud.line-qd),Zd=Ud.line;Zd!=Jd;Zd+=jd){var mf=Ld.getLine(Zd);if(mf){var xf=jd>0?0:mf.length-1,_f=jd>0?mf.length:-1;if(!(mf.length>zd))for(Zd==Ud.line&&(xf=Ud.ch-(jd<0?1:0));xf!=_f;xf+=jd){var vf=mf.charAt(xf);if(Xd.test(vf)&&(Gd===void 0||(Ld.getTokenTypeAt(hd(Zd,xf+1))||"")==(Gd||""))){var gf=md[vf];if(gf&&gf.charAt(1)==">"==jd>0)Wd.push(vf);else if(Wd.length)Wd.pop();else return{pos:hd(Zd,xf),ch:vf}}}}}return Zd-jd==(jd>0?Ld.lastLine():Ld.firstLine())?!1:null}function Cd(Ld,Ud,jd){for(var Gd=Ld.state.matchBrackets.maxHighlightLineLength||1e3,Yd=jd&&jd.highlightNonMatching,zd=[],qd=Ld.listSelections(),Wd=0;Wd1)){if(this.somethingSelected()){if(!zd.hint.supportsSelection)return;for(var Wd=0;Wdmf.clientHeight+1:!1,_h;setTimeout(function(){_h=Xd.getScrollInfo()});var Ph=kf.bottom-Eh;if(Ph>0){var sm=kf.bottom-kf.top,th=kf.top-(Cf.bottom-Cf.top)-2;Eh-kf.topth&&(mf.style.height=(sm=th)+"px"),mf.style.top=(Ff=Cf.top-sm)+yh+"px",sh=!1):mf.style.height=Eh-kf.top-2+"px"}var oh=kf.right-xh;if(Rf&&(oh+=Xd.display.nativeBarWidth),oh>0&&(kf.right-kf.left>xh&&(mf.style.width=xh-5+"px",oh-=kf.right-kf.left-xh),mf.style.left=(If=Math.max(Cf.left-oh-Sh,0))+"px"),Rf)for(var Zh=mf.firstChild;Zh;Zh=Zh.nextSibling)Zh.style.paddingRight=Xd.display.nativeBarWidth+"px";if(Xd.addKeyMap(this.keyMap=wd(zd,{moveFocus:function(Vf,nh){Wd.changeActive(Wd.selectedHint+Vf,nh)},setFocus:function(Vf){Wd.changeActive(Vf)},menuSize:function(){return Wd.screenAmount()},length:_f.length,close:function(){zd.close()},pick:function(){Wd.pick()},data:qd})),zd.options.closeOnUnfocus){var Sm;Xd.on("blur",this.onBlur=function(){Sm=setTimeout(function(){zd.close()},100)}),Xd.on("focus",this.onFocus=function(){clearTimeout(Sm)})}Xd.on("scroll",this.onScroll=function(){var Vf=Xd.getScrollInfo(),nh=Xd.getWrapperElement().getBoundingClientRect();_h||(_h=Xd.getScrollInfo());var Lh=Ff+_h.top-Vf.top,Ih=Lh-(Zd.pageYOffset||(Jd.documentElement||Jd.body).scrollTop);if(sh||(Ih+=mf.offsetHeight),Ih<=nh.top||Ih>=nh.bottom)return zd.close();mf.style.top=Lh+"px",mf.style.left=If+_h.left-Vf.left+"px"}),ud.on(mf,"dblclick",function(Vf){var nh=Nd(mf,Vf.target||Vf.srcElement);nh&&nh.hintId!=null&&(Wd.changeActive(nh.hintId),Wd.pick())}),ud.on(mf,"click",function(Vf){var nh=Nd(mf,Vf.target||Vf.srcElement);nh&&nh.hintId!=null&&(Wd.changeActive(nh.hintId),zd.options.completeOnSingleClick&&Wd.pick())}),ud.on(mf,"mousedown",function(){setTimeout(function(){Xd.focus()},20)});var $h=this.getSelectedHintRange();return($h.from!==0||$h.to!==0)&&this.scrollToActive(),ud.signal(qd,"select",_f[this.selectedHint],mf.childNodes[this.selectedHint]),!0}Ld.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var zd=this.completion.cm.getInputField();zd.removeAttribute("aria-activedescendant"),zd.removeAttribute("aria-owns");var qd=this.completion.cm;this.completion.options.closeOnUnfocus&&(qd.off("blur",this.onBlur),qd.off("focus",this.onFocus)),qd.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var zd=this;this.keyMap={Enter:function(){zd.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(zd,qd){if(zd>=this.data.list.length?zd=qd?this.data.list.length-1:0:zd<0&&(zd=qd?0:this.data.list.length-1),this.selectedHint!=zd){var Wd=this.hints.childNodes[this.selectedHint];Wd&&(Wd.className=Wd.className.replace(" "+hd,""),Wd.removeAttribute("aria-selected")),Wd=this.hints.childNodes[this.selectedHint=zd],Wd.className+=" "+hd,Wd.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",Wd.id),this.scrollToActive(),ud.signal(this.data,"select",this.data.list[this.selectedHint],Wd)}},scrollToActive:function(){var zd=this.getSelectedHintRange(),qd=this.hints.childNodes[zd.from],Wd=this.hints.childNodes[zd.to],Xd=this.hints.firstChild;qd.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=Wd.offsetTop+Wd.offsetHeight-this.hints.clientHeight+Xd.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var zd=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-zd),to:Math.min(this.data.list.length-1,this.selectedHint+zd)}}};function Ud(zd,qd){if(!zd.somethingSelected())return qd;for(var Wd=[],Xd=0;Xd0?mf(Af):vf(gf+1)})}vf(0)};return Jd.async=!0,Jd.supportsSelection=!0,Jd}else return(Xd=zd.getHelper(zd.getCursor(),"hintWords"))?function(Zd){return ud.hint.fromList(Zd,{words:Xd})}:ud.hint.anyword?function(Zd,mf){return ud.hint.anyword(Zd,mf)}:function(){}}ud.registerHelper("hint","auto",{resolve:Gd}),ud.registerHelper("hint","fromList",function(zd,qd){var Wd=zd.getCursor(),Xd=zd.getTokenAt(Wd),Jd,Zd=ud.Pos(Wd.line,Xd.start),mf=Wd;Xd.start,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};ud.defineOption("hintOptions",null)})})();(function(Ra,ed){(function(ud){ud(requireCodemirror(),cssExports)})(function(ud){var dd={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};ud.registerHelper("hint","css",function(hd){var md=hd.getCursor(),gd=hd.getTokenAt(md),yd=ud.innerMode(hd.getMode(),gd.state);if(yd.mode.name!="css")return;if(gd.type=="keyword"&&"!important".indexOf(gd.string)==0)return{list:["!important"],from:ud.Pos(md.line,gd.start),to:ud.Pos(md.line,gd.end)};var vd=gd.start,Cd=md.ch,wd=gd.string.slice(0,Cd-vd);/[^\w$_-]/.test(wd)&&(wd="",vd=Cd=md.ch);var Nd=ud.resolveMode("text/css"),Ld=[];function Ud(Gd){for(var Yd in Gd)(!wd||Yd.lastIndexOf(wd,0)==0)&&Ld.push(Yd)}var jd=yd.state.state;if(jd=="pseudo"||gd.type=="variable-3"?Ud(dd):jd=="block"||jd=="maybeprop"?Ud(Nd.propertyKeywords):jd=="prop"||jd=="parens"||jd=="at"||jd=="params"?(Ud(Nd.valueKeywords),Ud(Nd.colorKeywords)):(jd=="media"||jd=="media_parens")&&(Ud(Nd.mediaTypes),Ud(Nd.mediaFeatures)),Ld.length)return{list:Ld,from:ud.Pos(md.line,vd),to:ud.Pos(md.line,Cd)}})})})();const app=createApp(_sfc_main);app.use(createPinia());app.mount("#app");export{withPath as $,rgba$1 as A,setupGraphViewbox2 as B,cleanAndMerge as C,getConfig$2 as D,defaultConfig_default as E,random as F,selectSvgElement as G,version$1 as H,getThemeVariables3 as I,JSON_SCHEMA as J,line$1 as K,hasKatex as L,calculateMathMLDimensions as M,parseFontSize as N,renderKatex as O,parseGenericTypes as P,curveBasis as Q,generateId as R,lineBreakRegex as S,setupGraphViewbox as T,isDark as U,lighten as V,darken as W,__export as X,commonDb_exports as Y,ZERO_WIDTH_SPACE as Z,__name as _,getAccTitle as a,hue as a$,halfPi as a0,epsilon as a1,tau as a2,cos as a3,sin as a4,min$3 as a5,abs$3 as a6,constant$3 as a7,pi as a8,sqrt as a9,baseRest as aA,isArrayLikeObject as aB,constant$2 as aC,isFunction$2 as aD,isEmpty$1 as aE,computeDimensionOfText as aF,array$1 as aG,commonjsGlobal as aH,getDefaultExportFromCjs as aI,getIconSVG as aJ,registerIconPacks as aK,unknownIcon as aL,isObject$5 as aM,isIterateeCall as aN,keysIn as aO,eq as aP,isArrayLike$1 as aQ,isArray$2 as aR,identity as aS,isIndex$2 as aT,assignValue as aU,Rgb as aV,rgbConvert as aW,define$1 as aX,extend$1 as aY,Color as aZ,nogamma as a_,atan2 as aa,asin as ab,acos as ac,max$4 as ad,insertCluster as ae,insertNode as af,positionNode as ag,getLineFunctionsWithOffset as ah,evaluate as ai,createText as aj,getSubGraphTitleMargins as ak,replaceIconSubstring as al,decodeEntities as am,getStylesFromArray as an,Utils$1 as ao,Color$1 as ap,global$1 as aq,markers_default as ar,clear2 as as,clear as at,clear$1 as au,updateNodeBounds as av,setNodeElem as aw,insertEdge as ax,positionEdgeLabel as ay,insertEdgeLabel as az,setAccTitle as b,dayjs2 as b0,constant$4 as b1,interpolateNumber as b2,interpolateRgb as b3,interpolateString as b4,color as b5,setToString as b6,overRest as b7,baseFor as b8,baseAssignValue as b9,isPrototype as bA,__vitePreload as bB,baseUnary as ba,merge$4 as bb,isObjectLike$2 as bc,baseGetTag as bd,Symbol$1 as be,arrayLikeKeys as bf,baseKeys as bg,memoize$2 as bh,isArguments$1 as bi,copyObject as bj,getPrototype as bk,cloneArrayBuffer as bl,cloneTypedArray as bm,getTag$2 as bn,nodeUtil as bo,copyArray as bp,isBuffer$1 as bq,cloneBuffer as br,initCloneObject as bs,Stack as bt,MapCache as bu,Uint8Array$1 as bv,isTypedArray$2 as bw,isLength as bx,Set$1 as by,createAssigner as bz,getConfig2 as c,select as d,configureSvgSize as e,assignWithDepth_default as f,getAccDescription as g,calculateTextWidth as h,sanitizeText as i,sanitizeUrl_1 as j,common_default as k,log$1 as l,calculateTextHeight as m,getDiagramTitle as n,setDiagramTitle as o,setConfig2 as p,getRegisteredLayoutAlgorithm as q,render$1 as r,setAccDescription as s,defaultConfig2 as t,utils_default as u,clear$2 as v,wrapLabel as w,load as x,isValidShape as y,getEdgeId as z}; diff --git a/static/js/md-infoDiagram-A4XQUW5V-C2iCJeNK.js b/static/js/md-infoDiagram-A4XQUW5V-Dk4jz0D0.js similarity index 61% rename from static/js/md-infoDiagram-A4XQUW5V-C2iCJeNK.js rename to static/js/md-infoDiagram-A4XQUW5V-Dk4jz0D0.js index e892b78d5..e7e7c838a 100644 --- a/static/js/md-infoDiagram-A4XQUW5V-C2iCJeNK.js +++ b/static/js/md-infoDiagram-A4XQUW5V-Dk4jz0D0.js @@ -1,2 +1,2 @@ -import{_ as e,l as s,G as n,k as i,H as p}from"./md-index-BVqvVggs.js";import{p as g}from"./md-gitGraph-YCYPL57B-ClKbk6IU.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";import"./md-clone-DXToIaWo.js";var v={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:p},m=e(()=>d.version,"getVersion"),c={getVersion:m},l=e((r,a,o)=>{s.debug(`rendering info diagram +import{_ as e,l as s,G as n,e as i,H as p}from"./md-index-B8Nim9kS.js";import{p as g}from"./md-gitGraph-YCYPL57B-CpuUbWJB.js";import"./md-_baseUniq-DU1ET3rn.js";import"./md-_basePickBy-B78WwQFo.js";import"./md-clone-ByE4h4D7.js";var v={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:p},m=e(()=>d.version,"getVersion"),c={getVersion:m},l=e((r,a,o)=>{s.debug(`rendering info diagram `+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),f={draw:l},S={parser:v,db:c,renderer:f};export{S as diagram}; diff --git a/static/js/md-journeyDiagram-G5WM74LC-DTV1mCtO.js b/static/js/md-journeyDiagram-G5WM74LC-DTV1mCtO.js deleted file mode 100644 index 75b46c3e4..000000000 --- a/static/js/md-journeyDiagram-G5WM74LC-DTV1mCtO.js +++ /dev/null @@ -1,139 +0,0 @@ -import{d as pt,f as gt,g as at,b as mt}from"./md-chunk-ASOPGD6M-BaPEXM9M.js";import{_ as s,d as A,p as xt,q as kt,s as _t,g as bt,c as vt,b as wt,v as Tt,j as W,k as St}from"./md-index-BVqvVggs.js";import{d as tt}from"./md-arc-Bq1t1uZ8.js";var H=function(){var t=s(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],i=[1,9],c=[1,10],n=[1,11],u=[1,12],h=[1,13],f=[1,14],y={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,a,l,d,p,o,S){var _=o.length-1;switch(p){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:d.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:i,12:c,14:n,16:u,17:h,18:f},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:i,12:c,14:n,16:u,17:h,18:f},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:s(function(r){var a=this,l=[0],d=[],p=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,dt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var yt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(v){l.length=l.length-2*v,p.length=p.length-v,o.length=o.length-v}s(ft,"popStack");function Q(){var v;return v=d.pop()||k.lex()||K,typeof v!="number"&&(v instanceof Array&&(d=v,v=d.pop()),v=a.symbols_[v]||v),v}s(Q,"lex");for(var b,P,w,q,C={},j,M,D,N;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((b===null||typeof b>"u")&&(b=Q()),w=S[P]&&S[P][b]),typeof w>"u"||!w.length||!w[0]){var G="";N=[];for(j in S[P])this.terminals_[j]&&j>ut&&N.push("'"+this.terminals_[j]+"'");k.showPosition?G="Parse error on line "+(B+1)+`: -`+k.showPosition()+` -Expecting `+N.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(b==K?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[b]||b,line:k.yylineno,loc:Y,expected:N})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+b);switch(w[0]){case 1:l.push(b),p.push(k.yytext),o.push(k.yylloc),l.push(w[1]),b=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if(M=this.productions_[w[1]][1],C.$=p[p.length-M],C._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},yt&&(C._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],p,o].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[w[1]][0]),p.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:s(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` -`+a+"^"},"showPosition"),test_match:s(function(r,a){var l,d,p;if(this.options.backtrack_lexer&&(p={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(p.yylloc.range=this.yylloc.range.slice(0))),d=r[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var o in p)this[o]=p[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,l,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),o=0;oa[0].length)){if(a=l,d=o,this.options.backtrack_lexer){if(r=this.test_match(l,p[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,p[d]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var a=this.next();return a||this.lex()},"lex"),begin:s(function(a){this.conditionStack.push(a)},"begin"),popState:s(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,l,d,p){switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return g}();y.lexer=x;function m(){this.yy={}}return s(m,"Parser"),m.prototype=y,y.Parser=m,new m}();H.parser=H;var Mt=H,V="",U=[],R=[],F=[],$t=s(function(){U.length=0,R.length=0,V="",F.length=0,Tt()},"clear"),Et=s(function(t){V=t,U.push(t)},"addSection"),Pt=s(function(){return U},"getSections"),It=s(function(){let t=et();const e=100;let i=0;for(;!t&&i{i.people&&t.push(...i.people)}),[...new Set(t)].sort()},"updateActors"),Ct=s(function(t,e){const i=e.substr(1).split(":");let c=0,n=[];i.length===1?(c=Number(i[0]),n=[]):(c=Number(i[0]),n=i[1].split(","));const u=n.map(f=>f.trim()),h={section:V,type:V,people:u,task:t,score:c};F.push(h)},"addTask"),Vt=s(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};R.push(e)},"addTaskOrg"),et=s(function(){const t=s(function(i){return F[i].processed},"compileTask");let e=!0;for(const[i,c]of F.entries())t(i),e=e&&c.processed;return e},"compileTasks"),Rt=s(function(){return At()},"getActors"),rt={getConfig:s(()=>A().journey,"getConfig"),clear:$t,setDiagramTitle:xt,getDiagramTitle:kt,setAccTitle:_t,getAccTitle:bt,setAccDescription:vt,getAccDescription:wt,addSection:Et,getSections:Pt,getTasks:It,addTask:Ct,addTaskOrg:Vt,getActors:Rt},Ft=s(t=>`.label { - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - color: ${t.textColor}; - } - .mouth { - stroke: #666; - } - - line { - stroke: ${t.textColor} - } - - .legend { - fill: ${t.textColor}; - } - - .label text { - fill: #333; - } - .label { - color: ${t.textColor} - } - - .face { - ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; - stroke: #999; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; - stroke-width: 1px; - } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${t.arrowheadColor}; - } - - .edgePath .path { - stroke: ${t.lineColor}; - stroke-width: 1.5px; - } - - .flowchart-link { - stroke: ${t.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${t.edgeLabelBackground}; - rect { - opacity: 0.5; - } - text-align: center; - } - - .cluster rect { - } - - .cluster text { - fill: ${t.titleColor}; - } - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - font-size: 12px; - background: ${t.tertiaryColor}; - border: 1px solid ${t.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .task-type-0, .section-type-0 { - ${t.fillType0?`fill: ${t.fillType0}`:""}; - } - .task-type-1, .section-type-1 { - ${t.fillType0?`fill: ${t.fillType1}`:""}; - } - .task-type-2, .section-type-2 { - ${t.fillType0?`fill: ${t.fillType2}`:""}; - } - .task-type-3, .section-type-3 { - ${t.fillType0?`fill: ${t.fillType3}`:""}; - } - .task-type-4, .section-type-4 { - ${t.fillType0?`fill: ${t.fillType4}`:""}; - } - .task-type-5, .section-type-5 { - ${t.fillType0?`fill: ${t.fillType5}`:""}; - } - .task-type-6, .section-type-6 { - ${t.fillType0?`fill: ${t.fillType6}`:""}; - } - .task-type-7, .section-type-7 { - ${t.fillType0?`fill: ${t.fillType7}`:""}; - } - - .actor-0 { - ${t.actor0?`fill: ${t.actor0}`:""}; - } - .actor-1 { - ${t.actor1?`fill: ${t.actor1}`:""}; - } - .actor-2 { - ${t.actor2?`fill: ${t.actor2}`:""}; - } - .actor-3 { - ${t.actor3?`fill: ${t.actor3}`:""}; - } - .actor-4 { - ${t.actor4?`fill: ${t.actor4}`:""}; - } - .actor-5 { - ${t.actor5?`fill: ${t.actor5}`:""}; - } -`,"getStyles"),Lt=Ft,Z=s(function(t,e){return pt(t,e)},"drawRect"),Bt=s(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(y){const x=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function h(y){const x=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);y.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(h,"sad");function f(y){y.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(f,"ambivalent"),e.score>3?u(n):e.score<3?h(n):f(n),c},"drawFace"),lt=s(function(t,e){const i=t.append("circle");return i.attr("cx",e.cx),i.attr("cy",e.cy),i.attr("class","actor-"+e.pos),i.attr("fill",e.fill),i.attr("stroke",e.stroke),i.attr("r",e.r),i.class!==void 0&&i.attr("class",i.class),e.title!==void 0&&i.append("title").text(e.title),i},"drawCircle"),ot=s(function(t,e){return gt(t,e)},"drawText"),jt=s(function(t,e){function i(n,u,h,f,y){return n+","+u+" "+(n+h)+","+u+" "+(n+h)+","+(u+f-y)+" "+(n+h-y*1.2)+","+(u+f)+" "+n+","+(u+f)}s(i,"genPoints");const c=t.append("polygon");c.attr("points",i(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ot(t,e)},"drawLabel"),Nt=s(function(t,e,i){const c=t.append("g"),n=at();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=i.width*e.taskCount+i.diagramMarginX*(e.taskCount-1),n.height=i.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,Z(c,n),ct(i)(e.text,c,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},i,e.colour)},"drawSection"),nt=-1,zt=s(function(t,e,i){const c=e.x+i.width/2,n=t.append("g");nt++;const u=300+5*30;n.append("line").attr("id","task"+nt).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",u).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(n,{cx:c,cy:300+(5-e.score)*30,score:e.score});const h=at();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=i.width,h.height=i.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,Z(n,h);let f=e.x+14;e.people.forEach(y=>{const x=e.actors[y].color,m={cx:f,cy:e.y,r:7,fill:x,stroke:"#000",title:y,pos:e.actors[y].position};lt(n,m),f+=10}),ct(i)(e.task,n,h.x,h.y,h.width,h.height,{class:"task"},i,e.colour)},"drawTask"),Ot=s(function(t,e){mt(t,e)},"drawBackgroundRect"),ct=function(){function t(n,u,h,f,y,x,m,g){const r=u.append("text").attr("x",h+y/2).attr("y",f+x/2+5).style("font-color",g).style("text-anchor","middle").text(n);c(r,m)}s(t,"byText");function e(n,u,h,f,y,x,m,g,r){const{taskFontSize:a,taskFontFamily:l}=g,d=n.split(//gi);for(let p=0;p{const n=$[c].color,u={cx:20,cy:i,r:7,fill:n,stroke:"#000",pos:$[c].position};L.drawCircle(t,u);const h={x:40,y:i+7,fill:"#666",text:c,textMargin:e.boxTextMargin|5};L.drawText(t,h),i+=20})}s(ht,"drawActorLegend");var z=A().journey,I=z.leftMargin,Gt=s(function(t,e,i,c){const n=A().journey,u=A().securityLevel;let h;u==="sandbox"&&(h=W("#i"+e));const f=u==="sandbox"?W(h.nodes()[0].contentDocument.body):W("body");T.init();const y=f.select("#"+e);L.initGraphics(y);const x=c.db.getTasks(),m=c.db.getDiagramTitle(),g=c.db.getActors();for(const o in $)delete $[o];let r=0;g.forEach(o=>{$[o]={color:n.actorColours[r%n.actorColours.length],position:r},r++}),ht(y),T.insert(0,0,I,Object.keys($).length*50),Wt(y,x,0);const a=T.getBounds();m&&y.append("text").text(m).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const l=a.stopy-a.starty+2*n.diagramMarginY,d=I+a.stopx+2*n.diagramMarginX;St(y,l,d,n.useMaxWidth),y.append("line").attr("x1",I).attr("y1",n.height*4).attr("x2",d-I-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const p=m?70:0;y.attr("viewBox",`${a.startx} -25 ${d} ${l+p}`),y.attr("preserveAspectRatio","xMinYMin meet"),y.attr("height",l+p+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,i,c){t[e]===void 0?t[e]=i:t[e]=c(i,t[e])},"updateVal"),updateBounds:s(function(t,e,i,c){const n=A().journey,u=this;let h=0;function f(y){return s(function(m){h++;const g=u.sequenceItems.length-h+1;u.updateVal(m,"starty",e-g*n.boxMargin,Math.min),u.updateVal(m,"stopy",c+g*n.boxMargin,Math.max),u.updateVal(T.data,"startx",t-g*n.boxMargin,Math.min),u.updateVal(T.data,"stopx",i+g*n.boxMargin,Math.max),y!=="activation"&&(u.updateVal(m,"startx",t-g*n.boxMargin,Math.min),u.updateVal(m,"stopx",i+g*n.boxMargin,Math.max),u.updateVal(T.data,"starty",e-g*n.boxMargin,Math.min),u.updateVal(T.data,"stopy",c+g*n.boxMargin,Math.max))},"updateItemBounds")}s(f,"updateFn"),this.sequenceItems.forEach(f())},"updateBounds"),insert:s(function(t,e,i,c){const n=Math.min(t,i),u=Math.max(t,i),h=Math.min(e,c),f=Math.max(e,c);this.updateVal(T.data,"startx",n,Math.min),this.updateVal(T.data,"starty",h,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",f,Math.max),this.updateBounds(n,h,u,f)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},X=z.sectionFills,st=z.sectionColours,Wt=s(function(t,e,i){const c=A().journey;let n="";const u=c.height*2+c.diagramMarginY,h=i+u;let f=0,y="#CCC",x="black",m=0;for(const[g,r]of e.entries()){if(n!==r.section){y=X[f%X.length],m=f%X.length,x=st[f%st.length];let l=0;const d=r.section;for(let o=g;o($[d]&&(l[d]=$[d]),l),{});r.x=g*c.taskMargin+g*c.width+I,r.y=h,r.width=c.diagramMarginX,r.height=c.diagramMarginY,r.colour=x,r.fill=y,r.num=m,r.actors=a,L.drawTask(t,r,c),T.insert(r.x,r.y,r.x+r.width+c.taskMargin,300+5*30)}},"drawTasks"),it={setConf:qt,draw:Gt},Zt={parser:Mt,db:rt,renderer:it,styles:Lt,init:s(t=>{it.setConf(t.journey),rt.clear()},"init")};export{Zt as diagram}; diff --git a/static/js/md-journeyDiagram-G5WM74LC-DmZRpnbC.js b/static/js/md-journeyDiagram-G5WM74LC-DmZRpnbC.js new file mode 100644 index 000000000..41bdc9f4c --- /dev/null +++ b/static/js/md-journeyDiagram-G5WM74LC-DmZRpnbC.js @@ -0,0 +1,139 @@ +import{a as ft,g as at,f as gt,d as mt}from"./md-chunk-ASOPGD6M-D4uVhftc.js";import{_ as i,g as xt,s as kt,a as _t,b as vt,n as bt,o as wt,c as A,d as W,e as Tt,v as St}from"./md-index-B8Nim9kS.js";import{d as tt}from"./md-arc-T7NRJmXm.js";var H=function(){var t=i(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],s=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:i(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:s,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:i(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:i(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}i(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}i(Q,"lex");for(var v,P,w,q,C={},N,M,D,j;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";j=[];for(N in S[P])this.terminals_[N]&&N>ut&&j.push("'"+this.terminals_[N]+"'");k.showPosition?G="Parse error on line "+(B+1)+`: +`+k.showPosition()+` +Expecting `+j.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(v==K?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:Y,expected:j})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+v);switch(w[0]){case 1:l.push(v),f.push(k.yytext),o.push(k.yylloc),l.push(w[1]),v=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if(M=this.productions_[w[1]][1],C.$=f[f.length-M],C._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},dt&&(C._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],f,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),f=f.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[w[1]][0]),f.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:i(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:i(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:i(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:i(function(r){this.unput(this.match.slice(r))},"less"),pastInput:i(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:i(function(r,a){var l,y,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),y=r[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var o in f)this[o]=f[o];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,l,y;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),o=0;oa[0].length)){if(a=l,y=o,this.options.backtrack_lexer){if(r=this.test_match(l,f[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,f[y]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var a=this.next();return a||this.lex()},"lex"),begin:i(function(a){this.conditionStack.push(a)},"begin"),popState:i(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:i(function(a){this.begin(a)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(a,l,y,f){switch(y){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return g}();d.lexer=x;function m(){this.yy={}}return i(m,"Parser"),m.prototype=d,d.Parser=m,new m}();H.parser=H;var Mt=H,V="",U=[],R=[],F=[],$t=i(function(){U.length=0,R.length=0,V="",F.length=0,St()},"clear"),Et=i(function(t){V=t,U.push(t)},"addSection"),Pt=i(function(){return U},"getSections"),It=i(function(){let t=et();const e=100;let n=0;for(;!t&&n{n.people&&t.push(...n.people)}),[...new Set(t)].sort()},"updateActors"),Ct=i(function(t,e){const n=e.substr(1).split(":");let c=0,s=[];n.length===1?(c=Number(n[0]),s=[]):(c=Number(n[0]),s=n[1].split(","));const u=s.map(p=>p.trim()),h={section:V,type:V,people:u,task:t,score:c};F.push(h)},"addTask"),Vt=i(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};R.push(e)},"addTaskOrg"),et=i(function(){const t=i(function(n){return F[n].processed},"compileTask");let e=!0;for(const[n,c]of F.entries())t(n),e=e&&c.processed;return e},"compileTasks"),Rt=i(function(){return At()},"getActors"),rt={getConfig:i(()=>A().journey,"getConfig"),clear:$t,setDiagramTitle:wt,getDiagramTitle:bt,setAccTitle:vt,getAccTitle:_t,setAccDescription:kt,getAccDescription:xt,addSection:Et,getSections:Pt,getTasks:It,addTask:Ct,addTaskOrg:Vt,getActors:Rt},Ft=i(t=>`.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } +`,"getStyles"),Lt=Ft,Z=i(function(t,e){return mt(t,e)},"drawRect"),Bt=i(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");s.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(d){const x=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}i(u,"smile");function h(d){const x=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}i(h,"sad");function p(d){d.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i(p,"ambivalent"),e.score>3?u(s):e.score<3?h(s):p(s),c},"drawFace"),lt=i(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),n.class!==void 0&&n.attr("class",n.class),e.title!==void 0&&n.append("title").text(e.title),n},"drawCircle"),ot=i(function(t,e){return gt(t,e)},"drawText"),Nt=i(function(t,e){function n(s,u,h,p,d){return s+","+u+" "+(s+h)+","+u+" "+(s+h)+","+(u+p-d)+" "+(s+h-d*1.2)+","+(u+p)+" "+s+","+(u+p)}i(n,"genPoints");const c=t.append("polygon");c.attr("points",n(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ot(t,e)},"drawLabel"),jt=i(function(t,e,n){const c=t.append("g"),s=at();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,Z(c,s),ct(n)(e.text,c,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),st=-1,zt=i(function(t,e,n){const c=e.x+n.width/2,s=t.append("g");st++;const u=300+5*30;s.append("line").attr("id","task"+st).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",u).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(s,{cx:c,cy:300+(5-e.score)*30,score:e.score});const h=at();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=n.width,h.height=n.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,Z(s,h);let p=e.x+14;e.people.forEach(d=>{const x=e.actors[d].color,m={cx:p,cy:e.y,r:7,fill:x,stroke:"#000",title:d,pos:e.actors[d].position};lt(s,m),p+=10}),ct(n)(e.task,s,h.x,h.y,h.width,h.height,{class:"task"},n,e.colour)},"drawTask"),Ot=i(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(s,u,h,p,d,x,m,g){const r=u.append("text").attr("x",h+d/2).attr("y",p+x/2+5).style("font-color",g).style("text-anchor","middle").text(s);c(r,m)}i(t,"byText");function e(s,u,h,p,d,x,m,g,r){const{taskFontSize:a,taskFontFamily:l}=g,y=s.split(//gi);for(let f=0;f{const s=$[c].color,u={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:$[c].position};L.drawCircle(t,u);const h={x:40,y:n+7,fill:"#666",text:c,textMargin:e.boxTextMargin|5};L.drawText(t,h),n+=20})}i(ht,"drawActorLegend");var z=A().journey,I=z.leftMargin,Gt=i(function(t,e,n,c){const s=A().journey,u=A().securityLevel;let h;u==="sandbox"&&(h=W("#i"+e));const p=u==="sandbox"?W(h.nodes()[0].contentDocument.body):W("body");T.init();const d=p.select("#"+e);L.initGraphics(d);const x=c.db.getTasks(),m=c.db.getDiagramTitle(),g=c.db.getActors();for(const o in $)delete $[o];let r=0;g.forEach(o=>{$[o]={color:s.actorColours[r%s.actorColours.length],position:r},r++}),ht(d),T.insert(0,0,I,Object.keys($).length*50),Wt(d,x,0);const a=T.getBounds();m&&d.append("text").text(m).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const l=a.stopy-a.starty+2*s.diagramMarginY,y=I+a.stopx+2*s.diagramMarginX;Tt(d,l,y,s.useMaxWidth),d.append("line").attr("x1",I).attr("y1",s.height*4).attr("x2",y-I-4).attr("y2",s.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const f=m?70:0;d.attr("viewBox",`${a.startx} -25 ${y} ${l+f}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",l+f+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:i(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:i(function(t,e,n,c){t[e]===void 0?t[e]=n:t[e]=c(n,t[e])},"updateVal"),updateBounds:i(function(t,e,n,c){const s=A().journey,u=this;let h=0;function p(d){return i(function(m){h++;const g=u.sequenceItems.length-h+1;u.updateVal(m,"starty",e-g*s.boxMargin,Math.min),u.updateVal(m,"stopy",c+g*s.boxMargin,Math.max),u.updateVal(T.data,"startx",t-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopx",n+g*s.boxMargin,Math.max),d!=="activation"&&(u.updateVal(m,"startx",t-g*s.boxMargin,Math.min),u.updateVal(m,"stopx",n+g*s.boxMargin,Math.max),u.updateVal(T.data,"starty",e-g*s.boxMargin,Math.min),u.updateVal(T.data,"stopy",c+g*s.boxMargin,Math.max))},"updateItemBounds")}i(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:i(function(t,e,n,c){const s=Math.min(t,n),u=Math.max(t,n),h=Math.min(e,c),p=Math.max(e,c);this.updateVal(T.data,"startx",s,Math.min),this.updateVal(T.data,"starty",h,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",p,Math.max),this.updateBounds(s,h,u,p)},"insert"),bumpVerticalPos:i(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:i(function(){return this.verticalPos},"getVerticalPos"),getBounds:i(function(){return this.data},"getBounds")},X=z.sectionFills,it=z.sectionColours,Wt=i(function(t,e,n){const c=A().journey;let s="";const u=c.height*2+c.diagramMarginY,h=n+u;let p=0,d="#CCC",x="black",m=0;for(const[g,r]of e.entries()){if(s!==r.section){d=X[p%X.length],m=p%X.length,x=it[p%it.length];let l=0;const y=r.section;for(let o=g;o($[y]&&(l[y]=$[y]),l),{});r.x=g*c.taskMargin+g*c.width+I,r.y=h,r.width=c.diagramMarginX,r.height=c.diagramMarginY,r.colour=x,r.fill=d,r.num=m,r.actors=a,L.drawTask(t,r,c),T.insert(r.x,r.y,r.x+r.width+c.taskMargin,300+5*30)}},"drawTasks"),nt={setConf:qt,draw:Gt},Zt={parser:Mt,db:rt,renderer:nt,styles:Lt,init:i(t=>{nt.setConf(t.journey),rt.clear()},"init")};export{Zt as diagram}; diff --git a/static/js/md-kanban-definition-QRCXZQQD-Cyy87Ubx.js b/static/js/md-kanban-definition-QRCXZQQD-UiOcShLb.js similarity index 86% rename from static/js/md-kanban-definition-QRCXZQQD-Cyy87Ubx.js rename to static/js/md-kanban-definition-QRCXZQQD-UiOcShLb.js index 325cfe4a5..c12a9fe1c 100644 --- a/static/js/md-kanban-definition-QRCXZQQD-Cyy87Ubx.js +++ b/static/js/md-kanban-definition-QRCXZQQD-UiOcShLb.js @@ -1,14 +1,14 @@ -import{_ as c,l as te,d as W,G as fe,ae as ye,af as be,ag as me,V as _e,B as K,i as F,r as Ee,J as ke,W as Se,X as le,Y as ce}from"./md-index-BVqvVggs.js";var $=function(){var t=c(function(_,s,n,a){for(n=n||{},a=_.length;a--;n[_[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],M=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],U=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:M}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:U,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:M}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:U,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,G={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`: +import{_ as c,l as te,c as W,G as fe,ae as ye,af as be,ag as me,T as Ee,E as Y,i as F,x as _e,J as ke,U as Se,V as le,W as ce}from"./md-index-B8Nim9kS.js";var $=function(){var t=c(function(E,s,n,a){for(n=n||{},a=E.length;a--;n[E[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],_=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],U=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],M=[1,35],j=[1,36],A=[1,6,7,11,13,16,17,20,23],H=[1,38],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){case 6:case 7:return o;case 8:o.getLogger().trace("Stop NL ");break;case 9:o.getLogger().trace("Stop EOF ");break;case 11:o.getLogger().trace("Stop NL2 ");break;case 12:o.getLogger().trace("Stop EOF2 ");break;case 15:o.getLogger().info("Node: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:U}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:_,18:17,19:18,20:f,23:h},t(P,[2,14],{7:M,11:j}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:U}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:H}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:M,11:j}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:H}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),b=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);b.setInput(s,T.yy),T.yy.lexer=b,T.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var q=b.yylloc;e.push(q);var de=b.options&&b.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||b.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var k,R,v,Q,G={},X,I,oe,K;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((k===null||typeof k>"u")&&(k=ae()),v=B[R]&&B[R][k]),typeof v>"u"||!v.length||!v[0]){var Z="";K=[];for(X in B[R])this.terminals_[X]&&X>ue&&K.push("'"+this.terminals_[X]+"'");b.showPosition?Z="Parse error on line "+(z+1)+`: `+b.showPosition()+` -Expecting `+Y.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:q,expected:Y})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),k=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=function(){var _={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+K.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:b.match,token:this.terminals_[k]||k,line:b.yylineno,loc:q,expected:K})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+k);switch(v[0]){case 1:a.push(k),u.push(b.yytext),e.push(b.yylloc),a.push(v[1]),k=null,ie=b.yyleng,l=b.yytext,z=b.yylineno,q=b.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},m=function(){var E={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var o=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` `+n+"^"},"showPosition"),test_match:c(function(s,n){var a,o,u;if(this.options.backtrack_lexer&&(u={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(u.yylloc.range=this.yylloc.range.slice(0))),o=s[0].match(/(?:\r\n?|\n).*/g),o&&(this.yylineno+=o.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:o?o[o.length-1].length-o[o.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],a=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var e in u)this[e]=u[e];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,n,a,o;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),e=0;en[0].length)){if(n=a,o=e,this.options.backtrack_lexer){if(s=this.test_match(a,u[e]),s!==!1)return s;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(s=this.test_match(n,u[o]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"
"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return _}();V.lexer=m;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var Ne=$,D=[],ne=[],ee=0,se={},xe=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),ve=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].levelh.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:F(h.label??"",r),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Le=c((t,g,d,r,p)=>{var C,w;const E=W();let f=((C=E.mindmap)==null?void 0:C.padding)??K.mindmap.padding;switch(r){case y.ROUNDED_RECT:case y.RECT:case y.HEXAGON:f*=2}const h={id:F(g,E)||"kbn"+ee++,level:t,label:F(d,E),width:((w=E.mindmap)==null?void 0:w.maxNodeWidth)??K.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var n=this.next();return n||this.lex()},"lex"),begin:c(function(n){this.conditionStack.push(n)},"begin"),popState:c(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:c(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:c(function(n){this.begin(n)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(n,a,o,u){switch(o){case 0:return this.pushState("shapeData"),a.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const e=/\n\s*/g;return a.yytext=a.yytext.replace(e,"
"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",a.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",a.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",a.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",a.yytext),21;case 42:return n.getLogger().trace("Long description:",a.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return E}();V.lexer=m;function O(){this.yy={}}return c(O,"Parser"),O.prototype=V,V.Parser=O,new O}();$.parser=$;var Ne=$,D=[],ne=[],ee=0,se={},xe=c(()=>{D=[],ne=[],ee=0,se={}},"clear"),ve=c(t=>{if(D.length===0)return null;const g=D[0].level;let d=null;for(let r=D.length-1;r>=0;r--)if(D[r].level===g&&!d&&(d=D[r]),D[r].levelh.parentId===p.id);for(const h of f){const L={id:h.id,parentId:p.id,label:F(h.label??"",r),isGroup:!1,ticket:h==null?void 0:h.ticket,priority:h==null?void 0:h.priority,assigned:h==null?void 0:h.assigned,icon:h==null?void 0:h.icon,shape:"kanbanItem",level:h.level,rx:5,ry:5,cssStyles:["text-align: left"]};g.push(L)}}return{nodes:g,edges:t,other:{},config:W()}},"getData"),Le=c((t,g,d,r,p)=>{var C,w;const _=W();let f=((C=_.mindmap)==null?void 0:C.padding)??Y.mindmap.padding;switch(r){case y.ROUNDED_RECT:case y.RECT:case y.HEXAGON:f*=2}const h={id:F(g,_)||"kbn"+ee++,level:t,label:F(d,_),width:((w=_.mindmap)==null?void 0:w.maxNodeWidth)??Y.mindmap.maxNodeWidth,padding:f,isGroup:!1};if(p!==void 0){let N;p.includes(` `)?N=p+` `:N=`{ `+p+` -}`;const i=Ee(N,{schema:ke});if(i.shape&&(i.shape!==i.shape.toLowerCase()||i.shape.includes("_")))throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);i!=null&&i.shape&&i.shape==="kanbanItem"&&(h.shape=i==null?void 0:i.shape),i!=null&&i.label&&(h.label=i==null?void 0:i.label),i!=null&&i.icon&&(h.icon=i==null?void 0:i.icon.toString()),i!=null&&i.assigned&&(h.assigned=i==null?void 0:i.assigned.toString()),i!=null&&i.ticket&&(h.ticket=i==null?void 0:i.ticket.toString()),i!=null&&i.priority&&(h.priority=i==null?void 0:i.priority)}const L=ve(t);L?h.parentId=L.id||"kbn"+ee++:ne.push(h),D.push(h)},"addNode"),y={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Oe=c((t,g)=>{switch(te.debug("In get type",t,g),t){case"[":return y.RECT;case"(":return g===")"?y.ROUNDED_RECT:y.CLOUD;case"((":return y.CIRCLE;case")":return y.CLOUD;case"))":return y.BANG;case"{{":return y.HEXAGON;default:return y.DEFAULT}},"getType"),Ie=c((t,g)=>{se[t]=g},"setElementForId"),Ce=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=F(t.icon,g)),t.class&&(d.cssClasses=F(t.class,g))},"decorateNode"),we=c(t=>{switch(t){case y.DEFAULT:return"no-border";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded-rect";case y.CIRCLE:return"circle";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ae=c(()=>te,"getLogger"),Te=c(t=>se[t],"getElementById"),Re={clear:xe,addNode:Le,getSections:he,getData:De,nodeType:y,getType:Oe,setElementForId:Ie,decorateNode:Ce,type2Str:we,getLogger:Ae,getElementById:Te},Pe=Re,Ve=c(async(t,g,d,r)=>{var U,j,A,H,V;te.debug(`Rendering kanban diagram -`+t);const E=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g),L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=E.nodes.filter(m=>m.isGroup);let N=0;const i=10,M=[];let x=25;for(const m of w){const O=((U=f==null?void 0:f.kanban)==null?void 0:U.sectionWidth)||200;N=N+1,m.x=O*N+(N-1)*i/2,m.width=O,m.y=0,m.height=O*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+N;const _=await ye(L,m);x=Math.max(x,(j=_==null?void 0:_.labelBBox)==null?void 0:j.height),M.push(_)}let P=0;for(const m of w){const O=M[P];P=P+1;const _=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-_*3/2+x;let n=s;const a=E.nodes.filter(e=>e.parentId===m.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=m.x,e.width=_-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}_e(void 0,h,((H=f.mindmap)==null?void 0:H.padding)??K.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??K.kanban.useMaxWidth)},"draw"),Be={draw:Ve},Ge=c(t=>{let g="";for(let r=0;rt.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;r{switch(te.debug("In get type",t,g),t){case"[":return y.RECT;case"(":return g===")"?y.ROUNDED_RECT:y.CLOUD;case"((":return y.CIRCLE;case")":return y.CLOUD;case"))":return y.BANG;case"{{":return y.HEXAGON;default:return y.DEFAULT}},"getType"),Ie=c((t,g)=>{se[t]=g},"setElementForId"),Ce=c(t=>{if(!t)return;const g=W(),d=D[D.length-1];t.icon&&(d.icon=F(t.icon,g)),t.class&&(d.cssClasses=F(t.class,g))},"decorateNode"),we=c(t=>{switch(t){case y.DEFAULT:return"no-border";case y.RECT:return"rect";case y.ROUNDED_RECT:return"rounded-rect";case y.CIRCLE:return"circle";case y.CLOUD:return"cloud";case y.BANG:return"bang";case y.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Ae=c(()=>te,"getLogger"),Te=c(t=>se[t],"getElementById"),Re={clear:xe,addNode:Le,getSections:he,getData:De,nodeType:y,getType:Oe,setElementForId:Ie,decorateNode:Ce,type2Str:we,getLogger:Ae,getElementById:Te},Pe=Re,Ve=c(async(t,g,d,r)=>{var M,j,A,H,V;te.debug(`Rendering kanban diagram +`+t);const _=r.db.getData(),f=W();f.htmlLabels=!1;const h=fe(g),L=h.append("g");L.attr("class","sections");const C=h.append("g");C.attr("class","items");const w=_.nodes.filter(m=>m.isGroup);let N=0;const i=10,U=[];let x=25;for(const m of w){const O=((M=f==null?void 0:f.kanban)==null?void 0:M.sectionWidth)||200;N=N+1,m.x=O*N+(N-1)*i/2,m.width=O,m.y=0,m.height=O*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+N;const E=await ye(L,m);x=Math.max(x,(j=E==null?void 0:E.labelBBox)==null?void 0:j.height),U.push(E)}let P=0;for(const m of w){const O=U[P];P=P+1;const E=((A=f==null?void 0:f.kanban)==null?void 0:A.sectionWidth)||200,s=-E*3/2+x;let n=s;const a=_.nodes.filter(e=>e.parentId===m.id);for(const e of a){if(e.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");e.x=m.x,e.width=E-1.5*i;const l=(await be(C,e,{config:f})).node().getBBox();e.y=n+l.height/2,await me(e),n=e.y+l.height/2+i/2}const o=O.cluster.select("rect"),u=Math.max(n-s+3*i,50)+(x-25);o.attr("height",u)}Ee(void 0,h,((H=f.mindmap)==null?void 0:H.padding)??Y.kanban.padding,((V=f.mindmap)==null?void 0:V.useMaxWidth)??Y.kanban.useMaxWidth)},"draw"),Be={draw:Ve},Ge=c(t=>{let g="";for(let r=0;rt.darkMode?ce(r,p):le(r,p),"adjuster");for(let r=0;rt.toText();return this.children.map(e).join("")}}var x0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ve={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ht={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Va(r,e){x0[r]=e}function pt(r,e,t){if(!x0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=x0[e][a];if(!n&&r[0]in Ht&&(a=Ht[r[0]].charCodeAt(0),n=x0[e][a]),!n&&t==="text"&&gr(a)&&(n=x0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var Ue={};function Ua(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Ue[e]){var t=Ue[e]={cssEmPerMu:ve.quad[e]/18};for(var a in ve)ve.hasOwnProperty(a)&&(t[a]=ve[a][e])}return Ue[e]}var Ya=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Lt=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Ft=function(e,t){return t.size<2?e:Ya[e-1][t.size-1]};class A0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||A0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Lt[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new A0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Ft(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Lt[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Ft(A0.BASESIZE,e);return this.size===t&&this.textSize===A0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==A0.BASESIZE?["sizing","reset-size"+this.size,"size"+A0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ua(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}A0.BASESIZE=6;var it={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Xa={ex:!0,em:!0,mu:!0},br=function(e){return typeof e!="string"&&(e=e.unit),e in it||e in Xa||e==="ex"},K=function(e,t){var a;if(e.unit in it)a=it[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new M("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},T=function(e){return+e.toFixed(4)+"em"},P0=function(e){return e.filter(t=>t).join(" ")},yr=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},xr=function(e){var t=document.createElement(e);t.className=P0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,wr=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+R.escape(P0(this.classes))+'"');var a="";for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=R.hyphenate(n)+":"+this.style[n]+";");a&&(t+=' style="'+R.escape(a)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if($a.test(s))throw new M("Invalid attribute name '"+s+"'");t+=" "+s+'="'+R.escape(this.attributes[s])+'"'}t+=">";for(var o=0;o",t};class me{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return R.contains(this.classes,e)}toNode(){return xr.call(this,"span")}toMarkup(){return wr.call(this,"span")}}class vt{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return R.contains(this.classes,e)}toNode(){return xr.call(this,"a")}toMarkup(){return wr.call(this,"a")}}class Wa{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return R.contains(this.classes,e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+R.escape(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=T(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=P0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=R.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+R.escape(a)+'"');var s=R.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}}class C0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n':''}}class st{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var Ka={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ja={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$={math:{},text:{}};function i(r,e,t,a,n,s){$[r][n]={font:e,group:t,replace:a},s&&a&&($[r][a]=$[r][n])}var l="math",k="text",h="main",d="ams",W="accent-token",N="bin",i0="close",re="inner",I="mathord",_="op-token",u0="open",Re="punct",f="rel",I0="spacing",v="textord";i(l,h,f,"≡","\\equiv",!0);i(l,h,f,"≺","\\prec",!0);i(l,h,f,"≻","\\succ",!0);i(l,h,f,"∼","\\sim",!0);i(l,h,f,"⊥","\\perp");i(l,h,f,"⪯","\\preceq",!0);i(l,h,f,"⪰","\\succeq",!0);i(l,h,f,"≃","\\simeq",!0);i(l,h,f,"∣","\\mid",!0);i(l,h,f,"≪","\\ll",!0);i(l,h,f,"≫","\\gg",!0);i(l,h,f,"≍","\\asymp",!0);i(l,h,f,"∥","\\parallel");i(l,h,f,"⋈","\\bowtie",!0);i(l,h,f,"⌣","\\smile",!0);i(l,h,f,"⊑","\\sqsubseteq",!0);i(l,h,f,"⊒","\\sqsupseteq",!0);i(l,h,f,"≐","\\doteq",!0);i(l,h,f,"⌢","\\frown",!0);i(l,h,f,"∋","\\ni",!0);i(l,h,f,"∝","\\propto",!0);i(l,h,f,"⊢","\\vdash",!0);i(l,h,f,"⊣","\\dashv",!0);i(l,h,f,"∋","\\owns");i(l,h,Re,".","\\ldotp");i(l,h,Re,"⋅","\\cdotp");i(l,h,v,"#","\\#");i(k,h,v,"#","\\#");i(l,h,v,"&","\\&");i(k,h,v,"&","\\&");i(l,h,v,"ℵ","\\aleph",!0);i(l,h,v,"∀","\\forall",!0);i(l,h,v,"ℏ","\\hbar",!0);i(l,h,v,"∃","\\exists",!0);i(l,h,v,"∇","\\nabla",!0);i(l,h,v,"♭","\\flat",!0);i(l,h,v,"ℓ","\\ell",!0);i(l,h,v,"♮","\\natural",!0);i(l,h,v,"♣","\\clubsuit",!0);i(l,h,v,"℘","\\wp",!0);i(l,h,v,"♯","\\sharp",!0);i(l,h,v,"♢","\\diamondsuit",!0);i(l,h,v,"ℜ","\\Re",!0);i(l,h,v,"♡","\\heartsuit",!0);i(l,h,v,"ℑ","\\Im",!0);i(l,h,v,"♠","\\spadesuit",!0);i(l,h,v,"§","\\S",!0);i(k,h,v,"§","\\S");i(l,h,v,"¶","\\P",!0);i(k,h,v,"¶","\\P");i(l,h,v,"†","\\dag");i(k,h,v,"†","\\dag");i(k,h,v,"†","\\textdagger");i(l,h,v,"‡","\\ddag");i(k,h,v,"‡","\\ddag");i(k,h,v,"‡","\\textdaggerdbl");i(l,h,i0,"⎱","\\rmoustache",!0);i(l,h,u0,"⎰","\\lmoustache",!0);i(l,h,i0,"⟯","\\rgroup",!0);i(l,h,u0,"⟮","\\lgroup",!0);i(l,h,N,"∓","\\mp",!0);i(l,h,N,"⊖","\\ominus",!0);i(l,h,N,"⊎","\\uplus",!0);i(l,h,N,"⊓","\\sqcap",!0);i(l,h,N,"∗","\\ast");i(l,h,N,"⊔","\\sqcup",!0);i(l,h,N,"◯","\\bigcirc",!0);i(l,h,N,"∙","\\bullet",!0);i(l,h,N,"‡","\\ddagger");i(l,h,N,"≀","\\wr",!0);i(l,h,N,"⨿","\\amalg");i(l,h,N,"&","\\And");i(l,h,f,"⟵","\\longleftarrow",!0);i(l,h,f,"⇐","\\Leftarrow",!0);i(l,h,f,"⟸","\\Longleftarrow",!0);i(l,h,f,"⟶","\\longrightarrow",!0);i(l,h,f,"⇒","\\Rightarrow",!0);i(l,h,f,"⟹","\\Longrightarrow",!0);i(l,h,f,"↔","\\leftrightarrow",!0);i(l,h,f,"⟷","\\longleftrightarrow",!0);i(l,h,f,"⇔","\\Leftrightarrow",!0);i(l,h,f,"⟺","\\Longleftrightarrow",!0);i(l,h,f,"↦","\\mapsto",!0);i(l,h,f,"⟼","\\longmapsto",!0);i(l,h,f,"↗","\\nearrow",!0);i(l,h,f,"↩","\\hookleftarrow",!0);i(l,h,f,"↪","\\hookrightarrow",!0);i(l,h,f,"↘","\\searrow",!0);i(l,h,f,"↼","\\leftharpoonup",!0);i(l,h,f,"⇀","\\rightharpoonup",!0);i(l,h,f,"↙","\\swarrow",!0);i(l,h,f,"↽","\\leftharpoondown",!0);i(l,h,f,"⇁","\\rightharpoondown",!0);i(l,h,f,"↖","\\nwarrow",!0);i(l,h,f,"⇌","\\rightleftharpoons",!0);i(l,d,f,"≮","\\nless",!0);i(l,d,f,"","\\@nleqslant");i(l,d,f,"","\\@nleqq");i(l,d,f,"⪇","\\lneq",!0);i(l,d,f,"≨","\\lneqq",!0);i(l,d,f,"","\\@lvertneqq");i(l,d,f,"⋦","\\lnsim",!0);i(l,d,f,"⪉","\\lnapprox",!0);i(l,d,f,"⊀","\\nprec",!0);i(l,d,f,"⋠","\\npreceq",!0);i(l,d,f,"⋨","\\precnsim",!0);i(l,d,f,"⪹","\\precnapprox",!0);i(l,d,f,"≁","\\nsim",!0);i(l,d,f,"","\\@nshortmid");i(l,d,f,"∤","\\nmid",!0);i(l,d,f,"⊬","\\nvdash",!0);i(l,d,f,"⊭","\\nvDash",!0);i(l,d,f,"⋪","\\ntriangleleft");i(l,d,f,"⋬","\\ntrianglelefteq",!0);i(l,d,f,"⊊","\\subsetneq",!0);i(l,d,f,"","\\@varsubsetneq");i(l,d,f,"⫋","\\subsetneqq",!0);i(l,d,f,"","\\@varsubsetneqq");i(l,d,f,"≯","\\ngtr",!0);i(l,d,f,"","\\@ngeqslant");i(l,d,f,"","\\@ngeqq");i(l,d,f,"⪈","\\gneq",!0);i(l,d,f,"≩","\\gneqq",!0);i(l,d,f,"","\\@gvertneqq");i(l,d,f,"⋧","\\gnsim",!0);i(l,d,f,"⪊","\\gnapprox",!0);i(l,d,f,"⊁","\\nsucc",!0);i(l,d,f,"⋡","\\nsucceq",!0);i(l,d,f,"⋩","\\succnsim",!0);i(l,d,f,"⪺","\\succnapprox",!0);i(l,d,f,"≆","\\ncong",!0);i(l,d,f,"","\\@nshortparallel");i(l,d,f,"∦","\\nparallel",!0);i(l,d,f,"⊯","\\nVDash",!0);i(l,d,f,"⋫","\\ntriangleright");i(l,d,f,"⋭","\\ntrianglerighteq",!0);i(l,d,f,"","\\@nsupseteqq");i(l,d,f,"⊋","\\supsetneq",!0);i(l,d,f,"","\\@varsupsetneq");i(l,d,f,"⫌","\\supsetneqq",!0);i(l,d,f,"","\\@varsupsetneqq");i(l,d,f,"⊮","\\nVdash",!0);i(l,d,f,"⪵","\\precneqq",!0);i(l,d,f,"⪶","\\succneqq",!0);i(l,d,f,"","\\@nsubseteqq");i(l,d,N,"⊴","\\unlhd");i(l,d,N,"⊵","\\unrhd");i(l,d,f,"↚","\\nleftarrow",!0);i(l,d,f,"↛","\\nrightarrow",!0);i(l,d,f,"⇍","\\nLeftarrow",!0);i(l,d,f,"⇏","\\nRightarrow",!0);i(l,d,f,"↮","\\nleftrightarrow",!0);i(l,d,f,"⇎","\\nLeftrightarrow",!0);i(l,d,f,"△","\\vartriangle");i(l,d,v,"ℏ","\\hslash");i(l,d,v,"▽","\\triangledown");i(l,d,v,"◊","\\lozenge");i(l,d,v,"Ⓢ","\\circledS");i(l,d,v,"®","\\circledR");i(k,d,v,"®","\\circledR");i(l,d,v,"∡","\\measuredangle",!0);i(l,d,v,"∄","\\nexists");i(l,d,v,"℧","\\mho");i(l,d,v,"Ⅎ","\\Finv",!0);i(l,d,v,"⅁","\\Game",!0);i(l,d,v,"‵","\\backprime");i(l,d,v,"▲","\\blacktriangle");i(l,d,v,"▼","\\blacktriangledown");i(l,d,v,"■","\\blacksquare");i(l,d,v,"⧫","\\blacklozenge");i(l,d,v,"★","\\bigstar");i(l,d,v,"∢","\\sphericalangle",!0);i(l,d,v,"∁","\\complement",!0);i(l,d,v,"ð","\\eth",!0);i(k,h,v,"ð","ð");i(l,d,v,"╱","\\diagup");i(l,d,v,"╲","\\diagdown");i(l,d,v,"□","\\square");i(l,d,v,"□","\\Box");i(l,d,v,"◊","\\Diamond");i(l,d,v,"¥","\\yen",!0);i(k,d,v,"¥","\\yen",!0);i(l,d,v,"✓","\\checkmark",!0);i(k,d,v,"✓","\\checkmark");i(l,d,v,"ℶ","\\beth",!0);i(l,d,v,"ℸ","\\daleth",!0);i(l,d,v,"ℷ","\\gimel",!0);i(l,d,v,"ϝ","\\digamma",!0);i(l,d,v,"ϰ","\\varkappa");i(l,d,u0,"┌","\\@ulcorner",!0);i(l,d,i0,"┐","\\@urcorner",!0);i(l,d,u0,"└","\\@llcorner",!0);i(l,d,i0,"┘","\\@lrcorner",!0);i(l,d,f,"≦","\\leqq",!0);i(l,d,f,"⩽","\\leqslant",!0);i(l,d,f,"⪕","\\eqslantless",!0);i(l,d,f,"≲","\\lesssim",!0);i(l,d,f,"⪅","\\lessapprox",!0);i(l,d,f,"≊","\\approxeq",!0);i(l,d,N,"⋖","\\lessdot");i(l,d,f,"⋘","\\lll",!0);i(l,d,f,"≶","\\lessgtr",!0);i(l,d,f,"⋚","\\lesseqgtr",!0);i(l,d,f,"⪋","\\lesseqqgtr",!0);i(l,d,f,"≑","\\doteqdot");i(l,d,f,"≓","\\risingdotseq",!0);i(l,d,f,"≒","\\fallingdotseq",!0);i(l,d,f,"∽","\\backsim",!0);i(l,d,f,"⋍","\\backsimeq",!0);i(l,d,f,"⫅","\\subseteqq",!0);i(l,d,f,"⋐","\\Subset",!0);i(l,d,f,"⊏","\\sqsubset",!0);i(l,d,f,"≼","\\preccurlyeq",!0);i(l,d,f,"⋞","\\curlyeqprec",!0);i(l,d,f,"≾","\\precsim",!0);i(l,d,f,"⪷","\\precapprox",!0);i(l,d,f,"⊲","\\vartriangleleft");i(l,d,f,"⊴","\\trianglelefteq");i(l,d,f,"⊨","\\vDash",!0);i(l,d,f,"⊪","\\Vvdash",!0);i(l,d,f,"⌣","\\smallsmile");i(l,d,f,"⌢","\\smallfrown");i(l,d,f,"≏","\\bumpeq",!0);i(l,d,f,"≎","\\Bumpeq",!0);i(l,d,f,"≧","\\geqq",!0);i(l,d,f,"⩾","\\geqslant",!0);i(l,d,f,"⪖","\\eqslantgtr",!0);i(l,d,f,"≳","\\gtrsim",!0);i(l,d,f,"⪆","\\gtrapprox",!0);i(l,d,N,"⋗","\\gtrdot");i(l,d,f,"⋙","\\ggg",!0);i(l,d,f,"≷","\\gtrless",!0);i(l,d,f,"⋛","\\gtreqless",!0);i(l,d,f,"⪌","\\gtreqqless",!0);i(l,d,f,"≖","\\eqcirc",!0);i(l,d,f,"≗","\\circeq",!0);i(l,d,f,"≜","\\triangleq",!0);i(l,d,f,"∼","\\thicksim");i(l,d,f,"≈","\\thickapprox");i(l,d,f,"⫆","\\supseteqq",!0);i(l,d,f,"⋑","\\Supset",!0);i(l,d,f,"⊐","\\sqsupset",!0);i(l,d,f,"≽","\\succcurlyeq",!0);i(l,d,f,"⋟","\\curlyeqsucc",!0);i(l,d,f,"≿","\\succsim",!0);i(l,d,f,"⪸","\\succapprox",!0);i(l,d,f,"⊳","\\vartriangleright");i(l,d,f,"⊵","\\trianglerighteq");i(l,d,f,"⊩","\\Vdash",!0);i(l,d,f,"∣","\\shortmid");i(l,d,f,"∥","\\shortparallel");i(l,d,f,"≬","\\between",!0);i(l,d,f,"⋔","\\pitchfork",!0);i(l,d,f,"∝","\\varpropto");i(l,d,f,"◀","\\blacktriangleleft");i(l,d,f,"∴","\\therefore",!0);i(l,d,f,"∍","\\backepsilon");i(l,d,f,"▶","\\blacktriangleright");i(l,d,f,"∵","\\because",!0);i(l,d,f,"⋘","\\llless");i(l,d,f,"⋙","\\gggtr");i(l,d,N,"⊲","\\lhd");i(l,d,N,"⊳","\\rhd");i(l,d,f,"≂","\\eqsim",!0);i(l,h,f,"⋈","\\Join");i(l,d,f,"≑","\\Doteq",!0);i(l,d,N,"∔","\\dotplus",!0);i(l,d,N,"∖","\\smallsetminus");i(l,d,N,"⋒","\\Cap",!0);i(l,d,N,"⋓","\\Cup",!0);i(l,d,N,"⩞","\\doublebarwedge",!0);i(l,d,N,"⊟","\\boxminus",!0);i(l,d,N,"⊞","\\boxplus",!0);i(l,d,N,"⋇","\\divideontimes",!0);i(l,d,N,"⋉","\\ltimes",!0);i(l,d,N,"⋊","\\rtimes",!0);i(l,d,N,"⋋","\\leftthreetimes",!0);i(l,d,N,"⋌","\\rightthreetimes",!0);i(l,d,N,"⋏","\\curlywedge",!0);i(l,d,N,"⋎","\\curlyvee",!0);i(l,d,N,"⊝","\\circleddash",!0);i(l,d,N,"⊛","\\circledast",!0);i(l,d,N,"⋅","\\centerdot");i(l,d,N,"⊺","\\intercal",!0);i(l,d,N,"⋒","\\doublecap");i(l,d,N,"⋓","\\doublecup");i(l,d,N,"⊠","\\boxtimes",!0);i(l,d,f,"⇢","\\dashrightarrow",!0);i(l,d,f,"⇠","\\dashleftarrow",!0);i(l,d,f,"⇇","\\leftleftarrows",!0);i(l,d,f,"⇆","\\leftrightarrows",!0);i(l,d,f,"⇚","\\Lleftarrow",!0);i(l,d,f,"↞","\\twoheadleftarrow",!0);i(l,d,f,"↢","\\leftarrowtail",!0);i(l,d,f,"↫","\\looparrowleft",!0);i(l,d,f,"⇋","\\leftrightharpoons",!0);i(l,d,f,"↶","\\curvearrowleft",!0);i(l,d,f,"↺","\\circlearrowleft",!0);i(l,d,f,"↰","\\Lsh",!0);i(l,d,f,"⇈","\\upuparrows",!0);i(l,d,f,"↿","\\upharpoonleft",!0);i(l,d,f,"⇃","\\downharpoonleft",!0);i(l,h,f,"⊶","\\origof",!0);i(l,h,f,"⊷","\\imageof",!0);i(l,d,f,"⊸","\\multimap",!0);i(l,d,f,"↭","\\leftrightsquigarrow",!0);i(l,d,f,"⇉","\\rightrightarrows",!0);i(l,d,f,"⇄","\\rightleftarrows",!0);i(l,d,f,"↠","\\twoheadrightarrow",!0);i(l,d,f,"↣","\\rightarrowtail",!0);i(l,d,f,"↬","\\looparrowright",!0);i(l,d,f,"↷","\\curvearrowright",!0);i(l,d,f,"↻","\\circlearrowright",!0);i(l,d,f,"↱","\\Rsh",!0);i(l,d,f,"⇊","\\downdownarrows",!0);i(l,d,f,"↾","\\upharpoonright",!0);i(l,d,f,"⇂","\\downharpoonright",!0);i(l,d,f,"⇝","\\rightsquigarrow",!0);i(l,d,f,"⇝","\\leadsto");i(l,d,f,"⇛","\\Rrightarrow",!0);i(l,d,f,"↾","\\restriction");i(l,h,v,"‘","`");i(l,h,v,"$","\\$");i(k,h,v,"$","\\$");i(k,h,v,"$","\\textdollar");i(l,h,v,"%","\\%");i(k,h,v,"%","\\%");i(l,h,v,"_","\\_");i(k,h,v,"_","\\_");i(k,h,v,"_","\\textunderscore");i(l,h,v,"∠","\\angle",!0);i(l,h,v,"∞","\\infty",!0);i(l,h,v,"′","\\prime");i(l,h,v,"△","\\triangle");i(l,h,v,"Γ","\\Gamma",!0);i(l,h,v,"Δ","\\Delta",!0);i(l,h,v,"Θ","\\Theta",!0);i(l,h,v,"Λ","\\Lambda",!0);i(l,h,v,"Ξ","\\Xi",!0);i(l,h,v,"Π","\\Pi",!0);i(l,h,v,"Σ","\\Sigma",!0);i(l,h,v,"Υ","\\Upsilon",!0);i(l,h,v,"Φ","\\Phi",!0);i(l,h,v,"Ψ","\\Psi",!0);i(l,h,v,"Ω","\\Omega",!0);i(l,h,v,"A","Α");i(l,h,v,"B","Β");i(l,h,v,"E","Ε");i(l,h,v,"Z","Ζ");i(l,h,v,"H","Η");i(l,h,v,"I","Ι");i(l,h,v,"K","Κ");i(l,h,v,"M","Μ");i(l,h,v,"N","Ν");i(l,h,v,"O","Ο");i(l,h,v,"P","Ρ");i(l,h,v,"T","Τ");i(l,h,v,"X","Χ");i(l,h,v,"¬","\\neg",!0);i(l,h,v,"¬","\\lnot");i(l,h,v,"⊤","\\top");i(l,h,v,"⊥","\\bot");i(l,h,v,"∅","\\emptyset");i(l,d,v,"∅","\\varnothing");i(l,h,I,"α","\\alpha",!0);i(l,h,I,"β","\\beta",!0);i(l,h,I,"γ","\\gamma",!0);i(l,h,I,"δ","\\delta",!0);i(l,h,I,"ϵ","\\epsilon",!0);i(l,h,I,"ζ","\\zeta",!0);i(l,h,I,"η","\\eta",!0);i(l,h,I,"θ","\\theta",!0);i(l,h,I,"ι","\\iota",!0);i(l,h,I,"κ","\\kappa",!0);i(l,h,I,"λ","\\lambda",!0);i(l,h,I,"μ","\\mu",!0);i(l,h,I,"ν","\\nu",!0);i(l,h,I,"ξ","\\xi",!0);i(l,h,I,"ο","\\omicron",!0);i(l,h,I,"π","\\pi",!0);i(l,h,I,"ρ","\\rho",!0);i(l,h,I,"σ","\\sigma",!0);i(l,h,I,"τ","\\tau",!0);i(l,h,I,"υ","\\upsilon",!0);i(l,h,I,"ϕ","\\phi",!0);i(l,h,I,"χ","\\chi",!0);i(l,h,I,"ψ","\\psi",!0);i(l,h,I,"ω","\\omega",!0);i(l,h,I,"ε","\\varepsilon",!0);i(l,h,I,"ϑ","\\vartheta",!0);i(l,h,I,"ϖ","\\varpi",!0);i(l,h,I,"ϱ","\\varrho",!0);i(l,h,I,"ς","\\varsigma",!0);i(l,h,I,"φ","\\varphi",!0);i(l,h,N,"∗","*",!0);i(l,h,N,"+","+");i(l,h,N,"−","-",!0);i(l,h,N,"⋅","\\cdot",!0);i(l,h,N,"∘","\\circ",!0);i(l,h,N,"÷","\\div",!0);i(l,h,N,"±","\\pm",!0);i(l,h,N,"×","\\times",!0);i(l,h,N,"∩","\\cap",!0);i(l,h,N,"∪","\\cup",!0);i(l,h,N,"∖","\\setminus",!0);i(l,h,N,"∧","\\land");i(l,h,N,"∨","\\lor");i(l,h,N,"∧","\\wedge",!0);i(l,h,N,"∨","\\vee",!0);i(l,h,v,"√","\\surd");i(l,h,u0,"⟨","\\langle",!0);i(l,h,u0,"∣","\\lvert");i(l,h,u0,"∥","\\lVert");i(l,h,i0,"?","?");i(l,h,i0,"!","!");i(l,h,i0,"⟩","\\rangle",!0);i(l,h,i0,"∣","\\rvert");i(l,h,i0,"∥","\\rVert");i(l,h,f,"=","=");i(l,h,f,":",":");i(l,h,f,"≈","\\approx",!0);i(l,h,f,"≅","\\cong",!0);i(l,h,f,"≥","\\ge");i(l,h,f,"≥","\\geq",!0);i(l,h,f,"←","\\gets");i(l,h,f,">","\\gt",!0);i(l,h,f,"∈","\\in",!0);i(l,h,f,"","\\@not");i(l,h,f,"⊂","\\subset",!0);i(l,h,f,"⊃","\\supset",!0);i(l,h,f,"⊆","\\subseteq",!0);i(l,h,f,"⊇","\\supseteq",!0);i(l,d,f,"⊈","\\nsubseteq",!0);i(l,d,f,"⊉","\\nsupseteq",!0);i(l,h,f,"⊨","\\models");i(l,h,f,"←","\\leftarrow",!0);i(l,h,f,"≤","\\le");i(l,h,f,"≤","\\leq",!0);i(l,h,f,"<","\\lt",!0);i(l,h,f,"→","\\rightarrow",!0);i(l,h,f,"→","\\to");i(l,d,f,"≱","\\ngeq",!0);i(l,d,f,"≰","\\nleq",!0);i(l,h,I0," ","\\ ");i(l,h,I0," ","\\space");i(l,h,I0," ","\\nobreakspace");i(k,h,I0," ","\\ ");i(k,h,I0," "," ");i(k,h,I0," ","\\space");i(k,h,I0," ","\\nobreakspace");i(l,h,I0,null,"\\nobreak");i(l,h,I0,null,"\\allowbreak");i(l,h,Re,",",",");i(l,h,Re,";",";");i(l,d,N,"⊼","\\barwedge",!0);i(l,d,N,"⊻","\\veebar",!0);i(l,h,N,"⊙","\\odot",!0);i(l,h,N,"⊕","\\oplus",!0);i(l,h,N,"⊗","\\otimes",!0);i(l,h,v,"∂","\\partial",!0);i(l,h,N,"⊘","\\oslash",!0);i(l,d,N,"⊚","\\circledcirc",!0);i(l,d,N,"⊡","\\boxdot",!0);i(l,h,N,"△","\\bigtriangleup");i(l,h,N,"▽","\\bigtriangledown");i(l,h,N,"†","\\dagger");i(l,h,N,"⋄","\\diamond");i(l,h,N,"⋆","\\star");i(l,h,N,"◃","\\triangleleft");i(l,h,N,"▹","\\triangleright");i(l,h,u0,"{","\\{");i(k,h,v,"{","\\{");i(k,h,v,"{","\\textbraceleft");i(l,h,i0,"}","\\}");i(k,h,v,"}","\\}");i(k,h,v,"}","\\textbraceright");i(l,h,u0,"{","\\lbrace");i(l,h,i0,"}","\\rbrace");i(l,h,u0,"[","\\lbrack",!0);i(k,h,v,"[","\\lbrack",!0);i(l,h,i0,"]","\\rbrack",!0);i(k,h,v,"]","\\rbrack",!0);i(l,h,u0,"(","\\lparen",!0);i(l,h,i0,")","\\rparen",!0);i(k,h,v,"<","\\textless",!0);i(k,h,v,">","\\textgreater",!0);i(l,h,u0,"⌊","\\lfloor",!0);i(l,h,i0,"⌋","\\rfloor",!0);i(l,h,u0,"⌈","\\lceil",!0);i(l,h,i0,"⌉","\\rceil",!0);i(l,h,v,"\\","\\backslash");i(l,h,v,"∣","|");i(l,h,v,"∣","\\vert");i(k,h,v,"|","\\textbar",!0);i(l,h,v,"∥","\\|");i(l,h,v,"∥","\\Vert");i(k,h,v,"∥","\\textbardbl");i(k,h,v,"~","\\textasciitilde");i(k,h,v,"\\","\\textbackslash");i(k,h,v,"^","\\textasciicircum");i(l,h,f,"↑","\\uparrow",!0);i(l,h,f,"⇑","\\Uparrow",!0);i(l,h,f,"↓","\\downarrow",!0);i(l,h,f,"⇓","\\Downarrow",!0);i(l,h,f,"↕","\\updownarrow",!0);i(l,h,f,"⇕","\\Updownarrow",!0);i(l,h,_,"∐","\\coprod");i(l,h,_,"⋁","\\bigvee");i(l,h,_,"⋀","\\bigwedge");i(l,h,_,"⨄","\\biguplus");i(l,h,_,"⋂","\\bigcap");i(l,h,_,"⋃","\\bigcup");i(l,h,_,"∫","\\int");i(l,h,_,"∫","\\intop");i(l,h,_,"∬","\\iint");i(l,h,_,"∭","\\iiint");i(l,h,_,"∏","\\prod");i(l,h,_,"∑","\\sum");i(l,h,_,"⨂","\\bigotimes");i(l,h,_,"⨁","\\bigoplus");i(l,h,_,"⨀","\\bigodot");i(l,h,_,"∮","\\oint");i(l,h,_,"∯","\\oiint");i(l,h,_,"∰","\\oiiint");i(l,h,_,"⨆","\\bigsqcup");i(l,h,_,"∫","\\smallint");i(k,h,re,"…","\\textellipsis");i(l,h,re,"…","\\mathellipsis");i(k,h,re,"…","\\ldots",!0);i(l,h,re,"…","\\ldots",!0);i(l,h,re,"⋯","\\@cdots",!0);i(l,h,re,"⋱","\\ddots",!0);i(l,h,v,"⋮","\\varvdots");i(k,h,v,"⋮","\\varvdots");i(l,h,W,"ˊ","\\acute");i(l,h,W,"ˋ","\\grave");i(l,h,W,"¨","\\ddot");i(l,h,W,"~","\\tilde");i(l,h,W,"ˉ","\\bar");i(l,h,W,"˘","\\breve");i(l,h,W,"ˇ","\\check");i(l,h,W,"^","\\hat");i(l,h,W,"⃗","\\vec");i(l,h,W,"˙","\\dot");i(l,h,W,"˚","\\mathring");i(l,h,I,"","\\@imath");i(l,h,I,"","\\@jmath");i(l,h,v,"ı","ı");i(l,h,v,"ȷ","ȷ");i(k,h,v,"ı","\\i",!0);i(k,h,v,"ȷ","\\j",!0);i(k,h,v,"ß","\\ss",!0);i(k,h,v,"æ","\\ae",!0);i(k,h,v,"œ","\\oe",!0);i(k,h,v,"ø","\\o",!0);i(k,h,v,"Æ","\\AE",!0);i(k,h,v,"Œ","\\OE",!0);i(k,h,v,"Ø","\\O",!0);i(k,h,W,"ˊ","\\'");i(k,h,W,"ˋ","\\`");i(k,h,W,"ˆ","\\^");i(k,h,W,"˜","\\~");i(k,h,W,"ˉ","\\=");i(k,h,W,"˘","\\u");i(k,h,W,"˙","\\.");i(k,h,W,"¸","\\c");i(k,h,W,"˚","\\r");i(k,h,W,"ˇ","\\v");i(k,h,W,"¨",'\\"');i(k,h,W,"˝","\\H");i(k,h,W,"◯","\\textcircled");var kr={"--":!0,"---":!0,"``":!0,"''":!0};i(k,h,v,"–","--",!0);i(k,h,v,"–","\\textendash");i(k,h,v,"—","---",!0);i(k,h,v,"—","\\textemdash");i(k,h,v,"‘","`",!0);i(k,h,v,"‘","\\textquoteleft");i(k,h,v,"’","'",!0);i(k,h,v,"’","\\textquoteright");i(k,h,v,"“","``",!0);i(k,h,v,"“","\\textquotedblleft");i(k,h,v,"”","''",!0);i(k,h,v,"”","\\textquotedblright");i(l,h,v,"°","\\degree",!0);i(k,h,v,"°","\\degree");i(k,h,v,"°","\\textdegree",!0);i(l,h,v,"£","\\pounds");i(l,h,v,"£","\\mathsterling",!0);i(k,h,v,"£","\\pounds");i(k,h,v,"£","\\textsterling",!0);i(l,d,v,"✠","\\maltese");i(k,d,v,"✠","\\maltese");var Gt='0123456789/@."';for(var Ye=0;Ye0)return b0(s,p,n,t,o.concat(g));if(c){var y,w;if(c==="boldsymbol"){var x=e1(s,n,t,o,a);y=x.fontName,w=[x.fontClass]}else m?(y=zr[c].fontName,w=[c]):(y=xe(c,t.fontWeight,t.fontShape),w=[c,t.fontWeight,t.fontShape]);if(Ie(s,y,n).metrics)return b0(s,y,n,t,o.concat(w));if(kr.hasOwnProperty(s)&&y.slice(0,10)==="Typewriter"){for(var z=[],A=0;A{if(P0(r.classes)!==P0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},a1=r=>{for(var e=0;et&&(t=o.height),o.depth>a&&(a=o.depth),o.maxFontSize>n&&(n=o.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},l0=function(e,t,a,n){var s=new me(e,t,a,n);return gt(s),s},Sr=(r,e,t,a)=>new me(r,e,t,a),n1=function(e,t,a){var n=l0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=T(n.height),n.maxFontSize=1,n},i1=function(e,t,a,n){var s=new vt(e,t,a,n);return gt(s),s},Mr=function(e){var t=new he(e);return gt(t),t},s1=function(e,t){return e instanceof he?l0([],[e],t):e},l1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,o=1;o{var t=l0(["mspace"],[],e),a=K(r,e);return t.style.marginRight=T(a),t},xe=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},zr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Tr={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},m1=function(e,t){var[a,n,s]=Tr[e],o=new G0(a),m=new C0([o],{width:T(n),height:T(s),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=Sr(["overlay"],[m],t);return c.height=s,c.style.height=T(s),c.style.width=T(n),c},b={fontMap:zr,makeSymbol:b0,mathsym:_a,makeSpan:l0,makeSvgSpan:Sr,makeLineSpan:n1,makeAnchor:i1,makeFragment:Mr,wrapFragment:s1,makeVList:o1,makeOrd:t1,makeGlue:h1,staticSvg:m1,svgData:Tr,tryCombineChars:a1},Z={number:3,unit:"mu"},$0={number:4,unit:"mu"},T0={number:5,unit:"mu"},u1={mord:{mop:Z,mbin:$0,mrel:T0,minner:Z},mop:{mord:Z,mop:Z,mrel:T0,minner:Z},mbin:{mord:$0,mop:$0,mopen:$0,minner:$0},mrel:{mord:T0,mop:T0,mopen:T0,minner:T0},mopen:{},mclose:{mop:Z,mbin:$0,mrel:T0,minner:Z},mpunct:{mord:Z,mop:Z,mrel:T0,mopen:Z,mclose:Z,mpunct:Z,minner:Z},minner:{mord:Z,mop:Z,mbin:$0,mrel:T0,mopen:Z,mpunct:Z,minner:Z}},c1={mord:{mop:Z},mop:{mord:Z,mop:Z},mbin:{},mrel:{},mopen:{},mclose:{mop:Z},mpunct:{},minner:{mop:Z}},Ar={},Ne={},Ce={};function B(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,m={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var C=A.classes[0],q=z.classes[0];C==="mbin"&&R.contains(f1,q)?A.classes[0]="mord":q==="mbin"&&R.contains(d1,C)&&(z.classes[0]="mord")},{node:y},w,x),$t(s,(z,A)=>{var C=ot(A),q=ot(z),O=C&&q?z.hasClass("mtight")?c1[C][q]:u1[C][q]:null;if(O)return b.makeGlue(O,p)},{node:y},w,x),s},$t=function r(e,t,a,n,s){n&&e.push(n);for(var o=0;ow=>{e.splice(y+1,0,w),o++})(o)}n&&e.pop()},Br=function(e){return e instanceof he||e instanceof vt||e instanceof me&&e.hasClass("enclosing")?e:null},g1=function r(e,t){var a=Br(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},ot=function(e,t){return e?(t&&(e=g1(e,t)),v1[e.classes[0]]||null):null},oe=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return q0(t.concat(a))},P=function(e,t,a){if(!e)return q0();if(Ne[e.type]){var n=Ne[e.type](e,t);if(a&&t.size!==a.size){n=q0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new M("Got group of unknown type: '"+e.type+"'")};function we(r,e){var t=q0(["base"],r,e),a=q0(["strut"]);return a.style.height=T(t.height+t.depth),t.depth&&(a.style.verticalAlign=T(-t.depth)),t.children.unshift(a),t}function ht(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=t0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],o=[],m=0;m0&&(s.push(we(o,e)),o=[]),s.push(a[m]));o.length>0&&s.push(we(o,e));var p;t?(p=we(t0(t,e,!0)),p.classes=["tag"],s.push(p)):n&&s.push(n);var g=q0(["katex-html"],s);if(g.setAttribute("aria-hidden","true"),p){var y=p.children[0];y.style.height=T(g.height+g.depth),g.depth&&(y.style.verticalAlign=T(-g.depth))}return g}function Nr(r){return new he(r)}class m0{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=P0(this.classes));for(var a=0;a0&&(e+=' class ="'+R.escape(P0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class w0{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return R.escape(this.toText())}toText(){return this.text}}class b1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",T(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var S={MathNode:m0,TextNode:w0,SpaceNode:b1,newDocumentFragment:Nr},v0=function(e,t,a){return $[t][e]&&$[t][e].replace&&e.charCodeAt(0)!==55349&&!(kr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=$[t][e].replace),new S.TextNode(e)},bt=function(e){return e.length===1?e[0]:new S.MathNode("mrow",e)},yt=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(R.contains(["\\imath","\\jmath"],s))return null;$[n][s]&&$[n][s].replace&&(s=$[n][s].replace);var o=b.fontMap[a].fontName;return pt(s,o,n)?b.fontMap[a].variant:null};function je(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof w0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof w0&&t.text===","}else return!1}var o0=function(e,t,a){if(e.length===1){var n=X(e[0],t);return a&&n instanceof m0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],o,m=0;m=1&&(o.type==="mn"||je(o))){var p=c.children[0];p instanceof m0&&p.type==="mn"&&(p.children=[...o.children,...p.children],s.pop())}else if(o.type==="mi"&&o.children.length===1){var g=o.children[0];if(g instanceof w0&&g.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var y=c.children[0];y instanceof w0&&y.text.length>0&&(y.text=y.text.slice(0,1)+"̸"+y.text.slice(1),s.pop())}}}s.push(c),o=c}return s},V0=function(e,t,a){return bt(o0(e,t,a))},X=function(e,t){if(!e)return new S.MathNode("mrow");if(Ce[e.type]){var a=Ce[e.type](e,t);return a}else throw new M("Got group of unknown type: '"+e.type+"'")};function Wt(r,e,t,a,n){var s=o0(r,t),o;s.length===1&&s[0]instanceof m0&&R.contains(["mrow","mtable"],s[0].type)?o=s[0]:o=new S.MathNode("mrow",s);var m=new S.MathNode("annotation",[new S.TextNode(e)]);m.setAttribute("encoding","application/x-tex");var c=new S.MathNode("semantics",[o,m]),p=new S.MathNode("math",[c]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&p.setAttribute("display","block");var g=n?"katex":"katex-mathml";return b.makeSpan([g],[p])}var Cr=function(e){return new A0({style:e.displayMode?D.DISPLAY:D.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},qr=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=b.makeSpan(a,[e])}return e},y1=function(e,t,a){var n=Cr(a),s;if(a.output==="mathml")return Wt(e,t,n,a.displayMode,!0);if(a.output==="html"){var o=ht(e,n);s=b.makeSpan(["katex"],[o])}else{var m=Wt(e,t,n,a.displayMode,!1),c=ht(e,n);s=b.makeSpan(["katex"],[m,c])}return qr(s,a)},x1=function(e,t,a){var n=Cr(a),s=ht(e,n),o=b.makeSpan(["katex"],[s]);return qr(o,a)},w1={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},k1=function(e){var t=new S.MathNode("mo",[new S.TextNode(w1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},S1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},M1=function(e){return e.type==="ordgroup"?e.body.length:1},z1=function(e,t){function a(){var m=4e5,c=e.label.slice(1);if(R.contains(["widehat","widecheck","widetilde","utilde"],c)){var p=e,g=M1(p.base),y,w,x;if(g>5)c==="widehat"||c==="widecheck"?(y=420,m=2364,x=.42,w=c+"4"):(y=312,m=2340,x=.34,w="tilde4");else{var z=[1,1,2,2,3,3][g];c==="widehat"||c==="widecheck"?(m=[0,1062,2364,2364,2364][z],y=[0,239,300,360,420][z],x=[0,.24,.3,.3,.36,.42][z],w=c+z):(m=[0,600,1033,2339,2340][z],y=[0,260,286,306,312][z],x=[0,.26,.286,.3,.306,.34][z],w="tilde"+z)}var A=new G0(w),C=new C0([A],{width:"100%",height:T(x),viewBox:"0 0 "+m+" "+y,preserveAspectRatio:"none"});return{span:b.makeSvgSpan([],[C],t),minWidth:0,height:x}}else{var q=[],O=S1[c],[H,V,F]=O,U=F/1e3,G=H.length,j,Y;if(G===1){var z0=O[3];j=["hide-tail"],Y=[z0]}else if(G===2)j=["halfarrow-left","halfarrow-right"],Y=["xMinYMin","xMaxYMin"];else if(G===3)j=["brace-left","brace-center","brace-right"],Y=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support `+G+" children.");for(var r0=0;r00&&(n.style.minWidth=T(s)),n},T1=function(e,t,a,n,s){var o,m=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(o=b.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(o.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(t)&&p.push(new st({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&p.push(new st({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new C0(p,{width:"100%",height:T(m)});o=b.makeSvgSpan([],[g],s)}return o.height=m,o.style.height=T(m),o},R0={encloseSpan:T1,mathMLnode:k1,svgSpan:z1};function L(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function xt(r){var e=De(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function De(r){return r&&(r.type==="atom"||Ja.hasOwnProperty(r.type))?r:null}var wt=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=L(r.base,"accent"),t=a.base,r.base=t,n=Za(P(r,e)),r.base=a):(a=L(r,"accent"),t=a.base);var s=P(t,e.havingCrampedStyle()),o=a.isShifty&&R.isCharacterBox(t),m=0;if(o){var c=R.getBaseElem(t),p=P(c,e.havingCrampedStyle());m=Pt(p).skew}var g=a.label==="\\c",y=g?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),w;if(a.isStretchy)w=R0.svgSpan(a,e),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:w,wrapperClasses:["svg-align"],wrapperStyle:m>0?{width:"calc(100% - "+T(2*m)+")",marginLeft:T(2*m)}:void 0}]},e);else{var x,z;a.label==="\\vec"?(x=b.staticSvg("vec",e),z=b.svgData.vec[1]):(x=b.makeOrd({mode:a.mode,text:a.label},e,"textord"),x=Pt(x),x.italic=0,z=x.width,g&&(y+=x.depth)),w=b.makeSpan(["accent-body"],[x]);var A=a.label==="\\textcircled";A&&(w.classes.push("accent-full"),y=s.height);var C=m;A||(C-=z/2),w.style.left=T(C),a.label==="\\textcircled"&&(w.style.top=".2em"),w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-y},{type:"elem",elem:w}]},e)}var q=b.makeSpan(["mord","accent"],[w],e);return n?(n.children[0]=q,n.height=Math.max(q.height,n.height),n.classes[0]="mord",n):q},Rr=(r,e)=>{var t=r.isStretchy?R0.mathMLnode(r.label):new S.MathNode("mo",[v0(r.label,r.mode)]),a=new S.MathNode("mover",[X(r.base,e),t]);return a.setAttribute("accent","true"),a},A1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=qe(e[0]),a=!A1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:wt,mathmlBuilder:Rr});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:wt,mathmlBuilder:Rr});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=P(r.base,e),a=R0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=R0.mathMLnode(r.label),a=new S.MathNode("munder",[X(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var ke=r=>{var e=new S.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=b.wrapFragment(P(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var o;r.below&&(a=e.havingStyle(t.sub()),o=b.wrapFragment(P(r.below,a,e),e),o.classes.push(s+"-arrow-pad"));var m=R0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*m.height,p=-e.fontMetrics().axisHeight-.5*m.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(p-=n.depth);var g;if(o){var y=-e.fontMetrics().axisHeight+o.height+.5*m.height+.111;g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:m,shift:c},{type:"elem",elem:o,shift:y}]},e)}else g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:m,shift:c}]},e);return g.children[0].children[0].children[1].classes.push("svg-align"),b.makeSpan(["mrel","x-arrow"],[g],e)},mathmlBuilder(r,e){var t=R0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=ke(X(r.body,e));if(r.below){var s=ke(X(r.below,e));a=new S.MathNode("munderover",[t,s,n])}else a=new S.MathNode("mover",[t,n])}else if(r.below){var o=ke(X(r.below,e));a=new S.MathNode("munder",[t,o])}else a=ke(),a=new S.MathNode("mover",[t,a]);return a}});var B1=b.makeSpan;function Ir(r,e){var t=t0(r.body,e,!0);return B1([r.mclass],t,e)}function Dr(r,e){var t,a=o0(r.body,e);return r.mclass==="minner"?t=new S.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new S.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new S.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:Q(n),isCharacterBox:R.isCharacterBox(n)}},htmlBuilder:Ir,mathmlBuilder:Dr});var Ee=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Ee(e[0]),body:Q(e[1]),isCharacterBox:R.isCharacterBox(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],o;a!=="\\stackrel"?o=Ee(n):o="mrel";var m={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Q(n)},c={type:"supsub",mode:s.mode,base:m,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:o,body:[c],isCharacterBox:R.isCharacterBox(c)}},htmlBuilder:Ir,mathmlBuilder:Dr});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Ee(e[0]),body:Q(e[0])}},htmlBuilder(r,e){var t=t0(r.body,e,!0),a=b.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=o0(r.body,e),a=new S.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var N1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jt=()=>({type:"styling",body:[],mode:"math",style:"display"}),Zt=r=>r.type==="textord"&&r.text==="@",C1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function q1(r,e,t){var a=N1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},o=t.callFunction("\\Big",[s],[]),m=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,o,m]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function R1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new M("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(p)>-1)for(var y=0;y<2;y++){for(var w=!0,x=c+1;xAV=|." after @',o[c]);var z=q1(p,g,r),A={type:"styling",body:[z],mode:"math",style:"display"};a.push(A),m=jt()}s%2===0?a.push(m):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var C=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:C,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=b.wrapFragment(P(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=T(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new S.MathNode("mrow",[X(r.label,e)]);return t=new S.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new S.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=b.wrapFragment(P(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new S.MathNode("mrow",[X(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=L(e[0],"ordgroup"),n=a.body,s="",o=0;o=1114111)throw new M("\\@char with invalid code point "+s);return c<=65535?p=String.fromCharCode(c):(c-=65536,p=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:p}}});var Er=(r,e)=>{var t=t0(r.body,e.withColor(r.color),!1);return b.makeFragment(t)},Or=(r,e)=>{var t=o0(r.body,e.withColor(r.color)),a=new S.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=L(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:Q(n)}},htmlBuilder:Er,mathmlBuilder:Or});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=L(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Er,mathmlBuilder:Or});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&L(n,"size").value}},htmlBuilder(r,e){var t=b.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=T(K(r.size,e)))),t},mathmlBuilder(r,e){var t=new S.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",T(K(r.size,e)))),t}});var mt={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Hr=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new M("Expected a control sequence",r);return e},I1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Lr=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(mt[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=mt[a.text]),L(e.parseFunction(),"internal");throw new M("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new M("Expected a control sequence",a);for(var s=0,o,m=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){o=e.gullet.future(),m[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new M('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new M('Argument number "'+a.text+'" out of order');s++,m.push([])}else{if(a.text==="EOF")throw new M("Expected a macro definition");m[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return o&&c.unshift(o),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:m},t===mt[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Hr(e.gullet.popToken());e.gullet.consumeSpaces();var n=I1(e);return Lr(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Hr(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Lr(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var ie=function(e,t,a){var n=$.math[e]&&$.math[e].replace,s=pt(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},kt=function(e,t,a,n){var s=a.havingBaseStyle(t),o=b.makeSpan(n.concat(s.sizingClasses(a)),[e],a),m=s.sizeMultiplier/a.sizeMultiplier;return o.height*=m,o.depth*=m,o.maxFontSize=s.sizeMultiplier,o},Fr=function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=T(s),e.height-=s,e.depth+=s},D1=function(e,t,a,n,s,o){var m=b.makeSymbol(e,"Main-Regular",s,n),c=kt(m,t,n,o);return a&&Fr(c,n,t),c},E1=function(e,t,a,n){return b.makeSymbol(e,"Size"+t+"-Regular",a,n)},Pr=function(e,t,a,n,s,o){var m=E1(e,t,s,n),c=kt(b.makeSpan(["delimsizing","size"+t],[m],n),D.TEXT,n,o);return a&&Fr(c,n,D.TEXT),c},Ze=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=b.makeSpan(["delimsizinginner",n],[b.makeSpan([],[b.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},Ke=function(e,t,a){var n=x0["Size4-Regular"][e.charCodeAt(0)]?x0["Size4-Regular"][e.charCodeAt(0)][4]:x0["Size1-Regular"][e.charCodeAt(0)][4],s=new G0("inner",Pa(e,Math.round(1e3*t))),o=new C0([s],{width:T(n),height:T(t),style:"width:"+T(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),m=b.makeSvgSpan([],[o],a);return m.height=t,m.style.height=T(t),m.style.width=T(n),{type:"elem",elem:m}},ut=.008,Se={type:"kern",size:-1*ut},O1=["|","\\lvert","\\rvert","\\vert"],H1=["\\|","\\lVert","\\rVert","\\Vert"],Gr=function(e,t,a,n,s,o){var m,c,p,g,y="",w=0;m=p=g=e,c=null;var x="Size1-Regular";e==="\\uparrow"?p=g="⏐":e==="\\Uparrow"?p=g="‖":e==="\\downarrow"?m=p="⏐":e==="\\Downarrow"?m=p="‖":e==="\\updownarrow"?(m="\\uparrow",p="⏐",g="\\downarrow"):e==="\\Updownarrow"?(m="\\Uparrow",p="‖",g="\\Downarrow"):R.contains(O1,e)?(p="∣",y="vert",w=333):R.contains(H1,e)?(p="∥",y="doublevert",w=556):e==="["||e==="\\lbrack"?(m="⎡",p="⎢",g="⎣",x="Size4-Regular",y="lbrack",w=667):e==="]"||e==="\\rbrack"?(m="⎤",p="⎥",g="⎦",x="Size4-Regular",y="rbrack",w=667):e==="\\lfloor"||e==="⌊"?(p=m="⎢",g="⎣",x="Size4-Regular",y="lfloor",w=667):e==="\\lceil"||e==="⌈"?(m="⎡",p=g="⎢",x="Size4-Regular",y="lceil",w=667):e==="\\rfloor"||e==="⌋"?(p=m="⎥",g="⎦",x="Size4-Regular",y="rfloor",w=667):e==="\\rceil"||e==="⌉"?(m="⎤",p=g="⎥",x="Size4-Regular",y="rceil",w=667):e==="("||e==="\\lparen"?(m="⎛",p="⎜",g="⎝",x="Size4-Regular",y="lparen",w=875):e===")"||e==="\\rparen"?(m="⎞",p="⎟",g="⎠",x="Size4-Regular",y="rparen",w=875):e==="\\{"||e==="\\lbrace"?(m="⎧",c="⎨",g="⎩",p="⎪",x="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(m="⎫",c="⎬",g="⎭",p="⎪",x="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(m="⎧",g="⎩",p="⎪",x="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(m="⎫",g="⎭",p="⎪",x="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(m="⎧",g="⎭",p="⎪",x="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(m="⎫",g="⎩",p="⎪",x="Size4-Regular");var z=ie(m,x,s),A=z.height+z.depth,C=ie(p,x,s),q=C.height+C.depth,O=ie(g,x,s),H=O.height+O.depth,V=0,F=1;if(c!==null){var U=ie(c,x,s);V=U.height+U.depth,F=2}var G=A+H+V,j=Math.max(0,Math.ceil((t-G)/(F*q))),Y=G+j*F*q,z0=n.fontMetrics().axisHeight;a&&(z0*=n.sizeMultiplier);var r0=Y/2-z0,e0=[];if(y.length>0){var Y0=Y-A-H,s0=Math.round(Y*1e3),g0=Ga(y,Math.round(Y0*1e3)),D0=new G0(y,g0),j0=(w/1e3).toFixed(3)+"em",Z0=(s0/1e3).toFixed(3)+"em",Fe=new C0([D0],{width:j0,height:Z0,viewBox:"0 0 "+w+" "+s0}),E0=b.makeSvgSpan([],[Fe],n);E0.height=s0/1e3,E0.style.width=j0,E0.style.height=Z0,e0.push({type:"elem",elem:E0})}else{if(e0.push(Ze(g,x,s)),e0.push(Se),c===null){var O0=Y-A-H+2*ut;e0.push(Ke(p,O0,n))}else{var c0=(Y-A-H-V)/2+2*ut;e0.push(Ke(p,c0,n)),e0.push(Se),e0.push(Ze(c,x,s)),e0.push(Se),e0.push(Ke(p,c0,n))}e0.push(Se),e0.push(Ze(m,x,s))}var ne=n.havingBaseStyle(D.TEXT),Pe=b.makeVList({positionType:"bottom",positionData:r0,children:e0},ne);return kt(b.makeSpan(["delimsizing","mult"],[Pe],ne),D.TEXT,n,o)},Je=80,Qe=.08,_e=function(e,t,a,n,s){var o=Fa(e,n,a),m=new G0(e,o),c=new C0([m],{width:"400em",height:T(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return b.makeSvgSpan(["hide-tail"],[c],s)},L1=function(e,t){var a=t.havingBaseSizing(),n=Xr("\\surd",e*a.sizeMultiplier,Yr,a),s=a.sizeMultiplier,o=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),m,c=0,p=0,g=0,y;return n.type==="small"?(g=1e3+1e3*o+Je,e<1?s=1:e<1.4&&(s=.7),c=(1+o+Qe)/s,p=(1+o)/s,m=_e("sqrtMain",c,g,o,t),m.style.minWidth="0.853em",y=.833/s):n.type==="large"?(g=(1e3+Je)*se[n.size],p=(se[n.size]+o)/s,c=(se[n.size]+o+Qe)/s,m=_e("sqrtSize"+n.size,c,g,o,t),m.style.minWidth="1.02em",y=1/s):(c=e+o+Qe,p=e+o,g=Math.floor(1e3*e+o)+Je,m=_e("sqrtTall",c,g,o,t),m.style.minWidth="0.742em",y=1.056),m.height=p,m.style.height=T(c),{span:m,advanceWidth:y,ruleWidth:(t.fontMetrics().sqrtRuleThickness+o)*s}},Vr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],F1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ur=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],se=[0,1.2,1.8,2.4,3],P1=function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),R.contains(Vr,e)||R.contains(Ur,e))return Pr(e,t,!1,a,n,s);if(R.contains(F1,e))return Gr(e,se[t],!1,a,n,s);throw new M("Illegal delimiter: '"+e+"'")},G1=[{type:"small",style:D.SCRIPTSCRIPT},{type:"small",style:D.SCRIPT},{type:"small",style:D.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],V1=[{type:"small",style:D.SCRIPTSCRIPT},{type:"small",style:D.SCRIPT},{type:"small",style:D.TEXT},{type:"stack"}],Yr=[{type:"small",style:D.SCRIPTSCRIPT},{type:"small",style:D.SCRIPT},{type:"small",style:D.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],U1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Xr=function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),o=s;ot)return a[o]}return a[a.length-1]},$r=function(e,t,a,n,s,o){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var m;R.contains(Ur,e)?m=G1:R.contains(Vr,e)?m=Yr:m=V1;var c=Xr(e,t,m,n);return c.type==="small"?D1(e,c.style,a,n,s,o):c.type==="large"?Pr(e,c.size,a,n,s,o):Gr(e,t,a,n,s,o)},Y1=function(e,t,a,n,s,o){var m=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,p=5/n.fontMetrics().ptPerEm,g=Math.max(t-m,a+m),y=Math.max(g/500*c,2*g-p);return $r(e,y,!0,n,s,o)},N0={sqrtImage:L1,sizedDelim:P1,sizeToMaxHeight:se,customSizedDelim:$r,leftRightDelim:Y1},Kt={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},X1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Oe(r,e){var t=De(r);if(t&&R.contains(X1,t.text))return t;throw t?new M("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new M("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=Oe(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Kt[r.funcName].size,mclass:Kt[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?b.makeSpan([r.mclass]):N0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(v0(r.delim,r.mode));var t=new S.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=T(N0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function Jt(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new M("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:Oe(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Oe(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=L(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{Jt(r);for(var t=t0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,o=0;o{Jt(r);var t=o0(r.body,e);if(r.left!=="."){var a=new S.MathNode("mo",[v0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new S.MathNode("mo",[v0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return bt(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Oe(e[0],r);if(!r.parser.leftrightDepth)throw new M("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=oe(e,[]);else{t=N0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?v0("|","text"):v0(r.delim,r.mode),a=new S.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var St=(r,e)=>{var t=b.wrapFragment(P(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,o=0,m=R.isCharacterBox(r.body);if(a==="sout")s=b.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,o=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=K({number:.6,unit:"pt"},e),p=K({number:.35,unit:"ex"},e),g=e.havingBaseSizing();n=n/g.sizeMultiplier;var y=t.height+t.depth+c+p;t.style.paddingLeft=T(y/2+c);var w=Math.floor(1e3*y*n),x=Ha(w),z=new C0([new G0("phase",x)],{width:"400em",height:T(w/1e3),viewBox:"0 0 400000 "+w,preserveAspectRatio:"xMinYMin slice"});s=b.makeSvgSpan(["hide-tail"],[z],e),s.style.height=T(y),o=t.depth+c+p}else{/cancel/.test(a)?m||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var A=0,C=0,q=0;/box/.test(a)?(q=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),A=e.fontMetrics().fboxsep+(a==="colorbox"?0:q),C=A):a==="angl"?(q=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),A=4*q,C=Math.max(0,.25-t.depth)):(A=m?.2:0,C=A),s=R0.encloseSpan(t,a,A,C,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=T(q)):a==="angl"&&q!==.049&&(s.style.borderTopWidth=T(q),s.style.borderRightWidth=T(q)),o=t.depth+C,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var O;if(r.backgroundColor)O=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:o},{type:"elem",elem:t,shift:0}]},e);else{var H=/cancel|phase/.test(a)?["svg-align"]:[];O=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:o,wrapperClasses:H}]},e)}return/cancel/.test(a)&&(O.height=t.height,O.depth=t.depth),/cancel/.test(a)&&!m?b.makeSpan(["mord","cancel-lap"],[O],e):b.makeSpan(["mord"],[O],e)},Mt=(r,e)=>{var t=0,a=new S.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[X(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=L(e[0],"color-token").color,o=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:o}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=L(e[0],"color-token").color,o=L(e[1],"color-token").color,m=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:s,body:m}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Wr={};function k0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:o}=r,m={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new M("{"+r.envName+"} can be used only in display mode.")};function zt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function U0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:o,colSeparationType:m,autoTag:c,singleRow:p,emptySingleRow:g,maxNumCols:y,leqno:w}=e;if(r.gullet.beginGroup(),p||r.gullet.macros.set("\\cr","\\\\\\relax"),!o){var x=r.gullet.expandMacroAsText("\\arraystretch");if(x==null)o=1;else if(o=parseFloat(x),!o||o<0)throw new M("Invalid \\arraystretch: "+x)}r.gullet.beginGroup();var z=[],A=[z],C=[],q=[],O=c!=null?[]:void 0;function H(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function V(){O&&(r.gullet.macros.get("\\df@tag")?(O.push(r.subparse([new f0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):O.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(H(),q.push(Qt(r));;){var F=r.parseExpression(!1,p?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),F={type:"ordgroup",mode:r.mode,body:F},t&&(F={type:"styling",mode:r.mode,style:t,body:[F]}),z.push(F);var U=r.fetch().text;if(U==="&"){if(y&&z.length===y){if(p||m)throw new M("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(U==="\\end"){V(),z.length===1&&F.type==="styling"&&F.body[0].body.length===0&&(A.length>1||!g)&&A.pop(),q.length0&&(H+=.25),p.push({pos:H,isDashed:fe[pe]})}for(V(o[0]),a=0;a0&&(r0+=O,Gfe))for(a=0;a=m)){var J0=void 0;(n>0||e.hskipBeforeAndAfter)&&(J0=R.deflt(c0.pregap,w),J0!==0&&(g0=b.makeSpan(["arraycolsep"],[]),g0.style.width=T(J0),s0.push(g0)));var Q0=[];for(a=0;a0){for(var ca=b.makeLineSpan("hline",t,g),da=b.makeLineSpan("hdashline",t,g),Ge=[{type:"elem",elem:c,shift:0}];p.length>0;){var Dt=p.pop(),Et=Dt.pos-e0;Dt.isDashed?Ge.push({type:"elem",elem:da,shift:Et}):Ge.push({type:"elem",elem:ca,shift:Et})}c=b.makeVList({positionType:"individualShift",children:Ge},t)}if(j0.length===0)return b.makeSpan(["mord"],[c],t);var Ve=b.makeVList({positionType:"individualShift",children:j0},t);return Ve=b.makeSpan(["tag"],[Ve],t),b.makeFragment([c,Ve])},$1={c:"center ",l:"left ",r:"right "},M0=function(e,t){for(var a=[],n=new S.MathNode("mtd",[],["mtr-glue"]),s=new S.MathNode("mtd",[],["mml-eqn-num"]),o=0;o0){var z=e.cols,A="",C=!1,q=0,O=z.length;z[0].type==="separator"&&(w+="top ",q=1),z[z.length-1].type==="separator"&&(w+="bottom ",O-=1);for(var H=q;H0?"left ":"",w+=j[j.length-1].length>0?"right ":"";for(var Y=1;Y-1?"alignat":"align",s=e.envName==="split",o=U0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:zt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),m,c=0,p={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var g="",y=0;y0&&x&&(C=1),a[z]={type:"align",align:A,pregap:C,postgap:0}}return o.colSeparationType=x?"align":"alignat",o};k0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=De(e[0]),a=t?[e[0]]:L(e[0],"ordgroup").body,n=a.map(function(o){var m=xt(o),c=m.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new M("Unknown column alignment: "+c,o)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return U0(r.parser,s,Tt(r.envName))},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new M("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=U0(r.parser,a,Tt(r.envName)),o=Math.max(0,...s.body.map(m=>m.length));return s.cols=new Array(o).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=U0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=De(e[0]),a=t?[e[0]]:L(e[0],"ordgroup").body,n=a.map(function(o){var m=xt(o),c=m.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new M("Unknown column alignment: "+c,o)});if(n.length>1)throw new M("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=U0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new M("{subarray} can contain only one column");return s},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=U0(r.parser,e,Tt(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Zr,htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){R.contains(["gather","gather*"],r.envName)&&He(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:zt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Zr,htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){He(r);var e={autoTag:zt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return He(r),R1(r.parser)},htmlBuilder:S0,mathmlBuilder:M0});u("\\nonumber","\\gdef\\@eqnsw{0}");u("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new M(r.funcName+" valid only within array environment")}});var _t=Wr;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new M("Invalid environment name",n);for(var s="",o=0;o{var t=r.font,a=e.withFont(t);return P(r.body,a)},Jr=(r,e)=>{var t=r.font,a=e.withFont(t);return X(r.body,a)},er={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=qe(e[0]),s=a;return s in er&&(s=er[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},htmlBuilder:Kr,mathmlBuilder:Jr});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=R.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Ee(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,o=t.parseExpression(!0,n),m="math"+a.slice(1);return{type:"font",mode:s,font:m,body:{type:"ordgroup",mode:t.mode,body:o}}},htmlBuilder:Kr,mathmlBuilder:Jr});var Qr=(r,e)=>{var t=e;return r==="display"?t=t.id>=D.SCRIPT.id?t.text():D.DISPLAY:r==="text"&&t.size===D.DISPLAY.size?t=D.TEXT:r==="script"?t=D.SCRIPT:r==="scriptscript"&&(t=D.SCRIPTSCRIPT),t},At=(r,e)=>{var t=Qr(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var o=P(r.numer,s,e);if(r.continued){var m=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;o.height=o.height0?z=3*w:z=7*w,A=e.fontMetrics().denom1):(y>0?(x=e.fontMetrics().num2,z=w):(x=e.fontMetrics().num3,z=3*w),A=e.fontMetrics().denom2);var C;if(g){var O=e.fontMetrics().axisHeight;x-o.depth-(O+.5*y){var t=new S.MathNode("mfrac",[X(r.numer,e),X(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=K(r.barSize,e);t.setAttribute("linethickness",T(a))}var n=Qr(r.size,e.style);if(n.size!==e.style.size){t=new S.MathNode("mstyle",[t]);var s=n.size===D.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var o=[];if(r.leftDelim!=null){var m=new S.MathNode("mo",[new S.TextNode(r.leftDelim.replace("\\",""))]);m.setAttribute("fence","true"),o.push(m)}if(o.push(t),r.rightDelim!=null){var c=new S.MathNode("mo",[new S.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),o.push(c)}return bt(o)}return t};B({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],o,m=null,c=null,p="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,m="(",c=")";break;case"\\\\bracefrac":o=!1,m="\\{",c="\\}";break;case"\\\\brackfrac":o=!1,m="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":p="display";break;case"\\tfrac":case"\\tbinom":p="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:o,leftDelim:m,rightDelim:c,size:p,barSize:null}},htmlBuilder:At,mathmlBuilder:Bt});B({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var tr=["display","text","script","scriptscript"],rr=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=qe(e[0]),o=s.type==="atom"&&s.family==="open"?rr(s.text):null,m=qe(e[1]),c=m.type==="atom"&&m.family==="close"?rr(m.text):null,p=L(e[2],"size"),g,y=null;p.isBlank?g=!0:(y=p.value,g=y.number>0);var w="auto",x=e[3];if(x.type==="ordgroup"){if(x.body.length>0){var z=L(x.body[0],"textord");w=tr[Number(z.text)]}}else x=L(x,"textord"),w=tr[Number(x.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:g,barSize:y,leftDelim:o,rightDelim:c,size:w}},htmlBuilder:At,mathmlBuilder:Bt});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:L(e[0],"size").value,token:n}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=ka(L(e[1],"infix").size),o=e[2],m=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:o,continued:!1,hasBarLine:m,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:At,mathmlBuilder:Bt});var _r=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?P(r.sup,e.havingStyle(t.sup()),e):P(r.sub,e.havingStyle(t.sub()),e),n=L(r.base,"horizBrace")):n=L(r,"horizBrace");var s=P(n.base,e.havingBaseStyle(D.DISPLAY)),o=R0.svgSpan(n,e),m;if(n.isOver?(m=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]},e),m.children[0].children[0].children[1].classes.push("svg-align")):(m=b.makeVList({positionType:"bottom",positionData:s.depth+.1+o.height,children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]},e),m.children[0].children[0].children[0].classes.push("svg-align")),a){var c=b.makeSpan(["mord",n.isOver?"mover":"munder"],[m],e);n.isOver?m=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):m=b.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return b.makeSpan(["mord",n.isOver?"mover":"munder"],[m],e)},W1=(r,e)=>{var t=R0.mathMLnode(r.label);return new S.MathNode(r.isOver?"mover":"munder",[X(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:_r,mathmlBuilder:W1});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=L(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:Q(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=t0(r.body,e,!1);return b.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=V0(r.body,e);return t instanceof m0||(t=new m0("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=L(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=L(e[0],"raw").string,o=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var m,c={};switch(a){case"\\htmlClass":c.class=s,m={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,m={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,m={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var p=s.split(","),g=0;g{var t=t0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=b.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},mathmlBuilder:(r,e)=>V0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:Q(e[0]),mathml:Q(e[1])}},htmlBuilder:(r,e)=>{var t=t0(r.html,e,!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>V0(r.mathml,e)});var et=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new M("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!br(a))throw new M("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},o={number:0,unit:"em"},m="";if(t[0])for(var c=L(t[0],"raw").string,p=c.split(","),g=0;g{var t=K(r.height,e),a=0;r.totalheight.number>0&&(a=K(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=K(r.width,e));var s={height:T(t+a)};n>0&&(s.width=T(n)),a>0&&(s.verticalAlign=T(-a));var o=new Wa(r.src,r.alt,s);return o.height=t,o.depth=a,o},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=K(r.height,e),n=0;if(r.totalheight.number>0&&(n=K(r.totalheight,e)-a,t.setAttribute("valign",T(-n))),t.setAttribute("height",T(a+n)),r.width.number>0){var s=K(r.width,e);t.setAttribute("width",T(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=L(e[0],"size");if(t.settings.strict){var s=a[1]==="m",o=n.value.unit==="mu";s?(o||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return b.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=K(r.dimension,e);return new S.SpaceNode(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=b.makeSpan([],[P(r.body,e)]),t=b.makeSpan(["inner"],[t],e)):t=b.makeSpan(["inner"],[P(r.body,e)]);var a=b.makeSpan(["fix"],[]),n=b.makeSpan([r.alignment],[t,a],e),s=b.makeSpan(["strut"]);return s.style.height=T(n.height+n.depth),n.depth&&(s.style.verticalAlign=T(-n.depth)),n.children.unshift(s),n=b.makeSpan(["thinbox"],[n],e),b.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mpadded",[X(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",o=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new M("Mismatched "+r.funcName)}});var ar=(r,e)=>{switch(e.style.size){case D.DISPLAY.size:return r.display;case D.TEXT.size:return r.text;case D.SCRIPT.size:return r.script;case D.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:Q(e[0]),text:Q(e[1]),script:Q(e[2]),scriptscript:Q(e[3])}},htmlBuilder:(r,e)=>{var t=ar(r,e),a=t0(t,e,!1);return b.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=ar(r,e);return V0(t,e)}});var ea=(r,e,t,a,n,s,o)=>{r=b.makeSpan([],[r]);var m=t&&R.isCharacterBox(t),c,p;if(e){var g=P(e,a.havingStyle(n.sup()),a);p={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(t){var y=P(t,a.havingStyle(n.sub()),a);c={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var w;if(p&&c){var x=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+o;w=b.makeVList({positionType:"bottom",positionData:x,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:T(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var z=r.height-o;w=b.makeVList({positionType:"top",positionData:z,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:T(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(p){var A=r.depth+o;w=b.makeVList({positionType:"bottom",positionData:A,children:[{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:T(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var C=[w];if(c&&s!==0&&!m){var q=b.makeSpan(["mspace"],[],a);q.style.marginRight=T(s),C.unshift(q)}return b.makeSpan(["mop","op-limits"],C,a)},ta=["\\smallint"],ae=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=L(r.base,"op"),n=!0):s=L(r,"op");var o=e.style,m=!1;o.size===D.DISPLAY.size&&s.symbol&&!R.contains(ta,s.name)&&(m=!0);var c;if(s.symbol){var p=m?"Size2-Regular":"Size1-Regular",g="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(g=s.name.slice(1),s.name=g==="oiint"?"\\iint":"\\iiint"),c=b.makeSymbol(s.name,p,"math",e,["mop","op-symbol",m?"large-op":"small-op"]),g.length>0){var y=c.italic,w=b.staticSvg(g+"Size"+(m?"2":"1"),e);c=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:w,shift:m?.08:0}]},e),s.name="\\"+g,c.classes.unshift("mop"),c.italic=y}}else if(s.body){var x=t0(s.body,e,!0);x.length===1&&x[0]instanceof p0?(c=x[0],c.classes[0]="mop"):c=b.makeSpan(["mop"],x,e)}else{for(var z=[],A=1;A{var t;if(r.symbol)t=new m0("mo",[v0(r.name,r.mode)]),R.contains(ta,r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new m0("mo",o0(r.body,e));else{t=new m0("mi",[new w0(r.name.slice(1))]);var a=new m0("mo",[v0("⁡","text")]);r.parentIsSupSub?t=new m0("mrow",[t,a]):t=Nr([t,a])}return t},j1={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=j1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ae,mathmlBuilder:ue});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Q(a)}},htmlBuilder:ae,mathmlBuilder:ue});var Z1={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ae,mathmlBuilder:ue});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ae,mathmlBuilder:ue});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=Z1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ae,mathmlBuilder:ue});var ra=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=L(r.base,"operatorname"),n=!0):s=L(r,"operatorname");var o;if(s.body.length>0){for(var m=s.body.map(y=>{var w=y.text;return typeof w=="string"?{type:"textord",mode:y.mode,text:w}:y}),c=t0(m,e.withFont("mathrm"),!0),p=0;p{for(var t=o0(r.body,e.withFont("mathrm")),a=!0,n=0;ng.toText()).join("");t=[new S.TextNode(m)]}var c=new S.MathNode("mi",t);c.setAttribute("mathvariant","normal");var p=new S.MathNode("mo",[v0("⁡","text")]);return r.parentIsSupSub?new S.MathNode("mrow",[c,p]):S.newDocumentFragment([c,p])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:Q(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ra,mathmlBuilder:K1});u("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");W0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?b.makeFragment(t0(r.body,e,!1)):b.makeSpan(["mord"],t0(r.body,e,!0),e)},mathmlBuilder(r,e){return V0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle()),a=b.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return b.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("mover",[X(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:Q(a)}},htmlBuilder:(r,e)=>{var t=t0(r.body,e.withPhantom(),!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=o0(r.body,e);return new S.MathNode("mphantom",t)}});B({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan([],[P(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan(["inner"],[P(r.body,e.withPhantom())]),a=b.makeSpan(["fix"],[]);return b.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=L(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=P(r.body,e),a=K(r.dy,e);return b.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new S.MathNode("mpadded",[X(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=L(e[0],"size"),o=L(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&L(n,"size").value,width:s.value,height:o.value}},htmlBuilder(r,e){var t=b.makeSpan(["mord","rule"],[],e),a=K(r.width,e),n=K(r.height,e),s=r.shift?K(r.shift,e):0;return t.style.borderRightWidth=T(a),t.style.borderTopWidth=T(n),t.style.bottom=T(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=K(r.width,e),a=K(r.height,e),n=r.shift?K(r.shift,e):0,s=e.color&&e.getColor()||"black",o=new S.MathNode("mspace");o.setAttribute("mathbackground",s),o.setAttribute("width",T(t)),o.setAttribute("height",T(a));var m=new S.MathNode("mpadded",[o]);return n>=0?m.setAttribute("height",T(n)):(m.setAttribute("height",T(n)),m.setAttribute("depth",T(-n))),m.setAttribute("voffset",T(n)),m}});function aa(r,e,t){for(var a=t0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return aa(r.body,t,e)};B({type:"sizing",names:nr,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:nr.indexOf(a)+1,body:s}},htmlBuilder:J1,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=o0(r.body,t),n=new S.MathNode("mstyle",a);return n.setAttribute("mathsize",T(t.sizeMultiplier)),n}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,s=!1,o=t[0]&&L(t[0],"ordgroup");if(o)for(var m="",c=0;c{var t=b.makeSpan([],[P(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new S.MathNode("mpadded",[X(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=P(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=b.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+o&&(o=(o+y-t.height-t.depth)/2);var w=c.height-t.height-o-p;t.style.paddingLeft=T(g);var x=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+w)},{type:"elem",elem:c},{type:"kern",size:p}]},e);if(r.index){var z=e.havingStyle(D.SCRIPTSCRIPT),A=P(r.index,z,e),C=.6*(x.height-x.depth),q=b.makeVList({positionType:"shift",positionData:-C,children:[{type:"elem",elem:A}]},e),O=b.makeSpan(["root"],[q]);return b.makeSpan(["mord","sqrt"],[O,x],e)}else return b.makeSpan(["mord","sqrt"],[x],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new S.MathNode("mroot",[X(t,e),X(a,e)]):new S.MathNode("msqrt",[X(t,e)])}});var ir={display:D.DISPLAY,text:D.TEXT,script:D.SCRIPT,scriptscript:D.SCRIPTSCRIPT};B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:s}},htmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t).withFont("");return aa(r.body,a,e)},mathmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t),n=o0(r.body,a),s=new S.MathNode("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},m=o[r.style];return s.setAttribute("scriptlevel",m[0]),s.setAttribute("displaystyle",m[1]),s}});var Q1=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===D.DISPLAY.size||a.alwaysHandleSupSub);return n?ae:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===D.DISPLAY.size||a.limits);return s?ra:null}else{if(a.type==="accent")return R.isCharacterBox(a.base)?wt:null;if(a.type==="horizBrace"){var o=!e.sub;return o===a.isOver?_r:null}else return null}else return null};W0({type:"supsub",htmlBuilder(r,e){var t=Q1(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,o=P(a,e),m,c,p=e.fontMetrics(),g=0,y=0,w=a&&R.isCharacterBox(a);if(n){var x=e.havingStyle(e.style.sup());m=P(n,x,e),w||(g=o.height-x.fontMetrics().supDrop*x.sizeMultiplier/e.sizeMultiplier)}if(s){var z=e.havingStyle(e.style.sub());c=P(s,z,e),w||(y=o.depth+z.fontMetrics().subDrop*z.sizeMultiplier/e.sizeMultiplier)}var A;e.style===D.DISPLAY?A=p.sup1:e.style.cramped?A=p.sup3:A=p.sup2;var C=e.sizeMultiplier,q=T(.5/p.ptPerEm/C),O=null;if(c){var H=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(o instanceof p0||H)&&(O=T(-o.italic))}var V;if(m&&c){g=Math.max(g,A,m.depth+.25*p.xHeight),y=Math.max(y,p.sub2);var F=p.defaultRuleThickness,U=4*F;if(g-m.depth-(c.height-y)0&&(g+=G,y-=G)}var j=[{type:"elem",elem:c,shift:y,marginRight:q,marginLeft:O},{type:"elem",elem:m,shift:-g,marginRight:q}];V=b.makeVList({positionType:"individualShift",children:j},e)}else if(c){y=Math.max(y,p.sub1,c.height-.8*p.xHeight);var Y=[{type:"elem",elem:c,marginLeft:O,marginRight:q}];V=b.makeVList({positionType:"shift",positionData:y,children:Y},e)}else if(m)g=Math.max(g,A,m.depth+.25*p.xHeight),V=b.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:m,marginRight:q}]},e);else throw new Error("supsub must have either sup or sub.");var z0=ot(o,"right")||"mord";return b.makeSpan([z0],[o,b.makeSpan(["msupsub"],[V])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[X(r.base,e)];r.sub&&s.push(X(r.sub,e)),r.sup&&s.push(X(r.sup,e));var o;if(t)o=a?"mover":"munder";else if(r.sub)if(r.sup){var p=r.base;p&&p.type==="op"&&p.limits&&e.style===D.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(e.style===D.DISPLAY||p.limits)?o="munderover":o="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===D.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===D.DISPLAY)?o="munder":o="msub"}else{var m=r.base;m&&m.type==="op"&&m.limits&&(e.style===D.DISPLAY||m.alwaysHandleSupSub)||m&&m.type==="operatorname"&&m.alwaysHandleSupSub&&(m.limits||e.style===D.DISPLAY)?o="mover":o="msup"}return new S.MathNode(o,s)}});W0({type:"atom",htmlBuilder(r,e){return b.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new S.MathNode("mo",[v0(r.text,r.mode)]);if(r.family==="bin"){var a=yt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var na={mi:"italic",mn:"normal",mtext:"normal"};W0({type:"mathord",htmlBuilder(r,e){return b.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new S.MathNode("mi",[v0(r.text,r.mode,e)]),a=yt(r,e)||"italic";return a!==na[t.type]&&t.setAttribute("mathvariant",a),t}});W0({type:"textord",htmlBuilder(r,e){return b.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=v0(r.text,r.mode,e),a=yt(r,e)||"normal",n;return r.mode==="text"?n=new S.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new S.MathNode("mn",[t]):r.text==="\\prime"?n=new S.MathNode("mo",[t]):n=new S.MathNode("mi",[t]),a!==na[n.type]&&n.setAttribute("mathvariant",a),n}});var tt={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},rt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};W0({type:"spacing",htmlBuilder(r,e){if(rt.hasOwnProperty(r.text)){var t=rt[r.text].className||"";if(r.mode==="text"){var a=b.makeOrd(r,e,"textord");return a.classes.push(t),a}else return b.makeSpan(["mspace",t],[b.mathsym(r.text,r.mode,e)],e)}else{if(tt.hasOwnProperty(r.text))return b.makeSpan(["mspace",tt[r.text]],[],e);throw new M('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(rt.hasOwnProperty(r.text))t=new S.MathNode("mtext",[new S.TextNode(" ")]);else{if(tt.hasOwnProperty(r.text))return new S.MathNode("mspace");throw new M('Unknown type of space "'+r.text+'"')}return t}});var sr=()=>{var r=new S.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};W0({type:"tag",mathmlBuilder(r,e){var t=new S.MathNode("mtable",[new S.MathNode("mtr",[sr(),new S.MathNode("mtd",[V0(r.body,e)]),sr(),new S.MathNode("mtd",[V0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var lr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},or={"\\textbf":"textbf","\\textmd":"textmd"},_1={"\\textit":"textit","\\textup":"textup"},hr=(r,e)=>{var t=r.font;if(t){if(lr[t])return e.withTextFontFamily(lr[t]);if(or[t])return e.withTextFontWeight(or[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(_1[t])};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:Q(n),font:a}},htmlBuilder(r,e){var t=hr(r,e),a=t0(r.body,t,!0);return b.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=hr(r,e);return V0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=b.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("munder",[X(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=P(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return b.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new S.MathNode("mpadded",[X(r.body,e)],["vcenter"])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new M("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=mr(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"␣":" "),F0=Ar,ia=`[ \r - ]`,en="\\\\[a-zA-Z@]+",tn="\\\\[^\uD800-\uDFFF]",rn="("+en+")"+ia+"*",an=`\\\\( + ]`,e4="\\\\[a-zA-Z@]+",t4="\\\\[^\uD800-\uDFFF]",r4="("+e4+")"+ia+"*",a4=`\\\\( |[ \r ]+ -?)[ \r ]*`,ct="[̀-ͯ]",nn=new RegExp(ct+"+$"),sn="("+ia+"+)|"+(an+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ct+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ct+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+rn)+("|"+tn+")");class ur{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(sn,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new f0("EOF",new h0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new M("Unexpected character: '"+e[t]+"'",new f0(e[t],new h0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(` -`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new f0(n,new h0(this,t,this.tokenRegex.lastIndex))}}class ln{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new M("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var on=jr;u("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});u("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});u("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});u("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});u("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});u("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");u("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var cr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};u("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new M("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=cr[e.text],a==null||a>=t)throw new M("Invalid base-"+t+" digit "+e.text);for(var n;(n=cr[r.future().text])!=null&&n{var n=r.consumeArg().tokens;if(n.length!==1)throw new M("\\newcommand's first argument must be a macro name");var s=n[0].text,o=r.isDefined(s);if(o&&!e)throw new M("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!t)throw new M("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var m=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var c="",p=r.expandNextToken();p.text!=="]"&&p.text!=="EOF";)c+=p.text,p=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new M("Invalid number of arguments: "+c);m=parseInt(c),n=r.consumeArg().tokens}return o&&a||r.macros.set(s,{tokens:n,numArgs:m}),""};u("\\newcommand",r=>Nt(r,!1,!0,!1));u("\\renewcommand",r=>Nt(r,!0,!1,!1));u("\\providecommand",r=>Nt(r,!0,!0,!0));u("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});u("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});u("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),F0[t],$.math[t],$.text[t]),""});u("\\bgroup","{");u("\\egroup","}");u("~","\\nobreakspace");u("\\lq","`");u("\\rq","'");u("\\aa","\\r a");u("\\AA","\\r A");u("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");u("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");u("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");u("ℬ","\\mathscr{B}");u("ℰ","\\mathscr{E}");u("ℱ","\\mathscr{F}");u("ℋ","\\mathscr{H}");u("ℐ","\\mathscr{I}");u("ℒ","\\mathscr{L}");u("ℳ","\\mathscr{M}");u("ℛ","\\mathscr{R}");u("ℭ","\\mathfrak{C}");u("ℌ","\\mathfrak{H}");u("ℨ","\\mathfrak{Z}");u("\\Bbbk","\\Bbb{k}");u("·","\\cdotp");u("\\llap","\\mathllap{\\textrm{#1}}");u("\\rlap","\\mathrlap{\\textrm{#1}}");u("\\clap","\\mathclap{\\textrm{#1}}");u("\\mathstrut","\\vphantom{(}");u("\\underbar","\\underline{\\text{#1}}");u("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');u("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");u("\\ne","\\neq");u("≠","\\neq");u("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");u("∉","\\notin");u("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");u("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");u("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");u("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");u("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");u("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");u("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");u("⟂","\\perp");u("‼","\\mathclose{!\\mkern-0.8mu!}");u("∌","\\notni");u("⌜","\\ulcorner");u("⌝","\\urcorner");u("⌞","\\llcorner");u("⌟","\\lrcorner");u("©","\\copyright");u("®","\\textregistered");u("️","\\textregistered");u("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');u("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');u("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');u("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');u("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");u("⋮","\\vdots");u("\\varGamma","\\mathit{\\Gamma}");u("\\varDelta","\\mathit{\\Delta}");u("\\varTheta","\\mathit{\\Theta}");u("\\varLambda","\\mathit{\\Lambda}");u("\\varXi","\\mathit{\\Xi}");u("\\varPi","\\mathit{\\Pi}");u("\\varSigma","\\mathit{\\Sigma}");u("\\varUpsilon","\\mathit{\\Upsilon}");u("\\varPhi","\\mathit{\\Phi}");u("\\varPsi","\\mathit{\\Psi}");u("\\varOmega","\\mathit{\\Omega}");u("\\substack","\\begin{subarray}{c}#1\\end{subarray}");u("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");u("\\boxed","\\fbox{$\\displaystyle{#1}$}");u("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");u("\\implies","\\DOTSB\\;\\Longrightarrow\\;");u("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");u("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");u("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};u("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in dr?e=dr[t]:(t.slice(0,4)==="\\not"||t in $.math&&R.contains(["bin","rel"],$.math[t].group))&&(e="\\dotsb"),e});var Ct={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};u("\\dotso",function(r){var e=r.future().text;return e in Ct?"\\ldots\\,":"\\ldots"});u("\\dotsc",function(r){var e=r.future().text;return e in Ct&&e!==","?"\\ldots\\,":"\\ldots"});u("\\cdots",function(r){var e=r.future().text;return e in Ct?"\\@cdots\\,":"\\@cdots"});u("\\dotsb","\\cdots");u("\\dotsm","\\cdots");u("\\dotsi","\\!\\cdots");u("\\dotsx","\\ldots\\,");u("\\DOTSI","\\relax");u("\\DOTSB","\\relax");u("\\DOTSX","\\relax");u("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");u("\\,","\\tmspace+{3mu}{.1667em}");u("\\thinspace","\\,");u("\\>","\\mskip{4mu}");u("\\:","\\tmspace+{4mu}{.2222em}");u("\\medspace","\\:");u("\\;","\\tmspace+{5mu}{.2777em}");u("\\thickspace","\\;");u("\\!","\\tmspace-{3mu}{.1667em}");u("\\negthinspace","\\!");u("\\negmedspace","\\tmspace-{4mu}{.2222em}");u("\\negthickspace","\\tmspace-{5mu}{.277em}");u("\\enspace","\\kern.5em ");u("\\enskip","\\hskip.5em\\relax");u("\\quad","\\hskip1em\\relax");u("\\qquad","\\hskip2em\\relax");u("\\tag","\\@ifstar\\tag@literal\\tag@paren");u("\\tag@paren","\\tag@literal{({#1})}");u("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new M("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});u("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");u("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");u("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");u("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");u("\\newline","\\\\\\relax");u("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var sa=T(x0["Main-Regular"][84][1]-.7*x0["Main-Regular"][65][1]);u("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");u("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");u("\\hspace","\\@ifstar\\@hspacer\\@hspace");u("\\@hspace","\\hskip #1\\relax");u("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");u("\\ordinarycolon",":");u("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");u("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');u("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');u("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');u("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');u("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');u("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');u("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');u("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');u("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');u("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');u("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');u("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');u("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');u("∷","\\dblcolon");u("∹","\\eqcolon");u("≔","\\coloneqq");u("≕","\\eqqcolon");u("⩴","\\Coloneqq");u("\\ratio","\\vcentcolon");u("\\coloncolon","\\dblcolon");u("\\colonequals","\\coloneqq");u("\\coloncolonequals","\\Coloneqq");u("\\equalscolon","\\eqqcolon");u("\\equalscoloncolon","\\Eqqcolon");u("\\colonminus","\\coloneq");u("\\coloncolonminus","\\Coloneq");u("\\minuscolon","\\eqcolon");u("\\minuscoloncolon","\\Eqcolon");u("\\coloncolonapprox","\\Colonapprox");u("\\coloncolonsim","\\Colonsim");u("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");u("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");u("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");u("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");u("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");u("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");u("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");u("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");u("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");u("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");u("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");u("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");u("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");u("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");u("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");u("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");u("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");u("\\nleqq","\\html@mathml{\\@nleqq}{≰}");u("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");u("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");u("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");u("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");u("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");u("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");u("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");u("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");u("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");u("\\imath","\\html@mathml{\\@imath}{ı}");u("\\jmath","\\html@mathml{\\@jmath}{ȷ}");u("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");u("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");u("⟦","\\llbracket");u("⟧","\\rrbracket");u("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");u("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");u("⦃","\\lBrace");u("⦄","\\rBrace");u("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");u("⦵","\\minuso");u("\\darr","\\downarrow");u("\\dArr","\\Downarrow");u("\\Darr","\\Downarrow");u("\\lang","\\langle");u("\\rang","\\rangle");u("\\uarr","\\uparrow");u("\\uArr","\\Uparrow");u("\\Uarr","\\Uparrow");u("\\N","\\mathbb{N}");u("\\R","\\mathbb{R}");u("\\Z","\\mathbb{Z}");u("\\alef","\\aleph");u("\\alefsym","\\aleph");u("\\Alpha","\\mathrm{A}");u("\\Beta","\\mathrm{B}");u("\\bull","\\bullet");u("\\Chi","\\mathrm{X}");u("\\clubs","\\clubsuit");u("\\cnums","\\mathbb{C}");u("\\Complex","\\mathbb{C}");u("\\Dagger","\\ddagger");u("\\diamonds","\\diamondsuit");u("\\empty","\\emptyset");u("\\Epsilon","\\mathrm{E}");u("\\Eta","\\mathrm{H}");u("\\exist","\\exists");u("\\harr","\\leftrightarrow");u("\\hArr","\\Leftrightarrow");u("\\Harr","\\Leftrightarrow");u("\\hearts","\\heartsuit");u("\\image","\\Im");u("\\infin","\\infty");u("\\Iota","\\mathrm{I}");u("\\isin","\\in");u("\\Kappa","\\mathrm{K}");u("\\larr","\\leftarrow");u("\\lArr","\\Leftarrow");u("\\Larr","\\Leftarrow");u("\\lrarr","\\leftrightarrow");u("\\lrArr","\\Leftrightarrow");u("\\Lrarr","\\Leftrightarrow");u("\\Mu","\\mathrm{M}");u("\\natnums","\\mathbb{N}");u("\\Nu","\\mathrm{N}");u("\\Omicron","\\mathrm{O}");u("\\plusmn","\\pm");u("\\rarr","\\rightarrow");u("\\rArr","\\Rightarrow");u("\\Rarr","\\Rightarrow");u("\\real","\\Re");u("\\reals","\\mathbb{R}");u("\\Reals","\\mathbb{R}");u("\\Rho","\\mathrm{P}");u("\\sdot","\\cdot");u("\\sect","\\S");u("\\spades","\\spadesuit");u("\\sub","\\subset");u("\\sube","\\subseteq");u("\\supe","\\supseteq");u("\\Tau","\\mathrm{T}");u("\\thetasym","\\vartheta");u("\\weierp","\\wp");u("\\Zeta","\\mathrm{Z}");u("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");u("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");u("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");u("\\bra","\\mathinner{\\langle{#1}|}");u("\\ket","\\mathinner{|{#1}\\rangle}");u("\\braket","\\mathinner{\\langle{#1}\\rangle}");u("\\Bra","\\left\\langle#1\\right|");u("\\Ket","\\left|#1\\right\\rangle");var la=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),m=e.macros.get("\\|");e.macros.beginGroup();var c=y=>w=>{r&&(w.macros.set("|",o),n.length&&w.macros.set("\\|",m));var x=y;if(!y&&n.length){var z=w.future();z.text==="|"&&(w.popToken(),x=!0)}return{tokens:x?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};u("\\bra@ket",la(!1));u("\\bra@set",la(!0));u("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");u("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");u("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");u("\\angln","{\\angl n}");u("\\blue","\\textcolor{##6495ed}{#1}");u("\\orange","\\textcolor{##ffa500}{#1}");u("\\pink","\\textcolor{##ff00af}{#1}");u("\\red","\\textcolor{##df0030}{#1}");u("\\green","\\textcolor{##28ae7b}{#1}");u("\\gray","\\textcolor{gray}{#1}");u("\\purple","\\textcolor{##9d38bd}{#1}");u("\\blueA","\\textcolor{##ccfaff}{#1}");u("\\blueB","\\textcolor{##80f6ff}{#1}");u("\\blueC","\\textcolor{##63d9ea}{#1}");u("\\blueD","\\textcolor{##11accd}{#1}");u("\\blueE","\\textcolor{##0c7f99}{#1}");u("\\tealA","\\textcolor{##94fff5}{#1}");u("\\tealB","\\textcolor{##26edd5}{#1}");u("\\tealC","\\textcolor{##01d1c1}{#1}");u("\\tealD","\\textcolor{##01a995}{#1}");u("\\tealE","\\textcolor{##208170}{#1}");u("\\greenA","\\textcolor{##b6ffb0}{#1}");u("\\greenB","\\textcolor{##8af281}{#1}");u("\\greenC","\\textcolor{##74cf70}{#1}");u("\\greenD","\\textcolor{##1fab54}{#1}");u("\\greenE","\\textcolor{##0d923f}{#1}");u("\\goldA","\\textcolor{##ffd0a9}{#1}");u("\\goldB","\\textcolor{##ffbb71}{#1}");u("\\goldC","\\textcolor{##ff9c39}{#1}");u("\\goldD","\\textcolor{##e07d10}{#1}");u("\\goldE","\\textcolor{##a75a05}{#1}");u("\\redA","\\textcolor{##fca9a9}{#1}");u("\\redB","\\textcolor{##ff8482}{#1}");u("\\redC","\\textcolor{##f9685d}{#1}");u("\\redD","\\textcolor{##e84d39}{#1}");u("\\redE","\\textcolor{##bc2612}{#1}");u("\\maroonA","\\textcolor{##ffbde0}{#1}");u("\\maroonB","\\textcolor{##ff92c6}{#1}");u("\\maroonC","\\textcolor{##ed5fa6}{#1}");u("\\maroonD","\\textcolor{##ca337c}{#1}");u("\\maroonE","\\textcolor{##9e034e}{#1}");u("\\purpleA","\\textcolor{##ddd7ff}{#1}");u("\\purpleB","\\textcolor{##c6b9fc}{#1}");u("\\purpleC","\\textcolor{##aa87ff}{#1}");u("\\purpleD","\\textcolor{##7854ab}{#1}");u("\\purpleE","\\textcolor{##543b78}{#1}");u("\\mintA","\\textcolor{##f5f9e8}{#1}");u("\\mintB","\\textcolor{##edf2df}{#1}");u("\\mintC","\\textcolor{##e0e5cc}{#1}");u("\\grayA","\\textcolor{##f6f7f7}{#1}");u("\\grayB","\\textcolor{##f0f1f2}{#1}");u("\\grayC","\\textcolor{##e3e5e6}{#1}");u("\\grayD","\\textcolor{##d6d8da}{#1}");u("\\grayE","\\textcolor{##babec2}{#1}");u("\\grayF","\\textcolor{##888d93}{#1}");u("\\grayG","\\textcolor{##626569}{#1}");u("\\grayH","\\textcolor{##3b3e40}{#1}");u("\\grayI","\\textcolor{##21242c}{#1}");u("\\kaBlue","\\textcolor{##314453}{#1}");u("\\kaGreen","\\textcolor{##71B307}{#1}");var oa={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class hn{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ln(on,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new ur(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new f0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,o=0,m=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new M("Extra }",s)}else if(s.text==="EOF")throw new M("Unexpected end of input in a macro argument, expected '"+(e&&a?e[m]:"}")+"'",s);if(e&&a)if((o===0||o===1&&e[m]==="{")&&s.text===e[m]){if(++m,m===e.length){t.splice(-m,m);break}}else m=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new M("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new M("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var m=s.length-1;m>=0;--m){var c=s[m];if(c.text==="#"){if(m===0)throw new M("Incomplete placeholder at end of macro body",c);if(c=s[--m],c.text==="#")s.splice(m+1,1);else if(/^[1-9]$/.test(c.text))s.splice(m,2,...o[+c.text-1]);else throw new M("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new f0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var m=new ur(n,this.settings),c=[],p=m.lex();p.text!=="EOF";)c.push(p),p=m.lex();c.reverse();var g={tokens:c,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||F0.hasOwnProperty(e)||$.math.hasOwnProperty(e)||$.text.hasOwnProperty(e)||oa.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:F0.hasOwnProperty(e)&&!F0[e].primitive}}var fr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Me=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),at={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},pr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Le{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new hn(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new f0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(Le.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&F0[n.text]&&F0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var m=$[this.mode][t].group,c=h0.range(e),p;if(Ka.hasOwnProperty(m)){var g=m;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:m,mode:this.mode,loc:c,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(gr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:h0.range(e),text:t};else return null;if(this.consume(),s)for(var y=0;y0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var l4=jr;u("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});u("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});u("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});u("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});u("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});u("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");u("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var cr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};u("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new M("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=cr[e.text],a==null||a>=t)throw new M("Invalid base-"+t+" digit "+e.text);for(var n;(n=cr[r.future().text])!=null&&n{var n=r.consumeArg().tokens;if(n.length!==1)throw new M("\\newcommand's first argument must be a macro name");var s=n[0].text,o=r.isDefined(s);if(o&&!e)throw new M("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!o&&!t)throw new M("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var m=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var c="",p=r.expandNextToken();p.text!=="]"&&p.text!=="EOF";)c+=p.text,p=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new M("Invalid number of arguments: "+c);m=parseInt(c),n=r.consumeArg().tokens}return o&&a||r.macros.set(s,{tokens:n,numArgs:m}),""};u("\\newcommand",r=>Nt(r,!1,!0,!1));u("\\renewcommand",r=>Nt(r,!0,!1,!1));u("\\providecommand",r=>Nt(r,!0,!0,!0));u("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});u("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});u("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),F0[t],$.math[t],$.text[t]),""});u("\\bgroup","{");u("\\egroup","}");u("~","\\nobreakspace");u("\\lq","`");u("\\rq","'");u("\\aa","\\r a");u("\\AA","\\r A");u("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");u("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");u("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");u("ℬ","\\mathscr{B}");u("ℰ","\\mathscr{E}");u("ℱ","\\mathscr{F}");u("ℋ","\\mathscr{H}");u("ℐ","\\mathscr{I}");u("ℒ","\\mathscr{L}");u("ℳ","\\mathscr{M}");u("ℛ","\\mathscr{R}");u("ℭ","\\mathfrak{C}");u("ℌ","\\mathfrak{H}");u("ℨ","\\mathfrak{Z}");u("\\Bbbk","\\Bbb{k}");u("·","\\cdotp");u("\\llap","\\mathllap{\\textrm{#1}}");u("\\rlap","\\mathrlap{\\textrm{#1}}");u("\\clap","\\mathclap{\\textrm{#1}}");u("\\mathstrut","\\vphantom{(}");u("\\underbar","\\underline{\\text{#1}}");u("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');u("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");u("\\ne","\\neq");u("≠","\\neq");u("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");u("∉","\\notin");u("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");u("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");u("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");u("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");u("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");u("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");u("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");u("⟂","\\perp");u("‼","\\mathclose{!\\mkern-0.8mu!}");u("∌","\\notni");u("⌜","\\ulcorner");u("⌝","\\urcorner");u("⌞","\\llcorner");u("⌟","\\lrcorner");u("©","\\copyright");u("®","\\textregistered");u("️","\\textregistered");u("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');u("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');u("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');u("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');u("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");u("⋮","\\vdots");u("\\varGamma","\\mathit{\\Gamma}");u("\\varDelta","\\mathit{\\Delta}");u("\\varTheta","\\mathit{\\Theta}");u("\\varLambda","\\mathit{\\Lambda}");u("\\varXi","\\mathit{\\Xi}");u("\\varPi","\\mathit{\\Pi}");u("\\varSigma","\\mathit{\\Sigma}");u("\\varUpsilon","\\mathit{\\Upsilon}");u("\\varPhi","\\mathit{\\Phi}");u("\\varPsi","\\mathit{\\Psi}");u("\\varOmega","\\mathit{\\Omega}");u("\\substack","\\begin{subarray}{c}#1\\end{subarray}");u("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");u("\\boxed","\\fbox{$\\displaystyle{#1}$}");u("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");u("\\implies","\\DOTSB\\;\\Longrightarrow\\;");u("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");u("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");u("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};u("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in dr?e=dr[t]:(t.slice(0,4)==="\\not"||t in $.math&&R.contains(["bin","rel"],$.math[t].group))&&(e="\\dotsb"),e});var Ct={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};u("\\dotso",function(r){var e=r.future().text;return e in Ct?"\\ldots\\,":"\\ldots"});u("\\dotsc",function(r){var e=r.future().text;return e in Ct&&e!==","?"\\ldots\\,":"\\ldots"});u("\\cdots",function(r){var e=r.future().text;return e in Ct?"\\@cdots\\,":"\\@cdots"});u("\\dotsb","\\cdots");u("\\dotsm","\\cdots");u("\\dotsi","\\!\\cdots");u("\\dotsx","\\ldots\\,");u("\\DOTSI","\\relax");u("\\DOTSB","\\relax");u("\\DOTSX","\\relax");u("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");u("\\,","\\tmspace+{3mu}{.1667em}");u("\\thinspace","\\,");u("\\>","\\mskip{4mu}");u("\\:","\\tmspace+{4mu}{.2222em}");u("\\medspace","\\:");u("\\;","\\tmspace+{5mu}{.2777em}");u("\\thickspace","\\;");u("\\!","\\tmspace-{3mu}{.1667em}");u("\\negthinspace","\\!");u("\\negmedspace","\\tmspace-{4mu}{.2222em}");u("\\negthickspace","\\tmspace-{5mu}{.277em}");u("\\enspace","\\kern.5em ");u("\\enskip","\\hskip.5em\\relax");u("\\quad","\\hskip1em\\relax");u("\\qquad","\\hskip2em\\relax");u("\\tag","\\@ifstar\\tag@literal\\tag@paren");u("\\tag@paren","\\tag@literal{({#1})}");u("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new M("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});u("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");u("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");u("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");u("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");u("\\newline","\\\\\\relax");u("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var sa=T(x0["Main-Regular"][84][1]-.7*x0["Main-Regular"][65][1]);u("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");u("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");u("\\hspace","\\@ifstar\\@hspacer\\@hspace");u("\\@hspace","\\hskip #1\\relax");u("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");u("\\ordinarycolon",":");u("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");u("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');u("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');u("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');u("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');u("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');u("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');u("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');u("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');u("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');u("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');u("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');u("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');u("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');u("∷","\\dblcolon");u("∹","\\eqcolon");u("≔","\\coloneqq");u("≕","\\eqqcolon");u("⩴","\\Coloneqq");u("\\ratio","\\vcentcolon");u("\\coloncolon","\\dblcolon");u("\\colonequals","\\coloneqq");u("\\coloncolonequals","\\Coloneqq");u("\\equalscolon","\\eqqcolon");u("\\equalscoloncolon","\\Eqqcolon");u("\\colonminus","\\coloneq");u("\\coloncolonminus","\\Coloneq");u("\\minuscolon","\\eqcolon");u("\\minuscoloncolon","\\Eqcolon");u("\\coloncolonapprox","\\Colonapprox");u("\\coloncolonsim","\\Colonsim");u("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");u("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");u("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");u("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");u("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");u("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");u("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");u("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");u("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");u("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");u("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");u("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");u("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");u("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");u("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");u("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");u("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");u("\\nleqq","\\html@mathml{\\@nleqq}{≰}");u("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");u("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");u("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");u("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");u("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");u("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");u("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");u("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");u("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");u("\\imath","\\html@mathml{\\@imath}{ı}");u("\\jmath","\\html@mathml{\\@jmath}{ȷ}");u("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");u("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");u("⟦","\\llbracket");u("⟧","\\rrbracket");u("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");u("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");u("⦃","\\lBrace");u("⦄","\\rBrace");u("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");u("⦵","\\minuso");u("\\darr","\\downarrow");u("\\dArr","\\Downarrow");u("\\Darr","\\Downarrow");u("\\lang","\\langle");u("\\rang","\\rangle");u("\\uarr","\\uparrow");u("\\uArr","\\Uparrow");u("\\Uarr","\\Uparrow");u("\\N","\\mathbb{N}");u("\\R","\\mathbb{R}");u("\\Z","\\mathbb{Z}");u("\\alef","\\aleph");u("\\alefsym","\\aleph");u("\\Alpha","\\mathrm{A}");u("\\Beta","\\mathrm{B}");u("\\bull","\\bullet");u("\\Chi","\\mathrm{X}");u("\\clubs","\\clubsuit");u("\\cnums","\\mathbb{C}");u("\\Complex","\\mathbb{C}");u("\\Dagger","\\ddagger");u("\\diamonds","\\diamondsuit");u("\\empty","\\emptyset");u("\\Epsilon","\\mathrm{E}");u("\\Eta","\\mathrm{H}");u("\\exist","\\exists");u("\\harr","\\leftrightarrow");u("\\hArr","\\Leftrightarrow");u("\\Harr","\\Leftrightarrow");u("\\hearts","\\heartsuit");u("\\image","\\Im");u("\\infin","\\infty");u("\\Iota","\\mathrm{I}");u("\\isin","\\in");u("\\Kappa","\\mathrm{K}");u("\\larr","\\leftarrow");u("\\lArr","\\Leftarrow");u("\\Larr","\\Leftarrow");u("\\lrarr","\\leftrightarrow");u("\\lrArr","\\Leftrightarrow");u("\\Lrarr","\\Leftrightarrow");u("\\Mu","\\mathrm{M}");u("\\natnums","\\mathbb{N}");u("\\Nu","\\mathrm{N}");u("\\Omicron","\\mathrm{O}");u("\\plusmn","\\pm");u("\\rarr","\\rightarrow");u("\\rArr","\\Rightarrow");u("\\Rarr","\\Rightarrow");u("\\real","\\Re");u("\\reals","\\mathbb{R}");u("\\Reals","\\mathbb{R}");u("\\Rho","\\mathrm{P}");u("\\sdot","\\cdot");u("\\sect","\\S");u("\\spades","\\spadesuit");u("\\sub","\\subset");u("\\sube","\\subseteq");u("\\supe","\\supseteq");u("\\Tau","\\mathrm{T}");u("\\thetasym","\\vartheta");u("\\weierp","\\wp");u("\\Zeta","\\mathrm{Z}");u("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");u("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");u("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");u("\\bra","\\mathinner{\\langle{#1}|}");u("\\ket","\\mathinner{|{#1}\\rangle}");u("\\braket","\\mathinner{\\langle{#1}\\rangle}");u("\\Bra","\\left\\langle#1\\right|");u("\\Ket","\\left|#1\\right\\rangle");var la=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,o=e.macros.get("|"),m=e.macros.get("\\|");e.macros.beginGroup();var c=y=>w=>{r&&(w.macros.set("|",o),n.length&&w.macros.set("\\|",m));var x=y;if(!y&&n.length){var z=w.future();z.text==="|"&&(w.popToken(),x=!0)}return{tokens:x?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};u("\\bra@ket",la(!1));u("\\bra@set",la(!0));u("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");u("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");u("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");u("\\angln","{\\angl n}");u("\\blue","\\textcolor{##6495ed}{#1}");u("\\orange","\\textcolor{##ffa500}{#1}");u("\\pink","\\textcolor{##ff00af}{#1}");u("\\red","\\textcolor{##df0030}{#1}");u("\\green","\\textcolor{##28ae7b}{#1}");u("\\gray","\\textcolor{gray}{#1}");u("\\purple","\\textcolor{##9d38bd}{#1}");u("\\blueA","\\textcolor{##ccfaff}{#1}");u("\\blueB","\\textcolor{##80f6ff}{#1}");u("\\blueC","\\textcolor{##63d9ea}{#1}");u("\\blueD","\\textcolor{##11accd}{#1}");u("\\blueE","\\textcolor{##0c7f99}{#1}");u("\\tealA","\\textcolor{##94fff5}{#1}");u("\\tealB","\\textcolor{##26edd5}{#1}");u("\\tealC","\\textcolor{##01d1c1}{#1}");u("\\tealD","\\textcolor{##01a995}{#1}");u("\\tealE","\\textcolor{##208170}{#1}");u("\\greenA","\\textcolor{##b6ffb0}{#1}");u("\\greenB","\\textcolor{##8af281}{#1}");u("\\greenC","\\textcolor{##74cf70}{#1}");u("\\greenD","\\textcolor{##1fab54}{#1}");u("\\greenE","\\textcolor{##0d923f}{#1}");u("\\goldA","\\textcolor{##ffd0a9}{#1}");u("\\goldB","\\textcolor{##ffbb71}{#1}");u("\\goldC","\\textcolor{##ff9c39}{#1}");u("\\goldD","\\textcolor{##e07d10}{#1}");u("\\goldE","\\textcolor{##a75a05}{#1}");u("\\redA","\\textcolor{##fca9a9}{#1}");u("\\redB","\\textcolor{##ff8482}{#1}");u("\\redC","\\textcolor{##f9685d}{#1}");u("\\redD","\\textcolor{##e84d39}{#1}");u("\\redE","\\textcolor{##bc2612}{#1}");u("\\maroonA","\\textcolor{##ffbde0}{#1}");u("\\maroonB","\\textcolor{##ff92c6}{#1}");u("\\maroonC","\\textcolor{##ed5fa6}{#1}");u("\\maroonD","\\textcolor{##ca337c}{#1}");u("\\maroonE","\\textcolor{##9e034e}{#1}");u("\\purpleA","\\textcolor{##ddd7ff}{#1}");u("\\purpleB","\\textcolor{##c6b9fc}{#1}");u("\\purpleC","\\textcolor{##aa87ff}{#1}");u("\\purpleD","\\textcolor{##7854ab}{#1}");u("\\purpleE","\\textcolor{##543b78}{#1}");u("\\mintA","\\textcolor{##f5f9e8}{#1}");u("\\mintB","\\textcolor{##edf2df}{#1}");u("\\mintC","\\textcolor{##e0e5cc}{#1}");u("\\grayA","\\textcolor{##f6f7f7}{#1}");u("\\grayB","\\textcolor{##f0f1f2}{#1}");u("\\grayC","\\textcolor{##e3e5e6}{#1}");u("\\grayD","\\textcolor{##d6d8da}{#1}");u("\\grayE","\\textcolor{##babec2}{#1}");u("\\grayF","\\textcolor{##888d93}{#1}");u("\\grayG","\\textcolor{##626569}{#1}");u("\\grayH","\\textcolor{##3b3e40}{#1}");u("\\grayI","\\textcolor{##21242c}{#1}");u("\\kaBlue","\\textcolor{##314453}{#1}");u("\\kaGreen","\\textcolor{##71B307}{#1}");var oa={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class o4{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new s4(l4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new ur(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new f0("EOF",a.loc)),this.pushTokens(n),t.range(a,"")}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,o=0,m=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++o;else if(s.text==="}"){if(--o,o===-1)throw new M("Extra }",s)}else if(s.text==="EOF")throw new M("Unexpected end of input in a macro argument, expected '"+(e&&a?e[m]:"}")+"'",s);if(e&&a)if((o===0||o===1&&e[m]==="{")&&s.text===e[m]){if(++m,m===e.length){t.splice(-m,m);break}}else m=0}while(o!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new M("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new M("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var m=s.length-1;m>=0;--m){var c=s[m];if(c.text==="#"){if(m===0)throw new M("Incomplete placeholder at end of macro body",c);if(c=s[--m],c.text==="#")s.splice(m+1,1);else if(/^[1-9]$/.test(c.text))s.splice(m,2,...o[+c.text-1]);else throw new M("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new f0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var o=n.replace(/##/g,"");o.indexOf("#"+(s+1))!==-1;)++s;for(var m=new ur(n,this.settings),c=[],p=m.lex();p.text!=="EOF";)c.push(p),p=m.lex();c.reverse();var g={tokens:c,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||F0.hasOwnProperty(e)||$.math.hasOwnProperty(e)||$.text.hasOwnProperty(e)||oa.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:F0.hasOwnProperty(e)&&!F0[e].primitive}}var fr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Me=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),at={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},pr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Le{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new o4(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new f0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(Le.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&F0[n.text]&&F0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var m=$[this.mode][t].group,c=h0.range(e),p;if(Ka.hasOwnProperty(m)){var g=m;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:m,mode:this.mode,loc:c,text:t};o=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(gr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),o={type:"textord",mode:"text",loc:h0.range(e),text:t};else return null;if(this.consume(),s)for(var y=0;yn}function S(e,n){var r={};return n=z(n),le(e,function(t,a,i){$e(r,a,n(t,a,i))}),r}function y(e){return e&&e.length?he(e,pe,en):void 0}function U(e,n){return e&&e.length?he(e,z(n),Fe):void 0}function nn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function rn(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,i=ee(e),o=n!==void 0,u=n===null,d=n===n,s=ee(n);if(!u&&!s&&!i&&e>n||i&&o&&d&&!u&&!s||t&&o&&d||!r&&d||!a)return 1;if(!t&&!i&&!s&&e=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function an(e,n,r){n.length?n=F(n,function(i){return we(i)?function(o){return Te(o,i.length===1?i[0]:i)}:i}):n=[pe];var t=-1;n=F(n,We(z));var a=Ve(e,function(i,o,u){var d=F(n,function(s){return s(i)});return{criteria:d,index:++t,value:i}});return nn(a,function(i,o){return tn(i,o,r)})}function on(e,n){return Ae(e,n,function(r,t){return Ie(e,t)})}var T=Ue(function(e,n){return e==null?{}:on(e,n)}),un=Math.ceil,dn=Math.max;function sn(e,n,r,t){for(var a=-1,i=dn(un((n-e)/(r||1)),0),o=Array(i);i--;)o[++a]=e,e+=r;return o}function fn(e){return function(n,r,t){return t&&typeof t!="number"&&q(n,r,t)&&(r=t=void 0),n=V(n),r===void 0?(r=n,n=0):r=V(r),t=t===void 0?n1&&q(e,n[0],n[1])?n=[]:r>2&&q(n[0],n[1],n[2])&&(n=[n[0]]),an(e,Se(n),[])}),cn=0;function H(e){var n=++cn;return je(e)+n}function ln(e,n,r){for(var t=-1,a=e.length,i=n.length,o={};++t0;--u)if(o=n[u].dequeue(),o){t=t.concat(A(e,n,r,o,!0));break}}}return t}function A(e,n,r,t,a){var i=a?[]:void 0;return f(e.inEdges(t.v),function(o){var u=e.edge(o),d=e.node(o.v);a&&i.push({v:o.v,w:o.w}),d.out-=u,W(n,r,d)}),f(e.outEdges(t.v),function(o){var u=e.edge(o),d=o.w,s=e.node(d);s.in-=u,W(n,r,s)}),e.removeNode(t.v),i}function mn(e,n){var r=new g,t=0,a=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),a=Math.max(a,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var i=E(a+t+3).map(function(){return new vn}),o=t+1;return f(r.nodes(),function(u){W(i,o,r.node(u))}),{graph:r,buckets:i,zeroIdx:o}}function W(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function gn(e){var n=e.graph().acyclicer==="greedy"?wn(e,r(e)):yn(e);f(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,H("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function yn(e){var n=[],r={},t={};function a(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,f(e.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):a(o.w)}),delete r[i])}return f(e.nodes(),a),n}function kn(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var a;do a=H(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function xn(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function be(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function re(e,n){var r=e.x,t=e.y,a=n.x-r,i=n.y-t,o=e.width/2,u=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(i)*o>Math.abs(a)*u?(i<0&&(u=-u),d=u*a/i,s=u):(a<0&&(o=-o),d=o,s=o*i/a),{x:r+d,y:t+s}}function j(e){var n=w(E(me(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),a=t.rank;m(a)||(n[a][t.order]=r)}),n}function En(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);ve(t,"rank")&&(t.rank-=n)})}function On(e){var n=P(w(e.nodes(),function(i){return e.node(i).rank})),r=[];f(e.nodes(),function(i){var o=e.node(i).rank-n;r[o]||(r[o]=[]),r[o].push(i)});var t=0,a=e.graph().nodeRankFactor;f(r,function(i,o){m(i)&&o%a!==0?--t:t&&f(i,function(u){e.node(u).rank+=t})})}function te(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),L(e,"border",a,n)}function me(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function Ln(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Nn(e,n){return n()}function Pn(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;io.lim&&(u=o,d=!0);var s=R(n.edges(),function(c){return d===oe(e,e.node(c.v),u)&&d!==oe(e,e.node(c.w),u)});return U(s,function(c){return C(n,c)})}function Pe(e,n,r,t){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(t.v,t.w,{}),K(e),Z(e,n),Dn(e,n)}function Dn(e,n){var r=X(e.nodes(),function(a){return!n.node(a).parent}),t=Gn(e,r);t=t.slice(1),f(t,function(a){var i=e.node(a).parent,o=n.edge(a,i),u=!1;o||(o=n.edge(i,a),u=!0),n.node(a).rank=n.node(i).rank+(u?o.minlen:-o.minlen)})}function qn(e,n,r){return e.hasEdge(n,r)}function oe(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function $n(e){switch(e.graph().ranker){case"network-simplex":ue(e);break;case"tight-tree":zn(e);break;case"longest-path":Wn(e);break;default:ue(e)}}var Wn=J;function zn(e){J(e),ye(e)}function ue(e){k(e)}function Xn(e){var n=L(e,"root",{},"_root"),r=Un(e),t=y(x(r))-1,a=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=a});var i=Hn(e)+1;f(e.children(),function(o){Ce(e,n,a,i,t,r,o)}),e.graph().nodeRankFactor=a}function Ce(e,n,r,t,a,i,o){var u=e.children(o);if(!u.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var d=te(e,"_bt"),s=te(e,"_bb"),c=e.node(o);e.setParent(d,o),c.borderTop=d,e.setParent(s,o),c.borderBottom=s,f(u,function(l){Ce(e,n,r,t,a,i,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,N=v!==p?1:a-i[o]+1;e.setEdge(d,v,{weight:b,minlen:N,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:N,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,d,{weight:0,minlen:a+i[o]})}function Un(e){var n={};function r(t,a){var i=e.children(t);i&&i.length&&f(i,function(o){r(o,a+1)}),n[t]=a}return f(e.children(),function(t){r(t,1)}),n}function Hn(e){return I(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Jn(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Zn(e,n,r){var t={},a;f(r,function(i){for(var o=e.parent(i),u,d;o;){if(u=e.parent(o),u?(d=t[u],t[u]=o):(d=a,a=o),d&&d!==o){n.setEdge(d,o);return}o=u}})}function Kn(e,n,r){var t=Qn(e),a=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return e.node(i)});return f(e.nodes(),function(i){var o=e.node(i),u=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,u||t),f(e[r](i),function(d){var s=d.v===i?d.w:d.v,c=a.edge(s,i),l=m(c)?0:c.weight;a.setEdge(s,i,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function Qn(e){for(var n;e.hasNode(n=H("_root")););return n}function er(e,n){for(var r=0,t=1;t0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function rr(e){var n={},r=R(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),a=w(E(t+1),function(){return[]});function i(u){if(!ve(n,u)){n[u]=!0;var d=e.node(u);a[d.rank].push(u),f(e.successors(u),i)}}var o=_(r,function(u){return e.node(u).rank});return f(o,i),a}function tr(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var a=I(t,function(i,o){var u=e.edge(o),d=e.node(o.v);return{sum:i.sum+u.weight*d.order,weight:i.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function ar(e,n){var r={};f(e,function(a,i){var o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};m(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),f(n.edges(),function(a){var i=r[a.v],o=r[a.w];!m(i)&&!m(o)&&(o.indegree++,i.out.push(r[a.w]))});var t=R(r,function(a){return!a.indegree});return ir(t)}function ir(e){var n=[];function r(i){return function(o){o.merged||(m(o.barycenter)||m(i.barycenter)||o.barycenter>=i.barycenter)&&or(i,o)}}function t(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),f(a.in.reverse(),r(a)),f(a.out,t(a))}return w(R(n,function(i){return!i.merged}),function(i){return T(i,["vs","i","barycenter","weight"])})}function or(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function ur(e,n){var r=Ln(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,a=_(r.rhs,function(c){return-c.i}),i=[],o=0,u=0,d=0;t.sort(dr(!!n)),d=de(i,a,d),f(t,function(c){d+=c.vs.length,i.push(c.vs),o+=c.barycenter*c.weight,u+=c.weight,d=de(i,a,d)});var s={vs:O(i)};return u&&(s.barycenter=o/u,s.weight=u),s}function de(e,n,r){for(var t;n.length&&(t=M(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function dr(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function Re(e,n,r,t){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};o&&(a=R(a,function(p){return p!==o&&p!==u}));var s=tr(e,a);f(s,function(p){if(e.children(p.v).length){var b=Re(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&fr(p,b)}});var c=ar(s,r);sr(c,d);var l=ur(c,t);if(o&&(l.vs=O([o,l.vs,u]),e.predecessors(o).length)){var h=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function sr(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function fr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function cr(e){var n=me(e),r=se(e,E(1,n+1),"inEdges"),t=se(e,E(n-1,-1,-1),"outEdges"),a=rr(e);fe(e,a);for(var i=Number.POSITIVE_INFINITY,o,u=0,d=0;d<4;++u,++d){lr(u%2?r:t,u%4>=2),a=j(e);var s=er(e,a);so||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)i.push(d);return{path:a.concat(i.reverse()),lca:s}}function pr(e){var n={},r=0;function t(a){var i=r;f(e.children(a),t),n[a]={low:i,lim:r++}}return f(e.children(),t),n}function wr(e,n){var r={};function t(a,i){var o=0,u=0,d=a.length,s=M(i);return f(i,function(c,l){var h=mr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(i.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var N=e.node(b),Q=N.order;(Qs)&&_e(r,h,c)})})}function a(i,o){var u=-1,d,s=0;return f(o,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(o,s,l,u,d),s=l,u=d)}t(o,s,o.length,d,i.length)}),o}return I(n,a),r}function mr(e,n){if(e.node(n).dummy)return X(e.predecessors(n),function(r){return e.node(r).dummy})}function _e(e,n,r){if(n>r){var t=n;n=r,r=t}var a=e[n];a||(e[n]=a={}),a[r]=!0}function gr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function yr(e,n,r,t){var a={},i={},o={};return f(n,function(u){f(u,function(d,s){a[d]=d,i[d]=d,o[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=_(c,function(b){return o[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];i[s]===s&&d{var t=r(" buildLayoutGraph",()=>Yr(e));r(" runLayout",()=>Mr(t,r)),r(" updateInputGraph",()=>Tr(e,t))})}function Mr(e,n){n(" makeSpaceForEdgeLabels",()=>Dr(e)),n(" removeSelfEdges",()=>Zr(e)),n(" acyclic",()=>gn(e)),n(" nestingGraph.run",()=>Xn(e)),n(" rank",()=>$n(be(e))),n(" injectEdgeLabelProxies",()=>qr(e)),n(" removeEmptyRanks",()=>On(e)),n(" nestingGraph.cleanup",()=>Jn(e)),n(" normalizeRanks",()=>En(e)),n(" assignRankMinMax",()=>$r(e)),n(" removeEdgeLabelProxies",()=>Wr(e)),n(" normalize.run",()=>Tn(e)),n(" parentDummyChains",()=>hr(e)),n(" addBorderSegments",()=>Pn(e)),n(" order",()=>cr(e)),n(" insertSelfEdges",()=>Kr(e)),n(" adjustCoordinateSystem",()=>Cn(e)),n(" position",()=>Rr(e)),n(" positionSelfEdges",()=>Qr(e)),n(" removeBorderNodes",()=>Jr(e)),n(" normalize.undo",()=>Sn(e)),n(" fixupEdgeLabelCoords",()=>Ur(e)),n(" undoCoordinateSystem",()=>Rn(e)),n(" translateGraph",()=>zr(e)),n(" assignNodeIntersects",()=>Xr(e)),n(" reversePoints",()=>Hr(e)),n(" acyclic.undo",()=>kn(e))}function Tr(e,n){f(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),f(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Ir=["nodesep","edgesep","ranksep","marginx","marginy"],Sr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},jr=["acyclicer","ranker","rankdir","align"],Fr=["width","height"],Vr={width:0,height:0},Ar=["minlen","weight","width","height","labeloffset"],Br={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Gr=["labelpos"];function Yr(e){var n=new g({multigraph:!0,compound:!0}),r=D(e.graph());return n.setGraph($({},Sr,Y(r,Ir),T(r,jr))),f(e.nodes(),function(t){var a=D(e.node(t));n.setNode(t,Be(Y(a,Fr),Vr)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var a=D(e.edge(t));n.setEdge(t,$({},Br,Y(a,Ar),T(a,Gr)))}),n}function Dr(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function qr(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",i,"_ep")}})}function $r(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Wr(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function zr(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,u=i.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),a=Math.max(a,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=o,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),i.width=r-n+o,i.height=a-t+u}function Xr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=t),r.points.unshift(re(t,i)),r.points.push(re(a,o))})}function Ur(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Hr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Jr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(M(r.borderLeft)),o=e.node(M(r.borderRight));r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Zr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Kr(e){var n=j(e);f(n,function(r){var t=0;f(r,function(a,i){var o=e.node(a);o.order=i+t,f(o.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:o.rank,order:i+ ++t,e:u.e,label:u.label},"_se")}),delete o.selfEdges})})}function Qr(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,i=t.y,o=r.x-a,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*o/3,y:i-u},{x:a+5*o/6,y:i-u},{x:a+o,y:i},{x:a+5*o/6,y:i+u},{x:a+2*o/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}function Y(e,n){return S(T(e,n),Number)}function D(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{at as l}; diff --git a/static/js/md-layout-C6gsB80Q.js b/static/js/md-layout-C6gsB80Q.js new file mode 100644 index 000000000..30428493d --- /dev/null +++ b/static/js/md-layout-C6gsB80Q.js @@ -0,0 +1 @@ +import{G as g}from"./md-graph-6STGQExD.js";import{b as Te,p as ce,q as le,g as z,e as ee,l as j,o as Ie,s as Me,c as Se,u as Fe,d as f,i as m,f as _,v as x,r as M}from"./md-_baseUniq-DU1ET3rn.js";import{f as O,b as he,a as je,c as Ve,d as Ae,t as V,m as w,e as P,h as ve,g as U,l as T,i as Be}from"./md-_basePickBy-B78WwQFo.js";import{b6 as Ge,b7 as Ye,b8 as De,aO as qe,b9 as $e,aS as pe,aR as we,ba as We,aN as q,aA as ze,aU as Ue,aC as Xe,bb as $}from"./md-index-B8Nim9kS.js";function He(e){return Ge(Ye(e,void 0,O),e+"")}var Je=1,Ze=4;function Ke(e){return Te(e,Je|Ze)}function Qe(e,n){return e==null?e:De(e,ce(n),qe)}function en(e,n){return e&&le(e,ce(n))}function nn(e,n){return e>n}function S(e,n){var r={};return n=z(n),le(e,function(t,a,i){$e(r,a,n(t,a,i))}),r}function y(e){return e&&e.length?he(e,pe,nn):void 0}function X(e,n){return e&&e.length?he(e,z(n),je):void 0}function rn(e,n){var r=e.length;for(e.sort(n);r--;)e[r]=e[r].value;return e}function tn(e,n){if(e!==n){var r=e!==void 0,t=e===null,a=e===e,i=ee(e),o=n!==void 0,u=n===null,d=n===n,s=ee(n);if(!u&&!s&&!i&&e>n||i&&o&&d&&!u&&!s||t&&o&&d||!r&&d||!a)return 1;if(!t&&!i&&!s&&e=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function on(e,n,r){n.length?n=j(n,function(i){return we(i)?function(o){return Ie(o,i.length===1?i[0]:i)}:i}):n=[pe];var t=-1;n=j(n,We(z));var a=Ve(e,function(i,o,u){var d=j(n,function(s){return s(i)});return{criteria:d,index:++t,value:i}});return rn(a,function(i,o){return an(i,o,r)})}function un(e,n){return Ae(e,n,function(r,t){return Me(e,t)})}var I=He(function(e,n){return e==null?{}:un(e,n)}),dn=Math.ceil,sn=Math.max;function fn(e,n,r,t){for(var a=-1,i=sn(dn((n-e)/(r||1)),0),o=Array(i);i--;)o[++a]=e,e+=r;return o}function cn(e){return function(n,r,t){return t&&typeof t!="number"&&q(n,r,t)&&(r=t=void 0),n=V(n),r===void 0?(r=n,n=0):r=V(r),t=t===void 0?n1&&q(e,n[0],n[1])?n=[]:r>2&&q(n[0],n[1],n[2])&&(n=[n[0]]),on(e,Se(n),[])}),ln=0;function H(e){var n=++ln;return Fe(e)+n}function hn(e,n,r){for(var t=-1,a=e.length,i=n.length,o={};++t0;--u)if(o=n[u].dequeue(),o){t=t.concat(A(e,n,r,o,!0));break}}}return t}function A(e,n,r,t,a){var i=a?[]:void 0;return f(e.inEdges(t.v),function(o){var u=e.edge(o),d=e.node(o.v);a&&i.push({v:o.v,w:o.w}),d.out-=u,W(n,r,d)}),f(e.outEdges(t.v),function(o){var u=e.edge(o),d=o.w,s=e.node(d);s.in-=u,W(n,r,s)}),e.removeNode(t.v),i}function yn(e,n){var r=new g,t=0,a=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),a=Math.max(a,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var i=E(a+t+3).map(function(){return new pn}),o=t+1;return f(r.nodes(),function(u){W(i,o,r.node(u))}),{graph:r,buckets:i,zeroIdx:o}}function W(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function kn(e){var n=e.graph().acyclicer==="greedy"?mn(e,r(e)):xn(e);f(n,function(t){var a=e.edge(t);e.removeEdge(t),a.forwardName=t.name,a.reversed=!0,e.setEdge(t.w,t.v,a,H("rev"))});function r(t){return function(a){return t.edge(a).weight}}}function xn(e){var n=[],r={},t={};function a(i){Object.prototype.hasOwnProperty.call(t,i)||(t[i]=!0,r[i]=!0,f(e.outEdges(i),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?n.push(o):a(o.w)}),delete r[i])}return f(e.nodes(),a),n}function En(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function L(e,n,r,t){var a;do a=H(t);while(e.hasNode(a));return r.dummy=n,e.setNode(a,r),a}function On(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+a.weight,minlen:Math.max(t.minlen,a.minlen)})}),n}function be(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function re(e,n){var r=e.x,t=e.y,a=n.x-r,i=n.y-t,o=e.width/2,u=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(i)*o>Math.abs(a)*u?(i<0&&(u=-u),d=u*a/i,s=u):(a<0&&(o=-o),d=o,s=o*i/a),{x:r+d,y:t+s}}function F(e){var n=w(E(me(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),a=t.rank;m(a)||(n[a][t.order]=r)}),n}function Ln(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);ve(t,"rank")&&(t.rank-=n)})}function Nn(e){var n=P(w(e.nodes(),function(i){return e.node(i).rank})),r=[];f(e.nodes(),function(i){var o=e.node(i).rank-n;r[o]||(r[o]=[]),r[o].push(i)});var t=0,a=e.graph().nodeRankFactor;f(r,function(i,o){m(i)&&o%a!==0?--t:t&&f(i,function(u){e.node(u).rank+=t})})}function te(e,n,r,t){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=t),L(e,"border",a,n)}function me(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function Pn(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function Cn(e,n){return n()}function _n(e){function n(r){var t=e.children(r),a=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,o=a.maxRank+1;io.lim&&(u=o,d=!0);var s=_(n.edges(),function(c){return d===oe(e,e.node(c.v),u)&&d!==oe(e,e.node(c.w),u)});return X(s,function(c){return C(n,c)})}function Pe(e,n,r,t){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(t.v,t.w,{}),K(e),Z(e,n),$n(e,n)}function $n(e,n){var r=U(e.nodes(),function(a){return!n.node(a).parent}),t=Dn(e,r);t=t.slice(1),f(t,function(a){var i=e.node(a).parent,o=n.edge(a,i),u=!1;o||(o=n.edge(i,a),u=!0),n.node(a).rank=n.node(i).rank+(u?o.minlen:-o.minlen)})}function Wn(e,n,r){return e.hasEdge(n,r)}function oe(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function zn(e){switch(e.graph().ranker){case"network-simplex":ue(e);break;case"tight-tree":Xn(e);break;case"longest-path":Un(e);break;default:ue(e)}}var Un=J;function Xn(e){J(e),ye(e)}function ue(e){k(e)}function Hn(e){var n=L(e,"root",{},"_root"),r=Jn(e),t=y(x(r))-1,a=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(o){e.edge(o).minlen*=a});var i=Zn(e)+1;f(e.children(),function(o){Ce(e,n,a,i,t,r,o)}),e.graph().nodeRankFactor=a}function Ce(e,n,r,t,a,i,o){var u=e.children(o);if(!u.length){o!==n&&e.setEdge(n,o,{weight:0,minlen:r});return}var d=te(e,"_bt"),s=te(e,"_bb"),c=e.node(o);e.setParent(d,o),c.borderTop=d,e.setParent(s,o),c.borderBottom=s,f(u,function(l){Ce(e,n,r,t,a,i,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,N=v!==p?1:a-i[o]+1;e.setEdge(d,v,{weight:b,minlen:N,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:N,nestingEdge:!0})}),e.parent(o)||e.setEdge(n,d,{weight:0,minlen:a+i[o]})}function Jn(e){var n={};function r(t,a){var i=e.children(t);i&&i.length&&f(i,function(o){r(o,a+1)}),n[t]=a}return f(e.children(),function(t){r(t,1)}),n}function Zn(e){return M(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Kn(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Qn(e,n,r){var t={},a;f(r,function(i){for(var o=e.parent(i),u,d;o;){if(u=e.parent(o),u?(d=t[u],t[u]=o):(d=a,a=o),d&&d!==o){n.setEdge(d,o);return}o=u}})}function er(e,n,r){var t=nr(e),a=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(i){return e.node(i)});return f(e.nodes(),function(i){var o=e.node(i),u=e.parent(i);(o.rank===n||o.minRank<=n&&n<=o.maxRank)&&(a.setNode(i),a.setParent(i,u||t),f(e[r](i),function(d){var s=d.v===i?d.w:d.v,c=a.edge(s,i),l=m(c)?0:c.weight;a.setEdge(s,i,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&a.setNode(i,{borderLeft:o.borderLeft[n],borderRight:o.borderRight[n]}))}),a}function nr(e){for(var n;e.hasNode(n=H("_root")););return n}function rr(e,n){for(var r=0,t=1;t0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function ar(e){var n={},r=_(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),a=w(E(t+1),function(){return[]});function i(u){if(!ve(n,u)){n[u]=!0;var d=e.node(u);a[d.rank].push(u),f(e.successors(u),i)}}var o=R(r,function(u){return e.node(u).rank});return f(o,i),a}function ir(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var a=M(t,function(i,o){var u=e.edge(o),d=e.node(o.v);return{sum:i.sum+u.weight*d.order,weight:i.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}function or(e,n){var r={};f(e,function(a,i){var o=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};m(a.barycenter)||(o.barycenter=a.barycenter,o.weight=a.weight)}),f(n.edges(),function(a){var i=r[a.v],o=r[a.w];!m(i)&&!m(o)&&(o.indegree++,i.out.push(r[a.w]))});var t=_(r,function(a){return!a.indegree});return ur(t)}function ur(e){var n=[];function r(i){return function(o){o.merged||(m(o.barycenter)||m(i.barycenter)||o.barycenter>=i.barycenter)&&dr(i,o)}}function t(i){return function(o){o.in.push(i),--o.indegree===0&&e.push(o)}}for(;e.length;){var a=e.pop();n.push(a),f(a.in.reverse(),r(a)),f(a.out,t(a))}return w(_(n,function(i){return!i.merged}),function(i){return I(i,["vs","i","barycenter","weight"])})}function dr(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function sr(e,n){var r=Pn(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,a=R(r.rhs,function(c){return-c.i}),i=[],o=0,u=0,d=0;t.sort(fr(!!n)),d=de(i,a,d),f(t,function(c){d+=c.vs.length,i.push(c.vs),o+=c.barycenter*c.weight,u+=c.weight,d=de(i,a,d)});var s={vs:O(i)};return u&&(s.barycenter=o/u,s.weight=u),s}function de(e,n,r){for(var t;n.length&&(t=T(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function fr(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function _e(e,n,r,t){var a=e.children(n),i=e.node(n),o=i?i.borderLeft:void 0,u=i?i.borderRight:void 0,d={};o&&(a=_(a,function(p){return p!==o&&p!==u}));var s=ir(e,a);f(s,function(p){if(e.children(p.v).length){var b=_e(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&lr(p,b)}});var c=or(s,r);cr(c,d);var l=sr(c,t);if(o&&(l.vs=O([o,l.vs,u]),e.predecessors(o).length)){var h=e.node(e.predecessors(o)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function cr(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function lr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function hr(e){var n=me(e),r=se(e,E(1,n+1),"inEdges"),t=se(e,E(n-1,-1,-1),"outEdges"),a=ar(e);fe(e,a);for(var i=Number.POSITIVE_INFINITY,o,u=0,d=0;d<4;++u,++d){vr(u%2?r:t,u%4>=2),a=F(e);var s=rr(e,a);so||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)i.push(d);return{path:a.concat(i.reverse()),lca:s}}function br(e){var n={},r=0;function t(a){var i=r;f(e.children(a),t),n[a]={low:i,lim:r++}}return f(e.children(),t),n}function mr(e,n){var r={};function t(a,i){var o=0,u=0,d=a.length,s=T(i);return f(i,function(c,l){var h=yr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(i.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var N=e.node(b),Q=N.order;(Qs)&&Re(r,h,c)})})}function a(i,o){var u=-1,d,s=0;return f(o,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(o,s,l,u,d),s=l,u=d)}t(o,s,o.length,d,i.length)}),o}return M(n,a),r}function yr(e,n){if(e.node(n).dummy)return U(e.predecessors(n),function(r){return e.node(r).dummy})}function Re(e,n,r){if(n>r){var t=n;n=r,r=t}var a=e[n];a||(e[n]=a={}),a[r]=!0}function kr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function xr(e,n,r,t){var a={},i={},o={};return f(n,function(u){f(u,function(d,s){a[d]=d,i[d]=d,o[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=R(c,function(b){return o[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];i[s]===s&&d{var t=r(" buildLayoutGraph",()=>qr(e));r(" runLayout",()=>Mr(t,r)),r(" updateInputGraph",()=>Sr(e,t))})}function Mr(e,n){n(" makeSpaceForEdgeLabels",()=>$r(e)),n(" removeSelfEdges",()=>Qr(e)),n(" acyclic",()=>kn(e)),n(" nestingGraph.run",()=>Hn(e)),n(" rank",()=>zn(be(e))),n(" injectEdgeLabelProxies",()=>Wr(e)),n(" removeEmptyRanks",()=>Nn(e)),n(" nestingGraph.cleanup",()=>Kn(e)),n(" normalizeRanks",()=>Ln(e)),n(" assignRankMinMax",()=>zr(e)),n(" removeEdgeLabelProxies",()=>Ur(e)),n(" normalize.run",()=>Sn(e)),n(" parentDummyChains",()=>pr(e)),n(" addBorderSegments",()=>_n(e)),n(" order",()=>hr(e)),n(" insertSelfEdges",()=>et(e)),n(" adjustCoordinateSystem",()=>Rn(e)),n(" position",()=>Tr(e)),n(" positionSelfEdges",()=>nt(e)),n(" removeBorderNodes",()=>Kr(e)),n(" normalize.undo",()=>jn(e)),n(" fixupEdgeLabelCoords",()=>Jr(e)),n(" undoCoordinateSystem",()=>Tn(e)),n(" translateGraph",()=>Xr(e)),n(" assignNodeIntersects",()=>Hr(e)),n(" reversePoints",()=>Zr(e)),n(" acyclic.undo",()=>En(e))}function Sr(e,n){f(e.nodes(),function(r){var t=e.node(r),a=n.node(r);t&&(t.x=a.x,t.y=a.y,n.children(r).length&&(t.width=a.width,t.height=a.height))}),f(e.edges(),function(r){var t=e.edge(r),a=n.edge(r);t.points=a.points,Object.prototype.hasOwnProperty.call(a,"x")&&(t.x=a.x,t.y=a.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var Fr=["nodesep","edgesep","ranksep","marginx","marginy"],jr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Vr=["acyclicer","ranker","rankdir","align"],Ar=["width","height"],Br={width:0,height:0},Gr=["minlen","weight","width","height","labeloffset"],Yr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Dr=["labelpos"];function qr(e){var n=new g({multigraph:!0,compound:!0}),r=D(e.graph());return n.setGraph($({},jr,Y(r,Fr),I(r,Vr))),f(e.nodes(),function(t){var a=D(e.node(t));n.setNode(t,Be(Y(a,Ar),Br)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var a=D(e.edge(t));n.setEdge(t,$({},Yr,Y(a,Gr),I(a,Dr)))}),n}function $r(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Wr(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),a=e.node(n.w),i={rank:(a.rank-t.rank)/2+t.rank,e:n};L(e,"edge-proxy",i,"_ep")}})}function zr(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Ur(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Xr(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,a=0,i=e.graph(),o=i.marginx||0,u=i.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),a=Math.max(a,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=o,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),i.width=r-n+o,i.height=a-t+u}function Hr(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),a=e.node(n.w),i,o;r.points?(i=r.points[0],o=r.points[r.points.length-1]):(r.points=[],i=a,o=t),r.points.unshift(re(t,i)),r.points.push(re(a,o))})}function Jr(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Zr(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Kr(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(T(r.borderLeft)),o=e.node(T(r.borderRight));r.width=Math.abs(o.x-i.x),r.height=Math.abs(a.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function Qr(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function et(e){var n=F(e);f(n,function(r){var t=0;f(r,function(a,i){var o=e.node(a);o.order=i+t,f(o.selfEdges,function(u){L(e,"selfedge",{width:u.label.width,height:u.label.height,rank:o.rank,order:i+ ++t,e:u.e,label:u.label},"_se")}),delete o.selfEdges})})}function nt(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),a=t.x+t.width/2,i=t.y,o=r.x-a,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:a+2*o/3,y:i-u},{x:a+5*o/6,y:i-u},{x:a+o,y:i},{x:a+5*o/6,y:i+u},{x:a+2*o/3,y:i+u}],r.label.x=r.x,r.label.y=r.y}})}function Y(e,n){return S(I(e,n),Number)}function D(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{ot as l}; diff --git a/static/js/md-linear-BdLRedgo.js b/static/js/md-linear-C1jk9ODm.js similarity index 97% rename from static/js/md-linear-BdLRedgo.js rename to static/js/md-linear-C1jk9ODm.js index b53920b8c..f43b5a478 100644 --- a/static/js/md-linear-BdLRedgo.js +++ b/static/js/md-linear-C1jk9ODm.js @@ -1 +1 @@ -import{b1 as un,b2 as I,b3 as U,b4 as Y,b5 as fn}from"./md-index-BVqvVggs.js";import{i as cn}from"./md-init-Gi6I4Gst.js";function F(n,t){return n==null||t==null?NaN:nt?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,s=u.length){if(o>>1;e(u[h],c)<0?o=h+1:s=h}while(o>>1;e(u[h],c)<=0?o=h+1:s=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function ln(n){return n===null?NaN:+n}const sn=_(F),dn=sn.right;_(ln).center;const gn=Math.sqrt(50),yn=Math.sqrt(10),Mn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=gn?10:f>=yn?5:f>=Mn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function jn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function Pn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var zn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=zn.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $n(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Fn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Sn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Fn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rn(n){var t=n.grouping===void 0||n.thousands===void 0?J:jn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:Pn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var l=h.fill,p=h.align,y=h.sign,b=h.symbol,k=h.zero,S=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||l==="0"&&p==="=")&&(k=!0,l="0",p="=");var en=b==="$"?e:b==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=b==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=$n(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function s(h,l){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(l)/3)))*3,b=Math.pow(10,-y),k=Q[8+y/3];return function(S){return p(b*S)+k}}return{format:o,formatPrefix:s}}var $,tn,rn;En({thousands:",",grouping:[3],currency:["$",""]});function En(n){return $=Rn(n),tn=$.format,rn=$.formatPrefix,$}function Dn(n){return Math.max(0,-v(Math.abs(n)))}function Tn(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function In(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function Ln(n){return function(){return n}}function qn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:Ln(isNaN(t)?NaN:.5)}function Cn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Bn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?Gn:Bn,c=o=null,h}function h(l){return l==null||isNaN(l=+l)?f:(c||(c=u(n.map(r),t,e)))(r(a(l)))}return h.invert=function(l){return a(i((o||(o=u(t,n.map(r),I)))(l)))},h.domain=function(l){return arguments.length?(n=Array.from(l,qn),s()):n.slice()},h.range=function(l){return arguments.length?(t=Array.from(l),s()):t.slice()},h.rangeRound=function(l){return t=Array.from(l),e=bn,s()},h.clamp=function(l){return arguments.length?(a=l?!0:A,s()):a!==A},h.interpolate=function(l){return arguments.length?(e=l,s()):e},h.unknown=function(l){return arguments.length?(f=l,h):f},function(l,p){return r=l,i=p,s()}}function Xn(){return Vn()(A,A)}function Un(n,t,e,r){var i=wn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=Tn(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=In(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Dn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Yn(n){var t=n.domain;return n.ticks=function(e){var r=t();return pn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Un(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,s=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Zn(){var n=Xn();return n.copy=function(){return On(n,Zn())},cn.apply(n,arguments),Yn(n)}export{On as a,_ as b,Xn as c,Zn as l,wn as t}; +import{b1 as un,b2 as I,b3 as U,b4 as fn,b5 as Y}from"./md-index-B8Nim9kS.js";import{i as cn}from"./md-init-Gi6I4Gst.js";function F(n,t){return n==null||t==null?NaN:nt?1:n>=t?0:NaN}function hn(n,t){return n==null||t==null?NaN:tn?1:t>=n?0:NaN}function _(n){let t,e,r;n.length!==2?(t=F,e=(u,c)=>F(n(u),c),r=(u,c)=>n(u)-c):(t=n===F||n===hn?n:mn,e=n,r=n);function i(u,c,o=0,s=u.length){if(o>>1;e(u[h],c)<0?o=h+1:s=h}while(o>>1;e(u[h],c)<=0?o=h+1:s=h}while(oo&&r(u[h-1],c)>-r(u[h],c)?h-1:h}return{left:i,center:a,right:f}}function mn(){return 0}function ln(n){return n===null?NaN:+n}const sn=_(F),dn=sn.right;_(ln).center;const gn=Math.sqrt(50),yn=Math.sqrt(10),Mn=Math.sqrt(2);function R(n,t,e){const r=(t-n)/Math.max(0,e),i=Math.floor(Math.log10(r)),f=r/Math.pow(10,i),a=f>=gn?10:f>=yn?5:f>=Mn?2:1;let u,c,o;return i<0?(o=Math.pow(10,-i)/a,u=Math.round(n*o),c=Math.round(t*o),u/ot&&--c,o=-o):(o=Math.pow(10,i)*a,u=Math.round(n/o),c=Math.round(t/o),u*ot&&--c),c0))return[];if(n===t)return[n];const r=t=i))return[];const u=f-i+1,c=new Array(u);if(r)if(a<0)for(let o=0;o=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function E(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,r=n.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+n.slice(e+1)]}function v(n){return n=E(Math.abs(n)),n?n[1]:NaN}function jn(n,t){return function(e,r){for(var i=e.length,f=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),f.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return f.reverse().join(t)}}function Pn(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var zn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function D(n){if(!(t=zn.exec(n)))throw new Error("invalid format: "+n);var t;return new B({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}D.prototype=B.prototype;function B(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $n(n){n:for(var t=n.length,e=1,r=-1,i;e0&&(r=0);break}return r>0?n.slice(0,r)+n.slice(i+1):n}var nn;function Fn(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1],f=i-(nn=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return f===a?r:f>a?r+new Array(f-a+1).join("0"):f>0?r.slice(0,f)+"."+r.slice(f):"0."+new Array(1-f).join("0")+E(n,Math.max(0,t+f-1))[0]}function Z(n,t){var e=E(n,t);if(!e)return n+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const H={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:Sn,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>Z(n*100,t),r:Z,s:Fn,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function J(n){return n}var K=Array.prototype.map,Q=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Rn(n){var t=n.grouping===void 0||n.thousands===void 0?J:jn(K.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",r=n.currency===void 0?"":n.currency[1]+"",i=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?J:Pn(K.call(n.numerals,String)),a=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",c=n.nan===void 0?"NaN":n.nan+"";function o(h){h=D(h);var l=h.fill,p=h.align,y=h.sign,b=h.symbol,k=h.zero,S=h.width,T=h.comma,w=h.precision,G=h.trim,d=h.type;d==="n"?(T=!0,d="g"):H[d]||(w===void 0&&(w=12),G=!0,d="g"),(k||l==="0"&&p==="=")&&(k=!0,l="0",p="=");var en=b==="$"?e:b==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",on=b==="$"?r:/[%p]/.test(d)?a:"",O=H[d],an=/[defgprs%]/.test(d);w=w===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function V(m){var N=en,g=on,x,X,j;if(d==="c")g=O(m)+g,m="";else{m=+m;var P=m<0||1/m<0;if(m=isNaN(m)?c:O(Math.abs(m),w),G&&(m=$n(m)),P&&+m==0&&y!=="+"&&(P=!1),N=(P?y==="("?y:u:y==="-"||y==="("?"":y)+N,g=(d==="s"?Q[8+nn/3]:"")+g+(P&&y==="("?")":""),an){for(x=-1,X=m.length;++xj||j>57){g=(j===46?i+m.slice(x+1):m.slice(x))+g,m=m.slice(0,x);break}}}T&&!k&&(m=t(m,1/0));var z=N.length+m.length+g.length,M=z>1)+N+m+g+M.slice(z);break;default:m=M+N+m+g;break}return f(m)}return V.toString=function(){return h+""},V}function s(h,l){var p=o((h=D(h),h.type="f",h)),y=Math.max(-8,Math.min(8,Math.floor(v(l)/3)))*3,b=Math.pow(10,-y),k=Q[8+y/3];return function(S){return p(b*S)+k}}return{format:o,formatPrefix:s}}var $,tn,rn;En({thousands:",",grouping:[3],currency:["$",""]});function En(n){return $=Rn(n),tn=$.format,rn=$.formatPrefix,$}function Dn(n){return Math.max(0,-v(Math.abs(n)))}function Tn(n,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(v(t)/3)))*3-v(Math.abs(n)))}function In(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,v(t)-v(n))+1}function Ln(n){return function(){return n}}function qn(n){return+n}var W=[0,1];function A(n){return n}function q(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:Ln(isNaN(t)?NaN:.5)}function Cn(n,t){var e;return n>t&&(e=n,n=t,t=e),function(r){return Math.max(n,Math.min(t,r))}}function Bn(n,t,e){var r=n[0],i=n[1],f=t[0],a=t[1];return i2?Gn:Bn,c=o=null,h}function h(l){return l==null||isNaN(l=+l)?f:(c||(c=u(n.map(r),t,e)))(r(a(l)))}return h.invert=function(l){return a(i((o||(o=u(t,n.map(r),I)))(l)))},h.domain=function(l){return arguments.length?(n=Array.from(l,qn),s()):n.slice()},h.range=function(l){return arguments.length?(t=Array.from(l),s()):t.slice()},h.rangeRound=function(l){return t=Array.from(l),e=bn,s()},h.clamp=function(l){return arguments.length?(a=l?!0:A,s()):a!==A},h.interpolate=function(l){return arguments.length?(e=l,s()):e},h.unknown=function(l){return arguments.length?(f=l,h):f},function(l,p){return r=l,i=p,s()}}function Xn(){return Vn()(A,A)}function Un(n,t,e,r){var i=wn(n,t,e),f;switch(r=D(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(t));return r.precision==null&&!isNaN(f=Tn(i,a))&&(r.precision=f),rn(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(f=In(i,Math.max(Math.abs(n),Math.abs(t))))&&(r.precision=f-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(f=Dn(i))&&(r.precision=f-(r.type==="%")*2);break}}return tn(r)}function Yn(n){var t=n.domain;return n.ticks=function(e){var r=t();return pn(r[0],r[r.length-1],e??10)},n.tickFormat=function(e,r){var i=t();return Un(i[0],i[i.length-1],e??10,r)},n.nice=function(e){e==null&&(e=10);var r=t(),i=0,f=r.length-1,a=r[i],u=r[f],c,o,s=10;for(u0;){if(o=L(a,u,e),o===c)return r[i]=a,r[f]=u,t(r);if(o>0)a=Math.floor(a/o)*o,u=Math.ceil(u/o)*o;else if(o<0)a=Math.ceil(a*o)/o,u=Math.floor(u*o)/o;else break;c=o}return n},n}function Zn(){var n=Xn();return n.copy=function(){return On(n,Zn())},cn.apply(n,arguments),Yn(n)}export{On as a,_ as b,Xn as c,Zn as l,wn as t}; diff --git a/static/js/md-mindmap-definition-GWI6TPTV-DlQyyV9l.js b/static/js/md-mindmap-definition-GWI6TPTV-ZcReOJus.js similarity index 99% rename from static/js/md-mindmap-definition-GWI6TPTV-DlQyyV9l.js rename to static/js/md-mindmap-definition-GWI6TPTV-ZcReOJus.js index b9381d7df..b55d6b554 100644 --- a/static/js/md-mindmap-definition-GWI6TPTV-DlQyyV9l.js +++ b/static/js/md-mindmap-definition-GWI6TPTV-ZcReOJus.js @@ -1,4 +1,4 @@ -import{aH as at,aI as Nt,_ as S,l as z,j as Dt,aj as mt,O as Ot,d as ot,G as At,V as It,B as tt,i as et,W as Ct,X as Rt,Y as xt}from"./md-index-BVqvVggs.js";import{c as pt}from"./md-cytoscape.esm-C21_TrUD.js";var dt={exports:{}},it={exports:{}},nt={exports:{}},ut;function Mt(){return ut||(ut=1,function(I,w){(function(m,y){I.exports=y()})(at,function(){return function(f){var m={};function y(r){if(m[r])return m[r].exports;var t=m[r]={i:r,l:!1,exports:{}};return f[r].call(t.exports,t,t.exports,y),t.l=!0,t.exports}return y.m=f,y.c=m,y.i=function(r){return r},y.d=function(r,t,e){y.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},y.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return y.d(t,"a",t),t},y.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},y.p="",y(y.s=26)}([function(f,m,y){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,f.exports=r},function(f,m,y){var r=y(2),t=y(8),e=y(9);function i(g,a,v){r.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=a}i.prototype=Object.create(r.prototype);for(var o in r)i[o]=r[o];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,a){for(var v=this.getOtherEnd(g),n=a.getGraphManager().getRoot();;){if(v.getOwner()==a)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=i},function(f,m,y){function r(t){this.vGraphObject=t}f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(13),i=y(0),o=y(16),g=y(4);function a(n,c,l,E){l==null&&E==null&&(E=c),r.call(this,E),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=E,this.edges=[],this.graphManager=n,l!=null&&c!=null?this.rect=new e(c.x,c.y,l.width,l.height):this.rect=new e}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(n){this.rect.width=n},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(n){this.rect.height=n},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(n,c){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=c.width,this.rect.height=c.height},a.prototype.setCenter=function(n,c){this.rect.x=n-this.rect.width/2,this.rect.y=c-this.rect.height/2},a.prototype.setLocation=function(n,c){this.rect.x=n,this.rect.y=c},a.prototype.moveBy=function(n,c){this.rect.x+=n,this.rect.y+=c},a.prototype.getEdgeListToNode=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(E.target==n){if(E.source!=l)throw"Incorrect edge source!";c.push(E)}}),c},a.prototype.getEdgesBetween=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(!(E.source==l||E.target==l))throw"Incorrect edge source and/or target";(E.target==n||E.source==n)&&c.push(E)}),c},a.prototype.getNeighborsList=function(){var n=new Set,c=this;return c.edges.forEach(function(l){if(l.source==c)n.add(l.target);else{if(l.target!=c)throw"Incorrect incidency!";n.add(l.source)}}),n},a.prototype.withChildren=function(){var n=new Set,c,l;if(n.add(this),this.child!=null)for(var E=this.child.getNodes(),T=0;Tc&&(this.rect.x-=(this.labelWidth-c)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(n){var c=this.rect.x;c>i.WORLD_BOUNDARY?c=i.WORLD_BOUNDARY:c<-i.WORLD_BOUNDARY&&(c=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var E=new g(c,l),T=n.inverseTransformPoint(E);this.setLocation(T.x,T.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=a},function(f,m,y){function r(t,e){t==null&&e==null?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(0),i=y(6),o=y(3),g=y(1),a=y(13),v=y(12),n=y(11);function c(E,T,D){r.call(this,D),this.estimatedSize=t.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=E,T!=null&&T instanceof i?this.graphManager=T:T!=null&&T instanceof Layout&&(this.graphManager=T.graphManager)}c.prototype=Object.create(r.prototype);for(var l in r)c[l]=r[l];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(E,T,D){if(T==null&&D==null){var L=E;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}else{var O=E;if(!(this.getNodes().indexOf(T)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(T.owner==D.owner&&T.owner==this))throw"Both owners must be this graph!";return T.owner!=D.owner?null:(O.source=T,O.target=D,O.isInterGraph=!1,this.getEdges().push(O),T.edges.push(O),D!=T&&D.edges.push(O),O)}},c.prototype.remove=function(E){var T=E;if(E instanceof o){if(T==null)throw"Node is null!";if(!(T.owner!=null&&T.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=T.edges.slice(),L,O=D.length,d=0;d-1&&h>-1))throw"Source and/or target doesn't know this edge!";L.source.edges.splice(s,1),L.target!=L.source&&L.target.edges.splice(h,1);var N=L.source.owner.getEdges().indexOf(L);if(N==-1)throw"Not in owner's edge list!";L.source.owner.getEdges().splice(N,1)}},c.prototype.updateLeftTop=function(){for(var E=t.MAX_VALUE,T=t.MAX_VALUE,D,L,O,d=this.getNodes(),N=d.length,s=0;sD&&(E=D),T>L&&(T=L)}return E==t.MAX_VALUE?null:(d[0].getParent().paddingLeft!=null?O=d[0].getParent().paddingLeft:O=this.margin,this.left=T-O,this.top=E-O,new v(this.left,this.top))},c.prototype.updateBounds=function(E){for(var T=t.MAX_VALUE,D=-t.MAX_VALUE,L=t.MAX_VALUE,O=-t.MAX_VALUE,d,N,s,h,u,p=this.nodes,A=p.length,C=0;Cd&&(T=d),Ds&&(L=s),Od&&(T=d),Ds&&(L=s),O=this.nodes.length){var A=0;D.forEach(function(C){C.owner==E&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},f.exports=c},function(f,m,y){var r,t=y(1);function e(i){r=y(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(i,o);return this.setRootGraph(g),this.rootGraph},e.prototype.add=function(i,o,g,a,v){if(g==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return i.parent=o,o.child=i,i}else{v=g,a=o,g=i;var n=a.getOwner(),c=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(c!=null&&c.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==c)return g.isInterGraph=!1,n.add(g,a,v);if(g.isInterGraph=!0,g.source=a,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},e.prototype.remove=function(i){if(i instanceof r){var o=i;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());for(var a,v=g.length,n=0;n=i.getRight()?o[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight()):i.getX()<=e.getX()&&i.getRight()>=e.getRight()&&(o[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight())),e.getY()<=i.getY()&&e.getBottom()>=i.getBottom()?o[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom()):i.getY()<=e.getY()&&i.getBottom()>=e.getBottom()&&(o[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom()));var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX()&&(v=1);var n=v*o[0],c=o[1]/v;o[0]n)return o[0]=g,o[1]=l,o[2]=v,o[3]=p,!1;if(av)return o[0]=c,o[1]=a,o[2]=h,o[3]=n,!1;if(gv?(o[0]=T,o[1]=D,x=!0):(o[0]=E,o[1]=l,x=!0):U===M&&(g>v?(o[0]=c,o[1]=l,x=!0):(o[0]=L,o[1]=D,x=!0)),-X===M?v>g?(o[2]=u,o[3]=p,_=!0):(o[2]=h,o[3]=s,_=!0):X===M&&(v>g?(o[2]=N,o[3]=s,_=!0):(o[2]=A,o[3]=p,_=!0)),x&&_)return!1;if(g>v?a>n?(G=this.getCardinalDirection(U,M,4),F=this.getCardinalDirection(X,M,2)):(G=this.getCardinalDirection(-U,M,3),F=this.getCardinalDirection(-X,M,1)):a>n?(G=this.getCardinalDirection(-U,M,1),F=this.getCardinalDirection(-X,M,3)):(G=this.getCardinalDirection(U,M,2),F=this.getCardinalDirection(X,M,4)),!x)switch(G){case 1:Y=l,b=g+-d/M,o[0]=b,o[1]=Y;break;case 2:b=L,Y=a+O*M,o[0]=b,o[1]=Y;break;case 3:Y=D,b=g+d/M,o[0]=b,o[1]=Y;break;case 4:b=T,Y=a+-O*M,o[0]=b,o[1]=Y;break}if(!_)switch(F){case 1:H=s,k=v+-R/M,o[2]=k,o[3]=H;break;case 2:k=A,H=n+C*M,o[2]=k,o[3]=H;break;case 3:H=p,k=v+R/M,o[2]=k,o[3]=H;break;case 4:k=u,H=n+-C*M,o[2]=k,o[3]=H;break}}return!1},t.getCardinalDirection=function(e,i,o){return e>i?o:1+o%4},t.getIntersection=function(e,i,o,g){if(g==null)return this.getIntersection2(e,i,o);var a=e.x,v=e.y,n=i.x,c=i.y,l=o.x,E=o.y,T=g.x,D=g.y,L=void 0,O=void 0,d=void 0,N=void 0,s=void 0,h=void 0,u=void 0,p=void 0,A=void 0;return d=c-v,s=a-n,u=n*v-a*c,N=D-E,h=l-T,p=T*E-l*D,A=d*h-N*s,A===0?null:(L=(s*p-h*u)/A,O=(N*u-d*p)/A,new r(L,O))},t.angleOfVector=function(e,i,o,g){var a=void 0;return e!==o?(a=Math.atan((g-i)/(o-e)),o0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},f.exports=r},function(f,m,y){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,f.exports=r},function(f,m,y){var r=function(){function a(v,n){for(var c=0;c"u"?"undefined":r(e);return e==null||i!="object"&&i!="function"},f.exports=t},function(f,m,y){function r(l){if(Array.isArray(l)){for(var E=0,T=Array(l.length);E0&&E;){for(d.push(s[0]);d.length>0&&E;){var h=d[0];d.splice(0,1),O.add(h);for(var u=h.getEdges(),L=0;L-1&&s.splice(R,1)}O=new Set,N=new Map}}return l},c.prototype.createDummyNodesForBendpoints=function(l){for(var E=[],T=l.source,D=this.graphManager.calcLowestCommonAncestor(l.source,l.target),L=0;L0){for(var D=this.edgeToDummyNodes.get(T),L=0;L=0&&E.splice(p,1);var A=N.getNeighborsList();A.forEach(function(x){if(T.indexOf(x)<0){var _=D.get(x),U=_-1;U==1&&h.push(x),D.set(x,U)}})}T=T.concat(h),(E.length==1||E.length==2)&&(L=!0,O=E[0])}return O},c.prototype.setGraphManager=function(l){this.graphManager=l},f.exports=c},function(f,m,y){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},f.exports=r},function(f,m,y){var r=y(4);function t(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(e){this.lworldExtX=e},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(e){this.lworldExtY=e},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},t.prototype.transformX=function(e){var i=0,o=this.lworldExtX;return o!=0&&(i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/o),i},t.prototype.transformY=function(e){var i=0,o=this.lworldExtY;return o!=0&&(i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/o),i},t.prototype.inverseTransformX=function(e){var i=0,o=this.ldeviceExtX;return o!=0&&(i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/o),i},t.prototype.inverseTransformY=function(e){var i=0,o=this.ldeviceExtY;return o!=0&&(i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/o),i},t.prototype.inverseTransformPoint=function(e){var i=new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},f.exports=t},function(f,m,y){function r(n){if(Array.isArray(n)){for(var c=0,l=Array(n.length);ce.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),c,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,E,T,D,L=this.getAllNodes(),O;if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),O=new Set,l=0;ld||O>d)&&(n.gravitationForceX=-this.gravityConstant*T,n.gravitationForceY=-this.gravityConstant*D)):(d=c.getEstimatedSize()*this.compoundGravityRangeFactor,(L>d||O>d)&&(n.gravitationForceX=-this.gravityConstant*T*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},a.prototype.isConverged=function(){var n,c=!1;return this.totalIterations>this.maxIterations/3&&(c=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=L.length||d>=L[0].length)){for(var N=0;Na}}]),o}();f.exports=i},function(f,m,y){var r=function(){function i(o,g){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;t(this,i),this.sequence1=o,this.sequence2=g,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var c=0;c=0;o--){var g=this.listeners[o];g.event===e&&g.callback===i&&this.listeners.splice(o,1)}},t.emit=function(e,i){for(var o=0;og.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,a){for(var v=this.getChild().getNodes(),n,c=0;c0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),h=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(h),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),h={},u=0;u1){var x;for(x=0;xp&&(p=Math.floor(R.y)),C=Math.floor(R.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-R.x/2,n.WORLD_CENTER_Y-R.y/2))},d.radialLayout=function(s,h,u){var p=Math.max(this.maxDiagonalInTree(s),a.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(h,null,0,359,0,p);var A=L.calculateBounds(s),C=new O;C.setDeviceOrgX(A.getMinX()),C.setDeviceOrgY(A.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var R=0;R1;){var H=k[0];k.splice(0,1);var P=M.indexOf(H);P>=0&&M.splice(P,1),b--,G--}h!=null?Y=(M.indexOf(k[0])+1)%b:Y=0;for(var B=Math.abs(p-u)/G,$=Y;F!=G;$=++$%b){var K=M[$].getOtherEnd(s);if(K!=h){var Q=(u+F*B)%360,J=(Q+B)%360;d.branchRadialLayout(K,s,Q,J,A+C,C),F++}}},d.maxDiagonalInTree=function(s){for(var h=T.MIN_VALUE,u=0;uh&&(h=A)}return h},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var s=this,h={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),A=0;A"u"&&(h[x]=[]),h[x]=h[x].concat(C)}Object.keys(h).forEach(function(_){if(h[_].length>1){var U="DummyCompound_"+_;s.memberGroups[U]=h[_];var X=h[_][0].getParent(),M=new o(s.graphManager);M.id=U,M.paddingLeft=X.paddingLeft||0,M.paddingRight=X.paddingRight||0,M.paddingBottom=X.paddingBottom||0,M.paddingTop=X.paddingTop||0,s.idToDummyNode[U]=M;var G=s.getGraphManager().add(s.newGraph(),M),F=X.getChild();F.add(M);for(var b=0;b=0;s--){var h=this.compoundOrder[s],u=h.id,p=h.paddingLeft,A=h.paddingTop;this.adjustLocations(this.tiledMemberPack[u],h.rect.x,h.rect.y,p,A)}},d.prototype.repopulateZeroDegreeMembers=function(){var s=this,h=this.tiledZeroDegreePack;Object.keys(h).forEach(function(u){var p=s.idToDummyNode[u],A=p.paddingLeft,C=p.paddingTop;s.adjustLocations(h[u],p.rect.x,p.rect.y,A,C)})},d.prototype.getToBeTiled=function(s){var h=s.id;if(this.toBeTiled[h]!=null)return this.toBeTiled[h];var u=s.getChild();if(u==null)return this.toBeTiled[h]=!1,!1;for(var p=u.getNodes(),A=0;A0)return this.toBeTiled[h]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[h]=!1,!1}return this.toBeTiled[h]=!0,!0},d.prototype.getNodeDegree=function(s){s.id;for(var h=s.getEdges(),u=0,p=0;p_&&(_=X.rect.height)}u+=_+s.verticalPadding}},d.prototype.tileCompoundMembers=function(s,h){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var A=h[p];u.tiledMemberPack[p]=u.tileNodes(s[p],A.paddingLeft+A.paddingRight),A.rect.width=u.tiledMemberPack[p].width,A.rect.height=u.tiledMemberPack[p].height})},d.prototype.tileNodes=function(s,h){var u=a.TILING_PADDING_VERTICAL,p=a.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:h,verticalPadding:u,horizontalPadding:p};s.sort(function(x,_){return x.rect.width*x.rect.height>_.rect.width*_.rect.height?-1:x.rect.width*x.rect.height<_.rect.width*_.rect.height?1:0});for(var C=0;C0&&(R+=s.horizontalPadding),s.rowWidth[u]=R,s.width0&&(x+=s.verticalPadding);var _=0;x>s.rowHeight[u]&&(_=s.rowHeight[u],s.rowHeight[u]=x,_=s.rowHeight[u]-_),s.height+=_,s.rows[u].push(h)},d.prototype.getShortestRowIndex=function(s){for(var h=-1,u=Number.MAX_VALUE,p=0;pu&&(h=p,u=s.rowWidth[p]);return h},d.prototype.canAddHorizontal=function(s,h,u){var p=this.getShortestRowIndex(s);if(p<0)return!0;var A=s.rowWidth[p];if(A+s.horizontalPadding+h<=s.width)return!0;var C=0;s.rowHeight[p]0&&(C=u+s.verticalPadding-s.rowHeight[p]);var R;s.width-A>=h+s.horizontalPadding?R=(s.height+C)/(A+h+s.horizontalPadding):R=(s.height+C)/s.width,C=u+s.verticalPadding;var x;return s.widthC&&h!=u){p.splice(-1,1),s.rows[u].push(A),s.rowWidth[h]=s.rowWidth[h]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,x=0;xR&&(R=p[x].height);h>0&&(R+=s.verticalPadding);var _=s.rowHeight[h]+s.rowHeight[u];s.rowHeight[h]=R,s.rowHeight[u]0)for(var F=A;F<=C;F++)G[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(C0)for(var F=R;F<=x;F++)G[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var b=T.MAX_VALUE,Y,k,H=0;H0){var x;x=O.getGraphManager().add(O.newGraph(),u),this.processChildrenList(x,h,O)}}},l.prototype.stop=function(){return this.stopped=!0,this};var T=function(L){L("layout","cose-bilkent",l)};typeof cytoscape<"u"&&T(cytoscape),m.exports=T}])})})(dt);var St=dt.exports;const Gt=Nt(St);var st=function(){var I=S(function(O,d,N,s){for(N=N||{},s=O.length;s--;N[O[s]]=d);return N},"o"),w=[1,4],f=[1,13],m=[1,12],y=[1,15],r=[1,16],t=[1,20],e=[1,19],i=[6,7,8],o=[1,26],g=[1,24],a=[1,25],v=[6,7,11],n=[1,6,13,15,16,19,22],c=[1,33],l=[1,34],E=[1,6,7,11,13,15,16,19,22],T={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:S(function(d,N,s,h,u,p,A){var C=p.length-1;switch(u){case 6:case 7:return h;case 8:h.getLogger().trace("Stop NL ");break;case 9:h.getLogger().trace("Stop EOF ");break;case 11:h.getLogger().trace("Stop NL2 ");break;case 12:h.getLogger().trace("Stop EOF2 ");break;case 15:h.getLogger().info("Node: ",p[C].id),h.addNode(p[C-1].length,p[C].id,p[C].descr,p[C].type);break;case 16:h.getLogger().trace("Icon: ",p[C]),h.decorateNode({icon:p[C]});break;case 17:case 21:h.decorateNode({class:p[C]});break;case 18:h.getLogger().trace("SPACELIST");break;case 19:h.getLogger().trace("Node: ",p[C].id),h.addNode(0,p[C].id,p[C].descr,p[C].type);break;case 20:h.decorateNode({icon:p[C]});break;case 25:h.getLogger().trace("node found ..",p[C-2]),this.$={id:p[C-1],descr:p[C-1],type:h.getType(p[C-2],p[C])};break;case 26:this.$={id:p[C],descr:p[C],type:h.nodeType.DEFAULT};break;case 27:h.getLogger().trace("node found ..",p[C-3]),this.$={id:p[C-3],descr:p[C-1],type:h.getType(p[C-2],p[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:w},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:w},{6:f,7:[1,10],9:9,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(i,[2,3]),{1:[2,2]},I(i,[2,4]),I(i,[2,5]),{1:[2,6],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:f,9:22,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:o,7:g,10:23,11:a},I(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:t,22:e}),I(v,[2,18]),I(v,[2,19]),I(v,[2,20]),I(v,[2,21]),I(v,[2,23]),I(v,[2,24]),I(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:g,10:32,11:a},{1:[2,7],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(n,[2,14],{7:c,11:l}),I(E,[2,8]),I(E,[2,9]),I(E,[2,10]),I(v,[2,15]),I(v,[2,16]),I(v,[2,17]),{20:[1,35]},{21:[1,36]},I(n,[2,13],{7:c,11:l}),I(E,[2,11]),I(E,[2,12]),{21:[1,37]},I(v,[2,25]),I(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:S(function(d,N){if(N.recoverable)this.trace(d);else{var s=new Error(d);throw s.hash=N,s}},"parseError"),parse:S(function(d){var N=this,s=[0],h=[],u=[null],p=[],A=this.table,C="",R=0,x=0,_=2,U=1,X=p.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);M.setInput(d,G.yy),G.yy.lexer=M,G.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var b=M.yylloc;p.push(b);var Y=M.options&&M.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function k(V){s.length=s.length-2*V,u.length=u.length-V,p.length=p.length-V}S(k,"popStack");function H(){var V;return V=h.pop()||M.lex()||U,typeof V!="number"&&(V instanceof Array&&(h=V,V=h.pop()),V=N.symbols_[V]||V),V}S(H,"lex");for(var P,B,$,K,Q={},J,j,gt,q;;){if(B=s[s.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=H()),$=A[B]&&A[B][P]),typeof $>"u"||!$.length||!$[0]){var rt="";q=[];for(J in A[B])this.terminals_[J]&&J>_&&q.push("'"+this.terminals_[J]+"'");M.showPosition?rt="Parse error on line "+(R+1)+`: +import{aH as at,aI as Nt,_ as S,l as z,c as ot,G as Dt,T as mt,E as tt,i as et,U as Ot,V as At,W as It,d as Ct,aj as Rt,N as xt}from"./md-index-B8Nim9kS.js";import{c as pt}from"./md-cytoscape.esm-BSw61sAN.js";var dt={exports:{}},it={exports:{}},nt={exports:{}},ut;function Mt(){return ut||(ut=1,function(I,w){(function(m,y){I.exports=y()})(at,function(){return function(f){var m={};function y(r){if(m[r])return m[r].exports;var t=m[r]={i:r,l:!1,exports:{}};return f[r].call(t.exports,t,t.exports,y),t.l=!0,t.exports}return y.m=f,y.c=m,y.i=function(r){return r},y.d=function(r,t,e){y.o(r,t)||Object.defineProperty(r,t,{configurable:!1,enumerable:!0,get:e})},y.n=function(r){var t=r&&r.__esModule?function(){return r.default}:function(){return r};return y.d(t,"a",t),t},y.o=function(r,t){return Object.prototype.hasOwnProperty.call(r,t)},y.p="",y(y.s=26)}([function(f,m,y){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,f.exports=r},function(f,m,y){var r=y(2),t=y(8),e=y(9);function i(g,a,v){r.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=g,this.target=a}i.prototype=Object.create(r.prototype);for(var o in r)i[o]=r[o];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,a){for(var v=this.getOtherEnd(g),n=a.getGraphManager().getRoot();;){if(v.getOwner()==a)return v;if(v.getOwner()==n)break;v=v.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=t.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=e.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=e.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},f.exports=i},function(f,m,y){function r(t){this.vGraphObject=t}f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(13),i=y(0),o=y(16),g=y(4);function a(n,c,l,E){l==null&&E==null&&(E=c),r.call(this,E),n.graphManager!=null&&(n=n.graphManager),this.estimatedSize=t.MIN_VALUE,this.inclusionTreeDepth=t.MAX_VALUE,this.vGraphObject=E,this.edges=[],this.graphManager=n,l!=null&&c!=null?this.rect=new e(c.x,c.y,l.width,l.height):this.rect=new e}a.prototype=Object.create(r.prototype);for(var v in r)a[v]=r[v];a.prototype.getEdges=function(){return this.edges},a.prototype.getChild=function(){return this.child},a.prototype.getOwner=function(){return this.owner},a.prototype.getWidth=function(){return this.rect.width},a.prototype.setWidth=function(n){this.rect.width=n},a.prototype.getHeight=function(){return this.rect.height},a.prototype.setHeight=function(n){this.rect.height=n},a.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},a.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},a.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},a.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},a.prototype.getRect=function(){return this.rect},a.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},a.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},a.prototype.setRect=function(n,c){this.rect.x=n.x,this.rect.y=n.y,this.rect.width=c.width,this.rect.height=c.height},a.prototype.setCenter=function(n,c){this.rect.x=n-this.rect.width/2,this.rect.y=c-this.rect.height/2},a.prototype.setLocation=function(n,c){this.rect.x=n,this.rect.y=c},a.prototype.moveBy=function(n,c){this.rect.x+=n,this.rect.y+=c},a.prototype.getEdgeListToNode=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(E.target==n){if(E.source!=l)throw"Incorrect edge source!";c.push(E)}}),c},a.prototype.getEdgesBetween=function(n){var c=[],l=this;return l.edges.forEach(function(E){if(!(E.source==l||E.target==l))throw"Incorrect edge source and/or target";(E.target==n||E.source==n)&&c.push(E)}),c},a.prototype.getNeighborsList=function(){var n=new Set,c=this;return c.edges.forEach(function(l){if(l.source==c)n.add(l.target);else{if(l.target!=c)throw"Incorrect incidency!";n.add(l.source)}}),n},a.prototype.withChildren=function(){var n=new Set,c,l;if(n.add(this),this.child!=null)for(var E=this.child.getNodes(),T=0;Tc&&(this.rect.x-=(this.labelWidth-c)/2,this.setWidth(this.labelWidth)),this.labelHeight>l&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-l)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-l),this.setHeight(this.labelHeight))}}},a.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==t.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},a.prototype.transform=function(n){var c=this.rect.x;c>i.WORLD_BOUNDARY?c=i.WORLD_BOUNDARY:c<-i.WORLD_BOUNDARY&&(c=-i.WORLD_BOUNDARY);var l=this.rect.y;l>i.WORLD_BOUNDARY?l=i.WORLD_BOUNDARY:l<-i.WORLD_BOUNDARY&&(l=-i.WORLD_BOUNDARY);var E=new g(c,l),T=n.inverseTransformPoint(E);this.setLocation(T.x,T.y)},a.prototype.getLeft=function(){return this.rect.x},a.prototype.getRight=function(){return this.rect.x+this.rect.width},a.prototype.getTop=function(){return this.rect.y},a.prototype.getBottom=function(){return this.rect.y+this.rect.height},a.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},f.exports=a},function(f,m,y){function r(t,e){t==null&&e==null?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},f.exports=r},function(f,m,y){var r=y(2),t=y(10),e=y(0),i=y(6),o=y(3),g=y(1),a=y(13),v=y(12),n=y(11);function c(E,T,D){r.call(this,D),this.estimatedSize=t.MIN_VALUE,this.margin=e.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=E,T!=null&&T instanceof i?this.graphManager=T:T!=null&&T instanceof Layout&&(this.graphManager=T.graphManager)}c.prototype=Object.create(r.prototype);for(var l in r)c[l]=r[l];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(E,T,D){if(T==null&&D==null){var L=E;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(L)>-1)throw"Node already in graph!";return L.owner=this,this.getNodes().push(L),L}else{var O=E;if(!(this.getNodes().indexOf(T)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(T.owner==D.owner&&T.owner==this))throw"Both owners must be this graph!";return T.owner!=D.owner?null:(O.source=T,O.target=D,O.isInterGraph=!1,this.getEdges().push(O),T.edges.push(O),D!=T&&D.edges.push(O),O)}},c.prototype.remove=function(E){var T=E;if(E instanceof o){if(T==null)throw"Node is null!";if(!(T.owner!=null&&T.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=T.edges.slice(),L,O=D.length,d=0;d-1&&h>-1))throw"Source and/or target doesn't know this edge!";L.source.edges.splice(s,1),L.target!=L.source&&L.target.edges.splice(h,1);var N=L.source.owner.getEdges().indexOf(L);if(N==-1)throw"Not in owner's edge list!";L.source.owner.getEdges().splice(N,1)}},c.prototype.updateLeftTop=function(){for(var E=t.MAX_VALUE,T=t.MAX_VALUE,D,L,O,d=this.getNodes(),N=d.length,s=0;sD&&(E=D),T>L&&(T=L)}return E==t.MAX_VALUE?null:(d[0].getParent().paddingLeft!=null?O=d[0].getParent().paddingLeft:O=this.margin,this.left=T-O,this.top=E-O,new v(this.left,this.top))},c.prototype.updateBounds=function(E){for(var T=t.MAX_VALUE,D=-t.MAX_VALUE,L=t.MAX_VALUE,O=-t.MAX_VALUE,d,N,s,h,u,p=this.nodes,A=p.length,C=0;Cd&&(T=d),Ds&&(L=s),Od&&(T=d),Ds&&(L=s),O=this.nodes.length){var A=0;D.forEach(function(C){C.owner==E&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},f.exports=c},function(f,m,y){var r,t=y(1);function e(i){r=y(5),this.layout=i,this.graphs=[],this.edges=[]}e.prototype.addRoot=function(){var i=this.layout.newGraph(),o=this.layout.newNode(null),g=this.add(i,o);return this.setRootGraph(g),this.rootGraph},e.prototype.add=function(i,o,g,a,v){if(g==null&&a==null&&v==null){if(i==null)throw"Graph is null!";if(o==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(o.child!=null)throw"Already has a child!";return i.parent=o,o.child=i,i}else{v=g,a=o,g=i;var n=a.getOwner(),c=v.getOwner();if(!(n!=null&&n.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(c!=null&&c.getGraphManager()==this))throw"Target not in this graph mgr!";if(n==c)return g.isInterGraph=!1,n.add(g,a,v);if(g.isInterGraph=!0,g.source=a,g.target=v,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},e.prototype.remove=function(i){if(i instanceof r){var o=i;if(o.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(o==this.rootGraph||o.parent!=null&&o.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(o.getEdges());for(var a,v=g.length,n=0;n=i.getRight()?o[0]+=Math.min(i.getX()-e.getX(),e.getRight()-i.getRight()):i.getX()<=e.getX()&&i.getRight()>=e.getRight()&&(o[0]+=Math.min(e.getX()-i.getX(),i.getRight()-e.getRight())),e.getY()<=i.getY()&&e.getBottom()>=i.getBottom()?o[1]+=Math.min(i.getY()-e.getY(),e.getBottom()-i.getBottom()):i.getY()<=e.getY()&&i.getBottom()>=e.getBottom()&&(o[1]+=Math.min(e.getY()-i.getY(),i.getBottom()-e.getBottom()));var v=Math.abs((i.getCenterY()-e.getCenterY())/(i.getCenterX()-e.getCenterX()));i.getCenterY()===e.getCenterY()&&i.getCenterX()===e.getCenterX()&&(v=1);var n=v*o[0],c=o[1]/v;o[0]n)return o[0]=g,o[1]=l,o[2]=v,o[3]=p,!1;if(av)return o[0]=c,o[1]=a,o[2]=h,o[3]=n,!1;if(gv?(o[0]=T,o[1]=D,x=!0):(o[0]=E,o[1]=l,x=!0):U===M&&(g>v?(o[0]=c,o[1]=l,x=!0):(o[0]=L,o[1]=D,x=!0)),-X===M?v>g?(o[2]=u,o[3]=p,_=!0):(o[2]=h,o[3]=s,_=!0):X===M&&(v>g?(o[2]=N,o[3]=s,_=!0):(o[2]=A,o[3]=p,_=!0)),x&&_)return!1;if(g>v?a>n?(G=this.getCardinalDirection(U,M,4),F=this.getCardinalDirection(X,M,2)):(G=this.getCardinalDirection(-U,M,3),F=this.getCardinalDirection(-X,M,1)):a>n?(G=this.getCardinalDirection(-U,M,1),F=this.getCardinalDirection(-X,M,3)):(G=this.getCardinalDirection(U,M,2),F=this.getCardinalDirection(X,M,4)),!x)switch(G){case 1:Y=l,b=g+-d/M,o[0]=b,o[1]=Y;break;case 2:b=L,Y=a+O*M,o[0]=b,o[1]=Y;break;case 3:Y=D,b=g+d/M,o[0]=b,o[1]=Y;break;case 4:b=T,Y=a+-O*M,o[0]=b,o[1]=Y;break}if(!_)switch(F){case 1:H=s,k=v+-R/M,o[2]=k,o[3]=H;break;case 2:k=A,H=n+C*M,o[2]=k,o[3]=H;break;case 3:H=p,k=v+R/M,o[2]=k,o[3]=H;break;case 4:k=u,H=n+-C*M,o[2]=k,o[3]=H;break}}return!1},t.getCardinalDirection=function(e,i,o){return e>i?o:1+o%4},t.getIntersection=function(e,i,o,g){if(g==null)return this.getIntersection2(e,i,o);var a=e.x,v=e.y,n=i.x,c=i.y,l=o.x,E=o.y,T=g.x,D=g.y,L=void 0,O=void 0,d=void 0,N=void 0,s=void 0,h=void 0,u=void 0,p=void 0,A=void 0;return d=c-v,s=a-n,u=n*v-a*c,N=D-E,h=l-T,p=T*E-l*D,A=d*h-N*s,A===0?null:(L=(s*p-h*u)/A,O=(N*u-d*p)/A,new r(L,O))},t.angleOfVector=function(e,i,o,g){var a=void 0;return e!==o?(a=Math.atan((g-i)/(o-e)),o0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},f.exports=r},function(f,m,y){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,f.exports=r},function(f,m,y){var r=function(){function a(v,n){for(var c=0;c"u"?"undefined":r(e);return e==null||i!="object"&&i!="function"},f.exports=t},function(f,m,y){function r(l){if(Array.isArray(l)){for(var E=0,T=Array(l.length);E0&&E;){for(d.push(s[0]);d.length>0&&E;){var h=d[0];d.splice(0,1),O.add(h);for(var u=h.getEdges(),L=0;L-1&&s.splice(R,1)}O=new Set,N=new Map}}return l},c.prototype.createDummyNodesForBendpoints=function(l){for(var E=[],T=l.source,D=this.graphManager.calcLowestCommonAncestor(l.source,l.target),L=0;L0){for(var D=this.edgeToDummyNodes.get(T),L=0;L=0&&E.splice(p,1);var A=N.getNeighborsList();A.forEach(function(x){if(T.indexOf(x)<0){var _=D.get(x),U=_-1;U==1&&h.push(x),D.set(x,U)}})}T=T.concat(h),(E.length==1||E.length==2)&&(L=!0,O=E[0])}return O},c.prototype.setGraphManager=function(l){this.graphManager=l},f.exports=c},function(f,m,y){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},f.exports=r},function(f,m,y){var r=y(4);function t(e,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}t.prototype.getWorldOrgX=function(){return this.lworldOrgX},t.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},t.prototype.getWorldOrgY=function(){return this.lworldOrgY},t.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},t.prototype.getWorldExtX=function(){return this.lworldExtX},t.prototype.setWorldExtX=function(e){this.lworldExtX=e},t.prototype.getWorldExtY=function(){return this.lworldExtY},t.prototype.setWorldExtY=function(e){this.lworldExtY=e},t.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},t.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},t.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},t.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},t.prototype.getDeviceExtX=function(){return this.ldeviceExtX},t.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},t.prototype.getDeviceExtY=function(){return this.ldeviceExtY},t.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},t.prototype.transformX=function(e){var i=0,o=this.lworldExtX;return o!=0&&(i=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/o),i},t.prototype.transformY=function(e){var i=0,o=this.lworldExtY;return o!=0&&(i=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/o),i},t.prototype.inverseTransformX=function(e){var i=0,o=this.ldeviceExtX;return o!=0&&(i=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/o),i},t.prototype.inverseTransformY=function(e){var i=0,o=this.ldeviceExtY;return o!=0&&(i=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/o),i},t.prototype.inverseTransformPoint=function(e){var i=new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y));return i},f.exports=t},function(f,m,y){function r(n){if(Array.isArray(n)){for(var c=0,l=Array(n.length);ce.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*e.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-e.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT_INCREMENTAL):(n>e.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(e.COOLING_ADAPTATION_FACTOR,1-(n-e.ADAPTATION_LOWER_NODE_LIMIT)/(e.ADAPTATION_UPPER_NODE_LIMIT-e.ADAPTATION_LOWER_NODE_LIMIT)*(1-e.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=e.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var n=this.getAllEdges(),c,l=0;l0&&arguments[0]!==void 0?arguments[0]:!0,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,l,E,T,D,L=this.getAllNodes(),O;if(this.useFRGridVariant)for(this.totalIterations%e.GRID_CALCULATION_CHECK_PERIOD==1&&n&&this.updateGrid(),O=new Set,l=0;ld||O>d)&&(n.gravitationForceX=-this.gravityConstant*T,n.gravitationForceY=-this.gravityConstant*D)):(d=c.getEstimatedSize()*this.compoundGravityRangeFactor,(L>d||O>d)&&(n.gravitationForceX=-this.gravityConstant*T*this.compoundGravityConstant,n.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},a.prototype.isConverged=function(){var n,c=!1;return this.totalIterations>this.maxIterations/3&&(c=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),n=this.totalDisplacement=L.length||d>=L[0].length)){for(var N=0;Na}}]),o}();f.exports=i},function(f,m,y){var r=function(){function i(o,g){for(var a=0;a2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;t(this,i),this.sequence1=o,this.sequence2=g,this.match_score=a,this.mismatch_penalty=v,this.gap_penalty=n,this.iMax=o.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var c=0;c=0;o--){var g=this.listeners[o];g.event===e&&g.callback===i&&this.listeners.splice(o,1)}},t.emit=function(e,i){for(var o=0;og.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*e.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,a){for(var v=this.getChild().getNodes(),n,c=0;c0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var h=new Set(this.getAllNodes()),u=this.nodesWithGravity.filter(function(p){return h.has(p)});this.graphManager.setAllNodesToApplyGravitation(u),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},d.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%v.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),h=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(h),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var u=!this.isTreeGrowing&&!this.isGrowthFinished,p=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(u,p),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},d.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),h={},u=0;u1){var x;for(x=0;xp&&(p=Math.floor(R.y)),C=Math.floor(R.x+a.DEFAULT_COMPONENT_SEPERATION)}this.transform(new l(n.WORLD_CENTER_X-R.x/2,n.WORLD_CENTER_Y-R.y/2))},d.radialLayout=function(s,h,u){var p=Math.max(this.maxDiagonalInTree(s),a.DEFAULT_RADIAL_SEPARATION);d.branchRadialLayout(h,null,0,359,0,p);var A=L.calculateBounds(s),C=new O;C.setDeviceOrgX(A.getMinX()),C.setDeviceOrgY(A.getMinY()),C.setWorldOrgX(u.x),C.setWorldOrgY(u.y);for(var R=0;R1;){var H=k[0];k.splice(0,1);var P=M.indexOf(H);P>=0&&M.splice(P,1),b--,G--}h!=null?Y=(M.indexOf(k[0])+1)%b:Y=0;for(var B=Math.abs(p-u)/G,$=Y;F!=G;$=++$%b){var K=M[$].getOtherEnd(s);if(K!=h){var Q=(u+F*B)%360,J=(Q+B)%360;d.branchRadialLayout(K,s,Q,J,A+C,C),F++}}},d.maxDiagonalInTree=function(s){for(var h=T.MIN_VALUE,u=0;uh&&(h=A)}return h},d.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},d.prototype.groupZeroDegreeMembers=function(){var s=this,h={};this.memberGroups={},this.idToDummyNode={};for(var u=[],p=this.graphManager.getAllNodes(),A=0;A"u"&&(h[x]=[]),h[x]=h[x].concat(C)}Object.keys(h).forEach(function(_){if(h[_].length>1){var U="DummyCompound_"+_;s.memberGroups[U]=h[_];var X=h[_][0].getParent(),M=new o(s.graphManager);M.id=U,M.paddingLeft=X.paddingLeft||0,M.paddingRight=X.paddingRight||0,M.paddingBottom=X.paddingBottom||0,M.paddingTop=X.paddingTop||0,s.idToDummyNode[U]=M;var G=s.getGraphManager().add(s.newGraph(),M),F=X.getChild();F.add(M);for(var b=0;b=0;s--){var h=this.compoundOrder[s],u=h.id,p=h.paddingLeft,A=h.paddingTop;this.adjustLocations(this.tiledMemberPack[u],h.rect.x,h.rect.y,p,A)}},d.prototype.repopulateZeroDegreeMembers=function(){var s=this,h=this.tiledZeroDegreePack;Object.keys(h).forEach(function(u){var p=s.idToDummyNode[u],A=p.paddingLeft,C=p.paddingTop;s.adjustLocations(h[u],p.rect.x,p.rect.y,A,C)})},d.prototype.getToBeTiled=function(s){var h=s.id;if(this.toBeTiled[h]!=null)return this.toBeTiled[h];var u=s.getChild();if(u==null)return this.toBeTiled[h]=!1,!1;for(var p=u.getNodes(),A=0;A0)return this.toBeTiled[h]=!1,!1;if(C.getChild()==null){this.toBeTiled[C.id]=!1;continue}if(!this.getToBeTiled(C))return this.toBeTiled[h]=!1,!1}return this.toBeTiled[h]=!0,!0},d.prototype.getNodeDegree=function(s){s.id;for(var h=s.getEdges(),u=0,p=0;p_&&(_=X.rect.height)}u+=_+s.verticalPadding}},d.prototype.tileCompoundMembers=function(s,h){var u=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(p){var A=h[p];u.tiledMemberPack[p]=u.tileNodes(s[p],A.paddingLeft+A.paddingRight),A.rect.width=u.tiledMemberPack[p].width,A.rect.height=u.tiledMemberPack[p].height})},d.prototype.tileNodes=function(s,h){var u=a.TILING_PADDING_VERTICAL,p=a.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:h,verticalPadding:u,horizontalPadding:p};s.sort(function(x,_){return x.rect.width*x.rect.height>_.rect.width*_.rect.height?-1:x.rect.width*x.rect.height<_.rect.width*_.rect.height?1:0});for(var C=0;C0&&(R+=s.horizontalPadding),s.rowWidth[u]=R,s.width0&&(x+=s.verticalPadding);var _=0;x>s.rowHeight[u]&&(_=s.rowHeight[u],s.rowHeight[u]=x,_=s.rowHeight[u]-_),s.height+=_,s.rows[u].push(h)},d.prototype.getShortestRowIndex=function(s){for(var h=-1,u=Number.MAX_VALUE,p=0;pu&&(h=p,u=s.rowWidth[p]);return h},d.prototype.canAddHorizontal=function(s,h,u){var p=this.getShortestRowIndex(s);if(p<0)return!0;var A=s.rowWidth[p];if(A+s.horizontalPadding+h<=s.width)return!0;var C=0;s.rowHeight[p]0&&(C=u+s.verticalPadding-s.rowHeight[p]);var R;s.width-A>=h+s.horizontalPadding?R=(s.height+C)/(A+h+s.horizontalPadding):R=(s.height+C)/s.width,C=u+s.verticalPadding;var x;return s.widthC&&h!=u){p.splice(-1,1),s.rows[u].push(A),s.rowWidth[h]=s.rowWidth[h]-C,s.rowWidth[u]=s.rowWidth[u]+C,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,x=0;xR&&(R=p[x].height);h>0&&(R+=s.verticalPadding);var _=s.rowHeight[h]+s.rowHeight[u];s.rowHeight[h]=R,s.rowHeight[u]0)for(var F=A;F<=C;F++)G[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(C0)for(var F=R;F<=x;F++)G[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var b=T.MAX_VALUE,Y,k,H=0;H0){var x;x=O.getGraphManager().add(O.newGraph(),u),this.processChildrenList(x,h,O)}}},l.prototype.stop=function(){return this.stopped=!0,this};var T=function(L){L("layout","cose-bilkent",l)};typeof cytoscape<"u"&&T(cytoscape),m.exports=T}])})})(dt);var St=dt.exports;const Gt=Nt(St);var st=function(){var I=S(function(O,d,N,s){for(N=N||{},s=O.length;s--;N[O[s]]=d);return N},"o"),w=[1,4],f=[1,13],m=[1,12],y=[1,15],r=[1,16],t=[1,20],e=[1,19],i=[6,7,8],o=[1,26],g=[1,24],a=[1,25],v=[6,7,11],n=[1,6,13,15,16,19,22],c=[1,33],l=[1,34],E=[1,6,7,11,13,15,16,19,22],T={trace:S(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:S(function(d,N,s,h,u,p,A){var C=p.length-1;switch(u){case 6:case 7:return h;case 8:h.getLogger().trace("Stop NL ");break;case 9:h.getLogger().trace("Stop EOF ");break;case 11:h.getLogger().trace("Stop NL2 ");break;case 12:h.getLogger().trace("Stop EOF2 ");break;case 15:h.getLogger().info("Node: ",p[C].id),h.addNode(p[C-1].length,p[C].id,p[C].descr,p[C].type);break;case 16:h.getLogger().trace("Icon: ",p[C]),h.decorateNode({icon:p[C]});break;case 17:case 21:h.decorateNode({class:p[C]});break;case 18:h.getLogger().trace("SPACELIST");break;case 19:h.getLogger().trace("Node: ",p[C].id),h.addNode(0,p[C].id,p[C].descr,p[C].type);break;case 20:h.decorateNode({icon:p[C]});break;case 25:h.getLogger().trace("node found ..",p[C-2]),this.$={id:p[C-1],descr:p[C-1],type:h.getType(p[C-2],p[C])};break;case 26:this.$={id:p[C],descr:p[C],type:h.nodeType.DEFAULT};break;case 27:h.getLogger().trace("node found ..",p[C-3]),this.$={id:p[C-3],descr:p[C-1],type:h.getType(p[C-2],p[C])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:w},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:w},{6:f,7:[1,10],9:9,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(i,[2,3]),{1:[2,2]},I(i,[2,4]),I(i,[2,5]),{1:[2,6],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:f,9:22,12:11,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},{6:o,7:g,10:23,11:a},I(v,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:t,22:e}),I(v,[2,18]),I(v,[2,19]),I(v,[2,20]),I(v,[2,21]),I(v,[2,23]),I(v,[2,24]),I(v,[2,26],{19:[1,30]}),{20:[1,31]},{6:o,7:g,10:32,11:a},{1:[2,7],6:f,12:21,13:m,14:14,15:y,16:r,17:17,18:18,19:t,22:e},I(n,[2,14],{7:c,11:l}),I(E,[2,8]),I(E,[2,9]),I(E,[2,10]),I(v,[2,15]),I(v,[2,16]),I(v,[2,17]),{20:[1,35]},{21:[1,36]},I(n,[2,13],{7:c,11:l}),I(E,[2,11]),I(E,[2,12]),{21:[1,37]},I(v,[2,25]),I(v,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:S(function(d,N){if(N.recoverable)this.trace(d);else{var s=new Error(d);throw s.hash=N,s}},"parseError"),parse:S(function(d){var N=this,s=[0],h=[],u=[null],p=[],A=this.table,C="",R=0,x=0,_=2,U=1,X=p.slice.call(arguments,1),M=Object.create(this.lexer),G={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(G.yy[F]=this.yy[F]);M.setInput(d,G.yy),G.yy.lexer=M,G.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var b=M.yylloc;p.push(b);var Y=M.options&&M.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function k(V){s.length=s.length-2*V,u.length=u.length-V,p.length=p.length-V}S(k,"popStack");function H(){var V;return V=h.pop()||M.lex()||U,typeof V!="number"&&(V instanceof Array&&(h=V,V=h.pop()),V=N.symbols_[V]||V),V}S(H,"lex");for(var P,B,$,K,Q={},J,j,gt,q;;){if(B=s[s.length-1],this.defaultActions[B]?$=this.defaultActions[B]:((P===null||typeof P>"u")&&(P=H()),$=A[B]&&A[B][P]),typeof $>"u"||!$.length||!$[0]){var rt="";q=[];for(J in A[B])this.terminals_[J]&&J>_&&q.push("'"+this.terminals_[J]+"'");M.showPosition?rt="Parse error on line "+(R+1)+`: `+M.showPosition()+` Expecting `+q.join(", ")+", got '"+(this.terminals_[P]||P)+"'":rt="Parse error on line "+(R+1)+": Unexpected "+(P==U?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(rt,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:b,expected:q})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+B+", token: "+P);switch($[0]){case 1:s.push(P),u.push(M.yytext),p.push(M.yylloc),s.push($[1]),P=null,x=M.yyleng,C=M.yytext,R=M.yylineno,b=M.yylloc;break;case 2:if(j=this.productions_[$[1]][1],Q.$=u[u.length-j],Q._$={first_line:p[p.length-(j||1)].first_line,last_line:p[p.length-1].last_line,first_column:p[p.length-(j||1)].first_column,last_column:p[p.length-1].last_column},Y&&(Q._$.range=[p[p.length-(j||1)].range[0],p[p.length-1].range[1]]),K=this.performAction.apply(Q,[C,x,R,G.yy,$[1],u,p].concat(X)),typeof K<"u")return K;j&&(s=s.slice(0,-1*j*2),u=u.slice(0,-1*j),p=p.slice(0,-1*j)),s.push(this.productions_[$[1]][0]),u.push(Q.$),p.push(Q._$),gt=A[s[s.length-2]][s[s.length-1]],s.push(gt);break;case 3:return!0}}return!0},"parse")},D=function(){var O={EOF:1,parseError:S(function(N,s){if(this.yy.parser)this.yy.parser.parseError(N,s);else throw new Error(N)},"parseError"),setInput:S(function(d,N){return this.yy=N||this.yy||{},this._input=d,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:S(function(){var d=this._input[0];this.yytext+=d,this.yyleng++,this.offset++,this.match+=d,this.matched+=d;var N=d.match(/(?:\r\n?|\n).*/g);return N?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),d},"input"),unput:S(function(d){var N=d.length,s=d.split(/(?:\r\n?|\n)/g);this._input=d+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-N),this.offset-=N;var h=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===h.length?this.yylloc.first_column:0)+h[h.length-s.length].length-s[0].length:this.yylloc.first_column-N},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-N]),this.yyleng=this.yytext.length,this},"unput"),more:S(function(){return this._more=!0,this},"more"),reject:S(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:S(function(d){this.unput(this.match.slice(d))},"less"),pastInput:S(function(){var d=this.matched.substr(0,this.matched.length-this.match.length);return(d.length>20?"...":"")+d.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:S(function(){var d=this.match;return d.length<20&&(d+=this._input.substr(0,20-d.length)),(d.substr(0,20)+(d.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:S(function(){var d=this.pastInput(),N=new Array(d.length+1).join("-");return d+this.upcomingInput()+` @@ -36,8 +36,8 @@ Expecting `+q.join(", ")+", got '"+(this.terminals_[P]||P)+"'":rt="Parse error o a${r},${r} 1 0,0 ${m*.1},${-1*y*.33} H0 V0 Z`)},"bangBkg"),Jt=S(function(I,w,f){w.append("circle").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("r",f.width/2)},"circleBkg");function yt(I,w,f,m,y){return I.insert("polygon",":first-child").attr("points",m.map(function(r){return r.x+","+r.y}).join(" ")).attr("transform","translate("+(y.width-w)/2+", "+f+")")}S(yt,"insertPolygonShape");var qt=S(function(I,w,f){const m=f.height,r=m/4,t=f.width-f.padding+2*r,e=[{x:r,y:0},{x:t-r,y:0},{x:t,y:-m/2},{x:t-r,y:-m},{x:r,y:-m},{x:0,y:-m/2}];yt(w,t,m,e,f)},"hexagonBkg"),te=S(function(I,w,f){w.append("rect").attr("id","node-"+f.id).attr("class","node-bkg node-"+I.type2Str(f.type)).attr("height",f.height).attr("rx",f.padding).attr("ry",f.padding).attr("width",f.width)},"roundedRectBkg"),ee=S(async function(I,w,f,m,y){const r=y.htmlLabels,t=m%(Zt-1),e=w.append("g");f.section=t;let i="section-"+t;t<0&&(i+=" section-root"),e.attr("class",(f.class?f.class+" ":"")+"mindmap-node "+i);const o=e.append("g"),g=e.append("g"),a=f.descr.replace(/()/g,` -`);await mt(g,a,{useHtmlLabels:r,width:f.width,classes:"mindmap-node-label"},y),r||g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const v=g.node().getBBox(),[n]=Ot(y.fontSize);if(f.height=v.height+n*1.1*.5+f.padding,f.width=v.width+2*f.padding,f.icon)if(f.type===I.nodeType.CIRCLE)f.height+=50,f.width+=50,e.append("foreignObject").attr("height","50px").attr("width",f.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+t+" "+f.icon),g.attr("transform","translate("+f.width/2+", "+(f.height/2-1.5*f.padding)+")");else{f.width+=50;const c=f.height;f.height=Math.max(c,60);const l=Math.abs(f.height-c);e.append("foreignObject").attr("width","60px").attr("height",f.height).attr("style","text-align: center;margin-top:"+l/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+t+" "+f.icon),g.attr("transform","translate("+(25+f.width/2)+", "+(l/2+f.padding/2)+")")}else if(r){const c=(f.width-v.width)/2,l=(f.height-v.height)/2;g.attr("transform","translate("+c+", "+l+")")}else{const c=f.width/2,l=f.padding/2;g.attr("transform","translate("+c+", "+l+")")}switch(f.type){case I.nodeType.DEFAULT:Qt(I,o,f,t);break;case I.nodeType.ROUNDED_RECT:te(I,o,f,t);break;case I.nodeType.RECT:jt(I,o,f,t);break;case I.nodeType.CIRCLE:o.attr("transform","translate("+f.width/2+", "+ +f.height/2+")"),Jt(I,o,f,t);break;case I.nodeType.CLOUD:zt(I,o,f,t);break;case I.nodeType.BANG:Kt(I,o,f,t);break;case I.nodeType.HEXAGON:qt(I,o,f,t);break}return I.setElementForId(f.id,e),f.height},"drawNode"),re=S(function(I,w){const f=I.getElementById(w.id),m=w.x||0,y=w.y||0;f.attr("transform","translate("+m+","+y+")")},"positionNode");pt.use(Gt);async function lt(I,w,f,m,y){await ee(I,w,f,m,y),f.children&&await Promise.all(f.children.map((r,t)=>lt(I,w,r,m<0?t:m,y)))}S(lt,"drawNodes");function Et(I,w){w.edges().map((f,m)=>{const y=f.data();if(f[0]._private.bodyBounds){const r=f[0]._private.rscratch;z.trace("Edge: ",m,y),I.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+y.section+" edge-depth-"+y.depth)}})}S(Et,"drawEdges");function ct(I,w,f,m){w.add({group:"nodes",data:{id:I.id.toString(),labelText:I.descr,height:I.height,width:I.width,level:m,nodeId:I.id,padding:I.padding,type:I.type},position:{x:I.x,y:I.y}}),I.children&&I.children.forEach(y=>{ct(y,w,f,m+1),w.add({group:"edges",data:{id:`${I.id}_${y.id}`,source:I.id,target:y.id,depth:m,section:y.section}})})}S(ct,"addNodes");function Lt(I,w){return new Promise(f=>{const m=Dt("body").append("div").attr("id","cy").attr("style","display:none"),y=pt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),ct(I,y,w,0),y.nodes().forEach(function(r){r.layoutDimensions=()=>{const t=r.data();return{w:t.width,h:t.height}}}),y.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),y.ready(r=>{z.info("Ready",r),f(y)})})}S(Lt,"layoutMindmap");function Tt(I,w){w.nodes().map((f,m)=>{const y=f.data();y.x=f.position().x,y.y=f.position().y,re(I,y);const r=I.getElementById(y.nodeId);z.info("Id:",m,"Position: (",f.position().x,", ",f.position().y,")",y),r.attr("transform",`translate(${f.position().x-y.width/2}, ${f.position().y-y.height/2})`),r.attr("attr",`apa-${m})`)})}S(Tt,"positionNodes");var ie=S(async(I,w,f,m)=>{var a,v;z.debug(`Rendering mindmap diagram -`+I);const y=m.db,r=y.getMindmap();if(!r)return;const t=ot();t.htmlLabels=!1;const e=At(w),i=e.append("g");i.attr("class","mindmap-edges");const o=e.append("g");o.attr("class","mindmap-nodes"),await lt(y,o,r,-1,t);const g=await Lt(r,t);Et(i,g),Tt(y,g),It(void 0,e,((a=t.mindmap)==null?void 0:a.padding)??tt.mindmap.padding,((v=t.mindmap)==null?void 0:v.useMaxWidth)??tt.mindmap.useMaxWidth)},"draw"),ne={draw:ie},se=S(I=>{let w="";for(let f=0;flt(I,w,r,m<0?t:m,y)))}S(lt,"drawNodes");function Et(I,w){w.edges().map((f,m)=>{const y=f.data();if(f[0]._private.bodyBounds){const r=f[0]._private.rscratch;z.trace("Edge: ",m,y),I.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+y.section+" edge-depth-"+y.depth)}})}S(Et,"drawEdges");function ct(I,w,f,m){w.add({group:"nodes",data:{id:I.id.toString(),labelText:I.descr,height:I.height,width:I.width,level:m,nodeId:I.id,padding:I.padding,type:I.type},position:{x:I.x,y:I.y}}),I.children&&I.children.forEach(y=>{ct(y,w,f,m+1),w.add({group:"edges",data:{id:`${I.id}_${y.id}`,source:I.id,target:y.id,depth:m,section:y.section}})})}S(ct,"addNodes");function Lt(I,w){return new Promise(f=>{const m=Ct("body").append("div").attr("id","cy").attr("style","display:none"),y=pt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});m.remove(),ct(I,y,w,0),y.nodes().forEach(function(r){r.layoutDimensions=()=>{const t=r.data();return{w:t.width,h:t.height}}}),y.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),y.ready(r=>{z.info("Ready",r),f(y)})})}S(Lt,"layoutMindmap");function Tt(I,w){w.nodes().map((f,m)=>{const y=f.data();y.x=f.position().x,y.y=f.position().y,re(I,y);const r=I.getElementById(y.nodeId);z.info("Id:",m,"Position: (",f.position().x,", ",f.position().y,")",y),r.attr("transform",`translate(${f.position().x-y.width/2}, ${f.position().y-y.height/2})`),r.attr("attr",`apa-${m})`)})}S(Tt,"positionNodes");var ie=S(async(I,w,f,m)=>{var a,v;z.debug(`Rendering mindmap diagram +`+I);const y=m.db,r=y.getMindmap();if(!r)return;const t=ot();t.htmlLabels=!1;const e=Dt(w),i=e.append("g");i.attr("class","mindmap-edges");const o=e.append("g");o.attr("class","mindmap-nodes"),await lt(y,o,r,-1,t);const g=await Lt(r,t);Et(i,g),Tt(y,g),mt(void 0,e,((a=t.mindmap)==null?void 0:a.padding)??tt.mindmap.padding,((v=t.mindmap)==null?void 0:v.useMaxWidth)??tt.mindmap.useMaxWidth)},"draw"),ne={draw:ie},se=S(I=>{let w="";for(let f=0;ft?1:a>=t?0:NaN}function ot(t){return t}function lt(){var t=ot,a=st,m=null,o=y(0),p=y(G),x=y(0);function i(e){var r,l=(e=U(e)).length,g,A,h=0,c=new Array(l),n=new Array(l),v=+o.apply(this,arguments),w=Math.min(G,Math.max(-G,p.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r0&&(h+=d);for(a!=null?c.sort(function(S,C){return a(n[S],n[C])}):m!=null&&c.sort(function(S,C){return m(e[S],e[C])}),r=0,A=h?(w-l*$)/h:0;r0?d*A:0)+$,n[g]={data:e[g],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:y(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:y(+e),i):o},i.endAngle=function(e){return arguments.length?(p=typeof e=="function"?e:y(+e),i):p},i.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:y(+e),i):x},i}var ct=rt.pie,F={sections:new Map,showData:!1},b=F.sections,N=F.showData,ut=structuredClone(ct),pt=u(()=>structuredClone(ut),"getConfig"),gt=u(()=>{b=new Map,N=F.showData,at()},"clear"),dt=u(({label:t,value:a})=>{b.has(t)||(b.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=u(()=>b,"getSections"),mt=u(t=>{N=t},"setShowData"),ht=u(()=>N,"getShowData"),R={getConfig:pt,clear:gt,setDiagramTitle:K,getDiagramTitle:J,setAccTitle:H,getAccTitle:q,setAccDescription:Z,getAccDescription:j,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=u((t,a)=>{V(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:u(async t=>{const a=await nt("pie",t);z.debug(a),vt(a,R)},"parse")},yt=u(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),xt=yt,At=u(t=>{const a=[...t.entries()].map(o=>({label:o[0],value:o[1]})).sort((o,p)=>p.value-o.value);return lt().value(o=>o.value)(a)},"createPieArcs"),wt=u((t,a,m,o)=>{z.debug(`rendering pie chart +`+t);const p=o.db,x=Q(),i=X(p.getConfig(),x.pie),e=40,r=18,l=4,g=450,A=g,h=Y(a),c=h.append("g");c.attr("transform","translate("+A/2+","+g/2+")");const{themeVariables:n}=x;let[v]=tt(n.pieOuterStrokeWidth);v??(v=2);const w=i.textPosition,f=Math.min(A,g)/2-e,T=P().innerRadius(0).outerRadius(f),$=P().innerRadius(f*w).outerRadius(f*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",f+v/2).attr("class","pieOuterCircle");const d=p.getSections(),S=At(d),C=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12],D=it(C);c.selectAll("mySlices").data(S).enter().append("path").attr("d",T).attr("fill",s=>D(s.data.label)).attr("class","pieCircle");let W=0;d.forEach(s=>{W+=s}),c.selectAll("mySlices").data(S).enter().append("text").text(s=>(s.data.value/W*100).toFixed(0)+"%").attr("transform",s=>"translate("+$.centroid(s)+")").style("text-anchor","middle").attr("class","slice"),c.append("text").text(p.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const M=c.selectAll(".legend").data(D.domain()).enter().append("g").attr("class","legend").attr("transform",(s,E)=>{const k=r+l,L=k*D.domain().length/2,_=12*r,B=E*k-L;return"translate("+_+","+B+")"});M.append("rect").attr("width",r).attr("height",r).style("fill",D).style("stroke",D),M.data(S).append("text").attr("x",r+l).attr("y",r-l).text(s=>{const{label:E,value:k}=s.data;return p.getShowData()?`${E} [${k}]`:E});const I=Math.max(...M.selectAll("text").nodes().map(s=>(s==null?void 0:s.getBoundingClientRect().width)??0)),O=A+e+r+l+I;h.attr("viewBox",`0 0 ${O} ${g}`),et(h,g,O,i.useMaxWidth)},"draw"),Ct={draw:wt},Ft={parser:St,db:R,renderer:Ct,styles:xt};export{Ft as diagram}; diff --git a/static/js/md-pieDiagram-YF2LJOPJ-EW-DXTU2.js b/static/js/md-pieDiagram-YF2LJOPJ-EW-DXTU2.js deleted file mode 100644 index 46165b295..000000000 --- a/static/js/md-pieDiagram-YF2LJOPJ-EW-DXTU2.js +++ /dev/null @@ -1,30 +0,0 @@ -import{p as U}from"./md-chunk-TMUBEWPD-BBh5DnEp.js";import{aa as y,a2 as G,aG as j,B as q,p as Z,q as H,s as J,g as K,c as Q,b as X,_ as u,l as z,v as Y,d as tt,C as et,G as at,O as rt,k as nt}from"./md-index-BVqvVggs.js";import{p as it}from"./md-gitGraph-YCYPL57B-ClKbk6IU.js";import{d as P}from"./md-arc-Bq1t1uZ8.js";import{o as st}from"./md-ordinal-CxVaQH2l.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";import"./md-clone-DXToIaWo.js";import"./md-init-Gi6I4Gst.js";function ot(t,a){return at?1:a>=t?0:NaN}function lt(t){return t}function ct(){var t=lt,a=ot,m=null,o=y(0),p=y(G),x=y(0);function i(e){var r,l=(e=j(e)).length,g,A,h=0,c=new Array(l),n=new Array(l),v=+o.apply(this,arguments),w=Math.min(G,Math.max(-G,p.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r0&&(h+=d);for(a!=null?c.sort(function(S,C){return a(n[S],n[C])}):m!=null&&c.sort(function(S,C){return m(e[S],e[C])}),r=0,A=h?(w-l*$)/h:0;r0?d*A:0)+$,n[g]={data:e[g],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};return n}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:y(+e),i):t},i.sortValues=function(e){return arguments.length?(a=e,m=null,i):a},i.sort=function(e){return arguments.length?(m=e,a=null,i):m},i.startAngle=function(e){return arguments.length?(o=typeof e=="function"?e:y(+e),i):o},i.endAngle=function(e){return arguments.length?(p=typeof e=="function"?e:y(+e),i):p},i.padAngle=function(e){return arguments.length?(x=typeof e=="function"?e:y(+e),i):x},i}var R=q.pie,F={sections:new Map,showData:!1,config:R},b=F.sections,O=F.showData,ut=structuredClone(R),pt=u(()=>structuredClone(ut),"getConfig"),gt=u(()=>{b=new Map,O=F.showData,Y()},"clear"),dt=u(({label:t,value:a})=>{b.has(t)||(b.set(t,a),z.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=u(()=>b,"getSections"),mt=u(t=>{O=t},"setShowData"),ht=u(()=>O,"getShowData"),I={getConfig:pt,clear:gt,setDiagramTitle:Z,getDiagramTitle:H,setAccTitle:J,getAccTitle:K,setAccDescription:Q,getAccDescription:X,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=u((t,a)=>{U(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:u(async t=>{const a=await it("pie",t);z.debug(a),vt(a,I)},"parse")},yt=u(t=>` - .pieCircle{ - stroke: ${t.pieStrokeColor}; - stroke-width : ${t.pieStrokeWidth}; - opacity : ${t.pieOpacity}; - } - .pieOuterCircle{ - stroke: ${t.pieOuterStrokeColor}; - stroke-width: ${t.pieOuterStrokeWidth}; - fill: none; - } - .pieTitleText { - text-anchor: middle; - font-size: ${t.pieTitleTextSize}; - fill: ${t.pieTitleTextColor}; - font-family: ${t.fontFamily}; - } - .slice { - font-family: ${t.fontFamily}; - fill: ${t.pieSectionTextColor}; - font-size:${t.pieSectionTextSize}; - // fill: white; - } - .legend text { - fill: ${t.pieLegendTextColor}; - font-family: ${t.fontFamily}; - font-size: ${t.pieLegendTextSize}; - } -`,"getStyles"),xt=yt,At=u(t=>{const a=[...t.entries()].map(o=>({label:o[0],value:o[1]})).sort((o,p)=>p.value-o.value);return ct().value(o=>o.value)(a)},"createPieArcs"),wt=u((t,a,m,o)=>{z.debug(`rendering pie chart -`+t);const p=o.db,x=tt(),i=et(p.getConfig(),x.pie),e=40,r=18,l=4,g=450,A=g,h=at(a),c=h.append("g");c.attr("transform","translate("+A/2+","+g/2+")");const{themeVariables:n}=x;let[v]=rt(n.pieOuterStrokeWidth);v??(v=2);const w=i.textPosition,f=Math.min(A,g)/2-e,T=P().innerRadius(0).outerRadius(f),$=P().innerRadius(f*w).outerRadius(f*w);c.append("circle").attr("cx",0).attr("cy",0).attr("r",f+v/2).attr("class","pieOuterCircle");const d=p.getSections(),S=At(d),C=[n.pie1,n.pie2,n.pie3,n.pie4,n.pie5,n.pie6,n.pie7,n.pie8,n.pie9,n.pie10,n.pie11,n.pie12],D=st(C);c.selectAll("mySlices").data(S).enter().append("path").attr("d",T).attr("fill",s=>D(s.data.label)).attr("class","pieCircle");let W=0;d.forEach(s=>{W+=s}),c.selectAll("mySlices").data(S).enter().append("text").text(s=>(s.data.value/W*100).toFixed(0)+"%").attr("transform",s=>"translate("+$.centroid(s)+")").style("text-anchor","middle").attr("class","slice"),c.append("text").text(p.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const M=c.selectAll(".legend").data(D.domain()).enter().append("g").attr("class","legend").attr("transform",(s,k)=>{const E=r+l,_=E*D.domain().length/2,B=12*r,V=k*E-_;return"translate("+B+","+V+")"});M.append("rect").attr("width",r).attr("height",r).style("fill",D).style("stroke",D),M.data(S).append("text").attr("x",r+l).attr("y",r-l).text(s=>{const{label:k,value:E}=s.data;return p.getShowData()?`${k} [${E}]`:k});const L=Math.max(...M.selectAll("text").nodes().map(s=>(s==null?void 0:s.getBoundingClientRect().width)??0)),N=A+e+r+l+L;h.attr("viewBox",`0 0 ${N} ${g}`),nt(h,g,N,i.useMaxWidth)},"draw"),Ct={draw:wt},Ft={parser:St,db:I,renderer:Ct,styles:xt};export{Ft as diagram}; diff --git a/static/js/md-quadrantDiagram-OS5C2QUG-CweFJDAr.js b/static/js/md-quadrantDiagram-OS5C2QUG-bdxnLfCx.js similarity index 97% rename from static/js/md-quadrantDiagram-OS5C2QUG-CweFJDAr.js rename to static/js/md-quadrantDiagram-OS5C2QUG-bdxnLfCx.js index fed91e5ca..ea45eb4e1 100644 --- a/static/js/md-quadrantDiagram-OS5C2QUG-CweFJDAr.js +++ b/static/js/md-quadrantDiagram-OS5C2QUG-bdxnLfCx.js @@ -1,7 +1,7 @@ -import{_ as o,I as _e,B as D,l as At,d as wt,i as Ae,q as ie,s as ke,g as Fe,p as Pe,b as ve,c as Ce,v as Le,j as zt,k as Ee}from"./md-index-BVqvVggs.js";import{l as ee}from"./md-linear-BdLRedgo.js";import"./md-init-Gi6I4Gst.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],O=[1,14],Y=[1,23],G=[1,18],yt=[1,19],Tt=[1,20],dt=[1,21],Ft=[1,22],ut=[1,24],xt=[1,25],ft=[1,26],gt=[1,27],i=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],H=[1,62],X=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],$=[1,91],tt=[1,92],et=[1,99],it=[1,93],at=[1,96],nt=[1,94],st=[1,95],rt=[1,97],ot=[1,98],Pt=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,_,e,pt){var s=e.length-1;switch(_){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:c,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:d,5:T,10:q,12:m,13:b,14:x,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,101]},t(a,[2,29],{10:Pt}),t(Kt,[2,27],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:88,16:89,23:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:105},t(R,[2,26]),t(a,[2,50],{10:Pt}),t(Kt,[2,28],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],_=[null],e=[],pt=this.table,s="",mt=0,Zt=0,qe=2,Jt=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);E.setInput(r,K.yy),K.yy.lexer=E,K.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Lt=E.yylloc;e.push(Lt);var be=E.options&&E.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){g.length=g.length-2*B,_.length=_.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=f.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(f=B,B=f.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,Z,N,Et,lt={},bt,M,te,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?N=this.defaultActions[Z]:((w===null||typeof w>"u")&&(w=$t()),N=pt[Z]&&pt[Z][w]),typeof N>"u"||!N.length||!N[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");E.showPosition?Dt="Parse error on line "+(mt+1)+`: +import{_ as o,s as _e,g as Ae,n as ie,o as ke,a as Fe,b as Pe,c as wt,l as At,d as zt,e as ve,v as Ce,E as D,I as Le,i as Ee}from"./md-index-B8Nim9kS.js";import{l as ee}from"./md-linear-C1jk9ODm.js";import"./md-init-Gi6I4Gst.js";var Vt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],S=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],a=[55,56,57],A=[2,36],d=[1,37],T=[1,36],q=[1,38],m=[1,35],b=[1,43],x=[1,41],O=[1,14],Y=[1,23],G=[1,18],yt=[1,19],Tt=[1,20],dt=[1,21],Ft=[1,22],ut=[1,24],xt=[1,25],ft=[1,26],gt=[1,27],i=[1,28],Bt=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],H=[1,62],X=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Rt=[1,65],Nt=[1,66],Wt=[1,67],Ut=[1,68],Qt=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],$=[1,91],tt=[1,92],et=[1,99],it=[1,93],at=[1,96],nt=[1,94],st=[1,95],rt=[1,97],ot=[1,98],Pt=[1,102],Kt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:o(function(r,l,g,f,_,e,pt){var s=e.length-1;switch(_){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,A,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(y,[2,34]),{27:45,55:c,56:h,57:p},t(a,[2,37]),t(a,A,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:T,10:q,12:m,13:b,14:x,18:O,25:Y,35:G,37:yt,39:Tt,41:dt,42:Ft,48:ut,50:xt,51:ft,52:gt,53:i,54:Bt,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(a,[2,45]),t(a,[2,46]),{18:[1,50]},{4:d,5:T,10:q,12:m,13:b,14:x,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,10:q,12:m,13:b,14:x,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:64,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,21:63},t(a,[2,53],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(a,[2,56],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(a,[2,57],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,58],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,59],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,60],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:Rt,5:Nt,6:Wt,7:Ut,8:Qt,9:Ot,10:Ht,11:Xt,12:Mt,13:Yt,14:jt,15:Gt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(a,[2,52],{58:31,43:83,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(a,[2,55],{58:31,43:84,4:d,5:T,10:q,12:m,13:b,14:x,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:88,23:87},t(I,[2,24]),t(a,[2,51],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,54],{59:59,58:60,4:d,5:T,8:H,10:q,12:m,13:b,14:x,18:X,63:k,64:F,65:P,66:v,67:C}),t(a,[2,47],{22:88,16:89,23:100,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,101]},t(a,[2,29],{10:Pt}),t(Kt,[2,27],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:88,16:89,23:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:89,17:nt,18:st,19:rt,20:ot,22:105},t(R,[2,26]),t(a,[2,50],{10:Pt}),t(Kt,[2,28],{16:103,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],_=[null],e=[],pt=this.table,s="",mt=0,Zt=0,qe=2,Jt=1,me=e.slice.call(arguments,1),E=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);E.setInput(r,K.yy),K.yy.lexer=E,K.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var Lt=E.yylloc;e.push(Lt);var be=E.options&&E.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(B){g.length=g.length-2*B,_.length=_.length-B,e.length=e.length-B}o(Se,"popStack");function $t(){var B;return B=f.pop()||E.lex()||Jt,typeof B!="number"&&(B instanceof Array&&(f=B,B=f.pop()),B=l.symbols_[B]||B),B}o($t,"lex");for(var w,Z,N,Et,lt={},bt,M,te,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?N=this.defaultActions[Z]:((w===null||typeof w>"u")&&(w=$t()),N=pt[Z]&&pt[Z][w]),typeof N>"u"||!N.length||!N[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");E.showPosition?Dt="Parse error on line "+(mt+1)+`: `+E.showPosition()+` Expecting `+St.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Dt="Parse error on line "+(mt+1)+": Unexpected "+(w==Jt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Dt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:Lt,expected:St})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+w);switch(N[0]){case 1:g.push(w),_.push(E.yytext),e.push(E.yylloc),g.push(N[1]),w=null,Zt=E.yyleng,s=E.yytext,mt=E.yylineno,Lt=E.yylloc;break;case 2:if(M=this.productions_[N[1]][1],lt.$=_[_.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},be&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Zt,mt,K.yy,N[1],_,e].concat(me)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),_=_.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[N[1]][0]),_.push(lt.$),e.push(lt._$),te=pt[g[g.length-2]][g[g.length-1]],g.push(te);break;case 3:return!0}}return!0},"parse")},Te=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var f=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` `+l+"^"},"showPosition"),test_match:o(function(r,l){var g,f,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),f=r[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],g=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var e in _)this[e]=_[e];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,l,g,f;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),e=0;e<_.length;e++)if(g=this._input.match(this.rules[_[e]]),g&&(!l||g[0].length>l[0].length)){if(l=g,f=e,this.options.backtrack_lexer){if(r=this.test_match(g,_[e]),r!==!1)return r;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(r=this.test_match(l,_[f]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,g,f,_){switch(f){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return j}();vt.lexer=Te;function qt(){this.yy={}}return o(qt,"Parser"),qt.prototype=vt,vt.Parser=qt,new qt}();Vt.parser=Vt;var De=Vt,V=_e(),ht,ze=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,u,c,h,p,y,S,a,A,d,T,q,m,b,x,O,Y,G;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=D.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((u=D.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=D.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((h=D.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((p=D.quadrantChart)==null?void 0:p.quadrantPadding)||5,xAxisLabelPadding:((y=D.quadrantChart)==null?void 0:y.xAxisLabelPadding)||5,yAxisLabelPadding:((S=D.quadrantChart)==null?void 0:S.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=D.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((A=D.quadrantChart)==null?void 0:A.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=D.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((T=D.quadrantChart)==null?void 0:T.quadrantTextTopPadding)||5,pointTextPadding:((q=D.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((m=D.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((b=D.quadrantChart)==null?void 0:b.pointRadius)||5,xAxisPosition:((x=D.quadrantChart)==null?void 0:x.xAxisPosition)||"top",yAxisPosition:((O=D.quadrantChart)==null?void 0:O.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=D.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((G=D.quadrantChart)==null?void 0:G.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,u){this.classes.set(n,u)}setConfig(n){At.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){At.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,u,c,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&u?p:0,bottom:n==="bottom"&&u?p:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?S:0,right:this.config.yAxisPosition==="right"&&c?S:0},A=this.config.titleFontSize+this.config.titlePadding*2,d={top:h?A:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-d.top,x=m/2,O=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:d,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:x,quadrantHeight:b,quadrantHalfHeight:O}}}getAxisLabels(n,u,c,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:S,quadrantHeight:a,quadrantLeft:A,quadrantHalfWidth:d,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,x=[];return this.data.xAxisLeftText&&u&&x.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&x.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+d+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&x.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+a-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&x.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+S-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),x}getQuadrants(n){const{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=u,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant4Fill}];for(const a of S)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return S}getQuadrantPoints(n){const{quadrantSpace:u}=n,{quadrantHeight:c,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=u,S=ee().domain([0,1]).range([h,y+h]),a=ee().domain([0,1]).range([c+p,p]);return this.data.points.map(d=>{const T=this.classes.get(d.className);return T&&(d={...T,...d}),{x:S(d.x),y:a(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:S(d.x),y:a(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(n){const u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:a,quadrantWidth:A}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a,x2:y+A+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+A,y1:a+u,x2:y+A,y2:a+p-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a+p,x2:y+A+u,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+u,x2:y,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:a+u,x2:y+S,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+u,y1:a+h,x2:y+A-u,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,u,c);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,u,p),borderLines:this.getBorders(p),title:this.getTitle(c)}}},o(ht,"QuadrantBuilder"),ht),ct,_t=(ct=class extends Error{constructor(n,u,c){super(`value for ${n} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},o(ct,"InvalidStyleError"),ct);function It(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(It,"validateHexCode");function ae(t){return!/^\d+$/.test(t)}o(ae,"validateNumber");function ne(t){return!/^\d+px$/.test(t)}o(ne,"validateSizeInPixels");var Ve=wt();function Q(t){return Ae(t.trim(),Ve)}o(Q,"textSanitizer");var z=new ze;function se(t){z.setData({quadrant1Text:Q(t.text)})}o(se,"setQuadrant1Text");function re(t){z.setData({quadrant2Text:Q(t.text)})}o(re,"setQuadrant2Text");function oe(t){z.setData({quadrant3Text:Q(t.text)})}o(oe,"setQuadrant3Text");function le(t){z.setData({quadrant4Text:Q(t.text)})}o(le,"setQuadrant4Text");function he(t){z.setData({xAxisLeftText:Q(t.text)})}o(he,"setXAxisLeftText");function ce(t){z.setData({xAxisRightText:Q(t.text)})}o(ce,"setXAxisRightText");function de(t){z.setData({yAxisTopText:Q(t.text)})}o(de,"setYAxisTopText");function ue(t){z.setData({yAxisBottomText:Q(t.text)})}o(ue,"setYAxisBottomText");function kt(t){const n={};for(const u of t){const[c,h]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ae(h))throw new _t(c,h,"number");n.radius=parseInt(h)}else if(c==="color"){if(It(h))throw new _t(c,h,"hex code");n.color=h}else if(c==="stroke-color"){if(It(h))throw new _t(c,h,"hex code");n.strokeColor=h}else if(c==="stroke-width"){if(ne(h))throw new _t(c,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${c} is not supported.`)}return n}o(kt,"parseStyles");function xe(t,n,u,c,h){const p=kt(h);z.addPoints([{x:u,y:c,text:Q(t.text),className:n,...p}])}o(xe,"addPoint");function fe(t,n){z.addClass(t,kt(n))}o(fe,"addClass");function ge(t){z.setConfig({chartWidth:t})}o(ge,"setWidth");function pe(t){z.setConfig({chartHeight:t})}o(pe,"setHeight");function ye(){const t=wt(),{themeVariables:n,quadrantChart:u}=t;return u&&z.setConfig(u),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:ie()}),z.build()}o(ye,"getQuadrantData");var Ie=o(function(){z.clear(),Le()},"clear"),we={setWidth:ge,setHeight:pe,setQuadrant1Text:se,setQuadrant2Text:re,setQuadrant3Text:oe,setQuadrant4Text:le,setXAxisLeftText:he,setXAxisRightText:ce,setYAxisTopText:de,setYAxisBottomText:ue,parseStyles:kt,addPoint:xe,addClass:fe,getQuadrantData:ye,clear:Ie,setAccTitle:ke,getAccTitle:Fe,setDiagramTitle:Pe,getDiagramTitle:ie,getAccDescription:ve,setAccDescription:Ce},Be=o((t,n,u,c)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const S=wt();At.debug(`Rendering quadrant chart -`+t);const a=S.securityLevel;let A;a==="sandbox"&&(A=zt("#i"+n));const T=(a==="sandbox"?zt(A.nodes()[0].contentDocument.body):zt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=((xt=S.quadrantChart)==null?void 0:xt.chartWidth)??500,b=((ft=S.quadrantChart)==null?void 0:ft.chartHeight)??500;Ee(T,b,m,((gt=S.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),T.attr("viewBox","0 0 "+m+" "+b),c.db.setHeight(b),c.db.setWidth(m);const x=c.db.getQuadrantData(),O=q.append("g").attr("class","quadrants"),Y=q.append("g").attr("class","border"),G=q.append("g").attr("class","data-points"),yt=q.append("g").attr("class","labels"),Tt=q.append("g").attr("class","title");x.title&&Tt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",p(x.title.verticalPos)).attr("transform",y(x.title)).text(x.title.text),x.borderLines&&Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const dt=O.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");dt.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),dt.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const ut=G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");ut.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),ut.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Re={draw:Be},Qe={parser:De,db:we,renderer:Re,styles:o(()=>"","styles")};export{Qe as diagram}; +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var l=this.next();return l||this.lex()},"lex"),begin:o(function(l){this.conditionStack.push(l)},"begin"),popState:o(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:o(function(l){this.begin(l)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(l,g,f,_){switch(f){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return j}();vt.lexer=Te;function qt(){this.yy={}}return o(qt,"Parser"),qt.prototype=vt,vt.Parser=qt,new qt}();Vt.parser=Vt;var De=Vt,V=Le(),ht,ze=(ht=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var n,u,c,h,p,y,S,a,A,d,T,q,m,b,x,O,Y,G;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((n=D.quadrantChart)==null?void 0:n.chartWidth)||500,chartWidth:((u=D.quadrantChart)==null?void 0:u.chartHeight)||500,titlePadding:((c=D.quadrantChart)==null?void 0:c.titlePadding)||10,titleFontSize:((h=D.quadrantChart)==null?void 0:h.titleFontSize)||20,quadrantPadding:((p=D.quadrantChart)==null?void 0:p.quadrantPadding)||5,xAxisLabelPadding:((y=D.quadrantChart)==null?void 0:y.xAxisLabelPadding)||5,yAxisLabelPadding:((S=D.quadrantChart)==null?void 0:S.yAxisLabelPadding)||5,xAxisLabelFontSize:((a=D.quadrantChart)==null?void 0:a.xAxisLabelFontSize)||16,yAxisLabelFontSize:((A=D.quadrantChart)==null?void 0:A.yAxisLabelFontSize)||16,quadrantLabelFontSize:((d=D.quadrantChart)==null?void 0:d.quadrantLabelFontSize)||16,quadrantTextTopPadding:((T=D.quadrantChart)==null?void 0:T.quadrantTextTopPadding)||5,pointTextPadding:((q=D.quadrantChart)==null?void 0:q.pointTextPadding)||5,pointLabelFontSize:((m=D.quadrantChart)==null?void 0:m.pointLabelFontSize)||12,pointRadius:((b=D.quadrantChart)==null?void 0:b.pointRadius)||5,xAxisPosition:((x=D.quadrantChart)==null?void 0:x.xAxisPosition)||"top",yAxisPosition:((O=D.quadrantChart)==null?void 0:O.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((Y=D.quadrantChart)==null?void 0:Y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((G=D.quadrantChart)==null?void 0:G.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,At.info("clear called")}setData(n){this.data={...this.data,...n}}addPoints(n){this.data.points=[...n,...this.data.points]}addClass(n,u){this.classes.set(n,u)}setConfig(n){At.trace("setConfig called with: ",n),this.config={...this.config,...n}}setThemeConfig(n){At.trace("setThemeConfig called with: ",n),this.themeConfig={...this.themeConfig,...n}}calculateSpace(n,u,c,h){const p=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,y={top:n==="top"&&u?p:0,bottom:n==="bottom"&&u?p:0},S=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,a={left:this.config.yAxisPosition==="left"&&c?S:0,right:this.config.yAxisPosition==="right"&&c?S:0},A=this.config.titleFontSize+this.config.titlePadding*2,d={top:h?A:0},T=this.config.quadrantPadding+a.left,q=this.config.quadrantPadding+y.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-a.left-a.right,b=this.config.chartHeight-this.config.quadrantPadding*2-y.top-y.bottom-d.top,x=m/2,O=b/2;return{xAxisSpace:y,yAxisSpace:a,titleSpace:d,quadrantSpace:{quadrantLeft:T,quadrantTop:q,quadrantWidth:m,quadrantHalfWidth:x,quadrantHeight:b,quadrantHalfHeight:O}}}getAxisLabels(n,u,c,h){const{quadrantSpace:p,titleSpace:y}=h,{quadrantHalfHeight:S,quadrantHeight:a,quadrantLeft:A,quadrantHalfWidth:d,quadrantTop:T,quadrantWidth:q}=p,m=!!this.data.xAxisRightText,b=!!this.data.yAxisTopText,x=[];return this.data.xAxisLeftText&&u&&x.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&u&&x.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:A+d+(m?d/2:0),y:n==="top"?this.config.xAxisLabelPadding+y.top:this.config.xAxisLabelPadding+T+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&c&&x.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+a-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&c&&x.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+A+q+this.config.quadrantPadding,y:T+S-(b?S/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:b?"center":"left",horizontalPos:"top",rotation:-90}),x}getQuadrants(n){const{quadrantSpace:u}=n,{quadrantHalfHeight:c,quadrantLeft:h,quadrantHalfWidth:p,quadrantTop:y}=u,S=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y,width:p,height:c,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y,width:p,height:c,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:h+p,y:y+c,width:p,height:c,fill:this.themeConfig.quadrant4Fill}];for(const a of S)a.text.x=a.x+a.width/2,this.data.points.length===0?(a.text.y=a.y+a.height/2,a.text.horizontalPos="middle"):(a.text.y=a.y+this.config.quadrantTextTopPadding,a.text.horizontalPos="top");return S}getQuadrantPoints(n){const{quadrantSpace:u}=n,{quadrantHeight:c,quadrantLeft:h,quadrantTop:p,quadrantWidth:y}=u,S=ee().domain([0,1]).range([h,y+h]),a=ee().domain([0,1]).range([c+p,p]);return this.data.points.map(d=>{const T=this.classes.get(d.className);return T&&(d={...T,...d}),{x:S(d.x),y:a(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:S(d.x),y:a(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(n){const u=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:c}=n,{quadrantHalfHeight:h,quadrantHeight:p,quadrantLeft:y,quadrantHalfWidth:S,quadrantTop:a,quadrantWidth:A}=c;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a,x2:y+A+u,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y+A,y1:a+u,x2:y+A,y2:a+p-u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y-u,y1:a+p,x2:y+A+u,y2:a+p},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:y,y1:a+u,x2:y,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+S,y1:a+u,x2:y+S,y2:a+p-u},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:y+u,y1:a+h,x2:y+A-u,y2:a+h}]}getTitle(n){if(n)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const n=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),u=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),c=this.config.showTitle&&!!this.data.titleText,h=this.data.points.length>0?"bottom":this.config.xAxisPosition,p=this.calculateSpace(h,n,u,c);return{points:this.getQuadrantPoints(p),quadrants:this.getQuadrants(p),axisLabels:this.getAxisLabels(h,n,u,p),borderLines:this.getBorders(p),title:this.getTitle(c)}}},o(ht,"QuadrantBuilder"),ht),ct,_t=(ct=class extends Error{constructor(n,u,c){super(`value for ${n} ${u} is invalid, please use a valid ${c}`),this.name="InvalidStyleError"}},o(ct,"InvalidStyleError"),ct);function It(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}o(It,"validateHexCode");function ae(t){return!/^\d+$/.test(t)}o(ae,"validateNumber");function ne(t){return!/^\d+px$/.test(t)}o(ne,"validateSizeInPixels");var Ve=wt();function Q(t){return Ee(t.trim(),Ve)}o(Q,"textSanitizer");var z=new ze;function se(t){z.setData({quadrant1Text:Q(t.text)})}o(se,"setQuadrant1Text");function re(t){z.setData({quadrant2Text:Q(t.text)})}o(re,"setQuadrant2Text");function oe(t){z.setData({quadrant3Text:Q(t.text)})}o(oe,"setQuadrant3Text");function le(t){z.setData({quadrant4Text:Q(t.text)})}o(le,"setQuadrant4Text");function he(t){z.setData({xAxisLeftText:Q(t.text)})}o(he,"setXAxisLeftText");function ce(t){z.setData({xAxisRightText:Q(t.text)})}o(ce,"setXAxisRightText");function de(t){z.setData({yAxisTopText:Q(t.text)})}o(de,"setYAxisTopText");function ue(t){z.setData({yAxisBottomText:Q(t.text)})}o(ue,"setYAxisBottomText");function kt(t){const n={};for(const u of t){const[c,h]=u.trim().split(/\s*:\s*/);if(c==="radius"){if(ae(h))throw new _t(c,h,"number");n.radius=parseInt(h)}else if(c==="color"){if(It(h))throw new _t(c,h,"hex code");n.color=h}else if(c==="stroke-color"){if(It(h))throw new _t(c,h,"hex code");n.strokeColor=h}else if(c==="stroke-width"){if(ne(h))throw new _t(c,h,"number of pixels (eg. 10px)");n.strokeWidth=h}else throw new Error(`style named ${c} is not supported.`)}return n}o(kt,"parseStyles");function xe(t,n,u,c,h){const p=kt(h);z.addPoints([{x:u,y:c,text:Q(t.text),className:n,...p}])}o(xe,"addPoint");function fe(t,n){z.addClass(t,kt(n))}o(fe,"addClass");function ge(t){z.setConfig({chartWidth:t})}o(ge,"setWidth");function pe(t){z.setConfig({chartHeight:t})}o(pe,"setHeight");function ye(){const t=wt(),{themeVariables:n,quadrantChart:u}=t;return u&&z.setConfig(u),z.setThemeConfig({quadrant1Fill:n.quadrant1Fill,quadrant2Fill:n.quadrant2Fill,quadrant3Fill:n.quadrant3Fill,quadrant4Fill:n.quadrant4Fill,quadrant1TextFill:n.quadrant1TextFill,quadrant2TextFill:n.quadrant2TextFill,quadrant3TextFill:n.quadrant3TextFill,quadrant4TextFill:n.quadrant4TextFill,quadrantPointFill:n.quadrantPointFill,quadrantPointTextFill:n.quadrantPointTextFill,quadrantXAxisTextFill:n.quadrantXAxisTextFill,quadrantYAxisTextFill:n.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:n.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:n.quadrantInternalBorderStrokeFill,quadrantTitleFill:n.quadrantTitleFill}),z.setData({titleText:ie()}),z.build()}o(ye,"getQuadrantData");var Ie=o(function(){z.clear(),Ce()},"clear"),we={setWidth:ge,setHeight:pe,setQuadrant1Text:se,setQuadrant2Text:re,setQuadrant3Text:oe,setQuadrant4Text:le,setXAxisLeftText:he,setXAxisRightText:ce,setYAxisTopText:de,setYAxisBottomText:ue,parseStyles:kt,addPoint:xe,addClass:fe,getQuadrantData:ye,clear:Ie,setAccTitle:Pe,getAccTitle:Fe,setDiagramTitle:ke,getDiagramTitle:ie,getAccDescription:Ae,setAccDescription:_e},Be=o((t,n,u,c)=>{var xt,ft,gt;function h(i){return i==="top"?"hanging":"middle"}o(h,"getDominantBaseLine");function p(i){return i==="left"?"start":"middle"}o(p,"getTextAnchor");function y(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}o(y,"getTransformation");const S=wt();At.debug(`Rendering quadrant chart +`+t);const a=S.securityLevel;let A;a==="sandbox"&&(A=zt("#i"+n));const T=(a==="sandbox"?zt(A.nodes()[0].contentDocument.body):zt("body")).select(`[id="${n}"]`),q=T.append("g").attr("class","main"),m=((xt=S.quadrantChart)==null?void 0:xt.chartWidth)??500,b=((ft=S.quadrantChart)==null?void 0:ft.chartHeight)??500;ve(T,b,m,((gt=S.quadrantChart)==null?void 0:gt.useMaxWidth)??!0),T.attr("viewBox","0 0 "+m+" "+b),c.db.setHeight(b),c.db.setWidth(m);const x=c.db.getQuadrantData(),O=q.append("g").attr("class","quadrants"),Y=q.append("g").attr("class","border"),G=q.append("g").attr("class","data-points"),yt=q.append("g").attr("class","labels"),Tt=q.append("g").attr("class","title");x.title&&Tt.append("text").attr("x",0).attr("y",0).attr("fill",x.title.fill).attr("font-size",x.title.fontSize).attr("dominant-baseline",h(x.title.horizontalPos)).attr("text-anchor",p(x.title.verticalPos)).attr("transform",y(x.title)).text(x.title.text),x.borderLines&&Y.selectAll("line").data(x.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const dt=O.selectAll("g.quadrant").data(x.quadrants).enter().append("g").attr("class","quadrant");dt.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),dt.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text)).text(i=>i.text.text),yt.selectAll("g.label").data(x.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>h(i.horizontalPos)).attr("text-anchor",i=>p(i.verticalPos)).attr("transform",i=>y(i));const ut=G.selectAll("g.data-point").data(x.points).enter().append("g").attr("class","data-point");ut.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),ut.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>h(i.text.horizontalPos)).attr("text-anchor",i=>p(i.text.verticalPos)).attr("transform",i=>y(i.text))},"draw"),Re={draw:Be},Qe={parser:De,db:we,renderer:Re,styles:o(()=>"","styles")};export{Qe as diagram}; diff --git a/static/js/md-requirementDiagram-MIRIMTAZ-BXWl9Kd7.js b/static/js/md-requirementDiagram-MIRIMTAZ-COvK1z2r.js similarity index 97% rename from static/js/md-requirementDiagram-MIRIMTAZ-BXWl9Kd7.js rename to static/js/md-requirementDiagram-MIRIMTAZ-COvK1z2r.js index 0ec09caad..40e1b0463 100644 --- a/static/js/md-requirementDiagram-MIRIMTAZ-BXWl9Kd7.js +++ b/static/js/md-requirementDiagram-MIRIMTAZ-COvK1z2r.js @@ -1,9 +1,9 @@ -import{_ as r,d as ve,s as Fe,g as De,c as Pe,b as Ye,l as xe,v as Ue,j as ce,k as Be,K as Qe,e as Te}from"./md-index-BVqvVggs.js";import{G as He}from"./md-graph-BfdmZmeA.js";import{l as We}from"./md-layout-BErqkM37.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";var he=function(){var e=r(function($,i,a,l){for(a=a||{},l=$.length;l--;a[$[l]]=i);return a},"o"),t=[1,3],c=[1,4],d=[1,5],u=[1,6],p=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],y=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],I=[1,25],b=[1,26],w=[1,27],q=[1,20],v=[1,28],A=[1,29],F=[62,63],pe=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],fe=[1,47],ye=[1,48],_e=[1,49],ge=[1,50],Ee=[1,51],Re=[1,52],me=[1,53],O=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],j=[1,69],X=[1,70],J=[1,67],Z=[1,68],S=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:r(function(i,a,l,n,f,s,K){var E=s.length-1;switch(f){case 4:this.$=s[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[E-3],s[E-4]);break;case 14:n.setNewReqId(s[E-2]);break;case 15:n.setNewReqText(s[E-2]);break;case 16:n.setNewReqRisk(s[E-2]);break;case 17:n.setNewReqVerifyMethod(s[E-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[E-3]);break;case 34:n.setNewElementType(s[E-2]);break;case 35:n.setNewElementDocRef(s[E-2]);break;case 38:n.addRelationship(s[E-2],s[E],s[E-4]);break;case 39:n.addRelationship(s[E-2],s[E-4],s[E]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:t,9:c,11:d,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:c,11:d,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(p,[2,6]),{3:12,4:2,6:t,9:c,11:d,13:u},{1:[2,2]},{4:17,5:y,7:13,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},e(p,[2,4]),e(p,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:y,7:31,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:32,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:33,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:34,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:35,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(pe,[2,49]),e(pe,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{52:54,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:66,47:J,49:Z},{23:71,62:v,63:A},{23:72,62:v,63:A},e(S,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(S,[2,19]),e(S,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:X,46:80,47:J,49:Z},e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{23:81,62:v,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(S,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(S,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:110,47:J,49:Z},{5:j,30:X,46:111,47:J,49:Z},e(S,[2,14]),e(S,[2,15]),e(S,[2,16]),e(S,[2,17]),e(S,[2,34]),e(S,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:r(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:r(function(i){var a=this,l=[0],n=[],f=[null],s=[],K=this.table,E="",te=0,Ie=0,Le=2,be=1,Oe=s.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);m.setInput(i,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var ae=m.yylloc;s.push(ae);var Ce=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(N){l.length=l.length-2*N,f.length=f.length-N,s.length=s.length-N}r(Me,"popStack");function Se(){var N;return N=n.pop()||m.lex()||be,typeof N!="number"&&(N instanceof Array&&(n=N,N=n.pop()),N=a.symbols_[N]||N),N}r(Se,"lex");for(var k,M,x,le,H={},ie,V,ke,re;;){if(M=l[l.length-1],this.defaultActions[M]?x=this.defaultActions[M]:((k===null||typeof k>"u")&&(k=Se()),x=K[M]&&K[M][k]),typeof x>"u"||!x.length||!x[0]){var oe="";re=[];for(ie in K[M])this.terminals_[ie]&&ie>Le&&re.push("'"+this.terminals_[ie]+"'");m.showPosition?oe="Parse error on line "+(te+1)+`: +import{_ as r,g as Fe,s as De,a as Pe,b as Ye,c as ve,d as ce,e as Ue,v as Be,l as xe,K as Qe,k as Te}from"./md-index-B8Nim9kS.js";import{G as He}from"./md-graph-6STGQExD.js";import{l as We}from"./md-layout-C6gsB80Q.js";import"./md-_baseUniq-DU1ET3rn.js";import"./md-_basePickBy-B78WwQFo.js";var he=function(){var e=r(function($,i,a,l){for(a=a||{},l=$.length;l--;a[$[l]]=i);return a},"o"),t=[1,3],c=[1,4],d=[1,5],u=[1,6],p=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],y=[1,18],h=[2,7],o=[1,22],g=[1,23],R=[1,24],I=[1,25],b=[1,26],w=[1,27],q=[1,20],v=[1,28],A=[1,29],F=[62,63],pe=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],fe=[1,47],ye=[1,48],_e=[1,49],ge=[1,50],Ee=[1,51],Re=[1,52],me=[1,53],O=[53,54],D=[1,64],P=[1,60],Y=[1,61],U=[1,62],B=[1,63],Q=[1,65],j=[1,69],X=[1,70],J=[1,67],Z=[1,68],S=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],ne={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:r(function(i,a,l,n,f,s,K){var E=s.length-1;switch(f){case 4:this.$=s[E].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[E].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[E-3],s[E-4]);break;case 14:n.setNewReqId(s[E-2]);break;case 15:n.setNewReqText(s[E-2]);break;case 16:n.setNewReqRisk(s[E-2]);break;case 17:n.setNewReqVerifyMethod(s[E-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[E-3]);break;case 34:n.setNewElementType(s[E-2]);break;case 35:n.setNewElementDocRef(s[E-2]);break;case 38:n.addRelationship(s[E-2],s[E],s[E-4]);break;case 39:n.addRelationship(s[E-2],s[E-4],s[E]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES;break}},"anonymous"),table:[{3:1,4:2,6:t,9:c,11:d,13:u},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:c,11:d,13:u},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(p,[2,6]),{3:12,4:2,6:t,9:c,11:d,13:u},{1:[2,2]},{4:17,5:y,7:13,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},e(p,[2,4]),e(p,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:y,7:31,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:32,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:33,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:34,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{4:17,5:y,7:35,8:h,9:c,11:d,13:u,14:14,15:15,16:16,17:19,23:21,31:o,32:g,33:R,34:I,35:b,36:w,44:q,62:v,63:A},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(F,[2,20]),e(F,[2,21]),e(F,[2,22]),e(F,[2,23]),e(F,[2,24]),e(F,[2,25]),e(pe,[2,49]),e(pe,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{52:54,55:fe,56:ye,57:_e,58:ge,59:Ee,60:Re,61:me},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(O,[2,40]),e(O,[2,41]),e(O,[2,42]),e(O,[2,43]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),{54:[1,58]},{5:D,20:59,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:66,47:J,49:Z},{23:71,62:v,63:A},{23:72,62:v,63:A},e(S,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:D,20:77,21:P,24:Y,26:U,28:B,30:Q},e(S,[2,19]),e(S,[2,33]),{22:[1,78]},{22:[1,79]},{5:j,30:X,46:80,47:J,49:Z},e(S,[2,37]),e(S,[2,38]),e(S,[2,39]),{23:81,62:v,63:A},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(S,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(S,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:D,20:106,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:107,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:108,21:P,24:Y,26:U,28:B,30:Q},{5:D,20:109,21:P,24:Y,26:U,28:B,30:Q},{5:j,30:X,46:110,47:J,49:Z},{5:j,30:X,46:111,47:J,49:Z},e(S,[2,14]),e(S,[2,15]),e(S,[2,16]),e(S,[2,17]),e(S,[2,34]),e(S,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:r(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:r(function(i){var a=this,l=[0],n=[],f=[null],s=[],K=this.table,E="",te=0,Ie=0,Le=2,be=1,Oe=s.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,se)&&(C.yy[se]=this.yy[se]);m.setInput(i,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var ae=m.yylloc;s.push(ae);var Ce=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Me(N){l.length=l.length-2*N,f.length=f.length-N,s.length=s.length-N}r(Me,"popStack");function Se(){var N;return N=n.pop()||m.lex()||be,typeof N!="number"&&(N instanceof Array&&(n=N,N=n.pop()),N=a.symbols_[N]||N),N}r(Se,"lex");for(var k,M,x,le,H={},ie,V,ke,re;;){if(M=l[l.length-1],this.defaultActions[M]?x=this.defaultActions[M]:((k===null||typeof k>"u")&&(k=Se()),x=K[M]&&K[M][k]),typeof x>"u"||!x.length||!x[0]){var oe="";re=[];for(ie in K[M])this.terminals_[ie]&&ie>Le&&re.push("'"+this.terminals_[ie]+"'");m.showPosition?oe="Parse error on line "+(te+1)+`: `+m.showPosition()+` Expecting `+re.join(", ")+", got '"+(this.terminals_[k]||k)+"'":oe="Parse error on line "+(te+1)+": Unexpected "+(k==be?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(oe,{text:m.match,token:this.terminals_[k]||k,line:m.yylineno,loc:ae,expected:re})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+k);switch(x[0]){case 1:l.push(k),f.push(m.yytext),s.push(m.yylloc),l.push(x[1]),k=null,Ie=m.yyleng,E=m.yytext,te=m.yylineno,ae=m.yylloc;break;case 2:if(V=this.productions_[x[1]][1],H.$=f[f.length-V],H._$={first_line:s[s.length-(V||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(V||1)].first_column,last_column:s[s.length-1].last_column},Ce&&(H._$.range=[s[s.length-(V||1)].range[0],s[s.length-1].range[1]]),le=this.performAction.apply(H,[E,Ie,te,C.yy,x[1],f,s].concat(Oe)),typeof le<"u")return le;V&&(l=l.slice(0,-1*V*2),f=f.slice(0,-1*V),s=s.slice(0,-1*V)),l.push(this.productions_[x[1]][0]),f.push(H.$),s.push(H._$),ke=K[l[l.length-2]][l[l.length-1]],l.push(ke);break;case 3:return!0}}return!0},"parse")},$e=function(){var $={EOF:1,parseError:r(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:r(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:r(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===n.length?this.yylloc.first_column:0)+n[n.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` `+a+"^"},"showPosition"),test_match:r(function(i,a){var l,n,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),n=i[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var s in f)this[s]=f[s];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,l,n;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),s=0;sa[0].length)){if(a=l,n=s,this.options.backtrack_lexer){if(i=this.test_match(l,f[s]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,f[n]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var a=this.next();return a||this.lex()},"lex"),begin:r(function(a){this.conditionStack.push(a)},"begin"),popState:r(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:r(function(a){this.begin(a)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(a,l,n,f){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return l.yytext=l.yytext.trim(),62}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return $}();ne.lexer=$e;function ee(){this.yy={}}return r(ee,"Parser"),ee.prototype=ne,ne.Parser=ee,new ee}();he.parser=he;var Ke=he,de=[],T={},G=new Map,L={},z=new Map,Ge={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},ze={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},je={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Xe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Je=r((e,t)=>(G.has(e)||G.set(e,{name:e,type:t,id:T.id,text:T.text,risk:T.risk,verifyMethod:T.verifyMethod}),T={},G.get(e)),"addRequirement"),Ze=r(()=>G,"getRequirements"),et=r(e=>{T!==void 0&&(T.id=e)},"setNewReqId"),tt=r(e=>{T!==void 0&&(T.text=e)},"setNewReqText"),it=r(e=>{T!==void 0&&(T.risk=e)},"setNewReqRisk"),rt=r(e=>{T!==void 0&&(T.verifyMethod=e)},"setNewReqVerifyMethod"),nt=r(e=>(z.has(e)||(z.set(e,{name:e,type:L.type,docRef:L.docRef}),xe.info("Added new requirement: ",e)),L={},z.get(e)),"addElement"),st=r(()=>z,"getElements"),at=r(e=>{L!==void 0&&(L.type=e)},"setNewElementType"),lt=r(e=>{L!==void 0&&(L.docRef=e)},"setNewElementDocRef"),ot=r((e,t,c)=>{de.push({type:e,src:t,dst:c})},"addRelationship"),ct=r(()=>de,"getRelationships"),ht=r(()=>{de=[],T={},G=new Map,L={},z=new Map,Ue()},"clear"),ut={RequirementType:Ge,RiskLevel:ze,VerifyType:je,Relationships:Xe,getConfig:r(()=>ve().req,"getConfig"),addRequirement:Je,getRequirements:Ze,setNewReqId:et,setNewReqText:tt,setNewReqRisk:it,setNewReqVerifyMethod:rt,setAccTitle:Fe,getAccTitle:De,setAccDescription:Pe,getAccDescription:Ye,addElement:nt,getElements:st,setNewElementType:at,setNewElementDocRef:lt,addRelationship:ot,getRelationships:ct,clear:ht},dt=r(e=>` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var a=this.next();return a||this.lex()},"lex"),begin:r(function(a){this.conditionStack.push(a)},"begin"),popState:r(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:r(function(a){this.begin(a)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(a,l,n,f){switch(n){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 48:this.popState();break;case 49:return"qString";case 50:return l.yytext=l.yytext.trim(),62}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};return $}();ne.lexer=$e;function ee(){this.yy={}}return r(ee,"Parser"),ee.prototype=ne,ne.Parser=ee,new ee}();he.parser=he;var Ke=he,de=[],T={},G=new Map,L={},z=new Map,Ge={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},ze={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},je={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Xe={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},Je=r((e,t)=>(G.has(e)||G.set(e,{name:e,type:t,id:T.id,text:T.text,risk:T.risk,verifyMethod:T.verifyMethod}),T={},G.get(e)),"addRequirement"),Ze=r(()=>G,"getRequirements"),et=r(e=>{T!==void 0&&(T.id=e)},"setNewReqId"),tt=r(e=>{T!==void 0&&(T.text=e)},"setNewReqText"),it=r(e=>{T!==void 0&&(T.risk=e)},"setNewReqRisk"),rt=r(e=>{T!==void 0&&(T.verifyMethod=e)},"setNewReqVerifyMethod"),nt=r(e=>(z.has(e)||(z.set(e,{name:e,type:L.type,docRef:L.docRef}),xe.info("Added new requirement: ",e)),L={},z.get(e)),"addElement"),st=r(()=>z,"getElements"),at=r(e=>{L!==void 0&&(L.type=e)},"setNewElementType"),lt=r(e=>{L!==void 0&&(L.docRef=e)},"setNewElementDocRef"),ot=r((e,t,c)=>{de.push({type:e,src:t,dst:c})},"addRelationship"),ct=r(()=>de,"getRelationships"),ht=r(()=>{de=[],T={},G=new Map,L={},z=new Map,Be()},"clear"),ut={RequirementType:Ge,RiskLevel:ze,VerifyType:je,Relationships:Xe,getConfig:r(()=>ve().req,"getConfig"),addRequirement:Je,getRequirements:Ze,setNewReqId:et,setNewReqText:tt,setNewReqRisk:it,setNewReqVerifyMethod:rt,setAccTitle:Ye,getAccTitle:Pe,setAccDescription:De,getAccDescription:Fe,addElement:nt,getElements:st,setNewElementType:at,setNewElementDocRef:lt,addRelationship:ot,getRelationships:ct,clear:ht},dt=r(e=>` marker { fill: ${e.relationColor}; @@ -49,4 +49,4 @@ Expecting `+re.join(", ")+", got '"+(this.terminals_[k]||k)+"'":oe="Parse error `,"getStyles"),pt=dt,ue={CONTAINS:"contains",ARROW:"arrow"},ft=r((e,t)=>{let c=e.append("defs").append("marker").attr("id",ue.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");c.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),c.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),c.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",ue.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0 L${t.line_height},${t.line_height/2} M${t.line_height},${t.line_height/2} - L0,${t.line_height}`).attr("stroke-width",1)},"insertLineEndings"),we={ReqMarkers:ue,insertLineEndings:ft},_={},Ne=0,Ae=r((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",_.rect_min_width+"px").attr("height",_.rect_min_height+"px"),"newRectNode"),qe=r((e,t,c)=>{let d=_.rect_min_width/2,u=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",d).attr("y",_.rect_padding).attr("dominant-baseline","hanging"),p=0;c.forEach(g=>{p==0?u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",0).text(g):u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",_.line_height*.75).text(g),p++});let y=1.5*_.rect_padding,h=p*_.line_height*.75,o=y+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",_.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:u,y:o}},"newTitleNode"),Ve=r((e,t,c,d)=>{let u=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",_.rect_padding).attr("y",d).attr("dominant-baseline","hanging"),p=0;const y=30;let h=[];return c.forEach(o=>{let g=o.length;for(;g>y&&p<3;){let R=o.substring(0,y);o=o.substring(y,o.length),g=o.length,h[h.length]=R,p++}if(p==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;p=0}),h.forEach(o=>{u.append("tspan").attr("x",_.rect_padding).attr("dy",_.line_height).text(o)}),u},"newBodyNode"),yt=r((e,t,c,d)=>{const u=t.node().getTotalLength(),p=t.node().getPointAtLength(u*.5),y="rel"+Ne;Ne++;const o=e.append("text").attr("class","req relationshipLabel").attr("id",y).attr("x",p.x).attr("y",p.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d).node().getBBox();e.insert("rect","#"+y).attr("class","req reqLabelBox").attr("x",p.x-o.width/2).attr("y",p.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),_t=r(function(e,t,c,d,u){const p=c.edge(W(t.src),W(t.dst)),y=Qe().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+d).attr("class","er relationshipLine").attr("d",y(p.points)).attr("fill","none");t.type==u.db.Relationships.CONTAINS?h.attr("marker-start","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+we.ReqMarkers.ARROW+"_line_ending)")),yt(e,h,_,`<<${t.type}>>`)},"drawRelationshipFromLayout"),gt=r((e,t,c)=>{e.forEach((d,u)=>{u=W(u),xe.info("Added new requirement: ",u);const p=c.append("g").attr("id",u),y="req-"+u,h=Ae(p,y);let o=[],g=qe(p,u+"_title",[`<<${d.type}>>`,`${d.name}`]);o.push(g.titleNode);let R=Ve(p,u+"_body",[`Id: ${d.id}`,`Text: ${d.text}`,`Risk: ${d.risk}`,`Verification: ${d.verifyMethod}`],g.y);o.push(R);const I=h.node().getBBox();t.setNode(u,{width:I.width,height:I.height,shape:"rect",id:u})})},"drawReqs"),Et=r((e,t,c)=>{e.forEach((d,u)=>{const p=W(u),y=c.append("g").attr("id",p),h="element-"+p,o=Ae(y,h);let g=[],R=qe(y,h+"_title",["<>",`${u}`]);g.push(R.titleNode);let I=Ve(y,h+"_body",[`Type: ${d.type||"Not Specified"}`,`Doc Ref: ${d.docRef||"None"}`],R.y);g.push(I);const b=o.node().getBBox();t.setNode(p,{width:b.width,height:b.height,shape:"rect",id:p})})},"drawElements"),Rt=r((e,t)=>(e.forEach(function(c){let d=W(c.src),u=W(c.dst);t.setEdge(d,u,{relationship:c})}),e),"addRelationships"),mt=r(function(e,t){t.nodes().forEach(function(c){c!==void 0&&t.node(c)!==void 0&&(e.select("#"+c),e.select("#"+c).attr("transform","translate("+(t.node(c).x-t.node(c).width/2)+","+(t.node(c).y-t.node(c).height/2)+" )"))})},"adjustEntities"),W=r(e=>e.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),It=r((e,t,c,d)=>{_=ve().requirement;const u=_.securityLevel;let p;u==="sandbox"&&(p=ce("#i"+t));const h=(u==="sandbox"?ce(p.nodes()[0].contentDocument.body):ce("body")).select(`[id='${t}']`);we.insertLineEndings(h,_);const o=new He({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:_.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let g=d.db.getRequirements(),R=d.db.getElements(),I=d.db.getRelationships();gt(g,o,h),Et(R,o,h),Rt(I,o),We(o),mt(h,o),I.forEach(function(A){_t(h,A,o,t,d)});const b=_.rect_padding,w=h.node().getBBox(),q=w.width+b*2,v=w.height+b*2;Be(h,v,q,_.useMaxWidth),h.attr("viewBox",`${w.x-b} ${w.y-b} ${q} ${v}`)},"draw"),bt={draw:It},xt={parser:Ke,db:ut,renderer:bt,styles:pt};export{xt as diagram}; + L0,${t.line_height}`).attr("stroke-width",1)},"insertLineEndings"),we={ReqMarkers:ue,insertLineEndings:ft},_={},Ne=0,Ae=r((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",_.rect_min_width+"px").attr("height",_.rect_min_height+"px"),"newRectNode"),qe=r((e,t,c)=>{let d=_.rect_min_width/2,u=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",d).attr("y",_.rect_padding).attr("dominant-baseline","hanging"),p=0;c.forEach(g=>{p==0?u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",0).text(g):u.append("tspan").attr("text-anchor","middle").attr("x",_.rect_min_width/2).attr("dy",_.line_height*.75).text(g),p++});let y=1.5*_.rect_padding,h=p*_.line_height*.75,o=y+h;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",_.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:u,y:o}},"newTitleNode"),Ve=r((e,t,c,d)=>{let u=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",_.rect_padding).attr("y",d).attr("dominant-baseline","hanging"),p=0;const y=30;let h=[];return c.forEach(o=>{let g=o.length;for(;g>y&&p<3;){let R=o.substring(0,y);o=o.substring(y,o.length),g=o.length,h[h.length]=R,p++}if(p==3){let R=h[h.length-1];h[h.length-1]=R.substring(0,R.length-4)+"..."}else h[h.length]=o;p=0}),h.forEach(o=>{u.append("tspan").attr("x",_.rect_padding).attr("dy",_.line_height).text(o)}),u},"newBodyNode"),yt=r((e,t,c,d)=>{const u=t.node().getTotalLength(),p=t.node().getPointAtLength(u*.5),y="rel"+Ne;Ne++;const o=e.append("text").attr("class","req relationshipLabel").attr("id",y).attr("x",p.x).attr("y",p.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d).node().getBBox();e.insert("rect","#"+y).attr("class","req reqLabelBox").attr("x",p.x-o.width/2).attr("y",p.y-o.height/2).attr("width",o.width).attr("height",o.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),_t=r(function(e,t,c,d,u){const p=c.edge(W(t.src),W(t.dst)),y=Qe().x(function(o){return o.x}).y(function(o){return o.y}),h=e.insert("path","#"+d).attr("class","er relationshipLine").attr("d",y(p.points)).attr("fill","none");t.type==u.db.Relationships.CONTAINS?h.attr("marker-start","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+Te.getUrl(_.arrowMarkerAbsolute)+"#"+we.ReqMarkers.ARROW+"_line_ending)")),yt(e,h,_,`<<${t.type}>>`)},"drawRelationshipFromLayout"),gt=r((e,t,c)=>{e.forEach((d,u)=>{u=W(u),xe.info("Added new requirement: ",u);const p=c.append("g").attr("id",u),y="req-"+u,h=Ae(p,y);let o=[],g=qe(p,u+"_title",[`<<${d.type}>>`,`${d.name}`]);o.push(g.titleNode);let R=Ve(p,u+"_body",[`Id: ${d.id}`,`Text: ${d.text}`,`Risk: ${d.risk}`,`Verification: ${d.verifyMethod}`],g.y);o.push(R);const I=h.node().getBBox();t.setNode(u,{width:I.width,height:I.height,shape:"rect",id:u})})},"drawReqs"),Et=r((e,t,c)=>{e.forEach((d,u)=>{const p=W(u),y=c.append("g").attr("id",p),h="element-"+p,o=Ae(y,h);let g=[],R=qe(y,h+"_title",["<>",`${u}`]);g.push(R.titleNode);let I=Ve(y,h+"_body",[`Type: ${d.type||"Not Specified"}`,`Doc Ref: ${d.docRef||"None"}`],R.y);g.push(I);const b=o.node().getBBox();t.setNode(p,{width:b.width,height:b.height,shape:"rect",id:p})})},"drawElements"),Rt=r((e,t)=>(e.forEach(function(c){let d=W(c.src),u=W(c.dst);t.setEdge(d,u,{relationship:c})}),e),"addRelationships"),mt=r(function(e,t){t.nodes().forEach(function(c){c!==void 0&&t.node(c)!==void 0&&(e.select("#"+c),e.select("#"+c).attr("transform","translate("+(t.node(c).x-t.node(c).width/2)+","+(t.node(c).y-t.node(c).height/2)+" )"))})},"adjustEntities"),W=r(e=>e.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),It=r((e,t,c,d)=>{_=ve().requirement;const u=_.securityLevel;let p;u==="sandbox"&&(p=ce("#i"+t));const h=(u==="sandbox"?ce(p.nodes()[0].contentDocument.body):ce("body")).select(`[id='${t}']`);we.insertLineEndings(h,_);const o=new He({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:_.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let g=d.db.getRequirements(),R=d.db.getElements(),I=d.db.getRelationships();gt(g,o,h),Et(R,o,h),Rt(I,o),We(o),mt(h,o),I.forEach(function(A){_t(h,A,o,t,d)});const b=_.rect_padding,w=h.node().getBBox(),q=w.width+b*2,v=w.height+b*2;Ue(h,v,q,_.useMaxWidth),h.attr("viewBox",`${w.x-b} ${w.y-b} ${q} ${v}`)},"draw"),bt={draw:It},xt={parser:Ke,db:ut,renderer:bt,styles:pt};export{xt as diagram}; diff --git a/static/js/md-sankeyDiagram-Y46BX6SQ-CEeJ3xfQ.js b/static/js/md-sankeyDiagram-Y46BX6SQ-CkD59MI5.js similarity index 88% rename from static/js/md-sankeyDiagram-Y46BX6SQ-CEeJ3xfQ.js rename to static/js/md-sankeyDiagram-Y46BX6SQ-CkD59MI5.js index 8fef0a62c..b99ac97a7 100644 --- a/static/js/md-sankeyDiagram-Y46BX6SQ-CEeJ3xfQ.js +++ b/static/js/md-sankeyDiagram-Y46BX6SQ-CkD59MI5.js @@ -1,8 +1,8 @@ -import{_ as m,d as lt,g as _t,s as xt,b as vt,c as bt,q as wt,p as St,v as Lt,e as Et,o as At,j as H,V as Tt}from"./md-index-BVqvVggs.js";import{o as Mt}from"./md-ordinal-CxVaQH2l.js";import"./md-init-Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function jt(t){return t.index}function zt(t){return t.nodes}function $t(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,p,_=jt,s=mt,o,l,x=zt,v=$t,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:X(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:X(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=p=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:X(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:X(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function j({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),R(f);for(let u=0;u0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,V=0;for(const{target:Y,value:et}of w.sourceLinks){let q=et*(Y.layer-w.layer);L+=I(w,Y)*q,V+=q}if(!(V>0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function z(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,F=1e-6,Rt=rt-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,p=this._y1,_=i-t,s=a-e,o=d-t,l=p-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>F)if(!(Math.abs(l*_-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-p,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),j=C/N,R=C/T;Math.abs(j-1)>F&&(this._+="L"+(t+j*o)+","+(e+j*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var p=i*Math.cos(a),_=i*Math.sin(a),s=t+p,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>F&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Ft(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Vt,h=Ft,d=null;function p(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return p.source=function(_){return arguments.length?(e=_,p):e},p.target=function(_){return arguments.length?(i=_,p):i},p.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),p):a},p.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),p):h},p.context=function(_){return arguments.length?(d=_??null,p):d},p}function qt(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Ht(){return Yt(qt)}function Xt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Ht().source(Xt).target(Qt)}var at=function(){var t=m(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:m(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:m(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:m(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,j=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}m(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||j,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}m(E,"lex");for(var A,z,I,n,f={},u,c,r,k;;){if(z=l[l.length-1],this.defaultActions[z]?I=this.defaultActions[z]:((A===null||typeof A>"u")&&(A=E()),I=b[z]&&b[z][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[z])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: +import{_ as m,o as _t,n as xt,s as vt,g as bt,b as wt,a as St,c as lt,t as Lt,d as X,T as Et,v as At,k as Tt}from"./md-index-B8Nim9kS.js";import{o as Mt}from"./md-ordinal-CxVaQH2l.js";import"./md-init-Gi6I4Gst.js";function Nt(t){for(var e=t.length/6|0,i=new Array(e),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function pt(t,e){let i;if(e===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=e(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function nt(t,e){let i=0;if(e===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+e(h,++a,t))&&(i+=h)}return i}function Pt(t){return t.target.depth}function Ct(t){return t.depth}function Ot(t,e){return e-1-t.height}function mt(t,e){return t.sourceLinks.length?t.depth:e-1}function Dt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function q(t){return function(){return t}}function ut(t,e){return Q(t.source,e.source)||t.index-e.index}function ht(t,e){return Q(t.target,e.target)||t.index-e.index}function Q(t,e){return t.y0-e.y0}function it(t){return t.value}function zt(t){return t.index}function $t(t){return t.nodes}function jt(t){return t.links}function ft(t,e){const i=t.get(e);if(!i)throw new Error("missing: "+e);return i}function yt({nodes:t}){for(const e of t){let i=e.y0,a=i;for(const h of e.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of e.targetLinks)h.y1=a+h.width/2,a+=h.width}}function Bt(){let t=0,e=0,i=1,a=1,h=24,d=8,p,_=zt,s=mt,o,l,x=$t,v=jt,y=6;function b(){const n={nodes:x.apply(null,arguments),links:v.apply(null,arguments)};return M(n),T(n),N(n),C(n),S(n),yt(n),n}b.update=function(n){return yt(n),n},b.nodeId=function(n){return arguments.length?(_=typeof n=="function"?n:q(n),b):_},b.nodeAlign=function(n){return arguments.length?(s=typeof n=="function"?n:q(n),b):s},b.nodeSort=function(n){return arguments.length?(o=n,b):o},b.nodeWidth=function(n){return arguments.length?(h=+n,b):h},b.nodePadding=function(n){return arguments.length?(d=p=+n,b):d},b.nodes=function(n){return arguments.length?(x=typeof n=="function"?n:q(n),b):x},b.links=function(n){return arguments.length?(v=typeof n=="function"?n:q(n),b):v},b.linkSort=function(n){return arguments.length?(l=n,b):l},b.size=function(n){return arguments.length?(t=e=0,i=+n[0],a=+n[1],b):[i-t,a-e]},b.extent=function(n){return arguments.length?(t=+n[0][0],i=+n[1][0],e=+n[0][1],a=+n[1][1],b):[[t,e],[i,a]]},b.iterations=function(n){return arguments.length?(y=+n,b):y};function M({nodes:n,links:f}){for(const[c,r]of n.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(n.map((c,r)=>[_(c,r,n),c]));for(const[c,r]of f.entries()){r.index=c;let{source:k,target:w}=r;typeof k!="object"&&(k=r.source=ft(u,k)),typeof w!="object"&&(w=r.target=ft(u,w)),k.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of n)c.sort(l),r.sort(l)}function T({nodes:n}){for(const f of n)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function N({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.depth=r;for(const{target:w}of k.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:n}){const f=n.length;let u=new Set(n),c=new Set,r=0;for(;u.size;){for(const k of u){k.height=r;for(const{source:w}of k.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function z({nodes:n}){const f=ct(n,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of n){const k=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=k,r.x0=t+k*u,r.x1=r.x0+h,c[k]?c[k].push(r):c[k]=[r]}if(o)for(const r of c)r.sort(o);return c}function R(n){const f=pt(n,u=>(a-e-(u.length-1)*p)/nt(u,it));for(const u of n){let c=e;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),R(f);for(let u=0;u0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function B(n,f,u){for(let c=n.length,r=c-2;r>=0;--r){const k=n[r];for(const w of k){let L=0,V=0;for(const{target:Y,value:et}of w.sourceLinks){let H=et*(Y.layer-w.layer);L+=I(w,Y)*H,V+=H}if(!(V>0))continue;let G=(L/V-w.y0)*f;w.y0+=G,w.y1+=G,E(w)}o===void 0&&k.sort(Q),O(k,u)}}function O(n,f){const u=n.length>>1,c=n[u];g(n,c.y0-p,u-1,f),D(n,c.y1+p,u+1,f),g(n,a,n.length-1,f),D(n,e,0,f)}function D(n,f,u,c){for(;u1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function g(n,f,u,c){for(;u>=0;--u){const r=n[u],k=(r.y1-f)*c;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function E({sourceLinks:n,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ht);for(const{target:{targetLinks:u}}of n)u.sort(ut)}}function A(n){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of n)f.sort(ht),u.sort(ut)}function $(n,f){let u=n.y0-(n.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u-=r}return u}function I(n,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===n)break;u+=r+p}for(const{target:c,width:r}of n.sourceLinks){if(c===f)break;u-=r}return u}return b}var st=Math.PI,rt=2*st,F=1e-6,Rt=rt-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kt(){return new ot}ot.prototype=kt.prototype={constructor:ot,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,i,a){this._+="Q"+ +t+","+ +e+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,e,i,a,h,d){this._+="C"+ +t+","+ +e+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,e,i,a,h){t=+t,e=+e,i=+i,a=+a,h=+h;var d=this._x1,p=this._y1,_=i-t,s=a-e,o=d-t,l=p-e,x=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(x>F)if(!(Math.abs(l*_-s*o)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var v=i-d,y=a-p,b=_*_+s*s,M=v*v+y*y,T=Math.sqrt(b),N=Math.sqrt(x),C=h*Math.tan((st-Math.acos((b+x-M)/(2*T*N)))/2),z=C/N,R=C/T;Math.abs(z-1)>F&&(this._+="L"+(t+z*o)+","+(e+z*l)),this._+="A"+h+","+h+",0,0,"+ +(l*v>o*y)+","+(this._x1=t+R*_)+","+(this._y1=e+R*s)}},arc:function(t,e,i,a,h,d){t=+t,e=+e,i=+i,d=!!d;var p=i*Math.cos(a),_=i*Math.sin(a),s=t+p,o=e+_,l=1^d,x=d?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>F||Math.abs(this._y1-o)>F)&&(this._+="L"+s+","+o),i&&(x<0&&(x=x%rt+rt),x>Rt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(e-_)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):x>F&&(this._+="A"+i+","+i+",0,"+ +(x>=st)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=e+i*Math.sin(h))))},rect:function(t,e,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Vt(t){return t[0]}function Ft(t){return t[1]}var Wt=Array.prototype.slice;function Ut(t){return t.source}function Gt(t){return t.target}function Yt(t){var e=Ut,i=Gt,a=Vt,h=Ft,d=null;function p(){var _,s=Wt.call(arguments),o=e.apply(this,s),l=i.apply(this,s);if(d||(d=_=kt()),t(d,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),_)return d=null,_+""||null}return p.source=function(_){return arguments.length?(e=_,p):e},p.target=function(_){return arguments.length?(i=_,p):i},p.x=function(_){return arguments.length?(a=typeof _=="function"?_:dt(+_),p):a},p.y=function(_){return arguments.length?(h=typeof _=="function"?_:dt(+_),p):h},p.context=function(_){return arguments.length?(d=_??null,p):d},p}function Ht(t,e,i,a,h){t.moveTo(e,i),t.bezierCurveTo(e=(e+a)/2,i,e,h,a,h)}function Xt(){return Yt(Ht)}function qt(t){return[t.source.x1,t.y0]}function Qt(t){return[t.target.x0,t.y1]}function Kt(){return Xt().source(qt).target(Qt)}var at=function(){var t=m(function(_,s,o,l){for(o=o||{},l=_.length;l--;o[_[l]]=s);return o},"o"),e=[1,9],i=[1,10],a=[1,5,10,12],h={trace:m(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:m(function(s,o,l,x,v,y,b){var M=y.length-1;switch(v){case 7:const T=x.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=x.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());x.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:e,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:e,20:i},{15:18,16:7,17:8,18:e,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:e,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:m(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:m(function(s){var o=this,l=[0],x=[],v=[null],y=[],b=this.table,M="",T=0,N=0,C=2,z=1,R=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy,B)&&(P.yy[B]=this.yy[B]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var D=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function g(L){l.length=l.length-2*L,v.length=v.length-L,y.length=y.length-L}m(g,"popStack");function E(){var L;return L=x.pop()||S.lex()||z,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=o.symbols_[L]||L),L}m(E,"lex");for(var A,$,I,n,f={},u,c,r,k;;){if($=l[l.length-1],this.defaultActions[$]?I=this.defaultActions[$]:((A===null||typeof A>"u")&&(A=E()),I=b[$]&&b[$][A]),typeof I>"u"||!I.length||!I[0]){var w="";k=[];for(u in b[$])this.terminals_[u]&&u>C&&k.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: `+S.showPosition()+` -Expecting `+k.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==j?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:k})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+A);switch(I[0]){case 1:l.push(A),v.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=v[v.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],v,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),v.push(f.$),y.push(f._$),r=b[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var _={EOF:1,parseError:m(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:m(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:m(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +Expecting `+k.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==z?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:k})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+A);switch(I[0]){case 1:l.push(A),v.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=v[v.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},D&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),n=this.performAction.apply(f,[M,N,T,P.yy,I[1],v,y].concat(R)),typeof n<"u")return n;c&&(l=l.slice(0,-1*c*2),v=v.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),v.push(f.$),y.push(f._$),r=b[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var _={EOF:1,parseError:m(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:m(function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:m(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:m(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===x.length?this.yylloc.first_column:0)+x[x.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:m(function(s){this.unput(this.match.slice(s))},"less"),pastInput:m(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+` `+o+"^"},"showPosition"),test_match:m(function(s,o){var l,x,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),x=s[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:m(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,x;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),y=0;yo[0].length)){if(o=l,x=y,this.options.backtrack_lexer){if(s=this.test_match(l,v[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,v[x]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var o=this.next();return o||this.lex()},"lex"),begin:m(function(o){this.conditionStack.push(o)},"begin"),popState:m(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:m(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:m(function(o){this.begin(o)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:m(function(o,l,x,v){switch(x){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return _}();h.lexer=d;function p(){this.yy={}}return m(p,"Parser"),p.prototype=h,h.Parser=p,new p}();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=m(()=>{J=[],tt=[],Z=new Map,Lt()},"clear"),W,Jt=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},m(W,"SankeyLink"),W),te=m((t,e,i)=>{J.push(new Jt(t,e,i))},"addLink"),U,ee=(U=class{constructor(e){this.ID=e}},m(U,"SankeyNode"),U),ne=m(t=>{t=Et.sanitizeText(t,lt());let e=Z.get(t);return e===void 0&&(e=new ee(t),Z.set(t,e),tt.push(e)),e},"findOrCreateNode"),ie=m(()=>tt,"getNodes"),se=m(()=>J,"getLinks"),re=m(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:m(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:se,getGraph:re,addLink:te,findOrCreateNode:ne,getAccTitle:_t,setAccTitle:xt,getAccDescription:vt,setAccDescription:bt,getDiagramTitle:wt,setDiagramTitle:St,clear:Zt},$,gt=($=class{static next(e){return new $(e+ ++$.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},m($,"Uid"),$.count=0,$),ae={left:Ct,right:Ot,center:Dt,justify:mt},le=m(function(t,e,i,a){const{securityLevel:h,sankey:d}=lt(),p=At.sankey;let _;h==="sandbox"&&(_=H("#i"+e));const s=h==="sandbox"?H(_.nodes()[0].contentDocument.body):H("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):H(`[id="${e}"]`),l=(d==null?void 0:d.width)??p.width,x=(d==null?void 0:d.height)??p.width,v=(d==null?void 0:d.useMaxWidth)??p.useMaxWidth,y=(d==null?void 0:d.nodeAlignment)??p.nodeAlignment,b=(d==null?void 0:d.prefix)??p.prefix,M=(d==null?void 0:d.suffix)??p.suffix,T=(d==null?void 0:d.showValues)??p.showValues,N=a.db.getGraph(),C=ae[y];Bt().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,x]])(N);const S=Mt(It);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=gt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>S(g.id));const P=m(({id:g,value:E})=>T?`${g} -${b}${Math.round(E*100)/100}${M}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",g=>g.x0(g.y1+g.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",g=>g.x0(E.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let D;switch(O){case"gradient":D=m(g=>g.uid,"coloring");break;case"source":D=m(g=>S(g.source.id),"coloring");break;case"target":D=m(g=>S(g.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Kt()).attr("stroke",D).attr("stroke-width",g=>Math.max(1,g.width)),Tt(void 0,o,0,v)},"draw"),ce={draw:le},ue=m(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:m(function(){var o=this.next();return o||this.lex()},"lex"),begin:m(function(o){this.conditionStack.push(o)},"begin"),popState:m(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:m(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:m(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:m(function(o){this.begin(o)},"pushState"),stateStackSize:m(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:m(function(o,l,x,v){switch(x){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return _}();h.lexer=d;function p(){this.yy={}}return m(p,"Parser"),p.prototype=h,h.Parser=p,new p}();at.parser=at;var K=at,J=[],tt=[],Z=new Map,Zt=m(()=>{J=[],tt=[],Z=new Map,At()},"clear"),W,Jt=(W=class{constructor(e,i,a=0){this.source=e,this.target=i,this.value=a}},m(W,"SankeyLink"),W),te=m((t,e,i)=>{J.push(new Jt(t,e,i))},"addLink"),U,ee=(U=class{constructor(e){this.ID=e}},m(U,"SankeyNode"),U),ne=m(t=>{t=Tt.sanitizeText(t,lt());let e=Z.get(t);return e===void 0&&(e=new ee(t),Z.set(t,e),tt.push(e)),e},"findOrCreateNode"),ie=m(()=>tt,"getNodes"),se=m(()=>J,"getLinks"),re=m(()=>({nodes:tt.map(t=>({id:t.ID})),links:J.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),oe={nodesMap:Z,getConfig:m(()=>lt().sankey,"getConfig"),getNodes:ie,getLinks:se,getGraph:re,addLink:te,findOrCreateNode:ne,getAccTitle:St,setAccTitle:wt,getAccDescription:bt,setAccDescription:vt,getDiagramTitle:xt,setDiagramTitle:_t,clear:Zt},j,gt=(j=class{static next(e){return new j(e+ ++j.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return"url("+this.href+")"}},m(j,"Uid"),j.count=0,j),ae={left:Ct,right:Ot,center:Dt,justify:mt},le=m(function(t,e,i,a){const{securityLevel:h,sankey:d}=lt(),p=Lt.sankey;let _;h==="sandbox"&&(_=X("#i"+e));const s=h==="sandbox"?X(_.nodes()[0].contentDocument.body):X("body"),o=h==="sandbox"?s.select(`[id="${e}"]`):X(`[id="${e}"]`),l=(d==null?void 0:d.width)??p.width,x=(d==null?void 0:d.height)??p.width,v=(d==null?void 0:d.useMaxWidth)??p.useMaxWidth,y=(d==null?void 0:d.nodeAlignment)??p.nodeAlignment,b=(d==null?void 0:d.prefix)??p.prefix,M=(d==null?void 0:d.suffix)??p.suffix,T=(d==null?void 0:d.showValues)??p.showValues,N=a.db.getGraph(),C=ae[y];Bt().nodeId(g=>g.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,x]])(N);const S=Mt(It);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",g=>(g.uid=gt.next("node-")).id).attr("transform",function(g){return"translate("+g.x0+","+g.y0+")"}).attr("x",g=>g.x0).attr("y",g=>g.y0).append("rect").attr("height",g=>g.y1-g.y0).attr("width",g=>g.x1-g.x0).attr("fill",g=>S(g.id));const P=m(({id:g,value:E})=>T?`${g} +${b}${Math.round(E*100)/100}${M}`:g,"getText");o.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",g=>g.x0(g.y1+g.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",g=>g.x0(E.uid=gt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);g.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),g.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let D;switch(O){case"gradient":D=m(g=>g.uid,"coloring");break;case"source":D=m(g=>S(g.source.id),"coloring");break;case"target":D=m(g=>S(g.target.id),"coloring");break;default:D=O}B.append("path").attr("d",Kt()).attr("stroke",D).attr("stroke-width",g=>Math.max(1,g.width)),Et(void 0,o,0,v)},"draw"),ce={draw:le},ue=m(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` `).trim(),"prepareTextForParsing"),he=K.parse.bind(K);K.parse=t=>he(ue(t));var ge={parser:K,db:oe,renderer:ce};export{ge as diagram}; diff --git a/static/js/md-sequenceDiagram-G6AWOVSC-iwwYTdhr.js b/static/js/md-sequenceDiagram-G6AWOVSC-B5wQLnro.js similarity index 52% rename from static/js/md-sequenceDiagram-G6AWOVSC-iwwYTdhr.js rename to static/js/md-sequenceDiagram-G6AWOVSC-B5wQLnro.js index d266d1f69..914bdfae2 100644 --- a/static/js/md-sequenceDiagram-G6AWOVSC-iwwYTdhr.js +++ b/static/js/md-sequenceDiagram-G6AWOVSC-B5wQLnro.js @@ -1,9 +1,9 @@ -import{g as St,a as Kt,d as Se,b as Me,c as Re,e as De}from"./md-chunk-ASOPGD6M-BaPEXM9M.js";import{I as Ce}from"./md-chunk-KFBOBJHC-BaRawZeL.js";import{_ as d,g as Oe,q as Be,p as Ve,d as at,s as se,c as Ye,b as Fe,e as L,L as lt,M as It,u as F,l as J,v as We,i as Mt,a as qe,j as vt,k as ze,m as ae,N as ne,D as Ft,O as ie,Z as He}from"./md-index-BVqvVggs.js";var Wt=function(){var t=d(function(ut,_,P,k){for(P=P||{},k=ut.length;k--;P[ut[k]]=_);return P},"o"),e=[1,2],o=[1,3],r=[1,4],a=[2,4],n=[1,9],c=[1,11],h=[1,13],u=[1,14],s=[1,16],g=[1,17],E=[1,18],f=[1,24],T=[1,25],m=[1,26],I=[1,27],v=[1,28],V=[1,29],M=[1,30],Y=[1,31],C=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],q=[1,39],R=[1,41],Q=[1,42],G=[1,43],j=[1,44],rt=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],A=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],nt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Jt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(_,P,k,b,D,l,mt){var p=l.length-1;switch(D){case 3:return b.apply(l[p]),l[p];case 4:case 9:this.$=[];break;case 5:case 10:l[p-1].push(l[p]),this.$=l[p-1];break;case 6:case 7:case 11:case 12:this.$=l[p];break;case 8:case 13:this.$=[];break;case 15:l[p].type="createParticipant",this.$=l[p];break;case 16:l[p-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[p-2])}),l[p-1].push({type:"boxEnd",boxText:l[p-2]}),this.$=l[p-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[p-2]),sequenceIndexStep:Number(l[p-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[p-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[p-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[p-1].actor};break;case 29:b.setDiagramTitle(l[p].substring(6)),this.$=l[p].substring(6);break;case 30:b.setDiagramTitle(l[p].substring(7)),this.$=l[p].substring(7);break;case 31:this.$=l[p].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[p].trim(),b.setAccDescription(this.$);break;case 34:l[p-1].unshift({type:"loopStart",loopText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.LOOP_START}),l[p-1].push({type:"loopEnd",loopText:l[p-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[p-1];break;case 35:l[p-1].unshift({type:"rectStart",color:b.parseMessage(l[p-2]),signalType:b.LINETYPE.RECT_START}),l[p-1].push({type:"rectEnd",color:b.parseMessage(l[p-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[p-1];break;case 36:l[p-1].unshift({type:"optStart",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.OPT_START}),l[p-1].push({type:"optEnd",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[p-1];break;case 37:l[p-1].unshift({type:"altStart",altText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.ALT_START}),l[p-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[p-1];break;case 38:l[p-1].unshift({type:"parStart",parText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.PAR_START}),l[p-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[p-1];break;case 39:l[p-1].unshift({type:"parStart",parText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[p-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[p-1];break;case 40:l[p-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.CRITICAL_START}),l[p-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[p-1];break;case 41:l[p-1].unshift({type:"breakStart",breakText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.BREAK_START}),l[p-1].push({type:"breakEnd",optText:b.parseMessage(l[p-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[p-1];break;case 43:this.$=l[p-3].concat([{type:"option",optionText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[p]]);break;case 45:this.$=l[p-3].concat([{type:"and",parText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.PAR_AND},l[p]]);break;case 47:this.$=l[p-3].concat([{type:"else",altText:b.parseMessage(l[p-1]),signalType:b.LINETYPE.ALT_ELSE},l[p]]);break;case 48:l[p-3].draw="participant",l[p-3].type="addParticipant",l[p-3].description=b.parseMessage(l[p-1]),this.$=l[p-3];break;case 49:l[p-1].draw="participant",l[p-1].type="addParticipant",this.$=l[p-1];break;case 50:l[p-3].draw="actor",l[p-3].type="addParticipant",l[p-3].description=b.parseMessage(l[p-1]),this.$=l[p-3];break;case 51:l[p-1].draw="actor",l[p-1].type="addParticipant",this.$=l[p-1];break;case 52:l[p-1].type="destroyParticipant",this.$=l[p-1];break;case 53:this.$=[l[p-1],{type:"addNote",placement:l[p-2],actor:l[p-1].actor,text:l[p]}];break;case 54:l[p-2]=[].concat(l[p-1],l[p-1]).slice(0,2),l[p-2][0]=l[p-2][0].actor,l[p-2][1]=l[p-2][1].actor,this.$=[l[p-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[p-2].slice(0,2),text:l[p]}];break;case 55:this.$=[l[p-1],{type:"addLinks",actor:l[p-1].actor,text:l[p]}];break;case 56:this.$=[l[p-1],{type:"addALink",actor:l[p-1].actor,text:l[p]}];break;case 57:this.$=[l[p-1],{type:"addProperties",actor:l[p-1].actor,text:l[p]}];break;case 58:this.$=[l[p-1],{type:"addDetails",actor:l[p-1].actor,text:l[p]}];break;case 61:this.$=[l[p-2],l[p]];break;case 62:this.$=l[p];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[p-4],l[p-1],{type:"addMessage",from:l[p-4].actor,to:l[p-1].actor,signalType:l[p-3],msg:l[p],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[p-1].actor}];break;case 66:this.$=[l[p-4],l[p-1],{type:"addMessage",from:l[p-4].actor,to:l[p-1].actor,signalType:l[p-3],msg:l[p]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[p-4].actor}];break;case 67:this.$=[l[p-3],l[p-1],{type:"addMessage",from:l[p-3].actor,to:l[p-1].actor,signalType:l[p-2],msg:l[p]}];break;case 68:this.$={type:"addParticipant",actor:l[p]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[p].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:o,6:r},{1:[3]},{3:5,4:e,5:o,6:r},{3:6,4:e,5:o,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:c,8:8,9:10,12:12,13:h,14:u,17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,5]),{9:47,12:12,13:h,14:u,17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:K,52:U,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(A,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t($,a,{7:99}),t($,a,{7:100}),t($,a,{7:101}),t(nt,a,{40:102,7:103}),t(N,a,{42:104,7:105}),t(N,a,{7:105,42:106}),t(Jt,a,{45:107,7:108}),t($,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:K,52:U,53:q},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[1,132],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[1,133],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[1,134],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,135]},{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[2,46],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,49:[1,136],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,137]},{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[2,44],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,48:[1,138],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,139]},{16:[1,140]},{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[2,42],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,47:[1,141],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:n,5:c,8:8,9:10,12:12,13:h,14:u,16:[1,142],17:15,18:s,21:g,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:f,30:T,31:m,33:I,35:v,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(A,[2,10]),{12:151,50:K,52:U,53:q},t(A,[2,12]),t(A,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(A,[2,11]),t(nt,a,{7:103,40:160}),t(N,a,{7:105,42:161}),t(Jt,a,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(_,P){if(P.recoverable)this.trace(_);else{var k=new Error(_);throw k.hash=P,k}},"parseError"),parse:d(function(_){var P=this,k=[0],b=[],D=[null],l=[],mt=this.table,p="",Pt=0,Zt=0,Ae=2,Qt=1,ke=l.slice.call(arguments,1),W=Object.create(this.lexer),pt={yy:{}};for(var Ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ot)&&(pt.yy[Ot]=this.yy[Ot]);W.setInput(_,pt.yy),pt.yy.lexer=W,pt.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Bt=W.yylloc;l.push(Bt);var ve=W.options&&W.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(tt){k.length=k.length-2*tt,D.length=D.length-tt,l.length=l.length-tt}d(Ne,"popStack");function jt(){var tt;return tt=b.pop()||W.lex()||Qt,typeof tt!="number"&&(tt instanceof Array&&(b=tt,tt=b.pop()),tt=P.symbols_[tt]||tt),tt}d(jt,"lex");for(var X,ft,st,Vt,yt={},At,ht,$t,kt;;){if(ft=k[k.length-1],this.defaultActions[ft]?st=this.defaultActions[ft]:((X===null||typeof X>"u")&&(X=jt()),st=mt[ft]&&mt[ft][X]),typeof st>"u"||!st.length||!st[0]){var Yt="";kt=[];for(At in mt[ft])this.terminals_[At]&&At>Ae&&kt.push("'"+this.terminals_[At]+"'");W.showPosition?Yt="Parse error on line "+(Pt+1)+`: +import{a as Se,b as Kt,g as St,d as Me,c as Re,e as De}from"./md-chunk-ASOPGD6M-D4uVhftc.js";import{I as Ce}from"./md-chunk-KFBOBJHC-bxuwoawJ.js";import{_ as d,g as Oe,s as Be,b as se,o as Ve,n as Ye,a as Fe,c as at,d as kt,l as J,j as ae,e as We,f as qe,k as _,i as Mt,v as ze,u as F,L as lt,M as wt,N as ie,Z as He,O as ne,D as Ft}from"./md-index-B8Nim9kS.js";var Wt=function(){var t=d(function(pt,I,L,A){for(L=L||{},A=pt.length;A--;L[pt[A]]=I);return L},"o"),e=[1,2],o=[1,3],r=[1,4],a=[2,4],i=[1,9],c=[1,11],h=[1,13],p=[1,14],s=[1,16],f=[1,17],E=[1,18],g=[1,24],T=[1,25],m=[1,26],w=[1,27],k=[1,28],V=[1,29],M=[1,30],Y=[1,31],C=[1,32],z=[1,33],H=[1,34],Z=[1,35],et=[1,36],K=[1,37],U=[1,38],q=[1,39],R=[1,41],Q=[1,42],G=[1,43],j=[1,44],rt=[1,45],S=[1,46],y=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],P=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],it=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],N=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],Jt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],ot=[68,69,70],dt=[1,122],Ct={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:d(function(I,L,A,b,D,l,mt){var u=l.length-1;switch(D){case 3:return b.apply(l[u]),l[u];case 4:case 9:this.$=[];break;case 5:case 10:l[u-1].push(l[u]),this.$=l[u-1];break;case 6:case 7:case 11:case 12:this.$=l[u];break;case 8:case 13:this.$=[];break;case 15:l[u].type="createParticipant",this.$=l[u];break;case 16:l[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(l[u-2])}),l[u-1].push({type:"boxEnd",boxText:l[u-2]}),this.$=l[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-2]),sequenceIndexStep:Number(l[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(l[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-1].actor};break;case 29:b.setDiagramTitle(l[u].substring(6)),this.$=l[u].substring(6);break;case 30:b.setDiagramTitle(l[u].substring(7)),this.$=l[u].substring(7);break;case 31:this.$=l[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=l[u].trim(),b.setAccDescription(this.$);break;case 34:l[u-1].unshift({type:"loopStart",loopText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.LOOP_START}),l[u-1].push({type:"loopEnd",loopText:l[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=l[u-1];break;case 35:l[u-1].unshift({type:"rectStart",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_START}),l[u-1].push({type:"rectEnd",color:b.parseMessage(l[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=l[u-1];break;case 36:l[u-1].unshift({type:"optStart",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_START}),l[u-1].push({type:"optEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=l[u-1];break;case 37:l[u-1].unshift({type:"altStart",altText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.ALT_START}),l[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=l[u-1];break;case 38:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 39:l[u-1].unshift({type:"parStart",parText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),l[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=l[u-1];break;case 40:l[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.CRITICAL_START}),l[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=l[u-1];break;case 41:l[u-1].unshift({type:"breakStart",breakText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_START}),l[u-1].push({type:"breakEnd",optText:b.parseMessage(l[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=l[u-1];break;case 43:this.$=l[u-3].concat([{type:"option",optionText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},l[u]]);break;case 45:this.$=l[u-3].concat([{type:"and",parText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.PAR_AND},l[u]]);break;case 47:this.$=l[u-3].concat([{type:"else",altText:b.parseMessage(l[u-1]),signalType:b.LINETYPE.ALT_ELSE},l[u]]);break;case 48:l[u-3].draw="participant",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 49:l[u-1].draw="participant",l[u-1].type="addParticipant",this.$=l[u-1];break;case 50:l[u-3].draw="actor",l[u-3].type="addParticipant",l[u-3].description=b.parseMessage(l[u-1]),this.$=l[u-3];break;case 51:l[u-1].draw="actor",l[u-1].type="addParticipant",this.$=l[u-1];break;case 52:l[u-1].type="destroyParticipant",this.$=l[u-1];break;case 53:this.$=[l[u-1],{type:"addNote",placement:l[u-2],actor:l[u-1].actor,text:l[u]}];break;case 54:l[u-2]=[].concat(l[u-1],l[u-1]).slice(0,2),l[u-2][0]=l[u-2][0].actor,l[u-2][1]=l[u-2][1].actor,this.$=[l[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:l[u-2].slice(0,2),text:l[u]}];break;case 55:this.$=[l[u-1],{type:"addLinks",actor:l[u-1].actor,text:l[u]}];break;case 56:this.$=[l[u-1],{type:"addALink",actor:l[u-1].actor,text:l[u]}];break;case 57:this.$=[l[u-1],{type:"addProperties",actor:l[u-1].actor,text:l[u]}];break;case 58:this.$=[l[u-1],{type:"addDetails",actor:l[u-1].actor,text:l[u]}];break;case 61:this.$=[l[u-2],l[u]];break;case 62:this.$=l[u];break;case 63:this.$=b.PLACEMENT.LEFTOF;break;case 64:this.$=b.PLACEMENT.RIGHTOF;break;case 65:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:l[u-1].actor}];break;case 66:this.$=[l[u-4],l[u-1],{type:"addMessage",from:l[u-4].actor,to:l[u-1].actor,signalType:l[u-3],msg:l[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:l[u-4].actor}];break;case 67:this.$=[l[u-3],l[u-1],{type:"addMessage",from:l[u-3].actor,to:l[u-1].actor,signalType:l[u-2],msg:l[u]}];break;case 68:this.$={type:"addParticipant",actor:l[u]};break;case 69:this.$=b.LINETYPE.SOLID_OPEN;break;case 70:this.$=b.LINETYPE.DOTTED_OPEN;break;case 71:this.$=b.LINETYPE.SOLID;break;case 72:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=b.LINETYPE.DOTTED;break;case 74:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=b.LINETYPE.SOLID_CROSS;break;case 76:this.$=b.LINETYPE.DOTTED_CROSS;break;case 77:this.$=b.LINETYPE.SOLID_POINT;break;case 78:this.$=b.LINETYPE.DOTTED_POINT;break;case 79:this.$=b.parseMessage(l[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:e,5:o,6:r},{1:[3]},{3:5,4:e,5:o,6:r},{3:6,4:e,5:o,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,5]),{9:47,12:12,13:h,14:p,17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},t(y,[2,7]),t(y,[2,8]),t(y,[2,14]),{12:48,50:K,52:U,53:q},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(y,[2,29]),t(y,[2,30]),{32:[1,61]},{34:[1,62]},t(y,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(y,[2,6]),t(y,[2,15]),t(P,[2,9],{10:93}),t(y,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(y,[2,21]),{5:[1,97]},{5:[1,98]},t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(y,[2,31]),t(y,[2,32]),t($,a,{7:99}),t($,a,{7:100}),t($,a,{7:101}),t(it,a,{40:102,7:103}),t(N,a,{42:104,7:105}),t(N,a,{7:105,42:106}),t(Jt,a,{45:107,7:108}),t($,a,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(ot,[2,69]),t(ot,[2,70]),t(ot,[2,71]),t(ot,[2,72]),t(ot,[2,73]),t(ot,[2,74]),t(ot,[2,75]),t(ot,[2,76]),t(ot,[2,77]),t(ot,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:dt},{56:123,81:dt},{56:124,81:dt},{56:125,81:dt},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:K,52:U,53:q},{5:[1,131]},t(y,[2,19]),t(y,[2,20]),t(y,[2,22]),t(y,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,132],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,133],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,134],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,135]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,46],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,49:[1,136],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,137]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,44],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,48:[1,138],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[2,42],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,47:[1,141],50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{4:i,5:c,8:8,9:10,12:12,13:h,14:p,16:[1,142],17:15,18:s,21:f,22:40,23:E,24:19,25:20,26:21,27:22,28:23,29:g,30:T,31:m,33:w,35:k,36:V,37:M,38:Y,39:C,41:z,43:H,44:Z,46:et,50:K,52:U,53:q,54:R,59:Q,60:G,61:j,62:rt,70:S},{15:[1,143]},t(y,[2,49]),{15:[1,144]},t(y,[2,51]),t(y,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:dt},{56:148,81:dt},{56:149,81:dt},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(y,[2,16]),t(P,[2,10]),{12:151,50:K,52:U,53:q},t(P,[2,12]),t(P,[2,13]),t(y,[2,18]),t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),{15:[1,152]},t(y,[2,38]),{15:[1,153]},t(y,[2,39]),t(y,[2,40]),{15:[1,154]},t(y,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:dt},{56:158,81:dt},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(P,[2,11]),t(it,a,{7:103,40:160}),t(N,a,{7:105,42:161}),t(Jt,a,{7:108,45:162}),t(y,[2,48]),t(y,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:d(function(I,L){if(L.recoverable)this.trace(I);else{var A=new Error(I);throw A.hash=L,A}},"parseError"),parse:d(function(I){var L=this,A=[0],b=[],D=[null],l=[],mt=this.table,u="",Lt=0,Zt=0,Pe=2,Qt=1,Ae=l.slice.call(arguments,1),W=Object.create(this.lexer),ut={yy:{}};for(var Ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ot)&&(ut.yy[Ot]=this.yy[Ot]);W.setInput(I,ut.yy),ut.yy.lexer=W,ut.yy.parser=this,typeof W.yylloc>"u"&&(W.yylloc={});var Bt=W.yylloc;l.push(Bt);var ke=W.options&&W.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ne(tt){A.length=A.length-2*tt,D.length=D.length-tt,l.length=l.length-tt}d(Ne,"popStack");function jt(){var tt;return tt=b.pop()||W.lex()||Qt,typeof tt!="number"&&(tt instanceof Array&&(b=tt,tt=b.pop()),tt=L.symbols_[tt]||tt),tt}d(jt,"lex");for(var X,gt,st,Vt,yt={},Pt,ht,$t,At;;){if(gt=A[A.length-1],this.defaultActions[gt]?st=this.defaultActions[gt]:((X===null||typeof X>"u")&&(X=jt()),st=mt[gt]&&mt[gt][X]),typeof st>"u"||!st.length||!st[0]){var Yt="";At=[];for(Pt in mt[gt])this.terminals_[Pt]&&Pt>Pe&&At.push("'"+this.terminals_[Pt]+"'");W.showPosition?Yt="Parse error on line "+(Lt+1)+`: `+W.showPosition()+` -Expecting `+kt.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error on line "+(Pt+1)+": Unexpected "+(X==Qt?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Yt,{text:W.match,token:this.terminals_[X]||X,line:W.yylineno,loc:Bt,expected:kt})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ft+", token: "+X);switch(st[0]){case 1:k.push(X),D.push(W.yytext),l.push(W.yylloc),k.push(st[1]),X=null,Zt=W.yyleng,p=W.yytext,Pt=W.yylineno,Bt=W.yylloc;break;case 2:if(ht=this.productions_[st[1]][1],yt.$=D[D.length-ht],yt._$={first_line:l[l.length-(ht||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ht||1)].first_column,last_column:l[l.length-1].last_column},ve&&(yt._$.range=[l[l.length-(ht||1)].range[0],l[l.length-1].range[1]]),Vt=this.performAction.apply(yt,[p,Zt,Pt,pt.yy,st[1],D,l].concat(ke)),typeof Vt<"u")return Vt;ht&&(k=k.slice(0,-1*ht*2),D=D.slice(0,-1*ht),l=l.slice(0,-1*ht)),k.push(this.productions_[st[1]][0]),D.push(yt.$),l.push(yt._$),$t=mt[k[k.length-2]][k[k.length-1]],k.push($t);break;case 3:return!0}}return!0},"parse")},Pe=function(){var ut={EOF:1,parseError:d(function(P,k){if(this.yy.parser)this.yy.parser.parseError(P,k);else throw new Error(P)},"parseError"),setInput:d(function(_,P){return this.yy=P||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var P=_.match(/(?:\r\n?|\n).*/g);return P?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),_},"input"),unput:d(function(_){var P=_.length,k=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-P),this.offset-=P;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),k.length-1&&(this.yylineno-=k.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:k?(k.length===b.length?this.yylloc.first_column:0)+b[b.length-k.length].length-k[0].length:this.yylloc.first_column-P},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-P]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(_){this.unput(this.match.slice(_))},"less"),pastInput:d(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var _=this.pastInput(),P=new Array(_.length+1).join("-");return _+this.upcomingInput()+` -`+P+"^"},"showPosition"),test_match:d(function(_,P){var k,b,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),b=_[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(_[0].length),this.matched+=_[0],k=this.performAction.call(this,this.yy,this,P,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var l in D)this[l]=D[l];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,P,k,b;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),l=0;lP[0].length)){if(P=k,b=l,this.options.backtrack_lexer){if(_=this.test_match(k,D[l]),_!==!1)return _;if(this._backtrack){P=!1;continue}else return!1}else if(!this.options.flex)break}return P?(_=this.test_match(P,D[b]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var P=this.next();return P||this.lex()},"lex"),begin:d(function(P){this.conditionStack.push(P)},"begin"),popState:d(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:d(function(P){this.begin(P)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(P,k,b,D){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return k.yytext=k.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return k.yytext=k.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return ut}();Ct.lexer=Pe;function Lt(){this.yy={}}return d(Lt,"Parser"),Lt.prototype=Ct,Ct.Parser=Lt,new Lt}();Wt.parser=Wt;var Ke=Wt,w=new Ce(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),Ue=d(function(t){w.records.boxes.push({name:t.text,wrap:t.wrap??xt(),fill:t.color,actorKeys:[]}),w.records.currentBox=w.records.boxes.slice(-1)[0]},"addBox"),qt=d(function(t,e,o,r){let a=w.records.currentBox;const n=w.records.actors.get(t);if(n){if(w.records.currentBox&&n.box&&w.records.currentBox!==n.box)throw new Error(`A same participant should only be defined in one Box: ${n.name} can't be in '${n.box.name}' and in '${w.records.currentBox.name}' at the same time.`);if(a=n.box?n.box:w.records.currentBox,n.box=a,n&&e===n.name&&o==null)return}if((o==null?void 0:o.text)==null&&(o={text:e,type:r}),(r==null||o.text==null)&&(o={text:e,type:r}),w.records.actors.set(t,{box:a,name:e,description:o.text,wrap:o.wrap??xt(),prevActor:w.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),w.records.prevActor){const c=w.records.actors.get(w.records.prevActor);c&&(c.nextActor=t)}w.records.currentBox&&w.records.currentBox.actorKeys.push(t),w.records.prevActor=t},"addActor"),Ge=d(t=>{let e,o=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return w.records.messages.push({from:t,to:e,message:(o==null?void 0:o.text)??"",wrap:(o==null?void 0:o.wrap)??xt(),type:r,activate:a}),!0},"addSignal"),Je=d(function(){return w.records.boxes.length>0},"hasAtLeastOneBox"),Ze=d(function(){return w.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),Qe=d(function(){return w.records.messages},"getMessages"),je=d(function(){return w.records.boxes},"getBoxes"),$e=d(function(){return w.records.actors},"getActors"),t0=d(function(){return w.records.createdActors},"getCreatedActors"),e0=d(function(){return w.records.destroyedActors},"getDestroyedActors"),_t=d(function(t){return w.records.actors.get(t)},"getActor"),r0=d(function(){return[...w.records.actors.keys()]},"getActorKeys"),s0=d(function(){w.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),a0=d(function(){w.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),n0=d(()=>w.records.sequenceNumbersEnabled,"showSequenceNumbers"),i0=d(function(t){w.records.wrapEnabled=t},"setWrap"),oe=d(t=>{if(t===void 0)return{};t=t.trim();const e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),xt=d(()=>{var t;return w.records.wrapEnabled!==void 0?w.records.wrapEnabled:((t=at().sequence)==null?void 0:t.wrap)??!1},"autoWrap"),o0=d(function(){w.reset(),We()},"clear"),c0=d(function(t){const e=t.trim(),{wrap:o,cleanedText:r}=oe(e),a={text:r,wrap:o};return J.debug(`parseMessage: ${JSON.stringify(a)}`),a},"parseMessage"),l0=d(function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let o=e!=null&&e[1]?e[1].trim():"transparent",r=e!=null&&e[2]?e[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",o)||(o="transparent",r=t.trim());else{const c=new Option().style;c.color=o,c.color!==o&&(o="transparent",r=t.trim())}const{wrap:a,cleanedText:n}=oe(r);return{text:n?Mt(n,at()):void 0,color:o,wrap:a}},"parseBoxData"),wt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},d0={FILLED:0,OPEN:1},h0={LEFTOF:0,RIGHTOF:1,OVER:2},ce=d(function(t,e,o){const r={actor:t,placement:e,message:o.text,wrap:o.wrap??xt()},a=[].concat(t,t);w.records.notes.push(r),w.records.messages.push({from:a[0],to:a[1],message:o.text,wrap:o.wrap??xt(),type:wt.NOTE,placement:e})},"addNote"),le=d(function(t,e){const o=_t(t);try{let r=Mt(e.text,at());r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const a=JSON.parse(r);Rt(o,a)}catch(r){J.error("error while parsing actor link text",r)}},"addLinks"),u0=d(function(t,e){const o=_t(t);try{const r={};let a=Mt(e.text,at());const n=a.indexOf("@");a=a.replace(/&/g,"&"),a=a.replace(/=/g,"=");const c=a.slice(0,n-1).trim(),h=a.slice(n+1).trim();r[c]=h,Rt(o,r)}catch(r){J.error("error while parsing actor link text",r)}},"addALink");function Rt(t,e){if(t.links==null)t.links=e;else for(const o in e)t.links[o]=e[o]}d(Rt,"insertLinks");var de=d(function(t,e){const o=_t(t);try{const r=Mt(e.text,at()),a=JSON.parse(r);Ut(o,a)}catch(r){J.error("error while parsing actor properties text",r)}},"addProperties");function Ut(t,e){if(t.properties==null)t.properties=e;else for(const o in e)t.properties[o]=e[o]}d(Ut,"insertProperties");function he(){w.records.currentBox=void 0}d(he,"boxEnd");var ue=d(function(t,e){const o=_t(t),r=document.getElementById(e.text);try{const a=r.innerHTML,n=JSON.parse(a);n.properties&&Ut(o,n.properties),n.links&&Rt(o,n.links)}catch(a){J.error("error while parsing actor details text",a)}},"addDetails"),p0=d(function(t,e){if((t==null?void 0:t.properties)!==void 0)return t.properties[e]},"getActorProperty"),pe=d(function(t){if(Array.isArray(t))t.forEach(function(e){pe(e)});else switch(t.type){case"sequenceIndex":w.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(w.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");w.records.lastCreated=t.actor,qt(t.actor,t.actor,t.description,t.draw),w.records.createdActors.set(t.actor,w.records.messages.length);break;case"destroyParticipant":w.records.lastDestroyed=t.actor,w.records.destroyedActors.set(t.actor,w.records.messages.length);break;case"activeStart":O(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":O(t.actor,void 0,void 0,t.signalType);break;case"addNote":ce(t.actor,t.placement,t.text);break;case"addLinks":le(t.actor,t.text);break;case"addALink":u0(t.actor,t.text);break;case"addProperties":de(t.actor,t.text);break;case"addDetails":ue(t.actor,t.text);break;case"addMessage":if(w.records.lastCreated){if(t.to!==w.records.lastCreated)throw new Error("The created participant "+w.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");w.records.lastCreated=void 0}else if(w.records.lastDestroyed){if(t.to!==w.records.lastDestroyed&&t.from!==w.records.lastDestroyed)throw new Error("The destroyed participant "+w.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");w.records.lastDestroyed=void 0}O(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":Ue(t.boxData);break;case"boxEnd":he();break;case"loopStart":O(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":O(void 0,void 0,void 0,t.signalType);break;case"rectStart":O(void 0,void 0,t.color,t.signalType);break;case"rectEnd":O(void 0,void 0,void 0,t.signalType);break;case"optStart":O(void 0,void 0,t.optText,t.signalType);break;case"optEnd":O(void 0,void 0,void 0,t.signalType);break;case"altStart":O(void 0,void 0,t.altText,t.signalType);break;case"else":O(void 0,void 0,t.altText,t.signalType);break;case"altEnd":O(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":se(t.text);break;case"parStart":O(void 0,void 0,t.parText,t.signalType);break;case"and":O(void 0,void 0,t.parText,t.signalType);break;case"parEnd":O(void 0,void 0,void 0,t.signalType);break;case"criticalStart":O(void 0,void 0,t.criticalText,t.signalType);break;case"option":O(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":O(void 0,void 0,void 0,t.signalType);break;case"breakStart":O(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":O(void 0,void 0,void 0,t.signalType);break}},"apply"),te={addActor:qt,addMessage:Xe,addSignal:O,addLinks:le,addDetails:ue,addProperties:de,autoWrap:xt,setWrap:i0,enableSequenceNumbers:s0,disableSequenceNumbers:a0,showSequenceNumbers:n0,getMessages:Qe,getActors:$e,getCreatedActors:t0,getDestroyedActors:e0,getActor:_t,getActorKeys:r0,getActorProperty:p0,getAccTitle:Oe,getBoxes:je,getDiagramTitle:Be,setDiagramTitle:Ve,getConfig:d(()=>at().sequence,"getConfig"),clear:o0,parseMessage:c0,parseBoxData:l0,LINETYPE:wt,ARROWTYPE:d0,PLACEMENT:h0,addNote:ce,setAccTitle:se,apply:pe,setAccDescription:Ye,getAccDescription:Fe,hasAtLeastOneBox:Je,hasAtLeastOneBoxWithTitle:Ze},f0=d(t=>`.actor { +Expecting `+At.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error on line "+(Lt+1)+": Unexpected "+(X==Qt?"end of input":"'"+(this.terminals_[X]||X)+"'"),this.parseError(Yt,{text:W.match,token:this.terminals_[X]||X,line:W.yylineno,loc:Bt,expected:At})}if(st[0]instanceof Array&&st.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+X);switch(st[0]){case 1:A.push(X),D.push(W.yytext),l.push(W.yylloc),A.push(st[1]),X=null,Zt=W.yyleng,u=W.yytext,Lt=W.yylineno,Bt=W.yylloc;break;case 2:if(ht=this.productions_[st[1]][1],yt.$=D[D.length-ht],yt._$={first_line:l[l.length-(ht||1)].first_line,last_line:l[l.length-1].last_line,first_column:l[l.length-(ht||1)].first_column,last_column:l[l.length-1].last_column},ke&&(yt._$.range=[l[l.length-(ht||1)].range[0],l[l.length-1].range[1]]),Vt=this.performAction.apply(yt,[u,Zt,Lt,ut.yy,st[1],D,l].concat(Ae)),typeof Vt<"u")return Vt;ht&&(A=A.slice(0,-1*ht*2),D=D.slice(0,-1*ht),l=l.slice(0,-1*ht)),A.push(this.productions_[st[1]][0]),D.push(yt.$),l.push(yt._$),$t=mt[A[A.length-2]][A[A.length-1]],A.push($t);break;case 3:return!0}}return!0},"parse")},Le=function(){var pt={EOF:1,parseError:d(function(L,A){if(this.yy.parser)this.yy.parser.parseError(L,A);else throw new Error(L)},"parseError"),setInput:d(function(I,L){return this.yy=L||this.yy||{},this._input=I,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:d(function(I){var L=I.length,A=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===b.length?this.yylloc.first_column:0)+b[b.length-A.length].length-A[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(I){this.unput(this.match.slice(I))},"less"),pastInput:d(function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:d(function(I,L){var A,b,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),b=I[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(I[0].length),this.matched+=I[0],A=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var l in D)this[l]=D[l];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,L,A,b;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),l=0;lL[0].length)){if(L=A,b=l,this.options.backtrack_lexer){if(I=this.test_match(A,D[l]),I!==!1)return I;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(I=this.test_match(L,D[b]),I!==!1?I:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var L=this.next();return L||this.lex()},"lex"),begin:d(function(L){this.conditionStack.push(L)},"begin"),popState:d(function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:d(function(L){this.begin(L)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(L,A,b,D){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return A.yytext=A.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 51:return 5;case 52:return A.yytext=A.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 66:return 5;case 67:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};return pt}();Ct.lexer=Le;function _t(){this.yy={}}return d(_t,"Parser"),_t.prototype=Ct,Ct.Parser=_t,new _t}();Wt.parser=Wt;var Ke=Wt,v=new Ce(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),Ue=d(function(t){v.records.boxes.push({name:t.text,wrap:t.wrap??xt(),fill:t.color,actorKeys:[]}),v.records.currentBox=v.records.boxes.slice(-1)[0]},"addBox"),qt=d(function(t,e,o,r){let a=v.records.currentBox;const i=v.records.actors.get(t);if(i){if(v.records.currentBox&&i.box&&v.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${v.records.currentBox.name}' at the same time.`);if(a=i.box?i.box:v.records.currentBox,i.box=a,i&&e===i.name&&o==null)return}if((o==null?void 0:o.text)==null&&(o={text:e,type:r}),(r==null||o.text==null)&&(o={text:e,type:r}),v.records.actors.set(t,{box:a,name:e,description:o.text,wrap:o.wrap??xt(),prevActor:v.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),v.records.prevActor){const c=v.records.actors.get(v.records.prevActor);c&&(c.nextActor=t)}v.records.currentBox&&v.records.currentBox.actorKeys.push(t),v.records.prevActor=t},"addActor"),Ge=d(t=>{let e,o=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return v.records.messages.push({from:t,to:e,message:(o==null?void 0:o.text)??"",wrap:(o==null?void 0:o.wrap)??xt(),type:r,activate:a}),!0},"addSignal"),Je=d(function(){return v.records.boxes.length>0},"hasAtLeastOneBox"),Ze=d(function(){return v.records.boxes.some(t=>t.name)},"hasAtLeastOneBoxWithTitle"),Qe=d(function(){return v.records.messages},"getMessages"),je=d(function(){return v.records.boxes},"getBoxes"),$e=d(function(){return v.records.actors},"getActors"),t0=d(function(){return v.records.createdActors},"getCreatedActors"),e0=d(function(){return v.records.destroyedActors},"getDestroyedActors"),It=d(function(t){return v.records.actors.get(t)},"getActor"),r0=d(function(){return[...v.records.actors.keys()]},"getActorKeys"),s0=d(function(){v.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),a0=d(function(){v.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),i0=d(()=>v.records.sequenceNumbersEnabled,"showSequenceNumbers"),n0=d(function(t){v.records.wrapEnabled=t},"setWrap"),oe=d(t=>{if(t===void 0)return{};t=t.trim();const e=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(e===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),xt=d(()=>{var t;return v.records.wrapEnabled!==void 0?v.records.wrapEnabled:((t=at().sequence)==null?void 0:t.wrap)??!1},"autoWrap"),o0=d(function(){v.reset(),ze()},"clear"),c0=d(function(t){const e=t.trim(),{wrap:o,cleanedText:r}=oe(e),a={text:r,wrap:o};return J.debug(`parseMessage: ${JSON.stringify(a)}`),a},"parseMessage"),l0=d(function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let o=e!=null&&e[1]?e[1].trim():"transparent",r=e!=null&&e[2]?e[2].trim():void 0;if(window!=null&&window.CSS)window.CSS.supports("color",o)||(o="transparent",r=t.trim());else{const c=new Option().style;c.color=o,c.color!==o&&(o="transparent",r=t.trim())}const{wrap:a,cleanedText:i}=oe(r);return{text:i?Mt(i,at()):void 0,color:o,wrap:a}},"parseBoxData"),vt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},d0={FILLED:0,OPEN:1},h0={LEFTOF:0,RIGHTOF:1,OVER:2},ce=d(function(t,e,o){const r={actor:t,placement:e,message:o.text,wrap:o.wrap??xt()},a=[].concat(t,t);v.records.notes.push(r),v.records.messages.push({from:a[0],to:a[1],message:o.text,wrap:o.wrap??xt(),type:vt.NOTE,placement:e})},"addNote"),le=d(function(t,e){const o=It(t);try{let r=Mt(e.text,at());r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const a=JSON.parse(r);Rt(o,a)}catch(r){J.error("error while parsing actor link text",r)}},"addLinks"),p0=d(function(t,e){const o=It(t);try{const r={};let a=Mt(e.text,at());const i=a.indexOf("@");a=a.replace(/&/g,"&"),a=a.replace(/=/g,"=");const c=a.slice(0,i-1).trim(),h=a.slice(i+1).trim();r[c]=h,Rt(o,r)}catch(r){J.error("error while parsing actor link text",r)}},"addALink");function Rt(t,e){if(t.links==null)t.links=e;else for(const o in e)t.links[o]=e[o]}d(Rt,"insertLinks");var de=d(function(t,e){const o=It(t);try{const r=Mt(e.text,at()),a=JSON.parse(r);Ut(o,a)}catch(r){J.error("error while parsing actor properties text",r)}},"addProperties");function Ut(t,e){if(t.properties==null)t.properties=e;else for(const o in e)t.properties[o]=e[o]}d(Ut,"insertProperties");function he(){v.records.currentBox=void 0}d(he,"boxEnd");var pe=d(function(t,e){const o=It(t),r=document.getElementById(e.text);try{const a=r.innerHTML,i=JSON.parse(a);i.properties&&Ut(o,i.properties),i.links&&Rt(o,i.links)}catch(a){J.error("error while parsing actor details text",a)}},"addDetails"),u0=d(function(t,e){if((t==null?void 0:t.properties)!==void 0)return t.properties[e]},"getActorProperty"),ue=d(function(t){if(Array.isArray(t))t.forEach(function(e){ue(e)});else switch(t.type){case"sequenceIndex":v.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":qt(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(v.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");v.records.lastCreated=t.actor,qt(t.actor,t.actor,t.description,t.draw),v.records.createdActors.set(t.actor,v.records.messages.length);break;case"destroyParticipant":v.records.lastDestroyed=t.actor,v.records.destroyedActors.set(t.actor,v.records.messages.length);break;case"activeStart":O(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":O(t.actor,void 0,void 0,t.signalType);break;case"addNote":ce(t.actor,t.placement,t.text);break;case"addLinks":le(t.actor,t.text);break;case"addALink":p0(t.actor,t.text);break;case"addProperties":de(t.actor,t.text);break;case"addDetails":pe(t.actor,t.text);break;case"addMessage":if(v.records.lastCreated){if(t.to!==v.records.lastCreated)throw new Error("The created participant "+v.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");v.records.lastCreated=void 0}else if(v.records.lastDestroyed){if(t.to!==v.records.lastDestroyed&&t.from!==v.records.lastDestroyed)throw new Error("The destroyed participant "+v.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");v.records.lastDestroyed=void 0}O(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":Ue(t.boxData);break;case"boxEnd":he();break;case"loopStart":O(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":O(void 0,void 0,void 0,t.signalType);break;case"rectStart":O(void 0,void 0,t.color,t.signalType);break;case"rectEnd":O(void 0,void 0,void 0,t.signalType);break;case"optStart":O(void 0,void 0,t.optText,t.signalType);break;case"optEnd":O(void 0,void 0,void 0,t.signalType);break;case"altStart":O(void 0,void 0,t.altText,t.signalType);break;case"else":O(void 0,void 0,t.altText,t.signalType);break;case"altEnd":O(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":se(t.text);break;case"parStart":O(void 0,void 0,t.parText,t.signalType);break;case"and":O(void 0,void 0,t.parText,t.signalType);break;case"parEnd":O(void 0,void 0,void 0,t.signalType);break;case"criticalStart":O(void 0,void 0,t.criticalText,t.signalType);break;case"option":O(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":O(void 0,void 0,void 0,t.signalType);break;case"breakStart":O(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":O(void 0,void 0,void 0,t.signalType);break}},"apply"),te={addActor:qt,addMessage:Xe,addSignal:O,addLinks:le,addDetails:pe,addProperties:de,autoWrap:xt,setWrap:n0,enableSequenceNumbers:s0,disableSequenceNumbers:a0,showSequenceNumbers:i0,getMessages:Qe,getActors:$e,getCreatedActors:t0,getDestroyedActors:e0,getActor:It,getActorKeys:r0,getActorProperty:u0,getAccTitle:Fe,getBoxes:je,getDiagramTitle:Ye,setDiagramTitle:Ve,getConfig:d(()=>at().sequence,"getConfig"),clear:o0,parseMessage:c0,parseBoxData:l0,LINETYPE:vt,ARROWTYPE:d0,PLACEMENT:h0,addNote:ce,setAccTitle:se,apply:ue,setAccDescription:Be,getAccDescription:Oe,hasAtLeastOneBox:Je,hasAtLeastOneBoxWithTitle:Ze},g0=d(t=>`.actor { stroke: ${t.actorBorder}; fill: ${t.actorBkg}; } @@ -119,4 +119,4 @@ Expecting `+kt.join(", ")+", got '"+(this.terminals_[X]||X)+"'":Yt="Parse error fill: ${t.actorBkg}; stroke-width: 2px; } -`,"getStyles"),g0=f0,gt=18*2,fe="actor-top",ge="actor-bottom",x0="actor-box",ee="actor-man",Gt=d(function(t,e){return Se(t,e)},"drawRect"),T0=d(function(t,e,o,r,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const n=e.links,c=e.actorCnt,h=e.rectData;var u="none";a&&(u="block !important");const s=t.append("g");s.attr("id","actor"+c+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",u);var g="";h.class!==void 0&&(g=" "+h.class);let E=h.width>o?h.width:o;const f=s.append("rect");if(f.attr("class","actorPopupMenuPanel"+g),f.attr("x",h.x),f.attr("y",h.height),f.attr("fill",h.fill),f.attr("stroke",h.stroke),f.attr("width",E),f.attr("height",h.height),f.attr("rx",h.rx),f.attr("ry",h.ry),n!=null){var T=20;for(let v in n){var m=s.append("a"),I=ae(n[v]);m.attr("xlink:href",I),m.attr("target","_blank"),D0(r)(v,m,h.x+10,h.height+T,E,20,{class:"actor"},r),T+=30}}return f.attr("height",T),{height:h.height+T,width:E}},"drawPopup"),y0=d(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Nt=d(async function(t,e,o=null){let r=t.append("foreignObject");const a=await ne(e.text,Ft()),c=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(r.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const h=t.node().firstChild;h.setAttribute("height",c.height+2*e.textMargin);const u=h.getBBox();r.attr("x",Math.round(u.x+u.width/2-c.width/2)).attr("y",Math.round(u.y+u.height/2-c.height/2))}else if(o){let{startx:h,stopx:u,starty:s}=o;if(h>u){const g=h;h=u,u=g}r.attr("x",Math.round(h+Math.abs(h-u)/2-c.width/2)),e.class==="loopText"?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-c.height))}return[r]},"drawKatex"),bt=d(function(t,e){let o=0,r=0;const a=e.text.split(L.lineBreakRegex),[n,c]=ie(e.fontSize);let h=[],u=0,s=d(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=d(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":s=d(()=>Math.round(e.y+(o+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":s=d(()=>Math.round(e.y+(o+r+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[g,E]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&n!==void 0&&(u=g*n);const f=t.append("text");f.attr("x",e.x),f.attr("y",s()),e.anchor!==void 0&&f.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&f.style("font-family",e.fontFamily),c!==void 0&&f.style("font-size",c),e.fontWeight!==void 0&&f.style("font-weight",e.fontWeight),e.fill!==void 0&&f.attr("fill",e.fill),e.class!==void 0&&f.attr("class",e.class),e.dy!==void 0?f.attr("dy",e.dy):u!==0&&f.attr("dy",u);const T=E||He;if(e.tspan){const m=f.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(T)}else f.text(T);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(f._groups||f)[0][0].getBBox().height,o=r),h.push(f)}return h},"drawText"),xe=d(function(t,e){function o(a,n,c,h,u){return a+","+n+" "+(a+c)+","+n+" "+(a+c)+","+(n+h-u)+" "+(a+c-u*1.2)+","+(n+h)+" "+a+","+(n+h)}d(o,"genPoints");const r=t.append("polygon");return r.attr("points",o(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,bt(t,e),r},"drawLabel"),ct=-1,Te=d((t,e,o,r)=>{t.select&&o.forEach(a=>{const n=e.get(a),c=t.select("#actor"+n.actorCnt);!r.mirrorActors&&n.stopy?c.attr("y2",n.stopy+n.height/2):r.mirrorActors&&c.attr("y2",n.stopy)})},"fixLifeLineHeights"),E0=d(function(t,e,o,r){var T,m;const a=r?e.stopy:e.starty,n=e.x+e.width/2,c=a+e.height,h=t.append("g").lower();var u=h;r||(ct++,Object.keys(e.links||{}).length&&!o.forceMenus&&u.attr("onclick",y0(`actor${ct}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+ct).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),u=h.append("g"),e.actorCnt=ct,e.links!=null&&u.attr("id","root-"+ct));const s=St();var g="actor";(T=e.properties)!=null&&T.class?g=e.properties.class:s.fill="#eaeaea",r?g+=` ${ge}`:g+=` ${fe}`,s.x=e.x,s.y=a,s.width=e.width,s.height=e.height,s.class=g,s.rx=3,s.ry=3,s.name=e.name;const E=Gt(u,s);if(e.rectData=s,(m=e.properties)!=null&&m.icon){const I=e.properties.icon.trim();I.charAt(0)==="@"?Re(u,s.x+s.width-20,s.y+10,I.substr(1)):De(u,s.x+s.width-20,s.y+10,I)}Xt(o,lt(e.description))(e.description,u,s.x,s.y,s.width,s.height,{class:`actor ${x0}`},o);let f=e.height;if(E.node){const I=E.node().getBBox();e.height=I.height,f=I.height}return f},"drawActorTypeParticipant"),b0=d(function(t,e,o,r){const a=r?e.stopy:e.starty,n=e.x+e.width/2,c=a+80,h=t.append("g").lower();r||(ct++,h.append("line").attr("id","actor"+ct).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=ct);const u=t.append("g");let s=ee;r?s+=` ${ge}`:s+=` ${fe}`,u.attr("class",s),u.attr("name",e.name);const g=St();g.x=e.x,g.y=a,g.fill="#eaeaea",g.width=e.width,g.height=e.height,g.class="actor",g.rx=3,g.ry=3,u.append("line").attr("id","actor-man-torso"+ct).attr("x1",n).attr("y1",a+25).attr("x2",n).attr("y2",a+45),u.append("line").attr("id","actor-man-arms"+ct).attr("x1",n-gt/2).attr("y1",a+33).attr("x2",n+gt/2).attr("y2",a+33),u.append("line").attr("x1",n-gt/2).attr("y1",a+60).attr("x2",n).attr("y2",a+45),u.append("line").attr("x1",n).attr("y1",a+45).attr("x2",n+gt/2-2).attr("y2",a+60);const E=u.append("circle");E.attr("cx",e.x+e.width/2),E.attr("cy",a+10),E.attr("r",15),E.attr("width",e.width),E.attr("height",e.height);const f=u.node().getBBox();return e.height=f.height,Xt(o,lt(e.description))(e.description,u,g.x,g.y+35,g.width,g.height,{class:`actor ${ee}`},o),e.height},"drawActorTypeActor"),m0=d(async function(t,e,o,r){switch(e.type){case"actor":return await b0(t,e,o,r);case"participant":return await E0(t,e,o,r)}},"drawActor"),w0=d(function(t,e,o){const a=t.append("g");ye(a,e),e.name&&Xt(o)(e.name,a,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},o),a.lower()},"drawBox"),I0=d(function(t){return t.append("g")},"anchorElement"),_0=d(function(t,e,o,r,a){const n=St(),c=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+a%3,n.width=e.stopx-e.startx,n.height=o-e.starty,Gt(c,n)},"drawActivation"),L0=d(async function(t,e,o,r){const{boxMargin:a,boxTextMargin:n,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:u,messageFontSize:s,messageFontWeight:g}=r,E=t.append("g"),f=d(function(I,v,V,M){return E.append("line").attr("x1",I).attr("y1",v).attr("x2",V).attr("y2",M).attr("class","loopLine")},"drawLoopLine");f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(I){f(e.startx,I.y,e.stopx,I.y).style("stroke-dasharray","3, 3")});let T=Kt();T.text=o,T.x=e.startx,T.y=e.starty,T.fontFamily=u,T.fontSize=s,T.fontWeight=g,T.anchor="middle",T.valign="middle",T.tspan=!1,T.width=h||50,T.height=c||20,T.textMargin=n,T.class="labelText",xe(E,T),T=Ee(),T.text=e.title,T.x=e.startx+h/2+(e.stopx-e.startx)/2,T.y=e.starty+a+n,T.anchor="middle",T.valign="middle",T.textMargin=n,T.class="loopText",T.fontFamily=u,T.fontSize=s,T.fontWeight=g,T.wrap=!0;let m=lt(T.text)?await Nt(E,T,e):bt(E,T);if(e.sectionTitles!==void 0){for(const[I,v]of Object.entries(e.sectionTitles))if(v.message){T.text=v.message,T.x=e.startx+(e.stopx-e.startx)/2,T.y=e.sections[I].y+a+n,T.class="loopText",T.anchor="middle",T.valign="middle",T.tspan=!1,T.fontFamily=u,T.fontSize=s,T.fontWeight=g,T.wrap=e.wrap,lt(T.text)?(e.starty=e.sections[I].y,await Nt(E,T,e)):bt(E,T);let V=Math.round(m.map(M=>(M._groups||M)[0][0].getBBox().height).reduce((M,Y)=>M+Y));e.sections[I].height+=V-(a+n)}}return e.height=Math.round(e.stopy-e.starty),E},"drawLoop"),ye=d(function(t,e){Me(t,e)},"drawBackgroundRect"),P0=d(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),A0=d(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),k0=d(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),v0=d(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),N0=d(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),S0=d(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),M0=d(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Ee=d(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),R0=d(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Xt=function(){function t(n,c,h,u,s,g,E){const f=c.append("text").attr("x",h+s/2).attr("y",u+g/2+5).style("text-anchor","middle").text(n);a(f,E)}d(t,"byText");function e(n,c,h,u,s,g,E,f){const{actorFontSize:T,actorFontFamily:m,actorFontWeight:I}=f,[v,V]=ie(T),M=n.split(L.lineBreakRegex);for(let Y=0;Yt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:d(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:d(function(t){this.boxes.push(t)},"addBox"),addActor:d(function(t){this.actors.push(t)},"addActor"),addLoop:d(function(t){this.loops.push(t)},"addLoop"),addMessage:d(function(t){this.messages.push(t)},"addMessage"),addNote:d(function(t){this.notes.push(t)},"addNote"),lastActor:d(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:d(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:d(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:d(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:d(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,we(at())},"init"),updateVal:d(function(t,e,o,r){t[e]===void 0?t[e]=o:t[e]=r(o,t[e])},"updateVal"),updateBounds:d(function(t,e,o,r){const a=this;let n=0;function c(h){return d(function(s){n++;const g=a.sequenceItems.length-n+1;a.updateVal(s,"starty",e-g*i.boxMargin,Math.min),a.updateVal(s,"stopy",r+g*i.boxMargin,Math.max),a.updateVal(x.data,"startx",t-g*i.boxMargin,Math.min),a.updateVal(x.data,"stopx",o+g*i.boxMargin,Math.max),h!=="activation"&&(a.updateVal(s,"startx",t-g*i.boxMargin,Math.min),a.updateVal(s,"stopx",o+g*i.boxMargin,Math.max),a.updateVal(x.data,"starty",e-g*i.boxMargin,Math.min),a.updateVal(x.data,"stopy",r+g*i.boxMargin,Math.max))},"updateItemBounds")}d(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:d(function(t,e,o,r){const a=L.getMin(t,o),n=L.getMax(t,o),c=L.getMin(e,r),h=L.getMax(e,r);this.updateVal(x.data,"startx",a,Math.min),this.updateVal(x.data,"starty",c,Math.min),this.updateVal(x.data,"stopx",n,Math.max),this.updateVal(x.data,"stopy",h,Math.max),this.updateBounds(a,c,n,h)},"insert"),newActivation:d(function(t,e,o){const r=o.get(t.from),a=Dt(t.from).length||0,n=r.x+r.width/2+(a-1)*i.activationWidth/2;this.activations.push({startx:n,starty:this.verticalPos+2,stopx:n+i.activationWidth,stopy:void 0,actor:t.from,anchored:B.anchorElement(e)})},"newActivation"),endActivation:d(function(t){const e=this.activations.map(function(o){return o.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:d(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:d(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:d(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:x.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:d(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:d(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:d(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:d(function(){return this.verticalPos},"getVerticalPos"),getBounds:d(function(){return{bounds:this.data,models:this.models}},"getBounds")},C0=d(async function(t,e){x.bumpVerticalPos(i.boxMargin),e.height=i.boxMargin,e.starty=x.getVerticalPos();const o=St();o.x=e.startx,o.y=e.starty,o.width=e.width||i.width,o.class="note";const r=t.append("g"),a=B.drawRect(r,o),n=Kt();n.x=e.startx,n.y=e.starty,n.width=o.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=i.noteFontFamily,n.fontSize=i.noteFontSize,n.fontWeight=i.noteFontWeight,n.anchor=i.noteAlign,n.textMargin=i.noteMargin,n.valign="center";const c=lt(n.text)?await Nt(r,n):bt(r,n),h=Math.round(c.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,s)=>u+s));a.attr("height",h+2*i.noteMargin),e.height+=h+2*i.noteMargin,x.bumpVerticalPos(h+2*i.noteMargin),e.stopy=e.starty+h+2*i.noteMargin,e.stopx=e.startx+o.width,x.insert(e.startx,e.starty,e.stopx,e.stopy),x.models.addNote(e)},"drawNote"),Tt=d(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Et=d(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),zt=d(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function be(t,e){x.bumpVerticalPos(10);const{startx:o,stopx:r,message:a}=e,n=L.splitBreaks(a).length,c=lt(a),h=c?await It(a,at()):F.calculateTextDimensions(a,Tt(i));if(!c){const E=h.height/n;e.height+=E,x.bumpVerticalPos(E)}let u,s=h.height-10;const g=h.width;if(o===r){u=x.getVerticalPos()+s,i.rightAngles||(s+=i.boxMargin,u=x.getVerticalPos()+s),s+=30;const E=L.getMax(g/2,i.width/2);x.insert(o-E,x.getVerticalPos()-10+s,r+E,x.getVerticalPos()+30+s)}else s+=i.boxMargin,u=x.getVerticalPos()+s,x.insert(o,u-10,r,u);return x.bumpVerticalPos(s),e.height+=s,e.stopy=e.starty+e.height,x.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),u}d(be,"boundMessage");var O0=d(async function(t,e,o,r){const{startx:a,stopx:n,starty:c,message:h,type:u,sequenceIndex:s,sequenceVisible:g}=e,E=F.calculateTextDimensions(h,Tt(i)),f=Kt();f.x=a,f.y=c+10,f.width=n-a,f.class="messageText",f.dy="1em",f.text=h,f.fontFamily=i.messageFontFamily,f.fontSize=i.messageFontSize,f.fontWeight=i.messageFontWeight,f.anchor=i.messageAlign,f.valign="center",f.textMargin=i.wrapPadding,f.tspan=!1,lt(f.text)?await Nt(t,f,{startx:a,stopx:n,starty:o}):bt(t,f);const T=E.width;let m;a===n?i.rightAngles?m=t.append("path").attr("d",`M ${a},${o} H ${a+L.getMax(i.width/2,T/2)} V ${o+25} H ${a}`):m=t.append("path").attr("d","M "+a+","+o+" C "+(a+60)+","+(o-10)+" "+(a+60)+","+(o+30)+" "+a+","+(o+20)):(m=t.append("line"),m.attr("x1",a),m.attr("y1",o),m.attr("x2",n),m.attr("y2",o)),u===r.db.LINETYPE.DOTTED||u===r.db.LINETYPE.DOTTED_CROSS||u===r.db.LINETYPE.DOTTED_POINT||u===r.db.LINETYPE.DOTTED_OPEN||u===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let I="";i.arrowMarkerAbsolute&&(I=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,I=I.replace(/\(/g,"\\("),I=I.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(u===r.db.LINETYPE.SOLID||u===r.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+I+"#arrowhead)"),(u===r.db.LINETYPE.BIDIRECTIONAL_SOLID||u===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+I+"#arrowhead)"),m.attr("marker-end","url("+I+"#arrowhead)")),(u===r.db.LINETYPE.SOLID_POINT||u===r.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+I+"#filled-head)"),(u===r.db.LINETYPE.SOLID_CROSS||u===r.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+I+"#crosshead)"),(g||i.showSequenceNumbers)&&(m.attr("marker-start","url("+I+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),B0=d(function(t,e,o,r,a,n,c){let h=0,u=0,s,g=0;for(const E of r){const f=e.get(E),T=f.box;s&&s!=T&&(c||x.models.addBox(s),u+=i.boxMargin+s.margin),T&&T!=s&&(c||(T.x=h+u,T.y=a),u+=T.margin),f.width=f.width||i.width,f.height=L.getMax(f.height||i.height,i.height),f.margin=f.margin||i.actorMargin,g=L.getMax(g,f.height),o.get(f.name)&&(u+=f.width/2),f.x=h+u,f.starty=x.getVerticalPos(),x.insert(f.x,a,f.x+f.width,f.height),h+=f.width+u,f.box&&(f.box.width=h+T.margin-f.box.x),u=f.margin,s=f.box,x.models.addActor(f)}s&&!c&&x.models.addBox(s),x.bumpVerticalPos(g)},"addActorRenderingData"),Ht=d(async function(t,e,o,r){if(r){let a=0;x.bumpVerticalPos(i.boxMargin*2);for(const n of o){const c=e.get(n);c.stopy||(c.stopy=x.getVerticalPos());const h=await B.drawActor(t,c,i,!0);a=L.getMax(a,h)}x.bumpVerticalPos(a+i.boxMargin)}else for(const a of o){const n=e.get(a);await B.drawActor(t,n,i,!1)}},"drawActors"),me=d(function(t,e,o,r){let a=0,n=0;for(const c of o){const h=e.get(c),u=Y0(h),s=B.drawPopup(t,h,u,i,i.forceMenus,r);s.height>a&&(a=s.height),s.width+h.x>n&&(n=s.width+h.x)}return{maxHeight:a,maxWidth:n}},"drawActorsPopup"),we=d(function(t){qe(i,t),t.fontFamily&&(i.actorFontFamily=i.noteFontFamily=i.messageFontFamily=t.fontFamily),t.fontSize&&(i.actorFontSize=i.noteFontSize=i.messageFontSize=t.fontSize),t.fontWeight&&(i.actorFontWeight=i.noteFontWeight=i.messageFontWeight=t.fontWeight)},"setConf"),Dt=d(function(t){return x.activations.filter(function(e){return e.actor===t})},"actorActivations"),re=d(function(t,e){const o=e.get(t),r=Dt(t),a=r.reduce(function(c,h){return L.getMin(c,h.startx)},o.x+o.width/2-1),n=r.reduce(function(c,h){return L.getMax(c,h.stopx)},o.x+o.width/2+1);return[a,n]},"activationBounds");function it(t,e,o,r,a){x.bumpVerticalPos(o);let n=r;if(e.id&&e.message&&t[e.id]){const c=t[e.id].width,h=Tt(i);e.message=F.wrapLabel(`[${e.message}]`,c-2*i.wrapPadding,h),e.width=c,e.wrap=!0;const u=F.calculateTextDimensions(e.message,h),s=L.getMax(u.height,i.labelBoxHeight);n=r+s,J.debug(`${s} - ${e.message}`)}a(e),x.bumpVerticalPos(n)}d(it,"adjustLoopHeightForWrap");function Ie(t,e,o,r,a,n,c){function h(s,g){s.x{y.add(A.from),y.add(A.to)}),m=m.filter(A=>y.has(A))}B0(s,g,E,m,0,I,!1);const C=await q0(I,g,Y,r);B.insertArrowHead(s),B.insertArrowCrossHead(s),B.insertArrowFilledHead(s),B.insertSequenceNumber(s);function z(y,A){const $=x.endActivation(y);$.starty+18>A&&($.starty=A-6,A+=12),B.drawActivation(s,$,A,i,Dt(y.from).length),x.insert($.startx,A-10,$.stopx,A)}d(z,"activeEnd");let H=1,Z=1;const et=[],K=[];let U=0;for(const y of I){let A,$,nt;switch(y.type){case r.db.LINETYPE.NOTE:x.resetVerticalPos(),$=y.noteModel,await C0(s,$);break;case r.db.LINETYPE.ACTIVE_START:x.newActivation(y,s,g);break;case r.db.LINETYPE.ACTIVE_END:z(y,x.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:it(C,y,i.boxMargin,i.boxMargin+i.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.LOOP_END:A=x.endLoop(),await B.drawLoop(s,A,"loop",i),x.bumpVerticalPos(A.stopy-x.getVerticalPos()),x.models.addLoop(A);break;case r.db.LINETYPE.RECT_START:it(C,y,i.boxMargin,i.boxMargin,N=>x.newLoop(void 0,N.message));break;case r.db.LINETYPE.RECT_END:A=x.endLoop(),K.push(A),x.models.addLoop(A),x.bumpVerticalPos(A.stopy-x.getVerticalPos());break;case r.db.LINETYPE.OPT_START:it(C,y,i.boxMargin,i.boxMargin+i.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.OPT_END:A=x.endLoop(),await B.drawLoop(s,A,"opt",i),x.bumpVerticalPos(A.stopy-x.getVerticalPos()),x.models.addLoop(A);break;case r.db.LINETYPE.ALT_START:it(C,y,i.boxMargin,i.boxMargin+i.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.ALT_ELSE:it(C,y,i.boxMargin+i.boxTextMargin,i.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.ALT_END:A=x.endLoop(),await B.drawLoop(s,A,"alt",i),x.bumpVerticalPos(A.stopy-x.getVerticalPos()),x.models.addLoop(A);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:it(C,y,i.boxMargin,i.boxMargin+i.boxTextMargin,N=>x.newLoop(N)),x.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:it(C,y,i.boxMargin+i.boxTextMargin,i.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.PAR_END:A=x.endLoop(),await B.drawLoop(s,A,"par",i),x.bumpVerticalPos(A.stopy-x.getVerticalPos()),x.models.addLoop(A);break;case r.db.LINETYPE.AUTONUMBER:H=y.message.start||H,Z=y.message.step||Z,y.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:it(C,y,i.boxMargin,i.boxMargin+i.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.CRITICAL_OPTION:it(C,y,i.boxMargin+i.boxTextMargin,i.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.CRITICAL_END:A=x.endLoop(),await B.drawLoop(s,A,"critical",i),x.bumpVerticalPos(A.stopy-x.getVerticalPos()),x.models.addLoop(A);break;case r.db.LINETYPE.BREAK_START:it(C,y,i.boxMargin,i.boxMargin+i.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.BREAK_END:A=x.endLoop(),await B.drawLoop(s,A,"break",i),x.bumpVerticalPos(A.stopy-x.getVerticalPos()),x.models.addLoop(A);break;default:try{nt=y.msgModel,nt.starty=x.getVerticalPos(),nt.sequenceIndex=H,nt.sequenceVisible=r.db.showSequenceNumbers();const N=await be(s,nt);Ie(y,nt,N,U,g,E,f),et.push({messageModel:nt,lineStartY:N}),x.models.addMessage(nt)}catch(N){J.error("error while drawing message",N)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(y.type)&&(H=H+Z),U++}J.debug("createdActors",E),J.debug("destroyedActors",f),await Ht(s,g,m,!1);for(const y of et)await O0(s,y.messageModel,y.lineStartY,r);i.mirrorActors&&await Ht(s,g,m,!0),K.forEach(y=>B.drawBackgroundRect(s,y)),Te(s,g,m,i);for(const y of x.models.boxes)y.height=x.getVerticalPos()-y.y,x.insert(y.x,y.y,y.x+y.width,y.height),y.startx=y.x,y.starty=y.y,y.stopx=y.startx+y.width,y.stopy=y.starty+y.height,y.stroke="rgb(0,0,0, 0.5)",B.drawBox(s,y,i);V&&x.bumpVerticalPos(i.boxMargin);const q=me(s,g,m,u),{bounds:R}=x.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let Q=R.stopy-R.starty;Q{const c=Tt(i);let h=n.actorKeys.reduce((g,E)=>g+=t.get(E).width+(t.get(E).margin||0),0);h-=2*i.boxTextMargin,n.wrap&&(n.name=F.wrapLabel(n.name,h-2*i.wrapPadding,c));const u=F.calculateTextDimensions(n.name,c);a=L.getMax(u.height,a);const s=L.getMax(h,u.width+2*i.wrapPadding);if(n.margin=i.boxTextMargin,hn.textMaxHeight=a),L.getMax(r,i.height)}d(Le,"calculateActorMargins");var F0=d(async function(t,e,o){const r=e.get(t.from),a=e.get(t.to),n=r.x,c=a.x,h=t.wrap&&t.message;let u=lt(t.message)?await It(t.message,at()):F.calculateTextDimensions(h?F.wrapLabel(t.message,i.width,Et(i)):t.message,Et(i));const s={width:h?i.width:L.getMax(i.width,u.width+2*i.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.db.PLACEMENT.RIGHTOF?(s.width=h?L.getMax(i.width,u.width):L.getMax(r.width/2+a.width/2,u.width+2*i.noteMargin),s.startx=n+(r.width+i.actorMargin)/2):t.placement===o.db.PLACEMENT.LEFTOF?(s.width=h?L.getMax(i.width,u.width+2*i.noteMargin):L.getMax(r.width/2+a.width/2,u.width+2*i.noteMargin),s.startx=n-s.width+(r.width-i.actorMargin)/2):t.to===t.from?(u=F.calculateTextDimensions(h?F.wrapLabel(t.message,L.getMax(i.width,r.width),Et(i)):t.message,Et(i)),s.width=h?L.getMax(i.width,r.width):L.getMax(r.width,i.width,u.width+2*i.noteMargin),s.startx=n+(r.width-s.width)/2):(s.width=Math.abs(n+r.width/2-(c+a.width/2))+i.actorMargin,s.startx=n2,E=d(I=>h?-I:I,"adjustValue");t.from===t.to?s=u:(t.activate&&!g&&(s+=E(i.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(s+=E(3)),[o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(u-=E(3)));const f=[r,a,n,c],T=Math.abs(u-s);t.wrap&&t.message&&(t.message=F.wrapLabel(t.message,L.getMax(T+2*i.wrapPadding,i.width),Tt(i)));const m=F.calculateTextDimensions(t.message,Tt(i));return{width:L.getMax(t.wrap?0:m.width+2*i.wrapPadding,T+2*i.wrapPadding,i.width),height:0,startx:u,stopx:s,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,f),toBounds:Math.max.apply(null,f)}},"buildMessageModel"),q0=d(async function(t,e,o,r){const a={},n=[];let c,h,u;for(const s of t){switch(s.id=F.random({length:10}),s.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:n.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:s.message&&(c=n.pop(),a[c.id]=c,a[s.id]=c,n.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=n.pop(),a[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const E=e.get(s.from?s.from:s.to.actor),f=Dt(s.from?s.from:s.to.actor).length,T=E.x+E.width/2+(f-1)*i.activationWidth/2,m={startx:T,stopx:T+i.activationWidth,actor:s.from,enabled:!0};x.activations.push(m)}break;case r.db.LINETYPE.ACTIVE_END:{const E=x.activations.map(f=>f.actor).lastIndexOf(s.from);x.activations.splice(E,1).splice(0,1)}break}s.placement!==void 0?(h=await F0(s,e,r),s.noteModel=h,n.forEach(E=>{c=E,c.from=L.getMin(c.from,h.startx),c.to=L.getMax(c.to,h.startx+h.width),c.width=L.getMax(c.width,Math.abs(c.from-c.to))-i.labelBoxWidth})):(u=W0(s,e,r),s.msgModel=u,u.startx&&u.stopx&&n.length>0&&n.forEach(E=>{if(c=E,u.startx===u.stopx){const f=e.get(s.from),T=e.get(s.to);c.from=L.getMin(f.x-u.width/2,f.x-f.width/2,c.from),c.to=L.getMax(T.x+u.width/2,T.x+f.width/2,c.to),c.width=L.getMax(c.width,Math.abs(c.to-c.from))-i.labelBoxWidth}else c.from=L.getMin(u.startx,c.from),c.to=L.getMax(u.stopx,c.to),c.width=L.getMax(c.width,u.width)-i.labelBoxWidth}))}return x.activations=[],J.debug("Loop type widths:",a),a},"calculateLoopBounds"),z0={bounds:x,drawActors:Ht,drawActorsPopup:me,setConf:we,draw:V0},G0={parser:Ke,db:te,renderer:z0,styles:g0,init:d(({wrap:t})=>{te.setWrap(t)},"init")};export{G0 as diagram}; +`,"getStyles"),f0=g0,ft=18*2,ge="actor-top",fe="actor-bottom",x0="actor-box",ee="actor-man",Gt=d(function(t,e){return Me(t,e)},"drawRect"),T0=d(function(t,e,o,r,a){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const i=e.links,c=e.actorCnt,h=e.rectData;var p="none";a&&(p="block !important");const s=t.append("g");s.attr("id","actor"+c+"_popup"),s.attr("class","actorPopupMenu"),s.attr("display",p);var f="";h.class!==void 0&&(f=" "+h.class);let E=h.width>o?h.width:o;const g=s.append("rect");if(g.attr("class","actorPopupMenuPanel"+f),g.attr("x",h.x),g.attr("y",h.height),g.attr("fill",h.fill),g.attr("stroke",h.stroke),g.attr("width",E),g.attr("height",h.height),g.attr("rx",h.rx),g.attr("ry",h.ry),i!=null){var T=20;for(let k in i){var m=s.append("a"),w=ae(i[k]);m.attr("xlink:href",w),m.attr("target","_blank"),D0(r)(k,m,h.x+10,h.height+T,E,20,{class:"actor"},r),T+=30}}return g.attr("height",T),{height:h.height+T,width:E}},"drawPopup"),y0=d(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Nt=d(async function(t,e,o=null){let r=t.append("foreignObject");const a=await ne(e.text,Ft()),c=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(a).node().getBoundingClientRect();if(r.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),e.class==="noteText"){const h=t.node().firstChild;h.setAttribute("height",c.height+2*e.textMargin);const p=h.getBBox();r.attr("x",Math.round(p.x+p.width/2-c.width/2)).attr("y",Math.round(p.y+p.height/2-c.height/2))}else if(o){let{startx:h,stopx:p,starty:s}=o;if(h>p){const f=h;h=p,p=f}r.attr("x",Math.round(h+Math.abs(h-p)/2-c.width/2)),e.class==="loopText"?r.attr("y",Math.round(s)):r.attr("y",Math.round(s-c.height))}return[r]},"drawKatex"),bt=d(function(t,e){let o=0,r=0;const a=e.text.split(_.lineBreakRegex),[i,c]=ie(e.fontSize);let h=[],p=0,s=d(()=>e.y,"yfunc");if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":s=d(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":s=d(()=>Math.round(e.y+(o+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":s=d(()=>Math.round(e.y+(o+r+2*e.textMargin)-e.textMargin),"yfunc");break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[f,E]of a.entries()){e.textMargin!==void 0&&e.textMargin===0&&i!==void 0&&(p=f*i);const g=t.append("text");g.attr("x",e.x),g.attr("y",s()),e.anchor!==void 0&&g.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&g.style("font-family",e.fontFamily),c!==void 0&&g.style("font-size",c),e.fontWeight!==void 0&&g.style("font-weight",e.fontWeight),e.fill!==void 0&&g.attr("fill",e.fill),e.class!==void 0&&g.attr("class",e.class),e.dy!==void 0?g.attr("dy",e.dy):p!==0&&g.attr("dy",p);const T=E||He;if(e.tspan){const m=g.append("tspan");m.attr("x",e.x),e.fill!==void 0&&m.attr("fill",e.fill),m.text(T)}else g.text(T);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(r+=(g._groups||g)[0][0].getBBox().height,o=r),h.push(g)}return h},"drawText"),xe=d(function(t,e){function o(a,i,c,h,p){return a+","+i+" "+(a+c)+","+i+" "+(a+c)+","+(i+h-p)+" "+(a+c-p*1.2)+","+(i+h)+" "+a+","+(i+h)}d(o,"genPoints");const r=t.append("polygon");return r.attr("points",o(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,bt(t,e),r},"drawLabel"),ct=-1,Te=d((t,e,o,r)=>{t.select&&o.forEach(a=>{const i=e.get(a),c=t.select("#actor"+i.actorCnt);!r.mirrorActors&&i.stopy?c.attr("y2",i.stopy+i.height/2):r.mirrorActors&&c.attr("y2",i.stopy)})},"fixLifeLineHeights"),E0=d(function(t,e,o,r){var T,m;const a=r?e.stopy:e.starty,i=e.x+e.width/2,c=a+e.height,h=t.append("g").lower();var p=h;r||(ct++,Object.keys(e.links||{}).length&&!o.forceMenus&&p.attr("onclick",y0(`actor${ct}_popup`)).attr("cursor","pointer"),p.append("line").attr("id","actor"+ct).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),p=h.append("g"),e.actorCnt=ct,e.links!=null&&p.attr("id","root-"+ct));const s=St();var f="actor";(T=e.properties)!=null&&T.class?f=e.properties.class:s.fill="#eaeaea",r?f+=` ${fe}`:f+=` ${ge}`,s.x=e.x,s.y=a,s.width=e.width,s.height=e.height,s.class=f,s.rx=3,s.ry=3,s.name=e.name;const E=Gt(p,s);if(e.rectData=s,(m=e.properties)!=null&&m.icon){const w=e.properties.icon.trim();w.charAt(0)==="@"?Re(p,s.x+s.width-20,s.y+10,w.substr(1)):De(p,s.x+s.width-20,s.y+10,w)}Xt(o,lt(e.description))(e.description,p,s.x,s.y,s.width,s.height,{class:`actor ${x0}`},o);let g=e.height;if(E.node){const w=E.node().getBBox();e.height=w.height,g=w.height}return g},"drawActorTypeParticipant"),b0=d(function(t,e,o,r){const a=r?e.stopy:e.starty,i=e.x+e.width/2,c=a+80,h=t.append("g").lower();r||(ct++,h.append("line").attr("id","actor"+ct).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=ct);const p=t.append("g");let s=ee;r?s+=` ${fe}`:s+=` ${ge}`,p.attr("class",s),p.attr("name",e.name);const f=St();f.x=e.x,f.y=a,f.fill="#eaeaea",f.width=e.width,f.height=e.height,f.class="actor",f.rx=3,f.ry=3,p.append("line").attr("id","actor-man-torso"+ct).attr("x1",i).attr("y1",a+25).attr("x2",i).attr("y2",a+45),p.append("line").attr("id","actor-man-arms"+ct).attr("x1",i-ft/2).attr("y1",a+33).attr("x2",i+ft/2).attr("y2",a+33),p.append("line").attr("x1",i-ft/2).attr("y1",a+60).attr("x2",i).attr("y2",a+45),p.append("line").attr("x1",i).attr("y1",a+45).attr("x2",i+ft/2-2).attr("y2",a+60);const E=p.append("circle");E.attr("cx",e.x+e.width/2),E.attr("cy",a+10),E.attr("r",15),E.attr("width",e.width),E.attr("height",e.height);const g=p.node().getBBox();return e.height=g.height,Xt(o,lt(e.description))(e.description,p,f.x,f.y+35,f.width,f.height,{class:`actor ${ee}`},o),e.height},"drawActorTypeActor"),m0=d(async function(t,e,o,r){switch(e.type){case"actor":return await b0(t,e,o,r);case"participant":return await E0(t,e,o,r)}},"drawActor"),v0=d(function(t,e,o){const a=t.append("g");ye(a,e),e.name&&Xt(o)(e.name,a,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},o),a.lower()},"drawBox"),w0=d(function(t){return t.append("g")},"anchorElement"),I0=d(function(t,e,o,r,a){const i=St(),c=e.anchored;i.x=e.startx,i.y=e.starty,i.class="activation"+a%3,i.width=e.stopx-e.startx,i.height=o-e.starty,Gt(c,i)},"drawActivation"),_0=d(async function(t,e,o,r){const{boxMargin:a,boxTextMargin:i,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:p,messageFontSize:s,messageFontWeight:f}=r,E=t.append("g"),g=d(function(w,k,V,M){return E.append("line").attr("x1",w).attr("y1",k).attr("x2",V).attr("y2",M).attr("class","loopLine")},"drawLoopLine");g(e.startx,e.starty,e.stopx,e.starty),g(e.stopx,e.starty,e.stopx,e.stopy),g(e.startx,e.stopy,e.stopx,e.stopy),g(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(w){g(e.startx,w.y,e.stopx,w.y).style("stroke-dasharray","3, 3")});let T=Kt();T.text=o,T.x=e.startx,T.y=e.starty,T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.anchor="middle",T.valign="middle",T.tspan=!1,T.width=h||50,T.height=c||20,T.textMargin=i,T.class="labelText",xe(E,T),T=Ee(),T.text=e.title,T.x=e.startx+h/2+(e.stopx-e.startx)/2,T.y=e.starty+a+i,T.anchor="middle",T.valign="middle",T.textMargin=i,T.class="loopText",T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.wrap=!0;let m=lt(T.text)?await Nt(E,T,e):bt(E,T);if(e.sectionTitles!==void 0){for(const[w,k]of Object.entries(e.sectionTitles))if(k.message){T.text=k.message,T.x=e.startx+(e.stopx-e.startx)/2,T.y=e.sections[w].y+a+i,T.class="loopText",T.anchor="middle",T.valign="middle",T.tspan=!1,T.fontFamily=p,T.fontSize=s,T.fontWeight=f,T.wrap=e.wrap,lt(T.text)?(e.starty=e.sections[w].y,await Nt(E,T,e)):bt(E,T);let V=Math.round(m.map(M=>(M._groups||M)[0][0].getBBox().height).reduce((M,Y)=>M+Y));e.sections[w].height+=V-(a+i)}}return e.height=Math.round(e.stopy-e.starty),E},"drawLoop"),ye=d(function(t,e){Se(t,e)},"drawBackgroundRect"),L0=d(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),P0=d(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),A0=d(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),k0=d(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),N0=d(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),S0=d(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),M0=d(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Ee=d(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),R0=d(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Xt=function(){function t(i,c,h,p,s,f,E){const g=c.append("text").attr("x",h+s/2).attr("y",p+f/2+5).style("text-anchor","middle").text(i);a(g,E)}d(t,"byText");function e(i,c,h,p,s,f,E,g){const{actorFontSize:T,actorFontFamily:m,actorFontWeight:w}=g,[k,V]=ie(T),M=i.split(_.lineBreakRegex);for(let Y=0;Yt.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:d(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:d(function(t){this.boxes.push(t)},"addBox"),addActor:d(function(t){this.actors.push(t)},"addActor"),addLoop:d(function(t){this.loops.push(t)},"addLoop"),addMessage:d(function(t){this.messages.push(t)},"addMessage"),addNote:d(function(t){this.notes.push(t)},"addNote"),lastActor:d(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:d(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:d(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:d(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:d(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ve(at())},"init"),updateVal:d(function(t,e,o,r){t[e]===void 0?t[e]=o:t[e]=r(o,t[e])},"updateVal"),updateBounds:d(function(t,e,o,r){const a=this;let i=0;function c(h){return d(function(s){i++;const f=a.sequenceItems.length-i+1;a.updateVal(s,"starty",e-f*n.boxMargin,Math.min),a.updateVal(s,"stopy",r+f*n.boxMargin,Math.max),a.updateVal(x.data,"startx",t-f*n.boxMargin,Math.min),a.updateVal(x.data,"stopx",o+f*n.boxMargin,Math.max),h!=="activation"&&(a.updateVal(s,"startx",t-f*n.boxMargin,Math.min),a.updateVal(s,"stopx",o+f*n.boxMargin,Math.max),a.updateVal(x.data,"starty",e-f*n.boxMargin,Math.min),a.updateVal(x.data,"stopy",r+f*n.boxMargin,Math.max))},"updateItemBounds")}d(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:d(function(t,e,o,r){const a=_.getMin(t,o),i=_.getMax(t,o),c=_.getMin(e,r),h=_.getMax(e,r);this.updateVal(x.data,"startx",a,Math.min),this.updateVal(x.data,"starty",c,Math.min),this.updateVal(x.data,"stopx",i,Math.max),this.updateVal(x.data,"stopy",h,Math.max),this.updateBounds(a,c,i,h)},"insert"),newActivation:d(function(t,e,o){const r=o.get(t.from),a=Dt(t.from).length||0,i=r.x+r.width/2+(a-1)*n.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+n.activationWidth,stopy:void 0,actor:t.from,anchored:B.anchorElement(e)})},"newActivation"),endActivation:d(function(t){const e=this.activations.map(function(o){return o.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:d(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:d(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:d(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:d(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:x.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:d(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:d(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:d(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=_.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:d(function(){return this.verticalPos},"getVerticalPos"),getBounds:d(function(){return{bounds:this.data,models:this.models}},"getBounds")},C0=d(async function(t,e){x.bumpVerticalPos(n.boxMargin),e.height=n.boxMargin,e.starty=x.getVerticalPos();const o=St();o.x=e.startx,o.y=e.starty,o.width=e.width||n.width,o.class="note";const r=t.append("g"),a=B.drawRect(r,o),i=Kt();i.x=e.startx,i.y=e.starty,i.width=o.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=n.noteFontFamily,i.fontSize=n.noteFontSize,i.fontWeight=n.noteFontWeight,i.anchor=n.noteAlign,i.textMargin=n.noteMargin,i.valign="center";const c=lt(i.text)?await Nt(r,i):bt(r,i),h=Math.round(c.map(p=>(p._groups||p)[0][0].getBBox().height).reduce((p,s)=>p+s));a.attr("height",h+2*n.noteMargin),e.height+=h+2*n.noteMargin,x.bumpVerticalPos(h+2*n.noteMargin),e.stopy=e.starty+h+2*n.noteMargin,e.stopx=e.startx+o.width,x.insert(e.startx,e.starty,e.stopx,e.stopy),x.models.addNote(e)},"drawNote"),Tt=d(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Et=d(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),zt=d(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function be(t,e){x.bumpVerticalPos(10);const{startx:o,stopx:r,message:a}=e,i=_.splitBreaks(a).length,c=lt(a),h=c?await wt(a,at()):F.calculateTextDimensions(a,Tt(n));if(!c){const E=h.height/i;e.height+=E,x.bumpVerticalPos(E)}let p,s=h.height-10;const f=h.width;if(o===r){p=x.getVerticalPos()+s,n.rightAngles||(s+=n.boxMargin,p=x.getVerticalPos()+s),s+=30;const E=_.getMax(f/2,n.width/2);x.insert(o-E,x.getVerticalPos()-10+s,r+E,x.getVerticalPos()+30+s)}else s+=n.boxMargin,p=x.getVerticalPos()+s,x.insert(o,p-10,r,p);return x.bumpVerticalPos(s),e.height+=s,e.stopy=e.starty+e.height,x.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),p}d(be,"boundMessage");var O0=d(async function(t,e,o,r){const{startx:a,stopx:i,starty:c,message:h,type:p,sequenceIndex:s,sequenceVisible:f}=e,E=F.calculateTextDimensions(h,Tt(n)),g=Kt();g.x=a,g.y=c+10,g.width=i-a,g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=n.messageFontFamily,g.fontSize=n.messageFontSize,g.fontWeight=n.messageFontWeight,g.anchor=n.messageAlign,g.valign="center",g.textMargin=n.wrapPadding,g.tspan=!1,lt(g.text)?await Nt(t,g,{startx:a,stopx:i,starty:o}):bt(t,g);const T=E.width;let m;a===i?n.rightAngles?m=t.append("path").attr("d",`M ${a},${o} H ${a+_.getMax(n.width/2,T/2)} V ${o+25} H ${a}`):m=t.append("path").attr("d","M "+a+","+o+" C "+(a+60)+","+(o-10)+" "+(a+60)+","+(o+30)+" "+a+","+(o+20)):(m=t.append("line"),m.attr("x1",a),m.attr("y1",o),m.attr("x2",i),m.attr("y2",o)),p===r.db.LINETYPE.DOTTED||p===r.db.LINETYPE.DOTTED_CROSS||p===r.db.LINETYPE.DOTTED_POINT||p===r.db.LINETYPE.DOTTED_OPEN||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let w="";n.arrowMarkerAbsolute&&(w=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,w=w.replace(/\(/g,"\\("),w=w.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(p===r.db.LINETYPE.SOLID||p===r.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+w+"#arrowhead)"),(p===r.db.LINETYPE.BIDIRECTIONAL_SOLID||p===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+w+"#arrowhead)"),m.attr("marker-end","url("+w+"#arrowhead)")),(p===r.db.LINETYPE.SOLID_POINT||p===r.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+w+"#filled-head)"),(p===r.db.LINETYPE.SOLID_CROSS||p===r.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+w+"#crosshead)"),(f||n.showSequenceNumbers)&&(m.attr("marker-start","url("+w+"#sequencenumber)"),t.append("text").attr("x",a).attr("y",o+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(s))},"drawMessage"),B0=d(function(t,e,o,r,a,i,c){let h=0,p=0,s,f=0;for(const E of r){const g=e.get(E),T=g.box;s&&s!=T&&(c||x.models.addBox(s),p+=n.boxMargin+s.margin),T&&T!=s&&(c||(T.x=h+p,T.y=a),p+=T.margin),g.width=g.width||n.width,g.height=_.getMax(g.height||n.height,n.height),g.margin=g.margin||n.actorMargin,f=_.getMax(f,g.height),o.get(g.name)&&(p+=g.width/2),g.x=h+p,g.starty=x.getVerticalPos(),x.insert(g.x,a,g.x+g.width,g.height),h+=g.width+p,g.box&&(g.box.width=h+T.margin-g.box.x),p=g.margin,s=g.box,x.models.addActor(g)}s&&!c&&x.models.addBox(s),x.bumpVerticalPos(f)},"addActorRenderingData"),Ht=d(async function(t,e,o,r){if(r){let a=0;x.bumpVerticalPos(n.boxMargin*2);for(const i of o){const c=e.get(i);c.stopy||(c.stopy=x.getVerticalPos());const h=await B.drawActor(t,c,n,!0);a=_.getMax(a,h)}x.bumpVerticalPos(a+n.boxMargin)}else for(const a of o){const i=e.get(a);await B.drawActor(t,i,n,!1)}},"drawActors"),me=d(function(t,e,o,r){let a=0,i=0;for(const c of o){const h=e.get(c),p=Y0(h),s=B.drawPopup(t,h,p,n,n.forceMenus,r);s.height>a&&(a=s.height),s.width+h.x>i&&(i=s.width+h.x)}return{maxHeight:a,maxWidth:i}},"drawActorsPopup"),ve=d(function(t){qe(n,t),t.fontFamily&&(n.actorFontFamily=n.noteFontFamily=n.messageFontFamily=t.fontFamily),t.fontSize&&(n.actorFontSize=n.noteFontSize=n.messageFontSize=t.fontSize),t.fontWeight&&(n.actorFontWeight=n.noteFontWeight=n.messageFontWeight=t.fontWeight)},"setConf"),Dt=d(function(t){return x.activations.filter(function(e){return e.actor===t})},"actorActivations"),re=d(function(t,e){const o=e.get(t),r=Dt(t),a=r.reduce(function(c,h){return _.getMin(c,h.startx)},o.x+o.width/2-1),i=r.reduce(function(c,h){return _.getMax(c,h.stopx)},o.x+o.width/2+1);return[a,i]},"activationBounds");function nt(t,e,o,r,a){x.bumpVerticalPos(o);let i=r;if(e.id&&e.message&&t[e.id]){const c=t[e.id].width,h=Tt(n);e.message=F.wrapLabel(`[${e.message}]`,c-2*n.wrapPadding,h),e.width=c,e.wrap=!0;const p=F.calculateTextDimensions(e.message,h),s=_.getMax(p.height,n.labelBoxHeight);i=r+s,J.debug(`${s} - ${e.message}`)}a(e),x.bumpVerticalPos(i)}d(nt,"adjustLoopHeightForWrap");function we(t,e,o,r,a,i,c){function h(s,f){s.x{y.add(P.from),y.add(P.to)}),m=m.filter(P=>y.has(P))}B0(s,f,E,m,0,w,!1);const C=await q0(w,f,Y,r);B.insertArrowHead(s),B.insertArrowCrossHead(s),B.insertArrowFilledHead(s),B.insertSequenceNumber(s);function z(y,P){const $=x.endActivation(y);$.starty+18>P&&($.starty=P-6,P+=12),B.drawActivation(s,$,P,n,Dt(y.from).length),x.insert($.startx,P-10,$.stopx,P)}d(z,"activeEnd");let H=1,Z=1;const et=[],K=[];let U=0;for(const y of w){let P,$,it;switch(y.type){case r.db.LINETYPE.NOTE:x.resetVerticalPos(),$=y.noteModel,await C0(s,$);break;case r.db.LINETYPE.ACTIVE_START:x.newActivation(y,s,f);break;case r.db.LINETYPE.ACTIVE_END:z(y,x.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.LOOP_END:P=x.endLoop(),await B.drawLoop(s,P,"loop",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.RECT_START:nt(C,y,n.boxMargin,n.boxMargin,N=>x.newLoop(void 0,N.message));break;case r.db.LINETYPE.RECT_END:P=x.endLoop(),K.push(P),x.models.addLoop(P),x.bumpVerticalPos(P.stopy-x.getVerticalPos());break;case r.db.LINETYPE.OPT_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.OPT_END:P=x.endLoop(),await B.drawLoop(s,P,"opt",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.ALT_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.ALT_ELSE:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.ALT_END:P=x.endLoop(),await B.drawLoop(s,P,"alt",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N)),x.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.PAR_END:P=x.endLoop(),await B.drawLoop(s,P,"par",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.AUTONUMBER:H=y.message.start||H,Z=y.message.step||Z,y.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.CRITICAL_OPTION:nt(C,y,n.boxMargin+n.boxTextMargin,n.boxMargin,N=>x.addSectionToLoop(N));break;case r.db.LINETYPE.CRITICAL_END:P=x.endLoop(),await B.drawLoop(s,P,"critical",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;case r.db.LINETYPE.BREAK_START:nt(C,y,n.boxMargin,n.boxMargin+n.boxTextMargin,N=>x.newLoop(N));break;case r.db.LINETYPE.BREAK_END:P=x.endLoop(),await B.drawLoop(s,P,"break",n),x.bumpVerticalPos(P.stopy-x.getVerticalPos()),x.models.addLoop(P);break;default:try{it=y.msgModel,it.starty=x.getVerticalPos(),it.sequenceIndex=H,it.sequenceVisible=r.db.showSequenceNumbers();const N=await be(s,it);we(y,it,N,U,f,E,g),et.push({messageModel:it,lineStartY:N}),x.models.addMessage(it)}catch(N){J.error("error while drawing message",N)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(y.type)&&(H=H+Z),U++}J.debug("createdActors",E),J.debug("destroyedActors",g),await Ht(s,f,m,!1);for(const y of et)await O0(s,y.messageModel,y.lineStartY,r);n.mirrorActors&&await Ht(s,f,m,!0),K.forEach(y=>B.drawBackgroundRect(s,y)),Te(s,f,m,n);for(const y of x.models.boxes)y.height=x.getVerticalPos()-y.y,x.insert(y.x,y.y,y.x+y.width,y.height),y.startx=y.x,y.starty=y.y,y.stopx=y.startx+y.width,y.stopy=y.starty+y.height,y.stroke="rgb(0,0,0, 0.5)",B.drawBox(s,y,n);V&&x.bumpVerticalPos(n.boxMargin);const q=me(s,f,m,p),{bounds:R}=x.getBounds();R.startx===void 0&&(R.startx=0),R.starty===void 0&&(R.starty=0),R.stopx===void 0&&(R.stopx=0),R.stopy===void 0&&(R.stopy=0);let Q=R.stopy-R.starty;Q{const c=Tt(n);let h=i.actorKeys.reduce((f,E)=>f+=t.get(E).width+(t.get(E).margin||0),0);h-=2*n.boxTextMargin,i.wrap&&(i.name=F.wrapLabel(i.name,h-2*n.wrapPadding,c));const p=F.calculateTextDimensions(i.name,c);a=_.getMax(p.height,a);const s=_.getMax(h,p.width+2*n.wrapPadding);if(i.margin=n.boxTextMargin,hi.textMaxHeight=a),_.getMax(r,n.height)}d(_e,"calculateActorMargins");var F0=d(async function(t,e,o){const r=e.get(t.from),a=e.get(t.to),i=r.x,c=a.x,h=t.wrap&&t.message;let p=lt(t.message)?await wt(t.message,at()):F.calculateTextDimensions(h?F.wrapLabel(t.message,n.width,Et(n)):t.message,Et(n));const s={width:h?n.width:_.getMax(n.width,p.width+2*n.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===o.db.PLACEMENT.RIGHTOF?(s.width=h?_.getMax(n.width,p.width):_.getMax(r.width/2+a.width/2,p.width+2*n.noteMargin),s.startx=i+(r.width+n.actorMargin)/2):t.placement===o.db.PLACEMENT.LEFTOF?(s.width=h?_.getMax(n.width,p.width+2*n.noteMargin):_.getMax(r.width/2+a.width/2,p.width+2*n.noteMargin),s.startx=i-s.width+(r.width-n.actorMargin)/2):t.to===t.from?(p=F.calculateTextDimensions(h?F.wrapLabel(t.message,_.getMax(n.width,r.width),Et(n)):t.message,Et(n)),s.width=h?_.getMax(n.width,r.width):_.getMax(r.width,n.width,p.width+2*n.noteMargin),s.startx=i+(r.width-s.width)/2):(s.width=Math.abs(i+r.width/2-(c+a.width/2))+n.actorMargin,s.startx=i2,E=d(w=>h?-w:w,"adjustValue");t.from===t.to?s=p:(t.activate&&!f&&(s+=E(n.activationWidth/2-1)),[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(s+=E(3)),[o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(p-=E(3)));const g=[r,a,i,c],T=Math.abs(p-s);t.wrap&&t.message&&(t.message=F.wrapLabel(t.message,_.getMax(T+2*n.wrapPadding,n.width),Tt(n)));const m=F.calculateTextDimensions(t.message,Tt(n));return{width:_.getMax(t.wrap?0:m.width+2*n.wrapPadding,T+2*n.wrapPadding,n.width),height:0,startx:p,stopx:s,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),q0=d(async function(t,e,o,r){const a={},i=[];let c,h,p;for(const s of t){switch(s.id=F.random({length:10}),s.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:s.id,msg:s.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:s.message&&(c=i.pop(),a[c.id]=c,a[s.id]=c,i.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=i.pop(),a[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const E=e.get(s.from?s.from:s.to.actor),g=Dt(s.from?s.from:s.to.actor).length,T=E.x+E.width/2+(g-1)*n.activationWidth/2,m={startx:T,stopx:T+n.activationWidth,actor:s.from,enabled:!0};x.activations.push(m)}break;case r.db.LINETYPE.ACTIVE_END:{const E=x.activations.map(g=>g.actor).lastIndexOf(s.from);x.activations.splice(E,1).splice(0,1)}break}s.placement!==void 0?(h=await F0(s,e,r),s.noteModel=h,i.forEach(E=>{c=E,c.from=_.getMin(c.from,h.startx),c.to=_.getMax(c.to,h.startx+h.width),c.width=_.getMax(c.width,Math.abs(c.from-c.to))-n.labelBoxWidth})):(p=W0(s,e,r),s.msgModel=p,p.startx&&p.stopx&&i.length>0&&i.forEach(E=>{if(c=E,p.startx===p.stopx){const g=e.get(s.from),T=e.get(s.to);c.from=_.getMin(g.x-p.width/2,g.x-g.width/2,c.from),c.to=_.getMax(T.x+p.width/2,T.x+g.width/2,c.to),c.width=_.getMax(c.width,Math.abs(c.to-c.from))-n.labelBoxWidth}else c.from=_.getMin(p.startx,c.from),c.to=_.getMax(p.stopx,c.to),c.width=_.getMax(c.width,p.width)-n.labelBoxWidth}))}return x.activations=[],J.debug("Loop type widths:",a),a},"calculateLoopBounds"),z0={bounds:x,drawActors:Ht,drawActorsPopup:me,setConf:ve,draw:V0},G0={parser:Ke,db:te,renderer:z0,styles:f0,init:d(({wrap:t})=>{te.setWrap(t)},"init")};export{G0 as diagram}; diff --git a/static/js/md-stateDiagram-MAYHULR4-D9h0fowV.js b/static/js/md-stateDiagram-MAYHULR4-M4cmYgl8.js similarity index 59% rename from static/js/md-stateDiagram-MAYHULR4-D9h0fowV.js rename to static/js/md-stateDiagram-MAYHULR4-M4cmYgl8.js index 88d18b53d..2769c3c83 100644 --- a/static/js/md-stateDiagram-MAYHULR4-D9h0fowV.js +++ b/static/js/md-stateDiagram-MAYHULR4-M4cmYgl8.js @@ -1 +1 @@ -import{s as W,a as N,b as P}from"./md-chunk-7U56Z5CX-B4xneTyT.js";import{_ as u,d as t,j as H,l as S,k as C,e as z,K as U,Q as F,u as O}from"./md-index-BVqvVggs.js";import{G as J}from"./md-graph-BfdmZmeA.js";import{l as X}from"./md-layout-BErqkM37.js";import"./md-chunk-5HRBRIJM-CXxgtuoQ.js";import"./md-_baseUniq-BgyQXxRT.js";import"./md-_basePickBy-CkE1q7AX.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},j=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),q=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),K=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),Q=u((e,i)=>{const d=u(function(l,B,m){const v=l.append("tspan").attr("x",2*t().state.padding).text(B);m||v.attr("dy",t().state.textHeight)},"addTspan"),r=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=r.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(p,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),c=Math.max(x.width,r.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),Z=u((e,i,d)=>{const o=t().state.padding,r=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+r;let c=Math.max(x,p);c===p&&(c=c+r);let l;const B=e.node().getBBox();i.doc,l=a-o,x>p&&(l=(p-c)/2+o),Math.abs(a-B.x)p&&(l=a-(x-p)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),x<=p&&s.attr("x",a+(c-r)/2-x/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let r=d;d=o,o=r}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let r=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const c=g.append("tspan");if(c.text(x),s===0){const l=c.node().getBBox();s+=l.height}r+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+r+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:r}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:r,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",r+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},r=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&j(r),i.type==="end"&&V(r),(i.type==="fork"||i.type==="join")&&tt(r,i),i.type==="note"&&at(i.note.text,r),i.type==="divider"&&q(r),i.type==="default"&&i.descriptions.length===0&&K(r,i),i.type==="default"&&i.descriptions.length>0&&Q(r,i);const g=r.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const r=i.points,g=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(F),p=e.append("path").attr("d",g(r)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:x}=O.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,v=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",x+l),w=h.node().getBBox();m=Math.max(m,w.width),v=Math.min(v,w.x),S.info(w.x,y,x+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,x)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",x+w*l-f)),E=l*c.length}const n=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",x-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(n)}A++},"drawEdge"),b,T={},nt=u(function(){},"setConf"),rt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const r=t().securityLevel;let g;r==="sandbox"&&(g=H("#i"+i));const p=r==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=r==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);rt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,p,a,o);const x=b.padding,c=s.node().getBBox(),l=c.width+x*2,B=c.height+x*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,r,g,p)=>{const a=new J({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s{const w=h.parentElement;let k=0,M=0;w&&(w.parentElement&&(k=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",k-M-8)})):S.debug("No Node "+n+": "+JSON.stringify(a.node(n)))});let v=m.getBBox();a.edges().forEach(function(n){n!==void 0&&a.edge(n)!==void 0&&(S.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(a.edge(n))),it(i,a.edge(n),a.edge(n).relation))}),v=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=v.width+2*b.padding,E.height=v.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:nt,draw:st},ft={parser:W,db:N,renderer:ot,styles:P,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()},"init")};export{ft as diagram}; +import{s as W,a as N,b as P}from"./md-chunk-7U56Z5CX-jaDTStfP.js";import{_ as u,c as t,d as H,l as S,e as C,k as z,K as U,Q as F,u as O}from"./md-index-B8Nim9kS.js";import{G as J}from"./md-graph-6STGQExD.js";import{l as X}from"./md-layout-C6gsB80Q.js";import"./md-chunk-5HRBRIJM-Dc3xF8et.js";import"./md-_baseUniq-DU1ET3rn.js";import"./md-_basePickBy-B78WwQFo.js";var L={},D=u((e,i)=>{L[e]=i},"set"),Y=u(e=>L[e],"get"),G=u(()=>Object.keys(L),"keys"),I=u(()=>G().length,"size"),$={get:Y,set:D,keys:G,size:I},q=u(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),K=u(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Q=u((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),o=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o.width+2*t().state.padding).attr("height",o.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),Z=u((e,i)=>{const d=u(function(l,B,m){const k=l.append("tspan").attr("x",2*t().state.padding).text(B);m||k.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),g=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",g+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(l){a||(d(p,l,s),s=!1),a=!1});const y=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+g+t().state.dividerMargin/2).attr("y2",t().state.padding+g+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),c=Math.max(x.width,n.width);return y.attr("x2",c+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c+2*t().state.padding).attr("height",x.height+g+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),j=u((e,i,d)=>{const o=t().state.padding,n=2*t().state.padding,g=e.node().getBBox(),p=g.width,a=g.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let c=Math.max(x,p);c===p&&(c=c+n);let l;const B=e.node().getBBox();i.doc,l=a-o,x>p&&(l=(p-c)/2+o),Math.abs(a-B.x)p&&(l=a-(x-p)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",l).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",c).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",l+o),x<=p&&s.attr("x",a+(c-n)/2-x/2+o),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",l).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",c).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),V=u(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),tt=u((e,i)=>{let d=t().state.forkWidth,o=t().state.forkHeight;if(i.parentId){let n=d;d=o,o=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",o).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),et=u((e,i,d,o)=>{let n=0;const g=o.append("text");g.style("text-anchor","start"),g.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const y of a){const x=y.trim();if(x.length>0){const c=g.append("tspan");if(c.text(x),s===0){const l=c.node().getBBox();s+=l.height}n+=s,c.attr("x",i+t().state.noteMargin),c.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:g.node().getBBox().width,textHeight:n}},"_drawLongText"),at=u((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),o=i.append("g"),{textWidth:n,textHeight:g}=et(e,0,0,o);return d.attr("height",g+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),_=u(function(e,i){const d=i.id,o={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&q(n),i.type==="end"&&V(n),(i.type==="fork"||i.type==="join")&&tt(n,i),i.type==="note"&&at(i.note.text,n),i.type==="divider"&&K(n),i.type==="default"&&i.descriptions.length===0&&Q(n,i),i.type==="default"&&i.descriptions.length>0&&Z(n,i);const g=n.node().getBBox();return o.width=g.width+2*t().state.padding,o.height=g.height+2*t().state.padding,$.set(d,o),o},"drawState"),A=0,it=u(function(e,i,d){const o=u(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,g=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(F),p=e.append("path").attr("d",g(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replace(/\(/g,"\\("),a=a.replace(/\)/g,"\\)")),p.attr("marker-end","url("+a+"#"+o(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:y,y:x}=O.calcLabelPosition(i.points),c=z.getRows(d.title);let l=0;const B=[];let m=0,k=0;for(let f=0;f<=c.length;f++){const h=s.append("text").attr("text-anchor","middle").text(c[f]).attr("x",y).attr("y",x+l),w=h.node().getBBox();m=Math.max(m,w.width),k=Math.min(k,w.x),S.info(w.x,y,x+l),l===0&&(l=h.node().getBBox().height,S.info("Title height",l,x)),B.push(h)}let E=l*c.length;if(c.length>1){const f=(c.length-1)*l*.5;B.forEach((h,w)=>h.attr("y",x+w*l-f)),E=l*c.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",y-m/2-t().state.padding/2).attr("y",x-E/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",E+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},rt=u(function(){},"setConf"),nt=u(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),st=u(function(e,i,d,o){b=t().state;const n=t().securityLevel;let g;n==="sandbox"&&(g=H("#i"+i));const p=n==="sandbox"?H(g.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?g.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);nt(s);const y=o.db.getRootDoc();R(y,s,void 0,!1,p,a,o);const x=b.padding,c=s.node().getBBox(),l=c.width+x*2,B=c.height+x*2,m=l*1.75;C(s,B,m,b.useMaxWidth),s.attr("viewBox",`${c.x-b.padding} ${c.y-b.padding} `+l+" "+B)},"draw"),dt=u(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=u((e,i,d,o,n,g,p)=>{const a=new J({compound:!0,multigraph:!0});let s,y=!0;for(s=0;s{const w=h.parentElement;let v=0,M=0;w&&(w.parentElement&&(v=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let k=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),it(i,a.edge(r),a.edge(r).relation))}),k=m.getBBox();const E={id:d||"root",label:d||"root",width:0,height:0};return E.width=k.width+2*b.padding,E.height=k.height+2*b.padding,S.debug("Doc rendered",E,a),E},"renderDoc"),ot={setConf:rt,draw:st},ft={parser:P,db:N,renderer:ot,styles:W,init:u(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,N.clear()},"init")};export{ft as diagram}; diff --git a/static/js/md-stateDiagram-v2-4JROLMXI-L8c9L0IT.js b/static/js/md-stateDiagram-v2-4JROLMXI-L8c9L0IT.js deleted file mode 100644 index 0c19e8c06..000000000 --- a/static/js/md-stateDiagram-v2-4JROLMXI-L8c9L0IT.js +++ /dev/null @@ -1 +0,0 @@ -import{s as t,a as e,c as r,b as s}from"./md-chunk-7U56Z5CX-B4xneTyT.js";import{_ as i}from"./md-index-BVqvVggs.js";import"./md-chunk-5HRBRIJM-CXxgtuoQ.js";var _={parser:t,db:e,renderer:r,styles:s,init:i(a=>{a.state||(a.state={}),a.state.arrowMarkerAbsolute=a.arrowMarkerAbsolute,e.clear()},"init")};export{_ as diagram}; diff --git a/static/js/md-stateDiagram-v2-4JROLMXI-ThmBLKFI.js b/static/js/md-stateDiagram-v2-4JROLMXI-ThmBLKFI.js new file mode 100644 index 000000000..bf5fb2425 --- /dev/null +++ b/static/js/md-stateDiagram-v2-4JROLMXI-ThmBLKFI.js @@ -0,0 +1 @@ +import{s as t,c as r,a as e,b as s}from"./md-chunk-7U56Z5CX-jaDTStfP.js";import{_ as i}from"./md-index-B8Nim9kS.js";import"./md-chunk-5HRBRIJM-Dc3xF8et.js";var _={parser:s,db:e,renderer:r,styles:t,init:i(a=>{a.state||(a.state={}),a.state.arrowMarkerAbsolute=a.arrowMarkerAbsolute,e.clear()},"init")};export{_ as diagram}; diff --git a/static/js/md-timeline-definition-U7ZMHBDA-B4qXY0N3.js b/static/js/md-timeline-definition-U7ZMHBDA-CLbniYO1.js similarity index 86% rename from static/js/md-timeline-definition-U7ZMHBDA-B4qXY0N3.js rename to static/js/md-timeline-definition-U7ZMHBDA-CLbniYO1.js index bc4b406ef..f5d826595 100644 --- a/static/js/md-timeline-definition-U7ZMHBDA-B4qXY0N3.js +++ b/static/js/md-timeline-definition-U7ZMHBDA-CLbniYO1.js @@ -1,9 +1,9 @@ -import{_ as s,T as xt,U as kt,v as _t,j as U,d as bt,l as T,V as vt,W as wt,X as St,Y as Et}from"./md-index-BVqvVggs.js";import{d as nt}from"./md-arc-Bq1t1uZ8.js";var X=function(){var n=s(function(f,i,a,d){for(a=a||{},d=f.length;d--;a[f[d]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],h=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,d,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var d=new Error(i);throw d.hash=a,d}},"parseError"),parse:s(function(i){var a=this,d=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,P=0,B=2,J=1,O=o.slice.call(arguments,1),_=Object.create(this.lexer),E={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(E.yy[v]=this.yy[v]);_.setInput(i,E.yy),E.yy.lexer=_,E.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var L=_.yylloc;o.push(L);var A=_.options&&_.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(I){d.length=d.length-2*I,y.length=y.length-I,o.length=o.length-I}s(R,"popStack");function F(){var I;return I=u.pop()||_.lex()||J,typeof I!="number"&&(I instanceof Array&&(u=I,I=u.pop()),I=a.symbols_[I]||I),I}s(F,"lex");for(var w,C,N,K,V={},j,$,et,G;;){if(C=d[d.length-1],this.defaultActions[C]?N=this.defaultActions[C]:((w===null||typeof w>"u")&&(w=F()),N=S[C]&&S[C][w]),typeof N>"u"||!N.length||!N[0]){var Q="";G=[];for(j in S[C])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");_.showPosition?Q="Parse error on line "+(M+1)+`: -`+_.showPosition()+` -Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:_.match,token:this.terminals_[w]||w,line:_.yylineno,loc:L,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+w);switch(N[0]){case 1:d.push(w),y.push(_.yytext),o.push(_.yylloc),d.push(N[1]),w=null,P=_.yyleng,k=_.yytext,M=_.yylineno,L=_.yylloc;break;case 2:if($=this.productions_[N[1]][1],V.$=y[y.length-$],V._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},A&&(V._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(V,[k,P,M,E.yy,N[1],y,o].concat(O)),typeof K<"u")return K;$&&(d=d.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),d.push(this.productions_[N[1]][0]),y.push(V.$),o.push(V._$),et=S[d[d.length-2]][d[d.length-1]],d.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,d){if(this.yy.parser)this.yy.parser.parseError(a,d);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,d=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +import{_ as s,c as xt,l as T,d as U,T as kt,U as vt,V as _t,W as bt,X as wt,Y as St,v as Et}from"./md-index-B8Nim9kS.js";import{d as nt}from"./md-arc-T7NRJmXm.js";var X=function(){var n=s(function(f,i,a,d){for(a=a||{},d=f.length;d--;a[f[d]]=i);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],r=[1,11],h=[1,12],c=[1,13],g=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(i,a,d,u,y,o,S){var k=o.length-1;switch(y){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 15:u.addTask(o[k],0,""),this.$=o[k];break;case 16:u.addEvent(o[k].substr(2)),this.$=o[k];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:r,16:h,17:c,18:14,19:15,20:g,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(i,a){if(a.recoverable)this.trace(i);else{var d=new Error(i);throw d.hash=a,d}},"parseError"),parse:s(function(i){var a=this,d=[0],u=[],y=[null],o=[],S=this.table,k="",M=0,P=0,B=2,J=1,O=o.slice.call(arguments,1),v=Object.create(this.lexer),E={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(E.yy[b]=this.yy[b]);v.setInput(i,E.yy),E.yy.lexer=v,E.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var L=v.yylloc;o.push(L);var A=v.options&&v.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(I){d.length=d.length-2*I,y.length=y.length-I,o.length=o.length-I}s(R,"popStack");function F(){var I;return I=u.pop()||v.lex()||J,typeof I!="number"&&(I instanceof Array&&(u=I,I=u.pop()),I=a.symbols_[I]||I),I}s(F,"lex");for(var w,C,N,K,V={},j,$,et,G;;){if(C=d[d.length-1],this.defaultActions[C]?N=this.defaultActions[C]:((w===null||typeof w>"u")&&(w=F()),N=S[C]&&S[C][w]),typeof N>"u"||!N.length||!N[0]){var Q="";G=[];for(j in S[C])this.terminals_[j]&&j>B&&G.push("'"+this.terminals_[j]+"'");v.showPosition?Q="Parse error on line "+(M+1)+`: +`+v.showPosition()+` +Expecting `+G.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Q="Parse error on line "+(M+1)+": Unexpected "+(w==J?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Q,{text:v.match,token:this.terminals_[w]||w,line:v.yylineno,loc:L,expected:G})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+C+", token: "+w);switch(N[0]){case 1:d.push(w),y.push(v.yytext),o.push(v.yylloc),d.push(N[1]),w=null,P=v.yyleng,k=v.yytext,M=v.yylineno,L=v.yylloc;break;case 2:if($=this.productions_[N[1]][1],V.$=y[y.length-$],V._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},A&&(V._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),K=this.performAction.apply(V,[k,P,M,E.yy,N[1],y,o].concat(O)),typeof K<"u")return K;$&&(d=d.slice(0,-1*$*2),y=y.slice(0,-1*$),o=o.slice(0,-1*$)),d.push(this.productions_[N[1]][0]),y.push(V.$),o.push(V._$),et=S[d[d.length-2]][d[d.length-1]],d.push(et);break;case 3:return!0}}return!0},"parse")},x=function(){var f={EOF:1,parseError:s(function(a,d){if(this.yy.parser)this.yy.parser.parseError(a,d);else throw new Error(a)},"parseError"),setInput:s(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:s(function(i){var a=i.length,d=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1&&(this.yylineno-=d.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(i){this.unput(this.match.slice(i))},"less"),pastInput:s(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` `+a+"^"},"showPosition"),test_match:s(function(i,a){var d,u,y;if(this.options.backtrack_lexer&&(y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(y.yylloc.range=this.yylloc.range.slice(0))),u=i[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],d=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var o in y)this[o]=y[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,d,u;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),o=0;oa[0].length)){if(a=d,u=o,this.options.backtrack_lexer){if(i=this.test_match(d,y[o]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,y[u]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var a=this.next();return a||this.lex()},"lex"),begin:s(function(a){this.conditionStack.push(a)},"begin"),popState:s(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,d,u,y){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f}();p.lexer=x;function b(){this.yy={}}return s(b,"Parser"),b.prototype=p,p.Parser=b,new b}();X.parser=X;var Tt=X,at={};xt(at,{addEvent:()=>yt,addSection:()=>ht,addTask:()=>pt,addTaskOrg:()=>gt,clear:()=>ct,default:()=>It,getCommonDb:()=>ot,getSections:()=>dt,getTasks:()=>ut});var z="",lt=0,Y=[],q=[],W=[],ot=s(()=>kt,"getCommonDb"),ct=s(function(){Y.length=0,q.length=0,z="",W.length=0,_t()},"clear"),ht=s(function(n){z=n,Y.push(n)},"addSection"),dt=s(function(){return Y},"getSections"),ut=s(function(){let n=rt();const t=100;let e=0;for(;!n&&ee.id===lt-1).events.push(n)},"addEvent"),gt=s(function(n){const t={section:z,type:z,description:n,task:n,classes:[]};q.push(t)},"addTaskOrg"),rt=s(function(){const n=s(function(e){return W[e].processed},"compileTask");let t=!0;for(const[e,l]of W.entries())n(e),t=t&&l.processed;return t},"compileTasks"),It={clear:ct,getCommonDb:ot,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt},Nt=12,Z=s(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Lt=s(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=n.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(m){const p=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(h,"smile");function c(m){const p=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(c,"sad");function g(m){m.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(g,"ambivalent"),t.score>3?h(r):t.score<3?c(r):g(r),l},"drawFace"),Mt=s(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ft=s(function(n,t){const e=t.text.replace(//gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const r=l.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(e),l},"drawText"),$t=s(function(n,t){function e(r,h,c,g,m){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+g-m)+" "+(r+c-m*1.2)+","+(h+g)+" "+r+","+(h+g)}s(e,"genPoints");const l=n.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},"drawLabel"),Pt=s(function(n,t,e){const l=n.append("g"),r=D();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=e.width,r.height=e.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,Z(l,r),mt(e)(t.text,l,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),it=-1,At=s(function(n,t,e){const l=t.x+e.width/2,r=n.append("g");it++;const h=300+5*30;r.append("line").attr("id","task"+it).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(r,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=D();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,Z(r,c),mt(e)(t.task,r,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),Ct=s(function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ht=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),D=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt=function(){function n(r,h,c,g,m,p,x,b){const f=h.append("text").attr("x",c+m/2).attr("y",g+p/2+5).style("font-color",b).style("text-anchor","middle").text(r);l(f,x)}s(n,"byText");function t(r,h,c,g,m,p,x,b,f){const{taskFontSize:i,taskFontFamily:a}=b,d=r.split(//gi);for(let u=0;u)/).reverse(),r,h=[],c=1.1,g=e.attr("y"),m=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",m+"em");for(let x=0;xt||r==="
")&&(h.pop(),p.text(h.join(" ").trim()),r==="
"?h=[""]:h=[r],p=e.append("tspan").attr("x",0).attr("y",g).attr("dy",c+"em").text(r))})}s(tt,"wrap");var Ft=s(function(n,t,e,l){var b;const r=e%Nt-1,h=n.append("g");t.section=r,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+r));const c=h.append("g"),g=h.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),x=(b=l.fontSize)!=null&&b.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+x*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),zt(c,t,r,l),t},"drawNode"),Vt=s(function(n,t,e){var g;const l=n.append("g"),h=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),c=(g=e.fontSize)!=null&&g.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),zt=s(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:Z,drawCircle:Mt,drawSection:Pt,drawText:ft,drawLabel:$t,drawTask:At,drawBackgroundRect:Ct,getTextObj:Ht,getNoteRect:D,initGraphics:Rt,drawNode:Ft,getVirtualNodeHeight:Vt},Wt=s(function(n,t,e,l){var O,_;const r=bt(),h=r.leftMargin??50;T.debug("timeline",l.db);const c=r.securityLevel;let g;c==="sandbox"&&(g=U("#i"+t));const p=(c==="sandbox"?U(g.nodes()[0].contentDocument.body):U("body")).select("#"+t);p.append("g");const x=l.db.getTasks(),b=l.db.getCommonDb().getDiagramTitle();T.debug("task",x),H.initGraphics(p);const f=l.db.getSections();T.debug("sections",f);let i=0,a=0,d=0,u=0,y=50+h,o=50;u=50;let S=0,k=!0;f.forEach(function(E){const v={number:S,descr:E,section:S,width:150,padding:20,maxHeight:i},L=H.getVirtualNodeHeight(p,v,r);T.debug("sectionHeight before draw",L),i=Math.max(i,L+20)});let M=0,P=0;T.debug("tasks.length",x.length);for(const[E,v]of x.entries()){const L={number:E,descr:v,section:v.section,width:150,padding:20,maxHeight:a},A=H.getVirtualNodeHeight(p,L,r);T.debug("taskHeight before draw",A),a=Math.max(a,A+20),M=Math.max(M,v.events.length);let R=0;for(const F of v.events){const w={descr:F,section:v.section,number:v.section,width:150,padding:20,maxHeight:50};R+=H.getVirtualNodeHeight(p,w,r)}P=Math.max(P,R)}T.debug("maxSectionHeight before draw",i),T.debug("maxTaskHeight before draw",a),f&&f.length>0?f.forEach(E=>{const v=x.filter(F=>F.section===E),L={number:S,descr:E,section:S,width:200*Math.max(v.length,1)-50,padding:20,maxHeight:i};T.debug("sectionNode",L);const A=p.append("g"),R=H.drawNode(A,L,S,r);T.debug("sectionNode output",R),A.attr("transform",`translate(${y}, ${u})`),o+=i+50,v.length>0&&st(p,v,S,y,o,a,r,M,P,i,!1),y+=200*Math.max(v.length,1),o=u,S++}):(k=!1,st(p,x,S,y,o,a,r,M,P,i,!0));const B=p.node().getBBox();T.debug("bounds",B),b&&p.append("text").text(b).attr("x",B.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=k?i+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",h).attr("y1",d).attr("x2",B.width+3*h).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),vt(void 0,p,((O=r.timeline)==null?void 0:O.padding)??50,((_=r.timeline)==null?void 0:_.useMaxWidth)??!1)},"draw"),st=s(function(n,t,e,l,r,h,c,g,m,p,x){var b;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};T.debug("taskNode",i);const a=n.append("g").attr("class","taskWrapper"),u=H.drawNode(a,i,e,c).height;if(T.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${r})`),h=Math.max(h,u),f.events){const y=n.append("g").attr("class","lineWrapper");let o=h;r+=100,o=o+Bt(n,f.events,e,l,r,c),r-=100,y.append("line").attr("x1",l+190/2).attr("y1",r+h).attr("x2",l+190/2).attr("y2",r+h+(x?h:p)+m+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,x&&!((b=c.timeline)!=null&&b.disableMulticolor)&&e++}r=r-10},"drawTasks"),Bt=s(function(n,t,e,l,r,h){let c=0;const g=r;r=r+100;for(const m of t){const p={descr:m,section:e,number:e,width:150,padding:20,maxHeight:50};T.debug("eventNode",p);const x=n.append("g").attr("class","eventWrapper"),f=H.drawNode(x,p,e,h).height;c=c+f,x.attr("transform",`translate(${l}, ${r})`),r=r+10+f}return r=g,c},"drawEvents"),Ot={setConf:s(()=>{},"setConf"),draw:Wt},jt=s(n=>{let t="";for(let e=0;e0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,d,u,y){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return f}();p.lexer=x;function _(){this.yy={}}return s(_,"Parser"),_.prototype=p,p.Parser=_,new _}();X.parser=X;var Tt=X,at={};wt(at,{addEvent:()=>yt,addSection:()=>ht,addTask:()=>pt,addTaskOrg:()=>gt,clear:()=>ct,default:()=>It,getCommonDb:()=>ot,getSections:()=>dt,getTasks:()=>ut});var z="",lt=0,Y=[],q=[],W=[],ot=s(()=>St,"getCommonDb"),ct=s(function(){Y.length=0,q.length=0,z="",W.length=0,Et()},"clear"),ht=s(function(n){z=n,Y.push(n)},"addSection"),dt=s(function(){return Y},"getSections"),ut=s(function(){let n=rt();const t=100;let e=0;for(;!n&&ee.id===lt-1).events.push(n)},"addEvent"),gt=s(function(n){const t={section:z,type:z,description:n,task:n,classes:[]};q.push(t)},"addTaskOrg"),rt=s(function(){const n=s(function(e){return W[e].processed},"compileTask");let t=!0;for(const[e,l]of W.entries())n(e),t=t&&l.processed;return t},"compileTasks"),It={clear:ct,getCommonDb:ot,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt},Nt=12,Z=s(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Lt=s(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=n.append("g");r.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function h(m){const p=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(h,"smile");function c(m){const p=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(c,"sad");function g(m){m.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(g,"ambivalent"),t.score>3?h(r):t.score<3?c(r):g(r),l},"drawFace"),Mt=s(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ft=s(function(n,t){const e=t.text.replace(//gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const r=l.append("tspan");return r.attr("x",t.x+t.textMargin*2),r.text(e),l},"drawText"),$t=s(function(n,t){function e(r,h,c,g,m){return r+","+h+" "+(r+c)+","+h+" "+(r+c)+","+(h+g-m)+" "+(r+c-m*1.2)+","+(h+g)+" "+r+","+(h+g)}s(e,"genPoints");const l=n.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},"drawLabel"),Pt=s(function(n,t,e){const l=n.append("g"),r=D();r.x=t.x,r.y=t.y,r.fill=t.fill,r.width=e.width,r.height=e.height,r.class="journey-section section-type-"+t.num,r.rx=3,r.ry=3,Z(l,r),mt(e)(t.text,l,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),it=-1,At=s(function(n,t,e){const l=t.x+e.width/2,r=n.append("g");it++;const h=300+5*30;r.append("line").attr("id","task"+it).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",h).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(r,{cx:l,cy:300+(5-t.score)*30,score:t.score});const c=D();c.x=t.x,c.y=t.y,c.fill=t.fill,c.width=e.width,c.height=e.height,c.class="task task-type-"+t.num,c.rx=3,c.ry=3,Z(r,c),mt(e)(t.task,r,c.x,c.y,c.width,c.height,{class:"task"},e,t.colour)},"drawTask"),Ct=s(function(n,t){Z(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ht=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),D=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt=function(){function n(r,h,c,g,m,p,x,_){const f=h.append("text").attr("x",c+m/2).attr("y",g+p/2+5).style("font-color",_).style("text-anchor","middle").text(r);l(f,x)}s(n,"byText");function t(r,h,c,g,m,p,x,_,f){const{taskFontSize:i,taskFontFamily:a}=_,d=r.split(//gi);for(let u=0;u)/).reverse(),r,h=[],c=1.1,g=e.attr("y"),m=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",g).attr("dy",m+"em");for(let x=0;xt||r==="
")&&(h.pop(),p.text(h.join(" ").trim()),r==="
"?h=[""]:h=[r],p=e.append("tspan").attr("x",0).attr("y",g).attr("dy",c+"em").text(r))})}s(tt,"wrap");var Ft=s(function(n,t,e,l){var _;const r=e%Nt-1,h=n.append("g");t.section=r,h.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+r));const c=h.append("g"),g=h.append("g"),p=g.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),x=(_=l.fontSize)!=null&&_.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+x*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,g.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),zt(c,t,r,l),t},"drawNode"),Vt=s(function(n,t,e){var g;const l=n.append("g"),h=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(tt,t.width).node().getBBox(),c=(g=e.fontSize)!=null&&g.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),h.height+c*1.1*.5+t.padding},"getVirtualNodeHeight"),zt=s(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+2*5} q0,-5 5,-5 h${t.width-2*5} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),H={drawRect:Z,drawCircle:Mt,drawSection:Pt,drawText:ft,drawLabel:$t,drawTask:At,drawBackgroundRect:Ct,getTextObj:Ht,getNoteRect:D,initGraphics:Rt,drawNode:Ft,getVirtualNodeHeight:Vt},Wt=s(function(n,t,e,l){var O,v;const r=xt(),h=r.leftMargin??50;T.debug("timeline",l.db);const c=r.securityLevel;let g;c==="sandbox"&&(g=U("#i"+t));const p=(c==="sandbox"?U(g.nodes()[0].contentDocument.body):U("body")).select("#"+t);p.append("g");const x=l.db.getTasks(),_=l.db.getCommonDb().getDiagramTitle();T.debug("task",x),H.initGraphics(p);const f=l.db.getSections();T.debug("sections",f);let i=0,a=0,d=0,u=0,y=50+h,o=50;u=50;let S=0,k=!0;f.forEach(function(E){const b={number:S,descr:E,section:S,width:150,padding:20,maxHeight:i},L=H.getVirtualNodeHeight(p,b,r);T.debug("sectionHeight before draw",L),i=Math.max(i,L+20)});let M=0,P=0;T.debug("tasks.length",x.length);for(const[E,b]of x.entries()){const L={number:E,descr:b,section:b.section,width:150,padding:20,maxHeight:a},A=H.getVirtualNodeHeight(p,L,r);T.debug("taskHeight before draw",A),a=Math.max(a,A+20),M=Math.max(M,b.events.length);let R=0;for(const F of b.events){const w={descr:F,section:b.section,number:b.section,width:150,padding:20,maxHeight:50};R+=H.getVirtualNodeHeight(p,w,r)}P=Math.max(P,R)}T.debug("maxSectionHeight before draw",i),T.debug("maxTaskHeight before draw",a),f&&f.length>0?f.forEach(E=>{const b=x.filter(F=>F.section===E),L={number:S,descr:E,section:S,width:200*Math.max(b.length,1)-50,padding:20,maxHeight:i};T.debug("sectionNode",L);const A=p.append("g"),R=H.drawNode(A,L,S,r);T.debug("sectionNode output",R),A.attr("transform",`translate(${y}, ${u})`),o+=i+50,b.length>0&&st(p,b,S,y,o,a,r,M,P,i,!1),y+=200*Math.max(b.length,1),o=u,S++}):(k=!1,st(p,x,S,y,o,a,r,M,P,i,!0));const B=p.node().getBBox();T.debug("bounds",B),_&&p.append("text").text(_).attr("x",B.width/2-h).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),d=k?i+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",h).attr("y1",d).attr("x2",B.width+3*h).attr("y2",d).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),kt(void 0,p,((O=r.timeline)==null?void 0:O.padding)??50,((v=r.timeline)==null?void 0:v.useMaxWidth)??!1)},"draw"),st=s(function(n,t,e,l,r,h,c,g,m,p,x){var _;for(const f of t){const i={descr:f.task,section:e,number:e,width:150,padding:20,maxHeight:h};T.debug("taskNode",i);const a=n.append("g").attr("class","taskWrapper"),u=H.drawNode(a,i,e,c).height;if(T.debug("taskHeight after draw",u),a.attr("transform",`translate(${l}, ${r})`),h=Math.max(h,u),f.events){const y=n.append("g").attr("class","lineWrapper");let o=h;r+=100,o=o+Bt(n,f.events,e,l,r,c),r-=100,y.append("line").attr("x1",l+190/2).attr("y1",r+h).attr("x2",l+190/2).attr("y2",r+h+(x?h:p)+m+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,x&&!((_=c.timeline)!=null&&_.disableMulticolor)&&e++}r=r-10},"drawTasks"),Bt=s(function(n,t,e,l,r,h){let c=0;const g=r;r=r+100;for(const m of t){const p={descr:m,section:e,number:e,width:150,padding:20,maxHeight:50};T.debug("eventNode",p);const x=n.append("g").attr("class","eventWrapper"),f=H.drawNode(x,p,e,h).height;c=c+f,x.attr("transform",`translate(${l}, ${r})`),r=r+10+f}return r=g,c},"drawEvents"),Ot={setConf:s(()=>{},"setConf"),draw:Wt},jt=s(n=>{let t="";for(let e=0;e"u"&&(T.yylloc={});var gt=T.yylloc;r.push(gt);var li=T.options&&T.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(L){g.length=g.length-2*L,A.length=A.length-L,r.length=r.length-L}a(ci,"popStack");function Mt(){var L;return L=x.pop()||T.lex()||It,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=c.symbols_[L]||L),L}a(Mt,"lex");for(var P,O,M,xt,z={},at,V,Vt,rt;;){if(O=g[g.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((P===null||typeof P>"u")&&(P=Mt()),M=Z[O]&&Z[O][P]),typeof M>"u"||!M.length||!M[0]){var dt="";rt=[];for(at in Z[O])this.terminals_[at]&&at>oi&&rt.push("'"+this.terminals_[at]+"'");T.showPosition?dt="Parse error on line "+(nt+1)+`: +import{_ as a,s as ui,g as gi,n as Ft,o as xi,a as di,b as pi,l as Xt,G as fi,e as mi,v as yi,D as At,C as Nt,E as bi,I as Ai,i as wi,aF as Ci,K as Bt}from"./md-index-B8Nim9kS.js";import{i as Si}from"./md-init-Gi6I4Gst.js";import{o as _i}from"./md-ordinal-CxVaQH2l.js";import{l as Wt}from"./md-linear-C1jk9ODm.js";function ki(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s"u"&&(T.yylloc={});var gt=T.yylloc;r.push(gt);var li=T.options&&T.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ci(L){g.length=g.length-2*L,A.length=A.length-L,r.length=r.length-L}a(ci,"popStack");function Mt(){var L;return L=x.pop()||T.lex()||It,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=c.symbols_[L]||L),L}a(Mt,"lex");for(var P,O,M,xt,z={},at,V,Vt,rt;;){if(O=g[g.length-1],this.defaultActions[O]?M=this.defaultActions[O]:((P===null||typeof P>"u")&&(P=Mt()),M=Z[O]&&Z[O][P]),typeof M>"u"||!M.length||!M[0]){var dt="";rt=[];for(at in Z[O])this.terminals_[at]&&at>oi&&rt.push("'"+this.terminals_[at]+"'");T.showPosition?dt="Parse error on line "+(nt+1)+`: `+T.showPosition()+` Expecting `+rt.join(", ")+", got '"+(this.terminals_[P]||P)+"'":dt="Parse error on line "+(nt+1)+": Unexpected "+(P==It?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(dt,{text:T.match,token:this.terminals_[P]||P,line:T.yylineno,loc:gt,expected:rt})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+P);switch(M[0]){case 1:g.push(P),A.push(T.yytext),r.push(T.yylloc),g.push(M[1]),P=null,Et=T.yyleng,d=T.yytext,nt=T.yylineno,gt=T.yylloc;break;case 2:if(V=this.productions_[M[1]][1],z.$=A[A.length-V],z._$={first_line:r[r.length-(V||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(V||1)].first_column,last_column:r[r.length-1].last_column},li&&(z._$.range=[r[r.length-(V||1)].range[0],r[r.length-1].range[1]]),xt=this.performAction.apply(z,[d,Et,nt,W.yy,M[1],A,r].concat(hi)),typeof xt<"u")return xt;V&&(g=g.slice(0,-1*V*2),A=A.slice(0,-1*V),r=r.slice(0,-1*V)),g.push(this.productions_[M[1]][0]),A.push(z.$),r.push(z._$),Vt=Z[g[g.length-2]][g[g.length-1]],g.push(Vt);break;case 3:return!0}}return!0},"parse")},ri=function(){var B={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var A=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+` `+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,A;if(this.options.backtrack_lexer&&(A={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(A.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in A)this[r]=A[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),r=0;rc[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,A[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,A[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,A){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();ct.lexer=ri;function st(){this.yy={}}return a(st,"Parser"),st.prototype=ct,ct.Parser=st,new st}();ft.parser=ft;var Ri=ft;function mt(e){return e.type==="bar"}a(mt,"isBarPlot");function wt(e){return e.type==="band"}a(wt,"isBandAxisData");function F(e){return e.type==="linear"}a(F,"isLinearAxisData");var X,Yt=(X=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=ui(n,1,o),f=u?u.width:o.length*i,p=u?u.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,p)}return n.remove(),s}},a(X,"TextDimensionCalculatorWithFont"),X),Ot=.7,zt=.2,N,Ht=(N=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(N,"BaseAxis"),N),Y,Ti=(Y=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=pt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Ft.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Y,"BandAxis"),Y),H,Di=(H=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=Wt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Wt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(H,"LinearAxis"),H);function yt(e,t,i,s){const n=new Yt(s);return wt(e)?new Ti(t,i,e.categories,e.title,n):new Di(t,i,[e.min,e.max],e.title,n)}a(yt,"getAxis");var U,vi=(U=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(U,"ChartTitle"),U);function Ut(e,t,i,s){const n=new Yt(s);return new vi(n,e,t,i)}a(Ut,"getChartTitleComponent");var $,Pi=($=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Bt().y(s=>s[0]).x(s=>s[1])(t):i=Bt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a($,"LinePlot"),$),q,Li=(q=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(q,"BarPlot"),q),G,Ei=(G=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Pi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Li(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(G,"BasePlot"),G);function $t(e,t,i){return new Ei(e,t,i)}a($t,"getPlotComponent");var j,Ii=(j=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ut(t,i,s,n),plot:$t(t,i,s),xAxis:yt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:yt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:o,height:u});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(p=>mt(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:u,height:f});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,n=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,o=s+p.height,t>0&&(u+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(k=>mt(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(j,"Orchestrator"),j),Q,Mi=(Q=class{static build(t,i,s,n){return new Ii(t,i,s,n).getDrawableElement()}},a(Q,"XYChartBuilder"),Q),J=0,qt,tt=_t(),it=St(),b=kt(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1;function St(){const e=gi(),t=At();return Xt(e.xyChart,t.themeVariables.xyChart)}a(St,"getChartDefaultThemeConfig");function _t(){const e=At();return Xt(xi.xyChart,e.xyChart)}a(_t,"getChartDefaultConfig");function kt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(kt,"getChartDefaultData");function ht(e){const t=At();return di(e.trim(),t)}a(ht,"textSanitizer");function Gt(e){qt=e}a(Gt,"setTmpSVGG");function jt(e){e==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}a(jt,"setOrientation");function Qt(e){b.xAxis.title=ht(e.text)}a(Qt,"setXAxisTitle");function Rt(e,t){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:t},ot=!0}a(Rt,"setXAxisRangeData");function Kt(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map(t=>ht(t.text))},ot=!0}a(Kt,"setXAxisBand");function Zt(e){b.yAxis.title=ht(e.text)}a(Zt,"setYAxisTitle");function Jt(e,t){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:t},Ct=!0}a(Jt,"setYAxisRangeData");function ti(e){const t=Math.min(...e),i=Math.max(...e),s=F(b.yAxis)?b.yAxis.min:1/0,n=F(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ti,"setYAxisRangeFromPlotData");function Tt(e){let t=[];if(e.length===0)return t;if(!ot){const i=F(b.xAxis)?b.xAxis.min:1/0,s=F(b.xAxis)?b.xAxis.max:-1/0;Rt(Math.min(i,1),Math.max(s,e.length))}if(Ct||ti(e),wt(b.xAxis)&&(t=b.xAxis.categories.map((i,s)=>[i,e[s]])),F(b.xAxis)){const i=b.xAxis.min,s=b.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,f)=>[u,e[f]])}return t}a(Tt,"transformDataWithoutCategory");function Dt(e){return bt[e===0?0:e%bt.length]}a(Dt,"getPlotColorFromPalette");function ii(e,t){const i=Tt(t);b.plots.push({type:"line",strokeFill:Dt(J),strokeWidth:2,data:i}),J++}a(ii,"setLineData");function ei(e,t){const i=Tt(t);b.plots.push({type:"bar",fill:Dt(J),data:i}),J++}a(ei,"setBarData");function si(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=Nt(),Mi.build(tt,b,it,qt)}a(si,"getDrawableElem");function ni(){return it}a(ni,"getChartThemeConfig");function ai(){return tt}a(ai,"getChartConfig");var Vi=a(function(){Ai(),J=0,tt=_t(),b=kt(),it=St(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1},"clear"),Bi={getDrawableElem:si,clear:Vi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:mi,getDiagramTitle:Nt,getAccDescription:yi,setAccDescription:bi,setOrientation:jt,setXAxisTitle:Qt,setXAxisRangeData:Rt,setXAxisBand:Kt,setYAxisTitle:Zt,setYAxisRangeData:Jt,setLineData:ii,setBarData:ei,setTmpSVGG:Gt,getChartThemeConfig:ni,getChartConfig:ai},Wi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig();function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function p(m){return m==="left"?"start":m==="right"?"end":"middle"}a(p,"getTextAnchor");function k(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(k,"getTextTransformation"),Ft.debug(`Rendering xychart chart -`+e);const R=wi(t),w=R.append("g").attr("class","main"),y=w.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");Ci(R,u.height,u.width,!0),R.attr("viewBox",`0 0 ${u.width} ${u.height}`),y.attr("fill",o.backgroundColor),n.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),S={};function v(m){let _=w,l="";for(const[E]of m.entries()){let K=w;E>0&&S[l]&&(K=S[l]),l+=m[E],_=S[l],_||(_=S[l]=K.append("g").attr("class",m[E]))}return _}a(v,"getGroup");for(const m of D){if(m.data.length===0)continue;const _=v(m.groupTexts);switch(m.type){case"rect":_.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break;case"text":_.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>p(l.horizontalPos)).attr("transform",l=>k(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:Wi},Yi={parser:Ri,db:Bi,renderer:Oi};export{Yi as diagram}; +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,A){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 25:this.popState();break;case 26:this.pushState("string");break;case 27:this.popState();break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 43:break;case 44:return 35;case 45:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};return B}();ct.lexer=ri;function st(){this.yy={}}return a(st,"Parser"),st.prototype=ct,ct.Parser=st,new st}();ft.parser=ft;var Ri=ft;function mt(e){return e.type==="bar"}a(mt,"isBarPlot");function wt(e){return e.type==="band"}a(wt,"isBandAxisData");function F(e){return e.type==="linear"}a(F,"isLinearAxisData");var X,Yt=(X=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=Ci(n,1,o),f=u?u.width:o.length*i,p=u?u.height:i;s.width=Math.max(s.width,f),s.height=Math.max(s.height,p)}return n.remove(),s}},a(X,"TextDimensionCalculatorWithFont"),X),Ot=.7,zt=.2,N,Ht=(N=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=zt*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(N,"BaseAxis"),N),Y,Ti=(Y=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=pt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=pt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Xt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},a(Y,"BandAxis"),Y),H,Di=(H=class extends Ht{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=Wt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Wt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(H,"LinearAxis"),H);function yt(e,t,i,s){const n=new Yt(s);return wt(e)?new Ti(t,i,e.categories,e.title,n):new Di(t,i,[e.min,e.max],e.title,n)}a(yt,"getAxis");var U,vi=(U=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(U,"ChartTitle"),U);function Ut(e,t,i,s){const n=new Yt(s);return new vi(n,e,t,i)}a(Ut,"getChartTitleComponent");var $,Pi=($=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Bt().y(s=>s[0]).x(s=>s[1])(t):i=Bt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a($,"LinePlot"),$),G,Li=(G=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(G,"BarPlot"),G),q,Ei=(q=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Pi(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Li(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(q,"BasePlot"),q);function $t(e,t,i){return new Ei(e,t,i)}a($t,"getPlotComponent");var j,Ii=(j=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:Ut(t,i,s,n),plot:$t(t,i,s),xAxis:yt(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:yt(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:o,height:u});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("bottom"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=f.height,this.componentStore.yAxis.setAxisPosition("left"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=f.width,t-=f.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(p=>mt(p))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),f=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:u,height:f});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("left"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=p.width,n=p.width,this.componentStore.yAxis.setAxisPosition("top"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=p.height,o=s+p.height,t>0&&(u+=t,t=0),i>0&&(f+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:f}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+f]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(k=>mt(k))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(j,"Orchestrator"),j),Q,Mi=(Q=class{static build(t,i,s,n){return new Ii(t,i,s,n).getDrawableElement()}},a(Q,"XYChartBuilder"),Q),J=0,Gt,tt=_t(),it=St(),b=kt(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1;function St(){const e=Ai(),t=At();return Nt(e.xyChart,t.themeVariables.xyChart)}a(St,"getChartDefaultThemeConfig");function _t(){const e=At();return Nt(bi.xyChart,e.xyChart)}a(_t,"getChartDefaultConfig");function kt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(kt,"getChartDefaultData");function ht(e){const t=At();return wi(e.trim(),t)}a(ht,"textSanitizer");function qt(e){Gt=e}a(qt,"setTmpSVGG");function jt(e){e==="horizontal"?tt.chartOrientation="horizontal":tt.chartOrientation="vertical"}a(jt,"setOrientation");function Qt(e){b.xAxis.title=ht(e.text)}a(Qt,"setXAxisTitle");function Rt(e,t){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:t},ot=!0}a(Rt,"setXAxisRangeData");function Kt(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map(t=>ht(t.text))},ot=!0}a(Kt,"setXAxisBand");function Zt(e){b.yAxis.title=ht(e.text)}a(Zt,"setYAxisTitle");function Jt(e,t){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:t},Ct=!0}a(Jt,"setYAxisRangeData");function ti(e){const t=Math.min(...e),i=Math.max(...e),s=F(b.yAxis)?b.yAxis.min:1/0,n=F(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ti,"setYAxisRangeFromPlotData");function Tt(e){let t=[];if(e.length===0)return t;if(!ot){const i=F(b.xAxis)?b.xAxis.min:1/0,s=F(b.xAxis)?b.xAxis.max:-1/0;Rt(Math.min(i,1),Math.max(s,e.length))}if(Ct||ti(e),wt(b.xAxis)&&(t=b.xAxis.categories.map((i,s)=>[i,e[s]])),F(b.xAxis)){const i=b.xAxis.min,s=b.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,f)=>[u,e[f]])}return t}a(Tt,"transformDataWithoutCategory");function Dt(e){return bt[e===0?0:e%bt.length]}a(Dt,"getPlotColorFromPalette");function ii(e,t){const i=Tt(t);b.plots.push({type:"line",strokeFill:Dt(J),strokeWidth:2,data:i}),J++}a(ii,"setLineData");function ei(e,t){const i=Tt(t);b.plots.push({type:"bar",fill:Dt(J),data:i}),J++}a(ei,"setBarData");function si(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=Ft(),Mi.build(tt,b,it,Gt)}a(si,"getDrawableElem");function ni(){return it}a(ni,"getChartThemeConfig");function ai(){return tt}a(ai,"getChartConfig");var Vi=a(function(){yi(),J=0,tt=_t(),b=kt(),it=St(),bt=it.plotColorPalette.split(",").map(e=>e.trim()),ot=!1,Ct=!1},"clear"),Bi={getDrawableElem:si,clear:Vi,setAccTitle:pi,getAccTitle:di,setDiagramTitle:xi,getDiagramTitle:Ft,getAccDescription:gi,setAccDescription:ui,setOrientation:jt,setXAxisTitle:Qt,setXAxisRangeData:Rt,setXAxisBand:Kt,setYAxisTitle:Zt,setYAxisRangeData:Jt,setLineData:ii,setBarData:ei,setTmpSVGG:qt,getChartThemeConfig:ni,getChartConfig:ai},Wi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig();function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function p(m){return m==="left"?"start":m==="right"?"end":"middle"}a(p,"getTextAnchor");function k(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(k,"getTextTransformation"),Xt.debug(`Rendering xychart chart +`+e);const R=fi(t),w=R.append("g").attr("class","main"),y=w.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");mi(R,u.height,u.width,!0),R.attr("viewBox",`0 0 ${u.width} ${u.height}`),y.attr("fill",o.backgroundColor),n.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));const D=n.getDrawableElem(),S={};function v(m){let _=w,l="";for(const[E]of m.entries()){let K=w;E>0&&S[l]&&(K=S[l]),l+=m[E],_=S[l],_||(_=S[l]=K.append("g").attr("class",m[E]))}return _}a(v,"getGroup");for(const m of D){if(m.data.length===0)continue;const _=v(m.groupTexts);switch(m.type){case"rect":_.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break;case"text":_.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>p(l.horizontalPos)).attr("transform",l=>k(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:Wi},Yi={parser:Ri,db:Bi,renderer:Oi};export{Yi as diagram};