1
1
var domdiff = ( function ( ) {
2
2
'use strict' ;
3
3
4
- var iOF = [ ] . indexOf ;
4
+ var _ref = [ ] ,
5
+ indexOf = _ref . indexOf ;
6
+
5
7
var append = function append ( get , parent , children , start , end , before ) {
6
8
var isSelect = 'selectedIndex' in parent ;
7
9
var noSelection = isSelect ;
@@ -13,7 +15,7 @@ var domdiff = (function () {
13
15
if ( isSelect && noSelection && child . selected ) {
14
16
noSelection = ! noSelection ;
15
17
var selectedIndex = parent . selectedIndex ;
16
- parent . selectedIndex = selectedIndex < 0 ? start : iOF . call ( parent . querySelectorAll ( 'option' ) , child ) ;
18
+ parent . selectedIndex = selectedIndex < 0 ? start : indexOf . call ( parent . querySelectorAll ( 'option' ) , child ) ;
17
19
}
18
20
19
21
start ++ ;
@@ -25,7 +27,7 @@ var domdiff = (function () {
25
27
var identity = function identity ( O ) {
26
28
return O ;
27
29
} ;
28
- var indexOf = function indexOf ( moreNodes , moreStart , moreEnd , lessNodes , lessStart , lessEnd , compare ) {
30
+ var indexOf$1 = function indexOf ( moreNodes , moreStart , moreEnd , lessNodes , lessStart , lessEnd , compare ) {
29
31
var length = lessEnd - lessStart ;
30
32
/* istanbul ignore if */
31
33
@@ -339,7 +341,7 @@ var domdiff = (function () {
339
341
var i = - 1 ; // 2 simple indels: the shortest sequence is a subsequence of the longest
340
342
341
343
if ( currentChanges < futureChanges ) {
342
- i = indexOf ( futureNodes , futureStart , futureEnd , currentNodes , currentStart , currentEnd , compare ) ; // inner diff
344
+ i = indexOf$1 ( futureNodes , futureStart , futureEnd , currentNodes , currentStart , currentEnd , compare ) ; // inner diff
343
345
344
346
if ( - 1 < i ) {
345
347
append ( get , parentNode , futureNodes , futureStart , i , get ( currentNodes [ currentStart ] , 0 ) ) ;
@@ -349,7 +351,7 @@ var domdiff = (function () {
349
351
}
350
352
/* istanbul ignore else */
351
353
else if ( futureChanges < currentChanges ) {
352
- i = indexOf ( currentNodes , currentStart , currentEnd , futureNodes , futureStart , futureEnd , compare ) ; // outer diff
354
+ i = indexOf$1 ( currentNodes , currentStart , currentEnd , futureNodes , futureStart , futureEnd , compare ) ; // outer diff
353
355
354
356
if ( - 1 < i ) {
355
357
remove ( get , currentNodes , currentStart , i ) ;
0 commit comments