'use strict';if(typeof window!=='undefined'&&window.console==null){window.console={};}'debug,log,warn,error,trace,group,groupEnd'.split(',').forEach(function(f){if(typeof window!=='undefined'&&!window.console[f]){window.console[f]=function(){};}});if(typeof document!=='undefined'&&typeof HTMLElement!=='undefined'&&!('classList'in document.documentElement)&&Object.defineProperty){Object.defineProperty(HTMLElement.prototype,'classList',{get:function(){var self=this;function update(fn){return function(value){var classes=self.className.split(/\s+/);var index=classes.indexOf(value);fn(classes,index,value);self.className=classes.join(' ');};}
var ret={add:update(function(classes,index,value){~index||classes.push(value);}),remove:update(function(classes,index){~index&&classes.splice(index,1);}),toggle:update(function(classes,index,value){~index?classes.splice(index,1):classes.push(value);}),contains:function(value){return!!~self.className.split(/\s+/).indexOf(value);},item:function(i){return self.className.split(/\s+/)[i]||null;}};Object.defineProperty(ret,'length',{get:function(){return self.className.split(/\s+/).length;}});return ret;}});}
if(!Array.prototype.find){Object.defineProperty(Array.prototype,'find',{enumerable:false,configurable:true,writable:true,value:function(predicate){if(this==null){throw new TypeError('Array.prototype.find called on null or undefined');}
if(typeof predicate!=='function'){throw new TypeError('predicate must be a function');}
var list=Object(this);var length=list.length>>>0;var thisArg=arguments[1];var value;for(var i=0;i<length;i++){if(i in list){value=list[i];if(predicate.call(thisArg,value,i,list)){return value;}}}
return undefined;}});}
if(!String.prototype.trimLeft){String.prototype.trimLeft=function(){return String(this).replace(/\s*$/,'');};}
if(!Function.prototype.bind){Function.prototype.bind=function(oThis){if(typeof this!=='function'){ throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');}
var aArgs=Array.prototype.slice.call(arguments,1),fToBind=this,fNOP=function(){},fBound=function(){return fToBind.apply(this instanceof fNOP&&oThis?this:oThis,aArgs.concat(Array.prototype.slice.call(arguments)));};fNOP.prototype=this.prototype;fBound.prototype=new fNOP();return fBound;};}