1jQuery.fn.nextInArray = function(element) { 2 var nextId = 0; 3 for(var i = 0; i < this.length; i++) { 4 if(this[i] == element) { 5 nextId = i + 1; 6 break; 7 } 8 } 9 if(nextId > this.length-1) 10 nextId = 0; 11 return this[nextId]; 12} 13jQuery.fn.clearForm = function() { 14 return this.each(function() { 15 var type = this.type, tag = this.tagName.toLowerCase(); 16 if (tag == 'form') 17 return jQuery(':input', this).clearForm(); 18 if (type == 'text' || type == 'password' || tag == 'textarea') 19 this.value = ''; 20 else if (type == 'checkbox' || type == 'radio') 21 this.checked = false; 22 else if (tag == 'select') 23 this.selectedIndex = -1; 24 }); 25} 26jQuery.fn.tagName = function() { 27 return this.get(0).tagName; 28} 29jQuery.fn.exists = function(){ 30 return (jQuery(this).length > 0 ? true : false); 31} 32function isNumber(val) { 33 return /^\d+/.test(val); 34} 35function pushDataToParam(data, pref) { 36 pref = pref ? pref : ''; 37 var res = []; 38 for(var key in data) { 39 var name = pref && pref != '' ? pref+ '['+ key+ ']' : key; 40 if(typeof(data[key]) === 'array' || typeof(data[key]) === 'object') { 41 res = jQuery.merge(res, pushDataToParam(data[key], name)); 42 } else { 43 res.push(name+ "="+ data[key]); 44 } 45 } 46 return res; 47} 48jQuery.fn.serializeAnythingGmp = function(addData) { 49 var toReturn = []; 50 var els = jQuery(this).find(':input').get(); 51 jQuery.each(els, function() { 52 if (this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password/i.test(this.type))) { 53 var val = jQuery(this).val(); 54 toReturn.push( encodeURIComponent(this.name) + "=" + encodeURIComponent( val ) ); 55 } 56 }); 57 if(typeof(addData) != 'undefined') { 58 toReturn = jQuery.merge(toReturn, pushDataToParam(addData)); 59 } 60 return toReturn.join("&").replace(/%20/g, "+"); 61}; 62jQuery.fn.serializeAssoc = function() { 63 var data = [ ]; 64 jQuery.each( this.serializeArray(), function( key, obj ) { 65 var a = obj.name.match(/(.*?)\[(.*?)\]/); 66 if(a !== null) 67 { 68 var subName = a[1]; 69 var subKey = a[2]; 70 if( !data[subName] ) data[subName] = [ ]; 71 if( data[subName][subKey] ) { 72 if( jQuery.isArray( data[subName][subKey] ) ) { 73 data[subName][subKey].push( obj.value ); 74 } else { 75 data[subName][subKey] = [ ]; 76 data[subName][subKey].push( obj.value ); 77 }; 78 } else { 79 data[subName][subKey] = obj.value; 80 }; 81 } else { 82 if( data[obj.name] ) { 83 if( jQuery.isArray( data[obj.name] ) ) { 84 data[obj.name].push( obj.value ); 85 } else { 86 data[obj.name] = [ ]; 87 data[obj.name].push( obj.value ); 88 }; 89 } else { 90 data[obj.name] = obj.value; 91 }; 92 }; 93 }); 94 return data; 95}; 96function str_replace(haystack, needle, replacement) { 97 var temp = haystack.split(needle); 98 return temp.join(replacement); 99} 100/** 101 * @see php html::nameToClassId($name) method 102 **/ 103function nameToClassId(name) { 104 return str_replace( 105 str_replace(name, ']', ''), 106 '[', '' 107 ); 108} 109function strpos( haystack, needle, offset){ 110 var i = haystack.indexOf( needle, offset ); // returns -1 111 return i >= 0 ? i : false; 112} 113function extend(Child, Parent) { 114 var F = function() { }; 115 F.prototype = Parent.prototype; 116 Child.prototype = new F(); 117 Child.prototype.constructor = Child; 118 Child.superclass = Parent.prototype; 119} 120function toeRedirect(url) { 121 document.location.href = url; 122} 123function toeReload(url) { 124 if(url) 125 toeRedirect(url); 126 document.location.reload(); 127} 128jQuery.fn.toeRebuildSelect = function(data, useIdAsValue, val) { 129 if(jQuery(this).tagName() == 'SELECT' && typeof(data) == 'object') { 130 if(jQuery(data).length > 0) { 131 if(typeof(val) == 'undefined') 132 val = false; 133 if(jQuery(this).children('option').length) { 134 jQuery(this).children('option').remove(); 135 } 136 if(typeof(useIdAsValue) == 'undefined') 137 useIdAsValue = false; 138 var selected = ''; 139 for(var id in data) { 140 selected = ''; 141 if(val && ((useIdAsValue && id == val) || (data[id] == val))) 142 selected = 'selected'; 143 jQuery(this).append('<option value="'+ (useIdAsValue ? id : data[id])+ '" '+ selected+ '>'+ data[id]+ '</option>'); 144 } 145 } 146 } 147} 148/** 149 * We will not use just jQUery.inArray because it is work incorrect for objects 150 * @return mixed - key that was found element or -1 if not 151 */ 152function toeInArray(needle, haystack) { 153 if(typeof(haystack) == 'object') { 154 for(var k in haystack) { 155 if(haystack[ k ] == needle) 156 return k; 157 } 158 } else if(typeof(haystack) == 'array') { 159 return jQuery.inArray(needle, haystack); 160 } 161 return -1; 162} 163jQuery.fn.setReadonly = function() { 164 jQuery(this).addClass('toeReadonly').attr('readonly', 'readonly'); 165} 166jQuery.fn.unsetReadonly = function() { 167 jQuery(this).removeClass('toeReadonly').removeAttr('readonly', 'readonly'); 168} 169jQuery.fn.getClassId = function(pref, test) { 170 var classId = jQuery(this).attr('class'); 171 classId = classId.substr( strpos(classId, pref+ '_') ); 172 if(strpos(classId, ' ')) 173 classId = classId.substr( 0, strpos(classId, ' ') ); 174 classId = classId.split('_'); 175 classId = classId[1]; 176 return classId; 177} 178function toeTextIncDec(textFieldId, inc) {
179 var value = parseInt(jQuery('#'+ textFieldId).val()); 180 if(isNaN(value)) 181 value = 0; 182 if(!(inc < 0 && value < 1)) { 183 value += inc; 184 } 185 jQuery('#'+ textFieldId).val(value); 186} 187 188/** 189 * Make first letter of string in upper case 190 * @param str string - string to convert 191 * @return string converted string - first letter in upper case 192 */ 193function toeStrFirstUp(str) { 194 str += ''; 195 var f = str.charAt(0).toUpperCase(); 196 return f + str.substr(1); 197} 198function URLToArray(url) { 199 var request = {}; 200 201 if(typeof url != 'string') { 202 url = url[0]; 203 } 204 205 var pairs = url.substring(url.indexOf('?') + 1).split('&'); 206 for (var i = 0; i < pairs.length; i++) { 207 if(!pairs[i]) 208 continue; 209 var pair = pairs[i].split('='); 210 request[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); 211 } 212 return request; 213} 214function ArrayToURL(array) { 215 var pairs = []; 216 for (var key in array) 217 if (array.hasOwnProperty(key)) 218 219 pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(array[key])); 220 return pairs.join('&'); 221} 222function parseStr (str, array) { 223 // http://kevin.vanzonneveld.net 224 // + original by: Cagri Ekin 225 // + improved by: Michael White (http://getsprink.com) 226 // + tweaked by: Jack 227 // + bugfixed by: Onno Marsman 228 // + reimplemented by: stag019 229 // + bugfixed by: Brett Zamir (http://brett-zamir.me) 230 // + bugfixed by: stag019 231 // + input by: Dreamer 232 // + bugfixed by: Brett Zamir (http://brett-zamir.me) 233 // + bugfixed by: MIO_KODUKI (http://mio-koduki.blogspot.com/) 234 // + input by: Zaide (http://zaidesthings.com/) 235 // + input by: David Pesta (http://davidpesta.com/) 236 // + input by: jeicquest 237 // + improved by: Brett Zamir (http://brett-zamir.me) 238 // % note 1: When no argument is specified, will put variables in global scope. 239 // % note 1: When a particular argument has been passed, and the returned value is different parse_str of PHP. For example, a=b=c&d====c 240 // * example 1: var arr = {}; 241 // * example 1: parse_str('first=foo&second=bar', arr); 242 // * results 1: arr == { first: 'foo', second: 'bar' } 243 // * example 2: var arr = {}; 244 // * example 2: parse_str('str_a=Jack+and+Jill+didn%27t+see+the+well.', arr); 245 // * results 2: arr == { str_a: "Jack and Jill didn't see the well." } 246 // * example 3: var abc = {3:'a'}; 247 // * example 3: parse_str('abc[a][b]["c"]=def&abc[q]=t+5'); 248 // * results 3: JSON.stringify(abc) === '{"3":"a","a":{"b":{"c":"def"}},"q":"t 5"}'; 249 var strArr = String(str).replace(/^&/, '').replace(/&$/, '').split('&'), 250 sal = strArr.length, 251 i, j, ct, p, lastObj, obj, lastIter, undef, chr, tmp, key, value, 252 postLeftBracketPos, keys, keysLen, 253 fixStr = function (str) { 254 return decodeURIComponent(str.replace(/\+/g, '%20')); 255 }; 256 // Comented by Alexey Bolotov 257 /* 258 if (!array) { 259 array = this.window; 260 }*/ 261 if (!array) { 262 array = {}; 263 } 264 265 for (i = 0; i < sal; i++) { 266 tmp = strArr[i].split('='); 267 key = fixStr(tmp[0]); 268 value = (tmp.length < 2) ? '' : fixStr(tmp[1]); 269 270 while (key.charAt(0) === ' ') { 271 key = key.slice(1); 272 } 273 if (key.indexOf('\x00') > -1) { 274 key = key.slice(0, key.indexOf('\x00')); 275 } 276 if (key && key.charAt(0) !== '[') { 277 keys = []; 278 postLeftBracketPos = 0; 279 for (j = 0; j < key.length; j++) { 280 if (key.charAt(j) === '[' && !postLeftBracketPos) { 281 postLeftBracketPos = j + 1; 282 } else if (key.charAt(j) === ']') { 283 if (postLeftBracketPos) { 284 if (!keys.length) { 285 keys.push(key.slice(0, postLeftBracketPos - 1)); 286 } 287 keys.push(key.substr(postLeftBracketPos, j - postLeftBracketPos)); 288 postLeftBracketPos = 0; 289 if (key.charAt(j + 1) !== '[') { 290 break; 291 } 292 } 293 } 294 } 295 if (!keys.length) { 296 keys = [key]; 297 } 298 for (j = 0; j < keys[0].length; j++) { 299 chr = keys[0].charAt(j); 300 if (chr === ' ' || chr === '.' || chr === '[') { 301 keys[0] = keys[0].substr(0, j) + '_' + keys[0].substr(j + 1); 302 } 303 if (chr === '[') { 304 break; 305 } 306 } 307 308 obj = array; 309 for (j = 0, keysLen = keys.length; j < keysLen; j++) { 310 key = keys[j].replace(/^['"]/, '').replace(/['"]$/, ''); 311 lastIter = j !== keys.length - 1; 312 lastObj = obj;
313 if ((key !== '' && key !== ' ') || j === 0) { 314 if (obj[key] === undef) { 315 obj[key] = {}; 316 } 317 obj = obj[key]; 318 } else { // To insert new dimension 319 ct = -1; 320 for (p in obj) { 321 if (obj.hasOwnProperty(p)) { 322 if (+p > ct && p.match(/^\d+$/g)) { 323 ct = +p; 324 } 325 } 326 } 327 key = ct + 1; 328 } 329 } 330 lastObj[key] = value; 331 } 332 } 333 return array; 334} 335 336function toeListableGmp(params) { 337 this.params = jQuery.extend({}, params); 338 this.table = jQuery(this.params.table); 339 this.paging = jQuery(this.params.paging); 340 this.perPage = this.params.perPage; 341 this.list = this.params.list; 342 this.count = this.params.count; 343 this.page = this.params.page; 344 this.pagingCallback = this.params.pagingCallback; 345 var self = this; 346 347 this.draw = function(list, count) { 348 this.table.find('tr').not('.gmpExample, .gmpTblHeader').remove(); 349 var exampleRow = this.table.find('.gmpExample'); 350 for(var i in list) { 351 var newRow = exampleRow.clone(); 352 for(var key in list[i]) { 353 var element = newRow.find('.'+ key); 354 if(element.length) { 355 var valueTo = element.attr('valueTo'); 356 if(valueTo) { 357 var newValue = list[i][key]; 358 var prevValue = element.attr(valueTo); 359 if(prevValue) 360 newValue = prevValue+ ' '+ newValue; 361 element.attr(valueTo, newValue); 362 } else 363 element.html(list[i][key]); 364 } 365 } 366 newRow.removeClass('gmpExample').show(); 367 this.table.append(newRow); 368 } 369 if(this.paging) { 370 this.paging.html(''); 371 if(count && count > list.length && this.perPage) { 372 for(var i = 1; i <= Math.ceil(count/this.perPage); i++) { 373 var newPageId = i-1 374 , newElement = (newPageId == this.page) ? jQuery('<b/>') : jQuery('<a/>'); 375 if(newPageId != this.page) { 376 newElement.attr('href', '#'+ newPageId) 377 .click(function(){ 378 if(self.pagingCallback && typeof(self.pagingCallback) == 'function') { 379 self.pagingCallback(parseInt(jQuery(this).attr('href').replace('#', ''))); 380 return false; 381 } 382 }); 383 } 384 newElement.addClass('toePagingElement').html(i); 385 this.paging.append(newElement); 386 if(i%20 == 0 && i) 387 this.paging.append('<br />'); 388 } 389 } 390 } 391 }; 392 if(this.list) 393 this.draw(this.list, this.count); 394} 395 396function setCookieGmp(c_name, value, exdays) { 397 var exdate = new Date(); 398 exdate.setDate(exdate.getDate() + exdays); 399 var value_prepared = ''; 400 if(typeof(value) == 'array' || typeof(value) == 'object') { 401 value_prepared = '_JSON:'+ JSON.stringify( value ); 402 } else { 403 value_prepared = value; 404 } 405 var c_value = escape(value_prepared)+ ((exdays==null) ? "" : "; expires="+exdate.toUTCString())+ '; path=/'; 406 document.cookie = c_name+ "="+ c_value; 407} 408 409function getCookieGmp(name) { 410 var parts = document.cookie.split(name + "="); 411 if (parts.length == 2) { 412 var value = unescape(parts.pop().split(";").shift()); 413 if(value.indexOf('_JSON:') === 0) { 414 value = JSON.parse(value.split("_JSON:").pop()); 415 } 416 return value; 417 } 418 return null; 419} 420 421function delCookieGmp( name ) { 422 document.cookie = name+ '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; 423} 424 425function callUserFuncArray(cb, parameters) { 426 // http://kevin.vanzonneveld.net 427 // + original by: Thiago Mata (http://thiagomata.blog.com) 428 // + revised by: Jon Hohle 429 // + improved by: Brett Zamir (http://brett-zamir.me) 430 // + improved by: Diplom@t (http://difane.com/) 431 // + improved by: Brett Zamir (http://brett-zamir.me) 432 // * example 1: call_user_func_array('isNaN', ['a']); 433 // * returns 1: true 434 // * example 2: call_user_func_array('isNaN', [1]); 435 // * returns 2: false 436 var func; 437 438 if (typeof cb === 'string') { 439 func = (typeof this[cb] === 'function') ? this[cb] : func = (new Function(null, 'return ' + cb))(); 440 } 441 else if (Object.prototype.toString.call(cb) === '[object Array]') { 442 func = (typeof cb[0] == 'string') ? eval(cb[0] + "['" + cb[1] + "']") : func = cb[0][cb[1]]; 443 } 444 else if (typeof cb === 'function') { 445 func = cb; 446 } 447 448 if (typeof func !== 'function') { 449 throw new Error(func + ' is not a valid function'); 450 } 451 452 return (typeof cb[0] === 'string') ? func.apply(eval(cb[0]), parameters) : (typeof cb[0] !== 'object') ? func.apply(null, parameters) : func.apply(cb[0], parameters); 453} 454jQuery.fn.zoom = function(level) { 455 jQuery(this).data('zoom', level); 456 return jQuery(this).css({ 457 /* 'zoom': level // Didn't worked correctly for mobiles 458 ,*/ '-moz-transform': 'scale('+ level+ ')' 459 , '-moz-transform-origin': 'center center' 460 , '-o-transform': 'scale('+ level+ ')' 461 , '-o-transform-origin': 'center center' 462 , '-webkit-transform': 'scale('+ level+ ')' 463 , '-webkit-transform-origin': 'center center' 464 , 'transform': 'scale('+ level+ ')' 465 , 'transform-origin': 'center center' 466 }); 467}; 468jQuery.fn.rotate = function(deg) { 469 return jQuery(this).css({ 470 '-moz-transform':'rotate('+ deg+ 'deg)' 471 , '-webkit-transform':'rotate('+ deg+ 'deg)' 472 , '-o-transform':'rotate('+ deg+ 'deg)' 473 , '-ms-transform':'rotate('+ deg+ 'deg)' 474 , 'transform': 'rotate('+ deg+ 'deg)' 475 }); 476}; 477jQuery.fn.scrollWidth = function() { 478 var inner = document.createElement('p'); 479 inner.style.width = "100%"; 480 inner.style.height = "200px"; 481 482 var outer = document.createElement('div'); 483 outer.style.position = "absolute"; 484 outer.style.top = "0px";
485 outer.style.left = "0px"; 486 outer.style.visibility = "hidden"; 487 outer.style.width = "200px"; 488 outer.style.height = "150px"; 489 outer.style.overflow = "hidden"; 490 outer.appendChild (inner); 491 492 document.body.appendChild (outer); 493 var w1 = inner.offsetWidth; 494 outer.style.overflow = 'scroll'; 495 var w2 = inner.offsetWidth; 496 if (w1 == w2) w2 = outer.clientWidth; 497 498 document.body.removeChild (outer); 499 500 return (w1 - w2); 501}; 502/** 503 * Retrive worgmpess attach ID from image, using img classes 504 * @param {htmlObj} img Image to get ID from 505 */ 506function toeGetImgAttachId(img) { 507 var classesStr = jQuery(img).attr('class') 508 , aid = 0; 509 if(classesStr && classesStr != '') { 510 var matches = classesStr.match(/wp-image-(\d+)/); 511 if(matches && matches[1]) { 512 aid = parseInt(matches[1]); 513 } 514 } 515 return aid; 516} 517function toeGetHashParams() { 518 var hashArr = window.location.hash.split('#') 519 , res = []; 520 for(var i in hashArr) { 521 if(hashArr[i] && hashArr[i] != '') { 522 res.push(hashArr[i]); 523 } 524 } 525 return res; 526} 527/*Replace text in DOM functions*/ 528// Reusable generic function 529function traverseElement(el, regex, textReplacerFunc, to) { 530 // script and style elements are left alone 531 if (!/^(script|style)$/.test(el.tagName)) { 532 var child = el.lastChild; 533 while (child) { 534 if (child.nodeType == 1) { 535 traverseElement(child, regex, textReplacerFunc, to); 536 } else if (child.nodeType == 3) { 537 textReplacerFunc(child, regex, to); 538 } 539 child = child.previousSibling; 540 } 541 } 542} 543 544// This function does the replacing for every matched piece of text 545// and can be customized to do what you like 546function textReplacerFunc(textNode, regex, to) { 547 textNode.data = textNode.data.replace(regex, to); 548} 549 550// The main function 551function replaceWords(html, words) { 552 var container = document.createElement("div"); 553 container.innerHTML = html; 554 555 // Replace the words one at a time to ensure each one gets matched 556 for(var replace in words) { 557 traverseElement(container, new RegExp(replace, "g"), textReplacerFunc, words[ replace ]); 558 } 559 return container.innerHTML; 560} 561/*****/ 562function toeSelectText(element) { 563 var doc = document 564 , text = jQuery(element).get(0) 565 , range, selection; 566 if (doc.body.createTextRange) { //ms 567 range = doc.body.createTextRange(); 568 range.moveToElementText(text); 569 range.select(); 570 } else if (window.getSelection) { //all others 571 selection = window.getSelection(); 572 range = doc.createRange(); 573 range.selectNodeContents(text); 574 selection.removeAllRanges(); 575 selection.addRange(range); 576 } 577} 578jQuery.fn.animationDuration = function(seconds, isMili) { 579 if(isMili) { 580 seconds = parseFloat(seconds) / 1000; 581 } 582 var secondsStr = seconds+ 's'; 583 return jQuery(this).css({ 584 'webkit-animation-duration': secondsStr 585 , '-moz-animation-duration': secondsStr 586 , '-o-animation-duration': secondsStr 587 , 'animation-duration': secondsStr 588 }); 589}; 590/** 591 * Convert Date string (in common - mm/dd/yyyy) - to miliseconds 592 * @param {string} strDate date string 593 * @return {int} miliseconds 594 */ 595function gmpStrToMs(strDate) { 596 var dateHours = strDate.split(' '); 597 if(dateHours.length == 2) { 598 strDate = dateHours[0]+ ' '; 599 var hms = dateHours[1].split(':'); 600 601 for(var i = 0; i < 3; i++) { 602 strDate += hms[ i ] ? hms[ i ] : '00'; 603 if(i < 2) 604 strDate += ':'; 605 } 606 } 607 var date = new Date( str_replace(strDate, '-', '/') ) 608 , res = 0; 609 if(date) { 610 res = date.getTime(); 611 } 612 return res; 613} 614function twoArraysContainSameValue (arr1, arr2) { 615 return arr2.some(function (v) { 616 return arr1.indexOf(v) >= 0; 617 }); 618} 619// Simulates PHP's date function 620Date.prototype.format=function(e){var t="";var n=Date.replaceChars;for(var r=0;r<e.length;r++){var i=e.charAt(r);if(r-1>=0&&e.charAt(r-1)=="\\"){t+=i}else if(n[i]){t+=n[i].call(this)}else if(i!="\\"){t+=i}}return t};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
620ay","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)},W:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil(((this-e)/864e5+e.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var e=new Date;return(new Date(e.getFullYear(),e.getMonth(),0)).getDate()},L:function(){var e=this.getFullYear();return e%400==0||e%100!=0&&e%4==0},o:function(){var e=new Date(this.valueOf());e.setDate(e.getDate()-(this.getDay()+6)%7+3);return e.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1e3/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var e=this.getMilliseconds();return(e<10?"00":e<100?"0":"")+e},e:function(){return"Not Yet Supported"},I:function(){var e=null;for(var t=0;t<12;++t){var n=new Date(this.getFullYear(),t,1);var r=n.getTimezoneOffset();if(e===null)e=r;else if(r<e){e=r;break}else if(r>e)break}return this.getTimezoneOffset()==e|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var e=this.getMonth();this.setMonth(0);var t=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(e);return t},Z:function(){return-this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1e3}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.