2019-12-13 10:17:15 -05:00
/ * !
2020-05-23 17:17:12 -04:00
* Paper . js v0 . 12.7 - develop - The Swiss Army Knife of Vector Graphics Scripting .
2019-12-13 10:17:15 -05:00
* http : //paperjs.org/
*
2020-05-23 16:28:40 -04:00
* Copyright ( c ) 2011 - 2020 , Jürg Lehni & Jonathan Puckey
* http : //juerglehni.com/ & https://puckey.studio/
2019-12-13 10:17:15 -05:00
*
* Distributed under the MIT license . See LICENSE file for details .
*
* All rights reserved .
*
2020-05-23 17:17:12 -04:00
* Date : Sat May 23 23 : 11 : 24 2020 + 0200
2019-12-13 10:17:15 -05:00
*
* * *
*
* Straps . js - Class inheritance library with support for bean - style accessors
*
2020-05-23 16:28:40 -04:00
* Copyright ( c ) 2006 - 2020 Jürg Lehni
* http : //juerglehni.com/
2019-12-13 10:17:15 -05:00
*
* Distributed under the MIT license .
*
* * *
*
* Acorn . js
* https : //marijnhaverbeke.nl/acorn/
*
* Acorn is a tiny , fast JavaScript parser written in JavaScript ,
* created by Marijn Haverbeke and released under an MIT license .
*
* /
2020-05-23 17:17:12 -04:00
var paper = function ( t , e ) { t = t || require ( "./node/self.js" ) ; var i = t . window , n = t . document , r = new function ( ) { function t ( t , e , r , s , a ) { function u ( n , u ) { u = u || ( u = o ( e , n ) ) && ( u . get ? u : u . value ) , "string" == typeof u && "#" === u [ 0 ] && ( u = t [ u . substring ( 1 ) ] || u ) ; var c , f = "function" == typeof u , d = u , _ = a || f && ! u . base ? u && u . get ? n in t : t [ n ] : null ; a && _ || ( f && _ && ( u . base = _ ) , f && s !== ! 1 && ( c = n . match ( /^([gs]et|is)(([A-Z])(.*))$/ ) ) && ( l [ c [ 3 ] . toLowerCase ( ) + c [ 4 ] ] = c [ 2 ] ) , d && ! f && d . get && "function" == typeof d . get && i . isPlainObject ( d ) || ( d = { value : d , writable : ! 0 } ) , ( o ( t , n ) || { configurable : ! 0 } ) . configurable && ( d . configurable = ! 0 , d . enumerable = null != r ? r : ! c ) , h ( t , n , d ) ) } var l = { } ; if ( e ) { for ( var c in e ) e . hasOwnProperty ( c ) && ! n . test ( c ) && u ( c ) ; for ( var c in l ) { var f = l [ c ] , d = t [ "set" + f ] , _ = t [ "get" + f ] || d && t [ "is" + f ] ; ! _ || s !== ! 0 && 0 !== _ . length || u ( c , { get : _ , set : d } ) } } return t } function i ( ) { for ( var t = 0 , e = arguments . length ; t < e ; t ++ ) { var i = arguments [ t ] ; i && c ( this , i ) } return this } var n = /^(statics|enumerable|beans|preserve)$/ , r = [ ] , s = r . slice , a = Object . create , o = Object . getOwnPropertyDescriptor , h = Object . defineProperty , u = r . forEach || function ( t , e ) { for ( var i = 0 , n = this . length ; i < n ; i ++ ) t . call ( e , this [ i ] , i , this ) } , l = function ( t , e ) { for ( var i in this ) this . hasOwnProperty ( i ) && t . call ( e , this [ i ] , i , this ) } , c = Object . assign || function ( t ) { for ( var e = 1 , i = arguments . length ; e < i ; e ++ ) { var n = arguments [ e ] ; for ( var r in n ) n . hasOwnProperty ( r ) && ( t [ r ] = n [ r ] ) } return t } , f = function ( t , e , i ) { if ( t ) { var n = o ( t , "length" ) ; ( n && "number" == typeof n . value ? u : l ) . call ( t , e , i = i || t ) } return i } ; return t ( i , { inject : function ( e ) { if ( e ) { var i = e . statics === ! 0 ? e : e . statics , n = e . beans , r = e . preserve ; i !== e && t ( this . prototype , e , e . enumerable , n , r ) , t ( this , i , null , n , r ) } for ( var s = 1 , a = arguments . length ; s < a ; s ++ ) this . inject ( arguments [ s ] ) ; return this } , extend : function ( ) { for ( var e , i , n , r = this , s = 0 , o = arguments . length ; s < o && ( ! e || ! i ) ; s ++ ) n = arguments [ s ] , e = e || n . initialize , i = i || n . prototype ; return e = e || function ( ) { r . apply ( this , arguments ) } , i = e . prototype = i || a ( this . prototype ) , h ( i , "constructor" , { value : e , writable : ! 0 , configurable : ! 0 } ) , t ( e , this ) , arguments . length && this . inject . apply ( e , arguments ) , e . base = r , e } } ) . inject ( { enumerable : ! 1 , initialize : i , set : i , inject : function ( ) { for ( var e = 0 , i = arguments . length ; e < i ; e ++ ) { var n = arguments [ e ] ; n && t ( this , n , n . enumerable , n . beans , n . preserve ) } return this } , extend : function ( ) { var t = a ( this ) ; return t . inject . apply ( t , arguments ) } , each : function ( t , e ) { return f ( this , t , e ) } , clone : function ( ) { return new this . constructor ( this ) } , statics : { set : c , each : f , create : a , define : h , describe : o , clone : function ( t ) { return c ( new t . constructor , t ) } , isPlainObject : function ( t ) { var e = null != t && t . constructor ; return e && ( e === Object || e === i || "Object" === e . name ) } , pick : function ( t , i ) { return t !== e ? t : i } , slice : function ( t , e , i ) { return s . call ( t , e , i ) } } } ) } ; "undefined" != typeof module && ( module . exports = r ) , r . inject ( { enumerable : ! 1 , toString : function ( ) { return null != this . _id ? ( this . _class || "Object" ) + ( this . _name ? " '" + this . _name + "'" : " @" + this . _id ) : "{ " + r . each ( this , function ( t , e ) { if ( ! /^_/ . test ( e ) ) { var i = typeof t ; this . push ( e + ": " + ( "number" === i ? u . instance . number ( t ) : "string" === i ? "'" + t + "'" : t ) ) } } , [ ] ) . join ( ", " ) + " }" } , getClassName : function ( ) { return this . _class || "" } , importJSON : function ( t ) { return r . importJSON ( t , this ) } , exportJSON : function ( t ) { return r . exportJSON ( this , t ) } , toJSON : function ( ) { return r . serialize ( this ) } , set : function ( t , e ) { return t && r . filter ( this , t , e , this . _prioritize ) , this } } , { beans : ! 1 , statics : { exports : { } , extend : function at ( ) { var t = at . base . apply ( this , arguments ) , e = t . prototype . _class ; return e && ! r . exports [ e ] && ( r . exports [ e ] = t ) , t } , equals : function ( t , e ) { if ( t === e ) return ! 0 ; if ( t && t . equals ) return t . equals ( e ) ; if ( e && e . equals ) return e . equals ( t ) ; if ( t && e && "object" == typeof t && "object" == typeof e ) { if ( Array . isArray ( t ) && Array . isArray ( e ) ) { var i = t . length ; if ( i !== e . length ) return ! 1 ; for ( ; i -- ; ) if ( ! r . equals ( t [ i ] , e [ i ] ) ) return ! 1 } else { var n = Object . keys ( t ) , i = n . length ; if ( i !== Object . keys ( e ) . length ) return ! 1 ; for ( ; i -- ; ) { var s = n [ i ] ; if ( ! e . hasOwnProperty ( s ) || ! r . equals ( t [ s ] , e [ s ] ) ) return ! 1 } } return ! 0 } return ! 1 } , read : function ( t , i , n , s ) { if ( this === r ) { var a = this . peek ( t , i ) ; return t . _ _index ++ , a } var o = this . prototype , h = o . _readIndex , u = i || h && t . _ _index || 0 , l = t . length , c = t [ u ] ; if ( s = s || l - u , c instanceof this || n && n . readNull && null == c && s <= 1 ) return h && ( t . _ _
2019-12-15 13:44:31 -05:00
this [ i ] = function ( ) { this . _dontNotify = ! 0 , t [ i ] . apply ( this , arguments ) , this . _dontNotify = ! 1 , this . _owner [ this . _setter ] ( this ) } } , { isSelected : function ( ) { return ! ! ( 2 & this . _owner . _selection ) } , setSelected : function ( t ) { var e = this . _owner ; e . _changeSelection && e . _changeSelection ( 2 , t ) } } ) ) } ) , m = r . extend ( { _class : "Matrix" , initialize : function ut ( t , e ) { var i = arguments , n = i . length , r = ! 0 ; if ( n >= 6 ? this . _set . apply ( this , i ) : 1 === n || 2 === n ? t instanceof ut ? this . _set ( t . _a , t . _b , t . _c , t . _d , t . _tx , t . _ty , e ) : Array . isArray ( t ) ? this . _set . apply ( this , e ? t . concat ( [ e ] ) : t ) : r = ! 1 : n ? r = ! 1 : this . reset ( ) , ! r ) throw new Error ( "Unsupported matrix parameters" ) ; return this } , set : "#initialize" , _set : function ( t , e , i , n , r , s , a ) { return this . _a = t , this . _b = e , this . _c = i , this . _d = n , this . _tx = r , this . _ty = s , a || this . _changed ( ) , this } , _serialize : function ( t , e ) { return r . serialize ( this . getValues ( ) , t , ! 0 , e ) } , _changed : function ( ) { var t = this . _owner ; t && ( t . _applyMatrix ? t . transform ( null , ! 0 ) : t . _changed ( 25 ) ) } , clone : function ( ) { return new m ( this . _a , this . _b , this . _c , this . _d , this . _tx , this . _ty ) } , equals : function ( t ) { return t === this || t && this . _a === t . _a && this . _b === t . _b && this . _c === t . _c && this . _d === t . _d && this . _tx === t . _tx && this . _ty === t . _ty } , toString : function ( ) { var t = u . instance ; return "[[" + [ t . number ( this . _a ) , t . number ( this . _c ) , t . number ( this . _tx ) ] . join ( ", " ) + "], [" + [ t . number ( this . _b ) , t . number ( this . _d ) , t . number ( this . _ty ) ] . join ( ", " ) + "]]" } , reset : function ( t ) { return this . _a = this . _d = 1 , this . _b = this . _c = this . _tx = this . _ty = 0 , t || this . _changed ( ) , this } , apply : function ( t , e ) { var i = this . _owner ; return ! ! i && ( i . transform ( null , r . pick ( t , ! 0 ) , e ) , this . isIdentity ( ) ) } , translate : function ( ) { var t = f . read ( arguments ) , e = t . x , i = t . y ; return this . _tx += e * this . _a + i * this . _c , this . _ty += e * this . _b + i * this . _d , this . _changed ( ) , this } , scale : function ( ) { var t = arguments , e = f . read ( t ) , i = f . read ( t , 0 , { readNull : ! 0 } ) ; return i && this . translate ( i ) , this . _a *= e . x , this . _b *= e . x , this . _c *= e . y , this . _d *= e . y , i && this . translate ( i . negate ( ) ) , this . _changed ( ) , this } , rotate : function ( t ) { t *= Math . PI / 180 ; var e = f . read ( arguments , 1 ) , i = e . x , n = e . y , r = Math . cos ( t ) , s = Math . sin ( t ) , a = i - i * r + n * s , o = n - i * s - n * r , h = this . _a , u = this . _b , l = this . _c , c = this . _d ; return this . _a = r * h + s * l , this . _b = r * u + s * c , this . _c = - s * h + r * l , this . _d = - s * u + r * c , this . _tx += a * h + o * l , this . _ty += a * u + o * c , this . _changed ( ) , this } , shear : function ( ) { var t = arguments , e = f . read ( t ) , i = f . read ( t , 0 , { readNull : ! 0 } ) ; i && this . translate ( i ) ; var n = this . _a , r = this . _b ; return this . _a += e . y * this . _c , this . _b += e . y * this . _d , this . _c += e . x * n , this . _d += e . x * r , i && this . translate ( i . negate ( ) ) , this . _changed ( ) , this } , skew : function ( ) { var t = arguments , e = f . read ( t ) , i = f . read ( t , 0 , { readNull : ! 0 } ) , n = Math . PI / 180 , r = new f ( Math . tan ( e . x * n ) , Math . tan ( e . y * n ) ) ; return this . shear ( r , i ) } , append : function ( t , e ) { if ( t ) { var i = this . _a , n = this . _b , r = this . _c , s = this . _d , a = t . _a , o = t . _c , h = t . _b , u = t . _d , l = t . _tx , c = t . _ty ; this . _a = a * i + h * r , this . _c = o * i + u * r , this . _b = a * n + h * s , this . _d = o * n + u * s , this . _tx += l * i + c * r , this . _ty += l * n + c * s , e || this . _changed ( ) } return this } , prepend : function ( t , e ) { if ( t ) { var i = this . _a , n = this . _b , r = this . _c , s = this . _d , a = this . _tx , o = this . _ty , h = t . _a , u = t . _c , l = t . _b , c = t . _d , f = t . _tx , d = t . _ty ; this . _a = h * i + u * n , this . _c = h * r + u * s , this . _b = l * i + c * n , this . _d = l * r + c * s , this . _tx = h * a + u * o + f , this . _ty = l * a + c * o + d , e || this . _changed ( ) } return this } , appended : function ( t ) { return this . clone ( ) . append ( t ) } , prepended : function ( t ) { return this . clone ( ) . prepend ( t ) } , invert : function ( ) { var t = this . _a , e = this . _b , i = this . _c , n = this . _d , r = this . _tx , s = this . _ty , a = t * n - e * i , o = null ; return a && ! isNaN ( a ) && isFinite ( r ) && isFinite ( s ) && ( this . _a = n / a , this . _b = - e / a , this . _c = - i / a , this . _d = t / a , this . _tx = ( i * s - n * r ) / a , this . _ty = ( e * r - t * s ) / a , o = this ) , o } , inverted : function ( ) { return this . clone ( ) . invert ( ) } , concatenate : "#append" , preConcatenate : "#prepend" , chain : "#appended" , _shiftless : function ( ) { return new m ( this . _a , this . _b , this . _c , this . _d , 0 , 0 ) } , _orNullIfIdentity : function ( ) { return this . isIdentity ( ) ? null : this } , isIdentity : function ( ) { return 1 === this . _a && 0 === this . _b && 0 === this . _c && 1 === this . _d && 0 === this . _tx && 0 === this . _ty } , isInvertible : function ( ) { var t = this . _a * this . _d - this . _c * this . _b ; return t && ! isNaN ( t ) && isFinite ( this . _tx ) && isFinite ( this . _ty ) } , isSingular : function ( ) { return ! this . isInvertible ( ) } , transform : function ( t , e , i ) { return arguments . length < 3 ? this . _transformPoint ( f . read ( arguments ) ) : t
2020-05-23 09:45:04 -04:00
} , localToGlobal : function ( ) { return this . getGlobalMatrix ( ! 0 ) . _transformPoint ( f . read ( arguments ) ) } , parentToLocal : function ( ) { return this . _matrix . _inverseTransform ( f . read ( arguments ) ) } , localToParent : function ( ) { return this . _matrix . _transformPoint ( f . read ( arguments ) ) } , fitBounds : function ( t , e ) { t = v . read ( arguments ) ; var i = this . getBounds ( ) , n = i . height / i . width , r = t . height / t . width , s = ( e ? n > r : n < r ) ? t . width / i . width : t . height / i . height , a = new v ( new f , new _ ( i . width * s , i . height * s ) ) ; a . setCenter ( t . getCenter ( ) ) , this . setBounds ( a ) } } ) , { _setStyles : function ( t , e , i ) { var n = this . _style , r = this . _matrix ; if ( n . hasFill ( ) && ( t . fillStyle = n . getFillColor ( ) . toCanvasStyle ( t , r ) ) , n . hasStroke ( ) ) { t . strokeStyle = n . getStrokeColor ( ) . toCanvasStyle ( t , r ) , t . lineWidth = n . getStrokeWidth ( ) ; var s = n . getStrokeJoin ( ) , a = n . getStrokeCap ( ) , o = n . getMiterLimit ( ) ; if ( s && ( t . lineJoin = s ) , a && ( t . lineCap = a ) , o && ( t . miterLimit = o ) , st . support . nativeDash ) { var h = n . getDashArray ( ) , u = n . getDashOffset ( ) ; h && h . length && ( "setLineDash" in t ? ( t . setLineDash ( h ) , t . lineDashOffset = u ) : ( t . mozDash = h , t . mozDashOffset = u ) ) } } if ( n . hasShadow ( ) ) { var l = e . pixelRatio || 1 , c = i . _shiftless ( ) . prepend ( ( new m ) . scale ( l , l ) ) , d = c . transform ( new f ( n . getShadowBlur ( ) , 0 ) ) , _ = c . transform ( this . getShadowOffset ( ) ) ; t . shadowColor = n . getShadowColor ( ) . toCanvasStyle ( t ) , t . shadowBlur = d . getLength ( ) , t . shadowOffsetX = _ . x , t . shadowOffsetY = _ . y } } , draw : function ( t , e , i ) { this . _updateVersion = this . _project . _updateVersion ; if ( this . _visible && 0 !== this . _opacity ) { var n = e . matrices , r = e . viewMatrix , s = this . _matrix , a = n [ n . length - 1 ] . appended ( s ) ; if ( a . isInvertible ( ) ) { r = r ? r . appended ( a ) : a , n . push ( a ) , e . updateMatrix && ( this . _globalMatrix = a ) ; var o , h , u , c = this . _blendMode , f = l . clamp ( this . _opacity , 0 , 1 ) , d = "normal" === c , _ = it . nativeModes [ c ] , g = d && 1 === f || e . dontStart || e . clip || ( _ || d && f < 1 ) && this . _canComposite ( ) , v = e . pixelRatio || 1 ; if ( ! g ) { var p = this . getStrokeBounds ( r ) ; if ( ! p . width || ! p . height ) return void n . pop ( ) ; u = e . offset , h = e . offset = p . getTopLeft ( ) . floor ( ) , o = t , t = et . getContext ( p . getSize ( ) . ceil ( ) . add ( 1 ) . multiply ( v ) ) , 1 !== v && t . scale ( v , v ) } t . save ( ) ; var m = i ? i . appended ( s ) : this . _canScaleStroke && ! this . getStrokeScaling ( ! 0 ) && r , y = ! g && e . clipItem , w = ! m || y ; if ( g ? ( t . globalAlpha = f , _ && ( t . globalCompositeOperation = c ) ) : w && t . translate ( - h . x , - h . y ) , w && ( g ? s : r ) . applyToContext ( t ) , y && e . clipItem . draw ( t , e . extend ( { clip : ! 0 } ) ) , m ) { t . setTransform ( v , 0 , 0 , v , 0 , 0 ) ; var x = e . offset ; x && t . translate ( - x . x , - x . y ) } this . _draw ( t , e , r , m ) , t . restore ( ) , n . pop ( ) , e . clip && ! e . dontFinish && t . clip ( this . getFillRule ( ) ) , g || ( it . process ( c , t , o , f , h . subtract ( u ) . multiply ( v ) ) , et . release ( t ) , e . offset = u ) } } } , _isUpdated : function ( t ) { var e = this . _parent ; if ( e instanceof B ) return e . _isUpdated ( t ) ; var i = this . _updateVersion === t ; return ! i && e && e . _visible && e . _isUpdated ( t ) && ( this . _updateVersion = t , i = ! 0 ) , i } , _drawSelection : function ( t , e , i , n , r ) { var s = this . _selection , a = 1 & s , o = 2 & s || a && this . _selectBounds , h = 4 & s ; if ( this . _drawSelected || ( a = ! 1 ) , ( a || o || h ) && this . _isUpdated ( r ) ) { var u , l = this . getSelectedColor ( ! 0 ) || ( u = this . getLayer ( ) ) && u . getSelectedColor ( ! 0 ) , c = e . appended ( this . getGlobalMatrix ( ! 0 ) ) , f = i / 2 ; if ( t . strokeStyle = t . fillStyle = l ? l . toCanvasStyle ( t ) : "#009dec" , a && this . _drawSelected ( t , c , n ) , h ) { var d = this . getPosition ( ! 0 ) , _ = this . _parent , g = _ ? _ . localToGlobal ( d ) : d , v = g . x , p = g . y ; t . beginPath ( ) , t . arc ( v , p , f , 0 , 2 * Math . PI , ! 0 ) , t . stroke ( ) ; for ( var m = [ [ 0 , - 1 ] , [ 1 , 0 ] , [ 0 , 1 ] , [ - 1 , 0 ] ] , y = f , w = i + 1 , x = 0 ; x < 4 ; x ++ ) { var b = m [ x ] , C = b [ 0 ] , S = b [ 1 ] ; t . moveTo ( v + C * y , p + S * y ) , t . lineTo ( v + C * w , p + S * w ) , t . stroke ( ) } } if ( o ) { var P = c . _transformCorners ( this . getInternalBounds ( ) ) ; t . beginPath ( ) ; for ( var x = 0 ; x < 8 ; x ++ ) t [ x ? "lineTo" : "moveTo" ] ( P [ x ] , P [ ++ x ] ) ; t . closePath ( ) , t . stroke ( ) ; for ( var x = 0 ; x < 8 ; x ++ ) t . fillRect ( P [ x ] - f , P [ ++ x ] - f , i , i ) } } } , _canComposite : function ( ) { return ! 1 } } , r . each ( [ "down" , "drag" , "up" , "move" ] , function ( t ) { this [ "removeOn" + r . capitalize ( t ) ] = function ( ) { var e = { } ; return e [ t ] = ! 0 , this . removeOn ( e ) } } , { removeOn : function ( t ) { for ( var e in t ) if ( t [ e ] ) { var i = "mouse" + e , n = this . _project , r = n . _removeSets = n . _removeSets || { } ; r [ i ] = r [ i ] || { } , r [ i ] [ this . _id ] = this } return this } } ) , { tween : function ( t , e , i ) { function n ( t ) { o . _handleFrame ( 1e3 * t . time ) , o . running || this . off ( "frame" , n ) } i || ( i = e , e = t , t = null , i || ( i = e , e = null ) ) ; var r = i && i . easing , s = i && i . start , a = null != i && ( "number" == typeof i ? i : i . duration ) , o = new Y ( this , t , e , a , r , s ) ; return a && this . on ( "frame" , n ) , o
var o = r . dot ( r ) , h = r . dot ( e ) / o , u = r . dot ( i ) / o ; return h >= 0 && h <= 1 && u <= 0 && u >= - 1 } } return ! 1 } , isLinear : function ( t , e , i , n ) { var r = n . subtract ( t ) . divide ( 3 ) ; return e . equals ( r ) && i . negate ( ) . equals ( r ) } } , function ( t , e ) { this [ e ] = function ( e ) { var i = this . _segment1 , n = this . _segment2 ; return t ( i . _point , i . _handleOut , n . _handleIn , n . _point , e ) } , this . statics [ e ] = function ( e , i ) { var n = e [ 0 ] , r = e [ 1 ] , s = e [ 6 ] , a = e [ 7 ] ; return t ( new f ( n , r ) , new f ( e [ 2 ] - n , e [ 3 ] - r ) , new f ( e [ 4 ] - s , e [ 5 ] - a ) , new f ( s , a ) , i ) } } , { statics : { } , hasHandles : function ( ) { return ! this . _segment1 . _handleOut . isZero ( ) || ! this . _segment2 . _handleIn . isZero ( ) } , hasLength : function ( t ) { return ( ! this . getPoint1 ( ) . equals ( this . getPoint2 ( ) ) || this . hasHandles ( ) ) && this . getLength ( ) > ( t || 0 ) } , isCollinear : function ( t ) { return t && this . isStraight ( ) && t . isStraight ( ) && this . getLine ( ) . isCollinear ( t . getLine ( ) ) } , isHorizontal : function ( ) { return this . isStraight ( ) && Math . abs ( this . getTangentAtTime ( . 5 ) . y ) < 1e-8 } , isVertical : function ( ) { return this . isStraight ( ) && Math . abs ( this . getTangentAtTime ( . 5 ) . x ) < 1e-8 } } ) , { beans : ! 1 , getLocationAt : function ( t , e ) { return this . getLocationAtTime ( e ? t : this . getTimeAt ( t ) ) } , getLocationAtTime : function ( t ) { return null != t && t >= 0 && t <= 1 ? new A ( this , t ) : null } , getTimeAt : function ( t , e ) { return k . getTimeAt ( this . getValues ( ) , t , e ) } , getParameterAt : "#getTimeAt" , getTimesWithTangent : function ( ) { var t = f . read ( arguments ) ; return t . isZero ( ) ? [ ] : k . getTimesWithTangent ( this . getValues ( ) , t ) } , getOffsetAtTime : function ( t ) { return this . getPartLength ( 0 , t ) } , getLocationOf : function ( ) { return this . getLocationAtTime ( this . getTimeOf ( f . read ( arguments ) ) ) } , getOffsetOf : function ( ) { var t = this . getLocationOf . apply ( this , arguments ) ; return t ? t . getOffset ( ) : null } , getTimeOf : function ( ) { return k . getTimeOf ( this . getValues ( ) , f . read ( arguments ) ) } , getParameterOf : "#getTimeOf" , getNearestLocation : function ( ) { var t = f . read ( arguments ) , e = this . getValues ( ) , i = k . getNearestTime ( e , t ) , n = k . getPoint ( e , i ) ; return new A ( this , i , n , null , t . getDistance ( n ) ) } , getNearestPoint : function ( ) { var t = this . getNearestLocation . apply ( this , arguments ) ; return t ? t . getPoint ( ) : t } } , new function ( ) { var t = [ "getPoint" , "getTangent" , "getNormal" , "getWeightedTangent" , "getWeightedNormal" , "getCurvature" ] ; return r . each ( t , function ( t ) { this [ t + "At" ] = function ( e , i ) { var n = this . getValues ( ) ; return k [ t ] ( n , i ? e : k . getTimeAt ( n , e ) ) } , this [ t + "AtTime" ] = function ( e ) { return k [ t ] ( this . getValues ( ) , e ) } } , { statics : { _evaluateMethods : t } } ) } , new function ( ) { function t ( t ) { var e = t [ 0 ] , i = t [ 1 ] , n = t [ 2 ] , r = t [ 3 ] , s = t [ 4 ] , a = t [ 5 ] , o = t [ 6 ] , h = t [ 7 ] , u = 9 * ( n - s ) + 3 * ( o - e ) , l = 6 * ( e + s ) - 12 * n , c = 3 * ( n - e ) , f = 9 * ( r - a ) + 3 * ( h - i ) , d = 6 * ( i + a ) - 12 * r , _ = 3 * ( r - i ) ; return function ( t ) { var e = ( u * t + l ) * t + c , i = ( f * t + d ) * t + _ ; return Math . sqrt ( e * e + i * i ) } } function i ( t , e ) { return Math . max ( 2 , Math . min ( 16 , Math . ceil ( 32 * Math . abs ( e - t ) ) ) ) } function n ( t , e , i , n ) { if ( null == e || e < 0 || e > 1 ) return null ; var r = t [ 0 ] , s = t [ 1 ] , a = t [ 2 ] , o = t [ 3 ] , h = t [ 4 ] , u = t [ 5 ] , c = t [ 6 ] , d = t [ 7 ] , _ = l . isZero ; _ ( a - r ) && _ ( o - s ) && ( a = r , o = s ) , _ ( h - c ) && _ ( u - d ) && ( h = c , u = d ) ; var g , v , p = 3 * ( a - r ) , m = 3 * ( h - a ) - p , y = c - r - p - m , w = 3 * ( o - s ) , x = 3 * ( u - o ) - w , b = d - s - w - x ; if ( 0 === i ) g = 0 === e ? r : 1 === e ? c : ( ( y * e + m ) * e + p ) * e + r , v = 0 === e ? s : 1 === e ? d : ( ( b * e + x ) * e + w ) * e + s ; else { var C = 1e-8 , S = 1 - C ; if ( e < C ? ( g = p , v = w ) : e > S ? ( g = 3 * ( c - h ) , v = 3 * ( d - u ) ) : ( g = ( 3 * y * e + 2 * m ) * e + p , v = ( 3 * b * e + 2 * x ) * e + w ) , n ) { 0 === g && 0 === v && ( e < C || e > S ) && ( g = h - a , v = u - o ) ; var P = Math . sqrt ( g * g + v * v ) ; P && ( g /= P , v /= P ) } if ( 3 === i ) { var h = 6 * y * e + 2 * m , u = 6 * b * e + 2 * x , I = Math . pow ( g * g + v * v , 1.5 ) ; g = 0 !== I ? ( g * u - v * h ) / I : 0 , v = 0 } } return 2 === i ? new f ( v , ( - g ) ) : new f ( g , v ) } return { statics : { classify : function ( t ) { function i ( t , i , n ) { var r = i !== e , s = r && i > 0 && i < 1 , a = r && n > 0 && n < 1 ; return ! r || ( s || a ) && ( "loop" !== t || s && a ) || ( t = "arch" , s = a = ! 1 ) , { type : t , roots : s || a ? s && a ? i < n ? [ i , n ] : [ n , i ] : [ s ? i : n ] : null } } var n = t [ 0 ] , r = t [ 1 ] , s = t [ 2 ] , a = t [ 3 ] , o = t [ 4 ] , h = t [ 5 ] , u = t [ 6 ] , c = t [ 7 ] , f = n * ( c - h ) + r * ( o - u ) + u * h - c * o , d = s * ( r - c ) + a * ( u - n ) + n * c - r * u , _ = o * ( a - r ) + h * ( n - s ) + s * r - a * n , g = 3 * _ , v = g - d , p = v - d + f , m = Math . sqrt ( p * p + v * v + g * g ) , y = 0 !== m ? 1 / m : 0 , w = l . isZero , x = "serpentine" ; if ( p *= y , v *= y , g *= y , w ( p ) ) return w ( v ) ? i ( w ( g ) ? "line" : "quadratic" ) : i ( x , g / ( 3 * v ) ) ; var b = 3 * v * v - 4 * p * g ; if ( w ( b ) ) return i ( "cusp" , v / ( 2 * p ) ) ; var C = b > 0 ? Math . sqrt ( b / 3 ) : Math . sqrt ( - b ) , S = 2 * p ; return i ( b > 0 ? x : "loop" , ( v + C ) / S , ( v - C ) / S ) } , getLength : function ( n , r , s , a ) { if ( r === e && ( r = 0 ) , s === e && ( s = 1 ) , k . isStraight ( n ) ) { var o = n ; s < 1 && ( o = k . subdivide ( o , s ) [ 0 ] , r /= s ) , r > 0 && ( o = k . subdivide ( o , r ) [ 1 ] ) ; var h = o [ 6 ] - o [ 0 ] , u = o [ 7 ] - o [ 1 ] ; ret
var l = i + a . getOffsetAtTime ( o [ h ] ) ; e . indexOf ( l ) < 0 && e . push ( l ) } i += a . length } return e } } ) , new function ( ) { function t ( t , e , i , n ) { function r ( e ) { var i = l [ e ] , n = l [ e + 1 ] ; s == i && a == n || ( t . beginPath ( ) , t . moveTo ( s , a ) , t . lineTo ( i , n ) , t . stroke ( ) , t . beginPath ( ) , t . arc ( i , n , o , 0 , 2 * Math . PI , ! 0 ) , t . fill ( ) ) } if ( ! ( n <= 0 ) ) for ( var s , a , o = n / 2 , h = n - 2 , u = o - 1 , l = new Array ( 6 ) , c = 0 , f = e . length ; c < f ; c ++ ) { var d = e [ c ] , _ = d . _selection ; if ( d . _transformCoordinates ( i , l ) , s = l [ 0 ] , a = l [ 1 ] , 2 & _ && r ( 2 ) , 4 & _ && r ( 4 ) , t . fillRect ( s - o , a - o , n , n ) , h > 0 && ! ( 1 & _ ) ) { var g = t . fillStyle ; t . fillStyle = "#ffffff" , t . fillRect ( s - u , a - u , h , h ) , t . fillStyle = g } } } function e ( t , e , i ) { function n ( e ) { if ( i ) e . _transformCoordinates ( i , _ ) , r = _ [ 0 ] , s = _ [ 1 ] ; else { var n = e . _point ; r = n . _x , s = n . _y } if ( g ) t . moveTo ( r , s ) , g = ! 1 ; else { if ( i ) h = _ [ 2 ] , u = _ [ 3 ] ; else { var f = e . _handleIn ; h = r + f . _x , u = s + f . _y } h === r && u === s && l === a && c === o ? t . lineTo ( r , s ) : t . bezierCurveTo ( l , c , h , u , r , s ) } if ( a = r , o = s , i ) l = _ [ 4 ] , c = _ [ 5 ] ; else { var f = e . _handleOut ; l = a + f . _x , c = o + f . _y } } for ( var r , s , a , o , h , u , l , c , f = e . _segments , d = f . length , _ = new Array ( 6 ) , g = ! 0 , v = 0 ; v < d ; v ++ ) n ( f [ v ] ) ; e . _closed && d > 0 && n ( f [ 0 ] ) } return { _draw : function ( t , i , n , r ) { function s ( t ) { return c [ ( t % f + f ) % f ] } var a = i . dontStart , o = i . dontFinish || i . clip , h = this . getStyle ( ) , u = h . hasFill ( ) , l = h . hasStroke ( ) , c = h . getDashArray ( ) , f = ! st . support . nativeDash && l && c && c . length ; if ( a || t . beginPath ( ) , ( u || l && ! f || o ) && ( e ( t , this , r ) , this . _closed && t . closePath ( ) ) , ! o && ( u || l ) && ( this . _setStyles ( t , i , n ) , u && ( t . fill ( h . getFillRule ( ) ) , t . shadowColor = "rgba(0,0,0,0)" ) , l ) ) { if ( f ) { a || t . beginPath ( ) ; var d , _ = new E ( this , . 25 , 32 , ( ! 1 ) , r ) , g = _ . length , v = - h . getDashOffset ( ) , p = 0 ; for ( v %= g ; v > 0 ; ) v -= s ( p -- ) + s ( p -- ) ; for ( ; v < g ; ) d = v + s ( p ++ ) , ( v > 0 || d > 0 ) && _ . drawPart ( t , Math . max ( v , 0 ) , Math . max ( d , 0 ) ) , v = d + s ( p ++ ) } t . stroke ( ) } } , _drawSelected : function ( i , n ) { i . beginPath ( ) , e ( i , this , n ) , i . stroke ( ) , t ( i , this . _segments , n , st . settings . handleSize ) } } } , new function ( ) { function t ( t ) { var e = t . _segments ; if ( ! e . length ) throw new Error ( "Use a moveTo() command first" ) ; return e [ e . length - 1 ] } return { moveTo : function ( ) { var t = this . _segments ; 1 === t . length && this . removeSegment ( 0 ) , t . length || this . _add ( [ new O ( f . read ( arguments ) ) ] ) } , moveBy : function ( ) { throw new Error ( "moveBy() is unsupported on Path items." ) } , lineTo : function ( ) { this . _add ( [ new O ( f . read ( arguments ) ) ] ) } , cubicCurveTo : function ( ) { var e = arguments , i = f . read ( e ) , n = f . read ( e ) , r = f . read ( e ) , s = t ( this ) ; s . setHandleOut ( i . subtract ( s . _point ) ) , this . _add ( [ new O ( r , n . subtract ( r ) ) ] ) } , quadraticCurveTo : function ( ) { var e = arguments , i = f . read ( e ) , n = f . read ( e ) , r = t ( this ) . _point ; this . cubicCurveTo ( i . add ( r . subtract ( i ) . multiply ( 1 / 3 ) ) , i . add ( n . subtract ( i ) . multiply ( 1 / 3 ) ) , n ) } , curveTo : function ( ) { var e = arguments , i = f . read ( e ) , n = f . read ( e ) , s = r . pick ( r . read ( e ) , . 5 ) , a = 1 - s , o = t ( this ) . _point , h = i . subtract ( o . multiply ( a * a ) ) . subtract ( n . multiply ( s * s ) ) . divide ( 2 * s * a ) ; if ( h . isNaN ( ) ) throw new Error ( "Cannot put a curve through points with parameter = " + s ) ; this . quadraticCurveTo ( h , n ) } , arcTo : function ( ) { var e , i , n , s , a , o = arguments , h = Math . abs , u = Math . sqrt , c = t ( this ) , d = c . _point , g = f . read ( o ) , v = r . peek ( o ) , p = r . pick ( v , ! 0 ) ; if ( "boolean" == typeof p ) var w = d . add ( g ) . divide ( 2 ) , e = w . add ( w . subtract ( d ) . rotate ( p ? - 90 : 90 ) ) ; else if ( r . remain ( o ) <= 2 ) e = g , g = f . read ( o ) ; else if ( ! d . equals ( g ) ) { var x = _ . read ( o ) , b = l . isZero ; if ( b ( x . width ) || b ( x . height ) ) return this . lineTo ( g ) ; var C = r . read ( o ) , p = ! ! r . read ( o ) , S = ! ! r . read ( o ) , w = d . add ( g ) . divide ( 2 ) , P = d . subtract ( w ) . rotate ( - C ) , I = P . x , M = P . y , T = h ( x . width ) , z = h ( x . height ) , k = T * T , A = z * z , L = I * I , N = M * M , B = u ( L / k + N / A ) ; if ( B > 1 && ( T *= B , z *= B , k = T * T , A = z * z ) , B = ( k * A - k * N - A * L ) / ( k * N + A * L ) , h ( B ) < 1e-12 && ( B = 0 ) , B < 0 ) throw new Error ( "Cannot create an arc with the given arguments" ) ; i = new f ( T * M / z , - z * I / T ) . multiply ( ( S === p ? - 1 : 1 ) * u ( B ) ) . rotate ( C ) . add ( w ) , a = ( new m ) . translate ( i ) . rotate ( C ) . scale ( T , z ) , s = a . _inverseTransform ( d ) , n = s . getDirectedAngle ( a . _inverseTransform ( g ) ) , ! p && n > 0 ? n -= 360 : p && n < 0 && ( n += 360 ) } if ( e ) { var E = new y ( d . add ( e ) . divide ( 2 ) , e . subtract ( d ) . rotate ( 90 ) , ( ! 0 ) ) , j = new y ( e . add ( g ) . divide ( 2 ) , g . subtract ( e ) . rotate ( 90 ) , ( ! 0 ) ) , F = new y ( d , g ) , D = F . getSide ( e ) ; if ( i = E . intersect ( j , ! 0 ) , ! i ) { if ( ! D ) return this . lineTo ( g ) ; throw new Error ( "Cannot create an arc with the given arguments" ) } s = d . subtract ( i ) , n = s . getDirectedAngle ( g . subtract ( i ) ) ; var R = F . getSide ( i , ! 0 ) ; 0 === R ? n = D * h ( n ) : D === R && ( n += n < 0 ? 360 : - 360 ) } if ( n ) { for ( var q = 1e-7 , V = h ( n ) , H = V >= 360 ? 4 : Math . ceil ( ( V - q ) / 90 ) , Z = n / H , U = Z * M
Array . isArray ( e ) && ( u = e , e = u [ 0 ] ) ; var d = null != e && typeof e ; if ( "string" === d && e in n && ( i = e , e = u [ 1 ] , Array . isArray ( e ) ? ( a = e , o = u [ 2 ] ) : ( c && ( f = 1 ) , u = r . slice ( u , 1 ) , d = typeof e ) ) , ! a ) { if ( h = "number" === d ? u : "object" === d && null != e . length ? e : null ) { i || ( i = h . length >= 3 ? "rgb" : "gray" ) ; var _ = n [ i ] . length ; o = h [ _ ] , c && ( f += h === arguments ? _ + ( null != o ? 1 : 0 ) : 1 ) , h . length > _ && ( h = r . slice ( h , 0 , _ ) ) } else if ( "string" === d ) { var g = t ( e ) ; i = g [ 0 ] , a = g [ 1 ] , 4 === a . length && ( o = a [ 3 ] , a . length -- ) } else if ( "object" === d ) if ( e . constructor === l ) { if ( i = e . _type , a = e . _components . slice ( ) , o = e . _alpha , "gradient" === i ) for ( var v = 1 , p = a . length ; v < p ; v ++ ) { var m = a [ v ] ; m && ( a [ v ] = m . clone ( ) ) } } else if ( e . constructor === q ) i = "gradient" , h = u ; else { i = "hue" in e ? "lightness" in e ? "hsl" : "hsb" : "gradient" in e || "stops" in e || "radial" in e ? "gradient" : "gray" in e ? "gray" : "rgb" ; var y = n [ i ] , w = s [ i ] ; this . _components = a = [ ] ; for ( var v = 0 , p = y . length ; v < p ; v ++ ) { var x = e [ y [ v ] ] ; null == x && ! v && "gradient" === i && "stops" in e && ( x = { stops : e . stops , radial : e . radial } ) , x = w [ v ] . call ( this , x ) , null != x && ( a [ v ] = x ) } o = e . alpha } c && i && ( f = 1 ) } if ( this . _type = i || "rgb" , ! a ) { this . _components = a = [ ] ; for ( var w = s [ this . _type ] , v = 0 , p = w . length ; v < p ; v ++ ) { var x = w [ v ] . call ( this , h && h [ v ] ) ; null != x && ( a [ v ] = x ) } } return this . _components = a , this . _properties = n [ this . _type ] , this . _alpha = o , c && ( this . _ _read = f ) , this } , set : "#initialize" , _serialize : function ( t , e ) { var i = this . getComponents ( ) ; return r . serialize ( /^(gray|rgb)$/ . test ( this . _type ) ? i : [ this . _type ] . concat ( i ) , t , ! 0 , e ) } , _changed : function ( ) { this . _canvasStyle = null , this . _owner && ( this . _setter ? this . _owner [ this . _setter ] ( this ) : this . _owner . _changed ( 129 ) ) } , _convert : function ( t ) { var e ; return this . _type === t ? this . _components . slice ( ) : ( e = h [ this . _type + "-" + t ] ) ? e . apply ( this , this . _components ) : h [ "rgb-" + t ] . apply ( this , h [ this . _type + "-rgb" ] . apply ( this , this . _components ) ) } , convert : function ( t ) { return new R ( t , this . _convert ( t ) , this . _alpha ) } , getType : function ( ) { return this . _type } , setType : function ( t ) { this . _components = this . _convert ( t ) , this . _properties = n [ t ] , this . _type = t } , getComponents : function ( ) { var t = this . _components . slice ( ) ; return null != this . _alpha && t . push ( this . _alpha ) , t } , getAlpha : function ( ) { return null != this . _alpha ? this . _alpha : 1 } , setAlpha : function ( t ) { this . _alpha = null == t ? null : Math . min ( Math . max ( t , 0 ) , 1 ) , this . _changed ( ) } , hasAlpha : function ( ) { return null != this . _alpha } , equals : function ( t ) { var e = r . isPlainValue ( t , ! 0 ) ? R . read ( arguments ) : t ; return e === this || e && this . _class === e . _class && this . _type === e . _type && this . getAlpha ( ) === e . getAlpha ( ) && r . equals ( this . _components , e . _components ) || ! 1 } , toString : function ( ) { for ( var t = this . _properties , e = [ ] , i = "gradient" === this . _type , n = u . instance , r = 0 , s = t . length ; r < s ; r ++ ) { var a = this . _components [ r ] ; null != a && e . push ( t [ r ] + ": " + ( i ? a : n . number ( a ) ) ) } return null != this . _alpha && e . push ( "alpha: " + n . number ( this . _alpha ) ) , "{ " + e . join ( ", " ) + " }" } , toCSS : function ( t ) { function e ( t ) { return Math . round ( 255 * ( t < 0 ? 0 : t > 1 ? 1 : t ) ) } var i = this . _convert ( "rgb" ) , n = t || null == this . _alpha ? 1 : this . _alpha ; return i = [ e ( i [ 0 ] ) , e ( i [ 1 ] ) , e ( i [ 2 ] ) ] , n < 1 && i . push ( n < 0 ? 0 : n ) , t ? "#" + ( ( 1 << 24 ) + ( i [ 0 ] << 16 ) + ( i [ 1 ] << 8 ) + i [ 2 ] ) . toString ( 16 ) . slice ( 1 ) : ( 4 == i . length ? "rgba(" : "rgb(" ) + i . join ( "," ) + ")" } , toCanvasStyle : function ( t , e ) { if ( this . _canvasStyle ) return this . _canvasStyle ; if ( "gradient" !== this . _type ) return this . _canvasStyle = this . toCSS ( ) ; var i , n = this . _components , r = n [ 0 ] , s = r . _stops , a = n [ 1 ] , o = n [ 2 ] , h = n [ 3 ] , u = e && e . inverted ( ) ; if ( u && ( a = u . _transformPoint ( a ) , o = u . _transformPoint ( o ) , h && ( h = u . _transformPoint ( h ) ) ) , r . _radial ) { var l = o . getDistance ( a ) ; if ( h ) { var c = h . subtract ( a ) ; c . getLength ( ) > l && ( h = a . add ( c . normalize ( l - . 1 ) ) ) } var f = h || a ; i = t . createRadialGradient ( f . x , f . y , 0 , a . x , a . y , l ) } else i = t . createLinearGradient ( a . x , a . y , o . x , o . y ) ; for ( var d = 0 , _ = s . length ; d < _ ; d ++ ) { var g = s [ d ] , v = g . _offset ; i . addColorStop ( null == v ? d / ( _ - 1 ) : v , g . _color . toCanvasStyle ( ) ) } return this . _canvasStyle = i } , transform : function ( t ) { if ( "gradient" === this . _type ) { for ( var e = this . _components , i = 1 , n = e . length ; i < n ; i ++ ) { var r = e [ i ] ; t . _transformPoint ( r , r , ! 0 ) } this . _changed ( ) } } , statics : { _types : n , random : function ( ) { var t = Math . random ; return new R ( t ( ) , t ( ) , t ( ) ) } , _setOwner : function ( t , e , i ) { return t && ( t . _owner && e && t . _owner !== e && ( t = t . clone ( ) ) , ! t . _owner ^ ! e && ( t . _owner = e || null , t . _setter = i || null ) ) , t } } } ) } , new function ( ) { var t = { add : function ( t , e ) { return t + e } , subtract : func
2020-05-23 07:44:20 -04:00
return r . width === t && r . height === e ? s && a . clearRect ( 0 , 0 , t + 1 , e + 1 ) : ( r . width = t , r . height = e ) , a . save ( ) , r } , getContext : function ( t , e ) { var i = this . getCanvas ( t , e ) ; return i ? i . getContext ( "2d" ) : null } , release : function ( t ) { var e = t && t . canvas ? t . canvas : t ; e && e . getContext && ( e . getContext ( "2d" ) . restore ( ) , this . canvases . push ( e ) ) } } , it = new function ( ) { function t ( t , e , i ) { return . 2989 * t + . 587 * e + . 114 * i } function e ( e , i , n , r ) { var s = r - t ( e , i , n ) ; d = e + s , _ = i + s , g = n + s ; var r = t ( d , _ , g ) , a = v ( d , _ , g ) , o = p ( d , _ , g ) ; if ( a < 0 ) { var h = r - a ; d = r + ( d - r ) * r / h , _ = r + ( _ - r ) * r / h , g = r + ( g - r ) * r / h } if ( o > 255 ) { var u = 255 - r , l = o - r ; d = r + ( d - r ) * u / l , _ = r + ( _ - r ) * u / l , g = r + ( g - r ) * u / l } } function i ( t , e , i ) { return p ( t , e , i ) - v ( t , e , i ) } function n ( t , e , i , n ) { var r , s = [ t , e , i ] , a = p ( t , e , i ) , o = v ( t , e , i ) ; o = o === t ? 0 : o === e ? 1 : 2 , a = a === t ? 0 : a === e ? 1 : 2 , r = 0 === v ( o , a ) ? 1 === p ( o , a ) ? 2 : 1 : 0 , s [ a ] > s [ o ] ? ( s [ r ] = ( s [ r ] - s [ o ] ) * n / ( s [ a ] - s [ o ] ) , s [ a ] = n ) : s [ r ] = s [ a ] = 0 , s [ o ] = 0 , d = s [ 0 ] , _ = s [ 1 ] , g = s [ 2 ] } var s , a , o , h , u , l , c , f , d , _ , g , v = Math . min , p = Math . max , m = Math . abs , y = { multiply : function ( ) { d = u * s / 255 , _ = l * a / 255 , g = c * o / 255 } , screen : function ( ) { d = u + s - u * s / 255 , _ = l + a - l * a / 255 , g = c + o - c * o / 255 } , overlay : function ( ) { d = u < 128 ? 2 * u * s / 255 : 255 - 2 * ( 255 - u ) * ( 255 - s ) / 255 , _ = l < 128 ? 2 * l * a / 255 : 255 - 2 * ( 255 - l ) * ( 255 - a ) / 255 , g = c < 128 ? 2 * c * o / 255 : 255 - 2 * ( 255 - c ) * ( 255 - o ) / 255 } , "soft-light" : function ( ) { var t = s * u / 255 ; d = t + u * ( 255 - ( 255 - u ) * ( 255 - s ) / 255 - t ) / 255 , t = a * l / 255 , _ = t + l * ( 255 - ( 255 - l ) * ( 255 - a ) / 255 - t ) / 255 , t = o * c / 255 , g = t + c * ( 255 - ( 255 - c ) * ( 255 - o ) / 255 - t ) / 255 } , "hard-light" : function ( ) { d = s < 128 ? 2 * s * u / 255 : 255 - 2 * ( 255 - s ) * ( 255 - u ) / 255 , _ = a < 128 ? 2 * a * l / 255 : 255 - 2 * ( 255 - a ) * ( 255 - l ) / 255 , g = o < 128 ? 2 * o * c / 255 : 255 - 2 * ( 255 - o ) * ( 255 - c ) / 255 } , "color-dodge" : function ( ) { d = 0 === u ? 0 : 255 === s ? 255 : v ( 255 , 255 * u / ( 255 - s ) ) , _ = 0 === l ? 0 : 255 === a ? 255 : v ( 255 , 255 * l / ( 255 - a ) ) , g = 0 === c ? 0 : 255 === o ? 255 : v ( 255 , 255 * c / ( 255 - o ) ) } , "color-burn" : function ( ) { d = 255 === u ? 255 : 0 === s ? 0 : p ( 0 , 255 - 255 * ( 255 - u ) / s ) , _ = 255 === l ? 255 : 0 === a ? 0 : p ( 0 , 255 - 255 * ( 255 - l ) / a ) , g = 255 === c ? 255 : 0 === o ? 0 : p ( 0 , 255 - 255 * ( 255 - c ) / o ) } , darken : function ( ) { d = u < s ? u : s , _ = l < a ? l : a , g = c < o ? c : o } , lighten : function ( ) { d = u > s ? u : s , _ = l > a ? l : a , g = c > o ? c : o } , difference : function ( ) { d = u - s , d < 0 && ( d = - d ) , _ = l - a , _ < 0 && ( _ = - _ ) , g = c - o , g < 0 && ( g = - g ) } , exclusion : function ( ) { d = u + s * ( 255 - u - u ) / 255 , _ = l + a * ( 255 - l - l ) / 255 , g = c + o * ( 255 - c - c ) / 255 } , hue : function ( ) { n ( s , a , o , i ( u , l , c ) ) , e ( d , _ , g , t ( u , l , c ) ) } , saturation : function ( ) { n ( u , l , c , i ( s , a , o ) ) , e ( d , _ , g , t ( u , l , c ) ) } , luminosity : function ( ) { e ( u , l , c , t ( s , a , o ) ) } , color : function ( ) { e ( s , a , o , t ( u , l , c ) ) } , add : function ( ) { d = v ( u + s , 255 ) , _ = v ( l + a , 255 ) , g = v ( c + o , 255 ) } , subtract : function ( ) { d = p ( u - s , 0 ) , _ = p ( l - a , 0 ) , g = p ( c - o , 0 ) } , average : function ( ) { d = ( u + s ) / 2 , _ = ( l + a ) / 2 , g = ( c + o ) / 2 } , negation : function ( ) { d = 255 - m ( 255 - s - u ) , _ = 255 - m ( 255 - a - l ) , g = 255 - m ( 255 - o - c ) } } , w = this . nativeModes = r . each ( [ "source-over" , "source-in" , "source-out" , "source-atop" , "destination-over" , "destination-in" , "destination-out" , "destination-atop" , "lighter" , "darker" , "copy" , "xor" ] , function ( t ) { this [ t ] = ! 0 } , { } ) , x = et . getContext ( 1 , 1 ) ; x && ( r . each ( y , function ( t , e ) { var i = "darken" === e , n = ! 1 ; x . save ( ) ; try { x . fillStyle = i ? "#300" : "#a00" , x . fillRect ( 0 , 0 , 1 , 1 ) , x . globalCompositeOperation = e , x . globalCompositeOperation === e && ( x . fillStyle = i ? "#a00" : "#300" , x . fillRect ( 0 , 0 , 1 , 1 ) , n = x . getImageData ( 0 , 0 , 1 , 1 ) . data [ 0 ] !== i ? 170 : 51 ) } catch ( r ) { } x . restore ( ) , w [ e ] = n } ) , et . release ( x ) ) , this . process = function ( t , e , i , n , r ) { var v = e . canvas , p = "normal" === t ; if ( p || w [ t ] ) i . save ( ) , i . setTransform ( 1 , 0 , 0 , 1 , 0 , 0 ) , i . globalAlpha = n , p || ( i . globalCompositeOperation = t ) , i . drawImage ( v , r . x , r . y ) , i . restore ( ) ; else { var m = y [ t ] ; if ( ! m ) return ; for ( var x = i . getImageData ( r . x , r . y , v . width , v . height ) , b = x . data , C = e . getImageData ( 0 , 0 , v . width , v . height ) . data , S = 0 , P = b . length ; S < P ; S += 4 ) { s = C [ S ] , u = b [ S ] , a = C [ S + 1 ] , l = b [ S + 1 ] , o = C [ S + 2 ] , c = b [ S + 2 ] , h = C [ S + 3 ] , f = b [ S + 3 ] , m ( ) ; var I = h * n / 255 , M = 1 - I ; b [ S ] = I * d + M * u , b [ S + 1 ] = I * _ + M * l , b [ S + 2 ] = I * g + M * c , b [ S + 3 ] = h * n + M * f } i . putImageData ( x , r . x , r . y ) } } } , nt = new function ( ) { function t ( t , e , s ) { return i ( n . createElementNS ( r , t ) , e , s ) } function e ( t , e ) { var i = o [ e ] , n = i ? t . getAttributeNS ( i , e ) : t . getAttribute ( e ) ; return "null" === n ? null : n } function i ( t , e , i ) { for ( var n in e ) { var r = e [ n ] , s = o [ n ] ; "number" == typeof r && i && ( r = i . number ( r ) ) , s ? t . setAttributeNS ( s , n , r ) : t . setAttribute ( n , r ) } return t } var r = "http://www.w3.org/2000/svg" , s = "http://www.w3.org/2000/xmlns" , a = "http://www.w3.org/1999/xlink" , o = { href : a , xlink : s , xmlns : s + "/" , "xmlns:xlink" : s + "/" } ; return { svg : r , xmlns : s , xlink : a , create : t , get : e , set :