<!DOCTYPE html>
<html>

<head>
  <link data-require="bootstrap@3.3.5" data-semver="3.3.5" rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
  <link rel="stylesheet" href="bootstrap-datetimepicker.css" />
  <link rel="stylesheet" href="selectize.bootstrap3.css" />
  <link rel="stylesheet" href="query-builder.default.css" />
  <!--<script src="template-tag-polyfill.js"></script>-->
  <script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
  <script data-require="bootstrap@3.3.5" data-semver="3.3.5" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  <script data-require="moment.js@*" data-semver="2.14.1" src="https://npmcdn.com/moment@2.14.1"></script>
  <script src="https://cdn.jsdelivr.net/npm/interactjs@1.3.4/dist/interact.min.js"></script>
  <script src="bootstrap-datetimepicker.min.js"></script>
  <script src="selectize.js"></script>
  <script src="query-builder.standalone.min.js"></script>
  <script src="script.js"></script>
  
  <style>
    .input-sm {
      height: 25px !important;
    }
    .inline-block {
      display: inline-block !important;
    }
    .disable-text, 
    .disable-text input.form-control {
      color: #ccc;
    }
    
    #report-templates {
      padding: 6px;
      background: lightgrey;
      border: 1px solid darkgrey;
      margin: 0 10px 8px;
    }
      #report-templates hr { 
        margin: 7px 0;
      }
      #report-templates input[type=checkbox] {
        margin-left: 6px;
        margin-right: 6px;
      }
      #report-templates label:first-child {
        display: inline;
        font-weight: normal;
      }
        #report-templates label:first-child select {
          display: inline;
          width: auto;
        }
        
    /*** Base Styles ***/
    
    .rule-header button:first-child {
      margin-right: 3px;
    }
    .rule-header i {
      top: 2px;
    }
    
    .filter-operator-wrapper {
      display: inline-block; 
      vertical-align: middle;
    }
      .filter-operator-wrapper > label {
        display: block; 
        margin-bottom: 0; 
        text-align: center; 
        font-weight: normal; 
        font-size: x-small;
      }
        .filter-operator-wrapper > label > input {
          vertical-align: text-bottom;
        }
        
    .rule-filter-container select {
      max-width: 250px;
    }
    
    .query-builder .rule-value-container {
      padding-left: 16px;
      margin-bottom: -4px !important;
    }
      .rule-value-container > div > div > div,
      .rule-value-container div.inline-block > label,
      .rule-value-container > div > div > label,
      .inspection-template-common-field {
        display: block;
        margin-bottom: 4px !important;
      }
      .rule-value-container input[type=radio], 
      .rule-value-container input[type=checkbox] {
        margin-right: 10px;
      }
      .rule-value-container .form-control {
        display: inline-block;
      }
      .rule-value-container input {
        text-align: center;
      }
      .rule-value-container input[type=number] {
        width: 60px;
      }
      .rule-value-container em {
        line-height: 3.7;
      }
    
    /*** Plugins ***/
    
    .date-time-picker {
      width: 115px;
      display: inline-block;
      vertical-align: middle;
    }
      .glyphicon-calendar {
        font-size: 12px;
      }
      .date-time-picker.has-time {
        width: 148px;
      }
      /* Below 3 selectors prevent picker's textbox and glyphicon from having occasional uneven heights due to overriding bootstrap's .input-sm height */
      .date-time-picker > div {
        height: 25px;
      }
        .date-time-picker > div > .input-sm {
          height: 100% !important;
        }
        .date-time-picker > div > .input-group-addon {
          height: 100%;
          padding-top: 2px;
          padding-bottom: 0;
        }
        
    .tag-picker, .user-picker, .text-picker {
      max-width: 400px;
      margin-top: 2px;
      vertical-align: middle;
    }
      .selectize-dropdown {
        min-width: 200px;
      }
      
    /*** Template Overrides ***/
    
    .note-date-time select {
      width: 90px;
    }
    
    .note-contents input[type=text] {
      width: 45vw;
      padding-left: 12px !important;
      padding-right: 12px !important;
      margin-bottom: 6px;
    }
      @media (max-width: 450px) {
        .note-contents input[type=text] {
          width: 100%;
        }
      }
      
    .attachments input[type=text] {
      max-width: 150px;
    }
    
    .comments .user-picker {
      display: inline-block;
    }
    .comments > div > label > input[type=text] {
      /*width: 82%*/
      width: 73%
    }
  </style>
</head>

<body>
  <h1>Report Builder Prototyping</h1>
  
  <div id="report-templates">
    <label>Report Template:
      <select class="form-control">
      </select>
    </label>
    
    <hr>
    
    <div>
      <label>
        <input type="checkbox" value="Abnormal Choices" />
        
        <select class="form-control input-sm">
          <option>Does</option>
          <option>Does Not</option>
        </select>
        include abnormal choices
      </label>
    </div>
    
    <div>
      <label>
        <input type="checkbox" value="Out of Range Values" />
        
        <select class="form-control input-sm">
          <option>Does</option>
          <option>Does Not</option>
        </select>
        include out of range values
      </label>
    </div>
    
    <div>
      <label>
        <input type="checkbox" value="Pending Signoffs" />
        
        <select class="form-control input-sm">
          <option>Does</option>
          <option>Does Not</option>
        </select>
        have pending signoffs
      </label>
    </div>
  </div>
  
  <div id="builder"></div>
  
  <template id="note-date-time">
    <div class="specific-date">
      <div>
        <label>
          <input type="radio" value="Today" checked="" /> Today
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Yesterday" /> Yesterday
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Number of Days Ago" />
          <input class="form-control input-sm" type="number" min="2" /> days ago
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Previous Weekday" /> Previous
        </label>
        
        <select class="form-control input-sm">
          <option>Monday</option>
          <option>Tuesday</option>
          <option>Wednesday</option>
          <option>Thursday</option>
          <option>Friday</option>
          <option>Saturday</option>
          <option>Sunday</option>
        </select>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Specific Date" /> Specific date:
        </label>
        
        <div class="date-time-picker">
          <div class="input-group date" data-format="L">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <div class="date-range">
      <div class="inline-block">
        <label>
          <input type="radio" value="This Week" /> This Week (M - Su)
        </label>
        
        <label>
          <input type="radio" value="Last Week" /> Last Week (M - Su)
        </label>
        
        <label>
          <input type="radio" value="This Quarter" /> This Quarter
        </label>
        
        <label>
          <input type="radio" value="Last Quarter" /> Last Quarter
        </label>
      </div>
      
      <div class="inline-block pull-right">
        <label>
          <input type="radio" value="This Month" /> This Month
        </label>
        
        <label>
          <input type="radio" value="Last Month" /> Last Month
        </label>
        
        <label>
          <input type="radio" value="This Year" /> This Year
        </label>
        
        <label>
          <input type="radio" value="Last Year" /> Last Year
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Between Days Ago" />
          <input class="form-control input-sm" type="number" min="0" /> days ago to
          <input class="form-control input-sm" type="number" min="0" /> days ago
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Between Dates" /> Dates
        </label>
        
        <div class="date-time-picker">
          <div class="input-group date" data-format="L">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>

        to

        <div class="date-time-picker">
          <div class="input-group date" data-format="L">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <div class="time-range">
      <div class="inline-block">
        <label>
          <input type="radio" value="This Week" /> This Week (M - Su)
        </label>
        
        <label>
          <input type="radio" value="Last Week" /> Last Week (M - Su)
        </label>
        
        <label>
          <input type="radio" value="This Quarter" /> This Quarter
        </label>
        
        <label>
          <input type="radio" value="Last Quarter" /> Last Quarter
        </label>
      </div>
      
      <div class="inline-block pull-right">
        <label>
          <input type="radio" value="This Month" /> This Month
        </label>
        
        <label>
          <input type="radio" value="Last Month" /> Last Month
        </label>
        
        <label>
          <input type="radio" value="This Year" /> This Year
        </label>
        
        <label>
          <input type="radio" value="Last Year" /> Last Year
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Between Days Ago" />
          <input class="form-control input-sm" type="number" min="0" /> days ago to
          <input class="form-control input-sm" type="number" min="0" /> days ago
        </label>
      </div>
      
      <div>
        <label>
          <input type="radio" value="Between Dates/Times" /> Dates/Times
        </label>
        
        <div class="date-time-picker has-time">
          <div class="input-group date" data-format="L HH:mm">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>

        to

        <div class="date-time-picker has-time">
          <div class="input-group date" data-format="L HH:mm">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </template>
  
  <template id="tags">
    <div class="any">
      <em>* Notes with one or more of any tags</em>
    </div>
    
    <div class="none">
      <em>* Notes without any tags</em>
    </div>
    
    <div class="include-all-of tag-picker">
      <input type="text" placeholder="Filter tag names" />
    </div>
    
    <div class="include-any-of tag-picker">
      <input type="text" placeholder="Filter tag names" />
    </div>
    
    <div class="missing-all-of tag-picker">
      <input type="text" placeholder="Filter tag names" />
    </div>
    
    <div class="missing-any-of tag-picker">
      <input type="text" placeholder="Filter tag names" />
    </div>
    
    <div data-template-segment-only class="any include-all-of include-any-of missing-all-of missing-any-of">
      <label>
        <input type="checkbox" value="Number of Tags Selected" />and have
        
        <select class="form-control input-sm">
          <option>More Than</option>
          <option>Less Than</option>
          <option>Exactly</option>
        </select>
        
        <input class="form-control input-sm" type="number" min="0" /> tags selected
      </label>
    </div>
  </template>
  
  <template id="note-contents">
    <div class="includes">
      <input type="text" class="form-control input-sm" placeholder="Enter text to filter by" />
        
      <label>
        <input type="checkbox" value="Case Sensitive" /> Case sensitive?
      </label>
      
      <label>
        <input type="checkbox" value="Whole Word" /> Whole word?
      </label>
      
      <label>
        <input type="checkbox" value="Wildcards" /> Wildcards?
      </label>
    </div>
    
    <div class="excludes">
      <input type="text" class="form-control input-sm" placeholder="Enter text to filter by" />
      
      <label>
        <input type="checkbox" value="Case Sensitive" /> Case sensitive?
      </label>
      
      <label>
        <input type="checkbox" value="Whole Word" /> Whole word?
      </label>
      
      <label>
        <input type="checkbox" value="Wildcards" /> Wildcards?
      </label>
    </div>
  </template>
  
  <template id="users">
    <div class="any">
      <em>* Any user was chosen</em>
    </div>
    
    <div class="none">
      <em>* No user was chosen</em>
    </div>
    
    <div class="includes-any-of user-picker">
      <input type="text" placeholder="Filter users" />
    </div>
    
    <div class="excludes-all-of user-picker">
      <input type="text" placeholder="Filter users" />
    </div>
  </template>
  
  <template id="turnover">
    <div class="yes">
      <em>* Includes only turnover notes</em>
    </div>
    
    <div class="no">
      <em>* Excludes turnover notes</em>
    </div>
  </template>
  
  <template id="attachments">
    <div class="any">
      <em>* Notes with one or more attachments</em>
    </div>
    
    <div class="none">
      <em>* Notes without any attachments</em>
    </div>
    
    <div class="have">
      <label>
        <input type="checkbox" value="Filename" /> File(s) with name containing
        <input class="form-control input-sm" type="text" />
      </label>
      
      <label>
        <input type="checkbox" value="Extension" /> File(s) with extension
        <input class="form-control input-sm" type="text" />
      </label>
      
      <label>
        <input type="checkbox" name="multiple" value="More Than" /> More than
        <input class="form-control input-sm" type="number" min="0" /> attachment(s)
      </label>
      
      <label>
        <input type="checkbox" name="multiple" value="Less Than" /> Less than
        <input class="form-control input-sm" type="number" min="1" /> attachment(s)
      </label>
      
      <label>
        <input type="checkbox" name="exactly" value="Exactly" /> Exactly
        <input class="form-control input-sm" type="number" min="0" /> attachment(s)
      </label>
    </div>
    
    <div class="dont-have">
      <label>
        <input type="checkbox" value="Filename" /> File(s) with name containing
        <input class="form-control input-sm" type="text" />
      </label>
      
      <label>
        <input type="checkbox" value="Extension" /> File(s) with extension
        <input class="form-control input-sm" type="text" />
      </label>
      
      <label>
        <input type="checkbox" value="More Than" /> More than
        <input class="form-control input-sm" type="number" min="0" /> attachment(s)
      </label>
      
      <label>
        <input type="checkbox" value="Less Than" /> Less than
        <input class="form-control input-sm" type="number" min="1" /> attachment(s)
      </label>
      
      <label>
        <input type="checkbox" value="Exactly" /> Exactly
        <input class="form-control input-sm" type="number" min="0" /> attachment(s)
      </label>
    </div>
  </template>
  
  <template id="comments">
    <div class="any">
      <em>* Notes with one or more comments</em>
    </div>
    
    <div class="none">
      <em>* Notes without any comments</em>
    </div>
    
    <div class="must">
      <label>
        <input type="checkbox" value="Text" />Have the text 
        <input class="form-control input-sm" type="text"/>
      </label>
      
      <div>
        <label>
          <input type="checkbox" value="From User" />Be from any of the users
        </label>
        
        <div class="user-picker">
          <input type="text" placeholder="Filter users">
        </div>
      </div>
      
      <div>
        <label>
          <input type="checkbox" value="Between Dates" />Be from between the times
        </label>
        
        <div class="date-time-picker has-time">
          <div class="input-group date" data-format="L HH:mm">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>

        to

        <div class="date-time-picker has-time">
          <div class="input-group date" data-format="L HH:mm">
            <input type="text" class="form-control input-sm" />
            
            <div class="input-group-addon">
              <span class="glyphicon glyphicon-calendar"></span>
            </div>
          </div>
        </div>
      </div>
    </div>
    
    <div class="must-not">
      <label>
        <input type="checkbox" value="Text" />Have the text 
        <input class="form-control input-sm" type="text"/>
      </label>
      
      <div>
        <label>
          <input type="checkbox" value="From User" />Be from any of the users
        </label>
        
        <div class="user-picker">
          <input type="text" placeholder="Filter users">
        </div>
      </div>
    </div>
  </template>
  
  <template id="lb-checkbox-template-segment">
    <div class="any">
      <em>* Has been either checked or un-checked</em>
    </div>
    
    <div class="none">
      <em>* Has not been checked or un-checked</em>
    </div>
    
    <div class="is">
      <label>
        <input type="checkbox" name="checked" value="Checked" /> Checked
      </label>
      
      <label>
        <input type="checkbox" name="unchecked" value="Un-checked" /> Un-checked
      </label>
    </div>
    
    <div class="is-not">
      <label>
        <input type="checkbox" name="checked" value="Checked" /> Checked
      </label>
      
      <label>
        <input type="checkbox" name="unchecked" value="Un-checked" /> Un-checked
      </label>
    </div>
  </template>
  
  <template id="lb-numeric-template-segment">
    <div class="any">
      <em>* Has a value</em>
    </div>
    
    <div class="none">
      <em>* Does not have a value</em>
    </div>
    
    <div class="is">
      <label>
        <input type="checkbox" name="range" value="More Than" /> More than
        <input class="form-control input-sm" type="number" />
      </label>
      
      <label>
        <input type="checkbox" name="range" value="Less Than" /> Less than
        <input class="form-control input-sm" type="number" />
      </label>
      
      <label>
        <input type="checkbox" name="exact" value="Exactly" /> Exactly
        <input class="form-control input-sm" type="number" />
      </label>
      
      <label>
        <input type="checkbox" value="Out of Range"/> An Out of Range value
      </label>
    </div>
    
    <div class="is-not">
      <label>
        <input type="checkbox" name="range" value="More Than" /> More than
        <input class="form-control input-sm" type="number" />
      </label>
      
      <label>
        <input type="checkbox" name="range" value="Less Than" /> Less than
        <input class="form-control input-sm" type="number" />
      </label>
      
      <label>
        <input type="checkbox" name="exact" value="Exactly" /> Exactly
        <input class="form-control input-sm" type="number" />
      </label>
      
      <label>
        <input type="checkbox" value="Out of Range"/> An Out of Range value
      </label>
    </div>
  </template>
  
  <template id="lb-signoff-by-template-segment">
    <div class="has">
      <em>* been signed off</em>
    </div>
    
    <div class="has-not">
      <em>* been signed off</em>
    </div>
    
    <div class="includes-any-of user-picker">
      <input type="text" placeholder="Filter users" />
    </div>
    
    <div class="excludes-all-of user-picker">
      <input type="text" placeholder="Filter users" />
    </div>
  </template>
  
  <template id="lb-text-choice-template-segment">
    <div class="any">
      <em>* Has at least one choice selected</em>
    </div>
    
    <div class="none">
      <em>* Has no choices selected</em>
    </div>
    
    <div class="include-all-of text-picker">
      <input type="text" placeholder="Filter text choices" />
    </div>
    
    <div class="include-any-of text-picker">
      <input type="text" placeholder="Filter text choices" />
    </div>
    
    <div class="missing-all-of text-picker">
      <input type="text" placeholder="Filter text choices" />
    </div>
    
    <div class="missing-any-of text-picker">
      <input type="text" placeholder="Filter text choices" />
    </div>
    
    <div class="any include-all-of include-any-of missing-all-of missing-any-of">
      <label>
        <input type="checkbox" value="Includes Abnormal Choice" />and
        
        <select class="form-control input-sm">
          <option>Is</option>
          <option>Is Not</option>
        </select>
        an abnormal choice
      </label>
    </div>
  </template>
  
  <template id="lb-text-input-template-segment">
    <div class="any">
      <em>* Has at least one choice selected</em>
    </div>
    
    <div class="none">
      <em>* Has no choices selected</em>
    </div>
  </template>
  
  <template id="inspection-template-common-fields">
    <div class="inspection-template-common-field">
      <label>
        <input type="checkbox" value="Includes Segment Comment" />and
        
        <select class="form-control input-sm">
          <option>Does</option>
          <option>Does Not</option>
        </select>
        include a segment comment
      </label>
    </div>
    
    <div class="inspection-template-common-field">
      <label>
        <input type="checkbox" value="Includes Segment Attachment" />and
        
        <select class="form-control input-sm">
          <option>Does</option>
          <option>Does Not</option>
        </select>
        include a segment attachment
      </label>
    </div>
  </template>
  
  <button class="btn btn-primary" onclick="printRules()">Test</button>
  <button class="btn btn-primary" id="save-report">Save Report</button>
  <p id="rules"></p>
</body>

</html>
//debugger;
var $builder, 
    _selectedTemplateType,
    _templateSegmentToFilterMap = {
      'Text Input': {
        templateId: 'note-contents',
        operators: ['includes', 'excludes']
      },
      'Numeric Input': {
        templateId: 'lb-numeric-template-segment',
        operators: ['any', 'none', 'is', 'is-not']
      },
      'Checkbox': {
        templateId: 'lb-checkbox-template-segment',
        operators: ['any', 'none', 'is', 'is-not']
      },
      'Date/Time': {
        templateId: 'note-date-time',
        operators: ['specific-date', 'date-range', 'time-range']
      },
      'Text Choice': {
        templateId: 'lb-text-choice-template-segment',
        operators: ['any', 'none', 'include-all-of', 'include-any-of', 'missing-all-of', 'missing-any-of'],
        valueGetter: function(rule) {
          if (rule.operator.type == 'any' || rule.operator.type == 'none')
            return rule.operator.type == 'any';
          
          // This needs to be updated  
          if (rule.operator.type == 'is')
            return rule.$el.find('.rule-value-container .' + rule.operator.type + ' input:checked').val();
            
          var values = rule.$el.find('.rule-value-container .' + rule.operator.type + ' > input').val();
  
          if (values) {
            values = values.split(',').map(function(element) {
              return "/api/choiceListItems/" + parseInt(element, 10);
            });
          }
    
          return values;
        }
      },
      'Tag Choice': {
        templateId: 'tags',
        operators: ['any', 'none', 'include-all-of', 'include-any-of', 'missing-all-of', 'missing-any-of']
      },
      'Signoff': {
        templateId: 'lb-signoff-by-template-segment',
        operators: ['has', 'has-not', 'includes-any-of', 'excludes-all-of']
      },
      'File Attachment': {
        templateId: 'attachments',
        operators: ['any', 'none', 'have', 'dont-have']
      },
      'User Chooser': {
        templateId: 'users',
        operators: ['any', 'none', 'includes-any-of', 'excludes-all-of']
      }
    };

$(function() {
  $builder = $('#builder')
  .on('afterInit.queryBuilder', function(e) { 
    // Prevent AND/OR conditions from being disabled when group contains only one rule
    this.queryBuilder.__proto__.refreshGroupsConditions = function() {};
  })
  .queryBuilder({
    operators: [
      'specific-date', 'date-range', 'time-range', 
      'any', 'none', 
      'includes', 'include-all-of', 'include-any-of', 'includes-any-of', 
      'excludes', 'excludes-all-of', 'missing-all-of', 'missing-any-of', 
      'yes', 'no', 
      'have', 'dont-have', 
      'must', 'must-not',
      'has', 'has-not',
      'is', 'is-not',
      'does', 'does-not'
    ].map(function(operator) {
        return {
          type: operator,
          nb_inputs: 1,
          apply_to: null,
          multiple: true
        };
    }),
    lang: {
      add_rule: "Add Field",
      add_group: "Add Group",
      operators: {
        any: 'Any',
        none: 'None',
        includes: 'Includes',
        'include-all-of': 'Include All Of',
        'include-any-of': 'Include Any Of',
        'includes-any-of': 'Includes Any Of',
        excludes: 'Excludes',
        'excludes-all-of': 'Excludes All Of',
        'missing-all-of': 'Missing All Of',
        'missing-any-of': 'Missing Any Of',
        'specific-date': 'Of a Specific Date',
        'date-range': 'Within a Date Range',
        'time-range': 'Within a Time Range',
        have: 'Have',
        'dont-have': 'Don\'t Have',
        must: 'Must',
        'must-not': 'Must Not',
        yes: 'Yes',
        no: 'No',
        has: 'Has',
        'has-not': 'Has Not',
        'is': 'Is',
        'is-not': 'Is Not',
        'does': 'Does',
        'does-not': 'Does Not'
      }
    },
    plugins: [
      'sortable'
    ],
    templates: {
      rule: '\
        <div id="{{= it.rule_id }}" class="rule-container"> \
          <div class="rule-header"> \
            <div class="btn-group pull-right rule-actions"> \
              <button type="button" class="btn btn-sm btn-danger" data-delete="rule"> \
                <i class="{{= it.icons.remove_rule }}"></i> \
              </button> \
            </div> \
          </div> \
          {{? it.settings.display_errors }} \
            <div class="error-container"><i class="{{= it.icons.error }}"></i></div> \
          {{?}} \
          <div class="filter-operator-wrapper"> \
            <div class="rule-filter-container"></div> \
            <div class="rule-operator-container"></div> \
            <label> \
              <input type="checkbox" value="Allow Configuring On Query" /> Allow configuring on Query? \
            </label> \
          </div> \
          <div class="rule-value-container"></div> \
        </div>',
        
      group: '\
        <div id="{{= it.group_id }}" class="rules-group-container"> \
          <div class="rules-group-header"> \
            <div class="btn-group pull-right group-actions"> \
              <button type="button" class="btn btn-sm btn-success" data-add="rule"> \
                <strong><i class="{{= it.icons.add_rule }}"></i> {{= it.translate("add_rule") }}</strong> \
              </button> \
              {{? it.settings.allow_groups===-1 || it.settings.allow_groups>=it.level }} \
                <button type="button" class="btn btn-sm btn-success" data-add="group"> \
                  <strong><i class="{{= it.icons.add_group }}"></i> {{= it.translate("add_group") }}</strong> \
                </button> \
              {{?}} \
              {{? it.level>1 }} \
                <button type="button" class="btn btn-sm btn-danger" data-delete="group"> \
                  <i class="{{= it.icons.remove_group }}"></i> \
                </button> \
              {{?}} \
            </div> \
            <div class="btn-group group-conditions"> \
              {{~ it.conditions: condition }} \
                <label class="btn btn-sm btn-default"> \
                  <input type="radio" name="{{= it.group_id }}_cond" value="{{= condition }}"> {{= it.translate("conditions", condition) }} \
                </label> \
              {{~}} \
            </div> \
            {{? it.settings.display_errors }} \
              <div class="error-container"><i class="{{= it.icons.error }}"></i></div> \
            {{?}} \
          </div> \
          <div class=rules-group-body> \
            <div class=rules-list></div> \
          </div> \
        </div>'
    },
    default_filter: 'note-date-time',
    filters: [
      {
        id: 'note-date-time',
        label: 'Note Date/Time',
        optgroup: 'Default Fields',
        input: getRuleValueContainer,
        input_event: 'dp.change',
        operators: ['specific-date', 'date-range', 'time-range'],
        valueGetter: function(rule) {
          var values = [];
          
          rule.$el.find('.rule-value-container input:checked')
                    .closest('div')
                    .find(':input')
                    .each(function () {
                      values.push(this.value);
                    });
          
          return values;
        },
        valueSetter: function(rule, value) {
            
        },
        validation: {
          allow_empty_value: false,
          callback: validateDateTime
        }
      },
      {
        id: 'update-date-time',
        label: 'Update Date/Time',
        optgroup: 'Default Fields',
        data: { templateId: 'note-date-time' },
        input: getRuleValueContainer,
        input_event: 'dp.change',
        operators: ['specific-date', 'date-range', 'time-range'],
        default_operator: 'date-range',
        valueGetter: function(rule) {
          var values = [];
          
          rule.$el.find('.rule-value-container input:checked')
                    .closest('div')
                    .find(':input')
                    .each(function () {
                      values.push(this.value);
                    });
          
          return values;
        },
        valueSetter: function(rule, value) {
            
        },
        validation: {
          allow_empty_value: false,
          callback: validateDateTime
        }
      },
      {
        id: 'tags',
        label: 'Tags',
        optgroup: 'Default Fields',
        input: getRuleValueContainer,
        operators: ['any', 'none', 'include-all-of', 'include-any-of', 'missing-all-of', 'missing-any-of'],
        valueGetter: function(rule) {
          if (rule.operator.type == "any" || rule.operator.type == "none")
            return rule.operator.type == 'any';
            
          var values = rule.$el.find('.rule-value-container .' + rule.operator.type + ' > input').val();
          
          if (values) {
            values = values.split(',').map(function (element) {
              return parseInt(element, 10);
            });
          }
          
          return values;
        },
        valueSetter: function(rule, value) {
            
        },
        validation: {
          allow_empty_value: false,
          callback: function (value, rule) {
            if (typeof value != "boolean" && !value)
              return "Must select at least one tag";
            
            return true;
          }
        },
      },
      {
        id: 'note-contents',
        label: 'Note Contents',
        optgroup: 'Default Fields',
        input: getRuleValueContainer,
        operators: ['includes', 'excludes'],
        valueGetter: function(rule) {
          var text = rule.$el.find('.rule-value-container .' + rule.operator.type + ' input').val(),
              settings = rule.$el.find('.rule-value-container .' + rule.operator.type + ' > label > input');
              
          var settingsJSON = {
            'case-sensitive': settings[0].checked,
            'whole-word': settings[1].checked,
            'wildcards': settings[2].checked
          };
          
          return [text, settingsJSON];
        },
        valueSetter: function(rule, value) {
            
        },
        validation: {
          allow_empty_value: false,
          callback: function (value, rule) {
            return value[0] ? true : 'Must provide some text to compare';
          }
        },
        default_operator: 'includes'
      },
      {
        id: 'created-by',
        label: 'Created By',
        optgroup: 'Default Fields',
        data: { templateId: 'users' },
        input: getRuleValueContainer,
        operators: ['includes-any-of', 'excludes-all-of'],
        valueGetter: function(rule) {
          var values = rule.$el.find('.rule-value-container .' + rule.operator.type + ' > input').val();
          
          if (values) {
            values = values.split(',').map(function (element) {
              return parseInt(element, 10);
            });
          }
          
          return values;
        },
        valueSetter: function(rule, value) {
          
        },
        validation: {
          allow_empty_value: false,
          callback: function (value, rule) {
            return value ? true : 'Must select at least one user';
          }
        },
        default_operator: 'includes-any-of'
      },
      {
        id: 'updated-by',
        label: 'Updated By',
        optgroup: 'Default Fields',
        data: { templateId: 'users' },
        input: getRuleValueContainer,
        operators: ['includes-any-of', 'excludes-all-of'],
        valueGetter: function(rule) {
          var values = rule.$el.find('.rule-value-container .' + rule.operator.type + ' > input').val();
          
          if (values) {
            values = values.split(',').map(function (element) {
              return parseInt(element, 10);
            });
          }
          
          return values;
        },
        valueSetter: function(rule, value) {
          
        },
        validation: {
          allow_empty_value: false,
          callback: function (value, rule) {
            return value ? true : 'Must select at least one user';
          }
        },
        default_operator: 'includes-any-of'
      },
      {
        id: 'turnover',
        label: 'Turnover',
        optgroup: 'Default Fields',
        input: getRuleValueContainer,
        operators: ['yes', 'no'],
        valueGetter: function(rule) {
          return rule.operator.type == 'yes';
        },
        valueSetter: function(rule, value) {
          
        },
        default_operator: 'yes'
      },
      {
        id: 'attachments',
        label: 'Attachments',
        optgroup: 'Default Fields',
        input: getRuleValueContainer,
        operators: ['any', 'none', 'have', 'dont-have'],
        valueGetter: function(rule) {
          if (rule.operator.type == 'any' || rule.operator.type == 'none')
            return rule.operator.type == 'any';
            
          var checked = rule.$el.find('.rule-value-container .' + rule.operator.type + ' input:checked'),
              values = [];
            
          checked.each(function (index, element) {
            var inputValues = [];
            
            $(this).closest('label')
                   .find('input')
                   .each(function (index, element) {
                     inputValues.push(this.value);
                   });
                   
            values.push(inputValues);
          });
          
          return values;
        },
        valueSetter: function(rule, value) {
          
        },
        validation: {
          allow_empty_value: false,
          callback: function (value, rule) {
              if (value.length === 0)
                return "Must select an option from the right panel";
              
              for (var i = 0; i < value.length; i++) {
                switch (value[i][0]) {
                  case "Filename":
                    if (!value[i][1])
                      return "Must include some text to compare against filename";
                    break;
                    
                  case "Extension":
                    if (!value[i][1])
                      return "Must include some text to compare against file extension";
                    break;
                    
                  case "More Than":
                  case "Less Than":
                  case "Exactly":
                    if (!value[i][1])
                      return "Must provide a number value";
                    
                    value[i][1] = parseInt(value[i][1], 10);
                    break;
                }
              }
  
            return true;
          }
        },
        default_operator: 'any'
      },
      {
        id: 'comments',
        label: 'Comments',
        optgroup: 'Default Fields',
        input: getRuleValueContainer,
        input_event: 'dp.change',
        operators: ['any', 'none', 'must', 'must-not'],
        valueGetter: function(rule) {
          if (rule.operator.type == 'any' || rule.operator.type == 'none')
            return rule.operator.type == 'any';
  
          var checked = rule.$el.find('.rule-value-container .' + rule.operator.type + ' input:checked'),
              values = [];
              
          checked.each(function (index, element) {
            var inputValues = [];
            $(this).closest('div')
                   .find('input')
                   .each(function (index, element) {
                     inputValues.push(this.value);
                   });
                   
            values.push(inputValues);
          });
          
          return values;
        },
        valueSetter: function(rule, value) {
          
        },
        validation: {
          allow_empty_values: false,
          callback: function(value, rule) {
            if (value.length === 0)
              return "Must select at least one option from the right panel";
            
            for (var i = 0; i < value.length; i++) {
              switch (value[i][0]) {
                case "Text":
                  if (!value[i][1])
                    return "Must provide some text to compare against comment";
                  break;
                  
                case "From User":
                  if (!value[i][1])
                    return "Must select at least one user";
                    
                  value[i].splice(2,1);
                  value[i][1] = value[i][1].split(',').map(function (element) {
                    return parseInt(element, 10);
                  });
                  break;
                
                case "Between Times":
                  if (!value[i][1] && !value[i][2]) 
                    return "Must provide at least one date";
      
                  if (Date.parse(value[i][1]) > Date.parse(value[i][2])) {
                    var x = value[i][1];
                    value[i][1] = value[i][2];
                    value[i][2] = x;
                  }
                  break;
              }
            }
            
            return true;
          }
        },
        default_operator: 'any'
      }
    ]
  })
  .on('afterUpdateRuleOperator.queryBuilder', function(e, rule, previousOperator) {
    rule.$el.find('.rule-value-container > div > div').each(
      function() {
        $(this).toggleClass('hide', !$(this).hasClass(rule.operator.type) || 
                                    (this.hasAttribute('data-template-segment-only') && rule.filter.optgroup == 'Default Fields'));
      }
    );
  })
  .on('click', '.filter-operator-wrapper input:checkbox', function(e) {
    var rule = $builder.queryBuilder('getModel', $(e.target).closest('.rule-container'));
    
    rule.data.allowConfigureOnQuery = this.checked;
  })
  .on('afterUpdateRuleFilter.queryBuilder', function(e, rule, previousFilter) {
    rule.data = {
      allowConfigureOnQuery: rule.$el.find('.filter-operator-wrapper input:checkbox').prop('checked')
    };
    
    // *** REMOVE AFTER DEV TESTING *******************************************************************************************************************************
    rule.$el.find('.filter-operator-wrapper .segment-type').remove();
    if (rule.filter.optgroup != 'Default Fields') {
      rule.$el.find('.filter-operator-wrapper').append('<div class="segment-type" style="margin-top: 10px; font-weight: bold; background: lightcyan;">Template Segment Type: ' + rule.filter.data.templateSegmentType + '</div>');
    }
    // *** REMOVE AFTER DEV TESTING *******************************************************************************************************************************
  })
  .on('afterCreateRuleInput.queryBuilder', function(e, rule) {
    // Filter available here, fired whenever a rule is rendered (after load, add group, add rule) and when filter is changed
    // POST to LogBook here? Only need to post for new rules not created from setRules() with initial payload
    
    initializePlugins(e, rule);
		
		if (rule.filter.id == 'attachments') {
  		rule.$el.find('.have input:checkbox[name]').change(function() {
        var $checkboxes = $(this).closest('div').find('input:checkbox[name]'),
            $samename = $checkboxes.filter('[name=' + this.name + ']'),
            $otherName = $checkboxes.not($samename);
        
        if (this.checked) {
          $samename.parent().removeClass('disable-text');
          $otherName.prop('checked', false).parent().addClass('disable-text');
        }
        else if (!$samename.is(':checked'))
          $otherName.parent().removeClass('disable-text');
      });
		}
		
		if (_selectedTemplateType == 'Inspection' && rule.filter.optgroup != 'Default Fields') {
		  var inspectionTemplateCommonFields = $('#inspection-template-common-fields').clone().prop('content');
		  
		  rule.$el.find('.rule-value-container').append(inspectionTemplateCommonFields);
		}
  })
  .on('beforeAddRule.queryBuilder', function(e, parent) {
    
  })
  .on('afterAddRule.queryBuilder', function(e, rule) {
    
    
  })
  .on('afterAddGroup.queryBuilder', function(e, group) {
    // Group has no rules at this point, afterAddRule fired after this
    
    group.condition = group.parent.condition == 'AND' ? 'OR' : 'AND';
  })
  .on('afterUpdateGroupCondition.queryBuilder', function(e, group, previousCondition) {
    group = group ? group.$el : $(this).children();
    
    group.find('.group-conditions > label').each(
      function() {
        $(this).toggleClass('btn-primary', $(this).hasClass('active'))
               .toggleClass('btn-default', !$(this).hasClass('active'));
        // $(this).toggleClass('btn-primary btn-sm', $(this).hasClass('active'))
        //       .toggleClass('btn-default btn-xs', !$(this).hasClass('active'));
      }
    );
    
    console.log('afterUpdateGroupCondition');
  })
  .on('click', '.rule-header button', function(e) {
    deleteEmptyGroup();
  })
  .on('afterMove.queryBuilder', function(e, node) {
    deleteEmptyGroup();
  })
  .on('afterUpdateRuleValue.queryBuilder', function(e, rule) {
    
  })
  .on('ruleToJson.queryBuilder.filter', function(e, rule) {
    console.log('ruleToJson');
  })
  .on('jsonToRule.queryBuilder.filter', function(e, json) {
    console.log('jsonToRule');
  })
  .trigger('afterUpdateGroupCondition');
  
  
  $('#report-templates select:first').change(function() {
    var previousTemplateFilters = $builder[0].queryBuilder.filters
      .slice(9)
      .map(function(filter) { 
        return filter.id; 
      });
    
    var force = true;
    $builder.queryBuilder('removeFilter', previousTemplateFilters, force);
    
    var $selectedTemplate = $(this).find(':selected'),
        template = $selectedTemplate.text();
    
    _selectedTemplateType = $selectedTemplate.data('template-type');
        
    // *** For testing purposes, Bridge Check and Rail Car Unloading Checklist cover all possible segments ***
    if (template == 'None' || (template != 'Bridge Check' && template != 'Rail Car Unloading Checklist'))
      return;
      
    var templateSegments = template == 'Bridge Check' ? bridgeCheckTemplateSegments : railCarUnloadingTemplateSegments;
    
    console.log(templateSegments);
    
    var newTemplateFilters = templateSegments
      .filter(function(segment) {
        return !segment.obsolete && _templateSegmentToFilterMap.hasOwnProperty(segment.type.name);
      })
      .map(function(segment) {
        var filter = _templateSegmentToFilterMap[segment.type.name];
        
        return {
          id: segment.id,
          label: segment.longName,
          data: { 
            templateId: filter.templateId,
            templateSegmentType: segment.type.name // Remove after dev testing
          },
          input: getRuleValueContainer,
          optgroup: template,
          operators: filter.operators,
          valueGetter: filter.valueGetter,
          valueSetter: filter.valueSetter
        };
      })
      .sort(function(a, b) {
        return a.label > b.label ? 1 : -1;
      });
    
    console.log(newTemplateFilters);
    
    $builder.queryBuilder('addFilter', newTemplateFilters, 9);
  });
  
  $('#save-report').click(function() {
    // TODO: Map QueryBuilder rules' JSON to LogBook JSON and save all rules to LogBook
    // getRules method below calls ruleToJson event for every rule to be saved - rule's JSON can be modified for LogBook there if needed   
    
    var rules = $builder.queryBuilder('getRules');
    
    console.log(rules);
  });
});


function deleteEmptyGroup(group) {
  group = group || $builder.queryBuilder('getModel');
  
  group.each(
    function(rule) {
      
    }, 
    function(group) {
      if (group.rules.length) {
        deleteEmptyGroup(group);
      }
      else {
        $builder.queryBuilder('deleteGroup', group);
        return false;
      }
    }
  );
}


function getRuleValueContainer(rule, name) {
  var data = rule.filter.data,
      templateId = data && data.templateId ? data.templateId : rule.filter.id,
      templateContent = $('#' + templateId).clone().prop('content');

  return $(templateContent.children)
         .each(function() {
           $(this).toggleClass('hide', !$(this).hasClass(rule.operator.type) || 
                                       (this.hasAttribute('data-template-segment-only') && rule.filter.optgroup == 'Default Fields'))
                  .find('input:radio')
                  .attr('name', rule.id);
         })
         .wrapAll('<div class=' + templateId + '></div>')
         .parent()
         .prop('outerHTML');
}

function initializePlugins(e, rule) {
  rule.$el.find('.date-time-picker > div').each(function() {
    $(this).datetimepicker({
      format: this.dataset.format,
      showTodayButton: true,
      showClear: true,
      showClose: true,
      allowInputToggle: true
    });
  });
    
  rule.$el.find('.tag-picker > :input').selectize({
    valueField: 'id',
    labelField: 'viewString',
    searchField: 'viewString',
    create: false,
    maxItems: 20,
    plugins: ['remove_button'],
    onInitialize: function() {
      var selectize = this;
      
      if (tagValues)
        selectize.addOption(tagValues);
      else {
        // This json file contains the tags for a sample log exactly as they are returned via the logbook API...
        $.getJSON('logTagValues.json', function(data) {
          tagValues = data._embedded.tagValues;
          
          selectize.addOption(tagValues);
        });
      }
    }
	});
	
	rule.$el.find('.user-picker > :input').selectize({
    valueField: 'id',
    labelField: 'name',
    searchField: 'name',
    sortField: 'name',
    create: false,
    maxItems: 7,
    plugins: ['remove_button'],
    onInitialize: function() {
      var selectize = this;
      
      if (logUsers)
        selectize.addOption(logUsers);
      else {
        $.getJSON('logUserValues.json', function(data) {
          logUsers = data._embedded.logUsers.map(function(usr) {
            return {
              id: usr.id,
              name: usr.user.firstName + ' ' + usr.user.lastName
            };
          });
          
          selectize.addOption(logUsers);
        });
      }
    }
	});
	
	rule.$el.find('.text-picker > :input').selectize({
      valueField: 'id',
      labelField: 'value',
      searchField: 'value',
      sortField: 'value',
      create: false,
      maxItems: 7,
      plugins: ['remove_button'],
      onInitialize: function() {
        var selectize = this;

        if (textChoices)
          selectize.addOption(textChoices);
        else {
          $.getJSON('logChoiceListValues.json', function(data) {
            textChoices = data._embedded.choiceListItems;
            selectize.addOption(textChoices);
          });
        }
      }
    });
}


function validateDateTime(value, rule) {
  var checkedValue = rule.$el.find('.rule-value-container .' + rule.operator.type + ' input:checked').val();
  if (!checkedValue)
    return "Must select an option from the right panel";
    
  var selection = value[0];
    
  switch (selection) {
    case 'Number of Days Ago':
      if (!value[1]) 
        return "Must provide a day value";
        
      value[1] = parseInt(value[1], 10);
      break;
      
    case 'Specific Date':
      if (!value[1])
        return "Must provide a date";
      break;
      
    case 'Between Days Ago':
      if (value.indexOf("") >= 0) 
        return "Must provide a day value for each field";
        
      value[1] = parseInt(value[1], 10);
      value[2] = parseInt(value[2], 10);
        
      if (value[1] < value[2]) {
        var x = value[1];
        value[1] = value[2];
        value[2] = x;
      }
      break;
      
    case 'Between Dates':
    case 'Between Dates/Times':
      if (!value[1] && !value[2]) 
        return "Must provide at least one date";
    
      if (Date.parse(value[1]) > Date.parse(value[2])) {
        var x = value[1];
        value[1] = value[2];
        value[2] = x;
      }
      break;
  }
  
  return true;
}

function printRules() {
  var rules = $('#builder').queryBuilder('getRules');
  document.getElementById('rules').innerHTML = JSON.stringify(rules);
}


// Test data pulled from LogBook API
var tagValues, logUsers, templates, bridgeCheckTemplateSegments, railCarUnloadingTemplateSegments, textChoices;

$.getJSON('logTagValues.json', function(data) {
  tagValues = data._embedded.tagValues;
});

$.getJSON('logUserValues.json', function(data) {
  logUsers = data._embedded.logUsers.map(function(usr) {
    return {
      id: usr.id,
      name: usr.user.firstName + ' ' + usr.user.lastName
    };
  });
});

$.getJSON('logTemplates.json', function(data) {
  templates = data._embedded.templates;
  
  var html = '<option>None</option>' + templates
    .map(function(template) {
      // return '<option value="' + template.id + '">' + template.name + '</option>'; 
      return '<option value="' + template.id + '" ' + 'data-template-type="' + template.templateType.name + '">' + template.name + '</option>'; 
    })
    .sort(function(a, b) {
      return $(a).text() > $(b).text() ? 1 : -1;
    })
    .join('');
  
  $('#report-templates select:first').html(html);
});

$.getJSON('bridgeCheckTemplateSegments.json', function(data) {
  bridgeCheckTemplateSegments = data._embedded.templateSegments
});

$.getJSON('railCarUnloadingTemplateSegments.json', function(data) {
  railCarUnloadingTemplateSegments = data._embedded.templateSegments
});

$.getJSON('logChoiceListValues.json', function(data) {
  textChoices = data._embedded.choiceListItems;
});
/*!
 * jQuery QueryBuilder 2.5.2
 * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
 * Licensed under MIT (https://opensource.org/licenses/MIT)
 */
.query-builder .rules-group-container, .query-builder .rule-container, .query-builder .rule-placeholder {
  position: relative;
  margin: 4px 0;
  border-radius: 5px;
  padding: 5px;
  border: 1px solid #EEE;
  background: rgba(255, 255, 255, 0.9);
}

.query-builder .rule-container .rule-filter-container,
.query-builder .rule-container .rule-operator-container,
.query-builder .rule-container .rule-value-container, .query-builder .error-container, .query-builder .drag-handle {
  display: inline-block;
  margin: 0 5px 0 0;
  vertical-align: middle;
}

.query-builder .rules-group-container {
  padding: 10px;
  padding-bottom: 6px;
  border: 1px solid #DCC896;
  background: rgba(250, 240, 210, 0.5);
}

.query-builder .rules-group-header {
  margin-bottom: 10px;
}

.query-builder .rules-group-header .group-conditions .btn.readonly:not(.active),
.query-builder .rules-group-header .group-conditions input[name$='_cond'] {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.query-builder .rules-group-header .group-conditions .btn.readonly {
  border-radius: 3px;
}

.query-builder .rules-list {
  list-style: none;
  padding: 0 0 0 15px;
  margin: 0;
}

.query-builder .rule-value-container {
  border-left: 1px solid #DDD;
  padding-left: 5px;
}

.query-builder .rule-value-container label {
  margin-bottom: 0;
  font-weight: normal;
}

.query-builder .rule-value-container label.block {
  display: block;
}

.query-builder .rule-value-container select,
.query-builder .rule-value-container input[type='text'],
.query-builder .rule-value-container input[type='number'] {
  padding: 1px;
}

.query-builder .error-container {
  display: none;
  cursor: help;
  color: #F00;
}

.query-builder .has-error {
  background-color: #FDD;
  border-color: #F99;
}

.query-builder .has-error .error-container {
  display: inline-block !important;
}

.query-builder .rules-list > *::before, .query-builder .rules-list > *::after {
  content: '';
  position: absolute;
  left: -10px;
  width: 10px;
  height: calc(50% + 4px);
  border-color: #CCC;
  border-style: solid;
}

.query-builder .rules-list > *::before {
  top: -4px;
  border-width: 0 0 2px 2px;
}

.query-builder .rules-list > *::after {
  top: 50%;
  border-width: 0 0 0 2px;
}

.query-builder .rules-list > *:first-child::before {
  top: -12px;
  height: calc(50% + 14px);
}

.query-builder .rules-list > *:last-child::before {
  border-radius: 0 0 0 4px;
}

.query-builder .rules-list > *:last-child::after {
  display: none;
}

.query-builder.bt-checkbox-glyphicons .checkbox input[type='checkbox']:checked + label::after {
  font-family: 'Glyphicons Halflings';
  content: '\e013';
}

.query-builder.bt-checkbox-glyphicons .checkbox label::after {
  padding-left: 4px;
  padding-top: 2px;
  font-size: 9px;
}

.query-builder .error-container + .tooltip .tooltip-inner {
  color: #F99 !important;
}

.query-builder p.filter-description {
  margin: 5px 0 0 0;
  background: #D9EDF7;
  border: 1px solid #BCE8F1;
  color: #31708F;
  border-radius: 5px;
  padding: 2.5px 5px;
  font-size: .8em;
}

.query-builder .rules-group-header [data-invert] {
  margin-left: 5px;
}

.query-builder .drag-handle {
  cursor: move;
  vertical-align: middle;
  margin-left: 5px;
}

.query-builder .dragging {
  position: fixed;
  opacity: .5;
  z-index: 100;
}

.query-builder .dragging::before, .query-builder .dragging::after {
  display: none;
}

.query-builder .rule-placeholder {
  border: 1px dashed #BBB;
  opacity: .7;
}
/*!
 * jQuery QueryBuilder 2.5.2
 * Copyright 2014-2018 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
 * Licensed under MIT (https://opensource.org/licenses/MIT)
 */

!function(e,t){"function"==typeof define&&define.amd?define("jQuery.extendext",["jquery"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery")):t(e.jQuery)}(this,function($){"use strict";$.extendext=function(){var e,t,r,n,i,o,l=arguments[0]||{},s=1,a=arguments.length,u=!1,p="default";for("boolean"==typeof l&&(u=l,l=arguments[s++]||{}),"string"==typeof l&&("concat"!==(p=l.toLowerCase())&&"replace"!==p&&"extend"!==p&&(p="default"),l=arguments[s++]||{}),"object"==typeof l||$.isFunction(l)||(l={}),s===a&&(l=this,s--);s<a;s++)if(null!==(e=arguments[s]))if($.isArray(e)&&"default"!==p)switch(o=l&&$.isArray(l)?l:[],p){case"concat":l=o.concat($.extend(u,[],e));break;case"replace":l=$.extend(u,[],e);break;case"extend":e.forEach(function(e,t){if("object"==typeof e){var r=$.isArray(e)?[]:{};o[t]=$.extendext(u,p,o[t]||r,e)}else-1===o.indexOf(e)&&o.push(e)}),l=o}else for(t in e)r=l[t],l!==(n=e[t])&&(u&&n&&($.isPlainObject(n)||(i=$.isArray(n)))?(i?(i=!1,o=r&&$.isArray(r)?r:[]):o=r&&$.isPlainObject(r)?r:{},l[t]=$.extendext(u,p,o,n)):void 0!==n&&(l[t]=n));return l}}),function(){"use strict";var a,u={name:"doT",version:"1.1.1",templateSettings:{evaluate:/\{\{([\s\S]+?(\}?)+)\}\}/g,interpolate:/\{\{=([\s\S]+?)\}\}/g,encode:/\{\{!([\s\S]+?)\}\}/g,use:/\{\{#([\s\S]+?)\}\}/g,useParams:/(^|[^\w$])def(?:\.|\[[\'\"])([\w$\.]+)(?:[\'\"]\])?\s*\:\s*([\w$\.]+|\"[^\"]+\"|\'[^\']+\'|\{[^\}]+\})/g,define:/\{\{##\s*([\w\.$]+)\s*(\:|=)([\s\S]+?)#\}\}/g,defineParams:/^\s*([\w$]+):([\s\S]+)/,conditional:/\{\{\?(\?)?\s*([\s\S]*?)\s*\}\}/g,iterate:/\{\{~\s*(?:\}\}|([\s\S]+?)\s*\:\s*([\w$]+)\s*(?:\:\s*([\w$]+))?\s*\}\})/g,varname:"it",strip:!0,append:!0,selfcontained:!1,doNotSkipEncoded:!1},template:void 0,compile:void 0,log:!0};u.encodeHTMLSource=function(e){var t={"&":"&#38;","<":"&#60;",">":"&#62;",'"':"&#34;","'":"&#39;","/":"&#47;"},r=e?/[&<>"'\/]/g:/&(?!#?\w+;)|<|>|"|'|\//g;return function(e){return e?e.toString().replace(r,function(e){return t[e]||e}):""}},a=function(){return this||(0,eval)("this")}(),"undefined"!=typeof module&&module.exports?module.exports=u:"function"==typeof define&&define.amd?define("doT",function(){return u}):a.doT=u;var p={append:{start:"'+(",end:")+'",startencode:"'+encodeHTML("},split:{start:"';out+=(",end:");out+='",startencode:"';out+=encodeHTML("}},d=/$^/;function c(e){return e.replace(/\\('|\\)/g,"$1").replace(/[\r\t\n]/g," ")}u.template=function(e,t,r){var n,i,o=(t=t||u.templateSettings).append?p.append:p.split,l=0,s=t.use||t.define?function n(i,e,o){return("string"==typeof e?e:e.toString()).replace(i.define||d,function(e,n,t,r){return 0===n.indexOf("def.")&&(n=n.substring(4)),n in o||(":"===t?(i.defineParams&&r.replace(i.defineParams,function(e,t,r){o[n]={arg:t,text:r}}),n in o||(o[n]=r)):new Function("def","def['"+n+"']="+r)(o)),""}).replace(i.use||d,function(e,t){i.useParams&&(t=t.replace(i.useParams,function(e,t,r,n){if(o[r]&&o[r].arg&&n){var i=(r+":"+n).replace(/'|\\/g,"_");return o.__exp=o.__exp||{},o.__exp[i]=o[r].text.replace(new RegExp("(^|[^\\w$])"+o[r].arg+"([^\\w$])","g"),"$1"+n+"$2"),t+"def.__exp['"+i+"']"}}));var r=new Function("def","return "+t)(o);return r?n(i,r,o):r})}(t,e,r||{}):e;s=("var out='"+(t.strip?s.replace(/(^|\r|\n)\t* +| +\t*(\r|\n|$)/g," ").replace(/\r|\n|\t|\/\*[\s\S]*?\*\//g,""):s).replace(/'|\\/g,"\\$&").replace(t.interpolate||d,function(e,t){return o.start+c(t)+o.end}).replace(t.encode||d,function(e,t){return n=!0,o.startencode+c(t)+o.end}).replace(t.conditional||d,function(e,t,r){return t?r?"';}else if("+c(r)+"){out+='":"';}else{out+='":r?"';if("+c(r)+"){out+='":"';}out+='"}).replace(t.iterate||d,function(e,t,r,n){return t?(l+=1,i=n||"i"+l,t=c(t),"';var arr"+l+"="+t+";if(arr"+l+"){var "+r+","+i+"=-1,l"+l+"=arr"+l+".length-1;while("+i+"<l"+l+"){"+r+"=arr"+l+"["+i+"+=1];out+='"):"';} } out+='"}).replace(t.evaluate||d,function(e,t){return"';"+c(t)+"out+='"})+"';return out;").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r").replace(/(\s|;|\}|^|\{)out\+='';/g,"$1").replace(/\+''/g,""),n&&(t.selfcontained||!a||a._encodeHTML||(a._encodeHTML=u.encodeHTMLSource(t.doNotSkipEncoded)),s="var encodeHTML = typeof _encodeHTML !== 'undefined' ? _encodeHTML : ("+u.encodeHTMLSource.toString()+"("+(t.doNotSkipEncoded||"")+"));"+s);try{return new Function(t.varname,s)}catch(e){throw"undefined"!=typeof console&&console.log("Could not create a template function: "+s),e}},u.compile=function(e,t){return u.template(e,null,t)}}(),function(e,t){"function"==typeof define&&define.amd?define("query-builder",["jquery","dot/doT","jquery-extendext"],t):"object"==typeof module&&module.exports?module.exports=t(require("jquery"),require("dot/doT"),require("jquery-extendext")):t(e.jQuery,e.doT)}(this,function($,r){"use strict";var c=function(e,t){(e[0].queryBuilder=this).$el=e,this.settings=$.extendext(!0,"replace",{},c.DEFAULTS,t),this.model=new n,this.status={id:null,generated_id:!1,group_id:0,rule_id:0,has_optgroup:!1,has_operator_optgroup:!1},this.filters=this.settings.filters,this.icons=this.settings.icons,this.operators=this.settings.operators,this.templates=this.settings.templates,this.plugins=this.settings.plugins,this.lang=null,void 0===c.regional.en&&h.error("Config",'"i18n/en.js" not loaded.'),this.lang=$.extendext(!0,"replace",{},c.regional.en,c.regional[this.settings.lang_code],this.settings.lang),!1===this.settings.allow_groups?this.settings.allow_groups=0:!0===this.settings.allow_groups&&(this.settings.allow_groups=-1),Object.keys(this.templates).forEach(function(e){this.templates[e]||(this.templates[e]=c.templates[e]),"string"==typeof this.templates[e]&&(this.templates[e]=r.template(this.templates[e]))},this),this.$el.attr("id")||(this.$el.attr("id","qb_"+Math.floor(99999*Math.random())),this.status.generated_id=!0),this.status.id=this.$el.attr("id"),this.$el.addClass("query-builder form-inline"),this.filters=this.checkFilters(this.filters),this.operators=this.checkOperators(this.operators),this.bindEvents(),this.initPlugins()};$.extend(c.prototype,{trigger:function(e){var t=new $.Event(this._tojQueryEvent(e),{builder:this});return this.$el.triggerHandler(t,Array.prototype.slice.call(arguments,1)),t},change:function(e,t){var r=new $.Event(this._tojQueryEvent(e,!0),{builder:this,value:t});return this.$el.triggerHandler(r,Array.prototype.slice.call(arguments,2)),r.value},on:function(e,t){return this.$el.on(this._tojQueryEvent(e),t),this},off:function(e,t){return this.$el.off(this._tojQueryEvent(e),t),this},once:function(e,t){return this.$el.one(this._tojQueryEvent(e),t),this},_tojQueryEvent:function(e,t){return e.split(" ").map(function(e){return e+".queryBuilder"+(t?".filter":"")}).join(" ")}}),c.types={string:"string",integer:"number",double:"number",date:"datetime",time:"datetime",datetime:"datetime",boolean:"boolean"},c.inputs=["text","number","textarea","radio","checkbox","select"],c.modifiable_options=["display_errors","allow_groups","allow_empty","default_condition","default_filter"],c.selectors={group_container:".rules-group-container",rule_container:".rule-container",filter_container:".rule-filter-container",operator_container:".rule-operator-container",value_container:".rule-value-container",error_container:".error-container",condition_container:".rules-group-header .group-conditions",rule_header:".rule-header",group_header:".rules-group-header",group_actions:".group-actions",rule_actions:".rule-actions",rules_list:".rules-group-body>.rules-list",group_condition:".rules-group-header [name$=_cond]",rule_filter:".rule-filter-container [name$=_filter]",rule_operator:".rule-operator-container [name$=_operator]",rule_value:".rule-value-container [name*=_value_]",add_rule:"[data-add=rule]",delete_rule:"[data-delete=rule]",add_group:"[data-add=group]",delete_group:"[data-delete=group]"},c.templates={},c.regional={},c.OPERATORS={equal:{type:"equal",nb_inputs:1,multiple:!1,apply_to:["string","number","datetime","boolean"]},not_equal:{type:"not_equal",nb_inputs:1,multiple:!1,apply_to:["string","number","datetime","boolean"]},in:{type:"in",nb_inputs:1,multiple:!0,apply_to:["string","number","datetime"]},not_in:{type:"not_in",nb_inputs:1,multiple:!0,apply_to:["string","number","datetime"]},less:{type:"less",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},less_or_equal:{type:"less_or_equal",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},greater:{type:"greater",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},greater_or_equal:{type:"greater_or_equal",nb_inputs:1,multiple:!1,apply_to:["number","datetime"]},between:{type:"between",nb_inputs:2,multiple:!1,apply_to:["number","datetime"]},not_between:{type:"not_between",nb_inputs:2,multiple:!1,apply_to:["number","datetime"]},begins_with:{type:"begins_with",nb_inputs:1,multiple:!1,apply_to:["string"]},not_begins_with:{type:"not_begins_with",nb_inputs:1,multiple:!1,apply_to:["string"]},contains:{type:"contains",nb_inputs:1,multiple:!1,apply_to:["string"]},not_contains:{type:"not_contains",nb_inputs:1,multiple:!1,apply_to:["string"]},ends_with:{type:"ends_with",nb_inputs:1,multiple:!1,apply_to:["string"]},not_ends_with:{type:"not_ends_with",nb_inputs:1,multiple:!1,apply_to:["string"]},is_empty:{type:"is_empty",nb_inputs:0,multiple:!1,apply_to:["string"]},is_not_empty:{type:"is_not_empty",nb_inputs:0,multiple:!1,apply_to:["string"]},is_null:{type:"is_null",nb_inputs:0,multiple:!1,apply_to:["string","number","datetime","boolean"]},is_not_null:{type:"is_not_null",nb_inputs:0,multiple:!1,apply_to:["string","number","datetime","boolean"]}},c.DEFAULTS={filters:[],plugins:[],sort_filters:!1,display_errors:!0,allow_groups:-1,allow_empty:!1,conditions:["AND","OR"],default_condition:"AND",inputs_separator:" , ",select_placeholder:"------",display_empty_filter:!0,default_filter:null,optgroups:{},default_rule_flags:{filter_readonly:!1,operator_readonly:!1,value_readonly:!1,no_delete:!1},default_group_flags:{condition_readonly:!1,no_add_rule:!1,no_add_group:!1,no_delete:!1},templates:{group:null,rule:null,filterSelect:null,operatorSelect:null,ruleValueSelect:null},lang_code:"en",lang:{},operators:["equal","not_equal","in","not_in","less","less_or_equal","greater","greater_or_equal","between","not_between","begins_with","not_begins_with","contains","not_contains","ends_with","not_ends_with","is_empty","is_not_empty","is_null","is_not_null"],icons:{add_group:"glyphicon glyphicon-plus-sign",add_rule:"glyphicon glyphicon-plus",remove_group:"glyphicon glyphicon-remove",remove_rule:"glyphicon glyphicon-remove",error:"glyphicon glyphicon-warning-sign"}},c.plugins={},c.defaults=function(e){if("object"!=typeof e)return"string"==typeof e?"object"==typeof c.DEFAULTS[e]?$.extend(!0,{},c.DEFAULTS[e]):c.DEFAULTS[e]:$.extend(!0,{},c.DEFAULTS);$.extendext(!0,"replace",c.DEFAULTS,e)},c.define=function(e,t,r){c.plugins[e]={fct:t,def:r||{}}},c.extend=function(e){$.extend(c.prototype,e)},c.prototype.initPlugins=function(){if(this.plugins){if($.isArray(this.plugins)){var t={};this.plugins.forEach(function(e){t[e]=null}),this.plugins=t}Object.keys(this.plugins).forEach(function(e){e in c.plugins?(this.plugins[e]=$.extend(!0,{},c.plugins[e].def,this.plugins[e]||{}),c.plugins[e].fct.call(this,this.plugins[e])):h.error("Config",'Unable to find plugin "{0}"',e)},this)}},c.prototype.getPluginOptions=function(e,t){var r;if(this.plugins&&this.plugins[e]?r=this.plugins[e]:c.plugins[e]&&(r=c.plugins[e].def),r)return t?r[t]:r;h.error("Config",'Unable to find plugin "{0}"',e)},c.prototype.init=function(e){this.trigger("afterInit"),e?(this.setRules(e),delete this.settings.rules):this.setRoot(!0)},c.prototype.checkFilters=function(e){var t=[];if(e&&0!==e.length||h.error("Config","Missing filters list"),e.forEach(function(n,e){switch(n.id||h.error("Config","Missing filter {0} id",e),-1!=t.indexOf(n.id)&&h.error("Config",'Filter "{0}" already defined',n.id),t.push(n.id),n.type?c.types[n.type]||h.error("Config",'Invalid type "{0}"',n.type):n.type="string",n.input?"function"!=typeof n.input&&-1==c.inputs.indexOf(n.input)&&h.error("Config",'Invalid input "{0}"',n.input):n.input="number"===c.types[n.type]?"number":"text",n.operators&&n.operators.forEach(function(e){"string"!=typeof e&&h.error("Config","Filter operators must be global operators types (string)")}),n.field||(n.field=n.id),n.label||(n.label=n.field),n.optgroup?(this.status.has_optgroup=!0,this.settings.optgroups[n.optgroup]||(this.settings.optgroups[n.optgroup]=n.optgroup)):n.optgroup=null,n.input){case"radio":case"checkbox":(!n.values||n.values.length<1)&&h.error("Config",'Missing filter "{0}" values',n.id);break;case"select":var i=[];n.has_optgroup=!1,h.iterateOptions(n.values,function(e,t,r){i.push({value:e,label:t,optgroup:r||null}),r&&(n.has_optgroup=!0,this.settings.optgroups[r]||(this.settings.optgroups[r]=r))}.bind(this)),n.has_optgroup?n.values=h.groupSort(i,"optgroup"):n.values=i,n.placeholder&&(void 0===n.placeholder_value&&(n.placeholder_value=-1),n.values.forEach(function(e){e.value==n.placeholder_value&&h.error("Config",'Placeholder of filter "{0}" overlaps with one of its values',n.id)}))}},this),this.settings.sort_filters)if("function"==typeof this.settings.sort_filters)e.sort(this.settings.sort_filters);else{var r=this;e.sort(function(e,t){return r.translate(e.label).localeCompare(r.translate(t.label))})}return this.status.has_optgroup&&(e=h.groupSort(e,"optgroup")),e},c.prototype.checkOperators=function(r){var n=[];return r.forEach(function(e,t){"string"==typeof e?(c.OPERATORS[e]||h.error("Config",'Unknown operator "{0}"',e),r[t]=e=$.extendext(!0,"replace",{},c.OPERATORS[e])):(e.type||h.error("Config",'Missing "type" for operator {0}',t),c.OPERATORS[e.type]&&(r[t]=e=$.extendext(!0,"replace",{},c.OPERATORS[e.type],e)),void 0!==e.nb_inputs&&void 0!==e.apply_to||h.error("Config",'Missing "nb_inputs" and/or "apply_to" for operator "{0}"',e.type)),-1!=n.indexOf(e.type)&&h.error("Config",'Operator "{0}" already defined',e.type),n.push(e.type),e.optgroup?(this.status.has_operator_optgroup=!0,this.settings.optgroups[e.optgroup]||(this.settings.optgroups[e.optgroup]=e.optgroup)):e.optgroup=null},this),this.status.has_operator_optgroup&&(r=h.groupSort(r,"optgroup")),r},c.prototype.bindEvents=function(){var o=this,t=c.selectors;this.$el.on("change.queryBuilder",t.group_condition,function(){if($(this).is(":checked")){var e=$(this).closest(t.group_container);o.getModel(e).condition=$(this).val()}}),this.$el.on("change.queryBuilder",t.rule_filter,function(){var e=$(this).closest(t.rule_container);o.getModel(e).filter=o.getFilterById($(this).val())}),this.$el.on("change.queryBuilder",t.rule_operator,function(){var e=$(this).closest(t.rule_container);o.getModel(e).operator=o.getOperatorByType($(this).val())}),this.$el.on("click.queryBuilder",t.add_rule,function(){var e=$(this).closest(t.group_container);o.addRule(o.getModel(e))}),this.$el.on("click.queryBuilder",t.delete_rule,function(){var e=$(this).closest(t.rule_container);o.deleteRule(o.getModel(e))}),0!==this.settings.allow_groups&&(this.$el.on("click.queryBuilder",t.add_group,function(){var e=$(this).closest(t.group_container);o.addGroup(o.getModel(e))}),this.$el.on("click.queryBuilder",t.delete_group,function(){var e=$(this).closest(t.group_container);o.deleteGroup(o.getModel(e))})),this.model.on({drop:function(e,t){t.$el.remove(),o.refreshGroupsConditions()},add:function(e,t,r,n){0===n?r.$el.prependTo(t.$el.find(">"+c.selectors.rules_list)):r.$el.insertAfter(t.rules[n-1].$el),o.refreshGroupsConditions()},move:function(e,t,r,n){t.$el.detach(),0===n?t.$el.prependTo(r.$el.find(">"+c.selectors.rules_list)):t.$el.insertAfter(r.rules[n-1].$el),o.refreshGroupsConditions()},update:function(e,t,r,n,i){if(t instanceof l)switch(r){case"error":o.updateError(t);break;case"flags":o.applyRuleFlags(t);break;case"filter":o.updateRuleFilter(t,i);break;case"operator":o.updateRuleOperator(t,i);break;case"value":o.updateRuleValue(t,i)}else switch(r){case"error":o.updateError(t);break;case"flags":o.applyGroupFlags(t);break;case"condition":o.updateGroupCondition(t,i)}}})},c.prototype.setRoot=function(e,t,r){e=void 0===e||!0===e;var n=this.nextGroupId(),i=$(this.getGroupTemplate(n,1));return this.$el.append(i),this.model.root=new a(null,i),this.model.root.model=this.model,this.model.root.data=t,this.model.root.flags=$.extend({},this.settings.default_group_flags,r),this.model.root.condition=this.settings.default_condition,this.trigger("afterAddGroup",this.model.root),e&&this.addRule(this.model.root),this.model.root},c.prototype.addGroup=function(e,t,r,n){t=void 0===t||!0===t;var i=e.level+1;if(this.trigger("beforeAddGroup",e,t,i).isDefaultPrevented())return null;var o=this.nextGroupId(),l=$(this.getGroupTemplate(o,i)),s=e.addGroup(l);return s.data=r,s.flags=$.extend({},this.settings.default_group_flags,n),s.condition=this.settings.default_condition,this.trigger("afterAddGroup",s),this.trigger("rulesChanged"),t&&this.addRule(s),s},c.prototype.deleteGroup=function(e){if(e.isRoot())return!1;if(this.trigger("beforeDeleteGroup",e).isDefaultPrevented())return!1;var t=!0;return e.each("reverse",function(e){t&=this.deleteRule(e)},function(e){t&=this.deleteGroup(e)},this),t&&(e.drop(),this.trigger("afterDeleteGroup"),this.trigger("rulesChanged")),t},c.prototype.updateGroupCondition=function(t,e){t.$el.find(">"+c.selectors.group_condition).each(function(){var e=$(this);e.prop("checked",e.val()===t.condition),e.parent().toggleClass("active",e.val()===t.condition)}),this.trigger("afterUpdateGroupCondition",t,e),this.trigger("rulesChanged")},c.prototype.refreshGroupsConditions=function(){!function t(e){(!e.flags||e.flags&&!e.flags.condition_readonly)&&e.$el.find(">"+c.selectors.group_condition).prop("disabled",e.rules.length<=1).parent().toggleClass("disabled",e.rules.length<=1),e.each(null,function(e){t(e)},this)}(this.model.root)},c.prototype.addRule=function(e,t,r){if(this.trigger("beforeAddRule",e).isDefaultPrevented())return null;var n=this.nextRuleId(),i=$(this.getRuleTemplate(n)),o=e.addRule(i);return o.data=t,o.flags=$.extend({},this.settings.default_rule_flags,r),this.trigger("afterAddRule",o),this.trigger("rulesChanged"),this.createRuleFilters(o),!this.settings.default_filter&&this.settings.display_empty_filter||(o.filter=this.change("getDefaultFilter",this.getFilterById(this.settings.default_filter||this.filters[0].id),o)),o},c.prototype.deleteRule=function(e){return!e.flags.no_delete&&(!this.trigger("beforeDeleteRule",e).isDefaultPrevented()&&(e.drop(),this.trigger("afterDeleteRule"),this.trigger("rulesChanged"),!0))},c.prototype.createRuleFilters=function(e){var t=this.change("getRuleFilters",this.filters,e),r=$(this.getRuleFilterSelect(e,t));e.$el.find(c.selectors.filter_container).html(r),this.trigger("afterCreateRuleFilters",e),this.applyRuleFlags(e)},c.prototype.createRuleOperators=function(e){var t=e.$el.find(c.selectors.operator_container).empty();if(e.filter){var r=this.getOperators(e.filter),n=$(this.getRuleOperatorSelect(e,r));t.html(n),e.filter.default_operator?e.__.operator=this.getOperatorByType(e.filter.default_operator):e.__.operator=r[0],e.$el.find(c.selectors.rule_operator).val(e.operator.type),this.trigger("afterCreateRuleOperators",e,r),this.applyRuleFlags(e)}},c.prototype.createRuleInput=function(e){var t=e.$el.find(c.selectors.value_container).empty();if(e.__.value=void 0,e.filter&&e.operator&&0!==e.operator.nb_inputs){for(var r=this,n=$(),i=e.filter,o=0;o<e.operator.nb_inputs;o++){var l=$(this.getRuleInput(e,o));0<o&&t.append(this.settings.inputs_separator),t.append(l),n=n.add(l)}t.css("display",""),n.on("change "+(i.input_event||""),function(){e._updating_input||(e._updating_value=!0,e.value=r.getRuleInputValue(e),e._updating_value=!1)}),i.plugin&&n[i.plugin](i.plugin_config||{}),this.trigger("afterCreateRuleInput",e),void 0!==i.default_value?e.value=i.default_value:(e._updating_value=!0,e.value=r.getRuleInputValue(e),e._updating_value=!1),this.applyRuleFlags(e)}},c.prototype.updateRuleFilter=function(e,t){this.createRuleOperators(e),this.createRuleInput(e),e.$el.find(c.selectors.rule_filter).val(e.filter?e.filter.id:"-1"),t&&e.filter&&t.id!==e.filter.id&&(e.data=void 0),this.trigger("afterUpdateRuleFilter",e,t),this.trigger("rulesChanged")},c.prototype.updateRuleOperator=function(e,t){var r=e.$el.find(c.selectors.value_container);e.operator&&0!==e.operator.nb_inputs?(r.css("display",""),!r.is(":empty")&&t&&e.operator.nb_inputs===t.nb_inputs&&e.operator.optgroup===t.optgroup||this.createRuleInput(e)):(r.hide(),e.__.value=void 0),e.operator&&(e.$el.find(c.selectors.rule_operator).val(e.operator.type),e.__.value=this.getRuleInputValue(e)),this.trigger("afterUpdateRuleOperator",e,t),this.trigger("rulesChanged")},c.prototype.updateRuleValue=function(e,t){e._updating_value||this.setRuleInputValue(e,e.value),this.trigger("afterUpdateRuleValue",e,t),this.trigger("rulesChanged")},c.prototype.applyRuleFlags=function(e){var t=e.flags,r=c.selectors;e.$el.find(r.rule_filter).prop("disabled",t.filter_readonly),e.$el.find(r.rule_operator).prop("disabled",t.operator_readonly),e.$el.find(r.rule_value).prop("disabled",t.value_readonly),t.no_delete&&e.$el.find(r.delete_rule).remove(),this.trigger("afterApplyRuleFlags",e)},c.prototype.applyGroupFlags=function(e){var t=e.flags,r=c.selectors;e.$el.find(">"+r.group_condition).prop("disabled",t.condition_readonly).parent().toggleClass("readonly",t.condition_readonly),t.no_add_rule&&e.$el.find(r.add_rule).remove(),t.no_add_group&&e.$el.find(r.add_group).remove(),t.no_delete&&e.$el.find(r.delete_group).remove(),this.trigger("afterApplyGroupFlags",e)},c.prototype.clearErrors=function(e){(e=e||this.model.root)&&(e.error=null,e instanceof a&&e.each(function(e){e.error=null},function(e){this.clearErrors(e)},this))},c.prototype.updateError=function(e){if(this.settings.display_errors)if(null===e.error)e.$el.removeClass("has-error");else{var t=this.translate("errors",e.error[0]);t=h.fmt(t,e.error.slice(1)),t=this.change("displayError",t,e.error,e),e.$el.addClass("has-error").find(c.selectors.error_container).eq(0).attr("title",t)}},c.prototype.triggerValidationError=function(e,t,r){$.isArray(t)||(t=[t]),this.trigger("validationError",e,t,r).isDefaultPrevented()||(e.error=t)},c.prototype.destroy=function(){this.trigger("beforeDestroy"),this.status.generated_id&&this.$el.removeAttr("id"),this.clear(),this.model=null,this.$el.off(".queryBuilder").removeClass("query-builder").removeData("queryBuilder"),delete this.$el[0].queryBuilder},c.prototype.reset=function(){this.trigger("beforeReset").isDefaultPrevented()||(this.status.group_id=1,this.status.rule_id=0,this.model.root.empty(),this.model.root.data=void 0,this.model.root.flags=$.extend({},this.settings.default_group_flags),this.model.root.condition=this.settings.default_condition,this.addRule(this.model.root),this.trigger("afterReset"),this.trigger("rulesChanged"))},c.prototype.clear=function(){this.trigger("beforeClear").isDefaultPrevented()||(this.status.group_id=0,this.status.rule_id=0,this.model.root&&(this.model.root.drop(),this.model.root=null),this.trigger("afterClear"),this.trigger("rulesChanged"))},c.prototype.setOptions=function(e){$.each(e,function(e,t){-1!==c.modifiable_options.indexOf(e)&&(this.settings[e]=t)}.bind(this))},c.prototype.getModel=function(e){return e?e instanceof i?e:$(e).data("queryBuilderModel"):this.model.root},c.prototype.validate=function(o){o=$.extend({skip_empty:!1},o),this.clearErrors();var l=this,e=function r(e){var n=0,i=0;return e.each(function(e){if(e.filter||!o.skip_empty){if(!e.filter)return l.triggerValidationError(e,"no_filter",null),void i++;if(!e.operator)return l.triggerValidationError(e,"no_operator",null),void i++;if(0!==e.operator.nb_inputs){var t=l.validateValue(e,e.value);if(!0!==t)return l.triggerValidationError(e,t,e.value),void i++}n++}},function(e){var t=r(e);!0===t?n++:!1===t&&i++}),!(0<i)&&(0===n&&!e.isRoot()&&o.skip_empty?null:!!(0!==n||l.settings.allow_empty&&e.isRoot())||(l.triggerValidationError(e,"empty_group",null),!1))}(this.model.root);return this.change("validate",e)},c.prototype.getRules=function(o){o=$.extend({get_flags:!1,allow_invalid:!1,skip_empty:!1},o);var e=this.validate(o);if(!e&&!o.allow_invalid)return null;var l=this,t=function r(e){var i={condition:e.condition,rules:[]};if(e.data&&(i.data=$.extendext(!0,"replace",{},e.data)),o.get_flags){var t=l.getGroupFlags(e.flags,"all"===o.get_flags);$.isEmptyObject(t)||(i.flags=t)}return e.each(function(e){if(e.filter||!o.skip_empty){var t=null;e.operator&&0===e.operator.nb_inputs||(t=e.value);var r={id:e.filter?e.filter.id:null,field:e.filter?e.filter.field:null,type:e.filter?e.filter.type:null,input:e.filter?e.filter.input:null,operator:e.operator?e.operator.type:null,value:t};if((e.filter&&e.filter.data||e.data)&&(r.data=$.extendext(!0,"replace",{},e.filter.data,e.data)),o.get_flags){var n=l.getRuleFlags(e.flags,"all"===o.get_flags);$.isEmptyObject(n)||(r.flags=n)}i.rules.push(l.change("ruleToJson",r,e))}},function(e){var t=r(e);0===t.rules.length&&o.skip_empty||i.rules.push(t)},this),l.change("groupToJson",i,e)}(this.model.root);return t.valid=e,this.change("getRules",t)},c.prototype.setRules=function(e,i){i=$.extend({allow_invalid:!1},i),$.isArray(e)&&(e={condition:this.settings.default_condition,rules:e}),e&&e.rules&&(0!==e.rules.length||this.settings.allow_empty)||h.error("RulesParse","Incorrect data object passed"),this.clear(),this.setRoot(!1,e.data,this.parseGroupFlags(e)),e=this.change("setRules",e,i);var o=this;!function r(e,n){null!==n&&(void 0===e.condition?e.condition=o.settings.default_condition:-1==o.settings.conditions.indexOf(e.condition)&&(h.error(!i.allow_invalid,"UndefinedCondition",'Invalid condition "{0}"',e.condition),e.condition=o.settings.default_condition),n.condition=e.condition,e.rules.forEach(function(e){var t;if(void 0!==e.rules)if(-1!==o.settings.allow_groups&&o.settings.allow_groups<n.level)h.error(!i.allow_invalid,"RulesParse","No more than {0} groups are allowed",o.settings.allow_groups),o.reset();else{if(null===(t=o.addGroup(n,!1,e.data,o.parseGroupFlags(e))))return;r(e,t)}else{if(e.empty||(void 0===e.id&&(h.error(!i.allow_invalid,"RulesParse","Missing rule field id"),e.empty=!0),void 0===e.operator&&(e.operator="equal")),null===(t=o.addRule(n,e.data,o.parseRuleFlags(e))))return;e.empty||(t.filter=o.getFilterById(e.id,!i.allow_invalid)),t.filter&&(t.operator=o.getOperatorByType(e.operator,!i.allow_invalid),t.operator||(t.operator=o.getOperators(t.filter)[0])),t.operator&&0!==t.operator.nb_inputs&&(void 0!==e.value?t.value=e.value:void 0!==t.filter.default_value&&(t.value=t.filter.default_value)),o.change("jsonToRule",t,e)!=t&&h.error("RulesParse","Plugin tried to change rule reference")}}),o.change("jsonToGroup",n,e)!=n&&h.error("RulesParse","Plugin tried to change group reference"))}(e,this.model.root),this.trigger("afterSetRules")},c.prototype.validateValue=function(e,t){var r=e.filter.validation||{},n=!0;return n=r.callback?r.callback.call(this,t,e):this._validateValue(e,t),this.change("validateValue",n,t,e)},c.prototype._validateValue=function(e,t){var r,n,i=e.filter,o=e.operator,l=i.validation||{},s=!0;1===e.operator.nb_inputs&&(t=[t]);for(var a=0;a<o.nb_inputs;a++){if(!o.multiple&&$.isArray(t[a])&&1<t[a].length){s=["operator_not_multiple",o.type,this.translate("operators",o.type)];break}switch(i.input){case"radio":if(void 0===t[a]||0===t[a].length){l.allow_empty_value||(s=["radio_empty"]);break}break;case"checkbox":if(void 0===t[a]||0===t[a].length){l.allow_empty_value||(s=["checkbox_empty"]);break}break;case"select":if(void 0===t[a]||0===t[a].length||i.placeholder&&t[a]==i.placeholder_value){l.allow_empty_value||(s=["select_empty"]);break}break;default:n=$.isArray(t[a])?t[a]:[t[a]];for(var u=0;u<n.length;u++){switch(c.types[i.type]){case"string":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["string_empty"]);break}if(void 0!==l.min&&n[u].length<parseInt(l.min)){s=[this.getValidationMessage(l,"min","string_exceed_min_length"),l.min];break}if(void 0!==l.max&&n[u].length>parseInt(l.max)){s=[this.getValidationMessage(l,"max","string_exceed_max_length"),l.max];break}if(l.format&&("string"==typeof l.format&&(l.format=new RegExp(l.format)),!l.format.test(n[u]))){s=[this.getValidationMessage(l,"format","string_invalid_format"),l.format];break}break;case"number":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["number_nan"]);break}if(isNaN(n[u])){s=["number_nan"];break}if("integer"==i.type){if(parseInt(n[u])!=n[u]){s=["number_not_integer"];break}}else if(parseFloat(n[u])!=n[u]){s=["number_not_double"];break}if(void 0!==l.min&&n[u]<parseFloat(l.min)){s=[this.getValidationMessage(l,"min","number_exceed_min"),l.min];break}if(void 0!==l.max&&n[u]>parseFloat(l.max)){s=[this.getValidationMessage(l,"max","number_exceed_max"),l.max];break}if(void 0!==l.step&&"any"!==l.step){var p=(n[u]/l.step).toPrecision(14);if(parseInt(p)!=p){s=[this.getValidationMessage(l,"step","number_wrong_step"),l.step];break}}break;case"datetime":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["datetime_empty"]);break}if(l.format){"moment"in window||h.error("MissingLibrary","MomentJS is required for Date/Time validation. Get it here http://momentjs.com");var d=moment(n[u],l.format);if(!d.isValid()){s=[this.getValidationMessage(l,"format","datetime_invalid"),l.format];break}if(l.min&&d<moment(l.min,l.format)){s=[this.getValidationMessage(l,"min","datetime_exceed_min"),l.min];break}if(l.max&&d>moment(l.max,l.format)){s=[this.getValidationMessage(l,"max","datetime_exceed_max"),l.max];break}}break;case"boolean":if(void 0===n[u]||0===n[u].length){l.allow_empty_value||(s=["boolean_not_valid"]);break}if("true"!==(r=(""+n[u]).trim().toLowerCase())&&"false"!==r&&"1"!==r&&"0"!==r&&1!==n[u]&&0!==n[u]){s=["boolean_not_valid"];break}}if(!0!==s)break}}if(!0!==s)break}if(("between"===e.operator.type||"not_between"===e.operator.type)&&2===t.length)switch(c.types[i.type]){case"number":t[0]>t[1]&&(s=["number_between_invalid",t[0],t[1]]);break;case"datetime":l.format&&("moment"in window||h.error("MissingLibrary","MomentJS is required for Date/Time validation. Get it here http://momentjs.com"),moment(t[0],l.format).isAfter(moment(t[1],l.format))&&(s=["datetime_between_invalid",t[0],t[1]]))}return s},c.prototype.nextGroupId=function(){return this.status.id+"_group_"+this.status.group_id++},c.prototype.nextRuleId=function(){return this.status.id+"_rule_"+this.status.rule_id++},c.prototype.getOperators=function(r){"string"==typeof r&&(r=this.getFilterById(r));for(var e=[],t=0,n=this.operators.length;t<n;t++){if(r.operators){if(-1==r.operators.indexOf(this.operators[t].type))continue}else if(-1==this.operators[t].apply_to.indexOf(c.types[r.type]))continue;e.push(this.operators[t])}return r.operators&&e.sort(function(e,t){return r.operators.indexOf(e.type)-r.operators.indexOf(t.type)}),this.change("getOperators",e,r)},c.prototype.getFilterById=function(e,t){if("-1"==e)return null;for(var r=0,n=this.filters.length;r<n;r++)if(this.filters[r].id==e)return this.filters[r];return h.error(!1!==t,"UndefinedFilter",'Undefined filter "{0}"',e),null},c.prototype.getOperatorByType=function(e,t){if("-1"==e)return null;for(var r=0,n=this.operators.length;r<n;r++)if(this.operators[r].type==e)return this.operators[r];return h.error(!1!==t,"UndefinedOperator",'Undefined operator "{0}"',e),null},c.prototype.getRuleInputValue=function(e){var t=e.filter,r=e.operator,n=[];if(t.valueGetter)n=t.valueGetter.call(this,e);else{for(var i=e.$el.find(c.selectors.value_container),o=0;o<r.nb_inputs;o++){var l,s=h.escapeElementId(e.id+"_value_"+o);switch(t.input){case"radio":n.push(i.find("[name="+s+"]:checked").val());break;case"checkbox":l=[],i.find("[name="+s+"]:checked").each(function(){l.push($(this).val())}),n.push(l);break;case"select":t.multiple?(l=[],i.find("[name="+s+"] option:selected").each(function(){l.push($(this).val())}),n.push(l)):n.push(i.find("[name="+s+"] option:selected").val());break;default:n.push(i.find("[name="+s+"]").val())}}n=n.map(function(e){return r.multiple&&t.value_separator&&"string"==typeof e&&(e=e.split(t.value_separator)),$.isArray(e)?e.map(function(e){return h.changeType(e,t.type)}):h.changeType(e,t.type)}),1===r.nb_inputs&&(n=n[0]),t.valueParser&&(n=t.valueParser.call(this,e,n))}return this.change("getRuleValue",n,e)},c.prototype.setRuleInputValue=function(e,t){var r=e.filter,n=e.operator;if(r&&n){if(e._updating_input=!0,r.valueSetter)r.valueSetter.call(this,e,t);else{var i=e.$el.find(c.selectors.value_container);1==n.nb_inputs&&(t=[t]);for(var o=0;o<n.nb_inputs;o++){var l=h.escapeElementId(e.id+"_value_"+o);switch(r.input){case"radio":i.find("[name="+l+'][value="'+t[o]+'"]').prop("checked",!0).trigger("change");break;case"checkbox":$.isArray(t[o])||(t[o]=[t[o]]),t[o].forEach(function(e){i.find("[name="+l+'][value="'+e+'"]').prop("checked",!0).trigger("change")});break;default:n.multiple&&r.value_separator&&$.isArray(t[o])&&(t[o]=t[o].join(r.value_separator)),i.find("[name="+l+"]").val(t[o]).trigger("change")}}}e._updating_input=!1}},c.prototype.parseRuleFlags=function(e){var t=$.extend({},this.settings.default_rule_flags);return e.readonly&&$.extend(t,{filter_readonly:!0,operator_readonly:!0,value_readonly:!0,no_delete:!0}),e.flags&&$.extend(t,e.flags),this.change("parseRuleFlags",t,e)},c.prototype.getRuleFlags=function(r,e){if(e)return $.extend({},r);var n={};return $.each(this.settings.default_rule_flags,function(e,t){r[e]!==t&&(n[e]=r[e])}),n},c.prototype.parseGroupFlags=function(e){var t=$.extend({},this.settings.default_group_flags);return e.readonly&&$.extend(t,{condition_readonly:!0,no_add_rule:!0,no_add_group:!0,no_delete:!0}),e.flags&&$.extend(t,e.flags),this.change("parseGroupFlags",t,e)},c.prototype.getGroupFlags=function(r,e){if(e)return $.extend({},r);var n={};return $.each(this.settings.default_group_flags,function(e,t){r[e]!==t&&(n[e]=r[e])}),n},c.prototype.translate=function(e,t){var r;return t||(t=e,e=void 0),r="object"==typeof t?t[this.settings.lang_code]||t.en:(e?this.lang[e]:this.lang)[t]||t,this.change("translate",r,t,e)},c.prototype.getValidationMessage=function(e,t,r){return e.messages&&e.messages[t]||r},c.templates.group='<div id="{{= it.group_id }}" class="rules-group-container">   <div class="rules-group-header">     <div class="btn-group pull-right group-actions">       <button type="button" class="btn btn-xs btn-success" data-add="rule">         <i class="{{= it.icons.add_rule }}"></i> {{= it.translate("add_rule") }}       </button>       {{? it.settings.allow_groups===-1 || it.settings.allow_groups>=it.level }}         <button type="button" class="btn btn-xs btn-success" data-add="group">           <i class="{{= it.icons.add_group }}"></i> {{= it.translate("add_group") }}         </button>       {{?}}       {{? it.level>1 }}         <button type="button" class="btn btn-xs btn-danger" data-delete="group">           <i class="{{= it.icons.remove_group }}"></i> {{= it.translate("delete_group") }}         </button>       {{?}}     </div>     <div class="btn-group group-conditions">       {{~ it.conditions: condition }}         <label class="btn btn-xs btn-primary">           <input type="radio" name="{{= it.group_id }}_cond" value="{{= condition }}"> {{= it.translate("conditions", condition) }}         </label>       {{~}}     </div>     {{? it.settings.display_errors }}       <div class="error-container"><i class="{{= it.icons.error }}"></i></div>     {{?}}   </div>   <div class=rules-group-body>     <div class=rules-list></div>   </div> </div>',c.templates.rule='<div id="{{= it.rule_id }}" class="rule-container">   <div class="rule-header">     <div class="btn-group pull-right rule-actions">       <button type="button" class="btn btn-xs btn-danger" data-delete="rule">         <i class="{{= it.icons.remove_rule }}"></i> {{= it.translate("delete_rule") }}       </button>     </div>   </div>   {{? it.settings.display_errors }}     <div class="error-container"><i class="{{= it.icons.error }}"></i></div>   {{?}}   <div class="rule-filter-container"></div>   <div class="rule-operator-container"></div>   <div class="rule-value-container"></div> </div>',c.templates.filterSelect='{{ var optgroup = null; }} <select class="form-control" name="{{= it.rule.id }}_filter">   {{? it.settings.display_empty_filter }}     <option value="-1">{{= it.settings.select_placeholder }}</option>   {{?}}   {{~ it.filters: filter }}     {{? optgroup !== filter.optgroup }}       {{? optgroup !== null }}</optgroup>{{?}}       {{? (optgroup = filter.optgroup) !== null }}         <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}">       {{?}}     {{?}}     <option value="{{= filter.id }}" {{? filter.icon}}data-icon="{{= filter.icon}}"{{?}}>{{= it.translate(filter.label) }}</option>   {{~}}   {{? optgroup !== null }}</optgroup>{{?}} </select>',c.templates.operatorSelect='{{? it.operators.length === 1 }} <span> {{= it.translate("operators", it.operators[0].type) }} </span> {{?}} {{ var optgroup = null; }} <select class="form-control {{? it.operators.length === 1 }}hide{{?}}" name="{{= it.rule.id }}_operator">   {{~ it.operators: operator }}     {{? optgroup !== operator.optgroup }}       {{? optgroup !== null }}</optgroup>{{?}}       {{? (optgroup = operator.optgroup) !== null }}         <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}">       {{?}}     {{?}}     <option value="{{= operator.type }}" {{? operator.icon}}data-icon="{{= operator.icon}}"{{?}}>{{= it.translate("operators", operator.type) }}</option>   {{~}}   {{? optgroup !== null }}</optgroup>{{?}} </select>',c.templates.ruleValueSelect='{{ var optgroup = null; }} <select class="form-control" name="{{= it.name }}" {{? it.rule.filter.multiple }}multiple{{?}}>   {{? it.rule.filter.placeholder }}     <option value="{{= it.rule.filter.placeholder_value }}" disabled selected>{{= it.rule.filter.placeholder }}</option>   {{?}}   {{~ it.rule.filter.values: entry }}     {{? optgroup !== entry.optgroup }}       {{? optgroup !== null }}</optgroup>{{?}}       {{? (optgroup = entry.optgroup) !== null }}         <optgroup label="{{= it.translate(it.settings.optgroups[optgroup]) }}">       {{?}}     {{?}}     <option value="{{= entry.value }}">{{= entry.label }}</option>   {{~}}   {{? optgroup !== null }}</optgroup>{{?}} </select>',c.prototype.getGroupTemplate=function(e,t){var r=this.templates.group({builder:this,group_id:e,level:t,conditions:this.settings.conditions,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getGroupTemplate",r,t)},c.prototype.getRuleTemplate=function(e){var t=this.templates.rule({builder:this,rule_id:e,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleTemplate",t)},c.prototype.getRuleFilterSelect=function(e,t){var r=this.templates.filterSelect({builder:this,rule:e,filters:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleFilterSelect",r,e,t)},c.prototype.getRuleOperatorSelect=function(e,t){var r=this.templates.operatorSelect({builder:this,rule:e,operators:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleOperatorSelect",r,e,t)},c.prototype.getRuleValueSelect=function(e,t){var r=this.templates.ruleValueSelect({builder:this,name:e,rule:t,icons:this.icons,settings:this.settings,translate:this.translate.bind(this)});return this.change("getRuleValueSelect",r,e,t)},c.prototype.getRuleInput=function(e,t){var r=e.filter,n=e.filter.validation||{},i=e.id+"_value_"+t,o=r.vertical?" class=block":"",l="";if("function"==typeof r.input)l=r.input.call(this,e,i);else switch(r.input){case"radio":case"checkbox":h.iterateOptions(r.values,function(e,t){l+="<label"+o+'><input type="'+r.input+'" name="'+i+'" value="'+e+'"> '+t+"</label> "});break;case"select":l=this.getRuleValueSelect(i,e);break;case"textarea":l+='<textarea class="form-control" name="'+i+'"',r.size&&(l+=' cols="'+r.size+'"'),r.rows&&(l+=' rows="'+r.rows+'"'),void 0!==n.min&&(l+=' minlength="'+n.min+'"'),void 0!==n.max&&(l+=' maxlength="'+n.max+'"'),r.placeholder&&(l+=' placeholder="'+r.placeholder+'"'),l+="></textarea>";break;case"number":l+='<input class="form-control" type="number" name="'+i+'"',void 0!==n.step&&(l+=' step="'+n.step+'"'),void 0!==n.min&&(l+=' min="'+n.min+'"'),void 0!==n.max&&(l+=' max="'+n.max+'"'),r.placeholder&&(l+=' placeholder="'+r.placeholder+'"'),r.size&&(l+=' size="'+r.size+'"'),l+=">";break;default:l+='<input class="form-control" type="text" name="'+i+'"',r.placeholder&&(l+=' placeholder="'+r.placeholder+'"'),"string"===r.type&&void 0!==n.min&&(l+=' minlength="'+n.min+'"'),"string"===r.type&&void 0!==n.max&&(l+=' maxlength="'+n.max+'"'),r.size&&(l+=' size="'+r.size+'"'),l+=">"}return this.change("getRuleInput",l,e,i)};var h={};function n(){this.root=null,this.$=$(this)}(c.utils=h).iterateOptions=function(e,r){e&&($.isArray(e)?e.forEach(function(e){$.isPlainObject(e)?"value"in e?r(e.value,e.label||e.value,e.optgroup):$.each(e,function(e,t){return r(e,t),!1}):r(e,e)}):$.each(e,function(e,t){r(e,t)}))},h.fmt=function(e,r){return Array.isArray(r)||(r=Array.prototype.slice.call(arguments,1)),e.replace(/{([0-9]+)}/g,function(e,t){return r[parseInt(t)]})},h.error=function(){var e=0,t="boolean"!=typeof arguments[e]||arguments[e++],r=arguments[e++],n=arguments[e++],i=Array.isArray(arguments[e])?arguments[e]:Array.prototype.slice.call(arguments,e);if(t){var o=new Error(h.fmt(n,i));throw o.name=r+"Error",o.args=i,o}console.error(r+"Error: "+h.fmt(n,i))},h.changeType=function(e,t){if(""!==e&&void 0!==e)switch(t){case"integer":return"string"!=typeof e||/^-?\d+$/.test(e)?parseInt(e):e;case"double":return"string"!=typeof e||/^-?\d+\.?\d*$/.test(e)?parseFloat(e):e;case"boolean":return"string"!=typeof e||/^(0|1|true|false){1}$/i.test(e)?!0===e||1===e||"true"===e.toLowerCase()||"1"===e:e;default:return e}},h.escapeString=function(e){return"string"!=typeof e?e:e.replace(/[\0\n\r\b\\\'\"]/g,function(e){switch(e){case"\0":return"\\0";case"\n":return"\\n";case"\r":return"\\r";case"\b":return"\\b";default:return"\\"+e}}).replace(/\t/g,"\\t").replace(/\x1a/g,"\\Z")},h.escapeRegExp=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},h.escapeElementId=function(e){return e?e.replace(/(\\)?([:.\[\],])/g,function(e,t,r){return t?e:"\\"+r}):e},h.groupSort=function(e,r){var n=[],i=[];return e.forEach(function(e){var t;e[r]?-1==(t=n.lastIndexOf(e[r]))?t=n.length:t++:t=n.length,n.splice(t,0,e[r]),i.splice(t,0,e)}),i},h.defineModelProperties=function(e,t){t.forEach(function(r){Object.defineProperty(e.prototype,r,{enumerable:!0,get:function(){return this.__[r]},set:function(e){var t=null!==this.__[r]&&"object"==typeof this.__[r]?$.extend({},this.__[r]):this.__[r];this.__[r]=e,null!==this.model&&this.model.trigger("update",this,r,e,t)}})})},$.extend(n.prototype,{trigger:function(e){var t=new $.Event(e);return this.$.triggerHandler(t,Array.prototype.slice.call(arguments,1)),t},on:function(){return this.$.on.apply(this.$,Array.prototype.slice.call(arguments)),this},off:function(){return this.$.off.apply(this.$,Array.prototype.slice.call(arguments)),this},once:function(){return this.$.one.apply(this.$,Array.prototype.slice.call(arguments)),this}});var i=function(e,t){if(!(this instanceof i))return new i(e,t);Object.defineProperty(this,"__",{value:{}}),t.data("queryBuilderModel",this),this.__.level=1,this.__.error=null,this.__.flags={},this.__.data=void 0,this.$el=t,this.id=t[0].id,this.model=null,this.parent=e};h.defineModelProperties(i,["level","error","data","flags"]),Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){return this.__.parent},set:function(e){this.__.parent=e,this.level=null===e?1:e.level+1,this.model=null===e?null:e.model}}),i.prototype.isRoot=function(){return 1===this.level},i.prototype.getPos=function(){return this.isRoot()?-1:this.parent.getNodePos(this)},i.prototype.drop=function(){var e=this.model;this.parent&&this.parent.removeNode(this),this.$el.removeData("queryBuilderModel"),null!==e&&e.trigger("drop",this)},i.prototype.moveAfter=function(e){this.isRoot()||this.move(e.parent,e.getPos()+1)},i.prototype.moveAtBegin=function(e){this.isRoot()||(void 0===e&&(e=this.parent),this.move(e,0))},i.prototype.moveAtEnd=function(e){this.isRoot()||(void 0===e&&(e=this.parent),this.move(e,0===e.length()?0:e.length()-1))},i.prototype.move=function(e,t){this.isRoot()||("number"==typeof e&&(t=e,e=this.parent),this.parent.removeNode(this),e.insertNode(this,t,!1),null!==this.model&&this.model.trigger("move",this,e,t))};var a=function(e,t){if(!(this instanceof a))return new a(e,t);i.call(this,e,t),this.rules=[],this.__.condition=null};a.prototype=Object.create(i.prototype),a.prototype.constructor=a,h.defineModelProperties(a,["condition"]),a.prototype.empty=function(){this.each("reverse",function(e){e.drop()},function(e){e.drop()})},a.prototype.drop=function(){this.empty(),i.prototype.drop.call(this)},a.prototype.length=function(){return this.rules.length},a.prototype.insertNode=function(e,t,r){return void 0===t&&(t=this.length()),this.rules.splice(t,0,e),e.parent=this,r&&null!==this.model&&this.model.trigger("add",this,e,t),e},a.prototype.addGroup=function(e,t){return this.insertNode(new a(this,e),t,!0)},a.prototype.addRule=function(e,t){return this.insertNode(new l(this,e),t,!0)},a.prototype.removeNode=function(e){var t=this.getNodePos(e);-1!==t&&(e.parent=null,this.rules.splice(t,1))},a.prototype.getNodePos=function(e){return this.rules.indexOf(e)},a.prototype.each=function(e,t,r,n){"boolean"!=typeof e&&"string"!=typeof e&&(n=r,r=t,t=e,e=!1),n=void 0===n?null:n;for(var i=e?this.rules.length-1:0,o=e?0:this.rules.length-1,l=e?-1:1,s=!1;(e?o<=i:i<=o)&&(this.rules[i]instanceof a?r&&(s=!1===r.call(n,this.rules[i])):t&&(s=!1===t.call(n,this.rules[i])),!s);i+=l);return!s},a.prototype.contains=function(t,e){return-1!==this.getNodePos(t)||!!e&&!this.each(function(){return!0},function(e){return!e.contains(t,!0)})};var l=function(e,t){if(!(this instanceof l))return new l(e,t);i.call(this,e,t),this._updating_value=!1,this._updating_input=!1,this.__.filter=null,this.__.operator=null,this.__.value=void 0};function u(e,t,r){var n,i,o=c.selectors;(n=t.closest(o.rule_container)).length&&(i="moveAfter"),i||(n=t.closest(o.group_header)).length&&(n=t.closest(o.group_container),i="moveAtBegin"),i||(n=t.closest(o.group_container)).length&&(i="moveAtEnd"),i&&(e[i](r.getModel(n)),r&&e instanceof l&&r.setRuleInputValue(e,e.value))}function o(e){var t=e.match(/(question_mark|numbered|named)(?:\((.)\))?/);return t||(t=[null,"question_mark",void 0]),t}return l.prototype=Object.create(i.prototype),l.prototype.constructor=l,h.defineModelProperties(l,["filter","operator","value"]),l.prototype.isRoot=function(){return!1},c.Group=a,c.Rule=l,$.fn.queryBuilder=function(e){0===this.length&&h.error("Config","No target defined"),1<this.length&&h.error("Config","Unable to initialize on multiple target");var t=this.data("queryBuilder"),r="object"==typeof e&&e||{};if(!t&&"destroy"==e)return this;if(!t){var n=new c(this,r);this.data("queryBuilder",n),n.init(r.rules)}return"string"==typeof e?t[e].apply(t,Array.prototype.slice.call(arguments,1)):this},$.fn.queryBuilder.constructor=c,$.fn.queryBuilder.defaults=c.defaults,$.fn.queryBuilder.extend=c.extend,$.fn.queryBuilder.define=c.define,$.fn.queryBuilder.regional=c.regional,c.define("bt-checkbox",function(u){"glyphicons"==u.font&&this.$el.addClass("bt-checkbox-glyphicons"),this.on("getRuleInput.filter",function(i,e,o){var l=e.filter;if(("radio"===l.input||"checkbox"===l.input)&&!l.plugin){i.value="",l.colors||(l.colors={}),l.color&&(l.colors._def_=l.color);var s=l.vertical?' style="display:block"':"",a=0;h.iterateOptions(l.values,function(e,t){var r=l.colors[e]||l.colors._def_||u.color,n=o+"_"+a++;i.value+="<div"+s+' class="'+l.input+" "+l.input+"-"+r+'">   <input type="'+l.input+'" name="'+o+'" id="'+n+'" value="'+e+'">   <label for="'+n+'">'+t+"</label> </div>"})}})},{font:"glyphicons",color:"default"}),c.define("bt-selectpicker",function(r){$.fn.selectpicker&&$.fn.selectpicker.Constructor||h.error("MissingLibrary",'Bootstrap Select is required to use "bt-selectpicker" plugin. Get it here: http://silviomoreto.github.io/bootstrap-select');var n=c.selectors;this.on("afterCreateRuleFilters",function(e,t){t.$el.find(n.rule_filter).removeClass("form-control").selectpicker(r)}),this.on("afterCreateRuleOperators",function(e,t){t.$el.find(n.rule_operator).removeClass("form-control").selectpicker(r)}),this.on("afterUpdateRuleFilter",function(e,t){t.$el.find(n.rule_filter).selectpicker("render")}),this.on("afterUpdateRuleOperator",function(e,t){t.$el.find(n.rule_operator).selectpicker("render")}),this.on("beforeDeleteRule",function(e,t){t.$el.find(n.rule_filter).selectpicker("destroy"),t.$el.find(n.rule_operator).selectpicker("destroy")})},{container:"body",style:"btn-inverse btn-xs",width:"auto",showIcon:!1}),c.define("bt-tooltip-errors",function(n){$.fn.tooltip&&$.fn.tooltip.Constructor&&$.fn.tooltip.Constructor.prototype.fixTitle||h.error("MissingLibrary",'Bootstrap Tooltip is required to use "bt-tooltip-errors" plugin. Get it here: http://getbootstrap.com');var i=this;this.on("getRuleTemplate.filter getGroupTemplate.filter",function(e){var t=$(e.value);t.find(c.selectors.error_container).attr("data-toggle","tooltip"),e.value=t.prop("outerHTML")}),this.model.on("update",function(e,t,r){"error"==r&&i.settings.display_errors&&t.$el.find(c.selectors.error_container).eq(0).tooltip(n).tooltip("hide").tooltip("fixTitle")})},{placement:"right"}),c.extend({setFilters:function(e,t){var r=this;void 0===t&&(t=e,e=!1),t=this.checkFilters(t);var n=(t=this.change("setFilters",t)).map(function(e){return e.id});if(e||function e(t){t.each(function(e){e.filter&&-1===n.indexOf(e.filter.id)&&h.error("ChangeFilter",'A rule is using filter "{0}"',e.filter.id)},e)}(this.model.root),this.filters=t,function e(t){t.each(!0,function(e){e.filter&&-1===n.indexOf(e.filter.id)?(e.drop(),r.trigger("rulesChanged")):(r.createRuleFilters(e),e.$el.find(c.selectors.rule_filter).val(e.filter?e.filter.id:"-1"),r.trigger("afterUpdateRuleFilter",e))},e)}(this.model.root),this.settings.plugins&&(this.settings.plugins["unique-filter"]&&this.updateDisabledFilters(),this.settings.plugins["bt-selectpicker"]&&this.$el.find(c.selectors.rule_filter).selectpicker("render")),this.settings.default_filter)try{this.getFilterById(this.settings.default_filter)}catch(e){this.settings.default_filter=null}this.trigger("afterSetFilters",t)},addFilter:function(e,r){void 0===r||"#end"==r?r=this.filters.length:"#start"==r&&(r=0),$.isArray(e)||(e=[e]);var t=$.extend(!0,[],this.filters);parseInt(r)==r?Array.prototype.splice.apply(t,[r,0].concat(e)):this.filters.some(function(e,t){if(e.id==r)return r=t+1,!0})?Array.prototype.splice.apply(t,[r,0].concat(e)):Array.prototype.push.apply(t,e),this.setFilters(t)},removeFilter:function(t,e){var r=$.extend(!0,[],this.filters);"string"==typeof t&&(t=[t]),r=r.filter(function(e){return-1===t.indexOf(e.id)}),this.setFilters(e,r)}}),c.define("chosen-selectpicker",function(r){$.fn.chosen||h.error("MissingLibrary",'chosen is required to use "chosen-selectpicker" plugin. Get it here: https://github.com/harvesthq/chosen'),this.settings.plugins["bt-selectpicker"]&&h.error("Conflict","bt-selectpicker is already selected as the dropdown plugin. Please remove chosen-selectpicker from the plugin list");var n=c.selectors;this.on("afterCreateRuleFilters",function(e,t){t.$el.find(n.rule_filter).removeClass("form-control").chosen(r)}),this.on("afterCreateRuleOperators",function(e,t){t.$el.find(n.rule_operator).removeClass("form-control").chosen(r)}),this.on("afterUpdateRuleFilter",function(e,t){t.$el.find(n.rule_filter).trigger("chosen:updated")}),this.on("afterUpdateRuleOperator",function(e,t){t.$el.find(n.rule_operator).trigger("chosen:updated")}),this.on("beforeDeleteRule",function(e,t){t.$el.find(n.rule_filter).chosen("destroy"),t.$el.find(n.rule_operator).chosen("destroy")})}),c.define("filter-description",function(i){"inline"===i.mode?this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("p.filter-description"),n=e.builder.getFilterDescription(t.filter,t);n?(0===r.length?(r=$('<p class="filter-description"></p>')).appendTo(t.$el):r.css("display",""),r.html('<i class="'+i.icon+'"></i> '+n)):r.hide()}):"popover"===i.mode?($.fn.popover&&$.fn.popover.Constructor&&$.fn.popover.Constructor.prototype.fixTitle||h.error("MissingLibrary",'Bootstrap Popover is required to use "filter-description" plugin. Get it here: http://getbootstrap.com'),this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("button.filter-description"),n=e.builder.getFilterDescription(t.filter,t);n?(0===r.length?((r=$('<button type="button" class="btn btn-xs btn-info filter-description" data-toggle="popover"><i class="'+i.icon+'"></i></button>')).prependTo(t.$el.find(c.selectors.rule_actions)),r.popover({placement:"left",container:"body",html:!0}),r.on("mouseout",function(){r.popover("hide")})):r.css("display",""),r.data("bs.popover").options.content=n,r.attr("aria-describedby")&&r.popover("show")):(r.hide(),r.data("bs.popover")&&r.popover("hide"))})):"bootbox"===i.mode&&("bootbox"in window||h.error("MissingLibrary",'Bootbox is required to use "filter-description" plugin. Get it here: http://bootboxjs.com'),this.on("afterUpdateRuleFilter afterUpdateRuleOperator",function(e,t){var r=t.$el.find("button.filter-description"),n=e.builder.getFilterDescription(t.filter,t);n?(0===r.length?((r=$('<button type="button" class="btn btn-xs btn-info filter-description" data-toggle="bootbox"><i class="'+i.icon+'"></i></button>')).prependTo(t.$el.find(c.selectors.rule_actions)),r.on("click",function(){bootbox.alert(r.data("description"))})):r.css("display",""),r.data("description",n)):r.hide()}))},{icon:"glyphicon glyphicon-info-sign",mode:"popover"}),c.extend({getFilterDescription:function(e,t){return e?"function"==typeof e.description?e.description.call(this,t):e.description:void 0}}),c.define("invert",function(r){var n=this,i=c.selectors;this.on("afterInit",function(){n.$el.on("click.queryBuilder","[data-invert=group]",function(){var e=$(this).closest(i.group_container);n.invert(n.getModel(e),r)}),r.display_rules_button&&r.invert_rules&&n.$el.on("click.queryBuilder","[data-invert=rule]",function(){var e=$(this).closest(i.rule_container);n.invert(n.getModel(e),r)})}),r.disable_template||(this.on("getGroupTemplate.filter",function(e){var t=$(e.value);t.find(i.condition_container).after('<button type="button" class="btn btn-xs btn-default" data-invert="group"><i class="'+r.icon+'"></i> '+n.translate("invert")+"</button>"),e.value=t.prop("outerHTML")}),r.display_rules_button&&r.invert_rules&&this.on("getRuleTemplate.filter",function(e){var t=$(e.value);t.find(i.rule_actions).prepend('<button type="button" class="btn btn-xs btn-default" data-invert="rule"><i class="'+r.icon+'"></i> '+n.translate("invert")+"</button>"),e.value=t.prop("outerHTML")}))},{icon:"glyphicon glyphicon-random",recursive:!0,invert_rules:!0,display_rules_button:!1,silent_fail:!1,disable_template:!1}),c.defaults({operatorOpposites:{equal:"not_equal",not_equal:"equal",in:"not_in",not_in:"in",less:"greater_or_equal",less_or_equal:"greater",greater:"less_or_equal",greater_or_equal:"less",between:"not_between",not_between:"between",begins_with:"not_begins_with",not_begins_with:"begins_with",contains:"not_contains",not_contains:"contains",ends_with:"not_ends_with",not_ends_with:"ends_with",is_empty:"is_not_empty",is_not_empty:"is_empty",is_null:"is_not_null",is_not_null:"is_null"},conditionOpposites:{AND:"OR",OR:"AND"}}),c.extend({invert:function(e,t){if(!(e instanceof i)){if(!this.model.root)return;t=e,e=this.model.root}if("object"!=typeof t&&(t={}),void 0===t.recursive&&(t.recursive=!0),void 0===t.invert_rules&&(t.invert_rules=!0),void 0===t.silent_fail&&(t.silent_fail=!1),void 0===t.trigger&&(t.trigger=!0),e instanceof a){if(this.settings.conditionOpposites[e.condition]?e.condition=this.settings.conditionOpposites[e.condition]:t.silent_fail||h.error("InvertCondition",'Unknown inverse of condition "{0}"',e.condition),t.recursive){var r=$.extend({},t,{trigger:!1});e.each(function(e){t.invert_rules&&this.invert(e,r)},function(e){this.invert(e,r)},this)}}else if(e instanceof l&&e.operator&&!e.filter.no_invert)if(this.settings.operatorOpposites[e.operator.type]){var n=this.settings.operatorOpposites[e.operator.type];e.filter.operators&&-1==e.filter.operators.indexOf(n)||(e.operator=this.getOperatorByType(n))}else t.silent_fail||h.error("InvertOperator",'Unknown inverse of operator "{0}"',e.operator.type);t.trigger&&(this.trigger("afterInvert",e,t),this.trigger("rulesChanged"))}}),c.defaults({mongoOperators:{equal:function(e){return e[0]},not_equal:function(e){return{$ne:e[0]}},in:function(e){return{$in:e}},not_in:function(e){return{$nin:e}},less:function(e){return{$lt:e[0]}},less_or_equal:function(e){return{$lte:e[0]}},greater:function(e){return{$gt:e[0]}},greater_or_equal:function(e){return{$gte:e[0]}},between:function(e){return{$gte:e[0],$lte:e[1]}},not_between:function(e){return{$lt:e[0],$gt:e[1]}},begins_with:function(e){return{$regex:"^"+h.escapeRegExp(e[0])}},not_begins_with:function(e){return{$regex:"^(?!"+h.escapeRegExp(e[0])+")"}},contains:function(e){return{$regex:h.escapeRegExp(e[0])}},not_contains:function(e){return{$regex:"^((?!"+h.escapeRegExp(e[0])+").)*$",$options:"s"}},ends_with:function(e){return{$regex:h.escapeRegExp(e[0])+"$"}},not_ends_with:function(e){return{$regex:"(?<!"+h.escapeRegExp(e[0])+")$"}},is_empty:function(e){return""},is_not_empty:function(e){return{$ne:""}},is_null:function(e){return null},is_not_null:function(e){return{$ne:null}}},mongoRuleOperators:{$eq:function(e){return{val:e,op:null===e?"is_null":""===e?"is_empty":"equal"}},$ne:function(e){return{val:e=e.$ne,op:null===e?"is_not_null":""===e?"is_not_empty":"not_equal"}},$regex:function(e){return"^(?!"==(e=e.$regex).slice(0,4)&&")"==e.slice(-1)?{val:e.slice(4,-1),op:"not_begins_with"}:"^((?!"==e.slice(0,5)&&").)*$"==e.slice(-5)?{val:e.slice(5,-5),op:"not_contains"}:"(?<!"==e.slice(0,4)&&")$"==e.slice(-2)?{val:e.slice(4,-2),op:"not_ends_with"}:"$"==e.slice(-1)?{val:e.slice(0,-1),op:"ends_with"}:"^"==e.slice(0,1)?{val:e.slice(1),op:"begins_with"}:{val:e,op:"contains"}},between:function(e){return{val:[e.$gte,e.$lte],op:"between"}},not_between:function(e){return{val:[e.$lt,e.$gt],op:"not_between"}},$in:function(e){return{val:e.$in,op:"in"}},$nin:function(e){return{val:e.$nin,op:"not_in"}},$lt:function(e){return{val:e.$lt,op:"less"}},$lte:function(e){return{val:e.$lte,op:"less_or_equal"}},$gt:function(e){return{val:e.$gt,op:"greater"}},$gte:function(e){return{val:e.$gte,op:"greater_or_equal"}}}}),c.extend({getMongo:function(e){if(!(e=void 0===e?this.getRules():e))return null;var l=this;return function i(e){if(e.condition||(e.condition=l.settings.default_condition),-1===["AND","OR"].indexOf(e.condition.toUpperCase())&&h.error("UndefinedMongoCondition",'Unable to build MongoDB query with condition "{0}"',e.condition),!e.rules)return{};var o=[];e.rules.forEach(function(e){if(e.rules&&0<e.rules.length)o.push(i(e));else{var t=l.settings.mongoOperators[e.operator],r=l.getOperatorByType(e.operator);void 0===t&&h.error("UndefinedMongoOperator",'Unknown MongoDB operation for operator "{0}"',e.operator),0!==r.nb_inputs&&(e.value instanceof Array||(e.value=[e.value]));var n={};n[l.change("getMongoDBField",e.field,e)]=t.call(l,e.value),o.push(l.change("ruleToMongo",n,e,e.value,t))}});var t={};return t["$"+e.condition.toLowerCase()]=o,l.change("groupToMongo",t,e)}(e)},getRulesFromMongo:function(e){if(null==e)return null;var d=this;if("rules"in(e=d.change("parseMongoNode",e))&&"condition"in e)return e;if("id"in e&&"operator"in e&&"value"in e)return{condition:this.settings.default_condition,rules:[e]};var t=d.getMongoCondition(e);return t||h.error("MongoParse","Invalid MongoDB query format"),function u(e,t){var r=e[t],p=[];return r.forEach(function(e){if("rules"in(e=d.change("parseMongoNode",e))&&"condition"in e)p.push(e);else if("id"in e&&"operator"in e&&"value"in e)p.push(e);else{var t=d.getMongoCondition(e);if(t)p.push(u(e,t));else{var r=Object.keys(e)[0],n=e[r],i=d.getMongoOperator(n);void 0===i&&h.error("MongoParse","Invalid MongoDB query format");var o=d.settings.mongoRuleOperators[i];void 0===o&&h.error("UndefinedMongoOperator",'JSON Rule operation unknown for operator "{0}"',i);var l=o.call(d,n),s=d.getMongoDBFieldID(r,n),a=d.change("mongoToRule",{id:s,field:r,operator:l.op,value:l.val},e);p.push(a)}}}),d.change("mongoToGroup",{condition:t.replace("$","").toUpperCase(),rules:p},e)}(e,t)},setRulesFromMongo:function(e){this.setRules(this.getRulesFromMongo(e))},getMongoDBFieldID:function(t,e){var r=this.filters.filter(function(e){return e.field===t});return 1===r.length?r[0].id:this.change("getMongoDBFieldID",t,e)},getMongoOperator:function(e){if(null===e||"object"!=typeof e)return"$eq";if(void 0!==e.$gte&&void 0!==e.$lte)return"between";if(void 0!==e.$lt&&void 0!==e.$gt)return"not_between";var t=Object.keys(e).filter(function(e){return!!this.settings.mongoRuleOperators[e]}.bind(this));return 1===t.length?t[0]:void 0},getMongoCondition:function(e){for(var t=Object.keys(e),r=0,n=t.length;r<n;r++)if("$or"===t[r].toLowerCase()||"$and"===t[r].toLowerCase())return t[r]}}),c.define("not-group",function(r){var n=this;this.on("afterInit",function(){n.$el.on("click.queryBuilder","[data-not=group]",function(){var e=$(this).closest(c.selectors.group_container),t=n.getModel(e);t.not=!t.not}),n.model.on("update",function(e,t,r){t instanceof a&&"not"===r&&n.updateGroupNot(t)})}),this.on("afterAddGroup",function(e,t){t.__.not=!1}),r.disable_template||this.on("getGroupTemplate.filter",function(e){var t=$(e.value);t.find(c.selectors.condition_container).prepend('<button type="button" class="btn btn-xs btn-default" data-not="group"><i class="'+r.icon_unchecked+'"></i> '+n.translate("NOT")+"</button>"),e.value=t.prop("outerHTML")}),this.on("groupToJson.filter",function(e,t){e.value.not=t.not}),this.on("jsonToGroup.filter",function(e,t){e.value.not=!!t.not}),this.on("groupToSQL.filter",function(e,t){t.not&&(e.value="NOT ( "+e.value+" )")}),this.on("parseSQLNode.filter",function(e){e.value.name&&"NOT"==e.value.name.toUpperCase()&&(e.value=e.value.arguments.value[0],-1===["AND","OR"].indexOf(e.value.operation.toUpperCase())&&(e.value=new SQLParser.nodes.Op(n.settings.default_condition,e.value,null)),e.value.not=!0)}),this.on("sqlGroupsDistinct.filter",function(e,t,r,n){r.not&&0<n&&(e.value=!0)}),this.on("sqlToGroup.filter",function(e,t){e.value.not=!!t.not}),this.on("groupToMongo.filter",function(e,t){var r="$"+t.condition.toLowerCase();t.not&&e.value[r]&&(e.value={$nor:[e.value]})}),this.on("parseMongoNode.filter",function(e){var t=Object.keys(e.value);"$nor"==t[0]&&(e.value=e.value[t[0]][0],e.value.not=!0)}),this.on("mongoToGroup.filter",function(e,t){e.value.not=!!t.not})},{icon_unchecked:"glyphicon glyphicon-unchecked",icon_checked:"glyphicon glyphicon-check",disable_template:!1}),h.defineModelProperties(a,["not"]),c.selectors.group_not=c.selectors.group_header+" [data-not=group]",c.extend({updateGroupNot:function(e){var t=this.plugins["not-group"];e.$el.find(">"+c.selectors.group_not).toggleClass("active",e.not).find("i").attr("class",e.not?t.icon_checked:t.icon_unchecked),this.trigger("afterUpdateGroupNot",e),this.trigger("rulesChanged")}}),c.define("sortable",function(n){var i,o,l,s;"interact"in window||h.error("MissingLibrary",'interact.js is required to use "sortable" plugin. Get it here: http://interactjs.io'),void 0!==n.default_no_sortable&&(h.error(!1,"Config",'Sortable plugin : "default_no_sortable" options is deprecated, use standard "default_rule_flags" and "default_group_flags" instead'),this.settings.default_rule_flags.no_sortable=this.settings.default_group_flags.no_sortable=n.default_no_sortable),interact.dynamicDrop(!0),interact.pointerMoveTolerance(10),this.on("afterAddRule afterAddGroup",function(e,t){if(t!=i){var r=e.builder;n.inherit_no_sortable&&t.parent&&t.parent.flags.no_sortable&&(t.flags.no_sortable=!0),n.inherit_no_drop&&t.parent&&t.parent.flags.no_drop&&(t.flags.no_drop=!0),t.flags.no_sortable||interact(t.$el[0]).draggable({allowFrom:c.selectors.drag_handle,onstart:function(e){s=!1,l=r.getModel(e.target),o=l.$el.clone().appendTo(l.$el.parent()).width(l.$el.outerWidth()).addClass("dragging");var t=$('<div class="rule-placeholder">&nbsp;</div>').height(l.$el.outerHeight());i=l.parent.addRule(t,l.getPos()),l.$el.hide()},onmove:function(e){o[0].style.top=e.clientY-15+"px",o[0].style.left=e.clientX-15+"px"},onend:function(e){e.dropzone&&(u(l,$(e.relatedTarget),r),s=!0),o.remove(),o=void 0,i.drop(),i=void 0,l.$el.css("display",""),r.trigger("afterMove",l),r.trigger("rulesChanged")}}),t.flags.no_drop||(interact(t.$el[0]).dropzone({accept:c.selectors.rule_and_group_containers,ondragenter:function(e){u(i,$(e.target),r)},ondrop:function(e){s||u(l,$(e.target),r)}}),t instanceof a&&interact(t.$el.find(c.selectors.group_header)[0]).dropzone({accept:c.selectors.rule_and_group_containers,ondragenter:function(e){u(i,$(e.target),r)},ondrop:function(e){s||u(l,$(e.target),r)}}))}}),this.on("beforeDeleteRule beforeDeleteGroup",function(e,t){e.isDefaultPrevented()||(interact(t.$el[0]).unset(),t instanceof a&&interact(t.$el.find(c.selectors.group_header)[0]).unset())}),this.on("afterApplyRuleFlags afterApplyGroupFlags",function(e,t){t.flags.no_sortable&&t.$el.find(".drag-handle").remove()}),n.disable_template||(this.on("getGroupTemplate.filter",function(e,t){if(1<t){var r=$(e.value);r.find(c.selectors.condition_container).after('<div class="drag-handle"><i class="'+n.icon+'"></i></div>'),e.value=r.prop("outerHTML")}}),this.on("getRuleTemplate.filter",function(e){var t=$(e.value);t.find(c.selectors.rule_header).after('<div class="drag-handle"><i class="'+n.icon+'"></i></div>'),e.value=t.prop("outerHTML")}))},{inherit_no_sortable:!0,inherit_no_drop:!0,icon:"glyphicon glyphicon-sort",disable_template:!1}),c.selectors.rule_and_group_containers=c.selectors.rule_container+", "+c.selectors.group_container,c.selectors.drag_handle=".drag-handle",c.defaults({default_rule_flags:{no_sortable:!1,no_drop:!1},default_group_flags:{no_sortable:!1,no_drop:!1}}),c.define("sql-support",function(e){},{boolean_as_integer:!0}),c.defaults({sqlOperators:{equal:{op:"= ?"},not_equal:{op:"!= ?"},in:{op:"IN(?)",sep:", "},not_in:{op:"NOT IN(?)",sep:", "},less:{op:"< ?"},less_or_equal:{op:"<= ?"},greater:{op:"> ?"},greater_or_equal:{op:">= ?"},between:{op:"BETWEEN ?",sep:" AND "},not_between:{op:"NOT BETWEEN ?",sep:" AND "},begins_with:{op:"LIKE(?)",mod:"{0}%"},not_begins_with:{op:"NOT LIKE(?)",mod:"{0}%"},contains:{op:"LIKE(?)",mod:"%{0}%"},not_contains:{op:"NOT LIKE(?)",mod:"%{0}%"},ends_with:{op:"LIKE(?)",mod:"%{0}"},not_ends_with:{op:"NOT LIKE(?)",mod:"%{0}"},is_empty:{op:"= ''"},is_not_empty:{op:"!= ''"},is_null:{op:"IS NULL"},is_not_null:{op:"IS NOT NULL"}},sqlRuleOperator:{"=":function(e){return{val:e,op:""===e?"is_empty":"equal"}},"!=":function(e){return{val:e,op:""===e?"is_not_empty":"not_equal"}},LIKE:function(e){return"%"==e.slice(0,1)&&"%"==e.slice(-1)?{val:e.slice(1,-1),op:"contains"}:"%"==e.slice(0,1)?{val:e.slice(1),op:"ends_with"}:"%"==e.slice(-1)?{val:e.slice(0,-1),op:"begins_with"}:void h.error("SQLParse",'Invalid value for LIKE operator "{0}"',e)},"NOT LIKE":function(e){return"%"==e.slice(0,1)&&"%"==e.slice(-1)?{val:e.slice(1,-1),op:"not_contains"}:"%"==e.slice(0,1)?{val:e.slice(1),op:"not_ends_with"}:"%"==e.slice(-1)?{val:e.slice(0,-1),op:"not_begins_with"}:void h.error("SQLParse",'Invalid value for NOT LIKE operator "{0}"',e)},IN:function(e){return{val:e,op:"in"}},"NOT IN":function(e){return{val:e,op:"not_in"}},"<":function(e){return{val:e,op:"less"}},"<=":function(e){return{val:e,op:"less_or_equal"}},">":function(e){return{val:e,op:"greater"}},">=":function(e){return{val:e,op:"greater_or_equal"}},BETWEEN:function(e){return{val:e,op:"between"}},"NOT BETWEEN":function(e){return{val:e,op:"not_between"}},IS:function(e){return null!==e&&h.error("SQLParse","Invalid value for IS operator"),{val:null,op:"is_null"}},"IS NOT":function(e){return null!==e&&h.error("SQLParse","Invalid value for IS operator"),{val:null,op:"is_not_null"}}},sqlStatements:{question_mark:function(){var r=[];return{add:function(e,t){return r.push(t),"?"},run:function(){return r}}},numbered:function(r){(!r||1<r.length)&&(r="$");var n=0,i=[];return{add:function(e,t){return i.push(t),r+ ++n},run:function(){return i}}},named:function(n){(!n||1<n.length)&&(n=":");var i={},o={};return{add:function(e,t){i[e.field]||(i[e.field]=1);var r=e.field+"_"+i[e.field]++;return o[r]=t,n+r},run:function(){return o}}}},sqlRuleStatement:{question_mark:function(t){var r=0;return{parse:function(e){return"?"==e?t[r++]:e},esc:function(e){return e.replace(/\?/g,"'?'")}}},numbered:function(t,r){(!r||1<r.length)&&(r="$");var n=new RegExp("^\\"+r+"[0-9]+$"),i=new RegExp("\\"+r+"([0-9]+)","g");return{parse:function(e){return n.test(e)?t[e.slice(1)-1]:e},esc:function(e){return e.replace(i,"'"+("$"==r?"$$":r)+"$1'")}}},named:function(t,r){(!r||1<r.length)&&(r=":");var n=new RegExp("^\\"+r),i=new RegExp("\\"+r+"("+Object.keys(t).join("|")+")","g");return{parse:function(e){return n.test(e)?t[e.slice(1)]:e},esc:function(e){return e.replace(i,"'"+("$"==r?"$$":r)+"$1'")}}}}}),c.extend({getSQL:function(a,u,e){if(!(e=void 0===e?this.getRules():e))return null;u=u?"\n":" ";var p=this.getPluginOptions("sql-support","boolean_as_integer");if(!0===a&&(a="question_mark"),"string"==typeof a){var t=o(a);a=this.settings.sqlStatements[t[1]](t[2])}var d=this,r=function l(e){if(e.condition||(e.condition=d.settings.default_condition),-1===["AND","OR"].indexOf(e.condition.toUpperCase())&&h.error("UndefinedSQLCondition",'Unable to build SQL query with condition "{0}"',e.condition),!e.rules)return"";var s=[];e.rules.forEach(function(r){if(r.rules&&0<r.rules.length)s.push("("+u+l(r)+u+")"+u);else{var n=d.settings.sqlOperators[r.operator],e=d.getOperatorByType(r.operator),i="";void 0===n&&h.error("UndefinedSQLOperator",'Unknown SQL operation for operator "{0}"',r.operator),0!==e.nb_inputs&&(r.value instanceof Array||(r.value=[r.value]),r.value.forEach(function(e,t){0<t&&(i+=n.sep),"boolean"==r.type&&p?e=e?1:0:a||"integer"===r.type||"double"===r.type||"boolean"===r.type||(e=h.escapeString(e)),n.mod&&(e=h.fmt(n.mod,e)),a?i+=a.add(r,e):("string"==typeof e&&(e="'"+e+"'"),i+=e)}));var t=function(e){return n.op.replace("?",function(){return e})},o=d.change("getSQLField",r.field,r)+" "+t(i);s.push(d.change("ruleToSQL",o,r,i,t))}});var t=s.join(" "+e.condition+u);return d.change("groupToSQL",t,e)}(e);return a?{sql:r,params:a.run()}:{sql:r}},getRulesFromSQL:function(e,c){"SQLParser"in window||h.error("MissingLibrary","SQLParser is required to parse SQL queries. Get it here https://github.com/mistic100/sql-parser");var f=this;if("string"==typeof e&&(e={sql:e}),!0===c&&(c="question_mark"),"string"==typeof c){var t=o(c);c=this.settings.sqlRuleStatement[t[1]](e.params,t[2])}c&&(e.sql=c.esc(e.sql)),0!==e.sql.toUpperCase().indexOf("SELECT")&&(e.sql="SELECT * FROM table WHERE "+e.sql);var r=SQLParser.parse(e.sql);r.where||h.error("SQLParse","No WHERE clause found");var n=f.change("parseSQLNode",r.where.conditions);if("rules"in n&&"condition"in n)return n;if("id"in n&&"operator"in n&&"value"in n)return{condition:this.settings.default_condition,rules:[n]};var i=f.change("sqlToGroup",{condition:this.settings.default_condition,rules:[]},n),g=i;return function e(t,r){if(null!==t)if("rules"in(t=f.change("parseSQLNode",t))&&"condition"in t)g.rules.push(t);else if("id"in t&&"operator"in t&&"value"in t)g.rules.push(t);else if("left"in t&&"right"in t&&"operation"in t||h.error("SQLParse","Unable to parse WHERE clause"),-1!==["AND","OR"].indexOf(t.operation.toUpperCase())){if(f.change("sqlGroupsDistinct",0<r&&g.condition!=t.operation.toUpperCase(),g,t,r)){var n=f.change("sqlToGroup",{condition:f.settings.default_condition,rules:[]},t);g.rules.push(n),g=n}g.condition=t.operation.toUpperCase(),r++;var i=g;e(t.left,r),g=i,e(t.right,r)}else{var o;$.isPlainObject(t.right.value)&&h.error("SQLParse","Value format not supported for {0}.",t.left.value),o=$.isArray(t.right.value)?t.right.value.map(function(e){return e.value}):t.right.value,c&&(o=$.isArray(o)?o.map(c.parse):c.parse(o));var l=t.operation.toUpperCase();"<>"==l&&(l="!=");var s=f.settings.sqlRuleOperator[l];void 0===s&&h.error("UndefinedSQLOperator",'Invalid SQL operation "{0}".',t.operation);var a,u=s.call(this,o,t.operation);"values"in t.left?a=t.left.values.join("."):"value"in t.left?a=t.left.value:h.error("SQLParse","Cannot find field name in {0}",JSON.stringify(t.left));var p=f.getSQLFieldID(a,o),d=f.change("sqlToRule",{id:p,field:a,operator:u.op,value:u.val},t);g.rules.push(d)}}(n,0),i},setRulesFromSQL:function(e,t){this.setRules(this.getRulesFromSQL(e,t))},getSQLFieldID:function(t,e){var r=this.filters.filter(function(e){return e.field.toLowerCase()===t.toLowerCase()});return 1===r.length?r[0].id:this.change("getSQLFieldID",t,e)}}),c.define("unique-filter",function(){this.status.used_filters={},this.on("afterUpdateRuleFilter",this.updateDisabledFilters),this.on("afterDeleteRule",this.updateDisabledFilters),this.on("afterCreateRuleFilters",this.applyDisabledFilters),this.on("afterReset",this.clearDisabledFilters),this.on("afterClear",this.clearDisabledFilters),this.on("getDefaultFilter.filter",function(t,r){var n=t.builder;(n.updateDisabledFilters(),t.value.id in n.status.used_filters)&&(n.filters.some(function(e){if(!(e.id in n.status.used_filters)||0<n.status.used_filters[e.id].length&&-1===n.status.used_filters[e.id].indexOf(r.parent))return t.value=e,!0})||(h.error(!1,"UniqueFilter","No more non-unique filters available"),t.value=void 0))})}),c.extend({updateDisabledFilters:function(e){var r=e?e.builder:this;r.status.used_filters={},r.model&&(!function t(e){e.each(function(e){e.filter&&e.filter.unique&&(r.status.used_filters[e.filter.id]||(r.status.used_filters[e.filter.id]=[]),"group"==e.filter.unique&&r.status.used_filters[e.filter.id].push(e.parent))},function(e){t(e)})}(r.model.root),r.applyDisabledFilters(e))},clearDisabledFilters:function(e){var t=e?e.builder:this;t.status.used_filters={},t.applyDisabledFilters(e)},applyDisabledFilters:function(e){var r=e?e.builder:this;r.$el.find(c.selectors.filter_container+" option").prop("disabled",!1),$.each(r.status.used_filters,function(t,e){0===e.length?r.$el.find(c.selectors.filter_container+' option[value="'+t+'"]:not(:selected)').prop("disabled",!0):e.forEach(function(e){e.each(function(e){e.$el.find(c.selectors.filter_container+' option[value="'+t+'"]:not(:selected)').prop("disabled",!0)})})}),r.settings.plugins&&r.settings.plugins["bt-selectpicker"]&&r.$el.find(c.selectors.rule_filter).selectpicker("render")}}),c.regional.en={__locale:"English (en)",__author:'Damien "Mistic" Sorel, http://www.strangeplanet.fr',add_rule:"Add rule",add_group:"Add group",delete_rule:"Delete",delete_group:"Delete",conditions:{AND:"AND",OR:"OR"},operators:{equal:"equal",not_equal:"not equal",in:"in",not_in:"not in",less:"less",less_or_equal:"less or equal",greater:"greater",greater_or_equal:"greater or equal",between:"between",not_between:"not between",begins_with:"begins with",not_begins_with:"doesn't begin with",contains:"contains",not_contains:"doesn't contain",ends_with:"ends with",not_ends_with:"doesn't end with",is_empty:"is empty",is_not_empty:"is not empty",is_null:"is null",is_not_null:"is not null"},errors:{no_filter:"No filter selected",empty_group:"The group is empty",radio_empty:"No value selected",checkbox_empty:"No value selected",select_empty:"No value selected",string_empty:"Empty value",string_exceed_min_length:"Must contain at least {0} characters",string_exceed_max_length:"Must not contain more than {0} characters",string_invalid_format:"Invalid format ({0})",number_nan:"Not a number",number_not_integer:"Not an integer",number_not_double:"Not a real number",number_exceed_min:"Must be greater than {0}",number_exceed_max:"Must be lower than {0}",number_wrong_step:"Must be a multiple of {0}",number_between_invalid:"Invalid values, {0} is greater than {1}",datetime_empty:"Empty value",datetime_invalid:"Invalid date format ({0})",datetime_exceed_min:"Must be after {0}",datetime_exceed_max:"Must be before {0}",datetime_between_invalid:"Invalid values, {0} is greater than {1}",boolean_not_valid:"Not a boolean",operator_not_multiple:'Operator "{1}" cannot accept multiple values'},invert:"Invert",NOT:"NOT"},c.defaults({lang_code:"en"}),c});
/*!
 * Datetimepicker for Bootstrap 3
 * version : 4.17.47
 * https://github.com/Eonasdan/bootstrap-datetimepicker/
 */
.bootstrap-datetimepicker-widget {
  list-style: none;
}
.bootstrap-datetimepicker-widget.dropdown-menu {
  display: block;
  margin: 2px 0;
  padding: 4px;
  width: 19em;
}
@media (min-width: 768px) {
  .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
    width: 38em;
  }
}
@media (min-width: 992px) {
  .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
    width: 38em;
  }
}
@media (min-width: 1200px) {
  .bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs {
    width: 38em;
  }
}
.bootstrap-datetimepicker-widget.dropdown-menu:before,
.bootstrap-datetimepicker-widget.dropdown-menu:after {
  content: '';
  display: inline-block;
  position: absolute;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before {
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #ccc;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  top: -7px;
  left: 7px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid white;
  top: -6px;
  left: 8px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.top:before {
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid #ccc;
  border-top-color: rgba(0, 0, 0, 0.2);
  bottom: -7px;
  left: 6px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.top:after {
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid white;
  bottom: -6px;
  left: 7px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before {
  left: auto;
  right: 6px;
}
.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after {
  left: auto;
  right: 7px;
}
.bootstrap-datetimepicker-widget .list-unstyled {
  margin: 0;
}
.bootstrap-datetimepicker-widget a[data-action] {
  padding: 6px 0;
}
.bootstrap-datetimepicker-widget a[data-action]:active {
  box-shadow: none;
}
.bootstrap-datetimepicker-widget .timepicker-hour,
.bootstrap-datetimepicker-widget .timepicker-minute,
.bootstrap-datetimepicker-widget .timepicker-second {
  width: 54px;
  font-weight: bold;
  font-size: 1.2em;
  margin: 0;
}
.bootstrap-datetimepicker-widget button[data-action] {
  padding: 6px;
}
.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Increment Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Increment Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Decrement Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Decrement Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Show Hours";
}
.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Show Minutes";
}
.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Toggle AM/PM";
}
.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Clear the picker";
}
.bootstrap-datetimepicker-widget .btn[data-action="today"]::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Set the date to today";
}
.bootstrap-datetimepicker-widget .picker-switch {
  text-align: center;
}
.bootstrap-datetimepicker-widget .picker-switch::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Toggle Date and Time Screens";
}
.bootstrap-datetimepicker-widget .picker-switch td {
  padding: 0;
  margin: 0;
  height: auto;
  width: auto;
  line-height: inherit;
}
.bootstrap-datetimepicker-widget .picker-switch td span {
  line-height: 2.5;
  height: 2.5em;
  width: 100%;
}
.bootstrap-datetimepicker-widget table {
  width: 100%;
  margin: 0;
}
.bootstrap-datetimepicker-widget table td,
.bootstrap-datetimepicker-widget table th {
  text-align: center;
  border-radius: 4px;
}
.bootstrap-datetimepicker-widget table th {
  height: 20px;
  line-height: 20px;
  width: 20px;
}
.bootstrap-datetimepicker-widget table th.picker-switch {
  width: 145px;
}
.bootstrap-datetimepicker-widget table th.disabled,
.bootstrap-datetimepicker-widget table th.disabled:hover {
  background: none;
  color: #777777;
  cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table th.prev::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Previous Month";
}
.bootstrap-datetimepicker-widget table th.next::after {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  content: "Next Month";
}
.bootstrap-datetimepicker-widget table thead tr:first-child th {
  cursor: pointer;
}
.bootstrap-datetimepicker-widget table thead tr:first-child th:hover {
  background: #eeeeee;
}
.bootstrap-datetimepicker-widget table td {
  height: 54px;
  line-height: 54px;
  width: 54px;
}
.bootstrap-datetimepicker-widget table td.cw {
  font-size: .8em;
  height: 20px;
  line-height: 20px;
  color: #777777;
}
.bootstrap-datetimepicker-widget table td.day {
  height: 20px;
  line-height: 20px;
  width: 20px;
}
.bootstrap-datetimepicker-widget table td.day:hover,
.bootstrap-datetimepicker-widget table td.hour:hover,
.bootstrap-datetimepicker-widget table td.minute:hover,
.bootstrap-datetimepicker-widget table td.second:hover {
  background: #eeeeee;
  cursor: pointer;
}
.bootstrap-datetimepicker-widget table td.old,
.bootstrap-datetimepicker-widget table td.new {
  color: #777777;
}
.bootstrap-datetimepicker-widget table td.today {
  position: relative;
}
.bootstrap-datetimepicker-widget table td.today:before {
  content: '';
  display: inline-block;
  border: solid transparent;
  border-width: 0 0 7px 7px;
  border-bottom-color: #337ab7;
  border-top-color: rgba(0, 0, 0, 0.2);
  position: absolute;
  bottom: 4px;
  right: 4px;
}
.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
  background-color: #337ab7;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td.active.today:before {
  border-bottom-color: #fff;
}
.bootstrap-datetimepicker-widget table td.disabled,
.bootstrap-datetimepicker-widget table td.disabled:hover {
  background: none;
  color: #777777;
  cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table td span {
  display: inline-block;
  width: 54px;
  height: 54px;
  line-height: 54px;
  margin: 2px 1.5px;
  cursor: pointer;
  border-radius: 4px;
}
.bootstrap-datetimepicker-widget table td span:hover {
  background: #eeeeee;
}
.bootstrap-datetimepicker-widget table td span.active {
  background-color: #337ab7;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.bootstrap-datetimepicker-widget table td span.old {
  color: #777777;
}
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover {
  background: none;
  color: #777777;
  cursor: not-allowed;
}
.bootstrap-datetimepicker-widget.usetwentyfour td.hour {
  height: 27px;
  line-height: 27px;
}
.bootstrap-datetimepicker-widget.wider {
  width: 21em;
}
.bootstrap-datetimepicker-widget .datepicker-decades .decade {
  line-height: 1.8em !important;
}
.input-group.date .input-group-addon {
  cursor: pointer;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
!function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);else if("object"==typeof exports)module.exports=a(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],r=["days","months","years","decades"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t",delete:46,46:"delete"},w={},x=function(){return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&""!==d.timeZone},y=function(a){var c;return c=void 0===a||null===a?b():b.isDate(a)||b.isMoment(a)?b(a):x()?b.tz(a,j,d.useStrict,d.timeZone):b(a,j,d.useStrict),x()&&c.tz(d.timeZone),c},z=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return i.indexOf("Y")!==-1;case"M":return i.indexOf("M")!==-1;case"d":return i.toLowerCase().indexOf("d")!==-1;case"h":case"H":return i.toLowerCase().indexOf("h")!==-1;case"m":return i.indexOf("m")!==-1;case"s":return i.indexOf("s")!==-1;default:return!1}},A=function(){return z("h")||z("m")||z("s")},B=function(){return z("y")||z("M")||z("d")},C=function(){var b=a("<thead>").append(a("<tr>").append(a("<th>").addClass("prev").attr("data-action","previous").append(a("<span>").addClass(d.icons.previous))).append(a("<th>").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("<th>").addClass("next").attr("data-action","next").append(a("<span>").addClass(d.icons.next)))),c=a("<tbody>").append(a("<tr>").append(a("<td>").attr("colspan",d.calendarWeeks?"8":"7")));return[a("<div>").addClass("datepicker-days").append(a("<table>").addClass("table-condensed").append(b).append(a("<tbody>"))),a("<div>").addClass("datepicker-months").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-years").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone())),a("<div>").addClass("datepicker-decades").append(a("<table>").addClass("table-condensed").append(b.clone()).append(c.clone()))]},D=function(){var b=a("<tr>"),c=a("<tr>"),e=a("<tr>");return z("h")&&(b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-hour").attr({"data-time-component":"hours",title:d.tooltips.pickHour}).attr("data-action","showHours"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(a("<span>").addClass(d.icons.down))))),z("m")&&(z("h")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:d.tooltips.pickMinute}).attr("data-action","showMinutes"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(a("<span>").addClass(d.icons.down))))),z("s")&&(z("m")&&(b.append(a("<td>").addClass("separator")),c.append(a("<td>").addClass("separator").html(":")),e.append(a("<td>").addClass("separator"))),b.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(a("<span>").addClass(d.icons.up)))),c.append(a("<td>").append(a("<span>").addClass("timepicker-second").attr({"data-time-component":"seconds",title:d.tooltips.pickSecond}).attr("data-action","showSeconds"))),e.append(a("<td>").append(a("<a>").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(a("<span>").addClass(d.icons.down))))),h||(b.append(a("<td>").addClass("separator")),c.append(a("<td>").append(a("<button>").addClass("btn btn-primary").attr({"data-action":"togglePeriod",tabindex:"-1",title:d.tooltips.togglePeriod}))),e.append(a("<td>").addClass("separator"))),a("<div>").addClass("timepicker-picker").append(a("<table>").addClass("table-condensed").append([b,c,e]))},E=function(){var b=a("<div>").addClass("timepicker-hours").append(a("<table>").addClass("table-condensed")),c=a("<div>").addClass("timepicker-minutes").append(a("<table>").addClass("table-condensed")),d=a("<div>").addClass("timepicker-seconds").append(a("<table>").addClass("table-condensed")),e=[D()];return z("h")&&e.push(b),z("m")&&e.push(c),z("s")&&e.push(d),e},F=function(){var b=[];return d.showTodayButton&&b.push(a("<td>").append(a("<a>").attr({"data-action":"today",title:d.tooltips.today}).append(a("<span>").addClass(d.icons.today)))),!d.sideBySide&&B()&&A()&&b.push(a("<td>").append(a("<a>").attr({"data-action":"togglePicker",title:d.tooltips.selectTime}).append(a("<span>").addClass(d.icons.time)))),d.showClear&&b.push(a("<td>").append(a("<a>").attr({"data-action":"clear",title:d.tooltips.clear}).append(a("<span>").addClass(d.icons.clear)))),d.showClose&&b.push(a("<td>").append(a("<a>").attr({"data-action":"close",title:d.tooltips.close}).append(a("<span>").addClass(d.icons.close)))),a("<table>").addClass("table-condensed").append(a("<tbody>").append(a("<tr>").append(b)))},G=function(){var b=a("<div>").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("<div>").addClass("datepicker").append(C()),e=a("<div>").addClass("timepicker").append(E()),f=a("<ul>").addClass("list-unstyled"),g=a("<li>").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(F());return d.inline&&b.removeClass("dropdown-menu"),h&&b.addClass("usetwentyfour"),z("s")&&!h&&b.addClass("wider"),d.sideBySide&&B()&&A()?(b.addClass("timepicker-sbs"),"top"===d.toolbarPlacement&&b.append(g),b.append(a("<div>").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===d.toolbarPlacement&&b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),B()&&f.append(a("<li>").addClass(d.collapse&&A()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),A()&&f.append(a("<li>").addClass(d.collapse&&B()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},H=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},I=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is("input"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if("auto"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()<f.top?"top":"bottom"),"auto"===h&&(h=b.width()<f.left+o.outerWidth()/2&&f.left+o.outerWidth()>a(window).width()?"right":"left"),"top"===g?o.addClass("top").removeClass("bottom"):o.addClass("bottom").removeClass("top"),"right"===h?o.addClass("pull-right"):o.removeClass("pull-right"),"static"===b.css("position")&&(b=b.parents().filter(function(){return"static"!==a(this).css("position")}).first()),0===b.length)throw new Error("datetimepicker component should be placed within a non-static positioned container");o.css({top:"top"===g?"auto":e.top+c.outerHeight(),bottom:"top"===g?b.outerHeight()-(b===c?0:e.top):"auto",left:"left"===h?b===c?0:e.left:"auto",right:"left"===h?"auto":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},J=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},K=function(a){"y"===a&&(a="YYYY"),J({type:"dp.update",change:a,viewDate:f.clone()})},L=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(".datepicker > div").hide().filter(".datepicker-"+q[k].clsName).show())},M=function(){var b=a("<tr>"),c=f.clone().startOf("w").startOf("d");for(d.calendarWeeks===!0&&b.append(a("<th>").addClass("cw").text("#"));c.isBefore(f.clone().endOf("w"));)b.append(a("<th>").addClass("dow").text(c.format("dd"))),c.add(1,"d");o.find(".datepicker-days thead").append(b)},N=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},O=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},P=function(a){return d.disabledHours[a.format("H")]===!0},Q=function(a){return d.enabledHours[a.format("H")]===!0},R=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&"d"===c&&N(b))return!1;if(d.enabledDates&&"d"===c&&!O(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&"d"===c&&d.daysOfWeekDisabled.indexOf(b.day())!==-1)return!1;if(d.disabledHours&&("h"===c||"m"===c||"s"===c)&&P(b))return!1;if(d.enabledHours&&("h"===c||"m"===c||"s"===c)&&!Q(b))return!1;if(d.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){if(b.isBetween(this[0],this[1]))return e=!0,!1}),e)return!1}return!0},S=function(){for(var b=[],c=f.clone().startOf("y").startOf("d");c.isSame(f,"y");)b.push(a("<span>").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");o.find(".datepicker-months td").empty().append(b)},T=function(){var b=o.find(".datepicker-months"),c=b.find("th"),g=b.find("tbody").find("span");c.eq(0).find("span").attr("title",d.tooltips.prevYear),c.eq(1).attr("title",d.tooltips.selectYear),c.eq(2).find("span").attr("title",d.tooltips.nextYear),b.find(".disabled").removeClass("disabled"),R(f.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(f.year()),R(f.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),g.removeClass("active"),e.isSame(f,"y")&&!m&&g.eq(e.month()).addClass("active"),g.each(function(b){R(f.clone().month(b),"M")||a(this).addClass("disabled")})},U=function(){var a=o.find(".datepicker-years"),b=a.find("th"),c=f.clone().subtract(5,"y"),g=f.clone().add(6,"y"),h="";for(b.eq(0).find("span").attr("title",d.tooltips.prevDecade),b.eq(1).attr("title",d.tooltips.selectDecade),b.eq(2).find("span").attr("title",d.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+g.year()),d.maxDate&&d.maxDate.isBefore(g,"y")&&b.eq(2).addClass("disabled");!c.isAfter(g,"y");)h+='<span data-action="selectYear" class="year'+(c.isSame(e,"y")&&!m?" active":"")+(R(c,"y")?"":" disabled")+'">'+c.year()+"</span>",c.add(1,"y");a.find("td").html(h)},V=function(){var a,c=o.find(".datepicker-decades"),g=c.find("th"),h=b({y:f.year()-f.year()%100-1}),i=h.clone().add(100,"y"),j=h.clone(),k=!1,l=!1,m="";for(g.eq(0).find("span").attr("title",d.tooltips.prevCentury),g.eq(2).find("span").attr("title",d.tooltips.nextCentury),c.find(".disabled").removeClass("disabled"),(h.isSame(b({y:1900}))||d.minDate&&d.minDate.isAfter(h,"y"))&&g.eq(0).addClass("disabled"),g.eq(1).text(h.year()+"-"+i.year()),(h.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(i,"y"))&&g.eq(2).addClass("disabled");!h.isAfter(i,"y");)a=h.year()+12,k=d.minDate&&d.minDate.isAfter(h,"y")&&d.minDate.year()<=a,l=d.maxDate&&d.maxDate.isAfter(h,"y")&&d.maxDate.year()<=a,m+='<span data-action="selectDecade" class="decade'+(e.isAfter(h)&&e.year()<=a?" active":"")+(R(h,"y")||k||l?"":" disabled")+'" data-selection="'+(h.year()+6)+'">'+(h.year()+1)+" - "+(h.year()+12)+"</span>",h.add(12,"y");m+="<span></span><span></span><span></span>",c.find("td").html(m),g.eq(1).text(j.year()+1+"-"+h.year())},W=function(){var b,c,g,h=o.find(".datepicker-days"),i=h.find("th"),j=[],k=[];if(B()){for(i.eq(0).find("span").attr("title",d.tooltips.prevMonth),i.eq(1).attr("title",d.tooltips.selectMonth),i.eq(2).find("span").attr("title",d.tooltips.nextMonth),h.find(".disabled").removeClass("disabled"),i.eq(1).text(f.format(d.dayViewHeaderFormat)),R(f.clone().subtract(1,"M"),"M")||i.eq(0).addClass("disabled"),R(f.clone().add(1,"M"),"M")||i.eq(2).addClass("disabled"),b=f.clone().startOf("M").startOf("w").startOf("d"),g=0;g<42;g++)0===b.weekday()&&(c=a("<tr>"),d.calendarWeeks&&c.append('<td class="cw">'+b.week()+"</td>"),j.push(c)),k=["day"],b.isBefore(f,"M")&&k.push("old"),b.isAfter(f,"M")&&k.push("new"),b.isSame(e,"d")&&!m&&k.push("active"),R(b,"d")||k.push("disabled"),b.isSame(y(),"d")&&k.push("today"),0!==b.day()&&6!==b.day()||k.push("weekend"),J({type:"dp.classify",date:b,classNames:k}),c.append('<td data-action="selectDay" data-day="'+b.format("L")+'" class="'+k.join(" ")+'">'+b.date()+"</td>"),b.add(1,"d");h.find("tbody").empty().append(j),T(),U(),V()}},X=function(){var b=o.find(".timepicker-hours table"),c=f.clone().startOf("d"),d=[],e=a("<tr>");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,"d")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectHour" class="hour'+(R(c,"h")?"":" disabled")+'">'+c.format(h?"HH":"hh")+"</td>"),c.add(1,"h");b.empty().append(d)},Y=function(){for(var b=o.find(".timepicker-minutes table"),c=f.clone().startOf("h"),e=[],g=a("<tr>"),h=1===d.stepping?5:d.stepping;f.isSame(c,"h");)c.minute()%(4*h)===0&&(g=a("<tr>"),e.push(g)),g.append('<td data-action="selectMinute" class="minute'+(R(c,"m")?"":" disabled")+'">'+c.format("mm")+"</td>"),c.add(h,"m");b.empty().append(e)},Z=function(){for(var b=o.find(".timepicker-seconds table"),c=f.clone().startOf("m"),d=[],e=a("<tr>");f.isSame(c,"m");)c.second()%20===0&&(e=a("<tr>"),d.push(e)),e.append('<td data-action="selectSecond" class="second'+(R(c,"s")?"":" disabled")+'">'+c.format("ss")+"</td>"),c.add(5,"s");b.empty().append(d)},$=function(){var a,b,c=o.find(".timepicker span[data-time-component]");h||(a=o.find(".timepicker [data-action=togglePeriod]"),b=e.clone().add(e.hours()>=12?-12:12,"h"),a.text(e.format("A")),R(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(e.format(h?"HH":"hh")),c.filter("[data-time-component=minutes]").text(e.format("mm")),c.filter("[data-time-component=seconds]").text(e.format("ss")),X(),Y(),Z()},_=function(){o&&(W(),$())},aa=function(a){var b=m?null:e;if(!a)return m=!0,g.val(""),c.data("date",""),J({type:"dp.change",date:!1,oldDate:b}),void _();if(a=a.clone().locale(d.locale),x()&&a.tz(d.timeZone),1!==d.stepping)for(a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping).seconds(0);d.minDate&&a.isBefore(d.minDate);)a.add(d.stepping,"minutes");R(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data("date",e.format(i)),m=!1,_(),J({type:"dp.change",date:e.clone(),oldDate:b})):(d.keepInvalid?J({type:"dp.change",date:a,oldDate:b}):g.val(m?"":e.format(i)),J({type:"dp.error",date:a,oldDate:b}))},ba=function(){var b=!1;return o?(o.find(".collapse").each(function(){var c=a(this).data("collapse");return!c||!c.transitioning||(b=!0,!1)}),b?l:(n&&n.hasClass("btn")&&n.toggleClass("active"),o.hide(),a(window).off("resize",I),o.off("click","[data-action]"),o.off("mousedown",!1),o.remove(),o=!1,J({type:"dp.hide",date:e.clone()}),g.blur(),f=e.clone(),l)):l},ca=function(){aa(null)},da=function(a){return void 0===d.parseInputDate?(!b.isMoment(a)||a instanceof Date)&&(a=y(a)):a=d.parseInputDate(a),a},ea={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),W(),K(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),W(),K(a)},pickerSwitch:function(){L(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));f.month(c),k===p?(aa(e.clone().year(f.year()).month(f.month())),d.inline||ba()):(L(-1),W()),K("M")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDecade:function(b){var c=parseInt(a(b.target).data("selection"),10)||0;f.year(c),k===p?(aa(e.clone().year(f.year())),d.inline||ba()):(L(-1),W()),K("YYYY")},selectDay:function(b){var c=f.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),aa(c.date(parseInt(a(b.target).text(),10))),A()||d.keepOpen||d.inline||ba()},incrementHours:function(){var a=e.clone().add(1,"h");R(a,"h")&&aa(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,"m");R(a,"m")&&aa(a)},incrementSeconds:function(){var a=e.clone().add(1,"s");R(a,"s")&&aa(a)},decrementHours:function(){var a=e.clone().subtract(1,"h");R(a,"h")&&aa(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,"m");R(a,"m")&&aa(a)},decrementSeconds:function(){var a=e.clone().subtract(1,"s");R(a,"s")&&aa(a)},togglePeriod:function(){aa(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest("ul"),g=f.find(".in"),h=f.find(".collapse:not(.in)");if(g&&g.length){if(c=g.data("collapse"),c&&c.transitioning)return;g.collapse?(g.collapse("hide"),h.collapse("show")):(g.removeClass("in"),h.addClass("in")),e.is("span")?e.toggleClass(d.icons.time+" "+d.icons.date):e.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){o.find(".timepicker > div:not(.timepicker-picker)").hide(),o.find(".timepicker .timepicker-picker").show()},showHours:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-hours").show()},showMinutes:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),aa(e.clone().hours(c)),ea.showPicker.call(l)},selectMinute:function(b){aa(e.clone().minutes(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},selectSecond:function(b){aa(e.clone().seconds(parseInt(a(b.target).text(),10))),ea.showPicker.call(l)},clear:ca,today:function(){var a=y();R(a,"d")&&aa(a)},close:ba},fa=function(b){return!a(b.currentTarget).is(".disabled")&&(ea[a(b.currentTarget).data("action")].apply(l,arguments),!1)},ga=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop("disabled")||!d.ignoreReadonly&&g.prop("readonly")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?aa(da(g.val().trim())):m&&d.useCurrent&&(d.inline||g.is("input")&&0===g.val().trim().length)&&(b=y(),"string"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),aa(b)),o=G(),M(),S(),o.find(".timepicker-hours").hide(),o.find(".timepicker-minutes").hide(),o.find(".timepicker-seconds").hide(),_(),L(),a(window).on("resize",I),o.on("click","[data-action]",fa),o.on("mousedown",!1),n&&n.hasClass("btn")&&n.toggleClass("active"),I(),o.show(),d.focusOnShow&&!g.is(":focus")&&g.focus(),J({type:"dp.show"}),l)},ha=function(){return o?ba():ga()},ia=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k="p";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&"function"==typeof d.keyBinds[b]&&(e=b.split(" "),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ja=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ka=function(b){var c=a(b.target).val().trim(),d=c?da(c):null;return aa(d),b.stopImmediatePropagation(),!1},la=function(){g.on({change:ka,blur:d.debug?"":ba,keydown:ia,keyup:ja,focus:d.allowInputToggle?ga:""}),c.is("input")?g.on({focus:ga}):n&&(n.on("click",ha),n.on("mousedown",!1))},ma=function(){g.off({change:ka,blur:blur,keydown:ia,keyup:ja,focus:d.allowInputToggle?ba:""}),c.is("input")?g.off({focus:ga}):n&&(n.off("click",ha),n.off("mousedown",!1))},na=function(b){var c={};return a.each(b,function(){var a=da(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),!!Object.keys(c).length&&c},oa=function(b){var c={};return a.each(b,function(){c[this]=!0}),!!Object.keys(c).length&&c},pa=function(){var a=d.format||"L LT";i=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,z("y")&&(p=2),z("M")&&(p=1),z("d")&&(p=0),k=Math.max(p,k),m||aa(e)};if(l.destroy=function(){ba(),ma(),c.removeData("DateTimePicker"),c.removeData("date")},l.toggle=ha,l.show=ga,l.hide=ba,l.disable=function(){return ba(),n&&n.hasClass("btn")&&n.addClass("disabled"),g.prop("disabled",!0),l},l.enable=function(){return n&&n.hasClass("btn")&&n.removeClass("disabled"),g.prop("disabled",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError("option "+a+" is not recognized!");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return aa(null===a?null:da(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a string or boolean:false parameter "+a);return d.format=a,i&&pa(),l},l.timeZone=function(a){if(0===arguments.length)return d.timeZone;if("string"!=typeof a)throw new TypeError("newZone() expects a string parameter");return d.timeZone=a,l},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,j&&pa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=na(b),d.enabledDates=!1,_(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=na(b),d.disabledDates=!1,_(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return d.daysOfWeekDisabled=!1,_(),l;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||b<0||isNaN(b)?a:(a.indexOf(b)===-1&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!R(e,"d");){if(e.add(1,"d"),31===b)throw"Tried 31 times to find a valid date";b++}aa(e)}return _(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&aa(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,"m")),_(),l},l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,_(),l;"string"==typeof a&&("now"!==a&&"moment"!==a||(a=y()));var b=da(a);if(!b.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&aa(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,"m")),_(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;"string"==typeof a&&(a="now"===a||"moment"===a?y():y(a));var b=da(a);if(!b.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!R(b))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=b,(d.defaultDate&&d.inline||""===g.val().trim())&&aa(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&pa(),o&&(ba(),ga()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||a<1)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&b.indexOf(a.toLowerCase())===-1)throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?l:(d.collapse=a,o&&(ba(),ga()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),o&&(ba(),ga()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return a.extend(d.tooltips,b),o&&(ba(),ga()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,o&&(ba(),ga()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(r.indexOf(a)===-1)throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,k=Math.max(r.indexOf(a),p),L(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(u.indexOf(a)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,o&&(ba(),ga()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),t.indexOf(b.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),s.indexOf(b.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return _(),l},l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,_(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,o&&(ba(),ga()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,o&&(ba(),ga()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,o&&(ba(),ga()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if("boolean"!=typeof a)throw new TypeError("focusOnShow() expects a boolean parameter");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,l},l.clear=function(){return ca(),l},l.keyBinds=function(a){return 0===arguments.length?d.keyBinds:(d.keyBinds=a,l)},l.getMoment=function(a){return y(a)},l.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if("boolean"!=typeof a)throw new TypeError("allowInputToggle() expects a boolean parameter");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter");
return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate;if("function"!=typeof a)throw new TypeError("parseInputDate() sholud be as function");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return d.disabledTimeIntervals=b,_(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(d.disabledHours=oa(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,_(),l;if(!(b instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(d.enabledHours=oa(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!R(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}aa(e)}return _(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!("string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return f=da(a),K(),l},c.is("input"))g=c;else if(g=c.find(d.datepickerInput),0===g.length)g=c.find("input");else if(!g.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(n=0===c.find(".datepickerbutton").length?c.find(".input-group-addon"):c.find(".datepickerbutton")),!d.inline&&!g.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return e=y(),f=e.clone(),a.extend(!0,d,H()),l.options(d),pa(),la(),g.prop("disabled")&&l.disable(),g.is("input")&&0!==g.val().trim().length?aa(da(g.val().trim())):d.defaultDate&&void 0===g.attr("placeholder")&&aa(d.defaultDate),d.inline&&ga(),l};return a.fn.datetimepicker=function(b){b=b||{};var d,e=Array.prototype.slice.call(arguments,1),f=!0,g=["destroy","hide","show","toggle"];if("object"==typeof b)return this.each(function(){var d,e=a(this);e.data("DateTimePicker")||(d=a.extend(!0,{},a.fn.datetimepicker.defaults,b),e.data("DateTimePicker",c(e,d)))});if("string"==typeof b)return this.each(function(){var c=a(this),g=c.data("DateTimePicker");if(!g)throw new Error('bootstrap-datetimepicker("'+b+'") method was called on an element that is not using DateTimePicker');d=g[b].apply(g,e),f=d===g}),f||a.inArray(b,g)>-1?this:d;throw new TypeError("Invalid arguments for DateTimePicker: "+b)},a.fn.datetimepicker.defaults={timeZone:"",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(7,"d")):this.date(b.clone().add(this.stepping(),"m"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(7,"d")):this.date(b.clone().subtract(this.stepping(),"m"))},"control up":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(1,"y")):this.date(b.clone().add(1,"h"))}},"control down":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(1,"y")):this.date(b.clone().subtract(1,"h"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"d"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"d"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a&&a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1},a.fn.datetimepicker});
{
  "_embedded": {
    "tagValues": [
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Weekdays",
        "inUse": true,
        "viewString": "Weekdays",
        "priority": null,
        "id": 334884
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Monday",
        "inUse": true,
        "viewString": "Monday",
        "priority": null,
        "id": 334885
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Tuesday",
        "inUse": true,
        "viewString": "Tuesday",
        "priority": null,
        "id": 334886
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Wednesday",
        "inUse": true,
        "viewString": "Wednesday",
        "priority": null,
        "id": 334887
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Thursday",
        "inUse": true,
        "viewString": "Thursday",
        "priority": null,
        "id": 334888
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Friday",
        "inUse": true,
        "viewString": "Friday",
        "priority": null,
        "id": 334889
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Saturday",
        "inUse": true,
        "viewString": "Saturday",
        "priority": null,
        "id": 334890
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Sunday",
        "inUse": true,
        "viewString": "Sunday",
        "priority": null,
        "id": 334891
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Shifts",
        "inUse": true,
        "viewString": "Shifts",
        "priority": null,
        "id": 334895
      },
      {
        "styles": [],
        "parents": [
          334895
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Noon",
        "inUse": true,
        "viewString": "Noon",
        "priority": null,
        "id": 334896
      },
      {
        "styles": [],
        "parents": [
          334895
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Day",
        "inUse": true,
        "viewString": "Day",
        "priority": null,
        "id": 334897
      },
      {
        "styles": [],
        "parents": [
          334895
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Afternoon",
        "inUse": true,
        "viewString": "Afternoon",
        "priority": null,
        "id": 334898
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Example",
        "inUse": true,
        "viewString": "Example",
        "priority": null,
        "id": 339310
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "level1",
        "inUse": true,
        "viewString": "level1",
        "priority": null,
        "id": 548965
      },
      {
        "styles": [],
        "parents": [
          548965
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "level2",
        "inUse": true,
        "viewString": "level2",
        "priority": null,
        "id": 548966
      },
      {
        "styles": [],
        "parents": [
          548966
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "level3",
        "inUse": true,
        "viewString": "level3",
        "priority": null,
        "id": 548967
      },
      {
        "styles": [],
        "parents": [
          548967
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "level4",
        "inUse": true,
        "viewString": "level4",
        "priority": null,
        "id": 549013
      },
      {
        "styles": [],
        "parents": [
          548967
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "level3.1",
        "inUse": true,
        "viewString": "level3.1",
        "priority": null,
        "id": 549014
      },
      {
        "styles": [],
        "parents": [
          549013
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "level5",
        "inUse": false,
        "viewString": "level5",
        "priority": null,
        "id": 549015
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQ",
        "inUse": true,
        "viewString": "Doozer HQ (#DoozerHQ)",
        "priority": null,
        "id": 665924
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Sentinel Visit",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "SentinelVisit",
        "inUse": true,
        "viewString": "Sentinel Visit (#SentinelVisit)",
        "priority": null,
        "id": 665925
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Robert's Phone",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Robert'sPhone",
        "inUse": false,
        "viewString": "Robert's Phone (#Robert'sPhone)",
        "priority": null,
        "id": 665926
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ edit",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQedit",
        "inUse": false,
        "viewString": "Doozer HQ edit (#DoozerHQedit)",
        "priority": null,
        "id": 668426
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Robert's iPad",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Robert'siPad",
        "inUse": false,
        "viewString": "Robert's iPad (#Robert'siPad)",
        "priority": null,
        "id": 668428
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Eng Door - Fire 8 tab",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "EngDoor-Fire8tab",
        "inUse": false,
        "viewString": "Eng Door - Fire 8 tab (#EngDoor-Fire8tab)",
        "priority": null,
        "id": 671340
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Emulators",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Emulators",
        "inUse": false,
        "viewString": "Emulators",
        "priority": null,
        "id": 672040
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Android Emulator",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "AndroidEmulator",
        "inUse": true,
        "viewString": "Android Emulator (#AndroidEmulator)",
        "priority": null,
        "id": 672041
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Front Door -Fire 10 tab",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FrontDoor-Fire10tab",
        "inUse": false,
        "viewString": "Front Door -Fire 10 tab (#FrontDoor-Fire10tab)",
        "priority": null,
        "id": 672269
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer Testing",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerTestingedit",
        "inUse": false,
        "viewString": "Doozer Testing (#DoozerTestingedit)",
        "priority": null,
        "id": 673633
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Fire 8",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Fire8",
        "inUse": true,
        "viewString": "Fire 8 (#Fire8)",
        "priority": null,
        "id": 673634
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer Testing 2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerTesting2",
        "inUse": false,
        "viewString": "Doozer Testing 2 (#DoozerTesting2)",
        "priority": null,
        "id": 674371
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ Demo",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQDemo",
        "inUse": false,
        "viewString": "Doozer HQ Demo (#DoozerHQDemo)",
        "priority": null,
        "id": 674452
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Fire 8 Tab",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Fire8Tab",
        "inUse": false,
        "viewString": "Fire 8 Tab (#Fire8Tab)",
        "priority": null,
        "id": 674453
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "test facility name",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "testfacilityname",
        "inUse": false,
        "viewString": "test facility name (#testfacilityname)",
        "priority": null,
        "id": 677587
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Front Door",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FrontDoor",
        "inUse": true,
        "viewString": "Front Door (#FrontDoor)",
        "priority": null,
        "id": 677590,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677590/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ Test",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQTest",
        "inUse": false,
        "viewString": "Doozer HQ Test (#DoozerHQTest)",
        "priority": null,
        "id": 677602,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677602/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Back Door",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "BackDoor",
        "inUse": false,
        "viewString": "Back Door (#BackDoor)",
        "priority": null,
        "id": 677752,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/677752/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ New Template",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQNewTemplate",
        "inUse": false,
        "viewString": "Doozer HQ New Template (#DoozerHQNewTemplate)",
        "priority": null,
        "id": 678118,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678118/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ 2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQ2",
        "inUse": false,
        "viewString": "Doozer HQ 2 (#DoozerHQ2)",
        "priority": null,
        "id": 678292,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/678292/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Long worded tags",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Wordy",
        "inUse": true,
        "viewString": "Long worded tags (#Wordy)",
        "priority": null,
        "id": 680910,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680910/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [
          680910
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "TestingHowManyWordsICanPutInATag",
        "inUse": true,
        "viewString": "TestingHowManyWordsICanPutInATag",
        "priority": null,
        "id": 680911,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680911/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [
          680910
        ],
        "longValue": null,
        "description": null,
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "ThisTagIsGoingToBeVeryLongAndHopefullyWrap",
        "inUse": true,
        "viewString": "ThisTagIsGoingToBeVeryLongAndHopefullyWrap",
        "priority": null,
        "id": 680915,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/680915/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ Clean2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQClean2",
        "inUse": false,
        "viewString": "Doozer HQ Clean2 (#DoozerHQClean2)",
        "priority": null,
        "id": 684945,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/684945/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Software Company",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "SoftwareCompany",
        "inUse": true,
        "viewString": "Software Company (#SoftwareCompany)",
        "priority": null,
        "id": 690942,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/690942/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Honda Test 1",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "HondaTest1",
        "inUse": true,
        "viewString": "Honda Test 1 (#HondaTest1)",
        "priority": null,
        "id": 693607,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693607/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "WELD 1",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "WELD1",
        "inUse": true,
        "viewString": "WELD 1 (#WELD1)",
        "priority": null,
        "id": 693608,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/693608/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Front Desk",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FrontDesk",
        "inUse": true,
        "viewString": "Front Desk (#FrontDesk)",
        "priority": null,
        "id": 699296,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/699296/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Fire 10",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Fire10",
        "inUse": false,
        "viewString": "Fire 10 (#Fire10)",
        "priority": null,
        "id": 702812,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/702812/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer Software",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerSoftware",
        "inUse": true,
        "viewString": "Doozer Software (#DoozerSoftware)",
        "priority": null,
        "id": 714706,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/714706/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Jay Test",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "JayTest",
        "inUse": false,
        "viewString": "Jay Test (#JayTest)",
        "priority": null,
        "id": 725026,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725026/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Front",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Front",
        "inUse": true,
        "viewString": "Front",
        "priority": null,
        "id": 725101,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/725101/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Fire 8 edit",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Fire8edit",
        "inUse": false,
        "viewString": "Fire 8 edit (#Fire8edit)",
        "priority": null,
        "id": 735267
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Jay Express 3",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "JayExpress3",
        "inUse": false,
        "viewString": "Jay Express 3 (#JayExpress3)",
        "priority": null,
        "id": 740499
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Fire 7",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Fire7",
        "inUse": true,
        "viewString": "Fire 7 (#Fire7)",
        "priority": null,
        "id": 740523
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Jay Kindle 8",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "JayKindle8",
        "inUse": false,
        "viewString": "Jay Kindle 8 (#JayKindle8)",
        "priority": null,
        "id": 740535
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Jay Galaxy S8+",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "JayGalaxyS8+",
        "inUse": false,
        "viewString": "Jay Galaxy S8+ (#JayGalaxyS8+)",
        "priority": null,
        "id": 740562,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/740562/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Jay Fire 7",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "JayFire7",
        "inUse": true,
        "viewString": "Jay Fire 7 (#JayFire7)",
        "priority": null,
        "id": 741999,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/741999/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "NoDataTestFac",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "NoDataTestFac",
        "inUse": false,
        "viewString": "NoDataTestFac",
        "priority": null,
        "id": 744417,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744417/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "noData",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "noData",
        "inUse": false,
        "viewString": "noData",
        "priority": null,
        "id": 744418,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744418/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "NoDataTestFac2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "NoDataTestFac2",
        "inUse": false,
        "viewString": "NoDataTestFac2",
        "priority": null,
        "id": 744429,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/744429/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "New Facility",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "NewFacility",
        "inUse": false,
        "viewString": "New Facility (#NewFacility)",
        "priority": null,
        "id": 749424,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749424/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "test",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "test",
        "inUse": false,
        "viewString": "test",
        "priority": null,
        "id": 749425,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/749425/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "FacilityNameTesting",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FacilityNameTesting",
        "inUse": false,
        "viewString": "FacilityNameTesting",
        "priority": null,
        "id": 763145,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763145/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "FacilityNameTesting2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FacilityNameTesting3afdsgdfg",
        "inUse": false,
        "viewString": "FacilityNameTesting2 (#FacilityNameTesting3afdsgdfg)",
        "priority": null,
        "id": 763163,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/763163/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "FacilityNameTesting2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FacilityNameTesting2",
        "inUse": false,
        "viewString": "FacilityNameTesting2",
        "priority": null,
        "id": 764402,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764402/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Facility B",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "FacilityB",
        "inUse": false,
        "viewString": "Facility B (#FacilityB)",
        "priority": null,
        "id": 764426,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/764426/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Doozer HQ Clean3",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DoozerHQClean3",
        "inUse": false,
        "viewString": "Doozer HQ Clean3 (#DoozerHQClean3)",
        "priority": null,
        "id": 766319,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766319/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "AFacRenameTest 2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "AFacRenameTest2",
        "inUse": true,
        "viewString": "AFacRenameTest 2 (#AFacRenameTest2)",
        "priority": null,
        "id": 766370,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766370/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "AFacRenameTest New Facility",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "AFacRenameTestNewFacility",
        "inUse": false,
        "viewString": "AFacRenameTest New Facility (#AFacRenameTestNewFacility)",
        "priority": null,
        "id": 766373,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/766373/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "OldTest10",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "OldTest10",
        "inUse": true,
        "viewString": "OldTest10",
        "priority": null,
        "id": 776102,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/776102/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Globex Corporation",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "GlobexCorporation",
        "inUse": true,
        "viewString": "Globex Corporation (#GlobexCorporation)",
        "priority": null,
        "id": 804279,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/804279/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Globex 2",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Globex2",
        "inUse": true,
        "viewString": "Globex 2 (#Globex2)",
        "priority": null,
        "id": 809350,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/809350/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Globex 3",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Globex3",
        "inUse": true,
        "viewString": "Globex 3 (#Globex3)",
        "priority": null,
        "id": 810262,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810262/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Fire",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Fire",
        "inUse": true,
        "viewString": "Fire",
        "priority": null,
        "id": 810263,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/810263/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Registered Testing",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "RegisteredTesting",
        "inUse": true,
        "viewString": "Registered Testing (#RegisteredTesting)",
        "priority": null,
        "id": 832675,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832675/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Frie10",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Frie10",
        "inUse": true,
        "viewString": "Frie10",
        "priority": null,
        "id": 832676,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/832676/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Sales Door",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "SalesDoor",
        "inUse": true,
        "viewString": "Sales Door (#SalesDoor)",
        "priority": null,
        "id": 835248,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835248/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Dev Door",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DevDoor",
        "inUse": true,
        "viewString": "Dev Door (#DevDoor)",
        "priority": null,
        "id": 835255,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/835255/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Insignia",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Insignia",
        "inUse": true,
        "viewString": "Insignia",
        "priority": null,
        "id": 836156,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/836156/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Incremental Sync Testing",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "IncrementalSyncTesting",
        "inUse": true,
        "viewString": "Incremental Sync Testing (#IncrementalSyncTesting)",
        "priority": null,
        "id": 843408,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/843408/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Ted Pixel",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "TedPixel",
        "inUse": false,
        "viewString": "Ted Pixel (#TedPixel)",
        "priority": null,
        "id": 849894,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/849894/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Ted Fire 10 Testing",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "TedFire10Testing",
        "inUse": true,
        "viewString": "Ted Fire 10 Testing (#TedFire10Testing)",
        "priority": null,
        "id": 853336,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853336/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Aperture Science",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "ApertureScience",
        "inUse": true,
        "viewString": "Aperture Science (#ApertureScience)",
        "priority": null,
        "id": 853458,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853458/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Reception",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "Reception",
        "inUse": true,
        "viewString": "Reception",
        "priority": null,
        "id": 853459,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/853459/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Ted Fire 7 Testing",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "TedFire7Testing",
        "inUse": true,
        "viewString": "Ted Fire 7 Testing (#TedFire7Testing)",
        "priority": null,
        "id": 860617,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/860617/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Developer Wing Door",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "DeveloperWingDoor",
        "inUse": true,
        "viewString": "Developer Wing Door (#DeveloperWingDoor)",
        "priority": null,
        "id": 861061,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/861061/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Insignia Testing",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "InsigniaTesting",
        "inUse": true,
        "viewString": "Insignia Testing (#InsigniaTesting)",
        "priority": null,
        "id": 864297,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/864297/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "ACME Inc",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "ACMEInc",
        "inUse": true,
        "viewString": "ACME Inc (#ACMEInc)",
        "priority": null,
        "id": 865461,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865461/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "SoftwareCo",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "SoftwareCo",
        "inUse": true,
        "viewString": "SoftwareCo",
        "priority": null,
        "id": 865509,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/865509/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "test access point name",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "testaccesspointname",
        "inUse": false,
        "viewString": "test access point name (#testaccesspointname)",
        "priority": null,
        "id": 870688,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/870688/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Robert iPad Mini",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "RobertiPadMini",
        "inUse": true,
        "viewString": "Robert iPad Mini (#RobertiPadMini)",
        "priority": null,
        "id": 873459,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/873459/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [
          334884
        ],
        "longValue": null,
        "description": "Very long Day of the week name that is going to wrap a lot",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "verylongdayoftheweeknamethatisgoingtowrapalot",
        "inUse": true,
        "viewString": "Very long Day of the week name that is going to wrap a lot (#verylongdayoftheweeknamethatisgoingtowrapalot)",
        "priority": null,
        "id": 914711,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/914711/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "changing tags",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "changingtags",
        "inUse": false,
        "viewString": "changing tags (#changingtags)",
        "priority": null,
        "id": 922986,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/922986/updatedBy"
          }
        }
      },
      {
        "styles": [],
        "parents": [],
        "longValue": null,
        "description": "Southern Company",
        "dollarValue": null,
        "dateValue": null,
        "stringValue": "SouthernCompany",
        "inUse": true,
        "viewString": "Southern Company (#SouthernCompany)",
        "priority": null,
        "id": 948280,
        "_links": {
          "self": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280"
          },
          "tagValue": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280{?projection}",
            "templated": true
          },
          "log": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280/log"
          },
          "parents": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280/parents"
          },
          "styles": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280/styles"
          },
          "createdBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280/createdBy"
          },
          "updatedBy": {
            "href": "https://logbook-test.doozer.com/api/tagValues/948280/updatedBy"
          }
        }
      }
    ]
  },
  "_links": {
    "self": {
      "href": "https://logbook-test.doozer.com/api/tagValues"
    },
    "profile": {
      "href": "https://logbook-test.doozer.com/api/profile/tagValues"
    }
  },
  "page": {
    "size": 1000,
    "totalElements": 94,
    "totalPages": 1,
    "number": 0
  }
}
/**
 * selectize.bootstrap3.css (v0.12.6) - Bootstrap 3 Theme
 * Copyright (c) 2013–2015 Brian Reavis & contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 * ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 *
 * @author Brian Reavis <brian@thirdroute.com>
 */
.selectize-control.plugin-drag_drop.multi > .selectize-input > div.ui-sortable-placeholder {
  visibility: visible !important;
  background: #f2f2f2 !important;
  background: rgba(0, 0, 0, 0.06) !important;
  border: 0 none !important;
  -webkit-box-shadow: inset 0 0 12px 4px #fff;
  box-shadow: inset 0 0 12px 4px #fff;
}
.selectize-control.plugin-drag_drop .ui-sortable-placeholder::after {
  content: '!';
  visibility: hidden;
}
.selectize-control.plugin-drag_drop .ui-sortable-helper {
  -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.selectize-dropdown-header {
  position: relative;
  padding: 3px 12px;
  border-bottom: 1px solid #d0d0d0;
  background: #f8f8f8;
  -webkit-border-radius: 4px 4px 0 0;
  -moz-border-radius: 4px 4px 0 0;
  border-radius: 4px 4px 0 0;
}
.selectize-dropdown-header-close {
  position: absolute;
  right: 12px;
  top: 50%;
  color: #333333;
  opacity: 0.4;
  margin-top: -12px;
  line-height: 20px;
  font-size: 20px !important;
}
.selectize-dropdown-header-close:hover {
  color: #000000;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup {
  border-right: 1px solid #f2f2f2;
  border-top: 0 none;
  float: left;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:last-child {
  border-right: 0 none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup:before {
  display: none;
}
.selectize-dropdown.plugin-optgroup_columns .optgroup-header {
  border-top: 0 none;
}
.selectize-control.plugin-remove_button [data-value] {
  position: relative;
  padding-right: 24px !important;
}
.selectize-control.plugin-remove_button [data-value] .remove {
  z-index: 1;
  /* fixes ie bug (see #392) */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 17px;
  text-align: center;
  font-weight: bold;
  font-size: 12px;
  color: inherit;
  text-decoration: none;
  vertical-align: middle;
  display: inline-block;
  padding: 1px 0 0 0;
  border-left: 1px solid rgba(0, 0, 0, 0);
  -webkit-border-radius: 0 2px 2px 0;
  -moz-border-radius: 0 2px 2px 0;
  border-radius: 0 2px 2px 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
.selectize-control.plugin-remove_button [data-value] .remove:hover {
  background: rgba(0, 0, 0, 0.05);
}
.selectize-control.plugin-remove_button [data-value].active .remove {
  border-left-color: rgba(0, 0, 0, 0);
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove:hover {
  background: none;
}
.selectize-control.plugin-remove_button .disabled [data-value] .remove {
  border-left-color: rgba(77, 77, 77, 0);
}
.selectize-control.plugin-remove_button .remove-single {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 23px;
}
.selectize-control {
  position: relative;
}
.selectize-dropdown,
.selectize-input,
.selectize-input input {
  color: #333333;
  font-family: inherit;
  font-size: inherit;
  line-height: 20px;
  -webkit-font-smoothing: inherit;
}
.selectize-input,
.selectize-control.single .selectize-input.input-active {
  background: #fff;
  cursor: text;
  display: inline-block;
}
.selectize-input {
  border: 1px solid #ccc;
  padding: 6px 12px;
  display: inline-block;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}
.selectize-control.multi .selectize-input.has-items {
  padding: 5px 12px 2px;
}
.selectize-input.full {
  background-color: #fff;
}
.selectize-input.disabled,
.selectize-input.disabled * {
  cursor: default !important;
}
.selectize-input.focus {
  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.selectize-input.dropdown-active {
  -webkit-border-radius: 4px 4px 0 0;
  -moz-border-radius: 4px 4px 0 0;
  border-radius: 4px 4px 0 0;
}
.selectize-input > * {
  vertical-align: baseline;
  display: -moz-inline-stack;
  display: inline-block;
  zoom: 1;
  *display: inline;
}
.selectize-control.multi .selectize-input > div {
  cursor: pointer;
  margin: 0 3px 3px 0;
  padding: 1px 3px;
  background: #efefef;
  color: #333333;
  border: 0 solid rgba(0, 0, 0, 0);
}
.selectize-control.multi .selectize-input > div.active {
  background: #428bca;
  color: #fff;
  border: 0 solid rgba(0, 0, 0, 0);
}
.selectize-control.multi .selectize-input.disabled > div,
.selectize-control.multi .selectize-input.disabled > div.active {
  color: #808080;
  background: #ffffff;
  border: 0 solid rgba(77, 77, 77, 0);
}
.selectize-input > input {
  display: inline-block !important;
  padding: 0 !important;
  min-height: 0 !important;
  max-height: none !important;
  max-width: 100% !important;
  margin: 0 !important;
  text-indent: 0 !important;
  border: 0 none !important;
  background: none !important;
  line-height: inherit !important;
  -webkit-user-select: auto !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
}
.selectize-input > input::-ms-clear {
  display: none;
}
.selectize-input > input:focus {
  outline: none !important;
}
.selectize-input::after {
  content: ' ';
  display: block;
  clear: left;
}
.selectize-input.dropdown-active::before {
  content: ' ';
  display: block;
  position: absolute;
  background: #ffffff;
  height: 1px;
  bottom: 0;
  left: 0;
  right: 0;
}
.selectize-dropdown {
  position: absolute;
  z-index: 10;
  border: 1px solid #d0d0d0;
  background: #fff;
  margin: -1px 0 0 0;
  border-top: 0 none;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  -webkit-border-radius: 0 0 4px 4px;
  -moz-border-radius: 0 0 4px 4px;
  border-radius: 0 0 4px 4px;
}
.selectize-dropdown [data-selectable] {
  cursor: pointer;
  overflow: hidden;
}
.selectize-dropdown [data-selectable] .highlight {
  background: rgba(255, 237, 40, 0.4);
  -webkit-border-radius: 1px;
  -moz-border-radius: 1px;
  border-radius: 1px;
}
.selectize-dropdown .option,
.selectize-dropdown .optgroup-header {
  padding: 3px 12px;
}
.selectize-dropdown .option,
.selectize-dropdown [data-disabled],
.selectize-dropdown [data-disabled] [data-selectable].option {
  cursor: inherit;
  opacity: 0.5;
}
.selectize-dropdown [data-selectable].option {
  opacity: 1;
}
.selectize-dropdown .optgroup:first-child .optgroup-header {
  border-top: 0 none;
}
.selectize-dropdown .optgroup-header {
  color: #777777;
  background: #fff;
  cursor: default;
}
.selectize-dropdown .active {
  background-color: #f5f5f5;
  color: #262626;
}
.selectize-dropdown .active.create {
  color: #262626;
}
.selectize-dropdown .create {
  color: rgba(51, 51, 51, 0.5);
}
.selectize-dropdown-content {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 200px;
  -webkit-overflow-scrolling: touch;
}
.selectize-control.single .selectize-input,
.selectize-control.single .selectize-input input {
  cursor: pointer;
}
.selectize-control.single .selectize-input.input-active,
.selectize-control.single .selectize-input.input-active input {
  cursor: text;
}
.selectize-control.single .selectize-input:after {
  content: ' ';
  display: block;
  position: absolute;
  top: 50%;
  right: 17px;
  margin-top: -3px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 5px 0 5px;
  border-color: #333333 transparent transparent transparent;
}
.selectize-control.single .selectize-input.dropdown-active:after {
  margin-top: -4px;
  border-width: 0 5px 5px 5px;
  border-color: transparent transparent #333333 transparent;
}
.selectize-control.rtl.single .selectize-input:after {
  left: 17px;
  right: auto;
}
.selectize-control.rtl .selectize-input > input {
  margin: 0 4px 0 -2px !important;
}
.selectize-control .selectize-input.disabled {
  opacity: 0.5;
  background-color: #fff;
}
.selectize-dropdown,
.selectize-dropdown.form-control {
  height: auto;
  padding: 0;
  margin: 2px 0 0 0;
  z-index: 1000;
  background: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.15);
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.selectize-dropdown .optgroup-header {
  font-size: 12px;
  line-height: 1.42857143;
}
.selectize-dropdown .optgroup:first-child:before {
  display: none;
}
.selectize-dropdown .optgroup:before {
  content: ' ';
  display: block;
  height: 1px;
  margin: 9px 0;
  overflow: hidden;
  background-color: #e5e5e5;
  margin-left: -12px;
  margin-right: -12px;
}
.selectize-dropdown-content {
  padding: 5px 0;
}
.selectize-dropdown-header {
  padding: 6px 12px;
}
.selectize-input {
  min-height: 34px;
}
.selectize-input.dropdown-active {
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
  border-radius: 4px;
}
.selectize-input.dropdown-active::before {
  display: none;
}
.selectize-input.focus {
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.has-error .selectize-input {
  border-color: #a94442;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .selectize-input:focus {
  border-color: #843534;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}
.selectize-control.multi .selectize-input.has-items {
  padding-left: 9px;
  padding-right: 9px;
}
.selectize-control.multi .selectize-input > div {
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
}
.form-control.selectize-control {
  padding: 0;
  height: auto;
  border: none;
  background: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-border-radius: 0;
  -moz-border-radius: 0;
  border-radius: 0;
}
/**
 * sifter.js
 * Copyright (c) 2013 Brian Reavis & contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 * ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 *
 * @author Brian Reavis <brian@thirdroute.com>
 */

(function(root, factory) {
	if (typeof define === 'function' && define.amd) {
		define('sifter', factory);
	} else if (typeof exports === 'object') {
		module.exports = factory();
	} else {
		root.Sifter = factory();
	}
}(this, function() {

	/**
	 * Textually searches arrays and hashes of objects
	 * by property (or multiple properties). Designed
	 * specifically for autocomplete.
	 *
	 * @constructor
	 * @param {array|object} items
	 * @param {object} items
	 */
	var Sifter = function(items, settings) {
		this.items = items;
		this.settings = settings || {diacritics: true};
	};

	/**
	 * Splits a search string into an array of individual
	 * regexps to be used to match results.
	 *
	 * @param {string} query
	 * @returns {array}
	 */
	Sifter.prototype.tokenize = function(query) {
		query = trim(String(query || '').toLowerCase());
		if (!query || !query.length) return [];

		var i, n, regex, letter;
		var tokens = [];
		var words = query.split(/ +/);

		for (i = 0, n = words.length; i < n; i++) {
			regex = escape_regex(words[i]);
			if (this.settings.diacritics) {
				for (letter in DIACRITICS) {
					if (DIACRITICS.hasOwnProperty(letter)) {
						regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]);
					}
				}
			}
			tokens.push({
				string : words[i],
				regex  : new RegExp(regex, 'i')
			});
		}

		return tokens;
	};

	/**
	 * Iterates over arrays and hashes.
	 *
	 * ```
	 * this.iterator(this.items, function(item, id) {
	 *    // invoked for each item
	 * });
	 * ```
	 *
	 * @param {array|object} object
	 */
	Sifter.prototype.iterator = function(object, callback) {
		var iterator;
		if (is_array(object)) {
			iterator = Array.prototype.forEach || function(callback) {
				for (var i = 0, n = this.length; i < n; i++) {
					callback(this[i], i, this);
				}
			};
		} else {
			iterator = function(callback) {
				for (var key in this) {
					if (this.hasOwnProperty(key)) {
						callback(this[key], key, this);
					}
				}
			};
		}

		iterator.apply(object, [callback]);
	};

	/**
	 * Returns a function to be used to score individual results.
	 *
	 * Good matches will have a higher score than poor matches.
	 * If an item is not a match, 0 will be returned by the function.
	 *
	 * @param {object|string} search
	 * @param {object} options (optional)
	 * @returns {function}
	 */
	Sifter.prototype.getScoreFunction = function(search, options) {
		var self, fields, tokens, token_count, nesting;

		self        = this;
		search      = self.prepareSearch(search, options);
		tokens      = search.tokens;
		fields      = search.options.fields;
		token_count = tokens.length;
		nesting     = search.options.nesting;

		/**
		 * Calculates how close of a match the
		 * given value is against a search token.
		 *
		 * @param {mixed} value
		 * @param {object} token
		 * @return {number}
		 */
		var scoreValue = function(value, token) {
			var score, pos;

			if (!value) return 0;
			value = String(value || '');
			pos = value.search(token.regex);
			if (pos === -1) return 0;
			score = token.string.length / value.length;
			if (pos === 0) score += 0.5;
			return score;
		};

		/**
		 * Calculates the score of an object
		 * against the search query.
		 *
		 * @param {object} token
		 * @param {object} data
		 * @return {number}
		 */
		var scoreObject = (function() {
			var field_count = fields.length;
			if (!field_count) {
				return function() { return 0; };
			}
			if (field_count === 1) {
				return function(token, data) {
					return scoreValue(getattr(data, fields[0], nesting), token);
				};
			}
			return function(token, data) {
				for (var i = 0, sum = 0; i < field_count; i++) {
					sum += scoreValue(getattr(data, fields[i], nesting), token);
				}
				return sum / field_count;
			};
		})();

		if (!token_count) {
			return function() { return 0; };
		}
		if (token_count === 1) {
			return function(data) {
				return scoreObject(tokens[0], data);
			};
		}

		if (search.options.conjunction === 'and') {
			return function(data) {
				var score;
				for (var i = 0, sum = 0; i < token_count; i++) {
					score = scoreObject(tokens[i], data);
					if (score <= 0) return 0;
					sum += score;
				}
				return sum / token_count;
			};
		} else {
			return function(data) {
				for (var i = 0, sum = 0; i < token_count; i++) {
					sum += scoreObject(tokens[i], data);
				}
				return sum / token_count;
			};
		}
	};

	/**
	 * Returns a function that can be used to compare two
	 * results, for sorting purposes. If no sorting should
	 * be performed, `null` will be returned.
	 *
	 * @param {string|object} search
	 * @param {object} options
	 * @return function(a,b)
	 */
	Sifter.prototype.getSortFunction = function(search, options) {
		var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort;

		self   = this;
		search = self.prepareSearch(search, options);
		sort   = (!search.query && options.sort_empty) || options.sort;

		/**
		 * Fetches the specified sort field value
		 * from a search result item.
		 *
		 * @param  {string} name
		 * @param  {object} result
		 * @return {mixed}
		 */
		get_field = function(name, result) {
			if (name === '$score') return result.score;
			return getattr(self.items[result.id], name, options.nesting);
		};

		// parse options
		fields = [];
		if (sort) {
			for (i = 0, n = sort.length; i < n; i++) {
				if (search.query || sort[i].field !== '$score') {
					fields.push(sort[i]);
				}
			}
		}

		// the "$score" field is implied to be the primary
		// sort field, unless it's manually specified
		if (search.query) {
			implicit_score = true;
			for (i = 0, n = fields.length; i < n; i++) {
				if (fields[i].field === '$score') {
					implicit_score = false;
					break;
				}
			}
			if (implicit_score) {
				fields.unshift({field: '$score', direction: 'desc'});
			}
		} else {
			for (i = 0, n = fields.length; i < n; i++) {
				if (fields[i].field === '$score') {
					fields.splice(i, 1);
					break;
				}
			}
		}

		multipliers = [];
		for (i = 0, n = fields.length; i < n; i++) {
			multipliers.push(fields[i].direction === 'desc' ? -1 : 1);
		}

		// build function
		fields_count = fields.length;
		if (!fields_count) {
			return null;
		} else if (fields_count === 1) {
			field = fields[0].field;
			multiplier = multipliers[0];
			return function(a, b) {
				return multiplier * cmp(
					get_field(field, a),
					get_field(field, b)
				);
			};
		} else {
			return function(a, b) {
				var i, result, a_value, b_value, field;
				for (i = 0; i < fields_count; i++) {
					field = fields[i].field;
					result = multipliers[i] * cmp(
						get_field(field, a),
						get_field(field, b)
					);
					if (result) return result;
				}
				return 0;
			};
		}
	};

	/**
	 * Parses a search query and returns an object
	 * with tokens and fields ready to be populated
	 * with results.
	 *
	 * @param {string} query
	 * @param {object} options
	 * @returns {object}
	 */
	Sifter.prototype.prepareSearch = function(query, options) {
		if (typeof query === 'object') return query;

		options = extend({}, options);

		var option_fields     = options.fields;
		var option_sort       = options.sort;
		var option_sort_empty = options.sort_empty;

		if (option_fields && !is_array(option_fields)) options.fields = [option_fields];
		if (option_sort && !is_array(option_sort)) options.sort = [option_sort];
		if (option_sort_empty && !is_array(option_sort_empty)) options.sort_empty = [option_sort_empty];

		return {
			options : options,
			query   : String(query || '').toLowerCase(),
			tokens  : this.tokenize(query),
			total   : 0,
			items   : []
		};
	};

	/**
	 * Searches through all items and returns a sorted array of matches.
	 *
	 * The `options` parameter can contain:
	 *
	 *   - fields {string|array}
	 *   - sort {array}
	 *   - score {function}
	 *   - filter {bool}
	 *   - limit {integer}
	 *
	 * Returns an object containing:
	 *
	 *   - options {object}
	 *   - query {string}
	 *   - tokens {array}
	 *   - total {int}
	 *   - items {array}
	 *
	 * @param {string} query
	 * @param {object} options
	 * @returns {object}
	 */
	Sifter.prototype.search = function(query, options) {
		var self = this, value, score, search, calculateScore;
		var fn_sort;
		var fn_score;

		search  = this.prepareSearch(query, options);
		options = search.options;
		query   = search.query;

		// generate result scoring function
		fn_score = options.score || self.getScoreFunction(search);

		// perform search and sort
		if (query.length) {
			self.iterator(self.items, function(item, id) {
				score = fn_score(item);
				if (options.filter === false || score > 0) {
					search.items.push({'score': score, 'id': id});
				}
			});
		} else {
			self.iterator(self.items, function(item, id) {
				search.items.push({'score': 1, 'id': id});
			});
		}

		fn_sort = self.getSortFunction(search, options);
		if (fn_sort) search.items.sort(fn_sort);

		// apply limits
		search.total = search.items.length;
		if (typeof options.limit === 'number') {
			search.items = search.items.slice(0, options.limit);
		}

		return search;
	};

	// utilities
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	var cmp = function(a, b) {
		if (typeof a === 'number' && typeof b === 'number') {
			return a > b ? 1 : (a < b ? -1 : 0);
		}
		a = asciifold(String(a || ''));
		b = asciifold(String(b || ''));
		if (a > b) return 1;
		if (b > a) return -1;
		return 0;
	};

	var extend = function(a, b) {
		var i, n, k, object;
		for (i = 1, n = arguments.length; i < n; i++) {
			object = arguments[i];
			if (!object) continue;
			for (k in object) {
				if (object.hasOwnProperty(k)) {
					a[k] = object[k];
				}
			}
		}
		return a;
	};

	/**
	 * A property getter resolving dot-notation
	 * @param  {Object}  obj     The root object to fetch property on
	 * @param  {String}  name    The optionally dotted property name to fetch
	 * @param  {Boolean} nesting Handle nesting or not
	 * @return {Object}          The resolved property value
	 */
	var getattr = function(obj, name, nesting) {
	    if (!obj || !name) return;
	    if (!nesting) return obj[name];
	    var names = name.split(".");
	    while(names.length && (obj = obj[names.shift()]));
	    return obj;
	};

	var trim = function(str) {
		return (str + '').replace(/^\s+|\s+$|/g, '');
	};

	var escape_regex = function(str) {
		return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
	};

	var is_array = Array.isArray || (typeof $ !== 'undefined' && $.isArray) || function(object) {
		return Object.prototype.toString.call(object) === '[object Array]';
	};

	var DIACRITICS = {
		'a': '[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]',
		'b': '[b␢βΒB฿𐌁ᛒ]',
		'c': '[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄCc]',
		'd': '[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅDdð]',
		'e': '[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇEeɘǝƏƐε]',
		'f': '[fƑƒḞḟ]',
		'g': '[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]',
		'h': '[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]',
		'i': '[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪIi]',
		'j': '[jȷĴĵɈɉʝɟʲ]',
		'k': '[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]',
		'l': '[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟLl]',
		'n': '[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴNnŊŋ]',
		'o': '[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]',
		'p': '[pṔṕṖṗⱣᵽƤƥᵱ]',
		'q': '[qꝖꝗʠɊɋꝘꝙq̃]',
		'r': '[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]',
		's': '[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]',
		't': '[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]',
		'u': '[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]',
		'v': '[vṼṽṾṿƲʋꝞꝟⱱʋ]',
		'w': '[wẂẃẀẁŴŵẄẅẆẇẈẉ]',
		'x': '[xẌẍẊẋχ]',
		'y': '[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]',
		'z': '[zŹźẐẑŽžŻżẒẓẔẕƵƶ]'
	};

	var asciifold = (function() {
		var i, n, k, chunk;
		var foreignletters = '';
		var lookup = {};
		for (k in DIACRITICS) {
			if (DIACRITICS.hasOwnProperty(k)) {
				chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1);
				foreignletters += chunk;
				for (i = 0, n = chunk.length; i < n; i++) {
					lookup[chunk.charAt(i)] = k;
				}
			}
		}
		var regexp = new RegExp('[' +  foreignletters + ']', 'g');
		return function(str) {
			return str.replace(regexp, function(foreignletter) {
				return lookup[foreignletter];
			}).toLowerCase();
		};
	})();


	// export
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

	return Sifter;
}));



/**
 * microplugin.js
 * Copyright (c) 2013 Brian Reavis & contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 * ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 *
 * @author Brian Reavis <brian@thirdroute.com>
 */

(function(root, factory) {
	if (typeof define === 'function' && define.amd) {
		define('microplugin', factory);
	} else if (typeof exports === 'object') {
		module.exports = factory();
	} else {
		root.MicroPlugin = factory();
	}
}(this, function() {
	var MicroPlugin = {};

	MicroPlugin.mixin = function(Interface) {
		Interface.plugins = {};

		/**
		 * Initializes the listed plugins (with options).
		 * Acceptable formats:
		 *
		 * List (without options):
		 *   ['a', 'b', 'c']
		 *
		 * List (with options):
		 *   [{'name': 'a', options: {}}, {'name': 'b', options: {}}]
		 *
		 * Hash (with options):
		 *   {'a': { ... }, 'b': { ... }, 'c': { ... }}
		 *
		 * @param {mixed} plugins
		 */
		Interface.prototype.initializePlugins = function(plugins) {
			var i, n, key;
			var self  = this;
			var queue = [];

			self.plugins = {
				names     : [],
				settings  : {},
				requested : {},
				loaded    : {}
			};

			if (utils.isArray(plugins)) {
				for (i = 0, n = plugins.length; i < n; i++) {
					if (typeof plugins[i] === 'string') {
						queue.push(plugins[i]);
					} else {
						self.plugins.settings[plugins[i].name] = plugins[i].options;
						queue.push(plugins[i].name);
					}
				}
			} else if (plugins) {
				for (key in plugins) {
					if (plugins.hasOwnProperty(key)) {
						self.plugins.settings[key] = plugins[key];
						queue.push(key);
					}
				}
			}

			while (queue.length) {
				self.require(queue.shift());
			}
		};

		Interface.prototype.loadPlugin = function(name) {
			var self    = this;
			var plugins = self.plugins;
			var plugin  = Interface.plugins[name];

			if (!Interface.plugins.hasOwnProperty(name)) {
				throw new Error('Unable to find "' +  name + '" plugin');
			}

			plugins.requested[name] = true;
			plugins.loaded[name] = plugin.fn.apply(self, [self.plugins.settings[name] || {}]);
			plugins.names.push(name);
		};

		/**
		 * Initializes a plugin.
		 *
		 * @param {string} name
		 */
		Interface.prototype.require = function(name) {
			var self = this;
			var plugins = self.plugins;

			if (!self.plugins.loaded.hasOwnProperty(name)) {
				if (plugins.requested[name]) {
					throw new Error('Plugin has circular dependency ("' + name + '")');
				}
				self.loadPlugin(name);
			}

			return plugins.loaded[name];
		};

		/**
		 * Registers a plugin.
		 *
		 * @param {string} name
		 * @param {function} fn
		 */
		Interface.define = function(name, fn) {
			Interface.plugins[name] = {
				'name' : name,
				'fn'   : fn
			};
		};
	};

	var utils = {
		isArray: Array.isArray || function(vArg) {
			return Object.prototype.toString.call(vArg) === '[object Array]';
		}
	};

	return MicroPlugin;
}));

/**
 * selectize.js (v0.12.6)
 * Copyright (c) 2013–2015 Brian Reavis & contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
 * file except in compliance with the License. You may obtain a copy of the License at:
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
 * ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 *
 * @author Brian Reavis <brian@thirdroute.com>
 */

/*jshint curly:false */
/*jshint browser:true */

(function(root, factory) {
	if (typeof define === 'function' && define.amd) {
		define('selectize', ['jquery','sifter','microplugin'], factory);
	} else if (typeof exports === 'object') {
		module.exports = factory(require('jquery'), require('sifter'), require('microplugin'));
	} else {
		root.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin);
	}
}(this, function($, Sifter, MicroPlugin) {
	'use strict';

	var highlight = function($element, pattern) {
		if (typeof pattern === 'string' && !pattern.length) return;
		var regex = (typeof pattern === 'string') ? new RegExp(pattern, 'i') : pattern;
	
		var highlight = function(node) {
			var skip = 0;
			// Wrap matching part of text node with highlighting <span>, e.g.
			// Soccer  ->  <span class="highlight">Soc</span>cer  for regex = /soc/i
			if (node.nodeType === 3) {
				var pos = node.data.search(regex);
				if (pos >= 0 && node.data.length > 0) {
					var match = node.data.match(regex);
					var spannode = document.createElement('span');
					spannode.className = 'highlight';
					var middlebit = node.splitText(pos);
					var endbit = middlebit.splitText(match[0].length);
					var middleclone = middlebit.cloneNode(true);
					spannode.appendChild(middleclone);
					middlebit.parentNode.replaceChild(spannode, middlebit);
					skip = 1;
				}
			} 
			// Recurse element node, looking for child text nodes to highlight, unless element 
			// is childless, <script>, <style>, or already highlighted: <span class="hightlight">
			else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName) && ( node.className !== 'highlight' || node.tagName !== 'SPAN' )) {
				for (var i = 0; i < node.childNodes.length; ++i) {
					i += highlight(node.childNodes[i]);
				}
			}
			return skip;
		};
	
		return $element.each(function() {
			highlight(this);
		});
	};
	
	/**
	 * removeHighlight fn copied from highlight v5 and
	 * edited to remove with() and pass js strict mode
	 */
	$.fn.removeHighlight = function() {
		return this.find("span.highlight").each(function() {
			this.parentNode.firstChild.nodeName;
			var parent = this.parentNode;
			parent.replaceChild(this.firstChild, this);
			parent.normalize();
		}).end();
	};
	
	
	var MicroEvent = function() {};
	MicroEvent.prototype = {
		on: function(event, fct){
			this._events = this._events || {};
			this._events[event] = this._events[event] || [];
			this._events[event].push(fct);
		},
		off: function(event, fct){
			var n = arguments.length;
			if (n === 0) return delete this._events;
			if (n === 1) return delete this._events[event];
	
			this._events = this._events || {};
			if (event in this._events === false) return;
			this._events[event].splice(this._events[event].indexOf(fct), 1);
		},
		trigger: function(event /* , args... */){
			this._events = this._events || {};
			if (event in this._events === false) return;
			for (var i = 0; i < this._events[event].length; i++){
				this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1));
			}
		}
	};
	
	/**
	 * Mixin will delegate all MicroEvent.js function in the destination object.
	 *
	 * - MicroEvent.mixin(Foobar) will make Foobar able to use MicroEvent
	 *
	 * @param {object} the object which will support MicroEvent
	 */
	MicroEvent.mixin = function(destObject){
		var props = ['on', 'off', 'trigger'];
		for (var i = 0; i < props.length; i++){
			destObject.prototype[props[i]] = MicroEvent.prototype[props[i]];
		}
	};
	
	var IS_MAC        = /Mac/.test(navigator.userAgent);
	
	var KEY_A         = 65;
	var KEY_COMMA     = 188;
	var KEY_RETURN    = 13;
	var KEY_ESC       = 27;
	var KEY_LEFT      = 37;
	var KEY_UP        = 38;
	var KEY_P         = 80;
	var KEY_RIGHT     = 39;
	var KEY_DOWN      = 40;
	var KEY_N         = 78;
	var KEY_BACKSPACE = 8;
	var KEY_DELETE    = 46;
	var KEY_SHIFT     = 16;
	var KEY_CMD       = IS_MAC ? 91 : 17;
	var KEY_CTRL      = IS_MAC ? 18 : 17;
	var KEY_TAB       = 9;
	
	var TAG_SELECT    = 1;
	var TAG_INPUT     = 2;
	
	// for now, android support in general is too spotty to support validity
	var SUPPORTS_VALIDITY_API = !/android/i.test(window.navigator.userAgent) && !!document.createElement('input').validity;
	
	
	var isset = function(object) {
		return typeof object !== 'undefined';
	};
	
	/**
	 * Converts a scalar to its best string representation
	 * for hash keys and HTML attribute values.
	 *
	 * Transformations:
	 *   'str'     -> 'str'
	 *   null      -> ''
	 *   undefined -> ''
	 *   true      -> '1'
	 *   false     -> '0'
	 *   0         -> '0'
	 *   1         -> '1'
	 *
	 * @param {string} value
	 * @returns {string|null}
	 */
	var hash_key = function(value) {
		if (typeof value === 'undefined' || value === null) return null;
		if (typeof value === 'boolean') return value ? '1' : '0';
		return value + '';
	};
	
	/**
	 * Escapes a string for use within HTML.
	 *
	 * @param {string} str
	 * @returns {string}
	 */
	var escape_html = function(str) {
		return (str + '')
			.replace(/&/g, '&amp;')
			.replace(/</g, '&lt;')
			.replace(/>/g, '&gt;')
			.replace(/"/g, '&quot;');
	};
	
	/**
	 * Escapes "$" characters in replacement strings.
	 *
	 * @param {string} str
	 * @returns {string}
	 */
	var escape_replace = function(str) {
		return (str + '').replace(/\$/g, '$$$$');
	};
	
	var hook = {};
	
	/**
	 * Wraps `method` on `self` so that `fn`
	 * is invoked before the original method.
	 *
	 * @param {object} self
	 * @param {string} method
	 * @param {function} fn
	 */
	hook.before = function(self, method, fn) {
		var original = self[method];
		self[method] = function() {
			fn.apply(self, arguments);
			return original.apply(self, arguments);
		};
	};
	
	/**
	 * Wraps `method` on `self` so that `fn`
	 * is invoked after the original method.
	 *
	 * @param {object} self
	 * @param {string} method
	 * @param {function} fn
	 */
	hook.after = function(self, method, fn) {
		var original = self[method];
		self[method] = function() {
			var result = original.apply(self, arguments);
			fn.apply(self, arguments);
			return result;
		};
	};
	
	/**
	 * Wraps `fn` so that it can only be invoked once.
	 *
	 * @param {function} fn
	 * @returns {function}
	 */
	var once = function(fn) {
		var called = false;
		return function() {
			if (called) return;
			called = true;
			fn.apply(this, arguments);
		};
	};
	
	/**
	 * Wraps `fn` so that it can only be called once
	 * every `delay` milliseconds (invoked on the falling edge).
	 *
	 * @param {function} fn
	 * @param {int} delay
	 * @returns {function}
	 */
	var debounce = function(fn, delay) {
		var timeout;
		return function() {
			var self = this;
			var args = arguments;
			window.clearTimeout(timeout);
			timeout = window.setTimeout(function() {
				fn.apply(self, args);
			}, delay);
		};
	};
	
	/**
	 * Debounce all fired events types listed in `types`
	 * while executing the provided `fn`.
	 *
	 * @param {object} self
	 * @param {array} types
	 * @param {function} fn
	 */
	var debounce_events = function(self, types, fn) {
		var type;
		var trigger = self.trigger;
		var event_args = {};
	
		// override trigger method
		self.trigger = function() {
			var type = arguments[0];
			if (types.indexOf(type) !== -1) {
				event_args[type] = arguments;
			} else {
				return trigger.apply(self, arguments);
			}
		};
	
		// invoke provided function
		fn.apply(self, []);
		self.trigger = trigger;
	
		// trigger queued events
		for (type in event_args) {
			if (event_args.hasOwnProperty(type)) {
				trigger.apply(self, event_args[type]);
			}
		}
	};
	
	/**
	 * A workaround for http://bugs.jquery.com/ticket/6696
	 *
	 * @param {object} $parent - Parent element to listen on.
	 * @param {string} event - Event name.
	 * @param {string} selector - Descendant selector to filter by.
	 * @param {function} fn - Event handler.
	 */
	var watchChildEvent = function($parent, event, selector, fn) {
		$parent.on(event, selector, function(e) {
			var child = e.target;
			while (child && child.parentNode !== $parent[0]) {
				child = child.parentNode;
			}
			e.currentTarget = child;
			return fn.apply(this, [e]);
		});
	};
	
	/**
	 * Determines the current selection within a text input control.
	 * Returns an object containing:
	 *   - start
	 *   - length
	 *
	 * @param {object} input
	 * @returns {object}
	 */
	var getSelection = function(input) {
		var result = {};
		if ('selectionStart' in input) {
			result.start = input.selectionStart;
			result.length = input.selectionEnd - result.start;
		} else if (document.selection) {
			input.focus();
			var sel = document.selection.createRange();
			var selLen = document.selection.createRange().text.length;
			sel.moveStart('character', -input.value.length);
			result.start = sel.text.length - selLen;
			result.length = selLen;
		}
		return result;
	};
	
	/**
	 * Copies CSS properties from one element to another.
	 *
	 * @param {object} $from
	 * @param {object} $to
	 * @param {array} properties
	 */
	var transferStyles = function($from, $to, properties) {
		var i, n, styles = {};
		if (properties) {
			for (i = 0, n = properties.length; i < n; i++) {
				styles[properties[i]] = $from.css(properties[i]);
			}
		} else {
			styles = $from.css();
		}
		$to.css(styles);
	};
	
	/**
	 * Measures the width of a string within a
	 * parent element (in pixels).
	 *
	 * @param {string} str
	 * @param {object} $parent
	 * @returns {int}
	 */
	var measureString = function(str, $parent) {
		if (!str) {
			return 0;
		}
	
		if (!Selectize.$testInput) {
			Selectize.$testInput = $('<span />').css({
				position: 'absolute',
				top: -99999,
				left: -99999,
				width: 'auto',
				padding: 0,
				whiteSpace: 'pre'
			}).appendTo('body');
		}
	
		Selectize.$testInput.text(str);
	
		transferStyles($parent, Selectize.$testInput, [
			'letterSpacing',
			'fontSize',
			'fontFamily',
			'fontWeight',
			'textTransform'
		]);
	
		return Selectize.$testInput.width();
	};
	
	/**
	 * Sets up an input to grow horizontally as the user
	 * types. If the value is changed manually, you can
	 * trigger the "update" handler to resize:
	 *
	 * $input.trigger('update');
	 *
	 * @param {object} $input
	 */
	var autoGrow = function($input) {
		var currentWidth = null;
	
		var update = function(e, options) {
			var value, keyCode, printable, placeholder, width;
			var shift, character, selection;
			e = e || window.event || {};
			options = options || {};
	
			if (e.metaKey || e.altKey) return;
			if (!options.force && $input.data('grow') === false) return;
	
			value = $input.val();
			if (e.type && e.type.toLowerCase() === 'keydown') {
				keyCode = e.keyCode;
				printable = (
					(keyCode >= 48 && keyCode <= 57)  || // 0-9
					(keyCode >= 65 && keyCode <= 90)   || // a-z
					(keyCode >= 96 && keyCode <= 111)  || // numpad 0-9, numeric operators
					(keyCode >= 186 && keyCode <= 222) || // semicolon, equal, comma, dash, etc.
					keyCode === 32 // space
				);
	
				if (keyCode === KEY_DELETE || keyCode === KEY_BACKSPACE) {
					selection = getSelection($input[0]);
					if (selection.length) {
						value = value.substring(0, selection.start) + value.substring(selection.start + selection.length);
					} else if (keyCode === KEY_BACKSPACE && selection.start) {
						value = value.substring(0, selection.start - 1) + value.substring(selection.start + 1);
					} else if (keyCode === KEY_DELETE && typeof selection.start !== 'undefined') {
						value = value.substring(0, selection.start) + value.substring(selection.start + 1);
					}
				} else if (printable) {
					shift = e.shiftKey;
					character = String.fromCharCode(e.keyCode);
					if (shift) character = character.toUpperCase();
					else character = character.toLowerCase();
					value += character;
				}
			}
	
			placeholder = $input.attr('placeholder');
			if (!value && placeholder) {
				value = placeholder;
			}
	
			width = measureString(value, $input) + 4;
			if (width !== currentWidth) {
				currentWidth = width;
				$input.width(width);
				$input.triggerHandler('resize');
			}
		};
	
		$input.on('keydown keyup update blur', update);
		update();
	};
	
	var domToString = function(d) {
		var tmp = document.createElement('div');
	
		tmp.appendChild(d.cloneNode(true));
	
		return tmp.innerHTML;
	};
	
	var logError = function(message, options){
		if(!options) options = {};
		var component = "Selectize";
	
		console.error(component + ": " + message)
	
		if(options.explanation){
			// console.group is undefined in <IE11
			if(console.group) console.group();
			console.error(options.explanation);
			if(console.group) console.groupEnd();
		}
	}
	
	
	var Selectize = function($input, settings) {
		var key, i, n, dir, input, self = this;
		input = $input[0];
		input.selectize = self;
	
		// detect rtl environment
		var computedStyle = window.getComputedStyle && window.getComputedStyle(input, null);
		dir = computedStyle ? computedStyle.getPropertyValue('direction') : input.currentStyle && input.currentStyle.direction;
		dir = dir || $input.parents('[dir]:first').attr('dir') || '';
	
		// setup default state
		$.extend(self, {
			order            : 0,
			settings         : settings,
			$input           : $input,
			tabIndex         : $input.attr('tabindex') || '',
			tagType          : input.tagName.toLowerCase() === 'select' ? TAG_SELECT : TAG_INPUT,
			rtl              : /rtl/i.test(dir),
	
			eventNS          : '.selectize' + (++Selectize.count),
			highlightedValue : null,
			isBlurring       : false,
			isOpen           : false,
			isDisabled       : false,
			isRequired       : $input.is('[required]'),
			isInvalid        : false,
			isLocked         : false,
			isFocused        : false,
			isInputHidden    : false,
			isSetup          : false,
			isShiftDown      : false,
			isCmdDown        : false,
			isCtrlDown       : false,
			ignoreFocus      : false,
			ignoreBlur       : false,
			ignoreHover      : false,
			hasOptions       : false,
			currentResults   : null,
			lastValue        : '',
			caretPos         : 0,
			loading          : 0,
			loadedSearches   : {},
	
			$activeOption    : null,
			$activeItems     : [],
	
			optgroups        : {},
			options          : {},
			userOptions      : {},
			items            : [],
			renderCache      : {},
			onSearchChange   : settings.loadThrottle === null ? self.onSearchChange : debounce(self.onSearchChange, settings.loadThrottle)
		});
	
		// search system
		self.sifter = new Sifter(this.options, {diacritics: settings.diacritics});
	
		// build options table
		if (self.settings.options) {
			for (i = 0, n = self.settings.options.length; i < n; i++) {
				self.registerOption(self.settings.options[i]);
			}
			delete self.settings.options;
		}
	
		// build optgroup table
		if (self.settings.optgroups) {
			for (i = 0, n = self.settings.optgroups.length; i < n; i++) {
				self.registerOptionGroup(self.settings.optgroups[i]);
			}
			delete self.settings.optgroups;
		}
	
		// option-dependent defaults
		self.settings.mode = self.settings.mode || (self.settings.maxItems === 1 ? 'single' : 'multi');
		if (typeof self.settings.hideSelected !== 'boolean') {
			self.settings.hideSelected = self.settings.mode === 'multi';
		}
	
		self.initializePlugins(self.settings.plugins);
		self.setupCallbacks();
		self.setupTemplates();
		self.setup();
	};
	
	// mixins
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	
	MicroEvent.mixin(Selectize);
	
	if(typeof MicroPlugin !== "undefined"){
		MicroPlugin.mixin(Selectize);
	}else{
		logError("Dependency MicroPlugin is missing",
			{explanation:
				"Make sure you either: (1) are using the \"standalone\" "+
				"version of Selectize, or (2) require MicroPlugin before you "+
				"load Selectize."}
		);
	}
	
	
	// methods
	// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	
	$.extend(Selectize.prototype, {
	
		/**
		 * Creates all elements and sets up event bindings.
		 */
		setup: function() {
			var self      = this;
			var settings  = self.settings;
			var eventNS   = self.eventNS;
			var $window   = $(window);
			var $document = $(document);
			var $input    = self.$input;
	
			var $wrapper;
			var $control;
			var $control_input;
			var $dropdown;
			var $dropdown_content;
			var $dropdown_parent;
			var inputMode;
			var timeout_blur;
			var timeout_focus;
			var classes;
			var classes_plugins;
			var inputId;
	
			inputMode         = self.settings.mode;
			classes           = $input.attr('class') || '';
	
			$wrapper          = $('<div>').addClass(settings.wrapperClass).addClass(classes).addClass(inputMode);
			$control          = $('<div>').addClass(settings.inputClass).addClass('items').appendTo($wrapper);
			$control_input    = $('<input type="text" autocomplete="off" />').appendTo($control).attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex);
			$dropdown_parent  = $(settings.dropdownParent || $wrapper);
			$dropdown         = $('<div>').addClass(settings.dropdownClass).addClass(inputMode).hide().appendTo($dropdown_parent);
			$dropdown_content = $('<div>').addClass(settings.dropdownContentClass).appendTo($dropdown);
	
			if(inputId = $input.attr('id')) {
				$control_input.attr('id', inputId + '-selectized');
				$("label[for='"+inputId+"']").attr('for', inputId + '-selectized');
			}
	
			if(self.settings.copyClassesToDropdown) {
				$dropdown.addClass(classes);
			}
	
			$wrapper.css({
				width: $input[0].style.width
			});
	
			if (self.plugins.names.length) {
				classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-');
				$wrapper.addClass(classes_plugins);
				$dropdown.addClass(classes_plugins);
			}
	
			if ((settings.maxItems === null || settings.maxItems > 1) && self.tagType === TAG_SELECT) {
				$input.attr('multiple', 'multiple');
			}
	
			if (self.settings.placeholder) {
				$control_input.attr('placeholder', settings.placeholder);
			}
	
			// if splitOn was not passed in, construct it from the delimiter to allow pasting universally
			if (!self.settings.splitOn && self.settings.delimiter) {
				var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
				self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*');
			}
	
			if ($input.attr('autocorrect')) {
				$control_input.attr('autocorrect', $input.attr('autocorrect'));
			}
	
			if ($input.attr('autocapitalize')) {
				$control_input.attr('autocapitalize', $input.attr('autocapitalize'));
			}
			$control_input[0].type = $input[0].type;
	
			self.$wrapper          = $wrapper;
			self.$control          = $control;
			self.$control_input    = $control_input;
			self.$dropdown         = $dropdown;
			self.$dropdown_content = $dropdown_content;
	
			$dropdown.on('mouseenter mousedown click', '[data-disabled]>[data-selectable]', function(e) { e.stopImmediatePropagation(); });
			$dropdown.on('mouseenter', '[data-selectable]', function() { return self.onOptionHover.apply(self, arguments); });
			$dropdown.on('mousedown click', '[data-selectable]', function() { return self.onOptionSelect.apply(self, arguments); });
			watchChildEvent($control, 'mousedown', '*:not(input)', function() { return self.onItemSelect.apply(self, arguments); });
			autoGrow($control_input);
	
			$control.on({
				mousedown : function() { return self.onMouseDown.apply(self, arguments); },
				click     : function() { return self.onClick.apply(self, arguments); }
			});
	
			$control_input.on({
				mousedown : function(e) { e.stopPropagation(); },
				keydown   : function() { return self.onKeyDown.apply(self, arguments); },
				keyup     : function() { return self.onKeyUp.apply(self, arguments); },
				keypress  : function() { return self.onKeyPress.apply(self, arguments); },
				resize    : function() { self.positionDropdown.apply(self, []); },
				blur      : function() { return self.onBlur.apply(self, arguments); },
				focus     : function() { self.ignoreBlur = false; return self.onFocus.apply(self, arguments); },
				paste     : function() { return self.onPaste.apply(self, arguments); }
			});
	
			$document.on('keydown' + eventNS, function(e) {
				self.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey'];
				self.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey'];
				self.isShiftDown = e.shiftKey;
			});
	
			$document.on('keyup' + eventNS, function(e) {
				if (e.keyCode === KEY_CTRL) self.isCtrlDown = false;
				if (e.keyCode === KEY_SHIFT) self.isShiftDown = false;
				if (e.keyCode === KEY_CMD) self.isCmdDown = false;
			});
	
			$document.on('mousedown' + eventNS, function(e) {
				if (self.isFocused) {
					// prevent events on the dropdown scrollbar from causing the control to blur
					if (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) {
						return false;
					}
					// blur on click outside
					if (!self.$control.has(e.target).length && e.target !== self.$control[0]) {
						self.blur(e.target);
					}
				}
			});
	
			$window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function() {
				if (self.isOpen) {
					self.positionDropdown.apply(self, arguments);
				}
			});
			$window.on('mousemove' + eventNS, function() {
				self.ignoreHover = false;
			});
	
			// store original children and tab index so that they can be
			// restored when the destroy() method is called.
			this.revertSettings = {
				$children : $input.children().detach(),
				tabindex  : $input.attr('tabindex')
			};
	
			$input.attr('tabindex', -1).hide().after(self.$wrapper);
	
			if ($.isArray(settings.items)) {
				self.setValue(settings.items);
				delete settings.items;
			}
	
			// feature detect for the validation API
			if (SUPPORTS_VALIDITY_API) {
				$input.on('invalid' + eventNS, function(e) {
					e.preventDefault();
					self.isInvalid = true;
					self.refreshState();
				});
			}
	
			self.updateOriginalInput();
			self.refreshItems();
			self.refreshState();
			self.updatePlaceholder();
			self.isSetup = true;
	
			if ($input.is(':disabled')) {
				self.disable();
			}
	
			self.on('change', this.onChange);
	
			$input.data('selectize', self);
			$input.addClass('selectized');
			self.trigger('initialize');
	
			// preload options
			if (settings.preload === true) {
				self.onSearchChange('');
			}
	
		},
	
		/**
		 * Sets up default rendering functions.
		 */
		setupTemplates: function() {
			var self = this;
			var field_label = self.settings.labelField;
			var field_optgroup = self.settings.optgroupLabelField;
	
			var templates = {
				'optgroup': function(data) {
					return '<div class="optgroup">' + data.html + '</div>';
				},
				'optgroup_header': function(data, escape) {
					return '<div class="optgroup-header">' + escape(data[field_optgroup]) + '</div>';
				},
				'option': function(data, escape) {
					return '<div class="option">' + escape(data[field_label]) + '</div>';
				},
				'item': function(data, escape) {
					return '<div class="item">' + escape(data[field_label]) + '</div>';
				},
				'option_create': function(data, escape) {
					return '<div class="create">Add <strong>' + escape(data.input) + '</strong>&hellip;</div>';
				}
			};
	
			self.settings.render = $.extend({}, templates, self.settings.render);
		},
	
		/**
		 * Maps fired events to callbacks provided
		 * in the settings used when creating the control.
		 */
		setupCallbacks: function() {
			var key, fn, callbacks = {
				'initialize'      : 'onInitialize',
				'change'          : 'onChange',
				'item_add'        : 'onItemAdd',
				'item_remove'     : 'onItemRemove',
				'clear'           : 'onClear',
				'option_add'      : 'onOptionAdd',
				'option_remove'   : 'onOptionRemove',
				'option_clear'    : 'onOptionClear',
				'optgroup_add'    : 'onOptionGroupAdd',
				'optgroup_remove' : 'onOptionGroupRemove',
				'optgroup_clear'  : 'onOptionGroupClear',
				'dropdown_open'   : 'onDropdownOpen',
				'dropdown_close'  : 'onDropdownClose',
				'type'            : 'onType',
				'load'            : 'onLoad',
				'focus'           : 'onFocus',
				'blur'            : 'onBlur'
			};
	
			for (key in callbacks) {
				if (callbacks.hasOwnProperty(key)) {
					fn = this.settings[callbacks[key]];
					if (fn) this.on(key, fn);
				}
			}
		},
	
		/**
		 * Triggered when the main control element
		 * has a click event.
		 *
		 * @param {object} e
		 * @return {boolean}
		 */
		onClick: function(e) {
			var self = this;
	
			// necessary for mobile webkit devices (manual focus triggering
			// is ignored unless invoked within a click event)
	    // also necessary to reopen a dropdown that has been closed by
	    // closeAfterSelect
			if (!self.isFocused || !self.isOpen) {
				self.focus();
				e.preventDefault();
			}
		},
	
		/**
		 * Triggered when the main control element
		 * has a mouse down event.
		 *
		 * @param {object} e
		 * @return {boolean}
		 */
		onMouseDown: function(e) {
			var self = this;
			var defaultPrevented = e.isDefaultPrevented();
			var $target = $(e.target);
	
			if (self.isFocused) {
				// retain focus by preventing native handling. if the
				// event target is the input it should not be modified.
				// otherwise, text selection within the input won't work.
				if (e.target !== self.$control_input[0]) {
					if (self.settings.mode === 'single') {
						// toggle dropdown
						self.isOpen ? self.close() : self.open();
					} else if (!defaultPrevented) {
						self.setActiveItem(null);
					}
					return false;
				}
			} else {
				// give control focus
				if (!defaultPrevented) {
					window.setTimeout(function() {
						self.focus();
					}, 0);
				}
			}
		},
	
		/**
		 * Triggered when the value of the control has been changed.
		 * This should propagate the event to the original DOM
		 * input / select element.
		 */
		onChange: function() {
			this.$input.trigger('change');
		},
	
		/**
		 * Triggered on <input> paste.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onPaste: function(e) {
			var self = this;
	
			if (self.isFull() || self.isInputHidden || self.isLocked) {
				e.preventDefault();
				return;
			}
	
			// If a regex or string is included, this will split the pasted
			// input and create Items for each separate value
			if (self.settings.splitOn) {
	
				// Wait for pasted text to be recognized in value
				setTimeout(function() {
					var pastedText = self.$control_input.val();
					if(!pastedText.match(self.settings.splitOn)){ return }
	
					var splitInput = $.trim(pastedText).split(self.settings.splitOn);
					for (var i = 0, n = splitInput.length; i < n; i++) {
						self.createItem(splitInput[i]);
					}
				}, 0);
			}
		},
	
		/**
		 * Triggered on <input> keypress.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onKeyPress: function(e) {
			if (this.isLocked) return e && e.preventDefault();
			var character = String.fromCharCode(e.keyCode || e.which);
			if (this.settings.create && this.settings.mode === 'multi' && character === this.settings.delimiter) {
				this.createItem();
				e.preventDefault();
				return false;
			}
		},
	
		/**
		 * Triggered on <input> keydown.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onKeyDown: function(e) {
			var isInput = e.target === this.$control_input[0];
			var self = this;
	
			if (self.isLocked) {
				if (e.keyCode !== KEY_TAB) {
					e.preventDefault();
				}
				return;
			}
	
			switch (e.keyCode) {
				case KEY_A:
					if (self.isCmdDown) {
						self.selectAll();
						return;
					}
					break;
				case KEY_ESC:
					if (self.isOpen) {
						e.preventDefault();
						e.stopPropagation();
						self.close();
					}
					return;
				case KEY_N:
					if (!e.ctrlKey || e.altKey) break;
				case KEY_DOWN:
					if (!self.isOpen && self.hasOptions) {
						self.open();
					} else if (self.$activeOption) {
						self.ignoreHover = true;
						var $next = self.getAdjacentOption(self.$activeOption, 1);
						if ($next.length) self.setActiveOption($next, true, true);
					}
					e.preventDefault();
					return;
				case KEY_P:
					if (!e.ctrlKey || e.altKey) break;
				case KEY_UP:
					if (self.$activeOption) {
						self.ignoreHover = true;
						var $prev = self.getAdjacentOption(self.$activeOption, -1);
						if ($prev.length) self.setActiveOption($prev, true, true);
					}
					e.preventDefault();
					return;
				case KEY_RETURN:
					if (self.isOpen && self.$activeOption) {
						self.onOptionSelect({currentTarget: self.$activeOption});
						e.preventDefault();
					}
					return;
				case KEY_LEFT:
					self.advanceSelection(-1, e);
					return;
				case KEY_RIGHT:
					self.advanceSelection(1, e);
					return;
				case KEY_TAB:
					if (self.settings.selectOnTab && self.isOpen && self.$activeOption) {
						self.onOptionSelect({currentTarget: self.$activeOption});
	
						// Default behaviour is to jump to the next field, we only want this
						// if the current field doesn't accept any more entries
						if (!self.isFull()) {
							e.preventDefault();
						}
					}
					if (self.settings.create && self.createItem()) {
						e.preventDefault();
					}
					return;
				case KEY_BACKSPACE:
				case KEY_DELETE:
					self.deleteSelection(e);
					return;
			}
	
			if ((self.isFull() || self.isInputHidden) && !(IS_MAC ? e.metaKey : e.ctrlKey)) {
				e.preventDefault();
				return;
			}
		},
	
		/**
		 * Triggered on <input> keyup.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onKeyUp: function(e) {
			var self = this;
	
			if (self.isLocked) return e && e.preventDefault();
			var value = self.$control_input.val() || '';
			if (self.lastValue !== value) {
				self.lastValue = value;
				self.onSearchChange(value);
				self.refreshOptions();
				self.trigger('type', value);
			}
		},
	
		/**
		 * Invokes the user-provide option provider / loader.
		 *
		 * Note: this function is debounced in the Selectize
		 * constructor (by `settings.loadThrottle` milliseconds)
		 *
		 * @param {string} value
		 */
		onSearchChange: function(value) {
			var self = this;
			var fn = self.settings.load;
			if (!fn) return;
			if (self.loadedSearches.hasOwnProperty(value)) return;
			self.loadedSearches[value] = true;
			self.load(function(callback) {
				fn.apply(self, [value, callback]);
			});
		},
	
		/**
		 * Triggered on <input> focus.
		 *
		 * @param {object} e (optional)
		 * @returns {boolean}
		 */
		onFocus: function(e) {
			var self = this;
			var wasFocused = self.isFocused;
	
			if (self.isDisabled) {
				self.blur();
				e && e.preventDefault();
				return false;
			}
	
			if (self.ignoreFocus) return;
			self.isFocused = true;
			if (self.settings.preload === 'focus') self.onSearchChange('');
	
			if (!wasFocused) self.trigger('focus');
	
			if (!self.$activeItems.length) {
				self.showInput();
				self.setActiveItem(null);
				self.refreshOptions(!!self.settings.openOnFocus);
			}
	
			self.refreshState();
		},
	
		/**
		 * Triggered on <input> blur.
		 *
		 * @param {object} e
		 * @param {Element} dest
		 */
		onBlur: function(e, dest) {
			var self = this;
			if (!self.isFocused) return;
			self.isFocused = false;
	
			if (self.ignoreFocus) {
				return;
			} else if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0]) {
				// necessary to prevent IE closing the dropdown when the scrollbar is clicked
				self.ignoreBlur = true;
				self.onFocus(e);
				return;
			}
	
			var deactivate = function() {
				self.close();
				self.setTextboxValue('');
				self.setActiveItem(null);
				self.setActiveOption(null);
				self.setCaret(self.items.length);
				self.refreshState();
	
				// IE11 bug: element still marked as active
				dest && dest.focus && dest.focus();
	
				self.isBlurring = false;
				self.ignoreFocus = false;
				self.trigger('blur');
			};
	
			self.isBlurring = true;
			self.ignoreFocus = true;
			if (self.settings.create && self.settings.createOnBlur) {
				self.createItem(null, false, deactivate);
			} else {
				deactivate();
			}
		},
	
		/**
		 * Triggered when the user rolls over
		 * an option in the autocomplete dropdown menu.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onOptionHover: function(e) {
			if (this.ignoreHover) return;
			this.setActiveOption(e.currentTarget, false);
		},
	
		/**
		 * Triggered when the user clicks on an option
		 * in the autocomplete dropdown menu.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onOptionSelect: function(e) {
			var value, $target, $option, self = this;
	
			if (e.preventDefault) {
				e.preventDefault();
				e.stopPropagation();
			}
	
			$target = $(e.currentTarget);
			if ($target.hasClass('create')) {
				self.createItem(null, function() {
					if (self.settings.closeAfterSelect) {
						self.close();
					}
				});
			} else {
				value = $target.attr('data-value');
				if (typeof value !== 'undefined') {
					self.lastQuery = null;
					self.setTextboxValue('');
					self.addItem(value);
					if (self.settings.closeAfterSelect) {
						self.close();
					} else if (!self.settings.hideSelected && e.type && /mouse/.test(e.type)) {
						self.setActiveOption(self.getOption(value));
					}
				}
			}
		},
	
		/**
		 * Triggered when the user clicks on an item
		 * that has been selected.
		 *
		 * @param {object} e
		 * @returns {boolean}
		 */
		onItemSelect: function(e) {
			var self = this;
	
			if (self.isLocked) return;
			if (self.settings.mode === 'multi') {
				e.preventDefault();
				self.setActiveItem(e.currentTarget, e);
			}
		},
	
		/**
		 * Invokes the provided method that provides
		 * results to a callback---which are then added
		 * as options to the control.
		 *
		 * @param {function} fn
		 */
		load: function(fn) {
			var self = this;
			var $wrapper = self.$wrapper.addClass(self.settings.loadingClass);
	
			self.loading++;
			fn.apply(self, [function(results) {
				self.loading = Math.max(self.loading - 1, 0);
				if (results && results.length) {
					self.addOption(results);
					self.refreshOptions(self.isFocused && !self.isInputHidden);
				}
				if (!self.loading) {
					$wrapper.removeClass(self.settings.loadingClass);
				}
				self.trigger('load', results);
			}]);
		},
	
		/**
		 * Sets the input field of the control to the specified value.
		 *
		 * @param {string} value
		 */
		setTextboxValue: function(value) {
			var $input = this.$control_input;
			var changed = $input.val() !== value;
			if (changed) {
				$input.val(value).triggerHandler('update');
				this.lastValue = value;
			}
		},
	
		/**
		 * Returns the value of the control. If multiple items
		 * can be selected (e.g. <select multiple>), this returns
		 * an array. If only one item can be selected, this
		 * returns a string.
		 *
		 * @returns {mixed}
		 */
		getValue: function() {
			if (this.tagType === TAG_SELECT && this.$input.attr('multiple')) {
				return this.items;
			} else {
				return this.items.join(this.settings.delimiter);
			}
		},
	
		/**
		 * Resets the selected items to the given value.
		 *
		 * @param {mixed} value
		 */
		setValue: function(value, silent) {
			var events = silent ? [] : ['change'];
	
			debounce_events(this, events, function() {
				this.clear(silent);
				this.addItems(value, silent);
			});
		},
	
		/**
		 * Sets the selected item.
		 *
		 * @param {object} $item
		 * @param {object} e (optional)
		 */
		setActiveItem: function($item, e) {
			var self = this;
			var eventName;
			var i, idx, begin, end, item, swap;
			var $last;
	
			if (self.settings.mode === 'single') return;
			$item = $($item);
	
			// clear the active selection
			if (!$item.length) {
				$(self.$activeItems).removeClass('active');
				self.$activeItems = [];
				if (self.isFocused) {
					self.showInput();
				}
				return;
			}
	
			// modify selection
			eventName = e && e.type.toLowerCase();
	
			if (eventName === 'mousedown' && self.isShiftDown && self.$activeItems.length) {
				$last = self.$control.children('.active:last');
				begin = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$last[0]]);
				end   = Array.prototype.indexOf.apply(self.$control[0].childNodes, [$item[0]]);
				if (begin > end) {
					swap  = begin;
					begin = end;
					end   = swap;
				}
				for (i = begin; i <= end; i++) {
					item = self.$control[0].childNodes[i];
					if (self.$activeItems.indexOf(item) === -1) {
						$(item).addClass('active');
						self.$activeItems.push(item);
					}
				}
				e.preventDefault();
			} else if ((eventName === 'mousedown' && self.isCtrlDown) || (eventName === 'keydown' && this.isShiftDown)) {
				if ($item.hasClass('active')) {
					idx = self.$activeItems.indexOf($item[0]);
					self.$activeItems.splice(idx, 1);
					$item.removeClass('active');
				} else {
					self.$activeItems.push($item.addClass('active')[0]);
				}
			} else {
				$(self.$activeItems).removeClass('active');
				self.$activeItems = [$item.addClass('active')[0]];
			}
	
			// ensure control has focus
			self.hideInput();
			if (!this.isFocused) {
				self.focus();
			}
		},
	
		/**
		 * Sets the selected item in the dropdown menu
		 * of available options.
		 *
		 * @param {object} $object
		 * @param {boolean} scroll
		 * @param {boolean} animate
		 */
		setActiveOption: function($option, scroll, animate) {
			var height_menu, height_item, y;
			var scroll_top, scroll_bottom;
			var self = this;
	
			if (self.$activeOption) self.$activeOption.removeClass('active');
			self.$activeOption = null;
	
			$option = $($option);
			if (!$option.length) return;
	
			self.$activeOption = $option.addClass('active');
	
			if (scroll || !isset(scroll)) {
	
				height_menu   = self.$dropdown_content.height();
				height_item   = self.$activeOption.outerHeight(true);
				scroll        = self.$dropdown_content.scrollTop() || 0;
				y             = self.$activeOption.offset().top - self.$dropdown_content.offset().top + scroll;
				scroll_top    = y;
				scroll_bottom = y - height_menu + height_item;
	
				if (y + height_item > height_menu + scroll) {
					self.$dropdown_content.stop().animate({scrollTop: scroll_bottom}, animate ? self.settings.scrollDuration : 0);
				} else if (y < scroll) {
					self.$dropdown_content.stop().animate({scrollTop: scroll_top}, animate ? self.settings.scrollDuration : 0);
				}
	
			}
		},
	
		/**
		 * Selects all items (CTRL + A).
		 */
		selectAll: function() {
			var self = this;
			if (self.settings.mode === 'single') return;
	
			self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
			if (self.$activeItems.length) {
				self.hideInput();
				self.close();
			}
			self.focus();
		},
	
		/**
		 * Hides the input element out of view, while
		 * retaining its focus.
		 */
		hideInput: function() {
			var self = this;
	
			self.setTextboxValue('');
			self.$control_input.css({opacity: 0, position: 'absolute', left: self.rtl ? 10000 : -10000});
			self.isInputHidden = true;
		},
	
		/**
		 * Restores input visibility.
		 */
		showInput: function() {
			this.$control_input.css({opacity: 1, position: 'relative', left: 0});
			this.isInputHidden = false;
		},
	
		/**
		 * Gives the control focus.
		 */
		focus: function() {
			var self = this;
			if (self.isDisabled) return;
	
			self.ignoreFocus = true;
			self.$control_input[0].focus();
			window.setTimeout(function() {
				self.ignoreFocus = false;
				self.onFocus();
			}, 0);
		},
	
		/**
		 * Forces the control out of focus.
		 *
		 * @param {Element} dest
		 */
		blur: function(dest) {
			this.$control_input[0].blur();
			this.onBlur(null, dest);
		},
	
		/**
		 * Returns a function that scores an object
		 * to show how good of a match it is to the
		 * provided query.
		 *
		 * @param {string} query
		 * @param {object} options
		 * @return {function}
		 */
		getScoreFunction: function(query) {
			return this.sifter.getScoreFunction(query, this.getSearchOptions());
		},
	
		/**
		 * Returns search options for sifter (the system
		 * for scoring and sorting results).
		 *
		 * @see https://github.com/brianreavis/sifter.js
		 * @return {object}
		 */
		getSearchOptions: function() {
			var settings = this.settings;
			var sort = settings.sortField;
			if (typeof sort === 'string') {
				sort = [{field: sort}];
			}
	
			return {
				fields      : settings.searchField,
				conjunction : settings.searchConjunction,
				sort        : sort,
				nesting     : settings.nesting
			};
		},
	
		/**
		 * Searches through available options and returns
		 * a sorted array of matches.
		 *
		 * Returns an object containing:
		 *
		 *   - query {string}
		 *   - tokens {array}
		 *   - total {int}
		 *   - items {array}
		 *
		 * @param {string} query
		 * @returns {object}
		 */
		search: function(query) {
			var i, value, score, result, calculateScore;
			var self     = this;
			var settings = self.settings;
			var options  = this.getSearchOptions();
	
			// validate user-provided result scoring function
			if (settings.score) {
				calculateScore = self.settings.score.apply(this, [query]);
				if (typeof calculateScore !== 'function') {
					throw new Error('Selectize "score" setting must be a function that returns a function');
				}
			}
	
			// perform search
			if (query !== self.lastQuery) {
				self.lastQuery = query;
				result = self.sifter.search(query, $.extend(options, {score: calculateScore}));
				self.currentResults = result;
			} else {
				result = $.extend(true, {}, self.currentResults);
			}
	
			// filter out selected items
			if (settings.hideSelected) {
				for (i = result.items.length - 1; i >= 0; i--) {
					if (self.items.indexOf(hash_key(result.items[i].id)) !== -1) {
						result.items.splice(i, 1);
					}
				}
			}
	
			return result;
		},
	
		/**
		 * Refreshes the list of available options shown
		 * in the autocomplete dropdown menu.
		 *
		 * @param {boolean} triggerDropdown
		 */
		refreshOptions: function(triggerDropdown) {
			var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
			var $active, $active_before, $create;
	
			if (typeof triggerDropdown === 'undefined') {
				triggerDropdown = true;
			}
	
			var self              = this;
			var query             = $.trim(self.$control_input.val());
			var results           = self.search(query);
			var $dropdown_content = self.$dropdown_content;
			var active_before     = self.$activeOption && hash_key(self.$activeOption.attr('data-value'));
	
			// build markup
			n = results.items.length;
			if (typeof self.settings.maxOptions === 'number') {
				n = Math.min(n, self.settings.maxOptions);
			}
	
			// render and group available options individually
			groups = {};
			groups_order = [];
	
			for (i = 0; i < n; i++) {
				option      = self.options[results.items[i].id];
				option_html = self.render('option', option);
				optgroup    = option[self.settings.optgroupField] || '';
				optgroups   = $.isArray(optgroup) ? optgroup : [optgroup];
	
				for (j = 0, k = optgroups && optgroups.length; j < k; j++) {
					optgroup = optgroups[j];
					if (!self.optgroups.hasOwnProperty(optgroup)) {
						optgroup = '';
					}
					if (!groups.hasOwnProperty(optgroup)) {
						groups[optgroup] = document.createDocumentFragment();
						groups_order.push(optgroup);
					}
					groups[optgroup].appendChild(option_html);
				}
			}
	
			// sort optgroups
			if (this.settings.lockOptgroupOrder) {
				groups_order.sort(function(a, b) {
					var a_order = self.optgroups[a].$order || 0;
					var b_order = self.optgroups[b].$order || 0;
					return a_order - b_order;
				});
			}
	
			// render optgroup headers & join groups
			html = document.createDocumentFragment();
			for (i = 0, n = groups_order.length; i < n; i++) {
				optgroup = groups_order[i];
				if (self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].childNodes.length) {
					// render the optgroup header and options within it,
					// then pass it to the wrapper template
					html_children = document.createDocumentFragment();
					html_children.appendChild(self.render('optgroup_header', self.optgroups[optgroup]));
					html_children.appendChild(groups[optgroup]);
	
					html.appendChild(self.render('optgroup', $.extend({}, self.optgroups[optgroup], {
						html: domToString(html_children),
						dom:  html_children
					})));
				} else {
					html.appendChild(groups[optgroup]);
				}
			}
	
			$dropdown_content.html(html);
	
			// highlight matching terms inline
			if (self.settings.highlight) {
				$dropdown_content.removeHighlight();
				if (results.query.length && results.tokens.length) {
					for (i = 0, n = results.tokens.length; i < n; i++) {
						highlight($dropdown_content, results.tokens[i].regex);
					}
				}
			}
	
			// add "selected" class to selected options
			if (!self.settings.hideSelected) {
				for (i = 0, n = self.items.length; i < n; i++) {
					self.getOption(self.items[i]).addClass('selected');
				}
			}
	
			// add create option
			has_create_option = self.canCreate(query);
			if (has_create_option) {
				$dropdown_content.prepend(self.render('option_create', {input: query}));
				$create = $($dropdown_content[0].childNodes[0]);
			}
	
			// activate
			self.hasOptions = results.items.length > 0 || has_create_option;
			if (self.hasOptions) {
				if (results.items.length > 0) {
					$active_before = active_before && self.getOption(active_before);
					if ($active_before && $active_before.length) {
						$active = $active_before;
					} else if (self.settings.mode === 'single' && self.items.length) {
						$active = self.getOption(self.items[0]);
					}
					if (!$active || !$active.length) {
						if ($create && !self.settings.addPrecedence) {
							$active = self.getAdjacentOption($create, 1);
						} else {
							$active = $dropdown_content.find('[data-selectable]:first');
						}
					}
				} else {
					$active = $create;
				}
				self.setActiveOption($active);
				if (triggerDropdown && !self.isOpen) { self.open(); }
			} else {
				self.setActiveOption(null);
				if (triggerDropdown && self.isOpen) { self.close(); }
			}
		},
	
		/**
		 * Adds an available option. If it already exists,
		 * nothing will happen. Note: this does not refresh
		 * the options list dropdown (use `refreshOptions`
		 * for that).
		 *
		 * Usage:
		 *
		 *   this.addOption(data)
		 *
		 * @param {object|array} data
		 */
		addOption: function(data) {
			var i, n, value, self = this;
	
			if ($.isArray(data)) {
				for (i = 0, n = data.length; i < n; i++) {
					self.addOption(data[i]);
				}
				return;
			}
	
			if (value = self.registerOption(data)) {
				self.userOptions[value] = true;
				self.lastQuery = null;
				self.trigger('option_add', value, data);
			}
		},
	
		/**
		 * Registers an option to the pool of options.
		 *
		 * @param {object} data
		 * @return {boolean|string}
		 */
		registerOption: function(data) {
			var key = hash_key(data[this.settings.valueField]);
			if (typeof key === 'undefined' || key === null || this.options.hasOwnProperty(key)) return false;
			data.$order = data.$order || ++this.order;
			this.options[key] = data;
			return key;
		},
	
		/**
		 * Registers an option group to the pool of option groups.
		 *
		 * @param {object} data
		 * @return {boolean|string}
		 */
		registerOptionGroup: function(data) {
			var key = hash_key(data[this.settings.optgroupValueField]);
			if (!key) return false;
	
			data.$order = data.$order || ++this.order;
			this.optgroups[key] = data;
			return key;
		},
	
		/**
		 * Registers a new optgroup for options
		 * to be bucketed into.
		 *
		 * @param {string} id
		 * @param {object} data
		 */
		addOptionGroup: function(id, data) {
			data[this.settings.optgroupValueField] = id;
			if (id = this.registerOptionGroup(data)) {
				this.trigger('optgroup_add', id, data);
			}
		},
	
		/**
		 * Removes an existing option group.
		 *
		 * @param {string} id
		 */
		removeOptionGroup: function(id) {
			if (this.optgroups.hasOwnProperty(id)) {
				delete this.optgroups[id];
				this.renderCache = {};
				this.trigger('optgroup_remove', id);
			}
		},
	
		/**
		 * Clears all existing option groups.
		 */
		clearOptionGroups: function() {
			this.optgroups = {};
			this.renderCache = {};
			this.trigger('optgroup_clear');
		},
	
		/**
		 * Updates an option available for selection. If
		 * it is visible in the selected items or options
		 * dropdown, it will be re-rendered automatically.
		 *
		 * @param {string} value
		 * @param {object} data
		 */
		updateOption: function(value, data) {
			var self = this;
			var $item, $item_new;
			var value_new, index_item, cache_items, cache_options, order_old;
	
			value     = hash_key(value);
			value_new = hash_key(data[self.settings.valueField]);
	
			// sanity checks
			if (value === null) return;
			if (!self.options.hasOwnProperty(value)) return;
			if (typeof value_new !== 'string') throw new Error('Value must be set in option data');
	
			order_old = self.options[value].$order;
	
			// update references
			if (value_new !== value) {
				delete self.options[value];
				index_item = self.items.indexOf(value);
				if (index_item !== -1) {
					self.items.splice(index_item, 1, value_new);
				}
			}
			data.$order = data.$order || order_old;
			self.options[value_new] = data;
	
			// invalidate render cache
			cache_items = self.renderCache['item'];
			cache_options = self.renderCache['option'];
	
			if (cache_items) {
				delete cache_items[value];
				delete cache_items[value_new];
			}
			if (cache_options) {
				delete cache_options[value];
				delete cache_options[value_new];
			}
	
			// update the item if it's selected
			if (self.items.indexOf(value_new) !== -1) {
				$item = self.getItem(value);
				$item_new = $(self.render('item', data));
				if ($item.hasClass('active')) $item_new.addClass('active');
				$item.replaceWith($item_new);
			}
	
			// invalidate last query because we might have updated the sortField
			self.lastQuery = null;
	
			// update dropdown contents
			if (self.isOpen) {
				self.refreshOptions(false);
			}
		},
	
		/**
		 * Removes a single option.
		 *
		 * @param {string} value
		 * @param {boolean} silent
		 */
		removeOption: function(value, silent) {
			var self = this;
			value = hash_key(value);
	
			var cache_items = self.renderCache['item'];
			var cache_options = self.renderCache['option'];
			if (cache_items) delete cache_items[value];
			if (cache_options) delete cache_options[value];
	
			delete self.userOptions[value];
			delete self.options[value];
			self.lastQuery = null;
			self.trigger('option_remove', value);
			self.removeItem(value, silent);
		},
	
		/**
		 * Clears all options.
		 */
		clearOptions: function() {
			var self = this;
	
			self.loadedSearches = {};
			self.userOptions = {};
			self.renderCache = {};
			var options = self.options;
			$.each(self.options, function(key, value) {
				if(self.items.indexOf(key) == -1) {
					delete options[key];
				}
			});
			self.options = self.sifter.items = options;
			self.lastQuery = null;
			self.trigger('option_clear');
		},
	
		/**
		 * Returns the jQuery element of the option
		 * matching the given value.
		 *
		 * @param {string} value
		 * @returns {object}
		 */
		getOption: function(value) {
			return this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'));
		},
	
		/**
		 * Returns the jQuery element of the next or
		 * previous selectable option.
		 *
		 * @param {object} $option
		 * @param {int} direction  can be 1 for next or -1 for previous
		 * @return {object}
		 */
		getAdjacentOption: function($option, direction) {
			var $options = this.$dropdown.find('[data-selectable]');
			var index    = $options.index($option) + direction;
	
			return index >= 0 && index < $options.length ? $options.eq(index) : $();
		},
	
		/**
		 * Finds the first element with a "data-value" attribute
		 * that matches the given value.
		 *
		 * @param {mixed} value
		 * @param {object} $els
		 * @return {object}
		 */
		getElementWithValue: function(value, $els) {
			value = hash_key(value);
	
			if (typeof value !== 'undefined' && value !== null) {
				for (var i = 0, n = $els.length; i < n; i++) {
					if ($els[i].getAttribute('data-value') === value) {
						return $($els[i]);
					}
				}
			}
	
			return $();
		},
	
		/**
		 * Returns the jQuery element of the item
		 * matching the given value.
		 *
		 * @param {string} value
		 * @returns {object}
		 */
		getItem: function(value) {
			return this.getElementWithValue(value, this.$control.children());
		},
	
		/**
		 * "Selects" multiple items at once. Adds them to the list
		 * at the current caret position.
		 *
		 * @param {string} value
		 * @param {boolean} silent
		 */
		addItems: function(values, silent) {
			this.buffer = document.createDocumentFragment();
	
			var childNodes = this.$control[0].childNodes;
			for (var i = 0; i < childNodes.length; i++) {
				this.buffer.appendChild(childNodes[i]);
			}
	
			var items = $.isArray(values) ? values : [values];
			for (var i = 0, n = items.length; i < n; i++) {
				this.isPending = (i < n - 1);
				this.addItem(items[i], silent);
			}
	
			var control = this.$control[0];
			control.insertBefore(this.buffer, control.firstChild);
	
			this.buffer = null;
		},
	
		/**
		 * "Selects" an item. Adds it to the list
		 * at the current caret position.
		 *
		 * @param {string} value
		 * @param {boolean} silent
		 */
		addItem: function(value, silent) {
			var events = silent ? [] : ['change'];
	
			debounce_events(this, events, function() {
				var $item, $option, $options;
				var self = this;
				var inputMode = self.settings.mode;
				var i, active, value_next, wasFull;
				value = hash_key(value);
	
				if (self.items.indexOf(value) !== -1) {
					if (inputMode === 'single') self.close();
					return;
				}
	
				if (!self.options.hasOwnProperty(value)) return;
				if (inputMode === 'single') self.clear(silent);
				if (inputMode === 'multi' && self.isFull()) return;
	
				$item = $(self.render('item', self.options[value]));
				wasFull = self.isFull();
				self.items.splice(self.caretPos, 0, value);
				self.insertAtCaret($item);
				if (!self.isPending || (!wasFull && self.isFull())) {
					self.refreshState();
				}
	
				if (self.isSetup) {
					$options = self.$dropdown_content.find('[data-selectable]');
	
					// update menu / remove the option (if this is not one item being added as part of series)
					if (!self.isPending) {
						$option = self.getOption(value);
						value_next = self.getAdjacentOption($option, 1).attr('data-value');
						self.refreshOptions(self.isFocused && inputMode !== 'single');
						if (value_next) {
							self.setActiveOption(self.getOption(value_next));
						}
					}
	
					// hide the menu if the maximum number of items have been selected or no options are left
					if (!$options.length || self.isFull()) {
						self.close();
					} else if (!self.isPending) {
						self.positionDropdown();
					}
	
					self.updatePlaceholder();
					self.trigger('item_add', value, $item);
	
					if (!self.isPending) {
						self.updateOriginalInput({silent: silent});
					}
				}
			});
		},
	
		/**
		 * Removes the selected item matching
		 * the provided value.
		 *
		 * @param {string} value
		 */
		removeItem: function(value, silent) {
			var self = this;
			var $item, i, idx;
	
			$item = (value instanceof $) ? value : self.getItem(value);
			value = hash_key($item.attr('data-value'));
			i = self.items.indexOf(value);
	
			if (i !== -1) {
				$item.remove();
				if ($item.hasClass('active')) {
					idx = self.$activeItems.indexOf($item[0]);
					self.$activeItems.splice(idx, 1);
				}
	
				self.items.splice(i, 1);
				self.lastQuery = null;
				if (!self.settings.persist && self.userOptions.hasOwnProperty(value)) {
					self.removeOption(value, silent);
				}
	
				if (i < self.caretPos) {
					self.setCaret(self.caretPos - 1);
				}
	
				self.refreshState();
				self.updatePlaceholder();
				self.updateOriginalInput({silent: silent});
				self.positionDropdown();
				self.trigger('item_remove', value, $item);
			}
		},
	
		/**
		 * Invokes the `create` method provided in the
		 * selectize options that should provide the data
		 * for the new item, given the user input.
		 *
		 * Once this completes, it will be added
		 * to the item list.
		 *
		 * @param {string} value
		 * @param {boolean} [triggerDropdown]
		 * @param {function} [callback]
		 * @return {boolean}
		 */
		createItem: function(input, triggerDropdown) {
			var self  = this;
			var caret = self.caretPos;
			input = input || $.trim(self.$control_input.val() || '');
	
			var callback = arguments[arguments.length - 1];
			if (typeof callback !== 'function') callback = function() {};
	
			if (typeof triggerDropdown !== 'boolean') {
				triggerDropdown = true;
			}
	
			if (!self.canCreate(input)) {
				callback();
				return false;
			}
	
			self.lock();
	
			var setup = (typeof self.settings.create === 'function') ? this.settings.create : function(input) {
				var data = {};
				data[self.settings.labelField] = input;
				data[self.settings.valueField] = input;
				return data;
			};
	
			var create = once(function(data) {
				self.unlock();
	
				if (!data || typeof data !== 'object') return callback();
				var value = hash_key(data[self.settings.valueField]);
				if (typeof value !== 'string') return callback();
	
				self.setTextboxValue('');
				self.addOption(data);
				self.setCaret(caret);
				self.addItem(value);
				self.refreshOptions(triggerDropdown && self.settings.mode !== 'single');
				callback(data);
			});
	
			var output = setup.apply(this, [input, create]);
			if (typeof output !== 'undefined') {
				create(output);
			}
	
			return true;
		},
	
		/**
		 * Re-renders the selected item lists.
		 */
		refreshItems: function() {
			this.lastQuery = null;
	
			if (this.isSetup) {
				this.addItem(this.items);
			}
	
			this.refreshState();
			this.updateOriginalInput();
		},
	
		/**
		 * Updates all state-dependent attributes
		 * and CSS classes.
		 */
		refreshState: function() {
			this.refreshValidityState();
			this.refreshClasses();
		},
	
		/**
		 * Update the `required` attribute of both input and control input.
		 *
		 * The `required` property needs to be activated on the control input
		 * for the error to be displayed at the right place. `required` also
		 * needs to be temporarily deactivated on the input since the input is
		 * hidden and can't show errors.
		 */
		refreshValidityState: function() {
			if (!this.isRequired) return false;
	
			var invalid = !this.items.length;
	
			this.isInvalid = invalid;
			this.$control_input.prop('required', invalid);
			this.$input.prop('required', !invalid);
		},
	
		/**
		 * Updates all state-dependent CSS classes.
		 */
		refreshClasses: function() {
			var self     = this;
			var isFull   = self.isFull();
			var isLocked = self.isLocked;
	
			self.$wrapper
				.toggleClass('rtl', self.rtl);
	
			self.$control
				.toggleClass('focus', self.isFocused)
				.toggleClass('disabled', self.isDisabled)
				.toggleClass('required', self.isRequired)
				.toggleClass('invalid', self.isInvalid)
				.toggleClass('locked', isLocked)
				.toggleClass('full', isFull).toggleClass('not-full', !isFull)
				.toggleClass('input-active', self.isFocused && !self.isInputHidden)
				.toggleClass('dropdown-active', self.isOpen)
				.toggleClass('has-options', !$.isEmptyObject(self.options))
				.toggleClass('has-items', self.items.length > 0);
	
			self.$control_input.data('grow', !isFull && !isLocked);
		},
	
		/**
		 * Determines whether or not more items can be added
		 * to the control without exceeding the user-defined maximum.
		 *
		 * @returns {boolean}
		 */
		isFull: function() {
			return this.settings.maxItems !== null && this.items.length >= this.settings.maxItems;
		},
	
		/**
		 * Refreshes the original <select> or <input>
		 * element to reflect the current state.
		 */
		updateOriginalInput: function(opts) {
			var i, n, options, label, self = this;
			opts = opts || {};
	
			if (self.tagType === TAG_SELECT) {
				options = [];
				for (i = 0, n = self.items.length; i < n; i++) {
					label = self.options[self.items[i]][self.settings.labelField] || '';
					options.push('<option value="' + escape_html(self.items[i]) + '" selected="selected">' + escape_html(label) + '</option>');
				}
				if (!options.length && !this.$input.attr('multiple')) {
					options.push('<option value="" selected="selected"></option>');
				}
				self.$input.html(options.join(''));
			} else {
				self.$input.val(self.getValue());
				self.$input.attr('value',self.$input.val());
			}
	
			if (self.isSetup) {
				if (!opts.silent) {
					self.trigger('change', self.$input.val());
				}
			}
		},
	
		/**
		 * Shows/hide the input placeholder depending
		 * on if there items in the list already.
		 */
		updatePlaceholder: function() {
			if (!this.settings.placeholder) return;
			var $input = this.$control_input;
	
			if (this.items.length) {
				$input.removeAttr('placeholder');
			} else {
				$input.attr('placeholder', this.settings.placeholder);
			}
			$input.triggerHandler('update', {force: true});
		},
	
		/**
		 * Shows the autocomplete dropdown containing
		 * the available options.
		 */
		open: function() {
			var self = this;
	
			if (self.isLocked || self.isOpen || (self.settings.mode === 'multi' && self.isFull())) return;
			self.focus();
			self.isOpen = true;
			self.refreshState();
			self.$dropdown.css({visibility: 'hidden', display: 'block'});
			self.positionDropdown();
			self.$dropdown.css({visibility: 'visible'});
			self.trigger('dropdown_open', self.$dropdown);
		},
	
		/**
		 * Closes the autocomplete dropdown menu.
		 */
		close: function() {
			var self = this;
			var trigger = self.isOpen;
	
			if (self.settings.mode === 'single' && self.items.length) {
				self.hideInput();
	
				// Do not trigger blur while inside a blur event,
				// this fixes some weird tabbing behavior in FF and IE.
				// See #1164
				if (!self.isBlurring) {
					self.$control_input.blur(); // close keyboard on iOS
				}
			}
	
			self.isOpen = false;
			self.$dropdown.hide();
			self.setActiveOption(null);
			self.refreshState();
	
			if (trigger) self.trigger('dropdown_close', self.$dropdown);
		},
	
		/**
		 * Calculates and applies the appropriate
		 * position of the dropdown.
		 */
		positionDropdown: function() {
			var $control = this.$control;
			var offset = this.settings.dropdownParent === 'body' ? $control.offset() : $control.position();
			offset.top += $control.outerHeight(true);
	
			this.$dropdown.css({
				width : $control[0].getBoundingClientRect().width,
				top   : offset.top,
				left  : offset.left
			});
		},
	
		/**
		 * Resets / clears all selected items
		 * from the control.
		 *
		 * @param {boolean} silent
		 */
		clear: function(silent) {
			var self = this;
	
			if (!self.items.length) return;
			self.$control.children(':not(input)').remove();
			self.items = [];
			self.lastQuery = null;
			self.setCaret(0);
			self.setActiveItem(null);
			self.updatePlaceholder();
			self.updateOriginalInput({silent: silent});
			self.refreshState();
			self.showInput();
			self.trigger('clear');
		},
	
		/**
		 * A helper method for inserting an element
		 * at the current caret position.
		 *
		 * @param {object} $el
		 */
		insertAtCaret: function($el) {
			var caret = Math.min(this.caretPos, this.items.length);
			var el = $el[0];
			var target = this.buffer || this.$control[0];
	
			if (caret === 0) {
				target.insertBefore(el, target.firstChild);
			} else {
				target.insertBefore(el, target.childNodes[caret]);
			}
	
			this.setCaret(caret + 1);
		},
	
		/**
		 * Removes the current selected item(s).
		 *
		 * @param {object} e (optional)
		 * @returns {boolean}
		 */
		deleteSelection: function(e) {
			var i, n, direction, selection, values, caret, option_select, $option_select, $tail;
			var self = this;
	
			direction = (e && e.keyCode === KEY_BACKSPACE) ? -1 : 1;
			selection = getSelection(self.$control_input[0]);
	
			if (self.$activeOption && !self.settings.hideSelected) {
				option_select = self.getAdjacentOption(self.$activeOption, -1).attr('data-value');
			}
	
			// determine items that will be removed
			values = [];
	
			if (self.$activeItems.length) {
				$tail = self.$control.children('.active:' + (direction > 0 ? 'last' : 'first'));
				caret = self.$control.children(':not(input)').index($tail);
				if (direction > 0) { caret++; }
	
				for (i = 0, n = self.$activeItems.length; i < n; i++) {
					values.push($(self.$activeItems[i]).attr('data-value'));
				}
				if (e) {
					e.preventDefault();
					e.stopPropagation();
				}
			} else if ((self.isFocused || self.settings.mode === 'single') && self.items.length) {
				if (direction < 0 && selection.start === 0 && selection.length === 0) {
					values.push(self.items[self.caretPos - 1]);
				} else if (direction > 0 && selection.start === self.$control_input.val().length) {
					values.push(self.items[self.caretPos]);
				}
			}
	
			// allow the callback to abort
			if (!values.length || (typeof self.settings.onDelete === 'function' && self.settings.onDelete.apply(self, [values]) === false)) {
				return false;
			}
	
			// perform removal
			if (typeof caret !== 'undefined') {
				self.setCaret(caret);
			}
			while (values.length) {
				self.removeItem(values.pop());
			}
	
			self.showInput();
			self.positionDropdown();
			self.refreshOptions(true);
	
			// select previous option
			if (option_select) {
				$option_select = self.getOption(option_select);
				if ($option_select.length) {
					self.setActiveOption($option_select);
				}
			}
	
			return true;
		},
	
		/**
		 * Selects the previous / next item (depending
		 * on the `direction` argument).
		 *
		 * > 0 - right
		 * < 0 - left
		 *
		 * @param {int} direction
		 * @param {object} e (optional)
		 */
		advanceSelection: function(direction, e) {
			var tail, selection, idx, valueLength, cursorAtEdge, $tail;
			var self = this;
	
			if (direction === 0) return;
			if (self.rtl) direction *= -1;
	
			tail = direction > 0 ? 'last' : 'first';
			selection = getSelection(self.$control_input[0]);
	
			if (self.isFocused && !self.isInputHidden) {
				valueLength = self.$control_input.val().length;
				cursorAtEdge = direction < 0
					? selection.start === 0 && selection.length === 0
					: selection.start === valueLength;
	
				if (cursorAtEdge && !valueLength) {
					self.advanceCaret(direction, e);
				}
			} else {
				$tail = self.$control.children('.active:' + tail);
				if ($tail.length) {
					idx = self.$control.children(':not(input)').index($tail);
					self.setActiveItem(null);
					self.setCaret(direction > 0 ? idx + 1 : idx);
				}
			}
		},
	
		/**
		 * Moves the caret left / right.
		 *
		 * @param {int} direction
		 * @param {object} e (optional)
		 */
		advanceCaret: function(direction, e) {
			var self = this, fn, $adj;
	
			if (direction === 0) return;
	
			fn = direction > 0 ? 'next' : 'prev';
			if (self.isShiftDown) {
				$adj = self.$control_input[fn]();
				if ($adj.length) {
					self.hideInput();
					self.setActiveItem($adj);
					e && e.preventDefault();
				}
			} else {
				self.setCaret(self.caretPos + direction);
			}
		},
	
		/**
		 * Moves the caret to the specified index.
		 *
		 * @param {int} i
		 */
		setCaret: function(i) {
			var self = this;
	
			if (self.settings.mode === 'single') {
				i = self.items.length;
			} else {
				i = Math.max(0, Math.min(self.items.length, i));
			}
	
			if(!self.isPending) {
				// the input must be moved by leaving it in place and moving the
				// siblings, due to the fact that focus cannot be restored once lost
				// on mobile webkit devices
				var j, n, fn, $children, $child;
				$children = self.$control.children(':not(input)');
				for (j = 0, n = $children.length; j < n; j++) {
					$child = $($children[j]).detach();
					if (j <  i) {
						self.$control_input.before($child);
					} else {
						self.$control.append($child);
					}
				}
			}
	
			self.caretPos = i;
		},
	
		/**
		 * Disables user input on the control. Used while
		 * items are being asynchronously created.
		 */
		lock: function() {
			this.close();
			this.isLocked = true;
			this.refreshState();
		},
	
		/**
		 * Re-enables user input on the control.
		 */
		unlock: function() {
			this.isLocked = false;
			this.refreshState();
		},
	
		/**
		 * Disables user input on the control completely.
		 * While disabled, it cannot receive focus.
		 */
		disable: function() {
			var self = this;
			self.$input.prop('disabled', true);
			self.$control_input.prop('disabled', true).prop('tabindex', -1);
			self.isDisabled = true;
			self.lock();
		},
	
		/**
		 * Enables the control so that it can respond
		 * to focus and user input.
		 */
		enable: function() {
			var self = this;
			self.$input.prop('disabled', false);
			self.$control_input.prop('disabled', false).prop('tabindex', self.tabIndex);
			self.isDisabled = false;
			self.unlock();
		},
	
		/**
		 * Completely destroys the control and
		 * unbinds all event listeners so that it can
		 * be garbage collected.
		 */
		destroy: function() {
			var self = this;
			var eventNS = self.eventNS;
			var revertSettings = self.revertSettings;
	
			self.trigger('destroy');
			self.off();
			self.$wrapper.remove();
			self.$dropdown.remove();
	
			self.$input
				.html('')
				.append(revertSettings.$children)
				.removeAttr('tabindex')
				.removeClass('selectized')
				.attr({tabindex: revertSettings.tabindex})
				.show();
	
			self.$control_input.removeData('grow');
			self.$input.removeData('selectize');
	
			if (--Selectize.count == 0 && Selectize.$testInput) {
				Selectize.$testInput.remove();
				Selectize.$testInput = undefined;
			}
	
			$(window).off(eventNS);
			$(document).off(eventNS);
			$(document.body).off(eventNS);
	
			delete self.$input[0].selectize;
		},
	
		/**
		 * A helper method for rendering "item" and
		 * "option" templates, given the data.
		 *
		 * @param {string} templateName
		 * @param {object} data
		 * @returns {string}
		 */
		render: function(templateName, data) {
			var value, id, label;
			var html = '';
			var cache = false;
			var self = this;
			var regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;
	
			if (templateName === 'option' || templateName === 'item') {
				value = hash_key(data[self.settings.valueField]);
				cache = !!value;
			}
	
			// pull markup from cache if it exists
			if (cache) {
				if (!isset(self.renderCache[templateName])) {
					self.renderCache[templateName] = {};
				}
				if (self.renderCache[templateName].hasOwnProperty(value)) {
					return self.renderCache[templateName][value];
				}
			}
	
			// render markup
			html = $(self.settings.render[templateName].apply(this, [data, escape_html]));
	
			// add mandatory attributes
			if (templateName === 'option' || templateName === 'option_create') {
				if (!data[self.settings.disabledField]) {
					html.attr('data-selectable', '');
				}
			}
			else if (templateName === 'optgroup') {
				id = data[self.settings.optgroupValueField] || '';
				html.attr('data-group', id);
				if(data[self.settings.disabledField]) {
					html.attr('data-disabled', '');
				}
			}
			if (templateName === 'option' || templateName === 'item') {
				html.attr('data-value', value || '');
			}
	
			// update cache
			if (cache) {
				self.renderCache[templateName][value] = html[0];
			}
	
			return html[0];
		},
	
		/**
		 * Clears the render cache for a template. If
		 * no template is given, clears all render
		 * caches.
		 *
		 * @param {string} templateName
		 */
		clearCache: function(templateName) {
			var self = this;
			if (typeof templateName === 'undefined') {
				self.renderCache = {};
			} else {
				delete self.renderCache[templateName];
			}
		},
	
		/**
		 * Determines whether or not to display the
		 * create item prompt, given a user input.
		 *
		 * @param {string} input
		 * @return {boolean}
		 */
		canCreate: function(input) {
			var self = this;
			if (!self.settings.create) return false;
			var filter = self.settings.createFilter;
			return input.length
				&& (typeof filter !== 'function' || filter.apply(self, [input]))
				&& (typeof filter !== 'string' || new RegExp(filter).test(input))
				&& (!(filter instanceof RegExp) || filter.test(input));
		}
	
	});
	
	
	Selectize.count = 0;
	Selectize.defaults = {
		options: [],
		optgroups: [],
	
		plugins: [],
		delimiter: ',',
		splitOn: null, // regexp or string for splitting up values from a paste command
		persist: true,
		diacritics: true,
		create: false,
		createOnBlur: false,
		createFilter: null,
		highlight: true,
		openOnFocus: true,
		maxOptions: 1000,
		maxItems: null,
		hideSelected: null,
		addPrecedence: false,
		selectOnTab: false,
		preload: false,
		allowEmptyOption: false,
		closeAfterSelect: false,
	
		scrollDuration: 60,
		loadThrottle: 300,
		loadingClass: 'loading',
	
		dataAttr: 'data-data',
		optgroupField: 'optgroup',
		valueField: 'value',
		labelField: 'text',
		disabledField: 'disabled',
		optgroupLabelField: 'label',
		optgroupValueField: 'value',
		lockOptgroupOrder: false,
	
		sortField: '$order',
		searchField: ['text'],
		searchConjunction: 'and',
	
		mode: null,
		wrapperClass: 'selectize-control',
		inputClass: 'selectize-input',
		dropdownClass: 'selectize-dropdown',
		dropdownContentClass: 'selectize-dropdown-content',
	
		dropdownParent: null,
	
		copyClassesToDropdown: true,
	
		/*
		load                 : null, // function(query, callback) { ... }
		score                : null, // function(search) { ... }
		onInitialize         : null, // function() { ... }
		onChange             : null, // function(value) { ... }
		onItemAdd            : null, // function(value, $item) { ... }
		onItemRemove         : null, // function(value) { ... }
		onClear              : null, // function() { ... }
		onOptionAdd          : null, // function(value, data) { ... }
		onOptionRemove       : null, // function(value) { ... }
		onOptionClear        : null, // function() { ... }
		onOptionGroupAdd     : null, // function(id, data) { ... }
		onOptionGroupRemove  : null, // function(id) { ... }
		onOptionGroupClear   : null, // function() { ... }
		onDropdownOpen       : null, // function($dropdown) { ... }
		onDropdownClose      : null, // function($dropdown) { ... }
		onType               : null, // function(str) { ... }
		onDelete             : null, // function(values) { ... }
		*/
	
		render: {
			/*
			item: null,
			optgroup: null,
			optgroup_header: null,
			option: null,
			option_create: null
			*/
		}
	};
	
	
	$.fn.selectize = function(settings_user) {
		var defaults             = $.fn.selectize.defaults;
		var settings             = $.extend({}, defaults, settings_user);
		var attr_data            = settings.dataAttr;
		var field_label          = settings.labelField;
		var field_value          = settings.valueField;
		var field_disabled       = settings.disabledField;
		var field_optgroup       = settings.optgroupField;
		var field_optgroup_label = settings.optgroupLabelField;
		var field_optgroup_value = settings.optgroupValueField;
	
		/**
		 * Initializes selectize from a <input type="text"> element.
		 *
		 * @param {object} $input
		 * @param {object} settings_element
		 */
		var init_textbox = function($input, settings_element) {
			var i, n, values, option;
	
			var data_raw = $input.attr(attr_data);
	
			if (!data_raw) {
				var value = $.trim($input.val() || '');
				if (!settings.allowEmptyOption && !value.length) return;
				values = value.split(settings.delimiter);
				for (i = 0, n = values.length; i < n; i++) {
					option = {};
					option[field_label] = values[i];
					option[field_value] = values[i];
					settings_element.options.push(option);
				}
				settings_element.items = values;
			} else {
				settings_element.options = JSON.parse(data_raw);
				for (i = 0, n = settings_element.options.length; i < n; i++) {
					settings_element.items.push(settings_element.options[i][field_value]);
				}
			}
		};
	
		/**
		 * Initializes selectize from a <select> element.
		 *
		 * @param {object} $input
		 * @param {object} settings_element
		 */
		var init_select = function($input, settings_element) {
			var i, n, tagName, $children, order = 0;
			var options = settings_element.options;
			var optionsMap = {};
	
			var readData = function($el) {
				var data = attr_data && $el.attr(attr_data);
				if (typeof data === 'string' && data.length) {
					return JSON.parse(data);
				}
				return null;
			};
	
			var addOption = function($option, group) {
				$option = $($option);
	
				var value = hash_key($option.val());
				if (!value && !settings.allowEmptyOption) return;
	
				// if the option already exists, it's probably been
				// duplicated in another optgroup. in this case, push
				// the current group to the "optgroup" property on the
				// existing option so that it's rendered in both places.
				if (optionsMap.hasOwnProperty(value)) {
					if (group) {
						var arr = optionsMap[value][field_optgroup];
						if (!arr) {
							optionsMap[value][field_optgroup] = group;
						} else if (!$.isArray(arr)) {
							optionsMap[value][field_optgroup] = [arr, group];
						} else {
							arr.push(group);
						}
					}
					return;
				}
	
				var option             = readData($option) || {};
				option[field_label]    = option[field_label] || $option.text();
				option[field_value]    = option[field_value] || value;
				option[field_disabled] = option[field_disabled] || $option.prop('disabled');
				option[field_optgroup] = option[field_optgroup] || group;
	
				optionsMap[value] = option;
				options.push(option);
	
				if ($option.is(':selected')) {
					settings_element.items.push(value);
				}
			};
	
			var addGroup = function($optgroup) {
				var i, n, id, optgroup, $options;
	
				$optgroup = $($optgroup);
				id = $optgroup.attr('label');
	
				if (id) {
					optgroup = readData($optgroup) || {};
					optgroup[field_optgroup_label] = id;
					optgroup[field_optgroup_value] = id;
					optgroup[field_disabled] = $optgroup.prop('disabled');
					settings_element.optgroups.push(optgroup);
				}
	
				$options = $('option', $optgroup);
				for (i = 0, n = $options.length; i < n; i++) {
					addOption($options[i], id);
				}
			};
	
			settings_element.maxItems = $input.attr('multiple') ? null : 1;
	
			$children = $input.children();
			for (i = 0, n = $children.length; i < n; i++) {
				tagName = $children[i].tagName.toLowerCase();
				if (tagName === 'optgroup') {
					addGroup($children[i]);
				} else if (tagName === 'option') {
					addOption($children[i]);
				}
			}
		};
	
		return this.each(function() {
			if (this.selectize) return;
	
			var instance;
			var $input = $(this);
			var tag_name = this.tagName.toLowerCase();
			var placeholder = $input.attr('placeholder') || $input.attr('data-placeholder');
			if (!placeholder && !settings.allowEmptyOption) {
				placeholder = $input.children('option[value=""]').text();
			}
	
			var settings_element = {
				'placeholder' : placeholder,
				'options'     : [],
				'optgroups'   : [],
				'items'       : []
			};
	
			if (tag_name === 'select') {
				init_select($input, settings_element);
			} else {
				init_textbox($input, settings_element);
			}
	
			instance = new Selectize($input, $.extend(true, {}, defaults, settings_element, settings_user));
		});
	};
	
	$.fn.selectize.defaults = Selectize.defaults;
	$.fn.selectize.support = {
		validity: SUPPORTS_VALIDITY_API
	};
	
	
	Selectize.define('drag_drop', function(options) {
		if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');
		if (this.settings.mode !== 'multi') return;
		var self = this;
	
		self.lock = (function() {
			var original = self.lock;
			return function() {
				var sortable = self.$control.data('sortable');
				if (sortable) sortable.disable();
				return original.apply(self, arguments);
			};
		})();
	
		self.unlock = (function() {
			var original = self.unlock;
			return function() {
				var sortable = self.$control.data('sortable');
				if (sortable) sortable.enable();
				return original.apply(self, arguments);
			};
		})();
	
		self.setup = (function() {
			var original = self.setup;
			return function() {
				original.apply(this, arguments);
	
				var $control = self.$control.sortable({
					items: '[data-value]',
					forcePlaceholderSize: true,
					disabled: self.isLocked,
					start: function(e, ui) {
						ui.placeholder.css('width', ui.helper.css('width'));
						$control.css({overflow: 'visible'});
					},
					stop: function() {
						$control.css({overflow: 'hidden'});
						var active = self.$activeItems ? self.$activeItems.slice() : null;
						var values = [];
						$control.children('[data-value]').each(function() {
							values.push($(this).attr('data-value'));
						});
						self.setValue(values);
						self.setActiveItem(active);
					}
				});
			};
		})();
	
	});
	
	Selectize.define('dropdown_header', function(options) {
		var self = this;
	
		options = $.extend({
			title         : 'Untitled',
			headerClass   : 'selectize-dropdown-header',
			titleRowClass : 'selectize-dropdown-header-title',
			labelClass    : 'selectize-dropdown-header-label',
			closeClass    : 'selectize-dropdown-header-close',
	
			html: function(data) {
				return (
					'<div class="' + data.headerClass + '">' +
						'<div class="' + data.titleRowClass + '">' +
							'<span class="' + data.labelClass + '">' + data.title + '</span>' +
							'<a href="javascript:void(0)" class="' + data.closeClass + '">&times;</a>' +
						'</div>' +
					'</div>'
				);
			}
		}, options);
	
		self.setup = (function() {
			var original = self.setup;
			return function() {
				original.apply(self, arguments);
				self.$dropdown_header = $(options.html(options));
				self.$dropdown.prepend(self.$dropdown_header);
			};
		})();
	
	});
	
	Selectize.define('optgroup_columns', function(options) {
		var self = this;
	
		options = $.extend({
			equalizeWidth  : true,
			equalizeHeight : true
		}, options);
	
		this.getAdjacentOption = function($option, direction) {
			var $options = $option.closest('[data-group]').find('[data-selectable]');
			var index    = $options.index($option) + direction;
	
			return index >= 0 && index < $options.length ? $options.eq(index) : $();
		};
	
		this.onKeyDown = (function() {
			var original = self.onKeyDown;
			return function(e) {
				var index, $option, $options, $optgroup;
	
				if (this.isOpen && (e.keyCode === KEY_LEFT || e.keyCode === KEY_RIGHT)) {
					self.ignoreHover = true;
					$optgroup = this.$activeOption.closest('[data-group]');
					index = $optgroup.find('[data-selectable]').index(this.$activeOption);
	
					if(e.keyCode === KEY_LEFT) {
						$optgroup = $optgroup.prev('[data-group]');
					} else {
						$optgroup = $optgroup.next('[data-group]');
					}
	
					$options = $optgroup.find('[data-selectable]');
					$option  = $options.eq(Math.min($options.length - 1, index));
					if ($option.length) {
						this.setActiveOption($option);
					}
					return;
				}
	
				return original.apply(this, arguments);
			};
		})();
	
		var getScrollbarWidth = function() {
			var div;
			var width = getScrollbarWidth.width;
			var doc = document;
	
			if (typeof width === 'undefined') {
				div = doc.createElement('div');
				div.innerHTML = '<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>';
				div = div.firstChild;
				doc.body.appendChild(div);
				width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth;
				doc.body.removeChild(div);
			}
			return width;
		};
	
		var equalizeSizes = function() {
			var i, n, height_max, width, width_last, width_parent, $optgroups;
	
			$optgroups = $('[data-group]', self.$dropdown_content);
			n = $optgroups.length;
			if (!n || !self.$dropdown_content.width()) return;
	
			if (options.equalizeHeight) {
				height_max = 0;
				for (i = 0; i < n; i++) {
					height_max = Math.max(height_max, $optgroups.eq(i).height());
				}
				$optgroups.css({height: height_max});
			}
	
			if (options.equalizeWidth) {
				width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth();
				width = Math.round(width_parent / n);
				$optgroups.css({width: width});
				if (n > 1) {
					width_last = width_parent - width * (n - 1);
					$optgroups.eq(n - 1).css({width: width_last});
				}
			}
		};
	
		if (options.equalizeHeight || options.equalizeWidth) {
			hook.after(this, 'positionDropdown', equalizeSizes);
			hook.after(this, 'refreshOptions', equalizeSizes);
		}
	
	
	});
	
	Selectize.define('remove_button', function(options) {
		options = $.extend({
				label     : '&times;',
				title     : 'Remove',
				className : 'remove',
				append    : true
			}, options);
	
			var singleClose = function(thisRef, options) {
	
				options.className = 'remove-single';
	
				var self = thisRef;
				var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
	
				/**
				 * Appends an element as a child (with raw HTML).
				 *
				 * @param {string} html_container
				 * @param {string} html_element
				 * @return {string}
				 */
				var append = function(html_container, html_element) {
					return $('<span>').append(html_container)
						.append(html_element);
				};
	
				thisRef.setup = (function() {
					var original = self.setup;
					return function() {
						// override the item rendering method to add the button to each
						if (options.append) {
							var id = $(self.$input.context).attr('id');
							var selectizer = $('#'+id);
	
							var render_item = self.settings.render.item;
							self.settings.render.item = function(data) {
								return append(render_item.apply(thisRef, arguments), html);
							};
						}
	
						original.apply(thisRef, arguments);
	
						// add event listener
						thisRef.$control.on('click', '.' + options.className, function(e) {
							e.preventDefault();
							if (self.isLocked) return;
	
							self.clear();
						});
	
					};
				})();
			};
	
			var multiClose = function(thisRef, options) {
	
				var self = thisRef;
				var html = '<a href="javascript:void(0)" class="' + options.className + '" tabindex="-1" title="' + escape_html(options.title) + '">' + options.label + '</a>';
	
				/**
				 * Appends an element as a child (with raw HTML).
				 *
				 * @param {string} html_container
				 * @param {string} html_element
				 * @return {string}
				 */
				var append = function(html_container, html_element) {
					var pos = html_container.search(/(<\/[^>]+>\s*)$/);
					return html_container.substring(0, pos) + html_element + html_container.substring(pos);
				};
	
				thisRef.setup = (function() {
					var original = self.setup;
					return function() {
						// override the item rendering method to add the button to each
						if (options.append) {
							var render_item = self.settings.render.item;
							self.settings.render.item = function(data) {
								return append(render_item.apply(thisRef, arguments), html);
							};
						}
	
						original.apply(thisRef, arguments);
	
						// add event listener
						thisRef.$control.on('click', '.' + options.className, function(e) {
							e.preventDefault();
							if (self.isLocked) return;
	
							var $item = $(e.currentTarget).parent();
							self.setActiveItem($item);
							if (self.deleteSelection()) {
								self.setCaret(self.items.length);
							}
						});
	
					};
				})();
			};
	
			if (this.settings.mode === 'single') {
				singleClose(this, options);
				return;
			} else {
				multiClose(this, options);
			}
	});
	
	
	Selectize.define('restore_on_backspace', function(options) {
		var self = this;
	
		options.text = options.text || function(option) {
			return option[this.settings.labelField];
		};
	
		this.onKeyDown = (function() {
			var original = self.onKeyDown;
			return function(e) {
				var index, option;
				if (e.keyCode === KEY_BACKSPACE && this.$control_input.val() === '' && !this.$activeItems.length) {
					index = this.caretPos - 1;
					if (index >= 0 && index < this.items.length) {
						option = this.options[this.items[index]];
						if (this.deleteSelection(e)) {
							this.setTextboxValue(options.text.apply(this, [option]));
							this.refreshOptions(true);
						}
						e.preventDefault();
						return;
					}
				}
				return original.apply(this, arguments);
			};
		})();
	});
	

	return Selectize;
}));
{
  "_embedded" : {
    "logUsers" : [ {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "id" : 25,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/25{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "updated" : "2017-10-20T18:31:05.344+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-10-20T18:31:05.344+0000",
      "id" : 141
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "LogBook",
        "lastName" : "Sentinel",
        "id" : 75,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/75{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "updated" : "2018-03-24T20:34:15.270+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-11-01T14:23:49.730+0000",
      "id" : 148
    }, {
      "defaultTemplate" : {
        "turnover" : false,
        "requireCommentOnAbnormal" : null,
        "templateType" : {
          "attributes" : {
            "SECTIONAL" : true,
            "ALLOW_SUBMIT_INCOMPLETE" : true,
            "TABULAR" : true,
            "TURNOVER" : true
          },
          "description" : "Inspection",
          "sortOrder" : null,
          "name" : "Inspection",
          "id" : 2,
          "_links" : {
            "self" : {
              "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
              "templated" : true
            }
          }
        },
        "numSegments" : 0,
        "numViews" : 0,
        "allowAllUsers" : false,
        "isDefaultTemplate" : false,
        "walkdown" : false,
        "evident" : false,
        "enterNotes" : true,
        "allowSubmitIncomplete" : false,
        "logId" : 59,
        "name" : "test template",
        "updatedBy" : {
          "id" : 11,
          "firstName" : "Jay",
          "lastName" : "Newton",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "updated" : "2018-07-02T17:57:09.120+0000",
        "createdBy" : {
          "id" : 11,
          "firstName" : "Jay",
          "lastName" : "Newton",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "created" : "2018-07-02T17:57:09.120+0000",
        "id" : 183
      },
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Nathan",
        "lastName" : "Crocker",
        "id" : 68,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/68{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "updated" : "2018-12-10T16:33:18.716+0000",
      "createdBy" : {
        "id" : 68,
        "firstName" : "Nathan",
        "lastName" : "Crocker",
        "updated" : "2017-04-18T14:59:45.417+0000"
      },
      "created" : "2017-11-15T15:43:47.442+0000",
      "id" : 153
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Sandy",
        "lastName" : "Syx",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/2{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 2,
        "firstName" : "Sandy",
        "lastName" : "Syx",
        "updated" : "2016-09-16T14:33:01.897+0000"
      },
      "updated" : "2017-12-01T16:06:23.917+0000",
      "createdBy" : {
        "id" : 2,
        "firstName" : "Sandy",
        "lastName" : "Syx",
        "updated" : "2016-09-16T14:33:01.897+0000"
      },
      "created" : "2017-12-01T16:06:23.917+0000",
      "id" : 156
    }, {
      "defaultTemplate" : {
        "turnover" : false,
        "requireCommentOnAbnormal" : null,
        "templateType" : {
          "attributes" : { },
          "description" : "Operational",
          "sortOrder" : null,
          "name" : "Operational",
          "id" : 1,
          "_links" : {
            "self" : {
              "href" : "https://logbook-test.doozer.com/api/templateTypes/1{?projection}",
              "templated" : true
            }
          }
        },
        "numSegments" : 0,
        "numViews" : 0,
        "allowAllUsers" : true,
        "isDefaultTemplate" : true,
        "walkdown" : false,
        "evident" : false,
        "enterNotes" : true,
        "allowSubmitIncomplete" : false,
        "logId" : 59,
        "name" : "Basic Note",
        "updatedBy" : {
          "id" : 21,
          "firstName" : "Ron",
          "lastName" : "Perkins",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "updated" : "2018-06-14T19:05:36.910+0000",
        "createdBy" : {
          "id" : 25,
          "firstName" : "Robert",
          "lastName" : "Hohn",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "created" : "2017-10-20T18:31:05.407+0000",
        "id" : 108
      },
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Ron",
        "lastName" : "Perkins",
        "id" : 21,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/21{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 21,
        "firstName" : "Ron",
        "lastName" : "Perkins",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "updated" : "2018-06-14T19:03:44.003+0000",
      "createdBy" : {
        "id" : 21,
        "firstName" : "Ron",
        "lastName" : "Perkins",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-01-24T23:44:16.790+0000",
      "id" : 164,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/164/updatedBy"
        }
      }
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Branwin",
        "lastName" : "DuBose",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/9{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 9,
        "firstName" : "Branwin",
        "lastName" : "DuBose",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "updated" : "2018-02-14T23:43:57.342+0000",
      "createdBy" : {
        "id" : 9,
        "firstName" : "Branwin",
        "lastName" : "DuBose",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-14T23:43:57.342+0000",
      "id" : 180,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/180/updatedBy"
        }
      }
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "John",
        "lastName" : "Pruitt",
        "id" : 70,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/70{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 70,
        "firstName" : "John",
        "lastName" : "Pruitt",
        "updated" : "2017-07-12T18:31:05.646+0000"
      },
      "updated" : "2018-02-26T13:06:51.717+0000",
      "createdBy" : {
        "id" : 70,
        "firstName" : "John",
        "lastName" : "Pruitt",
        "updated" : "2017-07-12T18:31:05.646+0000"
      },
      "created" : "2018-02-26T13:06:51.717+0000",
      "id" : 183,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/183/updatedBy"
        }
      }
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Jay",
        "lastName" : "Newton",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/11{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "updated" : "2018-03-02T21:23:10.465+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-03-02T21:23:10.465+0000",
      "id" : 192,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/192/updatedBy"
        }
      }
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Ted",
        "lastName" : "Cook",
        "id" : 92,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/92{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 92,
        "firstName" : "Ted",
        "lastName" : "Cook",
        "updated" : "2018-04-30T16:03:08.656+0000"
      },
      "updated" : "2018-05-23T19:19:10.626+0000",
      "createdBy" : {
        "id" : 92,
        "firstName" : "Ted",
        "lastName" : "Cook",
        "updated" : "2018-04-30T16:03:08.656+0000"
      },
      "created" : "2018-05-23T19:19:10.626+0000",
      "id" : 221,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/221/updatedBy"
        }
      }
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Read",
        "sortOrder" : 1,
        "name" : "Read",
        "id" : 1,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/1{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Sandy",
        "lastName" : "Readonly",
        "id" : 27,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/27{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 27,
        "firstName" : "Sandy",
        "lastName" : "Readonly",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "updated" : "2018-08-16T21:45:41.649+0000",
      "createdBy" : {
        "id" : 27,
        "firstName" : "Sandy",
        "lastName" : "Readonly",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-16T21:45:41.649+0000",
      "id" : 235,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/235/updatedBy"
        }
      }
    }, {
      "defaultTemplate" : null,
      "role" : {
        "description" : "Admin",
        "sortOrder" : 4,
        "name" : "Admin",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
            "templated" : true
          }
        }
      },
      "user" : {
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "id" : 105,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logBookUsers/105{?projection}",
            "templated" : true
          }
        }
      },
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "updated" : "2018-12-10T15:29:49.288+0000",
      "createdBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "created" : "2018-12-10T15:29:49.288+0000",
      "id" : 249,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249"
        },
        "logUser" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249{?projection}",
          "templated" : true
        },
        "defaultTemplate" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249/defaultTemplate"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249/createdBy"
        },
        "role" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249/role"
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249/log"
        },
        "user" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249/user"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/logUsers/249/updatedBy"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://logbook-test.doozer.com/api/logUsers"
    },
    "profile" : {
      "href" : "https://logbook-test.doozer.com/api/profile/logUsers"
    }
  },
  "page" : {
    "size" : 1000,
    "totalElements" : 11,
    "totalPages" : 1,
    "number" : 0
  }
}
{
  "_embedded" : {
    "templates" : [ {
      "numViews" : 1,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : true,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 216,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Online Inspection",
      "updated" : "2017-12-13T15:24:46.956+0000",
      "createdBy" : {
        "id" : 2,
        "firstName" : "Sandy",
        "lastName" : "Syx",
        "updated" : "2016-09-16T14:33:01.897+0000"
      },
      "created" : "2017-07-06T13:56:25.499+0000",
      "updatedBy" : {
        "id" : 2,
        "firstName" : "Sandy",
        "lastName" : "Syx",
        "updated" : "2016-09-16T14:33:01.897+0000"
      },
      "id" : 68,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/68/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : true,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 158,
      "logId" : 49,
      "templateType" : {
        "attributes" : { },
        "description" : "Operational",
        "sortOrder" : null,
        "name" : "Operational",
        "id" : 1,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/1{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Monthly Plant Evaluation",
      "updated" : "2018-02-27T21:54:18.063+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-07-13T16:59:22.514+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 73,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/73/allowedUsers"
        }
      }
    }, {
      "numViews" : 4,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 231,
      "logId" : 49,
      "templateType" : {
        "attributes" : { },
        "description" : "Operational",
        "sortOrder" : null,
        "name" : "Operational",
        "id" : 1,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/1{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Mid Day System Status",
      "updated" : "2018-02-27T15:50:05.493+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-07-13T20:29:16.960+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 74,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/74/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 193,
      "logId" : 49,
      "templateType" : {
        "attributes" : { },
        "description" : "Operational",
        "sortOrder" : null,
        "name" : "Operational",
        "id" : 1,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/1{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Weekly Outside Logs",
      "updated" : "2018-08-10T12:31:14.059+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-07-15T00:28:07.209+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 75,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/75/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : true,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 15,
      "logId" : 49,
      "templateType" : {
        "attributes" : { },
        "description" : "Operational",
        "sortOrder" : null,
        "name" : "Operational",
        "id" : 1,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/1{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Daily Overview",
      "updated" : "2018-02-27T15:54:24.731+0000",
      "createdBy" : {
        "id" : 68,
        "firstName" : "Nathan",
        "lastName" : "Crocker",
        "updated" : "2017-04-18T14:59:45.417+0000"
      },
      "created" : "2017-09-26T15:11:34.388+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 95,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/95/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : true,
      "turnover" : false,
      "requireCommentOnAbnormal" : true,
      "numSegments" : 35,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Bridge Check",
      "updated" : "2018-07-23T15:23:34.935+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-01-23T15:11:12.927+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 123,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/123/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 14,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Testing Delete Segment",
      "updated" : "2018-07-30T17:55:54.963+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-07-30T14:51:27.925+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 185,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/185/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 12,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Calculation Test",
      "updated" : "2018-08-10T12:31:28.906+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-10T12:31:10.217+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 187,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/187/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 21,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Location Test Google Play Services",
      "updated" : "2018-08-16T17:37:43.394+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-16T17:37:23.352+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 189,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/189/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 22,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Location Test Current Implementation",
      "updated" : "2018-08-16T17:48:28.044+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-16T17:48:18.363+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 190,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/190/allowedUsers"
        }
      }
    }, {
      "numViews" : 0,
      "allowAllUsers" : true,
      "isDefaultTemplate" : false,
      "walkdown" : true,
      "evident" : true,
      "enterNotes" : true,
      "allowSubmitIncomplete" : false,
      "turnover" : false,
      "requireCommentOnAbnormal" : null,
      "numSegments" : 36,
      "logId" : 49,
      "templateType" : {
        "attributes" : {
          "TURNOVER" : true,
          "SECTIONAL" : true,
          "TABULAR" : true,
          "ALLOW_SUBMIT_INCOMPLETE" : true
        },
        "description" : "Inspection",
        "sortOrder" : null,
        "name" : "Inspection",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "name" : "Rail Car Unloading Checklist",
      "updated" : "2018-08-22T13:14:40.268+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:14:28.504+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 193,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193{?projection}",
          "templated" : true
        },
        "log" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193/log"
        },
        "segments" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193/segments"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193/updatedBy"
        },
        "templateType" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193/templateType"
        },
        "allowedUsers" : {
          "href" : "https://logbook-test.doozer.com/api/templates/193/allowedUsers"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://logbook-test.doozer.com/api/templates"
    },
    "profile" : {
      "href" : "https://logbook-test.doozer.com/api/profile/templates"
    }
  },
  "page" : {
    "size" : 10000,
    "totalElements" : 11,
    "totalPages" : 1,
    "number" : 0
  }
}
{
  "_embedded" : {
    "templateSegments" : [ {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 0,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Station A",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2018-02-27T16:17:32.220+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-01-23T15:11:25.394+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 1465,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1465/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : true,
      "longName" : "Station A; Guard on duty",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 50,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Guard on duty",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-01-23T15:11:39.260+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1466,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1466/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : 4,
      "minRequired" : 1,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : true,
      "longName" : "South Gate; Long tag names",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : {
        "styles" : [ ],
        "parents" : [ ],
        "longValue" : null,
        "description" : "Long worded tags",
        "dollarValue" : null,
        "viewString" : "Long worded tags (#Wordy)",
        "dateValue" : null,
        "inUse" : true,
        "stringValue" : "Wordy",
        "priority" : null,
        "id" : 680910,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/680910{?projection}",
            "templated" : true
          },
          "styles" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/680910/styles"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/680910/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/680910/updatedBy"
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/680910/log"
          },
          "parents" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/680910/parents"
          }
        }
      },
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 330,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Long tag names",
      "key" : null,
      "type" : {
        "properties" : {
          "REQUIRED_RANGE_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Choose among children of selected tag",
        "sortOrder" : null,
        "name" : "Tag Choice",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-01-31T16:18:38.095+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1507,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1507/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : 10.000000,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : "Call in for backup",
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; Days since last resupply",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 60,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Days since last resupply",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:19:45.841+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1638,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1638/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : {
        "inUse" : true,
        "logId" : 49,
        "name" : "Sat-Unsat",
        "updated" : "2018-07-23T15:23:15.044+0000",
        "createdBy" : {
          "id" : 2,
          "firstName" : "Sandy",
          "lastName" : "Syx",
          "updated" : "2016-09-16T14:33:01.897+0000"
        },
        "created" : "2017-07-10T20:57:45.930+0000",
        "updatedBy" : {
          "id" : 11,
          "firstName" : "Jay",
          "lastName" : "Newton",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2{?projection}",
            "templated" : true
          },
          "items" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/items"
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/log"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/updatedBy"
          }
        }
      },
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; Sufficient supplies",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 70,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Sufficient supplies",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to choose from a list of text options",
        "sortOrder" : null,
        "name" : "Text Choice",
        "id" : 8,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/8{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:20:11.798+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1639,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1639/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station B",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 110,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Station B",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:20:25.004+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1640,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1640/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : true,
      "longName" : "Station B; Guard on duty",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 130,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Guard on duty",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:20:35.947+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1641,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1641/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station B; Days since last resupply with a lot of text",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 140,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Days since last resupply with a lot of text",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:21:26.739+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1642,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1642/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : {
        "inUse" : true,
        "logId" : 49,
        "name" : "Sat-Unsat",
        "updated" : "2018-07-23T15:23:15.044+0000",
        "createdBy" : {
          "id" : 2,
          "firstName" : "Sandy",
          "lastName" : "Syx",
          "updated" : "2016-09-16T14:33:01.897+0000"
        },
        "created" : "2017-07-10T20:57:45.930+0000",
        "updatedBy" : {
          "id" : 11,
          "firstName" : "Jay",
          "lastName" : "Newton",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2{?projection}",
            "templated" : true
          },
          "items" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/items"
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/log"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/updatedBy"
          }
        }
      },
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station B; Sufficient supplies",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 150,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Sufficient supplies",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to choose from a list of text options",
        "sortOrder" : null,
        "name" : "Text Choice",
        "id" : 8,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/8{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:23:33.959+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1643,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1643/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station C",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 160,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Station C",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:23:44.691+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1644,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1644/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : true,
      "longName" : "Station C; Guard on duty",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 180,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Guard on duty",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:23:57.811+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1645,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1645/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station C; Days since last resupply",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 190,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Days since last resupply",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:24:20.219+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1646,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1646/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : {
        "inUse" : true,
        "logId" : 49,
        "name" : "Sat-Unsat",
        "updated" : "2018-07-23T15:23:15.044+0000",
        "createdBy" : {
          "id" : 2,
          "firstName" : "Sandy",
          "lastName" : "Syx",
          "updated" : "2016-09-16T14:33:01.897+0000"
        },
        "created" : "2017-07-10T20:57:45.930+0000",
        "updatedBy" : {
          "id" : 11,
          "firstName" : "Jay",
          "lastName" : "Newton",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2{?projection}",
            "templated" : true
          },
          "items" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/items"
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/log"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/choiceLists/2/updatedBy"
          }
        }
      },
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station C; Sufficient supplies",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 200,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Sufficient supplies",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to choose from a list of text options",
        "sortOrder" : null,
        "name" : "Text Choice",
        "id" : 8,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/8{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:24:38.961+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1647,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1647/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 210,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Station D",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:28:48.923+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1648,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1648/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station E",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 290,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Station E",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:28:54.750+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1649,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1649/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "North Gate",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 310,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "North Gate",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:29:01.901+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1650,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1650/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : true,
      "depth" : null,
      "obsolete" : false,
      "longName" : "South Gate",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 320,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "South Gate",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:29:09.915+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1651,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1651/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; Head count",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 220,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Head count",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:32:03.755+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1652,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1652/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; Head count disappeared",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 230,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Head count disappeared",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:32:10.947+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1653,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1653/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; Head count another",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 270,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Head count another",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:32:17.139+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1654,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1654/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; Head count ok",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 280,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Head count ok",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:32:23.724+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1655,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1655/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; Another numeric input",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 240,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Another numeric input",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:37:03.296+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1656,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1656/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; Another numeric input",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 250,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Another numeric input",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:37:09.569+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1657,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1657/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station E; Another numeric input",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 300,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Another numeric input",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:37:15.878+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1658,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1658/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station D; testing",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 260,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "testing",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.126+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-02-27T16:37:51.166+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1659,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1659/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "South Gate; Signoff",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 340,
      "allowAnyUser" : false,
      "users" : [ {
        "defaultTemplate" : null,
        "user" : {
          "firstName" : "Jay",
          "lastName" : "Newton",
          "id" : 11,
          "_links" : {
            "self" : {
              "href" : "https://logbook-test.doozer.com/api/logBookUsers/11{?projection}",
              "templated" : true
            }
          }
        },
        "role" : {
          "description" : "Admin",
          "sortOrder" : 4,
          "name" : "Admin",
          "id" : 3,
          "_links" : {
            "self" : {
              "href" : "https://logbook-test.doozer.com/api/logRoles/3{?projection}",
              "templated" : true
            }
          }
        },
        "updated" : "2018-07-30T15:38:27.442+0000",
        "createdBy" : {
          "id" : 11,
          "firstName" : "Jay",
          "lastName" : "Newton",
          "updated" : "2001-01-01T00:00:00.000+0000"
        },
        "created" : "2017-07-06T13:55:20.744+0000",
        "updatedBy" : {
          "id" : 92,
          "firstName" : "Ted",
          "lastName" : "Cook",
          "updated" : "2018-04-30T16:03:08.656+0000"
        },
        "id" : 118,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118{?projection}",
            "templated" : true
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118/log"
          },
          "role" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118/role"
          },
          "defaultTemplate" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118/defaultTemplate"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118/updatedBy"
          },
          "user" : {
            "href" : "https://logbook-test.doozer.com/api/logUsers/118/user"
          }
        }
      } ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Signoff",
      "key" : null,
      "type" : {
        "properties" : {
          "USERS" : true,
          "NAME" : true
        },
        "description" : "Allow user to indicate approval or rejection",
        "sortOrder" : null,
        "name" : "Signoff",
        "id" : 12,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/12{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-03-22T17:29:49.820+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1690,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1690/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : true,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "South Gate; Word",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 350,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Word",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-03-22T17:30:47.421+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1691,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1691/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; Guard on Duty",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 20,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Guard on Duty",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Allow user to select from the list of log users",
        "sortOrder" : null,
        "name" : "User Chooser",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/11{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-04-26T17:50:38.883+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1752,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1752/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station B; Guard on Duty",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 120,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Guard on Duty",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Allow user to select from the list of log users",
        "sortOrder" : null,
        "name" : "User Chooser",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/11{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-04-26T17:50:46.785+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1753,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1753/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station C; Guard on Duty",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 170,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Guard on Duty",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Allow user to select from the list of log users",
        "sortOrder" : null,
        "name" : "User Chooser",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/11{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-04-26T17:50:59.194+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1754,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1754/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; test",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 90,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "test",
      "key" : true,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Allow user to select from the list of log users",
        "sortOrder" : null,
        "name" : "User Chooser",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/11{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-05-03T14:01:51.599+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1766,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1766/createdBy"
        }
      }
    }, {
      "text" : "Testing literal text",
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 30,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : null,
      "key" : null,
      "type" : {
        "properties" : { },
        "description" : "Use this exact text",
        "sortOrder" : null,
        "name" : "Literal Text",
        "id" : 1,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/1{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-05-10T13:22:57.992+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1854,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1854/createdBy"
        }
      }
    }, {
      "text" : "Instruction text that will inform the user that they are signing away some rights or acknowledging that they can verify some information to be true.",
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ {
        "text" : "Bobby",
        "required" : true
      } ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; Liability Signoff",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 100,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Liability Signoff",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "NAME" : true
        },
        "description" : "Capture one or more physical signatures",
        "sortOrder" : null,
        "name" : "Signature",
        "id" : 13,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/13{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.125+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-07-18T15:34:41.275+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1929,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1929/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; Tag chooser",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : {
        "styles" : [ ],
        "parents" : [ ],
        "longValue" : null,
        "description" : null,
        "dollarValue" : null,
        "viewString" : "Weekdays",
        "dateValue" : null,
        "inUse" : true,
        "stringValue" : "Weekdays",
        "priority" : null,
        "id" : 334884,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884{?projection}",
            "templated" : true
          },
          "styles" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/styles"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/updatedBy"
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/log"
          },
          "parents" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/parents"
          }
        }
      },
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 80,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Tag chooser",
      "key" : null,
      "type" : {
        "properties" : {
          "REQUIRED_RANGE_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Choose among children of selected tag",
        "sortOrder" : null,
        "name" : "Tag Choice",
        "id" : 2,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/2{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-07-23T15:19:04.662+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 1999,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/1999/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : true,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; Type text here",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : 15,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 40,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Type text here",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.124+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-07-24T20:00:44.898+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2000,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2000/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : 3,
      "minRequired" : 1,
      "required" : null,
      "variable" : true,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Station A; File Attachment",
      "templateId" : 123,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 10,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "File Attachment",
      "key" : null,
      "type" : {
        "properties" : {
          "REQUIRED_RANGE_INPUT" : true,
          "NAME" : true
        },
        "description" : "Allow user to attach a file",
        "sortOrder" : null,
        "name" : "File Attachment",
        "id" : 7,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/7{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:51:43.127+0000",
      "createdBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "created" : "2019-01-28T15:51:43.040+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 4071,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4071/createdBy"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://logbook-test.doozer.com/api/templateSegments"
    },
    "profile" : {
      "href" : "https://logbook-test.doozer.com/api/profile/templateSegments"
    }
  },
  "page" : {
    "size" : 10000,
    "totalElements" : 36,
    "totalPages" : 1,
    "number" : 0
  }
}
{
  "_embedded" : {
    "templateSegments" : [ {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Date/Time",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : true,
      "includeTime" : true,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 0,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Date/Time",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a date / time value",
        "sortOrder" : null,
        "name" : "Date/Time",
        "id" : 10,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/10{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2018-08-22T13:14:56.791+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:14:56.791+0000",
      "updatedBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 2090,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2090/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : {
        "styles" : [ ],
        "parents" : [ ],
        "longValue" : null,
        "description" : null,
        "dollarValue" : null,
        "viewString" : "Weekdays",
        "dateValue" : null,
        "inUse" : true,
        "stringValue" : "Weekdays",
        "priority" : null,
        "id" : 334884,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884{?projection}",
            "templated" : true
          },
          "styles" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/styles"
          },
          "createdBy" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/createdBy"
          },
          "updatedBy" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/updatedBy"
          },
          "log" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/log"
          },
          "parents" : {
            "href" : "https://logbook-test.doozer.com/api/tagValues/334884/parents"
          }
        }
      },
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 10,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : null,
      "key" : null,
      "type" : {
        "properties" : { },
        "description" : "Insert the selected tag",
        "sortOrder" : null,
        "name" : "Tag",
        "id" : 3,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/3{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.976+0000",
      "createdBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "created" : "2019-01-28T15:49:12.800+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 4070,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/4070/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car number",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 20,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Rail Car number",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:15:55.711+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2092,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2092/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Vendor/Product",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 30,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Vendor/Product",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:16:25.665+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2093,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2093/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Gauged Gallons (Before)",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 40,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Gauged Gallons (Before)",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:16:44.296+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2094,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2094/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Gauged Gallons (After)",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 50,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Gauged Gallons (After)",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:17:14.605+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2095,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2095/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Wheels Chocks",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 60,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Wheels Chocks",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:17:32.298+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2096,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2096/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Signage",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 70,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Signage",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:17:52.524+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2097,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2097/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Grounding/Bonding",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 80,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Grounding/Bonding",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.972+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:18:05.707+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2098,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2098/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Seals/Locks",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 90,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Seals/Locks",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:18:16.351+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2099,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2099/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Containment System Opned and Ready (Verified By)",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 100,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Containment System Opned and Ready (Verified By)",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:18:35.173+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2100,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2100/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Lines Cleaned",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 110,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Lines Cleaned",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:18:44.395+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2101,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2101/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Line-Pump-Track Connections",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 120,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Line-Pump-Track Connections",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:18:58.696+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2102,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2102/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Switch #2 Locked",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 130,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Switch #2 Locked",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:19:11.046+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2103,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2103/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 140,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Unloading Procedure",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:19:32.755+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2104,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2104/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Truck/Tanker Number",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 150,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Truck/Tanker Number",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:19:58.626+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2105,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2105/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Capacity",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 160,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Capacity",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:21:08.392+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2106,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2106/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; BOL#",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 170,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "BOL#",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.973+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:21:39.517+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2107,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2107/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Arrival Time",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : true,
      "includeTime" : true,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 180,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Arrival Time",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a date / time value",
        "sortOrder" : null,
        "name" : "Date/Time",
        "id" : 10,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/10{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:22:00.373+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2108,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2108/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Departure Time",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : true,
      "includeTime" : true,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 190,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Departure Time",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a date / time value",
        "sortOrder" : null,
        "name" : "Date/Time",
        "id" : 10,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/10{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:22:24.158+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2109,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2109/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Truck Light Weight (NA if weighed at RS)",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 200,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Truck Light Weight (NA if weighed at RS)",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:22:53.874+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2110,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2110/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Truck Heavy Weight (NA if weighed at RS)",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 210,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Truck Heavy Weight (NA if weighed at RS)",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter a numeric value",
        "sortOrder" : null,
        "name" : "Numeric Input",
        "id" : 9,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/9{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:23:17.537+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2111,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2111/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Outbound Seals",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 220,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Outbound Seals",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:23:38.933+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2112,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2112/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Unloading Procedure; Retain Sample Pulled By",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 230,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Retain Sample Pulled By",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:23:55.832+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2113,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2113/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Shut Down Requirements",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 240,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Shut Down Requirements",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:24:15.951+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2114,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2114/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : 1,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : true,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 250,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Rail Car Closing Checklist",
      "key" : null,
      "type" : {
        "properties" : {
          "NAME" : true
        },
        "description" : "Add note from current input and continue",
        "sortOrder" : null,
        "name" : "Sub Template",
        "id" : 5,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/5{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:24:26.930+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2115,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2115/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Dome Lid Secure/All Bolts Tool Tight",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 260,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Dome Lid Secure/All Bolts Tool Tight",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.974+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:24:51.503+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2116,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2116/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Outlet Valves Closed and Secured",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 270,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Outlet Valves Closed and Secured",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:25:02.004+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2117,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2117/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Bottom Caps and Fitting Closed/Tool Tight",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 280,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Bottom Caps and Fitting Closed/Tool Tight",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:25:19.720+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2118,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2118/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Top Vent Cover, Valves, Plugs Closed/Tool Tight",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 290,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Top Vent Cover, Valves, Plugs Closed/Tool Tight",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:25:52.547+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2119,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2119/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Placard Number",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 300,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Placard Number",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:26:34.804+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2120,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2120/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Placard in place and in good condition",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 310,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Placard in place and in good condition",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:27:36.457+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2121,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2121/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Containment System Closed and Locked (Verified)",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 320,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Containment System Closed and Locked (Verified)",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to check a box",
        "sortOrder" : null,
        "name" : "Checkbox",
        "id" : 6,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/6{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:27:56.348+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2122,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2122/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : true,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Additional Comments",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : 20,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 330,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Additional Comments",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "CALCULATE" : true,
          "NAME" : true
        },
        "description" : "Allow user to enter text",
        "sortOrder" : null,
        "name" : "Text Input",
        "id" : 4,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/4{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:28:29.617+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2124,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2124/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Research Operation Employee #1",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 340,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Research Operation Employee #1",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Allow user to select from the list of log users",
        "sortOrder" : null,
        "name" : "User Chooser",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/11{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:28:50.277+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2125,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2125/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : null,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Research Operation Employee #2",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 350,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Research Operation Employee #2",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "KEY" : true,
          "NAME" : true
        },
        "description" : "Allow user to select from the list of log users",
        "sortOrder" : null,
        "name" : "User Chooser",
        "id" : 11,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/11{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:29:05.888+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2126,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2126/createdBy"
        }
      }
    }, {
      "text" : null,
      "level" : null,
      "choiceList" : null,
      "defaultChoice" : null,
      "textArea" : null,
      "textList" : [ ],
      "barcode" : null,
      "maxAllowed" : null,
      "minRequired" : null,
      "required" : true,
      "variable" : null,
      "minValue" : null,
      "maxValue" : null,
      "belowMinAlertMessage" : null,
      "aboveMaxAlertMessage" : null,
      "clearTime" : null,
      "depth" : null,
      "obsolete" : false,
      "longName" : "Rail Car Closing Checklist; Driver Signature",
      "templateId" : 193,
      "turnover" : null,
      "requireCommentOnAbnormal" : null,
      "print" : null,
      "units" : null,
      "width" : null,
      "height" : null,
      "tagValue" : null,
      "includeDate" : null,
      "includeTime" : null,
      "formula" : null,
      "calculate" : null,
      "decimalPlaces" : null,
      "sortOrder" : 360,
      "allowAnyUser" : null,
      "users" : [ ],
      "allowUndo" : null,
      "allowReject" : null,
      "name" : "Driver Signature",
      "key" : null,
      "type" : {
        "properties" : {
          "SIMPLE_REQUIRED_INPUT" : true,
          "NAME" : true
        },
        "description" : "Capture one or more physical signatures",
        "sortOrder" : null,
        "name" : "Signature",
        "id" : 13,
        "_links" : {
          "self" : {
            "href" : "https://logbook-test.doozer.com/api/templateSegmentTypes/13{?projection}",
            "templated" : true
          }
        }
      },
      "updated" : "2019-01-28T15:49:12.975+0000",
      "createdBy" : {
        "id" : 11,
        "firstName" : "Jay",
        "lastName" : "Newton",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2018-08-22T13:29:16.368+0000",
      "updatedBy" : {
        "id" : 105,
        "firstName" : "Brandon",
        "lastName" : "Lee",
        "updated" : "2018-12-07T23:07:25.724+0000"
      },
      "id" : 2127,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127"
        },
        "templateSegment" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127{?projection}",
          "templated" : true
        },
        "users" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/users"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/updatedBy"
        },
        "template" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/template"
        },
        "choiceList" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/choiceList"
        },
        "tagValue" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/tagValue"
        },
        "defaultChoice" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/defaultChoice"
        },
        "type" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/type"
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/templateSegments/2127/createdBy"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://logbook-test.doozer.com/api/templateSegments"
    },
    "profile" : {
      "href" : "https://logbook-test.doozer.com/api/profile/templateSegments"
    }
  },
  "page" : {
    "size" : 1000,
    "totalElements" : 37,
    "totalPages" : 1,
    "number" : 0
  }
}
{
  "_embedded" : {
    "choiceListItems" : [ {
      "inUse" : false,
      "abnormal" : null,
      "listId" : 6,
      "sortOrder" : 0,
      "value" : "Float",
      "updated" : "2017-07-13T16:26:06.660+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-07-13T16:26:06.660+0000",
      "updatedBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 15,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/15"
        },
        "choiceListItem" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/15{?projection}",
          "templated" : true
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/15/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/15/updatedBy"
        },
        "list" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/15/list"
        }
      }
    }, {
      "inUse" : false,
      "abnormal" : null,
      "listId" : 6,
      "sortOrder" : 10,
      "value" : "Boost",
      "updated" : "2017-07-13T16:26:10.406+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-07-13T16:26:10.405+0000",
      "updatedBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 16,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/16"
        },
        "choiceListItem" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/16{?projection}",
          "templated" : true
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/16/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/16/updatedBy"
        },
        "list" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/16/list"
        }
      }
    }, {
      "inUse" : false,
      "abnormal" : null,
      "listId" : 6,
      "sortOrder" : 20,
      "value" : "Auto",
      "updated" : "2017-07-13T16:26:13.886+0000",
      "createdBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "created" : "2017-07-13T16:26:13.884+0000",
      "updatedBy" : {
        "id" : 25,
        "firstName" : "Robert",
        "lastName" : "Hohn",
        "updated" : "2001-01-01T00:00:00.000+0000"
      },
      "id" : 17,
      "_links" : {
        "self" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/17"
        },
        "choiceListItem" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/17{?projection}",
          "templated" : true
        },
        "createdBy" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/17/createdBy"
        },
        "updatedBy" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/17/updatedBy"
        },
        "list" : {
          "href" : "https://logbook-test.doozer.com/api/choiceListItems/17/list"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://logbook-test.doozer.com/api/choiceListItems"
    },
    "profile" : {
      "href" : "https://logbook-test.doozer.com/api/profile/choiceListItems"
    }
  },
  "page" : {
    "size" : 1000,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}