WordPress.org

Plugin Directory

Changeset 578853


Ignore:
Timestamp:
07/29/12 21:12:43 (21 months ago)
Author:
TobiasBg
Message:

Updated to a new alpha version 0.2-alpha. Use at your own risk. No support will be provided!

Location:
tablepress/trunk
Files:
48 added
35 deleted
30 edited
1 copied

Legend:

Unmodified
Added
Removed
  • tablepress/trunk/admin/add.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "Add New" screen 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/codemirror.dev.css

    r558089 r578853  
    22  line-height: 1em; 
    33  font-family: monospace; 
     4 
     5  /* Necessary so the scrollbar can be absolutely positioned within the wrapper on Lion. */ 
     6  position: relative; 
     7  /* This prevents unwanted scrollbars from showing up on the body and wrapper in IE. */ 
     8  overflow: hidden; 
    49} 
    510 
    611.CodeMirror-scroll { 
    7   overflow: auto; 
     12  overflow-x: auto; 
     13  overflow-y: hidden; 
    814  height: 300px; 
    915  /* This is needed to prevent an IE[67] bug where the scrolled content 
     
    1117  position: relative; 
    1218  outline: none; 
     19} 
     20 
     21/* Vertical scrollbar */ 
     22.CodeMirror-scrollbar { 
     23  float: right; 
     24  overflow-x: hidden; 
     25  overflow-y: scroll; 
     26 
     27  /* This corrects for the 1px gap introduced to the left of the scrollbar 
     28     by the rule for .CodeMirror-scrollbar-inner. */ 
     29  margin-left: -1px; 
     30} 
     31.CodeMirror-scrollbar-inner { 
     32  /* This needs to have a nonzero width in order for the scrollbar to appear 
     33     in Firefox and IE9. */ 
     34  width: 1px; 
     35} 
     36.CodeMirror-scrollbar.cm-sb-overlap { 
     37  /* Ensure that the scrollbar appears in Lion, and that it overlaps the content 
     38     rather than sitting to the right of it. */ 
     39  position: absolute; 
     40  z-index: 1; 
     41  float: none; 
     42  right: 0; 
     43  min-width: 12px; 
     44} 
     45.CodeMirror-scrollbar.cm-sb-nonoverlap { 
     46  min-width: 12px; 
     47} 
     48.CodeMirror-scrollbar.cm-sb-ie7 { 
     49  min-width: 18px; 
    1350} 
    1451 
     
    2663  padding: .4em .2em .4em .4em; 
    2764  white-space: pre !important; 
     65  cursor: default; 
    2866} 
    2967.CodeMirror-lines { 
    3068  padding: .4em; 
    3169  white-space: pre; 
     70  cursor: text; 
     71} 
     72.CodeMirror-lines * { 
     73  /* Necessary for throw-scrolling to decelerate properly on Safari. */ 
     74  pointer-events: none; 
    3275} 
    3376 
     
    127170 
    128171/* CodeMirror Styling for TablePress page/customizations compared to original CSS in this file */ 
    129 #tablepress-page .CodeMirror { 
     172#tablepress-page .CodeMirror-scroll { 
    130173    background-color: #ffffff; 
    131174    border-color: #dfdfdf; 
  • tablepress/trunk/admin/codemirror.dev.js

    r558089 r578853  
    1 // CodeMirror version 2.25 
     1// CodeMirror version 2.32 
    22// 
    33// All functions that need access to the editor's state live inside 
     
    2424        '<textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" ' + 
    2525          'autocorrect="off" autocapitalize="off"></textarea></div>' + 
     26      '<div class="CodeMirror-scrollbar">' + // The vertical scrollbar. Horizontal scrolling is handled by the scroller itself. 
     27        '<div class="CodeMirror-scrollbar-inner">' + // The empty scrollbar content, used solely for managing the scrollbar thumb. 
     28      '</div></div>' + // This must be before the scroll area because it's float-right. 
    2629      '<div class="CodeMirror-scroll" tabindex="-1">' + 
    2730        '<div style="position: relative">' + // Set to the height of the text, causes scrolling 
     
    3033            // Provides positioning relative to (visible) text origin 
    3134            '<div class="CodeMirror-lines"><div style="position: relative; z-index: 0">' + 
    32               '<div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div>' + 
     35              // Used to measure text size 
     36              '<div style="position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden;"></div>' + 
    3337              '<pre class="CodeMirror-cursor">&#160;</pre>' + // Absolutely positioned blinky cursor 
     38              '<pre class="CodeMirror-cursor" style="visibility: hidden">&#160;</pre>' + // Used to force a width 
    3439              '<div style="position: relative; z-index: -1"></div><div></div>' + // DIVs containing the selection and the actual code 
    3540            '</div></div></div></div></div>'; 
     
    4045        mover = code.firstChild, gutter = mover.firstChild, gutterText = gutter.firstChild, 
    4146        lineSpace = gutter.nextSibling.firstChild, measure = lineSpace.firstChild, 
    42         cursor = measure.nextSibling, selectionDiv = cursor.nextSibling, 
    43         lineDiv = selectionDiv.nextSibling; 
     47        cursor = measure.nextSibling, widthForcer = cursor.nextSibling, 
     48        selectionDiv = widthForcer.nextSibling, lineDiv = selectionDiv.nextSibling, 
     49        scrollbar = inputDiv.nextSibling, scrollbarInner = scrollbar.firstChild; 
    4450    themeChanged(); keyMapChanged(); 
    4551    // Needed to hide big blue blinking cursor on Mobile Safari 
    4652    if (ios) input.style.width = "0px"; 
    47     if (!webkit) lineSpace.draggable = true; 
     53    if (!webkit) scroller.draggable = true; 
    4854    lineSpace.style.outline = "none"; 
    4955    if (options.tabindex != null) input.tabIndex = options.tabindex; 
     
    5258    // Needed to handle Tab key in KHTML 
    5359    if (khtml) inputDiv.style.height = "1px", inputDiv.style.position = "absolute"; 
     60 
     61    // Check for OS X >= 10.7. If so, we need to force a width on the scrollbar, and 
     62    // make it overlap the content. (But we only do this if the scrollbar doesn't already 
     63    // have a natural width. If the mouse is plugged in or the user sets the system pref 
     64    // to always show scrollbars, the scrollbar shouldn't overlap.) 
     65    if (mac_geLion) { 
     66      scrollbar.className += (overlapScrollbars() ? " cm-sb-overlap" : " cm-sb-nonoverlap"); 
     67    } else if (ie_lt8) { 
     68      // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). 
     69      scrollbar.className += " cm-sb-ie7"; 
     70    } 
    5471 
    5572    // Check for problem with IE innerHTML not working when we have a 
     
    7693    // Selection-related flags. shiftSelecting obviously tracks 
    7794    // whether the user is holding shift. 
    78     var shiftSelecting, lastClick, lastDoubleClick, lastScrollPos = 0, draggingText, 
     95    var shiftSelecting, lastClick, lastDoubleClick, lastScrollTop = 0, lastScrollLeft = 0, draggingText, 
    7996        overwrite = false, suppressEdits = false; 
    8097    // Variables used by startOperation/endOperation to track what 
    8198    // happened during the operation. 
    8299    var updateInput, userSelChange, changes, textChanged, selectionChanged, leaveInputAlone, 
    83         gutterDirty, callbacks, maxLengthChanged; 
     100        gutterDirty, callbacks; 
    84101    // Current visible range (may be bigger than the view window). 
    85102    var displayOffset = 0, showingFrom = 0, showingTo = 0, lastSizeC = 0; 
     
    89106    // Tracks the maximum line length so that the horizontal scrollbar 
    90107    // can be kept static when scrolling. 
    91     var maxLine = "", maxWidth; 
     108    var maxLine = "", updateMaxLine = false, maxLineChanged = true; 
    92109    var tabCache = {}; 
    93110 
     
    104121    // handled in onMouseDown for Gecko. 
    105122    if (!gecko) connect(scroller, "contextmenu", onContextMenu); 
    106     connect(scroller, "scroll", function() { 
    107       lastScrollPos = scroller.scrollTop; 
    108       updateDisplay([]); 
    109       if (options.fixedGutter) gutter.style.left = scroller.scrollLeft + "px"; 
    110       if (options.onScroll) options.onScroll(instance); 
    111     }); 
     123    connect(scroller, "scroll", onScroll); 
     124    connect(scrollbar, "scroll", onScroll); 
     125    connect(scrollbar, "mousedown", function() {if (focused) setTimeout(focusInput, 0);}); 
     126    connect(scroller, "mousewheel", onMouseWheel); 
     127    connect(scroller, "DOMMouseScroll", onMouseWheel); 
    112128    connect(window, "resize", function() {updateDisplay(true);}); 
    113129    connect(input, "keyup", operation(onKeyUp)); 
     
    119135 
    120136    if (options.dragDrop) { 
    121       connect(lineSpace, "dragstart", onDragStart); 
     137      connect(scroller, "dragstart", onDragStart); 
    122138      function drag_(e) { 
    123139        if (options.onDragEvent && options.onDragEvent(instance, addStop(e))) return; 
     
    186202      historySize: function() {return {undo: history.done.length, redo: history.undone.length};}, 
    187203      clearHistory: function() {history = new History();}, 
     204      setHistory: function(histData) { 
     205        history = new History(); 
     206        history.done = histData.done; 
     207        history.undone = histData.undone; 
     208      }, 
     209      getHistory: function() { 
     210        history.time = 0; 
     211        return {done: history.done.concat([]), undone: history.undone.concat([])}; 
     212      }, 
    188213      matchBrackets: operation(function(){matchBrackets(true);}), 
    189214      getTokenAt: operation(function(pos) { 
     
    277302      }), 
    278303      replaceRange: operation(replaceRange), 
    279       getRange: function(from, to) {return getRange(clipPos(from), clipPos(to));}, 
     304      getRange: function(from, to, lineSep) {return getRange(clipPos(from), clipPos(to), lineSep);}, 
    280305 
    281306      triggerOnKeyDown: operation(onKeyDown), 
     
    315340      scrollTo: function(x, y) { 
    316341        if (x != null) scroller.scrollLeft = x; 
    317         if (y != null) scroller.scrollTop = y; 
     342        if (y != null) scrollbar.scrollTop = y; 
    318343        updateDisplay([]); 
     344      }, 
     345      getScrollInfo: function() { 
     346        return {x: scroller.scrollLeft, y: scrollbar.scrollTop, 
     347                height: scrollbar.scrollHeight, width: scroller.scrollWidth}; 
     348      }, 
     349      setSize: function(width, height) { 
     350        function interpret(val) { 
     351          val = String(val); 
     352          return /^\d+$/.test(val) ? val + "px" : val; 
     353        } 
     354        if (width != null) wrapper.style.width = interpret(width); 
     355        if (height != null) scroller.style.height = interpret(height); 
    319356      }, 
    320357 
     
    322359      compoundChange: function(f){return compoundChange(f);}, 
    323360      refresh: function(){ 
    324         updateDisplay(true); 
    325         if (scroller.scrollHeight > lastScrollPos) 
    326           scroller.scrollTop = lastScrollPos; 
     361        updateDisplay(true, null, lastScrollTop); 
     362        if (scrollbar.scrollHeight > lastScrollTop) 
     363          scrollbar.scrollTop = lastScrollTop; 
    327364      }, 
    328365      getInputField: function(){return input;}, 
     
    345382      updateInput = true; 
    346383    } 
    347     function getValue() { 
     384    function getValue(lineSep) { 
    348385      var text = []; 
    349386      doc.iter(0, doc.size, function(line) { text.push(line.text); }); 
    350       return text.join("\n"); 
     387      return text.join(lineSep || "\n"); 
     388    } 
     389 
     390    function onScroll(e) { 
     391      if (scroller.scrollTop) { 
     392        scrollbar.scrollTop += scroller.scrollTop; 
     393        scroller.scrollTop = 0; 
     394      } 
     395      if (lastScrollTop != scrollbar.scrollTop || lastScrollLeft != scroller.scrollLeft) { 
     396        lastScrollTop = scrollbar.scrollTop; 
     397        lastScrollLeft = scroller.scrollLeft; 
     398        updateDisplay([]); 
     399        if (options.fixedGutter) gutter.style.left = scroller.scrollLeft + "px"; 
     400        if (options.onScroll) options.onScroll(instance); 
     401      } 
    351402    } 
    352403 
     
    369420      switch (e_button(e)) { 
    370421      case 3: 
    371         if (gecko && !mac) onContextMenu(e); 
     422        if (gecko) onContextMenu(e); 
    372423        return; 
    373424      case 2: 
    374425        if (start) setCursor(start.line, start.ch, true); 
    375426        setTimeout(focusInput, 20); 
     427        e_preventDefault(e); 
    376428        return; 
    377429      } 
     
    383435      if (!focused) onFocus(); 
    384436 
    385       var now = +new Date; 
     437      var now = +new Date, type = "single"; 
    386438      if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) { 
     439        type = "triple"; 
    387440        e_preventDefault(e); 
    388441        setTimeout(focusInput, 20); 
    389         return selectLine(start.line); 
     442        selectLine(start.line); 
    390443      } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) { 
     444        type = "double"; 
    391445        lastDoubleClick = {time: now, pos: start}; 
    392446        e_preventDefault(e); 
    393         return selectWordAt(start); 
     447        var word = findWordAt(start); 
     448        setSelectionUser(word.from, word.to); 
    394449      } else { lastClick = {time: now, pos: start}; } 
    395450 
    396451      var last = start, going; 
    397452      if (options.dragDrop && dragAndDrop && !options.readOnly && !posEq(sel.from, sel.to) && 
    398           !posLess(start, sel.from) && !posLess(sel.to, start)) { 
     453          !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") { 
    399454        // Let the drag handler handle this. 
    400         if (webkit) lineSpace.draggable = true; 
     455        if (webkit) scroller.draggable = true; 
    401456        function dragEnd(e2) { 
    402           if (webkit) lineSpace.draggable = false; 
     457          if (webkit) scroller.draggable = false; 
    403458          draggingText = false; 
    404459          up(); drop(); 
     
    413468        draggingText = true; 
    414469        // IE's approach to draggable 
    415         if (lineSpace.dragDrop) lineSpace.dragDrop(); 
     470        if (scroller.dragDrop) scroller.dragDrop(); 
    416471        return; 
    417472      } 
    418473      e_preventDefault(e); 
    419       setCursor(start.line, start.ch, true); 
     474      if (type == "single") setCursor(start.line, start.ch, true); 
     475 
     476      var startstart = sel.from, startend = sel.to; 
     477 
     478      function doSelect(cur) { 
     479        if (type == "single") { 
     480          setSelectionUser(start, cur); 
     481        } else if (type == "double") { 
     482          var word = findWordAt(cur); 
     483          if (posLess(cur, startstart)) setSelectionUser(word.from, startend); 
     484          else setSelectionUser(startstart, word.to); 
     485        } else if (type == "triple") { 
     486          if (posLess(cur, startstart)) setSelectionUser(startend, clipPos({line: cur.line, ch: 0})); 
     487          else setSelectionUser(startstart, clipPos({line: cur.line + 1, ch: 0})); 
     488        } 
     489      } 
    420490 
    421491      function extend(e) { 
     
    424494          if (!focused) onFocus(); 
    425495          last = cur; 
    426           setSelectionUser(start, cur); 
     496          doSelect(cur); 
    427497          updateInput = false; 
    428498          var visible = visibleLines(); 
     
    435505        clearTimeout(going); 
    436506        var cur = posFromMouse(e); 
    437         if (cur) setSelectionUser(start, cur); 
     507        if (cur) doSelect(cur); 
    438508        e_preventDefault(e); 
    439509        focusInput(); 
     
    452522      for (var n = e_target(e); n != wrapper; n = n.parentNode) 
    453523        if (n.parentNode == gutterText) return e_preventDefault(e); 
    454       var start = posFromMouse(e); 
    455       if (!start) return; 
    456       lastDoubleClick = {time: +new Date, pos: start}; 
    457524      e_preventDefault(e); 
    458       selectWordAt(start); 
    459525    } 
    460526    function onDrop(e) { 
     
    480546        var n = files.length, text = Array(n), read = 0; 
    481547        for (var i = 0; i < n; ++i) loadFile(files[i], i); 
    482       } 
    483       else { 
     548      } else { 
     549        // Don't do a replace if the drop happened inside of the selected text. 
     550        if (draggingText && !(posLess(pos, sel.from) || posLess(sel.to, pos))) return; 
    484551        try { 
    485552          var text = e.dataTransfer.getData("Text"); 
     
    500567      var txt = getSelection(); 
    501568      e.dataTransfer.setData("Text", txt); 
    502        
     569 
    503570      // Use dummy image instead of default browsers image. 
    504       if (gecko || chrome) { 
     571      if (gecko || chrome || opera) { 
    505572        var img = document.createElement('img'); 
    506573        img.scr = 'data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs='; //1x1 image 
     
    585652      // First give onKeyEvent option a chance to handle this. 
    586653      var handled = handleKeyBinding(e); 
    587       if (window.opera) { 
     654      if (opera) { 
    588655        lastStoppedKey = handled ? code : null; 
    589656        // Opera has no cut event... we try to at least catch the key combo 
     
    596663      if (options.onKeyEvent && options.onKeyEvent(instance, addStop(e))) return; 
    597664      var keyCode = e_prop(e, "keyCode"), charCode = e_prop(e, "charCode"); 
    598       if (window.opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} 
    599       if (((window.opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return; 
     665      if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} 
     666      if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(e)) return; 
    600667      var ch = String.fromCharCode(charCode == null ? keyCode : charCode); 
    601668      if (options.electricChars && mode.electricChars && options.smartIndent && !options.readOnly) { 
     
    616683        if (options.onFocus) options.onFocus(instance); 
    617684        focused = true; 
    618         if (wrapper.className.search(/\bCodeMirror-focused\b/) == -1) 
    619           wrapper.className += " CodeMirror-focused"; 
     685        if (scroller.className.search(/\bCodeMirror-focused\b/) == -1) 
     686          scroller.className += " CodeMirror-focused"; 
    620687        if (!leaveInputAlone) resetInput(true); 
    621688      } 
     
    631698            if (bracketHighlighted) { bracketHighlighted(); bracketHighlighted = null; } 
    632699          })(); 
    633         wrapper.className = wrapper.className.replace(" CodeMirror-focused", ""); 
     700        scroller.className = scroller.className.replace(" CodeMirror-focused", ""); 
    634701      } 
    635702      clearInterval(blinker); 
    636703      setTimeout(function() {if (!focused) shiftSelecting = null;}, 150); 
     704    } 
     705 
     706    function chopDelta(delta) { 
     707      // Make sure we always scroll a little bit for any nonzero delta. 
     708      if (delta > 0.0 && delta < 1.0) return 1; 
     709      else if (delta > -1.0 && delta < 0.0) return -1; 
     710      else return Math.round(delta); 
     711    } 
     712 
     713    function onMouseWheel(e) { 
     714      var deltaX = 0, deltaY = 0; 
     715      if (e.type == "DOMMouseScroll") { // Firefox 
     716        var delta = -e.detail * 8.0; 
     717        if (e.axis == e.HORIZONTAL_AXIS) deltaX = delta; 
     718        else if (e.axis == e.VERTICAL_AXIS) deltaY = delta; 
     719      } else if (e.wheelDeltaX !== undefined && e.wheelDeltaY !== undefined) { // WebKit 
     720        deltaX = e.wheelDeltaX / 3.0; 
     721        deltaY = e.wheelDeltaY / 3.0; 
     722      } else if (e.wheelDelta !== undefined) { // IE or Opera 
     723        deltaY = e.wheelDelta / 3.0; 
     724      } 
     725 
     726      var scrolled = false; 
     727      deltaX = chopDelta(deltaX); 
     728      deltaY = chopDelta(deltaY); 
     729      if ((deltaX > 0 && scroller.scrollLeft > 0) || 
     730          (deltaX < 0 && scroller.scrollLeft + scroller.clientWidth < scroller.scrollWidth)) { 
     731        scroller.scrollLeft -= deltaX; 
     732        scrolled = true; 
     733      } 
     734      if ((deltaY > 0 && scrollbar.scrollTop > 0) || 
     735          (deltaY < 0 && scrollbar.scrollTop + scrollbar.clientHeight < scrollbar.scrollHeight)) { 
     736        scrollbar.scrollTop -= deltaY; 
     737        scrolled = true; 
     738      } 
     739      if (scrolled) e_stop(e); 
    637740    } 
    638741 
     
    657760        doc.iter(change.start, end, function(line) { replaced.push(line.text); }); 
    658761        out.push({start: change.start, added: change.old.length, old: replaced}); 
    659         var pos = clipPos({line: change.start + change.old.length - 1, 
    660                            ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])}); 
     762        var pos = {line: change.start + change.old.length - 1, 
     763                   ch: editEnd(replaced[replaced.length-1], change.old[change.old.length-1])}; 
    661764        updateLinesNoUndo({line: change.start, ch: 0}, {line: end - 1, ch: getLine(end-1).text.length}, change.old, pos, pos); 
    662765      } 
     
    729832          var l = line.text; 
    730833          if (!line.hidden && l.length > maxLineLength) { 
    731             maxLine = l; maxLineLength = l.length; maxWidth = null; 
     834            maxLine = l; maxLineLength = l.length; maxLineChanged = true; 
    732835            recomputeMaxLength = false; 
    733836          } 
    734837        }); 
    735         if (recomputeMaxLength) maxLengthChanged = true; 
     838        if (recomputeMaxLength) updateMaxLine = true; 
    736839      } 
    737840 
     
    759862      // Update the selection 
    760863      function updateLine(n) {return n <= Math.min(to.line, to.line + lendiff) ? n : n + lendiff;} 
    761       setSelection(selFrom, selTo, updateLine(sel.from.line), updateLine(sel.to.line)); 
    762  
    763       // Make sure the scroll-size div has the correct height. 
    764       if (scroller.clientHeight) 
    765         code.style.height = (doc.height * textHeight() + 2 * paddingTop()) + "px"; 
    766     } 
    767      
     864      setSelection(clipPos(selFrom), clipPos(selTo), 
     865                   updateLine(sel.from.line), updateLine(sel.to.line)); 
     866    } 
     867 
     868    function needsScrollbar() { 
     869      var realHeight = doc.height * textHeight() + 2 * paddingTop(); 
     870      return realHeight - 1 > scroller.offsetHeight ? realHeight : false; 
     871    } 
     872 
     873    function updateVerticalScroll(scrollTop) { 
     874      var scrollHeight = needsScrollbar(); 
     875      scrollbar.style.display = scrollHeight ? "block" : "none"; 
     876      if (scrollHeight) { 
     877        scrollbarInner.style.height = scrollHeight + "px"; 
     878        scrollbar.style.height = scroller.offsetHeight + "px"; 
     879        if (scrollTop != null) scrollbar.scrollTop = scrollTop; 
     880      } 
     881      // Position the mover div to align with the current virtual scroll position 
     882      mover.style.top = (displayOffset * textHeight() - scrollbar.scrollTop) + "px"; 
     883    } 
     884 
     885    // On Mac OS X Lion and up, detect whether the mouse is plugged in by measuring 
     886    // the width of a div with a scrollbar in it. If the width is <= 1, then 
     887    // the mouse isn't plugged in and scrollbars should overlap the content. 
     888    function overlapScrollbars() { 
     889      var tmpSb = document.createElement('div'), 
     890          tmpSbInner = document.createElement('div'); 
     891      tmpSb.className = "CodeMirror-scrollbar"; 
     892      tmpSb.style.cssText = "position: absolute; left: -9999px; height: 100px;"; 
     893      tmpSbInner.className = "CodeMirror-scrollbar-inner"; 
     894      tmpSbInner.style.height = "200px"; 
     895      tmpSb.appendChild(tmpSbInner); 
     896 
     897      document.body.appendChild(tmpSb); 
     898      var result = (tmpSb.offsetWidth <= 1); 
     899      document.body.removeChild(tmpSb); 
     900      return result; 
     901    } 
     902 
    768903    function computeMaxLength() { 
    769       var maxLineLength = 0;  
    770       maxLine = ""; maxWidth = null; 
     904      var maxLineLength = 0; 
     905      maxLine = ""; maxLineChanged = true; 
    771906      doc.iter(0, doc.size, function(line) { 
    772907        var l = line.text; 
     
    775910        } 
    776911      }); 
    777       maxLengthChanged = false; 
     912      updateMaxLine = false; 
    778913    } 
    779914 
     
    811946    } 
    812947 
    813     function getRange(from, to) { 
     948    function getRange(from, to, lineSep) { 
    814949      var l1 = from.line, l2 = to.line; 
    815950      if (l1 == l2) return getLine(l1).text.slice(from.ch, to.ch); 
     
    817952      doc.iter(l1 + 1, l2, function(line) { code.push(line.text); }); 
    818953      code.push(getLine(l2).text.slice(0, to.ch)); 
    819       return code.join("\n"); 
    820     } 
    821     function getSelection() { 
    822       return getRange(sel.from, sel.to); 
     954      return code.join(lineSep || "\n"); 
     955    } 
     956    function getSelection(lineSep) { 
     957      return getRange(sel.from, sel.to, lineSep); 
    823958    } 
    824959 
     
    8811016 
    8821017    function scrollEditorIntoView() { 
    883       if (!cursor.getBoundingClientRect) return; 
    8841018      var rect = cursor.getBoundingClientRect(); 
    8851019      // IE returns bogus coordinates when the instance sits inside of an iframe and the cursor is hidden 
    8861020      if (ie && rect.top == rect.bottom) return; 
    8871021      var winH = window.innerHeight || Math.max(document.body.offsetHeight, document.documentElement.offsetHeight); 
    888       if (rect.top < 0 || rect.bottom > winH) cursor.scrollIntoView(); 
     1022      if (rect.top < 0 || rect.bottom > winH) scrollCursorIntoView(); 
    8891023    } 
    8901024    function scrollCursorIntoView() { 
     1025      var coords = calculateCursorCoords(); 
     1026      return scrollIntoView(coords.x, coords.y, coords.x, coords.yBot); 
     1027    } 
     1028    function calculateCursorCoords() { 
    8911029      var cursor = localCoords(sel.inverted ? sel.from : sel.to); 
    8921030      var x = options.lineWrapping ? Math.min(cursor.x, lineSpace.offsetWidth) : cursor.x; 
    893       return scrollIntoView(x, cursor.y, x, cursor.yBot); 
     1031      return {x: x, y: cursor.y, yBot: cursor.yBot}; 
    8941032    } 
    8951033    function scrollIntoView(x1, y1, x2, y2) { 
     1034      var scrollPos = calculateScrollPos(x1, y1, x2, y2), scrolled = false; 
     1035      if (scrollPos.scrollLeft != null) {scroller.scrollLeft = scrollPos.scrollLeft; scrolled = true;} 
     1036      if (scrollPos.scrollTop != null) {scrollbar.scrollTop = scrollPos.scrollTop; scrolled = true;} 
     1037      if (scrolled && options.onScroll) options.onScroll(instance); 
     1038    } 
     1039    function calculateScrollPos(x1, y1, x2, y2) { 
    8961040      var pl = paddingLeft(), pt = paddingTop(); 
    8971041      y1 += pt; y2 += pt; x1 += pl; x2 += pl; 
    898       var screen = scroller.clientHeight, screentop = scroller.scrollTop, scrolled = false, result = true; 
    899       if (y1 < screentop) {scroller.scrollTop = Math.max(0, y1); scrolled = true;} 
    900       else if (y2 > screentop + screen) {scroller.scrollTop = y2 - screen; scrolled = true;} 
     1042      var screen = scroller.clientHeight, screentop = scrollbar.scrollTop, result = {}; 
     1043      var docBottom = scroller.scrollHeight; 
     1044      var atTop = y1 < pt + 10, atBottom = y2 + pt > docBottom - 10;; 
     1045      if (y1 < screentop) result.scrollTop = atTop ? 0 : Math.max(0, y1); 
     1046      else if (y2 > screentop + screen) result.scrollTop = (atBottom ? docBottom : y2) - screen; 
    9011047 
    9021048      var screenw = scroller.clientWidth, screenleft = scroller.scrollLeft; 
     
    9051051      if (x1 < screenleft + gutterw || atLeft) { 
    9061052        if (atLeft) x1 = 0; 
    907         scroller.scrollLeft = Math.max(0, x1 - 10 - gutterw); 
    908         scrolled = true; 
    909       } 
    910       else if (x2 > screenw + screenleft - 3) { 
    911         scroller.scrollLeft = x2 + 10 - screenw; 
    912         scrolled = true; 
    913         if (x2 > code.clientWidth) result = false; 
    914       } 
    915       if (scrolled && options.onScroll) options.onScroll(instance); 
     1053        result.scrollLeft = Math.max(0, x1 - 10 - gutterw); 
     1054      } else if (x2 > screenw + screenleft - 3) { 
     1055        result.scrollLeft = x2 + 10 - screenw; 
     1056      } 
    9161057      return result; 
    9171058    } 
    9181059 
    919     function visibleLines() { 
    920       var lh = textHeight(), top = scroller.scrollTop - paddingTop(); 
     1060    function visibleLines(scrollTop) { 
     1061      var lh = textHeight(), top = (scrollTop != null ? scrollTop : scrollbar.scrollTop) - paddingTop(); 
    9211062      var fromHeight = Math.max(0, Math.floor(top / lh)); 
    9221063      var toHeight = Math.ceil((top + scroller.clientHeight) / lh); 
     
    9271068    // determine which DOM updates have to be made, and makes the 
    9281069    // updates. 
    929     function updateDisplay(changes, suppressCallback) { 
     1070    function updateDisplay(changes, suppressCallback, scrollTop) { 
    9301071      if (!scroller.clientWidth) { 
    9311072        showingFrom = showingTo = displayOffset = 0; 
     
    9331074      } 
    9341075      // Compute the new visible window 
    935       var visible = visibleLines(); 
     1076      // If scrollTop is specified, use that to determine which lines 
     1077      // to render instead of the current scrollbar position. 
     1078      var visible = visibleLines(scrollTop); 
    9361079      // Bail out if the visible area is already rendered and nothing changed. 
    937       if (changes !== true && changes.length == 0 && visible.from > showingFrom && visible.to < showingTo) return; 
     1080      if (changes !== true && changes.length == 0 && visible.from > showingFrom && visible.to < showingTo) { 
     1081        updateVerticalScroll(scrollTop); 
     1082        return; 
     1083      } 
    9381084      var from = Math.max(visible.from - 100, 0), to = Math.min(doc.size, visible.to + 100); 
    9391085      if (showingFrom < from && from - showingFrom < 20) from = showingFrom; 
     
    9531099        else intactLines += range.to - range.from; 
    9541100      } 
    955       if (intactLines == to - from && from == showingFrom && to == showingTo) return; 
     1101      if (intactLines == to - from && from == showingFrom && to == showingTo) { 
     1102        updateVerticalScroll(scrollTop); 
     1103        return; 
     1104      } 
    9561105      intact.sort(function(a, b) {return a.domStart - b.domStart;}); 
    9571106 
     
    9611110      lineDiv.style.display = gutter.style.display = ""; 
    9621111 
    963       // Position the mover div to align with the lines it's supposed 
    964       // to be showing (which will cover the visible display) 
    9651112      var different = from != showingFrom || to != showingTo || lastSizeC != scroller.clientHeight + th; 
    9661113      // This is just a bogus formula that detects when the editor is 
     
    9691116      showingFrom = from; showingTo = to; 
    9701117      displayOffset = heightAtLine(doc, from); 
    971       mover.style.top = (displayOffset * th) + "px"; 
    972       if (scroller.clientHeight) 
    973         code.style.height = (doc.height * th + 2 * paddingTop()) + "px"; 
    9741118 
    9751119      // Since this is all rather error prone, it is honoured with the 
     
    9801124 
    9811125      function checkHeights() { 
    982         maxWidth = scroller.clientWidth; 
    9831126        var curNode = lineDiv.firstChild, heightChanged = false; 
    9841127        doc.iter(showingFrom, showingTo, function(line) { 
     
    9921135          curNode = curNode.nextSibling; 
    9931136        }); 
    994         if (heightChanged) 
    995           code.style.height = (doc.height * th + 2 * paddingTop()) + "px"; 
    9961137        return heightChanged; 
    9971138      } 
     
    9991140      if (options.lineWrapping) { 
    10001141        checkHeights(); 
    1001       } else { 
    1002         if (maxWidth == null) maxWidth = stringWidth(maxLine); 
    1003         if (maxWidth > scroller.clientWidth) { 
    1004           lineSpace.style.width = maxWidth + "px"; 
    1005           // Needed to prevent odd wrapping/hiding of widgets placed in here. 
    1006           code.style.width = ""; 
    1007           code.style.width = scroller.scrollWidth + "px"; 
    1008         } else { 
    1009           lineSpace.style.width = code.style.width = ""; 
     1142        var scrollHeight = needsScrollbar(); 
     1143        var shouldHaveScrollbar = scrollHeight ? "block" : "none"; 
     1144        if (scrollbar.style.display != shouldHaveScrollbar) { 
     1145          scrollbar.style.display = shouldHaveScrollbar; 
     1146          if (scrollHeight) scrollbarInner.style.height = scrollHeight + "px"; 
     1147          checkHeights(); 
    10101148        } 
    10111149      } 
     
    10161154        updateGutter() && options.lineWrapping && checkHeights() && updateGutter(); 
    10171155      } 
     1156      updateVerticalScroll(scrollTop); 
    10181157      updateSelection(); 
    10191158      if (!suppressCallback && options.onUpdate) options.onUpdate(instance); 
     
    10951234        } else { 
    10961235          var marker = line.gutterMarker; 
    1097           var text = options.lineNumbers ? i + options.firstLineNumber : null; 
     1236          var text = options.lineNumbers ? options.lineNumberFormatter(i + options.firstLineNumber) : null; 
    10981237          if (marker && marker.text) 
    10991238            text = marker.text.replace("%N%", text != null ? text : ""); 
     
    11101249      gutterText.innerHTML = html.join(""); 
    11111250      // Make sure scrolling doesn't cause number gutter size to pop 
    1112       if (normalNode != null) { 
     1251      if (normalNode != null && options.lineNumbers) { 
    11131252        var node = gutterText.childNodes[normalNode - showingFrom]; 
    1114         var minwidth = String(doc.size).length, val = eltText(node), pad = ""; 
     1253        var minwidth = String(doc.size).length, val = eltText(node.firstChild), pad = ""; 
    11151254        while (val.length + pad.length < minwidth) pad += "\u00a0"; 
    11161255        if (pad) node.insertBefore(document.createTextNode(pad), node.firstChild); 
     
    12941433      else if (unit == "line") dist = textHeight(); 
    12951434      var target = coordsChar(pos.x, pos.y + dist * dir + 2); 
    1296       if (unit == "page") scroller.scrollTop += localCoords(target, true).y - pos.y; 
     1435      if (unit == "page") scrollbar.scrollTop += localCoords(target, true).y - pos.y; 
    12971436      setCursor(target.line, target.ch, true); 
    12981437      goalColumn = pos.x; 
    12991438    } 
    13001439 
    1301     function selectWordAt(pos) { 
     1440    function findWordAt(pos) { 
    13021441      var line = getLine(pos.line).text; 
    13031442      var start = pos.ch, end = pos.ch; 
    1304       while (start > 0 && isWordChar(line.charAt(start - 1))) --start; 
    1305       while (end < line.length && isWordChar(line.charAt(end))) ++end; 
    1306       setSelectionUser({line: pos.line, ch: start}, {line: pos.line, ch: end}); 
     1443      var check = isWordChar(line.charAt(start < line.length ? start : start - 1)) ? 
     1444        isWordChar : function(ch) {return !isWordChar(ch);}; 
     1445      while (start > 0 && check(line.charAt(start - 1))) --start; 
     1446      while (end < line.length && check(line.charAt(end))) ++end; 
     1447      return {from: {line: pos.line, ch: start}, to: {line: pos.line, ch: end}}; 
    13071448    } 
    13081449    function selectLine(line) { 
     
    13241465      var line = getLine(n), curSpace = line.indentation(options.tabSize), 
    13251466          curSpaceString = line.text.match(/^\s*/)[0], indentation; 
     1467      if (how == "smart") { 
     1468        indentation = mode.indent(state, line.text.slice(curSpaceString.length), line.text); 
     1469        if (indentation == Pass) how = "prev"; 
     1470      } 
    13261471      if (how == "prev") { 
    13271472        if (n) indentation = getLine(n-1).indentation(options.tabSize); 
    13281473        else indentation = 0; 
    13291474      } 
    1330       else if (how == "smart") indentation = mode.indent(state, line.text.slice(curSpaceString.length), line.text); 
    13311475      else if (how == "add") indentation = curSpace + options.indentUnit; 
    13321476      else if (how == "subtract") indentation = curSpace - options.indentUnit; 
     
    13341478      var diff = indentation - curSpace; 
    13351479 
    1336       if (!diff) { 
    1337         if (sel.from.line != n && sel.to.line != n) return; 
    1338         var indentString = curSpaceString; 
    1339       } 
    1340       else { 
    1341         var indentString = "", pos = 0; 
    1342         if (options.indentWithTabs) 
    1343           for (var i = Math.floor(indentation / options.tabSize); i; --i) {pos += options.tabSize; indentString += "\t";} 
    1344         while (pos < indentation) {++pos; indentString += " ";} 
    1345       } 
     1480      var indentString = "", pos = 0; 
     1481      if (options.indentWithTabs) 
     1482        for (var i = Math.floor(indentation / options.tabSize); i; --i) {pos += options.tabSize; indentString += "\t";} 
     1483      while (pos < indentation) {++pos; indentString += " ";} 
    13461484 
    13471485      replaceRange(indentString, {line: n, ch: 0}, {line: n, ch: curSpaceString.length}); 
     
    13701508        }); 
    13711509        lineSpace.style.width = code.style.width = ""; 
     1510        widthForcer.style.left = ""; 
    13721511      } else { 
    13731512        wrapper.className = wrapper.className.replace(" CodeMirror-wrap", ""); 
    1374         maxWidth = null; maxLine = ""; 
     1513        maxLine = ""; maxLineChanged = true; 
    13751514        doc.iter(0, doc.size, function(line) { 
    13761515          if (line.height != 1 && !line.hidden) updateLineHeight(line, 1); 
     
    15051644            var l = line.text; 
    15061645            if (hidden && l.length == maxLine.length) { 
    1507               maxLengthChanged = true; 
    1508             } 
    1509             else if (!hidden && l.length > maxLine.length) { 
    1510               maxLine = l; maxWidth = null; 
    1511               maxLengthChanged = false; 
     1646              updateMaxLine = true; 
     1647            } else if (!hidden && l.length > maxLine.length) { 
     1648              maxLine = l; updateMaxLine = false; 
    15121649            } 
    15131650          } 
     
    15321669        line = getLine(line); 
    15331670        if (!line) return null; 
    1534       } 
    1535       else { 
     1671      } else { 
    15361672        var n = lineNo(line); 
    15371673        if (n == null) return null; 
     
    16821818    } 
    16831819    function onContextMenu(e) { 
    1684       var pos = posFromMouse(e), scrollPos = scroller.scrollTop; 
    1685       if (!pos || window.opera) return; // Opera is difficult. 
     1820      var pos = posFromMouse(e), scrollPos = scrollbar.scrollTop; 
     1821      if (!pos || opera) return; // Opera is difficult. 
    16861822      if (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to)) 
    16871823        operation(setCursor)(pos.line, pos.ch); 
     
    16981834      function rehide() { 
    16991835        var newVal = splitLines(input.value).join("\n"); 
    1700         if (newVal != val) operation(replaceSelection)(newVal, "end"); 
     1836        if (newVal != val && !options.readOnly) operation(replaceSelection)(newVal, "end"); 
    17011837        inputDiv.style.position = "relative"; 
    17021838        input.style.cssText = oldCSS; 
    1703         if (ie_lt9) scroller.scrollTop = scrollPos; 
     1839        if (ie_lt9) scrollbar.scrollTop = scrollPos; 
    17041840        leaveInputAlone = false; 
    17051841        resetInput(true); 
     
    17431879        for (var i = forward ? 0 : st.length - 2, e = forward ? st.length : -2; i != e; i += 2*d) { 
    17441880          var text = st[i]; 
    1745           if (st[i+1] != null && st[i+1] != style) {pos += d * text.length; continue;} 
     1881          if (st[i+1] != style) {pos += d * text.length; continue;} 
    17461882          for (var j = forward ? 0 : text.length - 1, te = forward ? text.length : -1; j != te; j += d, pos+=d) { 
    17471883            if (pos >= from && pos < to && re.test(cur = text.charAt(j))) { 
     
    18631999    } 
    18642000    function endOperation() { 
    1865       var reScroll = false, updated; 
    1866       if (maxLengthChanged) computeMaxLength(); 
    1867       if (selectionChanged) reScroll = !scrollCursorIntoView(); 
    1868       if (changes.length) updated = updateDisplay(changes, true); 
     2001      if (updateMaxLine) computeMaxLength(); 
     2002      if (maxLineChanged && !options.lineWrapping) { 
     2003        var cursorWidth = widthForcer.offsetWidth, left = stringWidth(maxLine); 
     2004        widthForcer.style.left = left + "px"; 
     2005        lineSpace.style.minWidth = (left + cursorWidth) + "px"; 
     2006        maxLineChanged = false; 
     2007      } 
     2008      var newScrollPos, updated; 
     2009      if (selectionChanged) { 
     2010        var coords = calculateCursorCoords(); 
     2011        newScrollPos = calculateScrollPos(coords.x, coords.y, coords.x, coords.yBot); 
     2012      } 
     2013      if (changes.length) updated = updateDisplay(changes, true, (newScrollPos ? newScrollPos.scrollTop : null)); 
    18692014      else { 
    18702015        if (selectionChanged) updateSelection(); 
    18712016        if (gutterDirty) updateGutter(); 
    18722017      } 
    1873       if (reScroll) scrollCursorIntoView(); 
     2018      if (newScrollPos) scrollCursorIntoView(); 
    18742019      if (selectionChanged) {scrollEditorIntoView(); restartBlink();} 
    18752020 
     
    18832028          if (posEq(sel.from, sel.to)) matchBrackets(false); 
    18842029        }), 20); 
    1885       var tc = textChanged, cbs = callbacks; // these can be reset by callbacks 
    1886       if (selectionChanged && options.onCursorActivity) 
     2030      var sc = selectionChanged, cbs = callbacks; // these can be reset by callbacks 
     2031      if (textChanged && options.onChange && instance) 
     2032        options.onChange(instance, textChanged); 
     2033      if (sc && options.onCursorActivity) 
    18872034        options.onCursorActivity(instance); 
    1888       if (tc && options.onChange && instance) 
    1889         options.onChange(instance, tc); 
    18902035      for (var i = 0; i < cbs.length; ++i) cbs[i](instance); 
    18912036      if (updated && options.onUpdate) options.onUpdate(instance); 
     
    19472092    undoDepth: 40, 
    19482093    tabindex: null, 
    1949     autofocus: null 
     2094    autofocus: null, 
     2095    lineNumberFormatter: function(integer) { return integer; } 
    19502096  }; 
    19512097 
     
    22252371          return true; 
    22262372        } 
    2227       } 
    2228       else { 
     2373      } else { 
    22292374        var match = this.string.slice(this.pos).match(pattern); 
    22302375        if (match && consume !== false) this.pos += match[0].length; 
     
    23932538      var mk = this.marked, omk = other.marked; 
    23942539      if (!mk) return; 
    2395       for (var i = 0; i < mk.length; ++i) { 
     2540      outer: for (var i = 0; i < mk.length; ++i) { 
    23962541        var mark = mk[i], close = mark.to == null; 
    23972542        if (close && omk) { 
    2398           for (var j = 0; j < omk.length; ++j) 
    2399             if (omk[j].sameSet(mark)) {close = false; break;} 
     2543          for (var j = 0; j < omk.length; ++j) { 
     2544            var om = omk[j]; 
     2545            if (!om.sameSet(mark) || om.from != null) continue 
     2546            if (mark.from == this.text.length && om.to == 0) { 
     2547              omk.splice(j, 1); 
     2548              mk.splice(i--, 1); 
     2549              continue outer; 
     2550            } else { 
     2551              close = false; break; 
     2552            } 
     2553          } 
    24002554        } 
    24012555        if (close) mark.to = this.text.length; 
     
    25052659            html.push(open); 
    25062660            var cut = wrapAt - outPos; 
    2507             span_(window.opera ? text.slice(cut, cut + 1) : text.slice(cut), style); 
     2661            span_(opera ? text.slice(cut, cut + 1) : text.slice(cut), style); 
    25082662            html.push("</span>"); 
    2509             if (window.opera) span_(text.slice(cut + 1), style); 
     2663            if (opera) span_(text.slice(cut + 1), style); 
    25102664            wrapAt--; 
    25112665            outPos += l; 
     
    25142668            span_(text, style); 
    25152669            // Output empty wrapper when at end of line 
    2516             if (outPos == wrapAt && outPos == len) html.push(open + " </span>"); 
     2670            // (Gecko and IE8+ do strange wrapping when adding a space 
     2671            // to the end of the line. Other browsers don't react well 
     2672            // to zero-width spaces. So we do hideous browser sniffing 
     2673            // to determine which to use.) 
     2674            if (outPos == wrapAt && outPos == len) 
     2675              html.push(open + (gecko || (ie && !ie_lt8) ? "&#x200b;" : " ") + "</span>"); 
    25172676            // Stop outputting HTML when gone sufficiently far beyond measure 
    25182677            else if (outPos > wrapAt + 10 && /\s/.test(text)) span = function(){}; 
     
    25492708          nextChange = markpos < marked.length ? marked[markpos].from : Infinity; 
    25502709          for (var i = 0; i < marks.length; ++i) { 
    2551             var to = marks[i].to || Infinity; 
     2710            var to = marks[i].to; 
     2711            if (to == null) to = Infinity; 
    25522712            if (to == pos) marks.splice(i--, 1); 
    25532713            else nextChange = Math.min(to, nextChange); 
     
    25872747        if (end > from) dest.push(part.slice(from - pos, Math.min(part.length, to - pos)), source[i+1]); 
    25882748        if (end >= from) state = 1; 
    2589       } 
    2590       else if (state == 1) { 
     2749      } else if (state == 1) { 
    25912750        if (end > to) dest.push(part.slice(0, to - pos), source[i+1]); 
    25922751        else dest.push(part, source[i+1]); 
     
    28443003  function e_target(e) {return e.target || e.srcElement;} 
    28453004  function e_button(e) { 
    2846     if (e.which) return e.which; 
    2847     else if (e.button & 1) return 1; 
    2848     else if (e.button & 2) return 3; 
    2849     else if (e.button & 4) return 2; 
     3005    var b = e.which; 
     3006    if (b == null) { 
     3007      if (e.button & 1) b = 1; 
     3008      else if (e.button & 2) b = 3; 
     3009      else if (e.button & 4) b = 2; 
     3010    } 
     3011    if (mac && e.ctrlKey && b == 1) b = 3; 
     3012    return b; 
    28503013  } 
    28513014 
     
    28633026      node.addEventListener(type, handler, false); 
    28643027      if (disconnect) return function() {node.removeEventListener(type, handler, false);}; 
    2865     } 
    2866     else { 
     3028    } else { 
    28673029      var wrapHandler = function(event) {handler(event || window.event);}; 
    28683030      node.attachEvent("on" + type, wrapHandler); 
     
    28793041  var gecko = /gecko\/\d{7}/i.test(navigator.userAgent); 
    28803042  var ie = /MSIE \d/.test(navigator.userAgent); 
     3043  var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); 
    28813044  var ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent); 
    28823045  var quirksMode = ie && document.documentMode == 5; 
    28833046  var webkit = /WebKit\//.test(navigator.userAgent); 
    28843047  var chrome = /Chrome\//.test(navigator.userAgent); 
     3048  var opera = /Opera\//.test(navigator.userAgent); 
    28853049  var safari = /Apple Computer/.test(navigator.vendor); 
    28863050  var khtml = /KHTML\//.test(navigator.userAgent); 
     3051  var mac_geLion = /Mac OS X 10\D([7-9]|\d\d)\D/.test(navigator.userAgent); 
    28873052 
    28883053  // Detect drag-and-drop 
     
    29343099  } 
    29353100 
    2936   // Find the position of an element by following the offsetParent chain. 
    2937   // If screen==true, it returns screen (rather than page) coordinates. 
    29383101  function eltOffset(node, screen) { 
    2939     var bod = node.ownerDocument.body; 
    2940     var x = 0, y = 0, skipBody = false; 
    2941     for (var n = node; n; n = n.offsetParent) { 
    2942       var ol = n.offsetLeft, ot = n.offsetTop; 
    2943       // Firefox reports weird inverted offsets when the body has a border. 
    2944       if (n == bod) { x += Math.abs(ol); y += Math.abs(ot); } 
    2945       else { x += ol, y += ot; } 
    2946       if (screen && computedStyle(n).position == "fixed") 
    2947         skipBody = true; 
    2948     } 
    2949     var e = screen && !skipBody ? null : bod; 
    2950     for (var n = node.parentNode; n != e; n = n.parentNode) 
    2951       if (n.scrollLeft != null) { x -= n.scrollLeft; y -= n.scrollTop;} 
    2952     return {left: x, top: y}; 
    2953   } 
    2954   // Use the faster and saner getBoundingClientRect method when possible. 
    2955   if (document.documentElement.getBoundingClientRect != null) eltOffset = function(node, screen) { 
    29563102    // Take the parts of bounding client rect that we are interested in so we are able to edit if need be, 
    29573103    // since the returned value cannot be changed externally (they are kept in sync as the element moves within the page) 
     
    29693115    } 
    29703116    return box; 
    2971   }; 
     3117  } 
    29723118 
    29733119  // Get a node's text content. 
     
    29943140  // Recent (late 2011) Opera betas insert bogus newlines at the start 
    29953141  // of the textContent, so we strip those. 
    2996   if (htmlEscape("a") == "\na") 
     3142  if (htmlEscape("a") == "\na") { 
    29973143    htmlEscape = function(str) { 
    29983144      escapeElement.textContent = str; 
     
    30003146    }; 
    30013147  // Some IEs don't preserve tabs through innerHTML 
    3002   else if (htmlEscape("\t") != "\t") 
     3148  } else if (htmlEscape("\t") != "\t") { 
    30033149    htmlEscape = function(str) { 
    30043150      escapeElement.innerHTML = ""; 
     
    30063152      return escapeElement.innerHTML; 
    30073153    }; 
     3154  } 
    30083155  CodeMirror.htmlEscape = htmlEscape; 
    30093156 
     
    30313178  // alternative way to split lines. 
    30323179  var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { 
    3033     var pos = 0, nl, result = []; 
    3034     while ((nl = string.indexOf("\n", pos)) > -1) { 
    3035       result.push(string.slice(pos, string.charAt(nl-1) == "\r" ? nl - 1 : nl)); 
    3036       pos = nl + 1; 
    3037     } 
    3038     result.push(string.slice(pos)); 
     3180    var pos = 0, result = [], l = string.length; 
     3181    while (pos <= l) { 
     3182      var nl = string.indexOf("\n", pos); 
     3183      if (nl == -1) nl = string.length; 
     3184      var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); 
     3185      var rt = line.indexOf("\r"); 
     3186      if (rt != -1) { 
     3187        result.push(line.slice(0, rt)); 
     3188        pos += rt + 1; 
     3189      } else { 
     3190        result.push(line); 
     3191        pos = nl + 1; 
     3192      } 
     3193    } 
    30393194    return result; 
    3040   } : function(string){return string.split(/\r?\n/);}; 
     3195  } : function(string){return string.split(/\r\n?|\n/);}; 
    30413196  CodeMirror.splitLines = splitLines; 
    30423197 
     
    30593214                  19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", 
    30603215                  36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", 
    3061                   46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 127: "Delete", 186: ";", 187: "=", 188: ",", 
    3062                   189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'", 63276: "PageUp", 
    3063                   63277: "PageDown", 63275: "End", 63273: "Home", 63234: "Left", 63232: "Up", 63235: "Right", 
    3064                   63233: "Down", 63302: "Insert", 63272: "Delete"}; 
     3216                  46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete", 
     3217                  186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 
     3218                  221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home", 
     3219                  63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"}; 
    30653220  CodeMirror.keyNames = keyNames; 
    30663221  (function() { 
  • tablepress/trunk/admin/common.dev.css

    r558089 r578853  
    11/** 
     2 * CSS code for all TablePress admin screens 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views CSS 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/common.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for all TablePress admin screens 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/edit.dev.css

    r558089 r578853  
    11/** 
     2 * CSS code for the "Edit" screen 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views CSS 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/edit.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "Edit" screen 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
     
    6669            }, 
    6770            change_datatables: function() { 
    68                 var $datatables_checkbox = $(this), 
     71                var $datatables_checkbox = $( '#option-use-datatables' ), 
    6972                    checkboxes_disabled = ! ( $datatables_checkbox.prop( 'checked' ) && ! $datatables_checkbox.prop( 'disabled' ) ); 
    7073                $datatables_checkbox.closest( 'tbody' ).find( 'input' ).not( $datatables_checkbox ).prop( 'disabled', checkboxes_disabled ); 
     74                tp.table.change_datatables_pagination(); 
     75            }, 
     76            change_datatables_pagination: function() { 
     77                var $pagination_checkbox = $( '#option-datatables-paginate' ), 
     78                    pagination_enabled = ( $pagination_checkbox.prop( 'checked' ) && ! $pagination_checkbox.prop( 'disabled' ) ); 
     79                $( '#option-datatables-lengthchange' ).prop( 'disabled', ! pagination_enabled ); 
     80                $( '#option-datatables-paginate_entries' ).prop( 'disabled', ! pagination_enabled ); 
    7181            }, 
    7282            prepare_ajax_request: function( wp_action, wp_nonce ) { 
     
    103113                    datatables_paginate: $( '#option-datatables-paginate' ).prop( 'checked' ), 
    104114                    datatables_lengthchange: $( '#option-datatables-lengthchange' ).prop( 'checked' ), 
     115                    datatables_paginate_entries: $( '#option-datatables-paginate_entries' ).val(), 
     116                    datatables_info: $( '#option-datatables-info' ).prop( 'checked' ), 
     117                    datatables_scrollX: $( '#option-datatables-scrollX' ).prop( 'checked' ), 
    105118                    datatables_custom_commands: $( '#option-datatables-custom-commands' ).val() 
    106119                }; 
     
    906919            success: function( data ) { 
    907920                // saving was successful, so the original ID has changed to the (maybe) new ID -> we need to adjust all occurances 
    908                 // update URL (for HTML5 browsers only) 
    909                 if ( ( 'pushState' in window.history ) && null !== window.history['pushState'] ) 
    910                     window.history.pushState( '', '', window.location.href.replace( /table_id=[0-9a-zA-Z-_]+/gi, 'table_id=' + data.table_id ) ); 
     921                if ( tp.table.id != data.table_id ) { 
     922                    // update URL (for HTML5 browsers only), but only if ID really changed, to not get dummy entries in the browser history 
     923                    if ( ( 'pushState' in window.history ) && null !== window.history['pushState'] ) 
     924                        window.history.pushState( '', '', window.location.href.replace( /table_id=[0-9a-zA-Z-_]+/gi, 'table_id=' + data.table_id ) ); 
     925                } 
    911926                // update table ID in input fields (type text and hidden) 
    912927                tp.table.id = tp.table.new_id = data.table_id; 
     
    9921007                    '#option-table-head':       tp.table.change_table_head, 
    9931008                    '#option-table-foot':       tp.table.change_table_foot, 
    994                     '#option-use-datatables':   tp.table.change_datatables 
     1009                    '#option-use-datatables':   tp.table.change_datatables, 
     1010                    '#option-datatables-paginate':  tp.table.change_datatables_pagination 
    9951011                }, 
    9961012                'blur': { 
  • tablepress/trunk/admin/export.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "Export" screen 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/import.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "Import" screen 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/list.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "List Tables" screen 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/quicktags-button.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "Table" button in the QuickTags editor toolbar 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/admin/tinymce-button.dev.js

    r558089 r578853  
    11/** 
     2 * JavaScript code for the "Table" button in the TinyMCE editor toolbar 
    23 * 
    3  * 
     4 * @package TablePress 
     5 * @subpackage Views JavaScript 
     6 * @author Tobias Bäthge 
    47 * @since 1.0.0 
    58 */ 
  • tablepress/trunk/classes/class-render.php

    r558089 r578853  
    440440        } 
    441441        if ( ! empty( $caption ) ) 
    442             $caption = "<caption{$caption_class}{$caption_style}>\n{$caption}</caption>\n"; 
     442            $caption = "<caption{$caption_class}{$caption_style}>{$caption}</caption>\n"; 
    443443 
    444444        // <colgroup> tag 
     
    620620            'print_name' => null, 
    621621            'print_description' => null, 
    622             'cache_table_output' => false, 
     622            'cache_table_output' => true, 
    623623            'extra_css_classes' => '', 
    624624            'use_datatables' => null, 
    625625            'datatables_sort' => null, 
    626626            'datatables_paginate' => null, 
    627             'datatables_paginate_entries' => '10', 
     627            'datatables_paginate_entries' => null, 
    628628            'datatables_lengthchange' => null, 
    629629            'datatables_filter' => null, 
    630             'datatables_info' => true, 
    631             'datatables_scrollX' => false, 
    632             'datatables_tabletools' => false, 
     630            'datatables_info' => null, 
     631            'datatables_scrollX' => null, 
     632            //'datatables_tabletools' => false, 
    633633            'datatables_custom_commands' => null, 
     634            'datatables_locale' => get_locale(), 
    634635            'show_rows' => '', 
    635636            'show_columns' => '', 
  • tablepress/trunk/classes/class-tablepress.php

    r558089 r578853  
    2626     * @const string 
    2727     */ 
    28     const version = '0.1-alpha'; 
     28    const version = '0.2-alpha'; 
    2929 
    3030    /** 
     
    3535     * @const int 
    3636     */ 
    37     const db_version = 1; 
     37    const db_version = 2; 
    3838 
    3939    /** 
  • tablepress/trunk/classes/class-view.php

    r558089 r578853  
    316316            $this->do_text_boxes( 'header' ); 
    317317            ?> 
    318             <div id="poststuff" class="metabox-holder<?php echo ( isset( $GLOBALS['screen_layout_columns'] ) && ( 2 == $GLOBALS['screen_layout_columns'] ) ) ? ' has-right-sidebar' : ''; ?>"> 
    319                 <div id="side-info-column" class="inner-sidebar"> 
    320                 <?php 
    321                     // print all boxes in the sidebar 
    322                     $this->do_text_boxes( 'side' ); 
    323                     $this->do_meta_boxes( 'side' ); 
    324                 ?> 
    325                 </div> 
    326                 <div id="post-body"> 
    327                     <div id="post-body-content"> 
     318            <div id="poststuff"> 
     319                <div id="post-body" class="metabox-holder columns-<?php echo ( isset( $GLOBALS['screen_layout_columns'] ) && ( 2 == $GLOBALS['screen_layout_columns'] ) ) ? '2' : '1'; ?>"> 
     320                    <div id="postbox-container-2" class="postbox-container"> 
     321                        <?php 
     322                        $this->do_text_boxes( 'normal' ); 
     323                        $this->do_meta_boxes( 'normal' ); 
     324 
     325                        $this->do_text_boxes( 'additional' ); 
     326                        $this->do_meta_boxes( 'additional' ); 
     327 
     328                        // print all submit buttons 
     329                        $this->do_text_boxes( 'submit' ); 
     330                        ?> 
     331                    </div> 
     332                    <div id="postbox-container-1" class="postbox-container"> 
    328333                    <?php 
    329                     $this->do_text_boxes( 'normal' ); 
    330                     $this->do_meta_boxes( 'normal' ); 
    331  
    332                     $this->do_text_boxes( 'additional' ); 
    333                     $this->do_meta_boxes( 'additional' ); 
    334  
    335                     // print all submit buttons 
    336                     $this->do_text_boxes( 'submit' ); 
     334                        // print all boxes in the sidebar 
     335                        $this->do_text_boxes( 'side' ); 
     336                        $this->do_meta_boxes( 'side' ); 
    337337                    ?> 
    338338                    </div> 
  • tablepress/trunk/controllers/controller-admin.php

    r558089 r578853  
    605605        $checkbox_options = array( 
    606606            'table_head', 'table_foot', 'alternating_row_colors', 'row_hover',  // Table Options 
    607             'use_datatables', 'datatables_sort', 'datatables_filter', 'datatables_paginate', 'datatables_lengthchange'  // DataTables JS Features @TODO: THIS NEEDS WORK (e.g. for disabled fields)! 
     607            'use_datatables', 'datatables_sort', 'datatables_filter', 'datatables_paginate', 'datatables_lengthchange', 'datatables_info', 'datatables_scrollX' // DataTables JS Features @TODO: THIS NEEDS WORK (e.g. for disabled fields)! 
    608608        ); 
    609609        foreach ( $checkbox_options as $option ) { 
  • tablepress/trunk/controllers/controller-frontend.php

    r558089 r578853  
    6262    public function enqueue_css() { 
    6363        // @TODO: Add check for whether default CSS is desired at all 
    64         $default_css_url = plugins_url( 'css/default.css', TABLEPRESS__FILE__ ); 
     64        $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.dev' : ''; 
     65        $default_css_url = plugins_url( "css/default{$suffix}.css", TABLEPRESS__FILE__ ); 
    6566        $default_css_url = apply_filters( 'tablepress_default_css_url', $default_css_url ); 
    6667        wp_enqueue_style( 'tablepress-default', $default_css_url, array(), TablePress::version ); 
     
    112113            return; // there are no tables with activated DataTables 
    113114 
     115        // storage for the DataTables languages 
     116        $datatables_languages = array(); 
    114117        // generate the specific JS commands, depending on chosen features on the "Edit" screen and the Shortcode parameters 
    115118        $commands = array(); 
     
    121124                $parameters = array(); 
    122125 
    123                 if ( $js_options['datatables_tabletools'] ) 
    124                     $parameters['sDom'] = '"sDom": \'T<"clear">lfrtip\''; 
    125                 $datatables_locale = apply_filters( 'tablepress_datatables_locale', get_locale() ); 
    126                 $language_file = "i18n/datatables/lang-{$datatables_locale}.txt"; 
    127                 $language_file = ( file_exists( TABLEPRESS_ABSPATH . $language_file ) ) ? '/' . $language_file : '/i18n/datatables/lang-default.txt'; 
    128                 $language_file_url = plugins_url( $language_file, TABLEPRESS__FILE__ ); 
    129                 $root_relative_language_file_url = parse_url( $language_file_url, PHP_URL_PATH ); 
    130                 $root_relative_language_file_url = apply_filters( 'tablepress_datatables_language_file_url', $root_relative_language_file_url, $language_file_url ); 
    131                 if ( ! empty( $root_relative_language_file_url ) ) 
    132                     $parameters['oLanguage'] = '"oLanguage":{"sUrl": "' . $root_relative_language_file_url . '"}'; // root relative language file URL 
     126                // DataTables language/translation handling 
     127                $datatables_locale = apply_filters( 'tablepress_datatables_locale', $js_options['datatables_locale'], $table_id ); 
     128                // only load DataTables translation if it's not "en_US", which is loaded as the default by DataTables 
     129                if ( 'en_US' != $datatables_locale ) { 
     130                    // only do the expensive language file checks if they haven't been done yet 
     131                    if ( ! isset( $datatables_languages[ $datatables_locale ] ) ) { 
     132                        $language_file = TABLEPRESS_ABSPATH . "i18n/datatables/lang-{$datatables_locale}.js"; 
     133                        $language_file = apply_filters( 'tablepress_datatables_language_file', $language_file, $datatables_locale, TABLEPRESS_ABSPATH ); 
     134                        if ( ! file_exists( $language_file ) ) 
     135                            $language_file = TABLEPRESS_ABSPATH . 'i18n/datatables/lang-default.js'; 
     136                        $datatables_languages[ $datatables_locale ] = $language_file; 
     137                    } 
     138                    $parameters['oLanguage'] = '"oLanguage":DataTables_oLanguage["' . $datatables_locale . '"]'; 
     139                } 
    133140                // these parameters need to be added for performance gain or to overwrite unwanted default behavior 
    134141                $parameters['aaSorting'] = '"aaSorting":[]'; // no initial sort 
     
    148155                if ( ! $js_options['datatables_info'] ) 
    149156                    $parameters['bInfo'] = '"bInfo":false'; 
    150                 if ( $js_options['datatables_scrollX'] ) { 
     157                if ( $js_options['datatables_scrollX'] ) 
    151158                    $parameters['sScrollX'] = '"sScrollX":"100%"'; 
    152                     $parameters['bScrollCollapse'] = '"bScrollCollapse":true'; 
    153                 } 
     159                //if ( $js_options['datatables_tabletools'] ) 
     160                //  $parameters['sDom'] = '"sDom": \'T<"clear">lfrtip\''; 
    154161                if ( ! empty( $js_options['datatables_custom_commands'] ) ) 
    155162                    $parameters['custom_commands'] = $js_options['datatables_custom_commands']; 
    156163 
    157164                $parameters = apply_filters( 'tablepress_datatables_parameters', $parameters, $table_id, $html_id, $js_options ); 
    158                 $parameters = implode( ', ', $parameters ); 
     165                $parameters = implode( ',', $parameters ); 
    159166                $parameters = ( ! empty( $parameters ) ) ? '{' . $parameters . '}' : ''; 
    160167 
     
    162169                $command = apply_filters( 'tablepress_datatables_command', $command, $html_id, $parameters, $table_id, $js_options ); 
    163170                if ( ! empty( $command ) ) 
    164                     $commands[] = "\t{$command}"; 
     171                    $commands[] = $command; 
    165172            } 
    166173        } 
     
    168175        $commands = implode( "\n", $commands ); 
    169176        $commands = apply_filters( 'tablepress_all_datatables_commands', $commands ); 
    170         if ( ! empty( $commands ) ) 
    171             echo <<<JS 
     177        if ( empty( $commands ) ) 
     178            return; 
     179 
     180        // DataTables language/translation handling 
     181        $datatables_strings = ''; 
     182        foreach ( $datatables_languages as $locale => $language_file ) { 
     183            $strings = file_get_contents( $language_file ); 
     184            // remove unnecessary white space 
     185            $strings = str_replace( array( "\n", "\r", "\t" ), '', $strings ); 
     186            $datatables_strings .= "DataTables_oLanguage[\"{$locale}\"]={$strings};\n"; 
     187        } 
     188        if ( ! empty( $datatables_strings ) ) 
     189            $datatables_strings = "var DataTables_oLanguage={};\n" . $datatables_strings; 
     190 
     191        // echo DataTables strings and JS calls 
     192        echo <<<JS 
    172193<script type="text/javascript"> 
    173194jQuery(document).ready(function($){ 
    174 {$commands} 
     195{$datatables_strings}{$commands} 
    175196}); 
    176197</script> 
     
    251272                'datatables_info' => $render_options['datatables_info'], 
    252273                'datatables_scrollX' => $render_options['datatables_scrollX'], 
    253                 'datatables_tabletools' => $render_options['datatables_tabletools'], 
     274                'datatables_locale' => $render_options['datatables_locale'], 
     275                //'datatables_tabletools' => $render_options['datatables_tabletools'], 
    254276                'datatables_custom_commands' => $render_options['datatables_custom_commands'] 
    255277            ); 
     
    284306 
    285307        // check if table output shall and can be loaded from the transient cache, otherwise generate the output 
    286         $cache_name = "tablepress_table_output_{$table_id}"; // @TODO: use some sort of hash of the Shortcode here? 
    287         if ( ! $render_options['cache_table_output'] || is_user_logged_in() ) { 
    288             $output = get_transient( $cache_name ); 
     308        if ( $render_options['cache_table_output'] && ! is_user_logged_in() ) { 
     309            $shortcode_hash = md5( json_encode( $shortcode_atts ) ); // hash the Shortcode attributes to get a unique cache identifier 
     310            $transient_name = 'tablepress_' . $shortcode_hash; // Attention: This string must not be longer than 45 characters! 
     311            $output = get_transient( $transient_name ); 
    289312            if ( false === $output ) { 
    290                 // render/generate the table HTML 
     313                // render/generate the table HTML, as it was not found in the cache 
    291314                $_render->set_input( $table, $render_options ); 
    292315                $output = $_render->get_output(); 
    293  
    294                 if ( $render_options['cache_table_output'] && ! is_user_logged_in() ) 
    295                     set_transient( $cache_name, $output, 60*60*24 ); // store $output in a transient, set cache timeout to 24 hours 
     316                // save output to a transient 
     317                set_transient( $transient_name, $output, 60*60*24 ); // store $output in a transient, set cache timeout to 24 hours 
     318                // update output caches list transient (necessary for cache invalidation upon table saving) 
     319                $caches_list_transient_name = 'tablepress_c_' . md5( $table_id ); 
     320                $caches_list = get_transient( $caches_list_transient_name ); 
     321                if ( ! is_array( $caches_list ) ) 
     322                    $caches_list = array(); 
     323                $caches_list[ $transient_name ] = 1; // 1 is a dummy value 
     324                set_transient( $caches_list_transient_name, $caches_list, 60*60*24*2 ); 
    296325            } 
     326        } else { 
     327            // render/generate the table HTML, as no cache is to be used 
     328            $_render->set_input( $table, $render_options ); 
     329            $output = $_render->get_output(); 
    297330        } 
    298331 
  • tablepress/trunk/css/default.css

    r558089 r578853  
    1 /* Table description */ 
    2 .tablepress-table-description { 
    3     clear: both; 
    4     display: block; 
    5 } 
    6  
    7 .tablepress { 
    8     border-collapse: collapse; 
    9     border-spacing: 0; 
    10     text-align: left; 
    11 } 
    12  
    13 .tablepress th, 
    14 .tablepress td { 
    15     padding: 8px; 
    16 } 
    17  
    18 .tablepress th { 
    19     font-weight: bold; 
    20 } 
    21  
    22 /* Vertical lines / borders */ 
    23 .tablepress tbody tr, 
    24 .tablepress tfoot tr { 
    25     border-top: 1px solid #dddddd; 
    26 } 
    27 .tablepress tbody tr:first-child { 
    28     border-top: 0; 
    29 } 
    30 .tablepress thead tr { 
    31     border-bottom: 1px solid #dddddd; 
    32 } 
    33  
    34 /* Row background colors */ 
    35 .tablepress thead tr, 
    36 .tablepress tfoot tr { 
    37     background-color: #d9edf7; 
    38 } 
    39 .tablepress tbody tr.odd { background-color: #f9f9f9; } 
    40 .tablepress tbody tr.even { background-color: #ffffff; } 
    41  
    42 .tablepress .row-hover tr:hover { 
    43     background-color: #f3f3f3; 
    44 } 
    45  
    46 /* Table wrapper */ 
    47 .dataTables_wrapper { 
    48     position: relative; 
    49     clear: both; 
    50     *zoom: 1; 
    51 } 
    52 .dataTables_wrapper .tablepress { 
    53     width: 100%; 
    54     clear: both; 
    55 } 
    56  
    57 /* Length Change menu */ 
    58 .dataTables_length { 
    59     float: left; 
    60 } 
    61  
    62 /* Filter/Search */ 
    63 .dataTables_filter { 
    64     float: right; 
    65     text-align: right; 
    66 } 
    67  
    68 /* Table information */ 
    69 .dataTables_info { 
    70     clear: both; 
    71     float: left; 
    72 } 
    73  
    74 /* Pagination */ 
    75 .dataTables_paginate { 
    76     float: right; 
    77     text-align: right; 
    78 } 
    79 /* Two button pagination - previous/next */ 
    80 .paginate_disabled_previous, 
    81 .paginate_enabled_previous, 
    82 .paginate_disabled_next, 
    83 .paginate_enabled_next { 
    84     float: left; 
    85     cursor: pointer; 
    86     *cursor: hand; 
    87     color: #111111 !important; 
    88 } 
    89 .paginate_disabled_previous:hover, 
    90 .paginate_enabled_previous:hover, 
    91 .paginate_disabled_next:hover, 
    92 .paginate_enabled_next:hover { 
    93     text-decoration: none !important; 
    94 } 
    95 .paginate_disabled_previous:active, 
    96 .paginate_enabled_previous:active, 
    97 .paginate_disabled_next:active, 
    98 .paginate_enabled_next:active { 
    99     outline: none; 
    100 } 
    101 .paginate_disabled_previous, 
    102 .paginate_disabled_next { 
    103     color: #666666 !important; 
    104 } 
    105 .paginate_disabled_previous, 
    106 .paginate_enabled_previous { 
    107     padding-left: 23px; 
    108 } 
    109 .paginate_disabled_next, 
    110 .paginate_enabled_next { 
    111     padding-right: 23px; 
    112     margin-left: 10px; 
    113 } 
    114 .paginate_enabled_previous { background: url('../img/back_enabled.png') no-repeat center left; } 
    115 .paginate_enabled_previous:hover { background: url('../img/back_enabled_hover.png') no-repeat center left; } 
    116 .paginate_disabled_previous { background: url('../img/back_disabled.png') no-repeat center left; } 
    117 /* hover */ 
    118 .paginate_enabled_next { background: url('../img/forward_enabled.png') no-repeat center right; } 
    119 .paginate_enabled_next:hover { background: url('../img/forward_enabled_hover.png') no-repeat center right; } 
    120 .paginate_disabled_next { background: url('../img/forward_disabled.png') no-repeat center right; } 
    121  
    122 /* Full number pagination */ 
    123 .paging_full_numbers { 
    124     height: 22px; 
    125     line-height: 22px; 
    126 } 
    127 .paging_full_numbers a:active { outline: none; } 
    128 .paging_full_numbers a:hover { text-decoration: none; } 
    129  
    130 .paging_full_numbers a.paginate_button, 
    131 .paging_full_numbers a.paginate_active { 
    132     border: 1px solid #aaaaaa; 
    133     -webkit-border-radius: 5px; 
    134     -moz-border-radius: 5px; 
    135     border-radius: 5px; 
    136     padding: 2px 5px; 
    137     margin: 0 3px; 
    138     cursor: pointer; 
    139     *cursor: hand; 
    140     color: #333333 !important; 
    141 } 
    142 .paging_full_numbers a.paginate_button { 
    143     background-color: #dddddd; 
    144 } 
    145 .paging_full_numbers a.paginate_button:hover { 
    146     background-color: #cccccc; 
    147     text-decoration: none !important; 
    148 } 
    149 .paging_full_numbers a.paginate_active { 
    150     background-color: #99b3ff; 
    151 } 
    152  
    153 /* Processing indicator */ 
    154 .dataTables_processing { 
    155     display: none; /* always hidden, we don't really need it */ 
    156 /*  position: absolute; 
    157     top: 50%; 
    158     left: 50%; 
    159     width: 250px; 
    160     height: 30px; 
    161     margin-left: -125px; 
    162     margin-top: -15px; 
    163     padding: 14px 0 2px 0; 
    164     border: 1px solid #ddd; 
    165     text-align: center; 
    166     color: #999; 
    167     font-size: 14px; 
    168     background-color: white; 
    169 */ 
    170 } 
    171  
    172 /* Scrolling */ 
    173 .dataTables_scroll { 
    174     clear: both; 
    175 } 
    176 .dataTables_scrollBody { 
    177     *margin-top: -1px; 
    178     -webkit-overflow-scrolling: touch; 
    179 } 
    180  
    181 /* Sorting */ 
    182 .dataTables_wrapper .sorting, 
    183 .dataTables_wrapper .sorting_asc, 
    184 .dataTables_wrapper .sorting_desc { 
    185     padding: 8px 18px 8px 8px; /* more right padding for sort arrows */ 
    186     cursor: pointer; 
    187     *cursor: hand; 
    188 } 
    189 .dataTables_wrapper .sorting { background: url('../img/both.gif') no-repeat center right; } 
    190 .dataTables_wrapper .sorting:hover { background-color: #049cdb; } 
    191 .dataTables_wrapper .sorting_asc { background: #049cdb url('../img/asc.gif') no-repeat center right; } 
    192 .dataTables_wrapper .sorting_desc { background: #049cdb url('../img/desc.gif') no-repeat center right; } 
    193  
    194 .dataTables_wrapper .sorting_asc_disabled { background: url('../img/sort_asc_disabled.png') no-repeat center right; } 
    195 .dataTables_wrapper .sorting_desc_disabled { background: url('../img/sort_desc_disabled.png') no-repeat center right; } 
    196  
    197 .dataTables_wrapper th:active { outline: none; } 
    198  
    199 /* RTL languages */ 
    200 .tablepress-rtl { 
    201     direction: rtl; 
    202     text-align: right; 
    203 } 
    204 .dataTables_wrapper .tablepress-rtl .sorting, 
    205 .dataTables_wrapper .tablepress-rtl .sorting_asc, 
    206 .dataTables_wrapper .tablepress-rtl .sorting_desc { 
    207     background-position: left !important; 
    208     padding: 8px 8px 8px 18px; /* more left padding for sort arrows */ 
    209 } 
     1.tablepress-table-description{clear:both;display:block}.tablepress{border-collapse:collapse;border-spacing:0;text-align:left;width:100%}.tablepress th,.tablepress td{padding:8px}.tablepress th{font-weight:bold}.tablepress tbody tr,.tablepress tfoot tr{border-top:1px solid #ddd}.tablepress tbody tr:first-child{border-top:0}.tablepress thead tr{border-bottom:1px solid #ddd}.tablepress thead tr,.tablepress tfoot tr{background-color:#d9edf7}.tablepress tbody tr.odd{background-color:#f9f9f9}.tablepress tbody tr.even{background-color:#fff}.tablepress .row-hover tr:hover{background-color:#f3f3f3}.dataTables_wrapper{position:relative;clear:both;*zoom:1;margin-bottom:1em}.dataTables_wrapper .tablepress{clear:both}.dataTables_length{float:left}.dataTables_filter{float:right;text-align:right}.dataTables_info{clear:both;float:left}.dataTables_paginate{float:right;text-align:right}.paginate_disabled_previous,.paginate_enabled_previous,.paginate_disabled_next,.paginate_enabled_next{float:left;cursor:pointer;*cursor:hand;color:#111!important}.paginate_disabled_previous:hover,.paginate_enabled_previous:hover,.paginate_disabled_next:hover,.paginate_enabled_next:hover{text-decoration:none!important}.paginate_disabled_previous:active,.paginate_enabled_previous:active,.paginate_disabled_next:active,.paginate_enabled_next:active{outline:0}.paginate_disabled_previous,.paginate_disabled_next{color:#666!important}.paginate_disabled_previous,.paginate_enabled_previous{padding-left:23px}.paginate_disabled_next,.paginate_enabled_next{padding-right:23px;margin-left:10px}.paginate_enabled_previous{background:url('../img/back_enabled.png') no-repeat center left}.paginate_enabled_previous:hover{background:url('../img/back_enabled_hover.png') no-repeat center left}.paginate_disabled_previous{background:url('../img/back_disabled.png') no-repeat center left}.paginate_enabled_next{background:url('../img/forward_enabled.png') no-repeat center right}.paginate_enabled_next:hover{background:url('../img/forward_enabled_hover.png') no-repeat center right}.paginate_disabled_next{background:url('../img/forward_disabled.png') no-repeat center right}.paging_full_numbers{height:22px;line-height:22px}.paging_full_numbers a:active{outline:0}.paging_full_numbers a:hover{text-decoration:none}.paging_full_numbers a.paginate_button,.paging_full_numbers a.paginate_active{border:1px solid #aaa;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:2px 5px;margin:0 3px;cursor:pointer;*cursor:hand;color:#333!important}.paging_full_numbers a.paginate_button{background-color:#ddd}.paging_full_numbers a.paginate_button:hover{background-color:#ccc;text-decoration:none!important}.paging_full_numbers a.paginate_active{background-color:#99b3ff}.dataTables_processing{display:none}.dataTables_scroll{clear:both}.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.dataTables_wrapper .sorting,.dataTables_wrapper .sorting_asc,.dataTables_wrapper .sorting_desc{padding:8px 18px 8px 8px;cursor:pointer;*cursor:hand}.dataTables_wrapper .sorting{background:url('../img/both.gif') no-repeat center right}.dataTables_wrapper .sorting:hover{background-color:#049cdb}.dataTables_wrapper .sorting_asc{background:#049cdb url('../img/asc.gif') no-repeat center right}.dataTables_wrapper .sorting_desc{background:#049cdb url('../img/desc.gif') no-repeat center right}.dataTables_wrapper .sorting_asc_disabled{background:url('../img/sort_asc_disabled.png') no-repeat center right}.dataTables_wrapper .sorting_desc_disabled{background:url('../img/sort_desc_disabled.png') no-repeat center right}.dataTables_wrapper th:active{outline:0}.dataTables_wrapper:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}html[xmlns] .dataTables_wrapper{display:block}* html .dataTables_wrapper{height:1%}.dataTables_wrapper label input,.dataTables_wrapper label select{display:inline}.tablepress-rtl{direction:rtl;text-align:right}.dataTables_wrapper .tablepress-rtl .sorting,.dataTables_wrapper .tablepress-rtl .sorting_asc,.dataTables_wrapper .tablepress-rtl .sorting_desc{background-position:left!important;padding:8px 8px 8px 18px} 
  • tablepress/trunk/css/default.dev.css

    r558089 r578853  
     1/** 
     2 * TablePress Default CSS 
     3 * 
     4 * Attention: Do not modify this file directly, but use the "Custom CSS" textarea 
     5 * on the "Plugin Options" screen of TablePress. 
     6 * 
     7 * @package TablePress 
     8 * @subpackage Frontend CSS 
     9 * @author Tobias Bäthge, Allan Jardine 
     10 * @since 1.0.0 
     11 */ 
     12 
    113/* Table description */ 
    214.tablepress-table-description { 
     
    921    border-spacing: 0; 
    1022    text-align: left; 
     23    width: 100%; 
    1124} 
    1225 
     
    4962    clear: both; 
    5063    *zoom: 1; 
     64    margin-bottom: 1em; 
    5165} 
    5266.dataTables_wrapper .tablepress { 
    53     width: 100%; 
    5467    clear: both; 
    5568} 
     
    197210.dataTables_wrapper th:active { outline: none; } 
    198211 
     212/* Self clearing - */ 
     213.dataTables_wrapper:after { 
     214    content: "."; 
     215    display: block; 
     216    clear: both; 
     217    visibility: hidden; 
     218    line-height: 0; 
     219    height: 0; 
     220} 
     221html[xmlns] .dataTables_wrapper { display: block; } 
     222* html .dataTables_wrapper { height: 1%; } 
     223 
     224.dataTables_wrapper label input, 
     225.dataTables_wrapper label select { 
     226    display: inline; 
     227} 
     228 
    199229/* RTL languages */ 
    200230.tablepress-rtl { 
  • tablepress/trunk/css/warning.txt

    r558089 r578853  
    55 
    66If you want to apply custom changes to the CSS code of the plugin, 
    7 please add those to the "Add custom CSS" textarea on the "Plugin Options" 
    8 screen of WP-Table Reloaded. 
     7please add those to the "Custom CSS" textarea on the "Plugin Options" 
     8screen of TablePress. 
    99 
    1010Thank you! 
  • tablepress/trunk/i18n/datatables/warning.txt

    r558089 r578853  
    66* If you want to make changes to your language's file, please copy the file to another location on your server, 
    77for example the "languages" folder in the directory "wp-content". 
    8 The URL of that file will then be something like http://[SITEURL]/wp-content/languages/lang-XX_XX.txt. 
    9 You can then use the plugin filter 'wp_table_reloaded_datatables_language_file_url' to overwrite the passed URL 
     8The URL of that file will then be something like http://[SITEURL]/wp-content/languages/lang-XX_XX.js. 
     9You can then use the plugin filter 'tablepress_datatables_language_file_url' to overwrite the passed URL 
    1010with the new one from above. 
    1111 
    12 * If you just want to change to a different language file, you can override the locale with the 
    13 plugin filter 'wp_table_reloaded_datatables_locale'. 
     12* If you just want to change to a different language file, you can override the locale by using the Shortcode 
     13parameter "datatables_locale" or with the plugin filter hook 'tablepress_datatables_locale'. 
    1414 
    15 * If you want to translate the language file into your own language, copy the file "lang-default.txt", rename the copy to 
    16 "lang-XX_XX.txt", where XX_XX is the ISO code for your language. That is the same one as in your WordPress language files (*.po, *.mo). 
     15* If you want to translate the language file into your own language, copy the file "lang-default.js", rename the copy to 
     16"lang-XX_XX.js", where XX_XX is the ISO code for your language. That is the same one as in your WordPress language files (*.po, *.mo). 
    1717Then you can translate that file. If you email the file to me, I'll gladly include it to the next release of the plugin. 
    1818 
     
    2020You can also check that page, if your language has been added and tell me about it. 
    2121 
    22 You can find example code for this in the FAQ or the documentation at http://tobias.baethge.com/redirect/wp-table-reloaded/faq/ 
    23 or http://tobias.baethge.com/redirect/wp-table-reloaded/documentation/ 
     22You can find example code for this in the FAQ or the documentation at http://tablepress.org/faq/ 
     23or http://tablepress.org/documentation/ 
    2424 
    2525Thank you! 
  • tablepress/trunk/js/jquery.datatables.min.js

    r558089 r578853  
    11/* 
    22 * File:        jquery.dataTables.min.js 
    3  * Version:     1.9.1 
     3 * Version:     1.9.2 
    44 * Author:      Allan Jardine (www.sprymedia.co.uk) 
    55 * Info:        www.datatables.net 
     
    1616 * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. 
    1717 */ 
    18 (function(h,V,l,m){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=h.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mDataProp:c.mDataProp?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===m||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=h.extend({},j.models.oSearch);else{c=a.aoPreSearchCols[d]; 
    19 if(c.bRegex===m)c.bRegex=!0;if(c.bSmart===m)c.bSmart=!0;if(c.bCaseInsensitive===m)c.bCaseInsensitive=!0}s(a,d,null)}function s(a,b,c){b=a.aoColumns[b];if(c!==m&&null!==c){if(c.sType!==m)b.sType=c.sType,b._bAutoType=!1;h.extend(b,c);p(b,c,"sWidth","sWidthOrig");if(c.iDataSort!==m)b.aDataSort=[c.iDataSort];p(b,c,"aDataSort")}b.fnGetData=W(b.mDataProp);b.fnSetData=ta(b.mDataProp);if(!a.oFeatures.bSort)b.bSortable=!1;if(!b.bSortable||-1==h.inArray("asc",b.asSorting)&&-1==h.inArray("desc",b.asSorting))b.sSortingClass= 
    20 a.oClasses.sSortableNone,b.sSortingClassJUI="";else if(b.bSortable||-1==h.inArray("asc",b.asSorting)&&-1==h.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortable,b.sSortingClassJUI=a.oClasses.sSortJUI;else if(-1!=h.inArray("asc",b.asSorting)&&-1==h.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableAsc,b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed;else if(-1==h.inArray("asc",b.asSorting)&&-1!=h.inArray("desc",b.asSorting))b.sSortingClass=a.oClasses.sSortableDesc,b.sSortingClassJUI= 
    21 a.oClasses.sSortJUIDescAllowed}function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;ba(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function x(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,c==b)return d;return null}function r(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,d==b)return!0===a.aoColumns[d].bVisible?c:null;return null}function v(a){for(var b=0,c=0;c<a.aoColumns.length;c++)!0=== 
    22 a.aoColumns[c].bVisible&&b++;return b}function A(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var f=b[d](a);if(null!==f)return f}return"string"}function E(a,b){for(var c=b.split(","),d=[],f=0,g=a.aoColumns.length;f<g;f++)for(var i=0;i<g;i++)if(a.aoColumns[f].sName==c[i]){d.push(i);break}return d}function y(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function J(a,b,c,d){var f,g,i,e,u;if(b)for(f=b.length-1;0<=f;f--){var n=b[f].aTargets; 
    23 h.isArray(n)||F(a,1,"aTargets must be an array of targets, not a "+typeof n);for(g=0,i=n.length;g<i;g++)if("number"===typeof n[g]&&0<=n[g]){for(;a.aoColumns.length<=n[g];)o(a);d(n[g],b[f])}else if("number"===typeof n[g]&&0>n[g])d(a.aoColumns.length+n[g],b[f]);else if("string"===typeof n[g])for(e=0,u=a.aoColumns.length;e<u;e++)("_all"==n[g]||h(a.aoColumns[e].nTh).hasClass(n[g]))&&d(e,b[f])}if(c)for(f=0,a=c.length;f<a;f++)d(f,c[f])}function H(a,b){var c;c=h.isArray(b)?b.slice():h.extend(!0,{},b);var d= 
    24 a.aoData.length,f=h.extend(!0,{},j.models.oRow);f._aData=c;a.aoData.push(f);for(var g,f=0,i=a.aoColumns.length;f<i;f++)if(c=a.aoColumns[f],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mDataProp?I(a,d,f,R(a,d,f)):I(a,d,f,w(a,d,f)),c._bAutoType&&"string"!=c.sType&&(g=w(a,d,f,"type"),null!==g&&""!==g))if(g=A(g),null===c.sType)c.sType=g;else if(c.sType!=g&&"html"!=c.sType)c.sType="string";a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ca(a,d);return d}function ua(a){var b,c,d,f,g,i,e, 
    25 u,n;if(a.bDeferLoading||null===a.sAjaxSource){e=a.nTBody.childNodes;for(b=0,c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){u=a.aoData.length;e[b]._DT_RowIndex=u;a.aoData.push(h.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(u);i=e[b].childNodes;g=0;for(d=0,f=i.length;d<f;d++)if(n=i[d].nodeName.toUpperCase(),"TD"==n||"TH"==n)I(a,u,g,h.trim(i[d].innerHTML)),g++}}e=S(a);i=[];for(b=0,c=e.length;b<c;b++)for(d=0,f=e[b].childNodes.length;d<f;d++)g=e[b].childNodes[d],n=g.nodeName.toUpperCase(), 
    26 ("TD"==n||"TH"==n)&&i.push(g);for(f=0,e=a.aoColumns.length;f<e;f++){n=a.aoColumns[f];if(null===n.sTitle)n.sTitle=n.nTh.innerHTML;g=n._bAutoType;u="function"===typeof n.fnRender;var o=null!==n.sClass,k=n.bVisible,m,s;if(g||u||o||!k)for(b=0,c=a.aoData.length;b<c;b++){d=a.aoData[b];m=i[b*e+f];if(g&&"string"!=n.sType&&(s=w(a,b,f,"type"),""!==s))if(s=A(s),null===n.sType)n.sType=s;else if(n.sType!=s&&"html"!=n.sType)n.sType="string";if("function"===typeof n.mDataProp)m.innerHTML=w(a,b,f,"display");if(u)s= 
    27 R(a,b,f),m.innerHTML=s,n.bUseRendered&&I(a,b,f,s);o&&(m.className+=" "+n.sClass);k?d._anHidden[f]=null:(d._anHidden[f]=m,m.parentNode.removeChild(m));n.fnCreatedCell&&n.fnCreatedCell.call(a.oInstance,m,w(a,b,f,"display"),d._aData,b,f)}}if(0!==a.aoRowCreatedCallback.length)for(b=0,c=a.aoData.length;b<c;b++)d=a.aoData[b],D(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}function K(a,b){return b._DT_RowIndex!==m?b._DT_RowIndex:null}function da(a,b,c){for(var b=L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]=== 
    28 c)return d;return-1}function X(a,b,c){for(var d=[],f=0,g=a.aoColumns.length;f<g;f++)d.push(w(a,b,f,c));return d}function w(a,b,c,d){var f=a.aoColumns[c];if((c=f.fnGetData(a.aoData[b]._aData,d))===m){if(a.iDrawError!=a.iDraw&&null===f.sDefaultContent)F(a,0,"Requested unknown parameter "+("function"==typeof f.mDataProp?"{mDataprop function}":"'"+f.mDataProp+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw;return f.sDefaultContent}if(null===c&&null!==f.sDefaultContent)c=f.sDefaultContent; 
    29 else if("function"===typeof c)return c();return"display"==d&&null===c?"":c}function I(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function W(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d){return a(b,d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a){for(var d=0,f=b.length;d<f;d++)if(a=a[b[d]],a===m)return m;return a}}return function(b){return b[a]}}function ta(a){if(null===a)return function(){};if("function"=== 
    30 typeof a)return function(b,d){a(b,"set",d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a,d){for(var f=0,g=b.length-1;f<g;f++)if(a=a[b[f]],a===m)return;a[b[b.length-1]]=d}}return function(b,d){b[a]=d}}function Y(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ea(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);B(a)}function fa(a,b){for(var c= 
    31 -1,d=0,f=a.length;d<f;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function R(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mDataProp},w(a,b,c,"display"))}function ca(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;if(c._aData.DT_RowId)c.nTr.id=c._aData.DT_RowId;c._aData.DT_RowClass&&h(c.nTr).addClass(c._aData.DT_RowClass);for(var f=0,g=a.aoColumns.length;f<g;f++){var i=a.aoColumns[f]; 
    32 d=l.createElement(i.sCellType);d.innerHTML="function"===typeof i.fnRender&&(!i.bUseRendered||null===i.mDataProp)?R(a,b,f):w(a,b,f,"display");if(null!==i.sClass)d.className=i.sClass;i.bVisible?(c.nTr.appendChild(d),c._anHidden[f]=null):c._anHidden[f]=d;i.fnCreatedCell&&i.fnCreatedCell.call(a.oInstance,d,w(a,b,f,"display"),c._aData,b,f)}D(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function va(a){var b,c,d;if(0!==a.nTHead.getElementsByTagName("th").length)for(b=0,d=a.aoColumns.length;b<d;b++){if(c= 
    33 a.aoColumns[b].nTh,c.setAttribute("role","columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var f=l.createElement("tr");for(b=0,d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&h(c).addClass(a.aoColumns[b].sClass), 
    34 f.appendChild(c);h(a.nTHead).html("")[0].appendChild(f);T(a.aoHeader,a.nTHead)}h(a.nTHead).children("tr").attr("role","row");if(a.bJUI)for(b=0,d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;f=l.createElement("div");f.className=a.oClasses.sSortJUIWrapper;h(c).contents().appendTo(f);var g=l.createElement("span");g.className=a.oClasses.sSortIcon;f.appendChild(g);c.appendChild(f)}if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ga(a,a.aoColumns[b].nTh,b):h(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone); 
    35 ""!==a.oClasses.sFooterTH&&h(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=O(a,null,a.aoFooter);for(b=0,d=a.aoColumns.length;b<d;b++)if(c[b])a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&h(c[b]).addClass(a.aoColumns[b].sClass)}}function U(a,b,c){var d,f,g,i=[],e=[],h=a.aoColumns.length,n;c===m&&(c=!1);for(d=0,f=b.length;d<f;d++){i[d]=b[d].slice();i[d].nTr=b[d].nTr;for(g=h-1;0<=g;g--)!a.aoColumns[g].bVisible&&!c&&i[d].splice(g,1);e.push([])}for(d=0,f= 
    36 i.length;d<f;d++){if(a=i[d].nTr)for(;g=a.firstChild;)a.removeChild(g);for(g=0,b=i[d].length;g<b;g++)if(n=h=1,e[d][g]===m){a.appendChild(i[d][g].cell);for(e[d][g]=1;i[d+h]!==m&&i[d][g].cell==i[d+h][g].cell;)e[d+h][g]=1,h++;for(;i[d][g+n]!==m&&i[d][g].cell==i[d][g+n].cell;){for(c=0;c<h;c++)e[d+c][g+n]=1;n++}i[d][g].cell.rowSpan=h;i[d][g].cell.colSpan=n}}}function z(a){var b,c,d=[],f=0,g=a.asStripeClasses.length;b=a.aoOpenRows.length;c=D(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==h.inArray(!1,c))G(a, 
    37 !1);else{a.bDrawing=!0;if(a.iInitDisplayStart!==m&&-1!=a.iInitDisplayStart)a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,B(a);if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var i=a._iDisplayStart;c=a._iDisplayEnd;if(a.oFeatures.bServerSide)i=0,c=a.aoData.length;for(;i<c;i++){var e=a.aoData[a.aiDisplay[i]]; 
    38 null===e.nTr&&ca(a,a.aiDisplay[i]);var j=e.nTr;if(0!==g){var n=a.asStripeClasses[f%g];if(e._sRowStripe!=n)h(j).removeClass(e._sRowStripe).addClass(n),e._sRowStripe=n}D(a,"aoRowCallback",null,[j,a.aoData[a.aiDisplay[i]]._aData,f,i]);d.push(j);f++;if(0!==b)for(e=0;e<b;e++)if(j==a.aoOpenRows[e].nParent){d.push(a.aoOpenRows[e].nTr);break}}}else{d[0]=l.createElement("tr");if(a.asStripeClasses[0])d[0].className=a.asStripeClasses[0];b=a.oLanguage;g=b.sZeroRecords;if(1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide)g= 
    39 b.sLoadingRecords;else if(b.sEmptyTable&&0===a.fnRecordsTotal())g=b.sEmptyTable;b=l.createElement("td");b.setAttribute("valign","top");b.colSpan=v(a);b.className=a.oClasses.sRowEmpty;b.innerHTML=ha(a,g);d[f].appendChild(b)}D(a,"aoHeaderCallback","header",[h(a.nTHead).children("tr")[0],Y(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);D(a,"aoFooterCallback","footer",[h(a.nTFoot).children("tr")[0],Y(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);f=l.createDocumentFragment();b=l.createDocumentFragment(); 
    40 if(a.nTBody){g=a.nTBody.parentNode;b.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;b=a.nTBody.firstChild;)a.nTBody.removeChild(b);for(b=0,c=d.length;b<c;b++)f.appendChild(d[b]);a.nTBody.appendChild(f);null!==g&&g.appendChild(a.nTBody)}D(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(G(a,!1),a._bInitComplete||Z(a))}}function $(a){a.oFeatures.bSort?P(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch): 
    41 (B(a),z(a))}function xa(a){var b=h("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=h('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),f,g,i,e,u,n,o,k=0;k<d.length;k++){g=0;i=d[k];if("<"==i){e=h("<div></div>")[0];u=d[k+1];if("'"==u||'"'==u){n="";for(o=2;d[k+o]!=u;)n+=d[k+o],o++;"H"==n?n="fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix": 
    42 "F"==n&&(n="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix");-1!=n.indexOf(".")?(u=n.split("."),e.id=u[0].substr(1,u[0].length-1),e.className=u[1]):"#"==n.charAt(0)?e.id=n.substr(1,n.length-1):e.className=n;k+=o}c.appendChild(e);c=e}else if(">"==i)c=c.parentNode;else if("l"==i&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)f=ya(a),g=1;else if("f"==i&&a.oFeatures.bFilter)f=za(a),g=1;else if("r"==i&&a.oFeatures.bProcessing)f=Aa(a),g=1;else if("t"==i)f=Ba(a),g= 
    43 1;else if("i"==i&&a.oFeatures.bInfo)f=Ca(a),g=1;else if("p"==i&&a.oFeatures.bPaginate)f=Da(a),g=1;else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(u=e.length;o<u;o++)if(i==e[o].cFeature){(f=e[o].fnInit(a))&&(g=1);break}}1==g&&null!==f&&("object"!==typeof a.aanFeatures[i]&&(a.aanFeatures[i]=[]),a.aanFeatures[i].push(f),c.appendChild(f))}b.parentNode.replaceChild(a.nTableWrapper,b)}function T(a,b){var c=h(b).children("tr"),d,f,g,i,e,j,n,o;a.splice(0,a.length);for(f=0,j=c.length;f<j;f++)a.push([]); 
    44 for(f=0,j=c.length;f<j;f++)for(g=0,n=c[f].childNodes.length;g<n;g++)if(d=c[f].childNodes[g],"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var k=1*d.getAttribute("colspan"),m=1*d.getAttribute("rowspan"),k=!k||0===k||1===k?1:k,m=!m||0===m||1===m?1:m;for(i=0;a[f][i];)i++;o=i;for(e=0;e<k;e++)for(i=0;i<m;i++)a[f+i][o+e]={cell:d,unique:1==k?!0:!1},a[f+i].nTr=c[f]}}function O(a,b,c){var d=[];if(!c)c=a.aoHeader,b&&(c=[],T(c,b));for(var b=0,f=c.length;b<f;b++)for(var g=0,i=c[b].length;g< 
    45 i;g++)if(c[b][g].unique&&(!d[g]||!a.bSortCellsTop))d[g]=c[b][g].cell;return d}function wa(a){if(a.bAjaxDataGet){a.iDraw++;G(a,!0);var b=Ea(a);ia(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Fa(a,b)},a);return!1}return!0}function Ea(a){var b=a.aoColumns.length,c=[],d,f,g,i;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:y(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:!1!==a.oFeatures.bPaginate? 
    46 a._iDisplayLength:-1});for(g=0;g<b;g++)d=a.aoColumns[g].mDataProp,c.push({name:"mDataProp_"+g,value:"function"===typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(g=0;g<b;g++)c.push({name:"sSearch_"+g,value:a.aoPreSearchCols[g].sSearch}),c.push({name:"bRegex_"+g,value:a.aoPreSearchCols[g].bRegex}),c.push({name:"bSearchable_"+g,value:a.aoColumns[g].bSearchable})}if(!1!==a.oFeatures.bSort){var e= 
    47 0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(g=0;g<d.length;g++){f=a.aoColumns[d[g][0]].aDataSort;for(i=0;i<f.length;i++)c.push({name:"iSortCol_"+e,value:f[i]}),c.push({name:"sSortDir_"+e,value:d[g][1]}),e++}c.push({name:"iSortingCols",value:e});for(g=0;g<b;g++)c.push({name:"bSortable_"+g,value:a.aoColumns[g].bSortable})}return c}function ia(a,b){D(a,"aoServerParams","serverParams",[b])}function Fa(a,b){if(b.sEcho!==m){if(1*b.sEcho<a.iDraw)return;a.iDraw= 
    48 1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ea(a);a._iRecordsTotal=parseInt(b.iTotalRecords,10);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=y(a),c=b.sColumns!==m&&""!==c&&b.sColumns!=c,d;c&&(d=E(a,b.sColumns));for(var f=W(a.sAjaxDataProp)(b),g=0,i=f.length;g<i;g++)if(c){for(var e=[],h=0,n=a.aoColumns.length;h<n;h++)e.push(f[g][d[h]]);H(a,e)}else H(a,f[g]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;z(a);a.bAjaxDataGet=!0;G(a,!1)}function za(a){var b= 
    49 a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'):""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";if(!a.aanFeatures.f)d.id=a.sTableId+"_filter";c=h('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=""===this.value?"":this.value,i=0,e=c.length;i<e;i++)c[i]!= 
    50 h(this).parents("div.dataTables_filter")[0]&&h(c[i]._DT_Input).val(d);d!=b.sSearch&&M(a,{sSearch:d,bRegex:b.bRegex,bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(13==a.keyCode)return!1});return d}function M(a,b,c){var d=a.oPreviousSearch,f=a.aoPreSearchCols,g=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)g(b);else{Ga(a,b.sSearch,c,b.bRegex, 
    51 b.bSmart,b.bCaseInsensitive);g(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ha(a,f[b].sSearch,b,f[b].bRegex,f[b].bSmart,f[b].bCaseInsensitive);Ia(a)}a.bFiltered=!0;h(a.oInstance).trigger("filter",a);a._iDisplayStart=0;B(a);z(a);ja(a,0)}function Ia(a){for(var b=j.ext.afnFiltering,c=0,d=b.length;c<d;c++)for(var f=0,g=0,i=a.aiDisplay.length;g<i;g++){var e=a.aiDisplay[g-f];b[c](a,X(a,e,"filter"),e)||(a.aiDisplay.splice(g-f,1),f++)}}function Ha(a,b,c,d,f,g){if(""!==b)for(var i=0,b=ka(b,d,f,g),d=a.aiDisplay.length- 
    52 1;0<=d;d--)f=la(w(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(f)||(a.aiDisplay.splice(d,1),i++)}function Ga(a,b,c,d,f,g){d=ka(b,d,f,g);f=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||f.sSearch.length>b.length||1==c||0!==b.indexOf(f.sSearch)){a.aiDisplay.splice(0,a.aiDisplay.length);ja(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&& 
    53 a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])||(a.aiDisplay.splice(b-c,1),c++)}function ja(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,a.asDataSearch.length);for(var c=b&&1===b?a.aiDisplayMaster:a.aiDisplay,d=0,f=c.length;d<f;d++)a.asDataSearch[d]=ma(a,X(a,c[d],"filter"))}}function ma(a,b){var c="";if(a.__nTmpFilter===m)a.__nTmpFilter=l.createElement("div");for(var d=a.__nTmpFilter,f=0,g=a.aoColumns.length;f<g;f++)a.aoColumns[f].bSearchable&& 
    54 (c+=la(b[f],a.aoColumns[f].sType)+"  ");if(-1!==c.indexOf("&"))d.innerHTML=c,c=d.textContent?d.textContent:d.innerText,c=c.replace(/\n/g," ").replace(/\r/g,"");return c}function ka(a,b,c,d){if(c)return a=b?a.split(" "):na(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:na(a);return RegExp(a,d?"i":"")}function la(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a? 
    55 a.replace(/[\r\n]/g," "):a}function na(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^)","g"),"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;if(!a.aanFeatures.i)a.aoDrawCallback.push({fn:Ja,sName:"information"}),b.id=a.sTableId+"_info";a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ja(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(), 
    56 f=a.fnRecordsTotal(),g=a.fnRecordsDisplay(),i;i=0===g&&g==f?b.sInfoEmpty:0===g?b.sInfoEmpty+" "+b.sInfoFiltered:g==f?b.sInfo:b.sInfo+" "+b.sInfoFiltered;i+=b.sInfoPostFix;i=ha(a,i);null!==b.fnInfoCallback&&(i=b.fnInfoCallback.call(a.oInstance,a,c,d,f,g,i));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)h(a[b]).html(i)}}function ha(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),f=a.fnRecordsDisplay(),f=a.fnFormatNumber(f),g=a.fnRecordsTotal(),g=a.fnFormatNumber(g); 
    57 a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace("_START_",c).replace("_END_",d).replace("_TOTAL_",f).replace("_MAX_",g)}function aa(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){aa(a)},200);else{xa(a);va(a);U(a,a.aoHeader);a.nTFoot&&U(a,a.aoFooter);G(a,!0);a.oFeatures.bAutoWidth&&ba(a);for(b=0,c=a.aoColumns.length;b<c;b++)if(null!==a.aoColumns[b].sWidth)a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth);a.oFeatures.bSort?P(a):a.oFeatures.bFilter? 
    58 M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),B(a),z(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ia(a,c),a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(c){var g=""!==a.sAjaxDataProp?W(a.sAjaxDataProp)(c):c;for(b=0;b<g.length;b++)H(a,g[b]);a.iInitDisplayStart=d;a.oFeatures.bSort?P(a):(a.aiDisplay=a.aiDisplayMaster.slice(),B(a),z(a));G(a,!1);Z(a,c)},a)):a.oFeatures.bServerSide||(G(a,!1),Z(a))}}function Z(a,b){a._bInitComplete=!0;D(a,"aoInitComplete","init",[a, 
    59 b])}function oa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&a.sZeroRecords&&"No data available in table"===b.sEmptyTable&&p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&a.sZeroRecords&&"Loading..."===b.sLoadingRecords&&p(a,a,"sZeroRecords","sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,f=a.aLengthMenu;if(2==f.length&&"object"===typeof f[0]&&"object"===typeof f[1])for(c=0,d=f[0].length;c<d;c++)b+='<option value="'+ 
    60 f[0][c]+'">'+f[1][c]+"</option>";else for(c=0,d=f.length;c<d;c++)b+='<option value="'+f[c]+'">'+f[c]+"</option>";b+="</select>";f=l.createElement("div");if(!a.aanFeatures.l)f.id=a.sTableId+"_length";f.className=a.oClasses.sLength;f.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";h('select option[value="'+a._iDisplayLength+'"]',f).attr("selected",!0);h("select",f).bind("change.DT",function(){var b=h(this).val(),f=a.aanFeatures.l;for(c=0,d=f.length;c<d;c++)f[c]!=this.parentNode&& 
    61 h("select",f[c]).val(b);a._iDisplayLength=parseInt(b,10);B(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()&&(a._iDisplayStart=a.fnDisplayEnd()-a._iDisplayLength,0>a._iDisplayStart))a._iDisplayStart=0;if(-1==a._iDisplayLength)a._iDisplayStart=0;z(a)});h("select",f).attr("aria-controls",a.sTableId);return f}function B(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength} 
    62 function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType;j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){B(a);z(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){B(a);z(a)})},sName:"pagination"});return b}function pa(a,b){var c=a._iDisplayStart;if("number"===typeof b){if(a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay())a._iDisplayStart= 
    63 0}else if("first"==b)a._iDisplayStart=0;else if("previous"==b){if(a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart-a._iDisplayLength:0,0>a._iDisplayStart)a._iDisplayStart=0}else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart= 
    64 0;else F(a,0,"Unknown paging action: "+b);h(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Aa(a){var b=l.createElement("div");if(!a.aanFeatures.r)b.id=a.sTableId+"_processing";b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function G(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,f=c.length;d<f;d++)c[d].style.visibility=b?"visible":"hidden";h(a.oInstance).trigger("processing",[a,b])}function Ba(a){if(""=== 
    65 a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d=l.createElement("div"),f=l.createElement("div"),g=l.createElement("div"),i=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),n=a.nTable.getElementsByTagName("thead")[0],o=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],k=a.oClasses;c.appendChild(d);g.appendChild(i);f.appendChild(a.nTable);b.appendChild(c);b.appendChild(f);d.appendChild(e); 
    66 e.appendChild(n);null!==o&&(b.appendChild(g),i.appendChild(j),j.appendChild(o));b.className=k.sScrollWrapper;c.className=k.sScrollHead;d.className=k.sScrollHeadInner;f.className=k.sScrollBody;g.className=k.sScrollFoot;i.className=k.sScrollFootInner;if(a.oScroll.bAutoCss)c.style.overflow="hidden",c.style.position="relative",g.style.overflow="hidden",f.style.overflow="auto";c.style.border="0";c.style.width="100%";g.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id"); 
    67 e.style.marginLeft="0";a.nTable.style.marginLeft="0";if(null!==o)j.removeAttribute("id"),j.style.marginLeft="0";d=h(a.nTable).children("caption");0<d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&o&&j.appendChild(d));if(""!==a.oScroll.sX){c.style.width=q(a.oScroll.sX);f.style.width=q(a.oScroll.sX);if(null!==o)g.style.width=q(a.oScroll.sX);h(f).scroll(function(){c.scrollLeft=this.scrollLeft;if(null!==o)g.scrollLeft=this.scrollLeft})}if(""!==a.oScroll.sY)f.style.height= 
    68 q(a.oScroll.sY);a.aoDrawCallback.push({fn:Ka,sName:"scrolling"});a.oScroll.bInfinite&&h(f).scroll(function(){!a.bDrawing&&0!==h(this).scrollTop()&&h(this).scrollTop()+h(this).height()>h(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()&&(pa(a,"next"),B(a),z(a))});a.nScrollHead=c;a.nScrollFoot=g;return b}function Ka(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,f,g,i,e,j,n,o,k,m=[],s=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]: 
    69 null,p=null!==a.nTFoot?s.getElementsByTagName("table")[0]:null,l=h.browser.msie&&7>=h.browser.version;h(a.nTable).children("thead, tfoot").remove();i=h(a.nTHead).clone()[0];a.nTable.insertBefore(i,a.nTable.childNodes[0]);null!==a.nTFoot&&(j=h(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]));if(""===a.oScroll.sX)d.style.width="100%",b.parentNode.style.width="100%";var r=O(a,i);for(f=0,g=r.length;f<g;f++)o=x(a,f),r[f].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width= 
    70 ""},j.getElementsByTagName("tr"));if(a.oScroll.bCollapse&&""!==a.oScroll.sY)d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px";f=h(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",l&&(h("tbody",d).height()>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width=q(h(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else if(""!==a.oScroll.sXInner)a.nTable.style.width=q(a.oScroll.sXInner);else if(f==h(d).width()&&h(d).height()<h(a.nTable).height()){if(a.nTable.style.width= 
    71 q(f-a.oScroll.iBarWidth),h(a.nTable).outerWidth()>f-a.oScroll.iBarWidth)a.nTable.style.width=q(f)}else a.nTable.style.width=q(f);f=h(a.nTable).outerWidth();g=a.nTHead.getElementsByTagName("tr");i=i.getElementsByTagName("tr");N(function(a,b){n=a.style;n.paddingTop="0";n.paddingBottom="0";n.borderTopWidth="0";n.borderBottomWidth="0";n.height=0;k=h(a).width();b.style.width=q(k);m.push(k)},i,g);h(i).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a, 
    72 b){n=a.style;n.paddingTop="0";n.paddingBottom="0";n.borderTopWidth="0";n.borderBottomWidth="0";n.height=0;k=h(a).width();b.style.width=q(k);m.push(k)},e,j),h(e).height(0));N(function(a){a.innerHTML="";a.style.width=q(m.shift())},i);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=q(m.shift())},e);if(h(a.nTable).outerWidth()<f){e=d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")?f+a.oScroll.iBarWidth:f;if(l&&(d.scrollHeight>d.offsetHeight||"scroll"==h(d).css("overflow-y")))a.nTable.style.width= 
    73 q(e-a.oScroll.iBarWidth);d.style.width=q(e);b.parentNode.style.width=q(e);if(null!==a.nTFoot)s.parentNode.style.width=q(e);""===a.oScroll.sX?F(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==a.oScroll.sXInner&&F(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else if(d.style.width= 
    74 q("100%"),b.parentNode.style.width=q("100%"),null!==a.nTFoot)s.parentNode.style.width=q("100%");if(""===a.oScroll.sY&&l)d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth);if(""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),l=""!==a.oScroll.sX&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight))d.style.height=q(a.nTable.offsetHeight+l);l=h(a.nTable).outerWidth();c.style.width=q(l);b.style.width=q(l);c=h(a.nTable).height()> 
    75 d.clientHeight||"scroll"==h(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";if(null!==a.nTFoot)p.style.width=q(l),s.style.width=q(l),s.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px";h(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,f=b.length;d<f;d++)for(var g=0,i=b[d].childNodes.length;g<i;g++)1==b[d].childNodes[g].nodeType&&(c?a(b[d].childNodes[g],c[d].childNodes[g]):a(b[d].childNodes[g]))}function La(a,b){if(!a||null===a||""===a)return 0; 
    76 b||(b=l.getElementsByTagName("body")[0]);var c,d=l.createElement("div");d.style.width=q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ba(a){var b=0,c,d=0,f=a.aoColumns.length,g,i=h("th",a.nTHead),e=a.nTable.getAttribute("width");for(g=0;g<f;g++)if(a.aoColumns[g].bVisible&&(d++,null!==a.aoColumns[g].sWidth)){c=La(a.aoColumns[g].sWidthOrig,a.nTable.parentNode);if(null!==c)a.aoColumns[g].sWidth=q(c);b++}if(f==i.length&&0===b&&d==f&&""===a.oScroll.sX&&""===a.oScroll.sY)for(g= 
    77 0;g<a.aoColumns.length;g++){if(c=h(i[g]).width(),null!==c)a.aoColumns[g].sWidth=q(c)}else{b=a.nTable.cloneNode(!1);g=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(g);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=h("thead th",b);0===d.length&&(d=h("tbody tr:eq(0)>td",b));i=O(a,g);for(g=d=0;g<f;g++){var j=a.aoColumns[g];j.bVisible&& 
    78 null!==j.sWidthOrig&&""!==j.sWidthOrig?i[g-d].style.width=q(j.sWidthOrig):j.bVisible?i[g-d].style.width="":d++}for(g=0;g<f;g++)a.aoColumns[g].bVisible&&(d=Ma(a,g),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[g].sContentPadding&&(d.innerHTML+=a.aoColumns[g].sContentPadding),c.appendChild(d)));f=a.nTable.parentNode;f.appendChild(b);if(""!==a.oScroll.sX&&""!==a.oScroll.sXInner)b.style.width=q(a.oScroll.sXInner);else if(""!==a.oScroll.sX){if(b.style.width="",h(b).width()<f.offsetWidth)b.style.width= 
    79 q(f.offsetWidth)}else if(""!==a.oScroll.sY)b.style.width=q(f.offsetWidth);else if(e)b.style.width=q(e);b.style.visibility="hidden";Na(a,b);f=h("tbody tr:eq(0)",b).children();0===f.length&&(f=O(a,h("thead",b)[0]));if(""!==a.oScroll.sX){for(g=d=c=0;g<a.aoColumns.length;g++)a.aoColumns[g].bVisible&&(c=null===a.aoColumns[g].sWidthOrig?c+h(f[d]).outerWidth():c+(parseInt(a.aoColumns[g].sWidth.replace("px",""),10)+(h(f[d]).outerWidth()-h(f[d]).width())),d++);b.style.width=q(c);a.nTable.style.width=q(c)}for(g= 
    80 d=0;g<a.aoColumns.length;g++)if(a.aoColumns[g].bVisible){c=h(f[d]).width();if(null!==c&&0<c)a.aoColumns[g].sWidth=q(c);d++}f=h(b).css("width");a.nTable.style.width=-1!==f.indexOf("%")?f:q(h(b).outerWidth());b.parentNode.removeChild(b)}if(e)a.nTable.style.width=q(e)}function Na(a,b){if(""===a.oScroll.sX&&""!==a.oScroll.sY)h(b).width(),b.style.width=q(h(b).outerWidth()-a.oScroll.iBarWidth);else if(""!==a.oScroll.sX)b.style.width=q(h(b).outerWidth())}function Ma(a,b){var c=Oa(a,b);if(0>c)return null; 
    81 if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=w(a,c,b,"");return d}return L(a,c)[b]}function Oa(a,b){for(var c=-1,d=-1,f=0;f<a.aoData.length;f++){var g=w(a,f,b,"display")+"",g=g.replace(/<.*?>/g,"");if(g.length>c)c=g.length,d=f}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Pa(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c= 
    82 l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px";b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;if(b==a)a=c.clientWidth;l.body.removeChild(c);return b-a}function P(a,b){var c,d,f,g,i,e,o=[],n=[],k=j.ext.oSort,s=a.aoData,l=a.aoColumns,p=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o= 
    83 null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],f=r(a,d),g=a.aoColumns[d].sSortDataType,j.ext.afnSortData[g])if(i=j.ext.afnSortData[g].call(a.oInstance,a,d,f),i.length===s.length)for(f=0,g=s.length;f<g;f++)I(a,f,d,i[f]);else F(a,0,"Returned data sort array (col "+d+") is the wrong length");for(c=0,d=a.aiDisplayMaster.length;c<d;c++)n[a.aiDisplayMaster[c]]=c;var q=o.length,x;for(c=0,d=s.length;c<d;c++)for(f=0;f<q;f++){x=l[o[f][0]].aDataSort; 
    84 for(i=0,e=x.length;i<e;i++)g=l[x[i]].sType,g=k[(g?g:"string")+"-pre"],s[c]._aSortData[x[i]]=g?g(w(a,c,x[i],"sort")):w(a,c,x[i],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,f,g,i;for(c=0;c<q;c++){i=l[o[c][0]].aDataSort;for(d=0,f=i.length;d<f;d++)if(g=l[i[d]].sType,g=k[(g?g:"string")+"-"+o[c][1]](s[a]._aSortData[i[d]],s[b]._aSortData[i[d]]),0!==g)return g}return k["numeric-asc"](n[a],n[b])})}(b===m||b)&&!a.oFeatures.bDeferRender&&Q(a);for(c=0,d=a.aoColumns.length;c<d;c++)g=l[c].sTitle.replace(/<.*?>/g, 
    85 ""),f=l[c].nTh,f.removeAttribute("aria-sort"),f.removeAttribute("aria-label"),l[c].bSortable?0<o.length&&o[0][0]==c?(f.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),f.setAttribute("aria-label",g+("asc"==(l[c].asSorting[o[0][2]+1]?l[c].asSorting[o[0][2]+1]:l[c].asSorting[0])?p.sSortAscending:p.sSortDescending))):f.setAttribute("aria-label",g+("asc"==l[c].asSorting[0]?p.sSortAscending:p.sSortDescending)):f.setAttribute("aria-label",g);a.bSorted=!0;h(a.oInstance).trigger("sort",a); 
    86 a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0,B(a),z(a))}function ga(a,b,c,d){Qa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var g=function(){var d,g;if(b.shiftKey){for(var e=!1,h=0;h<a.aaSorting.length;h++)if(a.aaSorting[h][0]==c){e=!0;d=a.aaSorting[h][0];g=a.aaSorting[h][2]+1;a.aoColumns[d].asSorting[g]?(a.aaSorting[h][1]=a.aoColumns[d].asSorting[g],a.aaSorting[h][2]=g):a.aaSorting.splice(h,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0], 
    87 0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],g=a.aaSorting[0][2]+1,a.aoColumns[d].asSorting[g]||(g=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[g],a.aaSorting[0][2]=g):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));P(a)};a.oFeatures.bProcessing?(G(a,!0),setTimeout(function(){g();a.oFeatures.bServerSide||G(a,!1)},0)):g();"function"==typeof d&&d(a)}})}function Q(a){var b,c,d,f,g,e=a.aoColumns.length,j=a.oClasses;for(b=0;b< 
    88 e;b++)a.aoColumns[b].bSortable&&h(a.aoColumns[b].nTh).removeClass(j.sSortAsc+" "+j.sSortDesc+" "+a.aoColumns[b].sSortingClass);f=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){g=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<f.length;c++)if(f[c][0]==b){g="asc"==f[c][1]?j.sSortAsc:j.sSortDesc;d=c;break}h(a.aoColumns[b].nTh).addClass(g);a.bJUI&&(c=h("span."+j.sSortIcon,a.aoColumns[b].nTh),c.removeClass(j.sSortJUIAsc+ 
    89 " "+j.sSortJUIDesc+" "+j.sSortJUI+" "+j.sSortJUIAscAllowed+" "+j.sSortJUIDescAllowed),c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==f[d][1]?j.sSortJUIAsc:j.sSortJUIDesc))}else h(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);g=j.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)h(d).removeClass(g+"1 "+g+"2 "+g+"3");else if(d.length>=e)for(b=0;b<e;b++)if(-1!=d[b].className.indexOf(g+"1"))for(c=0,a=d.length/e;c<a;c++)d[e*c+b].className= 
    90 h.trim(d[e*c+b].className.replace(g+"1",""));else if(-1!=d[b].className.indexOf(g+"2"))for(c=0,a=d.length/e;c<a;c++)d[e*c+b].className=h.trim(d[e*c+b].className.replace(g+"2",""));else if(-1!=d[b].className.indexOf(g+"3"))for(c=0,a=d.length/e;c<a;c++)d[e*c+b].className=h.trim(d[e*c+b].className.replace(" "+g+"3",""));var j=1,o;for(b=0;b<f.length;b++){o=parseInt(f[b][0],10);for(c=0,a=d.length/e;c<a;c++)d[e*c+o].className+=" "+g+j;3>j&&j++}}}function qa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b, 
    91 c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart,iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:h.extend(!0,[],a.aaSorting),oSearch:h.extend(!0,{},a.oPreviousSearch),aoSearchCols:h.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};for(b=0,c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);D(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Ra(a,b){if(a.oFeatures.bStateSave){var c= 
    92 a.fnStateLoad.call(a.oInstance,a);if(c){var d=D(a,"aoStateLoadParams","stateLoadParams",[a,c]);if(-1===h.inArray(!1,d)){a.oLoadedState=h.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();h.extend(a.oPreviousSearch,c.oSearch);h.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible= 
    93 c.abVisCols[d];D(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Sa(a){for(var b=V.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function t(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function S(a){for(var b= 
    94 [],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a,b){var c=[],d,f,g,e,h,j;f=0;var o=a.aoData.length;b!==m&&(f=b,o=b+1);for(g=f;g<o;g++)if(j=a.aoData[g],null!==j.nTr){f=[];for(e=0,h=j.nTr.childNodes.length;e<h;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&f.push(j.nTr.childNodes[e]);d=0;for(e=0,h=a.aoColumns.length;e<h;e++)a.aoColumns[e].bVisible?c.push(f[e-d]):(c.push(j._anHidden[e]),d++)}return c}function F(a,b,c){a=null===a?"DataTables warning: "+ 
    95 c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"==j.ext.sErrMode)alert(a);else throw Error(a);else V.console&&console.log&&console.log(a)}function p(a,b,c,d){d===m&&(d=c);b[c]!==m&&(a[d]=b[c])}function Ta(a,b){for(var c in b)b.hasOwnProperty(c)&&("object"===typeof e[c]&&!1===h.isArray(b[c])?h.extend(!0,a[c],b[c]):a[c]=b[c]);return a}function Qa(a,b,c){h(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT", 
    96 function(){return!1})}function C(a,b,c,d){c&&a[b].push({fn:c,sName:d})}function D(a,b,c,d){for(var b=a[b],f=[],g=b.length-1;0<=g;g--)f.push(b[g].fn.apply(a.oInstance,d));null!==c&&h(a.oInstance).trigger(c,d);return f}function Ua(a){return function(){var b=[t(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var Va=V.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,f=[],g= 
    97 h.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"===b&&null!==d&&(d=Va(d)),f.push((g?"":'"'+c+'":')+d);return(g?"[":"{")+f+(g?"]":"}")};this.$=function(a,b){var c,d,f=[],g=t(this[j.ext.iApiIndex]);b||(b={});b=h.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page)for(c=g._iDisplayStart,d=g.fnDisplayEnd();c<d;c++)f.push(g.aoData[g.aiDisplay[c]].nTr);else if("current"==b.order&&"none"==b.filter)for(c=0,d=g.aiDisplayMaster.length;c<d;c++)f.push(g.aoData[g.aiDisplayMaster[c]].nTr); 
    98 else if("current"==b.order&&"applied"==b.filter)for(c=0,d=g.aiDisplay.length;c<d;c++)f.push(g.aoData[g.aiDisplay[c]].nTr);else if("original"==b.order&&"none"==b.filter)for(c=0,d=g.aoData.length;c<d;c++)f.push(g.aoData[c].nTr);else if("original"==b.order&&"applied"==b.filter)for(c=0,d=g.aoData.length;c<d;c++)-1!==h.inArray(c,g.aiDisplay)&&f.push(g.aoData[c].nTr);else F(g,1,"Unknown selection options");d=h(f);c=d.filter(a);d=d.find(a);return h([].concat(h.makeArray(c),h.makeArray(d)))};this._=function(a, 
    99 b){var c=[],d,f,g=this.$(a,b);for(d=0,f=g.length;d<f;d++)c.push(this.fnGetData(g[d]));return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],d,f=t(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var g=0;g<a.length;g++){d=H(f,a[g]);if(-1==d)return c;c.push(d)}else{d=H(f,a);if(-1==d)return c;c.push(d)}f.aiDisplay=f.aiDisplayMaster.slice();(b===m||b)&&$(f);return c};this.fnAdjustColumnSizing=function(a){var b=t(this[j.ext.iApiIndex]);k(b);a===m||a?this.fnDraw(!1): 
    100 (""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable=function(a){var b=t(this[j.ext.iApiIndex]);ea(b);(a===m||a)&&z(b)};this.fnClose=function(a){for(var b=t(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=t(this[j.ext.iApiIndex]),f,g,a="object"===typeof a?K(d,a):a,e=d.aoData.splice(a, 
    101 1);for(f=0,g=d.aoData.length;f<g;f++)if(null!==d.aoData[f].nTr)d.aoData[f].nTr._DT_RowIndex=f;f=h.inArray(a,d.aiDisplay);d.asDataSearch.splice(f,1);fa(d.aiDisplayMaster,a);fa(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,e);if(d._iDisplayStart>=d.aiDisplay.length&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart))d._iDisplayStart=0;if(c===m||c)B(d),z(d);return e};this.fnDestroy=function(a){var b=t(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,f,g,a=a===m?!1:!0;b.bDestroying= 
    102 !0;D(b,"aoDestroyCallback","destroy",[b]);for(f=0,g=b.aoColumns.length;f<g;f++)!1===b.aoColumns[f].bVisible&&this.fnSetColumnVis(f,!0);h(b.nTableWrapper).find("*").andSelf().unbind(".DT");h("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(h(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(h(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable); 
    103 h(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];Q(b);h(S(b)).removeClass(b.asStripeClasses.join(" "));h("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(h("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),h("th, td",b.nTHead).each(function(){var a=h("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();h(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore? 
    104 c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);for(f=0,g=b.aoData.length;f<g;f++)null!==b.aoData[f].nTr&&d.appendChild(b.aoData[f].nTr);if(!0===b.oFeatures.bAutoWidth)b.nTable.style.width=q(b.sDestroyWidth);h(d).children("tr:even").addClass(b.asDestroyStripes[0]);h(d).children("tr:odd").addClass(b.asDestroyStripes[1]);for(f=0,g=j.settings.length;f<g;f++)j.settings[f]==b&&j.settings.splice(f,1);b=null};this.fnDraw=function(a){var b=t(this[j.ext.iApiIndex]);!1===a?(B(b), 
    105 z(b)):$(b)};this.fnFilter=function(a,b,c,d,f,g){var e=t(this[j.ext.iApiIndex]);if(e.oFeatures.bFilter){if(c===m||null===c)c=!1;if(d===m||null===d)d=!0;if(f===m||null===f)f=!0;if(g===m||null===g)g=!0;if(b===m||null===b){if(M(e,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:g},1),f&&e.aanFeatures.f){b=e.aanFeatures.f;c=0;for(d=b.length;c<d;c++)h(b[c]._DT_Input).val(a)}}else h.extend(e.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:g}),M(e,e.oPreviousSearch,1)}};this.fnGetData= 
    106 function(a,b){var c=t(this[j.ext.iApiIndex]);if(a!==m){var d=a;if("object"===typeof a){var f=a.nodeName.toLowerCase();"tr"===f?d=K(c,a):"td"===f&&(d=K(c,a.parentNode),b=da(c,d,a))}return b!==m?w(c,d,b,""):c.aoData[d]!==m?c.aoData[d]._aData:null}return Y(c)};this.fnGetNodes=function(a){var b=t(this[j.ext.iApiIndex]);return a!==m?b.aoData[a]!==m?b.aoData[a].nTr:null:S(b)};this.fnGetPosition=function(a){var b=t(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();if("TR"==c)return K(b,a);return"TD"==c|| 
    107 "TH"==c?(c=K(b,a.parentNode),a=da(b,c,a),[c,r(b,a),a]):null};this.fnIsOpen=function(a){for(var b=t(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return!0;return!1};this.fnOpen=function(a,b,c){var d=t(this[j.ext.iApiIndex]),f=S(d);if(-1!==h.inArray(a,f)){this.fnClose(a);var f=l.createElement("tr"),g=l.createElement("td");f.appendChild(g);g.className=c;g.colSpan=v(d);"string"===typeof b?g.innerHTML=b:h(g).html(b);b=h("tr",d.nTBody);-1!=h.inArray(a,b)&&h(f).insertAfter(a); 
    108 d.aoOpenRows.push({nTr:f,nParent:a});return f}};this.fnPageChange=function(a,b){var c=t(this[j.ext.iApiIndex]);pa(c,a);B(c);(b===m||b)&&z(c)};this.fnSetColumnVis=function(a,b,c){var d=t(this[j.ext.iApiIndex]),f,g,e=d.aoColumns,h=d.aoData,o,n;if(e[a].bVisible!=b){if(b){for(f=g=0;f<a;f++)e[f].bVisible&&g++;n=g>=v(d);if(!n)for(f=a;f<e.length;f++)if(e[f].bVisible){o=f;break}for(f=0,g=h.length;f<g;f++)null!==h[f].nTr&&(n?h[f].nTr.appendChild(h[f]._anHidden[a]):h[f].nTr.insertBefore(h[f]._anHidden[a],L(d, 
    109 f)[o]))}else for(f=0,g=h.length;f<g;f++)null!==h[f].nTr&&(o=L(d,f)[a],h[f]._anHidden[a]=o,o.parentNode.removeChild(o));e[a].bVisible=b;U(d,d.aoHeader);d.nTFoot&&U(d,d.aoFooter);for(f=0,g=d.aoOpenRows.length;f<g;f++)d.aoOpenRows[f].nTr.colSpan=v(d);if(c===m||c)k(d),z(d);qa(d)}};this.fnSettings=function(){return t(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=t(this[j.ext.iApiIndex]);b.aaSorting=a;P(b)};this.fnSortListener=function(a,b,c){ga(t(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a, 
    110 b,c,d,f){var e=t(this[j.ext.iApiIndex]),b="object"===typeof b?K(e,b):b;if(e.__fnUpdateDeep===m&&h.isArray(a)&&"object"===typeof a){e.aoData[b]._aData=a.slice();e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=m}else if(e.__fnUpdateDeep===m&&null!==a&&"object"===typeof a){e.aoData[b]._aData=h.extend(!0,{},a);e.__fnUpdateDeep=!0;for(c=0;c<e.aoColumns.length;c++)this.fnUpdate(w(e,b,c),b,c,!1,!1);e.__fnUpdateDeep=m}else{I(e,b,c,a);var a=w(e,b,c,"display"), 
    111 i=e.aoColumns[c];null!==i.fnRender&&(a=R(e,b,c),i.bUseRendered&&I(e,b,c,a));if(null!==e.aoData[b].nTr)L(e,b)[c].innerHTML=a}c=h.inArray(b,e.aiDisplay);e.asDataSearch[c]=ma(e,X(e,b,"filter"));(f===m||f)&&k(e);(d===m||d)&&$(e);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Ua,_fnInitialise:aa,_fnInitComplete:Z,_fnLanguageCompat:oa,_fnAddColumn:o,_fnColumnOptions:s,_fnAddData:H,_fnCreateTr:ca,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:U,_fnDraw:z,_fnReDraw:$,_fnAjaxUpdate:wa, 
    112 _fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ia,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:Ka,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za,_fnFilterComplete:M,_fnFilterCustom:Ia,_fnFilterColumn:Ha,_fnFilter:Ga,_fnBuildSearchArray:ja,_fnBuildSearchRow:ma,_fnFilterCreateSearch:ka,_fnDataToSearch:la,_fnSort:P,_fnSortAttachListener:ga,_fnSortingClasses:Q,_fnFeatureHtmlPaginate:Da,_fnPageChange:pa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ja,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa, 
    113 _fnProcessingDisplay:G,_fnVisibleToColumnIndex:x,_fnColumnIndexToVisible:r,_fnNodeToDataIndex:K,_fnVisbleColumns:v,_fnCalculateEnd:B,_fnConvertToWidth:La,_fnCalculateColumnWidths:ba,_fnScrollingWidthAdjust:Na,_fnGetWidestNode:Ma,_fnGetMaxLenString:Oa,_fnStringToCss:q,_fnDetectType:A,_fnSettingsFromNode:t,_fnGetDataMaster:Y,_fnGetTrNodes:S,_fnGetTdNodes:L,_fnEscapeRegex:na,_fnDeleteIndex:fa,_fnReOrderIndex:E,_fnColumnOrdering:y,_fnLog:F,_fnClearTable:ea,_fnSaveState:qa,_fnLoadState:Ra,_fnCreateCookie:function(a, 
    114 b,c,d,e){var g=new Date;g.setTime(g.getTime()+1E3*c);var c=V.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(),i;null!==e?(i="function"===typeof h.parseJSON?h.parseJSON(b):eval("("+b+")"),b=e(a,i,g.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+g.toGMTString()+"; path="+c.join("/")+"/";e="";g=9999999999999;if(4096<(null!==Sa(a)?l.cookie.length:b.length+l.cookie.length)+10){for(var a=l.cookie.split(";"),j=0,o=a.length;j<o;j++)if(-1!=a[j].indexOf(d)){var k= 
    115 a[j].split("=");try{i=eval("("+decodeURIComponent(k[1])+")")}catch(m){continue}if(i.iCreate&&i.iCreate<g)e=k[0],g=i.iCreate}if(""!==e)l.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/"}l.cookie=b},_fnReadCookie:Sa,_fnDetectHeader:T,_fnGetUniqueThs:O,_fnScrollBarWidth:Pa,_fnApplyToChildren:N,_fnMap:p,_fnGetRowData:X,_fnGetCellData:w,_fnSetCellData:I,_fnGetObjectDataFn:W,_fnSetObjectDataFn:ta,_fnApplyColumnDefs:J,_fnBindAction:Qa,_fnExtend:Ta,_fnCallbackReg:C,_fnCallbackFire:D, 
    116 _fnJsonString:Va,_fnRender:R,_fnNodeToColumnIndex:da,_fnInfoMacros:ha};h.extend(j.ext.oApi,this.oApi);for(var ra in j.ext.oApi)ra&&(this[ra]=Ua(ra));var sa=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var f=!1,g=!1;if("table"!=this.nodeName.toLowerCase())F(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{for(a=0,b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===m||e.bRetrieve)return j.settings[a].oInstance; 
    117 if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{F(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy");return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var i=h.extend(!0,{},j.models.oSettings,{nTable:this,oApi:sa.oApi,oInit:e,sDestroyWidth:h(this).width(),sInstance:c, 
    118 sTableId:c});j.settings.push(i);i.oInstance=1===sa.length?sa:h(this).dataTable();e||(e={});e.oLanguage&&oa(e.oLanguage);e=Ta(h.extend(!0,{},j.defaults),e);p(i.oFeatures,e,"bPaginate");p(i.oFeatures,e,"bLengthChange");p(i.oFeatures,e,"bFilter");p(i.oFeatures,e,"bSort");p(i.oFeatures,e,"bInfo");p(i.oFeatures,e,"bProcessing");p(i.oFeatures,e,"bAutoWidth");p(i.oFeatures,e,"bSortClasses");p(i.oFeatures,e,"bServerSide");p(i.oFeatures,e,"bDeferRender");p(i.oScroll,e,"sScrollX","sX");p(i.oScroll,e,"sScrollXInner", 
    119 "sXInner");p(i.oScroll,e,"sScrollY","sY");p(i.oScroll,e,"bScrollCollapse","bCollapse");p(i.oScroll,e,"bScrollInfinite","bInfinite");p(i.oScroll,e,"iScrollLoadGap","iLoadGap");p(i.oScroll,e,"bScrollAutoCss","bAutoCss");p(i,e,"asStripeClasses");p(i,e,"asStripClasses","asStripeClasses");p(i,e,"fnServerData");p(i,e,"fnFormatNumber");p(i,e,"sServerMethod");p(i,e,"aaSorting");p(i,e,"aaSortingFixed");p(i,e,"aLengthMenu");p(i,e,"sPaginationType");p(i,e,"sAjaxSource");p(i,e,"sAjaxDataProp");p(i,e,"iCookieDuration"); 
    120 p(i,e,"sCookiePrefix");p(i,e,"sDom");p(i,e,"bSortCellsTop");p(i,e,"iTabIndex");p(i,e,"oSearch","oPreviousSearch");p(i,e,"aoSearchCols","aoPreSearchCols");p(i,e,"iDisplayLength","_iDisplayLength");p(i,e,"bJQueryUI","bJUI");p(i,e,"fnCookieCallback");p(i,e,"fnStateLoad");p(i,e,"fnStateSave");p(i.oLanguage,e,"fnInfoCallback");C(i,"aoDrawCallback",e.fnDrawCallback,"user");C(i,"aoServerParams",e.fnServerParams,"user");C(i,"aoStateSaveParams",e.fnStateSaveParams,"user");C(i,"aoStateLoadParams",e.fnStateLoadParams, 
    121 "user");C(i,"aoStateLoaded",e.fnStateLoaded,"user");C(i,"aoRowCallback",e.fnRowCallback,"user");C(i,"aoRowCreatedCallback",e.fnCreatedRow,"user");C(i,"aoHeaderCallback",e.fnHeaderCallback,"user");C(i,"aoFooterCallback",e.fnFooterCallback,"user");C(i,"aoInitComplete",e.fnInitComplete,"user");C(i,"aoPreDrawCallback",e.fnPreDrawCallback,"user");i.oFeatures.bServerSide&&i.oFeatures.bSort&&i.oFeatures.bSortClasses?C(i,"aoDrawCallback",Q,"server_side_sort_classes"):i.oFeatures.bDeferRender&&C(i,"aoDrawCallback", 
    122 Q,"defer_sort_classes");if(e.bJQueryUI){if(h.extend(i.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom)i.sDom='<"H"lfr>t<"F"ip>'}else h.extend(i.oClasses,j.ext.oStdClasses);h(this).addClass(i.oClasses.sTable);if(""!==i.oScroll.sX||""!==i.oScroll.sY)i.oScroll.iBarWidth=Pa();if(i.iInitDisplayStart===m)i.iInitDisplayStart=e.iDisplayStart,i._iDisplayStart=e.iDisplayStart;if(e.bStateSave)i.oFeatures.bStateSave=!0,Ra(i,e),C(i,"aoDrawCallback",qa,"state_save");if(null!==e.iDeferLoading)i.bDeferLoading= 
    123 !0,a=h.isArray(e.iDeferLoading),i._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,i._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading;null!==e.aaData&&(g=!0);""!==e.oLanguage.sUrl?(i.oLanguage.sUrl=e.oLanguage.sUrl,h.getJSON(i.oLanguage.sUrl,null,function(a){oa(a);h.extend(!0,i.oLanguage,e.oLanguage,a);aa(i)}),f=!0):h.extend(!0,i.oLanguage,e.oLanguage);if(null===e.asStripeClasses)i.asStripeClasses=[i.oClasses.sStripeOdd,i.oClasses.sStripeEven];c=!1;d=h(this).children("tbody").children("tr"); 
    124 for(a=0,b=i.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(i.asStripeClasses[a])){c=!0;break}if(c)i.asDestroyStripes=["",""],h(d[0]).hasClass(i.oClasses.sStripeOdd)&&(i.asDestroyStripes[0]+=i.oClasses.sStripeOdd+" "),h(d[0]).hasClass(i.oClasses.sStripeEven)&&(i.asDestroyStripes[0]+=i.oClasses.sStripeEven),h(d[1]).hasClass(i.oClasses.sStripeOdd)&&(i.asDestroyStripes[1]+=i.oClasses.sStripeOdd+" "),h(d[1]).hasClass(i.oClasses.sStripeEven)&&(i.asDestroyStripes[1]+=i.oClasses.sStripeEven), 
    125 d.removeClass(i.asStripeClasses.join(" "));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(T(i.aoHeader,a[0]),c=O(i));if(null===e.aoColumns){d=[];for(a=0,b=c.length;a<b;a++)d.push(null)}else d=e.aoColumns;for(a=0,b=d.length;a<b;a++){if(e.saved_aoColumns!==m&&e.saved_aoColumns.length==b)null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible;o(i,c?c[a]:null)}J(i,e.aoColumnDefs,d,function(a,b){s(i,a,b)});for(a=0,b=i.aaSorting.length;a<b;a++){i.aaSorting[a][0]>=i.aoColumns.length&& 
    126 (i.aaSorting[a][0]=0);var k=i.aoColumns[i.aaSorting[a][0]];i.aaSorting[a][2]===m&&(i.aaSorting[a][2]=0);e.aaSorting===m&&i.saved_aaSorting===m&&(i.aaSorting[a][1]=k.asSorting[0]);for(c=0,d=k.asSorting.length;c<d;c++)if(i.aaSorting[a][1]==k.asSorting[c]){i.aaSorting[a][2]=c;break}}Q(i);a=h(this).children("caption").each(function(){this._captionSide=h(this).css("caption-side")});b=h(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));i.nTHead=b[0];b=h(this).children("tbody"); 
    127 0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));i.nTBody=b[0];i.nTBody.setAttribute("role","alert");i.nTBody.setAttribute("aria-live","polite");i.nTBody.setAttribute("aria-relevant","all");b=h(this).children("tfoot");if(0===b.length&&0<a.length&&(""!==i.oScroll.sX||""!==i.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);if(0<b.length)i.nTFoot=b[0],T(i.aoFooter,i.nTFoot);if(g)for(a=0;a<e.aaData.length;a++)H(i,e.aaData[a]);else ua(i);i.aiDisplay=i.aiDisplayMaster.slice(); 
    128 i.bInitialised=!0;!1===f&&aa(i)}})};j.fnVersionCheck=function(e){for(var h=function(e,h){for(;e.length<h;)e+="0";return e},m=j.ext.sVersion.split("."),e=e.split("."),k="",l="",r=0,v=e.length;r<v;r++)k+=h(m[r],3),l+=h(e[r],3);return parseInt(k,10)>=parseInt(l,10)};j.fnIsDataTable=function(e){for(var h=j.settings,m=0;m<h.length;m++)if(h[m].nTable===e||h[m].nScrollHead===e||h[m].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&h(k.nTable).is(":visible"))&& 
    129 o.push(k.nTable)});return o};j.version="1.9.1";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{},oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null, 
    130 asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mDataProp:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[], 
    131 asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1,bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var h=e+"",e=h.split(""),j="",h=h.length,k=0;k<h;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+ 
    132 j),j=e[h-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,m,k){k.jqXHR=h.ajax({url:e,data:j,success:function(e){h(k.oInstance).trigger("xhr",k);m(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,h){"parsererror"==h&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e= 
    133 this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof h.parseJSON?h.parseJSON(e):eval("("+e+")")}catch(m){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(e,h){this.oApi._fnCreateCookie(e.sCookiePrefix+e.sInstance,this.oApi._fnJsonString(h),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending", 
    134 sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"}, 
    135 oSearch:h.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"};j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mDataProp:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null, 
    136 sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null},oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[], 
    137 aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null, 
    138 aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal, 
    139 10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide?!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=h.extend(!0,{},j.models.ext); 
    140 h.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next",sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even", 
    141 sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"", 
    142 sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sFooterTH:""});h.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right", 
    143 sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w",sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_", 
    144 sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default",sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon", 
    145 sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default",sFooterTH:"ui-state-default"});h.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate,l=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>": 
    146 '<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';h(j).append(k);var r=h("a",j),k=r[0],r=r[1];e.oApi._fnBindAction(k,{action:"previous"},l);e.oApi._fnBindAction(r,{action:"next"},l);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",r.id=e.sTableId+ 
    147 "_next",k.setAttribute("aria-controls",e.sTableId),r.setAttribute("aria-controls",e.sTableId)},fnUpdate:function(e){if(e.aanFeatures.p)for(var h=e.oClasses,j=e.aanFeatures.p,k=0,m=j.length;k<m;k++)if(0!==j[k].childNodes.length)j[k].childNodes[0].className=0===e._iDisplayStart?h.sPagePrevDisabled:h.sPagePrevEnabled,j[k].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?h.sPageNextDisabled:h.sPageNextEnabled}},iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,m){var k=e.oLanguage.oPaginate, 
    148 l=e.oClasses,r=function(h){e.oApi._fnPageChange(e,h.data.action)&&m(e)};h(j).append('<a  tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a  tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageLast+'">'+k.sLast+"</a>");var v=h("a",j),k=v[0],l=v[1],A=v[2],v=v[3]; 
    149 e.oApi._fnBindAction(k,{action:"first"},r);e.oApi._fnBindAction(l,{action:"previous"},r);e.oApi._fnBindAction(A,{action:"next"},r);e.oApi._fnBindAction(v,{action:"last"},r);if(!e.aanFeatures.p)j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",A.id=e.sTableId+"_next",v.id=e.sTableId+"_last"},fnUpdate:function(e,m){if(e.aanFeatures.p){var l=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(l/2),x=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),r=Math.ceil(e._iDisplayStart/ 
    150 e._iDisplayLength)+1,v="",A,E=e.oClasses,y,J=e.aanFeatures.p,H=function(h){e.oApi._fnBindAction(this,{page:h+A-1},function(h){e.oApi._fnPageChange(e,h.data.page);m(e);h.preventDefault()})};-1===e._iDisplayLength?r=k=A=1:x<l?(A=1,k=x):r<=k?(A=1,k=l):r>=x-k?(A=x-l+1,k=x):(A=r-Math.ceil(l/2)+1,k=A+l-1);for(l=A;l<=k;l++)v+=r!==l?'<a tabindex="'+e.iTabIndex+'" class="'+E.sPageButton+'">'+e.fnFormatNumber(l)+"</a>":'<a tabindex="'+e.iTabIndex+'" class="'+E.sPageButtonActive+'">'+e.fnFormatNumber(l)+"</a>"; 
    151 for(l=0,k=J.length;l<k;l++)0!==J[l].childNodes.length&&(h("span:eq(0)",J[l]).html(v).children("a").each(H),y=J[l].getElementsByTagName("a"),y=[y[0],y[1],y[y.length-2],y[y.length-1]],h(y).removeClass(E.sPageButton+" "+E.sPageButtonActive+" "+E.sPageButtonStaticDisabled),h([y[0],y[1]]).addClass(1==r?E.sPageButtonStaticDisabled:E.sPageButton),h([y[2],y[3]]).addClass(0===x||r===x||-1===e._iDisplayLength?E.sPageButtonStaticDisabled:E.sPageButton))}}}});h.extend(j.ext.oSort,{"string-pre":function(e){"string"!= 
    152 typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,h){return e<h?-1:e>h?1:0},"string-desc":function(e,h){return e<h?1:e>h?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,h){return e<h?-1:e>h?1:0},"html-desc":function(e,h){return e<h?1:e>h?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00");return e},"date-asc":function(e,h){return e-h},"date-desc":function(e, 
    153 h){return h-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,h){return e-h},"numeric-desc":function(e,h){return h-e}});h.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var h,j=!1;h=e.charAt(0);if(-1=="0123456789-".indexOf(h))return null;for(var k=1;k<e.length;k++){h=e.charAt(k);if(-1=="0123456789.".indexOf(h))return null;if("."==h){if(j)return null;j=!0}}return"numeric"},function(e){var h=Date.parse(e);return null!== 
    154 h&&!isNaN(h)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);h.fn.DataTable=j;h.fn.dataTable=j;h.fn.dataTableSettings=j.settings;h.fn.dataTableExt=j.ext})(jQuery,window,document,void 0); 
     18(function(i,V,l,n){var j=function(e){function o(a,b){var c=j.defaults.columns,d=a.aoColumns.length,c=i.extend({},j.models.oColumn,c,{sSortingClass:a.oClasses.sSortable,sSortingClassJUI:a.oClasses.sSortJUI,nTh:b?b:l.createElement("th"),sTitle:c.sTitle?c.sTitle:b?b.innerHTML:"",aDataSort:c.aDataSort?c.aDataSort:[d],mDataProp:c.mDataProp?c.oDefaults:d});a.aoColumns.push(c);if(a.aoPreSearchCols[d]===n||null===a.aoPreSearchCols[d])a.aoPreSearchCols[d]=i.extend({},j.models.oSearch);else if(c=a.aoPreSearchCols[d], 
     19c.bRegex===n&&(c.bRegex=!0),c.bSmart===n&&(c.bSmart=!0),c.bCaseInsensitive===n)c.bCaseInsensitive=!0;r(a,d,null)}function r(a,b,c){b=a.aoColumns[b];c!==n&&null!==c&&(c.sType!==n&&(b.sType=c.sType,b._bAutoType=!1),i.extend(b,c),p(b,c,"sWidth","sWidthOrig"),c.iDataSort!==n&&(b.aDataSort=[c.iDataSort]),p(b,c,"aDataSort"));b.fnGetData=W(b.mDataProp);b.fnSetData=ta(b.mDataProp);a.oFeatures.bSort||(b.bSortable=!1);!b.bSortable||-1==i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting)?(b.sSortingClass= 
     20a.oClasses.sSortableNone,b.sSortingClassJUI=""):b.bSortable||-1==i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting)?(b.sSortingClass=a.oClasses.sSortable,b.sSortingClassJUI=a.oClasses.sSortJUI):-1!=i.inArray("asc",b.asSorting)&&-1==i.inArray("desc",b.asSorting)?(b.sSortingClass=a.oClasses.sSortableAsc,b.sSortingClassJUI=a.oClasses.sSortJUIAscAllowed):-1==i.inArray("asc",b.asSorting)&&-1!=i.inArray("desc",b.asSorting)&&(b.sSortingClass=a.oClasses.sSortableDesc,b.sSortingClassJUI=a.oClasses.sSortJUIDescAllowed)} 
     21function k(a){if(!1===a.oFeatures.bAutoWidth)return!1;ba(a);for(var b=0,c=a.aoColumns.length;b<c;b++)a.aoColumns[b].nTh.style.width=a.aoColumns[b].sWidth}function G(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,c==b)return d;return null}function t(a,b){for(var c=-1,d=0;d<a.aoColumns.length;d++)if(!0===a.aoColumns[d].bVisible&&c++,d==b)return!0===a.aoColumns[d].bVisible?c:null;return null}function v(a){for(var b=0,c=0;c<a.aoColumns.length;c++)!0===a.aoColumns[c].bVisible&& 
     22b++;return b}function z(a){for(var b=j.ext.aTypes,c=b.length,d=0;d<c;d++){var g=b[d](a);if(null!==g)return g}return"string"}function D(a,b){for(var c=b.split(","),d=[],g=0,f=a.aoColumns.length;g<f;g++)for(var h=0;h<f;h++)if(a.aoColumns[g].sName==c[h]){d.push(h);break}return d}function x(a){for(var b="",c=0,d=a.aoColumns.length;c<d;c++)b+=a.aoColumns[c].sName+",";return b.length==d?"":b.slice(0,-1)}function J(a,b,c,d){var g,f,h,e,s;if(b)for(g=b.length-1;0<=g;g--){var m=b[g].aTargets;i.isArray(m)|| 
     23E(a,1,"aTargets must be an array of targets, not a "+typeof m);f=0;for(h=m.length;f<h;f++)if("number"===typeof m[f]&&0<=m[f]){for(;a.aoColumns.length<=m[f];)o(a);d(m[f],b[g])}else if("number"===typeof m[f]&&0>m[f])d(a.aoColumns.length+m[f],b[g]);else if("string"===typeof m[f]){e=0;for(s=a.aoColumns.length;e<s;e++)("_all"==m[f]||i(a.aoColumns[e].nTh).hasClass(m[f]))&&d(e,b[g])}}if(c){g=0;for(a=c.length;g<a;g++)d(g,c[g])}}function H(a,b){var c;c=i.isArray(b)?b.slice():i.extend(!0,{},b);var d=a.aoData.length, 
     24g=i.extend(!0,{},j.models.oRow);g._aData=c;a.aoData.push(g);for(var f,g=0,h=a.aoColumns.length;g<h;g++)c=a.aoColumns[g],"function"===typeof c.fnRender&&c.bUseRendered&&null!==c.mDataProp?I(a,d,g,R(a,d,g)):I(a,d,g,w(a,d,g)),c._bAutoType&&"string"!=c.sType&&(f=w(a,d,g,"type"),null!==f&&""!==f&&(f=z(f),null===c.sType?c.sType=f:c.sType!=f&&"html"!=c.sType&&(c.sType="string")));a.aiDisplayMaster.push(d);a.oFeatures.bDeferRender||ca(a,d);return d}function ua(a){var b,c,d,g,f,h,e,s,m;if(a.bDeferLoading|| 
     25null===a.sAjaxSource){e=a.nTBody.childNodes;b=0;for(c=e.length;b<c;b++)if("TR"==e[b].nodeName.toUpperCase()){s=a.aoData.length;e[b]._DT_RowIndex=s;a.aoData.push(i.extend(!0,{},j.models.oRow,{nTr:e[b]}));a.aiDisplayMaster.push(s);h=e[b].childNodes;d=f=0;for(g=h.length;d<g;d++)if(m=h[d].nodeName.toUpperCase(),"TD"==m||"TH"==m)I(a,s,f,i.trim(h[d].innerHTML)),f++}}e=S(a);h=[];b=0;for(c=e.length;b<c;b++){d=0;for(g=e[b].childNodes.length;d<g;d++)f=e[b].childNodes[d],m=f.nodeName.toUpperCase(),("TD"==m|| 
     26"TH"==m)&&h.push(f)}g=0;for(e=a.aoColumns.length;g<e;g++){m=a.aoColumns[g];null===m.sTitle&&(m.sTitle=m.nTh.innerHTML);f=m._bAutoType;s="function"===typeof m.fnRender;var o=null!==m.sClass,k=m.bVisible,n,r;if(f||s||o||!k){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],n=h[b*e+g],f&&"string"!=m.sType&&(r=w(a,b,g,"type"),""!==r&&(r=z(r),null===m.sType?m.sType=r:m.sType!=r&&"html"!=m.sType&&(m.sType="string"))),"function"===typeof m.mDataProp&&(n.innerHTML=w(a,b,g,"display")),s&&(r=R(a,b,g),n.innerHTML= 
     27r,m.bUseRendered&&I(a,b,g,r)),o&&(n.className+=" "+m.sClass),k?d._anHidden[g]=null:(d._anHidden[g]=n,n.parentNode.removeChild(n)),m.fnCreatedCell&&m.fnCreatedCell.call(a.oInstance,n,w(a,b,g,"display"),d._aData,b,g)}}if(0!==a.aoRowCreatedCallback.length){b=0;for(c=a.aoData.length;b<c;b++)d=a.aoData[b],C(a,"aoRowCreatedCallback",null,[d.nTr,d._aData,b])}}function K(a,b){return b._DT_RowIndex!==n?b._DT_RowIndex:null}function da(a,b,c){for(var b=L(a,b),d=0,a=a.aoColumns.length;d<a;d++)if(b[d]===c)return d; 
     28return-1}function X(a,b,c){for(var d=[],g=0,f=a.aoColumns.length;g<f;g++)d.push(w(a,b,g,c));return d}function w(a,b,c,d){var g=a.aoColumns[c];if((c=g.fnGetData(a.aoData[b]._aData,d))===n)return a.iDrawError!=a.iDraw&&null===g.sDefaultContent&&(E(a,0,"Requested unknown parameter "+("function"==typeof g.mDataProp?"{mDataprop function}":"'"+g.mDataProp+"'")+" from the data source for row "+b),a.iDrawError=a.iDraw),g.sDefaultContent;if(null===c&&null!==g.sDefaultContent)c=g.sDefaultContent;else if("function"=== 
     29typeof c)return c();return"display"==d&&null===c?"":c}function I(a,b,c,d){a.aoColumns[c].fnSetData(a.aoData[b]._aData,d)}function W(a){if(null===a)return function(){return null};if("function"===typeof a)return function(b,d){return a(b,d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a){for(var d=0,g=b.length;d<g;d++)if(a=a[b[d]],a===n)return n;return a}}return function(b){return b[a]}}function ta(a){if(null===a)return function(){};if("function"===typeof a)return function(b, 
     30d){a(b,"set",d)};if("string"===typeof a&&-1!=a.indexOf(".")){var b=a.split(".");return function(a,d){for(var g=0,f=b.length-1;g<f;g++)a[b[g]]===n&&(a[b[g]]={}),a=a[b[g]];a[b[b.length-1]]=d}}return function(b,d){b[a]=d}}function Y(a){for(var b=[],c=a.aoData.length,d=0;d<c;d++)b.push(a.aoData[d]._aData);return b}function ea(a){a.aoData.splice(0,a.aoData.length);a.aiDisplayMaster.splice(0,a.aiDisplayMaster.length);a.aiDisplay.splice(0,a.aiDisplay.length);A(a)}function fa(a,b){for(var c=-1,d=0,g=a.length;d< 
     31g;d++)a[d]==b?c=d:a[d]>b&&a[d]--; -1!=c&&a.splice(c,1)}function R(a,b,c){var d=a.aoColumns[c];return d.fnRender({iDataRow:b,iDataColumn:c,oSettings:a,aData:a.aoData[b]._aData,mDataProp:d.mDataProp},w(a,b,c,"display"))}function ca(a,b){var c=a.aoData[b],d;if(null===c.nTr){c.nTr=l.createElement("tr");c.nTr._DT_RowIndex=b;c._aData.DT_RowId&&(c.nTr.id=c._aData.DT_RowId);c._aData.DT_RowClass&&i(c.nTr).addClass(c._aData.DT_RowClass);for(var g=0,f=a.aoColumns.length;g<f;g++){var h=a.aoColumns[g];d=l.createElement(h.sCellType); 
     32d.innerHTML="function"===typeof h.fnRender&&(!h.bUseRendered||null===h.mDataProp)?R(a,b,g):w(a,b,g,"display");null!==h.sClass&&(d.className=h.sClass);h.bVisible?(c.nTr.appendChild(d),c._anHidden[g]=null):c._anHidden[g]=d;h.fnCreatedCell&&h.fnCreatedCell.call(a.oInstance,d,w(a,b,g,"display"),c._aData,b,g)}C(a,"aoRowCreatedCallback",null,[c.nTr,c._aData,b])}}function va(a){var b,c,d;if(0!==a.nTHead.getElementsByTagName("th").length){b=0;for(d=a.aoColumns.length;b<d;b++)if(c=a.aoColumns[b].nTh,c.setAttribute("role", 
     33"columnheader"),a.aoColumns[b].bSortable&&(c.setAttribute("tabindex",a.iTabIndex),c.setAttribute("aria-controls",a.sTableId)),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),a.aoColumns[b].sTitle!=c.innerHTML)c.innerHTML=a.aoColumns[b].sTitle}else{var g=l.createElement("tr");b=0;for(d=a.aoColumns.length;b<d;b++)c=a.aoColumns[b].nTh,c.innerHTML=a.aoColumns[b].sTitle,c.setAttribute("tabindex","0"),null!==a.aoColumns[b].sClass&&i(c).addClass(a.aoColumns[b].sClass),g.appendChild(c); 
     34i(a.nTHead).html("")[0].appendChild(g);T(a.aoHeader,a.nTHead)}i(a.nTHead).children("tr").attr("role","row");if(a.bJUI){b=0;for(d=a.aoColumns.length;b<d;b++){c=a.aoColumns[b].nTh;g=l.createElement("div");g.className=a.oClasses.sSortJUIWrapper;i(c).contents().appendTo(g);var f=l.createElement("span");f.className=a.oClasses.sSortIcon;g.appendChild(f);c.appendChild(g)}}if(a.oFeatures.bSort)for(b=0;b<a.aoColumns.length;b++)!1!==a.aoColumns[b].bSortable?ga(a,a.aoColumns[b].nTh,b):i(a.aoColumns[b].nTh).addClass(a.oClasses.sSortableNone); 
     35""!==a.oClasses.sFooterTH&&i(a.nTFoot).children("tr").children("th").addClass(a.oClasses.sFooterTH);if(null!==a.nTFoot){c=O(a,null,a.aoFooter);b=0;for(d=a.aoColumns.length;b<d;b++)c[b]&&(a.aoColumns[b].nTf=c[b],a.aoColumns[b].sClass&&i(c[b]).addClass(a.aoColumns[b].sClass))}}function U(a,b,c){var d,g,f,h=[],e=[],i=a.aoColumns.length,m;c===n&&(c=!1);d=0;for(g=b.length;d<g;d++){h[d]=b[d].slice();h[d].nTr=b[d].nTr;for(f=i-1;0<=f;f--)!a.aoColumns[f].bVisible&&!c&&h[d].splice(f,1);e.push([])}d=0;for(g= 
     36h.length;d<g;d++){if(a=h[d].nTr)for(;f=a.firstChild;)a.removeChild(f);f=0;for(b=h[d].length;f<b;f++)if(m=i=1,e[d][f]===n){a.appendChild(h[d][f].cell);for(e[d][f]=1;h[d+i]!==n&&h[d][f].cell==h[d+i][f].cell;)e[d+i][f]=1,i++;for(;h[d][f+m]!==n&&h[d][f].cell==h[d][f+m].cell;){for(c=0;c<i;c++)e[d+c][f+m]=1;m++}h[d][f].cell.rowSpan=i;h[d][f].cell.colSpan=m}}}function y(a){var b=C(a,"aoPreDrawCallback","preDraw",[a]);if(-1!==i.inArray(!1,b))F(a,!1);else{var c,d,b=[],g=0,f=a.asStripeClasses.length;c=a.aoOpenRows.length; 
     37a.bDrawing=!0;a.iInitDisplayStart!==n&&-1!=a.iInitDisplayStart&&(a._iDisplayStart=a.oFeatures.bServerSide?a.iInitDisplayStart:a.iInitDisplayStart>=a.fnRecordsDisplay()?0:a.iInitDisplayStart,a.iInitDisplayStart=-1,A(a));if(a.bDeferLoading)a.bDeferLoading=!1,a.iDraw++;else if(a.oFeatures.bServerSide){if(!a.bDestroying&&!wa(a))return}else a.iDraw++;if(0!==a.aiDisplay.length){var h=a._iDisplayStart;d=a._iDisplayEnd;a.oFeatures.bServerSide&&(h=0,d=a.aoData.length);for(;h<d;h++){var e=a.aoData[a.aiDisplay[h]]; 
     38null===e.nTr&&ca(a,a.aiDisplay[h]);var s=e.nTr;if(0!==f){var m=a.asStripeClasses[g%f];e._sRowStripe!=m&&(i(s).removeClass(e._sRowStripe).addClass(m),e._sRowStripe=m)}C(a,"aoRowCallback",null,[s,a.aoData[a.aiDisplay[h]]._aData,g,h]);b.push(s);g++;if(0!==c)for(e=0;e<c;e++)if(s==a.aoOpenRows[e].nParent){b.push(a.aoOpenRows[e].nTr);break}}}else b[0]=l.createElement("tr"),a.asStripeClasses[0]&&(b[0].className=a.asStripeClasses[0]),c=a.oLanguage,f=c.sZeroRecords,1==a.iDraw&&null!==a.sAjaxSource&&!a.oFeatures.bServerSide? 
     39f=c.sLoadingRecords:c.sEmptyTable&&0===a.fnRecordsTotal()&&(f=c.sEmptyTable),c=l.createElement("td"),c.setAttribute("valign","top"),c.colSpan=v(a),c.className=a.oClasses.sRowEmpty,c.innerHTML=ha(a,f),b[g].appendChild(c);C(a,"aoHeaderCallback","header",[i(a.nTHead).children("tr")[0],Y(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);C(a,"aoFooterCallback","footer",[i(a.nTFoot).children("tr")[0],Y(a),a._iDisplayStart,a.fnDisplayEnd(),a.aiDisplay]);g=l.createDocumentFragment();c=l.createDocumentFragment(); 
     40if(a.nTBody){f=a.nTBody.parentNode;c.appendChild(a.nTBody);if(!a.oScroll.bInfinite||!a._bInitComplete||a.bSorted||a.bFiltered)for(;c=a.nTBody.firstChild;)a.nTBody.removeChild(c);c=0;for(d=b.length;c<d;c++)g.appendChild(b[c]);a.nTBody.appendChild(g);null!==f&&f.appendChild(a.nTBody)}C(a,"aoDrawCallback","draw",[a]);a.bSorted=!1;a.bFiltered=!1;a.bDrawing=!1;a.oFeatures.bServerSide&&(F(a,!1),a._bInitComplete||Z(a))}}function $(a){a.oFeatures.bSort?P(a,a.oPreviousSearch):a.oFeatures.bFilter?M(a,a.oPreviousSearch): 
     41(A(a),y(a))}function xa(a){var b=i("<div></div>")[0];a.nTable.parentNode.insertBefore(b,a.nTable);a.nTableWrapper=i('<div id="'+a.sTableId+'_wrapper" class="'+a.oClasses.sWrapper+'" role="grid"></div>')[0];a.nTableReinsertBefore=a.nTable.nextSibling;for(var c=a.nTableWrapper,d=a.sDom.split(""),g,f,h,e,s,m,o,k=0;k<d.length;k++){f=0;h=d[k];if("<"==h){e=i("<div></div>")[0];s=d[k+1];if("'"==s||'"'==s){m="";for(o=2;d[k+o]!=s;)m+=d[k+o],o++;"H"==m?m=a.oClasses.sJUIHeader:"F"==m&&(m=a.oClasses.sJUIFooter); 
     42-1!=m.indexOf(".")?(s=m.split("."),e.id=s[0].substr(1,s[0].length-1),e.className=s[1]):"#"==m.charAt(0)?e.id=m.substr(1,m.length-1):e.className=m;k+=o}c.appendChild(e);c=e}else if(">"==h)c=c.parentNode;else if("l"==h&&a.oFeatures.bPaginate&&a.oFeatures.bLengthChange)g=ya(a),f=1;else if("f"==h&&a.oFeatures.bFilter)g=za(a),f=1;else if("r"==h&&a.oFeatures.bProcessing)g=Aa(a),f=1;else if("t"==h)g=Ba(a),f=1;else if("i"==h&&a.oFeatures.bInfo)g=Ca(a),f=1;else if("p"==h&&a.oFeatures.bPaginate)g=Da(a),f=1; 
     43else if(0!==j.ext.aoFeatures.length){e=j.ext.aoFeatures;o=0;for(s=e.length;o<s;o++)if(h==e[o].cFeature){(g=e[o].fnInit(a))&&(f=1);break}}1==f&&null!==g&&("object"!==typeof a.aanFeatures[h]&&(a.aanFeatures[h]=[]),a.aanFeatures[h].push(g),c.appendChild(g))}b.parentNode.replaceChild(a.nTableWrapper,b)}function T(a,b){var c=i(b).children("tr"),d,g,f,h,e,s,m,j;a.splice(0,a.length);g=0;for(s=c.length;g<s;g++)a.push([]);g=0;for(s=c.length;g<s;g++){f=0;for(m=c[g].childNodes.length;f<m;f++)if(d=c[g].childNodes[f], 
     44"TD"==d.nodeName.toUpperCase()||"TH"==d.nodeName.toUpperCase()){var o=1*d.getAttribute("colspan"),k=1*d.getAttribute("rowspan"),o=!o||0===o||1===o?1:o,k=!k||0===k||1===k?1:k;for(h=0;a[g][h];)h++;j=h;for(e=0;e<o;e++)for(h=0;h<k;h++)a[g+h][j+e]={cell:d,unique:1==o?!0:!1},a[g+h].nTr=c[g]}}}function O(a,b,c){var d=[];c||(c=a.aoHeader,b&&(c=[],T(c,b)));for(var b=0,g=c.length;b<g;b++)for(var f=0,h=c[b].length;f<h;f++)if(c[b][f].unique&&(!d[f]||!a.bSortCellsTop))d[f]=c[b][f].cell;return d}function wa(a){if(a.bAjaxDataGet){a.iDraw++; 
     45F(a,!0);var b=Ea(a);ia(a,b);a.fnServerData.call(a.oInstance,a.sAjaxSource,b,function(b){Fa(a,b)},a);return!1}return!0}function Ea(a){var b=a.aoColumns.length,c=[],d,g,f,h;c.push({name:"sEcho",value:a.iDraw});c.push({name:"iColumns",value:b});c.push({name:"sColumns",value:x(a)});c.push({name:"iDisplayStart",value:a._iDisplayStart});c.push({name:"iDisplayLength",value:!1!==a.oFeatures.bPaginate?a._iDisplayLength:-1});for(f=0;f<b;f++)d=a.aoColumns[f].mDataProp,c.push({name:"mDataProp_"+f,value:"function"=== 
     46typeof d?"function":d});if(!1!==a.oFeatures.bFilter){c.push({name:"sSearch",value:a.oPreviousSearch.sSearch});c.push({name:"bRegex",value:a.oPreviousSearch.bRegex});for(f=0;f<b;f++)c.push({name:"sSearch_"+f,value:a.aoPreSearchCols[f].sSearch}),c.push({name:"bRegex_"+f,value:a.aoPreSearchCols[f].bRegex}),c.push({name:"bSearchable_"+f,value:a.aoColumns[f].bSearchable})}if(!1!==a.oFeatures.bSort){var e=0;d=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(f=0;f<d.length;f++){g= 
     47a.aoColumns[d[f][0]].aDataSort;for(h=0;h<g.length;h++)c.push({name:"iSortCol_"+e,value:g[h]}),c.push({name:"sSortDir_"+e,value:d[f][1]}),e++}c.push({name:"iSortingCols",value:e});for(f=0;f<b;f++)c.push({name:"bSortable_"+f,value:a.aoColumns[f].bSortable})}return c}function ia(a,b){C(a,"aoServerParams","serverParams",[b])}function Fa(a,b){if(b.sEcho!==n){if(1*b.sEcho<a.iDraw)return;a.iDraw=1*b.sEcho}(!a.oScroll.bInfinite||a.oScroll.bInfinite&&(a.bSorted||a.bFiltered))&&ea(a);a._iRecordsTotal=parseInt(b.iTotalRecords, 
     4810);a._iRecordsDisplay=parseInt(b.iTotalDisplayRecords,10);var c=x(a),c=b.sColumns!==n&&""!==c&&b.sColumns!=c,d;c&&(d=D(a,b.sColumns));for(var g=W(a.sAjaxDataProp)(b),f=0,h=g.length;f<h;f++)if(c){for(var e=[],i=0,m=a.aoColumns.length;i<m;i++)e.push(g[f][d[i]]);H(a,e)}else H(a,g[f]);a.aiDisplay=a.aiDisplayMaster.slice();a.bAjaxDataGet=!1;y(a);a.bAjaxDataGet=!0;F(a,!1)}function za(a){var b=a.oPreviousSearch,c=a.oLanguage.sSearch,c=-1!==c.indexOf("_INPUT_")?c.replace("_INPUT_",'<input type="text" />'): 
     49""===c?'<input type="text" />':c+' <input type="text" />',d=l.createElement("div");d.className=a.oClasses.sFilter;d.innerHTML="<label>"+c+"</label>";a.aanFeatures.f||(d.id=a.sTableId+"_filter");c=i('input[type="text"]',d);d._DT_Input=c[0];c.val(b.sSearch.replace('"',"&quot;"));c.bind("keyup.DT",function(){for(var c=a.aanFeatures.f,d=this.value===""?"":this.value,h=0,e=c.length;h<e;h++)c[h]!=i(this).parents("div.dataTables_filter")[0]&&i(c[h]._DT_Input).val(d);d!=b.sSearch&&M(a,{sSearch:d,bRegex:b.bRegex, 
     50bSmart:b.bSmart,bCaseInsensitive:b.bCaseInsensitive})});c.attr("aria-controls",a.sTableId).bind("keypress.DT",function(a){if(a.keyCode==13)return false});return d}function M(a,b,c){var d=a.oPreviousSearch,g=a.aoPreSearchCols,f=function(a){d.sSearch=a.sSearch;d.bRegex=a.bRegex;d.bSmart=a.bSmart;d.bCaseInsensitive=a.bCaseInsensitive};if(a.oFeatures.bServerSide)f(b);else{Ga(a,b.sSearch,c,b.bRegex,b.bSmart,b.bCaseInsensitive);f(b);for(b=0;b<a.aoPreSearchCols.length;b++)Ha(a,g[b].sSearch,b,g[b].bRegex, 
     51g[b].bSmart,g[b].bCaseInsensitive);Ia(a)}a.bFiltered=!0;i(a.oInstance).trigger("filter",a);a._iDisplayStart=0;A(a);y(a);ja(a,0)}function Ia(a){for(var b=j.ext.afnFiltering,c=0,d=b.length;c<d;c++)for(var g=0,f=0,h=a.aiDisplay.length;f<h;f++){var e=a.aiDisplay[f-g];b[c](a,X(a,e,"filter"),e)||(a.aiDisplay.splice(f-g,1),g++)}}function Ha(a,b,c,d,g,f){if(""!==b)for(var h=0,b=ka(b,d,g,f),d=a.aiDisplay.length-1;0<=d;d--)g=la(w(a,a.aiDisplay[d],c,"filter"),a.aoColumns[c].sType),b.test(g)||(a.aiDisplay.splice(d, 
     521),h++)}function Ga(a,b,c,d,g,f){d=ka(b,d,g,f);g=a.oPreviousSearch;c||(c=0);0!==j.ext.afnFiltering.length&&(c=1);if(0>=b.length)a.aiDisplay.splice(0,a.aiDisplay.length),a.aiDisplay=a.aiDisplayMaster.slice();else if(a.aiDisplay.length==a.aiDisplayMaster.length||g.sSearch.length>b.length||1==c||0!==b.indexOf(g.sSearch)){a.aiDisplay.splice(0,a.aiDisplay.length);ja(a,1);for(b=0;b<a.aiDisplayMaster.length;b++)d.test(a.asDataSearch[b])&&a.aiDisplay.push(a.aiDisplayMaster[b])}else for(b=c=0;b<a.asDataSearch.length;b++)d.test(a.asDataSearch[b])|| 
     53(a.aiDisplay.splice(b-c,1),c++)}function ja(a,b){if(!a.oFeatures.bServerSide){a.asDataSearch.splice(0,a.asDataSearch.length);for(var c=b&&1===b?a.aiDisplayMaster:a.aiDisplay,d=0,g=c.length;d<g;d++)a.asDataSearch[d]=ma(a,X(a,c[d],"filter"))}}function ma(a,b){var c="";a.__nTmpFilter===n&&(a.__nTmpFilter=l.createElement("div"));for(var d=a.__nTmpFilter,g=0,f=a.aoColumns.length;g<f;g++)a.aoColumns[g].bSearchable&&(c+=la(b[g],a.aoColumns[g].sType)+"  ");-1!==c.indexOf("&")&&(d.innerHTML=c,c=d.textContent? 
     54d.textContent:d.innerText,c=c.replace(/\n/g," ").replace(/\r/g,""));return c}function ka(a,b,c,d){if(c)return a=b?a.split(" "):na(a).split(" "),a="^(?=.*?"+a.join(")(?=.*?")+").*$",RegExp(a,d?"i":"");a=b?a:na(a);return RegExp(a,d?"i":"")}function la(a,b){return"function"===typeof j.ext.ofnSearch[b]?j.ext.ofnSearch[b](a):null===a?"":"html"==b?a.replace(/[\r\n]/g," ").replace(/<.*?>/g,""):"string"===typeof a?a.replace(/[\r\n]/g," "):a}function na(a){return a.replace(RegExp("(\\/|\\.|\\*|\\+|\\?|\\||\\(|\\)|\\[|\\]|\\{|\\}|\\\\|\\$|\\^|\\-)", 
     55"g"),"\\$1")}function Ca(a){var b=l.createElement("div");b.className=a.oClasses.sInfo;a.aanFeatures.i||(a.aoDrawCallback.push({fn:Ja,sName:"information"}),b.id=a.sTableId+"_info");a.nTable.setAttribute("aria-describedby",a.sTableId+"_info");return b}function Ja(a){if(a.oFeatures.bInfo&&0!==a.aanFeatures.i.length){var b=a.oLanguage,c=a._iDisplayStart+1,d=a.fnDisplayEnd(),g=a.fnRecordsTotal(),f=a.fnRecordsDisplay(),h;h=0===f&&f==g?b.sInfoEmpty:0===f?b.sInfoEmpty+" "+b.sInfoFiltered:f==g?b.sInfo:b.sInfo+ 
     56" "+b.sInfoFiltered;h+=b.sInfoPostFix;h=ha(a,h);null!==b.fnInfoCallback&&(h=b.fnInfoCallback.call(a.oInstance,a,c,d,g,f,h));a=a.aanFeatures.i;b=0;for(c=a.length;b<c;b++)i(a[b]).html(h)}}function ha(a,b){var c=a.fnFormatNumber(a._iDisplayStart+1),d=a.fnDisplayEnd(),d=a.fnFormatNumber(d),g=a.fnRecordsDisplay(),g=a.fnFormatNumber(g),f=a.fnRecordsTotal(),f=a.fnFormatNumber(f);a.oScroll.bInfinite&&(c=a.fnFormatNumber(1));return b.replace("_START_",c).replace("_END_",d).replace("_TOTAL_",g).replace("_MAX_", 
     57f)}function aa(a){var b,c,d=a.iInitDisplayStart;if(!1===a.bInitialised)setTimeout(function(){aa(a)},200);else{xa(a);va(a);U(a,a.aoHeader);a.nTFoot&&U(a,a.aoFooter);F(a,!0);a.oFeatures.bAutoWidth&&ba(a);b=0;for(c=a.aoColumns.length;b<c;b++)null!==a.aoColumns[b].sWidth&&(a.aoColumns[b].nTh.style.width=q(a.aoColumns[b].sWidth));a.oFeatures.bSort?P(a):a.oFeatures.bFilter?M(a,a.oPreviousSearch):(a.aiDisplay=a.aiDisplayMaster.slice(),A(a),y(a));null!==a.sAjaxSource&&!a.oFeatures.bServerSide?(c=[],ia(a, 
     58c),a.fnServerData.call(a.oInstance,a.sAjaxSource,c,function(c){var f=a.sAjaxDataProp!==""?W(a.sAjaxDataProp)(c):c;for(b=0;b<f.length;b++)H(a,f[b]);a.iInitDisplayStart=d;if(a.oFeatures.bSort)P(a);else{a.aiDisplay=a.aiDisplayMaster.slice();A(a);y(a)}F(a,false);Z(a,c)},a)):a.oFeatures.bServerSide||(F(a,!1),Z(a))}}function Z(a,b){a._bInitComplete=!0;C(a,"aoInitComplete","init",[a,b])}function oa(a){var b=j.defaults.oLanguage;!a.sEmptyTable&&(a.sZeroRecords&&"No data available in table"===b.sEmptyTable)&& 
     59p(a,a,"sZeroRecords","sEmptyTable");!a.sLoadingRecords&&(a.sZeroRecords&&"Loading..."===b.sLoadingRecords)&&p(a,a,"sZeroRecords","sLoadingRecords")}function ya(a){if(a.oScroll.bInfinite)return null;var b='<select size="1" '+('name="'+a.sTableId+'_length"')+">",c,d,g=a.aLengthMenu;if(2==g.length&&"object"===typeof g[0]&&"object"===typeof g[1]){c=0;for(d=g[0].length;c<d;c++)b+='<option value="'+g[0][c]+'">'+g[1][c]+"</option>"}else{c=0;for(d=g.length;c<d;c++)b+='<option value="'+g[c]+'">'+g[c]+"</option>"}b+= 
     60"</select>";g=l.createElement("div");a.aanFeatures.l||(g.id=a.sTableId+"_length");g.className=a.oClasses.sLength;g.innerHTML="<label>"+a.oLanguage.sLengthMenu.replace("_MENU_",b)+"</label>";i('select option[value="'+a._iDisplayLength+'"]',g).attr("selected",!0);i("select",g).bind("change.DT",function(){var b=i(this).val(),g=a.aanFeatures.l;c=0;for(d=g.length;c<d;c++)g[c]!=this.parentNode&&i("select",g[c]).val(b);a._iDisplayLength=parseInt(b,10);A(a);if(a.fnDisplayEnd()==a.fnRecordsDisplay()){a._iDisplayStart= 
     61a.fnDisplayEnd()-a._iDisplayLength;if(a._iDisplayStart<0)a._iDisplayStart=0}if(a._iDisplayLength==-1)a._iDisplayStart=0;y(a)});i("select",g).attr("aria-controls",a.sTableId);return g}function A(a){a._iDisplayEnd=!1===a.oFeatures.bPaginate?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength>a.aiDisplay.length||-1==a._iDisplayLength?a.aiDisplay.length:a._iDisplayStart+a._iDisplayLength}function Da(a){if(a.oScroll.bInfinite)return null;var b=l.createElement("div");b.className=a.oClasses.sPaging+a.sPaginationType; 
     62j.ext.oPagination[a.sPaginationType].fnInit(a,b,function(a){A(a);y(a)});a.aanFeatures.p||a.aoDrawCallback.push({fn:function(a){j.ext.oPagination[a.sPaginationType].fnUpdate(a,function(a){A(a);y(a)})},sName:"pagination"});return b}function pa(a,b){var c=a._iDisplayStart;if("number"===typeof b)a._iDisplayStart=b*a._iDisplayLength,a._iDisplayStart>a.fnRecordsDisplay()&&(a._iDisplayStart=0);else if("first"==b)a._iDisplayStart=0;else if("previous"==b)a._iDisplayStart=0<=a._iDisplayLength?a._iDisplayStart- 
     63a._iDisplayLength:0,0>a._iDisplayStart&&(a._iDisplayStart=0);else if("next"==b)0<=a._iDisplayLength?a._iDisplayStart+a._iDisplayLength<a.fnRecordsDisplay()&&(a._iDisplayStart+=a._iDisplayLength):a._iDisplayStart=0;else if("last"==b)if(0<=a._iDisplayLength){var d=parseInt((a.fnRecordsDisplay()-1)/a._iDisplayLength,10)+1;a._iDisplayStart=(d-1)*a._iDisplayLength}else a._iDisplayStart=0;else E(a,0,"Unknown paging action: "+b);i(a.oInstance).trigger("page",a);return c!=a._iDisplayStart}function Aa(a){var b= 
     64l.createElement("div");a.aanFeatures.r||(b.id=a.sTableId+"_processing");b.innerHTML=a.oLanguage.sProcessing;b.className=a.oClasses.sProcessing;a.nTable.parentNode.insertBefore(b,a.nTable);return b}function F(a,b){if(a.oFeatures.bProcessing)for(var c=a.aanFeatures.r,d=0,g=c.length;d<g;d++)c[d].style.visibility=b?"visible":"hidden";i(a.oInstance).trigger("processing",[a,b])}function Ba(a){if(""===a.oScroll.sX&&""===a.oScroll.sY)return a.nTable;var b=l.createElement("div"),c=l.createElement("div"),d= 
     65l.createElement("div"),g=l.createElement("div"),f=l.createElement("div"),h=l.createElement("div"),e=a.nTable.cloneNode(!1),j=a.nTable.cloneNode(!1),m=a.nTable.getElementsByTagName("thead")[0],o=0===a.nTable.getElementsByTagName("tfoot").length?null:a.nTable.getElementsByTagName("tfoot")[0],k=a.oClasses;c.appendChild(d);f.appendChild(h);g.appendChild(a.nTable);b.appendChild(c);b.appendChild(g);d.appendChild(e);e.appendChild(m);null!==o&&(b.appendChild(f),h.appendChild(j),j.appendChild(o));b.className= 
     66k.sScrollWrapper;c.className=k.sScrollHead;d.className=k.sScrollHeadInner;g.className=k.sScrollBody;f.className=k.sScrollFoot;h.className=k.sScrollFootInner;a.oScroll.bAutoCss&&(c.style.overflow="hidden",c.style.position="relative",f.style.overflow="hidden",g.style.overflow="auto");c.style.border="0";c.style.width="100%";f.style.border="0";d.style.width=""!==a.oScroll.sXInner?a.oScroll.sXInner:"100%";e.removeAttribute("id");e.style.marginLeft="0";a.nTable.style.marginLeft="0";null!==o&&(j.removeAttribute("id"), 
     67j.style.marginLeft="0");d=i(a.nTable).children("caption");0<d.length&&(d=d[0],"top"===d._captionSide?e.appendChild(d):"bottom"===d._captionSide&&o&&j.appendChild(d));""!==a.oScroll.sX&&(c.style.width=q(a.oScroll.sX),g.style.width=q(a.oScroll.sX),null!==o&&(f.style.width=q(a.oScroll.sX)),i(g).scroll(function(){c.scrollLeft=this.scrollLeft;if(o!==null)f.scrollLeft=this.scrollLeft}));""!==a.oScroll.sY&&(g.style.height=q(a.oScroll.sY));a.aoDrawCallback.push({fn:Ka,sName:"scrolling"});a.oScroll.bInfinite&& 
     68i(g).scroll(function(){if(!a.bDrawing&&i(this).scrollTop()!==0&&i(this).scrollTop()+i(this).height()>i(a.nTable).height()-a.oScroll.iLoadGap&&a.fnDisplayEnd()<a.fnRecordsDisplay()){pa(a,"next");A(a);y(a)}});a.nScrollHead=c;a.nScrollFoot=f;return b}function Ka(a){var b=a.nScrollHead.getElementsByTagName("div")[0],c=b.getElementsByTagName("table")[0],d=a.nTable.parentNode,g,f,h,e,j,m,o,k,n=[],r=null!==a.nTFoot?a.nScrollFoot.getElementsByTagName("div")[0]:null,p=null!==a.nTFoot?r.getElementsByTagName("table")[0]: 
     69null,l=i.browser.msie&&7>=i.browser.version;i(a.nTable).children("thead, tfoot").remove();h=i(a.nTHead).clone()[0];a.nTable.insertBefore(h,a.nTable.childNodes[0]);null!==a.nTFoot&&(j=i(a.nTFoot).clone()[0],a.nTable.insertBefore(j,a.nTable.childNodes[1]));""===a.oScroll.sX&&(d.style.width="100%",b.parentNode.style.width="100%");var t=O(a,h);g=0;for(f=t.length;g<f;g++)o=G(a,g),t[g].style.width=a.aoColumns[o].sWidth;null!==a.nTFoot&&N(function(a){a.style.width=""},j.getElementsByTagName("tr"));a.oScroll.bCollapse&& 
     70""!==a.oScroll.sY&&(d.style.height=d.offsetHeight+a.nTHead.offsetHeight+"px");g=i(a.nTable).outerWidth();if(""===a.oScroll.sX){if(a.nTable.style.width="100%",l&&(i("tbody",d).height()>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=q(i(a.nTable).outerWidth()-a.oScroll.iBarWidth)}else""!==a.oScroll.sXInner?a.nTable.style.width=q(a.oScroll.sXInner):g==i(d).width()&&i(d).height()<i(a.nTable).height()?(a.nTable.style.width=q(g-a.oScroll.iBarWidth),i(a.nTable).outerWidth()>g-a.oScroll.iBarWidth&& 
     71(a.nTable.style.width=q(g))):a.nTable.style.width=q(g);g=i(a.nTable).outerWidth();f=a.nTHead.getElementsByTagName("tr");h=h.getElementsByTagName("tr");N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth="0";m.borderBottomWidth="0";m.height=0;k=i(a).width();b.style.width=q(k);n.push(k)},h,f);i(h).height(0);null!==a.nTFoot&&(e=j.getElementsByTagName("tr"),j=a.nTFoot.getElementsByTagName("tr"),N(function(a,b){m=a.style;m.paddingTop="0";m.paddingBottom="0";m.borderTopWidth= 
     72"0";m.borderBottomWidth="0";m.height=0;k=i(a).width();b.style.width=q(k);n.push(k)},e,j),i(e).height(0));N(function(a){a.innerHTML="";a.style.width=q(n.shift())},h);null!==a.nTFoot&&N(function(a){a.innerHTML="";a.style.width=q(n.shift())},e);if(i(a.nTable).outerWidth()<g){e=d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")?g+a.oScroll.iBarWidth:g;if(l&&(d.scrollHeight>d.offsetHeight||"scroll"==i(d).css("overflow-y")))a.nTable.style.width=q(e-a.oScroll.iBarWidth);d.style.width=q(e);b.parentNode.style.width= 
     73q(e);null!==a.nTFoot&&(r.parentNode.style.width=q(e));""===a.oScroll.sX?E(a,1,"The table cannot fit into the current element which will cause column misalignment. The table has been drawn at its minimum possible width."):""!==a.oScroll.sXInner&&E(a,1,"The table cannot fit into the current element which will cause column misalignment. Increase the sScrollXInner value or remove it to allow automatic calculation")}else d.style.width=q("100%"),b.parentNode.style.width=q("100%"),null!==a.nTFoot&&(r.parentNode.style.width= 
     74q("100%"));""===a.oScroll.sY&&l&&(d.style.height=q(a.nTable.offsetHeight+a.oScroll.iBarWidth));""!==a.oScroll.sY&&a.oScroll.bCollapse&&(d.style.height=q(a.oScroll.sY),l=""!==a.oScroll.sX&&a.nTable.offsetWidth>d.offsetWidth?a.oScroll.iBarWidth:0,a.nTable.offsetHeight<d.offsetHeight&&(d.style.height=q(a.nTable.offsetHeight+l)));l=i(a.nTable).outerWidth();c.style.width=q(l);b.style.width=q(l);c=i(a.nTable).height()>d.clientHeight||"scroll"==i(d).css("overflow-y");b.style.paddingRight=c?a.oScroll.iBarWidth+ 
     75"px":"0px";null!==a.nTFoot&&(p.style.width=q(l),r.style.width=q(l),r.style.paddingRight=c?a.oScroll.iBarWidth+"px":"0px");i(d).scroll();if(a.bSorted||a.bFiltered)d.scrollTop=0}function N(a,b,c){for(var d=0,g=b.length;d<g;d++)for(var f=0,h=b[d].childNodes.length;f<h;f++)1==b[d].childNodes[f].nodeType&&(c?a(b[d].childNodes[f],c[d].childNodes[f]):a(b[d].childNodes[f]))}function La(a,b){if(!a||null===a||""===a)return 0;b||(b=l.getElementsByTagName("body")[0]);var c,d=l.createElement("div");d.style.width= 
     76q(a);b.appendChild(d);c=d.offsetWidth;b.removeChild(d);return c}function ba(a){var b=0,c,d=0,g=a.aoColumns.length,f,h=i("th",a.nTHead),e=a.nTable.getAttribute("width");for(f=0;f<g;f++)a.aoColumns[f].bVisible&&(d++,null!==a.aoColumns[f].sWidth&&(c=La(a.aoColumns[f].sWidthOrig,a.nTable.parentNode),null!==c&&(a.aoColumns[f].sWidth=q(c)),b++));if(g==h.length&&0===b&&d==g&&""===a.oScroll.sX&&""===a.oScroll.sY)for(f=0;f<a.aoColumns.length;f++)c=i(h[f]).width(),null!==c&&(a.aoColumns[f].sWidth=q(c));else{b= 
     77a.nTable.cloneNode(!1);f=a.nTHead.cloneNode(!0);d=l.createElement("tbody");c=l.createElement("tr");b.removeAttribute("id");b.appendChild(f);null!==a.nTFoot&&(b.appendChild(a.nTFoot.cloneNode(!0)),N(function(a){a.style.width=""},b.getElementsByTagName("tr")));b.appendChild(d);d.appendChild(c);d=i("thead th",b);0===d.length&&(d=i("tbody tr:eq(0)>td",b));h=O(a,f);for(f=d=0;f<g;f++){var j=a.aoColumns[f];j.bVisible&&null!==j.sWidthOrig&&""!==j.sWidthOrig?h[f-d].style.width=q(j.sWidthOrig):j.bVisible?h[f- 
     78d].style.width="":d++}for(f=0;f<g;f++)a.aoColumns[f].bVisible&&(d=Ma(a,f),null!==d&&(d=d.cloneNode(!0),""!==a.aoColumns[f].sContentPadding&&(d.innerHTML+=a.aoColumns[f].sContentPadding),c.appendChild(d)));g=a.nTable.parentNode;g.appendChild(b);""!==a.oScroll.sX&&""!==a.oScroll.sXInner?b.style.width=q(a.oScroll.sXInner):""!==a.oScroll.sX?(b.style.width="",i(b).width()<g.offsetWidth&&(b.style.width=q(g.offsetWidth))):""!==a.oScroll.sY?b.style.width=q(g.offsetWidth):e&&(b.style.width=q(e));b.style.visibility= 
     79"hidden";Na(a,b);g=i("tbody tr:eq(0)",b).children();0===g.length&&(g=O(a,i("thead",b)[0]));if(""!==a.oScroll.sX){for(f=d=c=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=null===a.aoColumns[f].sWidthOrig?c+i(g[d]).outerWidth():c+(parseInt(a.aoColumns[f].sWidth.replace("px",""),10)+(i(g[d]).outerWidth()-i(g[d]).width())),d++);b.style.width=q(c);a.nTable.style.width=q(c)}for(f=d=0;f<a.aoColumns.length;f++)a.aoColumns[f].bVisible&&(c=i(g[d]).width(),null!==c&&0<c&&(a.aoColumns[f].sWidth=q(c)), 
     80d++);g=i(b).css("width");a.nTable.style.width=-1!==g.indexOf("%")?g:q(i(b).outerWidth());b.parentNode.removeChild(b)}e&&(a.nTable.style.width=q(e))}function Na(a,b){""===a.oScroll.sX&&""!==a.oScroll.sY?(i(b).width(),b.style.width=q(i(b).outerWidth()-a.oScroll.iBarWidth)):""!==a.oScroll.sX&&(b.style.width=q(i(b).outerWidth()))}function Ma(a,b){var c=Oa(a,b);if(0>c)return null;if(null===a.aoData[c].nTr){var d=l.createElement("td");d.innerHTML=w(a,c,b,"");return d}return L(a,c)[b]}function Oa(a,b){for(var c= 
     81-1,d=-1,g=0;g<a.aoData.length;g++){var f=w(a,g,b,"display")+"",f=f.replace(/<.*?>/g,"");f.length>c&&(c=f.length,d=g)}return d}function q(a){if(null===a)return"0px";if("number"==typeof a)return 0>a?"0px":a+"px";var b=a.charCodeAt(a.length-1);return 48>b||57<b?a:a+"px"}function Pa(){var a=l.createElement("p"),b=a.style;b.width="100%";b.height="200px";b.padding="0px";var c=l.createElement("div"),b=c.style;b.position="absolute";b.top="0px";b.left="0px";b.visibility="hidden";b.width="200px";b.height="150px"; 
     82b.padding="0px";b.overflow="hidden";c.appendChild(a);l.body.appendChild(c);b=a.offsetWidth;c.style.overflow="scroll";a=a.offsetWidth;b==a&&(a=c.clientWidth);l.body.removeChild(c);return b-a}function P(a,b){var c,d,g,f,h,e,o=[],m=[],k=j.ext.oSort,r=a.aoData,l=a.aoColumns,p=a.oLanguage.oAria;if(!a.oFeatures.bServerSide&&(0!==a.aaSorting.length||null!==a.aaSortingFixed)){o=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(c=0;c<o.length;c++)if(d=o[c][0],g=t(a,d),f= 
     83a.aoColumns[d].sSortDataType,j.ext.afnSortData[f])if(h=j.ext.afnSortData[f].call(a.oInstance,a,d,g),h.length===r.length){g=0;for(f=r.length;g<f;g++)I(a,g,d,h[g])}else E(a,0,"Returned data sort array (col "+d+") is the wrong length");c=0;for(d=a.aiDisplayMaster.length;c<d;c++)m[a.aiDisplayMaster[c]]=c;var q=o.length,G;c=0;for(d=r.length;c<d;c++)for(g=0;g<q;g++){G=l[o[g][0]].aDataSort;h=0;for(e=G.length;h<e;h++)f=l[G[h]].sType,f=k[(f?f:"string")+"-pre"],r[c]._aSortData[G[h]]=f?f(w(a,c,G[h],"sort")): 
     84w(a,c,G[h],"sort")}a.aiDisplayMaster.sort(function(a,b){var c,d,g,f,h;for(c=0;c<q;c++){h=l[o[c][0]].aDataSort;d=0;for(g=h.length;d<g;d++)if(f=l[h[d]].sType,f=k[(f?f:"string")+"-"+o[c][1]](r[a]._aSortData[h[d]],r[b]._aSortData[h[d]]),0!==f)return f}return k["numeric-asc"](m[a],m[b])})}(b===n||b)&&!a.oFeatures.bDeferRender&&Q(a);c=0;for(d=a.aoColumns.length;c<d;c++)f=l[c].sTitle.replace(/<.*?>/g,""),g=l[c].nTh,g.removeAttribute("aria-sort"),g.removeAttribute("aria-label"),l[c].bSortable?0<o.length&& 
     85o[0][0]==c?(g.setAttribute("aria-sort","asc"==o[0][1]?"ascending":"descending"),g.setAttribute("aria-label",f+("asc"==(l[c].asSorting[o[0][2]+1]?l[c].asSorting[o[0][2]+1]:l[c].asSorting[0])?p.sSortAscending:p.sSortDescending))):g.setAttribute("aria-label",f+("asc"==l[c].asSorting[0]?p.sSortAscending:p.sSortDescending)):g.setAttribute("aria-label",f);a.bSorted=!0;i(a.oInstance).trigger("sort",a);a.oFeatures.bFilter?M(a,a.oPreviousSearch,1):(a.aiDisplay=a.aiDisplayMaster.slice(),a._iDisplayStart=0, 
     86A(a),y(a))}function ga(a,b,c,d){Qa(b,{},function(b){if(!1!==a.aoColumns[c].bSortable){var f=function(){var d,f;if(b.shiftKey){for(var e=!1,i=0;i<a.aaSorting.length;i++)if(a.aaSorting[i][0]==c){e=!0;d=a.aaSorting[i][0];f=a.aaSorting[i][2]+1;a.aoColumns[d].asSorting[f]?(a.aaSorting[i][1]=a.aoColumns[d].asSorting[f],a.aaSorting[i][2]=f):a.aaSorting.splice(i,1);break}!1===e&&a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0])}else 1==a.aaSorting.length&&a.aaSorting[0][0]==c?(d=a.aaSorting[0][0],f=a.aaSorting[0][2]+ 
     871,a.aoColumns[d].asSorting[f]||(f=0),a.aaSorting[0][1]=a.aoColumns[d].asSorting[f],a.aaSorting[0][2]=f):(a.aaSorting.splice(0,a.aaSorting.length),a.aaSorting.push([c,a.aoColumns[c].asSorting[0],0]));P(a)};a.oFeatures.bProcessing?(F(a,!0),setTimeout(function(){f();a.oFeatures.bServerSide||F(a,!1)},0)):f();"function"==typeof d&&d(a)}})}function Q(a){var b,c,d,g,f,h=a.aoColumns.length,e=a.oClasses;for(b=0;b<h;b++)a.aoColumns[b].bSortable&&i(a.aoColumns[b].nTh).removeClass(e.sSortAsc+" "+e.sSortDesc+ 
     88" "+a.aoColumns[b].sSortingClass);g=null!==a.aaSortingFixed?a.aaSortingFixed.concat(a.aaSorting):a.aaSorting.slice();for(b=0;b<a.aoColumns.length;b++)if(a.aoColumns[b].bSortable){f=a.aoColumns[b].sSortingClass;d=-1;for(c=0;c<g.length;c++)if(g[c][0]==b){f="asc"==g[c][1]?e.sSortAsc:e.sSortDesc;d=c;break}i(a.aoColumns[b].nTh).addClass(f);a.bJUI&&(c=i("span."+e.sSortIcon,a.aoColumns[b].nTh),c.removeClass(e.sSortJUIAsc+" "+e.sSortJUIDesc+" "+e.sSortJUI+" "+e.sSortJUIAscAllowed+" "+e.sSortJUIDescAllowed), 
     89c.addClass(-1==d?a.aoColumns[b].sSortingClassJUI:"asc"==g[d][1]?e.sSortJUIAsc:e.sSortJUIDesc))}else i(a.aoColumns[b].nTh).addClass(a.aoColumns[b].sSortingClass);f=e.sSortColumn;if(a.oFeatures.bSort&&a.oFeatures.bSortClasses){d=L(a);if(a.oFeatures.bDeferRender)i(d).removeClass(f+"1 "+f+"2 "+f+"3");else if(d.length>=h)for(b=0;b<h;b++)if(-1!=d[b].className.indexOf(f+"1")){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(f+"1",""))}else if(-1!=d[b].className.indexOf(f+ 
     90"2")){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(f+"2",""))}else if(-1!=d[b].className.indexOf(f+"3")){c=0;for(a=d.length/h;c<a;c++)d[h*c+b].className=i.trim(d[h*c+b].className.replace(" "+f+"3",""))}var e=1,j;for(b=0;b<g.length;b++){j=parseInt(g[b][0],10);c=0;for(a=d.length/h;c<a;c++)d[h*c+j].className+=" "+f+e;3>e&&e++}}}function qa(a){if(a.oFeatures.bStateSave&&!a.bDestroying){var b,c;b=a.oScroll.bInfinite;var d={iCreate:(new Date).getTime(),iStart:b?0:a._iDisplayStart, 
     91iEnd:b?a._iDisplayLength:a._iDisplayEnd,iLength:a._iDisplayLength,aaSorting:i.extend(!0,[],a.aaSorting),oSearch:i.extend(!0,{},a.oPreviousSearch),aoSearchCols:i.extend(!0,[],a.aoPreSearchCols),abVisCols:[]};b=0;for(c=a.aoColumns.length;b<c;b++)d.abVisCols.push(a.aoColumns[b].bVisible);C(a,"aoStateSaveParams","stateSaveParams",[a,d]);a.fnStateSave.call(a.oInstance,a,d)}}function Ra(a,b){if(a.oFeatures.bStateSave){var c=a.fnStateLoad.call(a.oInstance,a);if(c){var d=C(a,"aoStateLoadParams","stateLoadParams", 
     92[a,c]);if(-1===i.inArray(!1,d)){a.oLoadedState=i.extend(!0,{},c);a._iDisplayStart=c.iStart;a.iInitDisplayStart=c.iStart;a._iDisplayEnd=c.iEnd;a._iDisplayLength=c.iLength;a.aaSorting=c.aaSorting.slice();a.saved_aaSorting=c.aaSorting.slice();i.extend(a.oPreviousSearch,c.oSearch);i.extend(!0,a.aoPreSearchCols,c.aoSearchCols);b.saved_aoColumns=[];for(d=0;d<c.abVisCols.length;d++)b.saved_aoColumns[d]={},b.saved_aoColumns[d].bVisible=c.abVisCols[d];C(a,"aoStateLoaded","stateLoaded",[a,c])}}}}function Sa(a){for(var b= 
     93V.location.pathname.split("/"),a=a+"_"+b[b.length-1].replace(/[\/:]/g,"").toLowerCase()+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return null}function u(a){for(var b=0;b<j.settings.length;b++)if(j.settings[b].nTable===a)return j.settings[b];return null}function S(a){for(var b=[],a=a.aoData,c=0,d=a.length;c<d;c++)null!==a[c].nTr&&b.push(a[c].nTr);return b}function L(a, 
     94b){var c=[],d,g,f,e,i,j;g=0;var o=a.aoData.length;b!==n&&(g=b,o=b+1);for(f=g;f<o;f++)if(j=a.aoData[f],null!==j.nTr){g=[];e=0;for(i=j.nTr.childNodes.length;e<i;e++)d=j.nTr.childNodes[e].nodeName.toLowerCase(),("td"==d||"th"==d)&&g.push(j.nTr.childNodes[e]);e=d=0;for(i=a.aoColumns.length;e<i;e++)a.aoColumns[e].bVisible?c.push(g[e-d]):(c.push(j._anHidden[e]),d++)}return c}function E(a,b,c){a=null===a?"DataTables warning: "+c:"DataTables warning (table id = '"+a.sTableId+"'): "+c;if(0===b)if("alert"== 
     95j.ext.sErrMode)alert(a);else throw Error(a);else V.console&&console.log&&console.log(a)}function p(a,b,c,d){d===n&&(d=c);b[c]!==n&&(a[d]=b[c])}function Ta(a,b){for(var c in b)b.hasOwnProperty(c)&&("object"===typeof e[c]&&!1===i.isArray(b[c])?i.extend(!0,a[c],b[c]):a[c]=b[c]);return a}function Qa(a,b,c){i(a).bind("click.DT",b,function(b){a.blur();c(b)}).bind("keypress.DT",b,function(a){13===a.which&&c(a)}).bind("selectstart.DT",function(){return!1})}function B(a,b,c,d){c&&a[b].push({fn:c,sName:d})} 
     96function C(a,b,c,d){for(var b=a[b],g=[],f=b.length-1;0<=f;f--)g.push(b[f].fn.apply(a.oInstance,d));null!==c&&i(a.oInstance).trigger(c,d);return g}function Ua(a){return function(){var b=[u(this[j.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return j.ext.oApi[a].apply(this,b)}}var Va=V.JSON?JSON.stringify:function(a){var b=typeof a;if("object"!==b||null===a)return"string"===b&&(a='"'+a+'"'),a+"";var c,d,g=[],f=i.isArray(a);for(c in a)d=a[c],b=typeof d,"string"===b?d='"'+d+'"':"object"=== 
     97b&&null!==d&&(d=Va(d)),g.push((f?"":'"'+c+'":')+d);return(f?"[":"{")+g+(f?"]":"}")};this.$=function(a,b){var c,d,g=[],f;d=u(this[j.ext.iApiIndex]);var e=d.aoData,o=d.aiDisplay,k=d.aiDisplayMaster;b||(b={});b=i.extend({},{filter:"none",order:"current",page:"all"},b);if("current"==b.page){c=d._iDisplayStart;for(d=d.fnDisplayEnd();c<d;c++)(f=e[o[c]].nTr)&&g.push(f)}else if("current"==b.order&&"none"==b.filter){c=0;for(d=k.length;c<d;c++)(f=e[k[c]].nTr)&&g.push(f)}else if("current"==b.order&&"applied"== 
     98b.filter){c=0;for(d=o.length;c<d;c++)(f=e[o[c]].nTr)&&g.push(f)}else if("original"==b.order&&"none"==b.filter){c=0;for(d=e.length;c<d;c++)(f=e[c].nTr)&&g.push(f)}else if("original"==b.order&&"applied"==b.filter){c=0;for(d=e.length;c<d;c++)f=e[c].nTr,-1!==i.inArray(c,o)&&f&&g.push(f)}else E(d,1,"Unknown selection options");g=i(g);c=g.filter(a);g=g.find(a);return i([].concat(i.makeArray(c),i.makeArray(g)))};this._=function(a,b){var c=[],d,g,e=this.$(a,b);d=0;for(g=e.length;d<g;d++)c.push(this.fnGetData(e[d])); 
     99return c};this.fnAddData=function(a,b){if(0===a.length)return[];var c=[],d,g=u(this[j.ext.iApiIndex]);if("object"===typeof a[0]&&null!==a[0])for(var e=0;e<a.length;e++){d=H(g,a[e]);if(-1==d)return c;c.push(d)}else{d=H(g,a);if(-1==d)return c;c.push(d)}g.aiDisplay=g.aiDisplayMaster.slice();(b===n||b)&&$(g);return c};this.fnAdjustColumnSizing=function(a){var b=u(this[j.ext.iApiIndex]);k(b);a===n||a?this.fnDraw(!1):(""!==b.oScroll.sX||""!==b.oScroll.sY)&&this.oApi._fnScrollDraw(b)};this.fnClearTable= 
     100function(a){var b=u(this[j.ext.iApiIndex]);ea(b);(a===n||a)&&y(b)};this.fnClose=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent==a)return(a=b.aoOpenRows[c].nTr.parentNode)&&a.removeChild(b.aoOpenRows[c].nTr),b.aoOpenRows.splice(c,1),0;return 1};this.fnDeleteRow=function(a,b,c){var d=u(this[j.ext.iApiIndex]),g,e,a="object"===typeof a?K(d,a):a,h=d.aoData.splice(a,1);g=0;for(e=d.aoData.length;g<e;g++)null!==d.aoData[g].nTr&&(d.aoData[g].nTr._DT_RowIndex= 
     101g);g=i.inArray(a,d.aiDisplay);d.asDataSearch.splice(g,1);fa(d.aiDisplayMaster,a);fa(d.aiDisplay,a);"function"===typeof b&&b.call(this,d,h);d._iDisplayStart>=d.fnRecordsDisplay()&&(d._iDisplayStart-=d._iDisplayLength,0>d._iDisplayStart&&(d._iDisplayStart=0));if(c===n||c)A(d),y(d);return h};this.fnDestroy=function(a){var b=u(this[j.ext.iApiIndex]),c=b.nTableWrapper.parentNode,d=b.nTBody,g,e,a=a===n?!1:!0;b.bDestroying=!0;C(b,"aoDestroyCallback","destroy",[b]);g=0;for(e=b.aoColumns.length;g<e;g++)!1=== 
     102b.aoColumns[g].bVisible&&this.fnSetColumnVis(g,!0);i(b.nTableWrapper).find("*").andSelf().unbind(".DT");i("tbody>tr>td."+b.oClasses.sRowEmpty,b.nTable).parent().remove();b.nTable!=b.nTHead.parentNode&&(i(b.nTable).children("thead").remove(),b.nTable.appendChild(b.nTHead));b.nTFoot&&b.nTable!=b.nTFoot.parentNode&&(i(b.nTable).children("tfoot").remove(),b.nTable.appendChild(b.nTFoot));b.nTable.parentNode.removeChild(b.nTable);i(b.nTableWrapper).remove();b.aaSorting=[];b.aaSortingFixed=[];Q(b);i(S(b)).removeClass(b.asStripeClasses.join(" ")); 
     103i("th, td",b.nTHead).removeClass([b.oClasses.sSortable,b.oClasses.sSortableAsc,b.oClasses.sSortableDesc,b.oClasses.sSortableNone].join(" "));b.bJUI&&(i("th span."+b.oClasses.sSortIcon+", td span."+b.oClasses.sSortIcon,b.nTHead).remove(),i("th, td",b.nTHead).each(function(){var a=i("div."+b.oClasses.sSortJUIWrapper,this),c=a.contents();i(this).append(c);a.remove()}));!a&&b.nTableReinsertBefore?c.insertBefore(b.nTable,b.nTableReinsertBefore):a||c.appendChild(b.nTable);g=0;for(e=b.aoData.length;g<e;g++)null!== 
     104b.aoData[g].nTr&&d.appendChild(b.aoData[g].nTr);!0===b.oFeatures.bAutoWidth&&(b.nTable.style.width=q(b.sDestroyWidth));i(d).children("tr:even").addClass(b.asDestroyStripes[0]);i(d).children("tr:odd").addClass(b.asDestroyStripes[1]);g=0;for(e=j.settings.length;g<e;g++)j.settings[g]==b&&j.settings.splice(g,1);b=null};this.fnDraw=function(a){var b=u(this[j.ext.iApiIndex]);!1===a?(A(b),y(b)):$(b)};this.fnFilter=function(a,b,c,d,e,f){var h=u(this[j.ext.iApiIndex]);if(h.oFeatures.bFilter){if(c===n||null=== 
     105c)c=!1;if(d===n||null===d)d=!0;if(e===n||null===e)e=!0;if(f===n||null===f)f=!0;if(b===n||null===b){if(M(h,{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f},1),e&&h.aanFeatures.f){b=h.aanFeatures.f;c=0;for(d=b.length;c<d;c++)i(b[c]._DT_Input).val(a)}}else i.extend(h.aoPreSearchCols[b],{sSearch:a+"",bRegex:c,bSmart:d,bCaseInsensitive:f}),M(h,h.oPreviousSearch,1)}};this.fnGetData=function(a,b){var c=u(this[j.ext.iApiIndex]);if(a!==n){var d=a;if("object"===typeof a){var e=a.nodeName.toLowerCase();"tr"=== 
     106e?d=K(c,a):"td"===e&&(d=K(c,a.parentNode),b=da(c,d,a))}return b!==n?w(c,d,b,""):c.aoData[d]!==n?c.aoData[d]._aData:null}return Y(c)};this.fnGetNodes=function(a){var b=u(this[j.ext.iApiIndex]);return a!==n?b.aoData[a]!==n?b.aoData[a].nTr:null:S(b)};this.fnGetPosition=function(a){var b=u(this[j.ext.iApiIndex]),c=a.nodeName.toUpperCase();return"TR"==c?K(b,a):"TD"==c||"TH"==c?(c=K(b,a.parentNode),a=da(b,c,a),[c,t(b,a),a]):null};this.fnIsOpen=function(a){for(var b=u(this[j.ext.iApiIndex]),c=0;c<b.aoOpenRows.length;c++)if(b.aoOpenRows[c].nParent== 
     107a)return!0;return!1};this.fnOpen=function(a,b,c){var d=u(this[j.ext.iApiIndex]),e=S(d);if(-1!==i.inArray(a,e)){this.fnClose(a);var e=l.createElement("tr"),f=l.createElement("td");e.appendChild(f);f.className=c;f.colSpan=v(d);"string"===typeof b?f.innerHTML=b:i(f).html(b);b=i("tr",d.nTBody);-1!=i.inArray(a,b)&&i(e).insertAfter(a);d.aoOpenRows.push({nTr:e,nParent:a});return e}};this.fnPageChange=function(a,b){var c=u(this[j.ext.iApiIndex]);pa(c,a);A(c);(b===n||b)&&y(c)};this.fnSetColumnVis=function(a, 
     108b,c){var d=u(this[j.ext.iApiIndex]),e,f,h=d.aoColumns,i=d.aoData,o,m;if(h[a].bVisible!=b){if(b){for(e=f=0;e<a;e++)h[e].bVisible&&f++;m=f>=v(d);if(!m)for(e=a;e<h.length;e++)if(h[e].bVisible){o=e;break}e=0;for(f=i.length;e<f;e++)null!==i[e].nTr&&(m?i[e].nTr.appendChild(i[e]._anHidden[a]):i[e].nTr.insertBefore(i[e]._anHidden[a],L(d,e)[o]))}else{e=0;for(f=i.length;e<f;e++)null!==i[e].nTr&&(o=L(d,e)[a],i[e]._anHidden[a]=o,o.parentNode.removeChild(o))}h[a].bVisible=b;U(d,d.aoHeader);d.nTFoot&&U(d,d.aoFooter); 
     109e=0;for(f=d.aoOpenRows.length;e<f;e++)d.aoOpenRows[e].nTr.colSpan=v(d);if(c===n||c)k(d),y(d);qa(d)}};this.fnSettings=function(){return u(this[j.ext.iApiIndex])};this.fnSort=function(a){var b=u(this[j.ext.iApiIndex]);b.aaSorting=a;P(b)};this.fnSortListener=function(a,b,c){ga(u(this[j.ext.iApiIndex]),a,b,c)};this.fnUpdate=function(a,b,c,d,e){var f=u(this[j.ext.iApiIndex]),b="object"===typeof b?K(f,b):b;if(f.__fnUpdateDeep===n&&i.isArray(a)&&"object"===typeof a){f.aoData[b]._aData=a.slice();f.__fnUpdateDeep= 
     110!0;for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(w(f,b,c),b,c,!1,!1);f.__fnUpdateDeep=n}else if(f.__fnUpdateDeep===n&&null!==a&&"object"===typeof a){f.aoData[b]._aData=i.extend(!0,{},a);f.__fnUpdateDeep=!0;for(c=0;c<f.aoColumns.length;c++)this.fnUpdate(w(f,b,c),b,c,!1,!1);f.__fnUpdateDeep=n}else{I(f,b,c,a);var a=w(f,b,c,"display"),h=f.aoColumns[c];null!==h.fnRender&&(a=R(f,b,c),h.bUseRendered&&I(f,b,c,a));null!==f.aoData[b].nTr&&(L(f,b)[c].innerHTML=a)}c=i.inArray(b,f.aiDisplay);f.asDataSearch[c]= 
     111ma(f,X(f,b,"filter"));(e===n||e)&&k(f);(d===n||d)&&$(f);return 0};this.fnVersionCheck=j.ext.fnVersionCheck;this.oApi={_fnExternApiFunc:Ua,_fnInitialise:aa,_fnInitComplete:Z,_fnLanguageCompat:oa,_fnAddColumn:o,_fnColumnOptions:r,_fnAddData:H,_fnCreateTr:ca,_fnGatherData:ua,_fnBuildHead:va,_fnDrawHead:U,_fnDraw:y,_fnReDraw:$,_fnAjaxUpdate:wa,_fnAjaxParameters:Ea,_fnAjaxUpdateDraw:Fa,_fnServerParams:ia,_fnAddOptionsHtml:xa,_fnFeatureHtmlTable:Ba,_fnScrollDraw:Ka,_fnAdjustColumnSizing:k,_fnFeatureHtmlFilter:za, 
     112_fnFilterComplete:M,_fnFilterCustom:Ia,_fnFilterColumn:Ha,_fnFilter:Ga,_fnBuildSearchArray:ja,_fnBuildSearchRow:ma,_fnFilterCreateSearch:ka,_fnDataToSearch:la,_fnSort:P,_fnSortAttachListener:ga,_fnSortingClasses:Q,_fnFeatureHtmlPaginate:Da,_fnPageChange:pa,_fnFeatureHtmlInfo:Ca,_fnUpdateInfo:Ja,_fnFeatureHtmlLength:ya,_fnFeatureHtmlProcessing:Aa,_fnProcessingDisplay:F,_fnVisibleToColumnIndex:G,_fnColumnIndexToVisible:t,_fnNodeToDataIndex:K,_fnVisbleColumns:v,_fnCalculateEnd:A,_fnConvertToWidth:La, 
     113_fnCalculateColumnWidths:ba,_fnScrollingWidthAdjust:Na,_fnGetWidestNode:Ma,_fnGetMaxLenString:Oa,_fnStringToCss:q,_fnDetectType:z,_fnSettingsFromNode:u,_fnGetDataMaster:Y,_fnGetTrNodes:S,_fnGetTdNodes:L,_fnEscapeRegex:na,_fnDeleteIndex:fa,_fnReOrderIndex:D,_fnColumnOrdering:x,_fnLog:E,_fnClearTable:ea,_fnSaveState:qa,_fnLoadState:Ra,_fnCreateCookie:function(a,b,c,d,e){var f=new Date;f.setTime(f.getTime()+1E3*c);var c=V.location.pathname.split("/"),a=a+"_"+c.pop().replace(/[\/:]/g,"").toLowerCase(), 
     114h;null!==e?(h="function"===typeof i.parseJSON?i.parseJSON(b):eval("("+b+")"),b=e(a,h,f.toGMTString(),c.join("/")+"/")):b=a+"="+encodeURIComponent(b)+"; expires="+f.toGMTString()+"; path="+c.join("/")+"/";e="";f=9999999999999;if(4096<(null!==Sa(a)?l.cookie.length:b.length+l.cookie.length)+10){for(var a=l.cookie.split(";"),o=0,j=a.length;o<j;o++)if(-1!=a[o].indexOf(d)){var k=a[o].split("=");try{h=eval("("+decodeURIComponent(k[1])+")")}catch(r){continue}h.iCreate&&h.iCreate<f&&(e=k[0],f=h.iCreate)}""!== 
     115e&&(l.cookie=e+"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path="+c.join("/")+"/")}l.cookie=b},_fnReadCookie:Sa,_fnDetectHeader:T,_fnGetUniqueThs:O,_fnScrollBarWidth:Pa,_fnApplyToChildren:N,_fnMap:p,_fnGetRowData:X,_fnGetCellData:w,_fnSetCellData:I,_fnGetObjectDataFn:W,_fnSetObjectDataFn:ta,_fnApplyColumnDefs:J,_fnBindAction:Qa,_fnExtend:Ta,_fnCallbackReg:B,_fnCallbackFire:C,_fnJsonString:Va,_fnRender:R,_fnNodeToColumnIndex:da,_fnInfoMacros:ha};i.extend(j.ext.oApi,this.oApi);for(var ra in j.ext.oApi)ra&& 
     116(this[ra]=Ua(ra));var sa=this;return this.each(function(){var a=0,b,c,d;c=this.getAttribute("id");var g=!1,f=!1;if("table"!=this.nodeName.toLowerCase())E(null,0,"Attempted to initialise DataTables on a node which is not a table: "+this.nodeName);else{a=0;for(b=j.settings.length;a<b;a++){if(j.settings[a].nTable==this){if(e===n||e.bRetrieve)return j.settings[a].oInstance;if(e.bDestroy){j.settings[a].oInstance.fnDestroy();break}else{E(j.settings[a],0,"Cannot reinitialise DataTable.\n\nTo retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy"); 
     117return}}if(j.settings[a].sTableId==this.id){j.settings.splice(a,1);break}}if(null===c||""===c)this.id=c="DataTables_Table_"+j.ext._oExternConfig.iNextUnique++;var h=i.extend(!0,{},j.models.oSettings,{nTable:this,oApi:sa.oApi,oInit:e,sDestroyWidth:i(this).width(),sInstance:c,sTableId:c});j.settings.push(h);h.oInstance=1===sa.length?sa:i(this).dataTable();e||(e={});e.oLanguage&&oa(e.oLanguage);e=Ta(i.extend(!0,{},j.defaults),e);p(h.oFeatures,e,"bPaginate");p(h.oFeatures,e,"bLengthChange");p(h.oFeatures, 
     118e,"bFilter");p(h.oFeatures,e,"bSort");p(h.oFeatures,e,"bInfo");p(h.oFeatures,e,"bProcessing");p(h.oFeatures,e,"bAutoWidth");p(h.oFeatures,e,"bSortClasses");p(h.oFeatures,e,"bServerSide");p(h.oFeatures,e,"bDeferRender");p(h.oScroll,e,"sScrollX","sX");p(h.oScroll,e,"sScrollXInner","sXInner");p(h.oScroll,e,"sScrollY","sY");p(h.oScroll,e,"bScrollCollapse","bCollapse");p(h.oScroll,e,"bScrollInfinite","bInfinite");p(h.oScroll,e,"iScrollLoadGap","iLoadGap");p(h.oScroll,e,"bScrollAutoCss","bAutoCss");p(h, 
     119e,"asStripeClasses");p(h,e,"asStripClasses","asStripeClasses");p(h,e,"fnServerData");p(h,e,"fnFormatNumber");p(h,e,"sServerMethod");p(h,e,"aaSorting");p(h,e,"aaSortingFixed");p(h,e,"aLengthMenu");p(h,e,"sPaginationType");p(h,e,"sAjaxSource");p(h,e,"sAjaxDataProp");p(h,e,"iCookieDuration");p(h,e,"sCookiePrefix");p(h,e,"sDom");p(h,e,"bSortCellsTop");p(h,e,"iTabIndex");p(h,e,"oSearch","oPreviousSearch");p(h,e,"aoSearchCols","aoPreSearchCols");p(h,e,"iDisplayLength","_iDisplayLength");p(h,e,"bJQueryUI", 
     120"bJUI");p(h,e,"fnCookieCallback");p(h,e,"fnStateLoad");p(h,e,"fnStateSave");p(h.oLanguage,e,"fnInfoCallback");B(h,"aoDrawCallback",e.fnDrawCallback,"user");B(h,"aoServerParams",e.fnServerParams,"user");B(h,"aoStateSaveParams",e.fnStateSaveParams,"user");B(h,"aoStateLoadParams",e.fnStateLoadParams,"user");B(h,"aoStateLoaded",e.fnStateLoaded,"user");B(h,"aoRowCallback",e.fnRowCallback,"user");B(h,"aoRowCreatedCallback",e.fnCreatedRow,"user");B(h,"aoHeaderCallback",e.fnHeaderCallback,"user");B(h,"aoFooterCallback", 
     121e.fnFooterCallback,"user");B(h,"aoInitComplete",e.fnInitComplete,"user");B(h,"aoPreDrawCallback",e.fnPreDrawCallback,"user");h.oFeatures.bServerSide&&h.oFeatures.bSort&&h.oFeatures.bSortClasses?B(h,"aoDrawCallback",Q,"server_side_sort_classes"):h.oFeatures.bDeferRender&&B(h,"aoDrawCallback",Q,"defer_sort_classes");e.bJQueryUI?(i.extend(h.oClasses,j.ext.oJUIClasses),e.sDom===j.defaults.sDom&&"lfrtip"===j.defaults.sDom&&(h.sDom='<"H"lfr>t<"F"ip>')):i.extend(h.oClasses,j.ext.oStdClasses);i(this).addClass(h.oClasses.sTable); 
     122if(""!==h.oScroll.sX||""!==h.oScroll.sY)h.oScroll.iBarWidth=Pa();h.iInitDisplayStart===n&&(h.iInitDisplayStart=e.iDisplayStart,h._iDisplayStart=e.iDisplayStart);e.bStateSave&&(h.oFeatures.bStateSave=!0,Ra(h,e),B(h,"aoDrawCallback",qa,"state_save"));null!==e.iDeferLoading&&(h.bDeferLoading=!0,a=i.isArray(e.iDeferLoading),h._iRecordsDisplay=a?e.iDeferLoading[0]:e.iDeferLoading,h._iRecordsTotal=a?e.iDeferLoading[1]:e.iDeferLoading);null!==e.aaData&&(f=!0);""!==e.oLanguage.sUrl?(h.oLanguage.sUrl=e.oLanguage.sUrl, 
     123i.getJSON(h.oLanguage.sUrl,null,function(a){oa(a);i.extend(true,h.oLanguage,e.oLanguage,a);aa(h)}),g=!0):i.extend(!0,h.oLanguage,e.oLanguage);null===e.asStripeClasses&&(h.asStripeClasses=[h.oClasses.sStripeOdd,h.oClasses.sStripeEven]);c=!1;d=i(this).children("tbody").children("tr");a=0;for(b=h.asStripeClasses.length;a<b;a++)if(d.filter(":lt(2)").hasClass(h.asStripeClasses[a])){c=!0;break}c&&(h.asDestroyStripes=["",""],i(d[0]).hasClass(h.oClasses.sStripeOdd)&&(h.asDestroyStripes[0]+=h.oClasses.sStripeOdd+ 
     124" "),i(d[0]).hasClass(h.oClasses.sStripeEven)&&(h.asDestroyStripes[0]+=h.oClasses.sStripeEven),i(d[1]).hasClass(h.oClasses.sStripeOdd)&&(h.asDestroyStripes[1]+=h.oClasses.sStripeOdd+" "),i(d[1]).hasClass(h.oClasses.sStripeEven)&&(h.asDestroyStripes[1]+=h.oClasses.sStripeEven),d.removeClass(h.asStripeClasses.join(" ")));c=[];a=this.getElementsByTagName("thead");0!==a.length&&(T(h.aoHeader,a[0]),c=O(h));if(null===e.aoColumns){d=[];a=0;for(b=c.length;a<b;a++)d.push(null)}else d=e.aoColumns;a=0;for(b= 
     125d.length;a<b;a++)e.saved_aoColumns!==n&&e.saved_aoColumns.length==b&&(null===d[a]&&(d[a]={}),d[a].bVisible=e.saved_aoColumns[a].bVisible),o(h,c?c[a]:null);J(h,e.aoColumnDefs,d,function(a,b){r(h,a,b)});a=0;for(b=h.aaSorting.length;a<b;a++){h.aaSorting[a][0]>=h.aoColumns.length&&(h.aaSorting[a][0]=0);var k=h.aoColumns[h.aaSorting[a][0]];h.aaSorting[a][2]===n&&(h.aaSorting[a][2]=0);e.aaSorting===n&&h.saved_aaSorting===n&&(h.aaSorting[a][1]=k.asSorting[0]);c=0;for(d=k.asSorting.length;c<d;c++)if(h.aaSorting[a][1]== 
     126k.asSorting[c]){h.aaSorting[a][2]=c;break}}Q(h);a=i(this).children("caption").each(function(){this._captionSide=i(this).css("caption-side")});b=i(this).children("thead");0===b.length&&(b=[l.createElement("thead")],this.appendChild(b[0]));h.nTHead=b[0];b=i(this).children("tbody");0===b.length&&(b=[l.createElement("tbody")],this.appendChild(b[0]));h.nTBody=b[0];h.nTBody.setAttribute("role","alert");h.nTBody.setAttribute("aria-live","polite");h.nTBody.setAttribute("aria-relevant","all");b=i(this).children("tfoot"); 
     127if(0===b.length&&0<a.length&&(""!==h.oScroll.sX||""!==h.oScroll.sY))b=[l.createElement("tfoot")],this.appendChild(b[0]);0<b.length&&(h.nTFoot=b[0],T(h.aoFooter,h.nTFoot));if(f)for(a=0;a<e.aaData.length;a++)H(h,e.aaData[a]);else ua(h);h.aiDisplay=h.aiDisplayMaster.slice();h.bInitialised=!0;!1===g&&aa(h)}})};j.fnVersionCheck=function(e){for(var i=function(e,i){for(;e.length<i;)e+="0";return e},r=j.ext.sVersion.split("."),e=e.split("."),k="",n="",l=0,v=e.length;l<v;l++)k+=i(r[l],3),n+=i(e[l],3);return parseInt(k, 
     12810)>=parseInt(n,10)};j.fnIsDataTable=function(e){for(var i=j.settings,r=0;r<i.length;r++)if(i[r].nTable===e||i[r].nScrollHead===e||i[r].nScrollFoot===e)return!0;return!1};j.fnTables=function(e){var o=[];jQuery.each(j.settings,function(j,k){(!e||!0===e&&i(k.nTable).is(":visible"))&&o.push(k.nTable)});return o};j.version="1.9.2";j.settings=[];j.models={};j.models.ext={afnFiltering:[],afnSortData:[],aoFeatures:[],aTypes:[],fnVersionCheck:j.fnVersionCheck,iApiIndex:0,ofnSearch:{},oApi:{},oStdClasses:{}, 
     129oJUIClasses:{},oPagination:{},oSort:{},sVersion:j.version,sErrMode:"alert",_oExternConfig:{iNextUnique:0}};j.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0};j.models.oRow={nTr:null,_aData:[],_aSortData:[],_anHidden:[],_sRowStripe:""};j.models.oColumn={aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bUseRendered:null,bVisible:null,_bAutoType:!0,fnCreatedCell:null,fnGetData:null,fnRender:null,fnSetData:null,mDataProp:null,nTh:null,nTf:null,sClass:null,sContentPadding:null, 
     130sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null};j.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bJQueryUI:!1,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollAutoCss:!0,bScrollCollapse:!1,bScrollInfinite:!1,bServerSide:!1, 
     131bSort:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCookieCallback:null,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){if(1E3>e)return e;for(var i=e+"",e=i.split(""),j="",i=i.length,k=0;k<i;k++)0===k%3&&0!==k&&(j=this.oLanguage.sInfoThousands+j),j=e[i-k-1]+j;return j},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:function(e,j,n,k){k.jqXHR=i.ajax({url:e,data:j,success:function(e){i(k.oInstance).trigger("xhr", 
     132k);n(e)},dataType:"json",cache:!1,type:k.sServerMethod,error:function(e,i){"parsererror"==i&&k.oApi._fnLog(k,0,"DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.")}})},fnServerParams:null,fnStateLoad:function(e){var e=this.oApi._fnReadCookie(e.sCookiePrefix+e.sInstance),j;try{j="function"===typeof i.parseJSON?i.parseJSON(e):eval("("+e+")")}catch(n){j=null}return j},fnStateLoadParams:null,fnStateLoaded:null,fnStateSave:function(e,i){this.oApi._fnCreateCookie(e.sCookiePrefix+ 
     133e.sInstance,this.oApi._fnJsonString(i),e.iCookieDuration,e.sCookiePrefix,e.fnCookieCallback)},fnStateSaveParams:null,iCookieDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iScrollLoadGap:100,iTabIndex:0,oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries", 
     134sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sInfoThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sUrl:"",sZeroRecords:"No matching records found"},oSearch:i.extend({},j.models.oSearch),sAjaxDataProp:"aaData",sAjaxSource:null,sCookiePrefix:"SpryMedia_DataTables_",sDom:"lfrtip",sPaginationType:"two_button",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET"}; 
     135j.defaults.columns={aDataSort:null,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bUseRendered:!0,bVisible:!0,fnCreatedCell:null,fnRender:null,iDataSort:-1,mDataProp:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null};j.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortClasses:null,bStateSave:null}, 
     136oScroll:{bAutoCss:null,bCollapse:null,bInfinite:null,iBarWidth:0,iLoadGap:null,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aoColumns:[],aoHeader:[],aoFooter:[],asDataSearch:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:null,asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[], 
     137aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,sPaginationType:"two_button",iCookieDuration:0,sCookiePrefix:"",fnCookieCallback:null,aoStateSave:[],aoStateLoad:[],oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null, 
     138iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iDisplayEnd:10,_iRecordsTotal:0,_iRecordsDisplay:0,bJUI:null,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsTotal,10):this.aiDisplayMaster.length},fnRecordsDisplay:function(){return this.oFeatures.bServerSide?parseInt(this._iRecordsDisplay,10):this.aiDisplay.length},fnDisplayEnd:function(){return this.oFeatures.bServerSide? 
     139!1===this.oFeatures.bPaginate||-1==this._iDisplayLength?this._iDisplayStart+this.aiDisplay.length:Math.min(this._iDisplayStart+this._iDisplayLength,this._iRecordsDisplay):this._iDisplayEnd},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null};j.ext=i.extend(!0,{},j.models.ext);i.extend(j.ext.oStdClasses,{sTable:"dataTable",sPagePrevEnabled:"paginate_enabled_previous",sPagePrevDisabled:"paginate_disabled_previous",sPageNextEnabled:"paginate_enabled_next",sPageNextDisabled:"paginate_disabled_next", 
     140sPageJUINext:"",sPageJUIPrev:"",sPageButton:"paginate_button",sPageButtonActive:"paginate_active",sPageButtonStaticDisabled:"paginate_button paginate_button_disabled",sPageFirst:"first",sPagePrevious:"previous",sPageNext:"next",sPageLast:"last",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc", 
     141sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner", 
     142sFooterTH:"",sJUIHeader:"",sJUIFooter:""});i.extend(j.ext.oJUIClasses,j.ext.oStdClasses,{sPagePrevEnabled:"fg-button ui-button ui-state-default ui-corner-left",sPagePrevDisabled:"fg-button ui-button ui-state-default ui-corner-left ui-state-disabled",sPageNextEnabled:"fg-button ui-button ui-state-default ui-corner-right",sPageNextDisabled:"fg-button ui-button ui-state-default ui-corner-right ui-state-disabled",sPageJUINext:"ui-icon ui-icon-circle-arrow-e",sPageJUIPrev:"ui-icon ui-icon-circle-arrow-w", 
     143sPageButton:"fg-button ui-button ui-state-default",sPageButtonActive:"fg-button ui-button ui-state-default ui-state-disabled",sPageButtonStaticDisabled:"fg-button ui-button ui-state-default ui-state-disabled",sPageFirst:"first ui-corner-tl ui-corner-bl",sPageLast:"last ui-corner-tr ui-corner-br",sPaging:"dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_",sSortAsc:"ui-state-default",sSortDesc:"ui-state-default",sSortable:"ui-state-default",sSortableAsc:"ui-state-default", 
     144sSortableDesc:"ui-state-default",sSortableNone:"ui-state-default",sSortJUIAsc:"css_right ui-icon ui-icon-triangle-1-n",sSortJUIDesc:"css_right ui-icon ui-icon-triangle-1-s",sSortJUI:"css_right ui-icon ui-icon-carat-2-n-s",sSortJUIAscAllowed:"css_right ui-icon ui-icon-carat-1-n",sSortJUIDescAllowed:"css_right ui-icon ui-icon-carat-1-s",sSortJUIWrapper:"DataTables_sort_wrapper",sSortIcon:"DataTables_sort_icon",sScrollHead:"dataTables_scrollHead ui-state-default",sScrollFoot:"dataTables_scrollFoot ui-state-default", 
     145sFooterTH:"ui-state-default",sJUIHeader:"fg-toolbar ui-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix",sJUIFooter:"fg-toolbar ui-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"});i.extend(j.ext.oPagination,{two_button:{fnInit:function(e,j,n){var k=e.oLanguage.oPaginate,l=function(i){e.oApi._fnPageChange(e,i.data.action)&&n(e)},k=!e.bJUI?'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sPrevious+'</a><a class="'+ 
     146e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button">'+k.sNext+"</a>":'<a class="'+e.oClasses.sPagePrevDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUIPrev+'"></span></a><a class="'+e.oClasses.sPageNextDisabled+'" tabindex="'+e.iTabIndex+'" role="button"><span class="'+e.oClasses.sPageJUINext+'"></span></a>';i(j).append(k);var t=i("a",j),k=t[0],t=t[1];e.oApi._fnBindAction(k,{action:"previous"},l);e.oApi._fnBindAction(t,{action:"next"},l); 
     147e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_previous",t.id=e.sTableId+"_next",k.setAttribute("aria-controls",e.sTableId),t.setAttribute("aria-controls",e.sTableId))},fnUpdate:function(e){if(e.aanFeatures.p)for(var i=e.oClasses,j=e.aanFeatures.p,k=0,n=j.length;k<n;k++)0!==j[k].childNodes.length&&(j[k].childNodes[0].className=0===e._iDisplayStart?i.sPagePrevDisabled:i.sPagePrevEnabled,j[k].childNodes[1].className=e.fnDisplayEnd()==e.fnRecordsDisplay()?i.sPageNextDisabled:i.sPageNextEnabled)}}, 
     148iFullNumbersShowPages:5,full_numbers:{fnInit:function(e,j,n){var k=e.oLanguage.oPaginate,l=e.oClasses,t=function(i){e.oApi._fnPageChange(e,i.data.action)&&n(e)};i(j).append('<a  tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageFirst+'">'+k.sFirst+'</a><a  tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPagePrevious+'">'+k.sPrevious+'</a><span></span><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+" "+l.sPageNext+'">'+k.sNext+'</a><a tabindex="'+e.iTabIndex+'" class="'+l.sPageButton+ 
     149" "+l.sPageLast+'">'+k.sLast+"</a>");var v=i("a",j),k=v[0],l=v[1],z=v[2],v=v[3];e.oApi._fnBindAction(k,{action:"first"},t);e.oApi._fnBindAction(l,{action:"previous"},t);e.oApi._fnBindAction(z,{action:"next"},t);e.oApi._fnBindAction(v,{action:"last"},t);e.aanFeatures.p||(j.id=e.sTableId+"_paginate",k.id=e.sTableId+"_first",l.id=e.sTableId+"_previous",z.id=e.sTableId+"_next",v.id=e.sTableId+"_last")},fnUpdate:function(e,o){if(e.aanFeatures.p){var l=j.ext.oPagination.iFullNumbersShowPages,k=Math.floor(l/ 
     1502),n=Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength),t=Math.ceil(e._iDisplayStart/e._iDisplayLength)+1,v="",z,D=e.oClasses,x,J=e.aanFeatures.p,H=function(i){e.oApi._fnBindAction(this,{page:i+z-1},function(i){e.oApi._fnPageChange(e,i.data.page);o(e);i.preventDefault()})};-1===e._iDisplayLength?t=k=z=1:n<l?(z=1,k=n):t<=k?(z=1,k=l):t>=n-k?(z=n-l+1,k=n):(z=t-Math.ceil(l/2)+1,k=z+l-1);for(l=z;l<=k;l++)v+=t!==l?'<a tabindex="'+e.iTabIndex+'" class="'+D.sPageButton+'">'+e.fnFormatNumber(l)+"</a>":'<a tabindex="'+ 
     151e.iTabIndex+'" class="'+D.sPageButtonActive+'">'+e.fnFormatNumber(l)+"</a>";l=0;for(k=J.length;l<k;l++)0!==J[l].childNodes.length&&(i("span:eq(0)",J[l]).html(v).children("a").each(H),x=J[l].getElementsByTagName("a"),x=[x[0],x[1],x[x.length-2],x[x.length-1]],i(x).removeClass(D.sPageButton+" "+D.sPageButtonActive+" "+D.sPageButtonStaticDisabled),i([x[0],x[1]]).addClass(1==t?D.sPageButtonStaticDisabled:D.sPageButton),i([x[2],x[3]]).addClass(0===n||t===n||-1===e._iDisplayLength?D.sPageButtonStaticDisabled: 
     152D.sPageButton))}}}});i.extend(j.ext.oSort,{"string-pre":function(e){"string"!=typeof e&&(e=null!==e&&e.toString?e.toString():"");return e.toLowerCase()},"string-asc":function(e,i){return e<i?-1:e>i?1:0},"string-desc":function(e,i){return e<i?1:e>i?-1:0},"html-pre":function(e){return e.replace(/<.*?>/g,"").toLowerCase()},"html-asc":function(e,i){return e<i?-1:e>i?1:0},"html-desc":function(e,i){return e<i?1:e>i?-1:0},"date-pre":function(e){e=Date.parse(e);if(isNaN(e)||""===e)e=Date.parse("01/01/1970 00:00:00"); 
     153return e},"date-asc":function(e,i){return e-i},"date-desc":function(e,i){return i-e},"numeric-pre":function(e){return"-"==e||""===e?0:1*e},"numeric-asc":function(e,i){return e-i},"numeric-desc":function(e,i){return i-e}});i.extend(j.ext.aTypes,[function(e){if("number"===typeof e)return"numeric";if("string"!==typeof e)return null;var i,j=!1;i=e.charAt(0);if(-1=="0123456789-".indexOf(i))return null;for(var k=1;k<e.length;k++){i=e.charAt(k);if(-1=="0123456789.".indexOf(i))return null;if("."==i){if(j)return null; 
     154j=!0}}return"numeric"},function(e){var i=Date.parse(e);return null!==i&&!isNaN(i)||"string"===typeof e&&0===e.length?"date":null},function(e){return"string"===typeof e&&-1!=e.indexOf("<")&&-1!=e.indexOf(">")?"html":null}]);i.fn.DataTable=j;i.fn.dataTable=j;i.fn.dataTableSettings=j.settings;i.fn.dataTableExt=j.ext})(jQuery,window,document,void 0); 
  • tablepress/trunk/libraries/evalmath.class.php

    r558089 r578853  
    1919 
    2020with modifications by Petr Skoda (skodak) from Moodle - http://moodle.org/ 
    21 (this version: https://github.com/moodle/moodle/blob/1e257a3a54d68133bdc02f693a248203a2d2888b/lib/evalmath/evalmath.class.php ) 
     21(this version: https://github.com/moodle/moodle/blob/4efc3d4096bc1d29e9d77f9af7194b2babfa2821/lib/evalmath/evalmath.class.php ) 
    2222 
    2323additional modifications by Tobias Bäthge: 
    2424- changed get_string() to MoodleTranslations::get_string(), which is a custom localization from Moodle 
    25 - removed 'round' from $this->fb, as it is in $this->fc and does not work with two parameters otherwise 
    2625 
    2726================================================================================ 
     
    624623 
    625624    static function rand_float(){ 
    626         $randomvalue = array_shift(unpack('v', md5(self::get_random_seed(), true))); 
    627         return $randomvalue / 65536; 
    628     } 
    629  
     625        $randomvalues = unpack('v', md5(self::get_random_seed(), true)); 
     626        return array_shift($randomvalues) / 65536; 
     627    } 
    630628} 
  • tablepress/trunk/models/model-options.php

    r558089 r578853  
    4848    protected $default_user_options = array( 
    4949        'user_options_db_version' => TablePress::db_version, 
    50         'admin_menu_parent_page' => 'tools.php', 
     50        'admin_menu_parent_page' => 'bottom', 
    5151        'plugin_language' => 'auto', 
    5252        'message_first_visit' => true 
  • tablepress/trunk/models/model-table.php

    r558089 r578853  
    238238 
    239239        // at this point, post was successfully added 
     240 
     241        // invalidate table output caches that belong to this table 
     242        $this->_invalidate_table_output_caches( $table['id'] ); 
     243 
    240244        return $table['id']; 
    241245    } 
     
    318322        // if post was deleted successfully, remove the table ID from the list of tables 
    319323        $this->_remove_post_id( $table_id ); 
     324 
     325        // invalidate table output caches that belong to this table 
     326        $this->_invalidate_table_output_caches( $table['id'] ); 
     327 
    320328        return true; 
    321329    } 
     
    349357        $count_db = $this->model_post->count_posts(); 
    350358        return array( 'list' => $count_list, 'db' => $count_db ); 
     359    } 
     360 
     361    /** 
     362     * Delete all transients used for output caching of a table (e.g. when the table is updated or deleted) 
     363     * 
     364     * @since 1.0.0 
     365     * 
     366     * @param string $table_id Table ID 
     367     */ 
     368    protected function _invalidate_table_output_caches( $table_id ) { 
     369        $caches_list_transient_name = 'tablepress_c_' . md5( $table_id ); 
     370        $caches_list = get_transient( $caches_list_transient_name ); 
     371        if ( is_array( $caches_list ) ) { 
     372            foreach ( $caches_list as $cache_transient_name => $dummy_value ) { 
     373                delete_transient( $cache_transient_name ); 
     374            } 
     375        } 
     376        delete_transient( $caches_list_transient_name ); 
    351377    } 
    352378 
     
    474500                'datatables_paginate' => true, 
    475501                'datatables_lengthchange' => true, 
     502                'datatables_paginate_entries' => 10, 
     503                'datatables_info' => true, 
     504                'datatables_scrollX' => true, 
    476505                'datatables_custom_commands' => '' 
     506                //'datatables_tabletools' => false, 
     507                //'cache_table_output' => true??? 
    477508            ), 
    478509            'visibility' => array( 
  • tablepress/trunk/readme.txt

    r558089 r578853  
    33Donate link: http://tobias.baethge.com/donate/ 
    44Tags: html,table,data,editor,csv,excel,import,export 
    5 Requires at least: 3.4 
    6 Tested up to: 3.4 
     5Requires at least: 3.4.1 
     6Tested up to: 3.5 
    77 
    88TablePress enables you to create and manage tables, without having to write HTML code, and it adds valuable functions for your visitors. 
     
    1010== Description == 
    1111 
    12 ATTENTION: TablePress is absolute ALPHA software right now. Use at your own risk. No support will be provided yet! 
     12**ATTENTION: TablePress is absolute ALPHA software right now. Use at your own risk. No support will be provided yet!** 
     13 
     14TablePress enables you to create and manage tables on your WordPress site. No HTML knowledge is needed, as a comfortable interface allows to easily edit table data. Tables can contain any type of data, even formulas that will be evaluated. An additional JavaScript library can be used to add features like sorting, pagination, filtering, and more for site visitors. You can include the tables into your posts, on your pages, or in text widgets with ease. Tables can be imported and exported from/to CSV files (e.g. from Excel), HTML files, and JSON. 
     15 
     16= More information = 
     17Please visit the plugin website at http://tablepress.org/ for more information. 
     18 
     19If you like the TablePress plugin, please rate it here in the WordPress Plugin Directory, support it with your [donation](http://tablepress.org/donate/), or [flattr it](https://flattr.com/thing/783658/TablePress). Thank you! 
     20 
     21== Screenshots == 
     22 
     23Screenshots of the TablePress interface and links to example tables are available at http://tablepress.org/features/. 
     24 
     25== Installation == 
     26 
     27The easiest way to install TablePress is via your WordPress Dashboard. Go to the "Plugins" section and search for "TablePress" in the WordPress Plugin Directory. Then you can click "Install" and the following steps will be done for you automatically. You'll just have to activate the plugin (step 5). 
     28 
     29Manual Installation works just as for most other WordPress plugins: 
     30 
     311. Download and extract the zip file and just drop the folder "tablepress" into the "wp-content/plugins/" directory of your WordPress installation. 
     32 
     331. Activate the plugin "TablePress" on your "Plugins" page. 
     34 
     351. Create and manage tables by going to the "TablePress" section in the admin menu. 
     36 
     371. Add a table to a page, post, or text widget, by adding the Shortcode `[table id=&lt;your-table's-id&gt; /]` to its content. 
     38 
     391. You can change the table styling by using CSS code, which can be entered into the "Custom CSS" textarea on the "Plugin Options" screen. 
     40 
     41== Frequently Asked Questions == 
     42 
     43= Where can I find answers to Frequently Asked Questions? = 
     44 
     45A wide group of questions, regarding different features or styling has been answered in the [FAQ section](http://tablepress.org/faq/) on the plugin website. 
     46 
     47= Support? = 
     48 
     49For support questions, bug reports, or feature requests, please use the [WordPress Support Forums](http://wordpress.org/support/plugin/tablepress). Please [search](http://wordpress.org/support/) through the forums first, and only [open a new thread](http://wordpress.org/support/plugin/tablepress) if you don't find an existing answer. Thank you! 
     50 
     51= Requirements? = 
     52 
     53In short: WordPress 3.5 or higher, while the latest version of WordPress is always recommended. 
     54 
     55= Languages and Localization? = 
     56 
     57The plugin currently includes the following languages: 
     58English and German. 
     59 
     60I'd really appreciate it, if you would translate the plugin into your language! Using Heiko Rabe's WordPress plugin [Codestyling Localization](http://www.code-styling.de/english/development/wordpress-plugin-codestyling-localization-en/) that really is as easy as pie. Just install the plugin, add your language, create the .po-file, translate the strings in the comfortable editor and create the .mo-file. It will automatically be saved in TablePress's plugin folder. If you send me the .mo- and .po-file, I will gladly include them into future plugin releases. 
     61There is also a .pot-file available to use in the "i18n" subfolder. Of course you can also use [poEdit](http://www.poedit.net/) as your editor, which also works nicely. 
     62 
     63= Where can I get more information? = 
     64 
     65Please visit the [official plugin website](http://tablepress.org/) for the latest information on this plugin. 
     66 
     67== Usage == 
     68 
     69After installing the plugin, you can add, import, export, edit, copy, delete, ... tables via the "TablePress" screen in your admin menu in the WordPress Dashboard. 
     70Everything should be self-explaining there. 
     71 
     72To show one of your tables in a post, on a page, or in a text widget, just include the Shortcode `[table id=&lt;the-id&gt; /]` to your post/page/text widget, where `&lt;the-id&gt` is the ID of your table (can be found on the left side of the "All Tables" screen.) 
     73 
     74After that you might want to change the styling of the table. You can do this by entering CSS commands into the "Custom CSS" textarea on the "Plugin Options" screen. 
     75You may also add certain features (like sorting, pagination, filtering, alternating row colors, row highlighting, print name and/or description, ...) by checking the appropriate options on the "Edit table" screen. 
     76 
     77== Acknowledgements == 
     78 
     79Special thanks go to [Allan Jardine](http://www.datatables.net/) for the DataTables jQuery plugin. 
     80Thanks to all language file translators! 
     81Thanks to every donor, supporter and bug reporter! 
    1382 
    1483== License == 
     
    1685This plugin is Free Software, released under the GPL, version 2. 
    1786You may use it free of charge for any purpose. 
    18 I kindly ask you for link somewhere on your website to http://tobias.baethge.com/. This is not required! 
    19 I'm also happy about [donations](http://tobias.baethge.com/donate/) or something from [my wishlist](http://tobias.baethge.com/wishlist/)! Thanks! 
     87I kindly ask you for link somewhere on your website to http://tablepress.org/. This is not required! 
     88I'm also happy about [donations](http://tablepress.org/donate/) or something from [my wishlist](http://tobias.baethge.com/wishlist/)! Thanks! 
    2089 
    2190== Changelog == 
    2291 
    23 = Version 0.1-alpha = 
     92= Version 0.2-alpha = 
    2493This version is the initial release. 
    2594 
    2695== Upgrade Notice == 
    2796 
    28 = 0.1-alpha = 
     97= 0.2-alpha = 
    2998This version is the initial release. 
  • tablepress/trunk/tablepress.php

    r558089 r578853  
    1212Plugin URI: http://tobias.baethge.com/wordpress/plugins/tablepress/ 
    1313Description: TablePress enables you to create and manage tables in your posts and pages, without having to write HTML code, and it adds valuable functions for your visitors. 
    14 Version: 0.1-alpha 
     14Version: 0.2-alpha 
    1515Author: Tobias Bäthge 
    1616Author URI: http://tobias.baethge.com/ 
  • tablepress/trunk/views/view-add.php

    r558089 r578853  
    106106                <p><?php _e( 'The number of columns in your table.', 'tablepress' ); ?></p> 
    107107            </div> 
    108             <div class="clear" /> 
     108            <div class="clear"></div> 
    109109        </div> 
    110110        <?php 
  • tablepress/trunk/views/view-edit.php

    r558089 r578853  
    481481        <td class="column-2"><input type="checkbox" id="option-datatables-paginate" name="table[options][datatables_paginate]" value="true"<?php checked( $options['datatables_paginate'] ); ?> /></td> 
    482482    </tr> 
    483     <tr class="bottom-border"> 
     483    <tr class="no-border"> 
     484        <th class="column-1" scope="row"><label for="option-datatables-paginate_entries"><?php _e( 'Pagination Entries', 'tablepress' ); ?>:</label></th> 
     485        <td class="column-2"><input type="number" id="option-datatables-paginate_entries" name="table[options][datatables_paginate_entries]" value="<?php echo $options['datatables_paginate_entries']; ?>" min="1" max="99999" maxlength="5" /></td> 
     486    </tr> 
     487    <tr class="no-border"> 
    484488        <th class="column-1" scope="row"><label for="option-datatables-lengthchange"><?php _e( 'Pagination Length Change', 'tablepress' ); ?>:</label></th> 
    485489        <td class="column-2"><input type="checkbox" id="option-datatables-lengthchange" name="table[options][datatables_lengthchange]" value="true"<?php checked( $options['datatables_lengthchange'] ); ?> /></td> 
     490    </tr> 
     491    <tr class="no-border"> 
     492        <th class="column-1" scope="row"><label for="option-datatables-info"><?php _e( 'Info', 'tablepress' ); ?>:</label></th> 
     493        <td class="column-2"><input type="checkbox" id="option-datatables-info" name="table[options][datatables_info]" value="true"<?php checked( $options['datatables_info'] ); ?> /></td> 
     494    </tr> 
     495    <tr class="bottom-border"> 
     496        <th class="column-1" scope="row"><label for="option-datatables-scrollX"><?php _e( 'Horizontal Scrolling', 'tablepress' ); ?>:</label></th> 
     497        <td class="column-2"><input type="checkbox" id="option-datatables-scrollX" name="table[options][datatables_scrollX]" value="true"<?php checked( $options['datatables_scrollX'] ); ?> /></td> 
    486498    </tr> 
    487499    <tr class="top-border"> 
  • tablepress/trunk/views/view-list.php

    r558089 r578853  
    110110            // $this->do_text_boxes( 'header' ); 
    111111        ?> 
    112             <div id="poststuff" class="metabox-holder<?php echo ( isset( $GLOBALS['screen_layout_columns'] ) && ( 2 == $GLOBALS['screen_layout_columns'] ) ) ? ' has-right-sidebar' : ''; ?>"> 
    113                 <div id="side-info-column" class="inner-sidebar"> 
    114                 <?php 
    115                     // print all boxes in the sidebar 
    116                     $this->do_text_boxes( 'side' ); 
    117                     $this->do_meta_boxes( 'side' ); 
    118                 ?> 
    119                 </div> 
    120                 <div id="post-body"> 
    121                     <div id="post-body-content"> 
     112            <div id="poststuff"> 
     113                <div id="post-body" class="metabox-holder columns-<?php echo ( isset( $GLOBALS['screen_layout_columns'] ) && ( 2 == $GLOBALS['screen_layout_columns'] ) ) ? '2' : '1'; ?>"> 
     114                    <div id="postbox-container-2" class="postbox-container"> 
     115                        <?php 
     116                        $this->do_text_boxes( 'normal' ); 
     117                        $this->do_meta_boxes( 'normal' ); 
     118 
     119                        $this->do_text_boxes( 'additional' ); 
     120                        $this->do_meta_boxes( 'additional' ); 
     121 
     122                        // print all submit buttons 
     123                        $this->do_text_boxes( 'submit' ); 
     124                        ?> 
     125                    </div> 
     126                    <div id="postbox-container-1" class="postbox-container"> 
    122127                    <?php 
    123                     $this->do_text_boxes( 'normal' ); 
    124                     $this->do_meta_boxes( 'normal' ); 
    125  
    126                     $this->do_text_boxes( 'additional' ); 
    127                     $this->do_meta_boxes( 'additional' ); 
    128  
    129                     // print all submit buttons 
    130                     $this->do_text_boxes( 'submit' ); 
     128                        // print all boxes in the sidebar 
     129                        $this->do_text_boxes( 'side' ); 
     130                        $this->do_meta_boxes( 'side' ); 
    131131                    ?> 
    132132                    </div> 
  • tablepress/trunk/views/view-options_custom_css.php

    r558089 r578853  
    6767            $this->do_text_boxes( 'header' ); 
    6868        ?> 
    69             <div id="poststuff" class="metabox-holder<?php echo ( isset( $GLOBALS['screen_layout_columns'] ) && ( 2 == $GLOBALS['screen_layout_columns'] ) ) ? ' has-right-sidebar' : ''; ?>"> 
    70                 <div id="side-info-column" class="inner-sidebar"> 
    71                 <?php 
    72                     // print all boxes in the sidebar 
    73                     $this->do_text_boxes( 'side' ); 
    74                     $this->do_meta_boxes( 'side' ); 
    75                 ?> 
    76                 </div> 
    77                 <div id="post-body"> 
    78                     <div id="post-body-content"> 
     69            <div id="poststuff"> 
     70                <div id="post-body" class="metabox-holder columns-<?php echo ( isset( $GLOBALS['screen_layout_columns'] ) && ( 2 == $GLOBALS['screen_layout_columns'] ) ) ? '2' : '1'; ?>"> 
     71                    <div id="postbox-container-2" class="postbox-container"> 
     72                        <?php 
     73                        $this->do_text_boxes( 'normal' ); 
     74                        $this->do_meta_boxes( 'normal' ); 
     75 
     76                        $this->do_text_boxes( 'additional' ); 
     77                        $this->do_meta_boxes( 'additional' ); 
     78 
     79                        // print all submit buttons 
     80                        $this->do_text_boxes( 'submit' ); 
     81                        ?> 
     82                    </div> 
     83                    <div id="postbox-container-1" class="postbox-container"> 
    7984                    <?php 
    80                     $this->do_text_boxes( 'normal' ); 
    81                     $this->do_meta_boxes( 'normal' ); 
    82  
    83                     $this->do_text_boxes( 'additional' ); 
    84                     $this->do_meta_boxes( 'additional' ); 
    85  
    86                     // print all submit buttons 
    87                     $this->do_text_boxes( 'submit' ); 
     85                        // print all boxes in the sidebar 
     86                        $this->do_text_boxes( 'side' ); 
     87                        $this->do_meta_boxes( 'side' ); 
    8888                    ?> 
    8989                    </div> 
Note: See TracChangeset for help on using the changeset viewer.