/ *
* Copyright ( c ) Ascensio System SIA 2019. All rights reserved
*
* http : //www.onlyoffice.com
*
* Version : 0.0 . 0 ( build : 0 )
* /
function onDropDownKeyDown ( t ) { var e = $ ( this ) , i = e . parent ( ) , n = jQuery . Event ( "keydown.before.bs.dropdown" ) , o = jQuery . Event ( "keydown.after.bs.dropdown" ) ; i . trigger ( n ) , i . hasClass ( "no-stop-propagate" ) ? ( arguments . length > 1 && arguments [ 1 ] instanceof KeyboardEvent && ( t = arguments [ 1 ] ) , ! /^(38|40|27|13|9|37|39)$/ . test ( t . keyCode ) || t . ctrlKey || t . altKey || ( patchDropDownKeyDownAdditional . call ( this , t ) , /(37|39)/ . test ( t . keyCode ) || ( t . preventDefault ( ) , t . stopPropagation ( ) ) ) ) : ( patchDropDownKeyDown . call ( this , t ) , t . preventDefault ( ) , t . stopPropagation ( ) ) , i . trigger ( o ) } function patchDropDownKeyDown ( t ) { if ( /(38|40|27|37|39)/ . test ( t . keyCode ) ) { var e = $ ( this ) ; if ( t . preventDefault ( ) , t . stopPropagation ( ) , ! e . is ( ".disabled, :disabled" ) ) { var i = getParent ( e ) , n = i . hasClass ( "open" ) || i . hasClass ( "over" ) ; if ( ! n || n && 27 == t . keyCode ) { if ( 27 == t . which ) { if ( o = $ ( "[role=menu] li.dropdown-submenu.over:visible" , i ) , o . size ( ) ) return o . eq ( o . size ( ) - 1 ) . removeClass ( "over" ) , ! 1 ; i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) ? ( i . removeClass ( "over" ) , i . find ( "> a" ) . focus ( ) ) : i . find ( "[data-toggle=dropdown]" ) . focus ( ) } return n ? e . click ( ) : void 0 } var o = $ ( "> [role=menu] > li:not(.divider):not(.disabled):visible" , i ) . find ( "> a" ) ; if ( o . length ) { var s = o . index ( o . filter ( ":focus" ) ) ; if ( 39 == t . keyCode ) { if ( s < 0 ) return ; var a = o . eq ( s ) . parent ( ) ; a . hasClass ( "dropdown-submenu" ) && ! a . hasClass ( "over" ) && ( a . mouseenter ( ) , a . addClass ( "focused-submenu" ) , _ . delay ( function ( ) { var t = $ ( "> [role=menu]" , a ) , e = t . find ( "> li:not(.divider):not(.disabled):visible > a" ) , i = 0 ; if ( t . find ( "> .menu-scroll" ) . length > 0 ) for ( var n = t . scrollTop ( ) , o = 0 ; o < e . length ; o ++ ) if ( e [ o ] . offsetTop > n ) { i = o ; break } e . length > 0 && e . eq ( i ) . focus ( ) } , 250 ) ) } else 37 == t . keyCode ? i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) && ( i . removeClass ( "over" ) , i . find ( "> a" ) . focus ( ) ) : ( 38 == t . keyCode ? s > 0 ? s -- : s = e . hasClass ( "no-cyclic" ) ? 0 : o . length - 1 : 40 == t . keyCode && ( s < o . length - 1 ? s ++ : s = e . hasClass ( "no-cyclic" ) ? o . length - 1 : 0 ) , ~ s || ( s = 0 ) , i . hasClass ( "dropdown-submenu" ) && i . hasClass ( "over" ) && i . addClass ( "focused-submenu" ) , o . eq ( s ) . focus ( ) ) } } } } function patchDropDownKeyDownAdditional ( t ) { if ( /(38|40|27|37|39)/ . test ( t . keyCode ) ) { var e = $ ( this ) ; if ( /(37|39)/ . test ( t . keyCode ) || ( t . preventDefault ( ) , t . stopPropagation ( ) ) , ! e . is ( ".disabled, :disabled" ) ) { var i = getParent ( e ) , n = i . hasClass ( "open" ) || i . hasClass ( "over" ) ; if ( ! n || n && ( 27 == t . keyCode || 37 == t . keyCode || 39 == t . keyCode ) ) return n ? e . click ( ) : void 0 ; var o = $ ( "> [role=menu] > li:not(.divider):not(.disabled):visible" , i ) . find ( "> a" ) ; if ( o . length ) { var s = o . index ( o . filter ( ".focus" ) ) ; 38 == t . keyCode ? s > 0 ? s -- : s = e . hasClass ( "no-cyclic" ) ? 0 : o . length - 1 : 40 == t . keyCode && ( s < o . length - 1 ? s ++ : s = e . hasClass ( "no-cyclic" ) ? o . length - 1 : 0 ) , ~ s || ( s = 0 ) , o . removeClass ( "focus" ) , o . eq ( s ) . addClass ( "focus" ) } } } } function getParent ( t ) { var e = t . attr ( "data-target" ) ; e || ( e = t . attr ( "href" ) , e = e && /#/ . test ( e ) && e . replace ( /.*(?=#[^\s]*$)/ , "" ) ) ; var i = e && $ ( e ) ; return i && i . length ? i : t . parent ( ) } function clearMenus ( t ) { $ ( ".dropdown-toggle" ) . each ( function ( e ) { var i = $ ( this ) . parent ( ) ; i . hasClass ( "open" ) && ( i . trigger ( e = $ . Event ( "hide.bs.dropdown" ) ) , e . isDefaultPrevented ( ) || i . removeClass ( "open" ) . trigger ( "hidden.bs.dropdown" , t ) ) } ) } if ( function ( ) { var t = this , e = t . _ , i = { } , n = Array . prototype , o = Object . prototype , s = Function . prototype , a = n . push , r = n . slice , l = n . concat , c = o . toString , h = o . hasOwnProperty , d = n . forEach , p = n . map , u = n . reduce , m = n . reduceRight , g = n . filter , f = n . every , b = n . some , C = n . indexOf , v = n . lastIndexOf , _ = Array . isArray , y = Object . keys , x = s . bind , w = function ( t ) { return t instanceof w ? t : this instanceof w ? void ( this . _wrapped = t ) : new w ( t ) } ; "undefined" != typeof exports ? ( "undefined" != typeof module && module . exports && ( exports = module . exports = w ) , exports . _ = w ) : t . _ = w , w . VERSION = "1.5.2" ; var S = w . each = w . forEach = function ( t , e , n ) { if ( null != t ) if ( d && t . forEach === d ) t . forEach ( e , n ) ; else if ( t . length === + t . length ) { for ( var o = 0 , s = t . length ; o < s ; o ++ ) if ( e . call ( n , t [ o ] , o , t ) === i ) return } else for ( var a = w . keys ( t ) , o = 0 , s = a . length ; o < s ; o ++ ) if ( e . call ( n , t [ a [ o ] ] , a [ o ] , t ) === i ) return } ; w . map = w . collect = function ( t , e , i ) { var n = [ ] ; return null == t ? n : p && t . map === p ? t . map ( e , i ) : ( S ( t , function ( t , o , s ) { n . push ( e . call ( i , t , o , s ) ) } ) , n ) } ; var T = "Reduce of empty array with no initial value" ; w . reduce = w . foldl = w . inject = function ( t , e , i , n ) { var o = arguments . length > 2 ; if ( null == t && ( t = [ ] )
; if ( i ( t ) ) for ( n = t . length ; o < n && ! 1 !== e . call ( t [ o ] , o , t [ o ] ) ; o ++ ) ; else for ( o in t ) if ( ! 1 === e . call ( t [ o ] , o , t [ o ] ) ) break ; return t } , trim : function ( t ) { return null == t ? "" : ( t + "" ) . replace ( st , "" ) } , makeArray : function ( t , e ) { var n = e || [ ] ; return null != t && ( i ( Object ( t ) ) ? ot . merge ( n , "string" == typeof t ? [ t ] : t ) : Z . call ( n , t ) ) , n } , inArray : function ( t , e , i ) { return null == e ? - 1 : Q . call ( e , t , i ) } , merge : function ( t , e ) { for ( var i = + e . length , n = 0 , o = t . length ; n < i ; n ++ ) t [ o ++ ] = e [ n ] ; return t . length = o , t } , grep : function ( t , e , i ) { for ( var n = [ ] , o = 0 , s = t . length , a = ! i ; o < s ; o ++ ) ! e ( t [ o ] , o ) !== a && n . push ( t [ o ] ) ; return n } , map : function ( t , e , n ) { var o , s , a = 0 , r = [ ] ; if ( i ( t ) ) for ( o = t . length ; a < o ; a ++ ) null != ( s = e ( t [ a ] , a , n ) ) && r . push ( s ) ; else for ( a in t ) null != ( s = e ( t [ a ] , a , n ) ) && r . push ( s ) ; return J . apply ( [ ] , r ) } , guid : 1 , proxy : function ( t , e ) { var i , n , o ; if ( "string" == typeof e && ( i = t [ e ] , e = t , t = i ) , ot . isFunction ( t ) ) return n = X . call ( arguments , 2 ) , o = function ( ) { return t . apply ( e || this , n . concat ( X . call ( arguments ) ) ) } , o . guid = t . guid = t . guid || ot . guid ++ , o } , now : Date . now , support : nt } ) , "function" == typeof Symbol && ( ot . fn [ Symbol . iterator ] = K [ Symbol . iterator ] ) , ot . each ( "Boolean Number String Function Array Date RegExp Object Error Symbol" . split ( " " ) , function ( t , e ) { tt [ "[object " + e + "]" ] = e . toLowerCase ( ) } ) ; var ct = function ( t ) { function e ( t , e , i , n ) { var o , s , a , r , c , d , p , u , m = e && e . ownerDocument , g = e ? e . nodeType : 9 ; if ( i = i || [ ] , "string" != typeof t || ! t || 1 !== g && 9 !== g && 11 !== g ) return i ; if ( ! n && ( ( e ? e . ownerDocument || e : R ) !== P && E ( e ) , e = e || P , U ) ) { if ( 11 !== g && ( d = gt . exec ( t ) ) ) if ( o = d [ 1 ] ) { if ( 9 === g ) { if ( ! ( a = e . getElementById ( o ) ) ) return i ; if ( a . id === o ) return i . push ( a ) , i } else if ( m && ( a = m . getElementById ( o ) ) && L ( e , a ) && a . id === o ) return i . push ( a ) , i } else { if ( d [ 2 ] ) return X . apply ( i , e . getElementsByTagName ( t ) ) , i ; if ( ( o = d [ 3 ] ) && v . getElementsByClassName && e . getElementsByClassName ) return X . apply ( i , e . getElementsByClassName ( o ) ) , i } if ( v . qsa && ! $ [ t + " " ] && ( ! D || ! D . test ( t ) ) ) { if ( 1 !== g ) m = e , u = t ; else if ( "object" !== e . nodeName . toLowerCase ( ) ) { for ( ( r = e . getAttribute ( "id" ) ) ? r = r . replace ( bt , "\\$&" ) : e . setAttribute ( "id" , r = V ) , p = w ( t ) , s = p . length , c = ht . test ( r ) ? "#" + r : "[id='" + r + "']" ; s -- ; ) p [ s ] = c + " " + h ( p [ s ] ) ; u = p . join ( "," ) , m = ft . test ( t ) && l ( e . parentNode ) || e } if ( u ) try { return X . apply ( i , m . querySelectorAll ( u ) ) , i } catch ( t ) { } finally { r === V && e . removeAttribute ( "id" ) } } } return T ( t . replace ( st , "$1" ) , e , i , n ) } function i ( ) { function t ( i , n ) { return e . push ( i + " " ) > _ . cacheLength && delete t [ e . shift ( ) ] , t [ i + " " ] = n } var e = [ ] ; return t } function n ( t ) { return t [ V ] = ! 0 , t } function o ( t ) { var e = P . createElement ( "div" ) ; try { return ! ! t ( e ) } catch ( t ) { return ! 1 } finally { e . parentNode && e . parentNode . removeChild ( e ) , e = null } } function s ( t , e ) { for ( var i = t . split ( "|" ) , n = i . length ; n -- ; ) _ . attrHandle [ i [ n ] ] = e } function a ( t , e ) { var i = e && t , n = i && 1 === t . nodeType && 1 === e . nodeType && ( ~ e . sourceIndex || j ) - ( ~ t . sourceIndex || j ) ; if ( n ) return n ; if ( i ) for ( ; i = i . nextSibling ; ) if ( i === e ) return - 1 ; return t ? 1 : - 1 } function r ( t ) { return n ( function ( e ) { return e = + e , n ( function ( i , n ) { for ( var o , s = t ( [ ] , i . length , e ) , a = s . length ; a -- ; ) i [ o = s [ a ] ] && ( i [ o ] = ! ( n [ o ] = i [ o ] ) ) } ) } ) } function l ( t ) { return t && void 0 !== t . getElementsByTagName && t } function c ( ) { } function h ( t ) { for ( var e = 0 , i = t . length , n = "" ; e < i ; e ++ ) n += t [ e ] . value ; return n } function d ( t , e , i ) { var n = e . dir , o = i && "parentNode" === n , s = z ++ ; return e . first ? function ( e , i , s ) { for ( ; e = e [ n ] ; ) if ( 1 === e . nodeType || o ) return t ( e , i , s ) } : function ( e , i , a ) { var r , l , c , h = [ O , s ] ; if ( a ) { for ( ; e = e [ n ] ; ) if ( ( 1 === e . nodeType || o ) && t ( e , i , a ) ) return ! 0 } else for ( ; e = e [ n ] ; ) if ( 1 === e . nodeType || o ) { if ( c = e [ V ] || ( e [ V ] = { } ) , l = c [ e . uniqueID ] || ( c [ e . uniqueID ] = { } ) , ( r = l [ n ] ) && r [ 0 ] === O && r [ 1 ] === s ) return h [ 2 ] = r [ 2 ] ; if ( l [ n ] = h , h [ 2 ] = t ( e , i , a ) ) return ! 0 } } } function p ( t ) { return t . length > 1 ? function ( e , i , n ) { for ( var o = t . length ; o -- ; ) if ( ! t [ o ] ( e , i , n ) ) return ! 1 ; return ! 0 } : t [ 0 ] } function u ( t , i , n ) { for ( var o = 0 , s = i . length ; o < s ; o ++ ) e ( t , i [ o ] , n ) ; return n } function m ( t , e , i , n , o ) { for ( var s , a = [ ] , r = 0 , l = t . length , c = null != e ; r < l ; r ++ ) ( s = t [ r ] ) && ( i && ! i ( s , n , o ) || ( a . push ( s ) , c && e . push ( r ) ) ) ; return a } function g ( t , e , i , o , s , a ) { return o && ! o [ V ] && ( o = g ( o ) ) , s && ! s [ V ] && ( s = g ( s , a ) ) , n ( function ( n , a , r , l ) { var c , h , d , p = [ ] , g = [ ] , f = a . length , b = n || u ( e || "*" , r . nodeType ? [ r ] : r , [ ] ) , C = ! t || ! n && e ? b : m ( b , p , t , r , l ) , v = i ? s || ( n ? t : f || o ) ? [ ] : a : C ; if ( i && i ( C , v , r , l ) , o ) for ( c = m ( v , g ) , o ( c , [ ] , r , l ) , h = c . length ; h -- ; ) ( d = c [ h ] ) && ( v [ g [ h ] ] = ! ( C [ g [ h ] ] = d ) ) ; if ( n ) { if ( s || t ) { if ( s ) { for ( c = [ ] , h = v . length ; h -- ; ) (
return void 0 !== ot && ot . event . triggered !== e . type ? ot . event . dispatch . apply ( t , arguments ) : void 0 } ) , e = ( e || "" ) . match ( vt ) || [ "" ] , c = e . length ; c -- ; ) r = Rt . exec ( e [ c ] ) || [ ] , u = g = r [ 1 ] , m = ( r [ 2 ] || "" ) . split ( "." ) . sort ( ) , u && ( d = ot . event . special [ u ] || { } , u = ( o ? d . delegateType : d . bindType ) || u , d = ot . event . special [ u ] || { } , h = ot . extend ( { type : u , origType : g , data : n , handler : i , guid : i . guid , selector : o , needsContext : o && ot . expr . match . needsContext . test ( o ) , namespace : m . join ( "." ) } , s ) , ( p = l [ u ] ) || ( p = l [ u ] = [ ] , p . delegateCount = 0 , d . setup && ! 1 !== d . setup . call ( t , n , m , a ) || t . addEventListener && t . addEventListener ( u , a ) ) , d . add && ( d . add . call ( t , h ) , h . handler . guid || ( h . handler . guid = i . guid ) ) , o ? p . splice ( p . delegateCount ++ , 0 , h ) : p . push ( h ) , ot . event . global [ u ] = ! 0 ) } , remove : function ( t , e , i , n , o ) { var s , a , r , l , c , h , d , p , u , m , g , f = wt . hasData ( t ) && wt . get ( t ) ; if ( f && ( l = f . events ) ) { for ( e = ( e || "" ) . match ( vt ) || [ "" ] , c = e . length ; c -- ; ) if ( r = Rt . exec ( e [ c ] ) || [ ] , u = g = r [ 1 ] , m = ( r [ 2 ] || "" ) . split ( "." ) . sort ( ) , u ) { for ( d = ot . event . special [ u ] || { } , u = ( n ? d . delegateType : d . bindType ) || u , p = l [ u ] || [ ] , r = r [ 2 ] && new RegExp ( "(^|\\.)" + m . join ( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) , a = s = p . length ; s -- ; ) h = p [ s ] , ! o && g !== h . origType || i && i . guid !== h . guid || r && ! r . test ( h . namespace ) || n && n !== h . selector && ( "**" !== n || ! h . selector ) || ( p . splice ( s , 1 ) , h . selector && p . delegateCount -- , d . remove && d . remove . call ( t , h ) ) ; a && ! p . length && ( d . teardown && ! 1 !== d . teardown . call ( t , m , f . handle ) || ot . removeEvent ( t , u , f . handle ) , delete l [ u ] ) } else for ( u in l ) ot . event . remove ( t , u + e [ c ] , i , n , ! 0 ) ; ot . isEmptyObject ( l ) && wt . remove ( t , "handle events" ) } } , dispatch : function ( t ) { t = ot . event . fix ( t ) ; var e , i , n , o , s , a = [ ] , r = X . call ( arguments ) , l = ( wt . get ( this , "events" ) || { } ) [ t . type ] || [ ] , c = ot . event . special [ t . type ] || { } ; if ( r [ 0 ] = t , t . delegateTarget = this , ! c . preDispatch || ! 1 !== c . preDispatch . call ( this , t ) ) { for ( a = ot . event . handlers . call ( this , t , l ) , e = 0 ; ( o = a [ e ++ ] ) && ! t . isPropagationStopped ( ) ; ) for ( t . currentTarget = o . elem , i = 0 ; ( s = o . handlers [ i ++ ] ) && ! t . isImmediatePropagationStopped ( ) ; ) t . rnamespace && ! t . rnamespace . test ( s . namespace ) || ( t . handleObj = s , t . data = s . data , void 0 !== ( n = ( ( ot . event . special [ s . origType ] || { } ) . handle || s . handler ) . apply ( o . elem , r ) ) && ! 1 === ( t . result = n ) && ( t . preventDefault ( ) , t . stopPropagation ( ) ) ) ; return c . postDispatch && c . postDispatch . call ( this , t ) , t . result } } , handlers : function ( t , e ) { var i , n , o , s , a = [ ] , r = e . delegateCount , l = t . target ; if ( r && l . nodeType && ( "click" !== t . type || isNaN ( t . button ) || t . button < 1 ) ) for ( ; l !== this ; l = l . parentNode || this ) if ( 1 === l . nodeType && ( ! 0 !== l . disabled || "click" !== t . type ) ) { for ( n = [ ] , i = 0 ; i < r ; i ++ ) s = e [ i ] , o = s . selector + " " , void 0 === n [ o ] && ( n [ o ] = s . needsContext ? ot ( o , this ) . index ( l ) > - 1 : ot . find ( o , this , null , [ l ] ) . length ) , n [ o ] && n . push ( s ) ; n . length && a . push ( { elem : l , handlers : n } ) } return r < e . length && a . push ( { elem : this , handlers : e . slice ( r ) } ) , a } , props : "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which" . split ( " " ) , fixHooks : { } , keyHooks : { props : "char charCode key keyCode" . split ( " " ) , filter : function ( t , e ) { return null == t . which && ( t . which = null != e . charCode ? e . charCode : e . keyCode ) , t } } , mouseHooks : { props : "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement" . split ( " " ) , filter : function ( t , e ) { var i , n , o , s = e . button ; return null == t . pageX && null != e . clientX && ( i = t . target . ownerDocument || Y , n = i . documentElement , o = i . body , t . pageX = e . clientX + ( n && n . scrollLeft || o && o . scrollLeft || 0 ) - ( n && n . clientLeft || o && o . clientLeft || 0 ) , t . pageY = e . clientY + ( n && n . scrollTop || o && o . scrollTop || 0 ) - ( n && n . clientTop || o && o . clientTop || 0 ) ) , t . which || void 0 === s || ( t . which = 1 & s ? 1 : 2 & s ? 3 : 4 & s ? 2 : 0 ) , t } } , fix : function ( t ) { if ( t [ ot . expando ] ) return t ; var e , i , n , o = t . type , s = t , a = this . fixHooks [ o ] ; for ( a || ( this . fixHooks [ o ] = a = Vt . test ( o ) ? this . mouseHooks : Lt . test ( o ) ? this . keyHooks : { } ) , n = a . props ? this . props . concat ( a . props ) : this . props , t = new ot . Event ( s ) , e = n . length ; e -- ; ) i = n [ e ] , t [ i ] = s [ i ] ; return t . target || ( t . target = Y ) , 3 === t . target . nodeType && ( t . target = t . target . parentNode ) , a . filter ? a . filter ( t , s ) : t } , special : { load : { noBubble : ! 0 } , focus : { trigger : function ( ) { if ( this !== g ( ) && this . focus ) return this . focus ( ) , ! 1 } , delegateType : "focusin" } , blur : { trigger : function ( ) { if ( this === g ( ) && this . blur ) return this . blur ( ) , ! 1 } , delegateType : "focusout" } , click : { trigger : function ( ) { if ( "checkbox" === this . type && this . click && ot . nod
ot . isArray ( t ) || t . jquery && ! ot . isPlainObject ( t ) ) ot . each ( t , function ( ) { o ( this . name , this . value ) } ) ; else for ( i in t ) W ( i , t [ i ] , e , o ) ; return n . join ( "&" ) . replace ( ke , "+" ) } , ot . fn . extend ( { serialize : function ( ) { return ot . param ( this . serializeArray ( ) ) } , serializeArray : function ( ) { return this . map ( function ( ) { var t = ot . prop ( this , "elements" ) ; return t ? ot . makeArray ( t ) : this } ) . filter ( function ( ) { var t = this . type ; return this . name && ! ot ( this ) . is ( ":disabled" ) && Me . test ( this . nodeName ) && ! Pe . test ( t ) && ( this . checked || ! Mt . test ( t ) ) } ) . map ( function ( t , e ) { var i = ot ( this ) . val ( ) ; return null == i ? null : ot . isArray ( i ) ? ot . map ( i , function ( t ) { return { name : e . name , value : t . replace ( Ee , "\r\n" ) } } ) : { name : e . name , value : i . replace ( Ee , "\r\n" ) } } ) . get ( ) } } ) , ot . ajaxSettings . xhr = function ( ) { try { return new t . XMLHttpRequest } catch ( t ) { } } ; var Ue = { 0 : 200 , 1223 : 204 } , De = ot . ajaxSettings . xhr ( ) ; nt . cors = ! ! De && "withCredentials" in De , nt . ajax = De = ! ! De , ot . ajaxTransport ( function ( e ) { var i , n ; if ( nt . cors || De && ! e . crossDomain ) return { send : function ( o , s ) { var a , r = e . xhr ( ) ; if ( r . open ( e . type , e . url , e . async , e . username , e . password ) , e . xhrFields ) for ( a in e . xhrFields ) r [ a ] = e . xhrFields [ a ] ; e . mimeType && r . overrideMimeType && r . overrideMimeType ( e . mimeType ) , e . crossDomain || o [ "X-Requested-With" ] || ( o [ "X-Requested-With" ] = "XMLHttpRequest" ) ; for ( a in o ) r . setRequestHeader ( a , o [ a ] ) ; i = function ( t ) { return function ( ) { i && ( i = n = r . onload = r . onerror = r . onabort = r . onreadystatechange = null , "abort" === t ? r . abort ( ) : "error" === t ? "number" != typeof r . status ? s ( 0 , "error" ) : s ( r . status , r . statusText ) : s ( Ue [ r . status ] || r . status , r . statusText , "text" !== ( r . responseType || "text" ) || "string" != typeof r . responseText ? { binary : r . response } : { text : r . responseText } , r . getAllResponseHeaders ( ) ) ) } } , r . onload = i ( ) , n = r . onerror = i ( "error" ) , void 0 !== r . onabort ? r . onabort = n : r . onreadystatechange = function ( ) { 4 === r . readyState && t . setTimeout ( function ( ) { i && n ( ) } ) } , i = i ( "abort" ) ; try { r . send ( e . hasContent && e . data || null ) } catch ( t ) { if ( i ) throw t } } , abort : function ( ) { i && i ( ) } } } ) , ot . ajaxSetup ( { accepts : { script : "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" } , contents : { script : /\b(?:java|ecma)script\b/ } , converters : { "text script" : function ( t ) { return ot . globalEval ( t ) , t } } } ) , ot . ajaxPrefilter ( "script" , function ( t ) { void 0 === t . cache && ( t . cache = ! 1 ) , t . crossDomain && ( t . type = "GET" ) } ) , ot . ajaxTransport ( "script" , function ( t ) { if ( t . crossDomain ) { var e , i ; return { send : function ( n , o ) { e = ot ( "<script>" ) . prop ( { charset : t . scriptCharset , src : t . url } ) . on ( "load error" , i = function ( t ) { e . remove ( ) , i = null , t && o ( "error" === t . type ? 404 : 200 , t . type ) } ) , Y . head . appendChild ( e [ 0 ] ) } , abort : function ( ) { i && i ( ) } } } } ) ; var Be = [ ] , Fe = /(=)\?(?=&|$)|\?\?/ ; ot . ajaxSetup ( { jsonp : "callback" , jsonpCallback : function ( ) { var t = Be . pop ( ) || ot . expando + "_" + ge ++ ; return this [ t ] = ! 0 , t } } ) , ot . ajaxPrefilter ( "json jsonp" , function ( e , i , n ) { var o , s , a , r = ! 1 !== e . jsonp && ( Fe . test ( e . url ) ? "url" : "string" == typeof e . data && 0 === ( e . contentType || "" ) . indexOf ( "application/x-www-form-urlencoded" ) && Fe . test ( e . data ) && "data" ) ; if ( r || "jsonp" === e . dataTypes [ 0 ] ) return o = e . jsonpCallback = ot . isFunction ( e . jsonpCallback ) ? e . jsonpCallback ( ) : e . jsonpCallback , r ? e [ r ] = e [ r ] . replace ( Fe , "$1" + o ) : ! 1 !== e . jsonp && ( e . url += ( fe . test ( e . url ) ? "&" : "?" ) + e . jsonp + "=" + o ) , e . converters [ "script json" ] = function ( ) { return a || ot . error ( o + " was not called" ) , a [ 0 ] } , e . dataTypes [ 0 ] = "json" , s = t [ o ] , t [ o ] = function ( ) { a = arguments } , n . always ( function ( ) { void 0 === s ? ot ( t ) . removeProp ( o ) : t [ o ] = s , e [ o ] && ( e . jsonpCallback = i . jsonpCallback , Be . push ( o ) ) , a && ot . isFunction ( s ) && s ( a [ 0 ] ) , a = s = void 0 } ) , "script" } ) , ot . parseHTML = function ( t , e , i ) { if ( ! t || "string" != typeof t ) return null ; "boolean" == typeof e && ( i = e , e = ! 1 ) , e = e || Y ; var n = ut . exec ( t ) , o = ! i && [ ] ; return n ? [ e . createElement ( n [ 1 ] ) ] : ( n = p ( [ t ] , e , o ) , o && o . length && ot ( o ) . remove ( ) , ot . merge ( [ ] , n . childNodes ) ) } ; var Le = ot . fn . load ; ot . fn . load = function ( t , e , i ) { if ( "string" != typeof t && Le ) return Le . apply ( this , arguments ) ; var n , o , s , a = this , r = t . indexOf ( " " ) ; return r > - 1 && ( n = ot . trim ( t . slice ( r ) ) , t = t . slice ( 0 , r ) ) , ot . isFunction ( e ) ? ( i = e , e = void 0 ) : e && "object" == typeof e && ( o = "POST" ) , a . length > 0 && ot . ajax ( { url : t , type : o || "GET" , dataType : "html" , data : e } ) . done ( function ( t ) { s = arguments , a . html ( n ? ot ( "<div>" ) . append ( ot . parseHTML ( t ) ) . find ( n ) : t ) } ) . always ( i && function ( t , e ) { a . each ( function ( ) { i . apply ( thi
i . prototype . pause = function ( e ) { return e || ( this . paused = ! 0 ) , this . $element . find ( ".next, .prev" ) . length && t . support . transition && ( this . $element . trigger ( t . support . transition . end ) , this . cycle ( ! 0 ) ) , this . interval = clearInterval ( this . interval ) , this } , i . prototype . next = function ( ) { if ( ! this . sliding ) return this . slide ( "next" ) } , i . prototype . prev = function ( ) { if ( ! this . sliding ) return this . slide ( "prev" ) } , i . prototype . slide = function ( e , n ) { var o = this . $element . find ( ".item.active" ) , s = n || this . getItemForDirection ( e , o ) , a = this . interval , r = "next" == e ? "left" : "right" , l = this ; if ( s . hasClass ( "active" ) ) return this . sliding = ! 1 ; var c = s [ 0 ] , h = t . Event ( "slide.bs.carousel" , { relatedTarget : c , direction : r } ) ; if ( this . $element . trigger ( h ) , ! h . isDefaultPrevented ( ) ) { if ( this . sliding = ! 0 , a && this . pause ( ) , this . $indicators . length ) { this . $indicators . find ( ".active" ) . removeClass ( "active" ) ; var d = t ( this . $indicators . children ( ) [ this . getItemIndex ( s ) ] ) ; d && d . addClass ( "active" ) } var p = t . Event ( "slid.bs.carousel" , { relatedTarget : c , direction : r } ) ; return t . support . transition && this . $element . hasClass ( "slide" ) ? ( s . addClass ( e ) , s [ 0 ] . offsetWidth , o . addClass ( r ) , s . addClass ( r ) , o . one ( "bsTransitionEnd" , function ( ) { s . removeClass ( [ e , r ] . join ( " " ) ) . addClass ( "active" ) , o . removeClass ( [ "active" , r ] . join ( " " ) ) , l . sliding = ! 1 , setTimeout ( function ( ) { l . $element . trigger ( p ) } , 0 ) } ) . emulateTransitionEnd ( i . TRANSITION _DURATION ) ) : ( o . removeClass ( "active" ) , s . addClass ( "active" ) , this . sliding = ! 1 , this . $element . trigger ( p ) ) , a && this . cycle ( ) , this } } ; var n = t . fn . carousel ; t . fn . carousel = e , t . fn . carousel . Constructor = i , t . fn . carousel . noConflict = function ( ) { return t . fn . carousel = n , this } ; var o = function ( i ) { var n , o = t ( this ) , s = t ( o . attr ( "data-target" ) || ( n = o . attr ( "href" ) ) && n . replace ( /.*(?=#[^\s]+$)/ , "" ) ) ; if ( s . hasClass ( "carousel" ) ) { var a = t . extend ( { } , s . data ( ) , o . data ( ) ) , r = o . attr ( "data-slide-to" ) ; r && ( a . interval = ! 1 ) , e . call ( s , a ) , r && s . data ( "bs.carousel" ) . to ( r ) , i . preventDefault ( ) } } ; t ( document ) . on ( "click.bs.carousel.data-api" , "[data-slide]" , o ) . on ( "click.bs.carousel.data-api" , "[data-slide-to]" , o ) , t ( window ) . on ( "load" , function ( ) { t ( '[data-ride="carousel"]' ) . each ( function ( ) { var i = t ( this ) ; e . call ( i , i . data ( ) ) } ) } ) } ( jQuery ) , function ( t ) { "use strict" ; function e ( e ) { var i , n = e . attr ( "data-target" ) || ( i = e . attr ( "href" ) ) && i . replace ( /.*(?=#[^\s]+$)/ , "" ) ; return t ( n ) } function i ( e ) { return this . each ( function ( ) { var i = t ( this ) , o = i . data ( "bs.collapse" ) , s = t . extend ( { } , n . DEFAULTS , i . data ( ) , "object" == typeof e && e ) ; ! o && s . toggle && /show|hide/ . test ( e ) && ( s . toggle = ! 1 ) , o || i . data ( "bs.collapse" , o = new n ( this , s ) ) , "string" == typeof e && o [ e ] ( ) } ) } var n = function ( e , i ) { this . $element = t ( e ) , this . options = t . extend ( { } , n . DEFAULTS , i ) , this . $trigger = t ( '[data-toggle="collapse"][href="#' + e . id + '"],[data-toggle="collapse"][data-target="#' + e . id + '"]' ) , this . transitioning = null , this . options . parent ? this . $parent = this . getParent ( ) : this . addAriaAndCollapsedClass ( this . $element , this . $trigger ) , this . options . toggle && this . toggle ( ) } ; n . VERSION = "3.3.7" , n . TRANSITION _DURATION = 350 , n . DEFAULTS = { toggle : ! 0 } , n . prototype . dimension = function ( ) { return this . $element . hasClass ( "width" ) ? "width" : "height" } , n . prototype . show = function ( ) { if ( ! this . transitioning && ! this . $element . hasClass ( "in" ) ) { var e , o = this . $parent && this . $parent . children ( ".panel" ) . children ( ".in, .collapsing" ) ; if ( ! ( o && o . length && ( e = o . data ( "bs.collapse" ) ) && e . transitioning ) ) { var s = t . Event ( "show.bs.collapse" ) ; if ( this . $element . trigger ( s ) , ! s . isDefaultPrevented ( ) ) { o && o . length && ( i . call ( o , "hide" ) , e || o . data ( "bs.collapse" , null ) ) ; var a = this . dimension ( ) ; this . $element . removeClass ( "collapse" ) . addClass ( "collapsing" ) [ a ] ( 0 ) . attr ( "aria-expanded" , ! 0 ) , this . $trigger . removeClass ( "collapsed" ) . attr ( "aria-expanded" , ! 0 ) , this . transitioning = 1 ; var r = function ( ) { this . $element . removeClass ( "collapsing" ) . addClass ( "collapse in" ) [ a ] ( "" ) , this . transitioning = 0 , this . $element . trigger ( "shown.bs.collapse" ) } ; if ( ! t . support . transition ) return r . call ( this ) ; var l = t . camelCase ( [ "scroll" , a ] . join ( "-" ) ) ; this . $element . one ( "bsTransitionEnd" , t . proxy ( r , this ) ) . emulateTransitionEnd ( n . TRANSITION _DURATION ) [ a ] ( this . $element [ 0 ] [ l ] ) } } } } , n . prototype . hide = function ( ) { if ( ! this . transitioning && this . $element . hasClass ( "in" ) ) { var e = t . Event ( "hide.bs.collapse" ) ; if ( this . $element . trigger ( e ) , ! e . isDefaultPreve
this [ t ] = this [ t ] || { } } , this ) } , initialize : function ( ) { } , onReady : function ( ) { this . start ( ) } , start : function ( ) { this . initializeControllers ( this . controllers || { } ) , this . launchControllers ( ) , this . launch . call ( this ) } , getClasseRefs : function ( e , i ) { var n = { } , o = this . allocationMap [ e ] , s = this [ o ] ; return _ . each ( i , function ( e ) { n [ e ] = t ( e , e . indexOf ( "." ) > - 1 ? window : s ) } , this ) , n } , initializeControllers : function ( e ) { this . controllers = { } , _ . each ( e , function ( e ) { var i = e . indexOf ( "." ) > - 1 ? window : this [ this . allocationMap . controller ] , n = t ( e , i ) , o = ( e . split ( "." ) . pop ( ) , new n ( { id : e , application : this } ) ) ; o . views = this . getClasseRefs ( "view" , o . views || [ ] ) , _ . extend ( this . models , this . getClasseRefs ( "model" , o . models || [ ] ) ) , _ . extend ( this . collections , this . getClasseRefs ( "collection" , o . collections || { } ) ) , this . buildCollections ( ) , this . controllers [ e ] = o } , this ) } , launchControllers : function ( ) { _ . each ( this . controllers , function ( t , e ) { t . onLaunch ( this ) } , this ) } , launch : function ( ) { } , addListeners : function ( t , e ) { this . eventbus . addListeners ( t , e ) } , getController : function ( t ) { return this . controllers [ t ] } , getModel : function ( t ) { this . _modelsCache = this . _modelsCache || { } ; var e = this . _modelsCache [ t ] , i = this . getModelConstructor ( t ) ; return ! e && i && ( e = this . createModel ( t ) , this . _modelsCache [ t ] = e ) , e || null } , getModelConstructor : function ( t ) { return this . models [ t ] } , createModel : function ( t , e ) { var i = this . getModelConstructor ( t ) , n = null ; return i && ( n = new i ( _ . extend ( e || { } ) ) ) , n } , getCollection : function ( t ) { this . _collectionsCache = this . _collectionsCache || { } ; var e = this . _collectionsCache [ t ] , i = this . getCollectionConstructor ( t ) ; return ! e && i && ( e = this . createCollection ( t ) , this . _collectionsCache [ t ] = e ) , e || null } , getCollectionConstructor : function ( t ) { return this . collections [ t ] } , createCollection : function ( t ) { var e = this . getCollectionConstructor ( t ) , i = null ; return e && ( i = new e ) , i } , buildCollections : function ( ) { _ . each ( this . collections , function ( t , e ) { this . getCollection ( e ) } , this ) } } ) , void 0 !== Backbone . Application ) throw "Native Backbone.Application instance already defined." ; Backbone . Application = e , Backbone . Application . extend = Backbone . Model . extend ; var i = function ( t ) { _ . extend ( this , t || { } ) , this . initialize . apply ( this , arguments ) } ; if ( _ . extend ( i . prototype , { name : null , views : { } , models : { } , collections : { } , initialize : function ( t ) { } , addListeners : function ( t ) { this . getApplication ( ) . addListeners ( t , this ) } , onLaunch : function ( t ) { } , getApplication : function ( ) { return this . application } , getView : function ( t ) { return this . _viewsCache [ t ] } , getViewConstructor : function ( t ) { return this . views [ t ] } , createView : function ( t , e ) { var i = this . getViewConstructor ( t ) , n = _ . extend ( e || { } , { alias : t } ) ; return this . _viewsCache = this . _viewsCache || { } , this . _viewsCache [ t ] = new i ( n ) , this . _viewsCache [ t ] . options = _ . extend ( { } , n ) , this . _viewsCache [ t ] } , getModel : function ( t ) { return this . application . getModel ( t ) } , getModelConstructor : function ( t ) { return this . application . getModelConstructor ( t ) } , createModel : function ( t , e ) { return this . application . createModel ( t ) } , getCollection : function ( t ) { return this . application . getCollection ( t ) } , getCollectionConstructor : function ( t ) { return this . application . getCollectionConstructor ( t ) } , createCollection : function ( t ) { return this . application . createCollection ( t ) } , fireEvent : function ( t , e , i ) { this . application . eventbus . fireEvent ( t , e , i ) } , bindViewEvents : function ( t , e ) { this . unbindViewEvents ( t ) , e = _ . isFunction ( e ) ? e . call ( this ) : e ; for ( var i in e ) { var n = e [ i ] ; _ . isFunction ( n ) || ( n = this [ e [ i ] ] ) ; var o = i . match ( /^(\S+)\s*(.*)$/ ) , s = o [ 1 ] , a = o [ 2 ] ; n = _ . bind ( n , this ) , s += ".bindViewEvents" + t . cid , t . $el . on ( s , a , n ) } return this } , unbindViewEvents : function ( t ) { return t . $el . off ( ".bindViewEvents" + t . cid ) , this } } ) , void 0 !== Backbone . Controller ) throw "Native Backbone.Controller instance already defined." ; Backbone . Controller = i , Backbone . Controller . extend = Backbone . Model . extend ; var n = function ( t ) { var e = this ; _ . extend ( this , t || { } ) , _ . extend ( Backbone . View . prototype , { alias : null , hidden : ! 1 , getAlias : function ( ) { return this . options . alias } , fireEvent : function ( t , i ) { this . trigger . apply ( this , arguments ) , e . fireEvent ( this . getAlias ( ) , t , i ) } , hide : function ( ) { this . $el . hide ( ) , this . hidden = ! 0 } , show : function ( ) { this . $el . show ( ) , this . hidden = ! 1 } } ) } ; if ( _ . extend ( n . prototype , { pool : { } , addListeners : function ( t , e ) { this . pool [ e . id ] = this . pool [
this . $window . append ( _ . template ( n ) ) , this . binding . resize = _ . bind ( l , this ) , this . binding . resizeStop = _ . bind ( c , this ) , this . binding . resizeStart = _ . bind ( r , this ) , e && e . length > 1 && ( this . initConfig . minwidth = e [ 0 ] ) , e && e . length > 1 && ( this . initConfig . minheight = e [ 1 ] ) , i && i . length > 1 && ( this . initConfig . maxwidth = i [ 0 ] ) , i && i . length > 1 && ( this . initConfig . maxheight = i [ 1 ] ) , this . $window . find ( ".resize-border" ) . on ( "mousedown" , this . binding . resizeStart ) } else this . $window . find ( ".resize-border" ) . remove ( ) ; this . resizable = t } } , onPrimary : function ( ) { } , cancelButtonText : "Cancel" , okButtonText : "OK" , yesButtonText : "Yes" , noButtonText : "No" , closeButtonText : "Close" , textWarning : "Warning" , textError : "Error" , textConfirmation : "Confirmation" , textInformation : "Information" , textDontShow : "Don't show this message again" } } ( ) , Common . UI . Window || { } ) ) } ) , define ( "common/main/lib/view/RenameDialog" , [ "common/main/lib/component/Window" ] , function ( ) { "use strict" ; Common . Views . RenameDialog = Common . UI . Window . extend ( _ . extend ( { options : { width : 330 , header : ! 1 , cls : "modal-dlg" , filename : "" } , initialize : function ( t ) { _ . extend ( this . options , t || { } ) , this . template = [ '<div class="box">' , '<div class="input-row">' , "<label>" + this . textName + "</label>" , "</div>" , '<div id="id-dlg-newname" class="input-row"></div>' , "</div>" , '<div class="footer right">' , '<button class="btn normal dlg-btn primary" result="ok" style="margin-right: 10px;">' + this . okButtonText + "</button>" , '<button class="btn normal dlg-btn" result="cancel">' + this . cancelButtonText + "</button>" , "</div>" ] . join ( "" ) , this . options . tpl = _ . template ( this . template , this . options ) , Common . UI . Window . prototype . initialize . call ( this , this . options ) } , render : function ( ) { Common . UI . Window . prototype . render . call ( this ) ; var t = this ; t . inputName = new Common . UI . InputField ( { el : $ ( "#id-dlg-newname" ) , style : "width: 100%;" , validateOnBlur : ! 1 , validation : function ( e ) { return ! /[\t*\+:\"<>?|\\\\\/]/gim . test ( e ) || t . txtInvalidName + '*+:"<>?|/' } } ) ; var e = this . getChild ( ) ; e . find ( ".btn" ) . on ( "click" , _ . bind ( this . onBtnClick , this ) ) , t . inputNameEl = e . find ( "input" ) , t . inputNameEl . on ( "keypress" , _ . bind ( this . onKeyPress , this ) ) } , show : function ( ) { Common . UI . Window . prototype . show . apply ( this , arguments ) ; var t = this ; _ . delay ( function ( ) { t . inputName . setValue ( t . options . filename ) , t . inputNameEl . focus ( ) . select ( ) } , 100 ) } , onKeyPress : function ( t ) { t . keyCode == Common . UI . Keys . RETURN && this . _handleInput ( "ok" ) } , onBtnClick : function ( t ) { this . _handleInput ( t . currentTarget . attributes . result . value ) } , _handleInput : function ( t ) { if ( this . options . handler ) { if ( "ok" == t && ! 0 !== this . inputName . checkValidate ( ) ) return void this . inputNameEl . focus ( ) ; this . options . handler . call ( this , t , this . inputName . getValue ( ) ) } this . close ( ) } , textName : "File name" , cancelButtonText : "Cancel" , okButtonText : "Ok" , txtInvalidName : "The file name cannot contain any of the following characters: " } , Common . Views . RenameDialog || { } ) ) } ) , void 0 === Common ) var Common = { } ; if ( Common . Views = Common . Views || { } , define ( "common/main/lib/view/Header" , [ "backbone" , "text!common/main/lib/template/Header.template" , "core" , "common/main/lib/view/RenameDialog" ] , function ( t , e ) { "use strict" ; Common . Views . Header = t . View . extend ( _ . extend ( { options : { branding : { } , headerCaption : "Default Caption" , documentCaption : "" , canBack : ! 1 } , el : "#header" , template : _ . template ( e ) , events : { "click #header-logo" : function ( t ) { var e = this . branding && this . branding . logo && this . branding . logo . url ? this . branding . logo . url : "http://www.onlyoffice.com" , i = window . open ( e ) ; i && i . focus ( ) } } , initialize : function ( t ) { this . options = this . options ? _ ( { } ) . extend ( this . options , t ) : t , this . headerCaption = this . options . headerCaption , this . documentCaption = this . options . documentCaption , this . canBack = this . options . canBack , this . branding = this . options . customization , this . isModified = ! 1 } , render : function ( ) { $ ( this . el ) . html ( this . template ( { headerCaption : this . headerCaption , documentCaption : Common . Utils . String . htmlEncode ( this . documentCaption ) , canBack : this . canBack , textBack : this . textBack } ) ) ; var t = new Common . UI . MenuItem ( { caption : this . openNewTabText } ) . on ( "click" , function ( t , e ) { Common . NotificationCenter . trigger ( "goback" , ! 0 ) , Common . component . Analytics . trackEvent ( "Back to Folder" ) } ) ; this . gotoDocsMenu = new Common . UI . Menu ( { style : "min-width: 100px;" , items : [ t ] } ) } , set
if ( "object" == typeof t && void 0 !== t . effectValue && this . effectcolors ) for ( var e = 0 ; e < this . effectcolors . length ; e ++ ) if ( this . effectcolors [ e ] . effectValue === t . effectValue && t . color . toUpperCase ( ) === this . effectcolors [ e ] . color . toUpperCase ( ) ) { t . effectId = this . effectcolors [ e ] . effectId ; break } return t } } } , Common . Utils . Metric = _ . extend ( new function ( ) { var t = this ; return t . c _MetricUnits = { cm : 0 , pt : 1 , inch : 2 } , t . currentMetric = t . c _MetricUnits . pt , t . metricName = [ "Cm" , "Pt" , "Inch" ] , t . defaultMetric = t . c _MetricUnits . cm , { c _MetricUnits : t . c _MetricUnits , txtCm : "cm" , txtPt : "pt" , txtInch : '"' , setCurrentMetric : function ( e ) { t . currentMetric = e } , getCurrentMetric : function ( ) { return t . currentMetric } , getCurrentMetricName : function ( ) { return this [ "txt" + t . metricName [ t . currentMetric ] ] } , getMetricName : function ( e ) { return this [ "txt" + t . metricName [ void 0 !== e ? e : 0 ] ] } , setDefaultMetric : function ( e ) { t . defaultMetric = e } , getDefaultMetric : function ( ) { return t . defaultMetric } , fnRecalcToMM : function ( e ) { if ( null !== e && void 0 !== e ) switch ( t . currentMetric ) { case t . c _MetricUnits . cm : return 10 * e ; case t . c _MetricUnits . pt : return 25.4 * e / 72 ; case t . c _MetricUnits . inch : return 25.4 * e } return e } , fnRecalcFromMM : function ( e ) { switch ( t . currentMetric ) { case t . c _MetricUnits . cm : return parseFloat ( ( e / 10 ) . toFixed ( 4 ) ) ; case t . c _MetricUnits . pt : return parseFloat ( ( 72 * e / 25.4 ) . toFixed ( 3 ) ) ; case t . c _MetricUnits . inch : return parseFloat ( ( e / 25.4 ) . toFixed ( 3 ) ) } return e } } } , Common . Utils . Metric || { } ) , Common . Utils . RGBColor = function ( t ) { var e , i , n ; "#" == t . charAt ( 0 ) && ( t = t . substr ( 1 , 6 ) ) , t = t . replace ( / /g , "" ) , t = t . toLowerCase ( ) ; for ( var o = [ { re : /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/ , process : function ( t ) { return [ parseInt ( t [ 1 ] ) , parseInt ( t [ 2 ] ) , parseInt ( t [ 3 ] ) ] } } , { re : /^hsb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/ , process : function ( t ) { var e = { } , i = Math . round ( t [ 1 ] ) , n = Math . round ( 255 * t [ 2 ] / 100 ) , o = Math . round ( 255 * t [ 3 ] / 100 ) ; if ( 0 == n ) e . r = e . g = e . b = o ; else { var s = o , a = ( 255 - n ) * o / 255 , r = i % 60 * ( s - a ) / 60 ; 360 == i && ( i = 0 ) , i < 60 ? ( e . r = s , e . b = a , e . g = a + r ) : i < 120 ? ( e . g = s , e . b = a , e . r = s - r ) : i < 180 ? ( e . g = s , e . r = a , e . b = a + r ) : i < 240 ? ( e . b = s , e . r = a , e . g = s - r ) : i < 300 ? ( e . b = s , e . g = a , e . r = a + r ) : i < 360 ? ( e . r = s , e . g = a , e . b = s - r ) : ( e . r = 0 , e . g = 0 , e . b = 0 ) } return [ Math . round ( e . r ) , Math . round ( e . g ) , Math . round ( e . b ) ] } } , { re : /^(\w{2})(\w{2})(\w{2})$/ , process : function ( t ) { return [ parseInt ( t [ 1 ] , 16 ) , parseInt ( t [ 2 ] , 16 ) , parseInt ( t [ 3 ] , 16 ) ] } } , { re : /^(\w{1})(\w{1})(\w{1})$/ , process : function ( t ) { return [ parseInt ( t [ 1 ] + t [ 1 ] , 16 ) , parseInt ( t [ 2 ] + t [ 2 ] , 16 ) , parseInt ( t [ 3 ] + t [ 3 ] , 16 ) ] } } ] , s = 0 ; s < o . length ; s ++ ) { var a = o [ s ] . re , r = o [ s ] . process , l = a . exec ( t ) ; if ( l ) { var c = r ( l ) ; e = c [ 0 ] , i = c [ 1 ] , n = c [ 2 ] } } return e = e < 0 || isNaN ( e ) ? 0 : e > 255 ? 255 : e , i = i < 0 || isNaN ( i ) ? 0 : i > 255 ? 255 : i , n = n < 0 || isNaN ( n ) ? 0 : n > 255 ? 255 : n , { r : e , g : i , b : n , isEqual : function ( t ) { return e == t . r && i == t . g && n == t . b } , toRGB : function ( ) { return "rgb(" + e + ", " + i + ", " + n + ")" } , toRGBA : function ( t ) { return void 0 === t && ( t = 1 ) , "rgba(" + e + ", " + i + ", " + n + ", " + t + ")" } , toHex : function ( ) { var t = e . toString ( 16 ) , o = i . toString ( 16 ) , s = n . toString ( 16 ) ; return 1 == t . length && ( t = "0" + t ) , 1 == o . length && ( o = "0" + o ) , 1 == s . length && ( s = "0" + s ) , "#" + t + o + s } , toHSB : function ( ) { var t = { h : 0 , s : 0 , b : 0 } , o = Math . min ( e , i , n ) , s = Math . max ( e , i , n ) , a = s - o ; return t . b = s , t . s = 0 != s ? 255 * a / s : 0 , 0 != t . s ? t . h = e == s ? 0 + ( i - n ) / a : i == s ? 2 + ( n - e ) / a : 4 + ( e - i ) / a : t . h = 0 , t . h *= 60 , t . h < 0 && ( t . h += 360 ) , t . s *= 100 / 255 , t . b *= 100 / 255 , t . h = parseInt ( t . h ) , t . s = parseInt ( t . s ) , t . b = parseInt ( t . b ) , t } } } , Common . Utils . String = new function ( ) { return { format : function ( t ) { var e = _ . toArray ( arguments ) . slice ( 1 ) ; return t . replace ( /\{(\d+)\}/g , function ( t , i ) { return e [ i ] } ) } , htmlEncode : function ( t ) { return _ . escape ( t ) } , htmlDecode : function ( t ) { return _ . unescape ( t ) } , ellipsis : function ( t , e , i ) { if ( t && t . length > e ) { if ( i ) { var n = t . substr ( 0 , e - 2 ) , o = Math . max ( n . lastIndexOf ( " " ) , n . lastIndexOf ( "." ) , n . lastIndexOf ( "!" ) , n . lastIndexOf ( "?" ) ) ; if ( - 1 !== o && o >= e - 15 ) return n . substr ( 0 , o ) + "..." } return t . substr ( 0 , e - 3 ) + "..." } return t } , platformKey : function ( t , e , i ) { return _ . isEmpty ( e ) && ( e = " ({0})" ) , Common . Utils . isMac ? ( _ . isFunction ( i ) && ( t = i . call ( this , t ) ) , Common . Utils . String . format ( e , t . replace ( /\+(?=\S)/g , "" ) . replace ( /Ctrl|ctrl/g , "⌘" ) . replace ( /Alt|alt/g , "⌥" ) . replace ( /Shift|shift/g , "⇧" ) ) ) : Common . Utils . String . format ( e , t ) } } } , Common . Utils . isBrowserSupported = function ( ) { return ! ( 0 != Common . Utils . ieVersion && Common . Utils . ieVersion < 9 || 0 != Common . Uti
var t = "menu" === this . cmpEl . attr ( "role" ) ? this . cmpEl : this . cmpEl . find ( "[role=menu]" ) , e = this . menuAlignEl || t . parent ( ) , i = this . menuAlign . match ( /^([a-z]+)-([a-z]+)/ ) , n = e . offset ( ) , o = Common . Utils . innerWidth ( ) , s = Common . Utils . innerHeight ( ) - 10 , a = t . outerWidth ( ) , r = t . outerHeight ( ) , l = e . outerWidth ( ) , c = e . outerHeight ( ) , h = { tl : [ 0 , 0 ] , bl : [ 0 , r ] , tr : [ a , 0 ] , br : [ a , r ] } , d = { tl : [ 0 , 0 ] , tr : [ l , 0 ] , bl : [ 0 , c ] , br : [ l , c ] } , p = n . left - h [ i [ 1 ] ] [ 0 ] + d [ i [ 2 ] ] [ 0 ] + this . offset [ 0 ] , u = n . top - h [ i [ 1 ] ] [ 1 ] + d [ i [ 2 ] ] [ 1 ] + this . offset [ 1 ] ; p + a > o && ( p = e . is ( "li.dropdown-submenu" ) ? n . left - a + 2 : o - a ) , u + r > s && ( u = s - r ) , u < 0 && ( u = 0 ) , this . options . additionalAlign ? this . options . additionalAlign . call ( this , t , p , u ) : t . css ( { left : p , top : u } ) } } ) , { Manager : function ( ) { return t } ( ) } ) } ( ) } ) , void 0 === Common ) var Common = { } ; if ( define ( "common/main/lib/view/CopyWarningDialog" , [ "common/main/lib/component/Window" ] , function ( ) { "use strict" ; Common . Views . CopyWarningDialog = Common . UI . Window . extend ( _ . extend ( { options : { width : 500 , height : 325 , cls : "modal-dlg copy-warning" } , initialize : function ( t ) { _ . extend ( this . options , { title : this . textTitle } , t || { } ) , this . template = [ '<div class="box">' , '<p class="message">' + this . textMsg + "</p>" , '<div class="hotkeys">' , "<div>" , '<p class="hotkey">' + Common . Utils . String . platformKey ( "Ctrl+C" , "{0}" ) + "</p>" , '<p class="message">' + this . textToCopy + "</p>" , "</div>" , "<div>" , '<p class="hotkey">' + Common . Utils . String . platformKey ( "Ctrl+X" , "{0}" ) + "</p>" , '<p class="message">' + this . textToCut + "</p>" , "</div>" , "<div>" , '<p class="hotkey">' + Common . Utils . String . platformKey ( "Ctrl+V" , "{0}" ) + "</p>" , '<p class="message">' + this . textToPaste + "</p>" , "</div>" , "</div>" , '<div id="copy-warning-checkbox" style="margin-top: 20px; text-align: left;"></div>' , "</div>" , '<div class="separator horizontal"/>' , '<div class="footer center">' , '<button class="btn normal dlg-btn primary">' + this . okButtonText + "</button>" , "</div>" ] . join ( "" ) , this . options . tpl = _ . template ( this . template , this . options ) , Common . UI . Window . prototype . initialize . call ( this , this . options ) } , render : function ( ) { Common . UI . Window . prototype . render . call ( this ) , this . chDontShow = new Common . UI . CheckBox ( { el : $ ( "#copy-warning-checkbox" ) , labelText : this . textDontShow } ) , this . getChild ( ) . find ( ".btn" ) . on ( "click" , _ . bind ( this . onBtnClick , this ) ) , this . autoSize ( ) } , autoSize : function ( ) { var t = this . getChild ( ".box" ) , e = this . getChild ( ".footer" ) , i = this . getChild ( ".header" ) , n = this . getChild ( ".body" ) ; n . height ( parseInt ( t . height ( ) ) + parseInt ( e . css ( "height" ) ) ) , this . setHeight ( parseInt ( n . css ( "height" ) ) + parseInt ( i . css ( "height" ) ) ) } , onBtnClick : function ( t ) { this . options . handler && this . options . handler . call ( this , "checked" == this . chDontShow . getValue ( ) ) , this . close ( ) } , onKeyPress : function ( t ) { t . keyCode == Common . UI . Keys . RETURN && ( this . options . handler && this . options . handler . call ( this , "checked" == this . chDontShow . getValue ( ) ) , this . close ( ) ) } , getSettings : function ( ) { return "checked" == this . chDontShow . getValue ( ) } , textTitle : "Copy, Cut and Paste Actions" , textMsg : "Copy, cut and paste actions using the editor toolbar buttons and context menu actions will be performed within this editor tab only.<br><br>.To copy or paste to or from applications outside the editor tab use the following keyboard combinations:" , textToCopy : "for Copy" , textToPaste : "for Paste" , textToCut : "for Cut" , textDontShow : "Don't show this message again" } , Common . Views . CopyWarningDialog || { } ) ) } ) , function ( t ) { var e = t . fn . tooltip ; e . prototype = t . fn . tooltip . Constructor . prototype , t . extend ( t . fn . tooltip . Constructor . DEFAULTS , { container : "body" , delay : { show : 500 } , arrow : ! 1 } ) ; var i = function ( t , e ) { this . init ( "tooltip" , t , e ) } ; i . prototype = t . extend ( { } , t . fn . tooltip . Constructor . prototype , { constructor : i , init : function ( ) { e . prototype . init . apply ( this , arguments ) , "cursor" == this . options . placement && /hover/ . exec ( this . options . trigger ) && this . $element . on ( "mousemove.tooltip" , this . options . selector , t . proxy ( this . mousemove , this ) ) , this . options . zIndex && this . tip ( ) . css ( "z-index" , this . options . zIndex ) ; var i = this ; Common . NotificationCenter . on ( { "layout:changed" : function ( t ) { ! i . options . hideonclick && i . tip ( ) . is ( ":visible" ) && i . hide ( ) } } ) } , mousemove : function ( t ) { this . targetXY = [ t . clientX * Common . Utils . zoom ( ) , t . clientY * Common . Utils . zoom ( ) ] } , leave : function ( t ) { e . prototype . leave . apply ( this , argum
if ( this . options . handler ) { if ( "ok" == t ) { var e = this . cmbLinkType . getValue ( ) != c _oHyperlinkType . WebLink || this . inputUrl . checkValidate ( ) , i = this . inputDisplay . checkValidate ( ) ; if ( ! 0 !== e ) return void this . inputUrl . cmpEl . find ( "input" ) . focus ( ) ; if ( ! 0 !== i ) return void this . inputDisplay . cmpEl . find ( "input" ) . focus ( ) } this . options . handler . call ( this , this , t ) } this . close ( ) } , ShowHideElem : function ( t ) { this . externalPanel . toggleClass ( "hidden" , t !== c _oHyperlinkType . WebLink ) , this . internalPanel . toggleClass ( "hidden" , t !== c _oHyperlinkType . InternalLink ) } , parseUrl : function ( t ) { if ( null === t || void 0 === t || "" == t ) return c _oHyperlinkType . WebLink ; if ( 0 == t . indexOf ( "ppaction://hlink" ) ) { if ( "ppaction://hlinkshowjump?jump=firstslide" == t ) this . radioFirst . setValue ( ! 0 ) ; else if ( "ppaction://hlinkshowjump?jump=lastslide" == t ) this . radioLast . setValue ( ! 0 ) ; else if ( "ppaction://hlinkshowjump?jump=nextslide" == t ) this . radioNext . setValue ( ! 0 ) ; else if ( "ppaction://hlinkshowjump?jump=previousslide" == t ) this . radioPrev . setValue ( ! 0 ) ; else { this . radioSlide . setValue ( ! 0 ) ; var e = "ppaction://hlinksldjumpslide" , i = t . indexOf ( e ) ; if ( 0 == i ) { var n = parseInt ( t . substring ( e . length ) ) ; n >= 0 && n < this . slides . length && this . cmbSlides . setValue ( n ) } } return c _oHyperlinkType . InternalLink } return this . inputUrl . setValue ( t ? t . replace ( new RegExp ( " " , "g" ) , "%20" ) : "" ) , c _oHyperlinkType . WebLink } , textTitle : "Hyperlink Settings" , textInternalLink : "Place In This Document" , textExternalLink : "File or Web Page" , textEmptyLink : "Enter link here" , textEmptyDesc : "Enter caption here" , textEmptyTooltip : "Enter tooltip here" , txtSlide : "Slide" , textLinkType : "Link Type" , strDisplay : "Display" , textTipText : "Screen Tip Text" , strLinkTo : "Link To" , txtEmpty : "This field is required" , txtNotUrl : 'This field should be a URL in the format "http://www.example.com"' , strPlaceInDocument : "Select a Place in This Document" , cancelButtonText : "Cancel" , okButtonText : "Ok" , txtNext : "Next Slide" , txtPrev : "Previous Slide" , txtFirst : "First Slide" , txtLast : "Last Slide" , textDefault : "Selected text" } , PE . Views . HyperlinkSettingsDialog || { } ) ) } ) , define ( "text!presentationeditor/main/app/template/ParagraphSettingsAdvanced.template" , [ ] , function ( ) { return ' < div id = "id-adv-paragraph-indents" class = "settings-panel active" > \ r \ n < div class = "inner-content" > \ r \ n < table cols = "3" style = "width: 100%;" > \ r \ n < tr > \ r \ n < td class = "padding-large" > \ r \ n < label class = "input-label" > < %= scope . strIndentsFirstLine % > < / l a b e l > \ r \ n < d i v i d = " p a r a g r a p h a d v - s p i n - f i r s t - l i n e " s t y l e = " w i d t h : 8 5 p x ; " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - l a r g e " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . s t r I n d e n t s L e f t T e x t % > < / l a b e l > \ r \ n < d i v i d = " p a r a g r a p h a d v - s p i n - i n d e n t - l e f t " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - l a r g e " > \ r \ n < l a b e l c l a s s = " i n p u t - l a b e l " > < % = s c o p e . s t r I n d e n t s R i g h t T e x t % > < / l a b e l > \ r \ n < d i v i d = " p a r a g r a p h a d v - s p i n - i n d e n t - r i g h t " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < / t a b l e > \ r \ n < / d i v > \ r \ n < / d i v > \ r \ n < d i v i d = " i d - a d v - p a r a g r a p h - f o n t " c l a s s = " s e t t i n g s - p a n e l " > \ r \ n < d i v c l a s s = " i n n e r - c o n t e n t " > \ r \ n < t a b l e c o l s = " 2 " s t y l e = " w i d t h : 1 0 0 % ; " > \ r \ n < t r > \ r \ n < t d c o l s p a n = 2 c l a s s = " p a d d i n g - s m a l l " > \ r \ n < l a b e l c l a s s = " h e a d e r " > < % = s c o p e . t e x t E f f e c t s % > < / l a b e l > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < d i v i d = " p a r a g r a p h a d v - c h e c k b o x - s t r i k e " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < d i v i d = " p a r a g r a p h a d v - c h e c k b o x - s u b s c r i p t " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < d i v i d = " p a r a g r a p h a d v - c h e c k b o x - d o u b l e - s t r i k e " > < / d i v > \ r \ n < / t d > \ r \ n < t d c l a s s = " p a d d i n g - s m a l l " > \ r \ n < d i v i d = " p a r a g r a p h a d v - c h e c k b o x - s m a l l - c a p s " > < / d i v > \ r \ n < / t d > \ r \ n < / t r > \ r \ n < t r > \ r \ n < t d c l a s s = " p
e . keyCode == Common . UI . Keys . LEFT ) for ( ; void 0 === n ; ) { if ( -- a < 0 ) { var o = $ ( t . target ) . closest ( ".dropdown-submenu.over" ) ; if ( o . length > 0 ) { o . removeClass ( "over" ) , o . find ( "> a" ) . focus ( ) ; break } a = this . _layoutParams . columns - 1 } n = this . _layoutParams . itemsIndexes [ s ] [ a ] } else if ( e . keyCode == Common . UI . Keys . RIGHT ) for ( ; void 0 === n ; ) a ++ , a > this . _layoutParams . columns - 1 && ( a = 0 ) , n = this . _layoutParams . itemsIndexes [ s ] [ a ] ; else if ( e . keyCode == Common . UI . Keys . UP ) for ( ; void 0 === n ; ) s -- , s < 0 && ( s = this . _layoutParams . rows - 1 ) , n = this . _layoutParams . itemsIndexes [ s ] [ a ] ; else for ( ; void 0 === n ; ) s ++ , s > this . _layoutParams . rows - 1 && ( s = 0 ) , n = this . _layoutParams . itemsIndexes [ s ] [ a ] } else n = e . keyCode == Common . UI . Keys . UP || e . keyCode == Common . UI . Keys . LEFT ? Math . max ( 0 , n - 1 ) : Math . min ( this . store . length - 1 , n + 1 ) ; void 0 !== n && n >= 0 && ( i = this . store . at ( n ) ) , i && ( this . _fromKeyDown = ! 0 , this . selectRecord ( i ) , this . _fromKeyDown = ! 1 , this . scrollToRecord ( i ) ) } } else this . trigger ( "item:keydown" , this , i , t ) } , attachKeyEvents : function ( ) { if ( this . enableKeyEvents && this . handleSelect ) { var t = $ ( this . el ) . find ( ".inner" ) . andSelf ( ) . filter ( ".inner" ) ; t . addClass ( "canfocused" ) , t . attr ( "tabindex" , "0" ) , t . on ( this . parentMenu && this . useBSKeydown ? "dataview:keydown" : "keydown" , _ . bind ( this . onKeyDown , this ) ) } } , showLastSelected : function ( ) { if ( this . lastSelectedRec ) this . selectRecord ( this . lastSelectedRec , ! 0 ) , this . scrollToRecord ( this . lastSelectedRec ) , this . lastSelectedRec = null ; else { var t = this . getSelectedRec ( ) [ 0 ] ; t && this . scrollToRecord ( t ) } } , setDisabled : function ( t ) { this . disabled = t , $ ( this . el ) . find ( ".inner" ) . andSelf ( ) . filter ( ".inner" ) . toggleClass ( "disabled" , t ) } , isDisabled : function ( ) { return this . disabled } , setEmptyText : function ( t ) { this . emptyText = t } , alignPosition : function ( ) { var t = "menu" === this . parentMenu . cmpEl . attr ( "role" ) ? this . parentMenu . cmpEl : this . parentMenu . cmpEl . find ( "[role=menu]" ) , e = $ ( this . el ) . find ( ".inner" ) . andSelf ( ) . filter ( ".inner" ) , i = Common . Utils . innerHeight ( ) , n = t . outerHeight ( ) , o = parseInt ( t . css ( "top" ) ) ; n > i ? ( e . css ( "max-height" , i - parseInt ( t . css ( "padding-top" ) ) - parseInt ( t . css ( "padding-bottom" ) ) - 5 + "px" ) , this . allowScrollbar && this . scroller . update ( { minScrollbarLength : 40 } ) ) : e . height ( ) < this . options . restoreHeight && ( e . css ( "max-height" , Math . min ( i - parseInt ( t . css ( "padding-top" ) ) - parseInt ( t . css ( "padding-bottom" ) ) - 5 , this . options . restoreHeight ) + "px" ) , n = t . outerHeight ( ) , o + n > i && t . css ( "top" , 0 ) , this . allowScrollbar && this . scroller . update ( { minScrollbarLength : 40 } ) ) } , fillIndexesArray : function ( ) { if ( ! ( this . dataViewItems . length <= 0 ) ) { this . _layoutParams = { itemsIndexes : [ ] , columns : 0 , rows : 0 } ; for ( var t = $ ( this . dataViewItems [ 0 ] . el ) , e = t . outerWidth ( ) + parseInt ( t . css ( "margin-left" ) ) + parseInt ( t . css ( "margin-right" ) ) , i = this . $el . offset ( ) . left , n = - 1 , o = 0 , s = 0 , a = 0 ; a < this . dataViewItems . length ; a ++ ) { var r = $ ( this . dataViewItems [ a ] . el ) . offset ( ) . top ; s = Math . floor ( ( $ ( this . dataViewItems [ a ] . el ) . offset ( ) . left - i ) / e ) , r > n && ( n = r , this . _layoutParams . itemsIndexes . push ( [ ] ) , o = this . _layoutParams . itemsIndexes . length - 1 ) , this . _layoutParams . itemsIndexes [ o ] [ s ] = a , this . dataViewItems [ a ] . topIdx = o , this . dataViewItems [ a ] . leftIdx = s , this . _layoutParams . columns < s && ( this . _layoutParams . columns = s ) } this . _layoutParams . rows = this . _layoutParams . itemsIndexes . length , this . _layoutParams . columns ++ } } , onResize : function ( ) { this . _layoutParams = void 0 } } ) , $ ( document ) . on ( "keydown.dataview" , "[data-toggle=dropdown], [role=menu]" , function ( t ) { t . keyCode !== Common . UI . Keys . UP && t . keyCode !== Common . UI . Keys . DOWN && t . keyCode !== Common . UI . Keys . LEFT && t . keyCode !== Common . UI . Keys . RIGHT && t . keyCode !== Common . UI . Keys . RETURN || _ . defer ( function ( ) { var e = $ ( t . target ) . closest ( ".dropdown-toggle" ) ; e . length ? e . parent ( ) . find ( ".inner.canfocused" ) . trigger ( "dataview:keydown" , t ) : $ ( t . target ) . closest ( ".dropdown-submenu" ) . find ( ".inner.canfocused" ) . trigger ( "dataview:keydown" , t ) } , 100 ) } ) } ) , void 0 === Common ) var Common = { } ; define ( "common/main/lib/component/ListView" , [ "common/main/lib/component/DataView" ] , function ( ) { "use strict" ; Common . UI . ListView = Common . UI . DataView . extend ( function ( ) { return { options : { handleSelect : ! 0 , enableKeyEvents : ! 0 , showLast : ! 0 , simpleAddMode : ! 1 , keyMoveDirection : "vertical" , itemTemplate : _ . template ( '<div id="<%= id %>" class="list-item" style=""><%= value %></div>' ) } , template : _ . template ( [ ' < div class = " listview
i [ 1 ] . type = Asc . c _oAscLineBeginSize . small _mid , i [ 2 ] . type = Asc . c _oAscLineBeginSize . small _large , i [ 3 ] . type = Asc . c _oAscLineBeginSize . mid _small , i [ 4 ] . type = Asc . c _oAscLineBeginSize . mid _mid , i [ 5 ] . type = Asc . c _oAscLineBeginSize . mid _large , i [ 6 ] . type = Asc . c _oAscLineBeginSize . large _small , i [ 7 ] . type = Asc . c _oAscLineBeginSize . large _mid , i [ 8 ] . type = Asc . c _oAscLineBeginSize . large _large , this . btnBeginStyle = new Common . UI . ComboBox ( { el : $ ( "#shape-advanced-begin-style" ) , template : _ . template ( [ '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">' , '<div class="form-control image" style="width: 100px;"></div>' , '<div style="display: table-cell;"></div>' , '<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>' , "</div>" ] . join ( "" ) ) } ) , this . btnBeginStyleMenu = new Common . UI . Menu ( { style : "min-width: 105px;" , items : [ { template : _ . template ( '<div id="shape-advanced-menu-begin-style" style="width: 105px; margin: 0 5px;"></div>' ) } ] } ) . render ( $ ( "#shape-advanced-begin-style" ) ) , this . mnuBeginStylePicker = new Common . UI . DataView ( { el : $ ( "#shape-advanced-menu-begin-style" ) , parentMenu : this . btnBeginStyleMenu , store : new Common . UI . DataViewStore ( e ) , itemTemplate : _ . template ( '<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>' ) } ) , this . mnuBeginStylePicker . on ( "item:click" , _ . bind ( this . onSelectBeginStyle , this ) ) , this . _selectStyleItem ( this . btnBeginStyle , null ) , this . btnBeginSize = new Common . UI . ComboBox ( { el : $ ( "#shape-advanced-begin-size" ) , template : _ . template ( [ '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">' , '<div class="form-control image" style="width: 100px;"></div>' , '<div style="display: table-cell;"></div>' , '<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>' , "</div>" ] . join ( "" ) ) } ) , this . btnBeginSizeMenu = new Common . UI . Menu ( { style : "min-width: 160px;" , items : [ { template : _ . template ( '<div id="shape-advanced-menu-begin-size" style="width: 160px; margin: 0 5px;"></div>' ) } ] } ) . render ( $ ( "#shape-advanced-begin-size" ) ) , this . mnuBeginSizePicker = new Common . UI . DataView ( { el : $ ( "#shape-advanced-menu-begin-size" ) , parentMenu : this . btnBeginSizeMenu , store : new Common . UI . DataViewStore ( i ) , itemTemplate : _ . template ( '<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>' ) } ) , this . mnuBeginSizePicker . on ( "item:click" , _ . bind ( this . onSelectBeginSize , this ) ) , this . _selectStyleItem ( this . btnBeginSize , null ) , n = 0 ; n < e . length ; n ++ ) e [ n ] . offsety += 200 ; for ( n = 0 ; n < i . length ; n ++ ) i [ n ] . offsety += 200 ; this . btnEndStyle = new Common . UI . ComboBox ( { el : $ ( "#shape-advanced-end-style" ) , template : _ . template ( [ '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">' , '<div class="form-control image" style="width: 100px;"></div>' , '<div style="display: table-cell;"></div>' , '<button type="button" class="btn btn-default"><span class="caret img-commonctrl"></span></button>' , "</div>" ] . join ( "" ) ) } ) , this . btnEndStyleMenu = new Common . UI . Menu ( { style : "min-width: 105px;" , items : [ { template : _ . template ( '<div id="shape-advanced-menu-end-style" style="width: 105px; margin: 0 5px;"></div>' ) } ] } ) . render ( $ ( "#shape-advanced-end-style" ) ) , this . mnuEndStylePicker = new Common . UI . DataView ( { el : $ ( "#shape-advanced-menu-end-style" ) , parentMenu : this . btnEndStyleMenu , store : new Common . UI . DataViewStore ( e ) , itemTemplate : _ . template ( '<div id="<%= id %>" class="item-arrow" style="background-position: -<%= offsetx %>px -<%= offsety %>px;"></div>' ) } ) , this . mnuEndStylePicker . on ( "item:click" , _ . bind ( this . onSelectEndStyle , this ) ) , this . _selectStyleItem ( this . btnEndStyle , null ) , this . btnEndSize = new Common . UI . ComboBox ( { el : $ ( "#shape-advanced-end-size" ) , template : _ . template ( [ '<div class="input-group combobox combo-dataview-menu input-group-nr dropdown-toggle combo-arrow-style" data-toggle="dropdown">' , '<div class="form-control image" style="width: 100px;"></div>' , '<div style="display: table-cell;"></div>' , ' < button type
return t . preventDefault ( ) , t . stopPropagation ( ) , ! 1 } ) , n . on ( "click" , function ( t ) { "canvas" == t . target . localName && n . focus ( ) } ) , n . on ( "mousedown" , function ( t ) { "canvas" == t . target . localName && Common . UI . Menu . Manager . hideAll ( ) } ) ; var o = /Firefox/i . test ( navigator . userAgent ) ? "DOMMouseScroll" : "mousewheel" ; ! function ( t , e , i ) { t . addEventListener ? t . addEventListener ( e , i , ! 1 ) : t . attachEvent ( "on" + e , i ) } ( i . el , o , c ) } t ( document ) . on ( "mousewheel" , c ) , t ( document ) . on ( "keydown" , h ) , t ( window ) . on ( "resize" , d ) , PE . getController ( "Viewport" ) . getView ( "Viewport" ) . hlayout . on ( "layout:resizedrag" , d ) } , u = function ( t ) { if ( n ) { var e = n . findUser ( t ) ; if ( e ) return e . get ( "username" ) } return i . guestText } , m = { toolTip : new Common . UI . Tooltip ( { owner : this , html : ! 0 , title : "<br><b>Press Ctrl and click link</b>" } ) , strTip : "" , isHidden : ! 0 , isVisible : ! 1 } , g = ! 0 , f = function ( t , e , n ) { ! 0 === g && ( g = new Common . UI . Tooltip ( { owner : t . currentTarget , title : i . tipIsLocked } ) , g . show ( ) ) } , b = function ( ) { if ( "object" == typeof g ) { g . hide ( ) , g = void 0 ; for ( var t = 0 ; t < i . usertips . length ; t ++ ) i . usertips [ t ] . off ( "mouseover" , f ) , i . usertips [ t ] . off ( "mouseout" , C ) } } , C = function ( t , e , i ) { "object" == typeof g && g . $element && t . currentTarget === g . $element [ 0 ] && b ( ) } ; Common . NotificationCenter . on ( { "window:show" : function ( t ) { m . toolTip . hide ( ) , m . isVisible = ! 1 , b ( ) } , "modal:show" : function ( t ) { i . hideTips ( ) } , "layout:changed" : function ( t ) { m . toolTip . hide ( ) , m . isVisible = ! 1 , b ( ) , i . hideTips ( ) , d ( ) } } ) ; var v = function ( t ) { t && i . api . asc _getUrlType ( t ) > 0 && window . open ( t ) } , _ = function ( ) { m . isHidden = ! 0 , i . usertips . length > 0 && ( "object" == typeof g && ( g . hide ( ) , g = ! 0 ) , e . each ( i . usertips , function ( t ) { t . remove ( ) } ) ) , i . usertips = [ ] , i . usertipcount = 0 } , y = function ( ) { m . isHidden && m . isVisible && ( m . isVisible = ! 1 , m . toolTip . hide ( ) ) } , x = function ( n ) { if ( e . isUndefined ( i . _XY ) && ( i . _XY = [ i . cmpEl . offset ( ) . left - t ( window ) . scrollLeft ( ) , i . cmpEl . offset ( ) . top - t ( window ) . scrollTop ( ) ] , i . _Width = i . cmpEl . width ( ) , i . _Height = i . cmpEl . height ( ) , i . _BodyWidth = t ( "body" ) . width ( ) ) , n ) { var o , s ; if ( 1 == n . get _Type ( ) ) { var a = n . get _Hyperlink ( ) , r = ! 1 ; a && ( m . isHidden = ! 1 , s = e . isEmpty ( a . get _ToolTip ( ) ) ? a . get _Value ( ) : a . get _ToolTip ( ) , s = Common . Utils . String . htmlEncode ( s ) , ( m . tipLength !== s . length || m . strTip . indexOf ( s ) < 0 ) && ( m . toolTip . setTitle ( s + "<br><b>" + i . txtPressLink + "</b>" ) , m . tipLength = s . length , m . strTip = s , r = ! 0 ) , o = [ n . get _X ( ) , n . get _Y ( ) ] , o [ 1 ] += i . _XY [ 1 ] - 15 , o [ 0 ] += i . _XY [ 0 ] + 5 , m . isVisible && ! r || ( m . isVisible = ! 0 , m . toolTip . show ( [ - 1e4 , - 1e4 ] ) ) , r && ( m . tipHeight = m . toolTip . getBSTip ( ) . $tip . height ( ) , m . tipWidth = m . toolTip . getBSTip ( ) . $tip . width ( ) ) , o [ 1 ] -= m . tipHeight , o [ 0 ] + m . tipWidth > i . _BodyWidth && ( o [ 0 ] = i . _BodyWidth - m . tipWidth ) , m . toolTip . getBSTip ( ) . $tip . css ( { top : o [ 1 ] + "px" , left : o [ 0 ] + "px" } ) ) } else if ( 2 == n . get _Type ( ) && i . mode . isEdit ) { var l ; i . usertipcount >= i . usertips . length && ( l = t ( document . createElement ( "div" ) ) , l . addClass ( "username-tip" ) , l . css ( { height : i . _TtHeight + "px" , position : "absolute" , zIndex : "900" , visibility : "visible" } ) , t ( document . body ) . append ( l ) , g && ( l . on ( "mouseover" , f ) , l . on ( "mouseout" , C ) ) , i . usertips . push ( l ) ) , l = i . usertips [ i . usertipcount ] , i . usertipcount ++ , s = u ( n . get _UserId ( ) ) , o = [ n . get _X ( ) + i . _XY [ 0 ] , n . get _Y ( ) + i . _XY [ 1 ] ] , o [ 0 ] = i . _BodyWidth - o [ 0 ] , o [ 1 ] -= 2 == n . get _LockedObjectType ( ) ? i . _TtHeight : 0 , o [ 1 ] > i . _XY [ 1 ] && o [ 1 ] + i . _TtHeight < i . _XY [ 1 ] + i . _Height && ( l . text ( s ) , l . css ( { visibility : "visible" , top : o [ 1 ] + "px" , right : o [ 0 ] + "px" } ) ) } } } , w = function ( e , n , o , s ) { for ( var a , r = 0 ; r < i . fastcoauthtips . length ; r ++ ) if ( i . fastcoauthtips [ r ] . attr ( "userid" ) == e ) { a = i . fastcoauthtips [ r ] ; break } a || ( a = t ( document . createElement ( "div" ) ) , a . addClass ( "username-tip" ) , a . attr ( "userid" , e ) , a . css ( { height : i . _TtHeight + "px" , position : "absolute" , zIndex : "900" , display : "none" , "pointer-events" : "none" , "background-color" : "#" + Common . Utils . ThemeColor . getHexColor ( s . get _r ( ) , s . get _g ( ) , s . get _b ( ) ) } ) , a . text ( u ( e ) ) , t ( "#id_main_view" ) . append ( a ) , i . fastcoauthtips . push ( a ) , a . fadeIn ( 150 ) ) , a . css ( { top : o - i . _TtHeight + "px" , left : n + "px" } ) } , S = function ( t ) { for ( var e = 0 ; e < i . fastcoauthtips . length ; e ++ ) if ( i . fastcoauthtips [ e ] . attr ( "userid" ) == t ) { var n = i . fastcoauthtips [ e ] ; i . fastcoauthtips [ e ] . fadeOut ( 150 , function ( ) { n . remove ( ) } ) , i . fastcoauthtips . splice ( e , 1 ) ; break } } , T = function ( ) { var t , n , o ; if ( i . api && i . mode . isEdit ) { var s = function ( t , e ) { "ok" == e && ( n = t . getSettings ( ) , ! 1 !== o ? i . api . add _Hyperlink ( n ) : i . api . change _Hyperlink ( n ) ) , i . fireEvent (
} ) . on ( "click" , e . bind ( t , i ) ) , i . menuTableCellCenter = new Common . UI . MenuItem ( { caption : i . centerCellText , checkable : ! 0 , toggleGroup : "popuptablecellalign" , value : Asc . c _oAscVertAlignJc . Center } ) . on ( "click" , e . bind ( t , i ) ) , i . menuTableCellBottom = new Common . UI . MenuItem ( { caption : i . bottomCellText , checkable : ! 0 , toggleGroup : "popuptablecellalign" , value : Asc . c _oAscVertAlignJc . Bottom } ) . on ( "click" , e . bind ( t , i ) ) ] } ) } ( ) } ) , p = new Common . UI . MenuItem ( { caption : i . advancedTableText } ) . on ( "click" , function ( t ) { if ( i . api ) { var e = i . api . getSelectedElements ( ) ; if ( e && e . length > 0 ) for ( var n , o , s = e . length - 1 ; s >= 0 ; s -- ) if ( n = e [ s ] . get _ObjectType ( ) , o = e [ s ] . get _ObjectValue ( ) , Asc . c _oAscTypeSelectElement . Table == n ) { new PE . Views . TableSettingsAdvanced ( { tableProps : o , handler : function ( t , e ) { "ok" == t && i . api && i . api . tblApply ( e . tableProps ) , i . fireEvent ( "editcomplete" , i ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Table Settings Advanced" ) } } ) . show ( ) ; break } } } ) , u = new Common . UI . MenuItem ( { caption : i . advancedImageText } ) . on ( "click" , function ( t ) { if ( i . api ) { var e = i . api . getSelectedElements ( ) ; if ( e && e . length > 0 ) for ( var n , o , s = e . length - 1 ; s >= 0 ; s -- ) if ( n = e [ s ] . get _ObjectType ( ) , o = e [ s ] . get _ObjectValue ( ) , Asc . c _oAscTypeSelectElement . Image == n ) { var a ; F . isDisabled ( ) || ( a = i . api . get _OriginalSizeImage ( ) ) && ( a = { width : a . get _ImageWidth ( ) , height : a . get _ImageHeight ( ) } ) , new PE . Views . ImageSettingsAdvanced ( { imageProps : o , sizeOriginal : a , handler : function ( t , e ) { "ok" == t && i . api && i . api . ImgApply ( e . imageProps ) , i . fireEvent ( "editcomplete" , i ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Image Settings Advanced" ) } } ) . show ( ) ; break } } } ) , m = new Common . UI . MenuItem ( { caption : i . advancedShapeText } ) . on ( "click" , function ( t ) { if ( i . api ) { var e = i . api . getSelectedElements ( ) ; if ( e && e . length > 0 ) for ( var n , o , s = e . length - 1 ; s >= 0 ; s -- ) if ( n = e [ s ] . get _ObjectType ( ) , o = e [ s ] . get _ObjectValue ( ) , Asc . c _oAscTypeSelectElement . Shape == n ) { new PE . Views . ShapeSettingsAdvanced ( { shapeProps : o , handler : function ( t , e ) { "ok" == t && i . api && i . api . ShapeApply ( e . shapeProps ) , i . fireEvent ( "editcomplete" , i ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Image Shape Advanced" ) } } ) . show ( ) ; break } } } ) , g = new Common . UI . MenuItem ( { caption : i . advancedParagraphText } ) . on ( "click" , function ( t ) { if ( i . api ) { var e = i . api . getSelectedElements ( ) ; if ( e && e . length > 0 ) for ( var n , o , s = e . length - 1 ; s >= 0 ; s -- ) if ( n = e [ s ] . get _ObjectType ( ) , o = e [ s ] . get _ObjectValue ( ) , Asc . c _oAscTypeSelectElement . Paragraph == n ) { new PE . Views . ParagraphSettingsAdvanced ( { paragraphProps : o , api : i . api , handler : function ( t , e ) { "ok" == t && i . api && i . api . paraApply ( e . paragraphProps ) , i . fireEvent ( "editcomplete" , i ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Image Paragraph Advanced" ) } } ) . show ( ) ; break } } } ) , f = new Common . UI . MenuItem ( { caption : "--" } ) , b = new Common . UI . MenuItem ( { caption : i . hyperlinkText } ) . on ( "click" , e . bind ( i . addHyperlink , i ) ) , C = new Common . UI . MenuItem ( { caption : i . editHyperlinkText } ) . on ( "click" , e . bind ( i . editHyperlink , i ) ) , v = new Common . UI . MenuItem ( { caption : i . removeHyperlinkText } ) . on ( "click" , function ( t ) { i . api && i . api . remove _Hyperlink ( ) , i . fireEvent ( "editcomplete" , i ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Remove Hyperlink" ) } ) , _ = new Common . UI . MenuItem ( { caption : i . hyperlinkText , menu : new Common . UI . Menu ( { menuAlign : "tl-tr" , items : [ C , v ] } ) } ) , y = new Common . UI . MenuItem ( { caption : i . hyperlinkText } ) . on ( "click" , e . bind ( i . addHyperlink , i ) ) , x = new Common . UI . MenuItem ( { caption : i . editHyperlinkText } ) . on ( "click" , e . bind ( i . editHyperlink , i ) ) , w = new Common . UI . MenuItem ( { caption : i . removeHyperlinkText } ) . on ( "click" , function ( t ) { i . api && i . api . remove _Hyperlink ( ) , i . fireEvent ( "editcomplete" , i ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Remove Hyperlink Table" ) } ) , S = new Common . UI . MenuItem ( { caption : i . hyperlinkText , menu : new Common . UI . Menu ( { menuAlign : "tl-tr" , items : [ x , w ] } ) } ) , T = new Common . UI . MenuItem ( { caption : "--" } ) , A = new Common . UI . MenuItem ( { caption : this . txtGroup , iconCls : "mnu-group" } ) . on ( "click" , function ( t ) { i . api && i . api . groupShapes ( ) , i . fireEvent ( "editcomplete" , this ) , Common . component . Analytics . trackEvent ( "DocumentHolder" , "Group Image" ) } ) , k = new Common . UI . MenuItem ( { caption : this . txtUngroup , iconCls : "mnu-ungroup" } ) . on ( "click" , function ( t ) { i . api && i . api . unGroupShapes ( ) , i . fireEvent ( "editcomplete" , thi
LargeOperator _Intersection _CenterSubSup : 84017158 , LargeOperator _Intersection _SubSup : 84017159 , LargeOperator _Intersection _CenterSub : 84017160 , LargeOperator _Intersection _Sub : 84017161 , LargeOperator _Disjunction : 84082688 , LargeOperator _Disjunction _CenterSubSup : 84082689 , LargeOperator _Disjunction _SubSup : 84082690 , LargeOperator _Disjunction _CenterSub : 84082691 , LargeOperator _Disjunction _Sub : 84082692 , LargeOperator _Conjunction : 84082693 , LargeOperator _Conjunction _CenterSubSup : 84082694 , LargeOperator _Conjunction _SubSup : 84082695 , LargeOperator _Conjunction _CenterSub : 84082696 , LargeOperator _Conjunction _Sub : 84082697 , LargeOperator _Custom _1 : 84148224 , LargeOperator _Custom _2 : 84148225 , LargeOperator _Custom _3 : 84148226 , LargeOperator _Custom _4 : 84148227 , LargeOperator _Custom _5 : 84148228 , Bracket _Round : 100663296 , Bracket _Square : 100663297 , Bracket _Curve : 100663298 , Bracket _Angle : 100663299 , Bracket _LowLim : 100663300 , Bracket _UppLim : 100663301 , Bracket _Line : 100663302 , Bracket _LineDouble : 100663303 , Bracket _Square _OpenOpen : 100663304 , Bracket _Square _CloseClose : 100663305 , Bracket _Square _CloseOpen : 100663306 , Bracket _SquareDouble : 100663307 , Bracket _Round _Delimiter _2 : 100728832 , Bracket _Curve _Delimiter _2 : 100728833 , Bracket _Angle _Delimiter _2 : 100728834 , Bracket _Angle _Delimiter _3 : 100728835 , Bracket _Round _OpenNone : 100794368 , Bracket _Round _NoneOpen : 100794369 , Bracket _Square _OpenNone : 100794370 , Bracket _Square _NoneOpen : 100794371 , Bracket _Curve _OpenNone : 100794372 , Bracket _Curve _NoneOpen : 100794373 , Bracket _Angle _OpenNone : 100794374 , Bracket _Angle _NoneOpen : 100794375 , Bracket _LowLim _OpenNone : 100794376 , Bracket _LowLim _NoneNone : 100794377 , Bracket _UppLim _OpenNone : 100794378 , Bracket _UppLim _NoneOpen : 100794379 , Bracket _Line _OpenNone : 100794380 , Bracket _Line _NoneOpen : 100794381 , Bracket _LineDouble _OpenNone : 100794382 , Bracket _LineDouble _NoneOpen : 100794383 , Bracket _SquareDouble _OpenNone : 100794384 , Bracket _SquareDouble _NoneOpen : 100794385 , Bracket _Custom _1 : 100859904 , Bracket _Custom _2 : 100859905 , Bracket _Custom _3 : 100859906 , Bracket _Custom _4 : 100859907 , Bracket _Custom _5 : 100925440 , Bracket _Custom _6 : 100925441 , Bracket _Custom _7 : 100925442 , Function _Sin : 117440512 , Function _Cos : 117440513 , Function _Tan : 117440514 , Function _Csc : 117440515 , Function _Sec : 117440516 , Function _Cot : 117440517 , Function _1 _Sin : 117506048 , Function _1 _Cos : 117506049 , Function _1 _Tan : 117506050 , Function _1 _Csc : 117506051 , Function _1 _Sec : 117506052 , Function _1 _Cot : 117506053 , Function _Sinh : 117571584 , Function _Cosh : 117571585 , Function _Tanh : 117571586 , Function _Csch : 117571587 , Function _Sech : 117571588 , Function _Coth : 117571589 , Function _1 _Sinh : 117637120 , Function _1 _Cosh : 117637121 , Function _1 _Tanh : 117637122 , Function _1 _Csch : 117637123 , Function _1 _Sech : 117637124 , Function _1 _Coth : 117637125 , Function _Custom _1 : 117702656 , Function _Custom _2 : 117702657 , Function _Custom _3 : 117702658 , Accent _Dot : 134217728 , Accent _DDot : 134217729 , Accent _DDDot : 134217730 , Accent _Hat : 134217731 , Accent _Check : 134217732 , Accent _Accent : 134217733 , Accent _Grave : 134217734 , Accent _Smile : 134217735 , Accent _Tilde : 134217736 , Accent _Bar : 134217737 , Accent _DoubleBar : 134217738 , Accent _CurveBracketTop : 134217739 , Accent _CurveBracketBot : 134217740 , Accent _GroupTop : 134217741 , Accent _GroupBot : 134217742 , Accent _ArrowL : 134217743 , Accent _ArrowR : 134217744 , Accent _ArrowD : 134217745 , Accent _HarpoonL : 134217746 , Accent _HarpoonR : 134217747 , Accent _BorderBox : 134283264 , Accent _BorderBoxCustom : 134283265 , Accent _BarTop : 134348800 , Accent _BarBot : 134348801 , Accent _Custom _1 : 134414336 , Accent _Custom _2 : 134414337 , Accent _Custom _3 : 134414338 , LimitLog _LogBase : 150994944 , LimitLog _Log : 150994945 , LimitLog _Lim : 150994946 , LimitLog _Min : 150994947 , LimitLog _Max : 150994948 , LimitLog _Ln : 150994949 , LimitLog _Custom _1 : 151060480 , LimitLog _Custom _2 : 151060481 , Operator _ColonEquals : 167772160 , Operator _EqualsEquals : 167772161 , Operator _PlusEquals : 167772162 , Operator _MinusEquals : 167772163 , Operator _Definition : 167772164 , Operator _UnitOfMeasure : 167772165 , Operator _DeltaEquals : 167772166 , Operator _ArrowL _Top : 167837696 , Operator _ArrowR _Top : 167837697 , Operator _ArrowL _Bot : 167837698 , Operator _ArrowR _Bot : 167837699 , Operator _DoubleArrowL _Top : 167837700 , Operator _DoubleArrowR _Top : 167837701 , Operator _DoubleArrowL _Bot : 167837702 , Operator _DoubleArrowR _Bot : 167837703 , Operator _ArrowD _Top
Common . UI . Window . prototype . initialize . call ( this , { cls : "extended-color-dlg" , tpl : this . tpl ( { txtNew : this . textNew , txtCurrent : this . textCurrent , txtAdd : this . addButtonText , txtCancel : this . cancelButtonText } ) , header : ! 1 , width : 340 , height : 272 } ) , this . hexRe = /\s*#?([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)([0-9a-fA-F][0-9a-fA-F]?)\s*/ } , render : function ( ) { function t ( t ) { e . trigger ( "onmodalresult" , parseInt ( t . currentTarget . attributes . result . value ) ) , e . close ( ! 0 ) } var e = this ; return Common . UI . Window . prototype . render . call ( this ) , this . colorsPicker = new Common . UI . HSBColorPicker ( { el : $ ( "#id-hsb-colorpicker" ) , showCurrentColor : ! 1 } ) , this . colorsPicker . on ( "changecolor" , _ . bind ( this . onChangeColor , this ) ) , this . colorNew = $ ( "#field-new-color" ) , this . colorSaved = $ ( "#field-start-color" ) , this . spinR = new Common . UI . MetricSpinner ( { el : $ ( "#extended-spin-r" ) , step : 1 , width : 63 , value : "0" , defaultUnit : "" , maxValue : 255 , minValue : 0 , tabindex : 1 , maskExp : /[0-9]/ , allowDecimal : ! 1 } ) , this . spinG = new Common . UI . MetricSpinner ( { el : $ ( "#extended-spin-g" ) , step : 1 , width : 63 , value : "0" , defaultUnit : "" , maxValue : 255 , minValue : 0 , tabindex : 2 , maskExp : /[0-9]/ , allowDecimal : ! 1 } ) , this . spinB = new Common . UI . MetricSpinner ( { el : $ ( "#extended-spin-b" ) , step : 1 , width : 63 , value : "0" , defaultUnit : "" , maxValue : 255 , minValue : 0 , tabindex : 3 , maskExp : /[0-9]/ , allowDecimal : ! 1 } ) , this . textColor = new Common . UI . MaskedField ( { el : $ ( "#extended-text-color" ) , width : 55 , maskExp : /[a-fA-F0-9]/ , maxLength : 6 } ) , this . spinR . on ( "change" , _ . bind ( this . showColor , this , null , ! 0 ) ) . on ( "changing" , _ . bind ( this . onChangingRGB , this , 1 ) ) , this . spinG . on ( "change" , _ . bind ( this . showColor , this , null , ! 0 ) ) . on ( "changing" , _ . bind ( this . onChangingRGB , this , 2 ) ) , this . spinB . on ( "change" , _ . bind ( this . showColor , this , null , ! 0 ) ) . on ( "changing" , _ . bind ( this . onChangingRGB , this , 3 ) ) , this . textColor . on ( "change" , _ . bind ( this . onChangeMaskedField , this ) ) , this . textColor . on ( "changed" , _ . bind ( this . onChangedMaskedField , this ) ) , this . textColor . $el . attr ( "tabindex" , 4 ) , this . spinR . $el . find ( "input" ) . attr ( "maxlength" , 3 ) , this . spinG . $el . find ( "input" ) . attr ( "maxlength" , 3 ) , this . spinB . $el . find ( "input" ) . attr ( "maxlength" , 3 ) , this . on ( "close" , function ( ) { e . trigger ( "onmodalresult" , 0 ) } ) , $ ( this ) [ 0 ] . getChild ( ".footer .dlg-btn" ) . on ( "click" , t ) , this . rendered = ! 0 , void 0 !== this . color && this . setColor ( this . color ) , this } , onChangeColor : function ( t , e ) { this . colorNew . css ( { "background-color" : e } ) , this . stopevents = ! 0 ; var i = e . match ( this . hexRe ) ; this . spinR . setValue ( parseInt ( i [ 1 ] , 16 ) ) , this . spinG . setValue ( parseInt ( i [ 2 ] , 16 ) ) , this . spinB . setValue ( parseInt ( i [ 3 ] , 16 ) ) , this . textColor . setValue ( ( i [ 1 ] + i [ 2 ] + i [ 3 ] ) . toUpperCase ( ) ) , this . stopevents = ! 1 } , showColor : function ( t , e ) { if ( ! this . stopevents ) { var i = this . spinR . getNumberValue ( ) , n = null == i || i < 0 ? 0 : i > 255 ? 255 : i ; e && this . spinR . setValue ( n , ! 0 ) , n = n . toString ( 16 ) , i = this . spinG . getNumberValue ( ) ; var o = null == i || i < 0 ? 0 : i > 255 ? 255 : i ; e && this . spinG . setValue ( o , ! 0 ) , o = o . toString ( 16 ) , i = this . spinB . getNumberValue ( ) ; var s = null == i || i < 0 ? 0 : i > 255 ? 255 : i ; e && this . spinB . setValue ( s , ! 0 ) , s = s . toString ( 16 ) ; var a = ( 1 == n . length ? "0" + n : n ) + ( 1 == o . length ? "0" + o : o ) + ( 1 == s . length ? "0" + s : s ) ; this . colorsPicker . setColor ( "#" + a ) , "hex" != t && this . textColor . setValue ( a . toUpperCase ( ) ) , this . colorNew . css ( "background-color" , "#" + a ) } } , onChangingRGB : function ( t , e , i , n ) { if ( ! this . stopevents ) { var o , s , a , r ; switch ( i = _ . isEmpty ( i ) || isNaN ( parseInt ( i ) ) ? parseInt ( e . getValue ( ) ) : parseInt ( i ) , t ) { case 1 : o = ( null == i || isNaN ( i ) || i < 0 ? 0 : i > 255 ? 255 : i ) . toString ( 16 ) , r = this . spinG . getNumberValue ( ) , s = ( null == r || r < 0 ? 0 : r > 255 ? 255 : r ) . toString ( 16 ) , r = this . spinB . getNumberValue ( ) , a = ( null == r || r < 0 ? 0 : r > 255 ? 255 : r ) . toString ( 16 ) ; break ; case 2 : r = this . spinR . getNumberValue ( ) , o = ( null == r || r < 0 ? 0 : r > 255 ? 255 : r ) . toString ( 16 ) , s = ( null == i || isNaN ( i ) || i < 0 ? 0 : i > 255 ? 255 : i ) . toString ( 16 ) , r = this . spinB . getNumberValue ( ) , a = ( null == r || r < 0 ? 0 : r > 255 ? 255 : r ) . toString ( 16 ) ; break ; case 3 : r = this . spinR . getNumberValue ( ) , o = ( null == r || r < 0 ? 0 : r > 255 ? 255 : r ) . toString ( 16 ) , r = this . spinG . getNumberValue ( ) , s = ( null == r || r < 0 ? 0 : r > 255 ? 255 : r ) . toString ( 16 ) , a = ( null == i || isNaN ( i ) || i < 0 ? 0 : i > 255 ? 255 : i ) . toString ( 16 ) } var l = ( 1 == o . length ? "0" + o : o ) + ( 1 == s . length ? "0" + s : s ) + ( 1 == a . length ? "0" + a : a ) ; this . colorsPicker . setColor ( "#" + l ) , this . textColor . setValue ( l . toUpperCase ( ) ) , this . colorNew . css ( "background-color" , "#" + l ) } } , onChangeMaske
if ( e . options . hint ) { var o = e . cmpEl . data ( "bs.tooltip" ) ; o && ( void 0 === o . dontShow && ( o . dontShow = ! 0 ) , o . hide ( ) ) } this . menuPicker . selectedBeforeHideRec = null } , onBeforeHideMenu : function ( t ) { if ( this . trigger ( "hide:before" , this , t ) , Common . UI . Scroller . isMouseCapture ( ) && t . preventDefault ( ) , this . isStylesNotClosable ) return ! 1 } , onAfterShowMenu : function ( t ) { var e = this ; e . menuPicker . scroller && e . menuPicker . scroller . update ( { includePadding : ! 0 , suppressScrollX : ! 0 , alwaysVisibleY : ! 0 } ) } , onAfterHideMenu : function ( t , e ) { this . menuPicker . selectedBeforeHideRec = this . menuPicker . getSelectedRec ( ) [ 0 ] , this . showLast ? this . menuPicker . showLastSelected ( ) : this . menuPicker . deselectAll ( ) , this . trigger ( "hide:after" , this , t , e ) } , onFieldPickerSelect : function ( t , e , i ) { } , onMenuPickerSelect : function ( t , e , i , n ) { this . needFillComboView = this . disabled , this . disabled || ! 0 === n || ( this . fillComboView ( i , ! 1 ) , i && ! this . isSuspendEvents && this . trigger ( "select" , this , i ) ) } , onFieldPickerClick : function ( t , e , i ) { if ( ! this . disabled ) { if ( this . isSuspendEvents || this . trigger ( "click" , this , i ) , this . options . hint ) { var n = this . cmpEl . data ( "bs.tooltip" ) ; n && ( void 0 === n . dontShow && ( n . dontShow = ! 0 ) , n . hide ( ) ) } this . showLast || this . fieldPicker . deselectAll ( ) } } , onMenuPickerClick : function ( t , e , i ) { this . disabled || this . isSuspendEvents || this . trigger ( "click" , this , i ) } , onPickerItemContextMenu : function ( t , e , i , n ) { if ( ! this . disabled ) return this . isSuspendEvents || this . trigger ( "contextmenu" , this , i , n ) , n . preventDefault ( ) , n . stopPropagation ( ) , ! 1 } , onPickerComboContextMenu : function ( t ) { this . disabled || this . isSuspendEvents || this . trigger ( "contextmenu" , this , void 0 , t ) } , setDisabled : function ( t ) { if ( this . disabled = t , this . rendered && ( this . cmpEl . toggleClass ( "disabled" , t ) , $ ( "button" , this . openButton . cmpEl ) . toggleClass ( "disabled" , t ) , this . fieldPicker . setDisabled ( t ) , this . needFillComboView && ! t ) ) { var e = this . menuPicker ; if ( e ) { var i = e . getSelectedRec ( ) ; i && ( i = i [ 0 ] , this . fillComboView ( i || e . store . at ( 0 ) , ! 1 ) ) } } } , isDisabled : function ( ) { return this . disabled } , fillComboView : function ( t , e , i ) { if ( ! _ . isUndefined ( t ) && t instanceof Backbone . Model ) { this . needFillComboView = ! 1 ; var n = this , o = n . menuPicker . store , s = $ ( n . fieldPicker . el ) ; if ( o ) { if ( i || ! n . fieldPicker . store . findWhere ( { id : t . get ( "id" ) } ) ) { if ( void 0 === n . itemMarginLeft ) { var a = $ ( $ ( this . menuPicker . el ) . find ( ".inner > div:not(.grouped-data):not(.ps-scrollbar-x-rail):not(.ps-scrollbar-y-rail)" ) [ 0 ] ) ; a . length > 0 && ( n . itemMarginLeft = parseInt ( a . css ( "margin-left" ) ) , n . itemMarginRight = parseInt ( a . css ( "margin-right" ) ) , n . itemPaddingLeft = parseInt ( a . css ( "padding-left" ) ) , n . itemPaddingRight = parseInt ( a . css ( "padding-right" ) ) , n . itemBorderLeft = parseInt ( a . css ( "border-left-width" ) ) , n . itemBorderRight = parseInt ( a . css ( "border-right-width" ) ) ) } n . fieldPicker . store . reset ( [ ] ) ; var r = o . indexOf ( t ) , l = o . length , c = Math . floor ( s . width ( ) / ( n . itemWidth + ( n . itemMarginLeft || 0 ) + ( n . itemMarginRight || 0 ) + ( n . itemPaddingLeft || 0 ) + ( n . itemPaddingRight || 0 ) + ( n . itemBorderLeft || 0 ) + ( n . itemBorderRight || 0 ) ) ) , h = [ ] ; if ( s . height ( ) / n . itemHeight > 2 && ( c *= Math . floor ( s . height ( ) / n . itemHeight ) ) , r < 0 ) return ; r = Math . floor ( r / c ) * c , l - r < c && ( r = Math . max ( l - c , 0 ) ) ; for ( var d = r , p = 0 ; d < l && p < c ; d ++ , p ++ ) h . push ( o . at ( d ) ) ; n . fieldPicker . store . add ( h ) } if ( e ) { var u = n . fieldPicker . store . findWhere ( { id : t . get ( "id" ) } ) ; u && ( n . suspendEvents ( ) , n . fieldPicker . selectRecord ( u , ! 0 ) , n . resumeEvents ( ) ) } } } } , selectByIndex : function ( t ) { t < 0 && this . fieldPicker . deselectAll ( ) , this . menuPicker . selectByIndex ( t ) } , setItemWidth : function ( t ) { this . itemWidth != t && ( this . itemWidth = window . devicePixelRatio > 1 ? t / 2 : t ) } , setItemHeight : function ( t ) { this . itemHeight != t && ( this . itemHeight = window . devicePixelRatio > 1 ? t / 2 : t ) } , removeTips : function ( ) { var t = this . menuPicker ; _ . each ( t . dataViewItems , function ( t ) { var e = t . $el . data ( "bs.tooltip" ) ; e && e . tip ( ) . remove ( ) } , t ) } } ) } ) , void 0 === Common ) var Common = { } ; if ( define ( "common/main/lib/component/SynchronizeTip" , [ "common/main/lib/component/BaseView" ] , function ( ) { "use strict" ; Common . UI . SynchronizeTip = Common . UI . BaseView . extend ( _ . extend ( function ( ) { var t ; return { options : { target : $ ( document . body ) , text : "" , placement : "right" } , template : _ . template ( [ '<div class="synch-tip-root <%= scope.placement %>">' , '<div class="asc-synchronizetip">' , '<div class="tip-arrow <%= scope.placement %>"></div>' , "<div>" , ' < div cla
i ( "#id-toolbar-" + e + "-placeholder-btn-preview" , this . btnPreview ) , i ( "#id-toolbar-" + e + "-placeholder-btn-print" , this . btnPrint ) , i ( "#id-toolbar-" + e + "-placeholder-btn-save" , this . btnSave ) , i ( "#id-toolbar-" + e + "-placeholder-btn-undo" , this . btnUndo ) , i ( "#id-toolbar-" + e + "-placeholder-btn-redo" , this . btnRedo ) , i ( "#id-toolbar-" + e + "-placeholder-btn-copy" , this . btnCopy ) , i ( "#id-toolbar-" + e + "-placeholder-btn-paste" , this . btnPaste ) , i ( "#id-toolbar-" + e + "-placeholder-btn-bold" , this . btnBold ) , i ( "#id-toolbar-" + e + "-placeholder-btn-italic" , this . btnItalic ) , i ( "#id-toolbar-" + e + "-placeholder-btn-underline" , this . btnUnderline ) , i ( "#id-toolbar-" + e + "-placeholder-btn-strikeout" , this . btnStrikeout ) , i ( "#id-toolbar-" + e + "-placeholder-btn-superscript" , this . btnSuperscript ) , i ( "#id-toolbar-" + e + "-placeholder-btn-subscript" , this . btnSubscript ) , i ( "#id-toolbar-" + e + "-placeholder-btn-fontcolor" , this . btnFontColor ) , i ( "#id-toolbar-" + e + "-placeholder-btn-clearstyle" , this . btnClearStyle ) , i ( "#id-toolbar-" + e + "-placeholder-btn-copystyle" , this . btnCopyStyle ) , i ( "#id-toolbar-" + e + "-placeholder-btn-markers" , this . btnMarkers ) , i ( "#id-toolbar-" + e + "-placeholder-btn-numbering" , this . btnNumbers ) , i ( "#id-toolbar-" + e + "-placeholder-btn-incoffset" , this . btnIncLeftOffset ) , i ( "#id-toolbar-" + e + "-placeholder-btn-decoffset" , this . btnDecLeftOffset ) , i ( "#id-toolbar-" + e + "-placeholder-btn-halign" , this . btnHorizontalAlign ) , i ( "#id-toolbar-" + e + "-placeholder-btn-valign" , this . btnVerticalAlign ) , i ( "#id-toolbar-" + e + "-placeholder-btn-linespace" , this . btnLineSpace ) , i ( "#id-toolbar-" + e + "-placeholder-btn-arrange-shape" , this . btnShapeArrange ) , i ( "#id-toolbar-" + e + "-placeholder-btn-align-shape" , this . btnShapeAlign ) , i ( "#id-toolbar-" + e + "-placeholder-btn-insertshape" , this . btnInsertShape ) , i ( "#id-toolbar-" + e + "-placeholder-btn-inserttext" , this . btnInsertText ) , i ( "#id-toolbar-" + e + "-placeholder-btn-insertequation" , this . btnInsertEquation ) , i ( "#id-toolbar-" + e + "-placeholder-btn-inserthyperlink" , this . btnInsertHyperlink ) , i ( "#id-toolbar-" + e + "-placeholder-btn-inserttable" , this . btnInsertTable ) , i ( "#id-toolbar-" + e + "-placeholder-btn-insertimage" , this . btnInsertImage ) , i ( "#id-toolbar-" + e + "-placeholder-btn-insertchart" , this . btnInsertChart ) , i ( "#id-toolbar-" + e + "-placeholder-btn-colorschemas" , this . btnColorSchemas ) , i ( "#id-toolbar-" + e + "-placeholder-btn-slidesize" , this . btnSlideSize ) , i ( "#id-toolbar-full-placeholder-field-styles" , this . listTheme ) , i ( "#id-toolbar-" + e + "-placeholder-btn-hidebars" , this . btnHide ) , i ( "#id-toolbar-" + e + "-placeholder-btn-settings" , this . btnAdvSettings ) , i ( "#id-toolbar-full-placeholder-field-styles" , this . listTheme ) } , createDelayedElements : function ( ) { this . btnNewDocument . updateHint ( this . tipNewDocument ) , this . btnOpenDocument . updateHint ( this . tipOpenDocument ) , this . btnAddSlide . updateHint ( this . tipAddSlide + Common . Utils . String . platformKey ( "Ctrl+M" ) ) , this . btnChangeSlide . updateHint ( this . tipChangeSlide ) , this . btnPreview . updateHint ( this . tipPreview ) , this . btnPrint . updateHint ( this . tipPrint + Common . Utils . String . platformKey ( "Ctrl+P" ) ) , this . btnSave . updateHint ( this . btnSaveTip ) , this . btnUndo . updateHint ( this . tipUndo + Common . Utils . String . platformKey ( "Ctrl+Z" ) ) , this . btnRedo . updateHint ( this . tipRedo + Common . Utils . String . platformKey ( "Ctrl+Y" ) ) , this . btnCopy . updateHint ( this . tipCopy + Common . Utils . String . platformKey ( "Ctrl+C" ) ) , this . btnPaste . updateHint ( this . tipPaste + Common . Utils . String . platformKey ( "Ctrl+V" ) ) , this . btnBold . updateHint ( this . textBold + Common . Utils . String . platformKey ( "Ctrl+B" ) ) , this . btnItalic . updateHint ( this . textItalic + Common . Utils . String . platformKey ( "Ctrl+I" ) ) , this . btnUnderline . updateHint ( this . textUnderline + Common . Utils . String . platformKey ( "Ctrl+U" ) ) , this . btnStrikeout . updateHint ( this . textStrikeout ) , this . btnSuperscript . updateHint ( this . textSuperscript ) , this . btnSubscript . updateHint ( this . textSubscript ) , this . btnFontColor . updateHint ( this . tipFontColor ) , this . btnClearStyle . updateHint ( this . tipClearStyle ) , this . btnCopyStyle . updateHint ( this . tipCopyStyle + Common . Utils . String . platformKey ( "Ctrl+Shift+C" ) ) , this . btnMarkers . updateHint ( this . tipMarkers ) , this . btnNumbers . updateHint ( this . tipNumbers ) , this . btnHorizontalAlign . updateHint ( this . tipHAligh ) , this . btnVerticalAlign . updateHint ( this . tipVAligh ) , this . btnDecLe
t . btnSuperscript . on ( "click" , _ . bind ( this . onSuperscript , this ) ) , t . btnSubscript . on ( "click" , _ . bind ( this . onSubscript , this ) ) , t . btnHorizontalAlign . menu . on ( "item:click" , _ . bind ( this . onMenuHorizontalAlignSelect , this ) ) , t . btnVerticalAlign . menu . on ( "item:click" , _ . bind ( this . onMenuVerticalAlignSelect , this ) ) , t . btnDecLeftOffset . on ( "click" , _ . bind ( this . onDecOffset , this ) ) , t . btnIncLeftOffset . on ( "click" , _ . bind ( this . onIncOffset , this ) ) , t . btnMarkers . on ( "click" , _ . bind ( this . onMarkers , this ) ) , t . btnNumbers . on ( "click" , _ . bind ( this . onNumbers , this ) ) , t . cmbFontName . on ( "selected" , _ . bind ( this . onFontNameSelect , this ) ) , t . cmbFontName . on ( "show:after" , _ . bind ( this . onComboOpen , this , ! 0 ) ) , t . cmbFontName . on ( "hide:after" , _ . bind ( this . onHideMenus , this ) ) , t . cmbFontName . on ( "combo:blur" , _ . bind ( this . onComboBlur , this ) ) , t . cmbFontName . on ( "combo:focusin" , _ . bind ( this . onComboOpen , this , ! 1 ) ) , t . cmbFontSize . on ( "selected" , _ . bind ( this . onFontSizeSelect , this ) ) , t . cmbFontSize . on ( "changed:before" , _ . bind ( this . onFontSizeChanged , this , ! 0 ) ) , t . cmbFontSize . on ( "changed:after" , _ . bind ( this . onFontSizeChanged , this , ! 1 ) ) , t . cmbFontSize . on ( "show:after" , _ . bind ( this . onComboOpen , this , ! 0 ) ) , t . cmbFontSize . on ( "hide:after" , _ . bind ( this . onHideMenus , this ) ) , t . cmbFontSize . on ( "combo:blur" , _ . bind ( this . onComboBlur , this ) ) , t . cmbFontSize . on ( "combo:focusin" , _ . bind ( this . onComboOpen , this , ! 1 ) ) , t . mnuMarkersPicker . on ( "item:click" , _ . bind ( this . onSelectBullets , this , t . btnMarkers ) ) , t . mnuNumbersPicker . on ( "item:click" , _ . bind ( this . onSelectBullets , this , t . btnNumbers ) ) , t . btnFontColor . on ( "click" , _ . bind ( this . onBtnFontColor , this ) ) , t . mnuFontColorPicker . on ( "select" , _ . bind ( this . onSelectFontColor , this ) ) , $ ( "#id-toolbar-menu-new-fontcolor" ) . on ( "click" , _ . bind ( this . onNewFontColor , this ) ) , t . btnLineSpace . menu . on ( "item:toggle" , _ . bind ( this . onLineSpaceToggle , this ) ) , t . btnShapeAlign . menu . on ( "item:click" , _ . bind ( this . onShapeAlign , this ) ) , t . btnShapeArrange . menu . on ( "item:click" , _ . bind ( this . onShapeArrange , this ) ) , t . btnInsertHyperlink . on ( "click" , _ . bind ( this . onHyperlinkClick , this ) ) , t . mnuTablePicker . on ( "select" , _ . bind ( this . onTablePickerSelect , this ) ) , t . btnInsertTable . menu . on ( "item:click" , _ . bind ( this . onInsertTableClick , this ) ) , t . btnInsertImage . menu . on ( "item:click" , _ . bind ( this . onInsertImageClick , this ) ) , t . btnInsertText . on ( "click" , _ . bind ( this . onBtnInsertTextClick , this ) ) , t . btnInsertText . menu . on ( "item:click" , _ . bind ( this . onInsertTextClick , this ) ) , t . btnInsertShape . menu . on ( "hide:after" , _ . bind ( this . onInsertShapeHide , this ) ) , t . btnClearStyle . on ( "click" , _ . bind ( this . onClearStyleClick , this ) ) , t . btnCopyStyle . on ( "toggle" , _ . bind ( this . onCopyStyleToggle , this ) ) , t . btnAdvSettings . on ( "click" , _ . bind ( this . onAdvSettingsClick , this ) ) , t . btnColorSchemas . menu . on ( "item:click" , _ . bind ( this . onColorSchemaClick , this ) ) , t . btnSlideSize . menu . on ( "item:click" , _ . bind ( this . onSlideSize , this ) ) , t . mnuInsertChartPicker . on ( "item:click" , _ . bind ( this . onSelectChart , this ) ) , t . listTheme . on ( "click" , _ . bind ( this . onListThemeSelect , this ) ) , t . mnuitemHideTitleBar . on ( "toggle" , _ . bind ( this . onHideTitleBar , this ) ) , t . mnuitemHideStatusBar . on ( "toggle" , _ . bind ( this . onHideStatusBar , this ) ) , t . mnuitemHideRulers . on ( "toggle" , _ . bind ( this . onHideRulers , this ) ) , t . btnFitPage . on ( "toggle" , _ . bind ( this . onZoomToPageToggle , this ) ) , t . btnFitWidth . on ( "toggle" , _ . bind ( this . onZoomToWidthToggle , this ) ) , t . mnuZoomIn . on ( "click" , _ . bind ( this . onZoomInClick , this ) ) , t . mnuZoomOut . on ( "click" , _ . bind ( this . onZoomOutClick , this ) ) , t . btnInsertEquation . on ( "click" , _ . bind ( this . onInsertEquationClick , this ) ) } , setApi : function ( t ) { this . api = t , this . toolbar . setApi ( t ) , this . api . asc _registerCallback ( "asc_onFontSize" , _ . bind ( this . onApiFontSize , this ) ) , this . api . asc _registerCallback ( "asc_onBold" , _ . bind ( this . onApiBold , this ) ) , this . api . asc _registerCallback ( "asc_onItalic" , _ . bind ( this . onApiItalic , this ) ) , this . api . asc _registerCallback ( "asc_onUnderline" , _ . bind ( this . onApiUnderline , this ) ) , this . api . asc _registerCallback ( "asc_onStrikeout" , _ . bind ( this . onApiStrikeout , this ) ) , this . api . asc _registerCallback ( "asc_onVerticalAlign" , _ . bind ( this . onApiVerticalAlign , this ) ) , this . api . asc _registerCallback ( "asc_onCanUndo" , _ . bind ( this . onApiCanRevert , this , "undo" ) ) , this . api . asc _registerCallback ( "asc_onCanRedo" , _ . bind ( this . onApiCanRevert , this , "redo" ) ) , t
n . toolbar . fireEvent ( "insertchart" , n . toolbar ) ) } , onListThemeSelect : function ( t , e ) { this . _state . themeId = void 0 , this . api && this . api . ChangeTheme ( e . get ( "themeId" ) ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) , Common . component . Analytics . trackEvent ( "ToolBar" , "Style" ) } , onHideTitleBar : function ( t , e ) { var i = this . getApplication ( ) . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) ; i && i . setVisible ( ! e ) , Common . localStorage . setItem ( "pe-hidden-title" , e ? 1 : 0 ) , Common . NotificationCenter . trigger ( "layout:changed" , "header" ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onHideStatusBar : function ( t , e ) { var i = this . getApplication ( ) . getController ( "Statusbar" ) . getView ( "Statusbar" ) ; i && i . setVisible ( ! e ) , Common . localStorage . setItem ( "pe-hidden-status" , e ? 1 : 0 ) , Common . NotificationCenter . trigger ( "layout:changed" , "status" ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onHideRulers : function ( t , e ) { this . api && this . api . asc _SetViewRulers ( ! e ) , Common . localStorage . setItem ( "pe-hidden-rulers" , e ? 1 : 0 ) , Common . NotificationCenter . trigger ( "layout:changed" , "rulers" ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onZoomToPageToggle : function ( t , e ) { this . api && ( this . _state . zoom _type = void 0 , this . _state . zoom _percent = void 0 , e ? this . api . zoomFitToPage ( ) : this . api . zoomCustomMode ( ) ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onZoomToWidthToggle : function ( t , e ) { this . api && ( this . _state . zoom _type = void 0 , this . _state . zoom _percent = void 0 , e ? this . api . zoomFitToWidth ( ) : this . api . zoomCustomMode ( ) ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onZoomInClick : function ( t ) { this . _state . zoom _type = void 0 , this . _state . zoom _percent = void 0 , this . api && this . api . zoomIn ( ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , onZoomOutClick : function ( t ) { this . _state . zoom _type = void 0 , this . _state . zoom _percent = void 0 , this . api && this . api . zoomOut ( ) , Common . NotificationCenter . trigger ( "edit:complete" , this . toolbar ) } , _clearBullets : function ( ) { this . toolbar . btnMarkers . toggle ( ! 1 , ! 0 ) , this . toolbar . btnNumbers . toggle ( ! 1 , ! 0 ) , this . toolbar . mnuMarkersPicker . selectByIndex ( 0 , ! 0 ) , this . toolbar . mnuNumbersPicker . selectByIndex ( 0 , ! 0 ) } , _getApiTextSize : function ( ) { var t = 12 , e = this . api . get _TextProps ( ) ; return e && e . get _TextPr && ( t = e . get _TextPr ( ) . get _FontSize ( ) ) , t } , onNewFontColor : function ( t , e ) { this . toolbar . mnuFontColorPicker . addNewColor ( ) } , onSelectFontColor : function ( t , e ) { this . _state . clrtext = this . _state . clrtext _asccolor = void 0 ; var i = "object" == typeof e ? e . color : e ; this . toolbar . btnFontColor . currentColor = e , $ ( ".btn-color-value-line" , this . toolbar . btnFontColor . cmpEl ) . css ( "background-color" , "#" + i ) , this . toolbar . mnuFontColorPicker . currentColor = e , this . api && this . api . put _TextColor ( Common . Utils . ThemeColor . getRgbColor ( e ) ) , Common . component . Analytics . trackEvent ( "ToolBar" , "Text Color" ) } , onBtnFontColor : function ( ) { this . toolbar . mnuFontColorPicker . trigger ( "select" , this . toolbar . mnuFontColorPicker , this . toolbar . mnuFontColorPicker . currentColor ) } , onApiTextColor : function ( t ) { var e , i = this . toolbar . mnuFontColorPicker ; t && ( e = t . get _type ( ) == Asc . c _oAscColor . COLOR _TYPE _SCHEME ? { color : Common . Utils . ThemeColor . getHexColor ( t . get _r ( ) , t . get _g ( ) , t . get _b ( ) ) , effectValue : t . get _value ( ) } : Common . Utils . ThemeColor . getHexColor ( t . get _r ( ) , t . get _g ( ) , t . get _b ( ) ) ) ; var n = typeof e ; if ( n !== typeof this . _state . clrtext || "object" == n && ( e . effectValue !== this . _state . clrtext . effectValue || this . _state . clrtext . color . indexOf ( e . color ) < 0 ) || "object" != n && this . _state . clrtext . indexOf ( e ) < 0 ) { if ( "object" == typeof e ) { for ( var o = ! 1 , s = 0 ; s < 10 ; s ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ s ] == e . effectValue ) { i . select ( e , ! 0 ) , o = ! 0 ; break } o || i . clearSelection ( ) } else i . select ( e , ! 0 ) ; this . _state . clrtext = e } this . _state . clrtext _asccolor = t } , fillAutoShapes : function ( ) { for ( var t = this , e = this . getApplication ( ) . getCollection ( "ShapeGroups" ) , i = 0 ; i < e . length ; i ++ ) { var n = e . at ( i ) , o = new Common . UI . MenuItem ( { caption : n . get ( "groupName" ) , menu : new Common . UI . Menu ( { menuAlign : "tl-tr" , items : [ { template : _ . template ( '<div id="id-toolbar-menu-shapegroup' + i + '" class="menu-shape" style="width: ' + ( n . get ( "groupWidth" ) - 8 ) + 'px; margin-left: 5px;"></div>' ) } ] } ) } ) ; t . toolbar . btnInsertShape . men
maskExp : /[0-9]/ , validation : function ( e ) { return ! ! ( /(^[0-9]+$)/ . test ( e ) && void 0 !== ( e = parseInt ( e ) ) && e > 0 && e <= t . pages . get ( "count" ) ) || t . txtPageNumInvalid } } ) . on ( "keypress:after" , function ( e , i ) { if ( i . keyCode === Common . UI . Keys . RETURN ) { var n = t . $el . find ( "#status-goto-box" ) , o = n . find ( "input[type=text]" ) , s = parseInt ( o . val ( ) ) ; return ! s || s -- > t . pages . get ( "count" ) || s < 0 ? ( o . select ( ) , ! 1 ) : ( n . focus ( ) , n . parent ( ) . removeClass ( "open" ) , t . api . goToPage ( s ) , t . api . asc _enableKeyEvents ( ! 0 ) , ! 1 ) } } ) . on ( "keyup:after" , function ( e , i ) { if ( i . keyCode === Common . UI . Keys . ESC ) { var n = t . $el . find ( "#status-goto-box" ) ; return n . focus ( ) , n . parent ( ) . removeClass ( "open" ) , t . api . asc _enableKeyEvents ( ! 0 ) , ! 1 } } ) ; var e = this . $el . find ( "#status-goto-box" ) ; return e . on ( "click" , function ( ) { return ! 1 } ) , e . parent ( ) . on ( "show.bs.dropdown" , function ( ) { t . txtGoToPage . setValue ( t . api . getCurrentPage ( ) + 1 ) , t . txtGoToPage . checkValidate ( ) ; var e = t . txtGoToPage . $el . find ( "input" ) ; _ . defer ( function ( ) { e . focus ( ) , e . select ( ) } , 100 ) } ) , e . parent ( ) . on ( "hide.bs.dropdown" , function ( ) { var e = t . $el . find ( "#status-goto-box" ) ; t . api && e && ( e . focus ( ) , e . parent ( ) . removeClass ( "open" ) , t . api . asc _enableKeyEvents ( ! 0 ) ) } ) , this . btnPreview = new Common . UI . Button ( { el : $ ( "#status-btn-preview" , this . el ) , hint : this . tipPreview , hintAnchor : "top" } ) , this } , setApi : function ( t ) { return this . api = t , this . api && ( this . api . asc _registerCallback ( "asc_onCountPages" , _ . bind ( i , this ) ) , this . api . asc _registerCallback ( "asc_onCurrentPage" , _ . bind ( n , this ) ) , this . api . asc _registerCallback ( "asc_onAuthParticipantsChanged" , _ . bind ( this . onApiUsersChanged , this ) ) , this . api . asc _registerCallback ( "asc_onParticipantsChanged" , _ . bind ( this . onApiUsersChanged , this ) ) ) , this } , setMode : function ( t ) { this . mode = t , this . $el . find ( ".el-edit" ) [ this . mode . isEdit ? "show" : "hide" ] ( ) , this . lblChangeRights [ ! this . mode . isOffline && this . mode . sharingSettingsUrl && this . mode . sharingSettingsUrl . length ? "show" : "hide" ] ( ) , this . panelUsers [ ! this . mode . isOffline && this . mode . sharingSettingsUrl && this . mode . sharingSettingsUrl . length ? "show" : "hide" ] ( ) } , setVisible : function ( t ) { t ? this . show ( ) : this . hide ( ) } , onUsersClick : function ( ) { this . panelUsers . removeClass ( "open" ) , this . fireEvent ( "click:users" , this ) } , onApiUsersChanged : function ( t ) { var e = 0 ; _ . each ( t , function ( t ) { t . asc _getView ( ) || e ++ } ) , this . panelUsers [ e > 1 || this . mode . sharingSettingsUrl && this . mode . sharingSettingsUrl . length ? "show" : "hide" ] ( ) , this . lblUserCount . css ( { "font-size" : e > 1 ? "11px" : "14px" , "font-weight" : e > 1 ? "bold" : "normal" , "margin-top" : e > 1 ? "0" : "-1px" } ) , this . lblUserCount . text ( e > 1 ? e : "+" ) , $ ( "#status-users-icon" ) . css ( "margin-bottom" , e > 1 ? "0" : "2px" ) ; var i = this . panelUsersBlock . data ( "bs.tooltip" ) ; i && ( i . options . title = e > 1 ? this . tipViewUsers : this . tipAccessRights , i . setContent ( ) ) , e > 1 ? this . panelUsersBlock . attr ( "data-toggle" , "dropdown" ) : this . panelUsersBlock . removeAttr ( "data-toggle" ) , this . panelUsersBlock . toggleClass ( "dropdown-toggle" , e > 1 ) , e > 1 ? this . panelUsersBlock . off ( "click" ) : this . panelUsersBlock . on ( "click" , _ . bind ( this . onUsersClick , this ) ) } , _onAddUser : function ( t , e , i ) { this . panelUsersList && ( this . panelUsersList . find ( "ul" ) . append ( _ . template ( this . tplUser , { user : t , scope : this } ) ) , this . panelUsersList . scroller . update ( { minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) ) } , _onUsersChanged : function ( t ) { void 0 != t . changed . online && this . panelUsersList && ( this . panelUsersList . find ( "#status-chat-user-" + t . get ( "id" ) ) [ t . changed . online ? "removeClass" : "addClass" ] ( "offline" ) , this . panelUsersList . scroller . update ( { minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) ) } , _onResetUsers : function ( t , e ) { this . panelUsersList && ( this . panelUsersList . html ( this . templateUserList ( { users : t . models , usertpl : this . tplUser , scope : this } ) ) , this . panelUsersList . scroller = new Common . UI . Scroller ( { el : $ ( "#status-users-list ul" ) , useKeyboard : ! 0 , minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) ) } , getUserName : function ( t ) { return Common . Utils . String . htmlEncode ( t ) } , showStatusMessage : function ( t ) { $ ( "#status-label-action" ) . text ( t ) } , clearStatusMessage : function ( ) { $ ( "#status-label-action" ) . text ( "" ) } , pageIndexText : "Slide {0} of {1}" , goToPageText : "Go to Slide" , tipUsers : "Document is currently being edited by several users." , tipMoreUsers : "and %1 users." , tipShowUsers : "To see all users click the icon below." , tipFitPage : "Fit to Slide" , tipFitWidth : " Fit
initialize : function ( ) { this . _initSettings = ! 0 , this . _state = { Width : 0 , Height : 0 , DisabledControls : ! 1 , isOleObject : ! 1 } , this . lockedControls = [ ] , this . _locked = ! 1 , this . _noApply = ! 1 , this . _originalProps = null , this . render ( ) , this . labelWidth = e ( this . el ) . find ( "#image-label-width" ) , this . labelHeight = e ( this . el ) . find ( "#image-label-height" ) } , render : function ( ) { e ( this . el ) . html ( this . template ( { scope : this } ) ) } , setApi : function ( t ) { return this . api = t , this } , updateMetricUnit : function ( ) { var t = Common . Utils . Metric . fnRecalcFromMM ( this . _state . Width ) ; this . labelWidth [ 0 ] . innerHTML = this . textWidth + ": " + t . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ( ) , t = Common . Utils . Metric . fnRecalcFromMM ( this . _state . Height ) , this . labelHeight [ 0 ] . innerHTML = this . textHeight + ": " + t . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ( ) } , createDelayedControls : function ( ) { this . btnOriginalSize = new Common . UI . Button ( { el : e ( "#image-button-original-size" ) } ) , this . lockedControls . push ( this . btnOriginalSize ) , this . btnInsertFromFile = new Common . UI . Button ( { el : e ( "#image-button-from-file" ) } ) , this . lockedControls . push ( this . btnInsertFromFile ) , this . btnInsertFromUrl = new Common . UI . Button ( { el : e ( "#image-button-from-url" ) } ) , this . lockedControls . push ( this . btnInsertFromUrl ) , this . btnEditObject = new Common . UI . Button ( { el : e ( "#image-button-edit-object" ) } ) , this . lockedControls . push ( this . btnEditObject ) , this . btnOriginalSize . on ( "click" , i . bind ( this . setOriginalSize , this ) ) , this . btnInsertFromFile . on ( "click" , i . bind ( function ( t ) { this . api && this . api . ChangeImageFromFile ( ) , this . fireEvent ( "editcomplete" , this ) } , this ) ) , this . btnInsertFromUrl . on ( "click" , i . bind ( this . insertFromUrl , this ) ) , this . btnEditObject . on ( "click" , i . bind ( function ( t ) { this . api && this . api . asc _startEditCurrentOleObject ( ) , this . fireEvent ( "editcomplete" , this ) } , this ) ) , this . linkAdvanced = e ( "#image-advanced-link" ) , this . lblReplace = e ( "#image-lbl-replace" ) , e ( this . el ) . on ( "click" , "#image-advanced-link" , i . bind ( this . openAdvancedSettings , this ) ) } , createDelayedElements : function ( ) { this . createDelayedControls ( ) , this . updateMetricUnit ( ) , this . _initSettings = ! 1 } , ChangeSettings : function ( t ) { if ( this . _initSettings && this . createDelayedElements ( ) , this . disableControls ( this . _locked ) , t ) { this . _originalProps = new Asc . asc _CImgProperty ( t ) ; var e = t . get _Width ( ) ; Math . abs ( this . _state . Width - e ) > . 001 && ( this . labelWidth [ 0 ] . innerHTML = this . textWidth + ": " + Common . Utils . Metric . fnRecalcFromMM ( e ) . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ( ) , this . _state . Width = e ) , e = t . get _Height ( ) , Math . abs ( this . _state . Height - e ) > . 001 && ( this . labelHeight [ 0 ] . innerHTML = this . textHeight + ": " + Common . Utils . Metric . fnRecalcFromMM ( e ) . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ( ) , this . _state . Height = e ) , this . btnOriginalSize . setDisabled ( null === t . get _ImageUrl ( ) || void 0 === t . get _ImageUrl ( ) || this . _locked ) ; var i = t . asc _getPluginGuid ( ) ; if ( e = null !== i && void 0 !== i , this . _state . isOleObject !== e && ( this . btnInsertFromUrl . setVisible ( ! e ) , this . btnInsertFromFile . setVisible ( ! e ) , this . btnEditObject . setVisible ( e ) , this . lblReplace . text ( e ? this . textEditObject : this . textInsert ) , this . _state . isOleObject = e ) , this . _state . isOleObject ) { var n = PE . getCollection ( "Common.Collections.Plugins" ) . findWhere ( { guid : i } ) ; this . btnEditObject . setDisabled ( null === n || void 0 === n || this . _locked ) } else this . btnInsertFromUrl . setDisabled ( null === i || this . _locked ) , this . btnInsertFromFile . setDisabled ( null === i || this . _locked ) } } , setOriginalSize : function ( ) { if ( this . api ) { var t = this . api . get _OriginalSizeImage ( ) , e = t . get _ImageWidth ( ) , i = t . get _ImageHeight ( ) ; this . labelWidth [ 0 ] . innerHTML = this . textWidth + ": " + Common . Utils . Metric . fnRecalcFromMM ( e ) . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ( ) , this . labelHeight [ 0 ] . innerHTML = this . textHeight + ": " + Common . Utils . Metric . fnRecalcFromMM ( i ) . toFixed ( 1 ) + " " + Common . Utils . Metric . getCurrentMetricName ( ) ; var n = new Asc . asc _CImgProperty ; n . put _Width ( e ) , n . put _Height ( i ) , this . api . ImgApply ( n ) , this . fireEvent ( "editcomplete" , this ) } } , insertFromUrl : function ( ) { var t = this ; new Common . Views . ImageFromUrlDialog ( { handler : function ( e , n ) { if ( "ok" == e && t . api ) { var o = n . replace ( / /g , "" ) ; if ( ! i . isEmpty ( o ) ) { var s = new Asc . asc _CImgProperty ; s . put _ImageUrl ( o ) , t . api . ImgApply ( s ) } } t . fireEvent ( "editcomplete" , t ) } } ) . show
template : _ . template ( [ '<span class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">' , '<input type="text" class="form-control text">' , '<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret img-commonctrl"></span></button>' , '<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">' , "<% _.each(items, function(item) { %>" , '<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem">' , "<span><%= item.displayValue %></span>" , "<% if (item.offsety!==undefined) { %>" , '<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="right" style="background-position: 0 -<%= item.offsety %>px;">' , "<% } %>" , "</a></li>" , "<% }); %>" , "</ul>" , "</span>" ] . join ( "" ) ) , initialize : function ( t ) { this . txtNoBorders = t . txtNoBorders || this . txtNoBorders ; var e = Common . Utils . Metric . getMetricName ( Common . Utils . Metric . c _MetricUnits . pt ) , i = [ { displayValue : "0.5 " + e , value : . 5 , pxValue : . 5 , offsety : 0 } , { displayValue : "1 " + e , value : 1 , pxValue : 1 , offsety : 20 } , { displayValue : "1.5 " + e , value : 1.5 , pxValue : 2 , offsety : 40 } , { displayValue : "2.25 " + e , value : 2.25 , pxValue : 3 , offsety : 60 } , { displayValue : "3 " + e , value : 3 , pxValue : 4 , offsety : 80 } , { displayValue : "4.5 " + e , value : 4.5 , pxValue : 5 , offsety : 100 } , { displayValue : "6 " + e , value : 6 , pxValue : 6 , offsety : 120 } ] ; ! 1 !== t . allowNoBorders && i . unshift ( { displayValue : this . txtNoBorders , value : 0 , pxValue : 0 } ) , Common . UI . ComboBox . prototype . initialize . call ( this , _ . extend ( { editable : ! 0 , store : new Common . UI . BordersStore , data : i , menuStyle : "min-width: 150px;" } , t ) ) } , render : function ( t ) { return Common . UI . ComboBox . prototype . render . call ( this , t ) , this } , txtNoBorders : "No Borders" } , Common . UI . ComboBorderSizeEditable || { } ) ) , Common . UI . ComboBorderType = Common . UI . ComboBorderSize . extend ( _ . extend ( { template : _ . template ( [ '<div class="input-group combobox combo-border-size input-group-nr <%= cls %>" id="<%= id %>" style="<%= style %>">' , '<div class="form-control" style="<%= style %>"></div>' , '<div style="display: table-cell;"></div>' , '<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><span class="caret img-commonctrl"></span></button>' , '<ul class="dropdown-menu <%= menuCls %>" style="<%= menuStyle %>" role="menu">' , "<% _.each(items, function(item) { %>" , '<li id="<%= item.id %>" data-value="<%= item.value %>"><a tabindex="-1" type="menuitem" style="padding: 2px 0;">' , '<span style="margin-top: 0;"></span>' , "<% if (item.offsety!==undefined) { %>" , '<img src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" align="left" style="background-position: 0 -<%= item.offsety %>px;">' , "<% } %>" , "</a></li>" , "<% }); %>" , "</ul>" , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { Common . UI . ComboBorderSize . prototype . initialize . call ( this , _ . extend ( { store : new Common . UI . BordersStore , data : [ { value : Asc . c _oDashType . solid , offsety : 140 } , { value : Asc . c _oDashType . sysDot , offsety : 160 } , { value : Asc . c _oDashType . sysDash , offsety : 180 } , { value : Asc . c _oDashType . dash , offsety : 200 } , { value : Asc . c _oDashType . dashDot , offsety : 220 } , { value : Asc . c _oDashType . lgDash , offsety : 240 } , { value : Asc . c _oDashType . lgDashDot , offsety : 260 } , { value : Asc . c _oDashType . lgDashDotDot , offsety : 280 } ] } , t ) ) } , render : function ( t ) { return Common . UI . ComboBorderSize . prototype . render . call ( this , t ) , this } , updateFormControl : function ( t ) { var e = $ ( this . el ) . find ( ".form-control" ) ; e [ 0 ] . innerHTML = "" , e . removeClass ( "text" ) . addClass ( "image" ) , e . css ( "background-position" , "0 -" + t . get ( "offsety" ) + "px" ) } } , Common . UI . ComboBorderType || { } ) ) } ) , define ( "presentationeditor/main/app/view/TableSettings" , [ "text!presentationeditor/main/app/template/TableSettings.template" , "jquery" , "underscore" , "backbone" , "common/main/lib/component/Button" , "common/main/lib/component/CheckBox" , "common/main/lib/component/ThemeColorPalette" , "common/main/lib/component/ColorButton" , "common/main/lib/component/ComboBorderSize" , "common/main/lib/component/ComboDataView" , "common/main/lib/view/InsertTableDialog" , "presentationeditor/main/app/view/TableSettingsAdvanced" ] , function ( t , e , i , n ) { "use strict" ; PE . Views . TableSettings
template : e . template ( [ '<div class="slider multi-slider">' , '<div class="track">' , '<div class="track-left"></div>' , '<div class="track-center""></div>' , '<div class="track-right" style=""></div>' , "</div>" , "<% _.each(items, function(item) { %>" , '<div class="thumb" style=""></div>' , "<% }); %>" , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { Common . UI . BaseView . prototype . initialize . call ( this , t ) ; var e = this ; $ ( this . el ) ; e . width = e . options . width , e . minValue = e . options . minValue , e . maxValue = e . options . maxValue , e . delta = 100 / ( e . maxValue - e . minValue ) , e . thumbs = [ ] , e . options . el && e . render ( ) } , render : function ( t ) { var i = this ; i . rendered ? this . cmpEl = $ ( this . el ) : ( this . cmpEl = $ ( this . template ( { items : this . options . values } ) ) , t ? ( this . setElement ( t , ! 1 ) , t . html ( this . cmpEl ) ) : $ ( this . el ) . html ( this . cmpEl ) ) ; var n = this . cmpEl ; n . find ( ".track-center" ) . width ( i . options . width - 14 ) , n . width ( i . options . width ) ; var o = function ( t ) { t . preventDefault ( ) , t . stopPropagation ( ) ; var e = t . data , n = i . thumbs [ e ] . value , a = e - 1 < 0 ? 0 : i . thumbs [ e - 1 ] . position , r = e + 1 < i . thumbs . length ? i . thumbs [ e + 1 ] . position : 100 , l = Math . max ( a , Math . min ( r , Math . round ( ( t . pageX * Common . Utils . zoom ( ) - i . cmpEl . offset ( ) . left - i . _dragstart ) / i . width * 100 ) ) ) , c = l / i . delta + i . minValue ; i . setThumbPosition ( e , l ) , i . thumbs [ e ] . value = c , $ ( document ) . off ( "mouseup" , o ) , $ ( document ) . off ( "mousemove" , s ) , i . _dragstart = void 0 , i . trigger ( "changecomplete" , i , c , n ) } , s = function ( t ) { if ( ! i . disabled && void 0 !== i . _dragstart ) { t . preventDefault ( ) , t . stopPropagation ( ) ; var e = t . data , n = i . thumbs [ e ] . value , o = e - 1 < 0 ? 0 : i . thumbs [ e - 1 ] . position , s = e + 1 < i . thumbs . length ? i . thumbs [ e + 1 ] . position : 100 , a = Math . max ( o , Math . min ( s , Math . round ( ( t . pageX * Common . Utils . zoom ( ) - i . cmpEl . offset ( ) . left - i . _dragstart ) / i . width * 100 ) ) ) , r = a / i . delta + i . minValue ; i . setThumbPosition ( e , a ) , i . thumbs [ e ] . value = r , Math . abs ( r - n ) > . 001 && i . trigger ( "change" , i , r , n ) } } , a = function ( t ) { if ( ! i . disabled ) { var n = t . data , a = i . thumbs [ n ] . thumb ; i . _dragstart = t . pageX * Common . Utils . zoom ( ) - a . offset ( ) . left - a . width ( ) / 2 , i . setActiveThumb ( n ) , e . each ( i . thumbs , function ( t , e ) { n == e ? t . thumb . css ( "z-index" , 500 ) : t . thumb . css ( "z-index" , "" ) } ) , $ ( document ) . on ( "mouseup" , null , n , o ) , $ ( document ) . on ( "mousemove" , null , n , s ) } } , r = function ( t ) { if ( ! i . disabled ) { var e = Math . max ( 0 , Math . min ( 100 , Math . round ( ( t . pageX * Common . Utils . zoom ( ) - i . cmpEl . offset ( ) . left ) / i . width * 100 ) ) ) , n = l ( e ) , o = i . thumbs [ n ] . value , s = e / i . delta + i . minValue ; i . setThumbPosition ( n , e ) , i . thumbs [ n ] . value = s , i . trigger ( "change" , i , s , o ) , i . trigger ( "changecomplete" , i , s , o ) } } , l = function ( t ) { for ( var e , n = 100 , o = 0 , s = i . thumbs . length , a = 0 ; a < s ; a ++ ) if ( e = Math . abs ( i . thumbs [ a ] . position - t ) , Math . abs ( e <= n ) ) { var r = i . thumbs [ a + 1 ] , l = i . thumbs [ a - 1 ] ; if ( void 0 !== l && t < l . position ) continue ; if ( void 0 !== r && t > r . position ) continue ; o = a , n = e } return o } ; return this . $thumbs = n . find ( ".thumb" ) , e . each ( this . $thumbs , function ( t , e ) { var n = $ ( t ) ; i . thumbs . push ( { thumb : n , index : e } ) , i . setValue ( e , i . options . values [ e ] ) , n . on ( "mousedown" , null , e , a ) } ) , i . setActiveThumb ( 0 , ! 0 ) , i . rendered || n . on ( "mousedown" , ".track" , r ) , i . rendered = ! 0 , this } , setActiveThumb : function ( t , e ) { this . currentThumb = t , this . $thumbs . removeClass ( "active" ) , this . thumbs [ t ] . thumb . addClass ( "active" ) , ! 0 !== e && this . trigger ( "thumbclick" , this , t ) } , setThumbPosition : function ( t , e ) { this . thumbs [ t ] . position = e , this . thumbs [ t ] . thumb . css ( { left : e + "%" } ) } , setValue : function ( t , e ) { this . thumbs [ t ] . value = Math . max ( this . minValue , Math . min ( this . maxValue , e ) ) , this . setThumbPosition ( t , Math . round ( ( e - this . minValue ) * this . delta ) ) } , getValue : function ( t ) { return this . thumbs [ t ] . value } , getValues : function ( ) { var t = [ ] ; return e . each ( this . thumbs , function ( e ) { t . push ( e . value ) } ) , t } , setDisabled : function ( t ) { t !== this . disabled && this . cmpEl . toggleClass ( "disabled" , t ) , this . disabled = t } } ) } ) , void 0 === Common ) var Common = { } ; define ( "common/main/lib/component/MultiSliderGradient" , [ "common/main/lib/component/Slider" , "underscore" ] , function ( t , e ) { "use strict" ; Common . UI . MultiSliderGradient = Common . UI . MultiSlider . extend ( { options : { width : 100 , minValue : 0 , maxValue : 100 , values : [ 0 , 100 ] , colorValues : [ "#000000" , "#ffffff" ] , currentThumb : 0 } , disabled : ! 1 , template : e . template ( [ '<div class="slider multi-slider-gradient">' , '<div class="track"></div>' , "<% _.each(items, function(item) { %>" , '<div class="thumb img-commonctrl" style="">' , '<div class="thumb-top"></div>' , ' <
; this . _state . StrokeColor = this . BorderColor . Color } if ( this . _state . StrokeType !== y || y == Asc . c _oAscStrokeType . STROKE _COLOR ) { if ( y == Asc . c _oAscStrokeType . STROKE _COLOR ) { var x = _ . get _width ( ) , w = Math . abs ( this . _state . StrokeWidth - x ) < . 001 && ! new RegExp ( this . txtPt + "\\s*$" ) . test ( this . cmbBorderSize . getRawValue ( ) ) ; if ( Math . abs ( this . _state . StrokeWidth - x ) > . 001 || w || ( null === this . _state . StrokeWidth || null === x ) && this . _state . StrokeWidth !== x ) { this . _state . StrokeWidth = x , null !== x && ( x = this . _mm2pt ( x ) ) ; var S = null === x ? x : i . find ( this . cmbBorderSize . store . models , function ( t ) { if ( x < t . attributes . value + . 01 && x > t . attributes . value - . 01 ) return ! 0 } ) ; S ? this . cmbBorderSize . selectRecord ( S ) : this . cmbBorderSize . setValue ( null !== x ? parseFloat ( x . toFixed ( 2 ) ) + " " + this . txtPt : "" ) , this . BorderSize = x } } else y == Asc . c _oAscStrokeType . STROKE _NONE ? ( this . _state . StrokeWidth = 0 , this . BorderSize = this . cmbBorderSize . store . at ( 0 ) . get ( "value" ) , this . cmbBorderSize . setValue ( this . BorderSize ) ) : ( this . _state . StrokeWidth = null , this . BorderSize = - 1 , this . cmbBorderSize . setValue ( null ) ) ; this . _state . StrokeType = y } if ( this . _state . StrokeBorderType !== v && ( this . BorderType = this . _state . StrokeBorderType = v , this . cmbBorderType . setValue ( v ) ) , g = typeof this . FGColor . Color , f = typeof this . _state . FGColor , g !== f || "object" == g && ( this . FGColor . Color . effectValue !== this . _state . FGColor . effectValue || this . _state . FGColor . color . indexOf ( this . FGColor . Color . color ) < 0 ) || "object" != g && this . _state . FGColor . indexOf ( this . FGColor . Color ) < 0 ) { if ( this . btnFGColor . setColor ( this . FGColor . Color ) , "object" == typeof this . FGColor . Color ) { for ( var b = ! 1 , C = 0 ; C < 10 ; C ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ C ] == this . FGColor . Color . effectValue ) { this . colorsFG . select ( this . FGColor . Color , ! 0 ) , b = ! 0 ; break } b || this . colorsFG . clearSelection ( ) } else this . colorsFG . select ( this . FGColor . Color , ! 0 ) ; this . _state . FGColor = this . FGColor . Color } if ( g = typeof this . BGColor . Color , f = typeof this . _state . BGColor , g !== f || "object" == g && ( this . BGColor . Color . effectValue !== this . _state . BGColor . effectValue || this . _state . BGColor . color . indexOf ( this . BGColor . Color . color ) < 0 ) || "object" != g && this . _state . BGColor . indexOf ( this . BGColor . Color ) < 0 ) { if ( this . btnBGColor . setColor ( this . BGColor . Color ) , "object" == typeof this . BGColor . Color ) { for ( var b = ! 1 , C = 0 ; C < 10 ; C ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ C ] == this . BGColor . Color . effectValue ) { this . colorsBG . select ( this . BGColor . Color , ! 0 ) , b = ! 0 ; break } b || this . colorsBG . clearSelection ( ) } else this . colorsBG . select ( this . BGColor . Color , ! 0 ) ; this . _state . BGColor = this . BGColor . Color } if ( r = this . GradColor . colors [ this . GradColor . currentIdx ] , g = typeof r , f = typeof this . _state . GradColor , g !== f || "object" == g && ( r . effectValue !== this . _state . GradColor . effectValue || this . _state . GradColor . color . indexOf ( r . color ) < 0 ) || "object" != g && this . _state . GradColor . indexOf ( r ) < 0 ) { if ( this . btnGradColor . setColor ( r ) , "object" == typeof r ) { for ( var b = ! 1 , C = 0 ; C < 10 ; C ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ C ] == r . effectValue ) { this . colorsGrad . select ( r , ! 0 ) , b = ! 0 ; break } b || this . colorsGrad . clearSelection ( ) } else this . colorsGrad . select ( r , ! 0 ) ; this . _state . GradColor = r } this . _noApply = ! 1 } } , createDelayedControls : function ( ) { var t = this ; this . _arrFillSrc = [ { displayValue : this . textColor , value : Asc . c _oAscFill . FILL _TYPE _SOLID } , { displayValue : this . textGradientFill , value : Asc . c _oAscFill . FILL _TYPE _GRAD } , { displayValue : this . textImageTexture , value : Asc . c _oAscFill . FILL _TYPE _BLIP } , { displayValue : this . textPatternFill , value : Asc . c _oAscFill . FILL _TYPE _PATT } , { displayValue : this . textNoFill , value : Asc . c _oAscFill . FILL _TYPE _NOFILL } ] , this . cmbFillSrc = new Common . UI . ComboBox ( { el : e ( "#shape-combo-fill-src" ) , cls : "input-group-nr" , style : "width: 100%;" , menuStyle : "min-width: 190px;" , editable : ! 1 , data : this . _arrFillSrc } ) , this . cmbFillSrc . setValue ( this . _arrFillSrc [ 0 ] . value ) , this . cmbFillSrc . on ( "selected" , i . bind ( this . onFillSrcSelect , this ) ) , this . fillControls . push ( this . cmbFillSrc ) , this . cmbPattern = new Common . UI . ComboDataView ( { itemWidth : 28 , itemHeight : 28 , menuMaxHeight : 300 , enableKeyEvents : ! 0 , cls : "combo-pattern" } ) , this . cmbPattern . menuPicker . itemTemplate = this . cmbPattern . fieldPicker . itemTemplate = i . template ( [ '<div class="style" id="<%= id %>">' , ' < img src = "data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" class = " combo - patter
value : Asc . c _oAscSlideTransitionParams . Clock _Clockwise } , { displayValue : this . textCounterclockwise , value : Asc . c _oAscSlideTransitionParams . Clock _Counterclockwise } , { displayValue : this . textWedge , value : Asc . c _oAscSlideTransitionParams . Clock _Wedge } , { displayValue : this . textZoomIn , value : Asc . c _oAscSlideTransitionParams . Zoom _In } , { displayValue : this . textZoomOut , value : Asc . c _oAscSlideTransitionParams . Zoom _Out } , { displayValue : this . textZoomRotate , value : Asc . c _oAscSlideTransitionParams . Zoom _AndRotate } ] , this . cmbEffectType = new Common . UI . ComboBox ( { el : e ( "#slide-combo-effect-type" ) , cls : "input-group-nr" , style : "width: 100%;" , menuStyle : "min-width: 190px;" , editable : ! 1 , data : this . _arrEffectType , disabled : ! 0 } ) , this . cmbEffectType . setValue ( "" ) , this . cmbEffectType . on ( "selected" , i . bind ( this . onEffectTypeSelect , this ) ) , this . numDuration = new Common . UI . MetricSpinner ( { el : e ( "#slide-spin-duration" ) , step : 1 , width : 65 , value : "" , defaultUnit : this . textSec , maxValue : 300 , minValue : 0 , disabled : ! 0 } ) , this . numDuration . on ( "change" , i . bind ( this . onDurationChange , this ) ) , this . numDelay = new Common . UI . MetricSpinner ( { el : e ( "#slide-spin-delay" ) , step : 1 , width : 70 , value : "" , defaultUnit : this . textSec , maxValue : 300 , minValue : 0 , disabled : ! 0 } ) , this . numDelay . on ( "change" , i . bind ( this . onDelayChange , this ) ) , this . chStartOnClick = new Common . UI . CheckBox ( { el : e ( "#slide-checkbox-start-click" ) , labelText : this . strStartOnClick , disabled : ! 0 } ) , this . chStartOnClick . on ( "change" , i . bind ( this . onStartOnClickChange , this ) ) , this . chDelay = new Common . UI . CheckBox ( { el : e ( "#slide-checkbox-delay" ) , labelText : this . strDelay , disabled : ! 0 } ) , this . chDelay . on ( "change" , i . bind ( this . onCheckDelayChange , this ) ) , this . btnPreview = new Common . UI . Button ( { el : e ( "#slide-button-preview" ) , disabled : ! 0 } ) , this . btnPreview . on ( "click" , i . bind ( function ( t ) { this . api && this . api . SlideTransitionPlay ( ) , this . fireEvent ( "editcomplete" , this ) } , this ) ) , this . btnApplyToAll = new Common . UI . Button ( { el : e ( "#slide-button-apply-all" ) , disabled : ! 0 } ) , this . btnApplyToAll . on ( "click" , i . bind ( function ( t ) { this . api && this . api . SlideTimingApplyToAll ( ) , this . fireEvent ( "editcomplete" , this ) } , this ) ) } , render : function ( ) { e ( this . el ) . html ( this . template ( { scope : this } ) ) } , setApi : function ( t ) { return this . api = t , this . api && ( this . api . SetInterfaceDrawImagePlaceSlide ( "slide-texture-img" ) , this . api . asc _registerCallback ( "asc_onInitStandartTextures" , i . bind ( this . onInitStandartTextures , this ) ) ) , this } , onFillSrcSelect : function ( t , e ) { switch ( this . ShowHideElem ( e . value ) , e . value ) { case Asc . c _oAscFill . FILL _TYPE _SOLID : if ( this . _state . FillType = Asc . c _oAscFill . FILL _TYPE _SOLID , ! this . _noApply ) { var i = new Asc . CAscSlideProps , n = new Asc . asc _CShapeFill ; n . put _type ( Asc . c _oAscFill . FILL _TYPE _SOLID ) , n . put _fill ( new Asc . asc _CFillSolid ) , n . get _fill ( ) . put _color ( Common . Utils . ThemeColor . getRgbColor ( "transparent" == this . SlideColor . Color ? { color : "4f81bd" , effectId : 24 } : this . SlideColor . Color ) ) , i . put _background ( n ) , this . api . SetSlideProps ( i ) } break ; case Asc . c _oAscFill . FILL _TYPE _GRAD : if ( this . _state . FillType = Asc . c _oAscFill . FILL _TYPE _GRAD , ! this . _noApply ) { var i = new Asc . CAscSlideProps , n = new Asc . asc _CShapeFill ; if ( n . put _type ( Asc . c _oAscFill . FILL _TYPE _GRAD ) , n . put _fill ( new Asc . asc _CFillGrad ) , n . get _fill ( ) . put _grad _type ( this . GradFillType ) , this . GradFillType == Asc . c _oAscFillGradType . GRAD _LINEAR && ( n . get _fill ( ) . put _linear _angle ( 6e4 * this . GradLinearDirectionType ) , n . get _fill ( ) . put _linear _scale ( ! 0 ) ) , this . OriginalFillType !== Asc . c _oAscFill . FILL _TYPE _GRAD ) { var o = Common . Utils . ThemeColor . getRgbColor ( this . GradColor . colors [ 0 ] ) . get _color ( ) . get _hex ( ) , s = Common . Utils . ThemeColor . getRgbColor ( this . GradColor . colors [ 1 ] ) . get _color ( ) . get _hex ( ) ; o = "ffffff" === o && "ffffff" === s ? { color : "4f81bd" , effectId : 24 } : this . GradColor . colors [ 0 ] , n . get _fill ( ) . put _positions ( [ 1e3 * this . GradColor . values [ 0 ] , 1e3 * this . GradColor . values [ 1 ] ] ) , n . get _fill ( ) . put _colors ( [ Common . Utils . ThemeColor . getRgbColor ( o ) , Common . Utils . ThemeColor . getRgbColor ( this . GradColor . colors [ 1 ] ) ] ) } i . put _background ( n ) , this . api . SetSlideProps ( i ) } break ; case Asc . c _oAscFill . FILL _TYPE _BLIP : this . _state . FillType = Asc . c _oAscFill . FILL _TYPE _BLIP ; break ; case Asc . c _oAscFill . FILL _TYPE _PATT : if ( this . _state . FillType = Asc . c _oAscFill . FILL _TYPE _PATT , ! this . _noApply ) { var i = new Asc . CAscSlideProps , n = new Asc . asc _CShapeFil
; var p = typeof this . SlideColor . Color , u = typeof this . _state . SlideColor ; if ( p !== u || "object" == p && ( this . SlideColor . Color . effectValue !== this . _state . SlideColor . effectValue || this . _state . SlideColor . color . indexOf ( this . SlideColor . Color . color ) < 0 ) || "object" != p && this . _state . SlideColor . indexOf ( this . SlideColor . Color ) < 0 ) { if ( this . btnBackColor . setColor ( this . SlideColor . Color ) , "object" == typeof this . SlideColor . Color ) { for ( var m = ! 1 , g = 0 ; g < 10 ; g ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ g ] == this . SlideColor . Color . effectValue ) { this . colorsBack . select ( this . SlideColor . Color , ! 0 ) , m = ! 0 ; break } m || this . colorsBack . clearSelection ( ) } else this . colorsBack . select ( this . SlideColor . Color , ! 0 ) ; this . _state . SlideColor = this . SlideColor . Color } var f = t . get _timing ( ) ; if ( f ) { var r = f . get _TransitionType ( ) , b = ! 1 ; if ( this . _state . Effect !== r ) { var C = this . cmbEffectName . store . findWhere ( { value : r } ) ; C ? ( b = ! 0 , this . cmbEffectName . setValue ( C . get ( "value" ) ) ) : this . cmbEffectName . setValue ( "" ) , this . fillEffectTypeCombo ( b ? r : void 0 ) , this . Effect = r , this . _state . Effect = r } r = f . get _TransitionOption ( ) , ( this . _state . EffectType !== r || b ) && ( b = ! 1 , C = this . cmbEffectType . store . findWhere ( { value : r } ) , C ? ( b = ! 0 , this . cmbEffectType . setValue ( C . get ( "value" ) ) ) : this . cmbEffectType . setValue ( "" ) , this . _state . EffectType = r ) , r = f . get _TransitionDuration ( ) , ( Math . abs ( this . _state . Duration - r ) > . 001 || ( null === this . _state . Duration || null === r ) && this . _state . Duration !== r || ( void 0 === this . _state . Duration || void 0 === r ) && this . _state . Duration !== r ) && ( this . numDuration . setValue ( null !== r && void 0 !== r ? r / 1e3 : "" , ! 0 ) , this . _state . Duration = r ) , r = f . get _SlideAdvanceDuration ( ) , ( Math . abs ( this . _state . Delay - r ) > . 001 || ( null === this . _state . Delay || null === r ) && this . _state . Delay !== r || ( void 0 === this . _state . Delay || void 0 === r ) && this . _state . Delay !== r ) && ( this . numDelay . setValue ( null !== r && void 0 !== r ? r / 1e3 : "" , ! 0 ) , this . _state . Delay = r ) , r = f . get _SlideAdvanceOnMouseClick ( ) , this . _state . OnMouseClick !== r && ( this . chStartOnClick . setValue ( null !== r && void 0 !== r ? r : "indeterminate" , ! 0 ) , this . _state . OnMouseClick = r ) , r = f . get _SlideAdvanceAfter ( ) , this . _state . AdvanceAfter !== r && ( this . chDelay . setValue ( null !== r && void 0 !== r ? r : "indeterminate" , ! 0 ) , this . numDelay . setDisabled ( "checked" !== this . chDelay . getValue ( ) ) , this . _state . AdvanceAfter = r ) } if ( p = typeof this . FGColor . Color , u = typeof this . _state . FGColor , p !== u || "object" == p && ( this . FGColor . Color . effectValue !== this . _state . FGColor . effectValue || this . _state . FGColor . color . indexOf ( this . FGColor . Color . color ) < 0 ) || "object" != p && this . _state . FGColor . indexOf ( this . FGColor . Color ) < 0 ) { if ( this . btnFGColor . setColor ( this . FGColor . Color ) , "object" == typeof this . FGColor . Color ) { for ( var m = ! 1 , g = 0 ; g < 10 ; g ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ g ] == this . FGColor . Color . effectValue ) { this . colorsFG . select ( this . FGColor . Color , ! 0 ) , m = ! 0 ; break } m || this . colorsFG . clearSelection ( ) } else this . colorsFG . select ( this . FGColor . Color , ! 0 ) ; this . _state . FGColor = this . FGColor . Color } if ( p = typeof this . BGColor . Color , u = typeof this . _state . BGColor , p !== u || "object" == p && ( this . BGColor . Color . effectValue !== this . _state . BGColor . effectValue || this . _state . BGColor . color . indexOf ( this . BGColor . Color . color ) < 0 ) || "object" != p && this . _state . BGColor . indexOf ( this . BGColor . Color ) < 0 ) { if ( this . btnBGColor . setColor ( this . BGColor . Color ) , "object" == typeof this . BGColor . Color ) { for ( var m = ! 1 , g = 0 ; g < 10 ; g ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ g ] == this . BGColor . Color . effectValue ) { this . colorsBG . select ( this . BGColor . Color , ! 0 ) , m = ! 0 ; break } m || this . colorsBG . clearSelection ( ) } else this . colorsBG . select ( this . BGColor . Color , ! 0 ) ; this . _state . BGColor = this . BGColor . Color } if ( s = this . GradColor . colors [ this . GradColor . currentIdx ] , p = typeof s , u = typeof this . _state . GradColor , p !== u || "object" == p && ( s . effectValue !== this . _state . GradColor . effectValue || this . _state . GradColor . color . indexOf ( s . color ) < 0 ) || "object" != p && this . _state . GradColor . indexOf ( s ) < 0 ) { if ( this . btnGradColor . setColor ( s ) , "object" == typeof s ) { for ( var m = ! 1 , g = 0 ; g < 10 ; g ++ ) if ( Common . Utils . ThemeColor . ThemeValues [ g ] == s . effectValue ) { this . colorsGrad . select ( s , ! 0 ) , m = ! 0 ; break } m || this . colorsGrad . clearSelection ( ) } else this . colorsGrad . select ( s , ! 0 ) ; this . _state . GradColor = s } this . _noApply = ! 1 } } , SetSlideDisabled : function ( t , e , i ) { if ( ! this . _initSettings ) { if ( t !== this . _stateDisabled . background ) { t
if ( null === s || void 0 === s || null === a ) this . OriginalFillType = null ; else if ( a == Asc . c _oAscFill . FILL _TYPE _NOFILL ) this . OriginalFillType = Asc . c _oAscFill . FILL _TYPE _NOFILL ; else if ( a == Asc . c _oAscFill . FILL _TYPE _SOLID ) s = s . get _fill ( ) , r = s . get _color ( ) , r ? r . get _type ( ) == Asc . c _oAscColor . COLOR _TYPE _SCHEME ? this . ShapeColor = { Value : 1 , Color : { color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) , effectValue : r . get _value ( ) } } : this . ShapeColor = { Value : 1 , Color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) } : this . ShapeColor = { Value : 0 , Color : "transparent" } , this . OriginalFillType = Asc . c _oAscFill . FILL _TYPE _SOLID , this . FGColor = "transparent" !== this . ShapeColor . Color ? { Value : 1 , Color : Common . Utils . ThemeColor . colorValue2EffectId ( this . ShapeColor . Color ) } : { Value : 1 , Color : "000000" } , this . BGColor = { Value : 1 , Color : "ffffff" } , this . GradColor . colors [ 0 ] = "transparent" !== this . ShapeColor . Color ? Common . Utils . ThemeColor . colorValue2EffectId ( this . ShapeColor . Color ) : "000000" , this . GradColor . colors [ 1 ] = "ffffff" ; else if ( a == Asc . c _oAscFill . FILL _TYPE _BLIP ) s = s . get _fill ( ) , this . BlipFillType = s . get _type ( ) , this . _state . BlipFillType !== this . BlipFillType && ( this . BlipFillType == Asc . c _oAscFillBlipType . STRETCH || this . BlipFillType == Asc . c _oAscFillBlipType . TILE ? this . cmbFillType . setValue ( this . BlipFillType ) : this . cmbFillType . setValue ( "" ) , this . _state . BlipFillType = this . BlipFillType ) , this . OriginalFillType = Asc . c _oAscFill . FILL _TYPE _BLIP ; else if ( a == Asc . c _oAscFill . FILL _TYPE _PATT ) { if ( s = s . get _fill ( ) , this . PatternFillType = s . get _pattern _type ( ) , this . _state . PatternFillType !== this . PatternFillType ) { this . cmbPattern . suspendEvents ( ) ; var o = this . cmbPattern . menuPicker . store . findWhere ( { type : this . PatternFillType } ) ; this . cmbPattern . menuPicker . selectRecord ( o ) , this . cmbPattern . resumeEvents ( ) , this . _state . PatternFillType = this . PatternFillType } r = s . get _color _fg ( ) , r ? r . get _type ( ) == Asc . c _oAscColor . COLOR _TYPE _SCHEME ? this . FGColor = { Value : 1 , Color : { color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) , effectValue : r . get _value ( ) } } : this . FGColor = { Value : 1 , Color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) } : this . FGColor = { Value : 1 , Color : "000000" } , r = s . get _color _bg ( ) , r ? r . get _type ( ) == Asc . c _oAscColor . COLOR _TYPE _SCHEME ? this . BGColor = { Value : 1 , Color : { color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) , effectValue : r . get _value ( ) } } : this . BGColor = { Value : 1 , Color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) } : this . BGColor = { Value : 1 , Color : "ffffff" } , this . OriginalFillType = Asc . c _oAscFill . FILL _TYPE _PATT , this . ShapeColor = { Value : 1 , Color : Common . Utils . ThemeColor . colorValue2EffectId ( this . FGColor . Color ) } , this . GradColor . colors [ 0 ] = Common . Utils . ThemeColor . colorValue2EffectId ( this . FGColor . Color ) , this . GradColor . colors [ 1 ] = "ffffff" } else if ( a == Asc . c _oAscFill . FILL _TYPE _GRAD ) { s = s . get _fill ( ) ; var c = s . get _grad _type ( ) ; if ( this . _state . GradFillType === c && this . GradFillType === c || ( this . GradFillType = c , o = void 0 , this . GradFillType == Asc . c _oAscFillGradType . GRAD _LINEAR || this . GradFillType == Asc . c _oAscFillGradType . GRAD _PATH ? ( this . cmbGradType . setValue ( this . GradFillType ) , o = this . cmbGradType . store . findWhere ( { value : this . GradFillType } ) , this . onGradTypeSelect ( this . cmbGradType , o . attributes ) ) : ( this . cmbGradType . setValue ( "" ) , this . btnDirection . setIconCls ( "" ) ) , this . _state . GradFillType = this . GradFillType ) , this . GradFillType == Asc . c _oAscFillGradType . GRAD _LINEAR ) { var h = Math . floor ( s . get _linear _angle ( ) / 6e4 ) ; if ( Math . abs ( this . GradLinearDirectionType - h ) > . 001 ) { this . GradLinearDirectionType = h ; var d = this . mnuDirectionPicker . store . findWhere ( { type : h } ) ; this . mnuDirectionPicker . selectRecord ( d , ! 0 ) , d ? this . btnDirection . setIconCls ( "item-gradient " + d . get ( "iconcls" ) ) : this . btnDirection . setIconCls ( "" ) } } var p = s . get _colors ( ) ; p && p . length > 0 && ( r = p [ 0 ] , r ? r . get _type ( ) == Asc . c _oAscColor . COLOR _TYPE _SCHEME ? ( this . GradColor . colors [ 0 ] = { color : Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) , effectValue : r . get _value ( ) } , Common . Utils . ThemeColor . colorValue2EffectId ( this . GradColor . colors [ 0 ] ) ) : this . GradColor . colors [ 0 ] = Common . Utils . ThemeColor . getHexColor ( r . get _r ( ) , r . get _g ( ) , r . get _b ( ) ) : this . GradColor . colors [ 0 ] = "000000" , r = p [ 1 ] , r ? r . get _type ( ) == Asc . c _oAscColor . COLOR _
; this . trigger ( "render:before" , this ) ; var n = Common . localStorage . getItem ( "pe-hide-right-settings" ) ; return n = null === n || 0 == parseInt ( n ) , t . css ( "width" , ( n ? MENU _SCALE _PART : SCALE _MIN ) + "px" ) , t . show ( ) , t . html ( this . template ( { } ) ) , this . btnText . el = e ( "#id-right-menu-text" ) , this . btnText . render ( ) , this . btnTable . el = e ( "#id-right-menu-table" ) , this . btnTable . render ( ) , this . btnImage . el = e ( "#id-right-menu-image" ) , this . btnImage . render ( ) , this . btnSlide . el = e ( "#id-right-menu-slide" ) , this . btnSlide . render ( ) , this . btnChart . el = e ( "#id-right-menu-chart" ) , this . btnChart . render ( ) , this . btnShape . el = e ( "#id-right-menu-shape" ) , this . btnShape . render ( ) , this . btnTextArt . el = e ( "#id-right-menu-textart" ) , this . btnTextArt . render ( ) , this . btnText . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . btnTable . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . btnImage . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . btnSlide . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . btnChart . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . btnShape . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . btnTextArt . on ( "click" , i . bind ( this . onBtnMenuClick , this ) ) , this . paragraphSettings = new PE . Views . ParagraphSettings , this . slideSettings = new PE . Views . SlideSettings , this . imageSettings = new PE . Views . ImageSettings , this . chartSettings = new PE . Views . ChartSettings , this . tableSettings = new PE . Views . TableSettings , this . shapeSettings = new PE . Views . ShapeSettings , this . textartSettings = new PE . Views . TextArtSettings , i . isUndefined ( this . scroller ) && ( this . scroller = new Common . UI . Scroller ( { el : e ( this . el ) . find ( ".right-panel" ) , suppressScrollX : ! 0 , useKeyboard : ! 1 } ) ) , n && ( e ( "#id-slide-settings" ) . parent ( ) . css ( "display" , "inline-block" ) , e ( "#id-slide-settings" ) . addClass ( "active" ) ) , this . trigger ( "render:after" , this ) , this } , setApi : function ( t ) { this . api = t ; var e = function ( ) { this . fireEvent ( "editcomplete" , this ) } ; this . paragraphSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) , this . slideSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) , this . imageSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) , this . chartSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) , this . tableSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) , this . shapeSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) , this . textartSettings . setApi ( t ) . on ( "editcomplete" , i . bind ( e , this ) ) } , setMode : function ( t ) { } , onBtnMenuClick : function ( t , i ) { var n = e ( "#" + this . _settings [ t . options . asctype ] . panel ) , o = n . parent ( ) ; t . pressed ? ( this . minimizedMode && ( e ( this . el ) . width ( MENU _SCALE _PART ) , o . css ( "display" , "inline-block" ) , this . minimizedMode = ! 1 , Common . localStorage . setItem ( "pe-hide-right-settings" , 0 ) ) , o . find ( "> .active" ) . removeClass ( "active" ) , n . addClass ( "active" ) , this . scroller && this . scroller . scrollTop ( 0 ) , this . _settings [ Common . Utils . documentSettingsType . Slide ] . isCurrent = t . options . asctype == Common . Utils . documentSettingsType . Slide ) : ( o . css ( "display" , "none" ) , e ( this . el ) . width ( SCALE _MIN ) , this . minimizedMode = ! 0 , Common . localStorage . setItem ( "pe-hide-right-settings" , 1 ) ) , this . fireEvent ( "rightmenuclick" , [ this , t . options . asctype , this . minimizedMode ] ) } , SetActivePane : function ( t , i ) { if ( ! ( this . minimizedMode && ! 0 !== i || void 0 === this . _settings [ t ] ) ) if ( this . minimizedMode ) this . _settings [ t ] . btn . toggle ( ! 0 , ! 1 ) , this . _settings [ t ] . btn . trigger ( "click" , this . _settings [ t ] . btn ) ; else { var n = e ( "#" + this . _settings [ t ] . panel ) ; n . hasClass ( "active" ) || ( n . parent ( ) . find ( "> .active" ) . removeClass ( "active" ) , n . addClass ( "active" ) , this . scroller && this . scroller . update ( ) ) , this . _settings [ t ] . btn . isActive ( ) || this . _settings [ t ] . btn . toggle ( ! 0 , ! 1 ) } } , GetActivePane : function ( ) { return this . minimizedMode ? null : this . $el . find ( ".settings-panel.active" ) [ 0 ] . id } , SetDisabled : function ( t , i , n ) { if ( n ) this . slideSettings . SetSlideDisabled ( i , i , i ) , this . paragraphSettings . disableControls ( i ) , this . shapeSettings . disableControls ( i ) , this . tableSettings . disableControls ( i ) , this . imageSettings . disableControls ( i ) , this . chartSettings . disableControls ( i ) ; else { var o = e ( "#" + t ) ; i !== o . hasClass ( "disabled" ) && ( o . toggleClass ( "disabled" , i ) , i ? o . attr ( { disabled : i } ) : o . removeAttr ( "disabled" ) ) } } , clearSelection : function ( ) { var t = e ( ".right-panel" ) ; t . find ( "> .active" ) . removeClass ( "active" ) , this . _settings . forEach ( function ( t ) { t . btn . isActive ( ) && t . btn .
return ' < div id = "<%=id%>" class = "user-comment-item" > \ r \ n \ r \ n \ x3c ! -- comment block -- \ x3e \ r \ n \ r \ n < div class = "user-name" > < %= scope . getUserName ( username ) % > < / d i v > \ r \ n < d i v c l a s s = " u s e r - d a t e " > < % = d a t e % > < / d i v > \ r \ n < % i f ( ! e d i t T e x t I n P o p o v e r | | h i n t ) { % > \ r \ n < d i v c l a s s = " u s e r - m e s s a g e " > < % = s c o p e . p i c k L i n k ( c o m m e n t ) % > < / d i v > \ r \ n < % } e l s e { % > \ r \ n < d i v c l a s s = " i n n e r - e d i t - c t " > \ r \ n < t e x t a r e a c l a s s = " m s g - r e p l y u s e r - s e l e c t " m a x l e n g t h = " m a x C o m m L e n g t h " > < % = c o m m e n t % > < / t e x t a r e a > \ r \ n < % i f ( h i d e A d d R e p l y ) { % > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n p r i m a r y b t n - i n n e r - e d i t " i d = " i d - c o m m e n t s - c h a n g e - p o p o v e r " > t e x t A d d < / b u t t o n > \ r \ n < % } e l s e { % > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n p r i m a r y b t n - i n n e r - e d i t " i d = " i d - c o m m e n t s - c h a n g e - p o p o v e r " > t e x t E d i t < / b u t t o n > \ r \ n < % } % > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n b t n - i n n e r - c l o s e " > t e x t C a n c e l < / b u t t o n > \ r \ n < / d i v > \ r \ n < % } % > \ r \ n \ r \ n \ x 3 c ! - - r e p l y s e l e m e n t s - - \ x 3 e \ r \ n \ r \ n < % i f ( r e p l y s . l e n g t h ) { % > \ r \ n < d i v c l a s s = " r e p l y - a r r o w i m g - c o m m o n c t r l " > < / d i v > \ r \ n < % _ . e a c h ( r e p l y s , f u n c t i o n ( i t e m ) { % > \ r \ n < d i v c l a s s = " r e p l y - i t e m - c t " > \ r \ n < d i v c l a s s = " u s e r - n a m e " > < % = s c o p e . g e t U s e r N a m e ( i t e m . g e t ( " u s e r n a m e " ) ) % > < / d i v > \ r \ n < d i v c l a s s = " u s e r - d a t e " > < % = i t e m . g e t ( " d a t e " ) % > < / d i v > \ r \ n < % i f ( ! i t e m . g e t ( " e d i t T e x t I n P o p o v e r " ) ) { % > \ r \ n < d i v c l a s s = " u s e r - m e s s a g e " > < % = s c o p e . p i c k L i n k ( i t e m . g e t ( " r e p l y " ) ) % > < / d i v > \ r \ n < % i f ( ! h i n t ) { % > \ r \ n < d i v c l a s s = " b t n s - r e p l y - c t " > \ r \ n < % i f ( i t e m . g e t ( " e d i t a b l e " ) ) { % > \ r \ n < d i v c l a s s = " b t n - e d i t i m g - c o m m o n c t r l " d a t a - v a l u e = " < % = i t e m . g e t ( " i d " ) % > " > < / d i v > \ r \ n < % } % > \ r \ n < d i v c l a s s = " b t n - d e l e t e i m g - c o m m o n c t r l " d a t a - v a l u e = " < % = i t e m . g e t ( " i d " ) % > " > < / d i v > \ r \ n < / d i v > \ r \ n < % } % > \ r \ n < % } e l s e { % > \ r \ n < d i v c l a s s = " i n n e r - e d i t - c t " > \ r \ n < t e x t a r e a c l a s s = " m s g - r e p l y t e x t a r e a - f i x u s e r - s e l e c t " m a x l e n g t h = " m a x C o m m L e n g t h " > < % = i t e m . g e t ( " r e p l y " ) % > < / t e x t a r e a > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n p r i m a r y b t n - i n n e r - e d i t b t n - f i x " i d = " i d - c o m m e n t s - c h a n g e - p o p o v e r " > t e x t E d i t < / b u t t o n > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n b t n - i n n e r - c l o s e " > t e x t C l o s e < / b u t t o n > \ r \ n < / d i v > \ r \ n < % } % > \ r \ n < / d i v > \ r \ n < % } ) ; % > \ r \ n \ r \ n < % } % > \ r \ n \ r \ n \ x 3 c ! - - a d d r e p l y b u t t o n - - \ x 3 e \ r \ n \ r \ n < % i f ( ! s h o w R e p l y I n P o p o v e r & & ! h i d e A d d R e p l y & & ! h i n t ) { % > \ r \ n < % i f ( r e p l y s . l e n g t h ) { % > \ r \ n < l a b e l c l a s s = " u s e r - r e p l y " s t y l e = " m a r g i n - l e f t : 2 0 p x ; m a r g i n - t o p : 5 p x ; " r o l e = " p r e s e n t a t i o n " t a b i n d e x = " - 1 " > t e x t A d d R e p l y < / l a b e l > \ r \ n < % } e l s e { % > \ r \ n < l a b e l c l a s s = " u s e r - r e p l y " r o l e = " p r e s e n t a t i o n " t a b i n d e x = " - 1 " > t e x t A d d R e p l y < / l a b e l > \ r \ n < % } % > \ r \ n < % } % > \ r \ n \ r \ n \ x 3 c ! - - e d i t b u t t o n s - - \ x 3 e \ r \ n \ r \ n < % i f ( ! e d i t T e x t I n P o p o v e r & & ! l o c k & & ! h i n t ) { % > \ r \ n < d i v c l a s s = " e d i t - c t " > \ r \ n < % i f ( e d i t a b l e ) { % > \ r \ n < d i v c l a s s = " b t n - e d i t i m g - c o m m o n c t r l " > < / d i v > \ r \ n < % } % > \ r \ n < d i v c l a s s = " b t n - d e l e t e i m g - c o m m o n c t r l " > < / d i v > \ r \ n < % i f ( r e s o l v e d ) { % > \ r \ n < d i v c l a s s = " b t n - r e s o l v e - c h e c k i m g - c o m m o n c t r l " d a t a - t o g g l e = " t o o l t i p " > < / d i v > \ r \ n < % } e l s e { % > \ r \ n < d i v c l a s s = " b t n - r e s o l v e i m g - c o m m o n c t r l " d a t a - t o g g l e = " t o o l t i p " > < / d i v > \ r \ n < % } % > \ r \ n < / d i v > \ r \ n < % } % > \ r \ n \ r \ n \ x 3 c ! - - r e p l y - - \ x 3 e \ r \ n \ r \ n < % i f ( s h o w R e p l y I n P o p o v e r ) { % > \ r \ n < d i v c l a s s = " r e p l y - c t " > \ r \ n < t e x t a r e a c l a s s = " m s g - r e p l y u s e r - s e l e c t " p l a c e h o l d e r = " t e x t A d d R e p l y " m a x l e n g t h = " m a x C o m m L e n g t h " > < / t e x t a r e a > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n p r i m a r y b t n - r e p l y " i d = " i d - c o m m e n t s - c h a n g e - p o p o v e r " > t e x t R e p l y < / b u t t o n > \ r \ n < b u t t o n c l a s s = " b t n n o r m a l d l g - b t n b t n - c l o s e " > t e x t C l o s e < / b u t t o n > \ r \ n < / d i v > \ r \ n
this . panelMessages . scroller . scrollTop ( n . get ( 0 ) . getBoundingClientRect ( ) . height ) ) } } , _onResetMessages : function ( t , e ) { if ( this . panelMessages ) { t . each ( function ( t ) { this . _prepareMessage ( t ) } , this ) , this . panelMessages . html ( this . templateMsgList ( { messages : t . models , msgtpl : this . tplMsg , scope : this } ) ) , this . panelMessages . scroller . update ( { minScrollbarLength : 40 , alwaysVisibleY : ! 0 } ) } } , _onBtnAddMessage : function ( t ) { this . txtMessage && ( this . fireEvent ( "message:add" , [ this , this . txtMessage . val ( ) . trim ( ) ] ) , this . txtMessage . val ( "" ) , this . focus ( ) ) } , _prepareMessage : function ( t ) { var e = this . storeUsers . findUser ( t . get ( "userid" ) ) ; t . set ( { usercolor : e ? e . get ( "color" ) : "#000" , message : this . _pickLink ( Common . Utils . String . htmlEncode ( t . get ( "message" ) ) ) } , { silent : ! 0 } ) } , _pickLink : function ( t ) { var e , i , n = [ ] ; t . replace ( Common . Utils . ipStrongRe , function ( t ) { return e = arguments [ arguments . length - 2 ] , n . push ( { start : e , end : t . length + e , str : '<a href="' + t + '" target="_blank" data-can-copy="true">' + t + "</a>" } ) , "" } ) , ( t . length < 1e3 || t . search ( /\S{255,}/ ) < 0 ) && t . replace ( Common . Utils . hostnameStrongRe , function ( t ) { var o = /(((^https?)|(^ftp)):\/\/)/i . test ( t ) ? t : "http://" + t ; return e = arguments [ arguments . length - 2 ] , i = t . length , _ . find ( n , function ( t ) { return e >= t . start && e < t . end || e <= t . start && e + i > t . start } ) || n . push ( { start : e , end : i + e , str : '<a href="' + o + '" target="_blank" data-can-copy="true">' + t + "</a>" } ) , "" } ) , t . replace ( Common . Utils . emailStrongRe , function ( t ) { var o = /((^mailto:)\/\/)/i . test ( t ) ? t : "mailto:" + t ; return e = arguments [ arguments . length - 2 ] , i = t . length , _ . find ( n , function ( t ) { return e >= t . start && e < t . end || e <= t . start && e + i > t . start } ) || n . push ( { start : e , end : i + e , str : '<a href="' + o + '">' + t + "</a>" } ) , "" } ) , n = _ . sortBy ( n , function ( t ) { return t . start } ) ; for ( var o = n . length > 0 ? t . substring ( 0 , n [ 0 ] . start ) + n [ 0 ] . str : t , s = 1 ; s < n . length ; s ++ ) o += t . substring ( n [ s - 1 ] . end , n [ s ] . start ) + n [ s ] . str ; return n . length > 0 && ( o += t . substring ( n [ s - 1 ] . end , t . length ) ) , o } , getUserName : function ( t ) { return Common . Utils . String . htmlEncode ( t ) } , hide : function ( ) { Common . UI . BaseView . prototype . hide . call ( this , arguments ) , this . fireEvent ( "hide" , this ) , this . textBoxAutoSizeLocked = void 0 } , setupLayout : function ( ) { var t = this , e = $ ( t . el ) , i = this . panelBox . find ( " > .layout-item" ) ; t . layout = new Common . UI . VBoxLayout ( { box : this . panelBox , items : [ { el : i [ 0 ] , rely : ! 0 , behaviour : "splitter" , resize : { hidden : ! 1 , autohide : ! 1 , fmin : function ( ) { return t . usersBoxHeight } , fmax : function ( ) { return . 5 * t . panelBox . height ( ) - t . messageBoxHeight } } } , { el : i [ 1 ] , rely : ! 0 , behaviour : "splitter" , resize : { hidden : ! 1 , autohide : ! 1 , fmin : function ( ) { return Math . max ( t . messageBoxHeight + t . usersBoxHeight , . 5 * t . panelBox . height ( ) ) } , fmax : function ( ) { return t . panelBox . height ( ) - t . addMessageBoxHeight } } } , { el : i [ 2 ] , stretch : ! 0 } ] } ) , t . layout . on ( "layout:resizedrag" , function ( e ) { t . updateScrolls ( ) , t . usersCachedHeigt = t . panelUsers . height ( ) + 8 + 1 , e . index || ( t . textBoxAutoSizeLocked = ! 0 ) } , this ) , $ ( window ) . on ( "resize" , function ( ) { "none" !== e . css ( "display" ) && t . updateLayout ( ) } ) , this . updateLayout ( ) ; var n = this . panelBox . height ( ) ; this . layout . setResizeValue ( 0 , this . usersBoxHeight ) , this . layout . setResizeValue ( 1 , Math . max ( this . addMessageBoxHeight , Math . max ( . 5 * n , n - t . panelOptions . height ( ) - 4 ) ) ) , this . setupAutoSizingTextBox ( ) , this . txtMessage . bind ( "input propertychange" , _ . bind ( this . updateHeightTextBox , this ) ) } , updateLayout : function ( t ) { var e = this , i = this . panelBox . height ( ) ; if ( e . layout . setResizeValue ( 1 , Math . max ( e . addMessageBoxHeight , Math . max ( . 5 * i , i - e . panelOptions . height ( ) - 4 ) ) ) , t ) { this . panelUsers . css ( "height" ) ; this . panelUsers . css ( "height" , "1px" ) ; var n = this . panelUsers . get ( 0 ) . scrollHeight ; e . layout . setResizeValue ( 0 , Math . max ( e . usersBoxHeight , Math . min ( n + 2 , Math . floor ( . 5 * i ) - e . messageBoxHeight ) ) ) } else e . layout . setResizeValue ( 0 , Math . max ( e . usersBoxHeight , Math . min ( e . usersCachedHeigt + 2 , Math . floor ( . 5 * i ) - e . messageBoxHeight ) ) ) ; e . updateScrolls ( ) , e . updateHeightTextBox ( null ) } , setupAutoSizingTextBox : function ( ) { this . lineHeight = 0 , this . minHeight = 44 , this . lineHeight = 1.25 * parseInt ( this . txtMessage . css ( "lineHeight" ) , 10 ) , this . updateHeightTextBox ( ! 0 ) } , updateHeightTextBox : function ( t ) { var e , i , n = this . txtMessage ; if ( i = this . panelBox . height ( ) , t && 0 == n . val ( ) . length ) return this . layout . setResizeValue ( 1 , Math . max ( this . addMessageBoxHeight , i - this . addMessageBoxHeight ) ) , void ( thi
this . onBtnMenuClick ( this . btnComments ) , this . onCoauthOptions ( ) ) ) } , getMenu : function ( t ) { switch ( t ) { default : return null ; case "file" : return this . btnFile . panel ; case "about" : return this . btnAbout . panel } } , setMode : function ( t ) { return this . mode = t , this . btnAbout . panel . setMode ( t ) , this } , setDeveloperMode : function ( t ) { if ( this . $el . is ( ":visible" ) ) { this . developerHint || ( this . developerHint = e ( '<div id="developer-hint">' + this . txtDeveloper + "</div>" ) . appendTo ( this . $el ) , this . devHeight = this . developerHint . outerHeight ( ) , e ( window ) . on ( "resize" , i . bind ( this . onWindowResize , this ) ) ) , this . developerHint . toggleClass ( "hidden" , ! t ) ; var n = this . $el . find ( "button.btn-category:visible:last-of-type" ) ; this . minDevPosition = n . offset ( ) . top - n . offsetParent ( ) . offset ( ) . top + n . height ( ) + 20 , this . onWindowResize ( ) } } , onWindowResize : function ( ) { this . developerHint . css ( "top" , Math . max ( ( this . $el . height ( ) - this . devHeight ) / 2 , this . minDevPosition ) ) } , tipComments : "Comments" , tipChat : "Chat" , tipAbout : "About" , tipSupport : "Feedback & Support" , tipFile : "File" , tipSearch : "Search" , tipSlides : "Slides" , tipPlugins : "Plugins" , txtDeveloper : "DEVELOPER MODE" } , PE . Views . LeftMenu || { } ) ) } ) , define ( "presentationeditor/main/app/controller/LeftMenu" , [ "core" , "common/main/lib/util/Shortcuts" , "presentationeditor/main/app/view/LeftMenu" , "presentationeditor/main/app/view/FileMenu" ] , function ( ) { "use strict" ; PE . Controllers . LeftMenu = Backbone . Controller . extend ( _ . extend ( { views : [ "LeftMenu" , "FileMenu" ] , initialize : function ( ) { this . _state = { no _slides : void 0 } , this . addListeners ( { "Common.Views.Chat" : { hide : _ . bind ( this . onHideChat , this ) } , Statusbar : { "click:users" : _ . bind ( this . clickStatusbarUsers , this ) } , LeftMenu : { "panel:show" : _ . bind ( this . menuExpand , this ) , "comments:show" : _ . bind ( this . commentsShowHide , this , "show" ) , "comments:hide" : _ . bind ( this . commentsShowHide , this , "hide" ) } , "Common.Views.About" : { show : _ . bind ( this . aboutShowHide , this , ! 1 ) , hide : _ . bind ( this . aboutShowHide , this , ! 0 ) } , FileMenu : { "filemenu:hide" : _ . bind ( this . menuFilesHide , this ) , "item:click" : _ . bind ( this . clickMenuFileItem , this ) , "saveas:format" : _ . bind ( this . clickSaveAsFormat , this ) , "settings:apply" : _ . bind ( this . applySettings , this ) , "create:new" : _ . bind ( this . onCreateNew , this ) , "recent:open" : _ . bind ( this . onOpenRecent , this ) } , Toolbar : { "file:settings" : _ . bind ( this . clickToolbarSettings , this ) } , SearchDialog : { hide : _ . bind ( this . onSearchDlgHide , this ) , "search:back" : _ . bind ( this . onQuerySearch , this , "back" ) , "search:next" : _ . bind ( this . onQuerySearch , this , "next" ) } } ) } , onLaunch : function ( ) { this . leftMenu = this . createView ( "LeftMenu" ) . render ( ) , this . leftMenu . btnSearch . on ( "toggle" , _ . bind ( this . onMenuSearch , this ) ) , this . leftMenu . btnThumbs . on ( "toggle" , _ . bind ( this . onShowTumbnails , this ) ) , this . isThumbsShown = ! 0 , Common . util . Shortcuts . delegateShortcuts ( { shortcuts : { "command+shift+s,ctrl+shift+s" : _ . bind ( this . onShortcut , this , "save" ) , "command+f,ctrl+f" : _ . bind ( this . onShortcut , this , "search" ) , "alt+f" : _ . bind ( this . onShortcut , this , "file" ) , esc : _ . bind ( this . onShortcut , this , "escape" ) , "alt+q" : _ . bind ( this . onShortcut , this , "chat" ) , "command+shift+h,ctrl+shift+h" : _ . bind ( this . onShortcut , this , "comments" ) , f1 : _ . bind ( this . onShortcut , this , "help" ) } } ) , Common . util . Shortcuts . suspendEvents ( ) } , setApi : function ( t ) { if ( this . api = t , this . api . asc _registerCallback ( "asc_onThumbnailsShow" , _ . bind ( this . onThumbnailsShow , this ) ) , this . api . asc _registerCallback ( "asc_onCoAuthoringDisconnect" , _ . bind ( this . onApiServerDisconnect , this , ! 0 ) ) , Common . NotificationCenter . on ( "api:disconnect" , _ . bind ( this . onApiServerDisconnect , this ) ) , this . mode . canCoAuthoring && ( this . mode . canChat && this . api . asc _registerCallback ( "asc_onCoAuthoringChatReceiveMessage" , _ . bind ( this . onApiChatMessage , this ) ) , this . mode . canComments ) ) { this . api . asc _registerCallback ( "asc_onAddComment" , _ . bind ( this . onApiAddComment , this ) ) , this . api . asc _registerCallback ( "asc_onAddComments" , _ . bind ( this . onApiAddComments , this ) ) ; for ( var e = this . getApplication ( ) . getCollection ( "Common.Collections.Comments" ) , i = 0 ; i < e . length ; ++ i ) if ( e . at ( i ) . get ( "userid" ) !== this . mode . user . id ) { this . leftMenu . markCoauthOptions ( "comments" , ! 0 ) ; break } } return this . api . asc _registerCallback ( "asc_onCountPages" , _ . bind ( this . onApiCountPages , this ) ) , this . onApiCountPages ( this . api . getCountPages ( ) ) , this . leftMenu . getMenu ( "
this . appOptions . canOpenRecent = ! 0 !== this . editorConfig . nativeApp && void 0 !== this . editorConfig . recent && ! this . appOptions . isDesktopApp , this . appOptions . templates = this . editorConfig . templates , this . appOptions . recent = this . editorConfig . recent , this . appOptions . createUrl = this . editorConfig . createUrl , this . appOptions . lang = this . editorConfig . lang , this . appOptions . location = "string" == typeof this . editorConfig . location ? this . editorConfig . location . toLowerCase ( ) : "" , this . appOptions . sharingSettingsUrl = this . editorConfig . sharingSettingsUrl , this . appOptions . canAnalytics = ! 1 , this . appOptions . customization = this . editorConfig . customization , this . appOptions . canBackToFolder = ! 1 !== this . editorConfig . canBackToFolder && "object" == typeof this . editorConfig . customization && "object" == typeof this . editorConfig . customization . goback && ! _ . isEmpty ( this . editorConfig . customization . goback . url ) , this . appOptions . canBack = ! 0 !== this . editorConfig . nativeApp && ! 0 === this . appOptions . canBackToFolder , this . appOptions . canPlugins = ! 1 , this . plugins = this . editorConfig . plugins , this . getApplication ( ) . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) . setCanBack ( ! 0 === this . appOptions . canBackToFolder ) , this . editorConfig . lang && this . api . asc _setLocale ( this . editorConfig . lang ) , "us" != this . appOptions . location && "ca" != this . appOptions . location || Common . Utils . Metric . setDefaultMetric ( Common . Utils . Metric . c _MetricUnits . inch ) } , loadDocument : function ( t ) { this . permissions = { } , this . document = t . doc ; var e = { } ; if ( t . doc ) { this . permissions = $ . extend ( this . permissions , t . doc . permissions ) ; var i = new Asc . asc _CUserInfo ; i . put _Id ( this . appOptions . user . id ) , i . put _FullName ( this . appOptions . user . fullname ) , e = new Asc . asc _CDocInfo , e . put _Id ( t . doc . key ) , e . put _Url ( t . doc . url ) , e . put _Title ( t . doc . title ) , e . put _Format ( t . doc . fileType ) , e . put _VKey ( t . doc . vkey ) , e . put _Options ( t . doc . options ) , e . put _UserInfo ( i ) , e . put _CallbackUrl ( this . editorConfig . callbackUrl ) , e . put _Token ( t . doc . token ) } this . api . asc _registerCallback ( "asc_onGetEditorPermissions" , _ . bind ( this . onEditorPermissions , this ) ) , this . api . asc _setDocInfo ( e ) , this . api . asc _getEditorPermissions ( this . editorConfig . licenseUrl , this . editorConfig . customerId ) , t . doc && this . getApplication ( ) . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) . setDocumentCaption ( t . doc . title ) } , onProcessSaveResult : function ( t ) { this . api . asc _OnSaveEnd ( t . result ) , t && ! 1 === t . result && Common . UI . error ( { title : this . criticalErrorTitle , msg : _ . isEmpty ( t . message ) ? this . errorProcessSaveResult : t . message } ) } , onProcessRightsChange : function ( t ) { if ( t && ! 1 === t . enabled ) { var e = this , i = this . _state . lostEditingRights ; this . _state . lostEditingRights = ! this . _state . lostEditingRights , this . api . asc _coAuthoringDisconnect ( ) , this . getApplication ( ) . getController ( "LeftMenu" ) . leftMenu . getMenu ( "file" ) . panels . rights . onLostEditRights ( ) , Common . NotificationCenter . trigger ( "api:disconnect" ) , i || Common . UI . warning ( { title : this . notcriticalErrorTitle , maxwidth : 600 , msg : _ . isEmpty ( t . message ) ? this . warnProcessRightsChange : t . message , callback : function ( ) { e . _state . lostEditingRights = ! 1 , e . onEditComplete ( ) } } ) } } , onDownloadAs : function ( ) { this . api . asc _DownloadAs ( Asc . c _oAscFileType . PPTX , ! 0 ) } , onProcessMouse : function ( t ) { if ( "mouseup" == t . type ) { var e = document . getElementById ( "editor_sdk" ) ; if ( e ) { var i = e . getBoundingClientRect ( ) ; this . api . OnMouseUp ( t . x - i . left , t . y - i . top ) } } } , goBack : function ( t ) { var e = this . appOptions . customization . goback . url ; t ? window . open ( e , "_blank" ) : parent . location . href = e } , onEditComplete : function ( t ) { var e = this . getApplication ( ) , i = e . getController ( "Toolbar" ) , n = i . getView ( "Toolbar" ) ; if ( e . getController ( "DocumentHolder" ) . getView ( "DocumentHolder" ) . focus ( ) , this . api && this . api . asc _isDocumentCanSave ) { var o = this . api . asc _isDocumentCanSave ( ) , s = this . appOptions . forcesave , a = $ ( ".btn-icon" , n . btnSave . cmpEl ) . hasClass ( "btn-synch" ) ; n . btnSave . isDisabled ( ) !== ( ! o && ! a && ! s || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 && ! s ) && n . btnSave . setDisabled ( ! o && ! a && ! s || this . _state . isDisconnected || this . _state . fastCoauth && this . _state . usersCount > 1 && ! s ) } } , onLongActionBegin : function ( t , e ) { var i = { id : e , type : t } ; this . stackLongActions . push ( i ) , this . setLongActionView ( i ) } , onLongActionEnd : function ( t , e ) { var i = { id : e , type : t } ; if ( this . stackLongActions . pop ( i
var t = Common . localStorage . getItem ( "pe-settings-coauthmode" ) , e = this . _state . fastCoauth ; this . _state . fastCoauth = null === t || 1 == parseInt ( t ) , this . _state . fastCoauth && ! e && this . synchronizeChanges ( ) } this . appOptions . canForcesave && ( t = Common . localStorage . getItem ( "pe-settings-forcesave" ) , this . appOptions . forcesave = null === t ? this . appOptions . canForcesave : 1 == parseInt ( t ) , this . api . asc _setIsForceSaveOnUserSave ( this . appOptions . forcesave ) ) } , onDocumentName : function ( t ) { this . getApplication ( ) . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) . setDocumentCaption ( t ) , this . updateWindowTitle ( ! 0 ) } , onMeta : function ( t ) { var e = this . getApplication ( ) , i = e . getController ( "LeftMenu" ) . getView ( "LeftMenu" ) . getMenu ( "file" ) ; e . getController ( "Viewport" ) . getView ( "Common.Views.Header" ) . setDocumentCaption ( t . title ) , this . updateWindowTitle ( ! 0 ) , this . document . title = t . title , i . loadDocument ( { doc : this . document } ) , i . panels . info . updateInfo ( this . document ) , Common . Gateway . metaChange ( t ) } , onPrint : function ( ) { this . appOptions . canPrint && ( this . api && this . api . asc _Print ( Common . Utils . isChrome || Common . Utils . isSafari || Common . Utils . isOpera ) , Common . component . Analytics . trackEvent ( "Print" ) ) } , onPrintUrl : function ( t ) { if ( this . iframePrint && ( this . iframePrint . parentNode . removeChild ( this . iframePrint ) , this . iframePrint = null ) , ! this . iframePrint ) { var e = this ; this . iframePrint = document . createElement ( "iframe" ) , this . iframePrint . id = "id-print-frame" , this . iframePrint . style . display = "none" , this . iframePrint . style . visibility = "hidden" , this . iframePrint . style . position = "fixed" , this . iframePrint . style . right = "0" , this . iframePrint . style . bottom = "0" , document . body . appendChild ( this . iframePrint ) , this . iframePrint . onload = function ( ) { e . iframePrint . contentWindow . focus ( ) , e . iframePrint . contentWindow . print ( ) , e . iframePrint . contentWindow . blur ( ) , window . focus ( ) } } t && ( this . iframePrint . src = t ) } , onAdvancedOptions : function ( t ) { var e , i = t . asc _getOptionId ( ) , n = this ; i == Asc . c _oAscAdvancedOptionsID . DRM && ( e = new Common . Views . OpenDialog ( { type : i , handler : function ( t ) { n . isShowOpenDialog = ! 1 , n && n . api && ( n . api . asc _setAdvancedOptions ( i , new Asc . asc _CDRMAdvancedOptions ( t ) ) , n . loadMask && n . loadMask . show ( ) ) } } ) ) , e && ( this . isShowOpenDialog = ! 0 , this . loadMask && this . loadMask . hide ( ) , this . onLongActionEnd ( Asc . c _oAscAsyncActionType . BlockInteraction , LoadingDocument ) , e . show ( ) ) } , requestPlugins : function ( pluginsPath ) { if ( pluginsPath ) { var _createXMLHTTPObject = function ( ) { var t ; try { t = new ActiveXObject ( "Msxml2.XMLHTTP" ) } catch ( e ) { try { t = new ActiveXObject ( "Microsoft.XMLHTTP" ) } catch ( e ) { t = ! 1 } } return t || "undefined" == typeof XMLHttpRequest || ( t = new XMLHttpRequest ) , t } , _getPluginJson = function ( plugin ) { if ( ! plugin ) return "" ; try { var xhrObj = _createXMLHTTPObject ( ) ; if ( xhrObj && plugin ) { xhrObj . open ( "GET" , plugin , ! 1 ) , xhrObj . send ( "" ) ; var pluginJson = eval ( "(" + xhrObj . responseText + ")" ) ; return pluginJson } } catch ( t ) { } return null } , value = _getPluginJson ( pluginsPath ) ; value && this . updatePlugins ( value , ! 1 ) } } , updatePlugins : function ( plugins , uiCustomize ) { if ( plugins ) { var pluginsData = uiCustomize ? plugins . UIpluginsData : plugins . pluginsData ; if ( pluginsData && ! ( pluginsData . length < 1 ) ) { var _createXMLHTTPObject = function ( ) { var t ; try { t = new ActiveXObject ( "Msxml2.XMLHTTP" ) } catch ( e ) { try { t = new ActiveXObject ( "Microsoft.XMLHTTP" ) } catch ( e ) { t = ! 1 } } return t || "undefined" == typeof XMLHttpRequest || ( t = new XMLHttpRequest ) , t } , _getPluginJson = function ( plugin ) { if ( ! plugin ) return "" ; try { var xhrObj = _createXMLHTTPObject ( ) ; if ( xhrObj && plugin ) { xhrObj . open ( "GET" , plugin , ! 1 ) , xhrObj . send ( "" ) ; var pluginJson = eval ( "(" + xhrObj . responseText + ")" ) ; return pluginJson } } catch ( t ) { } return null } , arr = [ ] , baseUrl = _ . isEmpty ( plugins . url ) ? "" : plugins . url ; "" !== baseUrl && console . log ( "Obsolete: The url parameter is deprecated. Please check the documentation for new plugin connection configuration." ) , pluginsData . forEach ( function ( t ) { t = baseUrl + t ; var e = _getPluginJson ( t ) ; e && ( e . baseUrl = t . substring ( 0 , t . lastIndexOf ( "config.json" ) ) , e . oldVersion = "" !== baseUrl , arr . push ( e ) ) } ) , arr . length > 0 && this . updatePluginsList ( { autoStartGuid : plugins . autoStartGuid , pluginsData : arr } , ! ! uiCustomize ) } } } , updatePluginsList : function ( t , e ) { var i = this . getApplication ( ) . getCollection ( "Common.Collections.Plugins" ) , n = this . appOptions . isEdit ; if ( t ) { var o = [ ] , s = [ ]
n . _docAccessDlg . on ( "accessrights" , function ( t , e ) { n . doc . info . sharingSettings = e , n . _ShowHideInfoItem ( "rights" , void 0 !== n . doc . info . sharingSettings && null !== n . doc . info . sharingSettings && n . doc . info . sharingSettings . length > 0 ) , n . cntRights . html ( n . templateRights ( { users : n . doc . info . sharingSettings } ) ) } ) . on ( "close" , function ( t ) { n . _docAccessDlg = void 0 } ) , n . _docAccessDlg . show ( ) } } , onLostEditRights : function ( ) { this . _readonlyRights = ! 0 , this . rendered && this . _ShowHideInfoItem ( "edit-rights" , ! 1 ) } , txtRights : "Persons who have rights" , txtBtnAccessRights : "Change access rights" } , PE . Views . FileMenuPanels . DocumentRights || { } ) ) , PE . Views . FileMenuPanels . Help = Common . UI . BaseView . extend ( { el : "#panel-help" , menu : void 0 , template : _ . template ( [ '<div style="width:100%; height:100%; position: relative;">' , '<div id="id-help-contents" style="position: absolute; width:200px; top: 0; bottom: 0;" class="no-padding"></div>' , '<div id="id-help-frame" style="position: absolute; left: 200px; top: 0; right: 0; bottom: 0;" class="no-padding"></div>' , "</div>" ] . join ( "" ) ) , initialize : function ( t ) { Common . UI . BaseView . prototype . initialize . call ( this , arguments ) , this . menu = t . menu , this . urlPref = "resources/help/en/" , this . en _data = [ { src : "UsageInstructions/SetPageParameters.htm" , name : "Set page parameters" , headername : "Usage Instructions" } , { src : "UsageInstructions/CopyPasteUndoRedo.htm" , name : "Copy/paste text passages, undo/redo your actions" } , { src : "UsageInstructions/LineSpacing.htm" , name : "Set paragraph line spacing" } , { src : "UsageInstructions/CopyClearFormatting.htm" , name : "Copy/clear text formatting" } , { src : "UsageInstructions/CreateLists.htm" , name : "Create lists" } , { src : "UsageInstructions/InsertImages.htm" , name : "Insert images" } , { src : "UsageInstructions/ViewDocInfo.htm" , name : "View document information" } , { src : "UsageInstructions/SavePrintDownload.htm" , name : "Save/print/download your document" } , { src : "UsageInstructions/OpenCreateNew.htm" , name : "Create a new document or open an existing one" } , { src : "HelpfulHints/About.htm" , name : "About ONLYOFFICE Document Editor" , headername : "Helpful Hints" } , { src : "HelpfulHints/SupportedFormats.htm" , name : "Supported Formats of Electronic Documents" } , { src : "HelpfulHints/Navigation.htm" , name : "Navigation through Your Document" } , { src : "HelpfulHints/Search.htm" , name : "Search Function" } , { src : "HelpfulHints/KeyboardShortcuts.htm" , name : "Keyboard Shortcuts" } ] , Common . Utils . isIE && ( window . onhelp = function ( ) { return ! 1 } ) } , render : function ( ) { var t = this ; return $ ( this . el ) . html ( this . template ( ) ) , this . viewHelpPicker = new Common . UI . DataView ( { el : $ ( "#id-help-contents" ) , store : new Common . UI . DataViewStore ( [ ] ) , keyMoveDirection : "vertical" , itemTemplate : _ . template ( [ '<div id="<%= id %>" class="help-item-wrap">' , '<div class="caption"><%= name %></div>' , "</div>" ] . join ( "" ) ) } ) , this . viewHelpPicker . on ( "item:add" , function ( t , e , i ) { i . has ( "headername" ) && $ ( e . el ) . before ( '<div class="header-name">' + i . get ( "headername" ) + "</div>" ) } ) , this . viewHelpPicker . on ( "item:select" , function ( e , i , n ) { t . iFrame . src = t . urlPref + n . get ( "src" ) } ) , this . iFrame = document . createElement ( "iframe" ) , this . iFrame . src = "" , this . iFrame . align = "top" , this . iFrame . frameBorder = "0" , this . iFrame . width = "100%" , this . iFrame . height = "100%" , Common . Gateway . on ( "internalcommand" , function ( e ) { if ( "help:hyperlink" == e . type ) { var i = e . data , n = t . viewHelpPicker . store . find ( function ( t ) { return i . indexOf ( t . get ( "src" ) ) > 0 } ) ; n && ( t . viewHelpPicker . selectRecord ( n , ! 0 ) , t . viewHelpPicker . scrollToRecord ( n ) ) } } ) , $ ( "#id-help-frame" ) . append ( this . iFrame ) , this } , setLangConfig : function ( t ) { var e = this , i = this . viewHelpPicker . store ; if ( t ) { t = t . split ( "-" ) [ 0 ] ; var n = { dataType : "json" , error : function ( ) { e . urlPref . indexOf ( "resources/help/en/" ) < 0 ? ( e . urlPref = "resources/help/en/" , i . url = "resources/help/en/Contents.json" , i . fetch ( n ) ) : ( e . urlPref = "resources/help/en/" , i . reset ( e . en _data ) ) } , success : function ( ) { var t = i . at ( 0 ) ; e . viewHelpPicker . selectRecord ( t ) , e . iFrame . src = e . urlPref + t . get ( "src" ) } } ; i . url = "resources/help/" + t + "/Contents.json" , i . fetch ( n ) , this . urlPref = "resources/help/" + t + "/" } } , show : function ( ) { Common . UI . BaseView . prototype . show . call ( this ) , this . _scrollerInited || ( this . viewHelpPicker . scroller . update ( ) , this . _scrollerInited = ! 0 ) } } ) } ) , void 0 === Common ) var Common = { } ; i
size : [ 800 , 600 ] , initOnSelectionChanged : ! 1 } } } ) , Common . Models . Plugin = e . Model . extend ( { defaults : function ( ) { return { id : Common . UI . getId ( ) , name : "" , baseUrl : "" , guid : Common . UI . getId ( ) , variations : [ ] , currentVariation : 0 , pluginObj : void 0 , allowSelected : ! 1 , selected : ! 1 } } } ) } ) , void 0 === Common ) var Common = { } ; if ( Common . Collections = Common . Collections || { } , define ( "common/main/lib/collection/Plugins" , [ "underscore" , "backbone" , "common/main/lib/model/Plugin" ] , function ( t , e ) { "use strict" ; Common . Collections . Plugins = e . Collection . extend ( { model : Common . Models . Plugin } ) } ) , define ( "common/main/lib/controller/Plugins" , [ "core" , "common/main/lib/collection/Plugins" , "common/main/lib/view/Plugins" ] , function ( ) { "use strict" ; Common . Controllers . Plugins = Backbone . Controller . extend ( _ . extend ( { models : [ ] , collections : [ "Common.Collections.Plugins" ] , views : [ "Common.Views.Plugins" ] , initialize : function ( ) { } , events : function ( ) { return { "click #id-plugin-close" : _ . bind ( this . onToolClose , this ) } } , onLaunch : function ( ) { this . panelPlugins = this . createView ( "Common.Views.Plugins" , { storePlugins : this . getApplication ( ) . getCollection ( "Common.Collections.Plugins" ) } ) , this . panelPlugins . on ( "render:after" , _ . bind ( this . onAfterRender , this ) ) , this . _moveOffset = { x : 0 , y : 0 } } , setApi : function ( t ) { return this . api = t , this . api . asc _registerCallback ( "asc_onPluginShow" , _ . bind ( this . onPluginShow , this ) ) , this . api . asc _registerCallback ( "asc_onPluginClose" , _ . bind ( this . onPluginClose , this ) ) , this . api . asc _registerCallback ( "asc_onPluginResize" , _ . bind ( this . onPluginResize , this ) ) , this . api . asc _registerCallback ( "asc_onPluginMouseUp" , _ . bind ( this . onPluginMouseUp , this ) ) , this . api . asc _registerCallback ( "asc_onPluginMouseMove" , _ . bind ( this . onPluginMouseMove , this ) ) , this } , setMode : function ( t ) { t . canPlugins && this . updatePluginsList ( ) } , onAfterRender : function ( t ) { t . viewPluginsList . on ( "item:click" , _ . bind ( this . onSelectPlugin , this ) ) , this . bindViewEvents ( this . panelPlugins , this . events ) ; var e = this ; Common . NotificationCenter . on ( { "layout:resizestart" : function ( t ) { if ( e . panelPlugins . isVisible ( ) ) { var i = e . panelPlugins . currentPluginFrame . offset ( ) ; e . _moveOffset = { x : i . left + parseInt ( e . panelPlugins . currentPluginFrame . css ( "padding-left" ) ) , y : i . top + parseInt ( e . panelPlugins . currentPluginFrame . css ( "padding-top" ) ) } , e . api . asc _pluginEnableMouseEvents ( ! 0 ) } } , "layout:resizestop" : function ( t ) { e . panelPlugins . isVisible ( ) && e . api . asc _pluginEnableMouseEvents ( ! 1 ) } } ) } , updatePluginsList : function ( ) { var t = this . getApplication ( ) . getCollection ( "Common.Collections.Plugins" ) , e = [ ] ; t . each ( function ( t ) { var i = new Asc . CPlugin ; i . set _Name ( t . get ( "name" ) ) , i . set _Guid ( t . get ( "guid" ) ) , i . set _BaseUrl ( t . get ( "baseUrl" ) ) ; var n = t . get ( "variations" ) , o = [ ] ; n . forEach ( function ( t ) { var e = new Asc . CPluginVariation ; e . set _Description ( t . get ( "description" ) ) , e . set _Url ( t . get ( "url" ) ) , e . set _Icons ( t . get ( "icons" ) ) , e . set _Visual ( t . get ( "isVisual" ) ) , e . set _Viewer ( t . get ( "isViewer" ) ) , e . set _EditorsSupport ( t . get ( "EditorsSupport" ) ) , e . set _Modal ( t . get ( "isModal" ) ) , e . set _InsideMode ( t . get ( "isInsideMode" ) ) , e . set _InitDataType ( t . get ( "initDataType" ) ) , e . set _InitData ( t . get ( "initData" ) ) , e . set _UpdateOleOnResize ( t . get ( "isUpdateOleOnResize" ) ) , e . set _Buttons ( t . get ( "buttons" ) ) , e . set _Size ( t . get ( "size" ) ) , e . set _InitOnSelectionChanged ( t . get ( "initOnSelectionChanged" ) ) , o . push ( e ) } ) , i . set _Variations ( o ) , t . set ( "pluginObj" , i ) , e . push ( i ) } ) , this . api . asc _pluginsRegister ( "" , e ) } , onSelectPlugin : function ( t , e , i , n ) { var o = $ ( n . target ) ; if ( o && o . hasClass ( "plugin-caret" ) ) { var s = this . panelPlugins . pluginMenu ; if ( s . isVisible ( ) ) return void s . hide ( ) ; var a , r = this , l = $ ( n . currentTarget ) , c = $ ( this . panelPlugins . el ) , h = l . offset ( ) , d = c . offset ( ) ; if ( a = [ h . left - d . left + l . width ( ) , h . top - d . top + l . height ( ) / 2 ] , void 0 != i ) { for ( var p = 0 ; p < s . items . length ; p ++ ) s . removeItem ( s . items [ p ] ) , p -- ; s . removeAll ( ) ; for ( var u = i . get ( "variations" ) , p = 0 ; p < u . length ; p ++ ) { var m = u [ p ] , g = new Common . UI . MenuItem ( { caption : p > 0 ? m . get ( "description" ) : r . panelPlugins . textStart , value : parseInt ( m . get ( "index" ) ) } ) . on ( "click" , function ( t , e ) { r . api && r . api . asc _pluginRun ( i . get ( "guid" ) , t . value , "" ) } ) ; s . addItem ( g ) } } var f = c . find ( "#menu-plugin-container" ) ; s . rendered || ( f . length < 1 && ( f = $ ( ' < div id = "menu-plugin-container" style = "position: absolute; z-index: 10000;" > < div class = " dropdown - toggle