2026-05-11 05:18:54 +00:00
function ks ( r , e ) { ( e == null || e > r . length ) && ( e = r . length ) ; for ( var t = 0 , a = Array ( e ) ; t < e ; t ++ ) a [ t ] = r [ t ] ; return a } function jf ( r ) { if ( Array . isArray ( r ) ) return r } function ec ( r ) { if ( Array . isArray ( r ) ) return ks ( r ) } function dt ( r , e ) { if ( ! ( r instanceof e ) ) throw new TypeError ( "Cannot call a class as a function" ) } function rc ( 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 , Ql ( a . key ) , a ) } } function ht ( r , e , t ) { return e && rc ( r . prototype , e ) , Object . defineProperty ( r , "prototype" , { writable : ! 1 } ) , r } function Cr ( r , e ) { var t = typeof Symbol < "u" && r [ Symbol . iterator ] || r [ "@@iterator" ] ; if ( ! t ) { if ( Array . isArray ( r ) || ( t = Us ( 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 ( u ) { throw u } , 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,s=!0,o=!1;return{s:function(){t=t.call(r)},n:function(){var u=t.next();return s=u.done,u},e:function(u){o=!0,i=u},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function Zl(r,e,t){return(e=Ql(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tc(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function ac(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,s,o=[],u=!0,l=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;u=!1}else for(;!(u=(a=i.call(t)).done)&&(o.push(a.value),o.length!==e);u=!0);}catch(v){l=!0,n=v}finally{try{if(!u&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw n}}return o}}function nc(){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 ic(){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 Qe(r,e){return jf(r)||ac(r,e)||Us(r,e)||nc()}function pn(r){return ec(r)||tc(r)||Us(r)||ic()}function sc(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 Ql(r){var e=sc(r,"string");return typeof e=="symbol"?e:e+""}function rr(r){"@babel/helpers - typeof";return rr=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},rr(r)}function Us(r,e){if(r){if(typeof r=="string")return ks(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)?ks(r,e):void 0}}var je=typeof window>"u"?null:window,Eo=je?je.navigator:null;je&&je.document;var oc=rr(""),Jl=rr({}),uc=rr(function(){}),lc=typeof HTMLElement>"u"?"undefined":rr(HTMLElement),Ra=function(e){return e&&e.instanceString&& $ e(e.instanceString)?e.instanceString():null},he=function(e){return e!=null&&rr(e)==oc}, $ e=function(e){return e!=null&&rr(e)===uc},Ve=function(e){return!Tr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Me=function(e){return e!=null&&rr(e)===Jl&&!Ve(e)&&e.constructor===Object},vc=function(e){return e!=null&&rr(e)===Jl},ae=function(e){return e!=null&&rr(e)===rr(1)&&!isNaN(e)},fc=function(e){return ae(e)&&Math.floor(e)===e},yn=function(e){if(lc!=="undefined")return e!=null&&e instanceof HTMLElement},Tr=function(e){return Ma(e)||jl(e)},Ma=function(e){return Ra(e)==="collection"&&e._private.single},jl=function(e){return Ra(e)==="collection"&&!e._private.single},Ks=function(e){return Ra(e)==="core"},ev=function(e){return Ra(e)==="stylesheet"},cc=function(e){return Ra(e)==="event"},ot=function(e){return e==null?!0:!!(e===""||e.match(/^ \s + $ /))},dc=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},hc=function(e){return Me(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},gc=function(e){return vc(e)&& $ e(e.then)},pc=function(){return Eo&&Eo.userAgent.match(/msie|trident|edge/i)},Yt=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;s<arguments.length;s++)i.push(arguments[s]);return i.join(" $ ")});var a=function(){var i=this,s=arguments,o,u=t.apply(i,s),l=a.cache;return(o=l[u])||(o=l[u]=e.apply(i,s)),o};return a.cache={},a},Xs=Yt(function(r){return r.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),An=Yt(function(r){return r.replace(/(- \w )/g,function(e){return e[1].toUpperCase()})}),rv=Yt(function(r,e){return r+e[0].toUpperCase()+e.substring(1)},function(r,e){return r+" $ "+e}),Co=function(e){return ot(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},tt=function(e,t){return e.slice(-1*t.length)===t},er="(?:[-+]?(?:(?: \\ d+| \\ d* \\ . \\ d+)(?:[Ee][+-]? \\ d+)?))",yc="rgb[a]? \\ (("+er+"[%]?) \\ s*, \\ s*("+er+"[%]?) \\ s*, \\ s*("+er+"[%]?)(?: \\ s*, \\ s*("+er+"))? \\ )",mc="rgb[a]? \\ ((?:"+er+"[%]?) \\ s*, \\ s*(?:"+er+"[%]?) \\ s*, \\ s*(?:"+er+"[%]?)(?: \\ s*, \\ s*(?:"+er+"))? \\ )",bc="hsl[a]? \\ (("+er+") \\ s*, \\ s*("+er+"[%]) \\ s*, \\ s*("+er+"[%])(?: \\ s*, \\ s*("+er+"))? \\ )",wc="hsl[a]? \\ ((?:"+er+") \\ s*, \\ s*(?:"+er+"[%]) \\ s*, \\ s*(?:"+er+"[%])(?: \\ s*, \\ s*(?:"+er+"))? \\ )",xc=" \\ #[0-9a-fA-F]{3}",Ec=" \\ #[0-9a-fA-F]{6}",tv=function(e,t){return e<t?-1:e>t?1:0},Cc=function(e,t){return-1*tv(e,t)},ye=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 s=n[i];r[s]=a[s]}}return r},Tc=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var t=e.length===4,a,n,i,s=16;return t?(a=parseInt(e[1]+e[1],s),n=parseInt(e[2]+e[2],s),i=parseInt(e[3]+e[3],s)):(a=parseInt(e[1]+e[2],s),n=parseInt(e[3]+e[4],s),i=parseInt(e[5]+e[6],s)),[
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 k v = 0 , D v = 1 , B v = 2 , O r = f u n c t i o n ( e ) { i f ( ! ( t h i s i n s t a n c e o f O r ) ) r e t u r n n e w O 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 = k v , 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 ) ) } ; O 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 n u ( t h i s , D v , " 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 n u ( t h i s , B v , " 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 O r ; r e t u r n a . o n F u l f i l l e d . p u s h ( s u ( e , n , " f u l f i l l " ) ) , a . o n R e j e c t e d . p u s h ( s u ( t , n , " r e j e c t " ) ) , P v ( a ) , n . p r o x y } } ; v a r n u = f u n c t i o n ( e , t , a , n ) { r e t u r n e . s t a t e = = = k v & & ( e . s t a t e = t , e [ a ] = n , P v ( e ) ) , e } , P v = f u n c t i o n ( e ) { e . s t a t e = = = D v ? i u ( 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 = = = B v & & i u ( e , " o n R e j e c t e d " , e . r e j e c t R e a s o n ) } , i u = 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 o = 0 ; o < n . l e n g t h ; o + + ) n [ o ] ( 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 ) } } , s u = 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 ( s ) { t . r e j e c t ( s ) ; r e t u r n } A v ( t , i ) } } } , A v = f u n c t i o n ( 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 ( r r ( 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 " ) ) : A v ( 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 ) } ; O r . a l l = f u n c t i o n ( r ) { r e t u r n n e w O 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 ( u , l ) { a [ u ] = l , n + + , n = = = r . l e n g t h & & e ( a ) } , s = 0 ; s < r . l e n g t h ; s + + ) ( f u n c t i o n ( o ) { v a r u = r [ o ] , l = u ! = n u l l & & u . t h e n ! = n u l l ; i f ( l ) u . t h e n ( f u n c t i o n ( f ) { i ( o , f ) } , f u n c t i o n ( f ) { t ( f ) } ) ; e l s e { v a r v = u ; i ( o , v ) } } ) ( s ) } ) } ; O 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 O r ( f u n c t i o n ( e , t ) { e ( r ) } ) } ; O 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 O r ( f u n c t i o n ( e , t ) { t ( r ) } ) } ; v a r e a = t y p e o f P r o m i s e < " u " ? P r o m i s e : O r , M s = f u n c t i o n ( e , t , a ) { v a r n = K s ( e ) , i = ! n , s = t h i s . _ p r i v a t e = y e ( { d u r a t i o n : 1 e 3 } , t , a ) ; i f ( s . t a r g e t = e , s . s t y l e = s . s t y l e | | s . c s s , s . s t a r t e d = ! 1 , s . p l a y i n g = ! 1 , s . h o o k e d = ! 1 , s . a p p l y i n g = ! 1 , s . p r o g r e s s = 0 , s . c o m p l e t e s = [ ] , s . f r a m e s = [ ] , s . c o m p l e t e & & $ e ( s . c o m p l e t e ) & & s . c o m p l e t e s . p u s h ( s . c o m p l e t e ) , i ) { v a r o = e . p o s i t i o n ( ) ; s . s t a r t P o s i t i o n = s . s t a r t P o s i t i o n | | { x : o . x , y : o . y } , s . s t a r t S t y l e = s . 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 , s . s t y l e ) } i f ( n ) { v a r u = e . p a n ( ) ; s . s t a r t P a n = { x : u . x , y : u . y } , s . 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 } , B t = M s . p r o t o t y p e ; y e ( B 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 ) , T 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 ( l , v ) { v a r f = e [ l ] ; f ! = n u l l & & ( e [ l ] = 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 ] , s = i . n a m e , o = e . s t a r t S t y l e [ s ] ; e . s t a r t S t y l e [ s ] = i , e . s t y l e [ n ] = o } 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 : c
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 Uv=function(e,t){this.recycle(e,t)};function va(){return!1}function Ja(){return!0}Uv.prototype={instanceString:function(){return"event"},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=va,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Ja:va):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=Ja;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Ja;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Ja,this.stopPropagation()},isDefaultPrevented:va,isPropagationStopped:va,isImmediatePropagationStopped:va};var Kv=/ ^ ( [ ^ . ] + ) ( \ . ( ? : [ ^ . ] + ) ) ? $ / , np = ".*" , Xv = { 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 } , vl = Object . keys ( Xv ) , ip = { } ; function qn ( ) { for ( var r = arguments . length > 0 && arguments [ 0 ] !== void 0 ? arguments [ 0 ] : ip , e = arguments . length > 1 ? arguments [ 1 ] : void 0 , t = 0 ; t < vl . length ; t ++ ) { var a = vl [ t ] ; this [ a ] = r [ a ] || Xv [ a ] } this . context = e || this . context , this . listeners = [ ] , this . emitting = 0 } var ct = qn . prototype , Yv = function ( e , t , a , n , i , s , o ) { $e ( n ) && ( i = n , n = null ) , o && ( s == null ? s = o : s = ye ( { } , s , o ) ) ; for ( var u = Ve ( a ) ? a : a . split ( /\s+/ ) , l = 0 ; l < u . length ; l ++ ) { var v = u [ l ] ; if ( ! ot ( v ) ) { var f = v . match ( Kv ) ; if ( f ) { var c = f [ 1 ] , h = f [ 2 ] ? f [ 2 ] : null , d = t ( e , v , c , h , n , i , s ) ; if ( d === ! 1 ) break } } } } , fl = function ( e , t ) { return e . addEventFields ( e . context , t ) , new Uv ( t . type , t ) } , sp = function ( e , t , a ) { if ( cc ( a ) ) { t ( e , a ) ; return } else if ( Me ( a ) ) { t ( e , fl ( e , a ) ) ; return } for ( var n = Ve ( a ) ? a : a . split ( /\s+/ ) , i = 0 ; i < n . length ; i ++ ) { var s = n [ i ] ; if ( ! ot ( s ) ) { var o = s . match ( Kv ) ; if ( o ) { var u = o [ 1 ] , l = o [ 2 ] ? o [ 2 ] : null , v = fl ( e , { type : u , namespace : l , target : e . context } ) ; t ( e , v ) } } } } ; ct . on = ct . addListener = function ( r , e , t , a , n ) { return Yv ( this , function ( i , s , o , u , l , v , f ) { $e ( v ) && i . listeners . push ( { event : s , callback : v , type : o , namespace : u , qualifier : l , conf : f } ) } , r , e , t , a , n ) , this } ; ct . one = function ( r , e , t , a ) { return this . on ( r , e , t , a , { one : ! 0 } ) } ; ct . removeListener = ct . off = function ( r , e , t , a ) { var n = this ; this . emitting !== 0 && ( this . listeners = Xc ( this . listeners ) ) ; for ( var i = this . listeners , s = function ( l ) { var v = i [ l ] ; Yv ( n , function ( f , c , h , d , y , g ) { if ( ( v . type === h || r === "*" ) && ( ! d && v . namespace !== ".*" || v . namespace === d ) && ( ! y || f . qualifierCompare ( v . qualifier , y ) ) && ( ! g || v . callback === g ) ) return i . splice ( l , 1 ) , ! 1 } , r , e , t , a ) } , o = i . length - 1 ; o >= 0 ; o -- ) s ( o ) ; return this } ; ct . removeAllListeners = function ( ) { return this . removeListener ( "*" ) } ; ct . emit = ct . trigger = function ( r , e , t ) { var a = this . listeners , n = a . length ; return this . emitting ++ , Ve ( e ) || ( e = [ e ] ) , sp ( this , function ( i , s ) { t != null && ( a = [ { event : s . event , type : s . type , namespace : s . namespace , callback : t } ] , n = a . length ) ; for ( var o = function ( ) { var v = a [ u ] ; if ( v . type === s . type && ( ! v . namespace || v . namespace === s . namespace || v . namespace === np ) && i . eventMatches ( i . context , v , s ) ) { var f = [ s ] ; e != null && Zc ( f , e ) , i . beforeEmit ( i . context , v , s ) , v . conf && v . conf . one && ( i . listeners = i . listeners . filter ( function ( d ) { return d !== v } ) ) ; var c = i . callbackContext ( i . context , v , s ) , h = v . callback . apply ( c , f ) ; i . afterEmit ( i . context , v , s ) , h === ! 1 && ( s . stopPropagation ( ) , s . preventDefault ( ) ) } } , u = 0 ; u < n ; u ++ ) o ( ) ; i . bubble ( i . context ) && ! s . isPropagationStopped ( ) && i . parent ( i . context ) . emit ( s , e ) } , r ) , this . emitting -- , this } ; var op = { 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 && Ma ( a . target ) && n . matches ( a . target ) : ! 0 } , addEventFields : f
` ),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[ \s \u 200b]+| $ /g,g=0;g<v.length;g++){var p=v[g],m=this.calculateLabelDimensions(r,p),b=m.width;if(h){var w=p.split("").join(l);p=w}if(b>f){var E=p.matchAll(y),C="",x=0,T=Cr(E),k;try{for(T.s();!(k=T.n()).done;){var D=k.value,B=D[0],P=p.substring(x,D.index);x=D.index+B.length;var A=C.length===0?P:C+P+B,R=this.calculateLabelDimensions(r,A),L=R.width;L<=f?C+=P+B:(C&&d.push(C),C=P+B)}}catch(F){T.e(F)}finally{T.f()}C.match(/^[ \s \u 200b]+ $ /)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join( `
` )),s("labelWrapKey",u)}else if(o==="ellipsis"){var I=r.pstyle("text-max-width").pfValue,M="",O="…",q=!1;if(this.calculateLabelDimensions(r,n).width<I)return n;for(var _=0;_<n.length;_++){var N=this.calculateLabelDimensions(r,M+n[_]+O).width;if(N>I)break;M+=n[_],_===n.length-1&&(q=!0)}return q||(M+=O),M}return n};Gr.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};Gr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=0,s=r.pstyle("font-style").strValue,o=r.pstyle("font-size").pfValue,u=r.pstyle("font-family").strValue,l=r.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(l," ").concat(o,"px ").concat(u);for(var h=0,d=0,y=e.split( `
` ),g=0;g<y.length;g++){var p=y[g],m=f.measureText(p),b=Math.ceil(m.width),w=o;h=Math.max(b,h),d+=w}return h+=i,d+=i,{width:h,height:d}};Gr.calculateLabelAngle=function(r,e){var t=r._private,a=t.rscratch,n=r.isEdge(),i=e?e+"-":"",s=r.pstyle(i+"text-rotation"),o=s.strValue;return o==="none"?0:n&&o==="autorotate"?a.labelAutoAngle:o==="autorotate"?0:s.pfValue};Gr.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 mf={},Rl=28,Ml=!1;mf.getNodeShape=function(r){var e=this,t=r.pstyle("shape").value;if(t==="cutrectangle"&&(r.width()<Rl||r.height()<Rl))return Ml||(ze("The ` cutrectangle ` node shape can not be used at small sizes so ` rectangle ` is used instead"),Ml=!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 Un={};Un.registerCalculationListeners=function(){var r=this.cy,e=r.collection(),t=this,a=function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var u=0;u<s.length;u++){var l=s[u],v=l._private,f=v.rstyle;f.clean=!1,f.cleanConnected=!1}};t.binder(r).on("bounds.* dirty.*",function(s){var o=s.target;a(o)}).on("style.* background.*",function(s){var o=s.target;a(o,!1)});var n=function(s){if(s){var o=t.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var l=e[u],v=l._private.rstyle;l.isNode()&&!v.cleanConnected&&(a(l.connectedEdges()),v.cleanConnected=!0)}if(o)for(var f=0;f<o.length;f++){var c=o[f];c(s,e)}t.recalculateRenderedStyle(e),e=r.collection()}};t.flushRenderedStyleQueue=function(){n(!0)},t.beforeRender(n,t.beforeRenderPriorities.eleCalcs)};Un.onUpdateEleCalcs=function(r){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(r)};Un.recalculateRenderedStyle=function(r,e){var t=function(w){return w._private.rstyle.cleanConnected};if(r.length!==0){var a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<r.length;i++){var s=r[i],o=s._private,u=o.rstyle;s.isEdge()&&(!t(s.source())||!t(s.target()))&&(u.clean=!1),s.isEdge()&&s.isBundledBezier()&&s.parallelEdges().some(function(b){return!b._private.rstyle.clean&&b.isBundledBezier()})&&(u.clean=!1),!(e&&u.clean||s.removed())&&s.pstyle("display").value!=="none"&&(o.group==="nodes"?n.push(s):a.push(s),u.clean=!0)}for(var l=0;l<n.length;l++){var v=n[l],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],g=y._private,p=g.rstyle,m=g.rscratch;p.srcX=m.arrowStartX,p.srcY=m.arrowStartY,p.tgtX=m.arrowEndX,p.tgtY=m.arrowEndY,p.midX=m.midX,p.midY=m.midY,p.labelAngle=m.labelAngle,p.sourceLabelAngle=m.sourceLabelAngle,p.targetLabelAngle=m.targetLabelAngle}}}};var Kn={};Kn.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)}}};Kn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null};Kn.getCachedZSortedEles=function(r){if(r||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Jv),e.interactive=e.filter(function(t){return t.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var bf={};[Rt,kn,gr,qa,go,Gr,mf,Un,Kn].forEach(function(r){ye(bf,r)});var wf={};wf.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 s=i.image=new Image;s.addEventListener("load",t),s.addEv
float circleSD ( vec2 p , float r ) {
return distance ( vec2 ( 0 ) , p ) - r ; // signed distance
}
` ,lm= `
float rectangleSD ( vec2 p , vec2 b ) {
vec2 d = abs ( p ) - b ;
return distance ( vec2 ( 0 ) , max ( d , 0.0 ) ) + min ( max ( d . x , d . y ) , 0.0 ) ;
}
` ,vm= `
float roundRectangleSD ( vec2 p , vec2 b , vec4 cr ) {
cr . xy = ( p . x > 0.0 ) ? cr . xy : cr . zw ;
cr . x = ( p . y > 0.0 ) ? cr . x : cr . y ;
vec2 q = abs ( p ) - b + cr . x ;
return min ( max ( q . x , q . y ) , 0.0 ) + distance ( vec2 ( 0 ) , max ( q , 0.0 ) ) - cr . x ;
}
` ,fm= `
float ellipseSD ( vec2 p , vec2 ab ) {
p = abs ( p ) ; // symmetry
// find root with Newton solver
vec2 q = ab * ( p - ab ) ;
float w = ( q . x < q . y ) ? 1.570796327 : 0.0 ;
for ( int i = 0 ; i < 5 ; i ++ ) {
vec2 cs = vec2 ( cos ( w ) , sin ( w ) ) ;
vec2 u = ab * vec2 ( cs . x , cs . y ) ;
vec2 v = ab * vec2 ( - cs . y , cs . x ) ;
w = w + dot ( p - u , v ) / ( dot ( p - u , u ) + dot ( v , v ) ) ;
}
// compute final point and distance
float d = length ( p - ab * vec2 ( cos ( w ) , sin ( w ) ) ) ;
// return signed distance
return ( dot ( p / ab , p / ab ) > 1.0 ) ? d : - d ;
}
` ,wa={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Bn={IGNORE:1,USE_BB:2},xs=0, $ l=1,Ul=2,Es=3,Vt=4,an=5,da=6,ha=7,cm=(function(){function r(e,t,a){dt(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=Wy,this.atlasManager=new sm(e,a),this.batchManager=new om(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(wa.SCREEN),this.pickingProgram=this._createShaderProgram(wa.PICKING),this.vao=this._createVAO()}return ht(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addTextureAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"addSimpleShapeRenderType",value:function(t,a){this.simpleShapeOptions.set(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(o){return o===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 ; // a vertex from the unit square
in mat3 aTransform ; // used to transform verticies, eg into a bounding box
in int aVertType ; // the type of thing we are rendering
// the z-index that is output when using picking mode
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 vec2 aLineWidth ; // also used for node border width
// simple shapes
in vec4 aCornerRadius ; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
in vec4 aColor ; // also used for edges
in vec4 aBorderColor ; // aLineWidth is used for border width
// output values passed to the fragment shader
out vec2 vTexCoord ;
out vec4 vColor ;
out vec2 vPosition ;
// flat values are not interpolated
flat out int vAtlasId ;
flat out int vVertType ;
flat out vec2 vTopRight ;
flat out vec2 vBotLeft ;
flat out vec4 vCornerRadius ;
flat out vec4 vBorderColor ;
flat out vec2 vBorderWidth ;
flat out vec4 vIndex ;
void main ( void ) {
int vid = gl _VertexID ;
vec2 position = aPosition ; // TODO make this a vec3, simplifies some code below
if ( aVertType == ` .concat(xs, ` ) {
float texX = aTex . x ; // texture coordinates
float texY = aTex . y ;
float texW = aTex . z ;
float texH = aTex . w ;
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(Vt," || aVertType == ").concat(ha, `
|| aVertType == ` ).concat(an," || aVertType == ").concat(da, ` ) { // simple shapes
// the bounding box is needed by the fragment shader
vBotLeft = ( aTransform * vec3 ( 0 , 0 , 1 ) ) . xy ; // flat
vTopRight = ( aTransform * vec3 ( 1 , 1 , 1 ) ) . xy ; // flat
vPosition = ( aTransform * vec3 ( position , 1 ) ) . xy ; // will be interpolated
// calculations are done in the fragment shader, just pass these along
vColor = aColor ;
vCornerRadius = aCornerRadius ;
vBorderColor = aBorderColor ;
vBorderWidth = aLineWidth ;
gl _Position = vec4 ( uPanZoomMatrix * aTransform * vec3 ( position , 1.0 ) , 1.0 ) ;
}
else if ( aVertType == ` ).concat( $ l, ` ) {
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 ;
// stretch the unit square into a long skinny rectangle
vec2 xBasis = target - source ;
vec2 yBasis = normalize ( vec2 ( - xBasis . y , xBasis . x ) ) ;
vec2 point = source + xBasis * position . x + yBasis * aLineWidth [ 0 ] * position . y ;
gl _Position = vec4 ( uPanZoomMatrix * vec3 ( point , 1.0 ) , 1.0 ) ;
vColor = aColor ;
}
else if ( aVertType == ` ).concat(Ul, ` ) {
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 , p1 , p2 , pos ;
if ( position . x == 0.0 ) { // The left side of the unit square
p0 = pointA ;
p1 = pointB ;
p2 = pointC ;
pos = position ;
} else { // The right side of the unit square, use same approach but flip the geometry upside down
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 [ 0 ] ;
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(Es, ` && 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 ;
vVertType = aVertType ;
vIndex = aIndex ;
}
` ),i=this.batchManager.getIndexArray(),s= ` # version 300 es
precision highp float ;
// declare texture unit for each texture atlas in the batch
` .concat(i.map(function(l){return"uniform sampler2D uTexture".concat(l,";")}).join( `
` ), `
uniform vec4 uBGColor ;
uniform float uZoom ;
in vec2 vTexCoord ;
in vec4 vColor ;
in vec2 vPosition ; // model coordinates
flat in int vAtlasId ;
flat in vec4 vIndex ;
flat in int vVertType ;
flat in vec2 vTopRight ;
flat in vec2 vBotLeft ;
flat in vec4 vCornerRadius ;
flat in vec4 vBorderColor ;
flat in vec2 vBorderWidth ;
out vec4 outColor ;
` ).concat(um, `
` ).concat(lm, `
` ).concat(vm, `
` ).concat(fm, `
vec4 blend ( vec4 top , vec4 bot ) { // blend colors with premultiplied alpha
return vec4 (
top . rgb + ( bot . rgb * ( 1.0 - top . a ) ) ,
top . a + ( bot . a * ( 1.0 - top . a ) )
) ;
}
vec4 distInterp ( vec4 cA , vec4 cB , float d ) { // interpolate color using Signed Distance
// scale to the zoom level so that borders don't look blurry when zoomed in
// note 1.5 is an aribitrary value chosen because it looks good
return mix ( cA , cB , 1.0 - smoothstep ( 0.0 , 1.5 / uZoom , abs ( d ) ) ) ;
}
void main ( void ) {
if ( vVertType == ` ).concat(xs, ` ) {
// look up the texel from the texture unit
` ).concat(i.map(function(l){return"if(vAtlasId == ".concat(l,") outColor = texture(uTexture").concat(l,", vTexCoord);")}).join( `
else ` ), `
}
else if ( vVertType == ` ).concat(Es, ` ) {
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
outColor = blend ( vColor , uBGColor ) ;
outColor . a = 1.0 ; // make opaque, masks out line under arrow
}
else if ( vVertType == ` ).concat(Vt, ` && vBorderWidth == vec2 ( 0.0 ) ) { // simple rectangle with no border
outColor = vColor ; // unit square is already transformed to the rectangle, nothing else needs to be done
}
else if ( vVertType == ` ).concat(Vt," || vVertType == ").concat(ha, `
|| vVertType == ` ).concat(an," || vVertType == ").concat(da, ` ) { // use SDF
float outerBorder = vBorderWidth [ 0 ] ;
float innerBorder = vBorderWidth [ 1 ] ;
float borderPadding = outerBorder * 2.0 ;
float w = vTopRight . x - vBotLeft . x - borderPadding ;
float h = vTopRight . y - vBotLeft . y - borderPadding ;
vec2 b = vec2 ( w / 2.0 , h / 2.0 ) ; // half width, half height
vec2 p = vPosition - vec2 ( vTopRight . x - b [ 0 ] - outerBorder , vTopRight . y - b [ 1 ] - outerBorder ) ; // translate to center
float d ; // signed distance
if ( vVertType == ` ).concat(Vt, ` ) {
d = rectangleSD ( p , b ) ;
} else if ( vVertType == ` ).concat(ha, ` && w == h ) {
d = circleSD ( p , b . x ) ; // faster than ellipse
} else if ( vVertType == ` ).concat(ha, ` ) {
d = ellipseSD ( p , b ) ;
} else {
d = roundRectangleSD ( p , b , vCornerRadius . wzyx ) ;
}
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
if ( d > 0.0 ) {
if ( d > outerBorder ) {
discard ;
} else {
outColor = distInterp ( vBorderColor , vec4 ( 0 ) , d - outerBorder ) ;
}
} else {
if ( d > innerBorder ) {
vec4 outerColor = outerBorder == 0.0 ? vec4 ( 0 ) : vBorderColor ;
vec4 innerBorderColor = blend ( vBorderColor , vColor ) ;
outColor = distInterp ( innerBorderColor , outerColor , d ) ;
}
else {
vec4 outerColor ;
if ( innerBorder == 0.0 && outerBorder == 0.0 ) {
outerColor = vec4 ( 0 ) ;
} else if ( innerBorder == 0.0 ) {
outerColor = vBorderColor ;
} else {
outerColor = blend ( vBorderColor , vColor ) ;
}
outColor = distInterp ( vColor , outerColor , d - innerBorder ) ;
}
}
}
else {
outColor = vColor ;
}
` ).concat(t.picking? ` if ( outColor . a == 0.0 ) discard ;
else outColor = vIndex ; ` :"", `
}
2026-05-21 07:27:56 +00:00
` ),o=Hy(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.aCornerRadius=a.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=a.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uZoom=a.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)o.uTextures.push(a.getUniformLocation(o,"uTexture".concat(u)));return o}},{key:"_createVAO",value:function(){var t=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=t.length/2;var a=this.maxInstances,n=this.gl,i=this.program,s=n.createVertexArray();return n.bindVertexArray(s),Jy(n,"vec2",i.aPosition,t),this.transformBuffer=jy(n,a,i.aTransform),this.indexBuffer=Fr(n,a,"vec4",i.aIndex),this.vertTypeBuffer=Fr(n,a,"int",i.aVertType),this.atlasIdBuffer=Fr(n,a,"int",i.aAtlasId),this.texBuffer=Fr(n,a,"vec4",i.aTex),this.pointAPointBBuffer=Fr(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Fr(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=Fr(n,a,"vec2",i.aLineWidth),this.colorBuffer=Fr(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=Fr(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=Fr(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),s}},{key:"buffers",get:function(){var t=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return tt(a,"Buffer")}).map(function(a){return t[a]})),this._buffers}},{key:"startFrame",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wa.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,a){return t.visible()?a&&a.isVisible?a.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(n);if(this._isVisible(t,o)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&o.getTexPickingMode){var u=o.getTexPickingMode(t);if(u===Bn.IGNORE)return;if(u==Bn.USE_BB){this.drawPickingRectangle(t,a,n);return}}var l=i.getAtlasInfo(t,n),v=Cr(l),f;try{for(v.s();!(f=v.n()).done;){var c=f.value,h=c.atlas,d=c.tex1,y=c.tex2;s.canAddToCurrentBatch(h)||this.endBatch();for(var g=s.getAtlasIndexForBatch(h),p=0,m=[[d,!0],[y,!1]];p<m.length;p++){var b=Qe(m[p],2),w=b[0],E=b[1];if(w.w!=0){var C=this.instanceCount;this.vertTypeBuffer.getView(C)[0]=xs;var x=this.indexBuffer.getView(C);Ft(a,x);var T=this.atlasIdBuffer.getView(C);T[0]=g;var k=this.texBuffer.getView(C);k[0]=w.x,k[1]=w.y,k[2]=w.w,k[3]=w.h;var D=this.transformBuffer.getMatrixView(C);this.setTransformMatrix(t,D,o,c,E),this.instanceCount++,E||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(B){v.e(B)}finally{v.f()}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,v=i.tex2,f=l.w/(l.w+v.w);s||(f=1-f);var c=this._getAdjustedBB(u,o,s,f);this._applyTransformMatrix(a,c,n,t)}else{var h=n.getBoundingBox(t),d=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(a,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var s,o;Hl(t);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),v=l.x,f=l.y;gn(t,t,[v,f]),Wl(t,t,u);var c=n.getRotationOffset(i);s=c.x+(a.xOffset||0),o=c.y+(a.yOffset||0)}else s=a.x1,o=a.y1;gn