1 2 3$(".catFilterCheckbox").on('click', function(){ 4 console.log(".filtercatarch-" + $(this).val().replace(/\s/g, '')) 5 $(".catFilterCheckbox").each(function(){ 6 if($(this).prop('checked')){ 7 $(".filtercatarch-" + $(this).val().replace(/\s/g, '')).parent().show(); 8 } 9 else{ 10 $(".filtercatarch-" + $(this).val().replace(/\s/g, '')).parent().hide(); 11 } 12 }) 13}) 14 15 16$(".catFilterCheckboxArch").on('click', function(){ 17 $(".catFilterCheckboxArch").each(function(){ 18 if($(this).prop('checked')){ 19 $(".filtercatarch-" + $(this).val().replace(/\s/g, '')).parent().show(); 20 } 21 else{ 22 $(".filtercatarch-" + $(this).val().replace(/\s/g, '')).parent().hide(); 23 } 24 }) 25}) 26/* 27 SortTable 28 version 2 29 7th April 2007 30 Stuart Langridge, http://www.kryogenix.org/code/browser/sorttable/ 31 32 Instructions: 33 Download this file 34 Add <script src="sorttable.js"></script> to your HTML 35 Add class="sortable" to any table you'd like to make sortable 36 Click on the headers to sort 37 38 Thanks to many, many people for contributions and suggestions. 39 Licenced as X11: http://www.kryogenix.org/code/browser/licence.html 40 This basically means: do what you want with it. 41*/ 42 43 44var stIsIE = /*@cc_on!@*/false; 45 46sorttable = { 47 init: function() { 48 // quit if this function has already been called 49 if (arguments.callee.done) return; 50 // flag this function so we don't do the same thing twice 51 arguments.callee.done = true; 52 // kill the timer 53 if (_timer) clearInterval(_timer); 54 55 if (!document.createElement || !document.getElementsByTagName) return; 56 57 sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; 58 59 forEach(document.getElementsByTagName('table'), function(table) { 60 if (table.className.search(/\bsortable\b/) != -1) { 61 sorttable.makeSortable(table); 62 } 63 }); 64 65 }, 66 67 makeSortable: function(table) { 68 if (table.getElementsByTagName('thead').length == 0) { 69 // table doesn't have a tHead. Since it should have, create one and 70 // put the first table row in it. 71 the = document.createElement('thead'); 72 the.appendChild(table.rows[0]); 73 table.insertBefore(the,table.firstChild); 74 } 75 // Safari doesn't support table.tHead, sigh 76 if (table.tHead == null) table.tHead = table.getElementsByTagName('thead')[0]; 77 78 if (table.tHead.rows.length != 1) return; // can't cope with two header rows 79 80 // Sorttable v1 put rows with a class of "sortbottom" at the bottom (as 81 // "total" rows, for example). This is B&R, since what you're supposed 82 // to do is put them in a tfoot. So, if there are sortbottom rows, 83 // for backwards compatibility, move them to tfoot (creating it if needed). 84 sortbottomrows = []; 85 for (var i=0; i<table.rows.length; i++) { 86 if (table.rows[i].className.search(/\bsortbottom\b/) != -1) { 87 sortbottomrows[sortbottomrows.length] = table.rows[i]; 88 } 89 } 90 if (sortbottomrows) { 91 if (table.tFoot == null) { 92 // table doesn't have a tfoot. Create one. 93 tfo = document.createElement('tfoot'); 94 table.appendChild(tfo); 95 } 96 for (var i=0; i<sortbottomrows.length; i++) { 97 tfo.appendChild(sortbottomrows[i]); 98 } 99 delete sortbottomrows; 100 } 101 102 // work through each column and calculate its type 103 headrow = table.tHead.rows[0].cells; 104 for (var i=0; i<headrow.length; i++) { 105 // manually override the type with a sorttable_type attribute 106 if (!headrow[i].className.match(/\bsorttable_nosort\b/)) { // skip this col 107 mtch = headrow[i].className.match(/\bsorttable_([a-z0-9]+)\b/); 108 if (mtch) { override = mtch[1]; } 109 if (mtch && typeof sorttable["sort_"+override] == 'function') { 110 headrow[i].sorttable_sortfunction = sorttable["sort_"+override]; 111 } else { 112 headrow[i].sorttable_sortfunction = sorttable.guessType(table,i); 113 } 114 // make it clickable to sort 115 headrow[i].sorttable_columnindex = i; 116 headrow[i].sorttable_tbody = table.tBodies[0]; 117 dean_addEvent(headrow[i],"click", sorttable.innerSortFunction = function(e) { 118 119 if (this.className.search(/\bsorttable_sorted\b/) != -1) { 120 // if we're already sorted by this column, just 121 // reverse the table, which is quicker 122 sorttable.reverse(this.sorttable_tbody); 123 this.className = this.className.replace('sorttable_sorted', 124 'sorttable_sorted_reverse'); 125 this.removeChild(document.getElementById('sorttable_sortfwdind')); 126 sortrevind = document.createElement('span'); 127 sortrevind.id = "sorttable_sortrevind"; 128 sortrevind.innerHTML = stIsIE ? ' <font face="webdings">5</font>' : ' ▴'; 129 this.appendChild(sortrevind); 130 return; 131 } 132 if (this.className.search(/\bsorttable_sorted_reverse\b/) != -1) { 133 // if we're already sorted by this column in reverse, just 134 // re-reverse the table, which is quicker 135 sorttable.reverse(this.sorttable_tbody); 136 this.className = this.className.replace('sorttable_sorted_reverse', 137 'sorttable_sorted'); 138 this.removeChild(document.getElementById('sorttable_sortrevind')); 139 sortfwdind = document.createElement('span'); 140 sortfwdind.id = "sorttable_sortfwdind"; 141 sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾'; 142 this.appendChild(sortfwdind); 143 return; 144 } 145 146 // remove sorttable_sorted classes 147 theadrow = this.parentNode;
148 forEach(theadrow.childNodes, function(cell) { 149 if (cell.nodeType == 1) { // an element 150 cell.className = cell.className.replace('sorttable_sorted_reverse',''); 151 cell.className = cell.className.replace('sorttable_sorted',''); 152 } 153 }); 154 sortfwdind = document.getElementById('sorttable_sortfwdind'); 155 if (sortfwdind) { sortfwdind.parentNode.removeChild(sortfwdind); } 156 sortrevind = document.getElementById('sorttable_sortrevind'); 157 if (sortrevind) { sortrevind.parentNode.removeChild(sortrevind); } 158 159 this.className += ' sorttable_sorted'; 160 sortfwdind = document.createElement('span'); 161 sortfwdind.id = "sorttable_sortfwdind"; 162 sortfwdind.innerHTML = stIsIE ? ' <font face="webdings">6</font>' : ' ▾'; 163 this.appendChild(sortfwdind); 164 165 // build an array to sort. This is a Schwartzian transform thing, 166 // i.e., we "decorate" each row with the actual sort key, 167 // sort based on the sort keys, and then put the rows back in order 168 // which is a lot faster because you only do getInnerText once per row 169 row_array = []; 170 col = this.sorttable_columnindex; 171 rows = this.sorttable_tbody.rows; 172 for (var j=0; j<rows.length; j++) { 173 row_array[row_array.length] = [sorttable.getInnerText(rows[j].cells[col]), rows[j]]; 174 } 175 /* If you want a stable sort, uncomment the following line */ 176 //sorttable.shaker_sort(row_array, this.sorttable_sortfunction); 177 /* and comment out this one */ 178 row_array.sort(this.sorttable_sortfunction); 179 180 tb = this.sorttable_tbody; 181 for (var j=0; j<row_array.length; j++) { 182 tb.appendChild(row_array[j][1]); 183 } 184 185 delete row_array; 186 }); 187 } 188 } 189 }, 190 191 guessType: function(table, column) { 192 // guess the type of a column based on its first non-blank row 193 sortfn = sorttable.sort_alpha; 194 for (var i=0; i<table.tBodies[0].rows.length; i++) { 195 text = sorttable.getInnerText(table.tBodies[0].rows[i].cells[column]); 196 if (text != '') { 197 if (text.match(/^-?[£$¤]?[\d,.]+%?$/)) { 198 return sorttable.sort_numeric; 199 } 200 // check for a date: dd/mm/yyyy or dd/mm/yy 201 // can have / or . or - as separator 202 // can be mm/dd as well 203 possdate = text.match(sorttable.DATE_RE) 204 if (possdate) { 205 // looks like a date 206 first = parseInt(possdate[1]); 207 second = parseInt(possdate[2]); 208 if (first > 12) { 209 // definitely dd/mm 210 return sorttable.sort_ddmm; 211 } else if (second > 12) { 212 return sorttable.sort_mmdd; 213 } else { 214 // looks like a date, but we can't tell which, so assume 215 // that it's dd/mm (English imperialism!) and keep looking 216 sortfn = sorttable.sort_ddmm; 217 } 218 } 219 } 220 } 221 return sortfn; 222 }, 223 224 getInnerText: function(node) { 225 // gets the text we want to use for sorting for a cell. 226 // strips leading and trailing whitespace. 227 // this is *not* a generic getInnerText function; it's special to sorttable. 228 // for example, you can override the cell text with a customkey attribute. 229 // it also gets .value for <input> fields. 230 231 if (!node) return ""; 232 233 hasInputs = (typeof node.getElementsByTagName == 'function') && 234 node.getElementsByTagName('input').length; 235 236 if (node.getAttribute("sorttable_customkey") != null) { 237 return node.getAttribute("sorttable_customkey"); 238 } 239 else if (typeof node.textContent != 'undefined' && !hasInputs) { 240 return node.textContent.replace(/^\s+|\s+$/g, ''); 241 } 242 else if (typeof node.innerText != 'undefined' && !hasInputs) { 243 return node.innerText.replace(/^\s+|\s+$/g, ''); 244 } 245 else if (typeof node.text != 'undefined' && !hasInputs) { 246 return node.text.replace(/^\s+|\s+$/g, ''); 247 } 248 else { 249 switch (node.nodeType) { 250 case 3: 251 if (node.nodeName.toLowerCase() == 'input') { 252 return node.value.replace(/^\s+|\s+$/g, ''); 253 } 254 case 4: 255 return node.nodeValue.replace(/^\s+|\s+$/g, ''); 256 break; 257 case 1: 258 case 11: 259 var innerText = ''; 260 for (var i = 0; i < node.childNodes.length; i++) { 261 innerText += sorttable.getInnerText(node.childNodes[i]); 262 } 263 return innerText.replace(/^\s+|\s+$/g, ''); 264 break; 265 default: 266 return ''; 267 } 268 } 269 }, 270 271 reverse: function(tbody) { 272 // reverse the rows in a tbody 273 newrows = []; 274 for (var i=0; i<tbody.rows.length; i++) { 275 newrows[newrows.length] = tbody.rows[i]; 276 } 277 for (var i=newrows.length-1; i>=0; i--) { 278 tbody.appendChild(newrows[i]); 279 } 280 delete newrows; 281 }, 282 283 /* sort functions 284 each sort function takes two parameters, a and b 285 you are comparing a[0] and b[0] */ 286 sort_numeric: function(a,b) {
287 aa = parseFloat(a[0].replace(/[^0-9.-]/g,'')); 288 if (isNaN(aa)) aa = 0; 289 bb = parseFloat(b[0].replace(/[^0-9.-]/g,'')); 290 if (isNaN(bb)) bb = 0; 291 return aa-bb; 292 }, 293 sort_alpha: function(a,b) { 294 if (a[0]==b[0]) return 0; 295 if (a[0]<b[0]) return -1; 296 return 1; 297 }, 298 sort_ddmm: function(a,b) { 299 mtch = a[0].match(sorttable.DATE_RE); 300 y = mtch[3]; m = mtch[2]; d = mtch[1]; 301 if (m.length == 1) m = '0'+m; 302 if (d.length == 1) d = '0'+d; 303 dt1 = y+m+d; 304 mtch = b[0].match(sorttable.DATE_RE); 305 y = mtch[3]; m = mtch[2]; d = mtch[1]; 306 if (m.length == 1) m = '0'+m; 307 if (d.length == 1) d = '0'+d; 308 dt2 = y+m+d; 309 if (dt1==dt2) return 0; 310 if (dt1<dt2) return -1; 311 return 1; 312 }, 313 sort_mmdd: function(a,b) { 314 mtch = a[0].match(sorttable.DATE_RE); 315 y = mtch[3]; d = mtch[2]; m = mtch[1]; 316 if (m.length == 1) m = '0'+m; 317 if (d.length == 1) d = '0'+d; 318 dt1 = y+m+d; 319 mtch = b[0].match(sorttable.DATE_RE); 320 y = mtch[3]; d = mtch[2]; m = mtch[1]; 321 if (m.length == 1) m = '0'+m; 322 if (d.length == 1) d = '0'+d; 323 dt2 = y+m+d; 324 if (dt1==dt2) return 0; 325 if (dt1<dt2) return -1; 326 return 1; 327 }, 328 329 shaker_sort: function(list, comp_func) { 330 // A stable sort function to allow multi-level sorting of data 331 // see: http://en.wikipedia.org/wiki/Cocktail_sort 332 // thanks to Joseph Nahmias 333 var b = 0; 334 var t = list.length - 1; 335 var swap = true; 336 337 while(swap) { 338 swap = false; 339 for(var i = b; i < t; ++i) { 340 if ( comp_func(list[i], list[i+1]) > 0 ) { 341 var q = list[i]; list[i] = list[i+1]; list[i+1] = q; 342 swap = true; 343 } 344 } // for 345 t--; 346 347 if (!swap) break; 348 349 for(var i = t; i > b; --i) { 350 if ( comp_func(list[i], list[i-1]) < 0 ) { 351 var q = list[i]; list[i] = list[i-1]; list[i-1] = q; 352 swap = true; 353 } 354 } // for 355 b++; 356 357 } // while(swap) 358 } 359} 360 361/* ****************************************************************** 362 Supporting functions: bundled here to avoid depending on a library 363 ****************************************************************** */ 364 365// Dean Edwards/Matthias Miller/John Resig 366 367/* for Mozilla/Opera9 */ 368if (document.addEventListener) { 369 document.addEventListener("DOMContentLoaded", sorttable.init, false); 370} 371 372/* for Internet Explorer */ 373/*@cc_on @*/ 374/*@if (@_win32) 375 document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>"); 376 var script = document.getElementById("__ie_onload"); 377 script.onreadystatechange = function() { 378 if (this.readyState == "complete") { 379 sorttable.init(); // call the onload handler 380 } 381 }; 382/*@end @*/ 383 384/* for Safari */ 385if (/WebKit/i.test(navigator.userAgent)) { // sniff 386 var _timer = setInterval(function() { 387 if (/loaded|complete/.test(document.readyState)) { 388 sorttable.init(); // call the onload handler 389 } 390 }, 10); 391} 392 393/* for other browsers */ 394window.onload = sorttable.init; 395 396// written by Dean Edwards, 2005 397// with input from Tino Zijdel, Matthias Miller, Diego Perini 398 399// http://dean.edwards.name/weblog/2005/10/add-event/ 400 401function dean_addEvent(element, type, handler) { 402 if (element.addEventListener) { 403 element.addEventListener(type, handler, false); 404 } else { 405 // assign each event handler a unique ID 406 if (!handler.$$guid) handler.$$guid = dean_addEvent.guid++; 407 // create a hash table of event types for the element 408 if (!element.events) element.events = {}; 409 // create a hash table of event handlers for each element/event pair 410 var handlers = element.events[type]; 411 if (!handlers) { 412 handlers = element.events[type] = {}; 413 // store the existing event handler (if there is one) 414 if (element["on" + type]) { 415 handlers[0] = element["on" + type]; 416 } 417 } 418 // store the event handler in the hash table 419 handlers[handler.$$guid] = handler; 420 // assign a global event handler to do all the work 421 element["on" + type] = handleEvent; 422 } 423}; 424// a counter used to create unique IDs 425dean_addEvent.guid = 1; 426 427function removeEvent(element, type, handler) { 428 if (element.removeEventListener) { 429 element.removeEventListener(type, handler, false); 430 } else { 431 // delete the event handler from the hash table 432 if (element.events && element.events[type]) { 433 delete element.events[type][handler.$$guid]; 434 } 435 } 436}; 437 438function handleEvent(event) { 439 var returnValue = true; 440 // grab the event object (IE uses a global event object) 441 event = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event); 442 // get a reference to the hash table of event handlers 443 var handlers = this.events[event.type]; 444 // execute each event handler 445 for (var i in handlers) { 446 this.$$handleEvent = handlers[i]; 447 if (this.$$handleEvent(event) === false) { 448 returnValue = false; 449 } 450 } 451 return returnValue; 452}; 453 454function fixEvent(event) { 455 // add W3C standard event methods 456 event.preventDefault = fixEvent.preventDefault; 457 event.stopPropagation = fixEvent.stopPropagation; 458 return event; 459}; 460fixEvent.preventDefault = function() { 461 this.returnValue = false; 462}; 463fixEvent.stopPropagation = function() { 464 this.cancelBubble = true; 465} 466 467// Dean's forEach: http://dean.edwards.name/base/forEach.js 468/* 469 forEach, version 1.0 470 Copyright 2006, Dean Edwards 471 License: http://www.opensource.org/licenses/mit-license.php 472*/ 473 474// array-like enumeration 475if (!Array.forEach) { // mozilla already supports this 476 Array.forEach = function(array, block, context) { 477 for (var i = 0; i < array.length; i++) { 478 block.call(context, array[i], i, array); 479 } 480 }; 481} 482 483// generic enumeration 484Function.prototype.forEach = function(object, block, context) { 485 for (var key in object) { 486 if (typeof this.prototype[key] == "undefined") { 487 block.call(context, object[key], key, object); 488 } 489 } 490}; 491 492// character enumeration 493String.forEach = function(string, block, context) { 494 Array.forEach(string.split(""), function(chr, index) { 495 block.call(context, chr, index, string); 496 });
497}; 498 499// globally resolve forEach enumeration 500var forEach = function(object, block, context) { 501 if (object) { 502 var resolve = Object; // default 503 if (object instanceof Function) { 504 // functions have a "length" property 505 resolve = Function; 506 } else if (object.forEach instanceof Function) { 507 // the object implements a custom forEach method so use that 508 object.forEach(block, context); 509 return; 510 } else if (typeof object == "string") { 511 // the object is a string 512 resolve = String; 513 } else if (typeof object.length == "number") { 514 // the object is array-like 515 resolve = Array; 516 } 517 resolve.forEach(object, block, context); 518 } 519}; 520 521 522/*! 523 * parallax.js v1.3.1 (http://pixelcog.github.io/parallax.js/) 524 * @copyright 2015 PixelCog, Inc. 525 * @license MIT (https://github.com/pixelcog/parallax.js/blob/master/LICENSE) 526 */!function(t,i,e,s){function o(i,e){var h=this;"object"==typeof e&&(delete e.refresh,delete e.render,t.extend(this,e)),this.$element=t(i),!this.imageSrc&&this.$element.is("img")&&(this.imageSrc=this.$element.attr("src"));var r=(this.position+"").toLowerCase().match(/\S+/g)||[];return r.length<1&&r.push("center"),1==r.length&&r.push(r[0]),("top"==r[0]||"bottom"==r[0]||"left"==r[1]||"right"==r[1])&&(r=[r[1],r[0]]),this.positionX!=s&&(r[0]=this.positionX.toLowerCase()),this.positionY!=s&&(r[1]=this.positionY.toLowerCase()),h.positionX=r[0],h.positionY=r[1],"left"!=this.positionX&&"right"!=this.positionX&&(this.positionX=isNaN(parseInt(this.positionX))?"center":parseInt(this.positionX)),"top"!=this.positionY&&"bottom"!=this.positionY&&(this.positionY=isNaN(parseInt(this.positionY))?"center":parseInt(this.positionY)),this.position=this.positionX+(isNaN(this.positionX)?"":"px")+" "+this.positionY+(isNaN(this.positionY)?"":"px"),navigator.userAgent.match(/(iPod|iPhone|iPad)/)?(this.iosFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this):navigator.userAgent.match(/(Android)/)?(this.androidFix&&!this.$element.is("img")&&this.$element.css({backgroundImage:"url("+this.imageSrc+")",backgroundSize:"cover",backgroundPosition:this.position}),this):(this.$mirror=t("<div />").prependTo("body"),this.$slider=t("<img />").prependTo(this.$mirror),this.$mirror.addClass("parallax-mirror").css({visibility:"hidden",zIndex:this.zIndex,position:"fixed",top:0,left:0,overflow:"hidden"}),this.$slider.addClass("parallax-slider").one("load",function(){h.naturalHeight&&h.naturalWidth||(h.naturalHeight=this.naturalHeight||this.height||1,h.naturalWidth=this.naturalWidth||this.width||1),h.aspectRatio=h.naturalWidth/h.naturalHeight,o.isSetup||o.setup(),o.sliders.push(h),o.isFresh=!1,o.requestRender()}),this.$slider[0].src=this.imageSrc,void((this.naturalHeight&&this.naturalWidth||this.$slider[0].complete)&&this.$slider.trigger("load")))}function h(s){return this.each(function(){var h=t(this),r="object"==typeof s&&s;this==i||this==e||h.is("body")?o.configure(r):h.data("px.parallax")||(r=t.extend({},h.data(),r),h.data("px.parallax",new o(this,r))),"string"==typeof s&&o[s]()})}!function(){for(var t=0,e=["ms","moz","webkit","o"],s=0;s<e.length&&!i.requestAnimationFrame;++s)i.requestAnimationFrame=i[e[s]+"RequestAnimationFrame"],i.cancelAnimationFrame=i[e[s]+"CancelAnimationFrame"]||i[e[s]+"CancelRequestAnimationFrame"];i.requestAnimationFrame||(i.requestAnimationFrame=function(e){var s=(new Date).getTime(),o=Math.max(0,16-(s-t)),h=i.setTimeout(function(){e(s+o)},o);return t=s+o,h}),i.cancelAnimationFrame||(i.cancelAnimationFrame=function(t){clearTimeout(t)})}(),t.extend(o.prototype,{speed:.2,bleed:0,zIndex:-100,iosFix:!0,androidFix:!0,position:"center",overScrollFix:!1,refresh:function(){this.boxWidth=this.$element.outerWidth(),this.boxHeight=this.$element.outerHeight()+2*this.bleed,this.boxOffsetTop=this.$element.offset().top-this.bleed,this.boxOffsetLeft=this.$element.offset().left,this.boxOffsetBottom=this.boxOffsetTop+this.boxHeight;var t=o.winHeight,i=o.docHeight,e=Math.min(this.boxOffsetTop,i-t),s=Math.max(this.boxOffsetTop+this.boxHeight-t,0),h=this.boxHeight+(e-s)*(1-this.speed)|0,r=(this.boxOffsetTop-e)*(1-this.speed)|0;if(h*this.aspectRatio>=this.boxWidth){this.imageWidth=h*this.aspectRatio|0,this.imageHeight=h,this.offsetBaseTop=r;var n=this.imageWidth-this.boxWidth;this.offsetLeft="left"==this.positionX?0:"right"==this.positionX?-n:isNaN(this.positionX)?-n/2|0:Math.max(this.positionX,-n)}else{this.imageWidth=this.boxWidth,this.imageHeight=this.boxWidth/this.aspectRatio|0,this.offsetLeft=0;var n=this.imageHeight-h;this.offsetBaseTop="top"==this.positionY?r:"bottom"==this.positionY?r-n:isNaN(this.positionY)?r-n/2|0:r+Math.max(this.positionY,-n)}},render:function(){var t=o.scrollTop,i=o.scrollLeft,e=this.overScrollFix?o.overScroll:0,s=t+o.winHeight;this.visibility=this.boxOffsetBottom>t&&this.boxOffsetTop<s?"visible":"hidden",this.mirrorTop=this.boxOffsetTop-t,this.mirrorLeft=this.boxOffsetLeft-i,this.offsetTop=this.offsetBaseTop-this.mirrorTop*(1-this.speed),this.$mirror.css({transform:"translate3d(0px, 0px, 0px)",visibility:this.visibility,top:this.mirrorTop-e,left:this.mirrorLeft,height:this.boxHeight,width:this.boxWidth}),this.$slider.css({transform:"translate3d(0px, 0px, 0px)",position:"absolute",top:this.offsetTop,left:this.offsetLeft,height:this.imageHeight,width:this.imageWidth,maxWidth:"none"})}}),t.extend(o,{scrollTop:0,scrollLeft:0,winHeight:0,winWidth:0,docHeight:1<<30,docWidth:1<<30,sliders:[],isReady:!1,isFresh:!1,isBusy:!1,setup:function(){if(!this.isReady){var s=t(e),h=t(i);h.on("scroll.px.parallax load.px.parallax",function(){var t=o.docHeight-o.winHeight,i=o.docWidth-o.winWidth;o.scrollTop=Math.max(0,Math.min(t,h.scrollTop())),o.scrollLeft=Math.max(0,Math.min(i,h.scrollLeft())),o.overScroll=Math.max(h.scrollTop()-t,Math.min(h.scrollTop(),0)),o.requestRender()}).on("resize.px.parallax load.px.parallax",function(){o.winHeight=h.height(),o.winWidth=h.width(),o.docHeight=s.height(),o.docWidth=s.width(),o.isFresh=!1,o.requestRender()}),this.isReady=!0}},configure:function(i){"object"==typeof i&&(delete i.refresh,delete i.render,t.extend(this.prototype,i
526))},refresh:function(){t.each(this.sliders,function(){this.refresh()}),this.isFresh=!0},render:function(){this.isFresh||this.refresh(),t.each(this.sliders,function(){this.render()})},requestRender:function(){var t=this;this.isBusy||(this.isBusy=!0,i.requestAnimationFrame(function(){t.render(),t.isBusy=!1}))}});var r=t.fn.parallax;t.fn.parallax=h,t.fn.parallax.Constructor=o,t.fn.parallax.noConflict=function(){return t.fn.parallax=r,this},t(e).on("ready.px.parallax.data-api",function(){t('[data-parallax="scroll"]').parallax()})}(jQuery,window,document); 527!function(){var a,AbstractChosen,Chosen,SelectParser,b,c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};SelectParser=function(){function SelectParser(){this.options_index=0,this.parsed=[]}return SelectParser.prototype.add_node=function(a){return"OPTGROUP"===a.nodeName.toUpperCase()?this.add_group(a):this.add_option(a)},SelectParser.prototype.add_group=function(a){var b,c,d,e,f,g;for(b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:this.escapeExpression(a.label),children:0,disabled:a.disabled}),f=a.childNodes,g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},SelectParser.prototype.add_option=function(a,b,c){return"OPTION"===a.nodeName.toUpperCase()?(""!==a.text?(null!=b&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},SelectParser.prototype.escapeExpression=function(a){var b,c;return null==a||a===!1?"":/[\&\<\>\"\'\`]/.test(a)?(b={"<":"<",">":">",'"':""","'":"'","`":"`"},c=/&(?!\w+;)|[\<\>\"\'\`]/g,a.replace(c,function(a){return b[a]||"&"})):a},SelectParser}(),SelectParser.select_to_array=function(a){var b,c,d,e,f;for(c=new SelectParser,f=a.childNodes,d=0,e=f.length;e>d;d++)b=f[d],c.add_node(b);return c.parsed},AbstractChosen=function(){function AbstractChosen(a,b){this.form_field=a,this.options=null!=b?b:{},AbstractChosen.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return AbstractChosen.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},AbstractChosen.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||AbstractChosen.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||AbstractChosen.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||AbstractChosen.default_no_result_text},AbstractChosen.prototype.mouse_enter=function(){return this.mouse_on_container=!0},AbstractChosen.prototype.mouse_leave=function(){return this.mouse_on_container=!1},AbstractChosen.prototype.input_focus=function(){var a=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return a.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},AbstractChosen.prototype.input_blur=function(){var a=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return a.blur_test()},100))},AbstractChosen.prototype.results_option_build=function(a){var b,c,d,e,f;for(b="",f=this.results_data,d=0,e=f.length;e>d;d++)c=f[d],b+=c.group?this.result_add_group(c):this.result_add_option(c),(null!=a?a.first:void 0)&&(c.selected&&this.is_multiple?this.choice_build(c):c.selected&&!this.is_multiple&&this.single_set_selected_text(c.text));return b},AbstractChosen.prototype.result_add_option=function(a){var b,c;return a.search_match?this.include_option_in_results(a)?(b=[],a.disabled||a.selected&&this.is_multiple||b.push("active-result"),!a.disabled||a.selected&&this.is_multiple||b.push("disabled-result"),a.selected&&b.push("result-selected"),null!=a.group_array_index&&b.push("group-option"),""!==a.classes&&b.push(a.classes),c=""!==a.style.cssText?' style="'+a.style+'"':"",'<li class="'+b.join(" ")+'"'+c+' data-option-array-index="'+a.array_index+'">'+a.search_text+"</li>"):"":""},AbstractChosen.prototype.result_add_group=function(a){return a.search_match||a.group_match?a.active_options>0?'<li class="group-result">'+a.search_text+"</li>":"":""},AbstractChosen.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build(),this.results_showing?this.winnow_results():void 0},AbstractChosen.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},AbstractChosen.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},AbstractChosen.prototype.winnow_results=function(){var a,b,c,d,e,f,g,h,i,j,k,l,m;for(this.no_results_clear(),e=0,g=this.get_search_text(),a=g.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),d=this.search_contains?"":"^",c=new RegExp(d+a,"i"),j=new RegExp(a,"i"),m=this.results_data,k=0,l=m.length;l>k;k++)b=m[k],b.search_match=!1,f=null,this.include_option_in_results(b)&&(b.group&&(b.group_match=!1,b.active_options=0),null!=b.group_array_index&&this.results_data[b.group_array_index]&&(f=this.results_data[b.group_array_index],0===f.active_options&&f.search_match&&(e+=1),f.active_options+=1),(!b.group||this.group_search)&&(b.search_text=b.group?b.label:b.html,b.search_match=this.search_string_match(b.search_text,c),b.search_match&&!b.group&&(e+=1),b.search_match?(g.length&&(h=b.search_text.search(j),i=b.search_text.substr(0,h+g.length)+"</em>"+b.search_text.substr(h+g.length),b.search_text=i.substr(0,h)+"<em>"+i.substr(h)),null!=f&&(f.group_match=!0)):null!=b.group_array_index&&this.results_data[b.group_array_index].search_match&&(b.search_match=!0)));return this.result_clear_highlight(),1>e&&g.length?(this.update_results_content(""),this.no_results(g)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},AbstractChosen.prototype.search_string_match=function(a,b){var c,d,e,f;if(b.test(a))return!0;
527if(this.enable_split_word_search&&(a.indexOf(" ")>=0||0===a.indexOf("["))&&(d=a.replace(/\[|\]/g,"").split(" "),d.length))for(e=0,f=d.length;f>e;e++)if(c=d[e],b.test(c))return!0},AbstractChosen.prototype.choices_count=function(){var a,b,c,d;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,d=this.form_field.options,b=0,c=d.length;c>b;b++)a=d[b],a.selected&&(this.selected_option_count+=1);return this.selected_option_count},AbstractChosen.prototype.choices_click=function(a){return a.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},AbstractChosen.prototype.keyup_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(a.preventDefault(),this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},AbstractChosen.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},AbstractChosen.prototype.include_option_in_results=function(a){return this.is_multiple&&!this.display_selected_options&&a.selected?!1:!this.display_disabled_options&&a.disabled?!1:a.empty?!1:!0},AbstractChosen.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},AbstractChosen.default_multiple_text="Select Some Options",AbstractChosen.default_single_text="Select an Option",AbstractChosen.default_no_result_text="No results match",AbstractChosen}(),a=jQuery,a.fn.extend({chosen:function(b){return AbstractChosen.browser_is_supported()?this.each(function(){var c,d;c=a(this),d=c.data("chosen"),"destroy"===b&&d?d.destroy():d||c.data("chosen",new Chosen(this,b))}):this}}),Chosen=function(c){function Chosen(){return b=Chosen.__super__.constructor.apply(this,arguments)}return d(Chosen,c),Chosen.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},Chosen.prototype.set_up_html=function(){var b,c;return b=["chosen-container"],b.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&b.push(this.form_field.className),this.is_rtl&&b.push("chosen-rtl"),c={"class":b.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(c.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",c),this.is_multiple?this.container.html('<ul class="chosen-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chosen-drop"><ul class="chosen-results"></ul></div>'):this.container.html('<a class="chosen-single chosen-default" tabindex="-1"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off" /></div><ul class="chosen-results"></ul></div>'),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior(),this.form_field_jq.trigger("chosen:ready",{chosen:this})},Chosen.prototype.register_observers=function(){var a=this;return this.container.bind("mousedown.chosen",function(b){a.container_mousedown(b)}),this.container.bind("mouseup.chosen",function(b){a.container_mouseup(b)}
vendor: 7,889 bytes, line 527
527),this.container.bind("mouseenter.chosen",function(b){a.mouse_enter(b)}),this.container.bind("mouseleave.chosen",function(b){a.mouse_leave(b)}),this.search_results.bind("mouseup.chosen",function(b){a.search_results_mouseup(b)}),this.search_results.bind("mouseover.chosen",function(b){a.search_results_mouseover(b)}),this.search_results.bind("mouseout.chosen",function(b){a.search_results_mouseout(b)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(b){a.search_results_mousewheel(b)}),this.form_field_jq.bind("chosen:updated.chosen",function(b){a.results_update_field(b)}),this.form_field_jq.bind("chosen:activate.chosen",function(b){a.activate_field(b)}),this.form_field_jq.bind("chosen:open.chosen",function(b){a.container_mousedown(b)}),this.search_field.bind("blur.chosen",function(b){a.input_blur(b)}),this.search_field.bind("keyup.chosen",function(b){a.keyup_checker(b)}),this.search_field.bind("keydown.chosen",function(b){a.keydown_checker(b)}),this.search_field.bind("focus.chosen",function(b){a.input_focus(b)}),this.is_multiple?this.search_choices.bind("click.chosen",function(b){a.choices_click(b)}):this.container.bind("click.chosen",function(a){a.preventDefault()})},Chosen.prototype.destroy=function(){return a(document).unbind("click.chosen",this.click_test_action),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},Chosen.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field_jq[0].disabled,this.is_disabled?(this.container.addClass("chosen-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus.chosen",this.activate_action),this.close_field()):(this.container.removeClass("chosen-disabled"),this.search_field[0].disabled=!1,this.is_multiple?void 0:this.selected_item.bind("focus.chosen",this.activate_action))},Chosen.prototype.container_mousedown=function(b){return this.is_disabled||(b&&"mousedown"===b.type&&!this.results_showing&&b.preventDefault(),null!=b&&a(b.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!b||a(b.target)[0]!==this.selected_item[0]&&!a(b.target).parents("a.chosen-single").length||(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},Chosen.prototype.container_mouseup=function(a){return"ABBR"!==a.target.nodeName||this.is_disabled?void 0:this.results_reset(a)},Chosen.prototype.search_results_mousewheel=function(a){var b,c,d;return b=-(null!=(c=a.originalEvent)?c.wheelDelta:void 0)||(null!=(d=a.originialEvent)?d.detail:void 0),null!=b?(a.preventDefault(),"DOMMouseScroll"===a.type&&(b=40*b),this.search_results.scrollTop(b+this.search_results.scrollTop())):void 0},Chosen.prototype.blur_test=function(){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},Chosen.prototype.close_field=function(){return a(document).unbind("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},Chosen.prototype.activate_field=function(){return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},Chosen.prototype.test_active_click=function(b){return this.container.is(a(b.target).closest(".chosen-container"))?this.active_field=!0:this.close_field()},Chosen.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():this.is_multiple||(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},Chosen.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){if(this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight(),b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(f>c)return this.search_results.scrollTop(c)}},Chosen.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},Chosen.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results())},Chosen.prototype.update_results_content=function(a){return this.search_results.html(a)},Chosen.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},Chosen.prototype.set_tab_index=function(){var a;return this.form_field.tabIndex?(a=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=a):void 0},Chosen.prototype.set_label_behavior=function(){var b=this;return this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(a){return b.is_multiple?b.container_mousedown(a):b.activate_field()}):void 0},Chosen.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},Chosen.prototype.search_results_mouseup=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c.length?(this.result_highlight=c,this.result_select(b),this.search_field.focus()):void 0},Chosen.prototype.search_results_mouseover=function(b){var c;return c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first(),c?this.result_do_highlight(c):void 0},Chosen.prototype.search_results_mouseout=function(b){return a(b.target).hasClass("active-result")?this.result_clear_highlight():void 0},Chosen.prototype.choice_build=function(b){var c,d,e=this;return c=a("<li />",{"class":"search-choice"}).html("<span>"+b.html+"</span>"),b.disabled?c.addClass("search-choice-disabled"):(d=a("<a />",{"class":"search-choice-close","data-option-array-index":b.array_index}),d.bind("click.chosen",function(a){return e.choice_destroy_link_click(a)}),c.append(d)),this.search_container.before(c)},Chosen.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),b.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(a(b.target))},Chosen.prototype.choice_destroy=function(a){return this.result_deselect(a[
5270].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),a.parents("li").first().remove(),this.search_field_scale()):void 0},Chosen.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_option_count=null,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},Chosen.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},Chosen.prototype.result_select=function(a){var b,c,d;return this.result_highlight?(b=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?b.removeClass("active-result"):(this.result_single_selected&&(this.result_single_selected.removeClass("result-selected"),d=this.result_single_selected[0].getAttribute("data-option-array-index"),this.results_data[d].selected=!1),this.result_single_selected=b),b.addClass("result-selected"),c=this.results_data[b[0].getAttribute("data-option-array-index")],c.selected=!0,this.form_field.options[c.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(c):this.single_set_selected_text(c.text),(a.metaKey||a.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[c.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0},Chosen.prototype.single_set_selected_text=function(a){return null==a&&(a=this.default_text),a===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(a)},Chosen.prototype.result_deselect=function(a){var b;return b=this.results_data[a],this.form_field.options[b.options_index].disabled?!1:(b.selected=!1,this.form_field.options[b.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[b.options_index].value}),this.search_field_scale(),!0)},Chosen.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")):void 0},Chosen.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html()},Chosen.prototype.winnow_results_set_highlight=function(){var a,b;return b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first(),null!=a?this.result_do_highlight(a):void 0},Chosen.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c)},Chosen.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},Chosen.prototype.keydown_arrow=function(){var a;return this.results_showing&&this.result_highlight?(a=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(a):void 0:this.results_show()},Chosen.prototype.keyup_arrow=function(){var a;return this.results_showing||this.is_multiple?this.result_highlight?(a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},Chosen.prototype.keydown_backstroke=function(){var a;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(a=this.search_container.siblings("li.search-choice").last(),a.length&&!a.hasClass("search-choice-disabled")?(this.pending_backstroke=a,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},Chosen.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},Chosen.prototype.keydown_checker=function(a){var b,c;switch(b=null!=(c=a.which)?c:a.keyCode,this.search_field_scale(),8!==b&&this.pending_backstroke&&this.clear_backstroke(),b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:a.preventDefault(),this.keydown_arrow()}},Chosen.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){for(d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],i=0,j=g.length;j>i;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return b=a("<div />",{style:f}),b.text(this.search_field.val()),a("body").append(b),h=b.width()+25,b.remove(),c=this.container.outerWidth(),h>c-10&&(h=c-10),this.search_field.css({width:h+"px"})}},Chosen}(AbstractChosen)}.call(this); 528/*! 529 Colorbox 1.6.2 530 license: MIT 531 http://www.jacklmoore.com/colorbox 532*/
vendor: 4,647 bytes, line 533
533(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in y[0]&&!y[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),y.focus())}function c(t){c.str!==t&&(y.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),y.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=(l!==!1?Math.min(h,a(l,"x")):h)-z-D,_.h=(f!==!1?Math.min(s,a(f,"y")):s)-N-j,I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(F).hide(),y.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){y||(V=!1,E=t(i),y=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),M=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),x=n(se,"Wrapper"),b=n(se,"Content").append(F=n(se,"Title"),R=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),S=n("button","Slideshow"),M),B=t('<button type="button"/>').attr({id:Z+"Close"}),x.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),L=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(R).add(S)),e.body&&!y.parent().length&&t(e.body).append(v,y.append(x,L))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return y?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;$&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),$&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if(q=!0,U=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){M.show()},100),_.get("inline")){var c=t(e);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),U=_.get("
533createImg"),t(U).addClass(Z+"Photo").bind("error."+Z,function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var e;_.get("retinaImage")&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){U.height-=U.height*e,U.width-=U.width*e},_.mw&&U.width>_.mw&&(e=(U.width-_.mw)/U.width,o()),_.mh&&U.height>_.mh&&(e=(U.height-_.mh)/U.height,o())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(U.style.cursor="pointer",t(U).bind("click."+Z,function(){J.next()})),U.style.width=U.width+"px",U.style.height=U.height+"px",h(U)},1)}),U.src=e):e&&L.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,y,x,b,T,C,H,k,W,E,I,L,M,F,R,S,K,P,B,O,_,j,D,N,z,A,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){S.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),y.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),S.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),y.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,S.hide(),t(),ae.unbind(ne,e).unbind(ie,t),y.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),S.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(y[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(y[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=y.offset();if(E.unbind("resize."+Z),y.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,y.css({position:"fixed"})):(l=h,d=s,y.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),y.css({top:c.top,left
vendor: 7,214 bytes, lines 533-534
533:c.left,visibility:"visible"}),x[0].style.width=x[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||y.css(r),y.dequeue().animate(r,{duration:e||0,complete:function(){n(),q=!1,x[0].style.width=_.w+z+D+"px",x[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(L.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),L.hide(),t(U).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&y[0].style.removeAttribute("filter")}var n,o,a=W.length;$&&(o=function(){clearTimeout(Q),M.hide(),u(ne),_.get("onComplete")},F.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&R.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?y.fadeTo(g,1,i):i())},"fade"===_.get("transition")?y.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!q&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!q&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){$&&!G&&(G=!0,$=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),y.stop().fadeTo(_.get("fadeOut")||0,0,function(){y.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){y&&(y.stop(),t[Y].close(),y.stop(!1,!0).remove(),v.remove(),G=!1,y=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window); 534/**� * initialize some tasks after document was loaded� */�$(document).ready(function () {�� // initialize lightbox� $('.lightbox').colorbox({� 'opacity': 0.7,� 'maxWidth': "90%",� 'maxHeight': "90%"� });�� /**� * Dropdown menu - desktop view� * If an li-element of the main navigation has been clicked,� * open the assigned dropdown menu and close others.� */�� $('.menu .firstLevel li').click(function () {� // attention: this variable presents the classname without dot!� let sublevelClass = $(this).data('entry');�� // toggling assigned dropdown menu� $('nav.complete .menuSublevel.' + sublevelClass).slideToggle(400);�� if ( $(this).hasClass('open') ) {� $(this).removeClass('open');� $('.menu .firstLevel li').removeClass('open');� } else {� $('.menu .firstLevel li').removeClass('open');� $(this).addClass('open');� }�� // hiding other dropdowns� $('nav.complete .menuSublevel').not('.' + sublevelClass).css('display', '');� });��� /**� * Hamburger menu - tablet/mobile view� * By using a smaller viewport we offer an optimised navigation� * nested in a separate div container with class .mobileAddOn� */�� // step 1: bind hamburger icon to the toggle event� $('.mobileMenu').click(function () {� $('nav.complete').slideToggle(300).addClass('mobile');� });�� // step 2: possibilty to open submenus� $('nav.complete .menuSublevel a').click(function (e) {� // Check whether it's a responsive mobile menu� let isMobile = $(this).closest('nav').hasClass('mobile');�� if (isMobile && $(e.target).hasClass('plus')) {� // Prevent default link form desktop� e.preventDefault();�� $(this).parent().find('.secondLevel').slideToggle(200);� }� });�� $(window).resize(function () {� let width = $(this).width();�� if (width > 819) {� $('nav.complete').css('display', '');� }� });��� /**� * Redesigned checkboxes and radio buttons� * Binding designed divs to real inputs� */� $('.tx-powermail .checkbox label').on('click', function (e) {� // prevent default bahavior� // otherwise this function will be called twice� e.preventDefault();�� // checkbox field� let checkbox = $(this).find('input[type="checkbox"]');� let status = checkbox.prop('checked');�� if (status === true) {� checkbox.prop('checked', false);� $(this).removeClass('checked');� } else {� checkbox.prop('checked', true);� $(this).addClass('checked');� }� });�� $('.tx-powermail .radio label').on('click', function (e) {� // prevent default bahavior� // otherwise this function will be called twice� e.preventDefault();�� // checkbox field� let radio = $(this).find('input[type="radio"]');� let status = radio.prop('checked');�� // uncheck others� let formGroup = $(this).parent().parent();� formGroup.find('.radio label').not($(this)).removeClass('checked');�� if (status === true) {� radio.prop('checked', false);� $(this).removeClass('checked');� } else {� radio.prop('checked', true);� $(this).addClass('checked');� }� });��� /**� * FCE "accordion"� */�� const accordionAnimationDuration = 400;�� $('.sc27-gridelements-accordion').each(function () {�� let contentElement = $(this);�� // Auf Click reagieren� $(contentElement).find('.card-header > button').click(function () { // trigger�� let clickedElement = $(this).parentsUntil('.card').parent();� let clickedElementButtonElement = $(clickedElement).find('.card-header button');�� // Alle Elemente durchlaufen� $(contentElement).find('.card').each(function () {�� let buttonElement = $(this).find('.card-header button');�� if ($(this).get(0).isEqualNode(clickedElement.get(0))) {�� // Angeklickter Eintag - öffnen/schlieÃen� $(this).find('.collapse').slideToggle(accordionAnimationDuration, function () {�� $(this).toggleClass('show', $(this).is(':visible'));�� if ($(this).is(':visible')) {� $(buttonElement).get(0).setAttribute('aria-expanded', 'true');� } else {� $(buttonElement).get(0).setAttribute('aria-expanded', 'false');� }�� });�� }
534 else {�� // Anderer Eintrag - schlieÃen� $(this).find('.collapse').slideUp(accordionAnimationDuration, function () {� $(this).removeClass('show');� $(buttonElement).get(0).setAttribute('aria-expanded', 'false');� });�� }�� });�� });�� })��� /**� * Mediaconfirm� * (Einwilligung für YouTube-Videos)� */�� let sc27Mediaconfirm = new Sc27Mediaconfirm();�� sc27Mediaconfirm.init({� debug: false,� });��});��//search results�function openResult(link) {� target = jQuery.parseHTML(link);� targetLoc = jQuery(target)[0].href;� location.href = targetLoc;�} 535$(document).ready(function() { 536 537 $(document).on('click', '.bibtex h3', function() { 538 $(this).toggleClass('opened'); 539 540 let group = $(this).data('group'); 541 $('ul[data-group="' + group+ '"]').slideToggle(400); 542 }); 543 544 if($('.bibtext-content:first').children().length > 0){ 545 $('.bibtex h3:first').toggleClass('opened'); 546 547 let group = $('.bibtex h3').data('group'); 548 $('ul[data-group="' + group+ '"]').slideToggle(400); 549 } 550 551 /* ------------------------ Search event ------------------------ */ 552 553 $('.bibtex .search').on('input', function() { 554 // find search terms and separate them 555 let needles = $('.bibtex .search') 556 .val().toLowerCase().split(' '); 557 558 // reset markers 559 $('.bibtext-content').html(unmark($('.bibtext-content'))); 560 561 if(needles[0].length <= 2) { 562 // hide all li's 563 $('.bibtext-content ul').hide(); 564 $('.bibtext-content ul li').show(); 565 $('.bibtext-content h3').show().removeClass('opened'); 566 567 return; 568 } 569 570 // filter each li tag associated with the needles 571 $('.bibtext-content li').each(function() { 572 let entry = $(this); 573 574 let found = false; 575 576 // find if entry contains all search terms 577 needles.some(function(needle) { 578 let entryText = entry.text().toLowerCase(); 579 580 if (entryText.includes(needle)) { 581 found = true; 582 } 583 else { 584 found = false; 585 return true; 586 } 587 }); 588 589 if (found) { 590 // Mark all results 591 mark(needles, entry); 592 593 // reset display status 594 $(this).show(); 595 } 596 else { 597 $(this).hide(); 598 } 599 }); 600 601 // show all years 602 $('.bibtext-content ul').show(); 603 604 // remove all years without entries 605 $('.bibtext-content h3').addClass('opened').each(function() { 606 let group = $(this).data('group'); 607 608 let hasEntries = false; 609 $('.bibtex ul[data-group="' + group+ '"] li').each(function() { 610 if($(this).css('display') !== 'none') { 611 hasEntries = true; 612 } 613 }); 614 615 if(hasEntries) { 616 $(this).show(); 617 $('.bibtex ul[data-group="' + group+ '"]').show(); 618 } 619 else { 620 $(this).hide(); 621 $('.bibtex ul[data-group="' + group+ '"]').hide(); 622 } 623 }); 624 }); 625 626 function mark(needles, item) { 627 needles.forEach(function(needle) { 628 if(needle.length > 2) { 629 let re = RegExp('(' + needle + ')', 'gi'); 630 let marked = item.html().replace(re, '<span class="marked">$1</span>'); 631 632 item.html(marked); 633 } 634 }); 635 } 636 637 function unmark(item) { 638 let re = RegExp('<span class=\"marked\">(.*?)<\/span>', 'gi'); 639 let clean = item.html().replace(re, '$1'); 640 641 item.html(clean); 642 } 643 644}); 645 646function log_download(n, e){ 647 console.log("logging"); 648 $.ajax({ 649 type: "POST", 650 url: server + "/log", 651 data: {type: "download", bibbaseid: n, url: e}, 652 dataType: "json" 653 }).done(function(){ 654 console.log("logged", ga), ga("send", "event", "publications", "download", n, { 655 hitCallback: function(){ 656 document.location = e 657 } 658 }), setTimeout(function(){ 659 document.location = e 660 }, 500) 661 }) 662} 663 664function log_buy(n, e){ 665 ga("send", "event", "publications", "buy", n, { 666 hitCallback: function(){ 667 document.location = e 668 } 669 }), setTimeout(function(){ 670 document.location = e 671 }, 500) 672} 673 674function log_send(n, e){ 675 server = server || ""; 676 $.ajax({type: "POST", url: server + "/log", data: n, dataType: "json"}).done(e) 677} 678 679function loadBootstrap(n){ 680 for(var e = "function" == typeof $.fn.modal, t = 0; t < document.scripts.length; t++) if(document.scripts[t].src.indexOf("/bootstrap.") >= 0){ 681 e = !0; 682 break 683 } 684 e ? (console.log("(BibBase) Looks like you already have bootstrap. Using that. If things don't work quite right, try to remove your own bootstrap js/css and see whether that fixes things."), n()) : (loadcss(server + "/css/bootstrap.min.css"), $.getScript(server + "/js/bootstrap.min.js", n)) 685} 686 687function loadcss(n, e){ 688 document.createStyleSheet ? document.createStyleSheet(n) : (e = e || "prepend", $("head")[e]($("<link rel='stylesheet' href='" + n + "' type='text/css' media='screen' />"))) 689} 690 691function gatherHTML(){ 692 var n = {}; 693 $(".bibbase_paper").each(function(e, t){ 694 n[t.id] = t.innerHTML 695 }); 696 for(var e in bibbase.data){
697 var t = bibbase.data[e]; 698 t.html = n[t.bibbaseid] 699 } 700} 701 702function markRead(){ 703 bibbase && bibbase.read && ($(".read").removeClass("hasread"), bibbase.read.forEach(function(n){ 704 $("#" + n.bibbaseid + " .read").addClass("hasread") 705 })) 706} 707 708this.Handlebars = function(){ 709 var n = function(){ 710 "use strict"; 711 712 function n(n){ 713 this.string = n 714 } 715 716 return n.prototype.toString = function(){ 717 return "" + this.string 718 }, n 719 }(), e = function(e){ 720 "use strict"; 721 722 function t(n){ 723 return i[n] || "&" 724 } 725 726 var a = {}, r = n, i = {"&": "&", "<": "<", ">": ">", '"': """, "'": "'", "`": "`"}, 727 s = /[&<>"'`]/g, o = /[&<>"'`]/; 728 a.extend = function(n){ 729 for(var e = 1; e < arguments.length; e++) for(var t in arguments[e]) Object.prototype.hasOwnProperty.call(arguments[e], t) && (n[t] = arguments[e][t]); 730 return n 731 }; 732 var l = Object.prototype.toString; 733 a.toString = l; 734 (c = function(n){ 735 return "function" == typeof n 736 })(/x/) && (c = function(n){ 737 return "function" == typeof n && "[object Function]" === l.call(n) 738 }); 739 var c; 740 a.isFunction = c; 741 var u = Array.isArray || function(n){ 742 return !(!n || "object" != typeof n) && "[object Array]" === l.call(n) 743 }; 744 return a.isArray = u, a.escapeExpression = function(n){ 745 return n instanceof r ? n.toString() : n || 0 === n ? (n = "" + n, o.test(n) ? n.replace(s, t) : n) : "" 746 }, a.isEmpty = function(n){ 747 return !n && 0 !== n || !(!u(n) || 0 !== n.length) 748 }, a.appendContextPath = function(n, e){ 749 return (n ? n + "." : "") + e 750 }, a 751 }(), t = function(){ 752 "use strict"; 753 754 function n(n, t){ 755 var a; 756 t && t.firstLine && (n += " - " + (a = t.firstLine) + ":" + t.firstColumn); 757 for(var r = Error.prototype.constructor.call(this, n), i = 0; i < e.length; i++) this[e[i]] = r[e[i]]; 758 a && (this.lineNumber = a, this.column = t.firstColumn) 759 } 760 761 var e = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"]; 762 return n.prototype = new Error, n 763 }(), a = function(n, a){ 764 "use strict"; 765 766 function r(n, e){ 767 this.helpers = n || {}, this.partials = e || {}, function(n){ 768 n.registerHelper("helperMissing", function(){ 769 if(1 !== arguments.length) throw new l("Missing helper: '" + arguments[arguments.length - 1].name + "'") 770 }), n.registerHelper("blockHelperMissing", function(e, t){ 771 var a = t.inverse || function(){ 772 }, r = t.fn; 773 if(u(e) && (e = e.call(this)), !0 === e) return r(this); 774 if(!1 === e || null == e) return a(this); 775 if(c(e)) return e.length > 0 ? (t.ids && (t.ids = [t.name]), n.helpers.each(e, t)) : a(this); 776 if(t.data && t.ids){ 777 var i = h(t.data); 778 i.contextPath = o.appendContextPath(t.data.contextPath, t.name), t = {data: i} 779 } 780 return r(e, t) 781 }), n.registerHelper("each", function(n, e){ 782 e || (e = n, n = this); 783 var t, a, r = e.fn, i = e.inverse, s = 0, l = ""; 784 if(e.data && e.ids && (a = o.appendContextPath(e.data.contextPath, e.ids[0]) + "."), u(n) && (n = n.call(this)), e.data && (t = h(e.data)), n && "object" == typeof n) if(c(n)) for(var p = n.length; s < p; s++) t && (t.index = s, t.first = 0 === s, t.last = s === n.length - 1, a && (t.contextPath = a + s)), l += r(n[s], {data: t}); else for(var f in n) n.hasOwnProperty(f) && (t && (t.key = f, t.index = s, t.first = 0 === s, a && (t.contextPath = a + f)), l += r(n[f], {data: t}), s++); 785 return 0 === s && (l = i(this)), l 786 }), n.registerHelper("if", function(n, e){ 787 return u(n) && (n = n.call(this)), !e.hash.includeZero && !n || o.isEmpty(n) ? e.inverse(this) : e.fn(this) 788 }), n.registerHelper("unless", function(e, t){ 789 return n.helpers.if.call(this, e, {fn: t.inverse, inverse: t.fn, hash: t.hash}) 790 }), n.registerHelper("with", function(n, e){ 791 u(n) && (n = n.call(this)); 792 var t = e.fn; 793 if(!o.isEmpty(n)){ 794 if(e.data && e.ids){ 795 var a = h(e.data); 796 a.contextPath = o.appendContextPath(e.data.contextPath, e.
796ids[0]), e = {data: a} 797 } 798 return t(n, e) 799 } 800 }), n.registerHelper("log", function(e, t){ 801 var a = t.data && null != t.data.level ? parseInt(t.data.level, 10) : 1; 802 n.log(a, e) 803 }), n.registerHelper("lookup", function(n, e, t){ 804 return n && n[e] 805 }) 806 }(this) 807 } 808 809 function i(n, e){ 810 f.log(n, e) 811 } 812 813 var s = {}, o = e, l = t; 814 s.VERSION = "2.0.0-alpha.2"; 815 s.COMPILER_REVISION = 5; 816 s.REVISION_CHANGES = {1: "<= 1.0.rc.2", 2: "== 1.0.0-rc.3", 3: "== 1.0.0-rc.4", 4: "== 1.x.x", 5: ">= 2.0.0"}; 817 var c = o.isArray, u = o.isFunction, p = o.toString; 818 s.HandlebarsEnvironment = r, r.prototype = { 819 constructor: r, 820 logger: f, 821 log: i, 822 registerHelper: function(n, e, t){ 823 if("[object Object]" === p.call(n)){ 824 if(t || e) throw new l("Arg not supported with multiple helpers"); 825 o.extend(this.helpers, n) 826 } else t && (e.not = t), this.helpers[n] = e 827 }, 828 unregisterHelper: function(n){ 829 delete this.helpers[n] 830 }, 831 registerPartial: function(n, e){ 832 "[object Object]" === p.call(n) ? o.extend(this.partials, n) : this.partials[n] = e 833 }, 834 unregisterPartial: function(n){ 835 delete this.partials[n] 836 } 837 }; 838 var f = { 839 methodMap: {0: "debug", 1: "info", 2: "warn", 3: "error"}, 840 DEBUG: 0, 841 INFO: 1, 842 WARN: 2, 843 ERROR: 3, 844 level: 3, 845 log: function(n, e){ 846 if(f.level <= n){ 847 var t = f.methodMap[n]; 848 "undefined" != typeof console && console[t] && console[t].call(console, e) 849 } 850 } 851 }; 852 s.logger = f, s.log = i; 853 var h = function(n){ 854 var e = o.extend({}, n); 855 return e._parent = n, e 856 }; 857 return s.createFrame = h, s 858 }(), r = function(n, a, r){ 859 "use strict"; 860 861 function i(n, e, t, a){ 862 var r = function(e, r){ 863 return r = r || {}, t.call(n, e, n.helpers, n.partials, r.data || a) 864 }; 865 return r.program = e, r.depth = 0, r 866 } 867 868 var s = {}, o = e, l = t, c = r.COMPILER_REVISION, u = r.REVISION_CHANGES, p = r.createFrame; 869 return s.checkRevision = function(n){ 870 var e = n && n[0] || 1, t = c; 871 if(e !== t){ 872 if(e < t){ 873 var a = u[t], r = u[e]; 874 throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + a + ") or downgrade your runtime to an older version (" + r + ").") 875 } 876 throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + n[1] + ").") 877 } 878 }, s.template = function(n, e){ 879 if(!e) throw new l("No environment passed to template"); 880 e.VM.checkRevision(n.compiler); 881 var t = { 882 escapeExpression: o.escapeExpression, invokePartial: function(n, t, a, r, i, s, c){ 883 r && (a = o.extend({}, a, r)); 884 var u = e.VM.invokePartial.call(this, n, t, a, i, s, c); 885 if(null != u) return u; 886 if(e.compile){ 887 var p = {helpers: i, partials: s, data: c}; 888 return s[t] = e.compile(n, {data: void 0 !== c}, e), s[t](a, p) 889 } 890 throw new l("The partial " + t + " could not be compiled when running in runtime-only mode") 891 }, fn: function(e){ 892 return n[e] 893 }, programs: [], program: function(n, e){ 894 var t = this.programs[n], a = this.fn(n); 895 return e ? t = i(this, n, a, e) : t || (t = this.programs[n] = i(this, n, a)), t 896 }, programWithDepth: e.VM.programWithDepth, initData: function(n, e){ 897 return e && "root" in e || ((e = e ? p(e) : {}).root = n), e 898 }, data: function(n, e){ 899 for(; n && e--;) n = n._parent; 900 return n 901 }, merge: function(n, e){ 902 var t = n || e; 903 return n && e && n !== e && (t = o.extend({}, e, n)), t 904 }, noop: e.VM.noop, compilerInfo: n.compiler 905 }, a = function(a, r){ 906 var i, s, o = (r = r || {}).partial ? r : e, l = r.data; 907 return r.partial ? (i = t.helpers = r.helpers, s = t.partials = r.partials) : (i = t.helpers = t.merge(r.helpers, o.helpers), n.usePartial && (s = t.partials = t.merge(r.partials, o.partials)), n.useData && (l = t.initData(a, l))), n.main.call(t, a, i, s, l) 908 }; 909 return a.child = function(n){ 910 return t.programWithDepth(n) 911 }, a 912 }, s.programWithDepth = function(n, e){ 913 var t = Array.prototype.slice.call(arguments, 2), a = this, r = a.fn(n), i = function(n, i){ 914 return i = i || {}, r.apply(a, [n, a.helpers, a.partials, i.data || e].concat(t)) 915 }; 916 return i.program = n, i.depth = t.length, i 917 }, s.program = i, s.invokePartial = function(n, e, t, a, r, i){ 918 var s = {partial: !0, helpers: a, partials: r, data: i}; 919 if(void 0 === n) throw new l("The partial " + e + " could not be found"); 920 if(n instanceof Function) return n(t, s) 921 }, s.noop = function(){ 922 return "" 923 }, s 924 }(0, 0, a); 925 return function(i, s, o, l, c){ 926 "use strict"; 927 var u = a, p = n, f = t, h = e, d = r, b = function(){ 928 var n = new u.HandlebarsEnvironment; 929 return h.extend(n, u), n.SafeString = p, n.Exception = f, n.Utils = h, n.VM = d, n.template = function(e){ 930 return d.template(e, n) 931 }, n 932 }, m = b(); 933 return m.create = b, m 934 }() 935}(), function(){ 936 var n = Handlebars.template, e = Handlebars.templates = Handlebars.templates || {}; 937 e.amazon = n({ 938 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 939 var r, i = this.escapeExpression; 940 return '
940\n<span class="bibbase_amazon">\n <a href="http://www.amazon.com/s/?url=search-alias=aps&field-keywords=' + i("function" == typeof (r = e.amazon_string || n && n.amazon_string) ? r.call(n, { 941 name: "amazon_string", 942 hash: {}, 943 data: a 944 }) : r) + '&tag=bib0d-20&link_code=wql&_encoding=UTF-8"\n onclick="log_buy(\'' + i("function" == typeof (r = e.bibbaseid || n && n.bibbaseid) ? r.call(n, { 945 name: "bibbaseid", 946 hash: {}, 947 data: a 948 }) : r) + "', 'http://www.amazon.com/s/?url=search-alias=aps&field-keywords=" + i("function" == typeof (r = e.amazon_string || n && n.amazon_string) ? r.call(n, { 949 name: "amazon_string", 950 hash: {}, 951 data: a 952 }) : r) + '&tag=bib0d-20&link_code=wql&_encoding=UTF-8\'); return false;"\n class="bibbase link"\n target="_blank">\n buy\n </a>\n</span>\n' 953 }, useData: !0 954 }), e.diff = n({ 955 1: function(n, e, t, a){ 956 var r, i = "\n "; 957 return ((r = e.each.call(n, n && n.change, { 958 name: "each", 959 hash: {}, 960 fn: this.program(2, a), 961 inverse: this.noop, 962 data: a 963 })) || 0 === r) && (i += r), i + "\n " 964 }, 2: function(n, e, t, a){ 965 var r, i, s = this.escapeExpression, o = '\n <pre style="\n\t '; 966 return ((r = e.if.call(n, n && n.added, { 967 name: "if", 968 hash: {}, 969 fn: this.program(3, a), 970 inverse: this.program(5, a), 971 data: a 972 })) || 0 === r) && (o += r), o + '\n\t ">' + s("function" == typeof (i = e.value || n && n.value) ? i.call(n, { 973 name: "value", 974 hash: {}, 975 data: a 976 }) : i) + "</pre>\n\n " 977 }, 3: function(n, e, t, a){ 978 return "\n\t color: green\n\t " 979 }, 5: function(n, e, t, a){ 980 var r, i = "\n\t "; 981 return ((r = e.if.call(n, n && n.removed, { 982 name: "if", 983 hash: {}, 984 fn: this.program(6, a), 985 inverse: this.program(8, a), 986 data: a 987 })) || 0 === r) && (i += r), i + "\n\t " 988 }, 6: function(n, e, t, a){ 989 return "\n\t color: red\n\t " 990 }, 8: function(n, e, t, a){ 991 return "\n\t display: none\n\t " 992 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 993 var r, i, s = this.escapeExpression, 994 o = '\n<div class="' + s("function" == typeof (i = e.status || n && n.status) ? i.call(n, { 995 name: "status", 996 hash: {}, 997 data: a 998 }) : i) + '">\n\n URL: ' + s("function" == typeof (r = null == (r = n && n.pair) || !1 === r ? r : r.a) ? r.apply(n) : r) + " <br/>\n\n Status: " + s("function" == typeof (i = e.status || n && n.status) ? i.call(n, { 999 name: "status", 1000 hash: {}, 1001 data: a 1002 }) : i) + " <br/>\n\n "; 1003 return ((r = e.if.call(n, n && n.change, { 1004 name: "if", 1005 hash: {}, 1006 fn: this.program(1, a), 1007 inverse: this.noop, 1008 data: a 1009 })) || 0 === r) && (o += r), o + "\n</div>\n" 1010 }, useData: !0 1011 }), e.email = n({ 1012 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1013 var r, i, 1014 s = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n\n<head>\n <meta content=\'text/html; charset=utf-8\' http-equiv=\'Content-Type\'>\n <meta content=\'width=device-width, initial-scale=1.0\' name=\'viewport\'>\n <title>BibBase: New Publications in your Feed</title>\n</head>\n\n<body>\n \x3c!-- Won\'t work on gmail unless I use https (I think) --\x3e\n \x3c!-- <img src="http://bibbase.org/img/logo.png" --\x3e\n \x3c!-- style="float: right; height: 40px;"> --\x3e\n\n New Items in your BibBase\n <a href="http://bibbase.org/network/feed">Feed</a>:\n\n <div style="clear: both">\n '; 1015 return ((r = "function" == typeof (i = e.notifications || n && n.notifications) ? i.call(n, { 1016 name: "notifications", 1017 hash: {}, 1018 data: a 1019 }) : i) || 0 === r) && (s += r), s + '\n </div>\n\n\n <hr style="margin-top: 50px"/> \n <div style="color: gray; font-size: 8px;">\n To unsubscribe from these emails, please visit\n your <a href="http://bibbase.org/network/feed">feed</a> and uncheck\n "Send Daily Notifications".\n </div>\n\n</body>\n</html>\n' 1020 }, useData: !0 1021 }), e.email_paper = n({ 1022 1: function(n, e, t, a){ 1023 var r, i = e.helperMissing, s = ", editor\n "; 1024 return ((r = (e.ifx || n && n.ifx || i).call(n, "this[this.role+'_short'].length > 1", { 1025 name: "ifx", 1026 hash: {}, 1027 fn: this.program(2, a), 1028 inverse: this.noop, 1029 data: a 1030 })) || 0 === r) && (s += r), s + ".\n " 1031 }, 2: function(n, e, t, a){ 1032 return "s" 1033 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1034 var r, i, s = this.escapeExpression, o = e.helperMissing, 1035 l = '\n\n<div class="bibbase_paper" id="' + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1036 name: "bibbaseid", 1037 hash: {}, 1038 data: a 1039 }) : i) + '"\n style="padding: 10px;">\n <span>\n <b>\n <a href="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1040 name: "host", 1041 hash: {}, 1042 data: a 1043 }) : i) + "network/publication/" + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1044 name: "bibbaseid", 1045 hash: {}, 1046 data: a 1047 }) : i) + '"\n style="text-decoration: none; color: #000;">\n ' + s((i = e.formatTitle || n && n.formatTitle || o).call(n, n && n.title, { 1048 name: "formatTitle", 1049 hash: {}, 1050 data: a 1051 })) + "\n </a>\n </b>\n <span>\n "; 1052 return ((r = (i = e.getPerson || n && n.getPerson || o).call(n, n && n.role, n && n.metadata, { 1053 name: "getPerson", 1054 hash: {}, 1055 data: a 1056 })) || 0 === r) && (l += r), l += "\n ", ((r = (i = e.ifx || n && n.ifx || o).call(n, "this.role == 'editor'", { 1057 name: "ifx", 1058 hash: {}, 1059 fn: this.program(1, a), 1060 inverse: this.noop, 1061 data: a 1062 })) || 0 === r) && (l += r), l += "\n </span>\n </span>\n\n ", ((r = "function" == typeof (i = e.typeTemplate || n && n.typeTemplate) ? i.call(n, { 1063 name: "typeTemplate", 1064 hash: {}, 1065 data: a 1066 }) : i) || 0 === r) && (l += r), l + "\n\n</div>\n\n\n" 1067 }, useData: !0 1068 }), e.email_response = n({ 1069 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1070 var r, i, s = this.escapeExpression, 1071 o = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml">\n\n<head>\n <meta content=\'text/html; charset=utf-8\' http-equiv=\'Content-Type\'>\n <meta content=\'width=device-width, initial-scale=1.0\' name=\'viewport\'>\n <title>BibBase: New Response</title>\n</head>\n\n<body>\n \x3c!-- Use nodemailer to attach logo to make this work --\x3e\n \x3c!-- <img src="cid:bibbase.png" style="float: right; height: 40px;"> --\x3e\n\n A new response has been added to:\n <div style="clear: both">\n '; 1072 return ((r = "function" == typeof (i = e.paper || n && n.paper) ? i.call(n, { 1073 name: "paper", 1074 hash: {}, 1075 data: a 1076 }) : i) || 0 === r) && (o += r), o += '\n </div>\n <hr style="color: #999"/>\n\n <img class="profile_pic"\n style="width: 32px;"\n src="' + s("function" == typeof (i = e.picture || n && n.picture) ? i.call(n, { 1077 name: "picture", 1078 hash: {}, 1079 data: a 1080 }) : i) + '" />\n <a href="' + s("function" == typeof (i = e.userUrl || n && n.userUrl) ? i.call(n, { 1081 name: "userUrl", 1082 hash: {}, 1083 data: a 1084 }) : i) + '">\n ' + s("function" == typeof (i = e.username || n && n.username) ? i.call(n, { 1085 name: "username", 1086 hash: {}, 1087 data: a 1088 }) : i) + "\n </a>, " + s("function" == typeof (i = e.date || n && n.date) ? i.call(n, { 1089 name: "date", 1090 hash: {}, 1091 data: a 1092 }) : i) + ":\n\n <p>\n ", ((r = "function" == typeof (i = e.body || n && n.body) ? i.call(n, { 1093 name: "body", 1094 hash: {}, 1095 data: a 1096 }) : i) || 0 === r) && (o += r), o + '\n </p>\n\n\n <hr style="margin-top: 50px"/> \n <div style="color: gray; font-size: 8px;">\n To unsubscribe from these emails, please visit\n <a href="http://bibbase.org/network/publication/' + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1097 name: "bibbaseid", 1098 hash: {}, 1099 data: a 1100 }) : i) + '">\n the paper</a>
1100\n and unclick "Watching".\n </div>\n\n</body>\n</html>\n' 1101 }, useData: !0 1102 }), e.extras = n({ 1103 1: function(n, e, t, a, r){ 1104 var i, s, o = this.escapeExpression, l = e.helperMissing; 1105 return '\n <a href="' + o("function" == typeof (s = e.value || n && n.value) ? s.call(n, { 1106 name: "value", 1107 hash: {}, 1108 data: a 1109 }) : s) + '"\n onclick="log_download(\'' + o("function" == typeof (i = r && r.bibbaseid) ? i.apply(n) : i) + "', '" + o("function" == typeof (s = e.value || n && n.value) ? s.call(n, { 1110 name: "value", 1111 hash: {}, 1112 data: a 1113 }) : s) + '\'); return false;">\n <img src="' + o("function" == typeof (i = r && r.host) ? i.apply(n) : i) + "/img/filetypes/" + o((s = e.guessFiletype || n && n.guessFiletype || l).call(n, n && n.value, { 1114 name: "guessFiletype", 1115 hash: {}, 1116 data: a 1117 })) + '.svg"\n\t alt="' + o("function" == typeof (i = r && r.title) ? i.apply(n) : i) + " [" + o((s = e.guessFiletype || n && n.guessFiletype || l).call(n, n && n.value, { 1118 name: "guessFiletype", 1119 hash: {}, 1120 data: a 1121 })) + ']"\n title="' + o((s = e.guessFiletype || n && n.guessFiletype || l).call(n, n && n.value, { 1122 name: "guessFiletype", 1123 hash: {}, 1124 data: a 1125 })) + '"\n\t class="bibbase_icon"\n ><span class="bibbase_icon_text">' + o("function" == typeof (s = e.key || n && n.key) ? s.call(n, { 1126 name: "key", 1127 hash: {}, 1128 data: a 1129 }) : s) + "</span></a>\n \n " 1130 }, 3: function(n, e, t, a, r){ 1131 var i, s, o = this.escapeExpression; 1132 return '\n <a href="http://doi.org/' + o("function" == typeof (s = e.doi || n && n.doi) ? s.call(n, { 1133 name: "doi", 1134 hash: {}, 1135 data: a 1136 }) : s) + '"\n onclick="log_download(\'' + o("function" == typeof (i = r && r.bibbaseid) ? i.apply(n) : i) + "', 'http://doi.org/" + o("function" == typeof (s = e.doi || n && n.doi) ? s.call(n, { 1137 name: "doi", 1138 hash: {}, 1139 data: a 1140 }) : s) + '\'); return false;"\n class="bibbase bibtex link">\n <span>doi</span></a>\n \n ' 1141 }, 5: function(n, e, t, a){ 1142 return '\n \n <a class="bibbase_abstract_link bibbase link"\n href="#"\n onclick="showAbstract(event); return false;">\n abstract <i class="fa fa-caret-down"></i></a>\n ' 1143 }, 7: function(n, e, t, a){ 1144 var r, i, s = this.escapeExpression, o = e.helperMissing, 1145 l = '\n \n <span class="bibbase_stats_paper" style="color: #777;">\n <span>' + s("function" == typeof (i = e.downloads || n && n.downloads) ? i.call(n, { 1146 name: "downloads", 1147 hash: {}, 1148 data: a 1149 }) : i) + " download"; 1150 return ((r = (i = e.ifx || n && n.ifx || o).call(n, "this.downloads > 1", { 1151 name: "ifx", 1152 hash: {}, 1153 fn: this.program(8, a), 1154 inverse: this.noop, 1155 data: a 1156 })) || 0 === r) && (l += r), l + "</span>\n </span>\n " 1157 }, 8: function(n, e, t, a){ 1158 return "s" 1159 }, 10: function(n, e, t, a){ 1160 var r, i, s = '\n<div class="well well-small bibbase" data-type="abstract"\n style="display:none">\n '; 1161 return ((r = "function" == typeof (i = e.abstract || n && n.abstract) ? i.call(n, { 1162 name: "abstract", 1163 hash: {}, 1164 data: a 1165 }) : i) || 0 === r) && (s += r), s + "\n</div>\n" 1166 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1167 var r, i, s = e.helperMissing, o = this.escapeExpression, l = '<span class="note">'; 1168 return ((r = "function" == typeof (i = e.note || n && n.note) ? i.call(n, { 1169 name: "note", 1170 hash: {}, 1171 data: a 1172 }) : i) || 0 === r) && (l += r), l += '</span>\n\n<span class="bibbase_note">', ((r = "function" == typeof (i = e.bibbase_note || n && n.bibbase_note) ? i.call(n, { 1173 name: "bibbase_note", 1174 hash: {}, 1175 data: a 1176 }) : i) || 0 === r) && (l += r), l += '</span>\n\n<br class="bibbase_paper_content"/>\n\n<span class="bibbase_paper_content dontprint">\n\n ', ((r = (i = e.each_with_key || n && n.each_with_key || s).call(n, n && n.urls, { 1177 name: "each_with_key", 1178 hash: {}, 1179 fn: this.programWithDepth(1, a, n), 1180 inverse: this.noop, 1181 data: a 1182 })) || 0 === r) && (l += r), l += "\n\n ", ((r = e.if.call(n, n && n.doi, { 1183 name: "if", 1184 hash: {}, 1185 fn: this.programWithDepth(3, a, n), 1186 inverse: this.noop, 1187 data: a 1188 })) || 0 === r) && (l += r), l += '\n\n <a href="#"\n onclick="showBib(event); return false;"\n class="bibbase bibtex link">bibtex\n <i class="fa fa-caret-down"></i></a>\n\n ', ((r = e.if.call(n, n && n.abstract, { 1189 name: "if", 1190 hash: {}, 1191 fn: this.program(5, a), 1192 inverse: this.noop, 1193 data: a 1194 })) || 0 === r) && (l += r), l += "\n\n ", ((r = e.if.call(n, n && n.downloads, { 1195 name: "if", 1196 hash: {}, 1197 fn: this.program(7, a), 1198 inverse: this.noop, 1199 data: a 1200 })) || 0 === r) && (l += r), l += '\n\n \x3c!-- <a class="bibbase read link hidden" --\x3e\n \x3c!-- href="javascript:toggleRead(\'' + o("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1201 name: "bibbaseid", 1202 hash: {}, 1203 data: a 1204 }) : i) + '\')" --\x3e\n \x3c!-- title="Marking this paper as read adds it to your library on BibBase." --\x3e\n \x3c!-- > --\x3e\n \x3c!-- <i class="fa fa-check"></i> --\x3e\n \x3c!-- <span>mark as read</span> --\x3e\n \x3c!-- </a> --\x3e\n\n</span>
1204\n\n<div class="well well-small bibbase" data-type="bibtex"\n style="display:none">\n <pre style="white-space: pre-wrap;">' + o("function" == typeof (i = e.bibtex || n && n.bibtex) ? i.call(n, { 1205 name: "bibtex", 1206 hash: {}, 1207 data: a 1208 }) : i) + "</pre>\n</div>\n\n", ((r = e.if.call(n, n && n.abstract, { 1209 name: "if", 1210 hash: {}, 1211 fn: this.program(10, a), 1212 inverse: this.noop, 1213 data: a 1214 })) || 0 === r) && (l += r), l + "\n" 1215 }, useData: !0 1216 }), e.groups = n({ 1217 1: function(n, e, t, a){ 1218 var r, i, s = e.helperMissing, o = this.escapeExpression, 1219 l = '\n <div class="bibbase_group_whole" id="group_' + o((i = e.normalizeString || n && n.normalizeString || s).call(n, n && n.key, { 1220 name: "normalizeString", 1221 hash: {}, 1222 data: a 1223 })) + '">\n <div class="bibbase_group"\n onclick="toggleGroup(\'group_' + o((i = e.normalizeString || n && n.normalizeString || s).call(n, n && n.key, { 1224 name: "normalizeString", 1225 hash: {}, 1226 data: a 1227 })) + "')\"\n onkeypress=\"toggleGroup('group_" + o((i = e.normalizeString || n && n.normalizeString || s).call(n, n && n.key, { 1228 name: "normalizeString", 1229 hash: {}, 1230 data: a 1231 })) + '\')"\n tabindex="0">\n <i class="fa fa-angle-down bibbase_group_head_icon"></i> \n <span>' + o("function" == typeof (i = e.key || n && n.key) ? i.call(n, { 1232 name: "key", 1233 hash: {}, 1234 data: a 1235 }) : i) + '</span>\n <span class="bibbase_group_count">\n '; 1236 return ((r = e.if.call(n, n && n.items, { 1237 name: "if", 1238 hash: {}, 1239 fn: this.program(2, a), 1240 inverse: this.program(4, a), 1241 data: a 1242 })) || 0 === r) && (l += r), l += '\n </span>\n </div>\n <div class="bibbase_group_body">\n ', ((r = (i = e.insert || n && n.insert || s).call(n, "papers", { 1243 name: "insert", 1244 hash: {}, 1245 data: a 1246 })) || 0 === r) && (l += r), l + "\n </div>\n </div>\n" 1247 }, 2: function(n, e, t, a){ 1248 var r; 1249 return "\n (" + (0, this.escapeExpression)("function" == typeof (r = null == (r = n && n.items) || !1 === r ? r : r.length) ? r.apply(n) : r) + ")\n " 1250 }, 4: function(n, e, t, a){ 1251 var r; 1252 return "\n (" + (0, this.escapeExpression)("function" == typeof (r = null == (r = n && n.groups) || !1 === r ? r : r.length) ? r.apply(n) : r) + ")\n " 1253 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1254 var r, i = ""; 1255 return ((r = e.each.call(n, n && n.groups, { 1256 name: "each", 1257 hash: {}, 1258 fn: this.program(1, a), 1259 inverse: this.noop, 1260 data: a 1261 })) || 0 === r) && (i += r), i + "\n" 1262 }, useData: !0 1263 }), e.list = n({ 1264 1: function(n, e, t, a){ 1265 var r, i, 1266 s = '\n <div class="bibbase_paper" id="' + (0, this.escapeExpression)("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1267 name: "bibbaseid", 1268 hash: {}, 1269 data: a 1270 }) : i) + '">\n '; 1271 return ((r = "function" == typeof (i = e.html || n && n.html) ? i.call(n, { 1272 name: "html", 1273 hash: {}, 1274 data: a 1275 }) : i) || 0 === r) && (s += r), s + "\n </div>\n" 1276 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1277 var r, i = ""; 1278 return ((r = e.each.call(n, n && n.items, { 1279 name: "each", 1280 hash: {}, 1281 fn: this.program(1, a), 1282 inverse: this.noop, 1283 data: a 1284 })) || 0 === r) && (i += r), i + "\n" 1285 }, useData: !0 1286 }), e.page = n({ 1287 1: function(n, e, t, a){ 1288 var r, 1289 i = '\n <li class="dropdown" id="error_dropdown">\n <a class="dropdown-toggle"\n data-toggle="dropdown"\n href="#"\n style="color: #FBB450">\n <i class="fa fa-warning"></i>\n <b class="caret"></b>\n </a>\n <ul class="dropdown-menu"\n style="width: 600px; padding: 10px">\n Warning, your bibtex file has errors:\n '; 1290 return ((r = e.each.call(n, n && n.errors, { 1291 name: "each", 1292 hash: {}, 1293 fn: this.program(2, a), 1294 inverse: this.noop, 1295 data: a 1296 })) || 0 === r) && (i += r), i + "\n </ul>\n </li>\n " 1297 }, 2: function(n, e, t, a){ 1298 var r, i = this.escapeExpression; 1299 return "\n <hr />\n Line " + i("function" == typeof (r = e.line || n && n.line) ? r.call(n, { 1300 name: "line", 1301 hash: {}, 1302 data: a 1303 }) : r) + ": " + i("function" == typeof (r = e.message || n && n.message) ? r.call(n, { 1304 name: "message", 1305 hash: {}, 1306 data: a 1307 }) : r) + '\n <div class="well">\n <pre style="white-space: pre-wrap;"\n >"... ' + i("function" == typeof (r = e.context || n && n.context) ? r.call(n, { 1308 name: "context", 1309 hash: {}, 1310 data: a 1311 }) : r) + '"</pre>\n </div>\n ' 1312 }, 4: function(n, e, t, a){ 1313 var r, i, s = "\n <br/>\n from "; 1314 return ((r = "function" == typeof (i = e.fromdata || n && n.fromdata) ? i.call(n, { 1315 name: "fromdata", 1316 hash: {}, 1317 data: a 1318 }) : i) || 0 === r) && (s += r), s + "\n " 1319 }, 6: function(n, e, t, a){ 1320 return "&" 1321 }, 8: function(n, e, t, a){ 1322 return "?" 1323 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1324 var r, i, s = this.escapeExpression, o = e.helperMissing, 1325 l = '<img src="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1326 name: "host", 1327 hash: {}, 1328 data: a 1329 }) : i) + '/img/ajax-loader.gif" id="spinner"\n style="display: none;" alt="Loading.." />\n\n<div id="bibbase">\n\n <script type="text/javascript">\n var bibbase = {\n params: '; 1330 return ((r = "function" == typeof (i = e.params || n && n.params) ? i.call(n, { 1331 name: "params", 1332 hash: {}, 1333 data: a 1334 }) : i) || 0 === r) && (l += r), l += ",\n data: ", ((r = "function" == typeof (i = e.data || n && n.data) ? i.call(n, { 1335 name: "data", 1336 hash: {}, 1337 data: a 1338 }) : i) || 0 === r) && (l += r), l += ",\n metadata: ", ((r = "function" == typeof (i = e.metadata || n && n.metadata) ? i.call(n, { 1339 name: "metadata", 1340 hash: {}, 1341 data: a 1342 }) : i) || 0 === r) && (l += r), l += ",\n ownerID: ", ((r = "function" == typeof (i = e.ownerID || n && n.ownerID) ? i.call(n, { 1343 name: "ownerID", 1344 hash: {}, 1345 data: a 1346 }) : i) || 0 === r) && (l += r), l += '\n };\n <\/script>\n\n <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"\n type="text/javascript">\n <\/script>\n\n <script src="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1347 name: "host", 1348 hash: {}, 1349 data: a 1350 }) : i) + '/js/bibbase.min.js"\n type="text/javascript">\n <\/script>\n\n <script type="text/javascript"\n src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML">\n <\/script>\n <script type="text/x-mathjax-config">\n MathJax.Hub.Config({tex2jax: {inlineMath: [[\'$\',\'$\'], [\'\\\\(\',\'\\\\)\']]},\n skipTags: ["body"],\n processClass: "bibbase_paper"});\n <\/script>\n\n <style>\n @media print {\n .dontprint {\n display: none !important;\n }\n\n .bibbase_group {\n background-color: #E0E0E0;\n font-style: italic;\n font-size: larger;\n text-shadow: 0px 0px 3px #FFFFFF;\n border-radius: 4px 4px 4px 4px;\n -moz-border-radius: 4px 4px 4px 4px;\n -webkit-border-radius: 4px;\n padding: 5px 40px 5px;\n margin-top: 10px;\n margin-bottom: 5px;\n cursor: pointer;\n }\n\n .bibbase_paper {\n margin-bottom: 5px;\n }\n\n }\n </style>\n\n\n\n <div id="bibbase_header" class="dontprint">\n\n <ul class="nav nav-pills" style="margin: 0px;">\n\n <li class="dropdown" id="groupby_dropdown">\n <a class="dropdown-toggle"\n data-toggle="dropdown"\n href="#">\n Group by\n <b class="caret"></b>\n </a>\n <ul class="dropdown-menu">\n <li class="groupby year"><a\n href="#"\n onclick="groupby(\'year\')">\n Year</a>\n </li>\n <li class="groupby author"><a\n href="#"\n onclick="groupby(\'author_short\')">\n Author</a>\n </li>\n <li class="groupby type"><a\n href="#"\n onclick="groupby(\'type\')">\n Type</a>\n </li>\n <li class="groupby keyword"><a\n href="#"\n onclick="groupby(\'keyword\')">\n Keyword</a>\n </li>\n <li class="groupby downloads"><a\n href="#"\n onclick="groupby(\'downloads\')">\n Downloads</a>\n </li>\n </ul>\n </li>\n\n\n <li class="dropdown" id="menu_dropdown">\n <a class="dropdown-toggle"\n data-toggle="dropdown"\n href="#" alt="controls">\n <i class="fa fa-reorder" alt="controls"></i>\n <b class="caret"></b>\n </a>\n <ul class="dropdown-menu">\n <li>\n <a href="#" onclick="toggleAll()">\n <i class="fa fa-expand-o fa-fw"></i> Fold/Unfold All\n </a>\n </li>\n <li>\n <a href="#" onclick="downloadBibtex()">\n <i class="fa fa-download fa-fw"></i> Download BibTeX\n </a>\n </li>\n <li>\n <a href="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1351 name: "host", 1352 hash: {}, 1353 data: a 1354 }) : i) + "/rss?bib=" + s("function" == typeof (i = e.biburl || n && n.biburl) ? i.call(n, { 1355 name: "biburl", 1356 hash: {}, 1357 data: a 1358 }) : i) + '">\n <i class="fa fa-rss fa-fw"></i> RSS Feed\n </a>\n </li>\n </ul>\n </li>\n\n ', ((r = e.if.call(n, n && n.errors, { 1359 name: "if", 1360 hash: {}, 1361 fn: this.program(1, a), 1362 inverse: this.noop, 1363 data: a 1364 })) || 0 === r) && (l += r), l += '\n\n <li style="float: right; margin-right: 10px;">\n <div style="margin-top: 10px; text-align: right; font-size: 12px">\n generated by\n <a href="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1365 name: "host", 1366 hash: {}, 1367 data: a 1368 }) : i) + "\"\n onclick=\"trackOutboundLink('bibbase', 'logo clicked', window.location.href, " + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1369 name: "host", 1370 hash: {}, 1371 data: a 1372 }) : i) + '); return false;">\n <img src="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1373 name: "host", 1374 hash: {}, 1375 data: a 1376 }) : i) + '/img/logo.svg"\n style="vertical-align: middle; margin-left: 3px; height: 16px;"/\n alt="bibbase.org"\n title="BibBase -- The easiest way to maintain your publications page"\n ></a>\n ', ((r = e.if.call(n, n && n.fromdata, { 1377 name: "if", 1378 hash: {}, 1379 fn: this.program(4, a), 1380 inverse: this.noop, 1381 data: a 1382 })) || 0 === r) && (l += r), l += '\n </div>\n </li>\n\n </ul>\n\n\n <div class="alert alert-success bibbase_msg" id="bibbase_msg_embed"\n style="display: none;">\n <button type="button" class="close"\n data-dismiss="alert"><i class="fa fa-times"></i></button>\n\n Excellent! Next, you can <strong>embed</strong> this page using\n one of several\n <a href="#bibbase_embed_modal"\n data-toggle="modal">options</a>.\n </div>\n\n <div class="alert alert-warning bibbase_msg" id="bibbase_msg_mendeley1"\n style="display: none;">\n <button type="button" class="close"\n data-dismiss="alert"><i class="fa fa-times"></i></button>\n\n <p>To the site owner:</p>\n\n <p><strong>Action required!</strong> Mendeley is changing its\n API. In order to keep using Mendeley with BibBase past April\n 14th, you need to:\n <ol>\n <li>renew the authorization for BibBase on Mendeley, and</li>\n <li>update the BibBase URL\n in your page the same way you did when you initially set up\n this page.</li>\n </ol></p>\n\n <p>\n <a href="http://bibbase.org/cgi-bin/mendeley2/get.py">\n <i class="fa fa-angle-double-right"></i>\n Fix it now</a>\n </p>\n </div>\n\n </div>\n\n\n <div id="bibbase_body">\n ', ((r = "function" == typeof (i = e.body || n && n.body) ? i.call(n, { 1383 name: "body", 1384 hash: {}, 1385 data: a 1386 }) : i) || 0 === r) && (l += r), l += '\n </div>\n\n\n \x3c!-- Modal --\x3e\n <div id="bibbase_embed_modal"\n class="modal hide fade dontprint"\n tabindex="-1"\n role="dialog"\n aria-labelledby="bibbase_embed_modal_label"\n aria-hidden="true">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal"\n aria-hidden="true">×</button>\n <h1>Embedding in another Page</h1>\n </div>\n <div id="modalbody" class="modal-body">\n\n <p>\n Copy&paste any of the following snippets into an existing\n page to embed this page. For more details see the\n <a href="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1387 name: "host", 1388 hash: {}, 1389 data: a 1390 }) : i) + '/help">documention</a>.\n </p>\n\n <strong>JavaScript</strong>
1390\n <span class="comment recommended">(Easiest)</span>\n <div class="well well-small">\n <code>\n <script src="' + s("function" == typeof (i = e.embed || n && n.embed) ? i.call(n, { 1391 name: "embed", 1392 hash: {}, 1393 data: a 1394 }) : i), ((r = (i = e.ifx || n && n.ifx || o).call(n, "this.embed.indexOf('?') >= 0", { 1395 name: "ifx", 1396 hash: {}, 1397 fn: this.program(6, a), 1398 inverse: this.program(8, a), 1399 data: a 1400 })) || 0 === r) && (l += r), l + 'jsonp=1"></script>\n </code>\n </div>\n\n <strong>PHP</strong>\n <div class="well well-small">\n <code>\n <?php\n $contents = file_get_contents("' + s("function" == typeof (i = e.embed || n && n.embed) ? i.call(n, { 1401 name: "embed", 1402 hash: {}, 1403 data: a 1404 }) : i) + '");\n print_r($contents);\n ?>\n </code>\n </div>\n\n <strong>iFrame</strong>\n <div class="well well-small">\n <code>\n <iframe src="' + s("function" == typeof (i = e.embed || n && n.embed) ? i.call(n, { 1405 name: "embed", 1406 hash: {}, 1407 data: a 1408 }) : i) + '"></iframe>\n </code>\n </div>\n\n\n </div>\n <div class="modal-footer">\n <button class="btn btn-primary"\n data-dismiss="modal"\n aria-hidden="true">\n Close\n </button>\n </div>\n </div>\n\n \x3c!-- <iframe id="bibbase_network_frame" --\x3e\n \x3c!-- src="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1409 name: "host", 1410 hash: {}, 1411 data: a 1412 }) : i) + '/network/control" --\x3e\n \x3c!-- style="display: none;"> --\x3e\n \x3c!-- </iframe> --\x3e\n\n</div>\n' 1413 }, useData: !0 1414 }), e.page_list = n({ 1415 1: function(n, e, t, a){ 1416 var r; 1417 return '\n <a href="' + (0, this.escapeExpression)("function" == typeof (r = e.next || n && n.next) ? r.call(n, { 1418 name: "next", 1419 hash: {}, 1420 data: a 1421 }) : r) + '">More..</a>\n ' 1422 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1423 var r, i, s = this.escapeExpression, o = e.helperMissing, 1424 l = '<html>\n\n <head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n <title>BibBase: List of ' + s("function" == typeof (i = e.title || n && n.title) ? i.call(n, { 1425 name: "title", 1426 hash: {}, 1427 data: a 1428 }) : i) + '</title>\n <link rel="stylesheet" type="text/css" href="/style.css" />\n </head>\n \n\n <body id="stats">\n\n <h1>' + s("function" == typeof (i = e.title || n && n.title) ? i.call(n, { 1429 name: "title", 1430 hash: {}, 1431 data: a 1432 }) : i) + "</h1> \n\n "; 1433 return ((r = (i = e.insert || n && n.insert || o).call(n, "page", { 1434 name: "insert", 1435 hash: {}, 1436 data: a 1437 })) || 0 === r) && (l += r), l += "\n\n <hr />\n ", ((r = e.if.call(n, n && n.next, { 1438 name: "if", 1439 hash: {}, 1440 fn: this.program(1, a), 1441 inverse: this.noop, 1442 data: a 1443 })) || 0 === r) && (l += r), l + " \n </body>\n\n</html>\n" 1444 }, useData: !0 1445 }), e.paper = n({ 1446 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1447 var r, i, s = this.escapeExpression, o = e.helperMissing, 1448 l = '<div class="bibbase_paper" id="' + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1449 name: "bibbaseid", 1450 hash: {}, 1451 data: a 1452 }) : i) + '">\n '; 1453 return ((r = (i = e.insert || n && n.insert || o).call(n, "title_person", { 1454 name: "insert", 1455 hash: {}, 1456 data: a 1457 })) || 0 === r) && (l += r), l += "\n ", ((r = "function" == typeof (i = e.typeTemplate || n && n.typeTemplate) ? i.call(n, { 1458 name: "typeTemplate", 1459 hash: {}, 1460 data: a 1461 }) : i) || 0 === r) && (l += r), l += "\n ", ((r = (i = e.insert || n && n.insert || o).call(n, "extras", { 1462 name: "insert", 1463 hash: {}, 1464 data: a 1465 })) || 0 === r) && (l += r), l + "\n</div>\n" 1466 }, useData: !0 1467 }), e.papers = n({ 1468 1: function(n, e, t, a){ 1469 var r, i = e.helperMissing, s = "\n "; 1470 return ((r = (e.insert || n && n.insert || i).call(n, "groups", { 1471 name: "insert", 1472 hash: {}, 1473 data: a 1474 })) || 0 === r) && (s += r), s + "\n" 1475 }, 3: function(n, e, t, a){ 1476 var r, i = e.helperMissing, s = "\n "; 1477 return ((r = (e.insert || n && n.insert || i).call(n, "list", { 1478 name: "insert", 1479 hash: {}, 1480 data: a 1481 })) || 0 === r) && (s += r), s + "\n" 1482 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1483 var r, i = ""; 1484 return ((r = e.if.call(n, n && n.groups, { 1485 name: "if", 1486 hash: {}, 1487 fn: this.program(1, a), 1488 inverse: this.program(3, a), 1489 data: a 1490 })) || 0 === r) && (i += r), i + "\n" 1491 }, useData: !0 1492 }), e.person = n({ 1493 1: function(n, e, t, a){ 1494 var r, i = e.helperMissing, s = ", editor\n "; 1495 return ((r = (e.ifx || n && n.ifx || i).call(n, "this[this.role+'_short'].length > 1", { 1496 name: "ifx", 1497 hash: {}, 1498 fn: this.program(2, a), 1499 inverse: this.noop, 1500 data: a 1501 })) || 0 === r) && (s += r), s + ".\n " 1502 }, 2: function(n, e, t, a){ 1503 return "s" 1504 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1505 var r, i = e.helperMissing, s = '<span class="bibbase_paper_author">\n '; 1506 return ((r = (e.getPerson || n && n.getPerson || i).call(n, n && n.role, n && n.metadata, { 1507 name: "getPerson", 1508 hash: {}, 1509 data: a 1510 })) || 0 === r) && (s += r), s += "\n ", ((r = (e.ifx || n && n.ifx || i).call(n, "this.role == 'editor'", { 1511 name: "ifx", 1512 hash: {}, 1513 fn: this.program(1, a), 1514 inverse: this.noop, 1515 data: a 1516 })) || 0 === r) && (s += r), s + "\n</span>\n" 1517 }, useData: !0 1518 }), e.poster = n({ 1519 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1520 var r, i, s = '<script type="text/javascript">\n window.parent.postMessage('; 1521 return ((r = "function" == typeof (i = e.message || n && n.message) ? i.call(n, { 1522 name: "message", 1523 hash: {}, 1524 data: a 1525 }) : i) || 0 === r) && (s += r), s + ", '*');\n<\/script>\n" 1526 }, useData: !0 1527 }), e.publication = n({ 1528 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1529 var r, i, s = e.helperMissing, 1530 o = '\n<html>\n\n <head>\n <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\n <title>BibBase: '; 1531 return ((r = "function" == typeof (i = e.title || n && n.title) ? i.call(n, { 1532 name: "title", 1533 hash: {}, 1534 data: a 1535 }) : i) || 0 === r) && (o += r), o += '</title>\n </head>\n\n\n <body id="publication">\n\n <img src="/img/logo.svg" id="logo" style="float:right" alt="bibbase.org">\n\n ', ((r = (i = e.insert || n && n.insert || s).call(n, "paper", { 1536 name: "insert", 1537 hash: {}, 1538 data: a 1539 })) || 0 === r) && (o += r), o + "\n\n </body>\n\n</html>\n" 1540 }, useData: !0 1541 }), e.redirector = n({ 1542 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1543 var r, i, s = '<script type="text/javascript">\n window.parent.location.href = \''; 1544 return ((r = "function" == typeof (i = e.redirect || n && n.redirect) ? i.call(n, { 1545 name: "redirect", 1546 hash: {}, 1547 data: a 1548 }) : i) || 0 === r) && (s += r), s + "';\n<\/script>\n" 1549 }, useData: !0 1550 }), e.test_result = n({ 1551 1: function(n, e, t, a){ 1552 var r, i = e.helperMissing, s = "\n"; 1553 return ((r = (e.insert || n && n.insert || i).call(n, "diff", n, { 1554 name: "insert", 1555 hash: {}, 1556 data: a 1557 })) || 0 === r) && (s += r), s + "\n" 1558 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1559 var r, 1560 i = '<html>\n<head>\n <link href="css/test.css" rel="stylesheet" type="text/css">\n</head>\n\n<body>\n\n'; 1561 return ((r = e.each.call(n, n, { 1562 name: "each", 1563 hash: {}, 1564 fn: this.program(1, a), 1565 inverse: this.noop, 1566 data: a 1567 })) || 0 === r) && (i += r), i + "\n\n</body>\n\n</html>\n" 1568 }, useData: !0 1569 }), e.title = n({ 1570 compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1571 var r, i, s = this.escapeExpression, o = e.helperMissing, 1572 l = '<span class="bibbase_paper_title">\n <a href="' + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1573 name: "host", 1574 hash: {}, 1575 data: a 1576 }) : i) + "/network/publication/" + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1577 name: "bibbaseid", 1578 hash: {}, 1579 data: a 1580 }) : i) + "\"\n onclick=\"return trackOutboundLink('publications', 'click', '" + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1581 name: "bibbaseid", 1582 hash: {}, 1583 data: a 1584 }) : i) + "', '" + s("function" == typeof (i = e.host || n && n.host) ? i.call(n, { 1585 name: "host", 1586 hash: {}, 1587 data: a 1588 }) : i) + "/network/publication/" + s("function" == typeof (i = e.bibbaseid || n && n.bibbaseid) ? i.call(n, { 1589 name: "bibbaseid", 1590 hash: {}, 1591 data: a 1592 }) : i) + "');\">\n \n "; 1593 return ((r = (i = e.formatTitle || n && n.formatTitle || o).call(n, n && n.title, { 1594 name: "formatTitle", 1595 hash: {}, 1596 data: a 1597 })) || 0 === r) && (l += r), l + "\n </a>\n</span>\n" 1598 }, useData: !0 1599 }), e.title_person = n({ 1600 1: function(n, e, t, a){ 1601 var r, i = e.helperMissing, s = "\n "; 1602 return ((r = (e.insert || n && n.insert || i).call(n, "person", { 1603 name: "insert", 1604 hash: {}, 1605 data: a 1606 })) || 0 === r) && (s += r), s += "\n ", ((r = (e.insert || n && n.insert || i).call(n, "title", { 1607 name: "insert", 1608 hash: {}, 1609 data: a 1610 })) || 0 === r) && (s += r), s + "\n " 1611 }, 3: function(n, e, t, a){ 1612 var r, i = e.helperMissing, s = "\n "; 1613 return ((r = (e.insert || n && n.insert || i).call(n, "title", { 1614 name: "insert", 1615 hash: {}, 1616 data: a 1617 })) || 0 === r) && (s += r), s += "\n ", ((r = (e.insert || n && n.insert || i).call(n, "person", { 1618 name: "insert", 1619 hash: {}, 1620 data: a 1621 })) || 0 === r) && (s += r), s + "\n " 1622 }, compiler: [5, ">= 2.0.0"], main: function(n, e, t, a){ 1623 var r, i = '<span class="bibbase_paper_titleauthoryear">\n\n '; 1624 return ((r = e.if.call(n, n && n.authorFirst, { 1625 name: "if", 1626 hash: {}, 1627 fn: this.program(1, a), 1628 inverse: this.program(3, a), 1629 data: a 1630 })) || 0 === r) && (i += r), i + "\n\n</span>\n" 1631 }, useData: !0 1632 }) 1633}(), console.log("loading bibbase.js"), toggle = function(n){ 1634 console.log(n), $(n.nextSibling).toggle(200), $(n.firstChild).toggleClass("fa-angle-down").toggleClass("fa-angle-right") 1635}, toggleGroup = function(n){ 1636 $("#" + n + " .bibbase_group_body").toggle(200), $("#" + n + " .bibbase_group_head_icon").toggleClass("fa-angle-down").toggleClass("fa-angle-right") 1637}, toggleAll = function(){ 1638 $(".bibbase_group_body").toggle(200), $(".bibbase_group_head_icon").toggleClass("fa-angle-down").toggleClass("fa-angle-right") 1639}, showBib = function(n){ 1640 $(n.target).parents(".bibbase_paper").find("[data-type=bibtex]").slideToggle(300) 1641}, showAbstract = function(n){ 1642 $(n.target).parents(".bibbase_paper").find("[data-type=abstract]").slideToggle(300) 1643}, downloadBibtex = function(){ 1644 var n = ""; 1645 $("[data-type='bibtex'] pre").each(function(e, t){ 1646 n += t.innerHTML + "\n\n" 1647 }); 1648 var e = "data:Application/octet-stream," + encodeURIComponent(n); 1649 document.location = e 1650}; 1651var trackOutboundLink = function(n, e, t, a){ 1652 return ga("send", "event", n, e, t, { 1653 hitCallback: function(){ 1654 document.location = a 1655 } 1656 }), setTimeout(function(){ 1657 document.location = a 1658 }, 500), !1 1659}; 1660groupby = function(n){ 1661 var e = groupDataRec(bibbase.data, [n]); 1662 $("#bibbase_body").html(Handlebars.templates.papers(e)), markRead() 1663}, TemplatesObject = Handlebars.templates, "undefined" != typeof Meteor && Meteor.startup(function(){ 1664 TemplatesObject = Handlebars.templates 1665}), get = function(n, e, t){ 1666 return t[n] ? e ? e.replace(/X/g, t[n]) : t[n] : "" 1667}, groupDataRec = function(n, e){ 1668 if(e.length > 0){ 1669 var t, a = _.reduce(n, function(n, t){ 1670 var a, r = function(n, e, t){ 1671 n[t] || (n[t] = []), n[t].push(e) 1672 }, i = (a = t.bibdata ? t.bibdata : t)[e[0]]; 1673 return i instanceof Array ? _.each(i, function(e){ 1674 r(n, t, e) 1675 }) : r(n, t, i), n 1676 }, {}), r = _.map(a, function(n, t){ 1677 return t = t.replace(/<nbsp>/g, " "), _.extend({key: t}, groupDataRec(n, e.slice(1))) 1678 }); 1679 return t = "year" == e[0] || "downloads" == e[0] ? _.sortBy(r, function(n){ 1680 return -1 * Number(n.key) 1681 }) : _.sortBy(r, function(n){ 1682 return n.key 1683 }), {groups: t} 1684 } 1685 return { 1686 items: _.sortBy(n, function(n){ 1687 return -n.votes || 0 1688 }) 1689 } 1690}, amazonString = function(n){ 1691 var e; 1692 return "book" == n.bibtype ? e = n.title : "inbook" == n.bibtype ? e = n.series || n.title || n.booktitle : "incollection" == n.bibtype ? e = n.booktitle : "proceedings" == n.bibtype && (e = n.title || n.title), e && (e = e.replace(/\(.*\)/g, "")), n.author && n.author[0] && n.author[0].lastnames && (e = n.author[0].lastnames[0] + " " + e), e 1693}, bibbaseHelpers = { 1694 insert: function(n){ 1695 return TemplatesObject[n](this) 1696 }, get: get, getList: function(n){ 1697 var e = []; 1698 for(var t in n){ 1699 var a = n[t]; 1700 a && a.length > 0 && e.push(a) 1701 } 1702 return e.join(", ") 1703 }, getPerson: function(n, e, t){ 1704 t && !t.hash || (t = this), e || (e = t.metadata); 1705 var a = "", r = t.params && "1" == t.params.fullnames ? _.map(t[n], function(n){ 1706 return _.union(n.prefixes, n.firstnames, n.lastnames, n.suffixes).join(" ") 1707 }) : t[n + "_short"]; 1708 if(r){ 1709 for(var i = 0; i < r.length; i++){ 1710 i > 0 && (a += "; "), r.length > 1 && i == r.length - 1 && (a += " and "); 1711 var s = r[i].replace("<nbsp>", " "), o = s.slice(0, s.indexOf(".")).toLowerCase(); 1712 e && null != e && e.authorlinks
1712&& e.authorlinks[o] ? a += '<a class="bibbase author link" href="' + e.authorlinks[o] + '">' + s + "</a>" : a += s 1713 } 1714 t.params && "1" == t.params.fullnames && (a += ".") 1715 } 1716 return a 1717 }, capitalize: function(n){ 1718 return n && n.length > 0 ? n[0].toUpperCase() + n.slice(1) : n 1719 }, guessFiletype: function(n){ 1720 if(n && "string" == typeof n){ 1721 var e = n.slice(n.lastIndexOf(".") + 1).toLowerCase(); 1722 if(["pdf", "ps", "txt", "png", "jpg", "gif", "tif", "doc", "docx", "ppt", "pptx", "xls", "xlsx"].indexOf(e) >= 0) return e 1723 } 1724 return "link" 1725 }, getExtension: function(n){ 1726 return n && "string" == typeof n ? n.slice(n.lastIndexOf(".") + 1).toLowerCase() : "..." 1727 }, normalizeString: function(n){ 1728 return n.replace(/[^a-zA-Z0-9]/g, "_") 1729 }, formatTitle: function(n){ 1730 return (n ? n.replace(/\.$/, "") : "") + "." 1731 }, note: function(){ 1732 return get("note", "X", this) 1733 }, bibbase_note: function(){ 1734 return get("bibbase_note", "X", this) 1735 }, typeTemplate: function(){ 1736 var n = this, e = bibbaseHelpers.getList, t = bibbaseHelpers.capitalize, a = function(e, t){ 1737 return bibbaseHelpers.get(e, t, n) 1738 }, r = function(e){ 1739 return bibbaseHelpers.getPerson(e, void 0, n) 1740 }; 1741 return ({ 1742 inproceedings: function(){ 1743 var t = "In " + e([n.editor ? r("editor") + ", editor(s)" : "", a("booktitle", "<i>X</i>"), a("volume", "volume X"), a("series") != a("booktitle") ? a("series", "of <i>X</i>") : "", a("pages", "pages X"), a("address"), a("month") + " " + a("year")]) + ". "; 1744 return (n.organization || n.publisher) && (t += e([a("organization"), a("publisher")])), t 1745 }, article: function(){ 1746 var e = a("journal", "<i>X</i>"); 1747 return (n.number || n.volume || n.pages) && (e += ","), (n.number || n.volume) && (e += " " + a("volume") + a("number", "(X)"), n.pages && (e += ": ")), e += a("pages") + ". " + a("month") + " " + a("year") + "." 1748 }, book: function(){ 1749 var t = ""; 1750 return (n.volume || n.series) && (t += a("volume", "Volume X") + " " + a("series", "of X")), t += e([a("publisher"), a("address"), a("edition", "X edition"), a("month") + " " + a("year")]) + "." 1751 }, booklet: function(){ 1752 return e([a("howpublished"), a("address"), a("month") + " " + a("year")]) + "." 1753 }, inbook: function(){ 1754 var i = ""; 1755 return (n.volume || n.series) && (i += t(e([a("volume", "volume X") + " " + a("series", "of X"), n.editor ? r("editor") + ", editor(s)" : ""])) + ". "), (n.chapter || n.pages) && (i += e([a("chapter"), a("pages", "pages X")]) + ". "), i += e([a("publisher"), a("address"), a("edition", "X edition"), a("month") + " " + a("year")]) + "." 1756 }, incollection: function(){ 1757 var i = ""; 1758 return i += "In " + e([n.editor ? r("editor") + ", editor(s)" : "", a("booktitle", "<i>X</i>"), a("volume", "volume X"), a("series", "of X"), a("chapter"), a("pages", "pages X")]) + ". " + t(e([a("publisher"), a("address"), a("edition", "X edition"), a("month") + " " + a("year")])) + "." 1759 }, inproceedings: function(){ 1760 var t = "In " + e([n.editor ? r("editor") + ", editor(s)" : "", a("booktitle", "<i>X</i>"), a("volume", "volume X"), a("series") != a("booktitle") ? a("series", "of <i>X</i>") : "", a("pages", "pages X"), a("address"), a("month") + " " + a("year")]) + ". "; 1761 return (n.organization || n.publisher) && (t += e([a("organization"), a("publisher")])), t 1762 }, manual: function(){ 1763 return e([a("organization"), a("address"), a("edition", "X edition"), a("month") + " " + a("year")]) + "." 1764 }, mastersthesis: function(){ 1765 return e(["Master's Thesis", a("school"), a("address"), a("month") + " " + a("year")]) + "." 1766 }, misc: function(){ 1767 var n = e([a("howpublished"), a("month") + " " + a("year")]); 1768 return n.length > 1 && (n += "."), n 1769 }, phdthesis: function(){ 1770 return e(["Ph.D. Thesis", a("school"), a("address"), a("month") + " " + a("year")]) + "." 1771 }, proceedings: function(){ 1772 var t = ""; 1773 return (n.volume || n.series) && (t += e([a("volume", "Volume X"), a("series", "of X")]) + "."), t += e([a("address"), a("month") + " " + a("year")]) + ".", (n.organization || n.publisher) && (t += e([a("organization"), a("publisher")]) + "."), t 1774 }, techreport: function(){ 1775 return "Technical Report " + e([a("number"), a("institution"), a("address"), a("month") + " " + a("year")]) + "." 1776 }, unpublished: function(){ 1777 return a("month") + " " + a("year") + "." 1778 } 1779 }[n.bibtype.toLowerCase()] || function(){ 1780 var e = a("month") + " " + a("year") + "."; 1781 return e += "\x3c!-- NOTE FROM BIBBASE: This entry has an invali
1781d bibtex entry type: " + n.bibtype + ". Therefore, we don't know how to render it properly. Please consider fixing this. --\x3e" 1782 })() 1783 } 1784}, registerHelper = function(HandlebarsRegister){ 1785 _.each(bibbaseHelpers, function(n, e){ 1786 HandlebarsRegister.registerHelper(e, n) 1787 }), HandlebarsRegister.registerHelper("each_with_key", function(n, e){ 1788 var t, a = {}, r = ""; 1789 e.hash.key; 1790 for(t in n) n.hasOwnProperty(t) && (a.value = n[t], a.key = t, r += e.fn(a)); 1791 return r 1792 }), HandlebarsRegister.registerHelper("ifx", function(conditional, options){ 1793 var truthValue = !1; 1794 try{ 1795 truthValue = eval(conditional) 1796 } catch(n){ 1797 console.log("Exception in #ifx evaluation of condition: ", conditional, n) 1798 } 1799 return truthValue ? options.fn(this) : options.inverse(this) 1800 }) 1801}, $("#bibbase").hide(), $("#spinner").show(); 1802var server; 1803server = "undefined" != typeof bibbase && bibbase.params && bibbase.params.host ? "https://" + bibbase.params.host : "", "undefined" == typeof bibbase || !bibbase.params || bibbase.params.css || bibbase.params.theme; bibbase.theme = server + "/css/styles/default.css", "undefined" != typeof bibbase && bibbase.params && bibbase.params.theme && (bibbase.theme = server + "/css/styles/" + bibbase.params.theme + ".css"), loadcss(bibbase.theme), bibbase.params.css && loadcss("//" + bibbase.params.css, "append"), loadcss("//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css"); 1804var handleResponse = { 1805 get: function(n){ 1806 n.result && (console.log("marking read"), bibbase.read = n.result, markRead()) 1807 } 1808}; 1809onMessage = function(n){ 1810 if(this != n.source && "undefined" != typeof bibbase){ 1811 var e = JSON.parse(n.data); 1812 bibbase.networkFrame = n.source, "response" == e.type && handleResponse[e.command](e) 1813 } 1814}, toggleRead = function(n){ 1815 console.log("toggle ", n); 1816 var e = !1; 1817 if(bibbase.read && bibbase.read.forEach(function(t){ 1818 if(t.bibbaseid == n){ 1819 console.log("unread ", t); 1820 var a = {command: "unread", _id: t._id, isbibbase: !0}; 1821 bibbase.networkFrame.postMessage(JSON.stringify(a), "*"), e = !0 1822 } 1823 }), !e){ 1824 console.log("read ", n); 1825 var t = {command: "read", bibbaseid: n, isbibbase: !0}; 1826 bibbase.networkFrame.postMessage(JSON.stringify(t), "*") 1827 } 1828}, $(document).ready(function(){ 1829 "undefined" != typeof bibbase && (gatherHTML(), bibbase.params && (bibbase.params.folding && 1 == bibbase.params.folding && toggleAll(), log_send({ 1830 type: "visit", 1831 biburl: bibbase.params.bib, 1832 title: document.title, 1833 ownerID: bibbase.ownerID, 1834 token: bibbase.params.token 1835 }), bibbase.params.msg && $("#bibbase_msg_" + bibbase.params.msg).delay(500).slideDown(400))), loadBootstrap(function(){ 1836 $("#spinner").hide(), $("#bibbase").show() 1837 }), $(".bibbase.author.link").on("click", function(n){ 1838 console.log(n.target), ga("send", "event", "authors", "link clicked", n.target.innerHTML) 1839 }), $("head").append($("<style/>", {id: "bibbase_style_read"})), window.attachEvent ? window.attachEvent("onmessage", onMessage) : window.addEventListener && window.addEventListener("message", onMessage, !1), registerHelper(Handlebars) 1840}), function(){ 1841 var n = this, e = n._, t = {}, a = Array.prototype, r = Object.prototype, i = Function.prototype, s = a.push, 1842 o = a.slice, l = a.concat, c = r.toString, u = r.hasOwnProperty, p = a.forEach, f = a.map, h = a.reduce, 1843 d = a.reduceRight, b = a.filter, m = a.every, g = a.some, y = a.indexOf, v = a.lastIndexOf, x = Array.isArray, 1844 w = Object.keys, _ = i.bind, k = function(n){ 1845 return n instanceof k ? n : this instanceof k ? void (this._wrapped = n) : new k(n) 1846 }; 1847 "undefined" != typeof exports ? ("undefined" != typeof module && module.exports && (exports = module.exports = k), exports._ = k) : n._ = k, k.VERSION = "1.6.0"; 1848 var j = k.each = k.forEach = function(n, e, a){ 1849 if(null == n) return n;
1850 if(p && n.forEach === p) n.forEach(e, a); else if(n.length === +n.length){ 1851 for(var r = 0, i = n.length; r < i; r++) if(e.call(a, n[r], r, n) === t) return 1852 } else for(var s = k.keys(n), r = 0, i = s.length; r < i; r++) if(e.call(a, n[s[r]], s[r], n) === t) return; 1853 return n 1854 }; 1855 k.map = k.collect = function(n, e, t){ 1856 var a = []; 1857 return null == n ? a : f && n.map === f ? n.map(e, t) : (j(n, function(n, r, i){ 1858 a.push(e.call(t, n, r, i)) 1859 }), a) 1860 }; 1861 var E = "Reduce of empty array with no initial value"; 1862 k.reduce = k.foldl = k.inject = function(n, e, t, a){ 1863 var r = arguments.length > 2; 1864 if(null == n && (n = []), h && n.reduce === h) return a && (e = k.bind(e, a)), r ? n.reduce(e, t) : n.reduce(e); 1865 if(j(n, function(n, i, s){ 1866 r ? t = e.call(a, t, n, i, s) : (t = n, r = !0) 1867 }), !r) throw new TypeError(E); 1868 return t 1869 }, k.reduceRight = k.foldr = function(n, e, t, a){ 1870 var r = arguments.length > 2; 1871 if(null == n && (n = []), d && n.reduceRight === d) return a && (e = k.bind(e, a)), r ? n.reduceRight(e, t) : n.reduceRight(e); 1872 var i = n.length; 1873 if(i !== +i){ 1874 var s = k.keys(n); 1875 i = s.length 1876 } 1877 if(j(n, function(o, l, c){ 1878 l = s ? s[--i] : --i, r ? t = e.call(a, t, n[l], l, c) : (t = n[l], r = !0) 1879 }), !r) throw new TypeError(E); 1880 return t 1881 }, k.find = k.detect = function(n, e, t){ 1882 var a; 1883 return T(n, function(n, r, i){ 1884 if(e.call(t, n, r, i)) return a = n, !0 1885 }), a 1886 }, k.filter = k.select = function(n, e, t){ 1887 var a = []; 1888 return null == n ? a : b && n.filter === b ? n.filter(e, t) : (j(n, function(n, r, i){ 1889 e.call(t, n, r, i) && a.push(n) 1890 }), a) 1891 }, k.reject = function(n, e, t){ 1892 return k.filter(n, function(n, a, r){ 1893 return !e.call(t, n, a, r) 1894 }, t) 1895 }, k.every = k.all = function(n, e, a){ 1896 e || (e = k.identity); 1897 var r = !0; 1898 return null == n ? r : m && n.every === m ? n.every(e, a) : (j(n, function(n, i, s){ 1899 if(!(r = r && e.call(a, n, i, s))) return t 1900 }), !!r) 1901 }; 1902 var T = k.some = k.any = function(n, e, a){ 1903 e || (e = k.identity); 1904 var r = !1; 1905 return null == n ? r : g && n.some === g ? n.some(e, a) : (j(n, function(n, i, s){ 1906 if(r || (r = e.call(a, n, i, s))) return t 1907 }), !!r) 1908 }; 1909 k.contains = k.include = function(n, e){ 1910 return null != n && (y && n.indexOf === y ? -1 != n.indexOf(e) : T(n, function(n){ 1911 return n === e 1912 })) 1913 }, k.invoke = function(n, e){ 1914 var t = o.call(arguments, 2), a = k.isFunction(e); 1915 return k.map(n, function(n){ 1916 return (a ? e : n[e]).apply(n, t) 1917 }) 1918 }, k.pluck = function(n, e){ 1919 return k.map(n, k.property(e)) 1920 }, k.where = function(n, e){ 1921 return k.filter(n, k.matches(e)) 1922 }, k.findWhere = function(n, e){ 1923 return k.find(n, k.matches(e)) 1924 }, k.max = function(n, e, t){ 1925 if(!e && k.isArray(n) && n[0] === +n[0] && n.length < 65535) return Math.max.apply(Math, n); 1926 var a = -1 / 0, r = -1 / 0; 1927 return j(n, function(n, i, s){ 1928 var o = e ? e.call(t, n, i, s) : n; 1929 o > r && (a = n, r = o) 1930 }), a 1931 }, k.min = function(n, e, t){ 1932 if(!e && k.isArray(n) && n[0] === +n[0] && n.length < 65535) return Math.min.apply(Math, n); 1933 var a = 1 / 0, r = 1 / 0; 1934 return j(n, function(n, i, s){ 1935 var o = e ? e.call(t, n, i, s) : n; 1936 o < r && (a = n, r = o) 1937 }), a 1938 }, k.shuffle = function(n){ 1939 var e, t = 0, a = []; 1940 return j(n, function(n){ 1941 e = k.random(t++), a[t - 1] = a[e], a[e] = n 1942 }), a 1943 }, k.sample = function(n, e, t){ 1944 return null == e || t ? (n.length !== +n.length && (n = k.values(n)), n[k.random(n.length - 1)]) : k.shuffle(n).slice(0, Math.max(0, e)) 1945 }; 1946 var M = function(n){ 1947 return null == n ? k.identity : k.isFunction(n) ? n : k.property(n) 1948 }; 1949 k.sortBy = function(n, e, t){ 1950 return e = M(e), k.pluck(k.map(n, function(n, a, r){ 1951 return {value: n, index: a, criteria: e.call(t, n, a, r)} 1952 }).sort(function(n, e){ 1953 var t = n.criteria, a = e.criteria; 1954 if(t !== a){ 1955 if(t > a || void 0 === t) return 1; 1956 if(t < a || void 0 === a) return -1 1957 } 1958 return n.index - e.index 1959 }), "value") 1960 }; 1961 var D = function(n){ 1962 return function(e, t, a){ 1963 var r = {}; 1964 return t = M(t), j(e, function(i, s){ 1965 var o = t.call(a, i, s, e); 1966 n(r, o, i) 1967 }), r 1968 } 1969 }; 1970 k.groupBy = D(function(n, e, t){ 1971 k.has(n, e) ? n[e].push(t) : n[e] = [t] 1972 }), k.indexBy = D(function(n, e, t){ 1973 n[e] = t 1974 }), k.countBy = D(function(n, e){ 1975 k.has(n, e) ? n[e]++ : n[e] = 1 1976 }), k.sortedIndex = function(n, e, t, a){ 1977 for(var r = (t = M(t)).call(a, e), i = 0, s = n.length; i < s;){ 1978 var o = i + s >>> 1; 1979 t.call(a, n[o]) < r ? i = o + 1 : s = o 1980 } 1981 return i 1982 }, k.toArray = function(n){ 1983 return n ? k.isArray(n) ? o.call(n) : n.length === +n.length ? k.map(n, k.identity) : k.values(n) : [] 1984 }, k.size = function(n){ 1985 return null == n ? 0 : n.length === +n.length ? n.length : k.keys(n).length 1986 }, k.first = k.head = k.take = function(n, e, t){ 1987 if(null != n) return null == e || t ? n[0] : e < 0 ? [] : o.call(n, 0, e) 1988 }, k.initial = function(n, e, t){ 1989 return o.call(n, 0, n.length - (null == e || t ? 1 : e)) 1990 }, k.last = function(n, e, t){ 1991 if(null != n) return null == e || t ? n[n.length - 1] : o.call(n, Math.max(n.length - e, 0)) 1992 }, k.rest = k.tail = k.drop = function(n, e, t){ 1993 return o.call(n, null == e || t ? 1 : e) 1994 }, k.compact = function(n){ 1995 return k.filter(n, k.identity) 1996 }; 1997 var O = function(n, e, t){ 1998 return e && k.every(n, k.isArray) ? l.apply(t, n) : (j(n, function(n){ 1999 k.isArray(n) || k.isArguments(n) ? e ? s.apply(t, n) : O(n, e, t) : t.push(n) 2000 }), t) 2001 }; 2002 k.flatten = function(n, e){ 2003 return O(n, e, []) 2004 }, k.without = function(n){ 2005 return k.difference(n, o.call(arguments, 1)) 2006 }, k.partition = function(n, e, t){ 2007 e = M(e); 2008 var a = [], r = []; 2009 return j(n, function(n){ 2010 (e.call(t, n) ? a : r).push(n) 2011 }), [a, r] 2012 }, k.uniq = k.unique = function(n, e, t, a){ 2013 k.isFunction(e) && (a = t, t = e, e = !1); 2014 var r = t ? k.map(n, t, a) : n, i = [], s = []; 2015 return j(r, function(t, a){ 2016 (e ? a && s[s.length - 1] === t : k.contains(s, t)) || (s.push(t), i.push(n[a])) 2017 }), i 2018 }, k.union = function(){ 2019 return k.uniq(k.flatten(arguments, !0)) 2020 }, k.intersection = function(n){ 2021 var e = o.call(arguments, 1); 2022 return k.filter(k.uniq(n), function(n){ 2023 return k.every(e, function(e){ 2024 return k.contains(e, n) 2025 }) 2026 }) 2027 }, k.difference = function(n){ 2028 var e = l.apply(a, o.call(arguments, 1)); 2029 return k.filter(n, function(n){ 2030 return !k.contains(e, n) 2031 }) 2032 }, k.zip = function(){ 2033 for(var n = k.max(k.pluck(arguments, "length").concat(0)), e = new Array(n), t = 0; t < n; t++) e[t] = k.pluck(arguments, "" + t); 2034 return e 2035 }, k.object = function(n, e){ 2036 if(null == n) return {}; 2037 for(var t = {}, a = 0, r = n.length; a < r; a++) e ? t[n[a]] = e[a] : t[n[a][0]] = n[a][1]; 2038 return t 2039 }, k.indexOf = function(n, e, t){ 2040 if(null == n) return -1; 2041 var a = 0, r = n.length; 2042 if(t){ 2043 if("number" != typeof t) return a = k.sortedIndex(n, e), n[a] === e ? a : -1; 2044 a = t < 0 ? Math.max(0, r + t) : t 2045 } 2046 if(y && n.indexOf === y) return n.indexOf(e, t); 2047 for(; a < r; a++) if(n[a] === e) return a; 2048 return -1 2049 }, k.lastIndexOf = function(n, e, t){ 2050 if(null == n) return -1; 2051 var a = null != t; 2052 if(v && n.lastIndexOf === v) return a ? n.lastIndexOf(e, t) : n.lastIndexOf(e); 2053 for(var r = a ? t : n.length; r--;) if(n[r] === e) return r; 2054 return -1 2055 }, k.range = function(n, e, t){ 2056 arguments.length <= 1 && (e = n || 0, n = 0), t = arguments[2] || 1; 2057 for(var a = Math.max(Math.ceil((e - n) / t), 0), r = 0, i = new Array(a); r < a;) i[r++] = n, n += t; 2058 return i 2059 }; 2060 var A = function(){ 2061 }; 2062 k.bind = function(n, e){ 2063 var t, a; 2064 if(_ && n.bind === _) return _.apply(n, o.call(arguments, 1)); 2065 if(!k.isFunction(n)) throw new TypeError; 2066 return t = o.call(arguments, 2), a = function(){ 2067 if(!(this instanceof a)) return n.apply(e, t.concat(o.call(arguments))); 2068 A.prototype = n.prototype; 2069 var r = new A; 2070 A.prototype = null; 2071 var i = n.apply(r, t.concat(o.call(arguments))); 2072 return Object(i) === i ? i : r 2073 } 2074 }, k.partial = function(n){ 2075 var e = o.call(arguments, 1); 2076 return function(){ 2077 for(var t = 0, a = e.slice(), r = 0, i = a.length; r < i; r++) a[r] === k && (a[r] = arguments[t++]); 2078 for(; t < arguments.length;) a.push(arguments[t++]); 2079 return n.apply(this, a) 2080 } 2081 }, k.bindAll = function(n){ 2082 var e = o.call(arguments, 1);
2083 if(0 === e.length) throw new Error("bindAll must be passed function names"); 2084 return j(e, function(e){ 2085 n[e] = k.bind(n[e], n) 2086 }), n 2087 }, k.memoize = function(n, e){ 2088 var t = {}; 2089 return e || (e = k.identity), function(){ 2090 var a = e.apply(this, arguments); 2091 return k.has(t, a) ? t[a] : t[a] = n.apply(this, arguments) 2092 } 2093 }, k.delay = function(n, e){ 2094 var t = o.call(arguments, 2); 2095 return setTimeout(function(){ 2096 return n.apply(null, t) 2097 }, e) 2098 }, k.defer = function(n){ 2099 return k.delay.apply(k, [n, 1].concat(o.call(arguments, 1))) 2100 }, k.throttle = function(n, e, t){ 2101 var a, r, i, s = null, o = 0; 2102 t || (t = {}); 2103 var l = function(){ 2104 o = !1 === t.leading ? 0 : k.now(), s = null, i = n.apply(a, r), a = r = null 2105 }; 2106 return function(){ 2107 var c = k.now(); 2108 o || !1 !== t.leading || (o = c); 2109 var u = e - (c - o); 2110 return a = this, r = arguments, u <= 0 ? (clearTimeout(s), s = null, o = c, i = n.apply(a, r), a = r = null) : s || !1 === t.trailing || (s = setTimeout(l, u)), i 2111 } 2112 }, k.debounce = function(n, e, t){ 2113 var a, r, i, s, o, l = function(){ 2114 var c = k.now() - s; 2115 c < e ? a = setTimeout(l, e - c) : (a = null, t || (o = n.apply(i, r), i = r = null)) 2116 }; 2117 return function(){ 2118 i = this, r = arguments, s = k.now(); 2119 var c = t && !a; 2120 return a || (a = setTimeout(l, e)), c && (o = n.apply(i, r), i = r = null), o 2121 } 2122 }, k.once = function(n){ 2123 var e, t = !1; 2124 return function(){ 2125 return t ? e : (t = !0, e = n.apply(this, arguments), n = null, e) 2126 } 2127 }, k.wrap = function(n, e){ 2128 return k.partial(e, n) 2129 }, k.compose = function(){ 2130 var n = arguments; 2131 return function(){ 2132 for(var e = arguments, t = n.length - 1; t >= 0; t--) e = [n[t].apply(this, e)]; 2133 return e[0] 2134 } 2135 }, k.after = function(n, e){ 2136 return function(){ 2137 if(--n < 1) return e.apply(this, arguments) 2138 } 2139 }, k.keys = function(n){ 2140 if(!k.isObject(n)) return []; 2141 if(w) return w(n); 2142 var e = []; 2143 for(var t in n) k.has(n, t) && e.push(t); 2144 return e 2145 }, k.values = function(n){ 2146 for(var e = k.keys(n), t = e.length, a = new Array(t), r = 0; r < t; r++) a[r] = n[e[r]]; 2147 return a 2148 }, k.pairs = function(n){ 2149 for(var e = k.keys(n), t = e.length, a = new Array(t), r = 0; r < t; r++) a[r] = [e[r], n[e[r]]]; 2150 return a 2151 }, k.invert = function(n){ 2152 for(var e = {}, t = k.keys(n), a = 0, r = t.length; a < r; a++) e[n[t[a]]] = t[a]; 2153 return e 2154 }, k.functions = k.methods = function(n){ 2155 var e = []; 2156 for(var t in n) k.isFunction(n[t]) && e.push(t); 2157 return e.sort() 2158 }, k.extend = function(n){ 2159 return j(o.call(arguments, 1), function(e){ 2160 if(e) for(var t in e) n[t] = e[t] 2161 }), n 2162 }, k.pick = function(n){ 2163 var e = {}, t = l.apply(a, o.call(arguments, 1)); 2164 return j(t, function(t){ 2165 t in n && (e[t] = n[t]) 2166 }), e 2167 }, k.omit = function(n){ 2168 var e = {}, t = l.apply(a, o.call(arguments, 1)); 2169 for(var r in n) k.contains(t, r) || (e[r] = n[r]); 2170 return e 2171 }, k.defaults = function(n){ 2172 return j(o.call(arguments, 1), function(e){ 2173 if(e) for(var t in e) void 0 === n[t] && (n[t] = e[t]) 2174 }), n 2175 }, k.clone = function(n){ 2176 return k.isObject(n) ? k.isArray(n) ? n.slice() : k.extend({}, n) : n 2177 }, k.tap = function(n, e){ 2178 return e(n), n 2179 }; 2180 var S = function(n, e, t, a){ 2181 if(n === e) return 0 !== n || 1 / n == 1 / e; 2182 if(null == n || null == e) return n === e; 2183 n instanceof k && (n = n._wrapped), e instanceof k && (e = e._wrapped); 2184 var r = c.call(n); 2185 if(r != c.call(e)) return !1; 2186 switch(r){ 2187 case"[object String]": 2188 return n == String(e); 2189 case"[object Number]": 2190 return n != +n ? e != +e : 0 == n ? 1 / n == 1 / e : n == +e; 2191 case"[object Date]": 2192 case"[object Boolean]": 2193 return +n == +e; 2194 case"[object RegExp]": 2195 return n.source == e.source && n.global == e.global && n.multiline == e.multiline && n.ignoreCase == e.ignoreCase 2196 } 2197 if("object" != typeof n || "object" != typeof e) return !1; 2198 for(var i = t.length; i--;) if(t[i] == n) return a[i] == e; 2199 var s = n.constructor, o = e.constructor; 2200 if(s !== o && !(k.isFunction(s) && s instanceof s && k.isFunction(o) && o instanceof o) && "constructor" in n && "constructor" in e) return !1; 2201 t.push(n), a.push(e); 2202 var l = 0, u = !0; 2203 if("[object Array]" == r){ 2204 if(l = n.length, u = l == e.length) for(; l-- && (u = S(n[l], e[l], t, a));) ; 2205 } else{ 2206 for(var p in n) if(k.has(n, p) && (l++, !(u = k.has(e, p) && S(n[p], e[p], t, a)))) break; 2207 if(u){ 2208 for(p in e) if(k.has(e, p) && !l--) break; 2209 u = !l 2210 } 2211 } 2212 return t.pop(), a.pop(), u 2213 }; 2214 k.isEqual = function(n, e){ 2215 return S(n, e, [], []) 2216 }, k.isEmpty = function(n){ 2217 if(null == n) return !0; 2218 if(k.isArray(n) || k.isString(n)) return 0 === n.length; 2219 for(var e in n) if(k.has(n, e)) return !1; 2220 return !0 2221 }, k.isElement = function(n){ 2222 return !(!n || 1 !== n.nodeType) 2223 }, k.isArray = x || function(n){ 2224 return "[object Array]" == c.call(n) 2225 }, k.isObject = function(n){ 2226 return n === Object(n) 2227 }, j(["Arguments", "Function", "String", "Number", "Date", "RegExp"], function(n){ 2228 k["is" + n] = function(e){ 2229 return c.call(e) == "[object " + n + "]" 2230 } 2231 }), k.isArguments(arguments) || (k.isArguments = function(n){ 2232 return !(!n || !k.has(n, "callee")) 2233 }), "function" != typeof /./ && (k.isFunction = function(n){ 2234 return "function" == typeof n 2235 }), k.isFinite = function(n){ 2236 return isFinite(n) && !isNaN(parseFloat(n)) 2237 }, k.isNaN = function(n){ 2238 return k.isNumber(n) && n != +n 2239 }, k.isBoolean = function(n){ 2240 return !0 === n || !1 === n || "[object Boolean]" == c.call(n) 2241 }, k.isNull = function(n){ 2242 return null === n 2243 }, k.isUndefined = function(n){ 2244 return void 0 === n 2245 }, k.has = function(n, e){ 2246 return u.call(n, e) 2247 }, k.noConflict = function(){ 2248 return n._ = e, this 2249 }, k.identity = function(n){ 2250 return n 2251 }, k.constant = function(n){ 2252 return function(){ 2253 return n 2254 } 2255 }, k.property = function(n){ 2256 return function(e){ 2257 return e[n] 2258 } 2259 }, k.matches = function(n){ 2260 return function(e){ 2261 if(e === n) return !0; 2262 for(var t in n) if(n[t] !== e[t]) return !1; 2263 return !0 2264 } 2265 }, k.times = function(n, e, t){ 2266 for(var a = Array(Math.max(0, n)), r = 0; r < n; r++) a[r] = e.call(t, r); 2267 return a 2268 }, k.random = function(n, e){ 2269 return null == e && (e = n, n = 0), n + Math.floor(Math.random() * (e - n + 1)) 2270 }, k.now = Date.now || function(){ 2271 return (new Date).getTime() 2272 }; 2273 var F = {escape: {"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}}; 2274 F.unescape = k.invert(F.escape); 2275 var H = { 2276 escape: new RegExp("[" + k.keys(F.escape).join("") + "]", "g"), 2277 unescape: new RegExp("(" + k.keys(F.unescape).join("|") + ")", "g") 2278 }; 2279 k.each(["escape", "unescape"], function(n){ 2280 k[n] = function(e){ 2281 return null == e ? "" : ("" + e).replace(H[n], function(e){ 2282 return F[n][e] 2283 }) 2284 } 2285 }), k.result = function(n, e){ 2286 if(null != n){ 2287 var t = n[e]; 2288 return k.isFunction(t) ? t.call(n) : t 2289 } 2290 }, k.mixin = function(n){ 2291 j(k.functions(n), function(e){ 2292 var t = k[e] = n[e]; 2293 k.prototype[e] = function(){ 2294 var n = [this._wrapped]; 2295 return s.apply(n, arguments), I.call(this, t.apply(k, n)) 2296 } 2297 }) 2298 }; 2299 var B = 0; 2300 k.uniqueId = function(n){ 2301 var e = ++B + ""; 2302 return n ? n + e : e 2303 }, k.templateSettings = {evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g}; 2304 var R = /(.)^/, P = {"'": "'", "\\": "\\", "\r": "r", "\n": "n", "\t": "t", "\u2028": "u2028", "\u2029": "u2029"}, 2305 C = /\\|'|\r|\n|\t|\u2028|\u2029/g; 2306 k.template = function(n, e, t){ 2307 var a; 2308 t = k.defaults({}, t, k.templateSettings); 2309 var r = new RegExp([(t.escape || R).source, (t.interpolate || R).source, (t.evaluate || R).source].join("|") + "|$", "g"), 2310 i = 0, s = "__p+='"; 2311 n.replace(r, function(e, t, a, r, o){ 2312 return s += n.slice(i, o).replace(C, function(n){ 2313 return "\\" + P[n] 2314 }), t && (s += "'+\n((__t=(" + t + "))==null?'':_.escape(__t))+\n'"), a && (s += "'+\n((__t=(" + a + "))==null?'':__t)+\n'"), r && (s += "';\n" + r + "\n__p+='"), i = o + e.length, e 2315 }), s += "';\n", t.variable || (s = "with(obj||{}){\n" + s + "}\n"), s = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + s + "return __p;\n"; 2316 try{ 2317 a = new Function(t.variable || "obj", "_", s) 2318 } catch(n){ 2319 throw n.source = s, n 2320 } 2321 if(e) return a(e, k); 2322 var o = function(n){ 2323 return a.call(this, n, k) 2324 }; 2325 return o.source = "function(" + (t.variable || "obj") + "){\n" + s + "}", o 2326 }, k.chain = function(n){ 2327 return k(n).chain() 2328 }; 2329 var I = function(n){ 2330 return this._chain ? k(n).chain() : n 2331 }; 2332 k.mixin(k), j(["pop", "push", "reverse", "shift", "sort", "splice", "unshift"], function(n){ 2333 var e = a[n]; 2334 k.prototype[n] = function(){ 2335 var t = this._wrapped; 2336 return e.apply(t, arguments), "shift" != n && "splice" != n || 0 !== t.length || delete t[0], I.call(this, t) 2337 } 2338 }), j(["concat", "join", "slice"], function(n){ 2339 var e = a[n]; 2340 k.prototype[n] = function(){ 2341 return I.call(this, e.apply(this._wrapped, arguments)) 2342 } 2343 }), k.extend(k.prototype, { 2344 chain: function(){ 2345 return this._chain = !0, this 2346 }, value: function(){ 2347 return this._wrapped 2348 } 2349 }), "function" == typeof define && define.amd && define("underscore", [], function(){ 2350 return k 2351 }) 2352}.call(this), function(n, e, t, a, r, i, s){ 2353 n.GoogleAnalyticsObject = r, n.ga = n.ga || function(){ 2354 (n.ga.q = n.ga.q || []).push(arguments) 2355 }, n.ga.l = 1 * new Date, i = e.createElement(t), s = e.getElementsByTagName(t)[0], i.async = 1, i.src = "//www.google-analytics.com/analytics.js", s.parentNode.insertBefore(i, s) 2356}(window, document, "script", 0, "ga"), ga("create", "UA-37729657-1", "auto"), ga("require", "displayfeatures"), ga("require", "linkid", "linkid.js"), ga("send", "pageview"); 2357/** 2358 * Klasse Sc27Mediaconfirm 2359 * (Möglichkeit zur datenschutzkonformen Einbindung von Videos [YouTube/Vimeo]) 2360 * 2361 * Beispiel zur Initialisierung: 2362 * 2363 * let sc27Mediaconfirm = new Sc27Mediaconfirm(); 2364 * 2365 * sc27Mediaconfirm.init({ 2366 * debug: true, 2367 * }); 2368 * 2369 * Beispiel zur Nutzung: 2370 * 2371 * <div class="sc27mediaconfirm" 2372 * data-sc27mediatype="youtube" 2373 * src="https://www.youtube-nocookie.com/embed/a1b2c3d4e5f6?autohide=1&controls=1&enablejsapi=1&"> 2374 * poster="" 2375 * title="Ãberschriebener Titel des Videos" 2376 * </div> 2377 * 2378 */ 2379function Sc27Mediaconfirm(config) { 2380 2381 let self = this; 2382
2383 this.mediaTypesSupported = ['youtube', 'vimeo']; 2384 this.mediaTypesDetected = []; 2385 2386 this.settings = {}; 2387 this.defaultSettings = { 2388 debug: false, 2389 debugPrefix: 'Sc27Mediaconfirm: ', 2390 consentStorageType: '', 2391 storageIdentifierPrefix: 'sc27Consent', 2392 funcGetConsentStatus: null, 2393 funcSetConsentStatus: null, 2394 }; 2395 2396 this.funcGetConsentStatus = null; 2397 this.funcSetConsentStatus = null; 2398 this.consentStorage = null; 2399 this.useSc27ConsentManager = false; 2400 2401 this.initDone = false; 2402 2403 2404 /** 2405 * Callback-Funktion zur Benachrichtigung über erteilte Einwilligung durch den Consent Manager 2406 * @param options 2407 */ 2408 this.consentmanagerCallbackConsentConfirmed = function (options) { 2409 2410 if (self.mediaTypesSupported.includes(options.vendor)) { 2411 self.settings.debug && console.log(self.settings.debugPrefix + 'consentmanagerCallbackConsentConfirmed(): activating media element for vendor "' + String(options.vendor) + '"'); 2412 self.activateElementsOfType(options.vendor); 2413 } 2414 2415 } 2416 2417 2418 /** 2419 * Callback-Funktion zur Benachrichtigung über zurückgezogene Einwilligungen durch den Consent Manager 2420 * @param options 2421 */ 2422 this.consentmanagerCallbackConsentRevoked = function (options) { 2423 2424 if (self.mediaTypesSupported.includes(options.vendor)) { 2425 self.settings.debug && console.log(self.settings.debugPrefix + 'consentmanagerCallbackConsentRevoked(): deactivating media element for vendor "' + String(options.vendor) + '"'); 2426 self.deactivateElementsOfType(options.vendor); 2427 } 2428 2429 } 2430 2431 2432 /** 2433 * Aktiviert alle auf der gesamten Seite eingebundenen Elemente des angegebenen Typs 2434 * Achtung: Es findet keine Prüfung hinsichtlich erteilter bzw. nicht erteilter Einwilligung statt! 2435 * 2436 * @param mediaType 2437 */ 2438 this.activateElementsOfType = function (mediaType) { 2439 2440 /** 2441 * Alle Medien-Elemente des angegebenen Typs aktivieren 2442 */ 2443 2444 let firstElementOfType = true; 2445 2446 $('.sc27mediaconfirm[data-sc27mediatype="' + mediaType + '"]:not(.activated)').each(function (i) { 2447 // Nur erstes Elemente dieses Typs automatisch abspielen lassen 2448 let startVideo = (firstElementOfType) ? null : false; 2449 2450 // Nachfolgende Elemente nicht mehr automatisch starten lassen 2451 firstElementOfType = false;
2452 2453 self.activateElement(this, mediaType, startVideo); 2454 }); 2455 2456 } 2457 2458 2459 /** 2460 * Aktiviert alle auf der gesamten Seite eingebundenen Elemente des angegebenen Typs 2461 * Achtung: Bereits aktivierte Elemente werden nicht wieder inaktiviert! 2462 * 2463 * @param mediaType 2464 */ 2465 this.deactivateElementsOfType = function (mediaType) { 2466 2467 /** 2468 * Alle Medien-Elemente des angegebenen Typs deaktivieren 2469 */ 2470 2471 $('.sc27mediaconfirm[data-sc27mediatype="' + mediaType + '"].activated').each(function (i) { 2472 self.prepareDisclaimer(this, mediaType); 2473 }); 2474 2475 } 2476 2477 2478 /** 2479 * Erzeugt den Disclaimer für das Element des angegebenen Medientyps 2480 * 2481 * @param element 2482 * @param mediaType 2483 */ 2484 this.prepareDisclaimer = function (element, mediaType) { 2485 2486 let title = ''; 2487 2488 2489 /** 2490 * Sofern Element aktuell aktiv, dann iframe entfernen und Disclaimer wieder einblenden 2491 */ 2492 2493 if ($(element).hasClass('activated')) { 2494 2495 self.settings.debug && console.log(self.settings.debugPrefix + 'prepareDisclaimer(): video element is active, therefore deactivating video element'); 2496 2497 // iframe entfernen 2498 $(element).find('iframe').remove(); 2499 2500 // CSS-Klasse "activated" wieder entfernen, so dass Disclaimer wieder sichtbar wird 2501 $(element).removeClass('activated'); 2502 2503 2504 // Keine weiteren Aktionen notwendig, da Disclaimer bereits vorhanden 2505 return; 2506 2507 } 2508 2509 2510 /** 2511 * Anbieter-spezifische Daten zusammenstellen 2512 */ 2513 2514 let posterPlaceholder = pageConfig.mediaconfirm.default.hasOwnProperty('poster_placeholder') ? pageConfig.mediaconfirm.default.poster_placeholder : ''; 2515 let desc = pageConfig.mediaconfirm.default.desc; 2516 let linkText = pageConfig.mediaconfirm.default.link_text; 2517 let externlinkText = pageConfig.mediaconfirm.default.externlink_text; 2518 let revocationLinkText = pageConfig.mediaconfirm.default.revocation_link_text; 2519 let videoType = $(element).data('sc27mediatype'); 2520 2521 if (videoType === 'youtube') { 2522 2523 /** 2524 * YouTube 2525 */ 2526 2527 posterPlaceholder = pageConfig.mediaconfirm.youtube.hasOwnProperty('poster_placeholder') ? pageConfig.mediaconfirm.youtube.poster_placeholder : ''; 2528 desc = pageConfig.mediaconfirm.youtube.desc; 2529 linkText = pageConfig.mediaconfirm.youtube.link_text; 2530 externlinkText = pageConfig.mediaconfirm.youtube.externlink_text; 2531 revocationLinkText = pageConfig.mediaconfirm.youtube.revocation_link_text; 2532 2533 } else if (videoType === 'vimeo') { 2534 2535 /** 2536 * Vimeo 2537 */ 2538 2539 posterPlaceholder = pageConfig.mediaconfirm.vimeo.hasOwnProperty('poster_placeholder') ? pageConfig.mediaconfirm.vimeo.poster_placeholder : ''; 2540 desc = pageConfig.mediaconfirm.vimeo.desc; 2541 linkText = pageConfig.mediaconfirm.vimeo.link_text; 2542 externlinkText = pageConfig.mediaconfirm.vimeo.externlink_text; 2543 revocationLinkText = pageConfig.mediaconfirm.vimeo.revocation_link_text; 2544 2545 } 2546 2547 2548 /** 2549 * Maximale Breite 2550 */ 2551 2552 if ( 2553 (typeof $(element).data('maxwidth') !== 'undefined') && 2554 ($(element).data('maxwidth') !== '') 2555 ) { 2556 element.style.maxWidth = parseInt($(element).data('maxwidth')) + 'px'; 2557 } 2558 2559 2560 /** 2561 * Titel verarbeiten 2562 */ 2563 2564 if ( 2565 (typeof $(element).data('title') !== 'undefined') && 2566 ($(element).data('poster') !== '') 2567 ) { 2568 title = $(element).data('title'); 2569 } 2570 2571 2572 /** 2573 * Poster-Image verarbeiten 2574 */ 2575 2576 let imageElement = document.createElement('img'); 2577 imageElement.loading = 'lazy'; 2578 imageElement.title = title; 2579 2580 if ( 2581 (typeof $(element).data('poster') !== 'undefined') && 2582 ($(element).data('poster') !== '') 2583 ) { 2584 imageElement.src = $(element).data('poster'); 2585 } else if (posterPlaceholder !== '') { 2586 imageElement.src = posterPlaceholder; 2587 } else { 2588 imageElement = null; 2589 } 2590 2591 2592 /** 2593 * HTML-Elemente zusammenstellen und einbringen 2594 */ 2595 2596 let contentElement = document.createElement('div'); 2597 contentElement.classList.add('content'); 2598 2599 let contentInnerElement = document.createElement('div'); 2600 contentInnerElement.classList.add('content-inner'); 2601 2602 let descElement = document.createElement('div'); 2603 descElement.classList.add('desc'); 2604 descElement.innerHTML = desc; 2605 2606 let buttonsElement = document.createElement('div'); 2607 buttonsElement.classList.add('buttons'); 2608
2609 let confirmElement = document.createElement('button'); 2610 confirmElement.classList.add('btn'); 2611 confirmElement.classList.add('btn-sm'); 2612 confirmElement.classList.add('btn-white'); 2613 confirmElement.classList.add('confirm'); 2614 confirmElement.innerHTML = linkText; 2615 confirmElement.type = 'button'; 2616 confirmElement.setAttribute('data-videotype', videoType); 2617 2618 $(buttonsElement).append($(confirmElement)); 2619 2620 if ( externlinkText !== '') { 2621 let externalLinkElement = document.createElement('a'); 2622 externalLinkElement.classList.add('btn'); 2623 externalLinkElement.classList.add('btn-sm'); 2624 externalLinkElement.classList.add('btn-outline-white'); 2625 externalLinkElement.innerHTML = externlinkText; 2626 externalLinkElement.target = '_blank'; 2627 externalLinkElement.href = $(element).data('src-original'); 2628 2629 $(buttonsElement).append($(externalLinkElement)); 2630 } 2631 2632 $(contentInnerElement).append($(descElement)); 2633 $(contentInnerElement).append($(buttonsElement)); 2634 2635 $(contentElement).append($(contentInnerElement)); 2636 2637 // Element zum Zurückziehen der Einwilligung erzeugen 2638 let revocationElement = document.createElement('div'); 2639 revocationElement.classList.add('revocation'); 2640 2641 let revocationLinkElement = document.createElement('a'); 2642 revocationLinkElement.classList.add('revocation-link'); 2643 revocationLinkElement.innerHTML = revocationLinkText; 2644 revocationLinkElement.href = ''; 2645 2646 revocationElement.appendChild(revocationLinkElement); 2647 2648 // Event-Handler-Funktionen entfernen 2649 $(revocationElement).off('click'); 2650 2651 // Alle Elemente einbringen 2652 if (imageElement !== null) { 2653 $(element).append($(imageElement)); 2654 } 2655 2656 $(element).append($(contentElement)); 2657 $(element).append($(revocationElement)); 2658 2659 2660 /** 2661 * Bei Betätigung der Bestätigungsschaltfläche Video dynamisch einbetten 2662 */ 2663 2664 $(element).find('button.confirm').on('click', function () { 2665 2666 let parentElement = $(this).closest('.sc27mediaconfirm'); 2667 let firstElementOfType = true; 2668 2669 2670 /** 2671 * Zuerst nur das expizit vom Nutzer angeklickte Element aktivieren 2672 */ 2673 2674 // Angeklicktes Video einbinden und automatisch abspielen 2675 self.activateElement(this, mediaType, true); 2676 2677 // Kennzeichnen, dass ggf. weitere Videos nicht mehr automatisch abgespielt werden sollen 2678 firstElementOfType = false;
2679 2680 2681 /** 2682 * Alle anderen, noch nicht aktivierten Elemente des gleichen Typs aktivieren 2683 */ 2684 2685 $('.sc27mediaconfirm[data-sc27mediatype=' + mediaType + ']:not(.activated)').each(function (i) { 2686 2687 // Nur erstes Elemente dieses Typs automatisch abspielen lassen 2688 let startVideo = (firstElementOfType) ? null : false; 2689 2690 self.activateElement(this, mediaType, startVideo); 2691 2692 // Nachfolgende Elemente nicht mehr automatisch starten lassen 2693 firstElementOfType = false; 2694 2695 }); 2696 2697 }); 2698 2699 } 2700 2701 2702 /** 2703 * Aktiviert das angegebene Element 2704 * 2705 * @param element 2706 * @param mediaType 2707 * @param startVideo 2708 */ 2709 this.activateElement = function (element, mediaType, startVideo) { 2710 2711 // Debugging 2712 self.settings.debug && console.log(self.settings.debugPrefix + 'activateElement(): activating media element for media type "' + mediaType + '", startVideo = "' + String(startVideo) + '"'); 2713 2714 2715 /** 2716 * Status der Einwilligung speichern 2717 */ 2718 2719 self.setConsentStatus(mediaType, true); 2720 2721 2722 /** 2723 * Daten zusammenstellen 2724 */ 2725 2726 let parentElement = $(element).closest('.sc27mediaconfirm'); 2727 let src = $(parentElement).data('src'); 2728 let aspectratio = $(parentElement).data('aspectratio'); 2729 2730 self.settings.debug && console.log(self.settings.debugPrefix + 'activateElement(): media element for media type "' + mediaType + '" with src "' + src + '"'); 2731 2732 2733 /** 2734 * Autoplay umsetzen 2735 */ 2736 2737 if (startVideo !== null) { 2738 2739 let url = new URL(src); 2740 2741 2742 /** 2743 * Autoplay - YouTube 2744 */ 2745 2746 const regexYoutube = /((www\.?)?youtube(-nocookie)?\.com)/i; 2747 2748 if (url.host.match(regexYoutube)) { 2749 2750 // "autoplay"-Parameter in URL einbringen 2751 let paramValue = (startVideo === true) ? '1' : '0'; 2752 url.searchParams.set('autoplay', paramValue); 2753 2754 // Stummschaltung bei explizit zu startendem Video deaktivieren 2755 if (startVideo === true) { 2756 url.searchParams.set('mute', '0'); 2757 } 2758 2759 // Veränderte URL verwenden 2760 src = String(url); 2761 self.settings.debug && console.log(self.settings.debugPrefix + 'activateElement(): setting URL for YouTube media to "' + src + '"'); 2762 2763 } 2764 2765 2766 /** 2767 * Autoplay - Vimeo 2768 */ 2769 2770 const regexVimeo = /(player\.vimeo\.com)/i; 2771 2772 if (url.host.match(regexVimeo)) { 2773 2774 // "autoplay"-Parameter in URL einbringen 2775 let paramValue = (startVideo === true) ? '1' : '0'; 2776 url.searchParams.set('autoplay', paramValue); 2777 2778 // Veränderte URL verwenden 2779 src = String(url); 2780 self.settings.debug && console.log(self.settings.debugPrefix + 'activateElement(): setting URL for Vimeo media to "' + src + '"'); 2781 2782 } 2783 2784 } 2785 2786 2787 /** 2788 * iframe zur Video-Einbindung erzeugen 2789 */ 2790 2791 let iframeElement = document.createElement('iframe'); 2792 2793 2794 /** 2795 * iframe-HTML-Element - Weitere Parameter festlegen 2796 */ 2797 2798 iframeElement.src = src; 2799 iframeElement.allow = 'autoplay; fullscreen'; 2800 2801 if ( 2802 aspectratio && 2803 (String(aspectratio) !== '') 2804 ) { 2805 iframeElement.style.aspectRatio = aspectratio; 2806 } else { 2807 iframeElement.style.aspectRatio = '16 / 9'; 2808 } 2809 2810 2811 /** 2812 * iframe-Element hinzufügen 2813 */ 2814 2815 $(parentElement).prepend($(iframeElement)); 2816 2817 2818 /** 2819 * Funktion zur Zurückziehung von Einwilligungen sichtbar/unsichtbar schalten 2820 */ 2821 2822 if (self.revocationAvailable()) { 2823 2824 /** 2825 * Klick auf Revocation-Link verarbeiten 2826 */ 2827 2828 $(parentElement).find('.revocation-link').off('click').on('click', function (event) { 2829 event.preventDefault(); 2830 self.settings.debug && console.log(self.settings.debugPrefix + 'activateElement(): revocation link clicked - handling revocation for media type "' + mediaType + '"'); 2831 self.handleRevokeConsent(mediaType); 2832 }); 2833 2834 2835 /** 2836 * Funktion sichtbar schalten 2837 */ 2838 2839 $(parentElement).addClass('revocation-available'); 2840 2841 } 2842 2843 2844 /** 2845 * Videoeinbindung als "aktiviert" kennzeichnen 2846 */ 2847 2848 $(parentElement).addClass('activated'); 2849 2850 } 2851 2852 2853 /** 2854 * Status der Einwilligung speichern 2855 */ 2856 this.setConsentStatus = function (mediaType, status) { 2857 2858 /** 2859 * Status via Callback-Funktion festlegen, sofern definiert 2860 */ 2861 2862 if (self.funcSetConsentStatus !== null) { 2863 self.settings.debug && console.log(self.settings.debugPrefix + 'setConsentStatus(): setting consent state for media type "' + mediaType + '" by calling custom function ...', status); 2864 self.callFunction(self.funcSetConsentStatus, [mediaType, status]); 2865 2866 return true; 2867 } 2868 2869 2870 /** 2871 * Speichern via Consent Manager, sofern verwendet 2872 */ 2873 2874 if ( 2875 (typeof sc27ConsentManager !== 'undefined') && 2876 (typeof sc27ConsentManager.getConsentStatus === 'function') 2877 ) { 2878 self.settings.debug && console.log(self.settings.debugPrefix + 'setConsentStatus(): setting consent state for media type "' + mediaType + '" via sector27 Consent Manager: ' + status); 2879 sc27ConsentManager.setConsentStatus(mediaType, status) 2880 2881 return true; 2882 } 2883 2884 2885 /** 2886 * Prüfen, ob Storage nutzbar 2887 */ 2888 2889 if (self.consentStorage === null) { 2890 self.settings.debug && console.log(self.settings.debugPrefix + 'setConsentStatus(): consent storage not defined'); 2891 return false;
2892 } 2893 2894 2895 /** 2896 * Speichern in Storage 2897 */ 2898 2899 let key = self.settings.storageIdentifierPrefix + self.capitalizeFirstLetter(mediaType); 2900 2901 self.settings.debug && console.log(self.settings.debugPrefix + 'setConsentStatus(): setting consent state for media type "' + mediaType + '" via own routine: ', status); 2902 2903 if (status) { 2904 self.consentStorage.setItem(key, 'accepted'); 2905 } else { 2906 self.consentStorage.removeItem(key); 2907 } 2908 2909 2910 return true; 2911 2912 } 2913 2914 2915 /** 2916 * Status der Einwilligung ermitteln 2917 */ 2918 this.getConsentStatus = function (mediaType) { 2919 2920 let consentStatus = false; 2921 2922 self.settings.debug && console.log(self.settings.debugPrefix + 'getConsentStatus(): checking consent for media type: ' + mediaType); 2923 2924 2925 /** 2926 * Status via Callback-Funktion ermitteln, sofern definiert 2927 */ 2928 2929 if (self.funcGetConsentStatus !== null) { 2930 self.settings.debug && console.log(self.settings.debugPrefix + 'getConsentStatus(): checking consent state for media type "' + mediaType + '" by calling custom function ...'); 2931 consentStatus = self.callFunction(self.funcGetConsentStatus, mediaType); 2932 2933 return consentStatus; 2934 } 2935 2936 2937 /** 2938 * Status via Consent Manager ermitteln, sofern verwendet 2939 */ 2940 2941 if ( 2942 (typeof sc27ConsentManager !== 'undefined') && 2943 (typeof sc27ConsentManager.getConsentStatus === 'function') 2944 ) { 2945 2946 consentStatus = sc27ConsentManager.getConsentStatus(mediaType) 2947 self.settings.debug && console.log(self.settings.debugPrefix + 'getConsentStatus(): consent state, retrieved via sector27 Consent Manager, for media type "' + mediaType + '": ' + consentStatus); 2948 2949 return consentStatus; 2950 2951 } 2952 2953 2954 /** 2955 * Prüfen, ob Storage nutzbar 2956 */ 2957 2958 if (self.consentStorage === null) { 2959 self.settings.debug && console.log(self.settings.debugPrefix + 'getConsentStatus(): consent storage not defined'); 2960 return false; 2961 } 2962 2963 2964 /** 2965 * Status aus dem Storage ermitteln 2966 */ 2967 2968 let key = self.settings.storageIdentifierPrefix + self.capitalizeFirstLetter(String(mediaType)); 2969 2970 consentStatus = (self.consentStorage.getItem(key) === 'accepted'); 2971 self.settings.debug && console.log(self.settings.debugPrefix + 'getConsentStatus(): consent, retrieved via storage, for media type "' + mediaType + '": ' + consentStatus); 2972 2973 return consentStatus; 2974 2975 } 2976 2977 2978 /** 2979 * Erstes Zeichen des angegebenen Strings in einen GroÃbuchstaben umwandeln 2980 * @param string 2981 * @returns {string} 2982 */ 2983 this.capitalizeFirstLetter = function (string) { 2984 return string.charAt(0).toUpperCase() + string.slice(1); 2985 } 2986 2987 2988 /** 2989 * Initialisierung 2990 */ 2991 this.init = function (settings) { 2992 2993 /** 2994 * Initialisierung bereits erfolgt, dann ist nichts weiter zu tun 2995 */ 2996 2997 if (self.initDone) { 2998 return true; 2999 } 3000 3001 3002 /** 3003 * Einstellungen übernehmen 3004 */ 3005 3006 self.settings = Object.assign({}, self.defaultSettings, settings); 3007 3008 self.funcGetConsentStatus = self.settings.funcGetConsentStatus || null; 3009 self.funcSetConsentStatus = self.settings.funcSetConsentStatus || null; 3010 3011 // Debugging 3012 self.settings.debug && console.log(self.settings.debugPrefix + 'init(): initializing'); 3013 3014 3015 /** 3016 * Consent Storage festlegen 3017 */ 3018 3019 if ((self.settings.consentStorageType === 'localStorage') && self.isLocalStorageAvailable()) { 3020 3021 // localStorage 3022 self.settings.debug && console.log(self.settings.debugPrefix + 'init(): using storage type "localStorage"'); 3023 self.consentStorage = window.localStorage; 3024 3025 } else if ((self.settings.consentStorageType === 'sessionStorage') && self.isSessionStorageAvailable()) { 3026 3027 // sessionStorage 3028 self.settings.debug && console.log(self.settings.debugPrefix + 'init(): using storage type "sessionStorage"'); 3029 self.consentStorage = window.sessionStorage; 3030 3031 } else { 3032 3033 // storage not given or not svailable 3034 self.settings.debug && console.log(self.settings.debugPrefix + 'init(): given storage type "' + self.settings.consentStorageType + '" either not defined or not available'); 3035 3036 self.consentStorage = null; 3037 self.settings.consentStorageType = ''; 3038 3039 } 3040 3041 3042 /** 3043 * Callback-Funktion für Consent Manager registrieren 3044 */ 3045 3046 if ( 3047 (typeof sc27ConsentManager !== 'undefined') && 3048 (typeof sc27ConsentManager.registerCallback === 'function') 3049 ) { 3050 // Callback-Funktionen beim Consent Manager registrieren, die dieser aufruft, sobald eine Einwilligung erteilt bzw. zurückgezogen wurde 3051 self.settings.debug && console.log(self.settings.debugPrefix + 'init(): registering callback functions within sector27 Consent Manager'); 3052 sc27ConsentManager.registerCallback('consentConfirmed', self.consentmanagerCallbackConsentConfirmed); 3053 sc27ConsentManager.registerCallback('consentRevoked', self.consentmanagerCallbackConsentRevoked); 3054 3055 // Status festhalten, dass sector27-eigener Consent Manager verwendet wird 3056 self.useSc27ConsentManager = true; 3057 } 3058 3059 3060 /** 3061 * Auf aktueller Seite vorhandene Videoarten ermitteln 3062 */ 3063 3064 $('.sc27mediaconfirm').each(function (i) { 3065 3066 3067 let videoType = $(this).data('sc27mediatype'); 3068 3069 3070 if (self.mediaTypesSupported.includes(videoType)) { 3071 3072 if (!self.mediaTypesDetected.includes(videoType)) { 3073 self.mediaTypesDetected.push(videoType); 3074 } 3075 3076 } 3077 3078 }); 3079 3080 3081 /** 3082 * Pauschal Disclaimer für sämtliche Medien-Typen erzeugen 3083 */ 3084 3085 for (let i = 0, len = self.mediaTypesDetected.length; i < len; i++) { 3086 3087 let mediaType = self.mediaTypesDetected[i]; 3088 3089 3090 /**
3091 * Für alle Medien-Elemente des angegebenen Typs einen Disclaimer erzeugen 3092 */ 3093 3094 $('.sc27mediaconfirm[data-sc27mediatype="' + mediaType + '"]').each(function (i) { 3095 self.prepareDisclaimer(this, mediaType); 3096 }); 3097 3098 } 3099 3100 3101 /** 3102 * Alle auf aktueller Seite ermittelten Videoarten durchlaufen 3103 * Fallweise Einbindung aktivieren oder ansonsten Disclaimer erzeugen 3104 */ 3105 3106 for (let i = 0, len = self.mediaTypesDetected.length; i < len; i++) { 3107 3108 let mediaType = self.mediaTypesDetected[i]; 3109 3110 3111 /** 3112 * Element aktivieren, sofern Einwilligung vorliegt oder ansonsten Disclaimer erzeugen 3113 */ 3114 3115 if (self.getConsentStatus(mediaType)) { 3116 self.activateElementsOfType(mediaType); 3117 } 3118 3119 } 3120 3121 3122 /** 3123 * Initialisierung als abgeschlossen betrachten 3124 */ 3125 3126 self.initDone = true; 3127 3128 } 3129 3130 3131 /** 3132 * Calls a function either given by name or as a function 3133 */ 3134 this.callFunction = function (fn, args = null) { 3135 3136 if (typeof fn === 'function') { 3137 3138 self.settings.debug && console.log(self.settings.debugPrefix + 'callFunction(): calling function, given as type "function" ...'); 3139 return fn(args); 3140 3141 } else if (typeof fn === 'string') { 3142 3143 self.settings.debug && console.log(self.settings.debugPrefix + 'callFunction(): calling function, given as type "string" ...', args); 3144 return self.callFunctionByName(fn, window, args); 3145 3146 } else { 3147 3148 self.settings.debug && console.log(self.settings.debugPrefix + 'error function:', fn); 3149 return false; 3150 3151 } 3152 3153 } 3154 3155 3156 /** 3157 * Calls the function given by name 3158 */ 3159 this.callFunctionByName = function (functionName, context = window, args = null) { 3160 3161 args = Array.prototype.slice.call(arguments, 2); 3162 3163 let namespaces = functionName.split("."); 3164 let func = namespaces.pop(); 3165 3166 for (let i = 0; i < namespaces.length; i++) { 3167 context = context[namespaces[i]]; 3168 } 3169 3170 self.settings.debug && console.log(self.settings.debugPrefix + 'callFunctionByName(): call function by name "' + functionName + '" and arguments:', args); 3171 return context[func].apply(context, args); 3172 3173 } 3174 3175 3176 /** 3177 * Prüft, ob die Möglichkeit besteht eine Einwilligung zurückziehen zu können 3178 */ 3179 this.revocationAvailable = function () { 3180 3181 if (self.useSc27ConsentManager) { 3182 return true; 3183 } else { 3184 return (self.consentStorage !== null) ? true : false; 3185 } 3186 3187 } 3188 3189 3190 /** 3191 * Führt die Rücknahme der Einwilligung zu angegebenem Medientyp durch 3192 * @param mediaType 3193 * @param doRevokeAction 3194 */ 3195 this.handleRevokeConsent = function (mediaType, doRevokeAction) { 3196 3197 self.settings.debug && console.log(self.settings.debugPrefix + 'handleRevokeConsent(): revoking consent for media type "' + mediaType + '"'); 3198 3199 3200 /** 3201 * Sofern nicht explizit angegben die eigentliche Rücknahem der Einwilligung durchführen (Entfernung aus Storage) 3202 * (Durchführung für den Fall explizit nicht notwendig, sofern diese Funktion bereits als Callback-Funktion des Consent Managers aufgerufen wurde [Rücknahme in diesem Fall bereits erfolgt; erneute Ausführugn würde zu Endlosschleife führen]) 3203 */ 3204 3205 if (doRevokeAction !== false) { 3206 // Einwilligung entfernen 3207 self.setConsentStatus(mediaType, false); 3208 } 3209 3210 3211 /** 3212 * Alle Medien-Elemente durchlaufen und Inhalte deaktivieren 3213 */ 3214 3215 $('.sc27mediaconfirm[data-sc27mediatype="' + mediaType + '"].activated').each(function (i) { 3216 self.settings.debug && console.log(self.settings.debugPrefix + 'handleRevokeConsent(): deactivating elements of media type "' + mediaType + '"'); 3217 self.prepareDisclaimer(this, mediaType); 3218 }); 3219 3220 } 3221 3222 3223 /** 3224 * Prüft, ob der localStorage nutzbar ist 3225 * @returns {boolean} 3226 */ 3227 this.isLocalStorageAvailable = function () { 3228 3229 try { 3230 const key = self.settings.storageIdentifierPrefix + 'Test'; 3231 window.localStorage.setItem(key, key); 3232 window.localStorage.removeItem(key); 3233 return true; 3234 } catch (e) { 3235 return false; 3236 } 3237 3238 }; 3239 3240 3241 /** 3242 * Prüft, ob der sessionStorage nutzbar ist 3243 * @returns {boolean} 3244 */ 3245 this.isSessionStorageAvailable = function () { 3246 3247 try {
3248 const key = self.settings.storageIdentifierPrefix + 'Test'; 3249 window.sessionStorage.setItem(key, key); 3250 window.sessionStorage.removeItem(key); 3251 return true; 3252 } catch (e) { 3253 return false; 3254 } 3255 3256 }; 3257 3258}
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.