").append(this).html(),"")}})}}if(self.schema.hasOwnProperty("description")){descriptions=li.children("p, dd");if(descriptions.length===0&&anchor.length>0){descriptions=anchor.children("p, dd")}if(descriptions.length>0){self._val(self.schema.description,descriptions.text(),parsedData,index);descriptions.each(function(){if(this.outerHTML){text=text.replace(this.outerHTML,"")}else{text=text.replace($("
").append(this).html(),"")}})}}if(self.schema.hasOwnProperty("count")){counts=li.children("span.ui-li-count");if(counts.length===0&&anchor.length>0){counts=anchor.children("span.ui-li-count")}if(counts.length>0){self._val(self.schema.count,parseInt(counts.text(),10),parsedData,index);counts.each(function(){if(this.outerHTML){text=text.replace(this.outerHTML,"")}else{text=text.replace($("
").append(this).html(),"")}})}}if(self.schema.hasOwnProperty("text")){self._val(self.schema.text,text,parsedData,index)}id=li.attr("id");if(id){if(self.schema.hasOwnProperty("value")){self._val(self.schema.value,id,parsedData,index)}}ul=li.children("ul, ol");if(ul.length>0){if(self.schema.hasOwnProperty("childData")&&self.schema.childData.hasOwnProperty("name")){parsedData[index][self.schema.childData.name]=self._list(ul)}}})}return parsedData},_select:function(data){var parsedData=[],self=this;$(data).children().each(function(i){var $curOption=$(this);parsedData[i]={};if($curOption.is("optgroup")){parsedData[i].Group={groupName:this.label,groupItems:self._select(this)}}else{self._val(self.schema.fields[0],$curOption.val(),parsedData,i);self._val(self.schema.fields[1],$curOption.text(),parsedData,i)}});return parsedData},isObjEmpty:function(obj){var prop;for(prop in obj){if(obj.hasOwnProperty(prop)){return false}}return true},fields:function(){return this.schema.fields}});$.ig.RemoteDataSource=$.ig.RemoteDataSource||$.ig.DataSource.extend({init:function(options){if(!options){options={}}options.type="remoteUrl";this._super(options);return this}});$.ig.JSONDataSource=$.ig.JSONDataSource||$.ig.DataSource.extend({settings:{type:"json"},init:function(options){if(!options){options={}}options.type="json";this._super(options);return this}});$.ig.RESTDataSource=$.ig.RESTDataSource||$.ig.DataSource.extend({settings:{restSettings:{create:{url:null,template:null,batch:false},update:{url:null,template:null,batch:false},remove:{url:null,template:null,batch:false},encodeRemoveInRequestUri:true,contentSerializer:null,contentType:"application/json; charset=utf-8"}},init:function(options){if(!options){options={}}else{this._defaultTypeOverridden=options.restSettings&&options.restSettings.contentType&&options.restSettings.contentType!==this.settings.restSettings.contentType}options.restSettings=$.extend(true,this.settings.restSettings,options.restSettings);this._createHttpHandlers();this._createLogVerbMapping();this._setLazyUrls();this._super(options);return this},saveChanges:function(success,error){var log,verb,batchOps={POST:[],PUT:[],DELETE:[],CELL:[]},i;this._asyncCallbackCount=0;this._isc=success&&typeof success==="function"?success:null;this._iec=error&&typeof error==="function"?error:null;for(i=0;i
0){this._saveAllCellChanges(batchOps.CELL)}if(batchOps.POST.length>0){this._asyncCallbackCount++;this._saveAllCreateChanges(batchOps.POST)}if(batchOps.PUT.length>0){this._asyncCallbackCount++;this._saveAllUpdateChanges(batchOps.PUT)}if(batchOps.DELETE.length>0){this._asyncCallbackCount++;this._saveAllDeleteChanges(batchOps.DELETE)}},_saveSingleChange:function(verb,change){var data,url;data=verb==="POST"||verb==="PUT"?change.row:null;url=this._getProperUrl(verb,false,verb==="DELETE"||verb==="PUT"?change.rowId:undefined);this._call(verb,url,data)},_saveAllCellChanges:function(cellLogs){var i,combined={},rowLogs=[],cl;for(i=0;i0&&url.substr(url.length-1)!=="/"){url+="/"}if(!batch||batch===false){if(this["_"+vL+"Tmpl"]!==null){url=this["_"+vL+"Tmpl"];if(id){url=url.replace("${id}",id)}}else{if(id){url+=id}}}return url},_responseOk:function(data,textStatus,jqXHR){this._asyncCallbackCount--;if(this._asyncCallbackCount===0){this._saveChangesSuccess({Success:textStatus==="success"},textStatus,jqXHR)}},_responseCreated:function(data,textStatus,jqXHR){this._asyncCallbackCount--;if(this._asyncCallbackCount===0){this._saveChangesSuccess({Success:textStatus==="success"},textStatus,jqXHR)}},_responseNoContent:function(data,textStatus,jqXHR){this._asyncCallbackCount--;if(this._asyncCallbackCount===0){this._saveChangesSuccess({Success:textStatus==="success"||textStatus==="nocontent"},textStatus,jqXHR)}},_isBatch:function(verb){switch(verb){case"POST":return this.settings.restSettings.create.batch;case"PUT":return this.settings.restSettings.update.batch;case"DELETE":return this.settings.restSettings.remove.batch;default:return false}},_call:function(verb,url,data){var dataString,ct=this.settings.restSettings.contentType,serializer=this.settings.restSettings.contentSerializer,self=this;if(serializer!==null){if(typeof serializer==="string"){serializer=window[serializer]}}if(data!==null){dataString=serializer!==null?serializer(data):JSON.stringify(data)}else{if(!this._defaultTypeOverridden){ct="text/plain"}dataString=""}this._ajaxRequest=$.ajax({type:verb,url:url,data:dataString,statusCode:this._httpHandlers[verb],contentType:ct,cache:false,success:function(data,textStatus,jqXHR){if(self._isc){self._isc(data,textStatus,jqXHR)}},error:function(jqXHR,textStatus,errorThrown){self._saveChangesError(jqXHR,textStatus,errorThrown);if(self._iec){self._iec(jqXHR,textStatus,errorThrown)}},processData:true})}});$.ig.JSONPDataSource=$.ig.JSONPDataSource||$.ig.DataSource.extend({settings:{jsonp:null,jsonpCallback:null,type:"json"},init:function(options){if(!options){options={}}options.responseDataType="jsonp";this._super(options);return this}});$.ig.XmlDataSource=$.ig.XmlDataSource||$.ig.DataSource.extend({init:function(options){if(!options){options={}}options.type="xml";this._super(options);return this}});$.ig.FunctionDataSource=$.ig.FunctionDataSource||$.ig.DataSource.extend({settings:{type:"function"},init:function(options){if(!options){options={}}options.type="function";this._super(options);return this}});$.ig.HtmlTableDataSource=$.ig.HtmlTableDataSource||$.ig.DataSource.extend({settings:{type:"htmlTableDom"},init:function(options){if(!options){options={}}options.type="htmlTableDom";this._super(options);return this}});$.ig.ArrayDataSource=$.ig.ArrayDataSource||$.ig.DataSource.extend({init:function(options){if(!options){options={}}options.type="array";this._super(options);return this}});$.ig.MashupDataSource=$.ig.MashupDataSource||$.ig.DataSource.extend({mashupSettings:{ignorePartialRecords:false,dataSource:[]},init:function(options){this._super(options);if(options){this.settings=$.extend(true,{},$.ig.DataSource.prototype.settings,options);this.settings=$.extend(true,{},$.ig.MashupDataSource.prototype.mashupSettings,this.settings)}this._sources=[];this._dataBindingComplete=false;this._sourcesStatus=[];this._hashedDataViews=[];return this},_checkDataBindingComplete:function(status,msg,ownerDs){var i,j,k,hasPrimaryKeys=true,hasForeignKeys=false,totalLength=0,data=[],merged=[],d,rindex=0,keyVal,prop,keyIndexHash,fkeyIndexHash,mergedData;this._dataBindingComplete=true;for(i=0;itotalLength?this._sources[i].dataView().length:totalLength}if(hasPrimaryKeys&&!hasForeignKeys){for(i=0;i=0;i--){if(merged[i]=d.dataView().length?"":d.dataView()[i][k]}}else{for(prop in d.dataView()[i]){if(d.dataView()[i].hasOwnProperty(prop)){data[i][prop]=i>=d.dataView().length?"":d.dataView()[i][prop]}}}}}}this.settings.dataSource=data;this.settings.type="array";this._runtimeType=this.analyzeDataSource();this.dataBind()}},_mergeSources:function(dataView,fKey,fkeyIndex,data){var newObject={},fkValueCollection;for(var recID in data){if(Array.isArray(data[recID][fKey])){newObject={};fkValueCollection=data[recID][fKey];for(var fk in fkValueCollection){var currValue=dataView[fkValueCollection[fk]];for(var variable in currValue){if(variable!==fKey){if(newObject.hasOwnProperty(variable)){newObject[variable].push(currValue[variable])}else{newObject[variable]=[currValue[variable]]}}}}data[recID]=$.extend(true,{},data[recID],newObject)}else{data[recID]=$.extend(true,{},data[recID],dataView[fkeyIndex[recID]])}}return data},setCellValue:function(rowId,colId,val,autoCommit){var rowObject=this.findRecordByKey(rowId,this._data),t,rec,self=this,newObject,lookupRecord;$(this._sources).each(function(){if(this.settings.foreignKey&&this.settings.foreignKey===colId){if(Array.isArray(val)){newObject={};for(var value in val){lookupRecord=this.dataSource()[val[value]];for(var variable in lookupRecord){if(variable!==this.settings.foreignKey){if(newObject.hasOwnProperty(variable)){newObject[variable].push(lookupRecord[variable])}else{newObject[variable]=[lookupRecord[variable]]}}else{newObject[variable]=val}}}rowObject=$.extend(true,{},rowObject,newObject)}else if(this.settings.foreignKey===colId){rowObject=$.extend(true,{},rowObject,this.dataSource()[val])}if(this.settings.primaryKey===null){rec=self._data[parseInt(rowId,10)]}else{rec=self.findRecordByKey(rowId,self._data)}for(var prop in rec){rec[prop]=rowObject[prop]}}});t=this._createCellTransaction(rowId,colId,val);this._addTransaction(t);if(autoCommit===true){this.commit(rowId)}return t},updateRow:function(rowId,rowObject,autoCommit){var t,newObject,lookupRecord,oldRow=this.settings.primaryKey===null?this._data[parseInt(rowId,10)]:this.findRecordByKey(rowId),rowIndex=this.settings.primaryKey===null?rowId:$.ig.indexInArray(this._data,oldRow);$(this._sources).each(function(){if(this.settings.foreignKey){if(Array.isArray(rowObject[this.settings.foreignKey])){newObject={};for(var value in rowObject[this.settings.foreignKey]){lookupRecord=this.dataSource()[rowObject[this.settings.foreignKey][value]];for(var variable in lookupRecord){if(variable!==this.settings.foreignKey){if(newObject.hasOwnProperty(variable)){newObject[variable].push(lookupRecord[variable])}else{newObject[variable]=[lookupRecord[variable]]}}}}rowObject=$.extend(true,{},rowObject,newObject)}else if(rowObject[this.settings.foreignKey]!==oldRow[this.settings.foreignKey]){rowObject=$.extend(true,{},rowObject,this.dataSource()[rowObject[this.settings.foreignKey]])}}});t=this._createRowTransaction(rowId,rowObject);this._addTransaction(t);if(autoCommit===true){this.commit(rowId)}if($.type(this.settings.rowUpdated)==="function"){if(this.settings.callee){this.settings.rowUpdated.apply(this.settings.callee,[{rowIndex:rowIndex,newRow:rowObject,oldRow:oldRow},this])}else{this.settings.rowUpdated({rowIndex:rowIndex,newRow:rowObject,oldRow:oldRow},this)}}return t},addRow:function(rowId,rowObject,autoCommit){var t,newObject,lookupRecord;$(this._sources).each(function(){if(this.settings.foreignKey){if(Array.isArray(rowObject[this.settings.foreignKey])){newObject={};for(var value in rowObject[this.settings.foreignKey]){lookupRecord=this.dataSource()[rowObject[this.settings.foreignKey][value]];for(var variable in lookupRecord){if(variable!==this.settings.foreignKey){if(newObject.hasOwnProperty(variable)){newObject[variable].push(lookupRecord[variable])}else{newObject[variable]=[lookupRecord[variable]]}}}}rowObject=$.extend(true,{},rowObject,newObject)}else{rowObject=$.extend(true,{},rowObject,this.dataSource()[rowObject[this.settings.foreignKey]])}}});t=this._createNewRowTransaction(rowId,rowObject);this._addTransaction(t);if(autoCommit===true){this.commit(rowId)}if($.type(this.settings.rowAdded)==="function"){if(this.settings.callee){this.settings.rowAdded.apply(this.settings.callee,[{rowId:rowId,row:rowObject},this])}else{this.settings.rowAdded({rowId:rowId,row:rowObject},this)}}return t},insertRow:function(rowId,rowObject,rowIndex,autoCommit,parentRowId){var t,newObject,lookupRecord,oldRow;$(this._sources).each(function(){if(this.settings.foreignKey){if(Array.isArray(rowObject[this.settings.foreignKey])){newObject={};for(var value in rowObject[this.settings.foreignKey]){lookupRecord=this.dataSource()[rowObject[this.settings.foreignKey][value]];for(var variable in lookupRecord){if(variable!==this.settings.foreignKey){if(newObject.hasOwnProperty(variable)){newObject[variable].push(lookupRecord[variable])}else{newObject[variable]=[lookupRecord[variable]]}}}}rowObject=$.extend(true,{},rowObject,newObject)}else{rowObject=$.extend(true,{},rowObject,this.dataSource()[rowObject[this.settings.foreignKey]])}}});t=this._createInsertRowTransaction(rowId,rowObject,rowIndex);this._addTransaction(t);if(autoCommit===true){this.commit(rowId)}if($.type(this.settings.rowInserted)==="function"){if(this.settings.callee){this.settings.rowInserted.apply(this.settings.callee,[{rowId:rowId,row:rowObject,rowIndex:rowIndex},this])}else{this.settings.rowInserted({rowId:rowId,row:rowObject,rowIndex:rowIndex},this)}}return t},dataBind:function(){var i,ds=this.settings.dataSource;if(this._dataBindingComplete||this._sources.length>0){this._dataBindingComplete=false;this._super()}else{this._dataBindingComplete=false;for(i=0;i1&&ithis._dataBoundDepth){this._dataBoundDepth=level}if($.type(data)==="array"){dataLen=data.length;for(i=0;i0){parent[layoutKey]=this._getDataLayouts(cp.children,children)}res.push(parent)}return res},_getChildrenByKeyInFlatDS:function(foreignKey,data){
var i,dr,len=data.length,fKey=this.settings.treeDS.foreignKey,others=[],children=[];for(i=0;ithis._dataBoundDepth){this._dataBoundDepth=level}dataLen=data.length;try{for(i=0;i0){dataRow[layoutKey]=this.processDataPerLevel(layout,level+1,suppressTransformation)}}}catch(e){throw new Error($.ig.util.getLocaleValue("DataSourceLocale","errorParsingArrays")+e.message)}}else{nData=this._transformCallback(data)}if(isRootLevel){this._generatedFlatData=true}return nData},getFlatDataForRecord:function(record,level){if(!record){return}var layoutKey=this.settings.treeDS.childDataKey,propertyDataLevel=this.settings.treeDS.dataLevelKey,data=record[layoutKey];if(data){if(level===undefined||level===null){level=0;if(propertyDataLevel!==null&&propertyDataLevel!==undefined&&record[propertyDataLevel]){level=record[propertyDataLevel]}}return this.generateFlatData(data,level)}},generateFlatData:function(data,level){var obj,flatData=[],flatVisibleData=[];if(!level){level=0}obj={flatData:flatData,flatVisibleData:flatVisibleData,recordsCount:0,visibleRecordsCount:0};this._generateFlatDataRecursive(data,level,obj,false);return obj},_generateFlatDataRecursive:function(data,level,obj,parentCollapsed){var i,dataRow,dataLen,exp,expDepth=this.settings.treeDS.initialExpandDepth,propertyExp=this.settings.treeDS.expandedKey,propertyDataLevel=this.settings.treeDS.dataLevelKey,layoutKey=this.settings.treeDS.childDataKey,applyPropertyDataLevel=propertyDataLevel!==null&&propertyDataLevel!==undefined,applyPropertyExp=propertyExp!==null&&propertyExp!==undefined;if(!data){data=this.data()}if(!level){level=0}if($.type(data)==="array"){dataLen=data.length;for(i=0;i=this._flatVisibleData.length?this._flatVisibleData.length:startIndex+this.pageSize();for(i=startIndex;i=level){for(i=0;i0){childDS=this.sortDataRecursive(childDS,level+1,fields,direction)}}}if((s.fromLevel<=level||s.fromLevel===-1)&&(s.toLevel>=level||s.toLevel===-1)){data=this.sortData(data,fields,direction)}return data},sortData:function(data,fields,direction){var s=this.settings.sorting,schema,sortF,convertFunc,settings=this.settings,self=this;if($.type(s.customFunc)==="function"){data=s.customFunc(data,fields,direction)}else{schema=this.settings.schema;if(!direction){direction=""}if($.type(s.compareFunc)==="function"){sortF=s.compareFunc}else{sortF=function(grid,fields,schema,reverse,convertf,caseSensitive){reverse=reverse?-1:1;function compareVals(format,enableUTCDates,rowTemplate,x,y){if(format){if($.type(x)==="date"&&$.type(y)==="date"){if(format==="time"||format==="timeLong"||format==="h:mm:ss tt"){x=new Date("January 01, 2000 "+$.ig.formatter(x,"date",format,rowTemplate,enableUTCDates));y=new Date("January 01, 2000 "+$.ig.formatter(y,"date",format,rowTemplate,enableUTCDates))}}}if((x===null||x===undefined)&&(y===null||y===undefined)){return 0}if((x===null||x===undefined)&&y!==null&&y!==undefined){return-1}if(x!==null&&x!==undefined&&(y===null||y===undefined)){return 1}return x>y?1:x=0){f.fieldName=f.fieldIndex}a=self.getCellValue(f.fieldName,obj1);b=self.getCellValue(f.fieldName,obj2);if(convertf!==undefined){a=convertf(a,f.fieldName);b=convertf(b,f.fieldName)}if(caseSensitive===false){if(a!==undefined&&a!==null&&a.toLowerCase){a=a.toLowerCase()}if(b!==undefined&&b!==null&&b.toLowerCase){b=b.toLowerCase()}}if(f.dir!==undefined&&f.dir!==null){reverse=f.dir.toLowerCase().startsWith("desc");reverse=reverse?-1:1}else if(direction!==undefined&&direction!==null&&direction!==""){reverse=direction.toLowerCase().startsWith("desc");reverse=reverse?-1:1}if(fields.length===1){arr1=reverse*compareVals(format,enableUTCDates,rowTemplate,a,b);arr2=reverse*compareVals(format,enableUTCDates,rowTemplate,b,a)}else{if(reverse===-1){arr1.push(-compareVals(format,enableUTCDates,rowTemplate,a,b));arr2.push(-compareVals(format,enableUTCDates,rowTemplate,b,a))}else{arr1.push(compareVals(format,enableUTCDates,rowTemplate,a,b));arr2.push(compareVals(format,enableUTCDates,rowTemplate,b,a))}}}if(arr1arr2){return 1}return 0}}}if($.isFunction(s.customConvertFunc)){convertFunc=s.customConvertFunc}if($.type(fields)==="string"){fields=this._parseSortExpressions(fields)}if(fields.length>0){data=data.sort(sortF(this.settings.callee,fields,schema,direction.toLowerCase().startsWith("asc")?false:true,convertFunc,s.caseSensitive));this._allDataSorted=data===this.data()}}return data},totalLocalRecordsCount:function(){var fdv=this._flatVisibleData;if(fdv&&this.settings.paging.type!=="remote"&&this.settings.treeDS.paging.mode!=="rootLevelOnly"){return fdv.length}return this._super()},pageCount:function(){var p=this.settings.paging;if(p.enabled&&p.type==="local"&&this.settings.treeDS.paging.mode==="allLevels"){return Math.ceil(this.totalLocalRecordsCount()/p.pageSize)||1}return this._super.apply(this,arguments)},getFilteringMatchRecordsCount:function(){var count=this.metadata("filtering.countRecords");if(count!==undefined&&count!==null){return count}return this.totalRecordsCount()},filter:function(fieldExpressions,boolLogic,keepFilterState,fieldExpressionsOnStrings){var i,f=this.settings.filtering,p=this.settings.paging,data,resetPaging;if(f.applyToAllData&&f.type==="local"){data=this.data();resetPaging=true}else{if(this._cachedDataView&&this._cachedDataView.length>0){data=this._cachedDataView}else{this._cachedDataView=$.merge([],this.dataView());data=this._cachedDataView}}this._filteredRecordsCount=0;this._generatedFlatData=false;this._filteredData=this._filterDataRecursive(data,0,fieldExpressions,boolLogic,keepFilterState,fieldExpressionsOnStrings);this._dataView=[];this._filter=true;if(resetPaging&&p.type==="local"&&p.enabled===true){this.settings.paging.pageIndex=0;this.pageSizeDirty(true);this._page()}else{for(i=0;i=level||fts.toLevel===-1))){childDS=data[i][layoutKey];if(childDS&&childDS.length){childDS=this._filterDataRecursive(childDS,level+1,fieldExpressions,boolLogic,keepFilterState,fieldExpressionsOnStrings);if(childDS&&childDS.length>0){filteredData[count++]=$.extend(true,{},data[i]);filteredData[count-1][layoutKey]=childDS}}continue}skipRec=false;for(j=0;j0){subDS=data[i][layoutKey];data[i][layoutKey]=null;filteredData[count++]=$.extend(true,{},data[i]);data[i][layoutKey]=subDS;filteredData[count-1][layoutKey]=childDS;foundChildDS=true;if(propertyExp){filteredData[count-1][propertyExp]=true}if(!skipRec&&matchFiltering){filteredData[count-1][matchFiltering]=true;this._filteredRecordsCount++}}}if(!skipRec&&!foundChildDS){if(fts.displayMode==="showWithAncestors"&&childDS){subDS=data[i][layoutKey];data[i][layoutKey]=null;filteredData[count]=$.extend(true,{},data[i]);data[i][layoutKey]=subDS;filteredData[count][layoutKey]=null;count++}else{if(childDS){subDS=data[i][layoutKey];data[i][layoutKey]=null}filteredData[count]=$.extend(true,{},data[i]);if(subDS){filteredData[count][layoutKey]=subDS;data[i][layoutKey]=subDS}count++}this._filteredRecordsCount++;if(matchFiltering){filteredData[count-1][matchFiltering]=true}if(childDS&&propertyExp){filteredData[count-1][propertyExp]=false}}}}return filteredData},getFilteredRecordsCountFromDataView:function(){var fdv=this.flatDataView(),i,count=0,propMatchFiltering=this.settings.treeDS.filtering.matchFiltering;if(this._filter){for(i=0;i0&&$.isArray(data[0])?this._lookupPkIndex():this.settings.primaryKey;if($.type(record)!=="object"){key=record}else{key=record[search]}resRecord=this.findRecordByKey(key,null,objPath);if(!resRecord){return null}path=objPath.path;if(path!==""){path+="/"}return path+key},_findIndexInFlatDS:function(ds,foreignKeyValue,targetInd){var i,dr,fKey=this.settings.treeDS.foreignKey,len=ds.length,lastInd,layoutInd=0,foundLayout=false;for(i=0;i0&&$.isArray(data[0])?this._lookupPkIndex():this.settings.primaryKey;objPath=objPath||{path:"",parentRows:[]};objPath.parentRows=objPath.parentRows||[];objPath.path=objPath.path||"";for(i=0;i0&&$.isArray(data[0])?this._lookupPkIndex():prime,layoutKey=this.settings.treeDS.childDataKey,layoutData=[],found=false;for(i=0;i/g,ap:/'/g,ic:/"/g,amp:/&/g},_directives:{"if":{start:"if (",close:") {",end:" }"},elseif:{start:" } else if (",close:") {",end:""},"else":{start:" } else {",close:"",end:""},each:{start:"for (var i = 0; i < $data.length; i++) {",close:"",end:" }"}},_internalTmplCache:{},_tokenizeTemplate:function(template){var tempToken,splitName;if(this.regExp.sub.test(template)){tempToken=this.regExp.sub.exec(template);while(tempToken!==null){splitName=tempToken[1].split(".");template=template.replace(new RegExp("\\$\\{"+tempToken[1].replace(/\$/g,"\\$")+"\\}","g"),"");tempToken[3]=new RegExp("\\$\\{"+tempToken[1].replace(/\$/g,"\\$")+"\\}","g");tempToken[1]=splitName;tempToken[2]=true;this.tokens.push(tempToken);tempToken=this.regExp.sub.exec(template)}}if(this.regExp.nonEncodeSub.test(template)){tempToken=this.regExp.nonEncodeSub.exec(template);while(tempToken!==null){splitName=tempToken[1].split(".");template=template.replace(new RegExp("\\{\\{html\\s+"+tempToken[1].replace(/\$/g,"\\$")+"\\}\\}","g"),"");tempToken[3]=new RegExp("\\{\\{html\\s+"+tempToken[1].replace(/\$/g,"\\$")+"\\}\\}","g");tempToken[1]=splitName;tempToken[2]=false;this.tokens.push(tempToken);tempToken=this.regExp.nonEncodeSub.exec(template)}}},_tokenizeDirectives:function(template){var tmpl='var result = "";',tokens=this.regExp.block.exec(template),temp;if(template.indexOf(tokens[0])>0||template.length!==tokens[0].length){temp=template.split(tokens[0]);if(temp[0]&&temp[0].length>0){this.args.push(temp[0]);tmpl+="result += args["+this.i++ +"];"}}tmpl+=this._handleCompleteBlock(tokens);if(temp&&temp.length>0&&temp[1].length>0){this.args.push(temp[1]);tmpl+="result += args["+this.i++ +"];"}tmpl+="return result;";return tmpl},_handleCompleteBlock:function(tokens){var tmpl=tokens[0],template="",blocks=[],i,temp;tmpl=tmpl.replace("{{"+tokens[1],this._directives[tokens[1]].start);if(tokens[1]==="each"){blocks.push(tokens[0].split(tokens[3]));blocks.push(tokens[2].split(tokens[3]));for(i=0;i0){temp=blocks[0][i].split("{{each")[0];this.args.push(temp);template+="result += args["+this.i++ +"];";blocks[0][i]=blocks[0][i].substr(blocks[0][i].indexOf("{{each"));temp=this.regExp.blockDirective.exec(blocks[1][i]);blocks[1][i]=blocks[1][i].substr(blocks[1][i].indexOf(temp[0])+temp[0].length)}blocks[0][i]=blocks[0][i].replace("{{"+tokens[1],this._directives[tokens[1]].start);template+=this._handleEach(blocks[0][i]+"{{/each}}",[blocks[0][i]+"{{/each}}","each",blocks[1][i],"{{/each}}"])}}else if(tokens[1]==="if"){template+=this._handleIfElse(tmpl,tokens)}return template},_handleEach:function(template,tokens){var tmpl=template,eachVar,body,forSub,sub,expr;eachVar=this.regExp.sub.exec(tmpl);tmpl=tmpl.replace(eachVar[0],"");tmpl=tmpl.replace("$data",eachVar[0]);body=tokens[2];if(/\$data/.test(body)){body=body.replace(/\$data/g,'" + '+eachVar[0]+'[ i ] + "');this.args.push(eachVar[0]);this.i++}forSub=this.regExp.forSub.exec(body);while(forSub){body=body.replace(new RegExp("\\$\\{"+forSub[1]+"\\}","g"),'" + '+eachVar[0]+"[ i ]"+forSub[1].substr(forSub[1].indexOf("."))+' + "');forSub=this.regExp.forSub.exec(body)}body=body.replace(/\$index/g,'" + i + "');tmpl=tmpl.replace(tokens[2],'result += "'+body+'"');tmpl=tmpl.replace(/\}\}/,this._directives[tokens[1]].close);tmpl=tmpl.replace(tokens[3],this._directives[tokens[1]].end);sub=this.regExp.sub.exec(tmpl);while(sub){expr=new RegExp("\\$\\{"+sub[1]+"\\}","g");tmpl=tmpl.replace(expr,"args["+this.i++ +"]");this.args.push(sub[0]);sub=this.regExp.sub.exec(tmpl)}return tmpl},_handleIfElse:function(template,tokens){var tmpl=template,i=0,htmlStrings,sub,inner,index,tmplArr=[];tmpl=tmpl.replace(/\}\}/,this._directives[tokens[1]].close);index=tmpl.lastIndexOf(tokens[3]);tmpl=tmpl.substr(0,index)+tmpl.slice(index+tokens[3].length-1);if(this.regExp.block.test(tmpl)){inner=this.regExp.block.exec(tmpl);tmpl=tmpl.replace(inner[0],this._handleCompleteBlock(inner))}htmlStrings=tokens[2].split(this.regExp.blockDirective);tmplArr.push(tmpl.slice(0,tmpl.indexOf(") {")+3));tmplArr.push(tmpl.slice(tmpl.indexOf(") {")+3));for(i;i0){tmplArr[1]=tmplArr[1].replace(htmlStrings[i],"result += args["+this.i++ +"];");this.args.push(htmlStrings[i])}}tmpl=tmplArr.join("");tokens=this.regExp.blockCont.exec(tmpl);while(tokens){tmpl=tmpl.replace("{{"+tokens[1],this._directives[tokens[1]].start);tmpl=tmpl.replace(/\}\}/,this._directives[tokens[1]].close);tokens=this.regExp.blockCont.exec(tmpl)}sub=this.regExp.sub.exec(tmpl);while(sub){tmpl=tmpl.replace(new RegExp("\\$\\{"+sub[1]+"\\}","g"),"args["+this.i++ +"]");this.args.push(sub[0]);sub=this.regExp.sub.exec(tmpl)}return tmpl},_populateTemplate:function(template,data){var i,j,result="",temp;if($.type(data)!=="array"){for(i=0;i1){tempData=data;for(l=0;l1){tempData=data;for(l=0;l
*
* http://www.infragistics.com/
*
* Depends on:
* jquery-1.9.1.js
* jquery.ui.core.js
* jquery.ui.widget.js
* infragistics.util.js
* infragistics.util.jquery.js
*/
(function($){$.widget("ui.igWidget",{localeWidgetName:null,localeContainer:null,options:{locale:null,language:"en",regional:"defaults"},_createWidget:function(options){this._userPreset=options;this._registerWidget();if(!options||!options.language){this.options.language=$.ig.util.language}this._superApply(arguments)},_setOption:function(option,value){if(option==="language"&&this.options.language===value){return}this._super(option,value);switch(option){case"language":case"locale":this.changeLocale();break;case"regional":this.changeRegional();break;default:break}},_registerWidget:function(){$.ig.util.widgetStack.push(this)},_unregisterWidget:function(){$.ig.util.widgetStack.splice($.ig.util.widgetStack.indexOf(this),1)},_getRegionalValue:function(key){var regional=this.options.regional;if(this.options[key]){return this.options[key]}if(typeof regional==="string"){regional=$.ig.regional[regional]}if(regional&®ional[key]){return regional[key]}else{return $.ig.regional.defaults[key]}},_getLocaleValueFromCollection:function(key,collection){return!collection?"":collection[key]||""},_getLocaleDictionary:function(){var language=this.options.language,widgetName=this.localeWidgetName||this.widgetName.replace("ig",""),localeObj=$.ig.locale[language]&&$.ig.locale[language][widgetName]||$.ig[widgetName]&&$.ig[widgetName].locale||$.ig[widgetName.toLowerCase()]&&$.ig[widgetName.toLowerCase()].locale;return localeObj},_getLocaleValue:function(key){var locale=$.extend({},this._getLocaleDictionary());locale=$.extend(locale,this.options.locale);return this._getLocaleValueFromCollection(key,locale)},_changeLocaleForElement:function($element){var key=$element.attr("data-localeid");if(key){this._changeLocaleByKey(key,$element)}},_changeLocaleByKey:function(key,$element){var attr=$element.attr("data-localeattr");if(attr){$element.attr(attr,this._getLocaleValue(key))}else{$element.text(this._getLocaleValue(key))}},changeRegional:$.noop,changeLocale:function($container){var self=this;$container=$container||this.localeContainer||this.element;$container.find("[data-localeid]").addBack("[data-localeid]").each(function(){self._changeLocaleForElement($(this))})},changeGlobalLanguage:function(){if(!this._userPreset||!this._userPreset.language){this._setOption("language",$.ig.util.language)}},changeGlobalRegional:function(){if(!this._userPreset||!this._userPreset.regional){this._setOption("regional",$.ig.util.regional)}},destroy:function(){this._unregisterWidget();this._super()}});$.extend($.ui.igWidget,{version:"19.1.20"})})($);/*!@license
* Infragistics.Web.ClientUI jQuery Shared 19.1.20
*
* Copyright (c) 2011-2019 Infragistics Inc.
*
* http://www.infragistics.com/
*
* Depends on:
* jquery-1.9.1.js
* jquery.ui.core.js
* jquery.ui.widget.js
* infragistics.util.js
* infragistics.util.jquery.js
*/
(function($){$.widget("ui.igLoading",{options:{cssClass:null,includeVerticalOffset:true},_indicator:null,_create:function(){var offset,css;css=this.options.cssClass===null?"ui-igloadingmsg":this.options.cssClass;this._hgrid=this.element.closest(".ui-iggrid-root").closest(".ui-iggrid");if(this.element.children("."+css).length===0){this._indicator=$("").appendTo(this.element).attr("id",this.element[0].id+"_loading").addClass(css);offset=this.element.igOffset();this.refreshPos()}this._yShift=this._indicator?Math.round(this._indicator.height()/2):0},indicatorElement:function(){return this._indicator},indicator:function(){return this},show:function(refresh){if(refresh!==false){this.refreshPos()}if(this._resId){clearInterval(this._resId)}this._resId=setInterval($.proxy(this._resizeContainer,this),300);this._indicator.css("display","").css("visibility","visible")},hide:function(){this._indicator.css("display","none").css("visibility","hidden");clearInterval(this._resId);this._resId=null},_resizeContainer:function(){var offset=this.element.igOffset();if(offset.top+this.element.innerHeight()/2-this._yShift!==this._indicator.css("top")){this.refreshPos()}},refreshPos:function(){var offset=this.element.igOffset(),top=offset.top+this.element.innerHeight()/2-this._yShift,left=offset.left+this.element.innerWidth()/2,verticalOffset,relativeOffset;if(this._hgrid.length>0&&top>this._hgrid.igOffset().top+this._hgrid.height()){return}if(this._hgrid.length>0&&left>this._hgrid.igOffset().left+this._hgrid.width()){return}if(this.options.includeVerticalOffset&&top>$(window).height()){verticalOffset=($(window).height()-offset.top-$(window).scrollTop())/2;top=$(window).height()-verticalOffset").appendTo(this.element).addClass(css.handleClass)}this.handles=$(".ui-igslider-handle",this.element).addClass("ui-state-default"+" ui-corner-all").bind({click:function(event){event.preventDefault()},mouseover:function(){if(!o.disabled){$(this).addClass("ui-state-hover")}},mouseout:function(){$(this).removeClass("ui-state-hover")},focus:function(){if(!o.disabled){$(".ui-igslider .ui-state-focus").removeClass("ui-state-focus");$(this).addClass("ui-state-focus")}else{$(this).blur()}},blur:function(){$(this).removeClass("ui-state-focus")},keydown:function(event){var ret=true,index=$(this).data("index.ui-igslider-handle"),allowed,curVal,newVal,step;if(self.options.disabled){return}switch(event.keyCode){case $.ui.keyCode.HOME:case $.ui.keyCode.END:case $.ui.keyCode.PAGE_UP:case $.ui.keyCode.PAGE_DOWN:case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:ret=false;if(!self._keySliding){self._keySliding=true;$(this).addClass("ui-state-active");allowed=self._start(event,index);if(allowed===false){return}}break}step=self.options.step;curVal=newVal=self.value();switch(event.keyCode){case $.ui.keyCode.HOME:newVal=self.options.min;break;case $.ui.keyCode.END:newVal=self.options.max;break;case $.ui.keyCode.PAGE_UP:newVal=self._trimValue(curVal+(self.options.max-self.options.min)/this._numpages);break;case $.ui.keyCode.PAGE_DOWN:newVal=self._trimValue(curVal-(self.options.max-self.options.min)/this._numpages);break;case $.ui.keyCode.UP:case $.ui.keyCode.RIGHT:if(curVal===self.options.max){return}newVal=self._trimValue(curVal+step);break;case $.ui.keyCode.DOWN:case $.ui.keyCode.LEFT:if(curVal===self.options.min){return}newVal=self._trimValue(curVal-step);break}self._slide(event,index,newVal);return ret},keyup:function(event){var index=$(this).data("index.ui-igslider-handle");if(self._keySliding){self._keySliding=false;self._stop(event,index);self._change(event,index);$(this).removeClass("ui-state-active")}}}).each(function(i){$(this).data("index.ui-igslider-handle",i)});this.handle=this.handles.eq(0);this._renderBookmarks();this._refreshValue();this._animateOff=false},_renderBookmarks:function(){if(this.options.bookmarks&&this.options.bookmarks.length>0){var len=this.options.bookmarks.length,i=0,o=this.options,css=this.css,mark,self=this;for(i;i").appendTo(this.element).data("index.ui-igslider-bookmark",i).addClass(mark.disabled?css.bookmarkDisabledClass:css.bookmarkClass).addClass(mark.css&&mark.css.length>0?mark.css:"").css("left",o.min!==o.max?(mark.value-o.min)/(o.max-o.min)*100+"%":"0%")}this.bookmarks=$(".ui-igslider-bookmark",this.element).addClass("ui-state-default").bind({mousedown:function(event){var noCancel=true,bookmarkIndex=$(this).data("index.ui-igslider-bookmark");event.preventDefault();event.stopPropagation();noCancel=self._bookmarkClicked(event,bookmarkIndex);if(self.options.syncHandleWithBookmark&&noCancel){self._slide(event,0,self.options.bookmarks[bookmarkIndex].value)}},mouseover:function(event){if(!o.disabled){$(this).addClass("ui-state-hover");if(self.options.showBookmarkTitle){self._showBookmarkTitle($(this),event)}}},mouseout:function(){if(!o.disabled){$(this).removeClass("ui-state-hover");if(self.options.showBookmarkTitle){self._hideBookmarkTitle($(this))}}},click:function(event){event.preventDefault()}});this._createBookmarkTooltip();this._buildBookmarkHit()}},destroy:function(){this.handles.remove();this.clearBookmarks();this.element.removeClass(this.css.baseClasses+" ui-igslider-horizontal"+" ui-igslider-vertical"+" ui-igslider-disabled").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_id:function(suffix){return this.element[0].id+suffix},_showBookmarkTitle:function(bookmark,browserEvent){var tooltip=$("#"+this._id("_tooltip")),title=this.options.bookmarks[bookmark.data("index.ui-igslider-bookmark")].title;if(title&&title.length>0){tooltip.igTooltip("option","text",title);tooltip.css("top",browserEvent.pageY-tooltip.outerHeight()-5).css("left",browserEvent.pageX-tooltip.width()/2+bookmark.width()/2).show()}},_hideBookmarkTitle:function(){$("#"+this._id("_tooltip")).hide()},_createBookmarkTooltip:function(){var html='';$(html).appendTo($(document.body)).igTooltip({arrowLocation:"bottom"}).hide()},clearBookmarks:function(){if(this.bookmarks){$("#"+this._id("_tooltip")).remove();this.bookmarks.remove()}},_mouseCapture:function(event){var o=this.options,position,normValue,index=0,handle=this.handles.eq(index),self=this,offset,mouseOverHandle;if(o.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.igOffset();position={x:event.pageX,y:event.pageY};normValue=this._normValueFromMouse(position);this._mouseSliding=true;self._handleIndex=index;handle.addClass("ui-state-active");if(!$.ig.util.isOpera){handle.focus()}offset=handle.offset();mouseOverHandle=!$(event.target).addBack().is(".ui-igslider-handle");this._clickOffset=mouseOverHandle?{left:0,top:0}:{left:event.pageX-offset.left-handle.width()/2,top:event.pageY-offset.top-handle.height()/2-(parseInt(handle.css("borderTopWidth"),10)||0)-(parseInt(handle.css("borderBottomWidth"),10)||0)+(parseInt(handle.css("marginTop"),10)||0)};this._slide(event,index,normValue);this._animateOff=true;this._mouseUpHandler=function(event){return self._mouseStop(event)};$(document).bind("mouseup."+this.widgetName,this._mouseUpHandler);return true},_mouseStart:function(event){$(document).unbind("mouseup."+this.widgetName,this._mouseUpHandler);return this._start(event,this._handleIndex)},_mouseDrag:function(event){var position={x:event.pageX,y:event.pageY},normValue=this._normValueFromMouse(position);this._slide(event,this._handleIndex,normValue);return false},_mouseStop:function(event){var self=this;this.handles.removeClass("ui-state-active");setTimeout(function(){self._mouseSliding=false},1e3);this._stop(event,this._handleIndex);this._change(event,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){var o=this.options,css=this.css;if(o.orientation==="vertical"){this.orientation="vertical";this.element.removeClass(css.horizontalOrientationClass).addClass(css.verticalOrientationClass)}else{this.orientation="horizontal";this.element.removeClass(css.verticalOrientationClass).addClass(css.horizontalOrientationClass)}},_normValueFromMouse:function(position){var pixelTotal,pixelMouse,percentMouse,valueTotal,valueMouse;if(this.orientation==="horizontal"){pixelTotal=this.elementSize.width;pixelMouse=position.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{pixelTotal=this.elementSize.height;pixelMouse=position.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}percentMouse=pixelMouse/pixelTotal;if(percentMouse>1){percentMouse=1}if(percentMouse<0){percentMouse=0}if(this.orientation==="vertical"){percentMouse=1-percentMouse}valueTotal=this.options.max-this.options.min;valueMouse=this.options.min+percentMouse*valueTotal;return this._trimValue(valueMouse)},_start:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};return this._trigger(this.events.start,event,uiHash)},_slide:function(event,index,newVal){var allowed;if(newVal!==this.value()){allowed=this._trigger(this.events.slide,event,{handle:this.handles[index],value:newVal});if(allowed!==false){this.value(newVal)}}},_stop:function(event,index){var uiHash={handle:this.handles[index],value:this.value()};this._trigger(this.events.stop,event,uiHash)},_change:function(event,index){if(!this._keySliding&&!this._mouseSliding){var uiHash={handle:this.handles[index],value:this.value()};this._trigger(this.events.change,event,uiHash);this._checkBookmarkHit(uiHash.value,event);if(uiHash.value===this.options.max&&this._marksHit&&this._marksHit.length===0){this._buildBookmarkHit()}}},_checkBookmarkHit:function(currentValue,event){if(this._marksHit&&this._marksHit.length>0&¤tValue>=this._marksHit[0].value){var index=this._marksHit[0].index;this._marksHit.shift();this._bookmarkHit(event,index)}},_buildBookmarkHit:function(){var b=this.options.bookmarks||[],i=b.length-1;this._marksHit=[];for(i;i>=0;i--){if(!b[i].disabled){this._marksHit.push({value:b[i].value,index:i})}}this._marksHit.sort(this._sortBookmarksJSON);this._marksHit=$.extend(true,[],this._marksHit)},_sortBookmarksJSON:function(a,b){return a.value-b.value},_bookmarkClicked:function(event,index){var uiHash={bookmarkElement:this.bookmarks[index],bookmark:this.options.bookmarks[index]};return this._trigger(this.events.bookmarkClick,event,uiHash)},_bookmarkHit:function(event,index){var uiHash={bookmarkElement:this.bookmarks[index],bookmark:this.options.bookmarks[index]};if(uiHash.bookmarkElement){this._trigger(this.events.bookmarkHit,event,uiHash)}},value:function(newValue){if(arguments.length){this.options.value=this._trimValue(newValue);this._refreshValue();this._change(null,0)}return this._value()},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);switch(key){case"disabled":if(value){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case"orientation":this._detectOrientation();this._refreshValue();break;case"value":if(this._mouseSliding===true){return}this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case"bookmarks":this.clearBookmarks();this._renderBookmarks();break}},_value:function(){return this._trimValue(this.options.value)},_trimValue:function(val){if(valthis.options.max){return this.options.max}var step=this.options.step>0?this.options.step:1,valModStep=val%step,alignValue=val-valModStep;if(Math.abs(valModStep)*2>=step){alignValue+=valModStep>0?step:-step}return parseFloat(alignValue.toFixed(5))},_normPercentValue:function(val){var decrease=0,retVal=val;if(this.orientation==="vertical"){decrease=(this.handle.outerHeight()/this.element.outerHeight()).toFixed(2)*100}if(val-decrease>0){retVal=val-decrease}return retVal},_refreshValue:function(){var o=this.options,control=this,animate=!this._animateOff?o.animate:false,_set={},value=this.value(),valueMin=this.options.min,valueMax=this.options.max,valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0;_set[control.orientation==="horizontal"?"left":"bottom"]=this._normPercentValue(valPercent)+"%";this.handle.stop(1,1)[animate?"animate":"css"](_set,o.animate)}});$.extend($.ui.igSlider,{version:"19.1.20"});$.widget("ui.igProgressBar",{options:{animate:false,animateTimeout:100,max:100,min:0,orientation:"horizontal",value:0,width:"0px",height:"0px",range:false,queue:true,endValue:100},css:{baseClasses:"ui-igprogressbar ui-widget ui-widget-content ui-corner-all",horizontalOrientationClass:"ui-igprogressbar-horizontal",verticalOrientationClass:"ui-igprogressbar-vertical",disabledClass:"ui-igprogressbar-disabled ui-disabled",progressRangeClass:"ui-igprogressbar-range ui-widget-header ui-corner-all"},events:{change:"change"},_animationOff:true,widget:function(){return this.element},_detectOrientation:function(){var css=this.css;if(this.options.orientation==="vertical"){this.orientation="vertical";this.element.removeClass(css.horizontalOrientationClass).addClass(css.verticalOrientationClass)}else{this.orientation="horizontal";this.element.removeClass(css.verticalOrientationClass).addClass(css.horizontalOrientationClass)}},_id:function(suffix){return this.element[0].id+suffix},_create:function(){var o=this.options,css=this.css;this._detectOrientation();this.element.addClass(css.baseClasses);if(o.disabled){this.element.addClass(css.disabledClass)}if(o.width!=="0px"){this.element.css("width",o.width)}if(o.height!=="0px"){this.element.css("height",o.height)}if(o.orientation==="horizontal"){$('').appendTo(this.element)}else{$('').appendTo(this.element)}this._refreshValue()},destroy:function(){this.element.removeClass("ui-igprogressbar"+" ui-igprogressbar-horizontal"+" ui-igprogressbar-vertical"+" ui-igprogressbar-disabled"+" ui-widget"+" ui-widget-content"+" ui-corner-all").removeData("igProgressBar").unbind(".igProgressBar");$("#"+this._id("_progress")).remove();return this},_change:function(event){var uiHash={value:this.value()};this._trigger(this.events.change,event,uiHash)},value:function(newValue){if(arguments.length){this.options.value=this._trimValue(newValue);this._refreshValue();this._change(null)}return this.options.value},_setOption:function(key,value){$.Widget.prototype._setOption.apply(this,arguments);var o=this.options;switch(key){case"disabled":if(value){this.element.addClass(this.css.disabledClass)}else{this.element.removeClass(this.css.disabledClass)}break;case"orientation":this._detectOrientation();this._refreshValue();break;case"value":this._animationOff=true;o.value=this._trimValue(value);this._refreshValue();this._change(null);this._animationOff=false;break;case"endValue":o.endValue=this._trimValue(value);this._refreshValue();break;case"max":if(o.endValue>o.max){o.endValue=o.max;this._refreshValue()}break;case"width":this.element.css("width",value);break;case"height":this.element.css("height",value);break;case"animate":o.animate=value;break;case"animateTimeout":o.animateTimeout=value;break;default:break}},_trimValue:function(val){if(valthis.options.max){return this.options.max}return parseInt(val,10)},_refreshValue:function(){var o=this.options,additionalOptions={duration:o.animateTimeout,queue:o.queue},value=o.value,valueMin=o.min,valueMax=o.max,valueEnd=o.endValue,valPercent=valueMax!==valueMin?(value-valueMin)/(valueMax-valueMin)*100:0,valueEndPercent=value!==valueEnd?(valueEnd-value)/(valueMax-valueMin)*100:0,progressBar=$("#"+this._id("_progress"));if(o.range){if(o.orientation==="horizontal"){progressBar.css("left",valPercent+"%").css("width",valueEndPercent+"%")}else{progressBar.css("bottom",valPercent+"%").css("height",valueEndPercent+"%")}}else{if(o.animate===true){if(o.orientation==="horizontal"){if(progressBar[0].style.width==="0%"){progressBar.css({width:"0px"})}if(progressBar.is(":hidden")===false){progressBar.animate({width:valPercent+"%"},additionalOptions)}else{progressBar.css("width",valPercent+"%")}}else{if(progressBar[0].style.height==="0%"){progressBar.css({height:"0px"})}if(progressBar.is(":hidden")===false){progressBar.animate({height:valPercent+"%"},o.animateTimeout)}else{progressBar.animate({height:valPercent+"%"},o.animateTimeout)}}}else{if(o.orientation==="horizontal"){progressBar.css("width",valPercent+"%")}else{progressBar.css("height",valPercent+"%")}}}}});$.extend($.ui.igProgressBar,{version:"19.1.20"});$.widget("ui.igButton",{options:{width:null,height:null,link:{href:null,target:null,title:null},labelText:"",centerLabel:false,css:null,onlyIcons:false,icons:{primary:null,secondary:null},title:false},_id:function(suffix){return this.element[0].id+suffix},_create:function(){var self=this,o=self.options,e=this.element,inputType,css={buttonClassIE6:"ui-ie6",buttonClasses:"ui-button ui-igbutton ui-widget "+"ui-widget-content ui-corner-all ui-state-default",buttonHoverClasses:"ui-state-hover",buttonActiveClasses:"ui-state-active",buttonFocusClasses:"ui-state-focus",buttonLabelClass:"ui-button-text",buttonDisabledClass:"ui-state-disabled",buttonPrimaryIconClass:"ui-button-icon-primary ui-icon",buttonMainElementPrimaryIconClass:" ui-button-text-icon-primary",buttonMainElementSecondaryIconClass:" ui-button-text-icon-secondary",buttonSecondaryIconClass:"ui-button-icon-secondary ui-icon",buttonIconsOnly:"ui-button-icons-only",buttonIconOnly:"ui-button-icon-only",buttonIcons:"ui-button-text-icons",buttonTextOnlyClass:"ui-button-text-only"};this._attached=false;o.css=$.extend(css,o.css);self._getInitValues();if(e.is("div")){self._renderDivButton()}else if(e.is("a")){self._renderAHref()}else if(e.is("input")){inputType=e.attr("type").toUpperCase();if(inputType==="BUTTON"||inputType==="SUBMIT"||inputType==="RESET"){self._renderInput()}else{return}}else if(e.is("button")){self._renderButton()}else{return}if(o.width!==null){self._setWidth(o.width)}if(o.height!==null){self._setHeight(o.height)}e.addClass(o.css.buttonClasses).addClass(o.css.buttonDefaultClasses);if(o.centerLabel===true){self._centerLabel()}if(o.disabled){self._disableButton()}else{self._enableButton()}self._setOnlyIcons();e.attr("role","button");e.attr("aria-disabled","false");self._attachButtonEvents();self.setTitle(o.title);return this},setTitle:function(title){var e=this.element;if(title===false){e.removeAttr("title")}else{e.attr("title",title)}},widget:function(){return this.element},_isRedirect:function(){return this.options.link.href!==null},_renderDivButton:function(){this._setLabel()},_renderAHref:function(){this._setLabel()},_renderInput:function(){var e=this.element;e.attr("value",this.options.labelText)},_renderButton:function(){this._setLabel()},_disableButton:function(){var self=this,e=self.element;e.addClass(self.options.css.buttonDisabledClass);if(e.is("a")===true){e.removeAttr("href");e.removeAttr("target");e.removeAttr("title")}else{e.attr("disabled","true")}},_enableButton:function(){var self=this,e=self.element,o=this.options;if(e.hasClass(o.css.buttonDisabledClass)){e.removeClass(o.css.buttonDisabledClass)}e.removeAttr("disabled");if(e.is("a")===true){self._setLinkOptions(true)}},_setLabel:function(){var e=this.element,o=this.options,icons=o.icons,css=o.css,html="",isSetPrimary=this._isSetPrimaryIcon(),isSetSecondary=this._isSetSecondaryIcon(),labelText=o.labelText===null||o.labelText===""?e.text():o.labelText;e.attr("title",o.labelText);if(e.is("input")){e.attr("value",o.labelText);return}if(isSetPrimary){html+=''}html+=''+labelText+"";if(isSetSecondary){html+=''}if(isSetPrimary&&isSetSecondary&&!o.onlyIcons){e.addClass(css.buttonIcons)}else if(o.onlyIcons){this._setOnlyIcons()}else if(isSetPrimary){e.addClass(css.buttonMainElementPrimaryIconClass)}else if(isSetSecondary){e.addClass(css.buttonMainElementSecondaryIconClass)}else{e.addClass(css.buttonTextOnlyClass)}e.html(html)},_setOnlyIcons:function(){var e=this.element,css=this.options.css;if(this.options.onlyIcons===false){if(e.hasClass(css.buttonIconsOnly)){e.removeClass(css.buttonIconsOnly)}if(e.hasClass(css.buttonIconOnly)){e.removeClass(css.buttonIconOnly)}if(this._isSetPrimaryIcon()&&this._isSetSecondaryIcon()){e.addClass(css.buttonIcons)}}else{if(this._isSetPrimaryIcon()&&this._isSetSecondaryIcon()){e.addClass(css.buttonIconsOnly)}else{e.addClass(css.buttonIconOnly)}}},_setLinkOptions:function(isAHref){var self=this,e=self.element,o=this.options;if(isAHref){if(o.link!==null&&o.link.href!==null){e.attr("href",o.link.href)}else if(e.attr("href")!==undefined){e.removeAttr("href")}if(o.link!==null&&o.link.target!==null){e.attr("target",o.link.target)}else if(e.attr("target")!==undefined){e.removeAttr("target")}if(o.link!==null&&o.link.title!==null){e.attr("title",o.link.title)}else if(e.attr("title")!==undefined){e.removeAttr("title")}}},_setWidth:function(value){var e=this.element;if(value===null){e.css("width","")}else{e.css("width",value)}},_setHeight:function(value){var e=this.element;if(value===null){e.css("height","")}else{e.css("height",value)}},_setOption:function(key,val){var e=this.element,self=this;$.Widget.prototype._setOption.apply(this,[key,val]);switch(key){case"width":self._setWidth(val);break;case"height":self._setHeight(val);break;case"link":self._setLinkOptions(e.is("a")===true);break;case"disabled":val=Boolean(val);if(val===true){self._disableButton()}else{self._enableButton()}break;case"labelText":self._setLabel();break;case"centerLabel":val=Boolean(val);if(val){self._centerLabel()}else{self._removeCenterLabel()}break;case"onlyIcons":val=Boolean(val);self._setOnlyIcons();break;case"icons":self._setLabel();break;case"title":self.setTitle(val);break;default:break}},_centerLabel:function(){var self=this,e=self.element,l=$("#"+self._id("_lbl")),left=(e.width()-l.width())/2,top=(e.height()-l.height())/2;l.css({position:"relative",top:top+"px",left:left+"px"})},_removeCenterLabel:function(){var self=this,l=$("#"+self._id("_lbl"));if(l.length>0){l.css({position:"",top:"",left:""})}},_dettachEvents:function(){this._attached=false;this.element.unbind(this._events)},_onMouseOver:function(event){var noCancel;if(this.options.disabled===true){return}noCancel=this._trigger("mouseover",event);if(noCancel){this.element.addClass(this.options.css.buttonHoverClasses)}},_onMouseOut:function(event){var self=this,e=self.element,o=this.options,noCancel;if(o.disabled===true){return}noCancel=self._trigger("mouseout",event);if(noCancel){e.removeClass(o.css.buttonHoverClasses)}},_onClick:function(event){var e=this.element,self=this,o=this.options,noCancel;if(o.disabled===true){return}noCancel=self._trigger("click",event);if(noCancel){this.element.removeClass(o.css.buttonHoverClasses);if(self._isRedirect()===true&&e.is("a")===false){if(o.link.target==="_blank"){window.open(o.link.href)}else{window.location=o.link.href}}}},_onMouseDown:function(event){var e=this.element,o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("mousedown",event);if(noCancel){e.removeClass(o.css.buttonHoverClasses);e.addClass(o.css.buttonActiveClasses)}},_onMouseUp:function(event){var o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("mouseup",event);if(noCancel){this.element.removeClass(o.css.buttonHoverClasses);this.element.removeClass(o.css.buttonActiveClasses)}},_onFocus:function(event){var o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("focus",event);if(noCancel){this.element.addClass(o.css.buttonFocusClasses)}},_onBlur:function(event){var o=this.options,noCancel;if(o.disabled===true){return}noCancel=this._trigger("blur",event);if(noCancel){this.element.removeClass(o.css.buttonActiveClasses);this.element.removeClass(o.css.buttonFocusClasses)}},_onKeyDown:function(event){var o=this.options;if(o.disabled===true){return}this._trigger("keydown",event)},_attachButtonEvents:function(){var self=this,e=self.element;if(this._attached===true){return}this._attached=true;this._events={mouseover:function(e){self._onMouseOver(e,self)},click:function(e){self._onClick(e)},mouseout:function(e){self._onMouseOut(e)},mousedown:function(e){self._onMouseDown(e)},mouseup:function(e){self._onMouseUp(e)},focus:function(e){self._onFocus(e)},blur:function(e){self._onBlur(e)},keydown:function(e){self._onKeyDown(e)}};e.bind(this._events)},_isSetPrimaryIcon:function(){var primary=this.options.icons.primary,isSet=false;if(primary!==undefined&&primary!==null){isSet=true}return isSet},_isSetSecondaryIcon:function(){var secondary=this.options.icons.secondary,isSet=false;if(secondary!==undefined&&secondary!==null){isSet=true}return isSet},destroy:function(){this._dettachEvents();this._rollbackInitValues();this._events=null;this._innerHTML=null;this._initialAttributes=null;$.Widget.prototype.destroy.apply(this,arguments)},_getInitValues:function(){var e=this.element,attr,i;this._innerHTML=e.html();this._initialAttributes=[];attr=e[0].attributes;for(i=0;i0?this.options.text:"";$(''+t+"
").appendTo(this.element)},_createArrowDiv:function(){$('').appendTo(this.element)},destroy:function(){this.element.children().remove();this.element.removeClass(this.css.baseClasses)}});$.extend($.ui.igTooltip,{version:"19.1.20"});$.widget("ui.mouseWrapper",$.ui.mouse,{options:{cancel:":input,option",distance:1,delay:0},events:{start:"start",drag:"drag",stop:"stop",capture:"capture"},_create:function(){var self=this,originalMouseDown=this._mouseDown;if($.ig.util.isIE9){this._mouseDown=function(event){var originalPreventDefault=event.preventDefault,result;event.preventDefault=function(){};result=originalMouseDown.apply(self,[event]);event.preventDefault=originalPreventDefault;return result}}this._mouseInit()},destroy:function(){this._mouseDestroy();return this},_mouseStart:function(event){return this._trigger(this.events.start,event)},_mouseDrag:function(event){return this._trigger(this.events.drag,event)},_mouseStop:function(event){return this._trigger(this.events.stop,event)},_mouseCapture:function(event){return this._trigger(this.events.capture,event)}});$.widget("ui.igResponsiveContainer",{options:{pollingInterval:500},_createWidget:function(options,element){this._callbacks=[];this._element=element;this._pollerHandler=$.proxy(this._pollerTick,this);this._startPoller();this._width=this._getCurrentWidth();this._height=this._getCurrentHeight();$.Widget.prototype._createWidget.apply(this,arguments)},destroy:function(){this._stopPoller();this._callbacks=[];$.Widget.prototype.destroy.call(this);return this},startPoller:function(){this._startPoller()},stopPoller:function(){this._stopPoller()},removeCallback:function(callbackId){if(callbackId>=0&&callbackIdcb.step){cb.callback.apply(cb.owner,[nw,nh]);cb.cWidth=nw;cb.cHeight=nh;called=true}}if(cb.top===true&&called===false){if(Math.abs(cb.cHeight-nh)>cb.step){cb.callback.apply(cb.owner,[nw,nh]);cb.cWidth=nw;cb.cHeight=nh}}}this._width=nw;this._height=nh},_getCurrentWidth:function(){return this._element.offsetWidth},_getCurrentHeight:function(){return this._element.offsetHeight}});$.extend($.ui.igResponsiveContainer,{version:"19.1.20"})})($);/*!@license
* Infragistics.Web.ClientUI Scroll 19.1.20
*
* Copyright (c) 2011-2019 Infragistics Inc.
*
* http://www.infragistics.com/
*
* Depends on:
* jquery-1.9.1.js
* jquery.ui-1.9.0.js
* jquery.ui.widget.js
* infragistics.util.js
* infragistics.util.jquery.js
* infragistics.ui.widget.js
*/
(function($){var setPointerCaptureFName=typeof Element.prototype.msSetPointerCapture==="function"?"msSetPointerCapture":"setPointerCapture",releasePointerCaptureFName=typeof Element.prototype.msReleasePointerCapture==="function"?"msReleasePointerCapture":"releasePointerCapture";$.widget("ui.igScroll",$.ui.igWidget,{options:{alwaysVisible:false,scrollbarType:"custom",minThumbSize:15,modifyDOM:true,scrollHeight:null,scrollWidth:null,scrollTop:0,scrollLeft:0,wheelStep:50,smallIncrementStep:40,bigIncrementStep:null,smoothing:false,smoothingStep:1,smoothingDuration:1,inertiaStep:1,inertiaDuration:1,swipeToleranceX:30,inertiaDeltaX:1.25,inertiaDeltaY:2,syncedElemsH:[],syncedElemsV:[],scrollbarH:null,scrollbarV:null,scrollOnlyHBar:false,scrollOnlyVBar:false,scrollbarHParent:null,scrollbarVParent:null},events:{rendered:null,scrolling:null,scrolled:null,thumbDragStart:null,thumbDragMove:null,thumbDragEnd:null,resizing:null,resized:null},css:{scrollableElem:"igscroll-scrollable",touchScrollableElem:"igscroll-touchscrollable",scrollContent:"igscroll-content",scrollContainer:"igscroll-container",nativeVScrollOuter:"igscroll-vnative-outer",nativeVScrollOuterSingle:"igscroll-vnative-outer-single",nativeVScrollInner:"igscroll-vnative-inner",nativeHScrollOuter:"igscroll-hnative-outer",nativeHScrollOuterSingle:"igscroll-hnative-outer-single",nativeHScrollInner:"igscroll-hnative-inner",nativeScrollFiller:"igscroll-filler",verticalScrollContainer:"igscroll-vcontainer",verticalScrollTrack:"igscroll-vtrack",verticalScrollTrackSingleScrollbar:"igscroll-vtrack-single",verticalScrollArrow:"igscroll-varrow",verticalScrollArrowHidden:"igscroll-varrow-hidden",verticalScrollArrowUp:"igscroll-uparrow",verticalScrollArrowDown:"igscroll-downarrow",verticalScrollArrowDownSingleScrollbar:"igscroll-downarrow-single",verticalScrollThumbDrag:"igscroll-vdrag",verticalScrollThumbDragThin:"igscroll-vdrag-thin",verticalScrollThumbDragHidden:"igscroll-vdrag-hidden",verticalScrollThumbDragBig:"igscroll-vdrag-big",horizontalScrollContainer:"igscroll-hcontainer",horizontalScrollTrack:"igscroll-htrack",horizontalScrollTrackSingleScrollbar:"igscroll-htrack-single",horizontalScrollArrow:"igscroll-harrow",horizontalScrollArrowHidden:"igscroll-harrow-hidden",horizontalScrollArrowLeft:"igscroll-leftarrow",horizontalScrollArrowRight:"igscroll-rightarrow",horizontalScrollArrowRightSingleScrollbar:"igscroll-rightarrow-single",horizontalScrollThumbDrag:"igscroll-hdrag",horizontalScrollThumbDragThin:"igscroll-hdrag-thin",horizontalScrollThumbDragHidden:"igscroll-hdrag-hidden",horizontalScrollThumbDragBig:"igscroll-hdrag-big",disabledSelection:"igscroll-select-disabled",syncedElemContentV:"igscroll-vsynced-content",syncedElemContentH:"igscroll-hsynced-content"},refresh:function(){this._elemWidth=this.element.width();this._elemHeight=this.element.height();if(this.options.modifyDOM){this._container.css({width:this._elemWidth+"px",height:this._elemHeight+"px"})}this._contentWidth=this._getContentWidth();this._percentInViewH=this._elemWidth/this._contentWidth;this._isScrollableH=this._percentInViewH<1;this._contentHeight=this._getContentHeight();this._percentInViewV=this._elemHeight/this._contentHeight;this._isScrollableV=this._percentInViewV<1;this._refreshScrollbars();return this.element},_create:function(){var elem=this.element;this._bKeyboardNavigation=true;this._renderVerticalScrollbar=true;this._renderHorizontalScrollbar=true;this._bMixedEnvironment=$.ig.util.getScrollWidth()>0||!$.ig.util.isTouchDevice();this._linkedHElems=[];this._linkedVElems=[];this._linkedHBar=null;this._linkedVBar=null;this._elemWidth=elem.width();this._elemHeight=elem.height();this._showScrollbarsAnimId=0;this._hideScrollbarID=0;this._toSimpleScrollbarsID=0;this._touchInertiaAnimID=0;this._mOverContainer=false;this._mOverScrollbars=false;this._scrollFromSyncContentH=false;this._scrollFromSyncContentV=false;this._bInternalScroll=false;this._cancelScrolling=false;this._cancelThumbDrag=false;this._numSmoothAnimation=0;elem.addClass(this.css.touchScrollableElem);if(this.options.modifyDOM){elem.addClass(this.css.scrollableElem);this._content=$("").addClass(this.css.scrollContent).appendTo(elem).append(elem.contents());this._container=$("").addClass(this.css.scrollContainer).css({width:this._elemWidth+"px",height:this._elemHeight+"px"}).insertBefore(this._content).append(this._content);this._container.data("containerName","scrollContainer");if(this.element.attr("tabindex")){this._container.attr("tabindex",this.element.attr("tabindex"))}}else{this._container=elem;this._content=$(elem.children()[0]);this._contentX=null}this._contentHeight=this._content[0].scrollHeight;this._contentWidth=this._content[0].scrollWidth;this._percentInViewH=this._elemWidth/this._contentWidth;this._percentInViewV=this._elemHeight/this._contentHeight;this._isScrollableV=this._percentInViewV<1;this._isScrollableH=this._percentInViewH<1;this._initOptions(this.options);this._startX=0;this._startY=0;this._touchStartX=0;this._touchStartY=0;this._moving=false;this._evts={scroll:$.proxy(this._onScrollContainer,this),wheel:$.proxy(this._onWheelContainer,this),DOMMouseScroll:$.proxy(this._onWheelContainer,this),pointerdown:$.proxy(this._onPointerDownContainer,this),pointerup:$.proxy(this._onPointerUpContainer,this),MSPointerDown:$.proxy(this._onPointerDownContainer,this),MSGestureStart:$.proxy(this._onMSGestureStartContainer,this),MSGestureChange:$.proxy(this._onMSGestureChangeContainer,this),MSGestureEnd:$.proxy(this._onMSGestureEndContainer,this),touchstart:$.proxy(this._onTouchStartContainer,this),touchmove:$.proxy(this._onTouchMoveContainer,this),touchend:$.proxy(this._onTouchEndContainer,this),mouseenter:$.proxy(this._onMouseEnterContainer,this),mouseleave:$.proxy(this._onMouseLeaveContainer,this),keydown:$.proxy(this._onKeyDown,this)};this._container.on(this._evts);$(window).on("resize.igscroll_"+this.element[0].id,$.proxy(this._onDimensionsChange,this));if(typeof MutationObserver==="function"){this._observer=new MutationObserver($.proxy(this._onElementMutation,this));this._observer.observe(this.element[0],{attributes:true})}this._updateScrollBarsVisibility();this._hideScrollbars();if(this.options.alwaysVisible){if($.ig.util.isTouchDevice()){this._showScrollbars(true)}else{this._showScrollbars(false)}}else{this._showScrollbars(true,2e3)}this._trigger("rendered",null,{owner:this})},_initOptions:function(scrollOptions){if(scrollOptions){if(typeof scrollOptions.syncedElemsH[0]!=="undefined"){this._linkElementsH(scrollOptions.syncedElemsH)}if(typeof scrollOptions.syncedElemsV[0]!=="undefined"){this._linkElementsV(scrollOptions.syncedElemsV)}if(scrollOptions.scrollbarH!==null){this._bindHScrollbar(scrollOptions.scrollbarH)}if(scrollOptions.scrollbarV!==null){this._bindVScrollbar(scrollOptions.scrollbarV)}if(scrollOptions.scrollHeight!==null){this._setScrollHeight(scrollOptions.scrollHeight)}if(scrollOptions.scrollWidth!==null){this._setScrollWidth(scrollOptions.scrollWidth)}if(scrollOptions.scrollTop!==0){this._scrollTop(scrollOptions.scrollTop,false)}if(scrollOptions.scrollLeft!==0){this._scrollLeft(scrollOptions.scrollLeft,false)}}},changeLocale:function(){},_setOption:function(key,value){this._super(key,value);if(key==="alwaysVisible"){if(value===true){if($.ig.util.isTouchDevice()){this._showScrollbars(true)}else{this._showScrollbars(false)}}}if(key==="scrollbarType"){this._removeScrollbars();if(value!=="none"){this._updateScrollBarsVisibility();this._updateScrollbarsPos(this._getContentPositionX(),this._getContentPositionY())}}if(key==="minThumbSize"&&this.options.scrollbarType==="custom"){this._refreshScrollbars()}if(key==="scrollTop"){this._scrollTop(value,true)}if(key==="scrollLeft"){this._scrollLeft(value,true)}if(key==="scrollHeight"){this._setScrollHeight(value);this._refreshScrollbars();this._updateScrollbarsPos(this._getContentPositionX(),this._getContentPositionY())}if(key==="scrollWidth"){this._setScrollWidth(value);this._refreshScrollbars();this._updateScrollbarsPos(this._getContentPositionX(),this._getContentPositionY())}if(key==="syncedElemsH"){this._linkElementsH(value)}if(key==="syncedElemsV"){this._linkElementsV(value)}if(key==="scrollbarH"){this._bindHScrollbar(value)}if(key==="scrollbarV"){this._bindVScrollbar(value)}},option:function(optionName,value){if(optionName==="scrollTop"&&value===undefined){return this._scrollTop(null,true)}if(optionName==="scrollLeft"&&value===undefined){return this._scrollLeft(null,true)}if(optionName==="scrollHeight"&&value===undefined){return this._getContentHeight()}if(optionName==="scrollWidth"&&value===undefined){return this._getContentWidth()}return this._super(optionName,value)},_getContainerHeight:function(){return Math.ceil(this._container.height())},_getContainerWidth:function(){return Math.ceil(this._container.width())},_getContentHeight:function(){if(this.options.scrollHeight!==null){return this.options.scrollHeight}else{if($.ig.util.isIE){return Math.ceil(this._content[0].getBoundingClientRect().height)}else{return Math.ceil(this._content.outerHeight())}}},_getContentWidth:function(){if(this.options.scrollWidth!==null){return this.options.scrollWidth}else{if($.ig.util.isIE){return Math.ceil(this._content[0].getBoundingClientRect().width)}else{return Math.ceil(this._content.outerWidth())}}},_getContentPositionX:function(){if($.ig.util.isTouchDevice()&&!this._bMixedEnvironment){var posX=0;if(this._contentX){posX=-this._getTransform3dValueX(this._contentX)}else{posX=-this._getTransform3dValueX(this._content)}return posX}else{return this._container.scrollLeft()}},_getContentPositionY:function(){if($.ig.util.isTouchDevice()&&!this._bMixedEnvironment){var posY=-this._getTransform3dValueY(this._content);return posY}else{return this._container.scrollTop()}},_getTransform3dValueX:function(jqElem){var matrix,values,posX;if(jqElem.css("-webkit-transform")){matrix=jqElem.css("-webkit-transform");values=matrix?matrix.match(/-?[\d\.]+/g):undefined;posX=values?Number(values[4]):0}else if(jqElem.css("-moz-transform")){matrix=jqElem.css("-moz-transform");values=matrix?matrix.match(/-?[\d\.]+/g):undefined;posX=values?Number(values[4]):0}else if(jqElem.css("-ms-transform")){matrix=jqElem.css("-ms-transform");values=matrix?matrix.match(/-?[\d\.]+/g):undefined;posX=values?Number(values[13]):0}return posX},_getTransform3dValueY:function(jqElem){var matrix,values,posY;if(jqElem.css("-webkit-transform")){matrix=jqElem.css("-webkit-transform");values=matrix?matrix.match(/-?[\d\.]+/g):undefined;posY=values?Number(values[5]):0}else if(jqElem.css("-moz-transform")){matrix=jqElem.css("-moz-transform");values=matrix?matrix.match(/-?[\d\.]+/g):undefined;posY=values?Number(values[5]):0}else if(jqElem.css("-ms-transform")){matrix=jqElem.css("-ms-transform");values=matrix?matrix.match(/-?[\d\.]+/g):undefined;posY=values?Number(values[14]):0}return posY},_getScrollbarVPosition:function(){if(this._linkedVBar){return this._linkedVBar.scrollTop()}else{return this._getContentPositionY()}},_getScrollbarHPosition:function(){if(this._linkedHBar){return this._linkedHBar.scrollLeft()}else{return this._getContentPositionX()}},_scrollLeft:function(val,triggerEvents,bSyncElems){if(val==="undefined"||val===null){return this._getContentPositionX()}cancelAnimationFrame(this._touchInertiaAnimID);if($.ig.util.isTouchDevice()&&!this._bMixedEnvironment){var posY=this._getContentPositionY();this._scrollTouchToXY(val,posY,triggerEvents,bSyncElems)}else{this._scrollToX(val,triggerEvents,bSyncElems)}if(triggerEvents){this._trigger("scrolled",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:true})}return this},_scrollTop:function(val,triggerEvents,bSyncElems){if(val==="undefined"||val===null){return this._getContentPositionY()}cancelAnimationFrame(this._touchInertiaAnimID);if($.ig.util.isTouchDevice()&&!this._bMixedEnvironment){var posX=this._getContentPositionX();this._scrollTouchToXY(posX,val,triggerEvents,bSyncElems)}else{this._scrollToY(val,triggerEvents,bSyncElems)}if(triggerEvents&&!this._cancelScrolling){this._trigger("scrolled",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:false})}return this},_setScrollWidth:function(inWidth){this._elemWidth=this._getContainerWidth();this._contentWidth=inWidth;this._percentInViewH=this._elemWidth/this._contentWidth;this._isScrollableH=this._percentInViewH<1;if(this.options.modifyDOM){this._content.css("width",inWidth+"px")}return this.element},_setScrollHeight:function(inHeight){this._elemHeight=this._container.innerHeight();this._contentHeight=inHeight;this._percentInViewV=this._elemHeight/this._contentHeight;this._isScrollableV=this._percentInViewV<1;if(this.options.modifyDOM){this._content.css("height",inHeight+"px")}return this.element},_refreshScrollbars:function(){var css=this.css,nativeScrollSize=$.ig.util.getScrollWidth();this._elemHeight=this.element.height();this._elemWidth=this.element.width();if(this.options.scrollbarType==="custom"&&this._vBarTrack&&this._vBarDrag){this._vDragHeight=this._calculateVDragHeight();this._vBarDrag.css("height",this._vDragHeight+"%");if(this._percentInViewH>=1){this._vBarTrack.addClass(css.verticalScrollTrackSingleScrollbar);this._vBarArrowDown.addClass(css.verticalScrollArrowDownSingleScrollbar)}else{this._vBarTrack.removeClass(css.verticalScrollTrackSingleScrollbar);this._vBarArrowDown.removeClass(css.verticalScrollArrowDownSingleScrollbar)}}else if(this.options.scrollbarType==="native"&&this._vBarContainer&&this._vBarDrag){this._vDragHeight=this._content.height();this._vBarDrag.css("height",this._vDragHeight+"px");if(this._percentInViewH>=1&&!this._vBarContainer.hasClass(css.nativeVScrollOuterSingle)){this._vBarContainer.css("bottom","");this._vBarContainer.addClass(this.css.nativeVScrollOuterSingle)}else if(this._percentInViewH<1&&this._vBarContainer.hasClass(css.nativeVScrollOuterSingle)){this._vBarContainer.removeClass(css.nativeVScrollOuterSingle);this._vBarContainer.css("bottom",nativeScrollSize+"px")}}if(this.options.scrollbarType==="custom"&&this._hBarTrack&&this._hBarDrag){this._hDragWidth=this._calculateHDragWidth();this._hBarDrag.css("width",this._hDragWidth+"%");if(this._percentInViewV>=1){this._hBarTrack.addClass(css.horizontalScrollTrackSingleScrollbar);this._hBarArrowRight.addClass(css.horizontalScrollArrowRightSingleScrollbar)}else{this._hBarTrack.removeClass(css.horizontalScrollTrackSingleScrollbar);this._hBarArrowRight.removeClass(css.horizontalScrollArrowRightSingleScrollbar)}}else if(this.options.scrollbarType==="native"&&this._hBarContainer&&this._hBarDrag){this._hDragWidth=this._content.width();this._hBarDrag.css("width",this._hDragWidth+"px");if(this._percentInViewV>=1&&!this._hBarContainer.hasClass(css.nativeHScrollOuterSingle)){this._hBarContainer.css("right","");this._hBarContainer.addClass(css.nativeHScrollOuterSingle)}else if(this._percentInViewV<1&&this._hBarContainer.hasClass(css.nativeHScrollOuterSingle)){this._hBarContainer.removeClass(css.nativeHScrollOuterSingle);this._hBarContainer.css("right",nativeScrollSize+"px")}}this._updateScrollBarsVisibility();this._updateScrollbarsPos(this._getContentPositionX(),this._getContentPositionY())},_linkElementsH:function(inElements){this._linkedHElems=[];if(inElements){for(var index=0;index").addClass(this.css.syncedElemContentH).appendTo(elemObject).append(elemObject.contents())}this._linkedHElems.push(elemObject)}else{throw new Error(this._getLocaleValue("errorNoElementLink"))}}}return this._linkedHElems},_linkElementsV:function(inElements){this._linkedVElems=[];if(inElements){for(var index=0;index").addClass(this.css.syncedElemContentV).appendTo(elemObject).append(elemObject.contents())}this._linkedVElems.push(elemObject)}else{throw new Error(this._getLocaleValue("errorNoElementLink"))}}}return this._linkedVElems},_bindHScrollbar:function(inElement){var self=this;if(inElement){var elemObject=$(inElement);if(elemObject.length){elemObject.on({scroll:function(e){var ignoreSync=self._ignoreHScrollBarEvents;self._ignoreHScrollBarEvents=false;if(ignoreSync||self.options.scrollOnlyHBar){return false}else{if(self._bMixedEnvironment){self._syncContentX(e.target,false);self._syncElemsX(e.target,false)}else{self._syncContentX(e.target,true);self._syncElemsX(e.target,true)}}}});if(this._linkedHBar&&this._linkedHBar[0]!==elemObject[0]){this._linkedHBar.off()}this._linkedHBar=elemObject}else{throw new Error(this._getLocaleValue("errorNoScrollbarLink"))}}return this._linkedHBar},_bindVScrollbar:function(inElement){var self=this;if(inElement){var elemObject=$(inElement);if(elemObject.length){elemObject.on({scroll:function(e){var ignoreSync=self._ignoreVScrollBarEvents;self._ignoreVScrollBarEvents=false;if(ignoreSync||self.options.scrollOnlyVBar){return false}else{if(self._bMixedEnvironment){self._syncContentY(e.target,false);self._syncElemsY(e.target,false)}else{self._syncContentY(e.target,true);self._syncElemsY(e.target,true)}}}});if(this._linkedVBar&&this._linkedVBar[0]!==elemObject[0]){this._linkedVBar.off()}this._linkedVBar=elemObject}else{throw new Error(this._getLocaleValue("errorNoScrollbarLink"))}}return this._linkedVBar},_clampAxisCoords:function(target,min,max){if(target===undefined||targetmax){target=max}return target},_scrollToXY:function(destX,destY,triggerEvents){var curPosX=this._getContentPositionX(),curPosY=this._getContentPositionY();destX=this._clampAxisCoords(destX,0,Math.max(this._getContentWidth()-this._getContainerWidth(),0));destY=this._clampAxisCoords(destY,0,Math.max(this._getContentHeight()-this._getContainerHeight(),0));if(triggerEvents){var bNoCancel=this._trigger("scrolling",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:destX-curPosX!==0,stepX:destX-curPosX,stepY:destY-curPosY});if(!bNoCancel){this._cancelScrolling=true;return{x:0,y:0}}}var scrolledX,scrolledY;scrolledX=this._scrollToX(destX,false);scrolledY=this._scrollToY(destY,false);return{x:scrolledX,y:scrolledY}},_scrollToX:function(destX,triggerEvents,bSyncElems){if(!this._isScrollableH&&!this.options.scrollOnlyHBar){return 0}var curPosX;if(this.options.scrollOnlyHBar){curPosX=this._getScrollbarHPosition()}else{curPosX=this._getContentPositionX()}destX=this._clampAxisCoords(destX,0,this._getContentWidth()-this._getContainerWidth());if(triggerEvents){var bNoCancel=this._trigger("scrolling",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:true,stepX:destX-curPosX,stepY:0});if(!bNoCancel){this._cancelScrolling=true;return 0}}this._bInternalScroll=true;if(this.options.scrollOnlyHBar){this._moveHBarX(destX)}else{this._container.scrollLeft(destX);if(bSyncElems===undefined||bSyncElems===true){this._syncElemsX(this._container[0],false)}}var curPosY;if(this.options.scrollOnlyVBar){curPosY=this._getScrollbarVPosition()}else{curPosY=this._getContentPositionY()}this._updateScrollbarsPos(destX,curPosY,true);return destX-curPosX},_scrollToY:function(destY,triggerEvents,bSyncElems){if(!this._isScrollableV&&!this.options.scrollOnlyVBar){return 0}var curPosY,endOffsetEdge=0;if(this.options.scrollOnlyVBar){curPosY=this._getScrollbarVPosition()}else{curPosY=this._getContentPositionY()}if($.ig.util.isEdge){if(destY<0){endOffsetEdge=-1}else{endOffsetEdge=destY>this._getContentHeight()-this._getContainerHeight()?1:0}}destY=this._clampAxisCoords(destY,0,this._getContentHeight()-this._getContainerHeight());if(triggerEvents){var bNoCancel=this._trigger("scrolling",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:false,stepX:0,stepY:destY-curPosY});if(!bNoCancel){this._cancelScrolling=!bNoCancel;return 0}}this._bInternalScroll=true;if(this.options.scrollOnlyVBar){this._moveVBarY(destY)}else{if($.ig.util.isIE&&Math.abs(destY-curPosY)<=1){return 0}this._container.scrollTop(destY+endOffsetEdge);if(bSyncElems===undefined||bSyncElems===true){this._syncElemsY(this._container[0],false)}}var curPosX;if(this.options.scrollOnlyHBar){curPosX=this._getScrollbarHPosition()}else{curPosX=this._getContentPositionX()}this._updateScrollbarsPos(curPosX,destY,true);return destY-curPosY},_smoothWheelScrollY:function(deltaY){var self=this,smoothingStep=this.options.smoothingStep,smoothingDuration=this.options.smoothingDuration,animationId;var x=-1;if(this.options.scrollOnlyVBar){this._nextY=this._getScrollbarVPosition()}else{this._nextY=this._getContentPositionY()}function inertiaStep(){if(x>1){cancelAnimationFrame(animationId);self._numSmoothAnimation-=1;if(!self._numSmoothAnimation&&!self._cancelScrolling){self._trigger("scrolled",null,{owner:self,smallIncrement:0,bigIncrement:0,horizontal:false})}return}self._nextY+=(-3*x*x+3)*deltaY*2*smoothingStep;if(self._bMixedEnvironment){self._scrollToY(self._nextY,true)}else{var curPosX=0;if(self.options.scrollOnlyHBar){curPosX=self._getScrollbarVPosition()}else{curPosX=self._getContentPositionY()}self._scrollTouchToXY(curPosX,self._nextY,true)}x+=.08*(1/smoothingDuration);animationId=requestAnimationFrame(inertiaStep)}this._numSmoothAnimation+=1;animationId=requestAnimationFrame(inertiaStep)},_applyTransformOnScrollTop:function(){var startX=-this._container.scrollLeft(),startY=-this._container.scrollTop();if(startX===0&&startY===0){return}if(this._contentX){startX+=this._getTransform3dValueX(this._contentX)}else{startX+=this._getTransform3dValueX(this._content)}startY+=this._getTransform3dValueY(this._content);this._scrollToXY(0,0,false);this._scrollTouchToXY(-startX,-startY,false)},_scrollTouchToXY:function(destX,destY,triggerEvents,bSyncElems){var bNoCancel,curPosX=this._getContentPositionX(),curPosY=this._getContentPositionY();destX=this._clampAxisCoords(destX,0,Math.max(this._getContentWidth()-this._getContainerWidth(),0));destY=this._clampAxisCoords(destY,0,Math.max(this._getContentHeight()-this._getContainerHeight(),0));if(triggerEvents){bNoCancel=this._trigger("scrolling",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:destX-curPosX!==0,stepX:destX-curPosX,stepY:destY-curPosY});if(!bNoCancel){this._cancelScrolling=true;return{x:0,y:0}}}if(this.options.scrollOnlyVBar){this._scrollToY(destY,false);if(this.options.scrollOnlyHBar){this._scrollToX(destX)}else{if(this._contentX){this._contentX.css({"-webkit-transform":"translate3d("+-destX+"px, 0px, 0px)"});this._syncElemsX(this._contentX,true,-destX,true)}else{this._content.css({"-webkit-transform":"translate3d("+-destX+"px, 0px, 0px)"});this._syncElemsX(this._content,true,-destX,true)}}destY=this._getScrollbarVPosition();this._updateScrollbarsPos(destX,destY);return{x:destX-curPosX,y:destY-curPosY}}var distanceLeftX=-destX;var distanceTopY=-destY;if(!this.options.scrollOnlyVBar&&!this.options.scrollOnlyHBar){this._content.css({"-webkit-transform":"translate3d("+distanceLeftX+"px,"+distanceTopY+"px, 0px)"})}if(bSyncElems===undefined||bSyncElems===true){this._syncElemsX(this._content,true);this._syncElemsY(this._content,true)}this._updateScrollbarsPos(destX,destY);this._syncHBar(this._content,true);this._syncVBar(this._content,true);return{x:destX-curPosX,y:destY-curPosY}},_inertiaInit:function(speedX,speedY,bDefaultScroll){var self=this,x=0,stepModifer=this.options.inertiaStep,inertiaDuration=this.options.inertiaDuration;if(this.options.scrollOnlyVBar){this._nextY=this._getScrollbarVPosition()}else{this._nextY=this._getContentPositionY()}if(this.options.scrollOnlyHBar){this._nextX=this._getScrollbarHPosition()}else{this._nextX=this._getContentPositionX()}function inertiaStep(){if(x>6){self._hideScrollbars();cancelAnimationFrame(self._touchInertiaAnimID);if(!self._cancelScrolling){self._trigger("scrolled",null,{owner:self,smallIncrement:0,bigIncrement:0,horizontal:null})}return}if(Math.abs(speedX)>Math.abs(speedY)){x+=.05/(1*inertiaDuration)}else{x+=.05/(1*inertiaDuration)}if(x<=1){if(Math.abs(speedY)<=Math.abs(speedX)*self.options.inertiaDeltaY){self._nextX+=1*speedX*15*stepModifer}if(Math.abs(speedY)>=Math.abs(speedX)*self.options.inertiaDeltaX){self._nextY+=1*speedY*15*stepModifer}}else{if(Math.abs(speedY)<=Math.abs(speedX)*self.options.inertiaDeltaY){self._nextX+=Math.abs(2/(x+.55)-.3)*speedX*15*stepModifer}if(Math.abs(speedY)>=Math.abs(speedX)*self.options.inertiaDeltaX){self._nextY+=Math.abs(2/(x+.55)-.3)*speedY*15*stepModifer}}if(bDefaultScroll){self._scrollToXY(self._nextX,self._nextY,true)}else{self._scrollTouchToXY(self._nextX,self._nextY,true)}self._touchInertiaAnimID=requestAnimationFrame(inertiaStep)}this._touchInertiaAnimID=requestAnimationFrame(inertiaStep)},_getSpeedSlope:function(inLastFiveSpeeds){if(inLastFiveSpeeds.length===0){return 1}if(inLastFiveSpeeds.length<5){return-1}var numPoints=inLastFiveSpeeds.length,sumXY=0,sumX=0,sumY=0,sumXX=0;for(var pointIndex=0;pointIndex0){for(index=0;index0){for(index=0;index0){for(index=0;index0){for(index=0;index-.1||speedSlopeX>-.1){this._speedDecreasing=true}else{this._speedDecreasing=false}var timeFromLastTouch=(new Date).getTime()-this._lastTouchEnd;if(timeFromLastTouch!==0&&timeFromLastTouch<100){var speedX=(this._lastTouchX-touch.pageX)/timeFromLastTouch;var speedY=(this._lastTouchY-touch.pageY)/timeFromLastTouch;if(this._savedSpeedsX.length<5){this._savedSpeedsX.push(speedX)}else{this._savedSpeedsX.shift();this._savedSpeedsX.push(speedX)}if(this._savedSpeedsY.length<5){this._savedSpeedsY.push(speedY)}else{this._savedSpeedsY.shift();this._savedSpeedsY.push(speedY)}}this._lastTouchEnd=(new Date).getTime();this._lastMovedX=this._lastTouchX-touch.pageX;this._lastMovedY=this._lastTouchY-touch.pageY;this._lastTouchX=touch.pageX;this._lastTouchY=touch.pageY;this._totalMovedX+=this._lastMovedX;var scrolledXY;if(Math.abs(this._totalMovedX)-1||this._bMixedEnvironment){scrolledXY=this._scrollToXY(this._startX,destY,true)}else{scrolledXY=this._scrollTouchToXY(this._startX,destY,true)}}else{if(!this._offsetRecorded){this._offsetDirection=Math.sign(destX-this._startX);this._offsetRecorded=true}if(navigator.userAgent.indexOf("Firefox")>-1||this._bMixedEnvironment){scrolledXY=this._scrollToXY(destX-this._offsetDirection*this.options.swipeToleranceX,destY,true)}else{scrolledXY=this._scrollTouchToXY(destX-this._offsetDirection*this.options.swipeToleranceX,destY,true)}}if(scrolledXY.x===0&&scrolledXY.y===0){this._igScollTouchPrevented=true}if(!this._igScollTouchPrevented&&event.cancelable){event.preventDefault()}},_onTouchEndContainer:function(event){if(event.isDefaultPrevented()||typeof MSGesture==="function"){return}var speedX=0;var speedY=0;for(var i=0;i.1||Math.abs(speedY)>.1)&&(Math.abs(this._lastMovedX)>2||Math.abs(this._lastMovedY)>2)){this._showScrollbars(true);this._inertiaInit(speedX,speedY,this._bMixedEnvironment)}else{this._hideScrollbars();if(!this._cancelScrolling){this._trigger("scrolled",null,{owner:this,smallIncrement:0,bigIncrement:0,horizontal:null})}}},_onMouseEnterContainer:function(){this._mOverContainer=true;cancelAnimationFrame(this._showScrollbarsAnimId);clearTimeout(this._hideScrollbarID);if(!this._toSimpleScrollbarsID&&!this._bMouseDownH&&!this._bMouseDownV){this._showScrollbars(true)}},_onMouseLeaveContainer:function(){var self=this;this._mOverContainer=false;if(!this._bMouseDownV&&!this._bMouseDownH){clearTimeout(this._toSimpleScrollbarsID);this._toSimpleScrollbarsID=0;this._hideScrollbarID=setTimeout(function(){self._hideScrollbars()},2e3)}},_onDimensionsChange:function(){var bNoCancel,evtArgs={owner:this};bNoCancel=this._trigger("resizing",null,evtArgs);if(bNoCancel){this.refresh();this._trigger("resized",null,evtArgs)}},_onElementMutation:function(mutations){for(var index=0;index").addClass(css.nativeVScrollOuter);if(!bRenderScrollbarH){this._vBarContainer.addClass(css.nativeVScrollOuterSingle)}else{this._vBarContainer.css("bottom",nativeScrollSize+"px")}this._vDragHeight=this._content.height();this._vBarDrag=$("
").addClass(css.nativeVScrollInner).css("height",this._vDragHeight+"px");if(this.options.scrollbarVParent){this._vBarContainer.append(this._vBarDrag).appendTo(this.options.scrollbarVParent)}else{this._vBarContainer.append(this._vBarDrag).appendTo(this._container[0].parentElement)}if($.ig.util.getScrollHeight()>0&&this.options.modifyDOM){this._content.css("padding-right",nativeScrollSize+"px")}if(bRenderScrollbarH&&this._bMixedEnvironment&&!this._desktopFiller){this._desktopFiller=$("
").addClass(css.nativeScrollFiller).css("height",nativeScrollSize+"px").css("width",nativeScrollSize+"px");this._desktopFiller.appendTo(this._container[0].parentElement)}this._vBarContainer.scrollTop(this._getContentPositionY());this._setOption("scrollbarV",this._vBarContainer)},_initNativeScrollBarH:function(bRenderScrollbarV){var css=this.css,nativeScrollSize=$.ig.util.getScrollWidth();this._hBarContainer=$("
").addClass(css.nativeHScrollOuter);if(!bRenderScrollbarV){this._hBarContainer.addClass(css.nativeHScrollOuterSingle)}else{this._hBarContainer.css("right",nativeScrollSize+"px")}this._hDragWidth=this._content.width();this._hBarDrag=$("
").addClass(css.nativeHScrollInner).css("width",this._hDragWidth+"px");if(this.options.scrollbarHParent){this._hBarContainer.append(this._hBarDrag).appendTo(this.options.scrollbarHParent)}else{this._hBarContainer.append(this._hBarDrag).appendTo(this._container[0].parentElement)}if(nativeScrollSize>0&&this.options.modifyDOM){this._content.css("padding-bottom",nativeScrollSize+"px")}if(bRenderScrollbarV&&this._bMixedEnvironment&&!this._desktopFiller){this._desktopFiller=$("
").addClass(css.nativeScrollFiller).css("height",nativeScrollSize+"px").css("width",nativeScrollSize+"px");this._desktopFiller.appendTo(this._container[0].parentElement)}this._hBarContainer.scrollLeft(this._getContentPositionX());this._setOption("scrollbarH",this._hBarContainer)},_removeScrollbars:function(){this._removeVerticalScrollbar();this._removeHorizontalScrollbar();if(this._desktopFiller){this._desktopFiller.remove();this._desktopFiller=null;this._content.css("padding-right","0px").css("padding-bottom","0px")}},_removeVerticalScrollbar:function(){if(this._vBarContainer){this._vBarContainer.remove();this._vBarContainer=null;this._vDragHeight=null;this._vBarDrag=null;this._vBarTrack=null;if(this.options.modifyDOM&&this.options.scrollbarType==="native"){this._content.css("padding-right","")}}if(this._onMouseMoveVDragHandler){$("body").off("mousemove.igscroll_"+this.element[0].id,this._onMouseMoveVDragHandler)}if(this._onMouseUpVScrollbarHandler){$(window).off("mouseup.igscroll_"+this.element[0].id,this._onMouseUpVScrollbarHandler)}},_removeHorizontalScrollbar:function(){if(this._hBarContainer){this._hBarContainer.remove();this._hBarContainer=null;this._hDragHeight=null;this._hBarDrag=null;this._hBarTrack=null;if(this.options.modifyDOM&&this.options.scrollbarType==="native"){this._content.css("padding-bottom","")}}if(this._onMouseMoveHDragHandler){$("body").off("mousemove.igscroll_"+this.element[0].id,this._onMouseMoveHDragHandler)}if(this._onMouseUpHScrollbarHandler){$(window).off("mouseup.igscroll_"+this.element[0].id,this._onMouseUpHScrollbarHandler)}},_initCustomScrollBarV:function(bRenderScrollbarH){var css=this.css;this._vBarContainer=$("
").addClass(css.verticalScrollContainer);this._vBarArrowUp=$("
").addClass(css.verticalScrollArrow).addClass(css.verticalScrollArrowUp);this._vBarTrack=$("
").addClass(css.verticalScrollTrack);this._vBarArrowDown=$("
").addClass(css.verticalScrollArrow).addClass(css.verticalScrollArrowDown);if(!bRenderScrollbarH){this._vBarTrack.addClass(css.verticalScrollTrackSingleScrollbar);this._vBarArrowDown.addClass(css.verticalScrollArrowDownSingleScrollbar)}if(this.options.scrollbarVParent){this._vBarContainer.append(this._vBarArrowUp).append(this._vBarTrack.append(this._vBarDrag)).append(this._vBarArrowDown).appendTo(this.options.scrollbarVParent)}else{this._vBarContainer.append(this._vBarArrowUp).append(this._vBarTrack.append(this._vBarDrag)).append(this._vBarArrowDown).appendTo(this._container[0].parentElement)}this._vDragHeight=this._calculateVDragHeight();this._vBarDrag=$("
").addClass(css.verticalScrollThumbDrag+" "+css.verticalScrollThumbDragThin).css("height",this._vDragHeight+"%");if(this.options.scrollbarVParent){this._vBarTrack.append(this._vBarDrag)}else{this._vBarTrack.append(this._vBarDrag)}this._bindCustomScrollBarV()},_calculateVDragHeight:function(){var dragHeightPx,minSize=parseInt(this.options.minThumbSize,10);dragHeightPx=this._vBarTrack.height()/this._contentHeight*this._vBarTrack.height();dragHeightPx=dragHeightPx
=0){return}var bNoCancel,eventArgs={owner:this,smallIncrement:0,bigIncrement:0,horizontal:false,stepX:0,stepY:step};if(bSmallIncement){eventArgs.smallIncrement=Math.sign(step)}else{var dragStartY=this._getTransform3dValueY(this._vBarDrag);if(this._mTrackLastPosV>dragStartY&&this._mTrackLastPosVdragStartY+this._vDragHeight){this._lastBigIncDirV=1;bNoCancel=this._trigger("scrolling",null,{owner:this,smallIncrement:0,bigIncrement:1,horizontal:false,stepX:0,stepY:scrollStep});this._cancelScrolling=!bNoCancel;if(bNoCancel){this._scrollTop(curPosY+scrollStep,false);this._holdTimeoutID=setTimeout(function(){self._scrollTimeoutY(scrollStep,false)},250)}}else if(event.offsetY").addClass(css.horizontalScrollArrow).addClass(css.horizontalScrollArrowLeft);this._hBarTrack=$("
").addClass(css.horizontalScrollArrow).addClass(css.horizontalScrollArrowRight);if(!bRenderScrollbarV){this._hBarTrack.addClass(css.horizontalScrollTrackSingleScrollbar);this._hBarArrowRight.addClass(css.horizontalScrollArrowRightSingleScrollbar)}if(this.options.scrollbarHParent){this._hBarContainer.append(this._hBarArrowLeft).append(this._hBarTrack.append(this._hBarDrag)).append(this._hBarArrowRight).appendTo(this.options.scrollbarHParent)}else{this._hBarContainer.append(this._hBarArrowLeft).append(this._hBarTrack.append(this._hBarDrag)).append(this._hBarArrowRight).appendTo(this._container[0].parentElement)}this._hDragWidth=this._calculateHDragWidth();this._hBarDrag=$("
").addClass(css.horizontalScrollThumbDrag+" "+css.horizontalScrollThumbDragThin).css("width",this._hDragWidth+"%");if(this.options.scrollbarHParent){this._hBarTrack.append(this._hBarDrag)}else{this._hBarTrack.append(this._hBarDrag)}this._bindCustomScrollBarH()},_calculateHDragWidth:function(){var dragWidthPx,minSize=parseInt(this.options.minThumbSize,10);dragWidthPx=this._hBarTrack.width()/this._contentWidth*this._hBarTrack.width();dragWidthPx=dragWidthPx