2024-09-10 17:08:28 +08:00
import { an as Li } from "./index-BNQ7kc3h.js" ; function We ( r ) { "@babel/helpers - typeof" ; return We = 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 } , We ( r ) } function ai ( r , e ) { if ( ! ( r instanceof e ) ) throw new TypeError ( "Cannot call a class as a function" ) } function qu ( r , e ) { for ( var t = 0 ; t < e . length ; t ++ ) { var a = e [ t ] ; a . enumerable = a . enumerable || ! 1 , a . configurable = ! 0 , "value" in a && ( a . writable = ! 0 ) , Object . defineProperty ( r , a . key , a ) } } function ni ( r , e , t ) { return e && qu ( r . prototype , e ) , Object . defineProperty ( r , "prototype" , { writable : ! 1 } ) , r } function Uo ( r , e , t ) { return e in r ? Object . defineProperty ( r , e , { value : t , enumerable : ! 0 , configurable : ! 0 , writable : ! 0 } ) : r [ e ] = t , r } function Tr ( r , e ) { return $u ( r ) || Hu ( r , e ) || Yo ( r , e ) || Gu ( ) } function $u ( r ) { if ( Array . isArray ( r ) ) return r } function Hu ( r , e ) { var t = r == null ? null : typeof Symbol < "u" && r [ Symbol . iterator ] || r [ "@@iterator" ] ; if ( t != null ) { var a = [ ] , n = ! 0 , i = ! 1 , o , s ; try { for ( t = t . call ( r ) ; ! ( n = ( o = t . next ( ) ) . done ) && ( a . push ( o . value ) , ! ( e && a . length === e ) ) ; n = ! 0 ) ; } catch ( l ) { i = ! 0 , s = l } finally { try { ! n && t . return != null && t . return ( ) } finally { if ( i ) throw s } } return a } } function Yo ( r , e ) { if ( r ) { if ( typeof r == "string" ) return Ai ( r , e ) ; var t = Object . prototype . toString . call ( r ) . slice ( 8 , - 1 ) ; if ( t === "Object" && r . constructor && ( t = r . constructor . name ) , t === "Map" || t === "Set" ) return Array . from ( r ) ; if ( t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/ . test ( t ) ) return Ai ( r , e ) } } function Ai ( r , e ) { ( e == null || e > r . length ) && ( e = r . length ) ; for ( var t = 0 , a = new Array ( e ) ; t < e ; t ++ ) a [ t ] = r [ t ] ; return a } function Gu ( ) { throw new TypeError ( ` Invalid attempt to destructure non-iterable instance.
2024-09-04 13:02:35 +08:00
In order to be iterable , non - array objects must have a [ Symbol . iterator ] ( ) method . ` )}function Xo(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=Yo(r))||e){t&&(r=t);var a=0,n=function(){};return{s:n,n:function(){return a>=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=!0,o=!1,s;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return i=l.done,l},e:function(l){o=!0,s=l},f:function(){try{!i&&t.return!=null&&t.return()}finally{if(o)throw s}}}}var Ge=typeof window>"u"?null:window,Ri=Ge?Ge.navigator:null;Ge&&Ge.document;var Ku=We(""),Zo=We({}),Wu=We(function(){}),Uu=typeof HTMLElement>"u"?"undefined":We(HTMLElement),ba=function(e){return e&&e.instanceString&&Fe(e.instanceString)?e.instanceString():null},de=function(e){return e!=null&&We(e)==Ku},Fe=function(e){return e!=null&&We(e)===Wu},Re=function(e){return!gr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Se=function(e){return e!=null&&We(e)===Zo&&!Re(e)&&e.constructor===Object},Yu=function(e){return e!=null&&We(e)===Zo},ne=function(e){return e!=null&&We(e)===We(1)&&!isNaN(e)},Xu=function(e){return ne(e)&&Math.floor(e)===e},Qa=function(e){if(Uu!=="undefined")return e!=null&&e instanceof HTMLElement},gr=function(e){return wa(e)||Qo(e)},wa=function(e){return ba(e)==="collection"&&e._private.single},Qo=function(e){return ba(e)==="collection"&&!e._private.single},ii=function(e){return ba(e)==="core"},Jo=function(e){return ba(e)==="stylesheet"},Zu=function(e){return ba(e)==="event"},Jr=function(e){return e==null?!0:!!(e===""||e.match(/^ \s + $ /))},Qu=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},Ju=function(e){return Se(e)&&ne(e.x1)&&ne(e.x2)&&ne(e.y1)&&ne(e.y2)},_u=function(e){return Yu(e)&&Fe(e.then)},ju=function(){return Ri&&Ri.userAgent.match(/msie|trident|edge/i)},ua=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join(" $ ")});var a=function n(){var i=this,o=arguments,s,l=t.apply(i,o),u=n.cache;return(s=u[l])||(s=u[l]=e.apply(i,o)),s};return a.cache={},a},oi=ua(function(r){return r.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),un=ua(function(r){return r.replace(/(- \w )/g,function(e){return e[1].toUpperCase()})}),_o=ua(function(r,e){return r+e[0].toUpperCase()+e.substring(1)},function(r,e){return r+" $ "+e}),Oi=function(e){return Jr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},Ke="(?:[-+]?(?:(?: \\ d+| \\ d* \\ . \\ d+)(?:[Ee][+-]? \\ d+)?))",el="rgb[a]? \\ (("+Ke+"[%]?) \\ s*, \\ s*("+Ke+"[%]?) \\ s*, \\ s*("+Ke+"[%]?)(?: \\ s*, \\ s*("+Ke+"))? \\ )",rl="rgb[a]? \\ ((?:"+Ke+"[%]?) \\ s*, \\ s*(?:"+Ke+"[%]?) \\ s*, \\ s*(?:"+Ke+"[%]?)(?: \\ s*, \\ s*(?:"+Ke+"))? \\ )",tl="hsl[a]? \\ (("+Ke+") \\ s*, \\ s*("+Ke+"[%]) \\ s*, \\ s*("+Ke+"[%])(?: \\ s*, \\ s*("+Ke+"))? \\ )",al="hsl[a]? \\ ((?:"+Ke+") \\ s*, \\ s*(?:"+Ke+"[%]) \\ s*, \\ s*(?:"+Ke+"[%])(?: \\ s*, \\ s*(?:"+Ke+"))? \\ )",nl=" \\ #[0-9a-fA-F]{3}",il=" \\ #[0-9a-fA-F]{6}",jo=function(e,t){return e<t?-1:e>t?1:0},ol=function(e,t){return-1*jo(e,t)},be=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t<e.length;t++){var a=e[t];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var o=n[i];r[o]=a[o]}}return r},sl=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var t=e.length===4,a,n,i,o=16;return t?(a=parseInt(e[1]+e[1],o),n=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(a=parseInt(e[1]+e[2],o),n=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[a,n,i]}},ul=function(e){var t,a,n,i,o,s,l,u;function v(d,y,p){return p<0&&(p+=1),p>1&&(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("^"+tl+" $ ").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,h=2*i-c;s=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))}t=[s,l,u,o]}return t},ll=function(e){var t,a=new RegExp("^"+el+" $ ").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))}v
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)
* / v a r S s = 0 , T s = 1 , D s = 2 , H r = f u n c t i o n r ( e ) { i f ( ! ( t h i s i n s t a n c e o f r ) ) r e t u r n n e w r ( e ) ; t h i s . i d = " T h e n a b l e / 1 . 0 . 7 " , t h i s . s t a t e = S s , t h i s . f u l f i l l V a l u e = v o i d 0 , t h i s . r e j e c t R e a s o n = v o i d 0 , t h i s . o n F u l f i l l e d = [ ] , t h i s . o n R e j e c t e d = [ ] , t h i s . p r o x y = { t h e n : t h i s . t h e n . b i n d ( t h i s ) } , t y p e o f e = = " f u n c t i o n " & & e . c a l l ( t h i s , t h i s . f u l f i l l . b i n d ( t h i s ) , t h i s . r e j e c t . b i n d ( t h i s ) ) } ; H r . p r o t o t y p e = { f u l f i l l : f u n c t i o n ( e ) { r e t u r n e o ( t h i s , T s , " f u l f i l l V a l u e " , e ) } , r e j e c t : f u n c t i o n ( e ) { r e t u r n e o ( t h i s , D s , " r e j e c t R e a s o n " , e ) } , t h e n : f u n c t i o n ( e , t ) { v a r a = t h i s , n = n e w H r ; r e t u r n a . o n F u l f i l l e d . p u s h ( t o ( e , n , " f u l f i l l " ) ) , a . o n R e j e c t e d . p u s h ( t o ( t , n , " r e j e c t " ) ) , k s ( a ) , n . p r o x y } } ; v a r e o = f u n c t i o n ( e , t , a , n ) { r e t u r n e . s t a t e = = = S s & & ( e . s t a t e = t , e [ a ] = n , k s ( e ) ) , e } , k s = f u n c t i o n ( e ) { e . s t a t e = = = T s ? r o ( e , " o n F u l f i l l e d " , e . f u l f i l l V a l u e ) : e . s t a t e = = = D s & & r o ( e , " o n R e j e c t e d " , e . r e j e c t R e a s o n ) } , r o = f u n c t i o n ( e , t , a ) { i f ( e [ t ] . l e n g t h ! = = 0 ) { v a r n = e [ t ] ; e [ t ] = [ ] ; v a r i = f u n c t i o n ( ) { f o r ( v a r s = 0 ; s < n . l e n g t h ; s + + ) n [ s ] ( a ) } ; t y p e o f s e t I m m e d i a t e = = " f u n c t i o n " ? s e t I m m e d i a t e ( i ) : s e t T i m e o u t ( i , 0 ) } } , t o = f u n c t i o n ( e , t , a ) { r e t u r n f u n c t i o n ( n ) { i f ( t y p e o f e ! = " f u n c t i o n " ) t [ a ] . c a l l ( t , n ) ; e l s e { v a r i ; t r y { i = e ( n ) } c a t c h ( o ) { t . r e j e c t ( o ) ; r e t u r n } F f ( t , i ) } } } , F f = f u n c t i o n r ( e , t ) { i f ( e = = = t | | e . p r o x y = = = t ) { e . r e j e c t ( n e w T y p e E r r o r ( " c a n n o t r e s o l v e p r o m i s e w i t h i t s e l f " ) ) ; r e t u r n } v a r a ; i f ( W e ( t ) = = = " o b j e c t " & & t ! = = n u l l | | t y p e o f t = = " f u n c t i o n " ) t r y { a = t . t h e n } c a t c h ( i ) { e . r e j e c t ( i ) ; r e t u r n } i f ( t y p e o f a = = " f u n c t i o n " ) { v a r n = ! 1 ; t r y { a . c a l l ( t , f u n c t i o n ( i ) { n | | ( n = ! 0 , i = = = t ? e . r e j e c t ( n e w T y p e E r r o r ( " c i r c u l a r t h e n a b l e c h a i n " ) ) : r ( e , i ) ) } , f u n c t i o n ( i ) { n | | ( n = ! 0 , e . r e j e c t ( i ) ) } ) } c a t c h ( i ) { n | | e . r e j e c t ( i ) } r e t u r n } e . f u l f i l l ( t ) } ; H r . a l l = f u n c t i o n ( r ) { r e t u r n n e w H r ( f u n c t i o n ( e , t ) { f o r ( v a r a = n e w A r r a y ( r . l e n g t h ) , n = 0 , i = f u n c t i o n ( l , u ) { a [ l ] = u , n + + , n = = = r . l e n g t h & & e ( a ) } , o = 0 ; o < r . l e n g t h ; o + + ) ( f u n c t i o n ( s ) { v a r l = r [ s ] , u = l ! = n u l l & & l . t h e n ! = n u l l ; i f ( u ) l . t h e n ( f u n c t i o n ( f ) { i ( s , f ) } , f u n c t i o n ( f ) { t ( f ) } ) ; e l s e { v a r v = l ; i ( s , v ) } } ) ( o ) } ) } ; H r . r e s o l v e = f u n c t i o n ( r ) { r e t u r n n e w H r ( f u n c t i o n ( e , t ) { e ( r ) } ) } ; H r . r e j e c t = f u n c t i o n ( r ) { r e t u r n n e w H r ( f u n c t i o n ( e , t ) { t ( r ) } ) } ; v a r V t = t y p e o f P r o m i s e < " u " ? P r o m i s e : H r , K n = f u n c t i o n ( e , t , a ) { v a r n = i i ( e ) , i = ! n , o = t h i s . _ p r i v a t e = b e ( { d u r a t i o n : 1 e 3 } , t , a ) ; i f ( o . t a r g e t = e , o . s t y l e = o . s t y l e | | o . c s s , o . s t a r t e d = ! 1 , o . p l a y i n g = ! 1 , o . h o o k e d = ! 1 , o . a p p l y i n g = ! 1 , o . p r o g r e s s = 0 , o . c o m p l e t e s = [ ] , o . f r a m e s = [ ] , o . c o m p l e t e & & F e ( o . c o m p l e t e ) & & o . c o m p l e t e s . p u s h ( o . c o m p l e t e ) , i ) { v a r s = e . p o s i t i o n ( ) ; o . s t a r t P o s i t i o n = o . s t a r t P o s i t i o n | | { x : s . x , y : s . y } , o . s t a r t S t y l e = o . s t a r t S t y l e | | e . c y ( ) . s t y l e ( ) . g e t A n i m a t i o n S t a r t S t y l e ( e , o . s t y l e ) } i f ( n ) { v a r l = e . p a n ( ) ; o . s t a r t P a n = { x : l . x , y : l . y } , o . s t a r t Z o o m = e . z o o m ( ) } t h i s . l e n g t h = 1 , t h i s [ 0 ] = t h i s } , h t = K n . p r o t o t y p e ; b e ( h t , { i n s t a n c e S t r i n g : f u n c t i o n ( ) { r e t u r n " a n i m a t i o n " } , h o o k : f u n c t i o n ( ) { v a r e = t h i s . _ p r i v a t e ; i f ( ! e . h o o k e d ) { v a r t , a = e . t a r g e t . _ p r i v a t e . a n i m a t i o n ; e . q u e u e ? t = a . q u e u e : t = a . c u r r e n t , t . p u s h ( t h i s ) , g r ( e . t a r g e t ) & & e . t a r g e t . c y ( ) . a d d T o A n i m a t i o n P o o l ( e . t a r g e t ) , e . h o o k e d = ! 0 } r e t u r n t h i s } , p l a y : f u n c t i o n ( ) { v a r e = t h i s . _ p r i v a t e ; r e t u r n e . p r o g r e s s = = = 1 & & ( e . p r o g r e s s = 0 ) , e . p l a y i n g = ! 0 , e . s t a r t e d = ! 1 , e . s t o p p e d = ! 1 , t h i s . h o o k ( ) , t h i s } , p l a y i n g : f u n c t i o n ( ) { r e t u r n t h i s . _ p r i v a t e . p l a y i n g } , a p p l y : f u n c t i o n ( ) { v a r e = t h i s . _ p r i v a t e ; r e t u r n e . a p p l y i n g = ! 0 , e . s t a r t e d = ! 1 , e . s t o p p e d = ! 1 , t h i s . h o o k ( ) , t h i s } , a p p l y i n g : f u n c t i o n ( ) { r e t u r n t h i s . _ p r i v a t e . a p p l y i n g } , p a u s e : f u n c t i o n ( ) { v a r e = t h i s . _ p r i v a t e ; r e t u r n e . p l a y i n g = ! 1 , e . s t a r t e d = ! 1 , t h i s } , s t o p : f u n c t i o n ( ) { v a r e = t h i s . _ p r i v a t e ; r e t u r n e . p l a y i n g = ! 1 , e . s t a r t e d = ! 1 , e . s t o p p e d = ! 0 , t h i s } , r e w i n d : f u n c t i o n ( ) { r e t u r n t h i s . p r o g r e s s ( 0 ) } , f a s t f o r w a r d : f u n c t i o n ( ) { r e t u r n t h i s . p r o g r e s s ( 1 ) } , t i m e : f u n c t i o n ( e ) { v a r t = t h i s . _ p r i v a t e ; r e t u r n e = = = v o i d 0 ? t . p r o g r e s s * t . d u r a t i o n : t h i s . p r o g r e s s ( e / t . d u r a t i o n ) } , p r o g r e s s : f u n c t i o n ( e ) { v a r t = t h i s . _ p r i v a t e , a = t . p l a y i n g ; r e t u r n e = = = v o i d 0 ? t . p r o g r e s s : ( a & & t h i s . p a u s e ( ) , t . p r o g r e s s = e , t . s t a r t e d = ! 1 , a & & t h i s . p l a y ( ) , t h i s ) } , c o m p l e t e d : f u n c t i o n ( ) { r e t u r n t h i s . _ p r i v a t e . p r o g r e s s = = = 1 } , r e v e r s e : f u n c t i o n ( ) { v a r e = t h i s . _ p r i v a t e , t = e . p l a y i n g ; t & & t h i s . p a u s e ( ) , e . p r o g r e s s = 1 - e . p r o g r e s s , e . s t a r t e d = ! 1 ; v a r a = f u n c t i o n ( u , v ) { v a r f = e [ u ] ; f ! = n u l l & & ( e [ u ] = e [ v ] , e [ v ] = f ) } ; i f ( a ( " z o o m " , " s t a r t Z o o m " ) , a ( " p a n " , " s t a r t P a n " ) , a ( " p o s i t i o n " , " s t a r t P o s i t i o n " ) , e . s t y l e ) f o r ( v a r n = 0 ; n < e . s t y l e . l e n g t h ; n + + ) { v a r i = e . s t y l e [ n ] , o = i . n a m e , s = e . s t a r t S t y l e [ o ] ; e . s t a r t S t y l e [ o ] = i , e . s t y l e [ n ] = s } r e t u r n t & & t h i s . p l a y ( ) , t h i s } , p r o m i s e : f u n c t i o n ( e ) { v a r t = t h i s . _ p r i v a t e , a ; s w i t c h ( e ) { c a s e " f r a m e " : a = t . f r a m e s ; b r e a k ; d e f a u l t :
Event object based on jQuery events , MIT license
https : //jquery.org/license/
https : //tldrlegal.com/license/mit-license
https : //github.com/jquery/jquery/blob/master/src/event.js
* /var Ks=function(e,t){this.recycle(e,t)};function jt(){return!1}function za(){return!0}Ks.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=jt,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?za:jt):e!=null&&e.type?t=e:this.type=e,t!=null&&(this.originalEvent=t.originalEvent,this.type=t.type!=null?t.type:this.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=za;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=za;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=za,this.stopPropagation()},isDefaultPrevented:jt,isPropagationStopped:jt,isImmediatePropagationStopped:jt};var Ws=/ ^ ( [ ^ . ] + ) ( \ . ( ? : [ ^ . ] + ) ) ? $ / , Ph = ".*" , Us = { qualifierCompare : function ( e , t ) { return e === t } , eventMatches : function ( ) { return ! 0 } , addEventFields : function ( ) { } , callbackContext : function ( e ) { return e } , beforeEmit : function ( ) { } , afterEmit : function ( ) { } , bubble : function ( ) { return ! 1 } , parent : function ( ) { return null } , context : null } , ho = Object . keys ( Us ) , Bh = { } ; function mn ( ) { for ( var r = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : Bh , e = arguments . length > 1 ? arguments [ 1 ] : void 0 , t = 0 ; t < ho . length ; t ++ ) { var a = ho [ t ] ; this [ a ] = r [ a ] || Us [ a ] } this . context = e || this . context , this . listeners = [ ] , this . emitting = 0 } var rt = mn . prototype , Ys = function ( e , t , a , n , i , o , s ) { Fe ( n ) && ( i = n , n = null ) , s && ( o == null ? o = s : o = be ( { } , o , s ) ) ; for ( var l = Re ( a ) ? a : a . split ( /\s+/ ) , u = 0 ; u < l . length ; u ++ ) { var v = l [ u ] ; if ( ! Jr ( v ) ) { var f = v . match ( Ws ) ; if ( f ) { var c = f [ 1 ] , h = f [ 2 ] ? f [ 2 ] : null , d = t ( e , v , c , h , n , i , o ) ; if ( d === ! 1 ) break } } } } , go = function ( e , t ) { return e . addEventFields ( e . context , t ) , new Ks ( t . type , t ) } , Mh = function ( e , t , a ) { if ( Zu ( a ) ) { t ( e , a ) ; return } else if ( Se ( a ) ) { t ( e , go ( e , a ) ) ; return } for ( var n = Re ( a ) ? a : a . split ( /\s+/ ) , i = 0 ; i < n . length ; i ++ ) { var o = n [ i ] ; if ( ! Jr ( o ) ) { var s = o . match ( Ws ) ; if ( s ) { var l = s [ 1 ] , u = s [ 2 ] ? s [ 2 ] : null , v = go ( e , { type : l , namespace : u , target : e . context } ) ; t ( e , v ) } } } } ; rt . on = rt . addListener = function ( r , e , t , a , n ) { return Ys ( this , function ( i , o , s , l , u , v , f ) { Fe ( v ) && i . listeners . push ( { event : o , callback : v , type : s , namespace : l , qualifier : u , conf : f } ) } , r , e , t , a , n ) , this } ; rt . one = function ( r , e , t , a ) { return this . on ( r , e , t , a , { one : ! 0 } ) } ; rt . removeListener = rt . off = function ( r , e , t , a ) { var n = this ; this . emitting !== 0 && ( this . listeners = nv ( this . listeners ) ) ; for ( var i = this . listeners , o = function ( u ) { var v = i [ u ] ; Ys ( n , function ( f , c , h , d , y , p ) { if ( ( v . type === h || r === "*" ) && ( ! d && v . namespace !== ".*" || v . namespace === d ) && ( ! y || f . qualifierCompare ( v . qualifier , y ) ) && ( ! p || v . callback === p ) ) return i . splice ( u , 1 ) , ! 1 } , r , e , t , a ) } , s = i . length - 1 ; s >= 0 ; s -- ) o ( s ) ; return this } ; rt . removeAllListeners = function ( ) { return this . removeListener ( "*" ) } ; rt . emit = rt . trigger = function ( r , e , t ) { var a = this . listeners , n = a . length ; return this . emitting ++ , Re ( e ) || ( e = [ e ] ) , Mh ( 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 ( v ) { var f = a [ v ] ; if ( f . type === o . type && ( ! f . namespace || f . namespace === o . namespace || f . namespace === Ph ) && i . eventMatches ( i . context , f , o ) ) { var c = [ o ] ; e != null && ov ( c , e ) , i . beforeEmit ( i . context , f , o ) , f . conf && f . conf . one && ( i . listeners = i . listeners . filter ( function ( y ) { return y !== f } ) ) ; var h = i . callbackContext ( i . context , f , o ) , d = f . callback . apply ( h , c ) ; i . afterEmit ( i . context , f , o ) , d === ! 1 && ( o . stopPropagation ( ) , o . preventDefault ( ) ) } } , l = 0 ; l < n ; l ++ ) s ( l ) ; i . bubble ( i . context ) && ! o . isPropagationStopped ( ) && i . parent ( i . context ) . emit ( o , e ) } , r ) , this . emitting -- , this } ; var Lh = { 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 && wa ( a . target ) && n . matches ( a . target ) : ! 0 } , addEventFields
` ),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[ \s \u 200b]+| $ /g,p=0;p<v.length;p++){var g=v[p],m=this.calculateLabelDimensions(r,g),b=m.width;if(h){var w=g.split("").join(u);g=w}if(b>f){var S=g.matchAll(y),E="",x=0,D=Xo(S),C;try{for(D.s();!(C=D.n()).done;){var M=C.value,P=M[0],B=g.substring(x,M.index);x=M.index+P.length;var L=E.length===0?B:E+B+P,k=this.calculateLabelDimensions(r,L),O=k.width;O<=f?E+=B+P:(E&&d.push(E),E=B+P)}}catch(N){D.e(N)}finally{D.f()}E.match(/^[ \s \u 200b]+ $ /)||d.push(E)}else d.push(g)}o("labelWrapCachedLines",d),n=o("labelWrapCachedText",d.join( `
` )),o("labelWrapKey",l)}else if(s==="ellipsis"){var A=r.pstyle("text-max-width").pfValue,R="",I="…",q=!1;if(this.calculateLabelDimensions(r,n).width<A)return n;for(var $ =0; $ <n.length; $ ++){var F=this.calculateLabelDimensions(r,R+n[ $ ]+I).width;if(F>A)break;R+=n[ $ ], $ ===n.length-1&&(q=!0)}return q||(R+=I),R}return n};zr.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};zr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=ft(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,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;b<m.length;b++){var w=m[b],S=d.measureText(w),E=Math.ceil(S.width),x=v;p=Math.max(E,p),g+=x}return p+=l,g+=l,o[i]={width:p,height:g}};zr.calculateLabelAngle=function(r,e){var t=r._private,a=t.rscratch,n=r.isEdge(),i=e?e+"-":"",o=r.pstyle(i+"text-rotation"),s=o.strValue;return s==="none"?0:n&&s==="autorotate"?a.labelAutoAngle:s==="autorotate"?0:o.pfValue};zr.calculateLabelAngles=function(r){var e=this,t=r.isEdge(),a=r._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(r),t&&(n.sourceLabelAngle=e.calculateLabelAngle(r,"source"),n.targetLabelAngle=e.calculateLabelAngle(r,"target"))};var du={},Io=28,zo=!1;du.getNodeShape=function(r){var e=this,t=r.pstyle("shape").value;if(t==="cutrectangle"&&(r.width()<Io||r.height()<Io))return zo||(Me("The ` cutrectangle ` node shape can not be used at small sizes so ` rectangle ` is used instead"),zo=!0),"rectangle";if(r.isParent())return t==="rectangle"||t==="roundrectangle"||t==="round-rectangle"||t==="cutrectangle"||t==="cut-rectangle"||t==="barrel"?t:"rectangle";if(t==="polygon"){var a=r.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return t};var Sn={};Sn.registerCalculationListeners=function(){var r=this.cy,e=r.collection(),t=this,a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var l=0;l<o.length;l++){var u=o[l],v=u._private,f=v.rstyle;f.clean=!1,f.cleanConnected=!1}};t.binder(r).on("bounds.* dirty.*",function(o){var s=o.target;a(s)}).on("style.* background.*",function(o){var s=o.target;a(s,!1)});var n=function(o){if(o){var s=t.onUpdateEleCalcsFns;e.cleanStyle();for(var l=0;l<e.length;l++){var u=e[l],v=u._private.rstyle;u.isNode()&&!v.cleanConnected&&(a(u.connectedEdges()),v.cleanConnected=!0)}if(s)for(var f=0;f<s.length;f++){var c=s[f];c(o,e)}t.recalculateRenderedStyle(e),e=r.collection()}};t.flushRenderedStyleQueue=function(){n(!0)},t.beforeRender(n,t.beforeRenderPriorities.eleCalcs)};Sn.onUpdateEleCalcs=function(r){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(r)};Sn.recalculateRenderedStyle=function(r,e){var t=function(w){return w._private.rstyle.cleanConnected},a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<r.length;i++){var o=r[i],s=o._private,l=s.rstyle;o.isEdge()&&(!t(o.source())||!t(o.target()))&&(l.clean=!1),!(e&&l.clean||o.removed())&&o.pstyle("display").value!=="none"&&(s.group==="nodes"?n.push(o):a.push(o),l.clean=!0)}for(var u=0;u<n.length;u++){var v=n[u],f=v._private,c=f.rstyle,h=v.position();this.recalculateNodeLabelProjection(v),c.nodeX=h.x,c.nodeY=h.y,c.nodeW=v.pstyle("width").pfValue,c.nodeH=v.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var y=a[d],p=y._private,g=p.rstyle,m=p.rscratch;g.srcX=m.arrowStartX,g.srcY=m.arrowStartY,g.tgtX=m.arrowEndX,g.tgtY=m.arrowEndY,g.midX=m.midX,g.midY=m.midY,g.labelAngle=m.labelAngle,g.sourceLabelAngle=m.sourceLabelAngle,g.targetLabelAngle=m.targetLabelAngle}}};var Tn={};Tn.updateCachedGrabbedEles=function(){var r=this.cachedZSortedEles;if(r){r.drag=[],r.nondrag=[];for(var e=[],t=0;t<r.length;t++){var a=r[t],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?r.drag.push(a):r.nondrag.push(a)}for(var t=0;t<e.length;t++){var a=e[t];r.drag.push(a)}}};Tn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Tn.getCachedZSortedEles=function(r){if(r||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Qs),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var hu={};[yt,on,sr,Ta,Ti,zr,du,Sn,Tn].forEach(function(r){be(hu,r)});var gu={};gu.getCachedImage=function(r,e,t){var a=this,n=a.imageCache=a.imageCache||{},i=n[r];if(i)return i.image.complete||i.image.addEventListener("load",t),i.image;i=n[r]=n[r]||{};var o=i.image=new Image;o.addEventListener("load",t),o.addEventListener("error",function(){o.error=!0});var s="data:",l=r.substring(0,s.length).toLowerCase()===s;return l||(e=e==="null"?null:e,o.crossOrigin=e),o.s